CommonLibSSE (Parapets fork)
OpenVRTypes.h
Go to the documentation of this file.
1 #pragma once
2 
3 namespace vr
4 {
9  {
10  float rfRed[2];
11  float rfGreen[2];
12  float rfBlue[2];
13  };
14 
15  enum EVREye
16  {
17  Eye_Left = 0,
18  Eye_Right = 1
19  };
20 
22  {
23  TextureType_DirectX = 0, // Handle is an ID3D11Texture
24  TextureType_OpenGL = 1, // Handle is an OpenGL texture name or an OpenGL render buffer name, depending on submit flags
25  TextureType_Vulkan = 2, // Handle is a pointer to a VRVulkanTextureData_t structure
26  TextureType_IOSurface = 3, // Handle is a macOS cross-process-sharable IOSurfaceRef
27  TextureType_DirectX12 = 4, // Handle is a pointer to a D3D12TextureData_t structure
28  };
29 
31  {
32  ColorSpace_Auto = 0, // Assumes 'gamma' for 8-bit per component formats, otherwise 'linear'. This mirrors the DXGI formats which have _SRGB variants.
33  ColorSpace_Gamma = 1, // Texture data can be displayed directly on the display without any conversion (a.k.a. display native format).
34  ColorSpace_Linear = 2, // Same as gamma but has been converted to a linear representation using DXGI's sRGB conversion algorithm.
35  };
36 
37  struct Texture_t
38  {
39  void* handle; // See ETextureType definition above
42  };
43 
45  using TrackedDeviceIndex_t = std::uint32_t;
46 
48  using VROverlayHandle_t = std::uint64_t;
49 
53  {
54  TrackingUniverseSeated = 0, // Poses are provided relative to the seated zero pose
55  TrackingUniverseStanding = 1, // Poses are provided relative to the safe bounds configured by the user
56  TrackingUniverseRawAndUncalibrated = 2, // Poses are provided in the coordinate system defined by the driver. It has Y up and is unified for devices of the same driver. You usually don't want this one.
57  };
58 
61  {
63 
67  VROverlayError_OverlayLimitExceeded = 13, // No more overlays could be created because the maximum number already exist
87  };
88 
92  {
93  float uMin, vMin;
94  float uMax, vMax;
95  };
96 }
Definition: COpenVRContext.h:4
std::uint32_t TrackedDeviceIndex_t
Definition: OpenVRTypes.h:45
EVROverlayError
Definition: OpenVRTypes.h:61
@ VROverlayError_ArrayTooSmall
Definition: OpenVRTypes.h:76
@ VROverlayError_WrongVisibilityType
Definition: OpenVRTypes.h:68
@ VROverlayError_InvalidTrackedDevice
Definition: OpenVRTypes.h:73
@ VROverlayError_UnknownOverlay
Definition: OpenVRTypes.h:64
@ VROverlayError_KeyInUse
Definition: OpenVRTypes.h:71
@ VROverlayError_TextureAlreadyLocked
Definition: OpenVRTypes.h:84
@ VROverlayError_WrongTransformType
Definition: OpenVRTypes.h:72
@ VROverlayError_KeyboardAlreadyInUse
Definition: OpenVRTypes.h:80
@ VROverlayError_TextureLockCapacityReached
Definition: OpenVRTypes.h:85
@ VROverlayError_InvalidHandle
Definition: OpenVRTypes.h:65
@ VROverlayError_UnableToLoadFile
Definition: OpenVRTypes.h:79
@ VROverlayError_KeyTooLong
Definition: OpenVRTypes.h:69
@ VROverlayError_OverlayLimitExceeded
Definition: OpenVRTypes.h:67
@ VROverlayError_RequestFailed
Definition: OpenVRTypes.h:77
@ VROverlayError_InvalidParameter
Definition: OpenVRTypes.h:74
@ VROverlayError_NoNeighbor
Definition: OpenVRTypes.h:81
@ VROverlayError_ThumbnailCantBeDestroyed
Definition: OpenVRTypes.h:75
@ VROverlayError_BadMaskPrimitive
Definition: OpenVRTypes.h:83
@ VROverlayError_TextureNotLocked
Definition: OpenVRTypes.h:86
@ VROverlayError_PermissionDenied
Definition: OpenVRTypes.h:66
@ VROverlayError_None
Definition: OpenVRTypes.h:62
@ VROverlayError_NameTooLong
Definition: OpenVRTypes.h:70
@ VROverlayError_InvalidTexture
Definition: OpenVRTypes.h:78
@ VROverlayError_TooManyMaskPrimitives
Definition: OpenVRTypes.h:82
std::uint64_t VROverlayHandle_t
Definition: OpenVRTypes.h:48
ETextureType
Definition: OpenVRTypes.h:22
@ TextureType_IOSurface
Definition: OpenVRTypes.h:26
@ TextureType_Vulkan
Definition: OpenVRTypes.h:25
@ TextureType_OpenGL
Definition: OpenVRTypes.h:24
@ TextureType_DirectX
Definition: OpenVRTypes.h:23
@ TextureType_DirectX12
Definition: OpenVRTypes.h:27
ETrackingUniverseOrigin
Definition: OpenVRTypes.h:53
@ TrackingUniverseStanding
Definition: OpenVRTypes.h:55
@ TrackingUniverseRawAndUncalibrated
Definition: OpenVRTypes.h:56
@ TrackingUniverseSeated
Definition: OpenVRTypes.h:54
EColorSpace
Definition: OpenVRTypes.h:31
@ ColorSpace_Gamma
Definition: OpenVRTypes.h:33
@ ColorSpace_Auto
Definition: OpenVRTypes.h:32
@ ColorSpace_Linear
Definition: OpenVRTypes.h:34
EVREye
Definition: OpenVRTypes.h:16
@ Eye_Right
Definition: OpenVRTypes.h:18
@ Eye_Left
Definition: OpenVRTypes.h:17
Definition: OpenVRTypes.h:9
float rfRed[2]
Definition: OpenVRTypes.h:10
float rfGreen[2]
Definition: OpenVRTypes.h:11
float rfBlue[2]
Definition: OpenVRTypes.h:12
Definition: OpenVRTypes.h:38
EColorSpace eColorSpace
Definition: OpenVRTypes.h:41
ETextureType eType
Definition: OpenVRTypes.h:40
void * handle
Definition: OpenVRTypes.h:39
Definition: OpenVRTypes.h:92
float vMin
Definition: OpenVRTypes.h:93
float vMax
Definition: OpenVRTypes.h:94
float uMin
Definition: OpenVRTypes.h:93
float uMax
Definition: OpenVRTypes.h:94