Browse Source

Remove VR support

Clément Wolf 2 months ago
parent
commit
f328e7b29b
66 changed files with 69 additions and 18804 deletions
  1. 1 1
      build.bat
  2. 0 0
      libraries/openvr/1.0.6.txt
  3. BIN
      libraries/openvr/bin/openvr_api.dll
  4. 0 3643
      libraries/openvr/include/openvr.h
  5. 0 1869
      libraries/openvr/include/openvr_capi.h
  6. 0 2541
      libraries/openvr/include/openvr_driver.h
  7. 0 3985
      libraries/openvr/include/openvr_mingw.hpp
  8. 0 62
      libraries/openvr/include/wrap_openvr.py
  9. BIN
      libraries/openvr/lib/windows/openvr_api.lib
  10. 0 23
      resources/shaders/cursortrailVR.fsh
  11. 0 16
      resources/shaders/cursortrailVR.vsh
  12. 0 136
      resources/shaders/sliderVR.fsh
  13. 0 13
      resources/shaders/sliderVR.vsh
  14. 17 138
      src/App/Osu/Osu.cpp
  15. 0 12
      src/App/Osu/Osu.h
  16. 6 45
      src/App/Osu/OsuBeatmap.cpp
  17. 0 3
      src/App/Osu/OsuBeatmap.h
  18. 5 233
      src/App/Osu/OsuBeatmapStandard.cpp
  19. 0 4
      src/App/Osu/OsuBeatmapStandard.h
  20. 1 0
      src/App/Osu/OsuChangelog.cpp
  21. 2 99
      src/App/Osu/OsuCircle.cpp
  22. 0 4
      src/App/Osu/OsuCircle.h
  23. 2 2
      src/App/Osu/OsuDatabase.cpp
  24. 7 281
      src/App/Osu/OsuHUD.cpp
  25. 0 9
      src/App/Osu/OsuHUD.h
  26. 0 12
      src/App/Osu/OsuHitObject.cpp
  27. 0 8
      src/App/Osu/OsuHitObject.h
  28. 1 3
      src/App/Osu/OsuMainMenu.cpp
  29. 1 1
      src/App/Osu/OsuModSelector.cpp
  30. 16 231
      src/App/Osu/OsuOptionsMenu.cpp
  31. 0 11
      src/App/Osu/OsuOptionsMenu.h
  32. 1 20
      src/App/Osu/OsuScore.cpp
  33. 2 6
      src/App/Osu/OsuSkin.cpp
  34. 5 454
      src/App/Osu/OsuSlider.cpp
  35. 0 6
      src/App/Osu/OsuSlider.h
  36. 0 282
      src/App/Osu/OsuSliderRenderer.cpp
  37. 0 16
      src/App/Osu/OsuSliderRenderer.h
  38. 2 2
      src/App/Osu/OsuSongBrowser2.cpp
  39. 0 41
      src/App/Osu/OsuSpinner.cpp
  40. 0 3
      src/App/Osu/OsuSpinner.h
  41. 0 19
      src/App/Osu/OsuUpdateHandler.cpp
  42. 0 5
      src/App/Osu/OsuUpdateHandler.h
  43. 0 1088
      src/App/Osu/OsuVR.cpp
  44. 0 158
      src/App/Osu/OsuVR.h
  45. 0 96
      src/App/Osu/OsuVRTutorial.cpp
  46. 0 36
      src/App/Osu/OsuVRTutorial.h
  47. 0 92
      src/App/Osu/OsuVRUIButton.cpp
  48. 0 31
      src/App/Osu/OsuVRUIButton.h
  49. 0 33
      src/App/Osu/OsuVRUIElement.cpp
  50. 0 55
      src/App/Osu/OsuVRUIElement.h
  51. 0 82
      src/App/Osu/OsuVRUIImageButton.cpp
  52. 0 32
      src/App/Osu/OsuVRUIImageButton.h
  53. 0 99
      src/App/Osu/OsuVRUIImageCheckbox.cpp
  54. 0 43
      src/App/Osu/OsuVRUIImageCheckbox.h
  55. 0 123
      src/App/Osu/OsuVRUISlider.cpp
  56. 0 34
      src/App/Osu/OsuVRUISlider.h
  57. 0 2
      src/App/Osu/OsuVolumeOverlay.cpp
  58. 0 8
      src/Engine/Engine.cpp
  59. 0 2
      src/Engine/Engine.h
  60. 0 1
      src/Engine/Graphics.h
  61. 0 207
      src/Engine/Input/OpenVRController.cpp
  62. 0 124
      src/Engine/Input/OpenVRController.h
  63. 0 5
      src/Engine/Main/EngineFeatures.h
  64. 0 1945
      src/Engine/OpenVRInterface.cpp
  65. 0 268
      src/Engine/OpenVRInterface.h
  66. 0 1
      src/Engine/Platform/WinGLLegacyInterface.cpp

+ 1 - 1
build.bat

@@ -13,7 +13,7 @@ if %errorlevel% equ 0 (
 set CXXFLAGS=-std=c++17 -Wall -fmessage-length=0 -Wno-sign-compare -Wno-unused-local-typedefs -Wno-reorder -Wno-switch -IC:\mingw32\include
 set CXXFLAGS=%CXXFLAGS% -D__GXX_EXPERIMENTAL_CXX0X__
 set CXXFLAGS=%CXXFLAGS% -Isrc/App -Isrc/App/Osu -Isrc/Engine -Isrc/GUI -Isrc/GUI/Windows -Isrc/GUI/Windows/VinylScratcher -Isrc/Engine/Input -Isrc/Engine/Platform -Isrc/Engine/Main -Isrc/Engine/Renderer -Isrc/Util
-set LDFLAGS=-logg -lADLMIDI -lmad -lmodplug -lsmpeg -lgme -lvorbis -lopus -lvorbisfile -ldiscord-rpc -lSDL2_mixer_ext.dll -lSDL2 -ld3dcompiler_47 -ld3d11 -ldxgi -lopenvr_api -lcurl -llibxinput9_1_0 -lfreetype -lopengl32 -lOpenCL -lvulkan-1 -lglew32 -lglu32 -lgdi32 -lbass -lbassasio -lbass_fx -lbassmix -lbasswasapi -lcomctl32 -lDwmapi -lComdlg32 -lpsapi -lws2_32 -lwinmm -lpthread -llibjpeg -lwbemuuid -lole32 -loleaut32 -llzma
+set LDFLAGS=-logg -lADLMIDI -lmad -lmodplug -lsmpeg -lgme -lvorbis -lopus -lvorbisfile -ldiscord-rpc -lSDL2_mixer_ext.dll -lSDL2 -ld3dcompiler_47 -ld3d11 -ldxgi -lcurl -llibxinput9_1_0 -lfreetype -lopengl32 -lOpenCL -lvulkan-1 -lglew32 -lglu32 -lgdi32 -lbass -lbassasio -lbass_fx -lbassmix -lbasswasapi -lcomctl32 -lDwmapi -lComdlg32 -lpsapi -lws2_32 -lwinmm -lpthread -llibjpeg -lwbemuuid -lole32 -loleaut32 -llzma
 
 set CXXFLAGS=%CXXFLAGS% -g3
 rem set CXXFLAGS=%CXXFLAGS% -O3

+ 0 - 0
libraries/openvr/1.0.6.txt


BIN
libraries/openvr/bin/openvr_api.dll


+ 0 - 3643
libraries/openvr/include/openvr.h

@@ -1,3643 +0,0 @@
-#pragma once
-
-// openvr.h
-//========= Copyright Valve Corporation ============//
-// Dynamically generated file. Do not modify this file directly.
-
-#ifndef _OPENVR_API
-#define _OPENVR_API
-
-#include <stdint.h>
-
-
-
-// vrtypes.h
-#ifndef _INCLUDE_VRTYPES_H
-#define _INCLUDE_VRTYPES_H
-
-// Forward declarations to avoid requiring vulkan.h
-struct VkDevice_T;
-struct VkPhysicalDevice_T;
-struct VkInstance_T;
-struct VkQueue_T;
-
-// Forward declarations to avoid requiring d3d12.h
-struct ID3D12Resource;
-struct ID3D12CommandQueue;
-
-namespace vr
-{
-
-#if defined(__linux__) || defined(__APPLE__) 
-	// The 32-bit version of gcc has the alignment requirement for uint64 and double set to
-	// 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned.
-	// The 64-bit version of gcc has the alignment requirement for these types set to
-	// 8 meaning that unless we use #pragma pack(4) our structures will get bigger.
-	// The 64-bit structure packing has to match the 32-bit structure packing for each platform.
-	#pragma pack( push, 4 )
-#else
-	#pragma pack( push, 8 )
-#endif
-
-typedef void* glSharedTextureHandle_t;
-typedef int32_t glInt_t;
-typedef uint32_t glUInt_t;
-
-// right-handed system
-// +y is up
-// +x is to the right
-// -z is going away from you
-// Distance unit is  meters
-struct HmdMatrix34_t
-{
-	float m[3][4];
-};
-
-struct HmdMatrix44_t
-{
-	float m[4][4];
-};
-
-struct HmdVector3_t
-{
-	float v[3];
-};
-
-struct HmdVector4_t
-{
-	float v[4];
-};
-
-struct HmdVector3d_t
-{
-	double v[3];
-};
-
-struct HmdVector2_t
-{
-	float v[2];
-};
-
-struct HmdQuaternion_t
-{
-	double w, x, y, z;
-};
-
-struct HmdColor_t
-{
-	float r, g, b, a;
-};
-
-struct HmdQuad_t
-{
-	HmdVector3_t vCorners[ 4 ];
-};
-
-struct HmdRect2_t
-{
-	HmdVector2_t vTopLeft;
-	HmdVector2_t vBottomRight;
-};
-
-/** Used to return the post-distortion UVs for each color channel. 
-* UVs range from 0 to 1 with 0,0 in the upper left corner of the 
-* source render target. The 0,0 to 1,1 range covers a single eye. */
-struct DistortionCoordinates_t
-{
-	float rfRed[2];
-	float rfGreen[2];
-	float rfBlue[2];
-};
-
-enum EVREye
-{
-	Eye_Left = 0,
-	Eye_Right = 1
-};
-
-enum ETextureType
-{
-	TextureType_DirectX = 0, // Handle is an ID3D11Texture
-	TextureType_OpenGL = 1,  // Handle is an OpenGL texture name or an OpenGL render buffer name, depending on submit flags
-	TextureType_Vulkan = 2, // Handle is a pointer to a VRVulkanTextureData_t structure
-	TextureType_IOSurface = 3, // Handle is a macOS cross-process-sharable IOSurface
-	TextureType_DirectX12 = 4, // Handle is a pointer to a D3D12TextureData_t structure
-};
-
-enum EColorSpace
-{
-	ColorSpace_Auto = 0,	// Assumes 'gamma' for 8-bit per component formats, otherwise 'linear'.  This mirrors the DXGI formats which have _SRGB variants.
-	ColorSpace_Gamma = 1,	// Texture data can be displayed directly on the display without any conversion (a.k.a. display native format).
-	ColorSpace_Linear = 2,	// Same as gamma but has been converted to a linear representation using DXGI's sRGB conversion algorithm.
-};
-
-struct Texture_t
-{
-	void* handle; // See ETextureType definition above
-	ETextureType eType;
-	EColorSpace eColorSpace;
-};
-
-// Handle to a shared texture (HANDLE on Windows obtained using OpenSharedResource).
-typedef uint64_t SharedTextureHandle_t;
-#define INVALID_SHARED_TEXTURE_HANDLE	((vr::SharedTextureHandle_t)0)
-
-enum ETrackingResult
-{
-	TrackingResult_Uninitialized			= 1,
-
-	TrackingResult_Calibrating_InProgress	= 100,
-	TrackingResult_Calibrating_OutOfRange	= 101,
-
-	TrackingResult_Running_OK				= 200,
-	TrackingResult_Running_OutOfRange		= 201,
-};
-
-static const uint32_t k_unMaxDriverDebugResponseSize = 32768;
-
-/** Used to pass device IDs to API calls */
-typedef uint32_t TrackedDeviceIndex_t;
-static const uint32_t k_unTrackedDeviceIndex_Hmd = 0;
-static const uint32_t k_unMaxTrackedDeviceCount = 16;
-static const uint32_t k_unTrackedDeviceIndexOther = 0xFFFFFFFE;
-static const uint32_t k_unTrackedDeviceIndexInvalid = 0xFFFFFFFF;
-
-/** Describes what kind of object is being tracked at a given ID */
-enum ETrackedDeviceClass
-{
-	TrackedDeviceClass_Invalid = 0,				// the ID was not valid.
-	TrackedDeviceClass_HMD = 1,					// Head-Mounted Displays
-	TrackedDeviceClass_Controller = 2,			// Tracked controllers
-	TrackedDeviceClass_GenericTracker = 3,		// Generic trackers, similar to controllers
-	TrackedDeviceClass_TrackingReference = 4,	// Camera and base stations that serve as tracking reference points
-};
-
-
-/** Describes what specific role associated with a tracked device */
-enum ETrackedControllerRole
-{
-	TrackedControllerRole_Invalid = 0,					// Invalid value for controller type
-	TrackedControllerRole_LeftHand = 1,					// Tracked device associated with the left hand
-	TrackedControllerRole_RightHand = 2,				// Tracked device associated with the right hand
-};
-
-
-/** describes a single pose for a tracked object */
-struct TrackedDevicePose_t
-{
-	HmdMatrix34_t mDeviceToAbsoluteTracking;
-	HmdVector3_t vVelocity;				// velocity in tracker space in m/s
-	HmdVector3_t vAngularVelocity;		// angular velocity in radians/s (?)
-	ETrackingResult eTrackingResult;
-	bool bPoseIsValid;
-
-	// This indicates that there is a device connected for this spot in the pose array.
-	// It could go from true to false if the user unplugs the device.
-	bool bDeviceIsConnected;
-};
-
-/** Identifies which style of tracking origin the application wants to use
-* for the poses it is requesting */
-enum ETrackingUniverseOrigin
-{
-	TrackingUniverseSeated = 0,		// Poses are provided relative to the seated zero pose
-	TrackingUniverseStanding = 1,	// Poses are provided relative to the safe bounds configured by the user
-	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.
-};
-
-// Refers to a single container of properties
-typedef uint64_t PropertyContainerHandle_t;
-typedef uint32_t PropertyTypeTag_t;
-
-static const PropertyContainerHandle_t k_ulInvalidPropertyContainer = 0;
-static const PropertyTypeTag_t k_unInvalidPropertyTag = 0;
-
-// Use these tags to set/get common types as struct properties
-static const PropertyTypeTag_t k_unFloatPropertyTag = 1;
-static const PropertyTypeTag_t k_unInt32PropertyTag = 2;
-static const PropertyTypeTag_t k_unUint64PropertyTag = 3;
-static const PropertyTypeTag_t k_unBoolPropertyTag = 4;
-static const PropertyTypeTag_t k_unStringPropertyTag = 5;
-
-static const PropertyTypeTag_t k_unHmdMatrix34PropertyTag = 20;
-static const PropertyTypeTag_t k_unHmdMatrix44PropertyTag = 21;
-static const PropertyTypeTag_t k_unHmdVector3PropertyTag = 22;
-static const PropertyTypeTag_t k_unHmdVector4PropertyTag = 23;
-
-static const PropertyTypeTag_t k_unHiddenAreaPropertyTag = 30;
-
-static const PropertyTypeTag_t k_unOpenVRInternalReserved_Start = 1000;
-static const PropertyTypeTag_t k_unOpenVRInternalReserved_End = 10000;
-
-
-/** Each entry in this enum represents a property that can be retrieved about a
-* tracked device. Many fields are only valid for one ETrackedDeviceClass. */
-enum ETrackedDeviceProperty
-{
-	Prop_Invalid								= 0,
-
-	// general properties that apply to all device classes
-	Prop_TrackingSystemName_String				= 1000,
-	Prop_ModelNumber_String						= 1001,
-	Prop_SerialNumber_String					= 1002,
-	Prop_RenderModelName_String					= 1003,
-	Prop_WillDriftInYaw_Bool					= 1004,
-	Prop_ManufacturerName_String				= 1005,
-	Prop_TrackingFirmwareVersion_String			= 1006,
-	Prop_HardwareRevision_String				= 1007,
-	Prop_AllWirelessDongleDescriptions_String	= 1008,
-	Prop_ConnectedWirelessDongle_String			= 1009,
-	Prop_DeviceIsWireless_Bool					= 1010,
-	Prop_DeviceIsCharging_Bool					= 1011,
-	Prop_DeviceBatteryPercentage_Float			= 1012, // 0 is empty, 1 is full
-	Prop_StatusDisplayTransform_Matrix34		= 1013,
-	Prop_Firmware_UpdateAvailable_Bool			= 1014,
-	Prop_Firmware_ManualUpdate_Bool				= 1015,
-	Prop_Firmware_ManualUpdateURL_String		= 1016,
-	Prop_HardwareRevision_Uint64				= 1017,
-	Prop_FirmwareVersion_Uint64					= 1018,
-	Prop_FPGAVersion_Uint64						= 1019,
-	Prop_VRCVersion_Uint64						= 1020,
-	Prop_RadioVersion_Uint64					= 1021,
-	Prop_DongleVersion_Uint64					= 1022,
-	Prop_BlockServerShutdown_Bool				= 1023,
-	Prop_CanUnifyCoordinateSystemWithHmd_Bool	= 1024,
-	Prop_ContainsProximitySensor_Bool			= 1025,
-	Prop_DeviceProvidesBatteryStatus_Bool		= 1026,
-	Prop_DeviceCanPowerOff_Bool					= 1027,
-	Prop_Firmware_ProgrammingTarget_String		= 1028,
-	Prop_DeviceClass_Int32						= 1029,
-	Prop_HasCamera_Bool							= 1030,
-	Prop_DriverVersion_String                   = 1031,
-	Prop_Firmware_ForceUpdateRequired_Bool      = 1032,
-	Prop_ViveSystemButtonFixRequired_Bool		= 1033,
-	Prop_ParentDriver_Uint64					= 1034,
-
-
-	// Properties that are unique to TrackedDeviceClass_HMD
-	Prop_ReportsTimeSinceVSync_Bool				= 2000,
-	Prop_SecondsFromVsyncToPhotons_Float		= 2001,
-	Prop_DisplayFrequency_Float					= 2002,
-	Prop_UserIpdMeters_Float					= 2003,
-	Prop_CurrentUniverseId_Uint64				= 2004, 
-	Prop_PreviousUniverseId_Uint64				= 2005, 
-	Prop_DisplayFirmwareVersion_Uint64			= 2006,
-	Prop_IsOnDesktop_Bool						= 2007,
-	Prop_DisplayMCType_Int32					= 2008,
-	Prop_DisplayMCOffset_Float					= 2009,
-	Prop_DisplayMCScale_Float					= 2010,
-	Prop_EdidVendorID_Int32						= 2011,
-	Prop_DisplayMCImageLeft_String              = 2012,
-	Prop_DisplayMCImageRight_String             = 2013,
-	Prop_DisplayGCBlackClamp_Float				= 2014,
-	Prop_EdidProductID_Int32					= 2015,
-	Prop_CameraToHeadTransform_Matrix34			= 2016,
-	Prop_DisplayGCType_Int32					= 2017,
-	Prop_DisplayGCOffset_Float					= 2018,
-	Prop_DisplayGCScale_Float					= 2019,
-	Prop_DisplayGCPrescale_Float				= 2020,
-	Prop_DisplayGCImage_String					= 2021,
-	Prop_LensCenterLeftU_Float					= 2022,
-	Prop_LensCenterLeftV_Float					= 2023,
-	Prop_LensCenterRightU_Float					= 2024,
-	Prop_LensCenterRightV_Float					= 2025,
-	Prop_UserHeadToEyeDepthMeters_Float			= 2026,
-	Prop_CameraFirmwareVersion_Uint64			= 2027,
-	Prop_CameraFirmwareDescription_String		= 2028,
-	Prop_DisplayFPGAVersion_Uint64				= 2029,
-	Prop_DisplayBootloaderVersion_Uint64		= 2030,
-	Prop_DisplayHardwareVersion_Uint64			= 2031,
-	Prop_AudioFirmwareVersion_Uint64			= 2032,
-	Prop_CameraCompatibilityMode_Int32			= 2033,
-	Prop_ScreenshotHorizontalFieldOfViewDegrees_Float = 2034,
-	Prop_ScreenshotVerticalFieldOfViewDegrees_Float = 2035,
-	Prop_DisplaySuppressed_Bool					= 2036,
-	Prop_DisplayAllowNightMode_Bool				= 2037,
-	Prop_DisplayMCImageWidth_Int32				= 2038,
-	Prop_DisplayMCImageHeight_Int32				= 2039,
-	Prop_DisplayMCImageNumChannels_Int32		= 2040,
-	Prop_DisplayMCImageData_Binary				= 2041,
-	Prop_UsesDriverDirectMode_Bool				= 2042,
-
-	// Properties that are unique to TrackedDeviceClass_Controller
-	Prop_AttachedDeviceId_String				= 3000,
-	Prop_SupportedButtons_Uint64				= 3001,
-	Prop_Axis0Type_Int32						= 3002, // Return value is of type EVRControllerAxisType
-	Prop_Axis1Type_Int32						= 3003, // Return value is of type EVRControllerAxisType
-	Prop_Axis2Type_Int32						= 3004, // Return value is of type EVRControllerAxisType
-	Prop_Axis3Type_Int32						= 3005, // Return value is of type EVRControllerAxisType
-	Prop_Axis4Type_Int32						= 3006, // Return value is of type EVRControllerAxisType
-	Prop_ControllerRoleHint_Int32				= 3007, // Return value is of type ETrackedControllerRole
-
-	// Properties that are unique to TrackedDeviceClass_TrackingReference
-	Prop_FieldOfViewLeftDegrees_Float			= 4000,
-	Prop_FieldOfViewRightDegrees_Float			= 4001,
-	Prop_FieldOfViewTopDegrees_Float			= 4002,
-	Prop_FieldOfViewBottomDegrees_Float			= 4003,
-	Prop_TrackingRangeMinimumMeters_Float		= 4004,
-	Prop_TrackingRangeMaximumMeters_Float		= 4005,
-	Prop_ModeLabel_String						= 4006,
-
-	// Properties that are used for user interface like icons names
-	Prop_IconPathName_String						= 5000, // usually a directory named "icons"
-	Prop_NamedIconPathDeviceOff_String				= 5001, // PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
-	Prop_NamedIconPathDeviceSearching_String		= 5002, // PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
-	Prop_NamedIconPathDeviceSearchingAlert_String	= 5003, // PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
-	Prop_NamedIconPathDeviceReady_String			= 5004, // PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
-	Prop_NamedIconPathDeviceReadyAlert_String		= 5005, // PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
-	Prop_NamedIconPathDeviceNotReady_String			= 5006, // PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
-	Prop_NamedIconPathDeviceStandby_String			= 5007, // PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
-	Prop_NamedIconPathDeviceAlertLow_String			= 5008, // PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
-
-	// Properties that are used by helpers, but are opaque to applications
-	Prop_DisplayHiddenArea_Binary_Start				= 5100,
-	Prop_DisplayHiddenArea_Binary_End				= 5150,
-
-	// Properties that are unique to drivers
-	Prop_UserConfigPath_String					= 6000,
-	Prop_InstallPath_String						= 6001,
-
-	// Vendors are free to expose private debug data in this reserved region
-	Prop_VendorSpecific_Reserved_Start			= 10000,
-	Prop_VendorSpecific_Reserved_End			= 10999,
-};
-
-/** No string property will ever be longer than this length */
-static const uint32_t k_unMaxPropertyStringSize = 32 * 1024;
-
-/** Used to return errors that occur when reading properties. */
-enum ETrackedPropertyError
-{
-	TrackedProp_Success						= 0,
-	TrackedProp_WrongDataType				= 1,
-	TrackedProp_WrongDeviceClass			= 2,
-	TrackedProp_BufferTooSmall				= 3,
-	TrackedProp_UnknownProperty				= 4, // Driver has not set the property (and may not ever).
-	TrackedProp_InvalidDevice				= 5,
-	TrackedProp_CouldNotContactServer		= 6,
-	TrackedProp_ValueNotProvidedByDevice	= 7,
-	TrackedProp_StringExceedsMaximumLength	= 8,
-	TrackedProp_NotYetAvailable				= 9, // The property value isn't known yet, but is expected soon. Call again later.
-	TrackedProp_PermissionDenied			= 10,
-	TrackedProp_InvalidOperation			= 11,
-};
-
-/** Allows the application to control what part of the provided texture will be used in the
-* frame buffer. */
-struct VRTextureBounds_t
-{
-	float uMin, vMin;
-	float uMax, vMax;
-};
-
-
-/** Allows the application to control how scene textures are used by the compositor when calling Submit. */
-enum EVRSubmitFlags
-{
-	// Simple render path. App submits rendered left and right eye images with no lens distortion correction applied.
-	Submit_Default = 0x00,
-
-	// App submits final left and right eye images with lens distortion already applied (lens distortion makes the images appear
-	// barrel distorted with chromatic aberration correction applied). The app would have used the data returned by
-	// vr::IVRSystem::ComputeDistortion() to apply the correct distortion to the rendered images before calling Submit().
-	Submit_LensDistortionAlreadyApplied = 0x01,
-
-	// If the texture pointer passed in is actually a renderbuffer (e.g. for MSAA in OpenGL) then set this flag.
-	Submit_GlRenderBuffer = 0x02,
-
-	// Do not use
-	Submit_Reserved = 0x04,
-};
-
-/** Data required for passing Vulkan textures to IVRCompositor::Submit.
-* Be sure to call OpenVR_Shutdown before destroying these resources. */
-struct VRVulkanTextureData_t
-{
-	uint64_t m_nImage; // VkImage
-	VkDevice_T *m_pDevice;
-	VkPhysicalDevice_T *m_pPhysicalDevice;
-	VkInstance_T *m_pInstance;
-	VkQueue_T *m_pQueue;
-	uint32_t m_nQueueFamilyIndex;
-	uint32_t m_nWidth, m_nHeight, m_nFormat, m_nSampleCount;
-};
-
-/** Data required for passing D3D12 textures to IVRCompositor::Submit.
-* Be sure to call OpenVR_Shutdown before destroying these resources. */
-struct D3D12TextureData_t
-{
-	ID3D12Resource *m_pResource;
-	ID3D12CommandQueue *m_pCommandQueue;
-	uint32_t m_nNodeMask;
-};
-
-/** Status of the overall system or tracked objects */
-enum EVRState
-{
-	VRState_Undefined = -1,
-	VRState_Off = 0,
-	VRState_Searching = 1,
-	VRState_Searching_Alert = 2,
-	VRState_Ready = 3,
-	VRState_Ready_Alert = 4,
-	VRState_NotReady = 5,
-	VRState_Standby = 6,
-	VRState_Ready_Alert_Low = 7,
-};
-
-/** The types of events that could be posted (and what the parameters mean for each event type) */
-enum EVREventType
-{
-	VREvent_None = 0,
-
-	VREvent_TrackedDeviceActivated		= 100,
-	VREvent_TrackedDeviceDeactivated	= 101,
-	VREvent_TrackedDeviceUpdated		= 102,
-	VREvent_TrackedDeviceUserInteractionStarted	= 103,
-	VREvent_TrackedDeviceUserInteractionEnded	= 104,
-	VREvent_IpdChanged					= 105,
-	VREvent_EnterStandbyMode			= 106,
-	VREvent_LeaveStandbyMode			= 107,
-	VREvent_TrackedDeviceRoleChanged	= 108,
-	VREvent_WatchdogWakeUpRequested		= 109,
-	VREvent_LensDistortionChanged		= 110,
-	VREvent_PropertyChanged				= 111,
-
-	VREvent_ButtonPress					= 200, // data is controller
-	VREvent_ButtonUnpress				= 201, // data is controller
-	VREvent_ButtonTouch					= 202, // data is controller
-	VREvent_ButtonUntouch				= 203, // data is controller
-
-	VREvent_MouseMove					= 300, // data is mouse
-	VREvent_MouseButtonDown				= 301, // data is mouse
-	VREvent_MouseButtonUp				= 302, // data is mouse
-	VREvent_FocusEnter					= 303, // data is overlay
-	VREvent_FocusLeave					= 304, // data is overlay
-	VREvent_Scroll						= 305, // data is mouse
-	VREvent_TouchPadMove				= 306, // data is mouse
-	VREvent_OverlayFocusChanged			= 307, // data is overlay, global event
-
-	VREvent_InputFocusCaptured			= 400, // data is process DEPRECATED
-	VREvent_InputFocusReleased			= 401, // data is process DEPRECATED
-	VREvent_SceneFocusLost				= 402, // data is process
-	VREvent_SceneFocusGained			= 403, // data is process
-	VREvent_SceneApplicationChanged		= 404, // data is process - The App actually drawing the scene changed (usually to or from the compositor)
-	VREvent_SceneFocusChanged			= 405, // data is process - New app got access to draw the scene
-	VREvent_InputFocusChanged			= 406, // data is process
-	VREvent_SceneApplicationSecondaryRenderingStarted = 407, // data is process
-
-	VREvent_HideRenderModels			= 410, // Sent to the scene application to request hiding render models temporarily
-	VREvent_ShowRenderModels			= 411, // Sent to the scene application to request restoring render model visibility
-
-	VREvent_OverlayShown				= 500,
-	VREvent_OverlayHidden				= 501,
-	VREvent_DashboardActivated			= 502,
-	VREvent_DashboardDeactivated		= 503,
-	VREvent_DashboardThumbSelected		= 504, // Sent to the overlay manager - data is overlay
-	VREvent_DashboardRequested			= 505, // Sent to the overlay manager - data is overlay
-	VREvent_ResetDashboard				= 506, // Send to the overlay manager
-	VREvent_RenderToast					= 507, // Send to the dashboard to render a toast - data is the notification ID
-	VREvent_ImageLoaded					= 508, // Sent to overlays when a SetOverlayRaw or SetOverlayFromFile call finishes loading
-	VREvent_ShowKeyboard				= 509, // Sent to keyboard renderer in the dashboard to invoke it
-	VREvent_HideKeyboard				= 510, // Sent to keyboard renderer in the dashboard to hide it
-	VREvent_OverlayGamepadFocusGained	= 511, // Sent to an overlay when IVROverlay::SetFocusOverlay is called on it
-	VREvent_OverlayGamepadFocusLost		= 512, // Send to an overlay when it previously had focus and IVROverlay::SetFocusOverlay is called on something else
-	VREvent_OverlaySharedTextureChanged = 513,
-	VREvent_DashboardGuideButtonDown	= 514,
-	VREvent_DashboardGuideButtonUp		= 515,
-	VREvent_ScreenshotTriggered			= 516, // Screenshot button combo was pressed, Dashboard should request a screenshot
-	VREvent_ImageFailed					= 517, // Sent to overlays when a SetOverlayRaw or SetOverlayfromFail fails to load
-	VREvent_DashboardOverlayCreated		= 518,
-
-	// Screenshot API
-	VREvent_RequestScreenshot				= 520, // Sent by vrclient application to compositor to take a screenshot
-	VREvent_ScreenshotTaken					= 521, // Sent by compositor to the application that the screenshot has been taken
-	VREvent_ScreenshotFailed				= 522, // Sent by compositor to the application that the screenshot failed to be taken
-	VREvent_SubmitScreenshotToDashboard		= 523, // Sent by compositor to the dashboard that a completed screenshot was submitted
-	VREvent_ScreenshotProgressToDashboard	= 524, // Sent by compositor to the dashboard that a completed screenshot was submitted
-
-	VREvent_PrimaryDashboardDeviceChanged	= 525,
-
-	VREvent_Notification_Shown				= 600,
-	VREvent_Notification_Hidden				= 601,
-	VREvent_Notification_BeginInteraction	= 602,
-	VREvent_Notification_Destroyed			= 603,
-
-	VREvent_Quit							= 700, // data is process
-	VREvent_ProcessQuit						= 701, // data is process
-	VREvent_QuitAborted_UserPrompt			= 702, // data is process
-	VREvent_QuitAcknowledged				= 703, // data is process
-	VREvent_DriverRequestedQuit				= 704, // The driver has requested that SteamVR shut down
-
-	VREvent_ChaperoneDataHasChanged			= 800,
-	VREvent_ChaperoneUniverseHasChanged		= 801,
-	VREvent_ChaperoneTempDataHasChanged		= 802,
-	VREvent_ChaperoneSettingsHaveChanged	= 803,
-	VREvent_SeatedZeroPoseReset				= 804,
-
-	VREvent_AudioSettingsHaveChanged		= 820,
-
-	VREvent_BackgroundSettingHasChanged		= 850,
-	VREvent_CameraSettingsHaveChanged		= 851,
-	VREvent_ReprojectionSettingHasChanged	= 852,
-	VREvent_ModelSkinSettingsHaveChanged	= 853,
-	VREvent_EnvironmentSettingsHaveChanged	= 854,
-	VREvent_PowerSettingsHaveChanged		= 855,
-
-	VREvent_StatusUpdate					= 900,
-
-	VREvent_MCImageUpdated					= 1000,
-
-	VREvent_FirmwareUpdateStarted			= 1100,
-	VREvent_FirmwareUpdateFinished			= 1101,
-
-	VREvent_KeyboardClosed					= 1200,
-	VREvent_KeyboardCharInput				= 1201,
-	VREvent_KeyboardDone					= 1202, // Sent when DONE button clicked on keyboard
-
-	VREvent_ApplicationTransitionStarted		= 1300,
-	VREvent_ApplicationTransitionAborted		= 1301,
-	VREvent_ApplicationTransitionNewAppStarted	= 1302,
-	VREvent_ApplicationListUpdated				= 1303,
-	VREvent_ApplicationMimeTypeLoad				= 1304,
-	VREvent_ApplicationTransitionNewAppLaunchComplete = 1305,
-
-	VREvent_Compositor_MirrorWindowShown		= 1400,
-	VREvent_Compositor_MirrorWindowHidden		= 1401,
-	VREvent_Compositor_ChaperoneBoundsShown		= 1410,
-	VREvent_Compositor_ChaperoneBoundsHidden	= 1411,
-
-	VREvent_TrackedCamera_StartVideoStream  = 1500,
-	VREvent_TrackedCamera_StopVideoStream   = 1501,
-	VREvent_TrackedCamera_PauseVideoStream  = 1502,
-	VREvent_TrackedCamera_ResumeVideoStream = 1503,
-	VREvent_TrackedCamera_EditingSurface    = 1550,
-
-	VREvent_PerformanceTest_EnableCapture	= 1600,
-	VREvent_PerformanceTest_DisableCapture	= 1601,
-	VREvent_PerformanceTest_FidelityLevel	= 1602,
-
-	VREvent_MessageOverlay_Closed			= 1650,
-	
-	// Vendors are free to expose private events in this reserved region
-	VREvent_VendorSpecific_Reserved_Start	= 10000,
-	VREvent_VendorSpecific_Reserved_End		= 19999,
-};
-
-
-/** Level of Hmd activity */
-enum EDeviceActivityLevel
-{
-	k_EDeviceActivityLevel_Unknown = -1,
-	k_EDeviceActivityLevel_Idle = 0,
-	k_EDeviceActivityLevel_UserInteraction = 1,
-	k_EDeviceActivityLevel_UserInteraction_Timeout = 2,
-	k_EDeviceActivityLevel_Standby = 3,
-};
-
-
-/** VR controller button and axis IDs */
-enum EVRButtonId
-{
-	k_EButton_System			= 0,
-	k_EButton_ApplicationMenu	= 1,
-	k_EButton_Grip				= 2,
-	k_EButton_DPad_Left			= 3,
-	k_EButton_DPad_Up			= 4,
-	k_EButton_DPad_Right		= 5,
-	k_EButton_DPad_Down			= 6,
-	k_EButton_A					= 7,
-	
-	k_EButton_ProximitySensor   = 31,
-
-	k_EButton_Axis0				= 32,
-	k_EButton_Axis1				= 33,
-	k_EButton_Axis2				= 34,
-	k_EButton_Axis3				= 35,
-	k_EButton_Axis4				= 36,
-
-	// aliases for well known controllers
-	k_EButton_SteamVR_Touchpad	= k_EButton_Axis0,
-	k_EButton_SteamVR_Trigger	= k_EButton_Axis1,
-
-	k_EButton_Dashboard_Back	= k_EButton_Grip,
-
-	k_EButton_Max				= 64
-};
-
-inline uint64_t ButtonMaskFromId( EVRButtonId id ) { return 1ull << id; }
-
-/** used for controller button events */
-struct VREvent_Controller_t
-{
-	uint32_t button; // EVRButtonId enum
-};
-
-
-/** used for simulated mouse events in overlay space */
-enum EVRMouseButton
-{
-	VRMouseButton_Left					= 0x0001,
-	VRMouseButton_Right					= 0x0002,
-	VRMouseButton_Middle				= 0x0004,
-};
-
-
-/** used for simulated mouse events in overlay space */
-struct VREvent_Mouse_t
-{
-	float x, y; // co-ords are in GL space, bottom left of the texture is 0,0
-	uint32_t button; // EVRMouseButton enum
-};
-
-/** used for simulated mouse wheel scroll in overlay space */
-struct VREvent_Scroll_t
-{
-	float xdelta, ydelta; // movement in fraction of the pad traversed since last delta, 1.0 for a full swipe
-	uint32_t repeatCount;
-};
-
-/** when in mouse input mode you can receive data from the touchpad, these events are only sent if the users finger
-   is on the touchpad (or just released from it) 
-**/
-struct VREvent_TouchPadMove_t
-{
-	// true if the users finger is detected on the touch pad
-	bool bFingerDown;
-
-	// How long the finger has been down in seconds
-	float flSecondsFingerDown;
-
-	// These values indicate the starting finger position (so you can do some basic swipe stuff)
-	float fValueXFirst;
-	float fValueYFirst;
-
-	// This is the raw sampled coordinate without deadzoning
-	float fValueXRaw;
-	float fValueYRaw;
-};
-
-/** notification related events. Details will still change at this point */
-struct VREvent_Notification_t
-{
-	uint64_t ulUserValue;
-	uint32_t notificationId;
-};
-
-/** Used for events about processes */
-struct VREvent_Process_t
-{
-	uint32_t pid;
-	uint32_t oldPid;
-	bool bForced;
-};
-
-
-/** Used for a few events about overlays */
-struct VREvent_Overlay_t
-{
-	uint64_t overlayHandle;
-};
-
-
-/** Used for a few events about overlays */
-struct VREvent_Status_t
-{
-	uint32_t statusState; // EVRState enum
-};
-
-/** Used for keyboard events **/
-struct VREvent_Keyboard_t
-{
-	char cNewInput[8];	// Up to 11 bytes of new input
-	uint64_t uUserValue;	// Possible flags about the new input
-};
-
-struct VREvent_Ipd_t
-{
-	float ipdMeters;
-};
-
-struct VREvent_Chaperone_t
-{
-	uint64_t m_nPreviousUniverse;
-	uint64_t m_nCurrentUniverse;
-};
-
-/** Not actually used for any events */
-struct VREvent_Reserved_t
-{
-	uint64_t reserved0;
-	uint64_t reserved1;
-};
-
-struct VREvent_PerformanceTest_t
-{
-	uint32_t m_nFidelityLevel;
-};
-
-struct VREvent_SeatedZeroPoseReset_t
-{
-	bool bResetBySystemMenu;
-};
-
-struct VREvent_Screenshot_t
-{
-	uint32_t handle;
-	uint32_t type;
-};
-
-struct VREvent_ScreenshotProgress_t
-{
-	float progress;
-};
-
-struct VREvent_ApplicationLaunch_t
-{
-	uint32_t pid;
-	uint32_t unArgsHandle;
-};
-
-struct VREvent_EditingCameraSurface_t
-{
-	uint64_t overlayHandle;
-	uint32_t nVisualMode;
-};
-
-struct VREvent_MessageOverlay_t
-{
-	uint32_t unVRMessageOverlayResponse; // vr::VRMessageOverlayResponse enum
-};
-
-struct VREvent_Property_t
-{
-	PropertyContainerHandle_t container;
-	ETrackedDeviceProperty prop;
-};
-
-/** NOTE!!! If you change this you MUST manually update openvr_interop.cs.py */
-typedef union
-{
-	VREvent_Reserved_t reserved;
-	VREvent_Controller_t controller;
-	VREvent_Mouse_t mouse;
-	VREvent_Scroll_t scroll;
-	VREvent_Process_t process;
-	VREvent_Notification_t notification;
-	VREvent_Overlay_t overlay;
-	VREvent_Status_t status;
-	VREvent_Keyboard_t keyboard;
-	VREvent_Ipd_t ipd;
-	VREvent_Chaperone_t chaperone;
-	VREvent_PerformanceTest_t performanceTest;
-	VREvent_TouchPadMove_t touchPadMove;
-	VREvent_SeatedZeroPoseReset_t seatedZeroPoseReset;
-	VREvent_Screenshot_t screenshot;
-	VREvent_ScreenshotProgress_t screenshotProgress;
-	VREvent_ApplicationLaunch_t applicationLaunch;
-	VREvent_EditingCameraSurface_t cameraSurface;
-	VREvent_MessageOverlay_t messageOverlay;
-	VREvent_Property_t property;
-} VREvent_Data_t;
-
-/** An event posted by the server to all running applications */
-struct VREvent_t
-{
-	uint32_t eventType; // EVREventType enum
-	TrackedDeviceIndex_t trackedDeviceIndex;
-	float eventAgeSeconds;
-	// event data must be the end of the struct as its size is variable
-	VREvent_Data_t data;
-};
-
-
-/** The mesh to draw into the stencil (or depth) buffer to perform 
-* early stencil (or depth) kills of pixels that will never appear on the HMD.
-* This mesh draws on all the pixels that will be hidden after distortion. 
-*
-* If the HMD does not provide a visible area mesh pVertexData will be
-* NULL and unTriangleCount will be 0. */
-struct HiddenAreaMesh_t
-{
-	const HmdVector2_t *pVertexData;
-	uint32_t unTriangleCount;
-};
-
-
-enum EHiddenAreaMeshType
-{
-	k_eHiddenAreaMesh_Standard = 0,
-	k_eHiddenAreaMesh_Inverse = 1,
-	k_eHiddenAreaMesh_LineLoop = 2,
-
-	k_eHiddenAreaMesh_Max = 3,
-};
-
-
-/** Identifies what kind of axis is on the controller at index n. Read this type 
-* with pVRSystem->Get( nControllerDeviceIndex, Prop_Axis0Type_Int32 + n );
-*/
-enum EVRControllerAxisType
-{
-	k_eControllerAxis_None = 0,
-	k_eControllerAxis_TrackPad = 1,
-	k_eControllerAxis_Joystick = 2,
-	k_eControllerAxis_Trigger = 3, // Analog trigger data is in the X axis
-};
-
-
-/** contains information about one axis on the controller */
-struct VRControllerAxis_t
-{
-	float x; // Ranges from -1.0 to 1.0 for joysticks and track pads. Ranges from 0.0 to 1.0 for triggers were 0 is fully released.
-	float y; // Ranges from -1.0 to 1.0 for joysticks and track pads. Is always 0.0 for triggers.
-};
-
-
-/** the number of axes in the controller state */
-static const uint32_t k_unControllerStateAxisCount = 5;
-
-
-/** Holds all the state of a controller at one moment in time. */
-struct VRControllerState001_t
-{
-	// If packet num matches that on your prior call, then the controller state hasn't been changed since 
-	// your last call and there is no need to process it
-	uint32_t unPacketNum;
-
-	// bit flags for each of the buttons. Use ButtonMaskFromId to turn an ID into a mask
-	uint64_t ulButtonPressed;
-	uint64_t ulButtonTouched;
-
-	// Axis data for the controller's analog inputs
-	VRControllerAxis_t rAxis[ k_unControllerStateAxisCount ];
-};
-
-
-typedef VRControllerState001_t VRControllerState_t;
-
-
-/** determines how to provide output to the application of various event processing functions. */
-enum EVRControllerEventOutputType
-{
-	ControllerEventOutput_OSEvents = 0,
-	ControllerEventOutput_VREvents = 1,
-};
-
-
-
-/** Collision Bounds Style */
-enum ECollisionBoundsStyle
-{
-	COLLISION_BOUNDS_STYLE_BEGINNER = 0,
-	COLLISION_BOUNDS_STYLE_INTERMEDIATE,
-	COLLISION_BOUNDS_STYLE_SQUARES,
-	COLLISION_BOUNDS_STYLE_ADVANCED,
-	COLLISION_BOUNDS_STYLE_NONE,
-
-	COLLISION_BOUNDS_STYLE_COUNT
-};
-
-/** Allows the application to customize how the overlay appears in the compositor */
-struct Compositor_OverlaySettings
-{
-	uint32_t size; // sizeof(Compositor_OverlaySettings)
-	bool curved, antialias;
-	float scale, distance, alpha;
-	float uOffset, vOffset, uScale, vScale;
-	float gridDivs, gridWidth, gridScale;
-	HmdMatrix44_t transform;
-};
-
-/** used to refer to a single VR overlay */
-typedef uint64_t VROverlayHandle_t;
-
-static const VROverlayHandle_t k_ulOverlayHandleInvalid = 0;
-
-/** Errors that can occur around VR overlays */
-enum EVROverlayError
-{
-	VROverlayError_None						= 0,
-
-	VROverlayError_UnknownOverlay			= 10,
-	VROverlayError_InvalidHandle			= 11,
-	VROverlayError_PermissionDenied			= 12,
-	VROverlayError_OverlayLimitExceeded		= 13, // No more overlays could be created because the maximum number already exist
-	VROverlayError_WrongVisibilityType		= 14,
-	VROverlayError_KeyTooLong				= 15,
-	VROverlayError_NameTooLong				= 16,
-	VROverlayError_KeyInUse					= 17,
-	VROverlayError_WrongTransformType		= 18,
-	VROverlayError_InvalidTrackedDevice		= 19,
-	VROverlayError_InvalidParameter			= 20,
-	VROverlayError_ThumbnailCantBeDestroyed	= 21,
-	VROverlayError_ArrayTooSmall			= 22,
-	VROverlayError_RequestFailed			= 23,
-	VROverlayError_InvalidTexture			= 24,
-	VROverlayError_UnableToLoadFile			= 25,
-	VROverlayError_KeyboardAlreadyInUse		= 26,
-	VROverlayError_NoNeighbor				= 27,
-	VROverlayError_TooManyMaskPrimitives	= 29,
-	VROverlayError_BadMaskPrimitive			= 30,
-};
-
-/** enum values to pass in to VR_Init to identify whether the application will 
-* draw a 3D scene. */
-enum EVRApplicationType
-{
-	VRApplication_Other = 0,		// Some other kind of application that isn't covered by the other entries 
-	VRApplication_Scene	= 1,		// Application will submit 3D frames 
-	VRApplication_Overlay = 2,		// Application only interacts with overlays
-	VRApplication_Background = 3,	// Application should not start SteamVR if it's not already running, and should not
-									// keep it running if everything else quits.
-	VRApplication_Utility = 4,		// Init should not try to load any drivers. The application needs access to utility
-									// interfaces (like IVRSettings and IVRApplications) but not hardware.
-	VRApplication_VRMonitor = 5,	// Reserved for vrmonitor
-	VRApplication_SteamWatchdog = 6,// Reserved for Steam
-
-	VRApplication_Max
-};
-
-
-/** error codes for firmware */
-enum EVRFirmwareError
-{
-	VRFirmwareError_None = 0,
-	VRFirmwareError_Success = 1,
-	VRFirmwareError_Fail = 2,
-};
-
-
-/** error codes for notifications */
-enum EVRNotificationError
-{
-	VRNotificationError_OK = 0,
-	VRNotificationError_InvalidNotificationId = 100,
-	VRNotificationError_NotificationQueueFull = 101,
-	VRNotificationError_InvalidOverlayHandle = 102,
-	VRNotificationError_SystemWithUserValueAlreadyExists = 103,
-};
-
-
-/** error codes returned by Vr_Init */
-
-// Please add adequate error description to https://developer.valvesoftware.com/w/index.php?title=Category:SteamVRHelp
-enum EVRInitError
-{
-	VRInitError_None	= 0,
-	VRInitError_Unknown = 1,
-
-	VRInitError_Init_InstallationNotFound		= 100,
-	VRInitError_Init_InstallationCorrupt		= 101,
-	VRInitError_Init_VRClientDLLNotFound		= 102,
-	VRInitError_Init_FileNotFound				= 103,
-	VRInitError_Init_FactoryNotFound			= 104,
-	VRInitError_Init_InterfaceNotFound			= 105,
-	VRInitError_Init_InvalidInterface			= 106,
-	VRInitError_Init_UserConfigDirectoryInvalid = 107,
-	VRInitError_Init_HmdNotFound				= 108,
-	VRInitError_Init_NotInitialized				= 109,
-	VRInitError_Init_PathRegistryNotFound		= 110,
-	VRInitError_Init_NoConfigPath				= 111,
-	VRInitError_Init_NoLogPath					= 112,
-	VRInitError_Init_PathRegistryNotWritable	= 113,
-	VRInitError_Init_AppInfoInitFailed			= 114,
-	VRInitError_Init_Retry						= 115, // Used internally to cause retries to vrserver
-	VRInitError_Init_InitCanceledByUser			= 116, // The calling application should silently exit. The user canceled app startup
-	VRInitError_Init_AnotherAppLaunching		= 117, 
-	VRInitError_Init_SettingsInitFailed			= 118, 
-	VRInitError_Init_ShuttingDown				= 119,
-	VRInitError_Init_TooManyObjects				= 120,
-	VRInitError_Init_NoServerForBackgroundApp	= 121,
-	VRInitError_Init_NotSupportedWithCompositor	= 122,
-	VRInitError_Init_NotAvailableToUtilityApps	= 123,
-	VRInitError_Init_Internal				 	= 124,
-	VRInitError_Init_HmdDriverIdIsNone		 	= 125,
-	VRInitError_Init_HmdNotFoundPresenceFailed 	= 126,
-	VRInitError_Init_VRMonitorNotFound			= 127,
-	VRInitError_Init_VRMonitorStartupFailed		= 128,
-	VRInitError_Init_LowPowerWatchdogNotSupported = 129, 
-	VRInitError_Init_InvalidApplicationType		= 130,
-	VRInitError_Init_NotAvailableToWatchdogApps = 131,
-	VRInitError_Init_WatchdogDisabledInSettings = 132,
-	VRInitError_Init_VRDashboardNotFound		= 133,
-	VRInitError_Init_VRDashboardStartupFailed	= 134,
-
-	VRInitError_Driver_Failed				= 200,
-	VRInitError_Driver_Unknown				= 201,
-	VRInitError_Driver_HmdUnknown			= 202,
-	VRInitError_Driver_NotLoaded			= 203,
-	VRInitError_Driver_RuntimeOutOfDate		= 204,
-	VRInitError_Driver_HmdInUse				= 205,
-	VRInitError_Driver_NotCalibrated		= 206,
-	VRInitError_Driver_CalibrationInvalid	= 207,
-	VRInitError_Driver_HmdDisplayNotFound	= 208,
-	VRInitError_Driver_TrackedDeviceInterfaceUnknown = 209,
-	// VRInitError_Driver_HmdDisplayNotFoundAfterFix	 = 210, // not needed: here for historic reasons
-	VRInitError_Driver_HmdDriverIdOutOfBounds = 211,
-	VRInitError_Driver_HmdDisplayMirrored  = 212,
-
-	VRInitError_IPC_ServerInitFailed		= 300,
-	VRInitError_IPC_ConnectFailed			= 301,
-	VRInitError_IPC_SharedStateInitFailed	= 302,
-	VRInitError_IPC_CompositorInitFailed	= 303,
-	VRInitError_IPC_MutexInitFailed			= 304,
-	VRInitError_IPC_Failed					= 305,
-	VRInitError_IPC_CompositorConnectFailed	= 306,
-	VRInitError_IPC_CompositorInvalidConnectResponse = 307,
-	VRInitError_IPC_ConnectFailedAfterMultipleAttempts = 308,
-
-	VRInitError_Compositor_Failed					= 400,
-	VRInitError_Compositor_D3D11HardwareRequired	= 401,
-	VRInitError_Compositor_FirmwareRequiresUpdate	= 402,
-	VRInitError_Compositor_OverlayInitFailed		= 403,
-	VRInitError_Compositor_ScreenshotsInitFailed	= 404,
-
-	VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000,
-
-	VRInitError_VendorSpecific_HmdFound_CantOpenDevice 				= 1101,
-	VRInitError_VendorSpecific_HmdFound_UnableToRequestConfigStart	= 1102,
-	VRInitError_VendorSpecific_HmdFound_NoStoredConfig 				= 1103,
-	VRInitError_VendorSpecific_HmdFound_ConfigTooBig 				= 1104,
-	VRInitError_VendorSpecific_HmdFound_ConfigTooSmall 				= 1105,
-	VRInitError_VendorSpecific_HmdFound_UnableToInitZLib 			= 1106,
-	VRInitError_VendorSpecific_HmdFound_CantReadFirmwareVersion 	= 1107,
-	VRInitError_VendorSpecific_HmdFound_UnableToSendUserDataStart	= 1108,
-	VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataStart	= 1109,
-	VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataNext		= 1110,
-	VRInitError_VendorSpecific_HmdFound_UserDataAddressRange		= 1111,
-	VRInitError_VendorSpecific_HmdFound_UserDataError				= 1112,
-	VRInitError_VendorSpecific_HmdFound_ConfigFailedSanityCheck		= 1113,
-
-	VRInitError_Steam_SteamInstallationNotFound = 2000,
-};
-
-enum EVRScreenshotType
-{
-	VRScreenshotType_None = 0,
-	VRScreenshotType_Mono = 1, // left eye only
-	VRScreenshotType_Stereo = 2,
-	VRScreenshotType_Cubemap = 3,
-	VRScreenshotType_MonoPanorama = 4,
-	VRScreenshotType_StereoPanorama = 5
-};
-
-enum EVRScreenshotPropertyFilenames
-{
-	VRScreenshotPropertyFilenames_Preview = 0,
-	VRScreenshotPropertyFilenames_VR = 1,
-};
-
-enum EVRTrackedCameraError
-{
-	VRTrackedCameraError_None                       = 0,
-	VRTrackedCameraError_OperationFailed            = 100,
-	VRTrackedCameraError_InvalidHandle              = 101,	
-	VRTrackedCameraError_InvalidFrameHeaderVersion  = 102,
-	VRTrackedCameraError_OutOfHandles               = 103,
-	VRTrackedCameraError_IPCFailure                 = 104,
-	VRTrackedCameraError_NotSupportedForThisDevice  = 105,
-	VRTrackedCameraError_SharedMemoryFailure        = 106,
-	VRTrackedCameraError_FrameBufferingFailure      = 107,
-	VRTrackedCameraError_StreamSetupFailure         = 108,
-	VRTrackedCameraError_InvalidGLTextureId         = 109,
-	VRTrackedCameraError_InvalidSharedTextureHandle = 110,
-	VRTrackedCameraError_FailedToGetGLTextureId     = 111,
-	VRTrackedCameraError_SharedTextureFailure       = 112,
-	VRTrackedCameraError_NoFrameAvailable           = 113,
-	VRTrackedCameraError_InvalidArgument            = 114,
-	VRTrackedCameraError_InvalidFrameBufferSize     = 115,
-};
-
-enum EVRTrackedCameraFrameType
-{
-	VRTrackedCameraFrameType_Distorted = 0,			// This is the camera video frame size in pixels, still distorted.
-	VRTrackedCameraFrameType_Undistorted,			// In pixels, an undistorted inscribed rectangle region without invalid regions. This size is subject to changes shortly.
-	VRTrackedCameraFrameType_MaximumUndistorted,	// In pixels, maximum undistorted with invalid regions. Non zero alpha component identifies valid regions.
-	MAX_CAMERA_FRAME_TYPES
-};
-
-typedef uint64_t TrackedCameraHandle_t;
-#define INVALID_TRACKED_CAMERA_HANDLE	((vr::TrackedCameraHandle_t)0)
-
-struct CameraVideoStreamFrameHeader_t
-{
-	EVRTrackedCameraFrameType eFrameType;
-
-	uint32_t nWidth;
-	uint32_t nHeight;
-	uint32_t nBytesPerPixel;
-
-	uint32_t nFrameSequence;
-
-	TrackedDevicePose_t standingTrackedDevicePose;
-};
-
-// Screenshot types
-typedef uint32_t ScreenshotHandle_t;
-
-static const uint32_t k_unScreenshotHandleInvalid = 0;
-
-#pragma pack( pop )
-
-// figure out how to import from the VR API dll
-#if defined(_WIN32)
-
-#ifdef VR_API_EXPORT
-#define VR_INTERFACE extern "C" __declspec( dllexport )
-#else
-#define VR_INTERFACE extern "C" __declspec( dllimport )
-#endif
-
-#elif defined(__GNUC__) || defined(COMPILER_GCC) || defined(__APPLE__)
-
-#ifdef VR_API_EXPORT
-#define VR_INTERFACE extern "C" __attribute__((visibility("default")))
-#else
-#define VR_INTERFACE extern "C" 
-#endif
-
-#else
-#error "Unsupported Platform."
-#endif
-
-
-#if defined( _WIN32 )
-#define VR_CALLTYPE __cdecl
-#else
-#define VR_CALLTYPE 
-#endif
-
-} // namespace vr
-
-#endif // _INCLUDE_VRTYPES_H
-
-
-// vrannotation.h
-#ifdef API_GEN
-# define VR_CLANG_ATTR(ATTR) __attribute__((annotate( ATTR )))
-#else
-# define VR_CLANG_ATTR(ATTR)
-#endif
-
-#define VR_METHOD_DESC(DESC) VR_CLANG_ATTR( "desc:" #DESC ";" )
-#define VR_IGNOREATTR() VR_CLANG_ATTR( "ignore" )
-#define VR_OUT_STRUCT() VR_CLANG_ATTR( "out_struct: ;" )
-#define VR_OUT_STRING() VR_CLANG_ATTR( "out_string: ;" )
-#define VR_OUT_ARRAY_CALL(COUNTER,FUNCTION,PARAMS) VR_CLANG_ATTR( "out_array_call:" #COUNTER "," #FUNCTION "," #PARAMS ";" )
-#define VR_OUT_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "out_array_count:" #COUNTER ";" )
-#define VR_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "array_count:" #COUNTER ";" )
-#define VR_ARRAY_COUNT_D(COUNTER, DESC) VR_CLANG_ATTR( "array_count:" #COUNTER ";desc:" #DESC )
-#define VR_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "buffer_count:" #COUNTER ";" )
-#define VR_OUT_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "out_buffer_count:" #COUNTER ";" )
-#define VR_OUT_STRING_COUNT(COUNTER) VR_CLANG_ATTR( "out_string_count:" #COUNTER ";" )
-
-// ivrsystem.h
-namespace vr
-{
-
-class IVRSystem
-{
-public:
-
-
-	// ------------------------------------
-	// Display Methods
-	// ------------------------------------
-
-	/** Suggested size for the intermediate render target that the distortion pulls from. */
-	virtual void GetRecommendedRenderTargetSize( uint32_t *pnWidth, uint32_t *pnHeight ) = 0;
-
-	/** The projection matrix for the specified eye */
-	virtual HmdMatrix44_t GetProjectionMatrix( EVREye eEye, float fNearZ, float fFarZ ) = 0;
-
-	/** The components necessary to build your own projection matrix in case your
-	* application is doing something fancy like infinite Z */
-	virtual void GetProjectionRaw( EVREye eEye, float *pfLeft, float *pfRight, float *pfTop, float *pfBottom ) = 0;
-
-	/** Gets the result of the distortion function for the specified eye and input UVs. UVs go from 0,0 in 
-	* the upper left of that eye's viewport and 1,1 in the lower right of that eye's viewport.
-	* Returns true for success. Otherwise, returns false, and distortion coordinates are not suitable. */
-	virtual bool ComputeDistortion( EVREye eEye, float fU, float fV, DistortionCoordinates_t *pDistortionCoordinates ) = 0;
-
-	/** Returns the transform from eye space to the head space. Eye space is the per-eye flavor of head
-	* space that provides stereo disparity. Instead of Model * View * Projection the sequence is Model * View * Eye^-1 * Projection. 
-	* Normally View and Eye^-1 will be multiplied together and treated as View in your application. 
-	*/
-	virtual HmdMatrix34_t GetEyeToHeadTransform( EVREye eEye ) = 0;
-
-	/** Returns the number of elapsed seconds since the last recorded vsync event. This 
-	*	will come from a vsync timer event in the timer if possible or from the application-reported
-	*   time if that is not available. If no vsync times are available the function will 
-	*   return zero for vsync time and frame counter and return false from the method. */
-	virtual bool GetTimeSinceLastVsync( float *pfSecondsSinceLastVsync, uint64_t *pulFrameCounter ) = 0;
-
-	/** [D3D9 Only]
-	* Returns the adapter index that the user should pass into CreateDevice to set up D3D9 in such
-	* a way that it can go full screen exclusive on the HMD. Returns -1 if there was an error.
-	*/
-	virtual int32_t GetD3D9AdapterIndex() = 0;
-
-	/** [D3D10/11 Only]
-	* Returns the adapter index that the user should pass into EnumAdapters to create the device 
-	* and swap chain in DX10 and DX11. If an error occurs the index will be set to -1.
-	*/
-	virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex ) = 0;
-
-	// ------------------------------------
-	// Display Mode methods
-	// ------------------------------------
-
-	/** Use to determine if the headset display is part of the desktop (i.e. extended) or hidden (i.e. direct mode). */
-	virtual bool IsDisplayOnDesktop() = 0;
-
-	/** Set the display visibility (true = extended, false = direct mode).  Return value of true indicates that the change was successful. */
-	virtual bool SetDisplayVisibility( bool bIsVisibleOnDesktop ) = 0;
-
-	// ------------------------------------
-	// Tracking Methods
-	// ------------------------------------
-
-	/** The pose that the tracker thinks that the HMD will be in at the specified number of seconds into the 
-	* future. Pass 0 to get the state at the instant the method is called. Most of the time the application should
-	* calculate the time until the photons will be emitted from the display and pass that time into the method.
-	*
-	* This is roughly analogous to the inverse of the view matrix in most applications, though 
-	* many games will need to do some additional rotation or translation on top of the rotation
-	* and translation provided by the head pose.
-	*
-	* For devices where bPoseIsValid is true the application can use the pose to position the device
-	* in question. The provided array can be any size up to k_unMaxTrackedDeviceCount. 
-	*
-	* Seated experiences should call this method with TrackingUniverseSeated and receive poses relative
-	* to the seated zero pose. Standing experiences should call this method with TrackingUniverseStanding 
-	* and receive poses relative to the Chaperone Play Area. TrackingUniverseRawAndUncalibrated should 
-	* probably not be used unless the application is the Chaperone calibration tool itself, but will provide
-	* poses relative to the hardware-specific coordinate system in the driver.
-	*/
-	virtual void GetDeviceToAbsoluteTrackingPose( ETrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, VR_ARRAY_COUNT(unTrackedDevicePoseArrayCount) TrackedDevicePose_t *pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount ) = 0;
-
-	/** Sets the zero pose for the seated tracker coordinate system to the current position and yaw of the HMD. After 
-	* ResetSeatedZeroPose all GetDeviceToAbsoluteTrackingPose calls that pass TrackingUniverseSeated as the origin 
-	* will be relative to this new zero pose. The new zero coordinate system will not change the fact that the Y axis 
-	* is up in the real world, so the next pose returned from GetDeviceToAbsoluteTrackingPose after a call to 
-	* ResetSeatedZeroPose may not be exactly an identity matrix.
-	*
-	* NOTE: This function overrides the user's previously saved seated zero pose and should only be called as the result of a user action. 
-	* Users are also able to set their seated zero pose via the OpenVR Dashboard.
-	**/
-	virtual void ResetSeatedZeroPose() = 0;
-
-	/** Returns the transform from the seated zero pose to the standing absolute tracking system. This allows 
-	* applications to represent the seated origin to used or transform object positions from one coordinate
-	* system to the other. 
-	*
-	* The seated origin may or may not be inside the Play Area or Collision Bounds returned by IVRChaperone. Its position 
-	* depends on what the user has set from the Dashboard settings and previous calls to ResetSeatedZeroPose. */
-	virtual HmdMatrix34_t GetSeatedZeroPoseToStandingAbsoluteTrackingPose() = 0;
-
-	/** Returns the transform from the tracking origin to the standing absolute tracking system. This allows
-	* applications to convert from raw tracking space to the calibrated standing coordinate system. */
-	virtual HmdMatrix34_t GetRawZeroPoseToStandingAbsoluteTrackingPose() = 0;
-
-	/** Get a sorted array of device indices of a given class of tracked devices (e.g. controllers).  Devices are sorted right to left
-	* relative to the specified tracked device (default: hmd -- pass in -1 for absolute tracking space).  Returns the number of devices
-	* in the list, or the size of the array needed if not large enough. */
-	virtual uint32_t GetSortedTrackedDeviceIndicesOfClass( ETrackedDeviceClass eTrackedDeviceClass, VR_ARRAY_COUNT(unTrackedDeviceIndexArrayCount) vr::TrackedDeviceIndex_t *punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, vr::TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex = k_unTrackedDeviceIndex_Hmd ) = 0;
-
-	/** Returns the level of activity on the device. */
-	virtual EDeviceActivityLevel GetTrackedDeviceActivityLevel( vr::TrackedDeviceIndex_t unDeviceId ) = 0;
-
-	/** Convenience utility to apply the specified transform to the specified pose.
-	*   This properly transforms all pose components, including velocity and angular velocity
-	*/
-	virtual void ApplyTransform( TrackedDevicePose_t *pOutputPose, const TrackedDevicePose_t *pTrackedDevicePose, const HmdMatrix34_t *pTransform ) = 0;
-
-	/** Returns the device index associated with a specific role, for example the left hand or the right hand. */
-	virtual vr::TrackedDeviceIndex_t GetTrackedDeviceIndexForControllerRole( vr::ETrackedControllerRole unDeviceType ) = 0;
-
-	/** Returns the controller type associated with a device index. */
-	virtual vr::ETrackedControllerRole GetControllerRoleForTrackedDeviceIndex( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0;
-
-	// ------------------------------------
-	// Property methods
-	// ------------------------------------
-
-	/** Returns the device class of a tracked device. If there has not been a device connected in this slot
-	* since the application started this function will return TrackedDevice_Invalid. For previous detected
-	* devices the function will return the previously observed device class. 
-	*
-	* To determine which devices exist on the system, just loop from 0 to k_unMaxTrackedDeviceCount and check
-	* the device class. Every device with something other than TrackedDevice_Invalid is associated with an 
-	* actual tracked device. */
-	virtual ETrackedDeviceClass GetTrackedDeviceClass( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0;
-
-	/** Returns true if there is a device connected in this slot. */
-	virtual bool IsTrackedDeviceConnected( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0;
-
-	/** Returns a bool property. If the device index is not valid or the property is not a bool type this function will return false. */
-	virtual bool GetBoolTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0;
-
-	/** Returns a float property. If the device index is not valid or the property is not a float type this function will return 0. */
-	virtual float GetFloatTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0;
-
-	/** Returns an int property. If the device index is not valid or the property is not a int type this function will return 0. */
-	virtual int32_t GetInt32TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0;
-
-	/** Returns a uint64 property. If the device index is not valid or the property is not a uint64 type this function will return 0. */
-	virtual uint64_t GetUint64TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0;
-
-	/** Returns a matrix property. If the device index is not valid or the property is not a matrix type, this function will return identity. */
-	virtual HmdMatrix34_t GetMatrix34TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) = 0;
-
-	/** Returns a string property. If the device index is not valid or the property is not a string type this function will 
-	* return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing
-	* null. Strings will always fit in buffers of k_unMaxPropertyStringSize characters. */
-	virtual uint32_t GetStringTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, ETrackedPropertyError *pError = 0L ) = 0;
-
-	/** returns a string that corresponds with the specified property error. The string will be the name 
-	* of the error enum value for all valid error codes */
-	virtual const char *GetPropErrorNameFromEnum( ETrackedPropertyError error ) = 0;
-
-	// ------------------------------------
-	// Event methods
-	// ------------------------------------
-
-	/** Returns true and fills the event with the next event on the queue if there is one. If there are no events
-	* this method returns false. uncbVREvent should be the size in bytes of the VREvent_t struct */
-	virtual bool PollNextEvent( VREvent_t *pEvent, uint32_t uncbVREvent ) = 0;
-
-	/** Returns true and fills the event with the next event on the queue if there is one. If there are no events
-	* this method returns false. Fills in the pose of the associated tracked device in the provided pose struct. 
-	* This pose will always be older than the call to this function and should not be used to render the device. 
-	uncbVREvent should be the size in bytes of the VREvent_t struct */
-	virtual bool PollNextEventWithPose( ETrackingUniverseOrigin eOrigin, VREvent_t *pEvent, uint32_t uncbVREvent, vr::TrackedDevicePose_t *pTrackedDevicePose ) = 0;
-
-	/** returns the name of an EVREvent enum value */
-	virtual const char *GetEventTypeNameFromEnum( EVREventType eType ) = 0;
-
-	// ------------------------------------
-	// Rendering helper methods
-	// ------------------------------------
-
-	/** Returns the hidden area mesh for the current HMD. The pixels covered by this mesh will never be seen by the user after the lens distortion is
-	* applied based on visibility to the panels. If this HMD does not have a hidden area mesh, the vertex data and count will be NULL and 0 respectively.
-	* This mesh is meant to be rendered into the stencil buffer (or into the depth buffer setting nearz) before rendering each eye's view. 
-	* This will improve performance by letting the GPU early-reject pixels the user will never see before running the pixel shader.
-	* NOTE: Render this mesh with backface culling disabled since the winding order of the vertices can be different per-HMD or per-eye.
-	* Setting the bInverse argument to true will produce the visible area mesh that is commonly used in place of full-screen quads. The visible area mesh covers all of the pixels the hidden area mesh does not cover.
-	* Setting the bLineLoop argument will return a line loop of vertices in HiddenAreaMesh_t->pVertexData with HiddenAreaMesh_t->unTriangleCount set to the number of vertices.
-	*/
-	virtual HiddenAreaMesh_t GetHiddenAreaMesh( EVREye eEye, EHiddenAreaMeshType type = k_eHiddenAreaMesh_Standard ) = 0;
-
-	// ------------------------------------
-	// Controller methods
-	// ------------------------------------
-
-	/** Fills the supplied struct with the current state of the controller. Returns false if the controller index
-	* is invalid. */
-	virtual bool GetControllerState( vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, uint32_t unControllerStateSize ) = 0;
-
-	/** fills the supplied struct with the current state of the controller and the provided pose with the pose of 
-	* the controller when the controller state was updated most recently. Use this form if you need a precise controller
-	* pose as input to your application when the user presses or releases a button. */
-	virtual bool GetControllerStateWithPose( ETrackingUniverseOrigin eOrigin, vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, uint32_t unControllerStateSize, TrackedDevicePose_t *pTrackedDevicePose ) = 0;
-
-	/** Trigger a single haptic pulse on a controller. After this call the application may not trigger another haptic pulse on this controller
-	* and axis combination for 5ms. */
-	virtual void TriggerHapticPulse( vr::TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec ) = 0;
-
-	/** returns the name of an EVRButtonId enum value */
-	virtual const char *GetButtonIdNameFromEnum( EVRButtonId eButtonId ) = 0;
-
-	/** returns the name of an EVRControllerAxisType enum value */
-	virtual const char *GetControllerAxisTypeNameFromEnum( EVRControllerAxisType eAxisType ) = 0;
-
-	/** Tells OpenVR that this process wants exclusive access to controller button states and button events. Other apps will be notified that 
-	* they have lost input focus with a VREvent_InputFocusCaptured event. Returns false if input focus could not be captured for
-	* some reason. */
-	virtual bool CaptureInputFocus() = 0;
-
-	/** Tells OpenVR that this process no longer wants exclusive access to button states and button events. Other apps will be notified 
-	* that input focus has been released with a VREvent_InputFocusReleased event. */
-	virtual void ReleaseInputFocus() = 0;
-
-	/** Returns true if input focus is captured by another process. */
-	virtual bool IsInputFocusCapturedByAnotherProcess() = 0;
-
-	// ------------------------------------
-	// Debug Methods
-	// ------------------------------------
-
-	/** Sends a request to the driver for the specified device and returns the response. The maximum response size is 32k,
-	* but this method can be called with a smaller buffer. If the response exceeds the size of the buffer, it is truncated. 
-	* The size of the response including its terminating null is returned. */
-	virtual uint32_t DriverDebugRequest( vr::TrackedDeviceIndex_t unDeviceIndex, const char *pchRequest, char *pchResponseBuffer, uint32_t unResponseBufferSize ) = 0;
-
-	// ------------------------------------
-	// Firmware methods
-	// ------------------------------------
-	
-	/** Performs the actual firmware update if applicable. 
-	 * The following events will be sent, if VRFirmwareError_None was returned: VREvent_FirmwareUpdateStarted, VREvent_FirmwareUpdateFinished 
-	 * Use the properties Prop_Firmware_UpdateAvailable_Bool, Prop_Firmware_ManualUpdate_Bool, and Prop_Firmware_ManualUpdateURL_String
-	 * to figure our whether a firmware update is available, and to figure out whether its a manual update 
-	 * Prop_Firmware_ManualUpdateURL_String should point to an URL describing the manual update process */
-	virtual vr::EVRFirmwareError PerformFirmwareUpdate( vr::TrackedDeviceIndex_t unDeviceIndex ) = 0;
-
-	// ------------------------------------
-	// Application life cycle methods
-	// ------------------------------------
-
-	/** Call this to acknowledge to the system that VREvent_Quit has been received and that the process is exiting.
-	* This extends the timeout until the process is killed. */
-	virtual void AcknowledgeQuit_Exiting() = 0;
-
-	/** Call this to tell the system that the user is being prompted to save data. This
-	* halts the timeout and dismisses the dashboard (if it was up). Applications should be sure to actually 
-	* prompt the user to save and then exit afterward, otherwise the user will be left in a confusing state. */
-	virtual void AcknowledgeQuit_UserPrompt() = 0;
-
-};
-
-static const char * const IVRSystem_Version = "IVRSystem_015";
-
-}
-
-
-// ivrapplications.h
-namespace vr
-{
-
-	/** Used for all errors reported by the IVRApplications interface */
-	enum EVRApplicationError
-	{
-		VRApplicationError_None = 0,
-
-		VRApplicationError_AppKeyAlreadyExists = 100,	// Only one application can use any given key
-		VRApplicationError_NoManifest = 101,			// the running application does not have a manifest
-		VRApplicationError_NoApplication = 102,			// No application is running
-		VRApplicationError_InvalidIndex = 103,
-		VRApplicationError_UnknownApplication = 104,	// the application could not be found
-		VRApplicationError_IPCFailed = 105,				// An IPC failure caused the request to fail
-		VRApplicationError_ApplicationAlreadyRunning = 106, 
-		VRApplicationError_InvalidManifest = 107,
-		VRApplicationError_InvalidApplication = 108,
-		VRApplicationError_LaunchFailed = 109,			// the process didn't start
-		VRApplicationError_ApplicationAlreadyStarting = 110, // the system was already starting the same application
-		VRApplicationError_LaunchInProgress = 111,		// The system was already starting a different application
-		VRApplicationError_OldApplicationQuitting = 112, 
-		VRApplicationError_TransitionAborted = 113,
-		VRApplicationError_IsTemplate = 114, // error when you try to call LaunchApplication() on a template type app (use LaunchTemplateApplication)
-
-		VRApplicationError_BufferTooSmall = 200,		// The provided buffer was too small to fit the requested data
-		VRApplicationError_PropertyNotSet = 201,		// The requested property was not set
-		VRApplicationError_UnknownProperty = 202,
-		VRApplicationError_InvalidParameter = 203,
-	};
-
-	/** The maximum length of an application key */
-	static const uint32_t k_unMaxApplicationKeyLength = 128;
-
-	/** these are the properties available on applications. */
-	enum EVRApplicationProperty
-	{
-		VRApplicationProperty_Name_String				= 0,
-
-		VRApplicationProperty_LaunchType_String			= 11,
-		VRApplicationProperty_WorkingDirectory_String	= 12,
-		VRApplicationProperty_BinaryPath_String			= 13,
-		VRApplicationProperty_Arguments_String			= 14,
-		VRApplicationProperty_URL_String				= 15,
-
-		VRApplicationProperty_Description_String		= 50,
-		VRApplicationProperty_NewsURL_String			= 51,
-		VRApplicationProperty_ImagePath_String			= 52,
-		VRApplicationProperty_Source_String				= 53,
-
-		VRApplicationProperty_IsDashboardOverlay_Bool	= 60,
-		VRApplicationProperty_IsTemplate_Bool			= 61,
-		VRApplicationProperty_IsInstanced_Bool			= 62,
-		VRApplicationProperty_IsInternal_Bool			= 63,
-
-		VRApplicationProperty_LastLaunchTime_Uint64		= 70,
-	};
-
-	/** These are states the scene application startup process will go through. */
-	enum EVRApplicationTransitionState
-	{
-		VRApplicationTransition_None = 0,
-
-		VRApplicationTransition_OldAppQuitSent = 10,
-		VRApplicationTransition_WaitingForExternalLaunch = 11,
-		
-		VRApplicationTransition_NewAppLaunched = 20,
-	};
-
-	struct AppOverrideKeys_t
-	{
-		const char *pchKey;
-		const char *pchValue;
-	};
-
-	/** Currently recognized mime types */
-	static const char * const k_pch_MimeType_HomeApp		= "vr/home";
-	static const char * const k_pch_MimeType_GameTheater	= "vr/game_theater";
-
-	class IVRApplications
-	{
-	public:
-
-		// ---------------  Application management  --------------- //
-
-		/** Adds an application manifest to the list to load when building the list of installed applications. 
-		* Temporary manifests are not automatically loaded */
-		virtual EVRApplicationError AddApplicationManifest( const char *pchApplicationManifestFullPath, bool bTemporary = false ) = 0;
-
-		/** Removes an application manifest from the list to load when building the list of installed applications. */
-		virtual EVRApplicationError RemoveApplicationManifest( const char *pchApplicationManifestFullPath ) = 0;
-
-		/** Returns true if an application is installed */
-		virtual bool IsApplicationInstalled( const char *pchAppKey ) = 0;
-
-		/** Returns the number of applications available in the list */
-		virtual uint32_t GetApplicationCount() = 0;
-
-		/** Returns the key of the specified application. The index is at least 0 and is less than the return 
-		* value of GetApplicationCount(). The buffer should be at least k_unMaxApplicationKeyLength in order to 
-		* fit the key. */
-		virtual EVRApplicationError GetApplicationKeyByIndex( uint32_t unApplicationIndex, VR_OUT_STRING() char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0;
-
-		/** Returns the key of the application for the specified Process Id. The buffer should be at least 
-		* k_unMaxApplicationKeyLength in order to fit the key. */
-		virtual EVRApplicationError GetApplicationKeyByProcessId( uint32_t unProcessId, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0;
-
-		/** Launches the application. The existing scene application will exit and then the new application will start.
-		* This call is not valid for dashboard overlay applications. */
-		virtual EVRApplicationError LaunchApplication( const char *pchAppKey ) = 0;
-
-		/** Launches an instance of an application of type template, with its app key being pchNewAppKey (which must be unique) and optionally override sections
-		* from the manifest file via AppOverrideKeys_t
-		*/
-		virtual EVRApplicationError LaunchTemplateApplication( const char *pchTemplateAppKey, const char *pchNewAppKey, VR_ARRAY_COUNT( unKeys ) const AppOverrideKeys_t *pKeys, uint32_t unKeys ) = 0;
-
-		/** launches the application currently associated with this mime type and passes it the option args, typically the filename or object name of the item being launched */
-		virtual vr::EVRApplicationError LaunchApplicationFromMimeType( const char *pchMimeType, const char *pchArgs ) = 0;
-
-		/** Launches the dashboard overlay application if it is not already running. This call is only valid for 
-		* dashboard overlay applications. */
-		virtual EVRApplicationError LaunchDashboardOverlay( const char *pchAppKey ) = 0;
-
-		/** Cancel a pending launch for an application */
-		virtual bool CancelApplicationLaunch( const char *pchAppKey ) = 0;
-
-		/** Identifies a running application. OpenVR can't always tell which process started in response
-		* to a URL. This function allows a URL handler (or the process itself) to identify the app key 
-		* for the now running application. Passing a process ID of 0 identifies the calling process. 
-		* The application must be one that's known to the system via a call to AddApplicationManifest. */
-		virtual EVRApplicationError IdentifyApplication( uint32_t unProcessId, const char *pchAppKey ) = 0;
-
-		/** Returns the process ID for an application. Return 0 if the application was not found or is not running. */
-		virtual uint32_t GetApplicationProcessId( const char *pchAppKey ) = 0;
-
-		/** Returns a string for an applications error */
-		virtual const char *GetApplicationsErrorNameFromEnum( EVRApplicationError error ) = 0;
-
-		// ---------------  Application properties  --------------- //
-
-		/** Returns a value for an application property. The required buffer size to fit this value will be returned. */
-		virtual uint32_t GetApplicationPropertyString( const char *pchAppKey, EVRApplicationProperty eProperty, VR_OUT_STRING() char *pchPropertyValueBuffer, uint32_t unPropertyValueBufferLen, EVRApplicationError *peError = nullptr ) = 0;
-
-		/** Returns a bool value for an application property. Returns false in all error cases. */
-		virtual bool GetApplicationPropertyBool( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) = 0;
-
-		/** Returns a uint64 value for an application property. Returns 0 in all error cases. */
-		virtual uint64_t GetApplicationPropertyUint64( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) = 0;
-
-		/** Sets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */
-		virtual EVRApplicationError SetApplicationAutoLaunch( const char *pchAppKey, bool bAutoLaunch ) = 0;
-
-		/** Gets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */
-		virtual bool GetApplicationAutoLaunch( const char *pchAppKey ) = 0;
-
-		/** Adds this mime-type to the list of supported mime types for this application*/
-		virtual EVRApplicationError SetDefaultApplicationForMimeType( const char *pchAppKey, const char *pchMimeType ) = 0;
-
-		/** return the app key that will open this mime type */
-		virtual bool GetDefaultApplicationForMimeType( const char *pchMimeType, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0;
-
-		/** Get the list of supported mime types for this application, comma-delimited */
-		virtual bool GetApplicationSupportedMimeTypes( const char *pchAppKey, char *pchMimeTypesBuffer, uint32_t unMimeTypesBuffer ) = 0;
-
-		/** Get the list of app-keys that support this mime type, comma-delimited, the return value is number of bytes you need to return the full string */
-		virtual uint32_t GetApplicationsThatSupportMimeType( const char *pchMimeType, char *pchAppKeysThatSupportBuffer, uint32_t unAppKeysThatSupportBuffer ) = 0;
-
-		/** Get the args list from an app launch that had the process already running, you call this when you get a VREvent_ApplicationMimeTypeLoad */
-		virtual uint32_t GetApplicationLaunchArguments( uint32_t unHandle, char *pchArgs, uint32_t unArgs ) = 0;
-
-		// ---------------  Transition methods --------------- //
-
-		/** Returns the app key for the application that is starting up */
-		virtual EVRApplicationError GetStartingApplication( char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) = 0;
-
-		/** Returns the application transition state */
-		virtual EVRApplicationTransitionState GetTransitionState() = 0;
-
-		/** Returns errors that would prevent the specified application from launching immediately. Calling this function will
-		* cause the current scene application to quit, so only call it when you are actually about to launch something else.
-		* What the caller should do about these failures depends on the failure:
-		*   VRApplicationError_OldApplicationQuitting - An existing application has been told to quit. Wait for a VREvent_ProcessQuit
-		*                                               and try again.
-		*   VRApplicationError_ApplicationAlreadyStarting - This application is already starting. This is a permanent failure.
-		*   VRApplicationError_LaunchInProgress	      - A different application is already starting. This is a permanent failure.
-		*   VRApplicationError_None                   - Go ahead and launch. Everything is clear.
-		*/
-		virtual EVRApplicationError PerformApplicationPrelaunchCheck( const char *pchAppKey ) = 0;
-
-		/** Returns a string for an application transition state */
-		virtual const char *GetApplicationsTransitionStateNameFromEnum( EVRApplicationTransitionState state ) = 0;
-
-		/** Returns true if the outgoing scene app has requested a save prompt before exiting */
-		virtual bool IsQuitUserPromptRequested() = 0;
-
-		/** Starts a subprocess within the calling application. This
-		* suppresses all application transition UI and automatically identifies the new executable 
-		* as part of the same application. On success the calling process should exit immediately. 
-		* If working directory is NULL or "" the directory portion of the binary path will be 
-		* the working directory. */
-		virtual EVRApplicationError LaunchInternalProcess( const char *pchBinaryPath, const char *pchArguments, const char *pchWorkingDirectory ) = 0;
-
-		/** Returns the current scene process ID according to the application system. A scene process will get scene
-		* focus once it starts rendering, but it will appear here once it calls VR_Init with the Scene application
-		* type. */
-		virtual uint32_t GetCurrentSceneProcessId() = 0;
-	};
-
-	static const char * const IVRApplications_Version = "IVRApplications_006";
-
-} // namespace vr
-
-// ivrsettings.h
-namespace vr
-{
-	enum EVRSettingsError
-	{
-		VRSettingsError_None = 0,
-		VRSettingsError_IPCFailed = 1,
-		VRSettingsError_WriteFailed = 2,
-		VRSettingsError_ReadFailed = 3,
-		VRSettingsError_JsonParseFailed = 4,
-		VRSettingsError_UnsetSettingHasNoDefault = 5, // This will be returned if the setting does not appear in the appropriate default file and has not been set
-	};
-
-	// The maximum length of a settings key
-	static const uint32_t k_unMaxSettingsKeyLength = 128;
-
-	class IVRSettings
-	{
-	public:
-		virtual const char *GetSettingsErrorNameFromEnum( EVRSettingsError eError ) = 0;
-
-		// Returns true if file sync occurred (force or settings dirty)
-		virtual bool Sync( bool bForce = false, EVRSettingsError *peError = nullptr ) = 0;
-
-		virtual void SetBool( const char *pchSection, const char *pchSettingsKey, bool bValue, EVRSettingsError *peError = nullptr ) = 0;
-		virtual void SetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nValue, EVRSettingsError *peError = nullptr ) = 0;
-		virtual void SetFloat( const char *pchSection, const char *pchSettingsKey, float flValue, EVRSettingsError *peError = nullptr ) = 0;
-		virtual void SetString( const char *pchSection, const char *pchSettingsKey, const char *pchValue, EVRSettingsError *peError = nullptr ) = 0;
-
-		// Users of the system need to provide a proper default in default.vrsettings in the resources/settings/ directory
-		// of either the runtime or the driver_xxx directory. Otherwise the default will be false, 0, 0.0 or ""
-		virtual bool GetBool( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0;
-		virtual int32_t GetInt32( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0;
-		virtual float GetFloat( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0;
-		virtual void GetString( const char *pchSection, const char *pchSettingsKey, VR_OUT_STRING() char *pchValue, uint32_t unValueLen, EVRSettingsError *peError = nullptr ) = 0;
-
-		virtual void RemoveSection( const char *pchSection, EVRSettingsError *peError = nullptr ) = 0;
-		virtual void RemoveKeyInSection( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0;
-	};
-
-	//-----------------------------------------------------------------------------
-	static const char * const IVRSettings_Version = "IVRSettings_002";
-
-	//-----------------------------------------------------------------------------
-	// steamvr keys
-	static const char * const k_pch_SteamVR_Section = "steamvr";
-	static const char * const k_pch_SteamVR_RequireHmd_String = "requireHmd";
-	static const char * const k_pch_SteamVR_ForcedDriverKey_String = "forcedDriver";
-	static const char * const k_pch_SteamVR_ForcedHmdKey_String = "forcedHmd";
-	static const char * const k_pch_SteamVR_DisplayDebug_Bool = "displayDebug";
-	static const char * const k_pch_SteamVR_DebugProcessPipe_String = "debugProcessPipe";
-	static const char * const k_pch_SteamVR_EnableDistortion_Bool = "enableDistortion";
-	static const char * const k_pch_SteamVR_DisplayDebugX_Int32 = "displayDebugX";
-	static const char * const k_pch_SteamVR_DisplayDebugY_Int32 = "displayDebugY";
-	static const char * const k_pch_SteamVR_SendSystemButtonToAllApps_Bool= "sendSystemButtonToAllApps";
-	static const char * const k_pch_SteamVR_LogLevel_Int32 = "loglevel";
-	static const char * const k_pch_SteamVR_IPD_Float = "ipd";
-	static const char * const k_pch_SteamVR_Background_String = "background";
-	static const char * const k_pch_SteamVR_BackgroundUseDomeProjection_Bool = "backgroundUseDomeProjection";
-	static const char * const k_pch_SteamVR_BackgroundCameraHeight_Float = "backgroundCameraHeight";
-	static const char * const k_pch_SteamVR_BackgroundDomeRadius_Float = "backgroundDomeRadius";
-	static const char * const k_pch_SteamVR_GridColor_String = "gridColor";
-	static const char * const k_pch_SteamVR_PlayAreaColor_String = "playAreaColor";
-	static const char * const k_pch_SteamVR_ShowStage_Bool = "showStage";
-	static const char * const k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers";
-	static const char * const k_pch_SteamVR_DirectMode_Bool = "directMode";
-	static const char * const k_pch_SteamVR_DirectModeEdidVid_Int32 = "directModeEdidVid";
-	static const char * const k_pch_SteamVR_DirectModeEdidPid_Int32 = "directModeEdidPid";
-	static const char * const k_pch_SteamVR_UsingSpeakers_Bool = "usingSpeakers";
-	static const char * const k_pch_SteamVR_SpeakersForwardYawOffsetDegrees_Float = "speakersForwardYawOffsetDegrees";
-	static const char * const k_pch_SteamVR_BaseStationPowerManagement_Bool = "basestationPowerManagement";
-	static const char * const k_pch_SteamVR_NeverKillProcesses_Bool = "neverKillProcesses";
-	static const char * const k_pch_SteamVR_RenderTargetMultiplier_Float = "renderTargetMultiplier";
-	static const char * const k_pch_SteamVR_AllowAsyncReprojection_Bool = "allowAsyncReprojection";
-	static const char * const k_pch_SteamVR_AllowReprojection_Bool = "allowInterleavedReprojection";
-	static const char * const k_pch_SteamVR_ForceReprojection_Bool = "forceReprojection";
-	static const char * const k_pch_SteamVR_ForceFadeOnBadTracking_Bool = "forceFadeOnBadTracking";
-	static const char * const k_pch_SteamVR_DefaultMirrorView_Int32 = "defaultMirrorView";
-	static const char * const k_pch_SteamVR_ShowMirrorView_Bool = "showMirrorView";
-	static const char * const k_pch_SteamVR_MirrorViewGeometry_String = "mirrorViewGeometry";
-	static const char * const k_pch_SteamVR_StartMonitorFromAppLaunch = "startMonitorFromAppLaunch";
-	static const char * const k_pch_SteamVR_StartCompositorFromAppLaunch_Bool = "startCompositorFromAppLaunch";
-	static const char * const k_pch_SteamVR_StartDashboardFromAppLaunch_Bool = "startDashboardFromAppLaunch";
-	static const char * const k_pch_SteamVR_StartOverlayAppsFromDashboard_Bool = "startOverlayAppsFromDashboard";
-	static const char * const k_pch_SteamVR_EnableHomeApp = "enableHomeApp";
-	static const char * const k_pch_SteamVR_SetInitialDefaultHomeApp = "setInitialDefaultHomeApp";
-	static const char * const k_pch_SteamVR_CycleBackgroundImageTimeSec_Int32 = "CycleBackgroundImageTimeSec";
-	static const char * const k_pch_SteamVR_RetailDemo_Bool = "retailDemo";
-	static const char * const k_pch_SteamVR_IpdOffset_Float = "ipdOffset";
-
-	//-----------------------------------------------------------------------------
-	// lighthouse keys
-	static const char * const k_pch_Lighthouse_Section = "driver_lighthouse";
-	static const char * const k_pch_Lighthouse_DisableIMU_Bool = "disableimu";
-	static const char * const k_pch_Lighthouse_UseDisambiguation_String = "usedisambiguation";
-	static const char * const k_pch_Lighthouse_DisambiguationDebug_Int32 = "disambiguationdebug";
-	static const char * const k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation";
-	static const char * const k_pch_Lighthouse_DBHistory_Bool = "dbhistory";
-
-	//-----------------------------------------------------------------------------
-	// null keys
-	static const char * const k_pch_Null_Section = "driver_null";
-	static const char * const k_pch_Null_SerialNumber_String = "serialNumber";
-	static const char * const k_pch_Null_ModelNumber_String = "modelNumber";
-	static const char * const k_pch_Null_WindowX_Int32 = "windowX";
-	static const char * const k_pch_Null_WindowY_Int32 = "windowY";
-	static const char * const k_pch_Null_WindowWidth_Int32 = "windowWidth";
-	static const char * const k_pch_Null_WindowHeight_Int32 = "windowHeight";
-	static const char * const k_pch_Null_RenderWidth_Int32 = "renderWidth";
-	static const char * const k_pch_Null_RenderHeight_Int32 = "renderHeight";
-	static const char * const k_pch_Null_SecondsFromVsyncToPhotons_Float = "secondsFromVsyncToPhotons";
-	static const char * const k_pch_Null_DisplayFrequency_Float = "displayFrequency";
-
-	//-----------------------------------------------------------------------------
-	// user interface keys
-	static const char * const k_pch_UserInterface_Section = "userinterface";
-	static const char * const k_pch_UserInterface_StatusAlwaysOnTop_Bool = "StatusAlwaysOnTop";
-	static const char * const k_pch_UserInterface_MinimizeToTray_Bool = "MinimizeToTray";
-	static const char * const k_pch_UserInterface_Screenshots_Bool = "screenshots";
-	static const char * const k_pch_UserInterface_ScreenshotType_Int = "screenshotType";
-
-	//-----------------------------------------------------------------------------
-	// notification keys
-	static const char * const k_pch_Notifications_Section = "notifications";
-	static const char * const k_pch_Notifications_DoNotDisturb_Bool = "DoNotDisturb";
-
-	//-----------------------------------------------------------------------------
-	// keyboard keys
-	static const char * const k_pch_Keyboard_Section = "keyboard";
-	static const char * const k_pch_Keyboard_TutorialCompletions = "TutorialCompletions";
-	static const char * const k_pch_Keyboard_ScaleX = "ScaleX";
-	static const char * const k_pch_Keyboard_ScaleY = "ScaleY";
-	static const char * const k_pch_Keyboard_OffsetLeftX = "OffsetLeftX";
-	static const char * const k_pch_Keyboard_OffsetRightX = "OffsetRightX";
-	static const char * const k_pch_Keyboard_OffsetY = "OffsetY";
-	static const char * const k_pch_Keyboard_Smoothing = "Smoothing";
-
-	//-----------------------------------------------------------------------------
-	// perf keys
-	static const char * const k_pch_Perf_Section = "perfcheck";
-	static const char * const k_pch_Perf_HeuristicActive_Bool = "heuristicActive";
-	static const char * const k_pch_Perf_NotifyInHMD_Bool = "warnInHMD";
-	static const char * const k_pch_Perf_NotifyOnlyOnce_Bool = "warnOnlyOnce";
-	static const char * const k_pch_Perf_AllowTimingStore_Bool = "allowTimingStore";
-	static const char * const k_pch_Perf_SaveTimingsOnExit_Bool = "saveTimingsOnExit";
-	static const char * const k_pch_Perf_TestData_Float = "perfTestData";
-
-	//-----------------------------------------------------------------------------
-	// collision bounds keys
-	static const char * const k_pch_CollisionBounds_Section = "collisionBounds";
-	static const char * const k_pch_CollisionBounds_Style_Int32 = "CollisionBoundsStyle";
-	static const char * const k_pch_CollisionBounds_GroundPerimeterOn_Bool = "CollisionBoundsGroundPerimeterOn";
-	static const char * const k_pch_CollisionBounds_CenterMarkerOn_Bool = "CollisionBoundsCenterMarkerOn";
-	static const char * const k_pch_CollisionBounds_PlaySpaceOn_Bool = "CollisionBoundsPlaySpaceOn";
-	static const char * const k_pch_CollisionBounds_FadeDistance_Float = "CollisionBoundsFadeDistance";
-	static const char * const k_pch_CollisionBounds_ColorGammaR_Int32 = "CollisionBoundsColorGammaR";
-	static const char * const k_pch_CollisionBounds_ColorGammaG_Int32 = "CollisionBoundsColorGammaG";
-	static const char * const k_pch_CollisionBounds_ColorGammaB_Int32 = "CollisionBoundsColorGammaB";
-	static const char * const k_pch_CollisionBounds_ColorGammaA_Int32 = "CollisionBoundsColorGammaA";
-
-	//-----------------------------------------------------------------------------
-	// camera keys
-	static const char * const k_pch_Camera_Section = "camera";
-	static const char * const k_pch_Camera_EnableCamera_Bool = "enableCamera";
-	static const char * const k_pch_Camera_EnableCameraInDashboard_Bool = "enableCameraInDashboard";
-	static const char * const k_pch_Camera_EnableCameraForCollisionBounds_Bool = "enableCameraForCollisionBounds";
-	static const char * const k_pch_Camera_EnableCameraForRoomView_Bool = "enableCameraForRoomView";
-	static const char * const k_pch_Camera_BoundsColorGammaR_Int32 = "cameraBoundsColorGammaR";
-	static const char * const k_pch_Camera_BoundsColorGammaG_Int32 = "cameraBoundsColorGammaG";
-	static const char * const k_pch_Camera_BoundsColorGammaB_Int32 = "cameraBoundsColorGammaB";
-	static const char * const k_pch_Camera_BoundsColorGammaA_Int32 = "cameraBoundsColorGammaA";
-	static const char * const k_pch_Camera_BoundsStrength_Int32 = "cameraBoundsStrength";
-
-	//-----------------------------------------------------------------------------
-	// audio keys
-	static const char * const k_pch_audio_Section = "audio";
-	static const char * const k_pch_audio_OnPlaybackDevice_String = "onPlaybackDevice";
-	static const char * const k_pch_audio_OnRecordDevice_String = "onRecordDevice";
-	static const char * const k_pch_audio_OnPlaybackMirrorDevice_String = "onPlaybackMirrorDevice";
-	static const char * const k_pch_audio_OffPlaybackDevice_String = "offPlaybackDevice";
-	static const char * const k_pch_audio_OffRecordDevice_String = "offRecordDevice";
-	static const char * const k_pch_audio_VIVEHDMIGain = "viveHDMIGain";
-
-	//-----------------------------------------------------------------------------
-	// power management keys
-	static const char * const k_pch_Power_Section = "power";
-	static const char * const k_pch_Power_PowerOffOnExit_Bool = "powerOffOnExit";
-	static const char * const k_pch_Power_TurnOffScreensTimeout_Float = "turnOffScreensTimeout";
-	static const char * const k_pch_Power_TurnOffControllersTimeout_Float = "turnOffControllersTimeout";
-	static const char * const k_pch_Power_ReturnToWatchdogTimeout_Float = "returnToWatchdogTimeout";
-	static const char * const k_pch_Power_AutoLaunchSteamVROnButtonPress = "autoLaunchSteamVROnButtonPress";
-
-	//-----------------------------------------------------------------------------
-	// dashboard keys
-	static const char * const k_pch_Dashboard_Section = "dashboard";
-	static const char * const k_pch_Dashboard_EnableDashboard_Bool = "enableDashboard";
-	static const char * const k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode";
-
-	//-----------------------------------------------------------------------------
-	// model skin keys
-	static const char * const k_pch_modelskin_Section = "modelskins";
-
-	//-----------------------------------------------------------------------------
-	// driver keys - These could be checked in any driver_<name> section
-	static const char * const k_pch_Driver_Enable_Bool = "enable";
-
-} // namespace vr
-
-// ivrchaperone.h
-namespace vr
-{
-
-#if defined(__linux__) || defined(__APPLE__) 
-	// The 32-bit version of gcc has the alignment requirement for uint64 and double set to
-	// 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned.
-	// The 64-bit version of gcc has the alignment requirement for these types set to
-	// 8 meaning that unless we use #pragma pack(4) our structures will get bigger.
-	// The 64-bit structure packing has to match the 32-bit structure packing for each platform.
-	#pragma pack( push, 4 )
-#else
-	#pragma pack( push, 8 )
-#endif
-
-enum ChaperoneCalibrationState
-{
-	// OK!
-	ChaperoneCalibrationState_OK = 1,									// Chaperone is fully calibrated and working correctly
-
-	// Warnings
-	ChaperoneCalibrationState_Warning = 100,
-	ChaperoneCalibrationState_Warning_BaseStationMayHaveMoved = 101,	// A base station thinks that it might have moved
-	ChaperoneCalibrationState_Warning_BaseStationRemoved = 102,			// There are less base stations than when calibrated
-	ChaperoneCalibrationState_Warning_SeatedBoundsInvalid = 103,		// Seated bounds haven't been calibrated for the current tracking center
-
-	// Errors
-	ChaperoneCalibrationState_Error = 200,								// The UniverseID is invalid
-	ChaperoneCalibrationState_Error_BaseStationUninitialized = 201,		// Tracking center hasn't be calibrated for at least one of the base stations
-	ChaperoneCalibrationState_Error_BaseStationConflict = 202,			// Tracking center is calibrated, but base stations disagree on the tracking space
-	ChaperoneCalibrationState_Error_PlayAreaInvalid = 203,				// Play Area hasn't been calibrated for the current tracking center
-	ChaperoneCalibrationState_Error_CollisionBoundsInvalid = 204,		// Collision Bounds haven't been calibrated for the current tracking center
-};
-
-
-/** HIGH LEVEL TRACKING SPACE ASSUMPTIONS:
-* 0,0,0 is the preferred standing area center.
-* 0Y is the floor height.
-* -Z is the preferred forward facing direction. */
-class IVRChaperone
-{
-public:
-
-	/** Get the current state of Chaperone calibration. This state can change at any time during a session due to physical base station changes. **/
-	virtual ChaperoneCalibrationState GetCalibrationState() = 0;
-
-	/** Returns the width and depth of the Play Area (formerly named Soft Bounds) in X and Z. 
-	* Tracking space center (0,0,0) is the center of the Play Area. **/
-	virtual bool GetPlayAreaSize( float *pSizeX, float *pSizeZ ) = 0;
-
-	/** Returns the 4 corner positions of the Play Area (formerly named Soft Bounds).
-	* Corners are in counter-clockwise order.
-	* Standing center (0,0,0) is the center of the Play Area.
-	* It's a rectangle.
-	* 2 sides are parallel to the X axis and 2 sides are parallel to the Z axis.
-	* Height of every corner is 0Y (on the floor). **/
-	virtual bool GetPlayAreaRect( HmdQuad_t *rect ) = 0;
-
-	/** Reload Chaperone data from the .vrchap file on disk. */
-	virtual void ReloadInfo( void ) = 0;
-
-	/** Optionally give the chaperone system a hit about the color and brightness in the scene **/
-	virtual void SetSceneColor( HmdColor_t color ) = 0;
-
-	/** Get the current chaperone bounds draw color and brightness **/
-	virtual void GetBoundsColor( HmdColor_t *pOutputColorArray, int nNumOutputColors, float flCollisionBoundsFadeDistance, HmdColor_t *pOutputCameraColor ) = 0;
-
-	/** Determine whether the bounds are showing right now **/
-	virtual bool AreBoundsVisible() = 0;
-
-	/** Force the bounds to show, mostly for utilities **/
-	virtual void ForceBoundsVisible( bool bForce ) = 0;
-};
-
-static const char * const IVRChaperone_Version = "IVRChaperone_003";
-
-#pragma pack( pop )
-
-}
-
-// ivrchaperonesetup.h
-namespace vr
-{
-
-enum EChaperoneConfigFile
-{
-	EChaperoneConfigFile_Live = 1,		// The live chaperone config, used by most applications and games
-	EChaperoneConfigFile_Temp = 2,		// The temporary chaperone config, used to live-preview collision bounds in room setup
-};
-
-enum EChaperoneImportFlags
-{
-	EChaperoneImport_BoundsOnly = 0x0001,
-};
-
-/** Manages the working copy of the chaperone info. By default this will be the same as the 
-* live copy. Any changes made with this interface will stay in the working copy until 
-* CommitWorkingCopy() is called, at which point the working copy and the live copy will be 
-* the same again. */
-class IVRChaperoneSetup
-{
-public:
-
-	/** Saves the current working copy to disk */
-	virtual bool CommitWorkingCopy( EChaperoneConfigFile configFile ) = 0;
-
-	/** Reverts the working copy to match the live chaperone calibration.
-	* To modify existing data this MUST be do WHILE getting a non-error ChaperoneCalibrationStatus.
-	* Only after this should you do gets and sets on the existing data. */
-	virtual void RevertWorkingCopy() = 0;
-
-	/** Returns the width and depth of the Play Area (formerly named Soft Bounds) in X and Z from the working copy.
-	* Tracking space center (0,0,0) is the center of the Play Area. */
-	virtual bool GetWorkingPlayAreaSize( float *pSizeX, float *pSizeZ ) = 0;
-
-	/** Returns the 4 corner positions of the Play Area (formerly named Soft Bounds) from the working copy.
-	* Corners are in clockwise order.
-	* Tracking space center (0,0,0) is the center of the Play Area.
-	* It's a rectangle.
-	* 2 sides are parallel to the X axis and 2 sides are parallel to the Z axis.
-	* Height of every corner is 0Y (on the floor). **/
-	virtual bool GetWorkingPlayAreaRect( HmdQuad_t *rect ) = 0;
-
-	/** Returns the number of Quads if the buffer points to null. Otherwise it returns Quads 
-	* into the buffer up to the max specified from the working copy. */
-	virtual bool GetWorkingCollisionBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0;
-
-	/** Returns the number of Quads if the buffer points to null. Otherwise it returns Quads 
-	* into the buffer up to the max specified. */
-	virtual bool GetLiveCollisionBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0;
-
-	/** Returns the preferred seated position from the working copy. */
-	virtual bool GetWorkingSeatedZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatSeatedZeroPoseToRawTrackingPose ) = 0;
-
-	/** Returns the standing origin from the working copy. */
-	virtual bool GetWorkingStandingZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatStandingZeroPoseToRawTrackingPose ) = 0;
-
-	/** Sets the Play Area in the working copy. */
-	virtual void SetWorkingPlayAreaSize( float sizeX, float sizeZ ) = 0;
-
-	/** Sets the Collision Bounds in the working copy. */
-	virtual void SetWorkingCollisionBoundsInfo( VR_ARRAY_COUNT(unQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t unQuadsCount ) = 0;
-
-	/** Sets the preferred seated position in the working copy. */
-	virtual void SetWorkingSeatedZeroPoseToRawTrackingPose( const HmdMatrix34_t *pMatSeatedZeroPoseToRawTrackingPose ) = 0;
-
-	/** Sets the preferred standing position in the working copy. */
-	virtual void SetWorkingStandingZeroPoseToRawTrackingPose( const HmdMatrix34_t *pMatStandingZeroPoseToRawTrackingPose ) = 0;
-
-	/** Tear everything down and reload it from the file on disk */
-	virtual void ReloadFromDisk( EChaperoneConfigFile configFile ) = 0;
-
-	/** Returns the preferred seated position. */
-	virtual bool GetLiveSeatedZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatSeatedZeroPoseToRawTrackingPose ) = 0;
-
-	virtual void SetWorkingCollisionBoundsTagsInfo( VR_ARRAY_COUNT(unTagCount) uint8_t *pTagsBuffer, uint32_t unTagCount ) = 0;
-	virtual bool GetLiveCollisionBoundsTagsInfo( VR_OUT_ARRAY_COUNT(punTagCount) uint8_t *pTagsBuffer, uint32_t *punTagCount ) = 0;
-
-	virtual bool SetWorkingPhysicalBoundsInfo( VR_ARRAY_COUNT(unQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t unQuadsCount ) = 0;
-	virtual bool GetLivePhysicalBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) = 0;
-
-	virtual bool ExportLiveToBuffer( VR_OUT_STRING() char *pBuffer, uint32_t *pnBufferLength ) = 0;
-	virtual bool ImportFromBufferToWorking( const char *pBuffer, uint32_t nImportFlags ) = 0;
-};
-
-static const char * const IVRChaperoneSetup_Version = "IVRChaperoneSetup_005";
-
-
-}
-
-// ivrcompositor.h
-namespace vr
-{
-
-#if defined(__linux__) || defined(__APPLE__) 
-	// The 32-bit version of gcc has the alignment requirement for uint64 and double set to
-	// 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned.
-	// The 64-bit version of gcc has the alignment requirement for these types set to
-	// 8 meaning that unless we use #pragma pack(4) our structures will get bigger.
-	// The 64-bit structure packing has to match the 32-bit structure packing for each platform.
-	#pragma pack( push, 4 )
-#else
-	#pragma pack( push, 8 )
-#endif
-
-/** Errors that can occur with the VR compositor */
-enum EVRCompositorError
-{
-	VRCompositorError_None						= 0,
-	VRCompositorError_RequestFailed				= 1,
-	VRCompositorError_IncompatibleVersion		= 100,
-	VRCompositorError_DoNotHaveFocus			= 101,
-	VRCompositorError_InvalidTexture			= 102,
-	VRCompositorError_IsNotSceneApplication		= 103,
-	VRCompositorError_TextureIsOnWrongDevice	= 104,
-	VRCompositorError_TextureUsesUnsupportedFormat = 105,
-	VRCompositorError_SharedTexturesNotSupported = 106,
-	VRCompositorError_IndexOutOfRange			= 107,
-	VRCompositorError_AlreadySubmitted			= 108,
-};
-
-const uint32_t VRCompositor_ReprojectionReason_Cpu = 0x01;
-const uint32_t VRCompositor_ReprojectionReason_Gpu = 0x02;
-const uint32_t VRCompositor_ReprojectionAsync      = 0x04;	// This flag indicates the async reprojection mode is active,
-															// but does not indicate if reprojection actually happened or not.
-															// Use the ReprojectionReason flags above to check if reprojection
-															// was actually applied (i.e. scene texture was reused).
-															// NumFramePresents > 1 also indicates the scene texture was reused,
-															// and also the number of times that it was presented in total.
-
-/** Provides a single frame's timing information to the app */
-struct Compositor_FrameTiming
-{
-	uint32_t m_nSize; // Set to sizeof( Compositor_FrameTiming )
-	uint32_t m_nFrameIndex;
-	uint32_t m_nNumFramePresents; // number of times this frame was presented
-	uint32_t m_nNumMisPresented; // number of times this frame was presented on a vsync other than it was originally predicted to
-	uint32_t m_nNumDroppedFrames; // number of additional times previous frame was scanned out
-	uint32_t m_nReprojectionFlags;
-
-	/** Absolute time reference for comparing frames.  This aligns with the vsync that running start is relative to. */
-	double m_flSystemTimeInSeconds;
-
-	/** These times may include work from other processes due to OS scheduling.
-	* The fewer packets of work these are broken up into, the less likely this will happen.
-	* GPU work can be broken up by calling Flush.  This can sometimes be useful to get the GPU started
-	* processing that work earlier in the frame. */
-	float m_flPreSubmitGpuMs; // time spent rendering the scene (gpu work submitted between WaitGetPoses and second Submit)
-	float m_flPostSubmitGpuMs; // additional time spent rendering by application (e.g. companion window)
-	float m_flTotalRenderGpuMs; // time between work submitted immediately after present (ideally vsync) until the end of compositor submitted work
-	float m_flCompositorRenderGpuMs; // time spend performing distortion correction, rendering chaperone, overlays, etc.
-	float m_flCompositorRenderCpuMs; // time spent on cpu submitting the above work for this frame
-	float m_flCompositorIdleCpuMs; // time spent waiting for running start (application could have used this much more time)
-
-	/** Miscellaneous measured intervals. */
-	float m_flClientFrameIntervalMs; // time between calls to WaitGetPoses
-	float m_flPresentCallCpuMs; // time blocked on call to present (usually 0.0, but can go long)
-	float m_flWaitForPresentCpuMs; // time spent spin-waiting for frame index to change (not near-zero indicates wait object failure)
-	float m_flSubmitFrameMs; // time spent in IVRCompositor::Submit (not near-zero indicates driver issue)
-
-	/** The following are all relative to this frame's SystemTimeInSeconds */
-	float m_flWaitGetPosesCalledMs;
-	float m_flNewPosesReadyMs;
-	float m_flNewFrameReadyMs; // second call to IVRCompositor::Submit
-	float m_flCompositorUpdateStartMs;
-	float m_flCompositorUpdateEndMs;
-	float m_flCompositorRenderStartMs;
-
-	vr::TrackedDevicePose_t m_HmdPose; // pose used by app to render this frame
-};
-
-/** Cumulative stats for current application.  These are not cleared until a new app connects,
-* but they do stop accumulating once the associated app disconnects. */
-struct Compositor_CumulativeStats
-{
-	uint32_t m_nPid; // Process id associated with these stats (may no longer be running).
-	uint32_t m_nNumFramePresents; // total number of times we called present (includes reprojected frames)
-	uint32_t m_nNumDroppedFrames; // total number of times an old frame was re-scanned out (without reprojection)
-	uint32_t m_nNumReprojectedFrames; // total number of times a frame was scanned out a second time (with reprojection)
-
-	/** Values recorded at startup before application has fully faded in the first time. */
-	uint32_t m_nNumFramePresentsOnStartup;
-	uint32_t m_nNumDroppedFramesOnStartup;
-	uint32_t m_nNumReprojectedFramesOnStartup;
-
-	/** Applications may explicitly fade to the compositor.  This is usually to handle level transitions, and loading often causes
-	* system wide hitches.  The following stats are collected during this period.  Does not include values recorded during startup. */
-	uint32_t m_nNumLoading;
-	uint32_t m_nNumFramePresentsLoading;
-	uint32_t m_nNumDroppedFramesLoading;
-	uint32_t m_nNumReprojectedFramesLoading;
-
-	/** If we don't get a new frame from the app in less than 2.5 frames, then we assume the app has hung and start
-	* fading back to the compositor.  The following stats are a result of this, and are a subset of those recorded above.
-	* Does not include values recorded during start up or loading. */
-	uint32_t m_nNumTimedOut;
-	uint32_t m_nNumFramePresentsTimedOut;
-	uint32_t m_nNumDroppedFramesTimedOut;
-	uint32_t m_nNumReprojectedFramesTimedOut;
-};
-
-#pragma pack( pop )
-
-/** Allows the application to interact with the compositor */
-class IVRCompositor
-{
-public:
-	/** Sets tracking space returned by WaitGetPoses */
-	virtual void SetTrackingSpace( ETrackingUniverseOrigin eOrigin ) = 0;
-
-	/** Gets current tracking space returned by WaitGetPoses */
-	virtual ETrackingUniverseOrigin GetTrackingSpace() = 0;
-
-	/** Scene applications should call this function to get poses to render with (and optionally poses predicted an additional frame out to use for gameplay).
-	* This function will block until "running start" milliseconds before the start of the frame, and should be called at the last moment before needing to
-	* start rendering.
-	*
-	* Return codes:
-	*	- IsNotSceneApplication (make sure to call VR_Init with VRApplicaiton_Scene)
-	*	- DoNotHaveFocus (some other app has taken focus - this will throttle the call to 10hz to reduce the impact on that app)
-	*/
-	virtual EVRCompositorError WaitGetPoses( VR_ARRAY_COUNT(unRenderPoseArrayCount) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount,
-		VR_ARRAY_COUNT(unGamePoseArrayCount) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0;
-
-	/** Get the last set of poses returned by WaitGetPoses. */
-	virtual EVRCompositorError GetLastPoses( VR_ARRAY_COUNT( unRenderPoseArrayCount ) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount,
-		VR_ARRAY_COUNT( unGamePoseArrayCount ) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) = 0;
-
-	/** Interface for accessing last set of poses returned by WaitGetPoses one at a time.
-	* Returns VRCompositorError_IndexOutOfRange if unDeviceIndex not less than k_unMaxTrackedDeviceCount otherwise VRCompositorError_None.
-	* It is okay to pass NULL for either pose if you only want one of the values. */
-	virtual EVRCompositorError GetLastPoseForTrackedDeviceIndex( TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t *pOutputPose, TrackedDevicePose_t *pOutputGamePose ) = 0;
-
-	/** Updated scene texture to display. If pBounds is NULL the entire texture will be used.  If called from an OpenGL app, consider adding a glFlush after
-	* Submitting both frames to signal the driver to start processing, otherwise it may wait until the command buffer fills up, causing the app to miss frames.
-	*
-	* OpenGL dirty state:
-	*	glBindTexture
-	*
-	* Return codes:
-	*	- IsNotSceneApplication (make sure to call VR_Init with VRApplicaiton_Scene)
-	*	- DoNotHaveFocus (some other app has taken focus)
-	*	- TextureIsOnWrongDevice (application did not use proper AdapterIndex - see IVRSystem.GetDXGIOutputInfo)
-	*	- SharedTexturesNotSupported (application needs to call CreateDXGIFactory1 or later before creating DX device)
-	*	- TextureUsesUnsupportedFormat (scene textures must be compatible with DXGI sharing rules - e.g. uncompressed, no mips, etc.)
-	*	- InvalidTexture (usually means bad arguments passed in)
-	*	- AlreadySubmitted (app has submitted two left textures or two right textures in a single frame - i.e. before calling WaitGetPoses again)
-	*/
-	virtual EVRCompositorError Submit( EVREye eEye, const Texture_t *pTexture, const VRTextureBounds_t* pBounds = 0, EVRSubmitFlags nSubmitFlags = Submit_Default ) = 0;
-
-	/** Clears the frame that was sent with the last call to Submit. This will cause the 
-	* compositor to show the grid until Submit is called again. */
-	virtual void ClearLastSubmittedFrame() = 0;
-
-	/** Call immediately after presenting your app's window (i.e. companion window) to unblock the compositor.
-	* This is an optional call, which only needs to be used if you can't instead call WaitGetPoses immediately after Present.
-	* For example, if your engine's render and game loop are not on separate threads, or blocking the render thread until 3ms before the next vsync would
-	* introduce a deadlock of some sort.  This function tells the compositor that you have finished all rendering after having Submitted buffers for both
-	* eyes, and it is free to start its rendering work.  This should only be called from the same thread you are rendering on. */
-	virtual void PostPresentHandoff() = 0;
-
-	/** Returns true if timing data is filled it.  Sets oldest timing info if nFramesAgo is larger than the stored history.
-	* Be sure to set timing.size = sizeof(Compositor_FrameTiming) on struct passed in before calling this function. */
-	virtual bool GetFrameTiming( Compositor_FrameTiming *pTiming, uint32_t unFramesAgo = 0 ) = 0;
-
-	/** Interface for copying a range of timing data.  Frames are returned in ascending order (oldest to newest) with the last being the most recent frame.
-	* Only the first entry's m_nSize needs to be set, as the rest will be inferred from that.  Returns total number of entries filled out. */
-	virtual uint32_t GetFrameTimings( Compositor_FrameTiming *pTiming, uint32_t nFrames ) = 0;
-
-	/** Returns the time in seconds left in the current (as identified by FrameTiming's frameIndex) frame.
-	* Due to "running start", this value may roll over to the next frame before ever reaching 0.0. */
-	virtual float GetFrameTimeRemaining() = 0;
-
-	/** Fills out stats accumulated for the last connected application.  Pass in sizeof( Compositor_CumulativeStats ) as second parameter. */
-	virtual void GetCumulativeStats( Compositor_CumulativeStats *pStats, uint32_t nStatsSizeInBytes ) = 0;
-
-	/** Fades the view on the HMD to the specified color. The fade will take fSeconds, and the color values are between
-	* 0.0 and 1.0. This color is faded on top of the scene based on the alpha parameter. Removing the fade color instantly 
-	* would be FadeToColor( 0.0, 0.0, 0.0, 0.0, 0.0 ).  Values are in un-premultiplied alpha space. */
-	virtual void FadeToColor( float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground = false ) = 0;
-
-	/** Get current fade color value. */
-	virtual HmdColor_t GetCurrentFadeColor( bool bBackground = false ) = 0;
-
-	/** Fading the Grid in or out in fSeconds */
-	virtual void FadeGrid( float fSeconds, bool bFadeIn ) = 0;
-
-	/** Get current alpha value of grid. */
-	virtual float GetCurrentGridAlpha() = 0;
-
-	/** Override the skybox used in the compositor (e.g. for during level loads when the app can't feed scene images fast enough)
-	* Order is Front, Back, Left, Right, Top, Bottom.  If only a single texture is passed, it is assumed in lat-long format.
-	* If two are passed, it is assumed a lat-long stereo pair. */
-	virtual EVRCompositorError SetSkyboxOverride( VR_ARRAY_COUNT( unTextureCount ) const Texture_t *pTextures, uint32_t unTextureCount ) = 0;
-
-	/** Resets compositor skybox back to defaults. */
-	virtual void ClearSkyboxOverride() = 0;
-
-	/** Brings the compositor window to the front. This is useful for covering any other window that may be on the HMD
-	* and is obscuring the compositor window. */
-	virtual void CompositorBringToFront() = 0;
-
-	/** Pushes the compositor window to the back. This is useful for allowing other applications to draw directly to the HMD. */
-	virtual void CompositorGoToBack() = 0;
-
-	/** Tells the compositor process to clean up and exit. You do not need to call this function at shutdown. Under normal 
-	* circumstances the compositor will manage its own life cycle based on what applications are running. */
-	virtual void CompositorQuit() = 0;
-	
-	/** Return whether the compositor is fullscreen */
-	virtual bool IsFullscreen() = 0;
-
-	/** Returns the process ID of the process that is currently rendering the scene */
-	virtual uint32_t GetCurrentSceneFocusProcess() = 0;
-
-	/** Returns the process ID of the process that rendered the last frame (or 0 if the compositor itself rendered the frame.)
-	* Returns 0 when fading out from an app and the app's process Id when fading into an app. */
-	virtual uint32_t GetLastFrameRenderer() = 0;
-
-	/** Returns true if the current process has the scene focus */
-	virtual bool CanRenderScene() = 0;
-
-	/** Creates a window on the primary monitor to display what is being shown in the headset. */
-	virtual void ShowMirrorWindow() = 0;
-
-	/** Closes the mirror window. */
-	virtual void HideMirrorWindow() = 0;
-
-	/** Returns true if the mirror window is shown. */
-	virtual bool IsMirrorWindowVisible() = 0;
-
-	/** Writes all images that the compositor knows about (including overlays) to a 'screenshots' folder in the SteamVR runtime root. */
-	virtual void CompositorDumpImages() = 0;
-
-	/** Let an app know it should be rendering with low resources. */
-	virtual bool ShouldAppRenderWithLowResources() = 0;
-
-	/** Override interleaved reprojection logic to force on. */
-	virtual void ForceInterleavedReprojectionOn( bool bOverride ) = 0;
-
-	/** Force reconnecting to the compositor process. */
-	virtual void ForceReconnectProcess() = 0;
-
-	/** Temporarily suspends rendering (useful for finer control over scene transitions). */
-	virtual void SuspendRendering( bool bSuspend ) = 0;
-
-	/** Opens a shared D3D11 texture with the undistorted composited image for each eye.  Use ReleaseMirrorTextureD3D11 when finished
-	* instead of calling Release on the resource itself. */
-	virtual vr::EVRCompositorError GetMirrorTextureD3D11( vr::EVREye eEye, void *pD3D11DeviceOrResource, void **ppD3D11ShaderResourceView ) = 0;
-	virtual void ReleaseMirrorTextureD3D11( void *pD3D11ShaderResourceView ) = 0;
-
-	/** Access to mirror textures from OpenGL. */
-	virtual vr::EVRCompositorError GetMirrorTextureGL( vr::EVREye eEye, vr::glUInt_t *pglTextureId, vr::glSharedTextureHandle_t *pglSharedTextureHandle ) = 0;
-	virtual bool ReleaseSharedGLTexture( vr::glUInt_t glTextureId, vr::glSharedTextureHandle_t glSharedTextureHandle ) = 0;
-	virtual void LockGLSharedTextureForAccess( vr::glSharedTextureHandle_t glSharedTextureHandle ) = 0;
-	virtual void UnlockGLSharedTextureForAccess( vr::glSharedTextureHandle_t glSharedTextureHandle ) = 0;
-
-	/** [Vulkan Only]
-	* return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing
-	* null.  The string will be a space separated list of-required instance extensions to enable in VkCreateInstance */
-	virtual uint32_t GetVulkanInstanceExtensionsRequired( VR_OUT_STRING() char *pchValue, uint32_t unBufferSize ) = 0;
-
-	/** [Vulkan only]
-	* return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing
-	* null.  The string will be a space separated list of required device extensions to enable in VkCreateDevice */
-	virtual uint32_t GetVulkanDeviceExtensionsRequired( VkPhysicalDevice_T *pPhysicalDevice, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize ) = 0;
-
-};
-
-static const char * const IVRCompositor_Version = "IVRCompositor_020";
-
-} // namespace vr
-
-
-
-// ivrnotifications.h
-namespace vr
-{
-
-#if defined(__linux__) || defined(__APPLE__) 
-	// The 32-bit version of gcc has the alignment requirement for uint64 and double set to
-	// 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned.
-	// The 64-bit version of gcc has the alignment requirement for these types set to
-	// 8 meaning that unless we use #pragma pack(4) our structures will get bigger.
-	// The 64-bit structure packing has to match the 32-bit structure packing for each platform.
-	#pragma pack( push, 4 )
-#else
-	#pragma pack( push, 8 )
-#endif
-
-// Used for passing graphic data
-struct NotificationBitmap_t
-{
-	NotificationBitmap_t()
-		: m_pImageData( nullptr )
-		, m_nWidth( 0 )
-		, m_nHeight( 0 )
-		, m_nBytesPerPixel( 0 )
-	{
-	};
-
-	void *m_pImageData;
-	int32_t m_nWidth;
-	int32_t m_nHeight;
-	int32_t m_nBytesPerPixel;
-};
-
-
-/** Be aware that the notification type is used as 'priority' to pick the next notification */
-enum EVRNotificationType
-{
-	/** Transient notifications are automatically hidden after a period of time set by the user. 
-	* They are used for things like information and chat messages that do not require user interaction. */
-	EVRNotificationType_Transient = 0,
-
-	/** Persistent notifications are shown to the user until they are hidden by calling RemoveNotification().
-	* They are used for things like phone calls and alarms that require user interaction. */
-	EVRNotificationType_Persistent = 1,
-
-	/** System notifications are shown no matter what. It is expected, that the ulUserValue is used as ID.
-	 * If there is already a system notification in the queue with that ID it is not accepted into the queue
-	 * to prevent spamming with system notification */
-	EVRNotificationType_Transient_SystemWithUserValue = 2,
-};
-
-enum EVRNotificationStyle
-{
-	/** Creates a notification with minimal external styling. */
-	EVRNotificationStyle_None = 0,
-
-	/** Used for notifications about overlay-level status. In Steam this is used for events like downloads completing. */
-	EVRNotificationStyle_Application = 100,
-
-	/** Used for notifications about contacts that are unknown or not available. In Steam this is used for friend invitations and offline friends. */
-	EVRNotificationStyle_Contact_Disabled = 200,
-
-	/** Used for notifications about contacts that are available but inactive. In Steam this is used for friends that are online but not playing a game. */
-	EVRNotificationStyle_Contact_Enabled = 201,
-
-	/** Used for notifications about contacts that are available and active. In Steam this is used for friends that are online and currently running a game. */
-	EVRNotificationStyle_Contact_Active = 202,
-};
-
-static const uint32_t k_unNotificationTextMaxSize = 256;
-
-typedef uint32_t VRNotificationId;
-
-
-
-#pragma pack( pop )
-
-/** Allows notification sources to interact with the VR system
-	This current interface is not yet implemented. Do not use yet. */
-class IVRNotifications
-{
-public:
-	/** Create a notification and enqueue it to be shown to the user.
-	* An overlay handle is required to create a notification, as otherwise it would be impossible for a user to act on it.
-	* To create a two-line notification, use a line break ('\n') to split the text into two lines.
-	* The pImage argument may be NULL, in which case the specified overlay's icon will be used instead. */
-	virtual EVRNotificationError CreateNotification( VROverlayHandle_t ulOverlayHandle, uint64_t ulUserValue, EVRNotificationType type, const char *pchText, EVRNotificationStyle style, const NotificationBitmap_t *pImage, /* out */ VRNotificationId *pNotificationId ) = 0;
-
-	/** Destroy a notification, hiding it first if it currently shown to the user. */
-	virtual EVRNotificationError RemoveNotification( VRNotificationId notificationId ) = 0;
-
-};
-
-static const char * const IVRNotifications_Version = "IVRNotifications_002";
-
-} // namespace vr
-
-
-
-// ivroverlay.h
-namespace vr
-{
-
-	/** The maximum length of an overlay key in bytes, counting the terminating null character. */
-	static const uint32_t k_unVROverlayMaxKeyLength = 128;
-
-	/** The maximum length of an overlay name in bytes, counting the terminating null character. */
-	static const uint32_t k_unVROverlayMaxNameLength = 128;
-
-	/** The maximum number of overlays that can exist in the system at one time. */
-	static const uint32_t k_unMaxOverlayCount = 64;
-
-	/** The maximum number of overlay intersection mask primitives per overlay */
-	static const uint32_t k_unMaxOverlayIntersectionMaskPrimitivesCount = 32;
-
-	/** Types of input supported by VR Overlays */
-	enum VROverlayInputMethod
-	{
-		VROverlayInputMethod_None		= 0, // No input events will be generated automatically for this overlay
-		VROverlayInputMethod_Mouse		= 1, // Tracked controllers will get mouse events automatically
-	};
-
-	/** Allows the caller to figure out which overlay transform getter to call. */
-	enum VROverlayTransformType
-	{
-		VROverlayTransform_Absolute					= 0,
-		VROverlayTransform_TrackedDeviceRelative	= 1,
-		VROverlayTransform_SystemOverlay			= 2,
-		VROverlayTransform_TrackedComponent 		= 3,
-	};
-
-	/** Overlay control settings */
-	enum VROverlayFlags
-	{
-		VROverlayFlags_None			= 0,
-
-		// The following only take effect when rendered using the high quality render path (see SetHighQualityOverlay).
-		VROverlayFlags_Curved		= 1,
-		VROverlayFlags_RGSS4X		= 2,
-
-		// Set this flag on a dashboard overlay to prevent a tab from showing up for that overlay
-		VROverlayFlags_NoDashboardTab = 3,
-
-		// Set this flag on a dashboard that is able to deal with gamepad focus events
-		VROverlayFlags_AcceptsGamepadEvents = 4,
-
-		// Indicates that the overlay should dim/brighten to show gamepad focus
-		VROverlayFlags_ShowGamepadFocus = 5,
-
-		// When in VROverlayInputMethod_Mouse you can optionally enable sending VRScroll_t 
-		VROverlayFlags_SendVRScrollEvents = 6,
-		VROverlayFlags_SendVRTouchpadEvents = 7,
-
-		// If set this will render a vertical scroll wheel on the primary controller, 
-		//  only needed if not using VROverlayFlags_SendVRScrollEvents but you still want to represent a scroll wheel
-		VROverlayFlags_ShowTouchPadScrollWheel = 8,
-
-		// If this is set ownership and render access to the overlay are transferred 
-		// to the new scene process on a call to IVRApplications::LaunchInternalProcess
-		VROverlayFlags_TransferOwnershipToInternalProcess = 9,
-
-		// If set, renders 50% of the texture in each eye, side by side
-		VROverlayFlags_SideBySide_Parallel = 10, // Texture is left/right
-		VROverlayFlags_SideBySide_Crossed = 11, // Texture is crossed and right/left
-
-		VROverlayFlags_Panorama = 12, // Texture is a panorama
-		VROverlayFlags_StereoPanorama = 13, // Texture is a stereo panorama
-
-		// If this is set on an overlay owned by the scene application that overlay
-		// will be sorted with the "Other" overlays on top of all other scene overlays
-		VROverlayFlags_SortWithNonSceneOverlays = 14,
-
-		// If set, the overlay will be shown in the dashboard, otherwise it will be hidden.
-		VROverlayFlags_VisibleInDashboard = 15,
-	};
-
-	enum VRMessageOverlayResponse
-	{
-		VRMessageOverlayResponse_ButtonPress_0 = 0,
-		VRMessageOverlayResponse_ButtonPress_1 = 1,
-		VRMessageOverlayResponse_ButtonPress_2 = 2,
-		VRMessageOverlayResponse_ButtonPress_3 = 3,
-		VRMessageOverlayResponse_CouldntFindSystemOverlay = 4,
-		VRMessageOverlayResponse_CouldntFindOrCreateClientOverlay= 5,
-		VRMessageOverlayResponse_ApplicationQuit = 6
-	};
-
-	struct VROverlayIntersectionParams_t
-	{
-		HmdVector3_t vSource;
-		HmdVector3_t vDirection;
-		ETrackingUniverseOrigin eOrigin;
-	};
-
-	struct VROverlayIntersectionResults_t
-	{
-		HmdVector3_t vPoint;
-		HmdVector3_t vNormal;
-		HmdVector2_t vUVs;
-		float fDistance;
-	};
-
-	// Input modes for the Big Picture gamepad text entry
-	enum EGamepadTextInputMode
-	{
-		k_EGamepadTextInputModeNormal = 0,
-		k_EGamepadTextInputModePassword = 1,
-		k_EGamepadTextInputModeSubmit = 2,
-	};
-
-	// Controls number of allowed lines for the Big Picture gamepad text entry
-	enum EGamepadTextInputLineMode
-	{
-		k_EGamepadTextInputLineModeSingleLine = 0,
-		k_EGamepadTextInputLineModeMultipleLines = 1
-	};
-
-	/** Directions for changing focus between overlays with the gamepad */
-	enum EOverlayDirection
-	{
-		OverlayDirection_Up = 0,
-		OverlayDirection_Down = 1,
-		OverlayDirection_Left = 2,
-		OverlayDirection_Right = 3,
-		
-		OverlayDirection_Count = 4,
-	};
-
-	enum EVROverlayIntersectionMaskPrimitiveType
-	{
-		OverlayIntersectionPrimitiveType_Rectangle,
-		OverlayIntersectionPrimitiveType_Circle,
-	};
-
-	struct IntersectionMaskRectangle_t
-	{
-		float m_flTopLeftX;
-		float m_flTopLeftY;
-		float m_flWidth;
-		float m_flHeight;
-	};
-
-	struct IntersectionMaskCircle_t
-	{
-		float m_flCenterX;
-		float m_flCenterY;
-		float m_flRadius;
-	};
-
-	/** NOTE!!! If you change this you MUST manually update openvr_interop.cs.py and openvr_api_flat.h.py */
-	typedef union
-	{
-		IntersectionMaskRectangle_t m_Rectangle;
-		IntersectionMaskCircle_t m_Circle;
-	} VROverlayIntersectionMaskPrimitive_Data_t;
-
-	struct VROverlayIntersectionMaskPrimitive_t
-	{
-		EVROverlayIntersectionMaskPrimitiveType m_nPrimitiveType;
-		VROverlayIntersectionMaskPrimitive_Data_t m_Primitive;
-	};
-
-	class IVROverlay
-	{
-	public:
-
-		// ---------------------------------------------
-		// Overlay management methods
-		// ---------------------------------------------
-
-		/** Finds an existing overlay with the specified key. */
-		virtual EVROverlayError FindOverlay( const char *pchOverlayKey, VROverlayHandle_t * pOverlayHandle ) = 0;
-
-		/** Creates a new named overlay. All overlays start hidden and with default settings. */
-		virtual EVROverlayError CreateOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle ) = 0;
-
-		/** Destroys the specified overlay. When an application calls VR_Shutdown all overlays created by that app are
-		* automatically destroyed. */
-		virtual EVROverlayError DestroyOverlay( VROverlayHandle_t ulOverlayHandle ) = 0;
-
-		/** Specify which overlay to use the high quality render path.  This overlay will be composited in during the distortion pass which
-		* results in it drawing on top of everything else, but also at a higher quality as it samples the source texture directly rather than
-		* rasterizing into each eye's render texture first.  Because if this, only one of these is supported at any given time.  It is most useful
-		* for overlays that are expected to take up most of the user's view (e.g. streaming video).
-		* This mode does not support mouse input to your overlay. */
-		virtual EVROverlayError SetHighQualityOverlay( VROverlayHandle_t ulOverlayHandle ) = 0;
-
-		/** Returns the overlay handle of the current overlay being rendered using the single high quality overlay render path.
-		* Otherwise it will return k_ulOverlayHandleInvalid. */
-		virtual vr::VROverlayHandle_t GetHighQualityOverlay() = 0;
-
-		/** Fills the provided buffer with the string key of the overlay. Returns the size of buffer required to store the key, including
-		* the terminating null character. k_unVROverlayMaxKeyLength will be enough bytes to fit the string. */
-		virtual uint32_t GetOverlayKey( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, EVROverlayError *pError = 0L ) = 0;
-
-		/** Fills the provided buffer with the friendly name of the overlay. Returns the size of buffer required to store the key, including
-		* the terminating null character. k_unVROverlayMaxNameLength will be enough bytes to fit the string. */
-		virtual uint32_t GetOverlayName( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, EVROverlayError *pError = 0L ) = 0;
-
-		/** Gets the raw image data from an overlay. Overlay image data is always returned as RGBA data, 4 bytes per pixel. If the buffer is not large enough, width and height 
-		* will be set and VROverlayError_ArrayTooSmall is returned. */
-		virtual EVROverlayError GetOverlayImageData( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unBufferSize, uint32_t *punWidth, uint32_t *punHeight ) = 0;
-
-		/** returns a string that corresponds with the specified overlay error. The string will be the name 
-		* of the error enum value for all valid error codes */
-		virtual const char *GetOverlayErrorNameFromEnum( EVROverlayError error ) = 0;
-
-
-		// ---------------------------------------------
-		// Overlay rendering methods
-		// ---------------------------------------------
-
-		/** Sets the pid that is allowed to render to this overlay (the creator pid is always allow to render),
-		*	by default this is the pid of the process that made the overlay */
-		virtual EVROverlayError SetOverlayRenderingPid( VROverlayHandle_t ulOverlayHandle, uint32_t unPID ) = 0;
-
-		/** Gets the pid that is allowed to render to this overlay */
-		virtual uint32_t GetOverlayRenderingPid( VROverlayHandle_t ulOverlayHandle ) = 0;
-
-		/** Specify flag setting for a given overlay */
-		virtual EVROverlayError SetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled ) = 0;
-
-		/** Sets flag setting for a given overlay */
-		virtual EVROverlayError GetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool *pbEnabled ) = 0;
-
-		/** Sets the color tint of the overlay quad. Use 0.0 to 1.0 per channel. */
-		virtual EVROverlayError SetOverlayColor( VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue ) = 0;
-
-		/** Gets the color tint of the overlay quad. */
-		virtual EVROverlayError GetOverlayColor( VROverlayHandle_t ulOverlayHandle, float *pfRed, float *pfGreen, float *pfBlue ) = 0;
-
-		/** Sets the alpha of the overlay quad. Use 1.0 for 100 percent opacity to 0.0 for 0 percent opacity. */
-		virtual EVROverlayError SetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float fAlpha ) = 0;
-
-		/** Gets the alpha of the overlay quad. By default overlays are rendering at 100 percent alpha (1.0). */
-		virtual EVROverlayError GetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float *pfAlpha ) = 0;
-
-		/** Sets the aspect ratio of the texels in the overlay. 1.0 means the texels are square. 2.0 means the texels
-		* are twice as wide as they are tall. Defaults to 1.0. */
-		virtual EVROverlayError SetOverlayTexelAspect( VROverlayHandle_t ulOverlayHandle, float fTexelAspect ) = 0;
-
-		/** Gets the aspect ratio of the texels in the overlay. Defaults to 1.0 */
-		virtual EVROverlayError GetOverlayTexelAspect( VROverlayHandle_t ulOverlayHandle, float *pfTexelAspect ) = 0;
-
-		/** Sets the rendering sort order for the overlay. Overlays are rendered this order:
-		*      Overlays owned by the scene application
-		*      Overlays owned by some other application
-		*
-		*	Within a category overlays are rendered lowest sort order to highest sort order. Overlays with the same 
-		*	sort order are rendered back to front base on distance from the HMD.
-		*
-		*	Sort order defaults to 0. */
-		virtual EVROverlayError SetOverlaySortOrder( VROverlayHandle_t ulOverlayHandle, uint32_t unSortOrder ) = 0;
-
-		/** Gets the sort order of the overlay. See SetOverlaySortOrder for how this works. */
-		virtual EVROverlayError GetOverlaySortOrder( VROverlayHandle_t ulOverlayHandle, uint32_t *punSortOrder ) = 0;
-
-		/** Sets the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */
-		virtual EVROverlayError SetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float fWidthInMeters ) = 0;
-
-		/** Returns the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */
-		virtual EVROverlayError GetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float *pfWidthInMeters ) = 0;
-
-		/** For high-quality curved overlays only, sets the distance range in meters from the overlay used to automatically curve
-		* the surface around the viewer.  Min is distance is when the surface will be most curved.  Max is when least curved. */
-		virtual EVROverlayError SetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters ) = 0;
-
-		/** For high-quality curved overlays only, gets the distance range in meters from the overlay used to automatically curve
-		* the surface around the viewer.  Min is distance is when the surface will be most curved.  Max is when least curved. */
-		virtual EVROverlayError GetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float *pfMinDistanceInMeters, float *pfMaxDistanceInMeters ) = 0;
-
-		/** Sets the colorspace the overlay texture's data is in.  Defaults to 'auto'.
-		* If the texture needs to be resolved, you should call SetOverlayTexture with the appropriate colorspace instead. */
-		virtual EVROverlayError SetOverlayTextureColorSpace( VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace ) = 0;
-
-		/** Gets the overlay's current colorspace setting. */
-		virtual EVROverlayError GetOverlayTextureColorSpace( VROverlayHandle_t ulOverlayHandle, EColorSpace *peTextureColorSpace ) = 0;
-
-		/** Sets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */
-		virtual EVROverlayError SetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, const VRTextureBounds_t *pOverlayTextureBounds ) = 0;
-
-		/** Gets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */
-		virtual EVROverlayError GetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t *pOverlayTextureBounds ) = 0;
-
-		/** Returns the transform type of this overlay. */
-		virtual EVROverlayError GetOverlayTransformType( VROverlayHandle_t ulOverlayHandle, VROverlayTransformType *peTransformType ) = 0;
-
-		/** Sets the transform to absolute tracking origin. */
-		virtual EVROverlayError SetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0;
-
-		/** Gets the transform if it is absolute. Returns an error if the transform is some other type. */
-		virtual EVROverlayError GetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin *peTrackingOrigin, HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) = 0;
-
-		/** Sets the transform to relative to the transform of the specified tracked device. */
-		virtual EVROverlayError SetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, const HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0;
-
-		/** Gets the transform if it is relative to a tracked device. Returns an error if the transform is some other type. */
-		virtual EVROverlayError GetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punTrackedDevice, HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) = 0;
-
-		/** Sets the transform to draw the overlay on a rendermodel component mesh instead of a quad. This will only draw when the system is
-		* drawing the device. Overlays with this transform type cannot receive mouse events. */
-		virtual EVROverlayError SetOverlayTransformTrackedDeviceComponent( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, const char *pchComponentName ) = 0;
-
-		/** Gets the transform information when the overlay is rendering on a component. */
-		virtual EVROverlayError GetOverlayTransformTrackedDeviceComponent( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punDeviceIndex, char *pchComponentName, uint32_t unComponentNameSize ) = 0;
-
-		/** Shows the VR overlay.  For dashboard overlays, only the Dashboard Manager is allowed to call this. */
-		virtual EVROverlayError ShowOverlay( VROverlayHandle_t ulOverlayHandle ) = 0;
-
-		/** Hides the VR overlay.  For dashboard overlays, only the Dashboard Manager is allowed to call this. */
-		virtual EVROverlayError HideOverlay( VROverlayHandle_t ulOverlayHandle ) = 0;
-
-		/** Returns true if the overlay is visible. */
-		virtual bool IsOverlayVisible( VROverlayHandle_t ulOverlayHandle ) = 0;
-
-		/** Get the transform in 3d space associated with a specific 2d point in the overlay's coordinate space (where 0,0 is the lower left). -Z points out of the overlay */
-		virtual EVROverlayError GetTransformForOverlayCoordinates( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t *pmatTransform ) = 0;
-
-		// ---------------------------------------------
-		// Overlay input methods
-		// ---------------------------------------------
-
-		/** Returns true and fills the event with the next event on the overlay's event queue, if there is one. 
-		* If there are no events this method returns false. uncbVREvent should be the size in bytes of the VREvent_t struct */
-		virtual bool PollNextOverlayEvent( VROverlayHandle_t ulOverlayHandle, VREvent_t *pEvent, uint32_t uncbVREvent ) = 0;
-
-		/** Returns the current input settings for the specified overlay. */
-		virtual EVROverlayError GetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod *peInputMethod ) = 0;
-
-		/** Sets the input settings for the specified overlay. */
-		virtual EVROverlayError SetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod ) = 0;
-
-		/** Gets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is
-		* typically the size of the underlying UI in pixels. */
-		virtual EVROverlayError GetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, HmdVector2_t *pvecMouseScale ) = 0;
-
-		/** Sets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is
-		* typically the size of the underlying UI in pixels (not in world space). */
-		virtual EVROverlayError SetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, const HmdVector2_t *pvecMouseScale ) = 0;
-
-		/** Computes the overlay-space pixel coordinates of where the ray intersects the overlay with the
-		* specified settings. Returns false if there is no intersection. */
-		virtual bool ComputeOverlayIntersection( VROverlayHandle_t ulOverlayHandle, const VROverlayIntersectionParams_t *pParams, VROverlayIntersectionResults_t *pResults ) = 0;
-
-		/** Processes mouse input from the specified controller as though it were a mouse pointed at a compositor overlay with the
-		* specified settings. The controller is treated like a laser pointer on the -z axis. The point where the laser pointer would
-		* intersect with the overlay is the mouse position, the trigger is left mouse, and the track pad is right mouse. 
-		*
-		* Return true if the controller is pointed at the overlay and an event was generated. */
-		virtual bool HandleControllerOverlayInteractionAsMouse( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex ) = 0;
-
-		/** Returns true if the specified overlay is the hover target. An overlay is the hover target when it is the last overlay "moused over" 
-		* by the virtual mouse pointer */
-		virtual bool IsHoverTargetOverlay( VROverlayHandle_t ulOverlayHandle ) = 0;
-
-		/** Returns the current Gamepad focus overlay */
-		virtual vr::VROverlayHandle_t GetGamepadFocusOverlay() = 0;
-
-		/** Sets the current Gamepad focus overlay */
-		virtual EVROverlayError SetGamepadFocusOverlay( VROverlayHandle_t ulNewFocusOverlay ) = 0;
-
-		/** Sets an overlay's neighbor. This will also set the neighbor of the "to" overlay
-		* to point back to the "from" overlay. If an overlay's neighbor is set to invalid both
-		* ends will be cleared */
-		virtual EVROverlayError SetOverlayNeighbor( EOverlayDirection eDirection, VROverlayHandle_t ulFrom, VROverlayHandle_t ulTo ) = 0;
-
-		/** Changes the Gamepad focus from one overlay to one of its neighbors. Returns VROverlayError_NoNeighbor if there is no
-		* neighbor in that direction */
-		virtual EVROverlayError MoveGamepadFocusToNeighbor( EOverlayDirection eDirection, VROverlayHandle_t ulFrom ) = 0;
-
-		// ---------------------------------------------
-		// Overlay texture methods
-		// ---------------------------------------------
-
-		/** Texture to draw for the overlay. This function can only be called by the overlay's creator or renderer process (see SetOverlayRenderingPid) .
-		*
-		* OpenGL dirty state:
-		*	glBindTexture
-		*/
-		virtual EVROverlayError SetOverlayTexture( VROverlayHandle_t ulOverlayHandle, const Texture_t *pTexture ) = 0;
-
-		/** Use this to tell the overlay system to release the texture set for this overlay. */
-		virtual EVROverlayError ClearOverlayTexture( VROverlayHandle_t ulOverlayHandle ) = 0;
-
-		/** Separate interface for providing the data as a stream of bytes, but there is an upper bound on data 
-		* that can be sent. This function can only be called by the overlay's renderer process. */
-		virtual EVROverlayError SetOverlayRaw( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth ) = 0;
-
-		/** Separate interface for providing the image through a filename: can be png or jpg, and should not be bigger than 1920x1080.
-		* This function can only be called by the overlay's renderer process */
-		virtual EVROverlayError SetOverlayFromFile( VROverlayHandle_t ulOverlayHandle, const char *pchFilePath ) = 0;
-
-		/** Get the native texture handle/device for an overlay you have created.
-		* On windows this handle will be a ID3D11ShaderResourceView with a ID3D11Texture2D bound.
-		*
-		* The texture will always be sized to match the backing texture you supplied in SetOverlayTexture above.
-		*
-		* You MUST call ReleaseNativeOverlayHandle() with pNativeTextureHandle once you are done with this texture.
-		*
-		* pNativeTextureHandle is an OUTPUT, it will be a pointer to a ID3D11ShaderResourceView *.
-		* pNativeTextureRef is an INPUT and should be a ID3D11Resource *. The device used by pNativeTextureRef will be used to bind pNativeTextureHandle.
-		*/
-		virtual EVROverlayError GetOverlayTexture( VROverlayHandle_t ulOverlayHandle, void **pNativeTextureHandle, void *pNativeTextureRef, uint32_t *pWidth, uint32_t *pHeight, uint32_t *pNativeFormat, ETextureType *pAPIType, EColorSpace *pColorSpace, VRTextureBounds_t *pTextureBounds ) = 0;
-
-		/** Release the pNativeTextureHandle provided from the GetOverlayTexture call, this allows the system to free the underlying GPU resources for this object,
-		* so only do it once you stop rendering this texture.
-		*/
-		virtual EVROverlayError ReleaseNativeOverlayHandle( VROverlayHandle_t ulOverlayHandle, void *pNativeTextureHandle ) = 0;
-
-		/** Get the size of the overlay texture */
-		virtual EVROverlayError GetOverlayTextureSize( VROverlayHandle_t ulOverlayHandle, uint32_t *pWidth, uint32_t *pHeight ) = 0;
-
-		// ----------------------------------------------
-		// Dashboard Overlay Methods
-		// ----------------------------------------------
-
-		/** Creates a dashboard overlay and returns its handle */
-		virtual EVROverlayError CreateDashboardOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t *pThumbnailHandle ) = 0;
-
-		/** Returns true if the dashboard is visible */
-		virtual bool IsDashboardVisible() = 0;
-
-		/** returns true if the dashboard is visible and the specified overlay is the active system Overlay */
-		virtual bool IsActiveDashboardOverlay( VROverlayHandle_t ulOverlayHandle ) = 0;
-
-		/** Sets the dashboard overlay to only appear when the specified process ID has scene focus */
-		virtual EVROverlayError SetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId ) = 0;
-
-		/** Gets the process ID that this dashboard overlay requires to have scene focus */
-		virtual EVROverlayError GetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t *punProcessId ) = 0;
-
-		/** Shows the dashboard. */
-		virtual void ShowDashboard( const char *pchOverlayToShow ) = 0;
-
-		/** Returns the tracked device that has the laser pointer in the dashboard */
-		virtual vr::TrackedDeviceIndex_t GetPrimaryDashboardDevice() = 0;
-
-		// ---------------------------------------------
-		// Keyboard methods
-		// ---------------------------------------------
-		
-		/** Show the virtual keyboard to accept input **/
-		virtual EVROverlayError ShowKeyboard( EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, bool bUseMinimalMode, uint64_t uUserValue ) = 0;
-
-		virtual EVROverlayError ShowKeyboardForOverlay( VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, bool bUseMinimalMode, uint64_t uUserValue ) = 0;
-
-		/** Get the text that was entered into the text input **/
-		virtual uint32_t GetKeyboardText( VR_OUT_STRING() char *pchText, uint32_t cchText ) = 0;
-
-		/** Hide the virtual keyboard **/
-		virtual void HideKeyboard() = 0;
-
-		/** Set the position of the keyboard in world space **/
-		virtual void SetKeyboardTransformAbsolute( ETrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToKeyboardTransform ) = 0;
-
-		/** Set the position of the keyboard in overlay space by telling it to avoid a rectangle in the overlay. Rectangle coords have (0,0) in the bottom left **/
-		virtual void SetKeyboardPositionForOverlay( VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect ) = 0;
-
-		// ---------------------------------------------
-		// Overlay input methods
-		// ---------------------------------------------
-
-		/** Sets a list of primitives to be used for controller ray intersection
-		* typically the size of the underlying UI in pixels (not in world space). */
-		virtual EVROverlayError SetOverlayIntersectionMask( VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionMaskPrimitive_t *pMaskPrimitives, uint32_t unNumMaskPrimitives, uint32_t unPrimitiveSize = sizeof( VROverlayIntersectionMaskPrimitive_t ) ) = 0;
-
-		virtual EVROverlayError GetOverlayFlags( VROverlayHandle_t ulOverlayHandle, uint32_t *pFlags ) = 0;
-
-		// ---------------------------------------------
-		// Message box methods
-		// ---------------------------------------------
-
-		/** Show the message overlay. This will block and return you a result. **/
-		virtual VRMessageOverlayResponse ShowMessageOverlay( const char* pchText, const char* pchCaption, const char* pchButton0Text, const char* pchButton1Text = nullptr, const char* pchButton2Text = nullptr, const char* pchButton3Text = nullptr ) = 0;
-	};
-
-	static const char * const IVROverlay_Version = "IVROverlay_014";
-
-} // namespace vr
-
-// ivrrendermodels.h
-namespace vr
-{
-
-static const char * const k_pch_Controller_Component_GDC2015 = "gdc2015";   // Canonical coordinate system of the gdc 2015 wired controller, provided for backwards compatibility
-static const char * const k_pch_Controller_Component_Base = "base";         // For controllers with an unambiguous 'base'.
-static const char * const k_pch_Controller_Component_Tip = "tip";           // For controllers with an unambiguous 'tip' (used for 'laser-pointing')
-static const char * const k_pch_Controller_Component_HandGrip = "handgrip"; // Neutral, ambidextrous hand-pose when holding controller. On plane between neutrally posed index finger and thumb
-static const char * const k_pch_Controller_Component_Status = "status";		// 1:1 aspect ratio status area, with canonical [0,1] uv mapping
-
-#if defined(__linux__) || defined(__APPLE__) 
-// The 32-bit version of gcc has the alignment requirement for uint64 and double set to
-// 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned.
-// The 64-bit version of gcc has the alignment requirement for these types set to
-// 8 meaning that unless we use #pragma pack(4) our structures will get bigger.
-// The 64-bit structure packing has to match the 32-bit structure packing for each platform.
-#pragma pack( push, 4 )
-#else
-#pragma pack( push, 8 )
-#endif
-
-/** Errors that can occur with the VR compositor */
-enum EVRRenderModelError
-{
-	VRRenderModelError_None = 0,
-	VRRenderModelError_Loading = 100,
-	VRRenderModelError_NotSupported = 200,
-	VRRenderModelError_InvalidArg = 300,
-	VRRenderModelError_InvalidModel = 301,
-	VRRenderModelError_NoShapes = 302,
-	VRRenderModelError_MultipleShapes = 303,
-	VRRenderModelError_TooManyVertices = 304,
-	VRRenderModelError_MultipleTextures = 305,
-	VRRenderModelError_BufferTooSmall = 306,
-	VRRenderModelError_NotEnoughNormals = 307,
-	VRRenderModelError_NotEnoughTexCoords = 308,
-
-	VRRenderModelError_InvalidTexture = 400,
-};
-
-typedef uint32_t VRComponentProperties;
-
-enum EVRComponentProperty
-{
-	VRComponentProperty_IsStatic = (1 << 0),
-	VRComponentProperty_IsVisible = (1 << 1),
-	VRComponentProperty_IsTouched = (1 << 2),
-	VRComponentProperty_IsPressed = (1 << 3),
-	VRComponentProperty_IsScrolled = (1 << 4),
-};
-
-/** Describes state information about a render-model component, including transforms and other dynamic properties */
-struct RenderModel_ComponentState_t
-{
-	HmdMatrix34_t mTrackingToComponentRenderModel;  // Transform required when drawing the component render model
-	HmdMatrix34_t mTrackingToComponentLocal;        // Transform available for attaching to a local component coordinate system (-Z out from surface )
-	VRComponentProperties uProperties;
-};
-
-/** A single vertex in a render model */
-struct RenderModel_Vertex_t
-{
-	HmdVector3_t vPosition;		// position in meters in device space
-	HmdVector3_t vNormal;
-	float rfTextureCoord[2];
-};
-
-/** A texture map for use on a render model */
-struct RenderModel_TextureMap_t
-{
-	uint16_t unWidth, unHeight; // width and height of the texture map in pixels
-	const uint8_t *rubTextureMapData;	// Map texture data. All textures are RGBA with 8 bits per channel per pixel. Data size is width * height * 4ub
-};
-
-/**  Session unique texture identifier. Rendermodels which share the same texture will have the same id.
-IDs <0 denote the texture is not present */
-
-typedef int32_t TextureID_t;
-
-const TextureID_t INVALID_TEXTURE_ID = -1;
-
-struct RenderModel_t
-{
-	const RenderModel_Vertex_t *rVertexData;	// Vertex data for the mesh
-	uint32_t unVertexCount;						// Number of vertices in the vertex data
-	const uint16_t *rIndexData;					// Indices into the vertex data for each triangle
-	uint32_t unTriangleCount;					// Number of triangles in the mesh. Index count is 3 * TriangleCount
-	TextureID_t diffuseTextureId;				// Session unique texture identifier. Rendermodels which share the same texture will have the same id. <0 == texture not present
-};
-
-struct RenderModel_ControllerMode_State_t
-{
-	bool bScrollWheelVisible; // is this controller currently set to be in a scroll wheel mode
-};
-
-#pragma pack( pop )
-
-class IVRRenderModels
-{
-public:
-
-	/** Loads and returns a render model for use in the application. pchRenderModelName should be a render model name
-	* from the Prop_RenderModelName_String property or an absolute path name to a render model on disk. 
-	*
-	* The resulting render model is valid until VR_Shutdown() is called or until FreeRenderModel() is called. When the 
-	* application is finished with the render model it should call FreeRenderModel() to free the memory associated
-	* with the model.
-	*
-	* The method returns VRRenderModelError_Loading while the render model is still being loaded.
-	* The method returns VRRenderModelError_None once loaded successfully, otherwise will return an error. */
-	virtual EVRRenderModelError LoadRenderModel_Async( const char *pchRenderModelName, RenderModel_t **ppRenderModel ) = 0;
-
-	/** Frees a previously returned render model
-	*   It is safe to call this on a null ptr. */
-	virtual void FreeRenderModel( RenderModel_t *pRenderModel ) = 0;
-
-	/** Loads and returns a texture for use in the application. */
-	virtual EVRRenderModelError LoadTexture_Async( TextureID_t textureId, RenderModel_TextureMap_t **ppTexture ) = 0;
-
-	/** Frees a previously returned texture
-	*   It is safe to call this on a null ptr. */
-	virtual void FreeTexture( RenderModel_TextureMap_t *pTexture ) = 0;
-
-	/** Creates a D3D11 texture and loads data into it. */
-	virtual EVRRenderModelError LoadTextureD3D11_Async( TextureID_t textureId, void *pD3D11Device, void **ppD3D11Texture2D ) = 0;
-
-	/** Helper function to copy the bits into an existing texture. */
-	virtual EVRRenderModelError LoadIntoTextureD3D11_Async( TextureID_t textureId, void *pDstTexture ) = 0;
-
-	/** Use this to free textures created with LoadTextureD3D11_Async instead of calling Release on them. */
-	virtual void FreeTextureD3D11( void *pD3D11Texture2D ) = 0;
-
-	/** Use this to get the names of available render models.  Index does not correlate to a tracked device index, but
-	* is only used for iterating over all available render models.  If the index is out of range, this function will return 0.
-	* Otherwise, it will return the size of the buffer required for the name. */
-	virtual uint32_t GetRenderModelName( uint32_t unRenderModelIndex, VR_OUT_STRING() char *pchRenderModelName, uint32_t unRenderModelNameLen ) = 0;
-
-	/** Returns the number of available render models. */
-	virtual uint32_t GetRenderModelCount() = 0;
-
-
-	/** Returns the number of components of the specified render model.
-	*  Components are useful when client application wish to draw, label, or otherwise interact with components of tracked objects.
-	*  Examples controller components:
-	*   renderable things such as triggers, buttons
-	*   non-renderable things which include coordinate systems such as 'tip', 'base', a neutral controller agnostic hand-pose
-	*   If all controller components are enumerated and rendered, it will be equivalent to drawing the traditional render model
-	*   Returns 0 if components not supported, >0 otherwise */
-	virtual uint32_t GetComponentCount( const char *pchRenderModelName ) = 0;
-
-	/** Use this to get the names of available components.  Index does not correlate to a tracked device index, but
-	* is only used for iterating over all available components.  If the index is out of range, this function will return 0.
-	* Otherwise, it will return the size of the buffer required for the name. */
-	virtual uint32_t GetComponentName( const char *pchRenderModelName, uint32_t unComponentIndex, VR_OUT_STRING( ) char *pchComponentName, uint32_t unComponentNameLen ) = 0;
-
-	/** Get the button mask for all buttons associated with this component
-	*   If no buttons (or axes) are associated with this component, return 0
-	*   Note: multiple components may be associated with the same button. Ex: two grip buttons on a single controller.
-	*   Note: A single component may be associated with multiple buttons. Ex: A trackpad which also provides "D-pad" functionality */
-	virtual uint64_t GetComponentButtonMask( const char *pchRenderModelName, const char *pchComponentName ) = 0;
-
-	/** Use this to get the render model name for the specified rendermode/component combination, to be passed to LoadRenderModel.
-	* If the component name is out of range, this function will return 0.
-	* Otherwise, it will return the size of the buffer required for the name. */
-	virtual uint32_t GetComponentRenderModelName( const char *pchRenderModelName, const char *pchComponentName, VR_OUT_STRING( ) char *pchComponentRenderModelName, uint32_t unComponentRenderModelNameLen ) = 0;
-
-	/** Use this to query information about the component, as a function of the controller state.
-	*
-	* For dynamic controller components (ex: trigger) values will reflect component motions
-	* For static components this will return a consistent value independent of the VRControllerState_t
-	*
-	* If the pchRenderModelName or pchComponentName is invalid, this will return false (and transforms will be set to identity).
-	* Otherwise, return true
-	* Note: For dynamic objects, visibility may be dynamic. (I.e., true/false will be returned based on controller state and controller mode state ) */
-	virtual bool GetComponentState( const char *pchRenderModelName, const char *pchComponentName, const vr::VRControllerState_t *pControllerState, const RenderModel_ControllerMode_State_t *pState, RenderModel_ComponentState_t *pComponentState ) = 0;
-
-	/** Returns true if the render model has a component with the specified name */
-	virtual bool RenderModelHasComponent( const char *pchRenderModelName, const char *pchComponentName ) = 0;
-
-	/** Returns the URL of the thumbnail image for this rendermodel */
-	virtual uint32_t GetRenderModelThumbnailURL( const char *pchRenderModelName, VR_OUT_STRING() char *pchThumbnailURL, uint32_t unThumbnailURLLen, vr::EVRRenderModelError *peError ) = 0;
-
-	/** Provides a render model path that will load the unskinned model if the model name provided has been replace by the user. If the model
-	* hasn't been replaced the path value will still be a valid path to load the model. Pass this to LoadRenderModel_Async, etc. to load the
-	* model. */
-	virtual uint32_t GetRenderModelOriginalPath( const char *pchRenderModelName, VR_OUT_STRING() char *pchOriginalPath, uint32_t unOriginalPathLen, vr::EVRRenderModelError *peError ) = 0;
-
-	/** Returns a string for a render model error */
-	virtual const char *GetRenderModelErrorNameFromEnum( vr::EVRRenderModelError error ) = 0;
-};
-
-static const char * const IVRRenderModels_Version = "IVRRenderModels_005";
-
-}
-
-
-// ivrextendeddisplay.h
-namespace vr
-{
-
-	/** NOTE: Use of this interface is not recommended in production applications. It will not work for displays which use
-	* direct-to-display mode. Creating our own window is also incompatible with the VR compositor and is not available when the compositor is running. */
-	class IVRExtendedDisplay
-	{
-	public:
-
-		/** Size and position that the window needs to be on the VR display. */
-		virtual void GetWindowBounds( int32_t *pnX, int32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0;
-
-		/** Gets the viewport in the frame buffer to draw the output of the distortion into */
-		virtual void GetEyeOutputViewport( EVREye eEye, uint32_t *pnX, uint32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0;
-
-		/** [D3D10/11 Only]
-		* Returns the adapter index and output index that the user should pass into EnumAdapters and EnumOutputs
-		* to create the device and swap chain in DX10 and DX11. If an error occurs both indices will be set to -1.
-		*/
-		virtual void GetDXGIOutputInfo( int32_t *pnAdapterIndex, int32_t *pnAdapterOutputIndex ) = 0;
-
-	};
-
-	static const char * const IVRExtendedDisplay_Version = "IVRExtendedDisplay_001";
-
-}
-
-
-// ivrtrackedcamera.h
-namespace vr
-{
-
-class IVRTrackedCamera
-{
-public:
-	/** Returns a string for an error */
-	virtual const char *GetCameraErrorNameFromEnum( vr::EVRTrackedCameraError eCameraError ) = 0;
-
-	/** For convenience, same as tracked property request Prop_HasCamera_Bool */
-	virtual vr::EVRTrackedCameraError HasCamera( vr::TrackedDeviceIndex_t nDeviceIndex, bool *pHasCamera ) = 0;
-
-	/** Gets size of the image frame. */
-	virtual vr::EVRTrackedCameraError GetCameraFrameSize( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, uint32_t *pnWidth, uint32_t *pnHeight, uint32_t *pnFrameBufferSize ) = 0;
-
-	virtual vr::EVRTrackedCameraError GetCameraIntrinsics( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, vr::HmdVector2_t *pFocalLength, vr::HmdVector2_t *pCenter ) = 0;
-
-	virtual vr::EVRTrackedCameraError GetCameraProjection( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, float flZNear, float flZFar, vr::HmdMatrix44_t *pProjection ) = 0;
-
-	/** Acquiring streaming service permits video streaming for the caller. Releasing hints the system that video services do not need to be maintained for this client.
-	* If the camera has not already been activated, a one time spin up may incur some auto exposure as well as initial streaming frame delays.
-	* The camera should be considered a global resource accessible for shared consumption but not exclusive to any caller.
-	* The camera may go inactive due to lack of active consumers or headset idleness. */
-	virtual vr::EVRTrackedCameraError AcquireVideoStreamingService( vr::TrackedDeviceIndex_t nDeviceIndex, vr::TrackedCameraHandle_t *pHandle ) = 0;
-	virtual vr::EVRTrackedCameraError ReleaseVideoStreamingService( vr::TrackedCameraHandle_t hTrackedCamera ) = 0;
-
-	/** Copies the image frame into a caller's provided buffer. The image data is currently provided as RGBA data, 4 bytes per pixel.
-	* A caller can provide null for the framebuffer or frameheader if not desired. Requesting the frame header first, followed by the frame buffer allows
-	* the caller to determine if the frame as advanced per the frame header sequence. 
-	* If there is no frame available yet, due to initial camera spinup or re-activation, the error will be VRTrackedCameraError_NoFrameAvailable.
-	* Ideally a caller should be polling at ~16ms intervals */
-	virtual vr::EVRTrackedCameraError GetVideoStreamFrameBuffer( vr::TrackedCameraHandle_t hTrackedCamera, vr::EVRTrackedCameraFrameType eFrameType, void *pFrameBuffer, uint32_t nFrameBufferSize, vr::CameraVideoStreamFrameHeader_t *pFrameHeader, uint32_t nFrameHeaderSize ) = 0;
-
-	/** Gets size of the image frame. */
-	virtual vr::EVRTrackedCameraError GetVideoStreamTextureSize( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, vr::VRTextureBounds_t *pTextureBounds, uint32_t *pnWidth, uint32_t *pnHeight ) = 0; 
-
-	/** Access a shared D3D11 texture for the specified tracked camera stream.
-	* The camera frame type VRTrackedCameraFrameType_Undistorted is not supported directly as a shared texture. It is an interior subregion of the shared texture VRTrackedCameraFrameType_MaximumUndistorted.
-	* Instead, use GetVideoStreamTextureSize() with VRTrackedCameraFrameType_Undistorted to determine the proper interior subregion bounds along with GetVideoStreamTextureD3D11() with
-	* VRTrackedCameraFrameType_MaximumUndistorted to provide the texture. The VRTrackedCameraFrameType_MaximumUndistorted will yield an image where the invalid regions are decoded
-	* by the alpha channel having a zero component. The valid regions all have a non-zero alpha component. The subregion as described by VRTrackedCameraFrameType_Undistorted 
-	* guarantees a rectangle where all pixels are valid. */
-	virtual vr::EVRTrackedCameraError GetVideoStreamTextureD3D11( vr::TrackedCameraHandle_t hTrackedCamera, vr::EVRTrackedCameraFrameType eFrameType, void *pD3D11DeviceOrResource, void **ppD3D11ShaderResourceView, vr::CameraVideoStreamFrameHeader_t *pFrameHeader, uint32_t nFrameHeaderSize ) = 0;
-
-	/** Access a shared GL texture for the specified tracked camera stream */
-	virtual vr::EVRTrackedCameraError GetVideoStreamTextureGL( vr::TrackedCameraHandle_t hTrackedCamera, vr::EVRTrackedCameraFrameType eFrameType, vr::glUInt_t *pglTextureId, vr::CameraVideoStreamFrameHeader_t *pFrameHeader, uint32_t nFrameHeaderSize ) = 0;
-	virtual vr::EVRTrackedCameraError ReleaseVideoStreamTextureGL( vr::TrackedCameraHandle_t hTrackedCamera, vr::glUInt_t glTextureId ) = 0;
-};
-
-static const char * const IVRTrackedCamera_Version = "IVRTrackedCamera_003";
-
-} // namespace vr
-
-
-// ivrscreenshots.h
-namespace vr
-{
-
-/** Errors that can occur with the VR compositor */
-enum EVRScreenshotError
-{
-	VRScreenshotError_None							= 0,
-	VRScreenshotError_RequestFailed					= 1,
-	VRScreenshotError_IncompatibleVersion			= 100,
-	VRScreenshotError_NotFound						= 101,
-	VRScreenshotError_BufferTooSmall				= 102,
-	VRScreenshotError_ScreenshotAlreadyInProgress	= 108,
-};
-
-/** Allows the application to generate screenshots */
-class IVRScreenshots
-{
-public:
-	/** Request a screenshot of the requested type.
-	 *  A request of the VRScreenshotType_Stereo type will always
-	 *  work. Other types will depend on the underlying application
-	 *  support.
-	 *  The first file name is for the preview image and should be a
-	 *  regular screenshot (ideally from the left eye). The second
-	 *  is the VR screenshot in the correct format. They should be
-	 *  in the same aspect ratio.  Formats per type:
-	 *  VRScreenshotType_Mono: the VR filename is ignored (can be
-	 *  nullptr), this is a normal flat single shot.
-	 *  VRScreenshotType_Stereo:  The VR image should be a
-	 *  side-by-side with the left eye image on the left.
-	 *  VRScreenshotType_Cubemap: The VR image should be six square
-	 *  images composited horizontally.
-	 *  VRScreenshotType_StereoPanorama: above/below with left eye
-	 *  panorama being the above image.  Image is typically square
-	 *  with the panorama being 2x horizontal.
-	 *  
-	 *  Note that the VR dashboard will call this function when
-	 *  the user presses the screenshot binding (currently System
-	 *  Button + Trigger).  If Steam is running, the destination
-	 *  file names will be in %TEMP% and will be copied into
-	 *  Steam's screenshot library for the running application
-	 *  once SubmitScreenshot() is called.
-	 *  If Steam is not running, the paths will be in the user's
-	 *  documents folder under Documents\SteamVR\Screenshots.
-	 *  Other VR applications can call this to initate a
-	 *  screenshot outside of user control.
-	 *  The destination file names do not need an extension,
-	 *  will be replaced with the correct one for the format
-	 *  which is currently .png. */
-	virtual vr::EVRScreenshotError RequestScreenshot( vr::ScreenshotHandle_t *pOutScreenshotHandle, vr::EVRScreenshotType type, const char *pchPreviewFilename, const char *pchVRFilename ) = 0;
-
-	/** Called by the running VR application to indicate that it
-	 *  wishes to be in charge of screenshots.  If the
-	 *  application does not call this, the Compositor will only
-	 *  support VRScreenshotType_Stereo screenshots that will be
-	 *  captured without notification to the running app.
-	 *  Once hooked your application will receive a
-	 *  VREvent_RequestScreenshot event when the user presses the
-	 *  buttons to take a screenshot. */
-	virtual vr::EVRScreenshotError HookScreenshot( VR_ARRAY_COUNT( numTypes ) const vr::EVRScreenshotType *pSupportedTypes, int numTypes ) = 0;
-
-	/** When your application receives a
-	 *  VREvent_RequestScreenshot event, call these functions to get
-	 *  the details of the screenshot request. */
-	virtual vr::EVRScreenshotType GetScreenshotPropertyType( vr::ScreenshotHandle_t screenshotHandle, vr::EVRScreenshotError *pError ) = 0;
-
-	/** Get the filename for the preview or vr image (see
-	 *  vr::EScreenshotPropertyFilenames).  The return value is
-	 *  the size of the string.   */
- 	virtual uint32_t GetScreenshotPropertyFilename( vr::ScreenshotHandle_t screenshotHandle, vr::EVRScreenshotPropertyFilenames filenameType, VR_OUT_STRING() char *pchFilename, uint32_t cchFilename, vr::EVRScreenshotError *pError ) = 0;
-
-	/** Call this if the application is taking the screen shot
-	 *  will take more than a few ms processing. This will result
-	 *  in an overlay being presented that shows a completion
-	 *  bar. */
-	virtual vr::EVRScreenshotError UpdateScreenshotProgress( vr::ScreenshotHandle_t screenshotHandle, float flProgress ) = 0;
-
-	/** Tells the compositor to take an internal screenshot of
-	 *  type VRScreenshotType_Stereo. It will take the current
-	 *  submitted scene textures of the running application and
-	 *  write them into the preview image and a side-by-side file
-	 *  for the VR image.
-	 *  This is similiar to request screenshot, but doesn't ever
-	 *  talk to the application, just takes the shot and submits. */
-	virtual vr::EVRScreenshotError TakeStereoScreenshot( vr::ScreenshotHandle_t *pOutScreenshotHandle, const char *pchPreviewFilename, const char *pchVRFilename ) = 0;
-
-	/** Submit the completed screenshot.  If Steam is running
-	 *  this will call into the Steam client and upload the
-	 *  screenshot to the screenshots section of the library for
-	 *  the running application.  If Steam is not running, this
-	 *  function will display a notification to the user that the
-	 *  screenshot was taken. The paths should be full paths with
-	 *  extensions.
-	 *  File paths should be absolute including
-	 *  exntensions.
-	 *  screenshotHandle can be k_unScreenshotHandleInvalid if this
-	 *  was a new shot taking by the app to be saved and not
-	 *  initiated by a user (achievement earned or something) */
-	virtual vr::EVRScreenshotError SubmitScreenshot( vr::ScreenshotHandle_t screenshotHandle, vr::EVRScreenshotType type, const char *pchSourcePreviewFilename, const char *pchSourceVRFilename ) = 0;
-};
-
-static const char * const IVRScreenshots_Version = "IVRScreenshots_001";
-
-} // namespace vr
-
-
-
-// ivrresources.h
-namespace vr
-{
-
-class IVRResources
-{
-public:
-
-	// ------------------------------------
-	// Shared Resource Methods
-	// ------------------------------------
-
-	/** Loads the specified resource into the provided buffer if large enough.
-	* Returns the size in bytes of the buffer required to hold the specified resource. */
-	virtual uint32_t LoadSharedResource( const char *pchResourceName, char *pchBuffer, uint32_t unBufferLen ) = 0;
-
-	/** Provides the full path to the specified resource. Resource names can include named directories for
-	* drivers and other things, and this resolves all of those and returns the actual physical path. 
-	* pchResourceTypeDirectory is the subdirectory of resources to look in. */
-	virtual uint32_t GetResourceFullPath( const char *pchResourceName, const char *pchResourceTypeDirectory, char *pchPathBuffer, uint32_t unBufferLen ) = 0;
-};
-
-static const char * const IVRResources_Version = "IVRResources_001";
-
-
-}// End
-
-#endif // _OPENVR_API
-
-
-namespace vr
-{
-	/** Finds the active installation of the VR API and initializes it. The provided path must be absolute
-	* or relative to the current working directory. These are the local install versions of the equivalent
-	* functions in steamvr.h and will work without a local Steam install.
-	*
-	* This path is to the "root" of the VR API install. That's the directory with
-	* the "drivers" directory and a platform (i.e. "win32") directory in it, not the directory with the DLL itself.
-	*/
-	inline IVRSystem *VR_Init( EVRInitError *peError, EVRApplicationType eApplicationType );
-
-	/** unloads vrclient.dll. Any interface pointers from the interface are
-	* invalid after this point */
-	inline void VR_Shutdown();
-
-	/** Returns true if there is an HMD attached. This check is as lightweight as possible and
-	* can be called outside of VR_Init/VR_Shutdown. It should be used when an application wants
-	* to know if initializing VR is a possibility but isn't ready to take that step yet.
-	*/
-	VR_INTERFACE bool VR_CALLTYPE VR_IsHmdPresent();
-
-	/** Returns true if the OpenVR runtime is installed. */
-	VR_INTERFACE bool VR_CALLTYPE VR_IsRuntimeInstalled();
-
-	/** Returns where the OpenVR runtime is installed. */
-	VR_INTERFACE const char *VR_CALLTYPE VR_RuntimePath();
-
-	/** Returns the name of the enum value for an EVRInitError. This function may be called outside of VR_Init()/VR_Shutdown(). */
-	VR_INTERFACE const char *VR_CALLTYPE VR_GetVRInitErrorAsSymbol( EVRInitError error );
-
-	/** Returns an english string for an EVRInitError. Applications should call VR_GetVRInitErrorAsSymbol instead and
-	* use that as a key to look up their own localized error message. This function may be called outside of VR_Init()/VR_Shutdown(). */
-	VR_INTERFACE const char *VR_CALLTYPE VR_GetVRInitErrorAsEnglishDescription( EVRInitError error );
-
-	/** Returns the interface of the specified version. This method must be called after VR_Init. The
-	* pointer returned is valid until VR_Shutdown is called.
-	*/
-	VR_INTERFACE void *VR_CALLTYPE VR_GetGenericInterface( const char *pchInterfaceVersion, EVRInitError *peError );
-
-	/** Returns whether the interface of the specified version exists.
-	*/
-	VR_INTERFACE bool VR_CALLTYPE VR_IsInterfaceVersionValid( const char *pchInterfaceVersion );
-
-	/** Returns a token that represents whether the VR interface handles need to be reloaded */
-	VR_INTERFACE uint32_t VR_CALLTYPE VR_GetInitToken();
-
-	// These typedefs allow old enum names from SDK 0.9.11 to be used in applications.
-	// They will go away in the future.
-	typedef EVRInitError HmdError;
-	typedef EVREye Hmd_Eye;
-	typedef EColorSpace ColorSpace;
-	typedef ETrackingResult HmdTrackingResult;
-	typedef ETrackedDeviceClass TrackedDeviceClass;
-	typedef ETrackingUniverseOrigin TrackingUniverseOrigin;
-	typedef ETrackedDeviceProperty TrackedDeviceProperty;
-	typedef ETrackedPropertyError TrackedPropertyError;
-	typedef EVRSubmitFlags VRSubmitFlags_t;
-	typedef EVRState VRState_t;
-	typedef ECollisionBoundsStyle CollisionBoundsStyle_t;
-	typedef EVROverlayError VROverlayError;
-	typedef EVRFirmwareError VRFirmwareError;
-	typedef EVRCompositorError VRCompositorError;
-	typedef EVRScreenshotError VRScreenshotsError;
-
-	inline uint32_t &VRToken()
-	{
-		static uint32_t token;
-		return token;
-	}
-
-	class COpenVRContext
-	{
-	public:
-		COpenVRContext() { Clear(); }
-		void Clear();
-
-		inline void CheckClear()
-		{
-			if ( VRToken() != VR_GetInitToken() )
-			{
-				Clear();
-				VRToken() = VR_GetInitToken();
-			}
-		}
-
-		IVRSystem *VRSystem()
-		{
-			CheckClear();
-			if ( m_pVRSystem == nullptr )
-			{
-				EVRInitError eError;
-				m_pVRSystem = ( IVRSystem * )VR_GetGenericInterface( IVRSystem_Version, &eError );
-			}
-			return m_pVRSystem;
-		}
-		IVRChaperone *VRChaperone()
-		{
-			CheckClear();
-			if ( m_pVRChaperone == nullptr )
-			{
-				EVRInitError eError;
-				m_pVRChaperone = ( IVRChaperone * )VR_GetGenericInterface( IVRChaperone_Version, &eError );
-			}
-			return m_pVRChaperone;
-		}
-
-		IVRChaperoneSetup *VRChaperoneSetup()
-		{
-			CheckClear();
-			if ( m_pVRChaperoneSetup == nullptr )
-			{
-				EVRInitError eError;
-				m_pVRChaperoneSetup = ( IVRChaperoneSetup * )VR_GetGenericInterface( IVRChaperoneSetup_Version, &eError );
-			}
-			return m_pVRChaperoneSetup;
-		}
-
-		IVRCompositor *VRCompositor()
-		{
-			CheckClear();
-			if ( m_pVRCompositor == nullptr )
-			{
-				EVRInitError eError;
-				m_pVRCompositor = ( IVRCompositor * )VR_GetGenericInterface( IVRCompositor_Version, &eError );
-			}
-			return m_pVRCompositor;
-		}
-
-		IVROverlay *VROverlay()
-		{
-			CheckClear();
-			if ( m_pVROverlay == nullptr )
-			{
-				EVRInitError eError;
-				m_pVROverlay = ( IVROverlay * )VR_GetGenericInterface( IVROverlay_Version, &eError );
-			}
-			return m_pVROverlay;
-		}
-
-		IVRResources *VRResources()
-		{
-			CheckClear();
-			if ( m_pVRResources == nullptr )
-			{
-				EVRInitError eError;
-				m_pVRResources = (IVRResources *)VR_GetGenericInterface( IVRResources_Version, &eError );
-			}
-			return m_pVRResources;
-		}
-
-		IVRScreenshots *VRScreenshots()
-		{
-			CheckClear();
-			if ( m_pVRScreenshots == nullptr )
-			{
-				EVRInitError eError;
-				m_pVRScreenshots = ( IVRScreenshots * )VR_GetGenericInterface( IVRScreenshots_Version, &eError );
-			}
-			return m_pVRScreenshots;
-		}
-
-		IVRRenderModels *VRRenderModels()
-		{
-			CheckClear();
-			if ( m_pVRRenderModels == nullptr )
-			{
-				EVRInitError eError;
-				m_pVRRenderModels = ( IVRRenderModels * )VR_GetGenericInterface( IVRRenderModels_Version, &eError );
-			}
-			return m_pVRRenderModels;
-		}
-
-		IVRExtendedDisplay *VRExtendedDisplay()
-		{
-			CheckClear();
-			if ( m_pVRExtendedDisplay == nullptr )
-			{
-				EVRInitError eError;
-				m_pVRExtendedDisplay = ( IVRExtendedDisplay * )VR_GetGenericInterface( IVRExtendedDisplay_Version, &eError );
-			}
-			return m_pVRExtendedDisplay;
-		}
-
-		IVRSettings *VRSettings()
-		{
-			CheckClear();
-			if ( m_pVRSettings == nullptr )
-			{
-				EVRInitError eError;
-				m_pVRSettings = ( IVRSettings * )VR_GetGenericInterface( IVRSettings_Version, &eError );
-			}
-			return m_pVRSettings;
-		}
-
-		IVRApplications *VRApplications()
-		{
-			CheckClear();
-			if ( m_pVRApplications == nullptr )
-			{
-				EVRInitError eError;
-				m_pVRApplications = ( IVRApplications * )VR_GetGenericInterface( IVRApplications_Version, &eError );
-			}
-			return m_pVRApplications;
-		}
-
-		IVRTrackedCamera *VRTrackedCamera()
-		{
-			CheckClear();
-			if ( m_pVRTrackedCamera == nullptr )
-			{
-				EVRInitError eError;
-				m_pVRTrackedCamera = ( IVRTrackedCamera * )VR_GetGenericInterface( IVRTrackedCamera_Version, &eError );
-			}
-			return m_pVRTrackedCamera;
-		}
-
-	private:
-		IVRSystem			*m_pVRSystem;
-		IVRChaperone		*m_pVRChaperone;
-		IVRChaperoneSetup	*m_pVRChaperoneSetup;
-		IVRCompositor		*m_pVRCompositor;
-		IVROverlay			*m_pVROverlay;
-		IVRResources		*m_pVRResources;
-		IVRRenderModels		*m_pVRRenderModels;
-		IVRExtendedDisplay	*m_pVRExtendedDisplay;
-		IVRSettings			*m_pVRSettings;
-		IVRApplications		*m_pVRApplications;
-		IVRTrackedCamera	*m_pVRTrackedCamera;
-		IVRScreenshots		*m_pVRScreenshots;
-	};
-
-	inline COpenVRContext &OpenVRInternal_ModuleContext()
-	{
-		static void *ctx[ sizeof( COpenVRContext ) / sizeof( void * ) ];
-		return *( COpenVRContext * )ctx; // bypass zero-init constructor
-	}
-
-	inline IVRSystem *VR_CALLTYPE VRSystem() { return OpenVRInternal_ModuleContext().VRSystem(); }
-	inline IVRChaperone *VR_CALLTYPE VRChaperone() { return OpenVRInternal_ModuleContext().VRChaperone(); }
-	inline IVRChaperoneSetup *VR_CALLTYPE VRChaperoneSetup() { return OpenVRInternal_ModuleContext().VRChaperoneSetup(); }
-	inline IVRCompositor *VR_CALLTYPE VRCompositor() { return OpenVRInternal_ModuleContext().VRCompositor(); }
-	inline IVROverlay *VR_CALLTYPE VROverlay() { return OpenVRInternal_ModuleContext().VROverlay(); }
-	inline IVRScreenshots *VR_CALLTYPE VRScreenshots() { return OpenVRInternal_ModuleContext().VRScreenshots(); }
-	inline IVRRenderModels *VR_CALLTYPE VRRenderModels() { return OpenVRInternal_ModuleContext().VRRenderModels(); }
-	inline IVRApplications *VR_CALLTYPE VRApplications() { return OpenVRInternal_ModuleContext().VRApplications(); }
-	inline IVRSettings *VR_CALLTYPE VRSettings() { return OpenVRInternal_ModuleContext().VRSettings(); }
-	inline IVRResources *VR_CALLTYPE VRResources() { return OpenVRInternal_ModuleContext().VRResources(); }
-	inline IVRExtendedDisplay *VR_CALLTYPE VRExtendedDisplay() { return OpenVRInternal_ModuleContext().VRExtendedDisplay(); }
-	inline IVRTrackedCamera *VR_CALLTYPE VRTrackedCamera() { return OpenVRInternal_ModuleContext().VRTrackedCamera(); }
-
-	inline void COpenVRContext::Clear()
-	{
-		m_pVRSystem = nullptr;
-		m_pVRChaperone = nullptr;
-		m_pVRChaperoneSetup = nullptr;
-		m_pVRCompositor = nullptr;
-		m_pVROverlay = nullptr;
-		m_pVRRenderModels = nullptr;
-		m_pVRExtendedDisplay = nullptr;
-		m_pVRSettings = nullptr;
-		m_pVRApplications = nullptr;
-		m_pVRTrackedCamera = nullptr;
-		m_pVRResources = nullptr;
-		m_pVRScreenshots = nullptr;
-	}
-
-	VR_INTERFACE uint32_t VR_CALLTYPE VR_InitInternal( EVRInitError *peError, EVRApplicationType eApplicationType );
-	VR_INTERFACE void VR_CALLTYPE VR_ShutdownInternal();
-
-	/** Finds the active installation of vrclient.dll and initializes it */
-	inline IVRSystem *VR_Init( EVRInitError *peError, EVRApplicationType eApplicationType )
-	{
-		IVRSystem *pVRSystem = nullptr;
-
-		EVRInitError eError;
-		VRToken() = VR_InitInternal( &eError, eApplicationType );
-		COpenVRContext &ctx = OpenVRInternal_ModuleContext();
-		ctx.Clear();
-
-		if ( eError == VRInitError_None )
-		{
-			if ( VR_IsInterfaceVersionValid( IVRSystem_Version ) )
-			{
-				pVRSystem = VRSystem();
-			}
-			else
-			{
-				VR_ShutdownInternal();
-				eError = VRInitError_Init_InterfaceNotFound;
-			}
-		}
-
-		if ( peError )
-			*peError = eError;
-		return pVRSystem;
-	}
-
-	/** unloads vrclient.dll. Any interface pointers from the interface are
-	* invalid after this point */
-	inline void VR_Shutdown()
-	{
-		VR_ShutdownInternal();
-	}
-}

+ 0 - 1869
libraries/openvr/include/openvr_capi.h

@@ -1,1869 +0,0 @@
-//======= Copyright (c) Valve Corporation, All rights reserved. ===============
-//
-// Purpose: Header for flatted SteamAPI. Use this for binding to other languages.
-// This file is auto-generated, do not edit it.
-//
-//=============================================================================
-
-#ifndef __OPENVR_API_FLAT_H__
-#define __OPENVR_API_FLAT_H__
-#if defined( _WIN32 ) || defined( __clang__ )
-#pragma once
-#endif
-
-#ifdef __cplusplus
-#define EXTERN_C extern "C"
-#else
-#define EXTERN_C
-#endif
-
-#define OPENVR_FNTABLE_CALLTYPE __stdcall
-
-// OPENVR API export macro
-#if defined( _WIN32 ) && !defined( _X360 )
-	#if defined( OPENVR_API_EXPORTS )
-	#define S_API EXTERN_C __declspec( dllexport )
-	#elif defined( OPENVR_API_NODLL )
-	#define S_API EXTERN_C
-	#else
-	#define S_API extern "C" __declspec( dllimport ) 
-	#endif // OPENVR_API_EXPORTS
-#elif defined( __GNUC__ )
-	#if defined( OPENVR_API_EXPORTS )
-	#define S_API EXTERN_C __attribute__ ((visibility("default")))
-	#else
-	#define S_API EXTERN_C
-	#endif // OPENVR_API_EXPORTS
-#else // !WIN32
-	#if defined( OPENVR_API_EXPORTS )
-	#define S_API EXTERN_C
-	#else
-	#define S_API EXTERN_C
-	#endif // OPENVR_API_EXPORTS
-#endif
-
-#include <stdint.h>
-
-#if defined( __WIN32 )
-typedef char bool;
-#else
-#include <stdbool.h>
-#endif
-
-typedef uint64_t PropertyContainerHandle_t;
-typedef uint32_t PropertyTypeTag_t;
-
-
-// OpenVR Constants
-
-static const unsigned int k_unMaxDriverDebugResponseSize = 32768;
-static const unsigned int k_unTrackedDeviceIndex_Hmd = 0;
-static const unsigned int k_unMaxTrackedDeviceCount = 16;
-static const unsigned int k_unTrackedDeviceIndexOther = 4294967294;
-static const unsigned int k_unTrackedDeviceIndexInvalid = 4294967295;
-static const unsigned long k_ulInvalidPropertyContainer = 0;
-static const unsigned int k_unInvalidPropertyTag = 0;
-static const unsigned int k_unFloatPropertyTag = 1;
-static const unsigned int k_unInt32PropertyTag = 2;
-static const unsigned int k_unUint64PropertyTag = 3;
-static const unsigned int k_unBoolPropertyTag = 4;
-static const unsigned int k_unStringPropertyTag = 5;
-static const unsigned int k_unHmdMatrix34PropertyTag = 20;
-static const unsigned int k_unHmdMatrix44PropertyTag = 21;
-static const unsigned int k_unHmdVector3PropertyTag = 22;
-static const unsigned int k_unHmdVector4PropertyTag = 23;
-static const unsigned int k_unHiddenAreaPropertyTag = 30;
-static const unsigned int k_unOpenVRInternalReserved_Start = 1000;
-static const unsigned int k_unOpenVRInternalReserved_End = 10000;
-static const unsigned int k_unMaxPropertyStringSize = 32768;
-static const unsigned int k_unControllerStateAxisCount = 5;
-static const unsigned long k_ulOverlayHandleInvalid = 0;
-static const unsigned int k_unScreenshotHandleInvalid = 0;
-static const char * IVRSystem_Version = "IVRSystem_015";
-static const char * IVRExtendedDisplay_Version = "IVRExtendedDisplay_001";
-static const char * IVRTrackedCamera_Version = "IVRTrackedCamera_003";
-static const unsigned int k_unMaxApplicationKeyLength = 128;
-static const char * k_pch_MimeType_HomeApp = "vr/home";
-static const char * k_pch_MimeType_GameTheater = "vr/game_theater";
-static const char * IVRApplications_Version = "IVRApplications_006";
-static const char * IVRChaperone_Version = "IVRChaperone_003";
-static const char * IVRChaperoneSetup_Version = "IVRChaperoneSetup_005";
-static const char * IVRCompositor_Version = "IVRCompositor_020";
-static const unsigned int k_unVROverlayMaxKeyLength = 128;
-static const unsigned int k_unVROverlayMaxNameLength = 128;
-static const unsigned int k_unMaxOverlayCount = 64;
-static const unsigned int k_unMaxOverlayIntersectionMaskPrimitivesCount = 32;
-static const char * IVROverlay_Version = "IVROverlay_014";
-static const char * k_pch_Controller_Component_GDC2015 = "gdc2015";
-static const char * k_pch_Controller_Component_Base = "base";
-static const char * k_pch_Controller_Component_Tip = "tip";
-static const char * k_pch_Controller_Component_HandGrip = "handgrip";
-static const char * k_pch_Controller_Component_Status = "status";
-static const char * IVRRenderModels_Version = "IVRRenderModels_005";
-static const unsigned int k_unNotificationTextMaxSize = 256;
-static const char * IVRNotifications_Version = "IVRNotifications_002";
-static const unsigned int k_unMaxSettingsKeyLength = 128;
-static const char * IVRSettings_Version = "IVRSettings_002";
-static const char * k_pch_SteamVR_Section = "steamvr";
-static const char * k_pch_SteamVR_RequireHmd_String = "requireHmd";
-static const char * k_pch_SteamVR_ForcedDriverKey_String = "forcedDriver";
-static const char * k_pch_SteamVR_ForcedHmdKey_String = "forcedHmd";
-static const char * k_pch_SteamVR_DisplayDebug_Bool = "displayDebug";
-static const char * k_pch_SteamVR_DebugProcessPipe_String = "debugProcessPipe";
-static const char * k_pch_SteamVR_EnableDistortion_Bool = "enableDistortion";
-static const char * k_pch_SteamVR_DisplayDebugX_Int32 = "displayDebugX";
-static const char * k_pch_SteamVR_DisplayDebugY_Int32 = "displayDebugY";
-static const char * k_pch_SteamVR_SendSystemButtonToAllApps_Bool = "sendSystemButtonToAllApps";
-static const char * k_pch_SteamVR_LogLevel_Int32 = "loglevel";
-static const char * k_pch_SteamVR_IPD_Float = "ipd";
-static const char * k_pch_SteamVR_Background_String = "background";
-static const char * k_pch_SteamVR_BackgroundUseDomeProjection_Bool = "backgroundUseDomeProjection";
-static const char * k_pch_SteamVR_BackgroundCameraHeight_Float = "backgroundCameraHeight";
-static const char * k_pch_SteamVR_BackgroundDomeRadius_Float = "backgroundDomeRadius";
-static const char * k_pch_SteamVR_GridColor_String = "gridColor";
-static const char * k_pch_SteamVR_PlayAreaColor_String = "playAreaColor";
-static const char * k_pch_SteamVR_ShowStage_Bool = "showStage";
-static const char * k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers";
-static const char * k_pch_SteamVR_DirectMode_Bool = "directMode";
-static const char * k_pch_SteamVR_DirectModeEdidVid_Int32 = "directModeEdidVid";
-static const char * k_pch_SteamVR_DirectModeEdidPid_Int32 = "directModeEdidPid";
-static const char * k_pch_SteamVR_UsingSpeakers_Bool = "usingSpeakers";
-static const char * k_pch_SteamVR_SpeakersForwardYawOffsetDegrees_Float = "speakersForwardYawOffsetDegrees";
-static const char * k_pch_SteamVR_BaseStationPowerManagement_Bool = "basestationPowerManagement";
-static const char * k_pch_SteamVR_NeverKillProcesses_Bool = "neverKillProcesses";
-static const char * k_pch_SteamVR_RenderTargetMultiplier_Float = "renderTargetMultiplier";
-static const char * k_pch_SteamVR_AllowAsyncReprojection_Bool = "allowAsyncReprojection";
-static const char * k_pch_SteamVR_AllowReprojection_Bool = "allowInterleavedReprojection";
-static const char * k_pch_SteamVR_ForceReprojection_Bool = "forceReprojection";
-static const char * k_pch_SteamVR_ForceFadeOnBadTracking_Bool = "forceFadeOnBadTracking";
-static const char * k_pch_SteamVR_DefaultMirrorView_Int32 = "defaultMirrorView";
-static const char * k_pch_SteamVR_ShowMirrorView_Bool = "showMirrorView";
-static const char * k_pch_SteamVR_MirrorViewGeometry_String = "mirrorViewGeometry";
-static const char * k_pch_SteamVR_StartMonitorFromAppLaunch = "startMonitorFromAppLaunch";
-static const char * k_pch_SteamVR_StartCompositorFromAppLaunch_Bool = "startCompositorFromAppLaunch";
-static const char * k_pch_SteamVR_StartDashboardFromAppLaunch_Bool = "startDashboardFromAppLaunch";
-static const char * k_pch_SteamVR_StartOverlayAppsFromDashboard_Bool = "startOverlayAppsFromDashboard";
-static const char * k_pch_SteamVR_EnableHomeApp = "enableHomeApp";
-static const char * k_pch_SteamVR_SetInitialDefaultHomeApp = "setInitialDefaultHomeApp";
-static const char * k_pch_SteamVR_CycleBackgroundImageTimeSec_Int32 = "CycleBackgroundImageTimeSec";
-static const char * k_pch_SteamVR_RetailDemo_Bool = "retailDemo";
-static const char * k_pch_SteamVR_IpdOffset_Float = "ipdOffset";
-static const char * k_pch_Lighthouse_Section = "driver_lighthouse";
-static const char * k_pch_Lighthouse_DisableIMU_Bool = "disableimu";
-static const char * k_pch_Lighthouse_UseDisambiguation_String = "usedisambiguation";
-static const char * k_pch_Lighthouse_DisambiguationDebug_Int32 = "disambiguationdebug";
-static const char * k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation";
-static const char * k_pch_Lighthouse_DBHistory_Bool = "dbhistory";
-static const char * k_pch_Null_Section = "driver_null";
-static const char * k_pch_Null_SerialNumber_String = "serialNumber";
-static const char * k_pch_Null_ModelNumber_String = "modelNumber";
-static const char * k_pch_Null_WindowX_Int32 = "windowX";
-static const char * k_pch_Null_WindowY_Int32 = "windowY";
-static const char * k_pch_Null_WindowWidth_Int32 = "windowWidth";
-static const char * k_pch_Null_WindowHeight_Int32 = "windowHeight";
-static const char * k_pch_Null_RenderWidth_Int32 = "renderWidth";
-static const char * k_pch_Null_RenderHeight_Int32 = "renderHeight";
-static const char * k_pch_Null_SecondsFromVsyncToPhotons_Float = "secondsFromVsyncToPhotons";
-static const char * k_pch_Null_DisplayFrequency_Float = "displayFrequency";
-static const char * k_pch_UserInterface_Section = "userinterface";
-static const char * k_pch_UserInterface_StatusAlwaysOnTop_Bool = "StatusAlwaysOnTop";
-static const char * k_pch_UserInterface_MinimizeToTray_Bool = "MinimizeToTray";
-static const char * k_pch_UserInterface_Screenshots_Bool = "screenshots";
-static const char * k_pch_UserInterface_ScreenshotType_Int = "screenshotType";
-static const char * k_pch_Notifications_Section = "notifications";
-static const char * k_pch_Notifications_DoNotDisturb_Bool = "DoNotDisturb";
-static const char * k_pch_Keyboard_Section = "keyboard";
-static const char * k_pch_Keyboard_TutorialCompletions = "TutorialCompletions";
-static const char * k_pch_Keyboard_ScaleX = "ScaleX";
-static const char * k_pch_Keyboard_ScaleY = "ScaleY";
-static const char * k_pch_Keyboard_OffsetLeftX = "OffsetLeftX";
-static const char * k_pch_Keyboard_OffsetRightX = "OffsetRightX";
-static const char * k_pch_Keyboard_OffsetY = "OffsetY";
-static const char * k_pch_Keyboard_Smoothing = "Smoothing";
-static const char * k_pch_Perf_Section = "perfcheck";
-static const char * k_pch_Perf_HeuristicActive_Bool = "heuristicActive";
-static const char * k_pch_Perf_NotifyInHMD_Bool = "warnInHMD";
-static const char * k_pch_Perf_NotifyOnlyOnce_Bool = "warnOnlyOnce";
-static const char * k_pch_Perf_AllowTimingStore_Bool = "allowTimingStore";
-static const char * k_pch_Perf_SaveTimingsOnExit_Bool = "saveTimingsOnExit";
-static const char * k_pch_Perf_TestData_Float = "perfTestData";
-static const char * k_pch_CollisionBounds_Section = "collisionBounds";
-static const char * k_pch_CollisionBounds_Style_Int32 = "CollisionBoundsStyle";
-static const char * k_pch_CollisionBounds_GroundPerimeterOn_Bool = "CollisionBoundsGroundPerimeterOn";
-static const char * k_pch_CollisionBounds_CenterMarkerOn_Bool = "CollisionBoundsCenterMarkerOn";
-static const char * k_pch_CollisionBounds_PlaySpaceOn_Bool = "CollisionBoundsPlaySpaceOn";
-static const char * k_pch_CollisionBounds_FadeDistance_Float = "CollisionBoundsFadeDistance";
-static const char * k_pch_CollisionBounds_ColorGammaR_Int32 = "CollisionBoundsColorGammaR";
-static const char * k_pch_CollisionBounds_ColorGammaG_Int32 = "CollisionBoundsColorGammaG";
-static const char * k_pch_CollisionBounds_ColorGammaB_Int32 = "CollisionBoundsColorGammaB";
-static const char * k_pch_CollisionBounds_ColorGammaA_Int32 = "CollisionBoundsColorGammaA";
-static const char * k_pch_Camera_Section = "camera";
-static const char * k_pch_Camera_EnableCamera_Bool = "enableCamera";
-static const char * k_pch_Camera_EnableCameraInDashboard_Bool = "enableCameraInDashboard";
-static const char * k_pch_Camera_EnableCameraForCollisionBounds_Bool = "enableCameraForCollisionBounds";
-static const char * k_pch_Camera_EnableCameraForRoomView_Bool = "enableCameraForRoomView";
-static const char * k_pch_Camera_BoundsColorGammaR_Int32 = "cameraBoundsColorGammaR";
-static const char * k_pch_Camera_BoundsColorGammaG_Int32 = "cameraBoundsColorGammaG";
-static const char * k_pch_Camera_BoundsColorGammaB_Int32 = "cameraBoundsColorGammaB";
-static const char * k_pch_Camera_BoundsColorGammaA_Int32 = "cameraBoundsColorGammaA";
-static const char * k_pch_Camera_BoundsStrength_Int32 = "cameraBoundsStrength";
-static const char * k_pch_audio_Section = "audio";
-static const char * k_pch_audio_OnPlaybackDevice_String = "onPlaybackDevice";
-static const char * k_pch_audio_OnRecordDevice_String = "onRecordDevice";
-static const char * k_pch_audio_OnPlaybackMirrorDevice_String = "onPlaybackMirrorDevice";
-static const char * k_pch_audio_OffPlaybackDevice_String = "offPlaybackDevice";
-static const char * k_pch_audio_OffRecordDevice_String = "offRecordDevice";
-static const char * k_pch_audio_VIVEHDMIGain = "viveHDMIGain";
-static const char * k_pch_Power_Section = "power";
-static const char * k_pch_Power_PowerOffOnExit_Bool = "powerOffOnExit";
-static const char * k_pch_Power_TurnOffScreensTimeout_Float = "turnOffScreensTimeout";
-static const char * k_pch_Power_TurnOffControllersTimeout_Float = "turnOffControllersTimeout";
-static const char * k_pch_Power_ReturnToWatchdogTimeout_Float = "returnToWatchdogTimeout";
-static const char * k_pch_Power_AutoLaunchSteamVROnButtonPress = "autoLaunchSteamVROnButtonPress";
-static const char * k_pch_Dashboard_Section = "dashboard";
-static const char * k_pch_Dashboard_EnableDashboard_Bool = "enableDashboard";
-static const char * k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode";
-static const char * k_pch_modelskin_Section = "modelskins";
-static const char * k_pch_Driver_Enable_Bool = "enable";
-static const char * IVRScreenshots_Version = "IVRScreenshots_001";
-static const char * IVRResources_Version = "IVRResources_001";
-
-// OpenVR Enums
-
-typedef enum EVREye
-{
-	EVREye_Eye_Left = 0,
-	EVREye_Eye_Right = 1,
-} EVREye;
-
-typedef enum ETextureType
-{
-	ETextureType_TextureType_DirectX = 0,
-	ETextureType_TextureType_OpenGL = 1,
-	ETextureType_TextureType_Vulkan = 2,
-	ETextureType_TextureType_IOSurface = 3,
-	ETextureType_TextureType_DirectX12 = 4,
-} ETextureType;
-
-typedef enum EColorSpace
-{
-	EColorSpace_ColorSpace_Auto = 0,
-	EColorSpace_ColorSpace_Gamma = 1,
-	EColorSpace_ColorSpace_Linear = 2,
-} EColorSpace;
-
-typedef enum ETrackingResult
-{
-	ETrackingResult_TrackingResult_Uninitialized = 1,
-	ETrackingResult_TrackingResult_Calibrating_InProgress = 100,
-	ETrackingResult_TrackingResult_Calibrating_OutOfRange = 101,
-	ETrackingResult_TrackingResult_Running_OK = 200,
-	ETrackingResult_TrackingResult_Running_OutOfRange = 201,
-} ETrackingResult;
-
-typedef enum ETrackedDeviceClass
-{
-	ETrackedDeviceClass_TrackedDeviceClass_Invalid = 0,
-	ETrackedDeviceClass_TrackedDeviceClass_HMD = 1,
-	ETrackedDeviceClass_TrackedDeviceClass_Controller = 2,
-	ETrackedDeviceClass_TrackedDeviceClass_GenericTracker = 3,
-	ETrackedDeviceClass_TrackedDeviceClass_TrackingReference = 4,
-} ETrackedDeviceClass;
-
-typedef enum ETrackedControllerRole
-{
-	ETrackedControllerRole_TrackedControllerRole_Invalid = 0,
-	ETrackedControllerRole_TrackedControllerRole_LeftHand = 1,
-	ETrackedControllerRole_TrackedControllerRole_RightHand = 2,
-} ETrackedControllerRole;
-
-typedef enum ETrackingUniverseOrigin
-{
-	ETrackingUniverseOrigin_TrackingUniverseSeated = 0,
-	ETrackingUniverseOrigin_TrackingUniverseStanding = 1,
-	ETrackingUniverseOrigin_TrackingUniverseRawAndUncalibrated = 2,
-} ETrackingUniverseOrigin;
-
-typedef enum ETrackedDeviceProperty
-{
-	ETrackedDeviceProperty_Prop_Invalid = 0,
-	ETrackedDeviceProperty_Prop_TrackingSystemName_String = 1000,
-	ETrackedDeviceProperty_Prop_ModelNumber_String = 1001,
-	ETrackedDeviceProperty_Prop_SerialNumber_String = 1002,
-	ETrackedDeviceProperty_Prop_RenderModelName_String = 1003,
-	ETrackedDeviceProperty_Prop_WillDriftInYaw_Bool = 1004,
-	ETrackedDeviceProperty_Prop_ManufacturerName_String = 1005,
-	ETrackedDeviceProperty_Prop_TrackingFirmwareVersion_String = 1006,
-	ETrackedDeviceProperty_Prop_HardwareRevision_String = 1007,
-	ETrackedDeviceProperty_Prop_AllWirelessDongleDescriptions_String = 1008,
-	ETrackedDeviceProperty_Prop_ConnectedWirelessDongle_String = 1009,
-	ETrackedDeviceProperty_Prop_DeviceIsWireless_Bool = 1010,
-	ETrackedDeviceProperty_Prop_DeviceIsCharging_Bool = 1011,
-	ETrackedDeviceProperty_Prop_DeviceBatteryPercentage_Float = 1012,
-	ETrackedDeviceProperty_Prop_StatusDisplayTransform_Matrix34 = 1013,
-	ETrackedDeviceProperty_Prop_Firmware_UpdateAvailable_Bool = 1014,
-	ETrackedDeviceProperty_Prop_Firmware_ManualUpdate_Bool = 1015,
-	ETrackedDeviceProperty_Prop_Firmware_ManualUpdateURL_String = 1016,
-	ETrackedDeviceProperty_Prop_HardwareRevision_Uint64 = 1017,
-	ETrackedDeviceProperty_Prop_FirmwareVersion_Uint64 = 1018,
-	ETrackedDeviceProperty_Prop_FPGAVersion_Uint64 = 1019,
-	ETrackedDeviceProperty_Prop_VRCVersion_Uint64 = 1020,
-	ETrackedDeviceProperty_Prop_RadioVersion_Uint64 = 1021,
-	ETrackedDeviceProperty_Prop_DongleVersion_Uint64 = 1022,
-	ETrackedDeviceProperty_Prop_BlockServerShutdown_Bool = 1023,
-	ETrackedDeviceProperty_Prop_CanUnifyCoordinateSystemWithHmd_Bool = 1024,
-	ETrackedDeviceProperty_Prop_ContainsProximitySensor_Bool = 1025,
-	ETrackedDeviceProperty_Prop_DeviceProvidesBatteryStatus_Bool = 1026,
-	ETrackedDeviceProperty_Prop_DeviceCanPowerOff_Bool = 1027,
-	ETrackedDeviceProperty_Prop_Firmware_ProgrammingTarget_String = 1028,
-	ETrackedDeviceProperty_Prop_DeviceClass_Int32 = 1029,
-	ETrackedDeviceProperty_Prop_HasCamera_Bool = 1030,
-	ETrackedDeviceProperty_Prop_DriverVersion_String = 1031,
-	ETrackedDeviceProperty_Prop_Firmware_ForceUpdateRequired_Bool = 1032,
-	ETrackedDeviceProperty_Prop_ViveSystemButtonFixRequired_Bool = 1033,
-	ETrackedDeviceProperty_Prop_ParentDriver_Uint64 = 1034,
-	ETrackedDeviceProperty_Prop_ReportsTimeSinceVSync_Bool = 2000,
-	ETrackedDeviceProperty_Prop_SecondsFromVsyncToPhotons_Float = 2001,
-	ETrackedDeviceProperty_Prop_DisplayFrequency_Float = 2002,
-	ETrackedDeviceProperty_Prop_UserIpdMeters_Float = 2003,
-	ETrackedDeviceProperty_Prop_CurrentUniverseId_Uint64 = 2004,
-	ETrackedDeviceProperty_Prop_PreviousUniverseId_Uint64 = 2005,
-	ETrackedDeviceProperty_Prop_DisplayFirmwareVersion_Uint64 = 2006,
-	ETrackedDeviceProperty_Prop_IsOnDesktop_Bool = 2007,
-	ETrackedDeviceProperty_Prop_DisplayMCType_Int32 = 2008,
-	ETrackedDeviceProperty_Prop_DisplayMCOffset_Float = 2009,
-	ETrackedDeviceProperty_Prop_DisplayMCScale_Float = 2010,
-	ETrackedDeviceProperty_Prop_EdidVendorID_Int32 = 2011,
-	ETrackedDeviceProperty_Prop_DisplayMCImageLeft_String = 2012,
-	ETrackedDeviceProperty_Prop_DisplayMCImageRight_String = 2013,
-	ETrackedDeviceProperty_Prop_DisplayGCBlackClamp_Float = 2014,
-	ETrackedDeviceProperty_Prop_EdidProductID_Int32 = 2015,
-	ETrackedDeviceProperty_Prop_CameraToHeadTransform_Matrix34 = 2016,
-	ETrackedDeviceProperty_Prop_DisplayGCType_Int32 = 2017,
-	ETrackedDeviceProperty_Prop_DisplayGCOffset_Float = 2018,
-	ETrackedDeviceProperty_Prop_DisplayGCScale_Float = 2019,
-	ETrackedDeviceProperty_Prop_DisplayGCPrescale_Float = 2020,
-	ETrackedDeviceProperty_Prop_DisplayGCImage_String = 2021,
-	ETrackedDeviceProperty_Prop_LensCenterLeftU_Float = 2022,
-	ETrackedDeviceProperty_Prop_LensCenterLeftV_Float = 2023,
-	ETrackedDeviceProperty_Prop_LensCenterRightU_Float = 2024,
-	ETrackedDeviceProperty_Prop_LensCenterRightV_Float = 2025,
-	ETrackedDeviceProperty_Prop_UserHeadToEyeDepthMeters_Float = 2026,
-	ETrackedDeviceProperty_Prop_CameraFirmwareVersion_Uint64 = 2027,
-	ETrackedDeviceProperty_Prop_CameraFirmwareDescription_String = 2028,
-	ETrackedDeviceProperty_Prop_DisplayFPGAVersion_Uint64 = 2029,
-	ETrackedDeviceProperty_Prop_DisplayBootloaderVersion_Uint64 = 2030,
-	ETrackedDeviceProperty_Prop_DisplayHardwareVersion_Uint64 = 2031,
-	ETrackedDeviceProperty_Prop_AudioFirmwareVersion_Uint64 = 2032,
-	ETrackedDeviceProperty_Prop_CameraCompatibilityMode_Int32 = 2033,
-	ETrackedDeviceProperty_Prop_ScreenshotHorizontalFieldOfViewDegrees_Float = 2034,
-	ETrackedDeviceProperty_Prop_ScreenshotVerticalFieldOfViewDegrees_Float = 2035,
-	ETrackedDeviceProperty_Prop_DisplaySuppressed_Bool = 2036,
-	ETrackedDeviceProperty_Prop_DisplayAllowNightMode_Bool = 2037,
-	ETrackedDeviceProperty_Prop_DisplayMCImageWidth_Int32 = 2038,
-	ETrackedDeviceProperty_Prop_DisplayMCImageHeight_Int32 = 2039,
-	ETrackedDeviceProperty_Prop_DisplayMCImageNumChannels_Int32 = 2040,
-	ETrackedDeviceProperty_Prop_DisplayMCImageData_Binary = 2041,
-	ETrackedDeviceProperty_Prop_UsesDriverDirectMode_Bool = 2042,
-	ETrackedDeviceProperty_Prop_AttachedDeviceId_String = 3000,
-	ETrackedDeviceProperty_Prop_SupportedButtons_Uint64 = 3001,
-	ETrackedDeviceProperty_Prop_Axis0Type_Int32 = 3002,
-	ETrackedDeviceProperty_Prop_Axis1Type_Int32 = 3003,
-	ETrackedDeviceProperty_Prop_Axis2Type_Int32 = 3004,
-	ETrackedDeviceProperty_Prop_Axis3Type_Int32 = 3005,
-	ETrackedDeviceProperty_Prop_Axis4Type_Int32 = 3006,
-	ETrackedDeviceProperty_Prop_ControllerRoleHint_Int32 = 3007,
-	ETrackedDeviceProperty_Prop_FieldOfViewLeftDegrees_Float = 4000,
-	ETrackedDeviceProperty_Prop_FieldOfViewRightDegrees_Float = 4001,
-	ETrackedDeviceProperty_Prop_FieldOfViewTopDegrees_Float = 4002,
-	ETrackedDeviceProperty_Prop_FieldOfViewBottomDegrees_Float = 4003,
-	ETrackedDeviceProperty_Prop_TrackingRangeMinimumMeters_Float = 4004,
-	ETrackedDeviceProperty_Prop_TrackingRangeMaximumMeters_Float = 4005,
-	ETrackedDeviceProperty_Prop_ModeLabel_String = 4006,
-	ETrackedDeviceProperty_Prop_IconPathName_String = 5000,
-	ETrackedDeviceProperty_Prop_NamedIconPathDeviceOff_String = 5001,
-	ETrackedDeviceProperty_Prop_NamedIconPathDeviceSearching_String = 5002,
-	ETrackedDeviceProperty_Prop_NamedIconPathDeviceSearchingAlert_String = 5003,
-	ETrackedDeviceProperty_Prop_NamedIconPathDeviceReady_String = 5004,
-	ETrackedDeviceProperty_Prop_NamedIconPathDeviceReadyAlert_String = 5005,
-	ETrackedDeviceProperty_Prop_NamedIconPathDeviceNotReady_String = 5006,
-	ETrackedDeviceProperty_Prop_NamedIconPathDeviceStandby_String = 5007,
-	ETrackedDeviceProperty_Prop_NamedIconPathDeviceAlertLow_String = 5008,
-	ETrackedDeviceProperty_Prop_DisplayHiddenArea_Binary_Start = 5100,
-	ETrackedDeviceProperty_Prop_DisplayHiddenArea_Binary_End = 5150,
-	ETrackedDeviceProperty_Prop_UserConfigPath_String = 6000,
-	ETrackedDeviceProperty_Prop_InstallPath_String = 6001,
-	ETrackedDeviceProperty_Prop_VendorSpecific_Reserved_Start = 10000,
-	ETrackedDeviceProperty_Prop_VendorSpecific_Reserved_End = 10999,
-} ETrackedDeviceProperty;
-
-typedef enum ETrackedPropertyError
-{
-	ETrackedPropertyError_TrackedProp_Success = 0,
-	ETrackedPropertyError_TrackedProp_WrongDataType = 1,
-	ETrackedPropertyError_TrackedProp_WrongDeviceClass = 2,
-	ETrackedPropertyError_TrackedProp_BufferTooSmall = 3,
-	ETrackedPropertyError_TrackedProp_UnknownProperty = 4,
-	ETrackedPropertyError_TrackedProp_InvalidDevice = 5,
-	ETrackedPropertyError_TrackedProp_CouldNotContactServer = 6,
-	ETrackedPropertyError_TrackedProp_ValueNotProvidedByDevice = 7,
-	ETrackedPropertyError_TrackedProp_StringExceedsMaximumLength = 8,
-	ETrackedPropertyError_TrackedProp_NotYetAvailable = 9,
-	ETrackedPropertyError_TrackedProp_PermissionDenied = 10,
-	ETrackedPropertyError_TrackedProp_InvalidOperation = 11,
-} ETrackedPropertyError;
-
-typedef enum EVRSubmitFlags
-{
-	EVRSubmitFlags_Submit_Default = 0,
-	EVRSubmitFlags_Submit_LensDistortionAlreadyApplied = 1,
-	EVRSubmitFlags_Submit_GlRenderBuffer = 2,
-	EVRSubmitFlags_Submit_Reserved = 4,
-} EVRSubmitFlags;
-
-typedef enum EVRState
-{
-	EVRState_VRState_Undefined = -1,
-	EVRState_VRState_Off = 0,
-	EVRState_VRState_Searching = 1,
-	EVRState_VRState_Searching_Alert = 2,
-	EVRState_VRState_Ready = 3,
-	EVRState_VRState_Ready_Alert = 4,
-	EVRState_VRState_NotReady = 5,
-	EVRState_VRState_Standby = 6,
-	EVRState_VRState_Ready_Alert_Low = 7,
-} EVRState;
-
-typedef enum EVREventType
-{
-	EVREventType_VREvent_None = 0,
-	EVREventType_VREvent_TrackedDeviceActivated = 100,
-	EVREventType_VREvent_TrackedDeviceDeactivated = 101,
-	EVREventType_VREvent_TrackedDeviceUpdated = 102,
-	EVREventType_VREvent_TrackedDeviceUserInteractionStarted = 103,
-	EVREventType_VREvent_TrackedDeviceUserInteractionEnded = 104,
-	EVREventType_VREvent_IpdChanged = 105,
-	EVREventType_VREvent_EnterStandbyMode = 106,
-	EVREventType_VREvent_LeaveStandbyMode = 107,
-	EVREventType_VREvent_TrackedDeviceRoleChanged = 108,
-	EVREventType_VREvent_WatchdogWakeUpRequested = 109,
-	EVREventType_VREvent_LensDistortionChanged = 110,
-	EVREventType_VREvent_PropertyChanged = 111,
-	EVREventType_VREvent_ButtonPress = 200,
-	EVREventType_VREvent_ButtonUnpress = 201,
-	EVREventType_VREvent_ButtonTouch = 202,
-	EVREventType_VREvent_ButtonUntouch = 203,
-	EVREventType_VREvent_MouseMove = 300,
-	EVREventType_VREvent_MouseButtonDown = 301,
-	EVREventType_VREvent_MouseButtonUp = 302,
-	EVREventType_VREvent_FocusEnter = 303,
-	EVREventType_VREvent_FocusLeave = 304,
-	EVREventType_VREvent_Scroll = 305,
-	EVREventType_VREvent_TouchPadMove = 306,
-	EVREventType_VREvent_OverlayFocusChanged = 307,
-	EVREventType_VREvent_InputFocusCaptured = 400,
-	EVREventType_VREvent_InputFocusReleased = 401,
-	EVREventType_VREvent_SceneFocusLost = 402,
-	EVREventType_VREvent_SceneFocusGained = 403,
-	EVREventType_VREvent_SceneApplicationChanged = 404,
-	EVREventType_VREvent_SceneFocusChanged = 405,
-	EVREventType_VREvent_InputFocusChanged = 406,
-	EVREventType_VREvent_SceneApplicationSecondaryRenderingStarted = 407,
-	EVREventType_VREvent_HideRenderModels = 410,
-	EVREventType_VREvent_ShowRenderModels = 411,
-	EVREventType_VREvent_OverlayShown = 500,
-	EVREventType_VREvent_OverlayHidden = 501,
-	EVREventType_VREvent_DashboardActivated = 502,
-	EVREventType_VREvent_DashboardDeactivated = 503,
-	EVREventType_VREvent_DashboardThumbSelected = 504,
-	EVREventType_VREvent_DashboardRequested = 505,
-	EVREventType_VREvent_ResetDashboard = 506,
-	EVREventType_VREvent_RenderToast = 507,
-	EVREventType_VREvent_ImageLoaded = 508,
-	EVREventType_VREvent_ShowKeyboard = 509,
-	EVREventType_VREvent_HideKeyboard = 510,
-	EVREventType_VREvent_OverlayGamepadFocusGained = 511,
-	EVREventType_VREvent_OverlayGamepadFocusLost = 512,
-	EVREventType_VREvent_OverlaySharedTextureChanged = 513,
-	EVREventType_VREvent_DashboardGuideButtonDown = 514,
-	EVREventType_VREvent_DashboardGuideButtonUp = 515,
-	EVREventType_VREvent_ScreenshotTriggered = 516,
-	EVREventType_VREvent_ImageFailed = 517,
-	EVREventType_VREvent_DashboardOverlayCreated = 518,
-	EVREventType_VREvent_RequestScreenshot = 520,
-	EVREventType_VREvent_ScreenshotTaken = 521,
-	EVREventType_VREvent_ScreenshotFailed = 522,
-	EVREventType_VREvent_SubmitScreenshotToDashboard = 523,
-	EVREventType_VREvent_ScreenshotProgressToDashboard = 524,
-	EVREventType_VREvent_PrimaryDashboardDeviceChanged = 525,
-	EVREventType_VREvent_Notification_Shown = 600,
-	EVREventType_VREvent_Notification_Hidden = 601,
-	EVREventType_VREvent_Notification_BeginInteraction = 602,
-	EVREventType_VREvent_Notification_Destroyed = 603,
-	EVREventType_VREvent_Quit = 700,
-	EVREventType_VREvent_ProcessQuit = 701,
-	EVREventType_VREvent_QuitAborted_UserPrompt = 702,
-	EVREventType_VREvent_QuitAcknowledged = 703,
-	EVREventType_VREvent_DriverRequestedQuit = 704,
-	EVREventType_VREvent_ChaperoneDataHasChanged = 800,
-	EVREventType_VREvent_ChaperoneUniverseHasChanged = 801,
-	EVREventType_VREvent_ChaperoneTempDataHasChanged = 802,
-	EVREventType_VREvent_ChaperoneSettingsHaveChanged = 803,
-	EVREventType_VREvent_SeatedZeroPoseReset = 804,
-	EVREventType_VREvent_AudioSettingsHaveChanged = 820,
-	EVREventType_VREvent_BackgroundSettingHasChanged = 850,
-	EVREventType_VREvent_CameraSettingsHaveChanged = 851,
-	EVREventType_VREvent_ReprojectionSettingHasChanged = 852,
-	EVREventType_VREvent_ModelSkinSettingsHaveChanged = 853,
-	EVREventType_VREvent_EnvironmentSettingsHaveChanged = 854,
-	EVREventType_VREvent_PowerSettingsHaveChanged = 855,
-	EVREventType_VREvent_StatusUpdate = 900,
-	EVREventType_VREvent_MCImageUpdated = 1000,
-	EVREventType_VREvent_FirmwareUpdateStarted = 1100,
-	EVREventType_VREvent_FirmwareUpdateFinished = 1101,
-	EVREventType_VREvent_KeyboardClosed = 1200,
-	EVREventType_VREvent_KeyboardCharInput = 1201,
-	EVREventType_VREvent_KeyboardDone = 1202,
-	EVREventType_VREvent_ApplicationTransitionStarted = 1300,
-	EVREventType_VREvent_ApplicationTransitionAborted = 1301,
-	EVREventType_VREvent_ApplicationTransitionNewAppStarted = 1302,
-	EVREventType_VREvent_ApplicationListUpdated = 1303,
-	EVREventType_VREvent_ApplicationMimeTypeLoad = 1304,
-	EVREventType_VREvent_ApplicationTransitionNewAppLaunchComplete = 1305,
-	EVREventType_VREvent_Compositor_MirrorWindowShown = 1400,
-	EVREventType_VREvent_Compositor_MirrorWindowHidden = 1401,
-	EVREventType_VREvent_Compositor_ChaperoneBoundsShown = 1410,
-	EVREventType_VREvent_Compositor_ChaperoneBoundsHidden = 1411,
-	EVREventType_VREvent_TrackedCamera_StartVideoStream = 1500,
-	EVREventType_VREvent_TrackedCamera_StopVideoStream = 1501,
-	EVREventType_VREvent_TrackedCamera_PauseVideoStream = 1502,
-	EVREventType_VREvent_TrackedCamera_ResumeVideoStream = 1503,
-	EVREventType_VREvent_TrackedCamera_EditingSurface = 1550,
-	EVREventType_VREvent_PerformanceTest_EnableCapture = 1600,
-	EVREventType_VREvent_PerformanceTest_DisableCapture = 1601,
-	EVREventType_VREvent_PerformanceTest_FidelityLevel = 1602,
-	EVREventType_VREvent_MessageOverlay_Closed = 1650,
-	EVREventType_VREvent_VendorSpecific_Reserved_Start = 10000,
-	EVREventType_VREvent_VendorSpecific_Reserved_End = 19999,
-} EVREventType;
-
-typedef enum EDeviceActivityLevel
-{
-	EDeviceActivityLevel_k_EDeviceActivityLevel_Unknown = -1,
-	EDeviceActivityLevel_k_EDeviceActivityLevel_Idle = 0,
-	EDeviceActivityLevel_k_EDeviceActivityLevel_UserInteraction = 1,
-	EDeviceActivityLevel_k_EDeviceActivityLevel_UserInteraction_Timeout = 2,
-	EDeviceActivityLevel_k_EDeviceActivityLevel_Standby = 3,
-} EDeviceActivityLevel;
-
-typedef enum EVRButtonId
-{
-	EVRButtonId_k_EButton_System = 0,
-	EVRButtonId_k_EButton_ApplicationMenu = 1,
-	EVRButtonId_k_EButton_Grip = 2,
-	EVRButtonId_k_EButton_DPad_Left = 3,
-	EVRButtonId_k_EButton_DPad_Up = 4,
-	EVRButtonId_k_EButton_DPad_Right = 5,
-	EVRButtonId_k_EButton_DPad_Down = 6,
-	EVRButtonId_k_EButton_A = 7,
-	EVRButtonId_k_EButton_ProximitySensor = 31,
-	EVRButtonId_k_EButton_Axis0 = 32,
-	EVRButtonId_k_EButton_Axis1 = 33,
-	EVRButtonId_k_EButton_Axis2 = 34,
-	EVRButtonId_k_EButton_Axis3 = 35,
-	EVRButtonId_k_EButton_Axis4 = 36,
-	EVRButtonId_k_EButton_SteamVR_Touchpad = 32,
-	EVRButtonId_k_EButton_SteamVR_Trigger = 33,
-	EVRButtonId_k_EButton_Dashboard_Back = 2,
-	EVRButtonId_k_EButton_Max = 64,
-} EVRButtonId;
-
-typedef enum EVRMouseButton
-{
-	EVRMouseButton_VRMouseButton_Left = 1,
-	EVRMouseButton_VRMouseButton_Right = 2,
-	EVRMouseButton_VRMouseButton_Middle = 4,
-} EVRMouseButton;
-
-typedef enum EHiddenAreaMeshType
-{
-	EHiddenAreaMeshType_k_eHiddenAreaMesh_Standard = 0,
-	EHiddenAreaMeshType_k_eHiddenAreaMesh_Inverse = 1,
-	EHiddenAreaMeshType_k_eHiddenAreaMesh_LineLoop = 2,
-	EHiddenAreaMeshType_k_eHiddenAreaMesh_Max = 3,
-} EHiddenAreaMeshType;
-
-typedef enum EVRControllerAxisType
-{
-	EVRControllerAxisType_k_eControllerAxis_None = 0,
-	EVRControllerAxisType_k_eControllerAxis_TrackPad = 1,
-	EVRControllerAxisType_k_eControllerAxis_Joystick = 2,
-	EVRControllerAxisType_k_eControllerAxis_Trigger = 3,
-} EVRControllerAxisType;
-
-typedef enum EVRControllerEventOutputType
-{
-	EVRControllerEventOutputType_ControllerEventOutput_OSEvents = 0,
-	EVRControllerEventOutputType_ControllerEventOutput_VREvents = 1,
-} EVRControllerEventOutputType;
-
-typedef enum ECollisionBoundsStyle
-{
-	ECollisionBoundsStyle_COLLISION_BOUNDS_STYLE_BEGINNER = 0,
-	ECollisionBoundsStyle_COLLISION_BOUNDS_STYLE_INTERMEDIATE = 1,
-	ECollisionBoundsStyle_COLLISION_BOUNDS_STYLE_SQUARES = 2,
-	ECollisionBoundsStyle_COLLISION_BOUNDS_STYLE_ADVANCED = 3,
-	ECollisionBoundsStyle_COLLISION_BOUNDS_STYLE_NONE = 4,
-	ECollisionBoundsStyle_COLLISION_BOUNDS_STYLE_COUNT = 5,
-} ECollisionBoundsStyle;
-
-typedef enum EVROverlayError
-{
-	EVROverlayError_VROverlayError_None = 0,
-	EVROverlayError_VROverlayError_UnknownOverlay = 10,
-	EVROverlayError_VROverlayError_InvalidHandle = 11,
-	EVROverlayError_VROverlayError_PermissionDenied = 12,
-	EVROverlayError_VROverlayError_OverlayLimitExceeded = 13,
-	EVROverlayError_VROverlayError_WrongVisibilityType = 14,
-	EVROverlayError_VROverlayError_KeyTooLong = 15,
-	EVROverlayError_VROverlayError_NameTooLong = 16,
-	EVROverlayError_VROverlayError_KeyInUse = 17,
-	EVROverlayError_VROverlayError_WrongTransformType = 18,
-	EVROverlayError_VROverlayError_InvalidTrackedDevice = 19,
-	EVROverlayError_VROverlayError_InvalidParameter = 20,
-	EVROverlayError_VROverlayError_ThumbnailCantBeDestroyed = 21,
-	EVROverlayError_VROverlayError_ArrayTooSmall = 22,
-	EVROverlayError_VROverlayError_RequestFailed = 23,
-	EVROverlayError_VROverlayError_InvalidTexture = 24,
-	EVROverlayError_VROverlayError_UnableToLoadFile = 25,
-	EVROverlayError_VROverlayError_KeyboardAlreadyInUse = 26,
-	EVROverlayError_VROverlayError_NoNeighbor = 27,
-	EVROverlayError_VROverlayError_TooManyMaskPrimitives = 29,
-	EVROverlayError_VROverlayError_BadMaskPrimitive = 30,
-} EVROverlayError;
-
-typedef enum EVRApplicationType
-{
-	EVRApplicationType_VRApplication_Other = 0,
-	EVRApplicationType_VRApplication_Scene = 1,
-	EVRApplicationType_VRApplication_Overlay = 2,
-	EVRApplicationType_VRApplication_Background = 3,
-	EVRApplicationType_VRApplication_Utility = 4,
-	EVRApplicationType_VRApplication_VRMonitor = 5,
-	EVRApplicationType_VRApplication_SteamWatchdog = 6,
-	EVRApplicationType_VRApplication_Max = 7,
-} EVRApplicationType;
-
-typedef enum EVRFirmwareError
-{
-	EVRFirmwareError_VRFirmwareError_None = 0,
-	EVRFirmwareError_VRFirmwareError_Success = 1,
-	EVRFirmwareError_VRFirmwareError_Fail = 2,
-} EVRFirmwareError;
-
-typedef enum EVRNotificationError
-{
-	EVRNotificationError_VRNotificationError_OK = 0,
-	EVRNotificationError_VRNotificationError_InvalidNotificationId = 100,
-	EVRNotificationError_VRNotificationError_NotificationQueueFull = 101,
-	EVRNotificationError_VRNotificationError_InvalidOverlayHandle = 102,
-	EVRNotificationError_VRNotificationError_SystemWithUserValueAlreadyExists = 103,
-} EVRNotificationError;
-
-typedef enum EVRInitError
-{
-	EVRInitError_VRInitError_None = 0,
-	EVRInitError_VRInitError_Unknown = 1,
-	EVRInitError_VRInitError_Init_InstallationNotFound = 100,
-	EVRInitError_VRInitError_Init_InstallationCorrupt = 101,
-	EVRInitError_VRInitError_Init_VRClientDLLNotFound = 102,
-	EVRInitError_VRInitError_Init_FileNotFound = 103,
-	EVRInitError_VRInitError_Init_FactoryNotFound = 104,
-	EVRInitError_VRInitError_Init_InterfaceNotFound = 105,
-	EVRInitError_VRInitError_Init_InvalidInterface = 106,
-	EVRInitError_VRInitError_Init_UserConfigDirectoryInvalid = 107,
-	EVRInitError_VRInitError_Init_HmdNotFound = 108,
-	EVRInitError_VRInitError_Init_NotInitialized = 109,
-	EVRInitError_VRInitError_Init_PathRegistryNotFound = 110,
-	EVRInitError_VRInitError_Init_NoConfigPath = 111,
-	EVRInitError_VRInitError_Init_NoLogPath = 112,
-	EVRInitError_VRInitError_Init_PathRegistryNotWritable = 113,
-	EVRInitError_VRInitError_Init_AppInfoInitFailed = 114,
-	EVRInitError_VRInitError_Init_Retry = 115,
-	EVRInitError_VRInitError_Init_InitCanceledByUser = 116,
-	EVRInitError_VRInitError_Init_AnotherAppLaunching = 117,
-	EVRInitError_VRInitError_Init_SettingsInitFailed = 118,
-	EVRInitError_VRInitError_Init_ShuttingDown = 119,
-	EVRInitError_VRInitError_Init_TooManyObjects = 120,
-	EVRInitError_VRInitError_Init_NoServerForBackgroundApp = 121,
-	EVRInitError_VRInitError_Init_NotSupportedWithCompositor = 122,
-	EVRInitError_VRInitError_Init_NotAvailableToUtilityApps = 123,
-	EVRInitError_VRInitError_Init_Internal = 124,
-	EVRInitError_VRInitError_Init_HmdDriverIdIsNone = 125,
-	EVRInitError_VRInitError_Init_HmdNotFoundPresenceFailed = 126,
-	EVRInitError_VRInitError_Init_VRMonitorNotFound = 127,
-	EVRInitError_VRInitError_Init_VRMonitorStartupFailed = 128,
-	EVRInitError_VRInitError_Init_LowPowerWatchdogNotSupported = 129,
-	EVRInitError_VRInitError_Init_InvalidApplicationType = 130,
-	EVRInitError_VRInitError_Init_NotAvailableToWatchdogApps = 131,
-	EVRInitError_VRInitError_Init_WatchdogDisabledInSettings = 132,
-	EVRInitError_VRInitError_Init_VRDashboardNotFound = 133,
-	EVRInitError_VRInitError_Init_VRDashboardStartupFailed = 134,
-	EVRInitError_VRInitError_Driver_Failed = 200,
-	EVRInitError_VRInitError_Driver_Unknown = 201,
-	EVRInitError_VRInitError_Driver_HmdUnknown = 202,
-	EVRInitError_VRInitError_Driver_NotLoaded = 203,
-	EVRInitError_VRInitError_Driver_RuntimeOutOfDate = 204,
-	EVRInitError_VRInitError_Driver_HmdInUse = 205,
-	EVRInitError_VRInitError_Driver_NotCalibrated = 206,
-	EVRInitError_VRInitError_Driver_CalibrationInvalid = 207,
-	EVRInitError_VRInitError_Driver_HmdDisplayNotFound = 208,
-	EVRInitError_VRInitError_Driver_TrackedDeviceInterfaceUnknown = 209,
-	EVRInitError_VRInitError_Driver_HmdDriverIdOutOfBounds = 211,
-	EVRInitError_VRInitError_Driver_HmdDisplayMirrored = 212,
-	EVRInitError_VRInitError_IPC_ServerInitFailed = 300,
-	EVRInitError_VRInitError_IPC_ConnectFailed = 301,
-	EVRInitError_VRInitError_IPC_SharedStateInitFailed = 302,
-	EVRInitError_VRInitError_IPC_CompositorInitFailed = 303,
-	EVRInitError_VRInitError_IPC_MutexInitFailed = 304,
-	EVRInitError_VRInitError_IPC_Failed = 305,
-	EVRInitError_VRInitError_IPC_CompositorConnectFailed = 306,
-	EVRInitError_VRInitError_IPC_CompositorInvalidConnectResponse = 307,
-	EVRInitError_VRInitError_IPC_ConnectFailedAfterMultipleAttempts = 308,
-	EVRInitError_VRInitError_Compositor_Failed = 400,
-	EVRInitError_VRInitError_Compositor_D3D11HardwareRequired = 401,
-	EVRInitError_VRInitError_Compositor_FirmwareRequiresUpdate = 402,
-	EVRInitError_VRInitError_Compositor_OverlayInitFailed = 403,
-	EVRInitError_VRInitError_Compositor_ScreenshotsInitFailed = 404,
-	EVRInitError_VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000,
-	EVRInitError_VRInitError_VendorSpecific_HmdFound_CantOpenDevice = 1101,
-	EVRInitError_VRInitError_VendorSpecific_HmdFound_UnableToRequestConfigStart = 1102,
-	EVRInitError_VRInitError_VendorSpecific_HmdFound_NoStoredConfig = 1103,
-	EVRInitError_VRInitError_VendorSpecific_HmdFound_ConfigTooBig = 1104,
-	EVRInitError_VRInitError_VendorSpecific_HmdFound_ConfigTooSmall = 1105,
-	EVRInitError_VRInitError_VendorSpecific_HmdFound_UnableToInitZLib = 1106,
-	EVRInitError_VRInitError_VendorSpecific_HmdFound_CantReadFirmwareVersion = 1107,
-	EVRInitError_VRInitError_VendorSpecific_HmdFound_UnableToSendUserDataStart = 1108,
-	EVRInitError_VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataStart = 1109,
-	EVRInitError_VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataNext = 1110,
-	EVRInitError_VRInitError_VendorSpecific_HmdFound_UserDataAddressRange = 1111,
-	EVRInitError_VRInitError_VendorSpecific_HmdFound_UserDataError = 1112,
-	EVRInitError_VRInitError_VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113,
-	EVRInitError_VRInitError_Steam_SteamInstallationNotFound = 2000,
-} EVRInitError;
-
-typedef enum EVRScreenshotType
-{
-	EVRScreenshotType_VRScreenshotType_None = 0,
-	EVRScreenshotType_VRScreenshotType_Mono = 1,
-	EVRScreenshotType_VRScreenshotType_Stereo = 2,
-	EVRScreenshotType_VRScreenshotType_Cubemap = 3,
-	EVRScreenshotType_VRScreenshotType_MonoPanorama = 4,
-	EVRScreenshotType_VRScreenshotType_StereoPanorama = 5,
-} EVRScreenshotType;
-
-typedef enum EVRScreenshotPropertyFilenames
-{
-	EVRScreenshotPropertyFilenames_VRScreenshotPropertyFilenames_Preview = 0,
-	EVRScreenshotPropertyFilenames_VRScreenshotPropertyFilenames_VR = 1,
-} EVRScreenshotPropertyFilenames;
-
-typedef enum EVRTrackedCameraError
-{
-	EVRTrackedCameraError_VRTrackedCameraError_None = 0,
-	EVRTrackedCameraError_VRTrackedCameraError_OperationFailed = 100,
-	EVRTrackedCameraError_VRTrackedCameraError_InvalidHandle = 101,
-	EVRTrackedCameraError_VRTrackedCameraError_InvalidFrameHeaderVersion = 102,
-	EVRTrackedCameraError_VRTrackedCameraError_OutOfHandles = 103,
-	EVRTrackedCameraError_VRTrackedCameraError_IPCFailure = 104,
-	EVRTrackedCameraError_VRTrackedCameraError_NotSupportedForThisDevice = 105,
-	EVRTrackedCameraError_VRTrackedCameraError_SharedMemoryFailure = 106,
-	EVRTrackedCameraError_VRTrackedCameraError_FrameBufferingFailure = 107,
-	EVRTrackedCameraError_VRTrackedCameraError_StreamSetupFailure = 108,
-	EVRTrackedCameraError_VRTrackedCameraError_InvalidGLTextureId = 109,
-	EVRTrackedCameraError_VRTrackedCameraError_InvalidSharedTextureHandle = 110,
-	EVRTrackedCameraError_VRTrackedCameraError_FailedToGetGLTextureId = 111,
-	EVRTrackedCameraError_VRTrackedCameraError_SharedTextureFailure = 112,
-	EVRTrackedCameraError_VRTrackedCameraError_NoFrameAvailable = 113,
-	EVRTrackedCameraError_VRTrackedCameraError_InvalidArgument = 114,
-	EVRTrackedCameraError_VRTrackedCameraError_InvalidFrameBufferSize = 115,
-} EVRTrackedCameraError;
-
-typedef enum EVRTrackedCameraFrameType
-{
-	EVRTrackedCameraFrameType_VRTrackedCameraFrameType_Distorted = 0,
-	EVRTrackedCameraFrameType_VRTrackedCameraFrameType_Undistorted = 1,
-	EVRTrackedCameraFrameType_VRTrackedCameraFrameType_MaximumUndistorted = 2,
-	EVRTrackedCameraFrameType_MAX_CAMERA_FRAME_TYPES = 3,
-} EVRTrackedCameraFrameType;
-
-typedef enum EVRApplicationError
-{
-	EVRApplicationError_VRApplicationError_None = 0,
-	EVRApplicationError_VRApplicationError_AppKeyAlreadyExists = 100,
-	EVRApplicationError_VRApplicationError_NoManifest = 101,
-	EVRApplicationError_VRApplicationError_NoApplication = 102,
-	EVRApplicationError_VRApplicationError_InvalidIndex = 103,
-	EVRApplicationError_VRApplicationError_UnknownApplication = 104,
-	EVRApplicationError_VRApplicationError_IPCFailed = 105,
-	EVRApplicationError_VRApplicationError_ApplicationAlreadyRunning = 106,
-	EVRApplicationError_VRApplicationError_InvalidManifest = 107,
-	EVRApplicationError_VRApplicationError_InvalidApplication = 108,
-	EVRApplicationError_VRApplicationError_LaunchFailed = 109,
-	EVRApplicationError_VRApplicationError_ApplicationAlreadyStarting = 110,
-	EVRApplicationError_VRApplicationError_LaunchInProgress = 111,
-	EVRApplicationError_VRApplicationError_OldApplicationQuitting = 112,
-	EVRApplicationError_VRApplicationError_TransitionAborted = 113,
-	EVRApplicationError_VRApplicationError_IsTemplate = 114,
-	EVRApplicationError_VRApplicationError_BufferTooSmall = 200,
-	EVRApplicationError_VRApplicationError_PropertyNotSet = 201,
-	EVRApplicationError_VRApplicationError_UnknownProperty = 202,
-	EVRApplicationError_VRApplicationError_InvalidParameter = 203,
-} EVRApplicationError;
-
-typedef enum EVRApplicationProperty
-{
-	EVRApplicationProperty_VRApplicationProperty_Name_String = 0,
-	EVRApplicationProperty_VRApplicationProperty_LaunchType_String = 11,
-	EVRApplicationProperty_VRApplicationProperty_WorkingDirectory_String = 12,
-	EVRApplicationProperty_VRApplicationProperty_BinaryPath_String = 13,
-	EVRApplicationProperty_VRApplicationProperty_Arguments_String = 14,
-	EVRApplicationProperty_VRApplicationProperty_URL_String = 15,
-	EVRApplicationProperty_VRApplicationProperty_Description_String = 50,
-	EVRApplicationProperty_VRApplicationProperty_NewsURL_String = 51,
-	EVRApplicationProperty_VRApplicationProperty_ImagePath_String = 52,
-	EVRApplicationProperty_VRApplicationProperty_Source_String = 53,
-	EVRApplicationProperty_VRApplicationProperty_IsDashboardOverlay_Bool = 60,
-	EVRApplicationProperty_VRApplicationProperty_IsTemplate_Bool = 61,
-	EVRApplicationProperty_VRApplicationProperty_IsInstanced_Bool = 62,
-	EVRApplicationProperty_VRApplicationProperty_IsInternal_Bool = 63,
-	EVRApplicationProperty_VRApplicationProperty_LastLaunchTime_Uint64 = 70,
-} EVRApplicationProperty;
-
-typedef enum EVRApplicationTransitionState
-{
-	EVRApplicationTransitionState_VRApplicationTransition_None = 0,
-	EVRApplicationTransitionState_VRApplicationTransition_OldAppQuitSent = 10,
-	EVRApplicationTransitionState_VRApplicationTransition_WaitingForExternalLaunch = 11,
-	EVRApplicationTransitionState_VRApplicationTransition_NewAppLaunched = 20,
-} EVRApplicationTransitionState;
-
-typedef enum ChaperoneCalibrationState
-{
-	ChaperoneCalibrationState_OK = 1,
-	ChaperoneCalibrationState_Warning = 100,
-	ChaperoneCalibrationState_Warning_BaseStationMayHaveMoved = 101,
-	ChaperoneCalibrationState_Warning_BaseStationRemoved = 102,
-	ChaperoneCalibrationState_Warning_SeatedBoundsInvalid = 103,
-	ChaperoneCalibrationState_Error = 200,
-	ChaperoneCalibrationState_Error_BaseStationUninitialized = 201,
-	ChaperoneCalibrationState_Error_BaseStationConflict = 202,
-	ChaperoneCalibrationState_Error_PlayAreaInvalid = 203,
-	ChaperoneCalibrationState_Error_CollisionBoundsInvalid = 204,
-} ChaperoneCalibrationState;
-
-typedef enum EChaperoneConfigFile
-{
-	EChaperoneConfigFile_Live = 1,
-	EChaperoneConfigFile_Temp = 2,
-} EChaperoneConfigFile;
-
-typedef enum EChaperoneImportFlags
-{
-	EChaperoneImportFlags_EChaperoneImport_BoundsOnly = 1,
-} EChaperoneImportFlags;
-
-typedef enum EVRCompositorError
-{
-	EVRCompositorError_VRCompositorError_None = 0,
-	EVRCompositorError_VRCompositorError_RequestFailed = 1,
-	EVRCompositorError_VRCompositorError_IncompatibleVersion = 100,
-	EVRCompositorError_VRCompositorError_DoNotHaveFocus = 101,
-	EVRCompositorError_VRCompositorError_InvalidTexture = 102,
-	EVRCompositorError_VRCompositorError_IsNotSceneApplication = 103,
-	EVRCompositorError_VRCompositorError_TextureIsOnWrongDevice = 104,
-	EVRCompositorError_VRCompositorError_TextureUsesUnsupportedFormat = 105,
-	EVRCompositorError_VRCompositorError_SharedTexturesNotSupported = 106,
-	EVRCompositorError_VRCompositorError_IndexOutOfRange = 107,
-	EVRCompositorError_VRCompositorError_AlreadySubmitted = 108,
-} EVRCompositorError;
-
-typedef enum VROverlayInputMethod
-{
-	VROverlayInputMethod_None = 0,
-	VROverlayInputMethod_Mouse = 1,
-} VROverlayInputMethod;
-
-typedef enum VROverlayTransformType
-{
-	VROverlayTransformType_VROverlayTransform_Absolute = 0,
-	VROverlayTransformType_VROverlayTransform_TrackedDeviceRelative = 1,
-	VROverlayTransformType_VROverlayTransform_SystemOverlay = 2,
-	VROverlayTransformType_VROverlayTransform_TrackedComponent = 3,
-} VROverlayTransformType;
-
-typedef enum VROverlayFlags
-{
-	VROverlayFlags_None = 0,
-	VROverlayFlags_Curved = 1,
-	VROverlayFlags_RGSS4X = 2,
-	VROverlayFlags_NoDashboardTab = 3,
-	VROverlayFlags_AcceptsGamepadEvents = 4,
-	VROverlayFlags_ShowGamepadFocus = 5,
-	VROverlayFlags_SendVRScrollEvents = 6,
-	VROverlayFlags_SendVRTouchpadEvents = 7,
-	VROverlayFlags_ShowTouchPadScrollWheel = 8,
-	VROverlayFlags_TransferOwnershipToInternalProcess = 9,
-	VROverlayFlags_SideBySide_Parallel = 10,
-	VROverlayFlags_SideBySide_Crossed = 11,
-	VROverlayFlags_Panorama = 12,
-	VROverlayFlags_StereoPanorama = 13,
-	VROverlayFlags_SortWithNonSceneOverlays = 14,
-	VROverlayFlags_VisibleInDashboard = 15,
-} VROverlayFlags;
-
-typedef enum VRMessageOverlayResponse
-{
-	VRMessageOverlayResponse_ButtonPress_0 = 0,
-	VRMessageOverlayResponse_ButtonPress_1 = 1,
-	VRMessageOverlayResponse_ButtonPress_2 = 2,
-	VRMessageOverlayResponse_ButtonPress_3 = 3,
-	VRMessageOverlayResponse_CouldntFindSystemOverlay = 4,
-	VRMessageOverlayResponse_CouldntFindOrCreateClientOverlay = 5,
-	VRMessageOverlayResponse_ApplicationQuit = 6,
-} VRMessageOverlayResponse;
-
-typedef enum EGamepadTextInputMode
-{
-	EGamepadTextInputMode_k_EGamepadTextInputModeNormal = 0,
-	EGamepadTextInputMode_k_EGamepadTextInputModePassword = 1,
-	EGamepadTextInputMode_k_EGamepadTextInputModeSubmit = 2,
-} EGamepadTextInputMode;
-
-typedef enum EGamepadTextInputLineMode
-{
-	EGamepadTextInputLineMode_k_EGamepadTextInputLineModeSingleLine = 0,
-	EGamepadTextInputLineMode_k_EGamepadTextInputLineModeMultipleLines = 1,
-} EGamepadTextInputLineMode;
-
-typedef enum EOverlayDirection
-{
-	EOverlayDirection_OverlayDirection_Up = 0,
-	EOverlayDirection_OverlayDirection_Down = 1,
-	EOverlayDirection_OverlayDirection_Left = 2,
-	EOverlayDirection_OverlayDirection_Right = 3,
-	EOverlayDirection_OverlayDirection_Count = 4,
-} EOverlayDirection;
-
-typedef enum EVROverlayIntersectionMaskPrimitiveType
-{
-	EVROverlayIntersectionMaskPrimitiveType_OverlayIntersectionPrimitiveType_Rectangle = 0,
-	EVROverlayIntersectionMaskPrimitiveType_OverlayIntersectionPrimitiveType_Circle = 1,
-} EVROverlayIntersectionMaskPrimitiveType;
-
-typedef enum EVRRenderModelError
-{
-	EVRRenderModelError_VRRenderModelError_None = 0,
-	EVRRenderModelError_VRRenderModelError_Loading = 100,
-	EVRRenderModelError_VRRenderModelError_NotSupported = 200,
-	EVRRenderModelError_VRRenderModelError_InvalidArg = 300,
-	EVRRenderModelError_VRRenderModelError_InvalidModel = 301,
-	EVRRenderModelError_VRRenderModelError_NoShapes = 302,
-	EVRRenderModelError_VRRenderModelError_MultipleShapes = 303,
-	EVRRenderModelError_VRRenderModelError_TooManyVertices = 304,
-	EVRRenderModelError_VRRenderModelError_MultipleTextures = 305,
-	EVRRenderModelError_VRRenderModelError_BufferTooSmall = 306,
-	EVRRenderModelError_VRRenderModelError_NotEnoughNormals = 307,
-	EVRRenderModelError_VRRenderModelError_NotEnoughTexCoords = 308,
-	EVRRenderModelError_VRRenderModelError_InvalidTexture = 400,
-} EVRRenderModelError;
-
-typedef enum EVRComponentProperty
-{
-	EVRComponentProperty_VRComponentProperty_IsStatic = 1,
-	EVRComponentProperty_VRComponentProperty_IsVisible = 2,
-	EVRComponentProperty_VRComponentProperty_IsTouched = 4,
-	EVRComponentProperty_VRComponentProperty_IsPressed = 8,
-	EVRComponentProperty_VRComponentProperty_IsScrolled = 16,
-} EVRComponentProperty;
-
-typedef enum EVRNotificationType
-{
-	EVRNotificationType_Transient = 0,
-	EVRNotificationType_Persistent = 1,
-	EVRNotificationType_Transient_SystemWithUserValue = 2,
-} EVRNotificationType;
-
-typedef enum EVRNotificationStyle
-{
-	EVRNotificationStyle_None = 0,
-	EVRNotificationStyle_Application = 100,
-	EVRNotificationStyle_Contact_Disabled = 200,
-	EVRNotificationStyle_Contact_Enabled = 201,
-	EVRNotificationStyle_Contact_Active = 202,
-} EVRNotificationStyle;
-
-typedef enum EVRSettingsError
-{
-	EVRSettingsError_VRSettingsError_None = 0,
-	EVRSettingsError_VRSettingsError_IPCFailed = 1,
-	EVRSettingsError_VRSettingsError_WriteFailed = 2,
-	EVRSettingsError_VRSettingsError_ReadFailed = 3,
-	EVRSettingsError_VRSettingsError_JsonParseFailed = 4,
-	EVRSettingsError_VRSettingsError_UnsetSettingHasNoDefault = 5,
-} EVRSettingsError;
-
-typedef enum EVRScreenshotError
-{
-	EVRScreenshotError_VRScreenshotError_None = 0,
-	EVRScreenshotError_VRScreenshotError_RequestFailed = 1,
-	EVRScreenshotError_VRScreenshotError_IncompatibleVersion = 100,
-	EVRScreenshotError_VRScreenshotError_NotFound = 101,
-	EVRScreenshotError_VRScreenshotError_BufferTooSmall = 102,
-	EVRScreenshotError_VRScreenshotError_ScreenshotAlreadyInProgress = 108,
-} EVRScreenshotError;
-
-
-// OpenVR typedefs
-
-typedef uint32_t TrackedDeviceIndex_t;
-typedef uint32_t VRNotificationId;
-typedef uint64_t VROverlayHandle_t;
-
-typedef void * glSharedTextureHandle_t;
-typedef int32_t glInt_t;
-typedef uint32_t glUInt_t;
-typedef uint64_t SharedTextureHandle_t;
-typedef uint32_t TrackedDeviceIndex_t;
-typedef uint64_t PropertyContainerHandle_t;
-typedef uint32_t PropertyTypeTag_t;
-typedef uint64_t VROverlayHandle_t;
-typedef uint64_t TrackedCameraHandle_t;
-typedef uint32_t ScreenshotHandle_t;
-typedef uint32_t VRComponentProperties;
-typedef int32_t TextureID_t;
-typedef uint32_t VRNotificationId;
-typedef EVRInitError HmdError;
-typedef EVREye Hmd_Eye;
-typedef EColorSpace ColorSpace;
-typedef ETrackingResult HmdTrackingResult;
-typedef ETrackedDeviceClass TrackedDeviceClass;
-typedef ETrackingUniverseOrigin TrackingUniverseOrigin;
-typedef ETrackedDeviceProperty TrackedDeviceProperty;
-typedef ETrackedPropertyError TrackedPropertyError;
-typedef EVRSubmitFlags VRSubmitFlags_t;
-typedef EVRState VRState_t;
-typedef ECollisionBoundsStyle CollisionBoundsStyle_t;
-typedef EVROverlayError VROverlayError;
-typedef EVRFirmwareError VRFirmwareError;
-typedef EVRCompositorError VRCompositorError;
-typedef EVRScreenshotError VRScreenshotsError;
-
-// OpenVR Structs
-
-typedef struct HmdMatrix34_t
-{
-	float m[3][4]; //float[3][4]
-} HmdMatrix34_t;
-
-typedef struct HmdMatrix44_t
-{
-	float m[4][4]; //float[4][4]
-} HmdMatrix44_t;
-
-typedef struct HmdVector3_t
-{
-	float v[3]; //float[3]
-} HmdVector3_t;
-
-typedef struct HmdVector4_t
-{
-	float v[4]; //float[4]
-} HmdVector4_t;
-
-typedef struct HmdVector3d_t
-{
-	double v[3]; //double[3]
-} HmdVector3d_t;
-
-typedef struct HmdVector2_t
-{
-	float v[2]; //float[2]
-} HmdVector2_t;
-
-typedef struct HmdQuaternion_t
-{
-	double w;
-	double x;
-	double y;
-	double z;
-} HmdQuaternion_t;
-
-typedef struct HmdColor_t
-{
-	float r;
-	float g;
-	float b;
-	float a;
-} HmdColor_t;
-
-typedef struct HmdQuad_t
-{
-	struct HmdVector3_t vCorners[4]; //struct vr::HmdVector3_t[4]
-} HmdQuad_t;
-
-typedef struct HmdRect2_t
-{
-	struct HmdVector2_t vTopLeft;
-	struct HmdVector2_t vBottomRight;
-} HmdRect2_t;
-
-typedef struct DistortionCoordinates_t
-{
-	float rfRed[2]; //float[2]
-	float rfGreen[2]; //float[2]
-	float rfBlue[2]; //float[2]
-} DistortionCoordinates_t;
-
-typedef struct Texture_t
-{
-	void * handle; // void *
-	enum ETextureType eType;
-	enum EColorSpace eColorSpace;
-} Texture_t;
-
-typedef struct TrackedDevicePose_t
-{
-	struct HmdMatrix34_t mDeviceToAbsoluteTracking;
-	struct HmdVector3_t vVelocity;
-	struct HmdVector3_t vAngularVelocity;
-	enum ETrackingResult eTrackingResult;
-	bool bPoseIsValid;
-	bool bDeviceIsConnected;
-} TrackedDevicePose_t;
-
-typedef struct VRTextureBounds_t
-{
-	float uMin;
-	float vMin;
-	float uMax;
-	float vMax;
-} VRTextureBounds_t;
-
-typedef struct VRVulkanTextureData_t
-{
-	uint64_t m_nImage;
-	struct VkDevice_T * m_pDevice; // struct VkDevice_T *
-	struct VkPhysicalDevice_T * m_pPhysicalDevice; // struct VkPhysicalDevice_T *
-	struct VkInstance_T * m_pInstance; // struct VkInstance_T *
-	struct VkQueue_T * m_pQueue; // struct VkQueue_T *
-	uint32_t m_nQueueFamilyIndex;
-	uint32_t m_nWidth;
-	uint32_t m_nHeight;
-	uint32_t m_nFormat;
-	uint32_t m_nSampleCount;
-} VRVulkanTextureData_t;
-
-typedef struct D3D12TextureData_t
-{
-	struct ID3D12Resource * m_pResource; // struct ID3D12Resource *
-	struct ID3D12CommandQueue * m_pCommandQueue; // struct ID3D12CommandQueue *
-	uint32_t m_nNodeMask;
-} D3D12TextureData_t;
-
-typedef struct VREvent_Controller_t
-{
-	uint32_t button;
-} VREvent_Controller_t;
-
-typedef struct VREvent_Mouse_t
-{
-	float x;
-	float y;
-	uint32_t button;
-} VREvent_Mouse_t;
-
-typedef struct VREvent_Scroll_t
-{
-	float xdelta;
-	float ydelta;
-	uint32_t repeatCount;
-} VREvent_Scroll_t;
-
-typedef struct VREvent_TouchPadMove_t
-{
-	bool bFingerDown;
-	float flSecondsFingerDown;
-	float fValueXFirst;
-	float fValueYFirst;
-	float fValueXRaw;
-	float fValueYRaw;
-} VREvent_TouchPadMove_t;
-
-typedef struct VREvent_Notification_t
-{
-	uint64_t ulUserValue;
-	uint32_t notificationId;
-} VREvent_Notification_t;
-
-typedef struct VREvent_Process_t
-{
-	uint32_t pid;
-	uint32_t oldPid;
-	bool bForced;
-} VREvent_Process_t;
-
-typedef struct VREvent_Overlay_t
-{
-	uint64_t overlayHandle;
-} VREvent_Overlay_t;
-
-typedef struct VREvent_Status_t
-{
-	uint32_t statusState;
-} VREvent_Status_t;
-
-typedef struct VREvent_Keyboard_t
-{
-	char * cNewInput[8]; //char[8]
-	uint64_t uUserValue;
-} VREvent_Keyboard_t;
-
-typedef struct VREvent_Ipd_t
-{
-	float ipdMeters;
-} VREvent_Ipd_t;
-
-typedef struct VREvent_Chaperone_t
-{
-	uint64_t m_nPreviousUniverse;
-	uint64_t m_nCurrentUniverse;
-} VREvent_Chaperone_t;
-
-typedef struct VREvent_Reserved_t
-{
-	uint64_t reserved0;
-	uint64_t reserved1;
-} VREvent_Reserved_t;
-
-typedef struct VREvent_PerformanceTest_t
-{
-	uint32_t m_nFidelityLevel;
-} VREvent_PerformanceTest_t;
-
-typedef struct VREvent_SeatedZeroPoseReset_t
-{
-	bool bResetBySystemMenu;
-} VREvent_SeatedZeroPoseReset_t;
-
-typedef struct VREvent_Screenshot_t
-{
-	uint32_t handle;
-	uint32_t type;
-} VREvent_Screenshot_t;
-
-typedef struct VREvent_ScreenshotProgress_t
-{
-	float progress;
-} VREvent_ScreenshotProgress_t;
-
-typedef struct VREvent_ApplicationLaunch_t
-{
-	uint32_t pid;
-	uint32_t unArgsHandle;
-} VREvent_ApplicationLaunch_t;
-
-typedef struct VREvent_EditingCameraSurface_t
-{
-	uint64_t overlayHandle;
-	uint32_t nVisualMode;
-} VREvent_EditingCameraSurface_t;
-
-typedef struct VREvent_MessageOverlay_t
-{
-	uint32_t unVRMessageOverlayResponse;
-} VREvent_MessageOverlay_t;
-
-typedef struct VREvent_Property_t
-{
-	PropertyContainerHandle_t container;
-	enum ETrackedDeviceProperty prop;
-} VREvent_Property_t;
-
-typedef struct HiddenAreaMesh_t
-{
-	struct HmdVector2_t * pVertexData; // const struct vr::HmdVector2_t *
-	uint32_t unTriangleCount;
-} HiddenAreaMesh_t;
-
-typedef struct VRControllerAxis_t
-{
-	float x;
-	float y;
-} VRControllerAxis_t;
-
-typedef struct VRControllerState_t
-{
-	uint32_t unPacketNum;
-	uint64_t ulButtonPressed;
-	uint64_t ulButtonTouched;
-	struct VRControllerAxis_t rAxis[5]; //struct vr::VRControllerAxis_t[5]
-} VRControllerState_t;
-
-typedef struct Compositor_OverlaySettings
-{
-	uint32_t size;
-	bool curved;
-	bool antialias;
-	float scale;
-	float distance;
-	float alpha;
-	float uOffset;
-	float vOffset;
-	float uScale;
-	float vScale;
-	float gridDivs;
-	float gridWidth;
-	float gridScale;
-	struct HmdMatrix44_t transform;
-} Compositor_OverlaySettings;
-
-typedef struct CameraVideoStreamFrameHeader_t
-{
-	enum EVRTrackedCameraFrameType eFrameType;
-	uint32_t nWidth;
-	uint32_t nHeight;
-	uint32_t nBytesPerPixel;
-	uint32_t nFrameSequence;
-	struct TrackedDevicePose_t standingTrackedDevicePose;
-} CameraVideoStreamFrameHeader_t;
-
-typedef struct AppOverrideKeys_t
-{
-	char * pchKey; // const char *
-	char * pchValue; // const char *
-} AppOverrideKeys_t;
-
-typedef struct Compositor_FrameTiming
-{
-	uint32_t m_nSize;
-	uint32_t m_nFrameIndex;
-	uint32_t m_nNumFramePresents;
-	uint32_t m_nNumMisPresented;
-	uint32_t m_nNumDroppedFrames;
-	uint32_t m_nReprojectionFlags;
-	double m_flSystemTimeInSeconds;
-	float m_flPreSubmitGpuMs;
-	float m_flPostSubmitGpuMs;
-	float m_flTotalRenderGpuMs;
-	float m_flCompositorRenderGpuMs;
-	float m_flCompositorRenderCpuMs;
-	float m_flCompositorIdleCpuMs;
-	float m_flClientFrameIntervalMs;
-	float m_flPresentCallCpuMs;
-	float m_flWaitForPresentCpuMs;
-	float m_flSubmitFrameMs;
-	float m_flWaitGetPosesCalledMs;
-	float m_flNewPosesReadyMs;
-	float m_flNewFrameReadyMs;
-	float m_flCompositorUpdateStartMs;
-	float m_flCompositorUpdateEndMs;
-	float m_flCompositorRenderStartMs;
-	TrackedDevicePose_t m_HmdPose;
-} Compositor_FrameTiming;
-
-typedef struct Compositor_CumulativeStats
-{
-	uint32_t m_nPid;
-	uint32_t m_nNumFramePresents;
-	uint32_t m_nNumDroppedFrames;
-	uint32_t m_nNumReprojectedFrames;
-	uint32_t m_nNumFramePresentsOnStartup;
-	uint32_t m_nNumDroppedFramesOnStartup;
-	uint32_t m_nNumReprojectedFramesOnStartup;
-	uint32_t m_nNumLoading;
-	uint32_t m_nNumFramePresentsLoading;
-	uint32_t m_nNumDroppedFramesLoading;
-	uint32_t m_nNumReprojectedFramesLoading;
-	uint32_t m_nNumTimedOut;
-	uint32_t m_nNumFramePresentsTimedOut;
-	uint32_t m_nNumDroppedFramesTimedOut;
-	uint32_t m_nNumReprojectedFramesTimedOut;
-} Compositor_CumulativeStats;
-
-typedef struct VROverlayIntersectionParams_t
-{
-	struct HmdVector3_t vSource;
-	struct HmdVector3_t vDirection;
-	enum ETrackingUniverseOrigin eOrigin;
-} VROverlayIntersectionParams_t;
-
-typedef struct VROverlayIntersectionResults_t
-{
-	struct HmdVector3_t vPoint;
-	struct HmdVector3_t vNormal;
-	struct HmdVector2_t vUVs;
-	float fDistance;
-} VROverlayIntersectionResults_t;
-
-typedef struct IntersectionMaskRectangle_t
-{
-	float m_flTopLeftX;
-	float m_flTopLeftY;
-	float m_flWidth;
-	float m_flHeight;
-} IntersectionMaskRectangle_t;
-
-typedef struct IntersectionMaskCircle_t
-{
-	float m_flCenterX;
-	float m_flCenterY;
-	float m_flRadius;
-} IntersectionMaskCircle_t;
-
-typedef struct RenderModel_ComponentState_t
-{
-	struct HmdMatrix34_t mTrackingToComponentRenderModel;
-	struct HmdMatrix34_t mTrackingToComponentLocal;
-	VRComponentProperties uProperties;
-} RenderModel_ComponentState_t;
-
-typedef struct RenderModel_Vertex_t
-{
-	struct HmdVector3_t vPosition;
-	struct HmdVector3_t vNormal;
-	float rfTextureCoord[2]; //float[2]
-} RenderModel_Vertex_t;
-
-typedef struct RenderModel_TextureMap_t
-{
-	uint16_t unWidth;
-	uint16_t unHeight;
-	uint8_t * rubTextureMapData; // const uint8_t *
-} RenderModel_TextureMap_t;
-
-typedef struct RenderModel_t
-{
-	struct RenderModel_Vertex_t * rVertexData; // const struct vr::RenderModel_Vertex_t *
-	uint32_t unVertexCount;
-	uint16_t * rIndexData; // const uint16_t *
-	uint32_t unTriangleCount;
-	TextureID_t diffuseTextureId;
-} RenderModel_t;
-
-typedef struct RenderModel_ControllerMode_State_t
-{
-	bool bScrollWheelVisible;
-} RenderModel_ControllerMode_State_t;
-
-typedef struct NotificationBitmap_t
-{
-	void * m_pImageData; // void *
-	int32_t m_nWidth;
-	int32_t m_nHeight;
-	int32_t m_nBytesPerPixel;
-} NotificationBitmap_t;
-
-typedef struct COpenVRContext
-{
-	intptr_t m_pVRSystem; // class vr::IVRSystem *
-	intptr_t m_pVRChaperone; // class vr::IVRChaperone *
-	intptr_t m_pVRChaperoneSetup; // class vr::IVRChaperoneSetup *
-	intptr_t m_pVRCompositor; // class vr::IVRCompositor *
-	intptr_t m_pVROverlay; // class vr::IVROverlay *
-	intptr_t m_pVRResources; // class vr::IVRResources *
-	intptr_t m_pVRRenderModels; // class vr::IVRRenderModels *
-	intptr_t m_pVRExtendedDisplay; // class vr::IVRExtendedDisplay *
-	intptr_t m_pVRSettings; // class vr::IVRSettings *
-	intptr_t m_pVRApplications; // class vr::IVRApplications *
-	intptr_t m_pVRTrackedCamera; // class vr::IVRTrackedCamera *
-	intptr_t m_pVRScreenshots; // class vr::IVRScreenshots *
-} COpenVRContext;
-
-
-typedef union
-{
-	VREvent_Reserved_t reserved;
-	VREvent_Controller_t controller;
-	VREvent_Mouse_t mouse;
-	VREvent_Scroll_t scroll;
-	VREvent_Process_t process;
-	VREvent_Notification_t notification;
-	VREvent_Overlay_t overlay;
-	VREvent_Status_t status;
-	VREvent_Keyboard_t keyboard;
-	VREvent_Ipd_t ipd;
-	VREvent_Chaperone_t chaperone;
-	VREvent_PerformanceTest_t performanceTest;
-	VREvent_TouchPadMove_t touchPadMove;
-	VREvent_SeatedZeroPoseReset_t seatedZeroPoseReset;
-} VREvent_Data_t;
-
-/** An event posted by the server to all running applications */
-struct VREvent_t
-{
-	uint32_t eventType; // EVREventType enum
-	TrackedDeviceIndex_t trackedDeviceIndex;
-	float eventAgeSeconds;
-	// event data must be the end of the struct as its size is variable
-	VREvent_Data_t data;
-};
-
-
-typedef union
-{
-	IntersectionMaskRectangle_t m_Rectangle;
-	IntersectionMaskCircle_t m_Circle;
-} VROverlayIntersectionMaskPrimitive_Data_t;
-
-struct VROverlayIntersectionMaskPrimitive_t
-{
-	EVROverlayIntersectionMaskPrimitiveType m_nPrimitiveType;
-	VROverlayIntersectionMaskPrimitive_Data_t m_Primitive;
-};
-
-
-// OpenVR Function Pointer Tables
-
-struct VR_IVRSystem_FnTable
-{
-	void (OPENVR_FNTABLE_CALLTYPE *GetRecommendedRenderTargetSize)(uint32_t * pnWidth, uint32_t * pnHeight);
-	struct HmdMatrix44_t (OPENVR_FNTABLE_CALLTYPE *GetProjectionMatrix)(EVREye eEye, float fNearZ, float fFarZ);
-	void (OPENVR_FNTABLE_CALLTYPE *GetProjectionRaw)(EVREye eEye, float * pfLeft, float * pfRight, float * pfTop, float * pfBottom);
-	bool (OPENVR_FNTABLE_CALLTYPE *ComputeDistortion)(EVREye eEye, float fU, float fV, struct DistortionCoordinates_t * pDistortionCoordinates);
-	struct HmdMatrix34_t (OPENVR_FNTABLE_CALLTYPE *GetEyeToHeadTransform)(EVREye eEye);
-	bool (OPENVR_FNTABLE_CALLTYPE *GetTimeSinceLastVsync)(float * pfSecondsSinceLastVsync, uint64_t * pulFrameCounter);
-	int32_t (OPENVR_FNTABLE_CALLTYPE *GetD3D9AdapterIndex)();
-	void (OPENVR_FNTABLE_CALLTYPE *GetDXGIOutputInfo)(int32_t * pnAdapterIndex);
-	bool (OPENVR_FNTABLE_CALLTYPE *IsDisplayOnDesktop)();
-	bool (OPENVR_FNTABLE_CALLTYPE *SetDisplayVisibility)(bool bIsVisibleOnDesktop);
-	void (OPENVR_FNTABLE_CALLTYPE *GetDeviceToAbsoluteTrackingPose)(ETrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, struct TrackedDevicePose_t * pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount);
-	void (OPENVR_FNTABLE_CALLTYPE *ResetSeatedZeroPose)();
-	struct HmdMatrix34_t (OPENVR_FNTABLE_CALLTYPE *GetSeatedZeroPoseToStandingAbsoluteTrackingPose)();
-	struct HmdMatrix34_t (OPENVR_FNTABLE_CALLTYPE *GetRawZeroPoseToStandingAbsoluteTrackingPose)();
-	uint32_t (OPENVR_FNTABLE_CALLTYPE *GetSortedTrackedDeviceIndicesOfClass)(ETrackedDeviceClass eTrackedDeviceClass, TrackedDeviceIndex_t * punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex);
-	EDeviceActivityLevel (OPENVR_FNTABLE_CALLTYPE *GetTrackedDeviceActivityLevel)(TrackedDeviceIndex_t unDeviceId);
-	void (OPENVR_FNTABLE_CALLTYPE *ApplyTransform)(struct TrackedDevicePose_t * pOutputPose, struct TrackedDevicePose_t * pTrackedDevicePose, struct HmdMatrix34_t * pTransform);
-	TrackedDeviceIndex_t (OPENVR_FNTABLE_CALLTYPE *GetTrackedDeviceIndexForControllerRole)(ETrackedControllerRole unDeviceType);
-	ETrackedControllerRole (OPENVR_FNTABLE_CALLTYPE *GetControllerRoleForTrackedDeviceIndex)(TrackedDeviceIndex_t unDeviceIndex);
-	ETrackedDeviceClass (OPENVR_FNTABLE_CALLTYPE *GetTrackedDeviceClass)(TrackedDeviceIndex_t unDeviceIndex);
-	bool (OPENVR_FNTABLE_CALLTYPE *IsTrackedDeviceConnected)(TrackedDeviceIndex_t unDeviceIndex);
-	bool (OPENVR_FNTABLE_CALLTYPE *GetBoolTrackedDeviceProperty)(TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError);
-	float (OPENVR_FNTABLE_CALLTYPE *GetFloatTrackedDeviceProperty)(TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError);
-	int32_t (OPENVR_FNTABLE_CALLTYPE *GetInt32TrackedDeviceProperty)(TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError);
-	uint64_t (OPENVR_FNTABLE_CALLTYPE *GetUint64TrackedDeviceProperty)(TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError);
-	struct HmdMatrix34_t (OPENVR_FNTABLE_CALLTYPE *GetMatrix34TrackedDeviceProperty)(TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError * pError);
-	uint32_t (OPENVR_FNTABLE_CALLTYPE *GetStringTrackedDeviceProperty)(TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, char * pchValue, uint32_t unBufferSize, ETrackedPropertyError * pError);
-	char * (OPENVR_FNTABLE_CALLTYPE *GetPropErrorNameFromEnum)(ETrackedPropertyError error);
-	bool (OPENVR_FNTABLE_CALLTYPE *PollNextEvent)(struct VREvent_t * pEvent, uint32_t uncbVREvent);
-	bool (OPENVR_FNTABLE_CALLTYPE *PollNextEventWithPose)(ETrackingUniverseOrigin eOrigin, struct VREvent_t * pEvent, uint32_t uncbVREvent, TrackedDevicePose_t * pTrackedDevicePose);
-	char * (OPENVR_FNTABLE_CALLTYPE *GetEventTypeNameFromEnum)(EVREventType eType);
-	struct HiddenAreaMesh_t (OPENVR_FNTABLE_CALLTYPE *GetHiddenAreaMesh)(EVREye eEye, EHiddenAreaMeshType type);
-	bool (OPENVR_FNTABLE_CALLTYPE *GetControllerState)(TrackedDeviceIndex_t unControllerDeviceIndex, VRControllerState_t * pControllerState, uint32_t unControllerStateSize);
-	bool (OPENVR_FNTABLE_CALLTYPE *GetControllerStateWithPose)(ETrackingUniverseOrigin eOrigin, TrackedDeviceIndex_t unControllerDeviceIndex, VRControllerState_t * pControllerState, uint32_t unControllerStateSize, struct TrackedDevicePose_t * pTrackedDevicePose);
-	void (OPENVR_FNTABLE_CALLTYPE *TriggerHapticPulse)(TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec);
-	char * (OPENVR_FNTABLE_CALLTYPE *GetButtonIdNameFromEnum)(EVRButtonId eButtonId);
-	char * (OPENVR_FNTABLE_CALLTYPE *GetControllerAxisTypeNameFromEnum)(EVRControllerAxisType eAxisType);
-	bool (OPENVR_FNTABLE_CALLTYPE *CaptureInputFocus)();
-	void (OPENVR_FNTABLE_CALLTYPE *ReleaseInputFocus)();
-	bool (OPENVR_FNTABLE_CALLTYPE *IsInputFocusCapturedByAnotherProcess)();
-	uint32_t (OPENVR_FNTABLE_CALLTYPE *DriverDebugRequest)(TrackedDeviceIndex_t unDeviceIndex, char * pchRequest, char * pchResponseBuffer, uint32_t unResponseBufferSize);
-	EVRFirmwareError (OPENVR_FNTABLE_CALLTYPE *PerformFirmwareUpdate)(TrackedDeviceIndex_t unDeviceIndex);
-	void (OPENVR_FNTABLE_CALLTYPE *AcknowledgeQuit_Exiting)();
-	void (OPENVR_FNTABLE_CALLTYPE *AcknowledgeQuit_UserPrompt)();
-};
-
-struct VR_IVRExtendedDisplay_FnTable
-{
-	void (OPENVR_FNTABLE_CALLTYPE *GetWindowBounds)(int32_t * pnX, int32_t * pnY, uint32_t * pnWidth, uint32_t * pnHeight);
-	void (OPENVR_FNTABLE_CALLTYPE *GetEyeOutputViewport)(EVREye eEye, uint32_t * pnX, uint32_t * pnY, uint32_t * pnWidth, uint32_t * pnHeight);
-	void (OPENVR_FNTABLE_CALLTYPE *GetDXGIOutputInfo)(int32_t * pnAdapterIndex, int32_t * pnAdapterOutputIndex);
-};
-
-struct VR_IVRTrackedCamera_FnTable
-{
-	char * (OPENVR_FNTABLE_CALLTYPE *GetCameraErrorNameFromEnum)(EVRTrackedCameraError eCameraError);
-	EVRTrackedCameraError (OPENVR_FNTABLE_CALLTYPE *HasCamera)(TrackedDeviceIndex_t nDeviceIndex, bool * pHasCamera);
-	EVRTrackedCameraError (OPENVR_FNTABLE_CALLTYPE *GetCameraFrameSize)(TrackedDeviceIndex_t nDeviceIndex, EVRTrackedCameraFrameType eFrameType, uint32_t * pnWidth, uint32_t * pnHeight, uint32_t * pnFrameBufferSize);
-	EVRTrackedCameraError (OPENVR_FNTABLE_CALLTYPE *GetCameraIntrinsics)(TrackedDeviceIndex_t nDeviceIndex, EVRTrackedCameraFrameType eFrameType, HmdVector2_t * pFocalLength, HmdVector2_t * pCenter);
-	EVRTrackedCameraError (OPENVR_FNTABLE_CALLTYPE *GetCameraProjection)(TrackedDeviceIndex_t nDeviceIndex, EVRTrackedCameraFrameType eFrameType, float flZNear, float flZFar, HmdMatrix44_t * pProjection);
-	EVRTrackedCameraError (OPENVR_FNTABLE_CALLTYPE *AcquireVideoStreamingService)(TrackedDeviceIndex_t nDeviceIndex, TrackedCameraHandle_t * pHandle);
-	EVRTrackedCameraError (OPENVR_FNTABLE_CALLTYPE *ReleaseVideoStreamingService)(TrackedCameraHandle_t hTrackedCamera);
-	EVRTrackedCameraError (OPENVR_FNTABLE_CALLTYPE *GetVideoStreamFrameBuffer)(TrackedCameraHandle_t hTrackedCamera, EVRTrackedCameraFrameType eFrameType, void * pFrameBuffer, uint32_t nFrameBufferSize, CameraVideoStreamFrameHeader_t * pFrameHeader, uint32_t nFrameHeaderSize);
-	EVRTrackedCameraError (OPENVR_FNTABLE_CALLTYPE *GetVideoStreamTextureSize)(TrackedDeviceIndex_t nDeviceIndex, EVRTrackedCameraFrameType eFrameType, VRTextureBounds_t * pTextureBounds, uint32_t * pnWidth, uint32_t * pnHeight);
-	EVRTrackedCameraError (OPENVR_FNTABLE_CALLTYPE *GetVideoStreamTextureD3D11)(TrackedCameraHandle_t hTrackedCamera, EVRTrackedCameraFrameType eFrameType, void * pD3D11DeviceOrResource, void ** ppD3D11ShaderResourceView, CameraVideoStreamFrameHeader_t * pFrameHeader, uint32_t nFrameHeaderSize);
-	EVRTrackedCameraError (OPENVR_FNTABLE_CALLTYPE *GetVideoStreamTextureGL)(TrackedCameraHandle_t hTrackedCamera, EVRTrackedCameraFrameType eFrameType, glUInt_t * pglTextureId, CameraVideoStreamFrameHeader_t * pFrameHeader, uint32_t nFrameHeaderSize);
-	EVRTrackedCameraError (OPENVR_FNTABLE_CALLTYPE *ReleaseVideoStreamTextureGL)(TrackedCameraHandle_t hTrackedCamera, glUInt_t glTextureId);
-};
-
-struct VR_IVRApplications_FnTable
-{
-	EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *AddApplicationManifest)(char * pchApplicationManifestFullPath, bool bTemporary);
-	EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *RemoveApplicationManifest)(char * pchApplicationManifestFullPath);
-	bool (OPENVR_FNTABLE_CALLTYPE *IsApplicationInstalled)(char * pchAppKey);
-	uint32_t (OPENVR_FNTABLE_CALLTYPE *GetApplicationCount)();
-	EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *GetApplicationKeyByIndex)(uint32_t unApplicationIndex, char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen);
-	EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *GetApplicationKeyByProcessId)(uint32_t unProcessId, char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen);
-	EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *LaunchApplication)(char * pchAppKey);
-	EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *LaunchTemplateApplication)(char * pchTemplateAppKey, char * pchNewAppKey, struct AppOverrideKeys_t * pKeys, uint32_t unKeys);
-	EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *LaunchApplicationFromMimeType)(char * pchMimeType, char * pchArgs);
-	EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *LaunchDashboardOverlay)(char * pchAppKey);
-	bool (OPENVR_FNTABLE_CALLTYPE *CancelApplicationLaunch)(char * pchAppKey);
-	EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *IdentifyApplication)(uint32_t unProcessId, char * pchAppKey);
-	uint32_t (OPENVR_FNTABLE_CALLTYPE *GetApplicationProcessId)(char * pchAppKey);
-	char * (OPENVR_FNTABLE_CALLTYPE *GetApplicationsErrorNameFromEnum)(EVRApplicationError error);
-	uint32_t (OPENVR_FNTABLE_CALLTYPE *GetApplicationPropertyString)(char * pchAppKey, EVRApplicationProperty eProperty, char * pchPropertyValueBuffer, uint32_t unPropertyValueBufferLen, EVRApplicationError * peError);
-	bool (OPENVR_FNTABLE_CALLTYPE *GetApplicationPropertyBool)(char * pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError * peError);
-	uint64_t (OPENVR_FNTABLE_CALLTYPE *GetApplicationPropertyUint64)(char * pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError * peError);
-	EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *SetApplicationAutoLaunch)(char * pchAppKey, bool bAutoLaunch);
-	bool (OPENVR_FNTABLE_CALLTYPE *GetApplicationAutoLaunch)(char * pchAppKey);
-	EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *SetDefaultApplicationForMimeType)(char * pchAppKey, char * pchMimeType);
-	bool (OPENVR_FNTABLE_CALLTYPE *GetDefaultApplicationForMimeType)(char * pchMimeType, char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen);
-	bool (OPENVR_FNTABLE_CALLTYPE *GetApplicationSupportedMimeTypes)(char * pchAppKey, char * pchMimeTypesBuffer, uint32_t unMimeTypesBuffer);
-	uint32_t (OPENVR_FNTABLE_CALLTYPE *GetApplicationsThatSupportMimeType)(char * pchMimeType, char * pchAppKeysThatSupportBuffer, uint32_t unAppKeysThatSupportBuffer);
-	uint32_t (OPENVR_FNTABLE_CALLTYPE *GetApplicationLaunchArguments)(uint32_t unHandle, char * pchArgs, uint32_t unArgs);
-	EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *GetStartingApplication)(char * pchAppKeyBuffer, uint32_t unAppKeyBufferLen);
-	EVRApplicationTransitionState (OPENVR_FNTABLE_CALLTYPE *GetTransitionState)();
-	EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *PerformApplicationPrelaunchCheck)(char * pchAppKey);
-	char * (OPENVR_FNTABLE_CALLTYPE *GetApplicationsTransitionStateNameFromEnum)(EVRApplicationTransitionState state);
-	bool (OPENVR_FNTABLE_CALLTYPE *IsQuitUserPromptRequested)();
-	EVRApplicationError (OPENVR_FNTABLE_CALLTYPE *LaunchInternalProcess)(char * pchBinaryPath, char * pchArguments, char * pchWorkingDirectory);
-	uint32_t (OPENVR_FNTABLE_CALLTYPE *GetCurrentSceneProcessId)();
-};
-
-struct VR_IVRChaperone_FnTable
-{
-	ChaperoneCalibrationState (OPENVR_FNTABLE_CALLTYPE *GetCalibrationState)();
-	bool (OPENVR_FNTABLE_CALLTYPE *GetPlayAreaSize)(float * pSizeX, float * pSizeZ);
-	bool (OPENVR_FNTABLE_CALLTYPE *GetPlayAreaRect)(struct HmdQuad_t * rect);
-	void (OPENVR_FNTABLE_CALLTYPE *ReloadInfo)();
-	void (OPENVR_FNTABLE_CALLTYPE *SetSceneColor)(struct HmdColor_t color);
-	void (OPENVR_FNTABLE_CALLTYPE *GetBoundsColor)(struct HmdColor_t * pOutputColorArray, int nNumOutputColors, float flCollisionBoundsFadeDistance, struct HmdColor_t * pOutputCameraColor);
-	bool (OPENVR_FNTABLE_CALLTYPE *AreBoundsVisible)();
-	void (OPENVR_FNTABLE_CALLTYPE *ForceBoundsVisible)(bool bForce);
-};
-
-struct VR_IVRChaperoneSetup_FnTable
-{
-	bool (OPENVR_FNTABLE_CALLTYPE *CommitWorkingCopy)(EChaperoneConfigFile configFile);
-	void (OPENVR_FNTABLE_CALLTYPE *RevertWorkingCopy)();
-	bool (OPENVR_FNTABLE_CALLTYPE *GetWorkingPlayAreaSize)(float * pSizeX, float * pSizeZ);
-	bool (OPENVR_FNTABLE_CALLTYPE *GetWorkingPlayAreaRect)(struct HmdQuad_t * rect);
-	bool (OPENVR_FNTABLE_CALLTYPE *GetWorkingCollisionBoundsInfo)(struct HmdQuad_t * pQuadsBuffer, uint32_t * punQuadsCount);
-	bool (OPENVR_FNTABLE_CALLTYPE *GetLiveCollisionBoundsInfo)(struct HmdQuad_t * pQuadsBuffer, uint32_t * punQuadsCount);
-	bool (OPENVR_FNTABLE_CALLTYPE *GetWorkingSeatedZeroPoseToRawTrackingPose)(struct HmdMatrix34_t * pmatSeatedZeroPoseToRawTrackingPose);
-	bool (OPENVR_FNTABLE_CALLTYPE *GetWorkingStandingZeroPoseToRawTrackingPose)(struct HmdMatrix34_t * pmatStandingZeroPoseToRawTrackingPose);
-	void (OPENVR_FNTABLE_CALLTYPE *SetWorkingPlayAreaSize)(float sizeX, float sizeZ);
-	void (OPENVR_FNTABLE_CALLTYPE *SetWorkingCollisionBoundsInfo)(struct HmdQuad_t * pQuadsBuffer, uint32_t unQuadsCount);
-	void (OPENVR_FNTABLE_CALLTYPE *SetWorkingSeatedZeroPoseToRawTrackingPose)(struct HmdMatrix34_t * pMatSeatedZeroPoseToRawTrackingPose);
-	void (OPENVR_FNTABLE_CALLTYPE *SetWorkingStandingZeroPoseToRawTrackingPose)(struct HmdMatrix34_t * pMatStandingZeroPoseToRawTrackingPose);
-	void (OPENVR_FNTABLE_CALLTYPE *ReloadFromDisk)(EChaperoneConfigFile configFile);
-	bool (OPENVR_FNTABLE_CALLTYPE *GetLiveSeatedZeroPoseToRawTrackingPose)(struct HmdMatrix34_t * pmatSeatedZeroPoseToRawTrackingPose);
-	void (OPENVR_FNTABLE_CALLTYPE *SetWorkingCollisionBoundsTagsInfo)(uint8_t * pTagsBuffer, uint32_t unTagCount);
-	bool (OPENVR_FNTABLE_CALLTYPE *GetLiveCollisionBoundsTagsInfo)(uint8_t * pTagsBuffer, uint32_t * punTagCount);
-	bool (OPENVR_FNTABLE_CALLTYPE *SetWorkingPhysicalBoundsInfo)(struct HmdQuad_t * pQuadsBuffer, uint32_t unQuadsCount);
-	bool (OPENVR_FNTABLE_CALLTYPE *GetLivePhysicalBoundsInfo)(struct HmdQuad_t * pQuadsBuffer, uint32_t * punQuadsCount);
-	bool (OPENVR_FNTABLE_CALLTYPE *ExportLiveToBuffer)(char * pBuffer, uint32_t * pnBufferLength);
-	bool (OPENVR_FNTABLE_CALLTYPE *ImportFromBufferToWorking)(char * pBuffer, uint32_t nImportFlags);
-};
-
-struct VR_IVRCompositor_FnTable
-{
-	void (OPENVR_FNTABLE_CALLTYPE *SetTrackingSpace)(ETrackingUniverseOrigin eOrigin);
-	ETrackingUniverseOrigin (OPENVR_FNTABLE_CALLTYPE *GetTrackingSpace)();
-	EVRCompositorError (OPENVR_FNTABLE_CALLTYPE *WaitGetPoses)(struct TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, struct TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount);
-	EVRCompositorError (OPENVR_FNTABLE_CALLTYPE *GetLastPoses)(struct TrackedDevicePose_t * pRenderPoseArray, uint32_t unRenderPoseArrayCount, struct TrackedDevicePose_t * pGamePoseArray, uint32_t unGamePoseArrayCount);
-	EVRCompositorError (OPENVR_FNTABLE_CALLTYPE *GetLastPoseForTrackedDeviceIndex)(TrackedDeviceIndex_t unDeviceIndex, struct TrackedDevicePose_t * pOutputPose, struct TrackedDevicePose_t * pOutputGamePose);
-	EVRCompositorError (OPENVR_FNTABLE_CALLTYPE *Submit)(EVREye eEye, struct Texture_t * pTexture, struct VRTextureBounds_t * pBounds, EVRSubmitFlags nSubmitFlags);
-	void (OPENVR_FNTABLE_CALLTYPE *ClearLastSubmittedFrame)();
-	void (OPENVR_FNTABLE_CALLTYPE *PostPresentHandoff)();
-	bool (OPENVR_FNTABLE_CALLTYPE *GetFrameTiming)(struct Compositor_FrameTiming * pTiming, uint32_t unFramesAgo);
-	uint32_t (OPENVR_FNTABLE_CALLTYPE *GetFrameTimings)(struct Compositor_FrameTiming * pTiming, uint32_t nFrames);
-	float (OPENVR_FNTABLE_CALLTYPE *GetFrameTimeRemaining)();
-	void (OPENVR_FNTABLE_CALLTYPE *GetCumulativeStats)(struct Compositor_CumulativeStats * pStats, uint32_t nStatsSizeInBytes);
-	void (OPENVR_FNTABLE_CALLTYPE *FadeToColor)(float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground);
-	struct HmdColor_t (OPENVR_FNTABLE_CALLTYPE *GetCurrentFadeColor)(bool bBackground);
-	void (OPENVR_FNTABLE_CALLTYPE *FadeGrid)(float fSeconds, bool bFadeIn);
-	float (OPENVR_FNTABLE_CALLTYPE *GetCurrentGridAlpha)();
-	EVRCompositorError (OPENVR_FNTABLE_CALLTYPE *SetSkyboxOverride)(struct Texture_t * pTextures, uint32_t unTextureCount);
-	void (OPENVR_FNTABLE_CALLTYPE *ClearSkyboxOverride)();
-	void (OPENVR_FNTABLE_CALLTYPE *CompositorBringToFront)();
-	void (OPENVR_FNTABLE_CALLTYPE *CompositorGoToBack)();
-	void (OPENVR_FNTABLE_CALLTYPE *CompositorQuit)();
-	bool (OPENVR_FNTABLE_CALLTYPE *IsFullscreen)();
-	uint32_t (OPENVR_FNTABLE_CALLTYPE *GetCurrentSceneFocusProcess)();
-	uint32_t (OPENVR_FNTABLE_CALLTYPE *GetLastFrameRenderer)();
-	bool (OPENVR_FNTABLE_CALLTYPE *CanRenderScene)();
-	void (OPENVR_FNTABLE_CALLTYPE *ShowMirrorWindow)();
-	void (OPENVR_FNTABLE_CALLTYPE *HideMirrorWindow)();
-	bool (OPENVR_FNTABLE_CALLTYPE *IsMirrorWindowVisible)();
-	void (OPENVR_FNTABLE_CALLTYPE *CompositorDumpImages)();
-	bool (OPENVR_FNTABLE_CALLTYPE *ShouldAppRenderWithLowResources)();
-	void (OPENVR_FNTABLE_CALLTYPE *ForceInterleavedReprojectionOn)(bool bOverride);
-	void (OPENVR_FNTABLE_CALLTYPE *ForceReconnectProcess)();
-	void (OPENVR_FNTABLE_CALLTYPE *SuspendRendering)(bool bSuspend);
-	EVRCompositorError (OPENVR_FNTABLE_CALLTYPE *GetMirrorTextureD3D11)(EVREye eEye, void * pD3D11DeviceOrResource, void ** ppD3D11ShaderResourceView);
-	void (OPENVR_FNTABLE_CALLTYPE *ReleaseMirrorTextureD3D11)(void * pD3D11ShaderResourceView);
-	EVRCompositorError (OPENVR_FNTABLE_CALLTYPE *GetMirrorTextureGL)(EVREye eEye, glUInt_t * pglTextureId, glSharedTextureHandle_t * pglSharedTextureHandle);
-	bool (OPENVR_FNTABLE_CALLTYPE *ReleaseSharedGLTexture)(glUInt_t glTextureId, glSharedTextureHandle_t glSharedTextureHandle);
-	void (OPENVR_FNTABLE_CALLTYPE *LockGLSharedTextureForAccess)(glSharedTextureHandle_t glSharedTextureHandle);
-	void (OPENVR_FNTABLE_CALLTYPE *UnlockGLSharedTextureForAccess)(glSharedTextureHandle_t glSharedTextureHandle);
-	uint32_t (OPENVR_FNTABLE_CALLTYPE *GetVulkanInstanceExtensionsRequired)(char * pchValue, uint32_t unBufferSize);
-	uint32_t (OPENVR_FNTABLE_CALLTYPE *GetVulkanDeviceExtensionsRequired)(struct VkPhysicalDevice_T * pPhysicalDevice, char * pchValue, uint32_t unBufferSize);
-};
-
-struct VR_IVROverlay_FnTable
-{
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *FindOverlay)(char * pchOverlayKey, VROverlayHandle_t * pOverlayHandle);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *CreateOverlay)(char * pchOverlayKey, char * pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *DestroyOverlay)(VROverlayHandle_t ulOverlayHandle);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetHighQualityOverlay)(VROverlayHandle_t ulOverlayHandle);
-	VROverlayHandle_t (OPENVR_FNTABLE_CALLTYPE *GetHighQualityOverlay)();
-	uint32_t (OPENVR_FNTABLE_CALLTYPE *GetOverlayKey)(VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError);
-	uint32_t (OPENVR_FNTABLE_CALLTYPE *GetOverlayName)(VROverlayHandle_t ulOverlayHandle, char * pchValue, uint32_t unBufferSize, EVROverlayError * pError);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayImageData)(VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unBufferSize, uint32_t * punWidth, uint32_t * punHeight);
-	char * (OPENVR_FNTABLE_CALLTYPE *GetOverlayErrorNameFromEnum)(EVROverlayError error);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayRenderingPid)(VROverlayHandle_t ulOverlayHandle, uint32_t unPID);
-	uint32_t (OPENVR_FNTABLE_CALLTYPE *GetOverlayRenderingPid)(VROverlayHandle_t ulOverlayHandle);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayFlag)(VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayFlag)(VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool * pbEnabled);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayColor)(VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayColor)(VROverlayHandle_t ulOverlayHandle, float * pfRed, float * pfGreen, float * pfBlue);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayAlpha)(VROverlayHandle_t ulOverlayHandle, float fAlpha);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayAlpha)(VROverlayHandle_t ulOverlayHandle, float * pfAlpha);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayTexelAspect)(VROverlayHandle_t ulOverlayHandle, float fTexelAspect);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayTexelAspect)(VROverlayHandle_t ulOverlayHandle, float * pfTexelAspect);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlaySortOrder)(VROverlayHandle_t ulOverlayHandle, uint32_t unSortOrder);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlaySortOrder)(VROverlayHandle_t ulOverlayHandle, uint32_t * punSortOrder);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayWidthInMeters)(VROverlayHandle_t ulOverlayHandle, float fWidthInMeters);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayWidthInMeters)(VROverlayHandle_t ulOverlayHandle, float * pfWidthInMeters);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayAutoCurveDistanceRangeInMeters)(VROverlayHandle_t ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayAutoCurveDistanceRangeInMeters)(VROverlayHandle_t ulOverlayHandle, float * pfMinDistanceInMeters, float * pfMaxDistanceInMeters);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayTextureColorSpace)(VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayTextureColorSpace)(VROverlayHandle_t ulOverlayHandle, EColorSpace * peTextureColorSpace);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayTextureBounds)(VROverlayHandle_t ulOverlayHandle, struct VRTextureBounds_t * pOverlayTextureBounds);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayTextureBounds)(VROverlayHandle_t ulOverlayHandle, struct VRTextureBounds_t * pOverlayTextureBounds);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayTransformType)(VROverlayHandle_t ulOverlayHandle, VROverlayTransformType * peTransformType);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayTransformAbsolute)(VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, struct HmdMatrix34_t * pmatTrackingOriginToOverlayTransform);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayTransformAbsolute)(VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin * peTrackingOrigin, struct HmdMatrix34_t * pmatTrackingOriginToOverlayTransform);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayTransformTrackedDeviceRelative)(VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, struct HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayTransformTrackedDeviceRelative)(VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punTrackedDevice, struct HmdMatrix34_t * pmatTrackedDeviceToOverlayTransform);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayTransformTrackedDeviceComponent)(VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, char * pchComponentName);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayTransformTrackedDeviceComponent)(VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t * punDeviceIndex, char * pchComponentName, uint32_t unComponentNameSize);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *ShowOverlay)(VROverlayHandle_t ulOverlayHandle);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *HideOverlay)(VROverlayHandle_t ulOverlayHandle);
-	bool (OPENVR_FNTABLE_CALLTYPE *IsOverlayVisible)(VROverlayHandle_t ulOverlayHandle);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetTransformForOverlayCoordinates)(VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, struct HmdVector2_t coordinatesInOverlay, struct HmdMatrix34_t * pmatTransform);
-	bool (OPENVR_FNTABLE_CALLTYPE *PollNextOverlayEvent)(VROverlayHandle_t ulOverlayHandle, struct VREvent_t * pEvent, uint32_t uncbVREvent);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayInputMethod)(VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod * peInputMethod);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayInputMethod)(VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayMouseScale)(VROverlayHandle_t ulOverlayHandle, struct HmdVector2_t * pvecMouseScale);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayMouseScale)(VROverlayHandle_t ulOverlayHandle, struct HmdVector2_t * pvecMouseScale);
-	bool (OPENVR_FNTABLE_CALLTYPE *ComputeOverlayIntersection)(VROverlayHandle_t ulOverlayHandle, struct VROverlayIntersectionParams_t * pParams, struct VROverlayIntersectionResults_t * pResults);
-	bool (OPENVR_FNTABLE_CALLTYPE *HandleControllerOverlayInteractionAsMouse)(VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex);
-	bool (OPENVR_FNTABLE_CALLTYPE *IsHoverTargetOverlay)(VROverlayHandle_t ulOverlayHandle);
-	VROverlayHandle_t (OPENVR_FNTABLE_CALLTYPE *GetGamepadFocusOverlay)();
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetGamepadFocusOverlay)(VROverlayHandle_t ulNewFocusOverlay);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayNeighbor)(EOverlayDirection eDirection, VROverlayHandle_t ulFrom, VROverlayHandle_t ulTo);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *MoveGamepadFocusToNeighbor)(EOverlayDirection eDirection, VROverlayHandle_t ulFrom);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayTexture)(VROverlayHandle_t ulOverlayHandle, struct Texture_t * pTexture);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *ClearOverlayTexture)(VROverlayHandle_t ulOverlayHandle);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayRaw)(VROverlayHandle_t ulOverlayHandle, void * pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayFromFile)(VROverlayHandle_t ulOverlayHandle, char * pchFilePath);
-	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);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *ReleaseNativeOverlayHandle)(VROverlayHandle_t ulOverlayHandle, void * pNativeTextureHandle);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayTextureSize)(VROverlayHandle_t ulOverlayHandle, uint32_t * pWidth, uint32_t * pHeight);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *CreateDashboardOverlay)(char * pchOverlayKey, char * pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t * pThumbnailHandle);
-	bool (OPENVR_FNTABLE_CALLTYPE *IsDashboardVisible)();
-	bool (OPENVR_FNTABLE_CALLTYPE *IsActiveDashboardOverlay)(VROverlayHandle_t ulOverlayHandle);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetDashboardOverlaySceneProcess)(VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetDashboardOverlaySceneProcess)(VROverlayHandle_t ulOverlayHandle, uint32_t * punProcessId);
-	void (OPENVR_FNTABLE_CALLTYPE *ShowDashboard)(char * pchOverlayToShow);
-	TrackedDeviceIndex_t (OPENVR_FNTABLE_CALLTYPE *GetPrimaryDashboardDevice)();
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *ShowKeyboard)(EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, char * pchDescription, uint32_t unCharMax, char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *ShowKeyboardForOverlay)(VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, char * pchDescription, uint32_t unCharMax, char * pchExistingText, bool bUseMinimalMode, uint64_t uUserValue);
-	uint32_t (OPENVR_FNTABLE_CALLTYPE *GetKeyboardText)(char * pchText, uint32_t cchText);
-	void (OPENVR_FNTABLE_CALLTYPE *HideKeyboard)();
-	void (OPENVR_FNTABLE_CALLTYPE *SetKeyboardTransformAbsolute)(ETrackingUniverseOrigin eTrackingOrigin, struct HmdMatrix34_t * pmatTrackingOriginToKeyboardTransform);
-	void (OPENVR_FNTABLE_CALLTYPE *SetKeyboardPositionForOverlay)(VROverlayHandle_t ulOverlayHandle, struct HmdRect2_t avoidRect);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *SetOverlayIntersectionMask)(VROverlayHandle_t ulOverlayHandle, struct VROverlayIntersectionMaskPrimitive_t * pMaskPrimitives, uint32_t unNumMaskPrimitives, uint32_t unPrimitiveSize);
-	EVROverlayError (OPENVR_FNTABLE_CALLTYPE *GetOverlayFlags)(VROverlayHandle_t ulOverlayHandle, uint32_t * pFlags);
-	VRMessageOverlayResponse (OPENVR_FNTABLE_CALLTYPE *ShowMessageOverlay)(char * pchText, char * pchCaption, char * pchButton0Text, char * pchButton1Text, char * pchButton2Text, char * pchButton3Text);
-};
-
-struct VR_IVRRenderModels_FnTable
-{
-	EVRRenderModelError (OPENVR_FNTABLE_CALLTYPE *LoadRenderModel_Async)(char * pchRenderModelName, struct RenderModel_t ** ppRenderModel);
-	void (OPENVR_FNTABLE_CALLTYPE *FreeRenderModel)(struct RenderModel_t * pRenderModel);
-	EVRRenderModelError (OPENVR_FNTABLE_CALLTYPE *LoadTexture_Async)(TextureID_t textureId, struct RenderModel_TextureMap_t ** ppTexture);
-	void (OPENVR_FNTABLE_CALLTYPE *FreeTexture)(struct RenderModel_TextureMap_t * pTexture);
-	EVRRenderModelError (OPENVR_FNTABLE_CALLTYPE *LoadTextureD3D11_Async)(TextureID_t textureId, void * pD3D11Device, void ** ppD3D11Texture2D);
-	EVRRenderModelError (OPENVR_FNTABLE_CALLTYPE *LoadIntoTextureD3D11_Async)(TextureID_t textureId, void * pDstTexture);
-	void (OPENVR_FNTABLE_CALLTYPE *FreeTextureD3D11)(void * pD3D11Texture2D);
-	uint32_t (OPENVR_FNTABLE_CALLTYPE *GetRenderModelName)(uint32_t unRenderModelIndex, char * pchRenderModelName, uint32_t unRenderModelNameLen);
-	uint32_t (OPENVR_FNTABLE_CALLTYPE *GetRenderModelCount)();
-	uint32_t (OPENVR_FNTABLE_CALLTYPE *GetComponentCount)(char * pchRenderModelName);
-	uint32_t (OPENVR_FNTABLE_CALLTYPE *GetComponentName)(char * pchRenderModelName, uint32_t unComponentIndex, char * pchComponentName, uint32_t unComponentNameLen);
-	uint64_t (OPENVR_FNTABLE_CALLTYPE *GetComponentButtonMask)(char * pchRenderModelName, char * pchComponentName);
-	uint32_t (OPENVR_FNTABLE_CALLTYPE *GetComponentRenderModelName)(char * pchRenderModelName, char * pchComponentName, char * pchComponentRenderModelName, uint32_t unComponentRenderModelNameLen);
-	bool (OPENVR_FNTABLE_CALLTYPE *GetComponentState)(char * pchRenderModelName, char * pchComponentName, VRControllerState_t * pControllerState, struct RenderModel_ControllerMode_State_t * pState, struct RenderModel_ComponentState_t * pComponentState);
-	bool (OPENVR_FNTABLE_CALLTYPE *RenderModelHasComponent)(char * pchRenderModelName, char * pchComponentName);
-	uint32_t (OPENVR_FNTABLE_CALLTYPE *GetRenderModelThumbnailURL)(char * pchRenderModelName, char * pchThumbnailURL, uint32_t unThumbnailURLLen, EVRRenderModelError * peError);
-	uint32_t (OPENVR_FNTABLE_CALLTYPE *GetRenderModelOriginalPath)(char * pchRenderModelName, char * pchOriginalPath, uint32_t unOriginalPathLen, EVRRenderModelError * peError);
-	char * (OPENVR_FNTABLE_CALLTYPE *GetRenderModelErrorNameFromEnum)(EVRRenderModelError error);
-};
-
-struct VR_IVRNotifications_FnTable
-{
-	EVRNotificationError (OPENVR_FNTABLE_CALLTYPE *CreateNotification)(VROverlayHandle_t ulOverlayHandle, uint64_t ulUserValue, EVRNotificationType type, char * pchText, EVRNotificationStyle style, struct NotificationBitmap_t * pImage, VRNotificationId * pNotificationId);
-	EVRNotificationError (OPENVR_FNTABLE_CALLTYPE *RemoveNotification)(VRNotificationId notificationId);
-};
-
-struct VR_IVRSettings_FnTable
-{
-	char * (OPENVR_FNTABLE_CALLTYPE *GetSettingsErrorNameFromEnum)(EVRSettingsError eError);
-	bool (OPENVR_FNTABLE_CALLTYPE *Sync)(bool bForce, EVRSettingsError * peError);
-	void (OPENVR_FNTABLE_CALLTYPE *SetBool)(char * pchSection, char * pchSettingsKey, bool bValue, EVRSettingsError * peError);
-	void (OPENVR_FNTABLE_CALLTYPE *SetInt32)(char * pchSection, char * pchSettingsKey, int32_t nValue, EVRSettingsError * peError);
-	void (OPENVR_FNTABLE_CALLTYPE *SetFloat)(char * pchSection, char * pchSettingsKey, float flValue, EVRSettingsError * peError);
-	void (OPENVR_FNTABLE_CALLTYPE *SetString)(char * pchSection, char * pchSettingsKey, char * pchValue, EVRSettingsError * peError);
-	bool (OPENVR_FNTABLE_CALLTYPE *GetBool)(char * pchSection, char * pchSettingsKey, EVRSettingsError * peError);
-	int32_t (OPENVR_FNTABLE_CALLTYPE *GetInt32)(char * pchSection, char * pchSettingsKey, EVRSettingsError * peError);
-	float (OPENVR_FNTABLE_CALLTYPE *GetFloat)(char * pchSection, char * pchSettingsKey, EVRSettingsError * peError);
-	void (OPENVR_FNTABLE_CALLTYPE *GetString)(char * pchSection, char * pchSettingsKey, char * pchValue, uint32_t unValueLen, EVRSettingsError * peError);
-	void (OPENVR_FNTABLE_CALLTYPE *RemoveSection)(char * pchSection, EVRSettingsError * peError);
-	void (OPENVR_FNTABLE_CALLTYPE *RemoveKeyInSection)(char * pchSection, char * pchSettingsKey, EVRSettingsError * peError);
-};
-
-struct VR_IVRScreenshots_FnTable
-{
-	EVRScreenshotError (OPENVR_FNTABLE_CALLTYPE *RequestScreenshot)(ScreenshotHandle_t * pOutScreenshotHandle, EVRScreenshotType type, char * pchPreviewFilename, char * pchVRFilename);
-	EVRScreenshotError (OPENVR_FNTABLE_CALLTYPE *HookScreenshot)(EVRScreenshotType * pSupportedTypes, int numTypes);
-	EVRScreenshotType (OPENVR_FNTABLE_CALLTYPE *GetScreenshotPropertyType)(ScreenshotHandle_t screenshotHandle, EVRScreenshotError * pError);
-	uint32_t (OPENVR_FNTABLE_CALLTYPE *GetScreenshotPropertyFilename)(ScreenshotHandle_t screenshotHandle, EVRScreenshotPropertyFilenames filenameType, char * pchFilename, uint32_t cchFilename, EVRScreenshotError * pError);
-	EVRScreenshotError (OPENVR_FNTABLE_CALLTYPE *UpdateScreenshotProgress)(ScreenshotHandle_t screenshotHandle, float flProgress);
-	EVRScreenshotError (OPENVR_FNTABLE_CALLTYPE *TakeStereoScreenshot)(ScreenshotHandle_t * pOutScreenshotHandle, char * pchPreviewFilename, char * pchVRFilename);
-	EVRScreenshotError (OPENVR_FNTABLE_CALLTYPE *SubmitScreenshot)(ScreenshotHandle_t screenshotHandle, EVRScreenshotType type, char * pchSourcePreviewFilename, char * pchSourceVRFilename);
-};
-
-struct VR_IVRResources_FnTable
-{
-	uint32_t (OPENVR_FNTABLE_CALLTYPE *LoadSharedResource)(char * pchResourceName, char * pchBuffer, uint32_t unBufferLen);
-	uint32_t (OPENVR_FNTABLE_CALLTYPE *GetResourceFullPath)(char * pchResourceName, char * pchResourceTypeDirectory, char * pchPathBuffer, uint32_t unBufferLen);
-};
-
-
-#if 0
-// Global entry points
-S_API intptr_t VR_InitInternal( EVRInitError *peError, EVRApplicationType eType );
-S_API void VR_ShutdownInternal();
-S_API bool VR_IsHmdPresent();
-S_API intptr_t VR_GetGenericInterface( const char *pchInterfaceVersion, EVRInitError *peError );
-S_API bool VR_IsRuntimeInstalled();
-S_API const char * VR_GetVRInitErrorAsSymbol( EVRInitError error );
-S_API const char * VR_GetVRInitErrorAsEnglishDescription( EVRInitError error );
-#endif
-
-#endif // __OPENVR_API_FLAT_H__
-
-

+ 0 - 2541
libraries/openvr/include/openvr_driver.h

@@ -1,2541 +0,0 @@
-#pragma once
-
-// openvr_driver.h
-//========= Copyright Valve Corporation ============//
-// Dynamically generated file. Do not modify this file directly.
-
-#ifndef _OPENVR_DRIVER_API
-#define _OPENVR_DRIVER_API
-
-#include <stdint.h>
-
-
-
-// vrtypes.h
-#ifndef _INCLUDE_VRTYPES_H
-#define _INCLUDE_VRTYPES_H
-
-// Forward declarations to avoid requiring vulkan.h
-struct VkDevice_T;
-struct VkPhysicalDevice_T;
-struct VkInstance_T;
-struct VkQueue_T;
-
-// Forward declarations to avoid requiring d3d12.h
-struct ID3D12Resource;
-struct ID3D12CommandQueue;
-
-namespace vr
-{
-
-#if defined(__linux__) || defined(__APPLE__) 
-	// The 32-bit version of gcc has the alignment requirement for uint64 and double set to
-	// 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned.
-	// The 64-bit version of gcc has the alignment requirement for these types set to
-	// 8 meaning that unless we use #pragma pack(4) our structures will get bigger.
-	// The 64-bit structure packing has to match the 32-bit structure packing for each platform.
-	#pragma pack( push, 4 )
-#else
-	#pragma pack( push, 8 )
-#endif
-
-typedef void* glSharedTextureHandle_t;
-typedef int32_t glInt_t;
-typedef uint32_t glUInt_t;
-
-// right-handed system
-// +y is up
-// +x is to the right
-// -z is going away from you
-// Distance unit is  meters
-struct HmdMatrix34_t
-{
-	float m[3][4];
-};
-
-struct HmdMatrix44_t
-{
-	float m[4][4];
-};
-
-struct HmdVector3_t
-{
-	float v[3];
-};
-
-struct HmdVector4_t
-{
-	float v[4];
-};
-
-struct HmdVector3d_t
-{
-	double v[3];
-};
-
-struct HmdVector2_t
-{
-	float v[2];
-};
-
-struct HmdQuaternion_t
-{
-	double w, x, y, z;
-};
-
-struct HmdColor_t
-{
-	float r, g, b, a;
-};
-
-struct HmdQuad_t
-{
-	HmdVector3_t vCorners[ 4 ];
-};
-
-struct HmdRect2_t
-{
-	HmdVector2_t vTopLeft;
-	HmdVector2_t vBottomRight;
-};
-
-/** Used to return the post-distortion UVs for each color channel. 
-* UVs range from 0 to 1 with 0,0 in the upper left corner of the 
-* source render target. The 0,0 to 1,1 range covers a single eye. */
-struct DistortionCoordinates_t
-{
-	float rfRed[2];
-	float rfGreen[2];
-	float rfBlue[2];
-};
-
-enum EVREye
-{
-	Eye_Left = 0,
-	Eye_Right = 1
-};
-
-enum ETextureType
-{
-	TextureType_DirectX = 0, // Handle is an ID3D11Texture
-	TextureType_OpenGL = 1,  // Handle is an OpenGL texture name or an OpenGL render buffer name, depending on submit flags
-	TextureType_Vulkan = 2, // Handle is a pointer to a VRVulkanTextureData_t structure
-	TextureType_IOSurface = 3, // Handle is a macOS cross-process-sharable IOSurface
-	TextureType_DirectX12 = 4, // Handle is a pointer to a D3D12TextureData_t structure
-};
-
-enum EColorSpace
-{
-	ColorSpace_Auto = 0,	// Assumes 'gamma' for 8-bit per component formats, otherwise 'linear'.  This mirrors the DXGI formats which have _SRGB variants.
-	ColorSpace_Gamma = 1,	// Texture data can be displayed directly on the display without any conversion (a.k.a. display native format).
-	ColorSpace_Linear = 2,	// Same as gamma but has been converted to a linear representation using DXGI's sRGB conversion algorithm.
-};
-
-struct Texture_t
-{
-	void* handle; // See ETextureType definition above
-	ETextureType eType;
-	EColorSpace eColorSpace;
-};
-
-// Handle to a shared texture (HANDLE on Windows obtained using OpenSharedResource).
-typedef uint64_t SharedTextureHandle_t;
-#define INVALID_SHARED_TEXTURE_HANDLE	((vr::SharedTextureHandle_t)0)
-
-enum ETrackingResult
-{
-	TrackingResult_Uninitialized			= 1,
-
-	TrackingResult_Calibrating_InProgress	= 100,
-	TrackingResult_Calibrating_OutOfRange	= 101,
-
-	TrackingResult_Running_OK				= 200,
-	TrackingResult_Running_OutOfRange		= 201,
-};
-
-static const uint32_t k_unMaxDriverDebugResponseSize = 32768;
-
-/** Used to pass device IDs to API calls */
-typedef uint32_t TrackedDeviceIndex_t;
-static const uint32_t k_unTrackedDeviceIndex_Hmd = 0;
-static const uint32_t k_unMaxTrackedDeviceCount = 16;
-static const uint32_t k_unTrackedDeviceIndexOther = 0xFFFFFFFE;
-static const uint32_t k_unTrackedDeviceIndexInvalid = 0xFFFFFFFF;
-
-/** Describes what kind of object is being tracked at a given ID */
-enum ETrackedDeviceClass
-{
-	TrackedDeviceClass_Invalid = 0,				// the ID was not valid.
-	TrackedDeviceClass_HMD = 1,					// Head-Mounted Displays
-	TrackedDeviceClass_Controller = 2,			// Tracked controllers
-	TrackedDeviceClass_GenericTracker = 3,		// Generic trackers, similar to controllers
-	TrackedDeviceClass_TrackingReference = 4,	// Camera and base stations that serve as tracking reference points
-};
-
-
-/** Describes what specific role associated with a tracked device */
-enum ETrackedControllerRole
-{
-	TrackedControllerRole_Invalid = 0,					// Invalid value for controller type
-	TrackedControllerRole_LeftHand = 1,					// Tracked device associated with the left hand
-	TrackedControllerRole_RightHand = 2,				// Tracked device associated with the right hand
-};
-
-
-/** describes a single pose for a tracked object */
-struct TrackedDevicePose_t
-{
-	HmdMatrix34_t mDeviceToAbsoluteTracking;
-	HmdVector3_t vVelocity;				// velocity in tracker space in m/s
-	HmdVector3_t vAngularVelocity;		// angular velocity in radians/s (?)
-	ETrackingResult eTrackingResult;
-	bool bPoseIsValid;
-
-	// This indicates that there is a device connected for this spot in the pose array.
-	// It could go from true to false if the user unplugs the device.
-	bool bDeviceIsConnected;
-};
-
-/** Identifies which style of tracking origin the application wants to use
-* for the poses it is requesting */
-enum ETrackingUniverseOrigin
-{
-	TrackingUniverseSeated = 0,		// Poses are provided relative to the seated zero pose
-	TrackingUniverseStanding = 1,	// Poses are provided relative to the safe bounds configured by the user
-	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.
-};
-
-// Refers to a single container of properties
-typedef uint64_t PropertyContainerHandle_t;
-typedef uint32_t PropertyTypeTag_t;
-
-static const PropertyContainerHandle_t k_ulInvalidPropertyContainer = 0;
-static const PropertyTypeTag_t k_unInvalidPropertyTag = 0;
-
-// Use these tags to set/get common types as struct properties
-static const PropertyTypeTag_t k_unFloatPropertyTag = 1;
-static const PropertyTypeTag_t k_unInt32PropertyTag = 2;
-static const PropertyTypeTag_t k_unUint64PropertyTag = 3;
-static const PropertyTypeTag_t k_unBoolPropertyTag = 4;
-static const PropertyTypeTag_t k_unStringPropertyTag = 5;
-
-static const PropertyTypeTag_t k_unHmdMatrix34PropertyTag = 20;
-static const PropertyTypeTag_t k_unHmdMatrix44PropertyTag = 21;
-static const PropertyTypeTag_t k_unHmdVector3PropertyTag = 22;
-static const PropertyTypeTag_t k_unHmdVector4PropertyTag = 23;
-
-static const PropertyTypeTag_t k_unHiddenAreaPropertyTag = 30;
-
-static const PropertyTypeTag_t k_unOpenVRInternalReserved_Start = 1000;
-static const PropertyTypeTag_t k_unOpenVRInternalReserved_End = 10000;
-
-
-/** Each entry in this enum represents a property that can be retrieved about a
-* tracked device. Many fields are only valid for one ETrackedDeviceClass. */
-enum ETrackedDeviceProperty
-{
-	Prop_Invalid								= 0,
-
-	// general properties that apply to all device classes
-	Prop_TrackingSystemName_String				= 1000,
-	Prop_ModelNumber_String						= 1001,
-	Prop_SerialNumber_String					= 1002,
-	Prop_RenderModelName_String					= 1003,
-	Prop_WillDriftInYaw_Bool					= 1004,
-	Prop_ManufacturerName_String				= 1005,
-	Prop_TrackingFirmwareVersion_String			= 1006,
-	Prop_HardwareRevision_String				= 1007,
-	Prop_AllWirelessDongleDescriptions_String	= 1008,
-	Prop_ConnectedWirelessDongle_String			= 1009,
-	Prop_DeviceIsWireless_Bool					= 1010,
-	Prop_DeviceIsCharging_Bool					= 1011,
-	Prop_DeviceBatteryPercentage_Float			= 1012, // 0 is empty, 1 is full
-	Prop_StatusDisplayTransform_Matrix34		= 1013,
-	Prop_Firmware_UpdateAvailable_Bool			= 1014,
-	Prop_Firmware_ManualUpdate_Bool				= 1015,
-	Prop_Firmware_ManualUpdateURL_String		= 1016,
-	Prop_HardwareRevision_Uint64				= 1017,
-	Prop_FirmwareVersion_Uint64					= 1018,
-	Prop_FPGAVersion_Uint64						= 1019,
-	Prop_VRCVersion_Uint64						= 1020,
-	Prop_RadioVersion_Uint64					= 1021,
-	Prop_DongleVersion_Uint64					= 1022,
-	Prop_BlockServerShutdown_Bool				= 1023,
-	Prop_CanUnifyCoordinateSystemWithHmd_Bool	= 1024,
-	Prop_ContainsProximitySensor_Bool			= 1025,
-	Prop_DeviceProvidesBatteryStatus_Bool		= 1026,
-	Prop_DeviceCanPowerOff_Bool					= 1027,
-	Prop_Firmware_ProgrammingTarget_String		= 1028,
-	Prop_DeviceClass_Int32						= 1029,
-	Prop_HasCamera_Bool							= 1030,
-	Prop_DriverVersion_String                   = 1031,
-	Prop_Firmware_ForceUpdateRequired_Bool      = 1032,
-	Prop_ViveSystemButtonFixRequired_Bool		= 1033,
-	Prop_ParentDriver_Uint64					= 1034,
-
-
-	// Properties that are unique to TrackedDeviceClass_HMD
-	Prop_ReportsTimeSinceVSync_Bool				= 2000,
-	Prop_SecondsFromVsyncToPhotons_Float		= 2001,
-	Prop_DisplayFrequency_Float					= 2002,
-	Prop_UserIpdMeters_Float					= 2003,
-	Prop_CurrentUniverseId_Uint64				= 2004, 
-	Prop_PreviousUniverseId_Uint64				= 2005, 
-	Prop_DisplayFirmwareVersion_Uint64			= 2006,
-	Prop_IsOnDesktop_Bool						= 2007,
-	Prop_DisplayMCType_Int32					= 2008,
-	Prop_DisplayMCOffset_Float					= 2009,
-	Prop_DisplayMCScale_Float					= 2010,
-	Prop_EdidVendorID_Int32						= 2011,
-	Prop_DisplayMCImageLeft_String              = 2012,
-	Prop_DisplayMCImageRight_String             = 2013,
-	Prop_DisplayGCBlackClamp_Float				= 2014,
-	Prop_EdidProductID_Int32					= 2015,
-	Prop_CameraToHeadTransform_Matrix34			= 2016,
-	Prop_DisplayGCType_Int32					= 2017,
-	Prop_DisplayGCOffset_Float					= 2018,
-	Prop_DisplayGCScale_Float					= 2019,
-	Prop_DisplayGCPrescale_Float				= 2020,
-	Prop_DisplayGCImage_String					= 2021,
-	Prop_LensCenterLeftU_Float					= 2022,
-	Prop_LensCenterLeftV_Float					= 2023,
-	Prop_LensCenterRightU_Float					= 2024,
-	Prop_LensCenterRightV_Float					= 2025,
-	Prop_UserHeadToEyeDepthMeters_Float			= 2026,
-	Prop_CameraFirmwareVersion_Uint64			= 2027,
-	Prop_CameraFirmwareDescription_String		= 2028,
-	Prop_DisplayFPGAVersion_Uint64				= 2029,
-	Prop_DisplayBootloaderVersion_Uint64		= 2030,
-	Prop_DisplayHardwareVersion_Uint64			= 2031,
-	Prop_AudioFirmwareVersion_Uint64			= 2032,
-	Prop_CameraCompatibilityMode_Int32			= 2033,
-	Prop_ScreenshotHorizontalFieldOfViewDegrees_Float = 2034,
-	Prop_ScreenshotVerticalFieldOfViewDegrees_Float = 2035,
-	Prop_DisplaySuppressed_Bool					= 2036,
-	Prop_DisplayAllowNightMode_Bool				= 2037,
-	Prop_DisplayMCImageWidth_Int32				= 2038,
-	Prop_DisplayMCImageHeight_Int32				= 2039,
-	Prop_DisplayMCImageNumChannels_Int32		= 2040,
-	Prop_DisplayMCImageData_Binary				= 2041,
-	Prop_UsesDriverDirectMode_Bool				= 2042,
-
-	// Properties that are unique to TrackedDeviceClass_Controller
-	Prop_AttachedDeviceId_String				= 3000,
-	Prop_SupportedButtons_Uint64				= 3001,
-	Prop_Axis0Type_Int32						= 3002, // Return value is of type EVRControllerAxisType
-	Prop_Axis1Type_Int32						= 3003, // Return value is of type EVRControllerAxisType
-	Prop_Axis2Type_Int32						= 3004, // Return value is of type EVRControllerAxisType
-	Prop_Axis3Type_Int32						= 3005, // Return value is of type EVRControllerAxisType
-	Prop_Axis4Type_Int32						= 3006, // Return value is of type EVRControllerAxisType
-	Prop_ControllerRoleHint_Int32				= 3007, // Return value is of type ETrackedControllerRole
-
-	// Properties that are unique to TrackedDeviceClass_TrackingReference
-	Prop_FieldOfViewLeftDegrees_Float			= 4000,
-	Prop_FieldOfViewRightDegrees_Float			= 4001,
-	Prop_FieldOfViewTopDegrees_Float			= 4002,
-	Prop_FieldOfViewBottomDegrees_Float			= 4003,
-	Prop_TrackingRangeMinimumMeters_Float		= 4004,
-	Prop_TrackingRangeMaximumMeters_Float		= 4005,
-	Prop_ModeLabel_String						= 4006,
-
-	// Properties that are used for user interface like icons names
-	Prop_IconPathName_String						= 5000, // usually a directory named "icons"
-	Prop_NamedIconPathDeviceOff_String				= 5001, // PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
-	Prop_NamedIconPathDeviceSearching_String		= 5002, // PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
-	Prop_NamedIconPathDeviceSearchingAlert_String	= 5003, // PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
-	Prop_NamedIconPathDeviceReady_String			= 5004, // PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
-	Prop_NamedIconPathDeviceReadyAlert_String		= 5005, // PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
-	Prop_NamedIconPathDeviceNotReady_String			= 5006, // PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
-	Prop_NamedIconPathDeviceStandby_String			= 5007, // PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
-	Prop_NamedIconPathDeviceAlertLow_String			= 5008, // PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
-
-	// Properties that are used by helpers, but are opaque to applications
-	Prop_DisplayHiddenArea_Binary_Start				= 5100,
-	Prop_DisplayHiddenArea_Binary_End				= 5150,
-
-	// Properties that are unique to drivers
-	Prop_UserConfigPath_String					= 6000,
-	Prop_InstallPath_String						= 6001,
-
-	// Vendors are free to expose private debug data in this reserved region
-	Prop_VendorSpecific_Reserved_Start			= 10000,
-	Prop_VendorSpecific_Reserved_End			= 10999,
-};
-
-/** No string property will ever be longer than this length */
-static const uint32_t k_unMaxPropertyStringSize = 32 * 1024;
-
-/** Used to return errors that occur when reading properties. */
-enum ETrackedPropertyError
-{
-	TrackedProp_Success						= 0,
-	TrackedProp_WrongDataType				= 1,
-	TrackedProp_WrongDeviceClass			= 2,
-	TrackedProp_BufferTooSmall				= 3,
-	TrackedProp_UnknownProperty				= 4, // Driver has not set the property (and may not ever).
-	TrackedProp_InvalidDevice				= 5,
-	TrackedProp_CouldNotContactServer		= 6,
-	TrackedProp_ValueNotProvidedByDevice	= 7,
-	TrackedProp_StringExceedsMaximumLength	= 8,
-	TrackedProp_NotYetAvailable				= 9, // The property value isn't known yet, but is expected soon. Call again later.
-	TrackedProp_PermissionDenied			= 10,
-	TrackedProp_InvalidOperation			= 11,
-};
-
-/** Allows the application to control what part of the provided texture will be used in the
-* frame buffer. */
-struct VRTextureBounds_t
-{
-	float uMin, vMin;
-	float uMax, vMax;
-};
-
-
-/** Allows the application to control how scene textures are used by the compositor when calling Submit. */
-enum EVRSubmitFlags
-{
-	// Simple render path. App submits rendered left and right eye images with no lens distortion correction applied.
-	Submit_Default = 0x00,
-
-	// App submits final left and right eye images with lens distortion already applied (lens distortion makes the images appear
-	// barrel distorted with chromatic aberration correction applied). The app would have used the data returned by
-	// vr::IVRSystem::ComputeDistortion() to apply the correct distortion to the rendered images before calling Submit().
-	Submit_LensDistortionAlreadyApplied = 0x01,
-
-	// If the texture pointer passed in is actually a renderbuffer (e.g. for MSAA in OpenGL) then set this flag.
-	Submit_GlRenderBuffer = 0x02,
-
-	// Do not use
-	Submit_Reserved = 0x04,
-};
-
-/** Data required for passing Vulkan textures to IVRCompositor::Submit.
-* Be sure to call OpenVR_Shutdown before destroying these resources. */
-struct VRVulkanTextureData_t
-{
-	uint64_t m_nImage; // VkImage
-	VkDevice_T *m_pDevice;
-	VkPhysicalDevice_T *m_pPhysicalDevice;
-	VkInstance_T *m_pInstance;
-	VkQueue_T *m_pQueue;
-	uint32_t m_nQueueFamilyIndex;
-	uint32_t m_nWidth, m_nHeight, m_nFormat, m_nSampleCount;
-};
-
-/** Data required for passing D3D12 textures to IVRCompositor::Submit.
-* Be sure to call OpenVR_Shutdown before destroying these resources. */
-struct D3D12TextureData_t
-{
-	ID3D12Resource *m_pResource;
-	ID3D12CommandQueue *m_pCommandQueue;
-	uint32_t m_nNodeMask;
-};
-
-/** Status of the overall system or tracked objects */
-enum EVRState
-{
-	VRState_Undefined = -1,
-	VRState_Off = 0,
-	VRState_Searching = 1,
-	VRState_Searching_Alert = 2,
-	VRState_Ready = 3,
-	VRState_Ready_Alert = 4,
-	VRState_NotReady = 5,
-	VRState_Standby = 6,
-	VRState_Ready_Alert_Low = 7,
-};
-
-/** The types of events that could be posted (and what the parameters mean for each event type) */
-enum EVREventType
-{
-	VREvent_None = 0,
-
-	VREvent_TrackedDeviceActivated		= 100,
-	VREvent_TrackedDeviceDeactivated	= 101,
-	VREvent_TrackedDeviceUpdated		= 102,
-	VREvent_TrackedDeviceUserInteractionStarted	= 103,
-	VREvent_TrackedDeviceUserInteractionEnded	= 104,
-	VREvent_IpdChanged					= 105,
-	VREvent_EnterStandbyMode			= 106,
-	VREvent_LeaveStandbyMode			= 107,
-	VREvent_TrackedDeviceRoleChanged	= 108,
-	VREvent_WatchdogWakeUpRequested		= 109,
-	VREvent_LensDistortionChanged		= 110,
-	VREvent_PropertyChanged				= 111,
-
-	VREvent_ButtonPress					= 200, // data is controller
-	VREvent_ButtonUnpress				= 201, // data is controller
-	VREvent_ButtonTouch					= 202, // data is controller
-	VREvent_ButtonUntouch				= 203, // data is controller
-
-	VREvent_MouseMove					= 300, // data is mouse
-	VREvent_MouseButtonDown				= 301, // data is mouse
-	VREvent_MouseButtonUp				= 302, // data is mouse
-	VREvent_FocusEnter					= 303, // data is overlay
-	VREvent_FocusLeave					= 304, // data is overlay
-	VREvent_Scroll						= 305, // data is mouse
-	VREvent_TouchPadMove				= 306, // data is mouse
-	VREvent_OverlayFocusChanged			= 307, // data is overlay, global event
-
-	VREvent_InputFocusCaptured			= 400, // data is process DEPRECATED
-	VREvent_InputFocusReleased			= 401, // data is process DEPRECATED
-	VREvent_SceneFocusLost				= 402, // data is process
-	VREvent_SceneFocusGained			= 403, // data is process
-	VREvent_SceneApplicationChanged		= 404, // data is process - The App actually drawing the scene changed (usually to or from the compositor)
-	VREvent_SceneFocusChanged			= 405, // data is process - New app got access to draw the scene
-	VREvent_InputFocusChanged			= 406, // data is process
-	VREvent_SceneApplicationSecondaryRenderingStarted = 407, // data is process
-
-	VREvent_HideRenderModels			= 410, // Sent to the scene application to request hiding render models temporarily
-	VREvent_ShowRenderModels			= 411, // Sent to the scene application to request restoring render model visibility
-
-	VREvent_OverlayShown				= 500,
-	VREvent_OverlayHidden				= 501,
-	VREvent_DashboardActivated			= 502,
-	VREvent_DashboardDeactivated		= 503,
-	VREvent_DashboardThumbSelected		= 504, // Sent to the overlay manager - data is overlay
-	VREvent_DashboardRequested			= 505, // Sent to the overlay manager - data is overlay
-	VREvent_ResetDashboard				= 506, // Send to the overlay manager
-	VREvent_RenderToast					= 507, // Send to the dashboard to render a toast - data is the notification ID
-	VREvent_ImageLoaded					= 508, // Sent to overlays when a SetOverlayRaw or SetOverlayFromFile call finishes loading
-	VREvent_ShowKeyboard				= 509, // Sent to keyboard renderer in the dashboard to invoke it
-	VREvent_HideKeyboard				= 510, // Sent to keyboard renderer in the dashboard to hide it
-	VREvent_OverlayGamepadFocusGained	= 511, // Sent to an overlay when IVROverlay::SetFocusOverlay is called on it
-	VREvent_OverlayGamepadFocusLost		= 512, // Send to an overlay when it previously had focus and IVROverlay::SetFocusOverlay is called on something else
-	VREvent_OverlaySharedTextureChanged = 513,
-	VREvent_DashboardGuideButtonDown	= 514,
-	VREvent_DashboardGuideButtonUp		= 515,
-	VREvent_ScreenshotTriggered			= 516, // Screenshot button combo was pressed, Dashboard should request a screenshot
-	VREvent_ImageFailed					= 517, // Sent to overlays when a SetOverlayRaw or SetOverlayfromFail fails to load
-	VREvent_DashboardOverlayCreated		= 518,
-
-	// Screenshot API
-	VREvent_RequestScreenshot				= 520, // Sent by vrclient application to compositor to take a screenshot
-	VREvent_ScreenshotTaken					= 521, // Sent by compositor to the application that the screenshot has been taken
-	VREvent_ScreenshotFailed				= 522, // Sent by compositor to the application that the screenshot failed to be taken
-	VREvent_SubmitScreenshotToDashboard		= 523, // Sent by compositor to the dashboard that a completed screenshot was submitted
-	VREvent_ScreenshotProgressToDashboard	= 524, // Sent by compositor to the dashboard that a completed screenshot was submitted
-
-	VREvent_PrimaryDashboardDeviceChanged	= 525,
-
-	VREvent_Notification_Shown				= 600,
-	VREvent_Notification_Hidden				= 601,
-	VREvent_Notification_BeginInteraction	= 602,
-	VREvent_Notification_Destroyed			= 603,
-
-	VREvent_Quit							= 700, // data is process
-	VREvent_ProcessQuit						= 701, // data is process
-	VREvent_QuitAborted_UserPrompt			= 702, // data is process
-	VREvent_QuitAcknowledged				= 703, // data is process
-	VREvent_DriverRequestedQuit				= 704, // The driver has requested that SteamVR shut down
-
-	VREvent_ChaperoneDataHasChanged			= 800,
-	VREvent_ChaperoneUniverseHasChanged		= 801,
-	VREvent_ChaperoneTempDataHasChanged		= 802,
-	VREvent_ChaperoneSettingsHaveChanged	= 803,
-	VREvent_SeatedZeroPoseReset				= 804,
-
-	VREvent_AudioSettingsHaveChanged		= 820,
-
-	VREvent_BackgroundSettingHasChanged		= 850,
-	VREvent_CameraSettingsHaveChanged		= 851,
-	VREvent_ReprojectionSettingHasChanged	= 852,
-	VREvent_ModelSkinSettingsHaveChanged	= 853,
-	VREvent_EnvironmentSettingsHaveChanged	= 854,
-	VREvent_PowerSettingsHaveChanged		= 855,
-
-	VREvent_StatusUpdate					= 900,
-
-	VREvent_MCImageUpdated					= 1000,
-
-	VREvent_FirmwareUpdateStarted			= 1100,
-	VREvent_FirmwareUpdateFinished			= 1101,
-
-	VREvent_KeyboardClosed					= 1200,
-	VREvent_KeyboardCharInput				= 1201,
-	VREvent_KeyboardDone					= 1202, // Sent when DONE button clicked on keyboard
-
-	VREvent_ApplicationTransitionStarted		= 1300,
-	VREvent_ApplicationTransitionAborted		= 1301,
-	VREvent_ApplicationTransitionNewAppStarted	= 1302,
-	VREvent_ApplicationListUpdated				= 1303,
-	VREvent_ApplicationMimeTypeLoad				= 1304,
-	VREvent_ApplicationTransitionNewAppLaunchComplete = 1305,
-
-	VREvent_Compositor_MirrorWindowShown		= 1400,
-	VREvent_Compositor_MirrorWindowHidden		= 1401,
-	VREvent_Compositor_ChaperoneBoundsShown		= 1410,
-	VREvent_Compositor_ChaperoneBoundsHidden	= 1411,
-
-	VREvent_TrackedCamera_StartVideoStream  = 1500,
-	VREvent_TrackedCamera_StopVideoStream   = 1501,
-	VREvent_TrackedCamera_PauseVideoStream  = 1502,
-	VREvent_TrackedCamera_ResumeVideoStream = 1503,
-	VREvent_TrackedCamera_EditingSurface    = 1550,
-
-	VREvent_PerformanceTest_EnableCapture	= 1600,
-	VREvent_PerformanceTest_DisableCapture	= 1601,
-	VREvent_PerformanceTest_FidelityLevel	= 1602,
-
-	VREvent_MessageOverlay_Closed			= 1650,
-	
-	// Vendors are free to expose private events in this reserved region
-	VREvent_VendorSpecific_Reserved_Start	= 10000,
-	VREvent_VendorSpecific_Reserved_End		= 19999,
-};
-
-
-/** Level of Hmd activity */
-enum EDeviceActivityLevel
-{
-	k_EDeviceActivityLevel_Unknown = -1,
-	k_EDeviceActivityLevel_Idle = 0,
-	k_EDeviceActivityLevel_UserInteraction = 1,
-	k_EDeviceActivityLevel_UserInteraction_Timeout = 2,
-	k_EDeviceActivityLevel_Standby = 3,
-};
-
-
-/** VR controller button and axis IDs */
-enum EVRButtonId
-{
-	k_EButton_System			= 0,
-	k_EButton_ApplicationMenu	= 1,
-	k_EButton_Grip				= 2,
-	k_EButton_DPad_Left			= 3,
-	k_EButton_DPad_Up			= 4,
-	k_EButton_DPad_Right		= 5,
-	k_EButton_DPad_Down			= 6,
-	k_EButton_A					= 7,
-	
-	k_EButton_ProximitySensor   = 31,
-
-	k_EButton_Axis0				= 32,
-	k_EButton_Axis1				= 33,
-	k_EButton_Axis2				= 34,
-	k_EButton_Axis3				= 35,
-	k_EButton_Axis4				= 36,
-
-	// aliases for well known controllers
-	k_EButton_SteamVR_Touchpad	= k_EButton_Axis0,
-	k_EButton_SteamVR_Trigger	= k_EButton_Axis1,
-
-	k_EButton_Dashboard_Back	= k_EButton_Grip,
-
-	k_EButton_Max				= 64
-};
-
-inline uint64_t ButtonMaskFromId( EVRButtonId id ) { return 1ull << id; }
-
-/** used for controller button events */
-struct VREvent_Controller_t
-{
-	uint32_t button; // EVRButtonId enum
-};
-
-
-/** used for simulated mouse events in overlay space */
-enum EVRMouseButton
-{
-	VRMouseButton_Left					= 0x0001,
-	VRMouseButton_Right					= 0x0002,
-	VRMouseButton_Middle				= 0x0004,
-};
-
-
-/** used for simulated mouse events in overlay space */
-struct VREvent_Mouse_t
-{
-	float x, y; // co-ords are in GL space, bottom left of the texture is 0,0
-	uint32_t button; // EVRMouseButton enum
-};
-
-/** used for simulated mouse wheel scroll in overlay space */
-struct VREvent_Scroll_t
-{
-	float xdelta, ydelta; // movement in fraction of the pad traversed since last delta, 1.0 for a full swipe
-	uint32_t repeatCount;
-};
-
-/** when in mouse input mode you can receive data from the touchpad, these events are only sent if the users finger
-   is on the touchpad (or just released from it) 
-**/
-struct VREvent_TouchPadMove_t
-{
-	// true if the users finger is detected on the touch pad
-	bool bFingerDown;
-
-	// How long the finger has been down in seconds
-	float flSecondsFingerDown;
-
-	// These values indicate the starting finger position (so you can do some basic swipe stuff)
-	float fValueXFirst;
-	float fValueYFirst;
-
-	// This is the raw sampled coordinate without deadzoning
-	float fValueXRaw;
-	float fValueYRaw;
-};
-
-/** notification related events. Details will still change at this point */
-struct VREvent_Notification_t
-{
-	uint64_t ulUserValue;
-	uint32_t notificationId;
-};
-
-/** Used for events about processes */
-struct VREvent_Process_t
-{
-	uint32_t pid;
-	uint32_t oldPid;
-	bool bForced;
-};
-
-
-/** Used for a few events about overlays */
-struct VREvent_Overlay_t
-{
-	uint64_t overlayHandle;
-};
-
-
-/** Used for a few events about overlays */
-struct VREvent_Status_t
-{
-	uint32_t statusState; // EVRState enum
-};
-
-/** Used for keyboard events **/
-struct VREvent_Keyboard_t
-{
-	char cNewInput[8];	// Up to 11 bytes of new input
-	uint64_t uUserValue;	// Possible flags about the new input
-};
-
-struct VREvent_Ipd_t
-{
-	float ipdMeters;
-};
-
-struct VREvent_Chaperone_t
-{
-	uint64_t m_nPreviousUniverse;
-	uint64_t m_nCurrentUniverse;
-};
-
-/** Not actually used for any events */
-struct VREvent_Reserved_t
-{
-	uint64_t reserved0;
-	uint64_t reserved1;
-};
-
-struct VREvent_PerformanceTest_t
-{
-	uint32_t m_nFidelityLevel;
-};
-
-struct VREvent_SeatedZeroPoseReset_t
-{
-	bool bResetBySystemMenu;
-};
-
-struct VREvent_Screenshot_t
-{
-	uint32_t handle;
-	uint32_t type;
-};
-
-struct VREvent_ScreenshotProgress_t
-{
-	float progress;
-};
-
-struct VREvent_ApplicationLaunch_t
-{
-	uint32_t pid;
-	uint32_t unArgsHandle;
-};
-
-struct VREvent_EditingCameraSurface_t
-{
-	uint64_t overlayHandle;
-	uint32_t nVisualMode;
-};
-
-struct VREvent_MessageOverlay_t
-{
-	uint32_t unVRMessageOverlayResponse; // vr::VRMessageOverlayResponse enum
-};
-
-struct VREvent_Property_t
-{
-	PropertyContainerHandle_t container;
-	ETrackedDeviceProperty prop;
-};
-
-/** NOTE!!! If you change this you MUST manually update openvr_interop.cs.py */
-typedef union
-{
-	VREvent_Reserved_t reserved;
-	VREvent_Controller_t controller;
-	VREvent_Mouse_t mouse;
-	VREvent_Scroll_t scroll;
-	VREvent_Process_t process;
-	VREvent_Notification_t notification;
-	VREvent_Overlay_t overlay;
-	VREvent_Status_t status;
-	VREvent_Keyboard_t keyboard;
-	VREvent_Ipd_t ipd;
-	VREvent_Chaperone_t chaperone;
-	VREvent_PerformanceTest_t performanceTest;
-	VREvent_TouchPadMove_t touchPadMove;
-	VREvent_SeatedZeroPoseReset_t seatedZeroPoseReset;
-	VREvent_Screenshot_t screenshot;
-	VREvent_ScreenshotProgress_t screenshotProgress;
-	VREvent_ApplicationLaunch_t applicationLaunch;
-	VREvent_EditingCameraSurface_t cameraSurface;
-	VREvent_MessageOverlay_t messageOverlay;
-	VREvent_Property_t property;
-} VREvent_Data_t;
-
-/** An event posted by the server to all running applications */
-struct VREvent_t
-{
-	uint32_t eventType; // EVREventType enum
-	TrackedDeviceIndex_t trackedDeviceIndex;
-	float eventAgeSeconds;
-	// event data must be the end of the struct as its size is variable
-	VREvent_Data_t data;
-};
-
-
-/** The mesh to draw into the stencil (or depth) buffer to perform 
-* early stencil (or depth) kills of pixels that will never appear on the HMD.
-* This mesh draws on all the pixels that will be hidden after distortion. 
-*
-* If the HMD does not provide a visible area mesh pVertexData will be
-* NULL and unTriangleCount will be 0. */
-struct HiddenAreaMesh_t
-{
-	const HmdVector2_t *pVertexData;
-	uint32_t unTriangleCount;
-};
-
-
-enum EHiddenAreaMeshType
-{
-	k_eHiddenAreaMesh_Standard = 0,
-	k_eHiddenAreaMesh_Inverse = 1,
-	k_eHiddenAreaMesh_LineLoop = 2,
-
-	k_eHiddenAreaMesh_Max = 3,
-};
-
-
-/** Identifies what kind of axis is on the controller at index n. Read this type 
-* with pVRSystem->Get( nControllerDeviceIndex, Prop_Axis0Type_Int32 + n );
-*/
-enum EVRControllerAxisType
-{
-	k_eControllerAxis_None = 0,
-	k_eControllerAxis_TrackPad = 1,
-	k_eControllerAxis_Joystick = 2,
-	k_eControllerAxis_Trigger = 3, // Analog trigger data is in the X axis
-};
-
-
-/** contains information about one axis on the controller */
-struct VRControllerAxis_t
-{
-	float x; // Ranges from -1.0 to 1.0 for joysticks and track pads. Ranges from 0.0 to 1.0 for triggers were 0 is fully released.
-	float y; // Ranges from -1.0 to 1.0 for joysticks and track pads. Is always 0.0 for triggers.
-};
-
-
-/** the number of axes in the controller state */
-static const uint32_t k_unControllerStateAxisCount = 5;
-
-
-/** Holds all the state of a controller at one moment in time. */
-struct VRControllerState001_t
-{
-	// If packet num matches that on your prior call, then the controller state hasn't been changed since 
-	// your last call and there is no need to process it
-	uint32_t unPacketNum;
-
-	// bit flags for each of the buttons. Use ButtonMaskFromId to turn an ID into a mask
-	uint64_t ulButtonPressed;
-	uint64_t ulButtonTouched;
-
-	// Axis data for the controller's analog inputs
-	VRControllerAxis_t rAxis[ k_unControllerStateAxisCount ];
-};
-
-
-typedef VRControllerState001_t VRControllerState_t;
-
-
-/** determines how to provide output to the application of various event processing functions. */
-enum EVRControllerEventOutputType
-{
-	ControllerEventOutput_OSEvents = 0,
-	ControllerEventOutput_VREvents = 1,
-};
-
-
-
-/** Collision Bounds Style */
-enum ECollisionBoundsStyle
-{
-	COLLISION_BOUNDS_STYLE_BEGINNER = 0,
-	COLLISION_BOUNDS_STYLE_INTERMEDIATE,
-	COLLISION_BOUNDS_STYLE_SQUARES,
-	COLLISION_BOUNDS_STYLE_ADVANCED,
-	COLLISION_BOUNDS_STYLE_NONE,
-
-	COLLISION_BOUNDS_STYLE_COUNT
-};
-
-/** Allows the application to customize how the overlay appears in the compositor */
-struct Compositor_OverlaySettings
-{
-	uint32_t size; // sizeof(Compositor_OverlaySettings)
-	bool curved, antialias;
-	float scale, distance, alpha;
-	float uOffset, vOffset, uScale, vScale;
-	float gridDivs, gridWidth, gridScale;
-	HmdMatrix44_t transform;
-};
-
-/** used to refer to a single VR overlay */
-typedef uint64_t VROverlayHandle_t;
-
-static const VROverlayHandle_t k_ulOverlayHandleInvalid = 0;
-
-/** Errors that can occur around VR overlays */
-enum EVROverlayError
-{
-	VROverlayError_None						= 0,
-
-	VROverlayError_UnknownOverlay			= 10,
-	VROverlayError_InvalidHandle			= 11,
-	VROverlayError_PermissionDenied			= 12,
-	VROverlayError_OverlayLimitExceeded		= 13, // No more overlays could be created because the maximum number already exist
-	VROverlayError_WrongVisibilityType		= 14,
-	VROverlayError_KeyTooLong				= 15,
-	VROverlayError_NameTooLong				= 16,
-	VROverlayError_KeyInUse					= 17,
-	VROverlayError_WrongTransformType		= 18,
-	VROverlayError_InvalidTrackedDevice		= 19,
-	VROverlayError_InvalidParameter			= 20,
-	VROverlayError_ThumbnailCantBeDestroyed	= 21,
-	VROverlayError_ArrayTooSmall			= 22,
-	VROverlayError_RequestFailed			= 23,
-	VROverlayError_InvalidTexture			= 24,
-	VROverlayError_UnableToLoadFile			= 25,
-	VROverlayError_KeyboardAlreadyInUse		= 26,
-	VROverlayError_NoNeighbor				= 27,
-	VROverlayError_TooManyMaskPrimitives	= 29,
-	VROverlayError_BadMaskPrimitive			= 30,
-};
-
-/** enum values to pass in to VR_Init to identify whether the application will 
-* draw a 3D scene. */
-enum EVRApplicationType
-{
-	VRApplication_Other = 0,		// Some other kind of application that isn't covered by the other entries 
-	VRApplication_Scene	= 1,		// Application will submit 3D frames 
-	VRApplication_Overlay = 2,		// Application only interacts with overlays
-	VRApplication_Background = 3,	// Application should not start SteamVR if it's not already running, and should not
-									// keep it running if everything else quits.
-	VRApplication_Utility = 4,		// Init should not try to load any drivers. The application needs access to utility
-									// interfaces (like IVRSettings and IVRApplications) but not hardware.
-	VRApplication_VRMonitor = 5,	// Reserved for vrmonitor
-	VRApplication_SteamWatchdog = 6,// Reserved for Steam
-
-	VRApplication_Max
-};
-
-
-/** error codes for firmware */
-enum EVRFirmwareError
-{
-	VRFirmwareError_None = 0,
-	VRFirmwareError_Success = 1,
-	VRFirmwareError_Fail = 2,
-};
-
-
-/** error codes for notifications */
-enum EVRNotificationError
-{
-	VRNotificationError_OK = 0,
-	VRNotificationError_InvalidNotificationId = 100,
-	VRNotificationError_NotificationQueueFull = 101,
-	VRNotificationError_InvalidOverlayHandle = 102,
-	VRNotificationError_SystemWithUserValueAlreadyExists = 103,
-};
-
-
-/** error codes returned by Vr_Init */
-
-// Please add adequate error description to https://developer.valvesoftware.com/w/index.php?title=Category:SteamVRHelp
-enum EVRInitError
-{
-	VRInitError_None	= 0,
-	VRInitError_Unknown = 1,
-
-	VRInitError_Init_InstallationNotFound		= 100,
-	VRInitError_Init_InstallationCorrupt		= 101,
-	VRInitError_Init_VRClientDLLNotFound		= 102,
-	VRInitError_Init_FileNotFound				= 103,
-	VRInitError_Init_FactoryNotFound			= 104,
-	VRInitError_Init_InterfaceNotFound			= 105,
-	VRInitError_Init_InvalidInterface			= 106,
-	VRInitError_Init_UserConfigDirectoryInvalid = 107,
-	VRInitError_Init_HmdNotFound				= 108,
-	VRInitError_Init_NotInitialized				= 109,
-	VRInitError_Init_PathRegistryNotFound		= 110,
-	VRInitError_Init_NoConfigPath				= 111,
-	VRInitError_Init_NoLogPath					= 112,
-	VRInitError_Init_PathRegistryNotWritable	= 113,
-	VRInitError_Init_AppInfoInitFailed			= 114,
-	VRInitError_Init_Retry						= 115, // Used internally to cause retries to vrserver
-	VRInitError_Init_InitCanceledByUser			= 116, // The calling application should silently exit. The user canceled app startup
-	VRInitError_Init_AnotherAppLaunching		= 117, 
-	VRInitError_Init_SettingsInitFailed			= 118, 
-	VRInitError_Init_ShuttingDown				= 119,
-	VRInitError_Init_TooManyObjects				= 120,
-	VRInitError_Init_NoServerForBackgroundApp	= 121,
-	VRInitError_Init_NotSupportedWithCompositor	= 122,
-	VRInitError_Init_NotAvailableToUtilityApps	= 123,
-	VRInitError_Init_Internal				 	= 124,
-	VRInitError_Init_HmdDriverIdIsNone		 	= 125,
-	VRInitError_Init_HmdNotFoundPresenceFailed 	= 126,
-	VRInitError_Init_VRMonitorNotFound			= 127,
-	VRInitError_Init_VRMonitorStartupFailed		= 128,
-	VRInitError_Init_LowPowerWatchdogNotSupported = 129, 
-	VRInitError_Init_InvalidApplicationType		= 130,
-	VRInitError_Init_NotAvailableToWatchdogApps = 131,
-	VRInitError_Init_WatchdogDisabledInSettings = 132,
-	VRInitError_Init_VRDashboardNotFound		= 133,
-	VRInitError_Init_VRDashboardStartupFailed	= 134,
-
-	VRInitError_Driver_Failed				= 200,
-	VRInitError_Driver_Unknown				= 201,
-	VRInitError_Driver_HmdUnknown			= 202,
-	VRInitError_Driver_NotLoaded			= 203,
-	VRInitError_Driver_RuntimeOutOfDate		= 204,
-	VRInitError_Driver_HmdInUse				= 205,
-	VRInitError_Driver_NotCalibrated		= 206,
-	VRInitError_Driver_CalibrationInvalid	= 207,
-	VRInitError_Driver_HmdDisplayNotFound	= 208,
-	VRInitError_Driver_TrackedDeviceInterfaceUnknown = 209,
-	// VRInitError_Driver_HmdDisplayNotFoundAfterFix	 = 210, // not needed: here for historic reasons
-	VRInitError_Driver_HmdDriverIdOutOfBounds = 211,
-	VRInitError_Driver_HmdDisplayMirrored  = 212,
-
-	VRInitError_IPC_ServerInitFailed		= 300,
-	VRInitError_IPC_ConnectFailed			= 301,
-	VRInitError_IPC_SharedStateInitFailed	= 302,
-	VRInitError_IPC_CompositorInitFailed	= 303,
-	VRInitError_IPC_MutexInitFailed			= 304,
-	VRInitError_IPC_Failed					= 305,
-	VRInitError_IPC_CompositorConnectFailed	= 306,
-	VRInitError_IPC_CompositorInvalidConnectResponse = 307,
-	VRInitError_IPC_ConnectFailedAfterMultipleAttempts = 308,
-
-	VRInitError_Compositor_Failed					= 400,
-	VRInitError_Compositor_D3D11HardwareRequired	= 401,
-	VRInitError_Compositor_FirmwareRequiresUpdate	= 402,
-	VRInitError_Compositor_OverlayInitFailed		= 403,
-	VRInitError_Compositor_ScreenshotsInitFailed	= 404,
-
-	VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000,
-
-	VRInitError_VendorSpecific_HmdFound_CantOpenDevice 				= 1101,
-	VRInitError_VendorSpecific_HmdFound_UnableToRequestConfigStart	= 1102,
-	VRInitError_VendorSpecific_HmdFound_NoStoredConfig 				= 1103,
-	VRInitError_VendorSpecific_HmdFound_ConfigTooBig 				= 1104,
-	VRInitError_VendorSpecific_HmdFound_ConfigTooSmall 				= 1105,
-	VRInitError_VendorSpecific_HmdFound_UnableToInitZLib 			= 1106,
-	VRInitError_VendorSpecific_HmdFound_CantReadFirmwareVersion 	= 1107,
-	VRInitError_VendorSpecific_HmdFound_UnableToSendUserDataStart	= 1108,
-	VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataStart	= 1109,
-	VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataNext		= 1110,
-	VRInitError_VendorSpecific_HmdFound_UserDataAddressRange		= 1111,
-	VRInitError_VendorSpecific_HmdFound_UserDataError				= 1112,
-	VRInitError_VendorSpecific_HmdFound_ConfigFailedSanityCheck		= 1113,
-
-	VRInitError_Steam_SteamInstallationNotFound = 2000,
-};
-
-enum EVRScreenshotType
-{
-	VRScreenshotType_None = 0,
-	VRScreenshotType_Mono = 1, // left eye only
-	VRScreenshotType_Stereo = 2,
-	VRScreenshotType_Cubemap = 3,
-	VRScreenshotType_MonoPanorama = 4,
-	VRScreenshotType_StereoPanorama = 5
-};
-
-enum EVRScreenshotPropertyFilenames
-{
-	VRScreenshotPropertyFilenames_Preview = 0,
-	VRScreenshotPropertyFilenames_VR = 1,
-};
-
-enum EVRTrackedCameraError
-{
-	VRTrackedCameraError_None                       = 0,
-	VRTrackedCameraError_OperationFailed            = 100,
-	VRTrackedCameraError_InvalidHandle              = 101,	
-	VRTrackedCameraError_InvalidFrameHeaderVersion  = 102,
-	VRTrackedCameraError_OutOfHandles               = 103,
-	VRTrackedCameraError_IPCFailure                 = 104,
-	VRTrackedCameraError_NotSupportedForThisDevice  = 105,
-	VRTrackedCameraError_SharedMemoryFailure        = 106,
-	VRTrackedCameraError_FrameBufferingFailure      = 107,
-	VRTrackedCameraError_StreamSetupFailure         = 108,
-	VRTrackedCameraError_InvalidGLTextureId         = 109,
-	VRTrackedCameraError_InvalidSharedTextureHandle = 110,
-	VRTrackedCameraError_FailedToGetGLTextureId     = 111,
-	VRTrackedCameraError_SharedTextureFailure       = 112,
-	VRTrackedCameraError_NoFrameAvailable           = 113,
-	VRTrackedCameraError_InvalidArgument            = 114,
-	VRTrackedCameraError_InvalidFrameBufferSize     = 115,
-};
-
-enum EVRTrackedCameraFrameType
-{
-	VRTrackedCameraFrameType_Distorted = 0,			// This is the camera video frame size in pixels, still distorted.
-	VRTrackedCameraFrameType_Undistorted,			// In pixels, an undistorted inscribed rectangle region without invalid regions. This size is subject to changes shortly.
-	VRTrackedCameraFrameType_MaximumUndistorted,	// In pixels, maximum undistorted with invalid regions. Non zero alpha component identifies valid regions.
-	MAX_CAMERA_FRAME_TYPES
-};
-
-typedef uint64_t TrackedCameraHandle_t;
-#define INVALID_TRACKED_CAMERA_HANDLE	((vr::TrackedCameraHandle_t)0)
-
-struct CameraVideoStreamFrameHeader_t
-{
-	EVRTrackedCameraFrameType eFrameType;
-
-	uint32_t nWidth;
-	uint32_t nHeight;
-	uint32_t nBytesPerPixel;
-
-	uint32_t nFrameSequence;
-
-	TrackedDevicePose_t standingTrackedDevicePose;
-};
-
-// Screenshot types
-typedef uint32_t ScreenshotHandle_t;
-
-static const uint32_t k_unScreenshotHandleInvalid = 0;
-
-#pragma pack( pop )
-
-// figure out how to import from the VR API dll
-#if defined(_WIN32)
-
-#ifdef VR_API_EXPORT
-#define VR_INTERFACE extern "C" __declspec( dllexport )
-#else
-#define VR_INTERFACE extern "C" __declspec( dllimport )
-#endif
-
-#elif defined(__GNUC__) || defined(COMPILER_GCC) || defined(__APPLE__)
-
-#ifdef VR_API_EXPORT
-#define VR_INTERFACE extern "C" __attribute__((visibility("default")))
-#else
-#define VR_INTERFACE extern "C" 
-#endif
-
-#else
-#error "Unsupported Platform."
-#endif
-
-
-#if defined( _WIN32 )
-#define VR_CALLTYPE __cdecl
-#else
-#define VR_CALLTYPE 
-#endif
-
-} // namespace vr
-
-#endif // _INCLUDE_VRTYPES_H
-
-
-// vrannotation.h
-#ifdef API_GEN
-# define VR_CLANG_ATTR(ATTR) __attribute__((annotate( ATTR )))
-#else
-# define VR_CLANG_ATTR(ATTR)
-#endif
-
-#define VR_METHOD_DESC(DESC) VR_CLANG_ATTR( "desc:" #DESC ";" )
-#define VR_IGNOREATTR() VR_CLANG_ATTR( "ignore" )
-#define VR_OUT_STRUCT() VR_CLANG_ATTR( "out_struct: ;" )
-#define VR_OUT_STRING() VR_CLANG_ATTR( "out_string: ;" )
-#define VR_OUT_ARRAY_CALL(COUNTER,FUNCTION,PARAMS) VR_CLANG_ATTR( "out_array_call:" #COUNTER "," #FUNCTION "," #PARAMS ";" )
-#define VR_OUT_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "out_array_count:" #COUNTER ";" )
-#define VR_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "array_count:" #COUNTER ";" )
-#define VR_ARRAY_COUNT_D(COUNTER, DESC) VR_CLANG_ATTR( "array_count:" #COUNTER ";desc:" #DESC )
-#define VR_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "buffer_count:" #COUNTER ";" )
-#define VR_OUT_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "out_buffer_count:" #COUNTER ";" )
-#define VR_OUT_STRING_COUNT(COUNTER) VR_CLANG_ATTR( "out_string_count:" #COUNTER ";" )
-
-// vrtrackedcameratypes.h
-#ifndef _VRTRACKEDCAMERATYPES_H
-#define _VRTRACKEDCAMERATYPES_H 
-
-namespace vr
-{
-
-#if defined(__linux__) || defined(__APPLE__) 
-	// The 32-bit version of gcc has the alignment requirement for uint64 and double set to
-	// 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned.
-	// The 64-bit version of gcc has the alignment requirement for these types set to
-	// 8 meaning that unless we use #pragma pack(4) our structures will get bigger.
-	// The 64-bit structure packing has to match the 32-bit structure packing for each platform.
-	#pragma pack( push, 4 )
-#else
-	#pragma pack( push, 8 )
-#endif
-
-enum ECameraVideoStreamFormat
-{
-	CVS_FORMAT_UNKNOWN = 0,
-	CVS_FORMAT_RAW10 = 1,		// 10 bits per pixel
-	CVS_FORMAT_NV12 = 2,		// 12 bits per pixel
-	CVS_FORMAT_RGB24 = 3,		// 24 bits per pixel
-	CVS_MAX_FORMATS
-};
-
-enum ECameraCompatibilityMode
-{
-	CAMERA_COMPAT_MODE_BULK_DEFAULT = 0,
-	CAMERA_COMPAT_MODE_BULK_64K_DMA,
-	CAMERA_COMPAT_MODE_BULK_16K_DMA,
-	CAMERA_COMPAT_MODE_BULK_8K_DMA,
-	CAMERA_COMPAT_MODE_ISO_52FPS,
-	CAMERA_COMPAT_MODE_ISO_50FPS,
-	CAMERA_COMPAT_MODE_ISO_48FPS,
-	CAMERA_COMPAT_MODE_ISO_46FPS,
-	CAMERA_COMPAT_MODE_ISO_44FPS,
-	CAMERA_COMPAT_MODE_ISO_42FPS,
-	CAMERA_COMPAT_MODE_ISO_40FPS,
-	CAMERA_COMPAT_MODE_ISO_35FPS,
-	CAMERA_COMPAT_MODE_ISO_30FPS,
-	MAX_CAMERA_COMPAT_MODES
-};
-
-#ifdef _MSC_VER
-#define VR_CAMERA_DECL_ALIGN( x ) __declspec( align( x ) )
-#else
-#define VR_CAMERA_DECL_ALIGN( x ) //
-#endif
-
-#define MAX_CAMERA_FRAME_SHARED_HANDLES	4
-
-VR_CAMERA_DECL_ALIGN( 8 ) struct CameraVideoStreamFrame_t
-{
-	ECameraVideoStreamFormat m_nStreamFormat;
-
-	uint32_t m_nWidth;
-	uint32_t m_nHeight;
-
-	uint32_t m_nImageDataSize;						// Based on stream format, width, height
-
-	uint32_t m_nFrameSequence;						// Starts from 0 when stream starts.
-
-	uint32_t m_nBufferIndex;						// Identifies which buffer the image data is hosted
-	uint32_t m_nBufferCount;						// Total number of configured buffers
-
-	uint32_t m_nExposureTime;
-
-	uint32_t m_nISPFrameTimeStamp;					// Driver provided time stamp per driver centric time base
-	uint32_t m_nISPReferenceTimeStamp;
-	uint32_t m_nSyncCounter;
-
-	uint32_t m_nCamSyncEvents;
-	uint32_t m_nISPSyncEvents;
-
-	double m_flReferenceCamSyncTime;
-
-	double m_flFrameElapsedTime;					// Starts from 0 when stream starts. In seconds.
-	double m_flFrameDeliveryRate;
-
-	double m_flFrameCaptureTime_DriverAbsolute;		// In USB time, via AuxEvent
-	double m_flFrameCaptureTime_ServerRelative;		// In System time within the server
-	uint64_t m_nFrameCaptureTicks_ServerAbsolute;	// In system ticks within the server
-	double m_flFrameCaptureTime_ClientRelative;		// At the client, relative to when the frame was exposed/captured.
-
-	double m_flSyncMarkerError;
-
-	TrackedDevicePose_t m_StandingTrackedDevicePose;	// Supplied by HMD layer when used as a tracked camera
-
-	uint64_t m_pImageData;
-};
-
-#pragma pack( pop )
-
-}
-
-#endif // _VRTRACKEDCAMERATYPES_H
-// ivrsettings.h
-namespace vr
-{
-	enum EVRSettingsError
-	{
-		VRSettingsError_None = 0,
-		VRSettingsError_IPCFailed = 1,
-		VRSettingsError_WriteFailed = 2,
-		VRSettingsError_ReadFailed = 3,
-		VRSettingsError_JsonParseFailed = 4,
-		VRSettingsError_UnsetSettingHasNoDefault = 5, // This will be returned if the setting does not appear in the appropriate default file and has not been set
-	};
-
-	// The maximum length of a settings key
-	static const uint32_t k_unMaxSettingsKeyLength = 128;
-
-	class IVRSettings
-	{
-	public:
-		virtual const char *GetSettingsErrorNameFromEnum( EVRSettingsError eError ) = 0;
-
-		// Returns true if file sync occurred (force or settings dirty)
-		virtual bool Sync( bool bForce = false, EVRSettingsError *peError = nullptr ) = 0;
-
-		virtual void SetBool( const char *pchSection, const char *pchSettingsKey, bool bValue, EVRSettingsError *peError = nullptr ) = 0;
-		virtual void SetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nValue, EVRSettingsError *peError = nullptr ) = 0;
-		virtual void SetFloat( const char *pchSection, const char *pchSettingsKey, float flValue, EVRSettingsError *peError = nullptr ) = 0;
-		virtual void SetString( const char *pchSection, const char *pchSettingsKey, const char *pchValue, EVRSettingsError *peError = nullptr ) = 0;
-
-		// Users of the system need to provide a proper default in default.vrsettings in the resources/settings/ directory
-		// of either the runtime or the driver_xxx directory. Otherwise the default will be false, 0, 0.0 or ""
-		virtual bool GetBool( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0;
-		virtual int32_t GetInt32( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0;
-		virtual float GetFloat( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0;
-		virtual void GetString( const char *pchSection, const char *pchSettingsKey, VR_OUT_STRING() char *pchValue, uint32_t unValueLen, EVRSettingsError *peError = nullptr ) = 0;
-
-		virtual void RemoveSection( const char *pchSection, EVRSettingsError *peError = nullptr ) = 0;
-		virtual void RemoveKeyInSection( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0;
-	};
-
-	//-----------------------------------------------------------------------------
-	static const char * const IVRSettings_Version = "IVRSettings_002";
-
-	//-----------------------------------------------------------------------------
-	// steamvr keys
-	static const char * const k_pch_SteamVR_Section = "steamvr";
-	static const char * const k_pch_SteamVR_RequireHmd_String = "requireHmd";
-	static const char * const k_pch_SteamVR_ForcedDriverKey_String = "forcedDriver";
-	static const char * const k_pch_SteamVR_ForcedHmdKey_String = "forcedHmd";
-	static const char * const k_pch_SteamVR_DisplayDebug_Bool = "displayDebug";
-	static const char * const k_pch_SteamVR_DebugProcessPipe_String = "debugProcessPipe";
-	static const char * const k_pch_SteamVR_EnableDistortion_Bool = "enableDistortion";
-	static const char * const k_pch_SteamVR_DisplayDebugX_Int32 = "displayDebugX";
-	static const char * const k_pch_SteamVR_DisplayDebugY_Int32 = "displayDebugY";
-	static const char * const k_pch_SteamVR_SendSystemButtonToAllApps_Bool= "sendSystemButtonToAllApps";
-	static const char * const k_pch_SteamVR_LogLevel_Int32 = "loglevel";
-	static const char * const k_pch_SteamVR_IPD_Float = "ipd";
-	static const char * const k_pch_SteamVR_Background_String = "background";
-	static const char * const k_pch_SteamVR_BackgroundUseDomeProjection_Bool = "backgroundUseDomeProjection";
-	static const char * const k_pch_SteamVR_BackgroundCameraHeight_Float = "backgroundCameraHeight";
-	static const char * const k_pch_SteamVR_BackgroundDomeRadius_Float = "backgroundDomeRadius";
-	static const char * const k_pch_SteamVR_GridColor_String = "gridColor";
-	static const char * const k_pch_SteamVR_PlayAreaColor_String = "playAreaColor";
-	static const char * const k_pch_SteamVR_ShowStage_Bool = "showStage";
-	static const char * const k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers";
-	static const char * const k_pch_SteamVR_DirectMode_Bool = "directMode";
-	static const char * const k_pch_SteamVR_DirectModeEdidVid_Int32 = "directModeEdidVid";
-	static const char * const k_pch_SteamVR_DirectModeEdidPid_Int32 = "directModeEdidPid";
-	static const char * const k_pch_SteamVR_UsingSpeakers_Bool = "usingSpeakers";
-	static const char * const k_pch_SteamVR_SpeakersForwardYawOffsetDegrees_Float = "speakersForwardYawOffsetDegrees";
-	static const char * const k_pch_SteamVR_BaseStationPowerManagement_Bool = "basestationPowerManagement";
-	static const char * const k_pch_SteamVR_NeverKillProcesses_Bool = "neverKillProcesses";
-	static const char * const k_pch_SteamVR_RenderTargetMultiplier_Float = "renderTargetMultiplier";
-	static const char * const k_pch_SteamVR_AllowAsyncReprojection_Bool = "allowAsyncReprojection";
-	static const char * const k_pch_SteamVR_AllowReprojection_Bool = "allowInterleavedReprojection";
-	static const char * const k_pch_SteamVR_ForceReprojection_Bool = "forceReprojection";
-	static const char * const k_pch_SteamVR_ForceFadeOnBadTracking_Bool = "forceFadeOnBadTracking";
-	static const char * const k_pch_SteamVR_DefaultMirrorView_Int32 = "defaultMirrorView";
-	static const char * const k_pch_SteamVR_ShowMirrorView_Bool = "showMirrorView";
-	static const char * const k_pch_SteamVR_MirrorViewGeometry_String = "mirrorViewGeometry";
-	static const char * const k_pch_SteamVR_StartMonitorFromAppLaunch = "startMonitorFromAppLaunch";
-	static const char * const k_pch_SteamVR_StartCompositorFromAppLaunch_Bool = "startCompositorFromAppLaunch";
-	static const char * const k_pch_SteamVR_StartDashboardFromAppLaunch_Bool = "startDashboardFromAppLaunch";
-	static const char * const k_pch_SteamVR_StartOverlayAppsFromDashboard_Bool = "startOverlayAppsFromDashboard";
-	static const char * const k_pch_SteamVR_EnableHomeApp = "enableHomeApp";
-	static const char * const k_pch_SteamVR_SetInitialDefaultHomeApp = "setInitialDefaultHomeApp";
-	static const char * const k_pch_SteamVR_CycleBackgroundImageTimeSec_Int32 = "CycleBackgroundImageTimeSec";
-	static const char * const k_pch_SteamVR_RetailDemo_Bool = "retailDemo";
-	static const char * const k_pch_SteamVR_IpdOffset_Float = "ipdOffset";
-
-	//-----------------------------------------------------------------------------
-	// lighthouse keys
-	static const char * const k_pch_Lighthouse_Section = "driver_lighthouse";
-	static const char * const k_pch_Lighthouse_DisableIMU_Bool = "disableimu";
-	static const char * const k_pch_Lighthouse_UseDisambiguation_String = "usedisambiguation";
-	static const char * const k_pch_Lighthouse_DisambiguationDebug_Int32 = "disambiguationdebug";
-	static const char * const k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation";
-	static const char * const k_pch_Lighthouse_DBHistory_Bool = "dbhistory";
-
-	//-----------------------------------------------------------------------------
-	// null keys
-	static const char * const k_pch_Null_Section = "driver_null";
-	static const char * const k_pch_Null_SerialNumber_String = "serialNumber";
-	static const char * const k_pch_Null_ModelNumber_String = "modelNumber";
-	static const char * const k_pch_Null_WindowX_Int32 = "windowX";
-	static const char * const k_pch_Null_WindowY_Int32 = "windowY";
-	static const char * const k_pch_Null_WindowWidth_Int32 = "windowWidth";
-	static const char * const k_pch_Null_WindowHeight_Int32 = "windowHeight";
-	static const char * const k_pch_Null_RenderWidth_Int32 = "renderWidth";
-	static const char * const k_pch_Null_RenderHeight_Int32 = "renderHeight";
-	static const char * const k_pch_Null_SecondsFromVsyncToPhotons_Float = "secondsFromVsyncToPhotons";
-	static const char * const k_pch_Null_DisplayFrequency_Float = "displayFrequency";
-
-	//-----------------------------------------------------------------------------
-	// user interface keys
-	static const char * const k_pch_UserInterface_Section = "userinterface";
-	static const char * const k_pch_UserInterface_StatusAlwaysOnTop_Bool = "StatusAlwaysOnTop";
-	static const char * const k_pch_UserInterface_MinimizeToTray_Bool = "MinimizeToTray";
-	static const char * const k_pch_UserInterface_Screenshots_Bool = "screenshots";
-	static const char * const k_pch_UserInterface_ScreenshotType_Int = "screenshotType";
-
-	//-----------------------------------------------------------------------------
-	// notification keys
-	static const char * const k_pch_Notifications_Section = "notifications";
-	static const char * const k_pch_Notifications_DoNotDisturb_Bool = "DoNotDisturb";
-
-	//-----------------------------------------------------------------------------
-	// keyboard keys
-	static const char * const k_pch_Keyboard_Section = "keyboard";
-	static const char * const k_pch_Keyboard_TutorialCompletions = "TutorialCompletions";
-	static const char * const k_pch_Keyboard_ScaleX = "ScaleX";
-	static const char * const k_pch_Keyboard_ScaleY = "ScaleY";
-	static const char * const k_pch_Keyboard_OffsetLeftX = "OffsetLeftX";
-	static const char * const k_pch_Keyboard_OffsetRightX = "OffsetRightX";
-	static const char * const k_pch_Keyboard_OffsetY = "OffsetY";
-	static const char * const k_pch_Keyboard_Smoothing = "Smoothing";
-
-	//-----------------------------------------------------------------------------
-	// perf keys
-	static const char * const k_pch_Perf_Section = "perfcheck";
-	static const char * const k_pch_Perf_HeuristicActive_Bool = "heuristicActive";
-	static const char * const k_pch_Perf_NotifyInHMD_Bool = "warnInHMD";
-	static const char * const k_pch_Perf_NotifyOnlyOnce_Bool = "warnOnlyOnce";
-	static const char * const k_pch_Perf_AllowTimingStore_Bool = "allowTimingStore";
-	static const char * const k_pch_Perf_SaveTimingsOnExit_Bool = "saveTimingsOnExit";
-	static const char * const k_pch_Perf_TestData_Float = "perfTestData";
-
-	//-----------------------------------------------------------------------------
-	// collision bounds keys
-	static const char * const k_pch_CollisionBounds_Section = "collisionBounds";
-	static const char * const k_pch_CollisionBounds_Style_Int32 = "CollisionBoundsStyle";
-	static const char * const k_pch_CollisionBounds_GroundPerimeterOn_Bool = "CollisionBoundsGroundPerimeterOn";
-	static const char * const k_pch_CollisionBounds_CenterMarkerOn_Bool = "CollisionBoundsCenterMarkerOn";
-	static const char * const k_pch_CollisionBounds_PlaySpaceOn_Bool = "CollisionBoundsPlaySpaceOn";
-	static const char * const k_pch_CollisionBounds_FadeDistance_Float = "CollisionBoundsFadeDistance";
-	static const char * const k_pch_CollisionBounds_ColorGammaR_Int32 = "CollisionBoundsColorGammaR";
-	static const char * const k_pch_CollisionBounds_ColorGammaG_Int32 = "CollisionBoundsColorGammaG";
-	static const char * const k_pch_CollisionBounds_ColorGammaB_Int32 = "CollisionBoundsColorGammaB";
-	static const char * const k_pch_CollisionBounds_ColorGammaA_Int32 = "CollisionBoundsColorGammaA";
-
-	//-----------------------------------------------------------------------------
-	// camera keys
-	static const char * const k_pch_Camera_Section = "camera";
-	static const char * const k_pch_Camera_EnableCamera_Bool = "enableCamera";
-	static const char * const k_pch_Camera_EnableCameraInDashboard_Bool = "enableCameraInDashboard";
-	static const char * const k_pch_Camera_EnableCameraForCollisionBounds_Bool = "enableCameraForCollisionBounds";
-	static const char * const k_pch_Camera_EnableCameraForRoomView_Bool = "enableCameraForRoomView";
-	static const char * const k_pch_Camera_BoundsColorGammaR_Int32 = "cameraBoundsColorGammaR";
-	static const char * const k_pch_Camera_BoundsColorGammaG_Int32 = "cameraBoundsColorGammaG";
-	static const char * const k_pch_Camera_BoundsColorGammaB_Int32 = "cameraBoundsColorGammaB";
-	static const char * const k_pch_Camera_BoundsColorGammaA_Int32 = "cameraBoundsColorGammaA";
-	static const char * const k_pch_Camera_BoundsStrength_Int32 = "cameraBoundsStrength";
-
-	//-----------------------------------------------------------------------------
-	// audio keys
-	static const char * const k_pch_audio_Section = "audio";
-	static const char * const k_pch_audio_OnPlaybackDevice_String = "onPlaybackDevice";
-	static const char * const k_pch_audio_OnRecordDevice_String = "onRecordDevice";
-	static const char * const k_pch_audio_OnPlaybackMirrorDevice_String = "onPlaybackMirrorDevice";
-	static const char * const k_pch_audio_OffPlaybackDevice_String = "offPlaybackDevice";
-	static const char * const k_pch_audio_OffRecordDevice_String = "offRecordDevice";
-	static const char * const k_pch_audio_VIVEHDMIGain = "viveHDMIGain";
-
-	//-----------------------------------------------------------------------------
-	// power management keys
-	static const char * const k_pch_Power_Section = "power";
-	static const char * const k_pch_Power_PowerOffOnExit_Bool = "powerOffOnExit";
-	static const char * const k_pch_Power_TurnOffScreensTimeout_Float = "turnOffScreensTimeout";
-	static const char * const k_pch_Power_TurnOffControllersTimeout_Float = "turnOffControllersTimeout";
-	static const char * const k_pch_Power_ReturnToWatchdogTimeout_Float = "returnToWatchdogTimeout";
-	static const char * const k_pch_Power_AutoLaunchSteamVROnButtonPress = "autoLaunchSteamVROnButtonPress";
-
-	//-----------------------------------------------------------------------------
-	// dashboard keys
-	static const char * const k_pch_Dashboard_Section = "dashboard";
-	static const char * const k_pch_Dashboard_EnableDashboard_Bool = "enableDashboard";
-	static const char * const k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode";
-
-	//-----------------------------------------------------------------------------
-	// model skin keys
-	static const char * const k_pch_modelskin_Section = "modelskins";
-
-	//-----------------------------------------------------------------------------
-	// driver keys - These could be checked in any driver_<name> section
-	static const char * const k_pch_Driver_Enable_Bool = "enable";
-
-} // namespace vr
-
-// iservertrackeddevicedriver.h
-namespace vr
-{
-
-
-struct DriverPoseQuaternion_t
-{
-	double w, x, y, z;
-};
-
-struct DriverPose_t
-{
-	/* Time offset of this pose, in seconds from the actual time of the pose,
-	 * relative to the time of the PoseUpdated() call made by the driver.
-	 */
-	double poseTimeOffset;
-
-	/* Generally, the pose maintained by a driver
-	 * is in an inertial coordinate system different
-	 * from the world system of x+ right, y+ up, z+ back.
-	 * Also, the driver is not usually tracking the "head" position,
-	 * but instead an internal IMU or another reference point in the HMD.
-	 * The following two transforms transform positions and orientations
-	 * to app world space from driver world space,
-	 * and to HMD head space from driver local body space. 
-	 *
-	 * We maintain the driver pose state in its internal coordinate system,
-	 * so we can do the pose prediction math without having to
-	 * use angular acceleration.  A driver's angular acceleration is generally not measured,
-	 * and is instead calculated from successive samples of angular velocity.
-	 * This leads to a noisy angular acceleration values, which are also
-	 * lagged due to the filtering required to reduce noise to an acceptable level.
-	 */
-	vr::HmdQuaternion_t qWorldFromDriverRotation;
-	double vecWorldFromDriverTranslation[ 3 ];
-
-	vr::HmdQuaternion_t qDriverFromHeadRotation;
-	double vecDriverFromHeadTranslation[ 3 ];
-
-	/* State of driver pose, in meters and radians. */
-	/* Position of the driver tracking reference in driver world space
-	* +[0] (x) is right
-	* +[1] (y) is up
-	* -[2] (z) is forward
-	*/
-	double vecPosition[ 3 ];
-
-	/* Velocity of the pose in meters/second */
-	double vecVelocity[ 3 ];
-
-	/* Acceleration of the pose in meters/second */
-	double vecAcceleration[ 3 ];
-
-	/* Orientation of the tracker, represented as a quaternion */
-	vr::HmdQuaternion_t qRotation;
-
-	/* Angular velocity of the pose in axis-angle 
-	* representation. The direction is the angle of
-	* rotation and the magnitude is the angle around
-	* that axis in radians/second. */
-	double vecAngularVelocity[ 3 ];
-
-	/* Angular acceleration of the pose in axis-angle 
-	* representation. The direction is the angle of
-	* rotation and the magnitude is the angle around
-	* that axis in radians/second^2. */
-	double vecAngularAcceleration[ 3 ];
-
-	ETrackingResult result;
-
-	bool poseIsValid;
-	bool willDriftInYaw;
-	bool shouldApplyHeadModel;
-	bool deviceIsConnected;
-};
-
-
-// ----------------------------------------------------------------------------------------------
-// Purpose: Represents a single tracked device in a driver
-// ----------------------------------------------------------------------------------------------
-class ITrackedDeviceServerDriver
-{
-public:
-
-	// ------------------------------------
-	// Management Methods
-	// ------------------------------------
-	/** This is called before an HMD is returned to the application. It will always be
-	* called before any display or tracking methods. Memory and processor use by the
-	* ITrackedDeviceServerDriver object should be kept to a minimum until it is activated.
-	* The pose listener is guaranteed to be valid until Deactivate is called, but
-	* should not be used after that point. */
-	virtual EVRInitError Activate( uint32_t unObjectId ) = 0;
-
-	/** This is called when The VR system is switching from this Hmd being the active display
-	* to another Hmd being the active display. The driver should clean whatever memory
-	* and thread use it can when it is deactivated */
-	virtual void Deactivate() = 0;
-
-	/** Handles a request from the system to put this device into standby mode. What that means is defined per-device. */
-	virtual void EnterStandby() = 0;
-
-	/** Requests a component interface of the driver for device-specific functionality. The driver should return NULL
-	* if the requested interface or version is not supported. */
-	virtual void *GetComponent( const char *pchComponentNameAndVersion ) = 0;
-
-	/** A VR Client has made this debug request of the driver. The set of valid requests is entirely
-	* up to the driver and the client to figure out, as is the format of the response. Responses that
-	* exceed the length of the supplied buffer should be truncated and null terminated */
-	virtual void DebugRequest( const char *pchRequest, char *pchResponseBuffer, uint32_t unResponseBufferSize ) = 0;
-
-	// ------------------------------------
-	// Tracking Methods
-	// ------------------------------------
-	virtual DriverPose_t GetPose() = 0;
-};
-
-
-
-static const char *ITrackedDeviceServerDriver_Version = "ITrackedDeviceServerDriver_005";
-
-}
-// ivrdisplaycomponent.h
-namespace vr
-{
-
-
-	// ----------------------------------------------------------------------------------------------
-	// Purpose: The display component on a single tracked device
-	// ----------------------------------------------------------------------------------------------
-	class IVRDisplayComponent
-	{
-	public:
-
-		// ------------------------------------
-		// Display Methods
-		// ------------------------------------
-
-		/** Size and position that the window needs to be on the VR display. */
-		virtual void GetWindowBounds( int32_t *pnX, int32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0;
-
-		/** Returns true if the display is extending the desktop. */
-		virtual bool IsDisplayOnDesktop( ) = 0;
-
-		/** Returns true if the display is real and not a fictional display. */
-		virtual bool IsDisplayRealDisplay( ) = 0;
-
-		/** Suggested size for the intermediate render target that the distortion pulls from. */
-		virtual void GetRecommendedRenderTargetSize( uint32_t *pnWidth, uint32_t *pnHeight ) = 0;
-
-		/** Gets the viewport in the frame buffer to draw the output of the distortion into */
-		virtual void GetEyeOutputViewport( EVREye eEye, uint32_t *pnX, uint32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) = 0;
-
-		/** The components necessary to build your own projection matrix in case your
-		* application is doing something fancy like infinite Z */
-		virtual void GetProjectionRaw( EVREye eEye, float *pfLeft, float *pfRight, float *pfTop, float *pfBottom ) = 0;
-
-		/** Returns the result of the distortion function for the specified eye and input UVs. UVs go from 0,0 in
-		* the upper left of that eye's viewport and 1,1 in the lower right of that eye's viewport. */
-		virtual DistortionCoordinates_t ComputeDistortion( EVREye eEye, float fU, float fV ) = 0;
-
-	};
-
-	static const char *IVRDisplayComponent_Version = "IVRDisplayComponent_002";
-
-}
-
-// ivrdriverdirectmodecomponent.h
-namespace vr
-{
-
-
-	// ----------------------------------------------------------------------------------------------
-	// Purpose: This component is used for drivers that implement direct mode entirely on their own
-	//			without allowing the VR Compositor to own the window/device. Chances are you don't
-	//			need to implement this component in your driver.
-	// ----------------------------------------------------------------------------------------------
-	class IVRDriverDirectModeComponent
-	{
-	public:
-
-		// -----------------------------------
-		// Direct mode methods
-		// -----------------------------------
-
-		/** Specific to Oculus compositor support, textures supplied must be created using this method. */
-		virtual void CreateSwapTextureSet( uint32_t unPid, uint32_t unFormat, uint32_t unWidth, uint32_t unHeight, vr::SharedTextureHandle_t( *pSharedTextureHandles )[ 3 ] ) {}
-
-		/** Used to textures created using CreateSwapTextureSet.  Only one of the set's handles needs to be used to destroy the entire set. */
-		virtual void DestroySwapTextureSet( vr::SharedTextureHandle_t sharedTextureHandle ) {}
-
-		/** Used to purge all texture sets for a given process. */
-		virtual void DestroyAllSwapTextureSets( uint32_t unPid ) {}
-
-		/** After Present returns, calls this to get the next index to use for rendering. */
-		virtual void GetNextSwapTextureSetIndex( vr::SharedTextureHandle_t sharedTextureHandles[ 2 ], uint32_t( *pIndices )[ 2 ] ) {}
-
-		/** Call once per layer to draw for this frame.  One shared texture handle per eye.  Textures must be created
-		* using CreateSwapTextureSet and should be alternated per frame.  Call Present once all layers have been submitted. */
-		virtual void SubmitLayer( vr::SharedTextureHandle_t sharedTextureHandles[ 2 ], const vr::VRTextureBounds_t( &bounds )[ 2 ], const vr::HmdMatrix34_t *pPose ) {}
-
-		/** Submits queued layers for display. */
-		virtual void Present( vr::SharedTextureHandle_t syncTexture ) {}
-
-	};
-
-	static const char *IVRDriverDirectModeComponent_Version = "IVRDriverDirectModeComponent_002";
-
-}
-
-// ivrcontrollercomponent.h
-namespace vr
-{
-
-
-	// ----------------------------------------------------------------------------------------------
-	// Purpose: Controller access on a single tracked device.
-	// ----------------------------------------------------------------------------------------------
-	class IVRControllerComponent
-	{
-	public:
-
-		// ------------------------------------
-		// Controller Methods
-		// ------------------------------------
-
-		/** Gets the current state of a controller. */
-		virtual VRControllerState_t GetControllerState( ) = 0;
-
-		/** Returns a uint64 property. If the property is not available this function will return 0. */
-		virtual bool TriggerHapticPulse( uint32_t unAxisId, uint16_t usPulseDurationMicroseconds ) = 0;
-
-	};
-
-
-
-	static const char *IVRControllerComponent_Version = "IVRControllerComponent_001";
-
-}
-// ivrcameracomponent.h
-namespace vr
-{
-	//-----------------------------------------------------------------------------
-	//-----------------------------------------------------------------------------
-	class ICameraVideoSinkCallback
-	{
-	public:
-		virtual void OnCameraVideoSinkCallback() = 0;
-	};
-
-	// ----------------------------------------------------------------------------------------------
-	// Purpose: The camera on a single tracked device
-	// ----------------------------------------------------------------------------------------------
-	class IVRCameraComponent
-	{
-	public:
-		// ------------------------------------
-		// Camera Methods
-		// ------------------------------------
-		virtual bool GetCameraFrameDimensions( vr::ECameraVideoStreamFormat nVideoStreamFormat, uint32_t *pWidth, uint32_t *pHeight ) = 0;
-		virtual bool GetCameraFrameBufferingRequirements( int *pDefaultFrameQueueSize, uint32_t *pFrameBufferDataSize ) = 0;
-		virtual bool SetCameraFrameBuffering( int nFrameBufferCount, void **ppFrameBuffers, uint32_t nFrameBufferDataSize ) = 0;
-		virtual bool SetCameraVideoStreamFormat( vr::ECameraVideoStreamFormat nVideoStreamFormat ) = 0;
-		virtual vr::ECameraVideoStreamFormat GetCameraVideoStreamFormat() = 0;
-		virtual bool StartVideoStream() = 0;
-		virtual void StopVideoStream() = 0;
-		virtual bool IsVideoStreamActive( bool *pbPaused, float *pflElapsedTime ) = 0;
-		virtual const vr::CameraVideoStreamFrame_t *GetVideoStreamFrame() = 0;
-		virtual void ReleaseVideoStreamFrame( const vr::CameraVideoStreamFrame_t *pFrameImage ) = 0;
-		virtual bool SetAutoExposure( bool bEnable ) = 0;
-		virtual bool PauseVideoStream() = 0;
-		virtual bool ResumeVideoStream() = 0;
-		virtual bool GetCameraDistortion( float flInputU, float flInputV, float *pflOutputU, float *pflOutputV ) = 0;
-		virtual bool GetCameraProjection( vr::EVRTrackedCameraFrameType eFrameType, float flZNear, float flZFar, vr::HmdMatrix44_t *pProjection ) = 0;
-		virtual bool SetFrameRate( int nISPFrameRate, int nSensorFrameRate ) = 0;
-		virtual bool SetCameraVideoSinkCallback( vr::ICameraVideoSinkCallback *pCameraVideoSinkCallback ) = 0;
-		virtual bool GetCameraCompatibilityMode( vr::ECameraCompatibilityMode *pCameraCompatibilityMode ) = 0;
-		virtual bool SetCameraCompatibilityMode( vr::ECameraCompatibilityMode nCameraCompatibilityMode ) = 0;
-		virtual bool GetCameraFrameBounds( vr::EVRTrackedCameraFrameType eFrameType, uint32_t *pLeft, uint32_t *pTop, uint32_t *pWidth, uint32_t *pHeight ) = 0;
-		virtual bool GetCameraIntrinsics( vr::EVRTrackedCameraFrameType eFrameType, HmdVector2_t *pFocalLength, HmdVector2_t *pCenter ) = 0;
-	};
-
-	static const char *IVRCameraComponent_Version = "IVRCameraComponent_002";
-}
-// itrackeddevicedriverprovider.h
-namespace vr
-{
-
-class ITrackedDeviceServerDriver;
-struct TrackedDeviceDriverInfo_t;
-struct DriverPose_t;
-typedef PropertyContainerHandle_t DriverHandle_t;
-
-/** This interface is provided by vrserver to allow the driver to notify 
-* the system when something changes about a device. These changes must
-* not change the serial number or class of the device because those values
-* are permanently associated with the device's index. */
-class IVRDriverContext
-{
-public:
-	/** Returns the requested interface. If the interface was not available it will return NULL and fill
-	* out the error. */
-	virtual void *GetGenericInterface( const char *pchInterfaceVersion, EVRInitError *peError = nullptr ) = 0;
-
-	/** Returns the property container handle for this driver */
-	virtual DriverHandle_t GetDriverHandle() = 0;
-};
-
-
-/** This interface must be implemented in each driver. It will be loaded in vrserver.exe */
-class IServerTrackedDeviceProvider
-{
-public:
-	/** initializes the driver. This will be called before any other methods are called.
-	* If Init returns anything other than VRInitError_None the driver DLL will be unloaded.
-	*
-	* pDriverHost will never be NULL, and will always be a pointer to a IServerDriverHost interface
-	*
-	* pchUserDriverConfigDir - The absolute path of the directory where the driver should store user
-	*	config files.
-	* pchDriverInstallDir - The absolute path of the root directory for the driver.
-	*/
-	virtual EVRInitError Init( IVRDriverContext *pDriverContext ) = 0;
-
-	/** cleans up the driver right before it is unloaded */
-	virtual void Cleanup() = 0;
-
-	/** Returns the version of the ITrackedDeviceServerDriver interface used by this driver */
-	virtual const char * const *GetInterfaceVersions() = 0;
-
-	/** Allows the driver do to some work in the main loop of the server. */
-	virtual void RunFrame() = 0;
-
-
-	// ------------  Power State Functions ----------------------- //
-
-	/** Returns true if the driver wants to block Standby mode. */
-	virtual bool ShouldBlockStandbyMode() = 0;
-
-	/** Called when the system is entering Standby mode. The driver should switch itself into whatever sort of low-power
-	* state it has. */
-	virtual void EnterStandby() = 0;
-
-	/** Called when the system is leaving Standby mode. The driver should switch itself back to
-	full operation. */
-	virtual void LeaveStandby() = 0;
-
-};
-
-
-static const char *IServerTrackedDeviceProvider_Version = "IServerTrackedDeviceProvider_004";
-
-
-
-
-/** This interface must be implemented in each driver. It will be loaded in vrclient.dll */
-class IVRWatchdogProvider
-{
-public:
-	/** initializes the driver in watchdog mode. */
-	virtual EVRInitError Init( IVRDriverContext *pDriverContext ) = 0;
-
-	/** cleans up the driver right before it is unloaded */
-	virtual void Cleanup() = 0;
-};
-
-static const char *IVRWatchdogProvider_Version = "IVRWatchdogProvider_001";
-
-}
-// ivrproperties.h
-#include <string>
-
-namespace vr
-{
-
-	enum EPropertyWriteType
-	{
-		PropertyWrite_Set = 0,
-		PropertyWrite_Erase = 1,
-		PropertyWrite_SetError = 2
-	};
-
-	struct PropertyWrite_t
-	{
-		ETrackedDeviceProperty prop;
-		EPropertyWriteType writeType;
-		ETrackedPropertyError eSetError;
-		void *pvBuffer;
-		uint32_t unBufferSize;
-		PropertyTypeTag_t unTag;
-		ETrackedPropertyError eError;
-	};
-
-	struct PropertyRead_t
-	{
-		ETrackedDeviceProperty prop;
-		void *pvBuffer;
-		uint32_t unBufferSize;
-		PropertyTypeTag_t unTag;
-		uint32_t unRequiredBufferSize;
-		ETrackedPropertyError eError;
-	};
-
-
-class IVRProperties
-{
-public:
-
-	/** Reads a set of properties atomically. See the PropertyReadBatch_t struct for more information. */
-	virtual ETrackedPropertyError ReadPropertyBatch( PropertyContainerHandle_t ulContainerHandle, PropertyRead_t *pBatch, uint32_t unBatchEntryCount ) = 0;
-
-	/** Writes a set of properties atomically. See the PropertyWriteBatch_t struct for more information. */
-	virtual ETrackedPropertyError WritePropertyBatch( PropertyContainerHandle_t ulContainerHandle, PropertyWrite_t *pBatch, uint32_t unBatchEntryCount ) = 0;
-
-	/** returns a string that corresponds with the specified property error. The string will be the name
-	* of the error enum value for all valid error codes */
-	virtual const char *GetPropErrorNameFromEnum( ETrackedPropertyError error ) = 0;
-
-	/** Returns a container handle given a tracked device index */
-	virtual PropertyContainerHandle_t TrackedDeviceToPropertyContainer( TrackedDeviceIndex_t nDevice ) = 0;
-
-};
-
-static const char * const IVRProperties_Version = "IVRProperties_001";
-
-class CVRPropertyHelpers
-{
-public:
-	CVRPropertyHelpers( IVRProperties * pProperties ) : m_pProperties( pProperties ) {}
-
-	/** Returns a scaler property. If the device index is not valid or the property value type does not match,
-	* this function will return false. */
-	bool GetBoolProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L );
-	float GetFloatProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L );
-	int32_t GetInt32Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L );
-	uint64_t GetUint64Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L );
-
-	/** Returns a single typed property. If the device index is not valid or the property is not a string type this function will
-	* return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing
-	* null. Strings will always fit in buffers of k_unMaxPropertyStringSize characters. */
-	uint32_t GetProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, VR_OUT_STRING() void *pvBuffer, uint32_t unBufferSize, PropertyTypeTag_t *punTag, ETrackedPropertyError *pError = 0L );
-
-
-	/** Returns a string property. If the device index is not valid or the property is not a string type this function will
-	* return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing
-	* null. Strings will always fit in buffers of k_unMaxPropertyStringSize characters. */
-	uint32_t GetStringProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, ETrackedPropertyError *pError = 0L );
-
-	/** Returns a string property as a std::string. If the device index is not valid or the property is not a string type this function will
-	* return an empty string. */
-	std::string GetStringProperty( vr::PropertyContainerHandle_t ulContainer, vr::ETrackedDeviceProperty prop, vr::ETrackedPropertyError *peError = nullptr );
-
-	/** Sets a scaler property. The new value will be returned on any subsequent call to get this property in any process. */
-	ETrackedPropertyError SetBoolProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, bool bNewValue );
-	ETrackedPropertyError SetFloatProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, float fNewValue );
-	ETrackedPropertyError SetInt32Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, int32_t nNewValue );
-	ETrackedPropertyError SetUint64Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, uint64_t ulNewValue );
-
-	/** Sets a string property. The new value will be returned on any subsequent call to get this property in any process. */
-	ETrackedPropertyError SetStringProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, const char *pchNewValue );
-
-	/** Sets a single typed property. The new value will be returned on any subsequent call to get this property in any process. */
-	ETrackedPropertyError SetProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, void *pvNewValue, uint32_t unNewValueSize, PropertyTypeTag_t unTag );
-
-	/** Sets the error return value for a property. This value will be returned on all subsequent requests to get the property */
-	ETrackedPropertyError SetPropertyError( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError eError );
-
-	/** Clears any value or error set for the property. */
-	ETrackedPropertyError EraseProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop );
-
-	/* Turns a device index into a property container handle. */
-	PropertyContainerHandle_t TrackedDeviceToPropertyContainer( TrackedDeviceIndex_t nDevice ) { return m_pProperties->TrackedDeviceToPropertyContainer( nDevice );  }
-
-private:
-	template<typename T>
-	T GetPropertyHelper( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError, T bDefault, PropertyTypeTag_t unTypeTag );
-
-	IVRProperties *m_pProperties;
-};
-
-
-inline uint32_t CVRPropertyHelpers::GetProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, VR_OUT_STRING() void *pvBuffer, uint32_t unBufferSize, PropertyTypeTag_t *punTag, ETrackedPropertyError *pError )
-{
-	PropertyRead_t batch;
-	batch.prop = prop;
-	batch.pvBuffer = pvBuffer;
-	batch.unBufferSize = unBufferSize;
-
-	m_pProperties->ReadPropertyBatch( ulContainerHandle, &batch, 1 );
-
-	if ( pError )
-	{
-		*pError = batch.eError;
-	}
-
-	if ( punTag )
-	{
-		*punTag = batch.unTag;
-	}
-
-	return batch.unRequiredBufferSize;
-}
-
-
-/** Sets a single typed property. The new value will be returned on any subsequent call to get this property in any process. */
-inline ETrackedPropertyError CVRPropertyHelpers::SetProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, void *pvNewValue, uint32_t unNewValueSize, PropertyTypeTag_t unTag )
-{
-	PropertyWrite_t batch;
-	batch.writeType = PropertyWrite_Set;
-	batch.prop = prop;
-	batch.pvBuffer = pvNewValue;
-	batch.unBufferSize = unNewValueSize;
-	batch.unTag = unTag;
-
-	m_pProperties->WritePropertyBatch( ulContainerHandle, &batch, 1 );
-
-	return batch.eError;
-}
-
-
-/** Returns a string property. If the device index is not valid or the property is not a string type this function will
-* return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing
-* null. Strings will always fit in buffers of k_unMaxPropertyStringSize characters. */
-inline uint32_t CVRPropertyHelpers::GetStringProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, ETrackedPropertyError *pError )
-{
-	PropertyTypeTag_t unTag;
-	ETrackedPropertyError error;
-	uint32_t unRequiredSize = GetProperty( ulContainerHandle, prop, pchValue, unBufferSize, &unTag, &error );
-	if ( unTag != k_unStringPropertyTag && error == TrackedProp_Success )
-	{
-		error = TrackedProp_WrongDataType;
-	}
-
-	if ( pError )
-	{
-		*pError = error;
-	}
-
-	if ( error != TrackedProp_Success )
-	{
-		if ( pchValue && unBufferSize )
-		{
-			*pchValue = '\0';
-		}
-	}
-
-	return unRequiredSize;
-}
-
-
-/** Returns a string property as a std::string. If the device index is not valid or the property is not a string type this function will
-* return an empty string. */
-inline std::string CVRPropertyHelpers::GetStringProperty( vr::PropertyContainerHandle_t ulContainer, vr::ETrackedDeviceProperty prop, vr::ETrackedPropertyError *peError )
-{
-	char buf[1024];
-	vr::ETrackedPropertyError err;
-	uint32_t unRequiredBufferLen = GetStringProperty( ulContainer, prop, buf, sizeof(buf), &err );
-
-	std::string sResult;
-
-	if ( err == TrackedProp_Success )
-	{
-		sResult = buf;
-	}
-	else if ( err == TrackedProp_BufferTooSmall )
-	{
-		char *pchBuffer = new char[unRequiredBufferLen];
-		unRequiredBufferLen = GetStringProperty( ulContainer, prop, pchBuffer, unRequiredBufferLen, &err );
-		sResult = pchBuffer;
-		delete[] pchBuffer;
-	}
-
-	if ( peError )
-	{
-		*peError = err;
-	}
-
-	return sResult;
-}
-
-
-/** Sets a string property. The new value will be returned on any subsequent call to get this property in any process. */
-inline ETrackedPropertyError CVRPropertyHelpers::SetStringProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, const char *pchNewValue )
-{
-	if ( !pchNewValue )
-		return TrackedProp_InvalidOperation;
-
-	// this is strlen without the dependency on string.h
-	const char *pchCurr = pchNewValue;
-	while ( *pchCurr )
-	{
-		pchCurr++;
-	}
-
-	return SetProperty( ulContainerHandle, prop, (void *)pchNewValue, (uint32_t)(pchCurr - pchNewValue) + 1, k_unStringPropertyTag );
-}
-
-
-template<typename T>
-inline T CVRPropertyHelpers::GetPropertyHelper( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError, T bDefault, PropertyTypeTag_t unTypeTag )
-{
-	T bValue;
-	ETrackedPropertyError eError;
-	PropertyTypeTag_t unReadTag;
-	GetProperty( ulContainerHandle, prop, &bValue, sizeof( bValue ), &unReadTag, &eError );
-	if ( unReadTag != unTypeTag && eError == TrackedProp_Success )
-	{
-		eError = TrackedProp_WrongDataType;
-	};
-
-	if ( pError )
-		*pError = eError;
-	if ( eError != TrackedProp_Success )
-	{
-		return bDefault;
-	}
-	else
-	{
-		return bValue;
-	}
-}
-
-
-inline bool CVRPropertyHelpers::GetBoolProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError )
-{
-	return GetPropertyHelper<bool>( ulContainerHandle, prop, pError, false, k_unBoolPropertyTag );
-}
-
-
-inline float CVRPropertyHelpers::GetFloatProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError )
-{
-	return GetPropertyHelper<float>( ulContainerHandle, prop, pError, 0.f, k_unFloatPropertyTag );
-}
-
-inline int32_t CVRPropertyHelpers::GetInt32Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError )
-{
-	return GetPropertyHelper<int32_t>( ulContainerHandle, prop, pError, 0, k_unInt32PropertyTag );
-}
-
-inline uint64_t CVRPropertyHelpers::GetUint64Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError *pError )
-{
-	return GetPropertyHelper<uint64_t>( ulContainerHandle, prop, pError, 0, k_unUint64PropertyTag );
-}
-
-inline ETrackedPropertyError CVRPropertyHelpers::SetBoolProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, bool bNewValue )
-{
-	return SetProperty( ulContainerHandle, prop, &bNewValue, sizeof( bNewValue ), k_unBoolPropertyTag );
-}
-
-inline ETrackedPropertyError CVRPropertyHelpers::SetFloatProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, float fNewValue )
-{
-	return SetProperty( ulContainerHandle, prop, &fNewValue, sizeof( fNewValue ), k_unFloatPropertyTag );
-}
-
-inline ETrackedPropertyError CVRPropertyHelpers::SetInt32Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, int32_t nNewValue )
-{
-	return SetProperty( ulContainerHandle, prop, &nNewValue, sizeof( nNewValue ), k_unInt32PropertyTag );
-}
-
-inline ETrackedPropertyError CVRPropertyHelpers::SetUint64Property( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, uint64_t ulNewValue )
-{
-	return SetProperty( ulContainerHandle, prop, &ulNewValue, sizeof( ulNewValue ), k_unUint64PropertyTag );
-}
-
-/** Sets the error return value for a property. This value will be returned on all subsequent requests to get the property */
-inline ETrackedPropertyError CVRPropertyHelpers::SetPropertyError( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop, ETrackedPropertyError eError )
-{
-	PropertyWrite_t batch;
-	batch.writeType = PropertyWrite_SetError;
-	batch.prop = prop;
-	batch.eSetError = eError;
-
-	m_pProperties->WritePropertyBatch( ulContainerHandle, &batch, 1 );
-
-	return batch.eError;
-}
-
-/** Clears any value or error set for the property. */
-inline ETrackedPropertyError CVRPropertyHelpers::EraseProperty( PropertyContainerHandle_t ulContainerHandle, ETrackedDeviceProperty prop )
-{
-	PropertyWrite_t batch;
-	batch.writeType = PropertyWrite_Erase;
-	batch.prop = prop;
-
-	m_pProperties->WritePropertyBatch( ulContainerHandle, &batch, 1 );
-
-	return batch.eError;
-
-}
-
-}
-
-
-// ivrdriverlog.h
-namespace vr
-{
-
-class IVRDriverLog
-{
-public:
-	/** Writes a log message to the log file prefixed with the driver name */
-	virtual void Log( const char *pchLogMessage ) = 0;
-};
-
-
-static const char *IVRDriverLog_Version = "IVRDriverLog_001";
-
-}
-// ivrserverdriverhost.h
-namespace vr
-{
-
-class ITrackedDeviceServerDriver;
-struct TrackedDeviceDriverInfo_t;
-struct DriverPose_t;
-
-/** This interface is provided by vrserver to allow the driver to notify 
-* the system when something changes about a device. These changes must
-* not change the serial number or class of the device because those values
-* are permanently associated with the device's index. */
-class IVRServerDriverHost
-{
-public:
-	/** Notifies the server that a tracked device has been added. If this function returns true
-	* the server will call Activate on the device. If it returns false some kind of error
-	* has occurred and the device will not be activated. */
-	virtual bool TrackedDeviceAdded( const char *pchDeviceSerialNumber, ETrackedDeviceClass eDeviceClass, ITrackedDeviceServerDriver *pDriver ) = 0;
-
-	/** Notifies the server that a tracked device's pose has been updated */
-	virtual void TrackedDevicePoseUpdated( uint32_t unWhichDevice, const DriverPose_t & newPose, uint32_t unPoseStructSize ) = 0;
-
-	/** Notifies the server that vsync has occurred on the the display attached to the device. This is
-	* only permitted on devices of the HMD class. */
-	virtual void VsyncEvent( double vsyncTimeOffsetSeconds ) = 0;
-
-	/** notifies the server that the button was pressed */
-	virtual void TrackedDeviceButtonPressed( uint32_t unWhichDevice, EVRButtonId eButtonId, double eventTimeOffset ) = 0;
-
-	/** notifies the server that the button was unpressed */
-	virtual void TrackedDeviceButtonUnpressed( uint32_t unWhichDevice, EVRButtonId eButtonId, double eventTimeOffset ) = 0;
-
-	/** notifies the server that the button was pressed */
-	virtual void TrackedDeviceButtonTouched( uint32_t unWhichDevice, EVRButtonId eButtonId, double eventTimeOffset ) = 0;
-
-	/** notifies the server that the button was unpressed */
-	virtual void TrackedDeviceButtonUntouched( uint32_t unWhichDevice, EVRButtonId eButtonId, double eventTimeOffset ) = 0;
-
-	/** notifies the server than a controller axis changed */
-	virtual void TrackedDeviceAxisUpdated( uint32_t unWhichDevice, uint32_t unWhichAxis, const VRControllerAxis_t & axisState ) = 0;
-
-	/** Notifies the server that the proximity sensor on the specified device  */
-	virtual void ProximitySensorState( uint32_t unWhichDevice, bool bProximitySensorTriggered ) = 0;
-
-	/** Sends a vendor specific event (VREvent_VendorSpecific_Reserved_Start..VREvent_VendorSpecific_Reserved_End */
-	virtual void VendorSpecificEvent( uint32_t unWhichDevice, vr::EVREventType eventType, const VREvent_Data_t & eventData, double eventTimeOffset ) = 0;
-
-	/** Returns true if SteamVR is exiting */
-	virtual bool IsExiting() = 0;
-
-	/** Returns true and fills the event with the next event on the queue if there is one. If there are no events
-	* this method returns false. uncbVREvent should be the size in bytes of the VREvent_t struct */
-	virtual bool PollNextEvent( VREvent_t *pEvent, uint32_t uncbVREvent ) = 0;
-};
-
-static const char *IVRServerDriverHost_Version = "IVRServerDriverHost_004";
-
-}
-// ivrhiddenarea.h
-namespace vr
-{
-
-class CVRHiddenAreaHelpers
-{
-public:
-	CVRHiddenAreaHelpers( IVRProperties *pProperties ) : m_pProperties( pProperties ) {}
-
-	/** Stores a hidden area mesh in a property */
-	ETrackedPropertyError SetHiddenArea( EVREye eEye, EHiddenAreaMeshType type, HmdVector2_t *pVerts, uint32_t unVertCount );
-
-	/** retrieves a hidden area mesh from a property. Returns the vert count read out of the property.  */
-	uint32_t GetHiddenArea( EVREye eEye, EHiddenAreaMeshType type, HmdVector2_t *pVerts, uint32_t unVertCount, ETrackedPropertyError *peError );
-
-private:
-	ETrackedDeviceProperty GetPropertyEnum( EVREye eEye, EHiddenAreaMeshType type )
-	{
-		return (ETrackedDeviceProperty)(Prop_DisplayHiddenArea_Binary_Start + ((int)type * 2) + (int)eEye);
-	}
-
-	IVRProperties *m_pProperties;
-};
-
-
-inline ETrackedPropertyError CVRHiddenAreaHelpers::SetHiddenArea( EVREye eEye, EHiddenAreaMeshType type, HmdVector2_t *pVerts, uint32_t unVertCount )
-{
-	ETrackedDeviceProperty prop = GetPropertyEnum( eEye, type );
-	CVRPropertyHelpers propHelpers( m_pProperties );
-	return propHelpers.SetProperty( propHelpers.TrackedDeviceToPropertyContainer( k_unTrackedDeviceIndex_Hmd ), prop, pVerts, sizeof( HmdVector2_t ) * unVertCount, k_unHiddenAreaPropertyTag );
-}
-
-
-inline uint32_t CVRHiddenAreaHelpers::GetHiddenArea( EVREye eEye, EHiddenAreaMeshType type, HmdVector2_t *pVerts, uint32_t unVertCount, ETrackedPropertyError *peError )
-{
-	ETrackedDeviceProperty prop = GetPropertyEnum( eEye, type );
-	CVRPropertyHelpers propHelpers( m_pProperties );
-	ETrackedPropertyError propError;
-	PropertyTypeTag_t unTag;
-	uint32_t unBytesNeeded = propHelpers.GetProperty( propHelpers.TrackedDeviceToPropertyContainer( k_unTrackedDeviceIndex_Hmd ), prop, pVerts, sizeof( HmdVector2_t )*unVertCount, &unTag, &propError );
-	if ( propError == TrackedProp_Success && unTag != k_unHiddenAreaPropertyTag )
-	{
-		propError = TrackedProp_WrongDataType;
-		unBytesNeeded = 0;
-	}
-
-	if ( peError )
-	{
-		*peError = propError;
-	}
-
-	return unBytesNeeded / sizeof( HmdVector2_t );
-}
-
-}
-// ivrwatchdoghost.h
-namespace vr
-{
-
-/** This interface is provided by vrclient to allow the driver to make everything wake up */
-class IVRWatchdogHost
-{
-public:
-	/** Client drivers in watchdog mode should call this when they have received a signal from hardware that should
-	* cause SteamVR to start */
-	virtual void WatchdogWakeUp() = 0;
-};
-
-static const char *IVRWatchdogHost_Version = "IVRWatchdogHost_001";
-
-};
-
-
-
-
-
-
-
-namespace vr
-{
-	static const char * const k_InterfaceVersions[] =
-	{
-		IVRSettings_Version,
-		ITrackedDeviceServerDriver_Version,
-		IVRDisplayComponent_Version,
-		IVRDriverDirectModeComponent_Version,
-		IVRControllerComponent_Version,
-		IVRCameraComponent_Version,
-		IServerTrackedDeviceProvider_Version,
-		IVRWatchdogProvider_Version,
-		nullptr
-	};
-
-	inline IVRDriverContext *&VRDriverContext()
-	{
-		static IVRDriverContext *pHost;
-		return pHost;
-	}
-
-	class COpenVRDriverContext
-	{
-	public:
-		COpenVRDriverContext() : m_propertyHelpers(nullptr), m_hiddenAreaHelpers(nullptr) { Clear(); }
-		void Clear();
-
-		EVRInitError InitServer();
-		EVRInitError InitWatchdog();
-
-		IVRSettings *VRSettings()
-		{
-			if ( m_pVRSettings == nullptr )
-			{
-				EVRInitError eError;
-				m_pVRSettings = (IVRSettings *)VRDriverContext()->GetGenericInterface( IVRSettings_Version, &eError );
-			}
-			return m_pVRSettings;
-		}
-
-		IVRProperties *VRPropertiesRaw()
-		{
-			if ( m_pVRProperties == nullptr )
-			{
-				EVRInitError eError;
-				m_pVRProperties = (IVRProperties *)VRDriverContext()->GetGenericInterface( IVRProperties_Version, &eError );
-				m_propertyHelpers = CVRPropertyHelpers( m_pVRProperties );
-				m_hiddenAreaHelpers = CVRHiddenAreaHelpers( m_pVRProperties );
-			}
-			return m_pVRProperties;
-		}
-
-		CVRPropertyHelpers *VRProperties()
-		{
-			VRPropertiesRaw();
-			return &m_propertyHelpers;
-		}
-
-		CVRHiddenAreaHelpers *VRHiddenArea()
-		{
-			VRPropertiesRaw();
-			return &m_hiddenAreaHelpers;
-		}
-
-		IVRServerDriverHost *VRServerDriverHost()
-		{
-			if ( m_pVRServerDriverHost == nullptr )
-			{
-				EVRInitError eError;
-				m_pVRServerDriverHost = (IVRServerDriverHost *)VRDriverContext()->GetGenericInterface( IVRServerDriverHost_Version, &eError );
-			}
-			return m_pVRServerDriverHost;
-		}
-
-		IVRWatchdogHost *VRWatchdogHost()
-		{
-			if ( m_pVRWatchdogHost == nullptr )
-			{
-				EVRInitError eError;
-				m_pVRWatchdogHost = (IVRWatchdogHost *)VRDriverContext()->GetGenericInterface( IVRWatchdogHost_Version, &eError );
-			}
-			return m_pVRWatchdogHost;
-		}
-
-		IVRDriverLog *VRDriverLog()
-		{
-			if ( m_pVRDriverLog == nullptr )
-			{
-				EVRInitError eError;
-				m_pVRDriverLog = (IVRDriverLog *)VRDriverContext()->GetGenericInterface( IVRDriverLog_Version, &eError );
-			}
-			return m_pVRDriverLog;
-		}
-
-		DriverHandle_t VR_CALLTYPE VRDriverHandle()
-		{
-			return VRDriverContext()->GetDriverHandle();
-		}
-
-	private:
-		IVRSettings			*m_pVRSettings;
-		IVRProperties		*m_pVRProperties;
-		CVRPropertyHelpers	m_propertyHelpers;
-		CVRHiddenAreaHelpers	m_hiddenAreaHelpers;
-		IVRServerDriverHost	*m_pVRServerDriverHost;
-		IVRWatchdogHost		*m_pVRWatchdogHost;
-		IVRDriverLog		*m_pVRDriverLog;
-	};
-
-	inline COpenVRDriverContext &OpenVRInternal_ModuleServerDriverContext()
-	{
-		static void *ctx[sizeof( COpenVRDriverContext ) / sizeof( void * )];
-		return *(COpenVRDriverContext *)ctx; // bypass zero-init constructor
-	}
-
-	inline IVRSettings *VR_CALLTYPE VRSettings() { return OpenVRInternal_ModuleServerDriverContext().VRSettings(); }
-	inline IVRProperties *VR_CALLTYPE VRPropertiesRaw() { return OpenVRInternal_ModuleServerDriverContext().VRPropertiesRaw(); }
-	inline CVRPropertyHelpers *VR_CALLTYPE VRProperties() { return OpenVRInternal_ModuleServerDriverContext().VRProperties(); }
-	inline CVRHiddenAreaHelpers *VR_CALLTYPE VRHiddenArea() { return OpenVRInternal_ModuleServerDriverContext().VRHiddenArea(); }
-	inline IVRDriverLog *VR_CALLTYPE VRDriverLog() { return OpenVRInternal_ModuleServerDriverContext().VRDriverLog(); }
-	inline IVRServerDriverHost *VR_CALLTYPE VRServerDriverHost() { return OpenVRInternal_ModuleServerDriverContext().VRServerDriverHost(); }
-	inline IVRWatchdogHost *VR_CALLTYPE VRWatchdogHost() { return OpenVRInternal_ModuleServerDriverContext().VRWatchdogHost(); }
-	inline DriverHandle_t VR_CALLTYPE VRDriverHandle() { return OpenVRInternal_ModuleServerDriverContext().VRDriverHandle(); }
-	inline void COpenVRDriverContext::Clear()
-	{
-		m_pVRSettings = nullptr;
-		m_pVRProperties = nullptr;
-		m_pVRServerDriverHost = nullptr;
-		m_pVRDriverLog = nullptr;
-		m_pVRWatchdogHost = nullptr;
-	}
-
-	inline EVRInitError COpenVRDriverContext::InitServer()
-	{
-		Clear();
-		if ( !VRServerDriverHost()
-			|| !VRSettings()
-			|| !VRProperties()
-			|| !VRDriverLog() )
-			return VRInitError_Init_InterfaceNotFound;
-		return VRInitError_None;
-	}
-
-	inline EVRInitError COpenVRDriverContext::InitWatchdog()
-	{
-		Clear();
-		if ( !VRWatchdogHost()
-			|| !VRSettings()
-			|| !VRDriverLog() )
-			return VRInitError_Init_InterfaceNotFound;
-		return VRInitError_None;
-	}
-
-	inline EVRInitError InitServerDriverContext( IVRDriverContext *pContext )
-	{
-		VRDriverContext() = pContext;
-		return OpenVRInternal_ModuleServerDriverContext().InitServer();
-	}
-
-	inline EVRInitError InitWatchdogDriverContext( IVRDriverContext *pContext )
-	{
-		VRDriverContext() = pContext;
-		return OpenVRInternal_ModuleServerDriverContext().InitWatchdog();
-	}
-
-	inline void CleanupDriverContext()
-	{
-		VRDriverContext() = nullptr;
-		OpenVRInternal_ModuleServerDriverContext().Clear();
-	}
-
-	#define VR_INIT_SERVER_DRIVER_CONTEXT( pContext ) \
-			{ \
-			vr::EVRInitError eError = vr::InitServerDriverContext( pContext ); \
-			if( eError != vr::VRInitError_None ) \
-				return eError; \
-			}
-
-	#define VR_CLEANUP_SERVER_DRIVER_CONTEXT() \
-		vr::CleanupDriverContext();
-
-	#define VR_INIT_WATCHDOG_DRIVER_CONTEXT( pContext ) \
-			{ \
-			vr::EVRInitError eError = vr::InitWatchdogDriverContext( pContext ); \
-			if( eError != vr::VRInitError_None ) \
-				return eError; \
-			}
-
-	#define VR_CLEANUP_WATCHDOG_DRIVER_CONTEXT() \
-		vr::CleanupDriverContext();
-}
-// End
-
-#endif // _OPENVR_DRIVER_API
-
-

+ 0 - 3985
libraries/openvr/include/openvr_mingw.hpp

@@ -1,3985 +0,0 @@
-#pragma once
-
-// openvr.h
-//========= Copyright Valve Corporation ============//
-// Dynamically generated file. Do not modify this file directly.
-
-#ifndef _OPENVR_API
-#define _OPENVR_API
-
-#include <stdint.h>
-
-
-
-// vrtypes.h
-#ifndef _INCLUDE_VRTYPES_H
-#define _INCLUDE_VRTYPES_H
-
-// Forward declarations to avoid requiring vulkan.h
-struct VkDevice_T;
-struct VkPhysicalDevice_T;
-struct VkInstance_T;
-struct VkQueue_T;
-
-// Forward declarations to avoid requiring d3d12.h
-struct ID3D12Resource;
-struct ID3D12CommandQueue;
-
-namespace vr
-{
-
-#if defined(__linux__) || defined(__APPLE__) 
-	// The 32-bit version of gcc has the alignment requirement for uint64 and double set to
-	// 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned.
-	// The 64-bit version of gcc has the alignment requirement for these types set to
-	// 8 meaning that unless we use #pragma pack(4) our structures will get bigger.
-	// The 64-bit structure packing has to match the 32-bit structure packing for each platform.
-	#pragma pack( push, 4 )
-#else
-	#pragma pack( push, 8 )
-#endif
-
-typedef void* glSharedTextureHandle_t;
-typedef int32_t glInt_t;
-typedef uint32_t glUInt_t;
-
-// right-handed system
-// +y is up
-// +x is to the right
-// -z is going away from you
-// Distance unit is  meters
-struct HmdMatrix34_t
-{
-	float m[3][4];
-};
-
-struct HmdMatrix44_t
-{
-	float m[4][4];
-};
-
-struct HmdVector3_t
-{
-	float v[3];
-};
-
-struct HmdVector4_t
-{
-	float v[4];
-};
-
-struct HmdVector3d_t
-{
-	double v[3];
-};
-
-struct HmdVector2_t
-{
-	float v[2];
-};
-
-struct HmdQuaternion_t
-{
-	double w, x, y, z;
-};
-
-struct HmdColor_t
-{
-	float r, g, b, a;
-};
-
-struct HmdQuad_t
-{
-	HmdVector3_t vCorners[ 4 ];
-};
-
-struct HmdRect2_t
-{
-	HmdVector2_t vTopLeft;
-	HmdVector2_t vBottomRight;
-};
-
-/** Used to return the post-distortion UVs for each color channel. 
-* UVs range from 0 to 1 with 0,0 in the upper left corner of the 
-* source render target. The 0,0 to 1,1 range covers a single eye. */
-struct DistortionCoordinates_t
-{
-	float rfRed[2];
-	float rfGreen[2];
-	float rfBlue[2];
-};
-
-enum EVREye
-{
-	Eye_Left = 0,
-	Eye_Right = 1
-};
-
-enum ETextureType
-{
-	TextureType_DirectX = 0, // Handle is an ID3D11Texture
-	TextureType_OpenGL = 1,  // Handle is an OpenGL texture name or an OpenGL render buffer name, depending on submit flags
-	TextureType_Vulkan = 2, // Handle is a pointer to a VRVulkanTextureData_t structure
-	TextureType_IOSurface = 3, // Handle is a macOS cross-process-sharable IOSurface
-	TextureType_DirectX12 = 4, // Handle is a pointer to a D3D12TextureData_t structure
-};
-
-enum EColorSpace
-{
-	ColorSpace_Auto = 0,	// Assumes 'gamma' for 8-bit per component formats, otherwise 'linear'.  This mirrors the DXGI formats which have _SRGB variants.
-	ColorSpace_Gamma = 1,	// Texture data can be displayed directly on the display without any conversion (a.k.a. display native format).
-	ColorSpace_Linear = 2,	// Same as gamma but has been converted to a linear representation using DXGI's sRGB conversion algorithm.
-};
-
-struct Texture_t
-{
-	void* handle; // See ETextureType definition above
-	ETextureType eType;
-	EColorSpace eColorSpace;
-};
-
-// Handle to a shared texture (HANDLE on Windows obtained using OpenSharedResource).
-typedef uint64_t SharedTextureHandle_t;
-#define INVALID_SHARED_TEXTURE_HANDLE	((vr::SharedTextureHandle_t)0)
-
-enum ETrackingResult
-{
-	TrackingResult_Uninitialized			= 1,
-
-	TrackingResult_Calibrating_InProgress	= 100,
-	TrackingResult_Calibrating_OutOfRange	= 101,
-
-	TrackingResult_Running_OK				= 200,
-	TrackingResult_Running_OutOfRange		= 201,
-};
-
-static const uint32_t k_unMaxDriverDebugResponseSize = 32768;
-
-/** Used to pass device IDs to API calls */
-typedef uint32_t TrackedDeviceIndex_t;
-static const uint32_t k_unTrackedDeviceIndex_Hmd = 0;
-static const uint32_t k_unMaxTrackedDeviceCount = 16;
-static const uint32_t k_unTrackedDeviceIndexOther = 0xFFFFFFFE;
-static const uint32_t k_unTrackedDeviceIndexInvalid = 0xFFFFFFFF;
-
-/** Describes what kind of object is being tracked at a given ID */
-enum ETrackedDeviceClass
-{
-	TrackedDeviceClass_Invalid = 0,				// the ID was not valid.
-	TrackedDeviceClass_HMD = 1,					// Head-Mounted Displays
-	TrackedDeviceClass_Controller = 2,			// Tracked controllers
-	TrackedDeviceClass_GenericTracker = 3,		// Generic trackers, similar to controllers
-	TrackedDeviceClass_TrackingReference = 4,	// Camera and base stations that serve as tracking reference points
-};
-
-
-/** Describes what specific role associated with a tracked device */
-enum ETrackedControllerRole
-{
-	TrackedControllerRole_Invalid = 0,					// Invalid value for controller type
-	TrackedControllerRole_LeftHand = 1,					// Tracked device associated with the left hand
-	TrackedControllerRole_RightHand = 2,				// Tracked device associated with the right hand
-};
-
-
-/** describes a single pose for a tracked object */
-struct TrackedDevicePose_t
-{
-	HmdMatrix34_t mDeviceToAbsoluteTracking;
-	HmdVector3_t vVelocity;				// velocity in tracker space in m/s
-	HmdVector3_t vAngularVelocity;		// angular velocity in radians/s (?)
-	ETrackingResult eTrackingResult;
-	bool bPoseIsValid;
-
-	// This indicates that there is a device connected for this spot in the pose array.
-	// It could go from true to false if the user unplugs the device.
-	bool bDeviceIsConnected;
-};
-
-/** Identifies which style of tracking origin the application wants to use
-* for the poses it is requesting */
-enum ETrackingUniverseOrigin
-{
-	TrackingUniverseSeated = 0,		// Poses are provided relative to the seated zero pose
-	TrackingUniverseStanding = 1,	// Poses are provided relative to the safe bounds configured by the user
-	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.
-};
-
-// Refers to a single container of properties
-typedef uint64_t PropertyContainerHandle_t;
-typedef uint32_t PropertyTypeTag_t;
-
-static const PropertyContainerHandle_t k_ulInvalidPropertyContainer = 0;
-static const PropertyTypeTag_t k_unInvalidPropertyTag = 0;
-
-// Use these tags to set/get common types as struct properties
-static const PropertyTypeTag_t k_unFloatPropertyTag = 1;
-static const PropertyTypeTag_t k_unInt32PropertyTag = 2;
-static const PropertyTypeTag_t k_unUint64PropertyTag = 3;
-static const PropertyTypeTag_t k_unBoolPropertyTag = 4;
-static const PropertyTypeTag_t k_unStringPropertyTag = 5;
-
-static const PropertyTypeTag_t k_unHmdMatrix34PropertyTag = 20;
-static const PropertyTypeTag_t k_unHmdMatrix44PropertyTag = 21;
-static const PropertyTypeTag_t k_unHmdVector3PropertyTag = 22;
-static const PropertyTypeTag_t k_unHmdVector4PropertyTag = 23;
-
-static const PropertyTypeTag_t k_unHiddenAreaPropertyTag = 30;
-
-static const PropertyTypeTag_t k_unOpenVRInternalReserved_Start = 1000;
-static const PropertyTypeTag_t k_unOpenVRInternalReserved_End = 10000;
-
-
-/** Each entry in this enum represents a property that can be retrieved about a
-* tracked device. Many fields are only valid for one ETrackedDeviceClass. */
-enum ETrackedDeviceProperty
-{
-	Prop_Invalid								= 0,
-
-	// general properties that apply to all device classes
-	Prop_TrackingSystemName_String				= 1000,
-	Prop_ModelNumber_String						= 1001,
-	Prop_SerialNumber_String					= 1002,
-	Prop_RenderModelName_String					= 1003,
-	Prop_WillDriftInYaw_Bool					= 1004,
-	Prop_ManufacturerName_String				= 1005,
-	Prop_TrackingFirmwareVersion_String			= 1006,
-	Prop_HardwareRevision_String				= 1007,
-	Prop_AllWirelessDongleDescriptions_String	= 1008,
-	Prop_ConnectedWirelessDongle_String			= 1009,
-	Prop_DeviceIsWireless_Bool					= 1010,
-	Prop_DeviceIsCharging_Bool					= 1011,
-	Prop_DeviceBatteryPercentage_Float			= 1012, // 0 is empty, 1 is full
-	Prop_StatusDisplayTransform_Matrix34		= 1013,
-	Prop_Firmware_UpdateAvailable_Bool			= 1014,
-	Prop_Firmware_ManualUpdate_Bool				= 1015,
-	Prop_Firmware_ManualUpdateURL_String		= 1016,
-	Prop_HardwareRevision_Uint64				= 1017,
-	Prop_FirmwareVersion_Uint64					= 1018,
-	Prop_FPGAVersion_Uint64						= 1019,
-	Prop_VRCVersion_Uint64						= 1020,
-	Prop_RadioVersion_Uint64					= 1021,
-	Prop_DongleVersion_Uint64					= 1022,
-	Prop_BlockServerShutdown_Bool				= 1023,
-	Prop_CanUnifyCoordinateSystemWithHmd_Bool	= 1024,
-	Prop_ContainsProximitySensor_Bool			= 1025,
-	Prop_DeviceProvidesBatteryStatus_Bool		= 1026,
-	Prop_DeviceCanPowerOff_Bool					= 1027,
-	Prop_Firmware_ProgrammingTarget_String		= 1028,
-	Prop_DeviceClass_Int32						= 1029,
-	Prop_HasCamera_Bool							= 1030,
-	Prop_DriverVersion_String                   = 1031,
-	Prop_Firmware_ForceUpdateRequired_Bool      = 1032,
-	Prop_ViveSystemButtonFixRequired_Bool		= 1033,
-	Prop_ParentDriver_Uint64					= 1034,
-
-
-	// Properties that are unique to TrackedDeviceClass_HMD
-	Prop_ReportsTimeSinceVSync_Bool				= 2000,
-	Prop_SecondsFromVsyncToPhotons_Float		= 2001,
-	Prop_DisplayFrequency_Float					= 2002,
-	Prop_UserIpdMeters_Float					= 2003,
-	Prop_CurrentUniverseId_Uint64				= 2004, 
-	Prop_PreviousUniverseId_Uint64				= 2005, 
-	Prop_DisplayFirmwareVersion_Uint64			= 2006,
-	Prop_IsOnDesktop_Bool						= 2007,
-	Prop_DisplayMCType_Int32					= 2008,
-	Prop_DisplayMCOffset_Float					= 2009,
-	Prop_DisplayMCScale_Float					= 2010,
-	Prop_EdidVendorID_Int32						= 2011,
-	Prop_DisplayMCImageLeft_String              = 2012,
-	Prop_DisplayMCImageRight_String             = 2013,
-	Prop_DisplayGCBlackClamp_Float				= 2014,
-	Prop_EdidProductID_Int32					= 2015,
-	Prop_CameraToHeadTransform_Matrix34			= 2016,
-	Prop_DisplayGCType_Int32					= 2017,
-	Prop_DisplayGCOffset_Float					= 2018,
-	Prop_DisplayGCScale_Float					= 2019,
-	Prop_DisplayGCPrescale_Float				= 2020,
-	Prop_DisplayGCImage_String					= 2021,
-	Prop_LensCenterLeftU_Float					= 2022,
-	Prop_LensCenterLeftV_Float					= 2023,
-	Prop_LensCenterRightU_Float					= 2024,
-	Prop_LensCenterRightV_Float					= 2025,
-	Prop_UserHeadToEyeDepthMeters_Float			= 2026,
-	Prop_CameraFirmwareVersion_Uint64			= 2027,
-	Prop_CameraFirmwareDescription_String		= 2028,
-	Prop_DisplayFPGAVersion_Uint64				= 2029,
-	Prop_DisplayBootloaderVersion_Uint64		= 2030,
-	Prop_DisplayHardwareVersion_Uint64			= 2031,
-	Prop_AudioFirmwareVersion_Uint64			= 2032,
-	Prop_CameraCompatibilityMode_Int32			= 2033,
-	Prop_ScreenshotHorizontalFieldOfViewDegrees_Float = 2034,
-	Prop_ScreenshotVerticalFieldOfViewDegrees_Float = 2035,
-	Prop_DisplaySuppressed_Bool					= 2036,
-	Prop_DisplayAllowNightMode_Bool				= 2037,
-	Prop_DisplayMCImageWidth_Int32				= 2038,
-	Prop_DisplayMCImageHeight_Int32				= 2039,
-	Prop_DisplayMCImageNumChannels_Int32		= 2040,
-	Prop_DisplayMCImageData_Binary				= 2041,
-	Prop_UsesDriverDirectMode_Bool				= 2042,
-
-	// Properties that are unique to TrackedDeviceClass_Controller
-	Prop_AttachedDeviceId_String				= 3000,
-	Prop_SupportedButtons_Uint64				= 3001,
-	Prop_Axis0Type_Int32						= 3002, // Return value is of type EVRControllerAxisType
-	Prop_Axis1Type_Int32						= 3003, // Return value is of type EVRControllerAxisType
-	Prop_Axis2Type_Int32						= 3004, // Return value is of type EVRControllerAxisType
-	Prop_Axis3Type_Int32						= 3005, // Return value is of type EVRControllerAxisType
-	Prop_Axis4Type_Int32						= 3006, // Return value is of type EVRControllerAxisType
-	Prop_ControllerRoleHint_Int32				= 3007, // Return value is of type ETrackedControllerRole
-
-	// Properties that are unique to TrackedDeviceClass_TrackingReference
-	Prop_FieldOfViewLeftDegrees_Float			= 4000,
-	Prop_FieldOfViewRightDegrees_Float			= 4001,
-	Prop_FieldOfViewTopDegrees_Float			= 4002,
-	Prop_FieldOfViewBottomDegrees_Float			= 4003,
-	Prop_TrackingRangeMinimumMeters_Float		= 4004,
-	Prop_TrackingRangeMaximumMeters_Float		= 4005,
-	Prop_ModeLabel_String						= 4006,
-
-	// Properties that are used for user interface like icons names
-	Prop_IconPathName_String						= 5000, // usually a directory named "icons"
-	Prop_NamedIconPathDeviceOff_String				= 5001, // PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
-	Prop_NamedIconPathDeviceSearching_String		= 5002, // PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
-	Prop_NamedIconPathDeviceSearchingAlert_String	= 5003, // PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
-	Prop_NamedIconPathDeviceReady_String			= 5004, // PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
-	Prop_NamedIconPathDeviceReadyAlert_String		= 5005, // PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
-	Prop_NamedIconPathDeviceNotReady_String			= 5006, // PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
-	Prop_NamedIconPathDeviceStandby_String			= 5007, // PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
-	Prop_NamedIconPathDeviceAlertLow_String			= 5008, // PNG for static icon, or GIF for animation, 50x32 for headsets and 32x32 for others
-
-	// Properties that are used by helpers, but are opaque to applications
-	Prop_DisplayHiddenArea_Binary_Start				= 5100,
-	Prop_DisplayHiddenArea_Binary_End				= 5150,
-
-	// Properties that are unique to drivers
-	Prop_UserConfigPath_String					= 6000,
-	Prop_InstallPath_String						= 6001,
-
-	// Vendors are free to expose private debug data in this reserved region
-	Prop_VendorSpecific_Reserved_Start			= 10000,
-	Prop_VendorSpecific_Reserved_End			= 10999,
-};
-
-/** No string property will ever be longer than this length */
-static const uint32_t k_unMaxPropertyStringSize = 32 * 1024;
-
-/** Used to return errors that occur when reading properties. */
-enum ETrackedPropertyError
-{
-	TrackedProp_Success						= 0,
-	TrackedProp_WrongDataType				= 1,
-	TrackedProp_WrongDeviceClass			= 2,
-	TrackedProp_BufferTooSmall				= 3,
-	TrackedProp_UnknownProperty				= 4, // Driver has not set the property (and may not ever).
-	TrackedProp_InvalidDevice				= 5,
-	TrackedProp_CouldNotContactServer		= 6,
-	TrackedProp_ValueNotProvidedByDevice	= 7,
-	TrackedProp_StringExceedsMaximumLength	= 8,
-	TrackedProp_NotYetAvailable				= 9, // The property value isn't known yet, but is expected soon. Call again later.
-	TrackedProp_PermissionDenied			= 10,
-	TrackedProp_InvalidOperation			= 11,
-};
-
-/** Allows the application to control what part of the provided texture will be used in the
-* frame buffer. */
-struct VRTextureBounds_t
-{
-	float uMin, vMin;
-	float uMax, vMax;
-};
-
-
-/** Allows the application to control how scene textures are used by the compositor when calling Submit. */
-enum EVRSubmitFlags
-{
-	// Simple render path. App submits rendered left and right eye images with no lens distortion correction applied.
-	Submit_Default = 0x00,
-
-	// App submits final left and right eye images with lens distortion already applied (lens distortion makes the images appear
-	// barrel distorted with chromatic aberration correction applied). The app would have used the data returned by
-	// vr::IVRSystem::ComputeDistortion() to apply the correct distortion to the rendered images before calling Submit().
-	Submit_LensDistortionAlreadyApplied = 0x01,
-
-	// If the texture pointer passed in is actually a renderbuffer (e.g. for MSAA in OpenGL) then set this flag.
-	Submit_GlRenderBuffer = 0x02,
-
-	// Do not use
-	Submit_Reserved = 0x04,
-};
-
-/** Data required for passing Vulkan textures to IVRCompositor::Submit.
-* Be sure to call OpenVR_Shutdown before destroying these resources. */
-struct VRVulkanTextureData_t
-{
-	uint64_t m_nImage; // VkImage
-	VkDevice_T *m_pDevice;
-	VkPhysicalDevice_T *m_pPhysicalDevice;
-	VkInstance_T *m_pInstance;
-	VkQueue_T *m_pQueue;
-	uint32_t m_nQueueFamilyIndex;
-	uint32_t m_nWidth, m_nHeight, m_nFormat, m_nSampleCount;
-};
-
-/** Data required for passing D3D12 textures to IVRCompositor::Submit.
-* Be sure to call OpenVR_Shutdown before destroying these resources. */
-struct D3D12TextureData_t
-{
-	ID3D12Resource *m_pResource;
-	ID3D12CommandQueue *m_pCommandQueue;
-	uint32_t m_nNodeMask;
-};
-
-/** Status of the overall system or tracked objects */
-enum EVRState
-{
-	VRState_Undefined = -1,
-	VRState_Off = 0,
-	VRState_Searching = 1,
-	VRState_Searching_Alert = 2,
-	VRState_Ready = 3,
-	VRState_Ready_Alert = 4,
-	VRState_NotReady = 5,
-	VRState_Standby = 6,
-	VRState_Ready_Alert_Low = 7,
-};
-
-/** The types of events that could be posted (and what the parameters mean for each event type) */
-enum EVREventType
-{
-	VREvent_None = 0,
-
-	VREvent_TrackedDeviceActivated		= 100,
-	VREvent_TrackedDeviceDeactivated	= 101,
-	VREvent_TrackedDeviceUpdated		= 102,
-	VREvent_TrackedDeviceUserInteractionStarted	= 103,
-	VREvent_TrackedDeviceUserInteractionEnded	= 104,
-	VREvent_IpdChanged					= 105,
-	VREvent_EnterStandbyMode			= 106,
-	VREvent_LeaveStandbyMode			= 107,
-	VREvent_TrackedDeviceRoleChanged	= 108,
-	VREvent_WatchdogWakeUpRequested		= 109,
-	VREvent_LensDistortionChanged		= 110,
-	VREvent_PropertyChanged				= 111,
-
-	VREvent_ButtonPress					= 200, // data is controller
-	VREvent_ButtonUnpress				= 201, // data is controller
-	VREvent_ButtonTouch					= 202, // data is controller
-	VREvent_ButtonUntouch				= 203, // data is controller
-
-	VREvent_MouseMove					= 300, // data is mouse
-	VREvent_MouseButtonDown				= 301, // data is mouse
-	VREvent_MouseButtonUp				= 302, // data is mouse
-	VREvent_FocusEnter					= 303, // data is overlay
-	VREvent_FocusLeave					= 304, // data is overlay
-	VREvent_Scroll						= 305, // data is mouse
-	VREvent_TouchPadMove				= 306, // data is mouse
-	VREvent_OverlayFocusChanged			= 307, // data is overlay, global event
-
-	VREvent_InputFocusCaptured			= 400, // data is process DEPRECATED
-	VREvent_InputFocusReleased			= 401, // data is process DEPRECATED
-	VREvent_SceneFocusLost				= 402, // data is process
-	VREvent_SceneFocusGained			= 403, // data is process
-	VREvent_SceneApplicationChanged		= 404, // data is process - The App actually drawing the scene changed (usually to or from the compositor)
-	VREvent_SceneFocusChanged			= 405, // data is process - New app got access to draw the scene
-	VREvent_InputFocusChanged			= 406, // data is process
-	VREvent_SceneApplicationSecondaryRenderingStarted = 407, // data is process
-
-	VREvent_HideRenderModels			= 410, // Sent to the scene application to request hiding render models temporarily
-	VREvent_ShowRenderModels			= 411, // Sent to the scene application to request restoring render model visibility
-
-	VREvent_OverlayShown				= 500,
-	VREvent_OverlayHidden				= 501,
-	VREvent_DashboardActivated			= 502,
-	VREvent_DashboardDeactivated		= 503,
-	VREvent_DashboardThumbSelected		= 504, // Sent to the overlay manager - data is overlay
-	VREvent_DashboardRequested			= 505, // Sent to the overlay manager - data is overlay
-	VREvent_ResetDashboard				= 506, // Send to the overlay manager
-	VREvent_RenderToast					= 507, // Send to the dashboard to render a toast - data is the notification ID
-	VREvent_ImageLoaded					= 508, // Sent to overlays when a SetOverlayRaw or SetOverlayFromFile call finishes loading
-	VREvent_ShowKeyboard				= 509, // Sent to keyboard renderer in the dashboard to invoke it
-	VREvent_HideKeyboard				= 510, // Sent to keyboard renderer in the dashboard to hide it
-	VREvent_OverlayGamepadFocusGained	= 511, // Sent to an overlay when IVROverlay::SetFocusOverlay is called on it
-	VREvent_OverlayGamepadFocusLost		= 512, // Send to an overlay when it previously had focus and IVROverlay::SetFocusOverlay is called on something else
-	VREvent_OverlaySharedTextureChanged = 513,
-	VREvent_DashboardGuideButtonDown	= 514,
-	VREvent_DashboardGuideButtonUp		= 515,
-	VREvent_ScreenshotTriggered			= 516, // Screenshot button combo was pressed, Dashboard should request a screenshot
-	VREvent_ImageFailed					= 517, // Sent to overlays when a SetOverlayRaw or SetOverlayfromFail fails to load
-	VREvent_DashboardOverlayCreated		= 518,
-
-	// Screenshot API
-	VREvent_RequestScreenshot				= 520, // Sent by vrclient application to compositor to take a screenshot
-	VREvent_ScreenshotTaken					= 521, // Sent by compositor to the application that the screenshot has been taken
-	VREvent_ScreenshotFailed				= 522, // Sent by compositor to the application that the screenshot failed to be taken
-	VREvent_SubmitScreenshotToDashboard		= 523, // Sent by compositor to the dashboard that a completed screenshot was submitted
-	VREvent_ScreenshotProgressToDashboard	= 524, // Sent by compositor to the dashboard that a completed screenshot was submitted
-
-	VREvent_PrimaryDashboardDeviceChanged	= 525,
-
-	VREvent_Notification_Shown				= 600,
-	VREvent_Notification_Hidden				= 601,
-	VREvent_Notification_BeginInteraction	= 602,
-	VREvent_Notification_Destroyed			= 603,
-
-	VREvent_Quit							= 700, // data is process
-	VREvent_ProcessQuit						= 701, // data is process
-	VREvent_QuitAborted_UserPrompt			= 702, // data is process
-	VREvent_QuitAcknowledged				= 703, // data is process
-	VREvent_DriverRequestedQuit				= 704, // The driver has requested that SteamVR shut down
-
-	VREvent_ChaperoneDataHasChanged			= 800,
-	VREvent_ChaperoneUniverseHasChanged		= 801,
-	VREvent_ChaperoneTempDataHasChanged		= 802,
-	VREvent_ChaperoneSettingsHaveChanged	= 803,
-	VREvent_SeatedZeroPoseReset				= 804,
-
-	VREvent_AudioSettingsHaveChanged		= 820,
-
-	VREvent_BackgroundSettingHasChanged		= 850,
-	VREvent_CameraSettingsHaveChanged		= 851,
-	VREvent_ReprojectionSettingHasChanged	= 852,
-	VREvent_ModelSkinSettingsHaveChanged	= 853,
-	VREvent_EnvironmentSettingsHaveChanged	= 854,
-	VREvent_PowerSettingsHaveChanged		= 855,
-
-	VREvent_StatusUpdate					= 900,
-
-	VREvent_MCImageUpdated					= 1000,
-
-	VREvent_FirmwareUpdateStarted			= 1100,
-	VREvent_FirmwareUpdateFinished			= 1101,
-
-	VREvent_KeyboardClosed					= 1200,
-	VREvent_KeyboardCharInput				= 1201,
-	VREvent_KeyboardDone					= 1202, // Sent when DONE button clicked on keyboard
-
-	VREvent_ApplicationTransitionStarted		= 1300,
-	VREvent_ApplicationTransitionAborted		= 1301,
-	VREvent_ApplicationTransitionNewAppStarted	= 1302,
-	VREvent_ApplicationListUpdated				= 1303,
-	VREvent_ApplicationMimeTypeLoad				= 1304,
-	VREvent_ApplicationTransitionNewAppLaunchComplete = 1305,
-
-	VREvent_Compositor_MirrorWindowShown		= 1400,
-	VREvent_Compositor_MirrorWindowHidden		= 1401,
-	VREvent_Compositor_ChaperoneBoundsShown		= 1410,
-	VREvent_Compositor_ChaperoneBoundsHidden	= 1411,
-
-	VREvent_TrackedCamera_StartVideoStream  = 1500,
-	VREvent_TrackedCamera_StopVideoStream   = 1501,
-	VREvent_TrackedCamera_PauseVideoStream  = 1502,
-	VREvent_TrackedCamera_ResumeVideoStream = 1503,
-	VREvent_TrackedCamera_EditingSurface    = 1550,
-
-	VREvent_PerformanceTest_EnableCapture	= 1600,
-	VREvent_PerformanceTest_DisableCapture	= 1601,
-	VREvent_PerformanceTest_FidelityLevel	= 1602,
-
-	VREvent_MessageOverlay_Closed			= 1650,
-	
-	// Vendors are free to expose private events in this reserved region
-	VREvent_VendorSpecific_Reserved_Start	= 10000,
-	VREvent_VendorSpecific_Reserved_End		= 19999,
-};
-
-
-/** Level of Hmd activity */
-enum EDeviceActivityLevel
-{
-	k_EDeviceActivityLevel_Unknown = -1,
-	k_EDeviceActivityLevel_Idle = 0,
-	k_EDeviceActivityLevel_UserInteraction = 1,
-	k_EDeviceActivityLevel_UserInteraction_Timeout = 2,
-	k_EDeviceActivityLevel_Standby = 3,
-};
-
-
-/** VR controller button and axis IDs */
-enum EVRButtonId
-{
-	k_EButton_System			= 0,
-	k_EButton_ApplicationMenu	= 1,
-	k_EButton_Grip				= 2,
-	k_EButton_DPad_Left			= 3,
-	k_EButton_DPad_Up			= 4,
-	k_EButton_DPad_Right		= 5,
-	k_EButton_DPad_Down			= 6,
-	k_EButton_A					= 7,
-	
-	k_EButton_ProximitySensor   = 31,
-
-	k_EButton_Axis0				= 32,
-	k_EButton_Axis1				= 33,
-	k_EButton_Axis2				= 34,
-	k_EButton_Axis3				= 35,
-	k_EButton_Axis4				= 36,
-
-	// aliases for well known controllers
-	k_EButton_SteamVR_Touchpad	= k_EButton_Axis0,
-	k_EButton_SteamVR_Trigger	= k_EButton_Axis1,
-
-	k_EButton_Dashboard_Back	= k_EButton_Grip,
-
-	k_EButton_Max				= 64
-};
-
-inline uint64_t ButtonMaskFromId( EVRButtonId id ) { return 1ull << id; }
-
-/** used for controller button events */
-struct VREvent_Controller_t
-{
-	uint32_t button; // EVRButtonId enum
-};
-
-
-/** used for simulated mouse events in overlay space */
-enum EVRMouseButton
-{
-	VRMouseButton_Left					= 0x0001,
-	VRMouseButton_Right					= 0x0002,
-	VRMouseButton_Middle				= 0x0004,
-};
-
-
-/** used for simulated mouse events in overlay space */
-struct VREvent_Mouse_t
-{
-	float x, y; // co-ords are in GL space, bottom left of the texture is 0,0
-	uint32_t button; // EVRMouseButton enum
-};
-
-/** used for simulated mouse wheel scroll in overlay space */
-struct VREvent_Scroll_t
-{
-	float xdelta, ydelta; // movement in fraction of the pad traversed since last delta, 1.0 for a full swipe
-	uint32_t repeatCount;
-};
-
-/** when in mouse input mode you can receive data from the touchpad, these events are only sent if the users finger
-   is on the touchpad (or just released from it) 
-**/
-struct VREvent_TouchPadMove_t
-{
-	// true if the users finger is detected on the touch pad
-	bool bFingerDown;
-
-	// How long the finger has been down in seconds
-	float flSecondsFingerDown;
-
-	// These values indicate the starting finger position (so you can do some basic swipe stuff)
-	float fValueXFirst;
-	float fValueYFirst;
-
-	// This is the raw sampled coordinate without deadzoning
-	float fValueXRaw;
-	float fValueYRaw;
-};
-
-/** notification related events. Details will still change at this point */
-struct VREvent_Notification_t
-{
-	uint64_t ulUserValue;
-	uint32_t notificationId;
-};
-
-/** Used for events about processes */
-struct VREvent_Process_t
-{
-	uint32_t pid;
-	uint32_t oldPid;
-	bool bForced;
-};
-
-
-/** Used for a few events about overlays */
-struct VREvent_Overlay_t
-{
-	uint64_t overlayHandle;
-};
-
-
-/** Used for a few events about overlays */
-struct VREvent_Status_t
-{
-	uint32_t statusState; // EVRState enum
-};
-
-/** Used for keyboard events **/
-struct VREvent_Keyboard_t
-{
-	char cNewInput[8];	// Up to 11 bytes of new input
-	uint64_t uUserValue;	// Possible flags about the new input
-};
-
-struct VREvent_Ipd_t
-{
-	float ipdMeters;
-};
-
-struct VREvent_Chaperone_t
-{
-	uint64_t m_nPreviousUniverse;
-	uint64_t m_nCurrentUniverse;
-};
-
-/** Not actually used for any events */
-struct VREvent_Reserved_t
-{
-	uint64_t reserved0;
-	uint64_t reserved1;
-};
-
-struct VREvent_PerformanceTest_t
-{
-	uint32_t m_nFidelityLevel;
-};
-
-struct VREvent_SeatedZeroPoseReset_t
-{
-	bool bResetBySystemMenu;
-};
-
-struct VREvent_Screenshot_t
-{
-	uint32_t handle;
-	uint32_t type;
-};
-
-struct VREvent_ScreenshotProgress_t
-{
-	float progress;
-};
-
-struct VREvent_ApplicationLaunch_t
-{
-	uint32_t pid;
-	uint32_t unArgsHandle;
-};
-
-struct VREvent_EditingCameraSurface_t
-{
-	uint64_t overlayHandle;
-	uint32_t nVisualMode;
-};
-
-struct VREvent_MessageOverlay_t
-{
-	uint32_t unVRMessageOverlayResponse; // vr::VRMessageOverlayResponse enum
-};
-
-struct VREvent_Property_t
-{
-	PropertyContainerHandle_t container;
-	ETrackedDeviceProperty prop;
-};
-
-/** NOTE!!! If you change this you MUST manually update openvr_interop.cs.py */
-typedef union
-{
-	VREvent_Reserved_t reserved;
-	VREvent_Controller_t controller;
-	VREvent_Mouse_t mouse;
-	VREvent_Scroll_t scroll;
-	VREvent_Process_t process;
-	VREvent_Notification_t notification;
-	VREvent_Overlay_t overlay;
-	VREvent_Status_t status;
-	VREvent_Keyboard_t keyboard;
-	VREvent_Ipd_t ipd;
-	VREvent_Chaperone_t chaperone;
-	VREvent_PerformanceTest_t performanceTest;
-	VREvent_TouchPadMove_t touchPadMove;
-	VREvent_SeatedZeroPoseReset_t seatedZeroPoseReset;
-	VREvent_Screenshot_t screenshot;
-	VREvent_ScreenshotProgress_t screenshotProgress;
-	VREvent_ApplicationLaunch_t applicationLaunch;
-	VREvent_EditingCameraSurface_t cameraSurface;
-	VREvent_MessageOverlay_t messageOverlay;
-	VREvent_Property_t property;
-} VREvent_Data_t;
-
-/** An event posted by the server to all running applications */
-struct VREvent_t
-{
-	uint32_t eventType; // EVREventType enum
-	TrackedDeviceIndex_t trackedDeviceIndex;
-	float eventAgeSeconds;
-	// event data must be the end of the struct as its size is variable
-	VREvent_Data_t data;
-};
-
-
-/** The mesh to draw into the stencil (or depth) buffer to perform 
-* early stencil (or depth) kills of pixels that will never appear on the HMD.
-* This mesh draws on all the pixels that will be hidden after distortion. 
-*
-* If the HMD does not provide a visible area mesh pVertexData will be
-* NULL and unTriangleCount will be 0. */
-struct HiddenAreaMesh_t
-{
-	const HmdVector2_t *pVertexData;
-	uint32_t unTriangleCount;
-};
-
-
-enum EHiddenAreaMeshType
-{
-	k_eHiddenAreaMesh_Standard = 0,
-	k_eHiddenAreaMesh_Inverse = 1,
-	k_eHiddenAreaMesh_LineLoop = 2,
-
-	k_eHiddenAreaMesh_Max = 3,
-};
-
-
-/** Identifies what kind of axis is on the controller at index n. Read this type 
-* with pVRSystem->Get( nControllerDeviceIndex, Prop_Axis0Type_Int32 + n );
-*/
-enum EVRControllerAxisType
-{
-	k_eControllerAxis_None = 0,
-	k_eControllerAxis_TrackPad = 1,
-	k_eControllerAxis_Joystick = 2,
-	k_eControllerAxis_Trigger = 3, // Analog trigger data is in the X axis
-};
-
-
-/** contains information about one axis on the controller */
-struct VRControllerAxis_t
-{
-	float x; // Ranges from -1.0 to 1.0 for joysticks and track pads. Ranges from 0.0 to 1.0 for triggers were 0 is fully released.
-	float y; // Ranges from -1.0 to 1.0 for joysticks and track pads. Is always 0.0 for triggers.
-};
-
-
-/** the number of axes in the controller state */
-static const uint32_t k_unControllerStateAxisCount = 5;
-
-
-/** Holds all the state of a controller at one moment in time. */
-struct VRControllerState001_t
-{
-	// If packet num matches that on your prior call, then the controller state hasn't been changed since 
-	// your last call and there is no need to process it
-	uint32_t unPacketNum;
-
-	// bit flags for each of the buttons. Use ButtonMaskFromId to turn an ID into a mask
-	uint64_t ulButtonPressed;
-	uint64_t ulButtonTouched;
-
-	// Axis data for the controller's analog inputs
-	VRControllerAxis_t rAxis[ k_unControllerStateAxisCount ];
-};
-
-
-typedef VRControllerState001_t VRControllerState_t;
-
-
-/** determines how to provide output to the application of various event processing functions. */
-enum EVRControllerEventOutputType
-{
-	ControllerEventOutput_OSEvents = 0,
-	ControllerEventOutput_VREvents = 1,
-};
-
-
-
-/** Collision Bounds Style */
-enum ECollisionBoundsStyle
-{
-	COLLISION_BOUNDS_STYLE_BEGINNER = 0,
-	COLLISION_BOUNDS_STYLE_INTERMEDIATE,
-	COLLISION_BOUNDS_STYLE_SQUARES,
-	COLLISION_BOUNDS_STYLE_ADVANCED,
-	COLLISION_BOUNDS_STYLE_NONE,
-
-	COLLISION_BOUNDS_STYLE_COUNT
-};
-
-/** Allows the application to customize how the overlay appears in the compositor */
-struct Compositor_OverlaySettings
-{
-	uint32_t size; // sizeof(Compositor_OverlaySettings)
-	bool curved, antialias;
-	float scale, distance, alpha;
-	float uOffset, vOffset, uScale, vScale;
-	float gridDivs, gridWidth, gridScale;
-	HmdMatrix44_t transform;
-};
-
-/** used to refer to a single VR overlay */
-typedef uint64_t VROverlayHandle_t;
-
-static const VROverlayHandle_t k_ulOverlayHandleInvalid = 0;
-
-/** Errors that can occur around VR overlays */
-enum EVROverlayError
-{
-	VROverlayError_None						= 0,
-
-	VROverlayError_UnknownOverlay			= 10,
-	VROverlayError_InvalidHandle			= 11,
-	VROverlayError_PermissionDenied			= 12,
-	VROverlayError_OverlayLimitExceeded		= 13, // No more overlays could be created because the maximum number already exist
-	VROverlayError_WrongVisibilityType		= 14,
-	VROverlayError_KeyTooLong				= 15,
-	VROverlayError_NameTooLong				= 16,
-	VROverlayError_KeyInUse					= 17,
-	VROverlayError_WrongTransformType		= 18,
-	VROverlayError_InvalidTrackedDevice		= 19,
-	VROverlayError_InvalidParameter			= 20,
-	VROverlayError_ThumbnailCantBeDestroyed	= 21,
-	VROverlayError_ArrayTooSmall			= 22,
-	VROverlayError_RequestFailed			= 23,
-	VROverlayError_InvalidTexture			= 24,
-	VROverlayError_UnableToLoadFile			= 25,
-	VROverlayError_KeyboardAlreadyInUse		= 26,
-	VROverlayError_NoNeighbor				= 27,
-	VROverlayError_TooManyMaskPrimitives	= 29,
-	VROverlayError_BadMaskPrimitive			= 30,
-};
-
-/** enum values to pass in to VR_Init to identify whether the application will 
-* draw a 3D scene. */
-enum EVRApplicationType
-{
-	VRApplication_Other = 0,		// Some other kind of application that isn't covered by the other entries 
-	VRApplication_Scene	= 1,		// Application will submit 3D frames 
-	VRApplication_Overlay = 2,		// Application only interacts with overlays
-	VRApplication_Background = 3,	// Application should not start SteamVR if it's not already running, and should not
-									// keep it running if everything else quits.
-	VRApplication_Utility = 4,		// Init should not try to load any drivers. The application needs access to utility
-									// interfaces (like IVRSettings and IVRApplications) but not hardware.
-	VRApplication_VRMonitor = 5,	// Reserved for vrmonitor
-	VRApplication_SteamWatchdog = 6,// Reserved for Steam
-
-	VRApplication_Max
-};
-
-
-/** error codes for firmware */
-enum EVRFirmwareError
-{
-	VRFirmwareError_None = 0,
-	VRFirmwareError_Success = 1,
-	VRFirmwareError_Fail = 2,
-};
-
-
-/** error codes for notifications */
-enum EVRNotificationError
-{
-	VRNotificationError_OK = 0,
-	VRNotificationError_InvalidNotificationId = 100,
-	VRNotificationError_NotificationQueueFull = 101,
-	VRNotificationError_InvalidOverlayHandle = 102,
-	VRNotificationError_SystemWithUserValueAlreadyExists = 103,
-};
-
-
-/** error codes returned by Vr_Init */
-
-// Please add adequate error description to https://developer.valvesoftware.com/w/index.php?title=Category:SteamVRHelp
-enum EVRInitError
-{
-	VRInitError_None	= 0,
-	VRInitError_Unknown = 1,
-
-	VRInitError_Init_InstallationNotFound		= 100,
-	VRInitError_Init_InstallationCorrupt		= 101,
-	VRInitError_Init_VRClientDLLNotFound		= 102,
-	VRInitError_Init_FileNotFound				= 103,
-	VRInitError_Init_FactoryNotFound			= 104,
-	VRInitError_Init_InterfaceNotFound			= 105,
-	VRInitError_Init_InvalidInterface			= 106,
-	VRInitError_Init_UserConfigDirectoryInvalid = 107,
-	VRInitError_Init_HmdNotFound				= 108,
-	VRInitError_Init_NotInitialized				= 109,
-	VRInitError_Init_PathRegistryNotFound		= 110,
-	VRInitError_Init_NoConfigPath				= 111,
-	VRInitError_Init_NoLogPath					= 112,
-	VRInitError_Init_PathRegistryNotWritable	= 113,
-	VRInitError_Init_AppInfoInitFailed			= 114,
-	VRInitError_Init_Retry						= 115, // Used internally to cause retries to vrserver
-	VRInitError_Init_InitCanceledByUser			= 116, // The calling application should silently exit. The user canceled app startup
-	VRInitError_Init_AnotherAppLaunching		= 117, 
-	VRInitError_Init_SettingsInitFailed			= 118, 
-	VRInitError_Init_ShuttingDown				= 119,
-	VRInitError_Init_TooManyObjects				= 120,
-	VRInitError_Init_NoServerForBackgroundApp	= 121,
-	VRInitError_Init_NotSupportedWithCompositor	= 122,
-	VRInitError_Init_NotAvailableToUtilityApps	= 123,
-	VRInitError_Init_Internal				 	= 124,
-	VRInitError_Init_HmdDriverIdIsNone		 	= 125,
-	VRInitError_Init_HmdNotFoundPresenceFailed 	= 126,
-	VRInitError_Init_VRMonitorNotFound			= 127,
-	VRInitError_Init_VRMonitorStartupFailed		= 128,
-	VRInitError_Init_LowPowerWatchdogNotSupported = 129, 
-	VRInitError_Init_InvalidApplicationType		= 130,
-	VRInitError_Init_NotAvailableToWatchdogApps = 131,
-	VRInitError_Init_WatchdogDisabledInSettings = 132,
-	VRInitError_Init_VRDashboardNotFound		= 133,
-	VRInitError_Init_VRDashboardStartupFailed	= 134,
-
-	VRInitError_Driver_Failed				= 200,
-	VRInitError_Driver_Unknown				= 201,
-	VRInitError_Driver_HmdUnknown			= 202,
-	VRInitError_Driver_NotLoaded			= 203,
-	VRInitError_Driver_RuntimeOutOfDate		= 204,
-	VRInitError_Driver_HmdInUse				= 205,
-	VRInitError_Driver_NotCalibrated		= 206,
-	VRInitError_Driver_CalibrationInvalid	= 207,
-	VRInitError_Driver_HmdDisplayNotFound	= 208,
-	VRInitError_Driver_TrackedDeviceInterfaceUnknown = 209,
-	// VRInitError_Driver_HmdDisplayNotFoundAfterFix	 = 210, // not needed: here for historic reasons
-	VRInitError_Driver_HmdDriverIdOutOfBounds = 211,
-	VRInitError_Driver_HmdDisplayMirrored  = 212,
-
-	VRInitError_IPC_ServerInitFailed		= 300,
-	VRInitError_IPC_ConnectFailed			= 301,
-	VRInitError_IPC_SharedStateInitFailed	= 302,
-	VRInitError_IPC_CompositorInitFailed	= 303,
-	VRInitError_IPC_MutexInitFailed			= 304,
-	VRInitError_IPC_Failed					= 305,
-	VRInitError_IPC_CompositorConnectFailed	= 306,
-	VRInitError_IPC_CompositorInvalidConnectResponse = 307,
-	VRInitError_IPC_ConnectFailedAfterMultipleAttempts = 308,
-
-	VRInitError_Compositor_Failed					= 400,
-	VRInitError_Compositor_D3D11HardwareRequired	= 401,
-	VRInitError_Compositor_FirmwareRequiresUpdate	= 402,
-	VRInitError_Compositor_OverlayInitFailed		= 403,
-	VRInitError_Compositor_ScreenshotsInitFailed	= 404,
-
-	VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000,
-
-	VRInitError_VendorSpecific_HmdFound_CantOpenDevice 				= 1101,
-	VRInitError_VendorSpecific_HmdFound_UnableToRequestConfigStart	= 1102,
-	VRInitError_VendorSpecific_HmdFound_NoStoredConfig 				= 1103,
-	VRInitError_VendorSpecific_HmdFound_ConfigTooBig 				= 1104,
-	VRInitError_VendorSpecific_HmdFound_ConfigTooSmall 				= 1105,
-	VRInitError_VendorSpecific_HmdFound_UnableToInitZLib 			= 1106,
-	VRInitError_VendorSpecific_HmdFound_CantReadFirmwareVersion 	= 1107,
-	VRInitError_VendorSpecific_HmdFound_UnableToSendUserDataStart	= 1108,
-	VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataStart	= 1109,
-	VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataNext		= 1110,
-	VRInitError_VendorSpecific_HmdFound_UserDataAddressRange		= 1111,
-	VRInitError_VendorSpecific_HmdFound_UserDataError				= 1112,
-	VRInitError_VendorSpecific_HmdFound_ConfigFailedSanityCheck		= 1113,
-
-	VRInitError_Steam_SteamInstallationNotFound = 2000,
-};
-
-enum EVRScreenshotType
-{
-	VRScreenshotType_None = 0,
-	VRScreenshotType_Mono = 1, // left eye only
-	VRScreenshotType_Stereo = 2,
-	VRScreenshotType_Cubemap = 3,
-	VRScreenshotType_MonoPanorama = 4,
-	VRScreenshotType_StereoPanorama = 5
-};
-
-enum EVRScreenshotPropertyFilenames
-{
-	VRScreenshotPropertyFilenames_Preview = 0,
-	VRScreenshotPropertyFilenames_VR = 1,
-};
-
-enum EVRTrackedCameraError
-{
-	VRTrackedCameraError_None                       = 0,
-	VRTrackedCameraError_OperationFailed            = 100,
-	VRTrackedCameraError_InvalidHandle              = 101,	
-	VRTrackedCameraError_InvalidFrameHeaderVersion  = 102,
-	VRTrackedCameraError_OutOfHandles               = 103,
-	VRTrackedCameraError_IPCFailure                 = 104,
-	VRTrackedCameraError_NotSupportedForThisDevice  = 105,
-	VRTrackedCameraError_SharedMemoryFailure        = 106,
-	VRTrackedCameraError_FrameBufferingFailure      = 107,
-	VRTrackedCameraError_StreamSetupFailure         = 108,
-	VRTrackedCameraError_InvalidGLTextureId         = 109,
-	VRTrackedCameraError_InvalidSharedTextureHandle = 110,
-	VRTrackedCameraError_FailedToGetGLTextureId     = 111,
-	VRTrackedCameraError_SharedTextureFailure       = 112,
-	VRTrackedCameraError_NoFrameAvailable           = 113,
-	VRTrackedCameraError_InvalidArgument            = 114,
-	VRTrackedCameraError_InvalidFrameBufferSize     = 115,
-};
-
-enum EVRTrackedCameraFrameType
-{
-	VRTrackedCameraFrameType_Distorted = 0,			// This is the camera video frame size in pixels, still distorted.
-	VRTrackedCameraFrameType_Undistorted,			// In pixels, an undistorted inscribed rectangle region without invalid regions. This size is subject to changes shortly.
-	VRTrackedCameraFrameType_MaximumUndistorted,	// In pixels, maximum undistorted with invalid regions. Non zero alpha component identifies valid regions.
-	MAX_CAMERA_FRAME_TYPES
-};
-
-typedef uint64_t TrackedCameraHandle_t;
-#define INVALID_TRACKED_CAMERA_HANDLE	((vr::TrackedCameraHandle_t)0)
-
-struct CameraVideoStreamFrameHeader_t
-{
-	EVRTrackedCameraFrameType eFrameType;
-
-	uint32_t nWidth;
-	uint32_t nHeight;
-	uint32_t nBytesPerPixel;
-
-	uint32_t nFrameSequence;
-
-	TrackedDevicePose_t standingTrackedDevicePose;
-};
-
-// Screenshot types
-typedef uint32_t ScreenshotHandle_t;
-
-static const uint32_t k_unScreenshotHandleInvalid = 0;
-
-#pragma pack( pop )
-
-// figure out how to import from the VR API dll
-#if defined(_WIN32)
-
-#ifdef VR_API_EXPORT
-#define VR_INTERFACE extern "C" __declspec( dllexport )
-#else
-#define VR_INTERFACE extern "C" __declspec( dllimport )
-#endif
-
-#elif defined(__GNUC__) || defined(COMPILER_GCC) || defined(__APPLE__)
-
-#ifdef VR_API_EXPORT
-#define VR_INTERFACE extern "C" __attribute__((visibility("default")))
-#else
-#define VR_INTERFACE extern "C" 
-#endif
-
-#else
-#error "Unsupported Platform."
-#endif
-
-
-#if defined( _WIN32 )
-#define VR_CALLTYPE __cdecl
-#else
-#define VR_CALLTYPE 
-#endif
-
-} // namespace vr
-
-#endif // _INCLUDE_VRTYPES_H
-
-
-// vrannotation.h
-#ifdef API_GEN
-# define VR_CLANG_ATTR(ATTR) __attribute__((annotate( ATTR )))
-#else
-# define VR_CLANG_ATTR(ATTR)
-#endif
-
-#define VR_METHOD_DESC(DESC) VR_CLANG_ATTR( "desc:" #DESC ";" )
-#define VR_IGNOREATTR() VR_CLANG_ATTR( "ignore" )
-#define VR_OUT_STRUCT() VR_CLANG_ATTR( "out_struct: ;" )
-#define VR_OUT_STRING() VR_CLANG_ATTR( "out_string: ;" )
-#define VR_OUT_ARRAY_CALL(COUNTER,FUNCTION,PARAMS) VR_CLANG_ATTR( "out_array_call:" #COUNTER "," #FUNCTION "," #PARAMS ";" )
-#define VR_OUT_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "out_array_count:" #COUNTER ";" )
-#define VR_ARRAY_COUNT(COUNTER) VR_CLANG_ATTR( "array_count:" #COUNTER ";" )
-#define VR_ARRAY_COUNT_D(COUNTER, DESC) VR_CLANG_ATTR( "array_count:" #COUNTER ";desc:" #DESC )
-#define VR_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "buffer_count:" #COUNTER ";" )
-#define VR_OUT_BUFFER_COUNT(COUNTER) VR_CLANG_ATTR( "out_buffer_count:" #COUNTER ";" )
-#define VR_OUT_STRING_COUNT(COUNTER) VR_CLANG_ATTR( "out_string_count:" #COUNTER ";" )
-
-// ivrsystem.h
-namespace vr
-{
-
-struct VR_IVRSystem_FnTable
-{
-	void (__stdcall *GetRecommendedRenderTargetSize)( uint32_t *pnWidth, uint32_t *pnHeight );
-	HmdMatrix44_t (__stdcall *GetProjectionMatrix)( EVREye eEye, float fNearZ, float fFarZ );
-	void (__stdcall *GetProjectionRaw)( EVREye eEye, float *pfLeft, float *pfRight, float *pfTop, float *pfBottom );
-	bool (__stdcall *ComputeDistortion)( EVREye eEye, float fU, float fV, DistortionCoordinates_t *pDistortionCoordinates );
-	HmdMatrix34_t (__stdcall *GetEyeToHeadTransform)( EVREye eEye );
-	bool (__stdcall *GetTimeSinceLastVsync)( float *pfSecondsSinceLastVsync, uint64_t *pulFrameCounter );
-	int32_t (__stdcall *GetD3D9AdapterIndex)();
-	void (__stdcall *GetDXGIOutputInfo)( int32_t *pnAdapterIndex );
-	bool (__stdcall *IsDisplayOnDesktop)();
-	bool (__stdcall *SetDisplayVisibility)( bool bIsVisibleOnDesktop );
-	void (__stdcall *GetDeviceToAbsoluteTrackingPose)( ETrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow,  TrackedDevicePose_t *pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount );
-	void (__stdcall *ResetSeatedZeroPose)();
-	HmdMatrix34_t (__stdcall *GetSeatedZeroPoseToStandingAbsoluteTrackingPose)();
-	HmdMatrix34_t (__stdcall *GetRawZeroPoseToStandingAbsoluteTrackingPose)();
-	uint32_t (__stdcall *GetSortedTrackedDeviceIndicesOfClass)( ETrackedDeviceClass eTrackedDeviceClass,  vr::TrackedDeviceIndex_t *punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, vr::TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex);
-	EDeviceActivityLevel (__stdcall *GetTrackedDeviceActivityLevel)( vr::TrackedDeviceIndex_t unDeviceId );
-	void (__stdcall *ApplyTransform)( TrackedDevicePose_t *pOutputPose, const TrackedDevicePose_t *pTrackedDevicePose, const HmdMatrix34_t *pTransform );
-	vr::TrackedDeviceIndex_t (__stdcall *GetTrackedDeviceIndexForControllerRole)( vr::ETrackedControllerRole unDeviceType );
-	vr::ETrackedControllerRole (__stdcall *GetControllerRoleForTrackedDeviceIndex)( vr::TrackedDeviceIndex_t unDeviceIndex );
-	ETrackedDeviceClass (__stdcall *GetTrackedDeviceClass)( vr::TrackedDeviceIndex_t unDeviceIndex );
-	bool (__stdcall *IsTrackedDeviceConnected)( vr::TrackedDeviceIndex_t unDeviceIndex );
-	bool (__stdcall *GetBoolTrackedDeviceProperty)( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError);
-	float (__stdcall *GetFloatTrackedDeviceProperty)( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError);
-	int32_t (__stdcall *GetInt32TrackedDeviceProperty)( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError);
-	uint64_t (__stdcall *GetUint64TrackedDeviceProperty)( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError);
-	HmdMatrix34_t (__stdcall *GetMatrix34TrackedDeviceProperty)( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError);
-	uint32_t (__stdcall *GetStringTrackedDeviceProperty)( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop,  char *pchValue, uint32_t unBufferSize, ETrackedPropertyError *pError);
-	const char *(__stdcall *GetPropErrorNameFromEnum)( ETrackedPropertyError error );
-	bool (__stdcall *PollNextEvent)( VREvent_t *pEvent, uint32_t uncbVREvent );
-	bool (__stdcall *PollNextEventWithPose)( ETrackingUniverseOrigin eOrigin, VREvent_t *pEvent, uint32_t uncbVREvent, vr::TrackedDevicePose_t *pTrackedDevicePose );
-	const char *(__stdcall *GetEventTypeNameFromEnum)( EVREventType eType );
-	HiddenAreaMesh_t (__stdcall *GetHiddenAreaMesh)( EVREye eEye, EHiddenAreaMeshType type);
-	bool (__stdcall *GetControllerState)( vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, uint32_t unControllerStateSize );
-	bool (__stdcall *GetControllerStateWithPose)( ETrackingUniverseOrigin eOrigin, vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, uint32_t unControllerStateSize, TrackedDevicePose_t *pTrackedDevicePose );
-	void (__stdcall *TriggerHapticPulse)( vr::TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec );
-	const char *(__stdcall *GetButtonIdNameFromEnum)( EVRButtonId eButtonId );
-	const char *(__stdcall *GetControllerAxisTypeNameFromEnum)( EVRControllerAxisType eAxisType );
-	bool (__stdcall *CaptureInputFocus)();
-	void (__stdcall *ReleaseInputFocus)();
-	bool (__stdcall *IsInputFocusCapturedByAnotherProcess)();
-	uint32_t (__stdcall *DriverDebugRequest)( vr::TrackedDeviceIndex_t unDeviceIndex, const char *pchRequest, char *pchResponseBuffer, uint32_t unResponseBufferSize );
-	vr::EVRFirmwareError (__stdcall *PerformFirmwareUpdate)( vr::TrackedDeviceIndex_t unDeviceIndex );
-	void (__stdcall *AcknowledgeQuit_Exiting)();
-	void (__stdcall *AcknowledgeQuit_UserPrompt)();
-};
-
-class IVRSystem
-{
-	VR_IVRSystem_FnTable _table;
-public:
-
-
-	// ------------------------------------
-	// Display Methods
-	// ------------------------------------
-
-	/** Suggested size for the intermediate render target that the distortion pulls from. */
-	void GetRecommendedRenderTargetSize( uint32_t *pnWidth, uint32_t *pnHeight ) { _table.GetRecommendedRenderTargetSize(pnWidth, pnHeight); }
-
-	/** The projection matrix for the specified eye */
-	HmdMatrix44_t GetProjectionMatrix( EVREye eEye, float fNearZ, float fFarZ ) { return _table.GetProjectionMatrix(eEye, fNearZ, fFarZ); }
-
-	/** The components necessary to build your own projection matrix in case your
-	* application is doing something fancy like infinite Z */
-	void GetProjectionRaw( EVREye eEye, float *pfLeft, float *pfRight, float *pfTop, float *pfBottom ) { _table.GetProjectionRaw(eEye, pfLeft, pfRight, pfTop, pfBottom); }
-
-	/** Gets the result of the distortion function for the specified eye and input UVs. UVs go from 0,0 in 
-	* the upper left of that eye's viewport and 1,1 in the lower right of that eye's viewport.
-	* Returns true for success. Otherwise, returns false, and distortion coordinates are not suitable. */
-	bool ComputeDistortion( EVREye eEye, float fU, float fV, DistortionCoordinates_t *pDistortionCoordinates ) { return _table.ComputeDistortion(eEye, fU, fV, pDistortionCoordinates); }
-
-	/** Returns the transform from eye space to the head space. Eye space is the per-eye flavor of head
-	* space that provides stereo disparity. Instead of Model * View * Projection the sequence is Model * View * Eye^-1 * Projection. 
-	* Normally View and Eye^-1 will be multiplied together and treated as View in your application. 
-	*/
-	HmdMatrix34_t GetEyeToHeadTransform( EVREye eEye ) { return _table.GetEyeToHeadTransform(eEye); }
-
-	/** Returns the number of elapsed seconds since the last recorded vsync event. This 
-	*	will come from a vsync timer event in the timer if possible or from the application-reported
-	*   time if that is not available. If no vsync times are available the function will 
-	*   return zero for vsync time and frame counter and return false from the method. */
-	bool GetTimeSinceLastVsync( float *pfSecondsSinceLastVsync, uint64_t *pulFrameCounter ) { return _table.GetTimeSinceLastVsync(pfSecondsSinceLastVsync, pulFrameCounter); }
-
-	/** [D3D9 Only]
-	* Returns the adapter index that the user should pass into CreateDevice to set up D3D9 in such
-	* a way that it can go full screen exclusive on the HMD. Returns -1 if there was an error.
-	*/
-	int32_t GetD3D9AdapterIndex() { return _table.GetD3D9AdapterIndex(); }
-
-	/** [D3D10/11 Only]
-	* Returns the adapter index that the user should pass into EnumAdapters to create the device 
-	* and swap chain in DX10 and DX11. If an error occurs the index will be set to -1.
-	*/
-	void GetDXGIOutputInfo( int32_t *pnAdapterIndex ) { _table.GetDXGIOutputInfo(pnAdapterIndex); }
-
-	// ------------------------------------
-	// Display Mode methods
-	// ------------------------------------
-
-	/** Use to determine if the headset display is part of the desktop (i.e. extended) or hidden (i.e. direct mode). */
-	bool IsDisplayOnDesktop() { return _table.IsDisplayOnDesktop(); }
-
-	/** Set the display visibility (true = extended, false = direct mode).  Return value of true indicates that the change was successful. */
-	bool SetDisplayVisibility( bool bIsVisibleOnDesktop ) { return _table.SetDisplayVisibility(bIsVisibleOnDesktop); }
-
-	// ------------------------------------
-	// Tracking Methods
-	// ------------------------------------
-
-	/** The pose that the tracker thinks that the HMD will be in at the specified number of seconds into the 
-	* future. Pass 0 to get the state at the instant the method is called. Most of the time the application should
-	* calculate the time until the photons will be emitted from the display and pass that time into the method.
-	*
-	* This is roughly analogous to the inverse of the view matrix in most applications, though 
-	* many games will need to do some additional rotation or translation on top of the rotation
-	* and translation provided by the head pose.
-	*
-	* For devices where bPoseIsValid is true the application can use the pose to position the device
-	* in question. The provided array can be any size up to k_unMaxTrackedDeviceCount. 
-	*
-	* Seated experiences should call this method with TrackingUniverseSeated and receive poses relative
-	* to the seated zero pose. Standing experiences should call this method with TrackingUniverseStanding 
-	* and receive poses relative to the Chaperone Play Area. TrackingUniverseRawAndUncalibrated should 
-	* probably not be used unless the application is the Chaperone calibration tool itself, but will provide
-	* poses relative to the hardware-specific coordinate system in the driver.
-	*/
-	void GetDeviceToAbsoluteTrackingPose( ETrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, VR_ARRAY_COUNT(unTrackedDevicePoseArrayCount) TrackedDevicePose_t *pTrackedDevicePoseArray, uint32_t unTrackedDevicePoseArrayCount ) { _table.GetDeviceToAbsoluteTrackingPose(eOrigin, fPredictedSecondsToPhotonsFromNow, pTrackedDevicePoseArray, unTrackedDevicePoseArrayCount); }
-
-	/** Sets the zero pose for the seated tracker coordinate system to the current position and yaw of the HMD. After 
-	* ResetSeatedZeroPose all GetDeviceToAbsoluteTrackingPose calls that pass TrackingUniverseSeated as the origin 
-	* will be relative to this new zero pose. The new zero coordinate system will not change the fact that the Y axis 
-	* is up in the real world, so the next pose returned from GetDeviceToAbsoluteTrackingPose after a call to 
-	* ResetSeatedZeroPose may not be exactly an identity matrix.
-	*
-	* NOTE: This function overrides the user's previously saved seated zero pose and should only be called as the result of a user action. 
-	* Users are also able to set their seated zero pose via the OpenVR Dashboard.
-	**/
-	void ResetSeatedZeroPose() { _table.ResetSeatedZeroPose(); }
-
-	/** Returns the transform from the seated zero pose to the standing absolute tracking system. This allows 
-	* applications to represent the seated origin to used or transform object positions from one coordinate
-	* system to the other. 
-	*
-	* The seated origin may or may not be inside the Play Area or Collision Bounds returned by IVRChaperone. Its position 
-	* depends on what the user has set from the Dashboard settings and previous calls to ResetSeatedZeroPose. */
-	HmdMatrix34_t GetSeatedZeroPoseToStandingAbsoluteTrackingPose() { return _table.GetSeatedZeroPoseToStandingAbsoluteTrackingPose(); }
-
-	/** Returns the transform from the tracking origin to the standing absolute tracking system. This allows
-	* applications to convert from raw tracking space to the calibrated standing coordinate system. */
-	HmdMatrix34_t GetRawZeroPoseToStandingAbsoluteTrackingPose() { return _table.GetRawZeroPoseToStandingAbsoluteTrackingPose(); }
-
-	/** Get a sorted array of device indices of a given class of tracked devices (e.g. controllers).  Devices are sorted right to left
-	* relative to the specified tracked device (default: hmd -- pass in -1 for absolute tracking space).  Returns the number of devices
-	* in the list, or the size of the array needed if not large enough. */
-	uint32_t GetSortedTrackedDeviceIndicesOfClass( ETrackedDeviceClass eTrackedDeviceClass, VR_ARRAY_COUNT(unTrackedDeviceIndexArrayCount) vr::TrackedDeviceIndex_t *punTrackedDeviceIndexArray, uint32_t unTrackedDeviceIndexArrayCount, vr::TrackedDeviceIndex_t unRelativeToTrackedDeviceIndex = k_unTrackedDeviceIndex_Hmd ) { return _table.GetSortedTrackedDeviceIndicesOfClass(eTrackedDeviceClass, punTrackedDeviceIndexArray, unTrackedDeviceIndexArrayCount, unRelativeToTrackedDeviceIndex); }
-
-	/** Returns the level of activity on the device. */
-	EDeviceActivityLevel GetTrackedDeviceActivityLevel( vr::TrackedDeviceIndex_t unDeviceId ) { return _table.GetTrackedDeviceActivityLevel(unDeviceId); }
-
-	/** Convenience utility to apply the specified transform to the specified pose.
-	*   This properly transforms all pose components, including velocity and angular velocity
-	*/
-	void ApplyTransform( TrackedDevicePose_t *pOutputPose, const TrackedDevicePose_t *pTrackedDevicePose, const HmdMatrix34_t *pTransform ) { _table.ApplyTransform(pOutputPose, pTrackedDevicePose, pTransform); }
-
-	/** Returns the device index associated with a specific role, for example the left hand or the right hand. */
-	vr::TrackedDeviceIndex_t GetTrackedDeviceIndexForControllerRole( vr::ETrackedControllerRole unDeviceType ) { return _table.GetTrackedDeviceIndexForControllerRole(unDeviceType); }
-
-	/** Returns the controller type associated with a device index. */
-	vr::ETrackedControllerRole GetControllerRoleForTrackedDeviceIndex( vr::TrackedDeviceIndex_t unDeviceIndex ) { return _table.GetControllerRoleForTrackedDeviceIndex(unDeviceIndex); }
-
-	// ------------------------------------
-	// Property methods
-	// ------------------------------------
-
-	/** Returns the device class of a tracked device. If there has not been a device connected in this slot
-	* since the application started this function will return TrackedDevice_Invalid. For previous detected
-	* devices the function will return the previously observed device class. 
-	*
-	* To determine which devices exist on the system, just loop from 0 to k_unMaxTrackedDeviceCount and check
-	* the device class. Every device with something other than TrackedDevice_Invalid is associated with an 
-	* actual tracked device. */
-	ETrackedDeviceClass GetTrackedDeviceClass( vr::TrackedDeviceIndex_t unDeviceIndex ) { return _table.GetTrackedDeviceClass(unDeviceIndex); }
-
-	/** Returns true if there is a device connected in this slot. */
-	bool IsTrackedDeviceConnected( vr::TrackedDeviceIndex_t unDeviceIndex ) { return _table.IsTrackedDeviceConnected(unDeviceIndex); }
-
-	/** Returns a bool property. If the device index is not valid or the property is not a bool type this function will return false. */
-	bool GetBoolTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) { return _table.GetBoolTrackedDeviceProperty(unDeviceIndex, prop, pError); }
-
-	/** Returns a float property. If the device index is not valid or the property is not a float type this function will return 0. */
-	float GetFloatTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) { return _table.GetFloatTrackedDeviceProperty(unDeviceIndex, prop, pError); }
-
-	/** Returns an int property. If the device index is not valid or the property is not a int type this function will return 0. */
-	int32_t GetInt32TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) { return _table.GetInt32TrackedDeviceProperty(unDeviceIndex, prop, pError); }
-
-	/** Returns a uint64 property. If the device index is not valid or the property is not a uint64 type this function will return 0. */
-	uint64_t GetUint64TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) { return _table.GetUint64TrackedDeviceProperty(unDeviceIndex, prop, pError); }
-
-	/** Returns a matrix property. If the device index is not valid or the property is not a matrix type, this function will return identity. */
-	HmdMatrix34_t GetMatrix34TrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, ETrackedPropertyError *pError = 0L ) { return _table.GetMatrix34TrackedDeviceProperty(unDeviceIndex, prop, pError); }
-
-	/** Returns a string property. If the device index is not valid or the property is not a string type this function will 
-	* return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing
-	* null. Strings will always fit in buffers of k_unMaxPropertyStringSize characters. */
-	uint32_t GetStringTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, ETrackedPropertyError *pError = 0L ) { return _table.GetStringTrackedDeviceProperty(unDeviceIndex, prop, pchValue, unBufferSize, pError); }
-
-	/** returns a string that corresponds with the specified property error. The string will be the name 
-	* of the error enum value for all valid error codes */
-	const char *GetPropErrorNameFromEnum( ETrackedPropertyError error ) { return _table.GetPropErrorNameFromEnum(error); }
-
-	// ------------------------------------
-	// Event methods
-	// ------------------------------------
-
-	/** Returns true and fills the event with the next event on the queue if there is one. If there are no events
-	* this method returns false. uncbVREvent should be the size in bytes of the VREvent_t struct */
-	bool PollNextEvent( VREvent_t *pEvent, uint32_t uncbVREvent ) { return _table.PollNextEvent(pEvent, uncbVREvent); }
-
-	/** Returns true and fills the event with the next event on the queue if there is one. If there are no events
-	* this method returns false. Fills in the pose of the associated tracked device in the provided pose struct. 
-	* This pose will always be older than the call to this function and should not be used to render the device. 
-	uncbVREvent should be the size in bytes of the VREvent_t struct */
-	bool PollNextEventWithPose( ETrackingUniverseOrigin eOrigin, VREvent_t *pEvent, uint32_t uncbVREvent, vr::TrackedDevicePose_t *pTrackedDevicePose ) { return _table.PollNextEventWithPose(eOrigin, pEvent, uncbVREvent, pTrackedDevicePose); }
-
-	/** returns the name of an EVREvent enum value */
-	const char *GetEventTypeNameFromEnum( EVREventType eType ) { return _table.GetEventTypeNameFromEnum(eType); }
-
-	// ------------------------------------
-	// Rendering helper methods
-	// ------------------------------------
-
-	/** Returns the hidden area mesh for the current HMD. The pixels covered by this mesh will never be seen by the user after the lens distortion is
-	* applied based on visibility to the panels. If this HMD does not have a hidden area mesh, the vertex data and count will be NULL and 0 respectively.
-	* This mesh is meant to be rendered into the stencil buffer (or into the depth buffer setting nearz) before rendering each eye's view. 
-	* This will improve performance by letting the GPU early-reject pixels the user will never see before running the pixel shader.
-	* NOTE: Render this mesh with backface culling disabled since the winding order of the vertices can be different per-HMD or per-eye.
-	* Setting the bInverse argument to true will produce the visible area mesh that is commonly used in place of full-screen quads. The visible area mesh covers all of the pixels the hidden area mesh does not cover.
-	* Setting the bLineLoop argument will return a line loop of vertices in HiddenAreaMesh_t->pVertexData with HiddenAreaMesh_t->unTriangleCount set to the number of vertices.
-	*/
-	HiddenAreaMesh_t GetHiddenAreaMesh( EVREye eEye, EHiddenAreaMeshType type = k_eHiddenAreaMesh_Standard ) { return _table.GetHiddenAreaMesh(eEye, type); }
-
-	// ------------------------------------
-	// Controller methods
-	// ------------------------------------
-
-	/** Fills the supplied struct with the current state of the controller. Returns false if the controller index
-	* is invalid. */
-	bool GetControllerState( vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, uint32_t unControllerStateSize ) { return _table.GetControllerState(unControllerDeviceIndex, pControllerState, unControllerStateSize); }
-
-	/** fills the supplied struct with the current state of the controller and the provided pose with the pose of 
-	* the controller when the controller state was updated most recently. Use this form if you need a precise controller
-	* pose as input to your application when the user presses or releases a button. */
-	bool GetControllerStateWithPose( ETrackingUniverseOrigin eOrigin, vr::TrackedDeviceIndex_t unControllerDeviceIndex, vr::VRControllerState_t *pControllerState, uint32_t unControllerStateSize, TrackedDevicePose_t *pTrackedDevicePose ) { return _table.GetControllerStateWithPose(eOrigin, unControllerDeviceIndex, pControllerState, unControllerStateSize, pTrackedDevicePose); }
-
-	/** Trigger a single haptic pulse on a controller. After this call the application may not trigger another haptic pulse on this controller
-	* and axis combination for 5ms. */
-	void TriggerHapticPulse( vr::TrackedDeviceIndex_t unControllerDeviceIndex, uint32_t unAxisId, unsigned short usDurationMicroSec ) { _table.TriggerHapticPulse(unControllerDeviceIndex, unAxisId, usDurationMicroSec); }
-
-	/** returns the name of an EVRButtonId enum value */
-	const char *GetButtonIdNameFromEnum( EVRButtonId eButtonId ) { return _table.GetButtonIdNameFromEnum(eButtonId); }
-
-	/** returns the name of an EVRControllerAxisType enum value */
-	const char *GetControllerAxisTypeNameFromEnum( EVRControllerAxisType eAxisType ) { return _table.GetControllerAxisTypeNameFromEnum(eAxisType); }
-
-	/** Tells OpenVR that this process wants exclusive access to controller button states and button events. Other apps will be notified that 
-	* they have lost input focus with a VREvent_InputFocusCaptured event. Returns false if input focus could not be captured for
-	* some reason. */
-	bool CaptureInputFocus() { return _table.CaptureInputFocus(); }
-
-	/** Tells OpenVR that this process no longer wants exclusive access to button states and button events. Other apps will be notified 
-	* that input focus has been released with a VREvent_InputFocusReleased event. */
-	void ReleaseInputFocus() { _table.ReleaseInputFocus(); }
-
-	/** Returns true if input focus is captured by another process. */
-	bool IsInputFocusCapturedByAnotherProcess() { return _table.IsInputFocusCapturedByAnotherProcess(); }
-
-	// ------------------------------------
-	// Debug Methods
-	// ------------------------------------
-
-	/** Sends a request to the driver for the specified device and returns the response. The maximum response size is 32k,
-	* but this method can be called with a smaller buffer. If the response exceeds the size of the buffer, it is truncated. 
-	* The size of the response including its terminating null is returned. */
-	uint32_t DriverDebugRequest( vr::TrackedDeviceIndex_t unDeviceIndex, const char *pchRequest, char *pchResponseBuffer, uint32_t unResponseBufferSize ) { return _table.DriverDebugRequest(unDeviceIndex, pchRequest, pchResponseBuffer, unResponseBufferSize); }
-
-	// ------------------------------------
-	// Firmware methods
-	// ------------------------------------
-	
-	/** Performs the actual firmware update if applicable. 
-	 * The following events will be sent, if VRFirmwareError_None was returned: VREvent_FirmwareUpdateStarted, VREvent_FirmwareUpdateFinished 
-	 * Use the properties Prop_Firmware_UpdateAvailable_Bool, Prop_Firmware_ManualUpdate_Bool, and Prop_Firmware_ManualUpdateURL_String
-	 * to figure our whether a firmware update is available, and to figure out whether its a manual update 
-	 * Prop_Firmware_ManualUpdateURL_String should point to an URL describing the manual update process */
-	vr::EVRFirmwareError PerformFirmwareUpdate( vr::TrackedDeviceIndex_t unDeviceIndex ) { return _table.PerformFirmwareUpdate(unDeviceIndex); }
-
-	// ------------------------------------
-	// Application life cycle methods
-	// ------------------------------------
-
-	/** Call this to acknowledge to the system that VREvent_Quit has been received and that the process is exiting.
-	* This extends the timeout until the process is killed. */
-	void AcknowledgeQuit_Exiting() { _table.AcknowledgeQuit_Exiting(); }
-
-	/** Call this to tell the system that the user is being prompted to save data. This
-	* halts the timeout and dismisses the dashboard (if it was up). Applications should be sure to actually 
-	* prompt the user to save and then exit afterward, otherwise the user will be left in a confusing state. */
-	void AcknowledgeQuit_UserPrompt() { _table.AcknowledgeQuit_UserPrompt(); }
-
-};
-
-static const char * const IVRSystem_Version = "FnTable:IVRSystem_015";
-
-}
-
-
-// ivrapplications.h
-namespace vr
-{
-
-	/** Used for all errors reported by the IVRApplications interface */
-	enum EVRApplicationError
-	{
-		VRApplicationError_None = 0,
-
-		VRApplicationError_AppKeyAlreadyExists = 100,	// Only one application can use any given key
-		VRApplicationError_NoManifest = 101,			// the running application does not have a manifest
-		VRApplicationError_NoApplication = 102,			// No application is running
-		VRApplicationError_InvalidIndex = 103,
-		VRApplicationError_UnknownApplication = 104,	// the application could not be found
-		VRApplicationError_IPCFailed = 105,				// An IPC failure caused the request to fail
-		VRApplicationError_ApplicationAlreadyRunning = 106, 
-		VRApplicationError_InvalidManifest = 107,
-		VRApplicationError_InvalidApplication = 108,
-		VRApplicationError_LaunchFailed = 109,			// the process didn't start
-		VRApplicationError_ApplicationAlreadyStarting = 110, // the system was already starting the same application
-		VRApplicationError_LaunchInProgress = 111,		// The system was already starting a different application
-		VRApplicationError_OldApplicationQuitting = 112, 
-		VRApplicationError_TransitionAborted = 113,
-		VRApplicationError_IsTemplate = 114, // error when you try to call LaunchApplication() on a template type app (use LaunchTemplateApplication)
-
-		VRApplicationError_BufferTooSmall = 200,		// The provided buffer was too small to fit the requested data
-		VRApplicationError_PropertyNotSet = 201,		// The requested property was not set
-		VRApplicationError_UnknownProperty = 202,
-		VRApplicationError_InvalidParameter = 203,
-	};
-
-	/** The maximum length of an application key */
-	static const uint32_t k_unMaxApplicationKeyLength = 128;
-
-	/** these are the properties available on applications. */
-	enum EVRApplicationProperty
-	{
-		VRApplicationProperty_Name_String				= 0,
-
-		VRApplicationProperty_LaunchType_String			= 11,
-		VRApplicationProperty_WorkingDirectory_String	= 12,
-		VRApplicationProperty_BinaryPath_String			= 13,
-		VRApplicationProperty_Arguments_String			= 14,
-		VRApplicationProperty_URL_String				= 15,
-
-		VRApplicationProperty_Description_String		= 50,
-		VRApplicationProperty_NewsURL_String			= 51,
-		VRApplicationProperty_ImagePath_String			= 52,
-		VRApplicationProperty_Source_String				= 53,
-
-		VRApplicationProperty_IsDashboardOverlay_Bool	= 60,
-		VRApplicationProperty_IsTemplate_Bool			= 61,
-		VRApplicationProperty_IsInstanced_Bool			= 62,
-		VRApplicationProperty_IsInternal_Bool			= 63,
-
-		VRApplicationProperty_LastLaunchTime_Uint64		= 70,
-	};
-
-	/** These are states the scene application startup process will go through. */
-	enum EVRApplicationTransitionState
-	{
-		VRApplicationTransition_None = 0,
-
-		VRApplicationTransition_OldAppQuitSent = 10,
-		VRApplicationTransition_WaitingForExternalLaunch = 11,
-		
-		VRApplicationTransition_NewAppLaunched = 20,
-	};
-
-	struct AppOverrideKeys_t
-	{
-		const char *pchKey;
-		const char *pchValue;
-	};
-
-	/** Currently recognized mime types */
-	static const char * const k_pch_MimeType_HomeApp		= "vr/home";
-	static const char * const k_pch_MimeType_GameTheater	= "vr/game_theater";
-
-	struct VR_IVRApplications_FnTable
-	{
-		EVRApplicationError (__stdcall *AddApplicationManifest)( const char *pchApplicationManifestFullPath, bool bTemporary);
-		EVRApplicationError (__stdcall *RemoveApplicationManifest)( const char *pchApplicationManifestFullPath );
-		bool (__stdcall *IsApplicationInstalled)( const char *pchAppKey );
-		uint32_t (__stdcall *GetApplicationCount)();
-		EVRApplicationError (__stdcall *GetApplicationKeyByIndex)( uint32_t unApplicationIndex,  char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen );
-		EVRApplicationError (__stdcall *GetApplicationKeyByProcessId)( uint32_t unProcessId, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen );
-		EVRApplicationError (__stdcall *LaunchApplication)( const char *pchAppKey );
-		EVRApplicationError (__stdcall *LaunchTemplateApplication)( const char *pchTemplateAppKey, const char *pchNewAppKey,  const AppOverrideKeys_t *pKeys, uint32_t unKeys );
-		vr::EVRApplicationError (__stdcall *LaunchApplicationFromMimeType)( const char *pchMimeType, const char *pchArgs );
-		EVRApplicationError (__stdcall *LaunchDashboardOverlay)( const char *pchAppKey );
-		bool (__stdcall *CancelApplicationLaunch)( const char *pchAppKey );
-		EVRApplicationError (__stdcall *IdentifyApplication)( uint32_t unProcessId, const char *pchAppKey );
-		uint32_t (__stdcall *GetApplicationProcessId)( const char *pchAppKey );
-		const char *(__stdcall *GetApplicationsErrorNameFromEnum)( EVRApplicationError error );
-		uint32_t (__stdcall *GetApplicationPropertyString)( const char *pchAppKey, EVRApplicationProperty eProperty,  char *pchPropertyValueBuffer, uint32_t unPropertyValueBufferLen, EVRApplicationError *peError);
-		bool (__stdcall *GetApplicationPropertyBool)( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError);
-		uint64_t (__stdcall *GetApplicationPropertyUint64)( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError);
-		EVRApplicationError (__stdcall *SetApplicationAutoLaunch)( const char *pchAppKey, bool bAutoLaunch );
-		bool (__stdcall *GetApplicationAutoLaunch)( const char *pchAppKey );
-		EVRApplicationError (__stdcall *SetDefaultApplicationForMimeType)( const char *pchAppKey, const char *pchMimeType );
-		bool (__stdcall *GetDefaultApplicationForMimeType)( const char *pchMimeType, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen );
-		bool (__stdcall *GetApplicationSupportedMimeTypes)( const char *pchAppKey, char *pchMimeTypesBuffer, uint32_t unMimeTypesBuffer );
-		uint32_t (__stdcall *GetApplicationsThatSupportMimeType)( const char *pchMimeType, char *pchAppKeysThatSupportBuffer, uint32_t unAppKeysThatSupportBuffer );
-		uint32_t (__stdcall *GetApplicationLaunchArguments)( uint32_t unHandle, char *pchArgs, uint32_t unArgs );
-		EVRApplicationError (__stdcall *GetStartingApplication)( char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen );
-		EVRApplicationTransitionState (__stdcall *GetTransitionState)();
-		EVRApplicationError (__stdcall *PerformApplicationPrelaunchCheck)( const char *pchAppKey );
-		const char *(__stdcall *GetApplicationsTransitionStateNameFromEnum)( EVRApplicationTransitionState state );
-		bool (__stdcall *IsQuitUserPromptRequested)();
-		EVRApplicationError (__stdcall *LaunchInternalProcess)( const char *pchBinaryPath, const char *pchArguments, const char *pchWorkingDirectory );
-		uint32_t (__stdcall *GetCurrentSceneProcessId)();
-	};
-
-	class IVRApplications
-	{
-		VR_IVRApplications_FnTable _table;
-	public:
-
-		// ---------------  Application management  --------------- //
-
-		/** Adds an application manifest to the list to load when building the list of installed applications. 
-		* Temporary manifests are not automatically loaded */
-		EVRApplicationError AddApplicationManifest( const char *pchApplicationManifestFullPath, bool bTemporary = false ) { return _table.AddApplicationManifest(pchApplicationManifestFullPath, bTemporary); }
-
-		/** Removes an application manifest from the list to load when building the list of installed applications. */
-		EVRApplicationError RemoveApplicationManifest( const char *pchApplicationManifestFullPath ) { return _table.RemoveApplicationManifest(pchApplicationManifestFullPath); }
-
-		/** Returns true if an application is installed */
-		bool IsApplicationInstalled( const char *pchAppKey ) { return _table.IsApplicationInstalled(pchAppKey); }
-
-		/** Returns the number of applications available in the list */
-		uint32_t GetApplicationCount() { return _table.GetApplicationCount(); }
-
-		/** Returns the key of the specified application. The index is at least 0 and is less than the return 
-		* value of GetApplicationCount(). The buffer should be at least k_unMaxApplicationKeyLength in order to 
-		* fit the key. */
-		EVRApplicationError GetApplicationKeyByIndex( uint32_t unApplicationIndex, VR_OUT_STRING() char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) { return _table.GetApplicationKeyByIndex(unApplicationIndex, pchAppKeyBuffer, unAppKeyBufferLen); }
-
-		/** Returns the key of the application for the specified Process Id. The buffer should be at least 
-		* k_unMaxApplicationKeyLength in order to fit the key. */
-		EVRApplicationError GetApplicationKeyByProcessId( uint32_t unProcessId, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) { return _table.GetApplicationKeyByProcessId(unProcessId, pchAppKeyBuffer, unAppKeyBufferLen); }
-
-		/** Launches the application. The existing scene application will exit and then the new application will start.
-		* This call is not valid for dashboard overlay applications. */
-		EVRApplicationError LaunchApplication( const char *pchAppKey ) { return _table.LaunchApplication(pchAppKey); }
-
-		/** Launches an instance of an application of type template, with its app key being pchNewAppKey (which must be unique) and optionally override sections
-		* from the manifest file via AppOverrideKeys_t
-		*/
-		EVRApplicationError LaunchTemplateApplication( const char *pchTemplateAppKey, const char *pchNewAppKey, VR_ARRAY_COUNT( unKeys ) const AppOverrideKeys_t *pKeys, uint32_t unKeys ) { return _table.LaunchTemplateApplication(pchTemplateAppKey, pchNewAppKey, pKeys, unKeys); }
-
-		/** launches the application currently associated with this mime type and passes it the option args, typically the filename or object name of the item being launched */
-		vr::EVRApplicationError LaunchApplicationFromMimeType( const char *pchMimeType, const char *pchArgs ) { return _table.LaunchApplicationFromMimeType(pchMimeType, pchArgs); }
-
-		/** Launches the dashboard overlay application if it is not already running. This call is only valid for 
-		* dashboard overlay applications. */
-		EVRApplicationError LaunchDashboardOverlay( const char *pchAppKey ) { return _table.LaunchDashboardOverlay(pchAppKey); }
-
-		/** Cancel a pending launch for an application */
-		bool CancelApplicationLaunch( const char *pchAppKey ) { return _table.CancelApplicationLaunch(pchAppKey); }
-
-		/** Identifies a running application. OpenVR can't always tell which process started in response
-		* to a URL. This function allows a URL handler (or the process itself) to identify the app key 
-		* for the now running application. Passing a process ID of 0 identifies the calling process. 
-		* The application must be one that's known to the system via a call to AddApplicationManifest. */
-		EVRApplicationError IdentifyApplication( uint32_t unProcessId, const char *pchAppKey ) { return _table.IdentifyApplication(unProcessId, pchAppKey); }
-
-		/** Returns the process ID for an application. Return 0 if the application was not found or is not running. */
-		uint32_t GetApplicationProcessId( const char *pchAppKey ) { return _table.GetApplicationProcessId(pchAppKey); }
-
-		/** Returns a string for an applications error */
-		const char *GetApplicationsErrorNameFromEnum( EVRApplicationError error ) { return _table.GetApplicationsErrorNameFromEnum(error); }
-
-		// ---------------  Application properties  --------------- //
-
-		/** Returns a value for an application property. The required buffer size to fit this value will be returned. */
-		uint32_t GetApplicationPropertyString( const char *pchAppKey, EVRApplicationProperty eProperty, VR_OUT_STRING() char *pchPropertyValueBuffer, uint32_t unPropertyValueBufferLen, EVRApplicationError *peError = nullptr ) { return _table.GetApplicationPropertyString(pchAppKey, eProperty, pchPropertyValueBuffer, unPropertyValueBufferLen, peError); }
-
-		/** Returns a bool value for an application property. Returns false in all error cases. */
-		bool GetApplicationPropertyBool( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) { return _table.GetApplicationPropertyBool(pchAppKey, eProperty, peError); }
-
-		/** Returns a uint64 value for an application property. Returns 0 in all error cases. */
-		uint64_t GetApplicationPropertyUint64( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) { return _table.GetApplicationPropertyUint64(pchAppKey, eProperty, peError); }
-
-		/** Sets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */
-		EVRApplicationError SetApplicationAutoLaunch( const char *pchAppKey, bool bAutoLaunch ) { return _table.SetApplicationAutoLaunch(pchAppKey, bAutoLaunch); }
-
-		/** Gets the application auto-launch flag. This is only valid for applications which return true for VRApplicationProperty_IsDashboardOverlay_Bool. */
-		bool GetApplicationAutoLaunch( const char *pchAppKey ) { return _table.GetApplicationAutoLaunch(pchAppKey); }
-
-		/** Adds this mime-type to the list of supported mime types for this application*/
-		EVRApplicationError SetDefaultApplicationForMimeType( const char *pchAppKey, const char *pchMimeType ) { return _table.SetDefaultApplicationForMimeType(pchAppKey, pchMimeType); }
-
-		/** return the app key that will open this mime type */
-		bool GetDefaultApplicationForMimeType( const char *pchMimeType, char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) { return _table.GetDefaultApplicationForMimeType(pchMimeType, pchAppKeyBuffer, unAppKeyBufferLen); }
-
-		/** Get the list of supported mime types for this application, comma-delimited */
-		bool GetApplicationSupportedMimeTypes( const char *pchAppKey, char *pchMimeTypesBuffer, uint32_t unMimeTypesBuffer ) { return _table.GetApplicationSupportedMimeTypes(pchAppKey, pchMimeTypesBuffer, unMimeTypesBuffer); }
-
-		/** Get the list of app-keys that support this mime type, comma-delimited, the return value is number of bytes you need to return the full string */
-		uint32_t GetApplicationsThatSupportMimeType( const char *pchMimeType, char *pchAppKeysThatSupportBuffer, uint32_t unAppKeysThatSupportBuffer ) { return _table.GetApplicationsThatSupportMimeType(pchMimeType, pchAppKeysThatSupportBuffer, unAppKeysThatSupportBuffer); }
-
-		/** Get the args list from an app launch that had the process already running, you call this when you get a VREvent_ApplicationMimeTypeLoad */
-		uint32_t GetApplicationLaunchArguments( uint32_t unHandle, char *pchArgs, uint32_t unArgs ) { return _table.GetApplicationLaunchArguments(unHandle, pchArgs, unArgs); }
-
-		// ---------------  Transition methods --------------- //
-
-		/** Returns the app key for the application that is starting up */
-		EVRApplicationError GetStartingApplication( char *pchAppKeyBuffer, uint32_t unAppKeyBufferLen ) { return _table.GetStartingApplication(pchAppKeyBuffer, unAppKeyBufferLen); }
-
-		/** Returns the application transition state */
-		EVRApplicationTransitionState GetTransitionState() { return _table.GetTransitionState(); }
-
-		/** Returns errors that would prevent the specified application from launching immediately. Calling this function will
-		* cause the current scene application to quit, so only call it when you are actually about to launch something else.
-		* What the caller should do about these failures depends on the failure:
-		*   VRApplicationError_OldApplicationQuitting - An existing application has been told to quit. Wait for a VREvent_ProcessQuit
-		*                                               and try again.
-		*   VRApplicationError_ApplicationAlreadyStarting - This application is already starting. This is a permanent failure.
-		*   VRApplicationError_LaunchInProgress	      - A different application is already starting. This is a permanent failure.
-		*   VRApplicationError_None                   - Go ahead and launch. Everything is clear.
-		*/
-		EVRApplicationError PerformApplicationPrelaunchCheck( const char *pchAppKey ) { return _table.PerformApplicationPrelaunchCheck(pchAppKey); }
-
-		/** Returns a string for an application transition state */
-		const char *GetApplicationsTransitionStateNameFromEnum( EVRApplicationTransitionState state ) { return _table.GetApplicationsTransitionStateNameFromEnum(state); }
-
-		/** Returns true if the outgoing scene app has requested a save prompt before exiting */
-		bool IsQuitUserPromptRequested() { return _table.IsQuitUserPromptRequested(); }
-
-		/** Starts a subprocess within the calling application. This
-		* suppresses all application transition UI and automatically identifies the new executable 
-		* as part of the same application. On success the calling process should exit immediately. 
-		* If working directory is NULL or "" the directory portion of the binary path will be 
-		* the working directory. */
-		EVRApplicationError LaunchInternalProcess( const char *pchBinaryPath, const char *pchArguments, const char *pchWorkingDirectory ) { return _table.LaunchInternalProcess(pchBinaryPath, pchArguments, pchWorkingDirectory); }
-
-		/** Returns the current scene process ID according to the application system. A scene process will get scene
-		* focus once it starts rendering, but it will appear here once it calls VR_Init with the Scene application
-		* type. */
-		uint32_t GetCurrentSceneProcessId() { return _table.GetCurrentSceneProcessId(); }
-	};
-
-	static const char * const IVRApplications_Version = "FnTable:IVRApplications_006";
-
-} // namespace vr
-
-// ivrsettings.h
-namespace vr
-{
-	enum EVRSettingsError
-	{
-		VRSettingsError_None = 0,
-		VRSettingsError_IPCFailed = 1,
-		VRSettingsError_WriteFailed = 2,
-		VRSettingsError_ReadFailed = 3,
-		VRSettingsError_JsonParseFailed = 4,
-		VRSettingsError_UnsetSettingHasNoDefault = 5, // This will be returned if the setting does not appear in the appropriate default file and has not been set
-	};
-
-	// The maximum length of a settings key
-	static const uint32_t k_unMaxSettingsKeyLength = 128;
-
-	struct VR_IVRSettings_FnTable
-	{
-		const char *(__stdcall *GetSettingsErrorNameFromEnum)( EVRSettingsError eError );
-		bool (__stdcall *Sync)( bool bForce, EVRSettingsError *peError);
-		void (__stdcall *SetBool)( const char *pchSection, const char *pchSettingsKey, bool bValue, EVRSettingsError *peError);
-		void (__stdcall *SetInt32)( const char *pchSection, const char *pchSettingsKey, int32_t nValue, EVRSettingsError *peError);
-		void (__stdcall *SetFloat)( const char *pchSection, const char *pchSettingsKey, float flValue, EVRSettingsError *peError);
-		void (__stdcall *SetString)( const char *pchSection, const char *pchSettingsKey, const char *pchValue, EVRSettingsError *peError);
-		bool (__stdcall *GetBool)( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError);
-		int32_t (__stdcall *GetInt32)( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError);
-		float (__stdcall *GetFloat)( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError);
-		void (__stdcall *GetString)( const char *pchSection, const char *pchSettingsKey,  char *pchValue, uint32_t unValueLen, EVRSettingsError *peError);
-		void (__stdcall *RemoveSection)( const char *pchSection, EVRSettingsError *peError);
-		void (__stdcall *RemoveKeyInSection)( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError);
-	};
-
-	class IVRSettings
-	{
-		VR_IVRSettings_FnTable _table;
-	public:
-		const char *GetSettingsErrorNameFromEnum( EVRSettingsError eError ) { return _table.GetSettingsErrorNameFromEnum(eError); }
-
-		// Returns true if file sync occurred (force or settings dirty)
-		bool Sync( bool bForce = false, EVRSettingsError *peError = nullptr ) { return _table.Sync(bForce, peError); }
-
-		void SetBool( const char *pchSection, const char *pchSettingsKey, bool bValue, EVRSettingsError *peError = nullptr ) { _table.SetBool(pchSection, pchSettingsKey, bValue, peError); }
-		void SetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nValue, EVRSettingsError *peError = nullptr ) { _table.SetInt32(pchSection, pchSettingsKey, nValue, peError); }
-		void SetFloat( const char *pchSection, const char *pchSettingsKey, float flValue, EVRSettingsError *peError = nullptr ) { _table.SetFloat(pchSection, pchSettingsKey, flValue, peError); }
-		void SetString( const char *pchSection, const char *pchSettingsKey, const char *pchValue, EVRSettingsError *peError = nullptr ) { _table.SetString(pchSection, pchSettingsKey, pchValue, peError); }
-
-		// Users of the system need to provide a proper default in default.vrsettings in the resources/settings/ directory
-		// of either the runtime or the driver_xxx directory. Otherwise the default will be false, 0, 0.0 or ""
-		bool GetBool( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) { return _table.GetBool(pchSection, pchSettingsKey, peError); }
-		int32_t GetInt32( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) { return _table.GetInt32(pchSection, pchSettingsKey, peError); }
-		float GetFloat( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) { return _table.GetFloat(pchSection, pchSettingsKey, peError); }
-		void GetString( const char *pchSection, const char *pchSettingsKey, VR_OUT_STRING() char *pchValue, uint32_t unValueLen, EVRSettingsError *peError = nullptr ) { _table.GetString(pchSection, pchSettingsKey, pchValue, unValueLen, peError); }
-
-		void RemoveSection( const char *pchSection, EVRSettingsError *peError = nullptr ) { _table.RemoveSection(pchSection, peError); }
-		void RemoveKeyInSection( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) { _table.RemoveKeyInSection(pchSection, pchSettingsKey, peError); }
-	};
-
-	//-----------------------------------------------------------------------------
-	static const char * const IVRSettings_Version = "FnTable:IVRSettings_002";
-
-	//-----------------------------------------------------------------------------
-	// steamvr keys
-	static const char * const k_pch_SteamVR_Section = "steamvr";
-	static const char * const k_pch_SteamVR_RequireHmd_String = "requireHmd";
-	static const char * const k_pch_SteamVR_ForcedDriverKey_String = "forcedDriver";
-	static const char * const k_pch_SteamVR_ForcedHmdKey_String = "forcedHmd";
-	static const char * const k_pch_SteamVR_DisplayDebug_Bool = "displayDebug";
-	static const char * const k_pch_SteamVR_DebugProcessPipe_String = "debugProcessPipe";
-	static const char * const k_pch_SteamVR_EnableDistortion_Bool = "enableDistortion";
-	static const char * const k_pch_SteamVR_DisplayDebugX_Int32 = "displayDebugX";
-	static const char * const k_pch_SteamVR_DisplayDebugY_Int32 = "displayDebugY";
-	static const char * const k_pch_SteamVR_SendSystemButtonToAllApps_Bool= "sendSystemButtonToAllApps";
-	static const char * const k_pch_SteamVR_LogLevel_Int32 = "loglevel";
-	static const char * const k_pch_SteamVR_IPD_Float = "ipd";
-	static const char * const k_pch_SteamVR_Background_String = "background";
-	static const char * const k_pch_SteamVR_BackgroundUseDomeProjection_Bool = "backgroundUseDomeProjection";
-	static const char * const k_pch_SteamVR_BackgroundCameraHeight_Float = "backgroundCameraHeight";
-	static const char * const k_pch_SteamVR_BackgroundDomeRadius_Float = "backgroundDomeRadius";
-	static const char * const k_pch_SteamVR_GridColor_String = "gridColor";
-	static const char * const k_pch_SteamVR_PlayAreaColor_String = "playAreaColor";
-	static const char * const k_pch_SteamVR_ShowStage_Bool = "showStage";
-	static const char * const k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers";
-	static const char * const k_pch_SteamVR_DirectMode_Bool = "directMode";
-	static const char * const k_pch_SteamVR_DirectModeEdidVid_Int32 = "directModeEdidVid";
-	static const char * const k_pch_SteamVR_DirectModeEdidPid_Int32 = "directModeEdidPid";
-	static const char * const k_pch_SteamVR_UsingSpeakers_Bool = "usingSpeakers";
-	static const char * const k_pch_SteamVR_SpeakersForwardYawOffsetDegrees_Float = "speakersForwardYawOffsetDegrees";
-	static const char * const k_pch_SteamVR_BaseStationPowerManagement_Bool = "basestationPowerManagement";
-	static const char * const k_pch_SteamVR_NeverKillProcesses_Bool = "neverKillProcesses";
-	static const char * const k_pch_SteamVR_RenderTargetMultiplier_Float = "renderTargetMultiplier";
-	static const char * const k_pch_SteamVR_AllowAsyncReprojection_Bool = "allowAsyncReprojection";
-	static const char * const k_pch_SteamVR_AllowReprojection_Bool = "allowInterleavedReprojection";
-	static const char * const k_pch_SteamVR_ForceReprojection_Bool = "forceReprojection";
-	static const char * const k_pch_SteamVR_ForceFadeOnBadTracking_Bool = "forceFadeOnBadTracking";
-	static const char * const k_pch_SteamVR_DefaultMirrorView_Int32 = "defaultMirrorView";
-	static const char * const k_pch_SteamVR_ShowMirrorView_Bool = "showMirrorView";
-	static const char * const k_pch_SteamVR_MirrorViewGeometry_String = "mirrorViewGeometry";
-	static const char * const k_pch_SteamVR_StartMonitorFromAppLaunch = "startMonitorFromAppLaunch";
-	static const char * const k_pch_SteamVR_StartCompositorFromAppLaunch_Bool = "startCompositorFromAppLaunch";
-	static const char * const k_pch_SteamVR_StartDashboardFromAppLaunch_Bool = "startDashboardFromAppLaunch";
-	static const char * const k_pch_SteamVR_StartOverlayAppsFromDashboard_Bool = "startOverlayAppsFromDashboard";
-	static const char * const k_pch_SteamVR_EnableHomeApp = "enableHomeApp";
-	static const char * const k_pch_SteamVR_SetInitialDefaultHomeApp = "setInitialDefaultHomeApp";
-	static const char * const k_pch_SteamVR_CycleBackgroundImageTimeSec_Int32 = "CycleBackgroundImageTimeSec";
-	static const char * const k_pch_SteamVR_RetailDemo_Bool = "retailDemo";
-	static const char * const k_pch_SteamVR_IpdOffset_Float = "ipdOffset";
-
-	//-----------------------------------------------------------------------------
-	// lighthouse keys
-	static const char * const k_pch_Lighthouse_Section = "driver_lighthouse";
-	static const char * const k_pch_Lighthouse_DisableIMU_Bool = "disableimu";
-	static const char * const k_pch_Lighthouse_UseDisambiguation_String = "usedisambiguation";
-	static const char * const k_pch_Lighthouse_DisambiguationDebug_Int32 = "disambiguationdebug";
-	static const char * const k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation";
-	static const char * const k_pch_Lighthouse_DBHistory_Bool = "dbhistory";
-
-	//-----------------------------------------------------------------------------
-	// null keys
-	static const char * const k_pch_Null_Section = "driver_null";
-	static const char * const k_pch_Null_SerialNumber_String = "serialNumber";
-	static const char * const k_pch_Null_ModelNumber_String = "modelNumber";
-	static const char * const k_pch_Null_WindowX_Int32 = "windowX";
-	static const char * const k_pch_Null_WindowY_Int32 = "windowY";
-	static const char * const k_pch_Null_WindowWidth_Int32 = "windowWidth";
-	static const char * const k_pch_Null_WindowHeight_Int32 = "windowHeight";
-	static const char * const k_pch_Null_RenderWidth_Int32 = "renderWidth";
-	static const char * const k_pch_Null_RenderHeight_Int32 = "renderHeight";
-	static const char * const k_pch_Null_SecondsFromVsyncToPhotons_Float = "secondsFromVsyncToPhotons";
-	static const char * const k_pch_Null_DisplayFrequency_Float = "displayFrequency";
-
-	//-----------------------------------------------------------------------------
-	// user interface keys
-	static const char * const k_pch_UserInterface_Section = "userinterface";
-	static const char * const k_pch_UserInterface_StatusAlwaysOnTop_Bool = "StatusAlwaysOnTop";
-	static const char * const k_pch_UserInterface_MinimizeToTray_Bool = "MinimizeToTray";
-	static const char * const k_pch_UserInterface_Screenshots_Bool = "screenshots";
-	static const char * const k_pch_UserInterface_ScreenshotType_Int = "screenshotType";
-
-	//-----------------------------------------------------------------------------
-	// notification keys
-	static const char * const k_pch_Notifications_Section = "notifications";
-	static const char * const k_pch_Notifications_DoNotDisturb_Bool = "DoNotDisturb";
-
-	//-----------------------------------------------------------------------------
-	// keyboard keys
-	static const char * const k_pch_Keyboard_Section = "keyboard";
-	static const char * const k_pch_Keyboard_TutorialCompletions = "TutorialCompletions";
-	static const char * const k_pch_Keyboard_ScaleX = "ScaleX";
-	static const char * const k_pch_Keyboard_ScaleY = "ScaleY";
-	static const char * const k_pch_Keyboard_OffsetLeftX = "OffsetLeftX";
-	static const char * const k_pch_Keyboard_OffsetRightX = "OffsetRightX";
-	static const char * const k_pch_Keyboard_OffsetY = "OffsetY";
-	static const char * const k_pch_Keyboard_Smoothing = "Smoothing";
-
-	//-----------------------------------------------------------------------------
-	// perf keys
-	static const char * const k_pch_Perf_Section = "perfcheck";
-	static const char * const k_pch_Perf_HeuristicActive_Bool = "heuristicActive";
-	static const char * const k_pch_Perf_NotifyInHMD_Bool = "warnInHMD";
-	static const char * const k_pch_Perf_NotifyOnlyOnce_Bool = "warnOnlyOnce";
-	static const char * const k_pch_Perf_AllowTimingStore_Bool = "allowTimingStore";
-	static const char * const k_pch_Perf_SaveTimingsOnExit_Bool = "saveTimingsOnExit";
-	static const char * const k_pch_Perf_TestData_Float = "perfTestData";
-
-	//-----------------------------------------------------------------------------
-	// collision bounds keys
-	static const char * const k_pch_CollisionBounds_Section = "collisionBounds";
-	static const char * const k_pch_CollisionBounds_Style_Int32 = "CollisionBoundsStyle";
-	static const char * const k_pch_CollisionBounds_GroundPerimeterOn_Bool = "CollisionBoundsGroundPerimeterOn";
-	static const char * const k_pch_CollisionBounds_CenterMarkerOn_Bool = "CollisionBoundsCenterMarkerOn";
-	static const char * const k_pch_CollisionBounds_PlaySpaceOn_Bool = "CollisionBoundsPlaySpaceOn";
-	static const char * const k_pch_CollisionBounds_FadeDistance_Float = "CollisionBoundsFadeDistance";
-	static const char * const k_pch_CollisionBounds_ColorGammaR_Int32 = "CollisionBoundsColorGammaR";
-	static const char * const k_pch_CollisionBounds_ColorGammaG_Int32 = "CollisionBoundsColorGammaG";
-	static const char * const k_pch_CollisionBounds_ColorGammaB_Int32 = "CollisionBoundsColorGammaB";
-	static const char * const k_pch_CollisionBounds_ColorGammaA_Int32 = "CollisionBoundsColorGammaA";
-
-	//-----------------------------------------------------------------------------
-	// camera keys
-	static const char * const k_pch_Camera_Section = "camera";
-	static const char * const k_pch_Camera_EnableCamera_Bool = "enableCamera";
-	static const char * const k_pch_Camera_EnableCameraInDashboard_Bool = "enableCameraInDashboard";
-	static const char * const k_pch_Camera_EnableCameraForCollisionBounds_Bool = "enableCameraForCollisionBounds";
-	static const char * const k_pch_Camera_EnableCameraForRoomView_Bool = "enableCameraForRoomView";
-	static const char * const k_pch_Camera_BoundsColorGammaR_Int32 = "cameraBoundsColorGammaR";
-	static const char * const k_pch_Camera_BoundsColorGammaG_Int32 = "cameraBoundsColorGammaG";
-	static const char * const k_pch_Camera_BoundsColorGammaB_Int32 = "cameraBoundsColorGammaB";
-	static const char * const k_pch_Camera_BoundsColorGammaA_Int32 = "cameraBoundsColorGammaA";
-	static const char * const k_pch_Camera_BoundsStrength_Int32 = "cameraBoundsStrength";
-
-	//-----------------------------------------------------------------------------
-	// audio keys
-	static const char * const k_pch_audio_Section = "audio";
-	static const char * const k_pch_audio_OnPlaybackDevice_String = "onPlaybackDevice";
-	static const char * const k_pch_audio_OnRecordDevice_String = "onRecordDevice";
-	static const char * const k_pch_audio_OnPlaybackMirrorDevice_String = "onPlaybackMirrorDevice";
-	static const char * const k_pch_audio_OffPlaybackDevice_String = "offPlaybackDevice";
-	static const char * const k_pch_audio_OffRecordDevice_String = "offRecordDevice";
-	static const char * const k_pch_audio_VIVEHDMIGain = "viveHDMIGain";
-
-	//-----------------------------------------------------------------------------
-	// power management keys
-	static const char * const k_pch_Power_Section = "power";
-	static const char * const k_pch_Power_PowerOffOnExit_Bool = "powerOffOnExit";
-	static const char * const k_pch_Power_TurnOffScreensTimeout_Float = "turnOffScreensTimeout";
-	static const char * const k_pch_Power_TurnOffControllersTimeout_Float = "turnOffControllersTimeout";
-	static const char * const k_pch_Power_ReturnToWatchdogTimeout_Float = "returnToWatchdogTimeout";
-	static const char * const k_pch_Power_AutoLaunchSteamVROnButtonPress = "autoLaunchSteamVROnButtonPress";
-
-	//-----------------------------------------------------------------------------
-	// dashboard keys
-	static const char * const k_pch_Dashboard_Section = "dashboard";
-	static const char * const k_pch_Dashboard_EnableDashboard_Bool = "enableDashboard";
-	static const char * const k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode";
-
-	//-----------------------------------------------------------------------------
-	// model skin keys
-	static const char * const k_pch_modelskin_Section = "modelskins";
-
-	//-----------------------------------------------------------------------------
-	// driver keys - These could be checked in any driver_<name> section
-	static const char * const k_pch_Driver_Enable_Bool = "enable";
-
-} // namespace vr
-
-// ivrchaperone.h
-namespace vr
-{
-
-#if defined(__linux__) || defined(__APPLE__) 
-	// The 32-bit version of gcc has the alignment requirement for uint64 and double set to
-	// 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned.
-	// The 64-bit version of gcc has the alignment requirement for these types set to
-	// 8 meaning that unless we use #pragma pack(4) our structures will get bigger.
-	// The 64-bit structure packing has to match the 32-bit structure packing for each platform.
-	#pragma pack( push, 4 )
-#else
-	#pragma pack( push, 8 )
-#endif
-
-enum ChaperoneCalibrationState
-{
-	// OK!
-	ChaperoneCalibrationState_OK = 1,									// Chaperone is fully calibrated and working correctly
-
-	// Warnings
-	ChaperoneCalibrationState_Warning = 100,
-	ChaperoneCalibrationState_Warning_BaseStationMayHaveMoved = 101,	// A base station thinks that it might have moved
-	ChaperoneCalibrationState_Warning_BaseStationRemoved = 102,			// There are less base stations than when calibrated
-	ChaperoneCalibrationState_Warning_SeatedBoundsInvalid = 103,		// Seated bounds haven't been calibrated for the current tracking center
-
-	// Errors
-	ChaperoneCalibrationState_Error = 200,								// The UniverseID is invalid
-	ChaperoneCalibrationState_Error_BaseStationUninitialized = 201,		// Tracking center hasn't be calibrated for at least one of the base stations
-	ChaperoneCalibrationState_Error_BaseStationConflict = 202,			// Tracking center is calibrated, but base stations disagree on the tracking space
-	ChaperoneCalibrationState_Error_PlayAreaInvalid = 203,				// Play Area hasn't been calibrated for the current tracking center
-	ChaperoneCalibrationState_Error_CollisionBoundsInvalid = 204,		// Collision Bounds haven't been calibrated for the current tracking center
-};
-
-
-/** HIGH LEVEL TRACKING SPACE ASSUMPTIONS:
-* 0,0,0 is the preferred standing area center.
-* 0Y is the floor height.
-* -Z is the preferred forward facing direction. */
-struct VR_IVRChaperone_FnTable
-{
-	ChaperoneCalibrationState (__stdcall *GetCalibrationState)();
-	bool (__stdcall *GetPlayAreaSize)( float *pSizeX, float *pSizeZ );
-	bool (__stdcall *GetPlayAreaRect)( HmdQuad_t *rect );
-	void (__stdcall *ReloadInfo)( void );
-	void (__stdcall *SetSceneColor)( HmdColor_t color );
-	void (__stdcall *GetBoundsColor)( HmdColor_t *pOutputColorArray, int nNumOutputColors, float flCollisionBoundsFadeDistance, HmdColor_t *pOutputCameraColor );
-	bool (__stdcall *AreBoundsVisible)();
-	void (__stdcall *ForceBoundsVisible)( bool bForce );
-};
-
-class IVRChaperone
-{
-	VR_IVRChaperone_FnTable _table;
-public:
-
-	/** Get the current state of Chaperone calibration. This state can change at any time during a session due to physical base station changes. **/
-	ChaperoneCalibrationState GetCalibrationState() { return _table.GetCalibrationState(); }
-
-	/** Returns the width and depth of the Play Area (formerly named Soft Bounds) in X and Z. 
-	* Tracking space center (0,0,0) is the center of the Play Area. **/
-	bool GetPlayAreaSize( float *pSizeX, float *pSizeZ ) { return _table.GetPlayAreaSize(pSizeX, pSizeZ); }
-
-	/** Returns the 4 corner positions of the Play Area (formerly named Soft Bounds).
-	* Corners are in counter-clockwise order.
-	* Standing center (0,0,0) is the center of the Play Area.
-	* It's a rectangle.
-	* 2 sides are parallel to the X axis and 2 sides are parallel to the Z axis.
-	* Height of every corner is 0Y (on the floor). **/
-	bool GetPlayAreaRect( HmdQuad_t *rect ) { return _table.GetPlayAreaRect(rect); }
-
-	/** Reload Chaperone data from the .vrchap file on disk. */
-	void ReloadInfo( void ) { _table.ReloadInfo(); }
-
-	/** Optionally give the chaperone system a hit about the color and brightness in the scene **/
-	void SetSceneColor( HmdColor_t color ) { _table.SetSceneColor(color); }
-
-	/** Get the current chaperone bounds draw color and brightness **/
-	void GetBoundsColor( HmdColor_t *pOutputColorArray, int nNumOutputColors, float flCollisionBoundsFadeDistance, HmdColor_t *pOutputCameraColor ) { _table.GetBoundsColor(pOutputColorArray, nNumOutputColors, flCollisionBoundsFadeDistance, pOutputCameraColor); }
-
-	/** Determine whether the bounds are showing right now **/
-	bool AreBoundsVisible() { return _table.AreBoundsVisible(); }
-
-	/** Force the bounds to show, mostly for utilities **/
-	void ForceBoundsVisible( bool bForce ) { _table.ForceBoundsVisible(bForce); }
-};
-
-static const char * const IVRChaperone_Version = "FnTable:IVRChaperone_003";
-
-#pragma pack( pop )
-
-}
-
-// ivrchaperonesetup.h
-namespace vr
-{
-
-enum EChaperoneConfigFile
-{
-	EChaperoneConfigFile_Live = 1,		// The live chaperone config, used by most applications and games
-	EChaperoneConfigFile_Temp = 2,		// The temporary chaperone config, used to live-preview collision bounds in room setup
-};
-
-enum EChaperoneImportFlags
-{
-	EChaperoneImport_BoundsOnly = 0x0001,
-};
-
-/** Manages the working copy of the chaperone info. By default this will be the same as the 
-* live copy. Any changes made with this interface will stay in the working copy until 
-* CommitWorkingCopy() is called, at which point the working copy and the live copy will be 
-* the same again. */
-struct VR_IVRChaperoneSetup_FnTable
-{
-	bool (__stdcall *CommitWorkingCopy)( EChaperoneConfigFile configFile );
-	void (__stdcall *RevertWorkingCopy)();
-	bool (__stdcall *GetWorkingPlayAreaSize)( float *pSizeX, float *pSizeZ );
-	bool (__stdcall *GetWorkingPlayAreaRect)( HmdQuad_t *rect );
-	bool (__stdcall *GetWorkingCollisionBoundsInfo)(  HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount );
-	bool (__stdcall *GetLiveCollisionBoundsInfo)(  HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount );
-	bool (__stdcall *GetWorkingSeatedZeroPoseToRawTrackingPose)( HmdMatrix34_t *pmatSeatedZeroPoseToRawTrackingPose );
-	bool (__stdcall *GetWorkingStandingZeroPoseToRawTrackingPose)( HmdMatrix34_t *pmatStandingZeroPoseToRawTrackingPose );
-	void (__stdcall *SetWorkingPlayAreaSize)( float sizeX, float sizeZ );
-	void (__stdcall *SetWorkingCollisionBoundsInfo)(  HmdQuad_t *pQuadsBuffer, uint32_t unQuadsCount );
-	void (__stdcall *SetWorkingSeatedZeroPoseToRawTrackingPose)( const HmdMatrix34_t *pMatSeatedZeroPoseToRawTrackingPose );
-	void (__stdcall *SetWorkingStandingZeroPoseToRawTrackingPose)( const HmdMatrix34_t *pMatStandingZeroPoseToRawTrackingPose );
-	void (__stdcall *ReloadFromDisk)( EChaperoneConfigFile configFile );
-	bool (__stdcall *GetLiveSeatedZeroPoseToRawTrackingPose)( HmdMatrix34_t *pmatSeatedZeroPoseToRawTrackingPose );
-	void (__stdcall *SetWorkingCollisionBoundsTagsInfo)(  uint8_t *pTagsBuffer, uint32_t unTagCount );
-	bool (__stdcall *GetLiveCollisionBoundsTagsInfo)(  uint8_t *pTagsBuffer, uint32_t *punTagCount );
-	bool (__stdcall *SetWorkingPhysicalBoundsInfo)(  HmdQuad_t *pQuadsBuffer, uint32_t unQuadsCount );
-	bool (__stdcall *GetLivePhysicalBoundsInfo)(  HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount );
-	bool (__stdcall *ExportLiveToBuffer)(  char *pBuffer, uint32_t *pnBufferLength );
-	bool (__stdcall *ImportFromBufferToWorking)( const char *pBuffer, uint32_t nImportFlags );
-};
-
-class IVRChaperoneSetup
-{
-	VR_IVRChaperoneSetup_FnTable _table;
-public:
-
-	/** Saves the current working copy to disk */
-	bool CommitWorkingCopy( EChaperoneConfigFile configFile ) { return _table.CommitWorkingCopy(configFile); }
-
-	/** Reverts the working copy to match the live chaperone calibration.
-	* To modify existing data this MUST be do WHILE getting a non-error ChaperoneCalibrationStatus.
-	* Only after this should you do gets and sets on the existing data. */
-	void RevertWorkingCopy() { _table.RevertWorkingCopy(); }
-
-	/** Returns the width and depth of the Play Area (formerly named Soft Bounds) in X and Z from the working copy.
-	* Tracking space center (0,0,0) is the center of the Play Area. */
-	bool GetWorkingPlayAreaSize( float *pSizeX, float *pSizeZ ) { return _table.GetWorkingPlayAreaSize(pSizeX, pSizeZ); }
-
-	/** Returns the 4 corner positions of the Play Area (formerly named Soft Bounds) from the working copy.
-	* Corners are in clockwise order.
-	* Tracking space center (0,0,0) is the center of the Play Area.
-	* It's a rectangle.
-	* 2 sides are parallel to the X axis and 2 sides are parallel to the Z axis.
-	* Height of every corner is 0Y (on the floor). **/
-	bool GetWorkingPlayAreaRect( HmdQuad_t *rect ) { return _table.GetWorkingPlayAreaRect(rect); }
-
-	/** Returns the number of Quads if the buffer points to null. Otherwise it returns Quads 
-	* into the buffer up to the max specified from the working copy. */
-	bool GetWorkingCollisionBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) { return _table.GetWorkingCollisionBoundsInfo(pQuadsBuffer, punQuadsCount); }
-
-	/** Returns the number of Quads if the buffer points to null. Otherwise it returns Quads 
-	* into the buffer up to the max specified. */
-	bool GetLiveCollisionBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) { return _table.GetLiveCollisionBoundsInfo(pQuadsBuffer, punQuadsCount); }
-
-	/** Returns the preferred seated position from the working copy. */
-	bool GetWorkingSeatedZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatSeatedZeroPoseToRawTrackingPose ) { return _table.GetWorkingSeatedZeroPoseToRawTrackingPose(pmatSeatedZeroPoseToRawTrackingPose); }
-
-	/** Returns the standing origin from the working copy. */
-	bool GetWorkingStandingZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatStandingZeroPoseToRawTrackingPose ) { return _table.GetWorkingStandingZeroPoseToRawTrackingPose(pmatStandingZeroPoseToRawTrackingPose); }
-
-	/** Sets the Play Area in the working copy. */
-	void SetWorkingPlayAreaSize( float sizeX, float sizeZ ) { _table.SetWorkingPlayAreaSize(sizeX, sizeZ); }
-
-	/** Sets the Collision Bounds in the working copy. */
-	void SetWorkingCollisionBoundsInfo( VR_ARRAY_COUNT(unQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t unQuadsCount ) { _table.SetWorkingCollisionBoundsInfo(pQuadsBuffer, unQuadsCount); }
-
-	/** Sets the preferred seated position in the working copy. */
-	void SetWorkingSeatedZeroPoseToRawTrackingPose( const HmdMatrix34_t *pMatSeatedZeroPoseToRawTrackingPose ) { _table.SetWorkingSeatedZeroPoseToRawTrackingPose(pMatSeatedZeroPoseToRawTrackingPose); }
-
-	/** Sets the preferred standing position in the working copy. */
-	void SetWorkingStandingZeroPoseToRawTrackingPose( const HmdMatrix34_t *pMatStandingZeroPoseToRawTrackingPose ) { _table.SetWorkingStandingZeroPoseToRawTrackingPose(pMatStandingZeroPoseToRawTrackingPose); }
-
-	/** Tear everything down and reload it from the file on disk */
-	void ReloadFromDisk( EChaperoneConfigFile configFile ) { _table.ReloadFromDisk(configFile); }
-
-	/** Returns the preferred seated position. */
-	bool GetLiveSeatedZeroPoseToRawTrackingPose( HmdMatrix34_t *pmatSeatedZeroPoseToRawTrackingPose ) { return _table.GetLiveSeatedZeroPoseToRawTrackingPose(pmatSeatedZeroPoseToRawTrackingPose); }
-
-	void SetWorkingCollisionBoundsTagsInfo( VR_ARRAY_COUNT(unTagCount) uint8_t *pTagsBuffer, uint32_t unTagCount ) { _table.SetWorkingCollisionBoundsTagsInfo(pTagsBuffer, unTagCount); }
-	bool GetLiveCollisionBoundsTagsInfo( VR_OUT_ARRAY_COUNT(punTagCount) uint8_t *pTagsBuffer, uint32_t *punTagCount ) { return _table.GetLiveCollisionBoundsTagsInfo(pTagsBuffer, punTagCount); }
-
-	bool SetWorkingPhysicalBoundsInfo( VR_ARRAY_COUNT(unQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t unQuadsCount ) { return _table.SetWorkingPhysicalBoundsInfo(pQuadsBuffer, unQuadsCount); }
-	bool GetLivePhysicalBoundsInfo( VR_OUT_ARRAY_COUNT(punQuadsCount) HmdQuad_t *pQuadsBuffer, uint32_t* punQuadsCount ) { return _table.GetLivePhysicalBoundsInfo(pQuadsBuffer, punQuadsCount); }
-
-	bool ExportLiveToBuffer( VR_OUT_STRING() char *pBuffer, uint32_t *pnBufferLength ) { return _table.ExportLiveToBuffer(pBuffer, pnBufferLength); }
-	bool ImportFromBufferToWorking( const char *pBuffer, uint32_t nImportFlags ) { return _table.ImportFromBufferToWorking(pBuffer, nImportFlags); }
-};
-
-static const char * const IVRChaperoneSetup_Version = "FnTable:IVRChaperoneSetup_005";
-
-
-}
-
-// ivrcompositor.h
-namespace vr
-{
-
-#if defined(__linux__) || defined(__APPLE__) 
-	// The 32-bit version of gcc has the alignment requirement for uint64 and double set to
-	// 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned.
-	// The 64-bit version of gcc has the alignment requirement for these types set to
-	// 8 meaning that unless we use #pragma pack(4) our structures will get bigger.
-	// The 64-bit structure packing has to match the 32-bit structure packing for each platform.
-	#pragma pack( push, 4 )
-#else
-	#pragma pack( push, 8 )
-#endif
-
-/** Errors that can occur with the VR compositor */
-enum EVRCompositorError
-{
-	VRCompositorError_None						= 0,
-	VRCompositorError_RequestFailed				= 1,
-	VRCompositorError_IncompatibleVersion		= 100,
-	VRCompositorError_DoNotHaveFocus			= 101,
-	VRCompositorError_InvalidTexture			= 102,
-	VRCompositorError_IsNotSceneApplication		= 103,
-	VRCompositorError_TextureIsOnWrongDevice	= 104,
-	VRCompositorError_TextureUsesUnsupportedFormat = 105,
-	VRCompositorError_SharedTexturesNotSupported = 106,
-	VRCompositorError_IndexOutOfRange			= 107,
-	VRCompositorError_AlreadySubmitted			= 108,
-};
-
-const uint32_t VRCompositor_ReprojectionReason_Cpu = 0x01;
-const uint32_t VRCompositor_ReprojectionReason_Gpu = 0x02;
-const uint32_t VRCompositor_ReprojectionAsync      = 0x04;	// This flag indicates the async reprojection mode is active,
-															// but does not indicate if reprojection actually happened or not.
-															// Use the ReprojectionReason flags above to check if reprojection
-															// was actually applied (i.e. scene texture was reused).
-															// NumFramePresents > 1 also indicates the scene texture was reused,
-															// and also the number of times that it was presented in total.
-
-/** Provides a single frame's timing information to the app */
-struct Compositor_FrameTiming
-{
-	uint32_t m_nSize; // Set to sizeof( Compositor_FrameTiming )
-	uint32_t m_nFrameIndex;
-	uint32_t m_nNumFramePresents; // number of times this frame was presented
-	uint32_t m_nNumMisPresented; // number of times this frame was presented on a vsync other than it was originally predicted to
-	uint32_t m_nNumDroppedFrames; // number of additional times previous frame was scanned out
-	uint32_t m_nReprojectionFlags;
-
-	/** Absolute time reference for comparing frames.  This aligns with the vsync that running start is relative to. */
-	double m_flSystemTimeInSeconds;
-
-	/** These times may include work from other processes due to OS scheduling.
-	* The fewer packets of work these are broken up into, the less likely this will happen.
-	* GPU work can be broken up by calling Flush.  This can sometimes be useful to get the GPU started
-	* processing that work earlier in the frame. */
-	float m_flPreSubmitGpuMs; // time spent rendering the scene (gpu work submitted between WaitGetPoses and second Submit)
-	float m_flPostSubmitGpuMs; // additional time spent rendering by application (e.g. companion window)
-	float m_flTotalRenderGpuMs; // time between work submitted immediately after present (ideally vsync) until the end of compositor submitted work
-	float m_flCompositorRenderGpuMs; // time spend performing distortion correction, rendering chaperone, overlays, etc.
-	float m_flCompositorRenderCpuMs; // time spent on cpu submitting the above work for this frame
-	float m_flCompositorIdleCpuMs; // time spent waiting for running start (application could have used this much more time)
-
-	/** Miscellaneous measured intervals. */
-	float m_flClientFrameIntervalMs; // time between calls to WaitGetPoses
-	float m_flPresentCallCpuMs; // time blocked on call to present (usually 0.0, but can go long)
-	float m_flWaitForPresentCpuMs; // time spent spin-waiting for frame index to change (not near-zero indicates wait object failure)
-	float m_flSubmitFrameMs; // time spent in IVRCompositor::Submit (not near-zero indicates driver issue)
-
-	/** The following are all relative to this frame's SystemTimeInSeconds */
-	float m_flWaitGetPosesCalledMs;
-	float m_flNewPosesReadyMs;
-	float m_flNewFrameReadyMs; // second call to IVRCompositor::Submit
-	float m_flCompositorUpdateStartMs;
-	float m_flCompositorUpdateEndMs;
-	float m_flCompositorRenderStartMs;
-
-	vr::TrackedDevicePose_t m_HmdPose; // pose used by app to render this frame
-};
-
-/** Cumulative stats for current application.  These are not cleared until a new app connects,
-* but they do stop accumulating once the associated app disconnects. */
-struct Compositor_CumulativeStats
-{
-	uint32_t m_nPid; // Process id associated with these stats (may no longer be running).
-	uint32_t m_nNumFramePresents; // total number of times we called present (includes reprojected frames)
-	uint32_t m_nNumDroppedFrames; // total number of times an old frame was re-scanned out (without reprojection)
-	uint32_t m_nNumReprojectedFrames; // total number of times a frame was scanned out a second time (with reprojection)
-
-	/** Values recorded at startup before application has fully faded in the first time. */
-	uint32_t m_nNumFramePresentsOnStartup;
-	uint32_t m_nNumDroppedFramesOnStartup;
-	uint32_t m_nNumReprojectedFramesOnStartup;
-
-	/** Applications may explicitly fade to the compositor.  This is usually to handle level transitions, and loading often causes
-	* system wide hitches.  The following stats are collected during this period.  Does not include values recorded during startup. */
-	uint32_t m_nNumLoading;
-	uint32_t m_nNumFramePresentsLoading;
-	uint32_t m_nNumDroppedFramesLoading;
-	uint32_t m_nNumReprojectedFramesLoading;
-
-	/** If we don't get a new frame from the app in less than 2.5 frames, then we assume the app has hung and start
-	* fading back to the compositor.  The following stats are a result of this, and are a subset of those recorded above.
-	* Does not include values recorded during start up or loading. */
-	uint32_t m_nNumTimedOut;
-	uint32_t m_nNumFramePresentsTimedOut;
-	uint32_t m_nNumDroppedFramesTimedOut;
-	uint32_t m_nNumReprojectedFramesTimedOut;
-};
-
-#pragma pack( pop )
-
-/** Allows the application to interact with the compositor */
-struct VR_IVRCompositor_FnTable
-{
-	void (__stdcall *SetTrackingSpace)( ETrackingUniverseOrigin eOrigin );
-	ETrackingUniverseOrigin (__stdcall *GetTrackingSpace)();
-	EVRCompositorError (__stdcall *WaitGetPoses)(  TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount,
-		 TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount );
-	EVRCompositorError (__stdcall *GetLastPoses)(  TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount,
-		 TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount );
-	EVRCompositorError (__stdcall *GetLastPoseForTrackedDeviceIndex)( TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t *pOutputPose, TrackedDevicePose_t *pOutputGamePose );
-	EVRCompositorError (__stdcall *Submit)( EVREye eEye, const Texture_t *pTexture, const VRTextureBounds_t* pBounds, EVRSubmitFlags nSubmitFlags);
-	void (__stdcall *ClearLastSubmittedFrame)();
-	void (__stdcall *PostPresentHandoff)();
-	bool (__stdcall *GetFrameTiming)( Compositor_FrameTiming *pTiming, uint32_t unFramesAgo);
-	uint32_t (__stdcall *GetFrameTimings)( Compositor_FrameTiming *pTiming, uint32_t nFrames );
-	float (__stdcall *GetFrameTimeRemaining)();
-	void (__stdcall *GetCumulativeStats)( Compositor_CumulativeStats *pStats, uint32_t nStatsSizeInBytes );
-	void (__stdcall *FadeToColor)( float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground);
-	HmdColor_t (__stdcall *GetCurrentFadeColor)( bool bBackground);
-	void (__stdcall *FadeGrid)( float fSeconds, bool bFadeIn );
-	float (__stdcall *GetCurrentGridAlpha)();
-	EVRCompositorError (__stdcall *SetSkyboxOverride)(  const Texture_t *pTextures, uint32_t unTextureCount );
-	void (__stdcall *ClearSkyboxOverride)();
-	void (__stdcall *CompositorBringToFront)();
-	void (__stdcall *CompositorGoToBack)();
-	void (__stdcall *CompositorQuit)();
-	bool (__stdcall *IsFullscreen)();
-	uint32_t (__stdcall *GetCurrentSceneFocusProcess)();
-	uint32_t (__stdcall *GetLastFrameRenderer)();
-	bool (__stdcall *CanRenderScene)();
-	void (__stdcall *ShowMirrorWindow)();
-	void (__stdcall *HideMirrorWindow)();
-	bool (__stdcall *IsMirrorWindowVisible)();
-	void (__stdcall *CompositorDumpImages)();
-	bool (__stdcall *ShouldAppRenderWithLowResources)();
-	void (__stdcall *ForceInterleavedReprojectionOn)( bool bOverride );
-	void (__stdcall *ForceReconnectProcess)();
-	void (__stdcall *SuspendRendering)( bool bSuspend );
-	vr::EVRCompositorError (__stdcall *GetMirrorTextureD3D11)( vr::EVREye eEye, void *pD3D11DeviceOrResource, void **ppD3D11ShaderResourceView );
-	void (__stdcall *ReleaseMirrorTextureD3D11)( void *pD3D11ShaderResourceView );
-	vr::EVRCompositorError (__stdcall *GetMirrorTextureGL)( vr::EVREye eEye, vr::glUInt_t *pglTextureId, vr::glSharedTextureHandle_t *pglSharedTextureHandle );
-	bool (__stdcall *ReleaseSharedGLTexture)( vr::glUInt_t glTextureId, vr::glSharedTextureHandle_t glSharedTextureHandle );
-	void (__stdcall *LockGLSharedTextureForAccess)( vr::glSharedTextureHandle_t glSharedTextureHandle );
-	void (__stdcall *UnlockGLSharedTextureForAccess)( vr::glSharedTextureHandle_t glSharedTextureHandle );
-	uint32_t (__stdcall *GetVulkanInstanceExtensionsRequired)(  char *pchValue, uint32_t unBufferSize );
-	uint32_t (__stdcall *GetVulkanDeviceExtensionsRequired)( VkPhysicalDevice_T *pPhysicalDevice,  char *pchValue, uint32_t unBufferSize );
-};
-
-class IVRCompositor
-{
-	VR_IVRCompositor_FnTable _table;
-public:
-	/** Sets tracking space returned by WaitGetPoses */
-	void SetTrackingSpace( ETrackingUniverseOrigin eOrigin ) { _table.SetTrackingSpace(eOrigin); }
-
-	/** Gets current tracking space returned by WaitGetPoses */
-	ETrackingUniverseOrigin GetTrackingSpace() { return _table.GetTrackingSpace(); }
-
-	/** Scene applications should call this function to get poses to render with (and optionally poses predicted an additional frame out to use for gameplay).
-	* This function will block until "running start" milliseconds before the start of the frame, and should be called at the last moment before needing to
-	* start rendering.
-	*
-	* Return codes:
-	*	- IsNotSceneApplication (make sure to call VR_Init with VRApplicaiton_Scene)
-	*	- DoNotHaveFocus (some other app has taken focus - this will throttle the call to 10hz to reduce the impact on that app)
-	*/
-	EVRCompositorError WaitGetPoses( VR_ARRAY_COUNT(unRenderPoseArrayCount) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount,
-		VR_ARRAY_COUNT(unGamePoseArrayCount) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) { return _table.WaitGetPoses(pRenderPoseArray, unRenderPoseArrayCount, pGamePoseArray, unGamePoseArrayCount); }
-
-	/** Get the last set of poses returned by WaitGetPoses. */
-	EVRCompositorError GetLastPoses( VR_ARRAY_COUNT( unRenderPoseArrayCount ) TrackedDevicePose_t* pRenderPoseArray, uint32_t unRenderPoseArrayCount,
-		VR_ARRAY_COUNT( unGamePoseArrayCount ) TrackedDevicePose_t* pGamePoseArray, uint32_t unGamePoseArrayCount ) { return _table.GetLastPoses(pRenderPoseArray, unRenderPoseArrayCount, pGamePoseArray, unGamePoseArrayCount); }
-
-	/** Interface for accessing last set of poses returned by WaitGetPoses one at a time.
-	* Returns VRCompositorError_IndexOutOfRange if unDeviceIndex not less than k_unMaxTrackedDeviceCount otherwise VRCompositorError_None.
-	* It is okay to pass NULL for either pose if you only want one of the values. */
-	EVRCompositorError GetLastPoseForTrackedDeviceIndex( TrackedDeviceIndex_t unDeviceIndex, TrackedDevicePose_t *pOutputPose, TrackedDevicePose_t *pOutputGamePose ) { return _table.GetLastPoseForTrackedDeviceIndex(unDeviceIndex, pOutputPose, pOutputGamePose); }
-
-	/** Updated scene texture to display. If pBounds is NULL the entire texture will be used.  If called from an OpenGL app, consider adding a glFlush after
-	* Submitting both frames to signal the driver to start processing, otherwise it may wait until the command buffer fills up, causing the app to miss frames.
-	*
-	* OpenGL dirty state:
-	*	glBindTexture
-	*
-	* Return codes:
-	*	- IsNotSceneApplication (make sure to call VR_Init with VRApplicaiton_Scene)
-	*	- DoNotHaveFocus (some other app has taken focus)
-	*	- TextureIsOnWrongDevice (application did not use proper AdapterIndex - see IVRSystem.GetDXGIOutputInfo)
-	*	- SharedTexturesNotSupported (application needs to call CreateDXGIFactory1 or later before creating DX device)
-	*	- TextureUsesUnsupportedFormat (scene textures must be compatible with DXGI sharing rules - e.g. uncompressed, no mips, etc.)
-	*	- InvalidTexture (usually means bad arguments passed in)
-	*	- AlreadySubmitted (app has submitted two left textures or two right textures in a single frame - i.e. before calling WaitGetPoses again)
-	*/
-	EVRCompositorError Submit( EVREye eEye, const Texture_t *pTexture, const VRTextureBounds_t* pBounds = 0, EVRSubmitFlags nSubmitFlags = Submit_Default ) { return _table.Submit(eEye, pTexture, pBounds, nSubmitFlags); }
-
-	/** Clears the frame that was sent with the last call to Submit. This will cause the 
-	* compositor to show the grid until Submit is called again. */
-	void ClearLastSubmittedFrame() { _table.ClearLastSubmittedFrame(); }
-
-	/** Call immediately after presenting your app's window (i.e. companion window) to unblock the compositor.
-	* This is an optional call, which only needs to be used if you can't instead call WaitGetPoses immediately after Present.
-	* For example, if your engine's render and game loop are not on separate threads, or blocking the render thread until 3ms before the next vsync would
-	* introduce a deadlock of some sort.  This function tells the compositor that you have finished all rendering after having Submitted buffers for both
-	* eyes, and it is free to start its rendering work.  This should only be called from the same thread you are rendering on. */
-	void PostPresentHandoff() { _table.PostPresentHandoff(); }
-
-	/** Returns true if timing data is filled it.  Sets oldest timing info if nFramesAgo is larger than the stored history.
-	* Be sure to set timing.size = sizeof(Compositor_FrameTiming) on struct passed in before calling this function. */
-	bool GetFrameTiming( Compositor_FrameTiming *pTiming, uint32_t unFramesAgo = 0 ) { return _table.GetFrameTiming(pTiming, unFramesAgo); }
-
-	/** Interface for copying a range of timing data.  Frames are returned in ascending order (oldest to newest) with the last being the most recent frame.
-	* Only the first entry's m_nSize needs to be set, as the rest will be inferred from that.  Returns total number of entries filled out. */
-	uint32_t GetFrameTimings( Compositor_FrameTiming *pTiming, uint32_t nFrames ) { return _table.GetFrameTimings(pTiming, nFrames); }
-
-	/** Returns the time in seconds left in the current (as identified by FrameTiming's frameIndex) frame.
-	* Due to "running start", this value may roll over to the next frame before ever reaching 0.0. */
-	float GetFrameTimeRemaining() { return _table.GetFrameTimeRemaining(); }
-
-	/** Fills out stats accumulated for the last connected application.  Pass in sizeof( Compositor_CumulativeStats ) as second parameter. */
-	void GetCumulativeStats( Compositor_CumulativeStats *pStats, uint32_t nStatsSizeInBytes ) { _table.GetCumulativeStats(pStats, nStatsSizeInBytes); }
-
-	/** Fades the view on the HMD to the specified color. The fade will take fSeconds, and the color values are between
-	* 0.0 and 1.0. This color is faded on top of the scene based on the alpha parameter. Removing the fade color instantly 
-	* would be FadeToColor( 0.0, 0.0, 0.0, 0.0, 0.0 ).  Values are in un-premultiplied alpha space. */
-	void FadeToColor( float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground = false ) { _table.FadeToColor(fSeconds, fRed, fGreen, fBlue, fAlpha, bBackground); }
-
-	/** Get current fade color value. */
-	HmdColor_t GetCurrentFadeColor( bool bBackground = false ) { return _table.GetCurrentFadeColor(bBackground); }
-
-	/** Fading the Grid in or out in fSeconds */
-	void FadeGrid( float fSeconds, bool bFadeIn ) { _table.FadeGrid(fSeconds, bFadeIn); }
-
-	/** Get current alpha value of grid. */
-	float GetCurrentGridAlpha() { return _table.GetCurrentGridAlpha(); }
-
-	/** Override the skybox used in the compositor (e.g. for during level loads when the app can't feed scene images fast enough)
-	* Order is Front, Back, Left, Right, Top, Bottom.  If only a single texture is passed, it is assumed in lat-long format.
-	* If two are passed, it is assumed a lat-long stereo pair. */
-	EVRCompositorError SetSkyboxOverride( VR_ARRAY_COUNT( unTextureCount ) const Texture_t *pTextures, uint32_t unTextureCount ) { return _table.SetSkyboxOverride(pTextures, unTextureCount); }
-
-	/** Resets compositor skybox back to defaults. */
-	void ClearSkyboxOverride() { _table.ClearSkyboxOverride(); }
-
-	/** Brings the compositor window to the front. This is useful for covering any other window that may be on the HMD
-	* and is obscuring the compositor window. */
-	void CompositorBringToFront() { _table.CompositorBringToFront(); }
-
-	/** Pushes the compositor window to the back. This is useful for allowing other applications to draw directly to the HMD. */
-	void CompositorGoToBack() { _table.CompositorGoToBack(); }
-
-	/** Tells the compositor process to clean up and exit. You do not need to call this function at shutdown. Under normal 
-	* circumstances the compositor will manage its own life cycle based on what applications are running. */
-	void CompositorQuit() { _table.CompositorQuit(); }
-	
-	/** Return whether the compositor is fullscreen */
-	bool IsFullscreen() { return _table.IsFullscreen(); }
-
-	/** Returns the process ID of the process that is currently rendering the scene */
-	uint32_t GetCurrentSceneFocusProcess() { return _table.GetCurrentSceneFocusProcess(); }
-
-	/** Returns the process ID of the process that rendered the last frame (or 0 if the compositor itself rendered the frame.)
-	* Returns 0 when fading out from an app and the app's process Id when fading into an app. */
-	uint32_t GetLastFrameRenderer() { return _table.GetLastFrameRenderer(); }
-
-	/** Returns true if the current process has the scene focus */
-	bool CanRenderScene() { return _table.CanRenderScene(); }
-
-	/** Creates a window on the primary monitor to display what is being shown in the headset. */
-	void ShowMirrorWindow() { _table.ShowMirrorWindow(); }
-
-	/** Closes the mirror window. */
-	void HideMirrorWindow() { _table.HideMirrorWindow(); }
-
-	/** Returns true if the mirror window is shown. */
-	bool IsMirrorWindowVisible() { return _table.IsMirrorWindowVisible(); }
-
-	/** Writes all images that the compositor knows about (including overlays) to a 'screenshots' folder in the SteamVR runtime root. */
-	void CompositorDumpImages() { _table.CompositorDumpImages(); }
-
-	/** Let an app know it should be rendering with low resources. */
-	bool ShouldAppRenderWithLowResources() { return _table.ShouldAppRenderWithLowResources(); }
-
-	/** Override interleaved reprojection logic to force on. */
-	void ForceInterleavedReprojectionOn( bool bOverride ) { _table.ForceInterleavedReprojectionOn(bOverride); }
-
-	/** Force reconnecting to the compositor process. */
-	void ForceReconnectProcess() { _table.ForceReconnectProcess(); }
-
-	/** Temporarily suspends rendering (useful for finer control over scene transitions). */
-	void SuspendRendering( bool bSuspend ) { _table.SuspendRendering(bSuspend); }
-
-	/** Opens a shared D3D11 texture with the undistorted composited image for each eye.  Use ReleaseMirrorTextureD3D11 when finished
-	* instead of calling Release on the resource itself. */
-	vr::EVRCompositorError GetMirrorTextureD3D11( vr::EVREye eEye, void *pD3D11DeviceOrResource, void **ppD3D11ShaderResourceView ) { return _table.GetMirrorTextureD3D11(eEye, pD3D11DeviceOrResource, ppD3D11ShaderResourceView); }
-	void ReleaseMirrorTextureD3D11( void *pD3D11ShaderResourceView ) { _table.ReleaseMirrorTextureD3D11(pD3D11ShaderResourceView); }
-
-	/** Access to mirror textures from OpenGL. */
-	vr::EVRCompositorError GetMirrorTextureGL( vr::EVREye eEye, vr::glUInt_t *pglTextureId, vr::glSharedTextureHandle_t *pglSharedTextureHandle ) { return _table.GetMirrorTextureGL(eEye, pglTextureId, pglSharedTextureHandle); }
-	bool ReleaseSharedGLTexture( vr::glUInt_t glTextureId, vr::glSharedTextureHandle_t glSharedTextureHandle ) { return _table.ReleaseSharedGLTexture(glTextureId, glSharedTextureHandle); }
-	void LockGLSharedTextureForAccess( vr::glSharedTextureHandle_t glSharedTextureHandle ) { _table.LockGLSharedTextureForAccess(glSharedTextureHandle); }
-	void UnlockGLSharedTextureForAccess( vr::glSharedTextureHandle_t glSharedTextureHandle ) { _table.UnlockGLSharedTextureForAccess(glSharedTextureHandle); }
-
-	/** [Vulkan Only]
-	* return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing
-	* null.  The string will be a space separated list of-required instance extensions to enable in VkCreateInstance */
-	uint32_t GetVulkanInstanceExtensionsRequired( VR_OUT_STRING() char *pchValue, uint32_t unBufferSize ) { return _table.GetVulkanInstanceExtensionsRequired(pchValue, unBufferSize); }
-
-	/** [Vulkan only]
-	* return 0. Otherwise it returns the length of the number of bytes necessary to hold this string including the trailing
-	* null.  The string will be a space separated list of required device extensions to enable in VkCreateDevice */
-	uint32_t GetVulkanDeviceExtensionsRequired( VkPhysicalDevice_T *pPhysicalDevice, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize ) { return _table.GetVulkanDeviceExtensionsRequired(pPhysicalDevice, pchValue, unBufferSize); }
-
-};
-
-static const char * const IVRCompositor_Version = "FnTable:IVRCompositor_020";
-
-} // namespace vr
-
-
-
-// ivrnotifications.h
-namespace vr
-{
-
-#if defined(__linux__) || defined(__APPLE__) 
-	// The 32-bit version of gcc has the alignment requirement for uint64 and double set to
-	// 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned.
-	// The 64-bit version of gcc has the alignment requirement for these types set to
-	// 8 meaning that unless we use #pragma pack(4) our structures will get bigger.
-	// The 64-bit structure packing has to match the 32-bit structure packing for each platform.
-	#pragma pack( push, 4 )
-#else
-	#pragma pack( push, 8 )
-#endif
-
-// Used for passing graphic data
-struct NotificationBitmap_t
-{
-	NotificationBitmap_t()
-		: m_pImageData( nullptr )
-		, m_nWidth( 0 )
-		, m_nHeight( 0 )
-		, m_nBytesPerPixel( 0 )
-	{
-	};
-
-	void *m_pImageData;
-	int32_t m_nWidth;
-	int32_t m_nHeight;
-	int32_t m_nBytesPerPixel;
-};
-
-
-/** Be aware that the notification type is used as 'priority' to pick the next notification */
-enum EVRNotificationType
-{
-	/** Transient notifications are automatically hidden after a period of time set by the user. 
-	* They are used for things like information and chat messages that do not require user interaction. */
-	EVRNotificationType_Transient = 0,
-
-	/** Persistent notifications are shown to the user until they are hidden by calling RemoveNotification().
-	* They are used for things like phone calls and alarms that require user interaction. */
-	EVRNotificationType_Persistent = 1,
-
-	/** System notifications are shown no matter what. It is expected, that the ulUserValue is used as ID.
-	 * If there is already a system notification in the queue with that ID it is not accepted into the queue
-	 * to prevent spamming with system notification */
-	EVRNotificationType_Transient_SystemWithUserValue = 2,
-};
-
-enum EVRNotificationStyle
-{
-	/** Creates a notification with minimal external styling. */
-	EVRNotificationStyle_None = 0,
-
-	/** Used for notifications about overlay-level status. In Steam this is used for events like downloads completing. */
-	EVRNotificationStyle_Application = 100,
-
-	/** Used for notifications about contacts that are unknown or not available. In Steam this is used for friend invitations and offline friends. */
-	EVRNotificationStyle_Contact_Disabled = 200,
-
-	/** Used for notifications about contacts that are available but inactive. In Steam this is used for friends that are online but not playing a game. */
-	EVRNotificationStyle_Contact_Enabled = 201,
-
-	/** Used for notifications about contacts that are available and active. In Steam this is used for friends that are online and currently running a game. */
-	EVRNotificationStyle_Contact_Active = 202,
-};
-
-static const uint32_t k_unNotificationTextMaxSize = 256;
-
-typedef uint32_t VRNotificationId;
-
-
-
-#pragma pack( pop )
-
-/** Allows notification sources to interact with the VR system
-	This current interface is not yet implemented. Do not use yet. */
-struct VR_IVRNotifications_FnTable
-{
-	EVRNotificationError (__stdcall *CreateNotification)( VROverlayHandle_t ulOverlayHandle, uint64_t ulUserValue, EVRNotificationType type, const char *pchText, EVRNotificationStyle style, const NotificationBitmap_t *pImage, /* out */ VRNotificationId *pNotificationId );
-	EVRNotificationError (__stdcall *RemoveNotification)( VRNotificationId notificationId );
-};
-
-class IVRNotifications
-{
-	VR_IVRNotifications_FnTable _table;
-public:
-	/** Create a notification and enqueue it to be shown to the user.
-	* An overlay handle is required to create a notification, as otherwise it would be impossible for a user to act on it.
-	* To create a two-line notification, use a line break ('\n') to split the text into two lines.
-	* The pImage argument may be NULL, in which case the specified overlay's icon will be used instead. */
-	EVRNotificationError CreateNotification( VROverlayHandle_t ulOverlayHandle, uint64_t ulUserValue, EVRNotificationType type, const char *pchText, EVRNotificationStyle style, const NotificationBitmap_t *pImage, /* out */ VRNotificationId *pNotificationId ) { return _table.CreateNotification(ulOverlayHandle, ulUserValue, type, pchText, style, pImage, pNotificationId); }
-
-	/** Destroy a notification, hiding it first if it currently shown to the user. */
-	EVRNotificationError RemoveNotification( VRNotificationId notificationId ) { return _table.RemoveNotification(notificationId); }
-
-};
-
-static const char * const IVRNotifications_Version = "FnTable:IVRNotifications_002";
-
-} // namespace vr
-
-
-
-// ivroverlay.h
-namespace vr
-{
-
-	/** The maximum length of an overlay key in bytes, counting the terminating null character. */
-	static const uint32_t k_unVROverlayMaxKeyLength = 128;
-
-	/** The maximum length of an overlay name in bytes, counting the terminating null character. */
-	static const uint32_t k_unVROverlayMaxNameLength = 128;
-
-	/** The maximum number of overlays that can exist in the system at one time. */
-	static const uint32_t k_unMaxOverlayCount = 64;
-
-	/** The maximum number of overlay intersection mask primitives per overlay */
-	static const uint32_t k_unMaxOverlayIntersectionMaskPrimitivesCount = 32;
-
-	/** Types of input supported by VR Overlays */
-	enum VROverlayInputMethod
-	{
-		VROverlayInputMethod_None		= 0, // No input events will be generated automatically for this overlay
-		VROverlayInputMethod_Mouse		= 1, // Tracked controllers will get mouse events automatically
-	};
-
-	/** Allows the caller to figure out which overlay transform getter to call. */
-	enum VROverlayTransformType
-	{
-		VROverlayTransform_Absolute					= 0,
-		VROverlayTransform_TrackedDeviceRelative	= 1,
-		VROverlayTransform_SystemOverlay			= 2,
-		VROverlayTransform_TrackedComponent 		= 3,
-	};
-
-	/** Overlay control settings */
-	enum VROverlayFlags
-	{
-		VROverlayFlags_None			= 0,
-
-		// The following only take effect when rendered using the high quality render path (see SetHighQualityOverlay).
-		VROverlayFlags_Curved		= 1,
-		VROverlayFlags_RGSS4X		= 2,
-
-		// Set this flag on a dashboard overlay to prevent a tab from showing up for that overlay
-		VROverlayFlags_NoDashboardTab = 3,
-
-		// Set this flag on a dashboard that is able to deal with gamepad focus events
-		VROverlayFlags_AcceptsGamepadEvents = 4,
-
-		// Indicates that the overlay should dim/brighten to show gamepad focus
-		VROverlayFlags_ShowGamepadFocus = 5,
-
-		// When in VROverlayInputMethod_Mouse you can optionally enable sending VRScroll_t 
-		VROverlayFlags_SendVRScrollEvents = 6,
-		VROverlayFlags_SendVRTouchpadEvents = 7,
-
-		// If set this will render a vertical scroll wheel on the primary controller, 
-		//  only needed if not using VROverlayFlags_SendVRScrollEvents but you still want to represent a scroll wheel
-		VROverlayFlags_ShowTouchPadScrollWheel = 8,
-
-		// If this is set ownership and render access to the overlay are transferred 
-		// to the new scene process on a call to IVRApplications::LaunchInternalProcess
-		VROverlayFlags_TransferOwnershipToInternalProcess = 9,
-
-		// If set, renders 50% of the texture in each eye, side by side
-		VROverlayFlags_SideBySide_Parallel = 10, // Texture is left/right
-		VROverlayFlags_SideBySide_Crossed = 11, // Texture is crossed and right/left
-
-		VROverlayFlags_Panorama = 12, // Texture is a panorama
-		VROverlayFlags_StereoPanorama = 13, // Texture is a stereo panorama
-
-		// If this is set on an overlay owned by the scene application that overlay
-		// will be sorted with the "Other" overlays on top of all other scene overlays
-		VROverlayFlags_SortWithNonSceneOverlays = 14,
-
-		// If set, the overlay will be shown in the dashboard, otherwise it will be hidden.
-		VROverlayFlags_VisibleInDashboard = 15,
-	};
-
-	enum VRMessageOverlayResponse
-	{
-		VRMessageOverlayResponse_ButtonPress_0 = 0,
-		VRMessageOverlayResponse_ButtonPress_1 = 1,
-		VRMessageOverlayResponse_ButtonPress_2 = 2,
-		VRMessageOverlayResponse_ButtonPress_3 = 3,
-		VRMessageOverlayResponse_CouldntFindSystemOverlay = 4,
-		VRMessageOverlayResponse_CouldntFindOrCreateClientOverlay= 5,
-		VRMessageOverlayResponse_ApplicationQuit = 6
-	};
-
-	struct VROverlayIntersectionParams_t
-	{
-		HmdVector3_t vSource;
-		HmdVector3_t vDirection;
-		ETrackingUniverseOrigin eOrigin;
-	};
-
-	struct VROverlayIntersectionResults_t
-	{
-		HmdVector3_t vPoint;
-		HmdVector3_t vNormal;
-		HmdVector2_t vUVs;
-		float fDistance;
-	};
-
-	// Input modes for the Big Picture gamepad text entry
-	enum EGamepadTextInputMode
-	{
-		k_EGamepadTextInputModeNormal = 0,
-		k_EGamepadTextInputModePassword = 1,
-		k_EGamepadTextInputModeSubmit = 2,
-	};
-
-	// Controls number of allowed lines for the Big Picture gamepad text entry
-	enum EGamepadTextInputLineMode
-	{
-		k_EGamepadTextInputLineModeSingleLine = 0,
-		k_EGamepadTextInputLineModeMultipleLines = 1
-	};
-
-	/** Directions for changing focus between overlays with the gamepad */
-	enum EOverlayDirection
-	{
-		OverlayDirection_Up = 0,
-		OverlayDirection_Down = 1,
-		OverlayDirection_Left = 2,
-		OverlayDirection_Right = 3,
-		
-		OverlayDirection_Count = 4,
-	};
-
-	enum EVROverlayIntersectionMaskPrimitiveType
-	{
-		OverlayIntersectionPrimitiveType_Rectangle,
-		OverlayIntersectionPrimitiveType_Circle,
-	};
-
-	struct IntersectionMaskRectangle_t
-	{
-		float m_flTopLeftX;
-		float m_flTopLeftY;
-		float m_flWidth;
-		float m_flHeight;
-	};
-
-	struct IntersectionMaskCircle_t
-	{
-		float m_flCenterX;
-		float m_flCenterY;
-		float m_flRadius;
-	};
-
-	/** NOTE!!! If you change this you MUST manually update openvr_interop.cs.py and openvr_api_flat.h.py */
-	typedef union
-	{
-		IntersectionMaskRectangle_t m_Rectangle;
-		IntersectionMaskCircle_t m_Circle;
-	} VROverlayIntersectionMaskPrimitive_Data_t;
-
-	struct VROverlayIntersectionMaskPrimitive_t
-	{
-		EVROverlayIntersectionMaskPrimitiveType m_nPrimitiveType;
-		VROverlayIntersectionMaskPrimitive_Data_t m_Primitive;
-	};
-
-	struct VR_IVROverlay_FnTable
-	{
-		EVROverlayError (__stdcall *FindOverlay)( const char *pchOverlayKey, VROverlayHandle_t * pOverlayHandle );
-		EVROverlayError (__stdcall *CreateOverlay)( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle );
-		EVROverlayError (__stdcall *DestroyOverlay)( VROverlayHandle_t ulOverlayHandle );
-		EVROverlayError (__stdcall *SetHighQualityOverlay)( VROverlayHandle_t ulOverlayHandle );
-		vr::VROverlayHandle_t (__stdcall *GetHighQualityOverlay)();
-		uint32_t (__stdcall *GetOverlayKey)( VROverlayHandle_t ulOverlayHandle,  char *pchValue, uint32_t unBufferSize, EVROverlayError *pError);
-		uint32_t (__stdcall *GetOverlayName)( VROverlayHandle_t ulOverlayHandle,  char *pchValue, uint32_t unBufferSize, EVROverlayError *pError);
-		EVROverlayError (__stdcall *GetOverlayImageData)( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unBufferSize, uint32_t *punWidth, uint32_t *punHeight );
-		const char *(__stdcall *GetOverlayErrorNameFromEnum)( EVROverlayError error );
-		EVROverlayError (__stdcall *SetOverlayRenderingPid)( VROverlayHandle_t ulOverlayHandle, uint32_t unPID );
-		uint32_t (__stdcall *GetOverlayRenderingPid)( VROverlayHandle_t ulOverlayHandle );
-		EVROverlayError (__stdcall *SetOverlayFlag)( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled );
-		EVROverlayError (__stdcall *GetOverlayFlag)( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool *pbEnabled );
-		EVROverlayError (__stdcall *SetOverlayColor)( VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue );
-		EVROverlayError (__stdcall *GetOverlayColor)( VROverlayHandle_t ulOverlayHandle, float *pfRed, float *pfGreen, float *pfBlue );
-		EVROverlayError (__stdcall *SetOverlayAlpha)( VROverlayHandle_t ulOverlayHandle, float fAlpha );
-		EVROverlayError (__stdcall *GetOverlayAlpha)( VROverlayHandle_t ulOverlayHandle, float *pfAlpha );
-		EVROverlayError (__stdcall *SetOverlayTexelAspect)( VROverlayHandle_t ulOverlayHandle, float fTexelAspect );
-		EVROverlayError (__stdcall *GetOverlayTexelAspect)( VROverlayHandle_t ulOverlayHandle, float *pfTexelAspect );
-		EVROverlayError (__stdcall *SetOverlaySortOrder)( VROverlayHandle_t ulOverlayHandle, uint32_t unSortOrder );
-		EVROverlayError (__stdcall *GetOverlaySortOrder)( VROverlayHandle_t ulOverlayHandle, uint32_t *punSortOrder );
-		EVROverlayError (__stdcall *SetOverlayWidthInMeters)( VROverlayHandle_t ulOverlayHandle, float fWidthInMeters );
-		EVROverlayError (__stdcall *GetOverlayWidthInMeters)( VROverlayHandle_t ulOverlayHandle, float *pfWidthInMeters );
-		EVROverlayError (__stdcall *SetOverlayAutoCurveDistanceRangeInMeters)( VROverlayHandle_t ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters );
-		EVROverlayError (__stdcall *GetOverlayAutoCurveDistanceRangeInMeters)( VROverlayHandle_t ulOverlayHandle, float *pfMinDistanceInMeters, float *pfMaxDistanceInMeters );
-		EVROverlayError (__stdcall *SetOverlayTextureColorSpace)( VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace );
-		EVROverlayError (__stdcall *GetOverlayTextureColorSpace)( VROverlayHandle_t ulOverlayHandle, EColorSpace *peTextureColorSpace );
-		EVROverlayError (__stdcall *SetOverlayTextureBounds)( VROverlayHandle_t ulOverlayHandle, const VRTextureBounds_t *pOverlayTextureBounds );
-		EVROverlayError (__stdcall *GetOverlayTextureBounds)( VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t *pOverlayTextureBounds );
-		EVROverlayError (__stdcall *GetOverlayTransformType)( VROverlayHandle_t ulOverlayHandle, VROverlayTransformType *peTransformType );
-		EVROverlayError (__stdcall *SetOverlayTransformAbsolute)( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToOverlayTransform );
-		EVROverlayError (__stdcall *GetOverlayTransformAbsolute)( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin *peTrackingOrigin, HmdMatrix34_t *pmatTrackingOriginToOverlayTransform );
-		EVROverlayError (__stdcall *SetOverlayTransformTrackedDeviceRelative)( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, const HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform );
-		EVROverlayError (__stdcall *GetOverlayTransformTrackedDeviceRelative)( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punTrackedDevice, HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform );
-		EVROverlayError (__stdcall *SetOverlayTransformTrackedDeviceComponent)( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, const char *pchComponentName );
-		EVROverlayError (__stdcall *GetOverlayTransformTrackedDeviceComponent)( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punDeviceIndex, char *pchComponentName, uint32_t unComponentNameSize );
-		EVROverlayError (__stdcall *ShowOverlay)( VROverlayHandle_t ulOverlayHandle );
-		EVROverlayError (__stdcall *HideOverlay)( VROverlayHandle_t ulOverlayHandle );
-		bool (__stdcall *IsOverlayVisible)( VROverlayHandle_t ulOverlayHandle );
-		EVROverlayError (__stdcall *GetTransformForOverlayCoordinates)( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t *pmatTransform );
-		bool (__stdcall *PollNextOverlayEvent)( VROverlayHandle_t ulOverlayHandle, VREvent_t *pEvent, uint32_t uncbVREvent );
-		EVROverlayError (__stdcall *GetOverlayInputMethod)( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod *peInputMethod );
-		EVROverlayError (__stdcall *SetOverlayInputMethod)( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod );
-		EVROverlayError (__stdcall *GetOverlayMouseScale)( VROverlayHandle_t ulOverlayHandle, HmdVector2_t *pvecMouseScale );
-		EVROverlayError (__stdcall *SetOverlayMouseScale)( VROverlayHandle_t ulOverlayHandle, const HmdVector2_t *pvecMouseScale );
-		bool (__stdcall *ComputeOverlayIntersection)( VROverlayHandle_t ulOverlayHandle, const VROverlayIntersectionParams_t *pParams, VROverlayIntersectionResults_t *pResults );
-		bool (__stdcall *HandleControllerOverlayInteractionAsMouse)( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex );
-		bool (__stdcall *IsHoverTargetOverlay)( VROverlayHandle_t ulOverlayHandle );
-		vr::VROverlayHandle_t (__stdcall *GetGamepadFocusOverlay)();
-		EVROverlayError (__stdcall *SetGamepadFocusOverlay)( VROverlayHandle_t ulNewFocusOverlay );
-		EVROverlayError (__stdcall *SetOverlayNeighbor)( EOverlayDirection eDirection, VROverlayHandle_t ulFrom, VROverlayHandle_t ulTo );
-		EVROverlayError (__stdcall *MoveGamepadFocusToNeighbor)( EOverlayDirection eDirection, VROverlayHandle_t ulFrom );
-		EVROverlayError (__stdcall *SetOverlayTexture)( VROverlayHandle_t ulOverlayHandle, const Texture_t *pTexture );
-		EVROverlayError (__stdcall *ClearOverlayTexture)( VROverlayHandle_t ulOverlayHandle );
-		EVROverlayError (__stdcall *SetOverlayRaw)( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth );
-		EVROverlayError (__stdcall *SetOverlayFromFile)( VROverlayHandle_t ulOverlayHandle, const char *pchFilePath );
-		EVROverlayError (__stdcall *GetOverlayTexture)( VROverlayHandle_t ulOverlayHandle, void **pNativeTextureHandle, void *pNativeTextureRef, uint32_t *pWidth, uint32_t *pHeight, uint32_t *pNativeFormat, ETextureType *pAPIType, EColorSpace *pColorSpace, VRTextureBounds_t *pTextureBounds );
-		EVROverlayError (__stdcall *ReleaseNativeOverlayHandle)( VROverlayHandle_t ulOverlayHandle, void *pNativeTextureHandle );
-		EVROverlayError (__stdcall *GetOverlayTextureSize)( VROverlayHandle_t ulOverlayHandle, uint32_t *pWidth, uint32_t *pHeight );
-		EVROverlayError (__stdcall *CreateDashboardOverlay)( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t *pThumbnailHandle );
-		bool (__stdcall *IsDashboardVisible)();
-		bool (__stdcall *IsActiveDashboardOverlay)( VROverlayHandle_t ulOverlayHandle );
-		EVROverlayError (__stdcall *SetDashboardOverlaySceneProcess)( VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId );
-		EVROverlayError (__stdcall *GetDashboardOverlaySceneProcess)( VROverlayHandle_t ulOverlayHandle, uint32_t *punProcessId );
-		void (__stdcall *ShowDashboard)( const char *pchOverlayToShow );
-		vr::TrackedDeviceIndex_t (__stdcall *GetPrimaryDashboardDevice)();
-		EVROverlayError (__stdcall *ShowKeyboard)( EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, bool bUseMinimalMode, uint64_t uUserValue );
-		EVROverlayError (__stdcall *ShowKeyboardForOverlay)( VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, bool bUseMinimalMode, uint64_t uUserValue );
-		uint32_t (__stdcall *GetKeyboardText)(  char *pchText, uint32_t cchText );
-		void (__stdcall *HideKeyboard)();
-		void (__stdcall *SetKeyboardTransformAbsolute)( ETrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToKeyboardTransform );
-		void (__stdcall *SetKeyboardPositionForOverlay)( VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect );
-		EVROverlayError (__stdcall *SetOverlayIntersectionMask)( VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionMaskPrimitive_t *pMaskPrimitives, uint32_t unNumMaskPrimitives, uint32_t unPrimitiveSize);
-		EVROverlayError (__stdcall *GetOverlayFlags)( VROverlayHandle_t ulOverlayHandle, uint32_t *pFlags );
-		VRMessageOverlayResponse (__stdcall *ShowMessageOverlay)( const char* pchText, const char* pchCaption, const char* pchButton0Text, const char* pchButton1Text, const char* pchButton2Text, const char* pchButton3Text);
-	};
-
-	class IVROverlay
-	{
-		VR_IVROverlay_FnTable _table;
-	public:
-
-		// ---------------------------------------------
-		// Overlay management methods
-		// ---------------------------------------------
-
-		/** Finds an existing overlay with the specified key. */
-		EVROverlayError FindOverlay( const char *pchOverlayKey, VROverlayHandle_t * pOverlayHandle ) { return _table.FindOverlay(pchOverlayKey, pOverlayHandle); }
-
-		/** Creates a new named overlay. All overlays start hidden and with default settings. */
-		EVROverlayError CreateOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pOverlayHandle ) { return _table.CreateOverlay(pchOverlayKey, pchOverlayFriendlyName, pOverlayHandle); }
-
-		/** Destroys the specified overlay. When an application calls VR_Shutdown all overlays created by that app are
-		* automatically destroyed. */
-		EVROverlayError DestroyOverlay( VROverlayHandle_t ulOverlayHandle ) { return _table.DestroyOverlay(ulOverlayHandle); }
-
-		/** Specify which overlay to use the high quality render path.  This overlay will be composited in during the distortion pass which
-		* results in it drawing on top of everything else, but also at a higher quality as it samples the source texture directly rather than
-		* rasterizing into each eye's render texture first.  Because if this, only one of these is supported at any given time.  It is most useful
-		* for overlays that are expected to take up most of the user's view (e.g. streaming video).
-		* This mode does not support mouse input to your overlay. */
-		EVROverlayError SetHighQualityOverlay( VROverlayHandle_t ulOverlayHandle ) { return _table.SetHighQualityOverlay(ulOverlayHandle); }
-
-		/** Returns the overlay handle of the current overlay being rendered using the single high quality overlay render path.
-		* Otherwise it will return k_ulOverlayHandleInvalid. */
-		vr::VROverlayHandle_t GetHighQualityOverlay() { return _table.GetHighQualityOverlay(); }
-
-		/** Fills the provided buffer with the string key of the overlay. Returns the size of buffer required to store the key, including
-		* the terminating null character. k_unVROverlayMaxKeyLength will be enough bytes to fit the string. */
-		uint32_t GetOverlayKey( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, EVROverlayError *pError = 0L ) { return _table.GetOverlayKey(ulOverlayHandle, pchValue, unBufferSize, pError); }
-
-		/** Fills the provided buffer with the friendly name of the overlay. Returns the size of buffer required to store the key, including
-		* the terminating null character. k_unVROverlayMaxNameLength will be enough bytes to fit the string. */
-		uint32_t GetOverlayName( VROverlayHandle_t ulOverlayHandle, VR_OUT_STRING() char *pchValue, uint32_t unBufferSize, EVROverlayError *pError = 0L ) { return _table.GetOverlayName(ulOverlayHandle, pchValue, unBufferSize, pError); }
-
-		/** Gets the raw image data from an overlay. Overlay image data is always returned as RGBA data, 4 bytes per pixel. If the buffer is not large enough, width and height 
-		* will be set and VROverlayError_ArrayTooSmall is returned. */
-		EVROverlayError GetOverlayImageData( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unBufferSize, uint32_t *punWidth, uint32_t *punHeight ) { return _table.GetOverlayImageData(ulOverlayHandle, pvBuffer, unBufferSize, punWidth, punHeight); }
-
-		/** returns a string that corresponds with the specified overlay error. The string will be the name 
-		* of the error enum value for all valid error codes */
-		const char *GetOverlayErrorNameFromEnum( EVROverlayError error ) { return _table.GetOverlayErrorNameFromEnum(error); }
-
-
-		// ---------------------------------------------
-		// Overlay rendering methods
-		// ---------------------------------------------
-
-		/** Sets the pid that is allowed to render to this overlay (the creator pid is always allow to render),
-		*	by default this is the pid of the process that made the overlay */
-		EVROverlayError SetOverlayRenderingPid( VROverlayHandle_t ulOverlayHandle, uint32_t unPID ) { return _table.SetOverlayRenderingPid(ulOverlayHandle, unPID); }
-
-		/** Gets the pid that is allowed to render to this overlay */
-		uint32_t GetOverlayRenderingPid( VROverlayHandle_t ulOverlayHandle ) { return _table.GetOverlayRenderingPid(ulOverlayHandle); }
-
-		/** Specify flag setting for a given overlay */
-		EVROverlayError SetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled ) { return _table.SetOverlayFlag(ulOverlayHandle, eOverlayFlag, bEnabled); }
-
-		/** Sets flag setting for a given overlay */
-		EVROverlayError GetOverlayFlag( VROverlayHandle_t ulOverlayHandle, VROverlayFlags eOverlayFlag, bool *pbEnabled ) { return _table.GetOverlayFlag(ulOverlayHandle, eOverlayFlag, pbEnabled); }
-
-		/** Sets the color tint of the overlay quad. Use 0.0 to 1.0 per channel. */
-		EVROverlayError SetOverlayColor( VROverlayHandle_t ulOverlayHandle, float fRed, float fGreen, float fBlue ) { return _table.SetOverlayColor(ulOverlayHandle, fRed, fGreen, fBlue); }
-
-		/** Gets the color tint of the overlay quad. */
-		EVROverlayError GetOverlayColor( VROverlayHandle_t ulOverlayHandle, float *pfRed, float *pfGreen, float *pfBlue ) { return _table.GetOverlayColor(ulOverlayHandle, pfRed, pfGreen, pfBlue); }
-
-		/** Sets the alpha of the overlay quad. Use 1.0 for 100 percent opacity to 0.0 for 0 percent opacity. */
-		EVROverlayError SetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float fAlpha ) { return _table.SetOverlayAlpha(ulOverlayHandle, fAlpha); }
-
-		/** Gets the alpha of the overlay quad. By default overlays are rendering at 100 percent alpha (1.0). */
-		EVROverlayError GetOverlayAlpha( VROverlayHandle_t ulOverlayHandle, float *pfAlpha ) { return _table.GetOverlayAlpha(ulOverlayHandle, pfAlpha); }
-
-		/** Sets the aspect ratio of the texels in the overlay. 1.0 means the texels are square. 2.0 means the texels
-		* are twice as wide as they are tall. Defaults to 1.0. */
-		EVROverlayError SetOverlayTexelAspect( VROverlayHandle_t ulOverlayHandle, float fTexelAspect ) { return _table.SetOverlayTexelAspect(ulOverlayHandle, fTexelAspect); }
-
-		/** Gets the aspect ratio of the texels in the overlay. Defaults to 1.0 */
-		EVROverlayError GetOverlayTexelAspect( VROverlayHandle_t ulOverlayHandle, float *pfTexelAspect ) { return _table.GetOverlayTexelAspect(ulOverlayHandle, pfTexelAspect); }
-
-		/** Sets the rendering sort order for the overlay. Overlays are rendered this order:
-		*      Overlays owned by the scene application
-		*      Overlays owned by some other application
-		*
-		*	Within a category overlays are rendered lowest sort order to highest sort order. Overlays with the same 
-		*	sort order are rendered back to front base on distance from the HMD.
-		*
-		*	Sort order defaults to 0. */
-		EVROverlayError SetOverlaySortOrder( VROverlayHandle_t ulOverlayHandle, uint32_t unSortOrder ) { return _table.SetOverlaySortOrder(ulOverlayHandle, unSortOrder); }
-
-		/** Gets the sort order of the overlay. See SetOverlaySortOrder for how this works. */
-		EVROverlayError GetOverlaySortOrder( VROverlayHandle_t ulOverlayHandle, uint32_t *punSortOrder ) { return _table.GetOverlaySortOrder(ulOverlayHandle, punSortOrder); }
-
-		/** Sets the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */
-		EVROverlayError SetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float fWidthInMeters ) { return _table.SetOverlayWidthInMeters(ulOverlayHandle, fWidthInMeters); }
-
-		/** Returns the width of the overlay quad in meters. By default overlays are rendered on a quad that is 1 meter across */
-		EVROverlayError GetOverlayWidthInMeters( VROverlayHandle_t ulOverlayHandle, float *pfWidthInMeters ) { return _table.GetOverlayWidthInMeters(ulOverlayHandle, pfWidthInMeters); }
-
-		/** For high-quality curved overlays only, sets the distance range in meters from the overlay used to automatically curve
-		* the surface around the viewer.  Min is distance is when the surface will be most curved.  Max is when least curved. */
-		EVROverlayError SetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters ) { return _table.SetOverlayAutoCurveDistanceRangeInMeters(ulOverlayHandle, fMinDistanceInMeters, fMaxDistanceInMeters); }
-
-		/** For high-quality curved overlays only, gets the distance range in meters from the overlay used to automatically curve
-		* the surface around the viewer.  Min is distance is when the surface will be most curved.  Max is when least curved. */
-		EVROverlayError GetOverlayAutoCurveDistanceRangeInMeters( VROverlayHandle_t ulOverlayHandle, float *pfMinDistanceInMeters, float *pfMaxDistanceInMeters ) { return _table.GetOverlayAutoCurveDistanceRangeInMeters(ulOverlayHandle, pfMinDistanceInMeters, pfMaxDistanceInMeters); }
-
-		/** Sets the colorspace the overlay texture's data is in.  Defaults to 'auto'.
-		* If the texture needs to be resolved, you should call SetOverlayTexture with the appropriate colorspace instead. */
-		EVROverlayError SetOverlayTextureColorSpace( VROverlayHandle_t ulOverlayHandle, EColorSpace eTextureColorSpace ) { return _table.SetOverlayTextureColorSpace(ulOverlayHandle, eTextureColorSpace); }
-
-		/** Gets the overlay's current colorspace setting. */
-		EVROverlayError GetOverlayTextureColorSpace( VROverlayHandle_t ulOverlayHandle, EColorSpace *peTextureColorSpace ) { return _table.GetOverlayTextureColorSpace(ulOverlayHandle, peTextureColorSpace); }
-
-		/** Sets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */
-		EVROverlayError SetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, const VRTextureBounds_t *pOverlayTextureBounds ) { return _table.SetOverlayTextureBounds(ulOverlayHandle, pOverlayTextureBounds); }
-
-		/** Gets the part of the texture to use for the overlay. UV Min is the upper left corner and UV Max is the lower right corner. */
-		EVROverlayError GetOverlayTextureBounds( VROverlayHandle_t ulOverlayHandle, VRTextureBounds_t *pOverlayTextureBounds ) { return _table.GetOverlayTextureBounds(ulOverlayHandle, pOverlayTextureBounds); }
-
-		/** Returns the transform type of this overlay. */
-		EVROverlayError GetOverlayTransformType( VROverlayHandle_t ulOverlayHandle, VROverlayTransformType *peTransformType ) { return _table.GetOverlayTransformType(ulOverlayHandle, peTransformType); }
-
-		/** Sets the transform to absolute tracking origin. */
-		EVROverlayError SetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) { return _table.SetOverlayTransformAbsolute(ulOverlayHandle, eTrackingOrigin, pmatTrackingOriginToOverlayTransform); }
-
-		/** Gets the transform if it is absolute. Returns an error if the transform is some other type. */
-		EVROverlayError GetOverlayTransformAbsolute( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin *peTrackingOrigin, HmdMatrix34_t *pmatTrackingOriginToOverlayTransform ) { return _table.GetOverlayTransformAbsolute(ulOverlayHandle, peTrackingOrigin, pmatTrackingOriginToOverlayTransform); }
-
-		/** Sets the transform to relative to the transform of the specified tracked device. */
-		EVROverlayError SetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unTrackedDevice, const HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) { return _table.SetOverlayTransformTrackedDeviceRelative(ulOverlayHandle, unTrackedDevice, pmatTrackedDeviceToOverlayTransform); }
-
-		/** Gets the transform if it is relative to a tracked device. Returns an error if the transform is some other type. */
-		EVROverlayError GetOverlayTransformTrackedDeviceRelative( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punTrackedDevice, HmdMatrix34_t *pmatTrackedDeviceToOverlayTransform ) { return _table.GetOverlayTransformTrackedDeviceRelative(ulOverlayHandle, punTrackedDevice, pmatTrackedDeviceToOverlayTransform); }
-
-		/** Sets the transform to draw the overlay on a rendermodel component mesh instead of a quad. This will only draw when the system is
-		* drawing the device. Overlays with this transform type cannot receive mouse events. */
-		EVROverlayError SetOverlayTransformTrackedDeviceComponent( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unDeviceIndex, const char *pchComponentName ) { return _table.SetOverlayTransformTrackedDeviceComponent(ulOverlayHandle, unDeviceIndex, pchComponentName); }
-
-		/** Gets the transform information when the overlay is rendering on a component. */
-		EVROverlayError GetOverlayTransformTrackedDeviceComponent( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t *punDeviceIndex, char *pchComponentName, uint32_t unComponentNameSize ) { return _table.GetOverlayTransformTrackedDeviceComponent(ulOverlayHandle, punDeviceIndex, pchComponentName, unComponentNameSize); }
-
-		/** Shows the VR overlay.  For dashboard overlays, only the Dashboard Manager is allowed to call this. */
-		EVROverlayError ShowOverlay( VROverlayHandle_t ulOverlayHandle ) { return _table.ShowOverlay(ulOverlayHandle); }
-
-		/** Hides the VR overlay.  For dashboard overlays, only the Dashboard Manager is allowed to call this. */
-		EVROverlayError HideOverlay( VROverlayHandle_t ulOverlayHandle ) { return _table.HideOverlay(ulOverlayHandle); }
-
-		/** Returns true if the overlay is visible. */
-		bool IsOverlayVisible( VROverlayHandle_t ulOverlayHandle ) { return _table.IsOverlayVisible(ulOverlayHandle); }
-
-		/** Get the transform in 3d space associated with a specific 2d point in the overlay's coordinate space (where 0,0 is the lower left). -Z points out of the overlay */
-		EVROverlayError GetTransformForOverlayCoordinates( VROverlayHandle_t ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, HmdMatrix34_t *pmatTransform ) { return _table.GetTransformForOverlayCoordinates(ulOverlayHandle, eTrackingOrigin, coordinatesInOverlay, pmatTransform); }
-
-		// ---------------------------------------------
-		// Overlay input methods
-		// ---------------------------------------------
-
-		/** Returns true and fills the event with the next event on the overlay's event queue, if there is one. 
-		* If there are no events this method returns false. uncbVREvent should be the size in bytes of the VREvent_t struct */
-		bool PollNextOverlayEvent( VROverlayHandle_t ulOverlayHandle, VREvent_t *pEvent, uint32_t uncbVREvent ) { return _table.PollNextOverlayEvent(ulOverlayHandle, pEvent, uncbVREvent); }
-
-		/** Returns the current input settings for the specified overlay. */
-		EVROverlayError GetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod *peInputMethod ) { return _table.GetOverlayInputMethod(ulOverlayHandle, peInputMethod); }
-
-		/** Sets the input settings for the specified overlay. */
-		EVROverlayError SetOverlayInputMethod( VROverlayHandle_t ulOverlayHandle, VROverlayInputMethod eInputMethod ) { return _table.SetOverlayInputMethod(ulOverlayHandle, eInputMethod); }
-
-		/** Gets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is
-		* typically the size of the underlying UI in pixels. */
-		EVROverlayError GetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, HmdVector2_t *pvecMouseScale ) { return _table.GetOverlayMouseScale(ulOverlayHandle, pvecMouseScale); }
-
-		/** Sets the mouse scaling factor that is used for mouse events. The actual texture may be a different size, but this is
-		* typically the size of the underlying UI in pixels (not in world space). */
-		EVROverlayError SetOverlayMouseScale( VROverlayHandle_t ulOverlayHandle, const HmdVector2_t *pvecMouseScale ) { return _table.SetOverlayMouseScale(ulOverlayHandle, pvecMouseScale); }
-
-		/** Computes the overlay-space pixel coordinates of where the ray intersects the overlay with the
-		* specified settings. Returns false if there is no intersection. */
-		bool ComputeOverlayIntersection( VROverlayHandle_t ulOverlayHandle, const VROverlayIntersectionParams_t *pParams, VROverlayIntersectionResults_t *pResults ) { return _table.ComputeOverlayIntersection(ulOverlayHandle, pParams, pResults); }
-
-		/** Processes mouse input from the specified controller as though it were a mouse pointed at a compositor overlay with the
-		* specified settings. The controller is treated like a laser pointer on the -z axis. The point where the laser pointer would
-		* intersect with the overlay is the mouse position, the trigger is left mouse, and the track pad is right mouse. 
-		*
-		* Return true if the controller is pointed at the overlay and an event was generated. */
-		bool HandleControllerOverlayInteractionAsMouse( VROverlayHandle_t ulOverlayHandle, TrackedDeviceIndex_t unControllerDeviceIndex ) { return _table.HandleControllerOverlayInteractionAsMouse(ulOverlayHandle, unControllerDeviceIndex); }
-
-		/** Returns true if the specified overlay is the hover target. An overlay is the hover target when it is the last overlay "moused over" 
-		* by the virtual mouse pointer */
-		bool IsHoverTargetOverlay( VROverlayHandle_t ulOverlayHandle ) { return _table.IsHoverTargetOverlay(ulOverlayHandle); }
-
-		/** Returns the current Gamepad focus overlay */
-		vr::VROverlayHandle_t GetGamepadFocusOverlay() { return _table.GetGamepadFocusOverlay(); }
-
-		/** Sets the current Gamepad focus overlay */
-		EVROverlayError SetGamepadFocusOverlay( VROverlayHandle_t ulNewFocusOverlay ) { return _table.SetGamepadFocusOverlay(ulNewFocusOverlay); }
-
-		/** Sets an overlay's neighbor. This will also set the neighbor of the "to" overlay
-		* to point back to the "from" overlay. If an overlay's neighbor is set to invalid both
-		* ends will be cleared */
-		EVROverlayError SetOverlayNeighbor( EOverlayDirection eDirection, VROverlayHandle_t ulFrom, VROverlayHandle_t ulTo ) { return _table.SetOverlayNeighbor(eDirection, ulFrom, ulTo); }
-
-		/** Changes the Gamepad focus from one overlay to one of its neighbors. Returns VROverlayError_NoNeighbor if there is no
-		* neighbor in that direction */
-		EVROverlayError MoveGamepadFocusToNeighbor( EOverlayDirection eDirection, VROverlayHandle_t ulFrom ) { return _table.MoveGamepadFocusToNeighbor(eDirection, ulFrom); }
-
-		// ---------------------------------------------
-		// Overlay texture methods
-		// ---------------------------------------------
-
-		/** Texture to draw for the overlay. This function can only be called by the overlay's creator or renderer process (see SetOverlayRenderingPid) .
-		*
-		* OpenGL dirty state:
-		*	glBindTexture
-		*/
-		EVROverlayError SetOverlayTexture( VROverlayHandle_t ulOverlayHandle, const Texture_t *pTexture ) { return _table.SetOverlayTexture(ulOverlayHandle, pTexture); }
-
-		/** Use this to tell the overlay system to release the texture set for this overlay. */
-		EVROverlayError ClearOverlayTexture( VROverlayHandle_t ulOverlayHandle ) { return _table.ClearOverlayTexture(ulOverlayHandle); }
-
-		/** Separate interface for providing the data as a stream of bytes, but there is an upper bound on data 
-		* that can be sent. This function can only be called by the overlay's renderer process. */
-		EVROverlayError SetOverlayRaw( VROverlayHandle_t ulOverlayHandle, void *pvBuffer, uint32_t unWidth, uint32_t unHeight, uint32_t unDepth ) { return _table.SetOverlayRaw(ulOverlayHandle, pvBuffer, unWidth, unHeight, unDepth); }
-
-		/** Separate interface for providing the image through a filename: can be png or jpg, and should not be bigger than 1920x1080.
-		* This function can only be called by the overlay's renderer process */
-		EVROverlayError SetOverlayFromFile( VROverlayHandle_t ulOverlayHandle, const char *pchFilePath ) { return _table.SetOverlayFromFile(ulOverlayHandle, pchFilePath); }
-
-		/** Get the native texture handle/device for an overlay you have created.
-		* On windows this handle will be a ID3D11ShaderResourceView with a ID3D11Texture2D bound.
-		*
-		* The texture will always be sized to match the backing texture you supplied in SetOverlayTexture above.
-		*
-		* You MUST call ReleaseNativeOverlayHandle() with pNativeTextureHandle once you are done with this texture.
-		*
-		* pNativeTextureHandle is an OUTPUT, it will be a pointer to a ID3D11ShaderResourceView *.
-		* pNativeTextureRef is an INPUT and should be a ID3D11Resource *. The device used by pNativeTextureRef will be used to bind pNativeTextureHandle.
-		*/
-		EVROverlayError GetOverlayTexture( VROverlayHandle_t ulOverlayHandle, void **pNativeTextureHandle, void *pNativeTextureRef, uint32_t *pWidth, uint32_t *pHeight, uint32_t *pNativeFormat, ETextureType *pAPIType, EColorSpace *pColorSpace, VRTextureBounds_t *pTextureBounds ) { return _table.GetOverlayTexture(ulOverlayHandle, pNativeTextureHandle, pNativeTextureRef, pWidth, pHeight, pNativeFormat, pAPIType, pColorSpace, pTextureBounds); }
-
-		/** Release the pNativeTextureHandle provided from the GetOverlayTexture call, this allows the system to free the underlying GPU resources for this object,
-		* so only do it once you stop rendering this texture.
-		*/
-		EVROverlayError ReleaseNativeOverlayHandle( VROverlayHandle_t ulOverlayHandle, void *pNativeTextureHandle ) { return _table.ReleaseNativeOverlayHandle(ulOverlayHandle, pNativeTextureHandle); }
-
-		/** Get the size of the overlay texture */
-		EVROverlayError GetOverlayTextureSize( VROverlayHandle_t ulOverlayHandle, uint32_t *pWidth, uint32_t *pHeight ) { return _table.GetOverlayTextureSize(ulOverlayHandle, pWidth, pHeight); }
-
-		// ----------------------------------------------
-		// Dashboard Overlay Methods
-		// ----------------------------------------------
-
-		/** Creates a dashboard overlay and returns its handle */
-		EVROverlayError CreateDashboardOverlay( const char *pchOverlayKey, const char *pchOverlayFriendlyName, VROverlayHandle_t * pMainHandle, VROverlayHandle_t *pThumbnailHandle ) { return _table.CreateDashboardOverlay(pchOverlayKey, pchOverlayFriendlyName, pMainHandle, pThumbnailHandle); }
-
-		/** Returns true if the dashboard is visible */
-		bool IsDashboardVisible() { return _table.IsDashboardVisible(); }
-
-		/** returns true if the dashboard is visible and the specified overlay is the active system Overlay */
-		bool IsActiveDashboardOverlay( VROverlayHandle_t ulOverlayHandle ) { return _table.IsActiveDashboardOverlay(ulOverlayHandle); }
-
-		/** Sets the dashboard overlay to only appear when the specified process ID has scene focus */
-		EVROverlayError SetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t unProcessId ) { return _table.SetDashboardOverlaySceneProcess(ulOverlayHandle, unProcessId); }
-
-		/** Gets the process ID that this dashboard overlay requires to have scene focus */
-		EVROverlayError GetDashboardOverlaySceneProcess( VROverlayHandle_t ulOverlayHandle, uint32_t *punProcessId ) { return _table.GetDashboardOverlaySceneProcess(ulOverlayHandle, punProcessId); }
-
-		/** Shows the dashboard. */
-		void ShowDashboard( const char *pchOverlayToShow ) { _table.ShowDashboard(pchOverlayToShow); }
-
-		/** Returns the tracked device that has the laser pointer in the dashboard */
-		vr::TrackedDeviceIndex_t GetPrimaryDashboardDevice() { return _table.GetPrimaryDashboardDevice(); }
-
-		// ---------------------------------------------
-		// Keyboard methods
-		// ---------------------------------------------
-		
-		/** Show the virtual keyboard to accept input **/
-		EVROverlayError ShowKeyboard( EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, bool bUseMinimalMode, uint64_t uUserValue ) { return _table.ShowKeyboard(eInputMode, eLineInputMode, pchDescription, unCharMax, pchExistingText, bUseMinimalMode, uUserValue); }
-
-		EVROverlayError ShowKeyboardForOverlay( VROverlayHandle_t ulOverlayHandle, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, const char *pchDescription, uint32_t unCharMax, const char *pchExistingText, bool bUseMinimalMode, uint64_t uUserValue ) { return _table.ShowKeyboardForOverlay(ulOverlayHandle, eInputMode, eLineInputMode, pchDescription, unCharMax, pchExistingText, bUseMinimalMode, uUserValue); }
-
-		/** Get the text that was entered into the text input **/
-		uint32_t GetKeyboardText( VR_OUT_STRING() char *pchText, uint32_t cchText ) { return _table.GetKeyboardText(pchText, cchText); }
-
-		/** Hide the virtual keyboard **/
-		void HideKeyboard() { _table.HideKeyboard(); }
-
-		/** Set the position of the keyboard in world space **/
-		void SetKeyboardTransformAbsolute( ETrackingUniverseOrigin eTrackingOrigin, const HmdMatrix34_t *pmatTrackingOriginToKeyboardTransform ) { _table.SetKeyboardTransformAbsolute(eTrackingOrigin, pmatTrackingOriginToKeyboardTransform); }
-
-		/** Set the position of the keyboard in overlay space by telling it to avoid a rectangle in the overlay. Rectangle coords have (0,0) in the bottom left **/
-		void SetKeyboardPositionForOverlay( VROverlayHandle_t ulOverlayHandle, HmdRect2_t avoidRect ) { _table.SetKeyboardPositionForOverlay(ulOverlayHandle, avoidRect); }
-
-		// ---------------------------------------------
-		// Overlay input methods
-		// ---------------------------------------------
-
-		/** Sets a list of primitives to be used for controller ray intersection
-		* typically the size of the underlying UI in pixels (not in world space). */
-		EVROverlayError SetOverlayIntersectionMask( VROverlayHandle_t ulOverlayHandle, VROverlayIntersectionMaskPrimitive_t *pMaskPrimitives, uint32_t unNumMaskPrimitives, uint32_t unPrimitiveSize = sizeof( VROverlayIntersectionMaskPrimitive_t ) ) { return _table.SetOverlayIntersectionMask(ulOverlayHandle, pMaskPrimitives, unNumMaskPrimitives, unPrimitiveSize); }
-
-		EVROverlayError GetOverlayFlags( VROverlayHandle_t ulOverlayHandle, uint32_t *pFlags ) { return _table.GetOverlayFlags(ulOverlayHandle, pFlags); }
-
-		// ---------------------------------------------
-		// Message box methods
-		// ---------------------------------------------
-
-		/** Show the message overlay. This will block and return you a result. **/
-		VRMessageOverlayResponse ShowMessageOverlay( const char* pchText, const char* pchCaption, const char* pchButton0Text, const char* pchButton1Text = nullptr, const char* pchButton2Text = nullptr, const char* pchButton3Text = nullptr ) { return _table.ShowMessageOverlay(pchText, pchCaption, pchButton0Text, pchButton1Text, pchButton2Text, pchButton3Text); }
-	};
-
-	static const char * const IVROverlay_Version = "FnTable:IVROverlay_014";
-
-} // namespace vr
-
-// ivrrendermodels.h
-namespace vr
-{
-
-static const char * const k_pch_Controller_Component_GDC2015 = "gdc2015";   // Canonical coordinate system of the gdc 2015 wired controller, provided for backwards compatibility
-static const char * const k_pch_Controller_Component_Base = "base";         // For controllers with an unambiguous 'base'.
-static const char * const k_pch_Controller_Component_Tip = "tip";           // For controllers with an unambiguous 'tip' (used for 'laser-pointing')
-static const char * const k_pch_Controller_Component_HandGrip = "handgrip"; // Neutral, ambidextrous hand-pose when holding controller. On plane between neutrally posed index finger and thumb
-static const char * const k_pch_Controller_Component_Status = "status";		// 1:1 aspect ratio status area, with canonical [0,1] uv mapping
-
-#if defined(__linux__) || defined(__APPLE__) 
-// The 32-bit version of gcc has the alignment requirement for uint64 and double set to
-// 4 meaning that even with #pragma pack(8) these types will only be four-byte aligned.
-// The 64-bit version of gcc has the alignment requirement for these types set to
-// 8 meaning that unless we use #pragma pack(4) our structures will get bigger.
-// The 64-bit structure packing has to match the 32-bit structure packing for each platform.
-#pragma pack( push, 4 )
-#else
-#pragma pack( push, 8 )
-#endif
-
-/** Errors that can occur with the VR compositor */
-enum EVRRenderModelError
-{
-	VRRenderModelError_None = 0,
-	VRRenderModelError_Loading = 100,
-	VRRenderModelError_NotSupported = 200,
-	VRRenderModelError_InvalidArg = 300,
-	VRRenderModelError_InvalidModel = 301,
-	VRRenderModelError_NoShapes = 302,
-	VRRenderModelError_MultipleShapes = 303,
-	VRRenderModelError_TooManyVertices = 304,
-	VRRenderModelError_MultipleTextures = 305,
-	VRRenderModelError_BufferTooSmall = 306,
-	VRRenderModelError_NotEnoughNormals = 307,
-	VRRenderModelError_NotEnoughTexCoords = 308,
-
-	VRRenderModelError_InvalidTexture = 400,
-};
-
-typedef uint32_t VRComponentProperties;
-
-enum EVRComponentProperty
-{
-	VRComponentProperty_IsStatic = (1 << 0),
-	VRComponentProperty_IsVisible = (1 << 1),
-	VRComponentProperty_IsTouched = (1 << 2),
-	VRComponentProperty_IsPressed = (1 << 3),
-	VRComponentProperty_IsScrolled = (1 << 4),
-};
-
-/** Describes state information about a render-model component, including transforms and other dynamic properties */
-struct RenderModel_ComponentState_t
-{
-	HmdMatrix34_t mTrackingToComponentRenderModel;  // Transform required when drawing the component render model
-	HmdMatrix34_t mTrackingToComponentLocal;        // Transform available for attaching to a local component coordinate system (-Z out from surface )
-	VRComponentProperties uProperties;
-};
-
-/** A single vertex in a render model */
-struct RenderModel_Vertex_t
-{
-	HmdVector3_t vPosition;		// position in meters in device space
-	HmdVector3_t vNormal;
-	float rfTextureCoord[2];
-};
-
-/** A texture map for use on a render model */
-struct RenderModel_TextureMap_t
-{
-	uint16_t unWidth, unHeight; // width and height of the texture map in pixels
-	const uint8_t *rubTextureMapData;	// Map texture data. All textures are RGBA with 8 bits per channel per pixel. Data size is width * height * 4ub
-};
-
-/**  Session unique texture identifier. Rendermodels which share the same texture will have the same id.
-IDs <0 denote the texture is not present */
-
-typedef int32_t TextureID_t;
-
-const TextureID_t INVALID_TEXTURE_ID = -1;
-
-struct RenderModel_t
-{
-	const RenderModel_Vertex_t *rVertexData;	// Vertex data for the mesh
-	uint32_t unVertexCount;						// Number of vertices in the vertex data
-	const uint16_t *rIndexData;					// Indices into the vertex data for each triangle
-	uint32_t unTriangleCount;					// Number of triangles in the mesh. Index count is 3 * TriangleCount
-	TextureID_t diffuseTextureId;				// Session unique texture identifier. Rendermodels which share the same texture will have the same id. <0 == texture not present
-};
-
-struct RenderModel_ControllerMode_State_t
-{
-	bool bScrollWheelVisible; // is this controller currently set to be in a scroll wheel mode
-};
-
-#pragma pack( pop )
-
-struct VR_IVRRenderModels_FnTable
-{
-	EVRRenderModelError (__stdcall *LoadRenderModel_Async)( const char *pchRenderModelName, RenderModel_t **ppRenderModel );
-	void (__stdcall *FreeRenderModel)( RenderModel_t *pRenderModel );
-	EVRRenderModelError (__stdcall *LoadTexture_Async)( TextureID_t textureId, RenderModel_TextureMap_t **ppTexture );
-	void (__stdcall *FreeTexture)( RenderModel_TextureMap_t *pTexture );
-	EVRRenderModelError (__stdcall *LoadTextureD3D11_Async)( TextureID_t textureId, void *pD3D11Device, void **ppD3D11Texture2D );
-	EVRRenderModelError (__stdcall *LoadIntoTextureD3D11_Async)( TextureID_t textureId, void *pDstTexture );
-	void (__stdcall *FreeTextureD3D11)( void *pD3D11Texture2D );
-	uint32_t (__stdcall *GetRenderModelName)( uint32_t unRenderModelIndex,  char *pchRenderModelName, uint32_t unRenderModelNameLen );
-	uint32_t (__stdcall *GetRenderModelCount)();
-	uint32_t (__stdcall *GetComponentCount)( const char *pchRenderModelName );
-	uint32_t (__stdcall *GetComponentName)( const char *pchRenderModelName, uint32_t unComponentIndex,  char *pchComponentName, uint32_t unComponentNameLen );
-	uint64_t (__stdcall *GetComponentButtonMask)( const char *pchRenderModelName, const char *pchComponentName );
-	uint32_t (__stdcall *GetComponentRenderModelName)( const char *pchRenderModelName, const char *pchComponentName,  char *pchComponentRenderModelName, uint32_t unComponentRenderModelNameLen );
-	bool (__stdcall *GetComponentState)( const char *pchRenderModelName, const char *pchComponentName, const vr::VRControllerState_t *pControllerState, const RenderModel_ControllerMode_State_t *pState, RenderModel_ComponentState_t *pComponentState );
-	bool (__stdcall *RenderModelHasComponent)( const char *pchRenderModelName, const char *pchComponentName );
-	uint32_t (__stdcall *GetRenderModelThumbnailURL)( const char *pchRenderModelName,  char *pchThumbnailURL, uint32_t unThumbnailURLLen, vr::EVRRenderModelError *peError );
-	uint32_t (__stdcall *GetRenderModelOriginalPath)( const char *pchRenderModelName,  char *pchOriginalPath, uint32_t unOriginalPathLen, vr::EVRRenderModelError *peError );
-	const char *(__stdcall *GetRenderModelErrorNameFromEnum)( vr::EVRRenderModelError error );
-};
-
-class IVRRenderModels
-{
-	VR_IVRRenderModels_FnTable _table;
-public:
-
-	/** Loads and returns a render model for use in the application. pchRenderModelName should be a render model name
-	* from the Prop_RenderModelName_String property or an absolute path name to a render model on disk. 
-	*
-	* The resulting render model is valid until VR_Shutdown() is called or until FreeRenderModel() is called. When the 
-	* application is finished with the render model it should call FreeRenderModel() to free the memory associated
-	* with the model.
-	*
-	* The method returns VRRenderModelError_Loading while the render model is still being loaded.
-	* The method returns VRRenderModelError_None once loaded successfully, otherwise will return an error. */
-	EVRRenderModelError LoadRenderModel_Async( const char *pchRenderModelName, RenderModel_t **ppRenderModel ) { return _table.LoadRenderModel_Async(pchRenderModelName, ppRenderModel); }
-
-	/** Frees a previously returned render model
-	*   It is safe to call this on a null ptr. */
-	void FreeRenderModel( RenderModel_t *pRenderModel ) { _table.FreeRenderModel(pRenderModel); }
-
-	/** Loads and returns a texture for use in the application. */
-	EVRRenderModelError LoadTexture_Async( TextureID_t textureId, RenderModel_TextureMap_t **ppTexture ) { return _table.LoadTexture_Async(textureId, ppTexture); }
-
-	/** Frees a previously returned texture
-	*   It is safe to call this on a null ptr. */
-	void FreeTexture( RenderModel_TextureMap_t *pTexture ) { _table.FreeTexture(pTexture); }
-
-	/** Creates a D3D11 texture and loads data into it. */
-	EVRRenderModelError LoadTextureD3D11_Async( TextureID_t textureId, void *pD3D11Device, void **ppD3D11Texture2D ) { return _table.LoadTextureD3D11_Async(textureId, pD3D11Device, ppD3D11Texture2D); }
-
-	/** Helper function to copy the bits into an existing texture. */
-	EVRRenderModelError LoadIntoTextureD3D11_Async( TextureID_t textureId, void *pDstTexture ) { return _table.LoadIntoTextureD3D11_Async(textureId, pDstTexture); }
-
-	/** Use this to free textures created with LoadTextureD3D11_Async instead of calling Release on them. */
-	void FreeTextureD3D11( void *pD3D11Texture2D ) { _table.FreeTextureD3D11(pD3D11Texture2D); }
-
-	/** Use this to get the names of available render models.  Index does not correlate to a tracked device index, but
-	* is only used for iterating over all available render models.  If the index is out of range, this function will return 0.
-	* Otherwise, it will return the size of the buffer required for the name. */
-	uint32_t GetRenderModelName( uint32_t unRenderModelIndex, VR_OUT_STRING() char *pchRenderModelName, uint32_t unRenderModelNameLen ) { return _table.GetRenderModelName(unRenderModelIndex, pchRenderModelName, unRenderModelNameLen); }
-
-	/** Returns the number of available render models. */
-	uint32_t GetRenderModelCount() { return _table.GetRenderModelCount(); }
-
-
-	/** Returns the number of components of the specified render model.
-	*  Components are useful when client application wish to draw, label, or otherwise interact with components of tracked objects.
-	*  Examples controller components:
-	*   renderable things such as triggers, buttons
-	*   non-renderable things which include coordinate systems such as 'tip', 'base', a neutral controller agnostic hand-pose
-	*   If all controller components are enumerated and rendered, it will be equivalent to drawing the traditional render model
-	*   Returns 0 if components not supported, >0 otherwise */
-	uint32_t GetComponentCount( const char *pchRenderModelName ) { return _table.GetComponentCount(pchRenderModelName); }
-
-	/** Use this to get the names of available components.  Index does not correlate to a tracked device index, but
-	* is only used for iterating over all available components.  If the index is out of range, this function will return 0.
-	* Otherwise, it will return the size of the buffer required for the name. */
-	uint32_t GetComponentName( const char *pchRenderModelName, uint32_t unComponentIndex, VR_OUT_STRING( ) char *pchComponentName, uint32_t unComponentNameLen ) { return _table.GetComponentName(pchRenderModelName, unComponentIndex, pchComponentName, unComponentNameLen); }
-
-	/** Get the button mask for all buttons associated with this component
-	*   If no buttons (or axes) are associated with this component, return 0
-	*   Note: multiple components may be associated with the same button. Ex: two grip buttons on a single controller.
-	*   Note: A single component may be associated with multiple buttons. Ex: A trackpad which also provides "D-pad" functionality */
-	uint64_t GetComponentButtonMask( const char *pchRenderModelName, const char *pchComponentName ) { return _table.GetComponentButtonMask(pchRenderModelName, pchComponentName); }
-
-	/** Use this to get the render model name for the specified rendermode/component combination, to be passed to LoadRenderModel.
-	* If the component name is out of range, this function will return 0.
-	* Otherwise, it will return the size of the buffer required for the name. */
-	uint32_t GetComponentRenderModelName( const char *pchRenderModelName, const char *pchComponentName, VR_OUT_STRING( ) char *pchComponentRenderModelName, uint32_t unComponentRenderModelNameLen ) { return _table.GetComponentRenderModelName(pchRenderModelName, pchComponentName, pchComponentRenderModelName, unComponentRenderModelNameLen); }
-
-	/** Use this to query information about the component, as a function of the controller state.
-	*
-	* For dynamic controller components (ex: trigger) values will reflect component motions
-	* For static components this will return a consistent value independent of the VRControllerState_t
-	*
-	* If the pchRenderModelName or pchComponentName is invalid, this will return false (and transforms will be set to identity).
-	* Otherwise, return true
-	* Note: For dynamic objects, visibility may be dynamic. (I.e., true/false will be returned based on controller state and controller mode state ) */
-	bool GetComponentState( const char *pchRenderModelName, const char *pchComponentName, const vr::VRControllerState_t *pControllerState, const RenderModel_ControllerMode_State_t *pState, RenderModel_ComponentState_t *pComponentState ) { return _table.GetComponentState(pchRenderModelName, pchComponentName, pControllerState, pState, pComponentState); }
-
-	/** Returns true if the render model has a component with the specified name */
-	bool RenderModelHasComponent( const char *pchRenderModelName, const char *pchComponentName ) { return _table.RenderModelHasComponent(pchRenderModelName, pchComponentName); }
-
-	/** Returns the URL of the thumbnail image for this rendermodel */
-	uint32_t GetRenderModelThumbnailURL( const char *pchRenderModelName, VR_OUT_STRING() char *pchThumbnailURL, uint32_t unThumbnailURLLen, vr::EVRRenderModelError *peError ) { return _table.GetRenderModelThumbnailURL(pchRenderModelName, pchThumbnailURL, unThumbnailURLLen, peError); }
-
-	/** Provides a render model path that will load the unskinned model if the model name provided has been replace by the user. If the model
-	* hasn't been replaced the path value will still be a valid path to load the model. Pass this to LoadRenderModel_Async, etc. to load the
-	* model. */
-	uint32_t GetRenderModelOriginalPath( const char *pchRenderModelName, VR_OUT_STRING() char *pchOriginalPath, uint32_t unOriginalPathLen, vr::EVRRenderModelError *peError ) { return _table.GetRenderModelOriginalPath(pchRenderModelName, pchOriginalPath, unOriginalPathLen, peError); }
-
-	/** Returns a string for a render model error */
-	const char *GetRenderModelErrorNameFromEnum( vr::EVRRenderModelError error ) { return _table.GetRenderModelErrorNameFromEnum(error); }
-};
-
-static const char * const IVRRenderModels_Version = "FnTable:IVRRenderModels_005";
-
-}
-
-
-// ivrextendeddisplay.h
-namespace vr
-{
-
-	/** NOTE: Use of this interface is not recommended in production applications. It will not work for displays which use
-	* direct-to-display mode. Creating our own window is also incompatible with the VR compositor and is not available when the compositor is running. */
-	struct VR_IVRExtendedDisplay_FnTable
-	{
-		void (__stdcall *GetWindowBounds)( int32_t *pnX, int32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight );
-		void (__stdcall *GetEyeOutputViewport)( EVREye eEye, uint32_t *pnX, uint32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight );
-		void (__stdcall *GetDXGIOutputInfo)( int32_t *pnAdapterIndex, int32_t *pnAdapterOutputIndex );
-	};
-
-	class IVRExtendedDisplay
-	{
-		VR_IVRExtendedDisplay_FnTable _table;
-	public:
-
-		/** Size and position that the window needs to be on the VR display. */
-		void GetWindowBounds( int32_t *pnX, int32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) { _table.GetWindowBounds(pnX, pnY, pnWidth, pnHeight); }
-
-		/** Gets the viewport in the frame buffer to draw the output of the distortion into */
-		void GetEyeOutputViewport( EVREye eEye, uint32_t *pnX, uint32_t *pnY, uint32_t *pnWidth, uint32_t *pnHeight ) { _table.GetEyeOutputViewport(eEye, pnX, pnY, pnWidth, pnHeight); }
-
-		/** [D3D10/11 Only]
-		* Returns the adapter index and output index that the user should pass into EnumAdapters and EnumOutputs
-		* to create the device and swap chain in DX10 and DX11. If an error occurs both indices will be set to -1.
-		*/
-		void GetDXGIOutputInfo( int32_t *pnAdapterIndex, int32_t *pnAdapterOutputIndex ) { _table.GetDXGIOutputInfo(pnAdapterIndex, pnAdapterOutputIndex); }
-
-	};
-
-	static const char * const IVRExtendedDisplay_Version = "FnTable:IVRExtendedDisplay_001";
-
-}
-
-
-// ivrtrackedcamera.h
-namespace vr
-{
-
-struct VR_IVRTrackedCamera_FnTable
-{
-	const char *(__stdcall *GetCameraErrorNameFromEnum)( vr::EVRTrackedCameraError eCameraError );
-	vr::EVRTrackedCameraError (__stdcall *HasCamera)( vr::TrackedDeviceIndex_t nDeviceIndex, bool *pHasCamera );
-	vr::EVRTrackedCameraError (__stdcall *GetCameraFrameSize)( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, uint32_t *pnWidth, uint32_t *pnHeight, uint32_t *pnFrameBufferSize );
-	vr::EVRTrackedCameraError (__stdcall *GetCameraIntrinsics)( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, vr::HmdVector2_t *pFocalLength, vr::HmdVector2_t *pCenter );
-	vr::EVRTrackedCameraError (__stdcall *GetCameraProjection)( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, float flZNear, float flZFar, vr::HmdMatrix44_t *pProjection );
-	vr::EVRTrackedCameraError (__stdcall *AcquireVideoStreamingService)( vr::TrackedDeviceIndex_t nDeviceIndex, vr::TrackedCameraHandle_t *pHandle );
-	vr::EVRTrackedCameraError (__stdcall *ReleaseVideoStreamingService)( vr::TrackedCameraHandle_t hTrackedCamera );
-	vr::EVRTrackedCameraError (__stdcall *GetVideoStreamFrameBuffer)( vr::TrackedCameraHandle_t hTrackedCamera, vr::EVRTrackedCameraFrameType eFrameType, void *pFrameBuffer, uint32_t nFrameBufferSize, vr::CameraVideoStreamFrameHeader_t *pFrameHeader, uint32_t nFrameHeaderSize );
-	vr::EVRTrackedCameraError (__stdcall *GetVideoStreamTextureSize)( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, vr::VRTextureBounds_t *pTextureBounds, uint32_t *pnWidth, uint32_t *pnHeight );
-	vr::EVRTrackedCameraError (__stdcall *GetVideoStreamTextureD3D11)( vr::TrackedCameraHandle_t hTrackedCamera, vr::EVRTrackedCameraFrameType eFrameType, void *pD3D11DeviceOrResource, void **ppD3D11ShaderResourceView, vr::CameraVideoStreamFrameHeader_t *pFrameHeader, uint32_t nFrameHeaderSize );
-	vr::EVRTrackedCameraError (__stdcall *GetVideoStreamTextureGL)( vr::TrackedCameraHandle_t hTrackedCamera, vr::EVRTrackedCameraFrameType eFrameType, vr::glUInt_t *pglTextureId, vr::CameraVideoStreamFrameHeader_t *pFrameHeader, uint32_t nFrameHeaderSize );
-	vr::EVRTrackedCameraError (__stdcall *ReleaseVideoStreamTextureGL)( vr::TrackedCameraHandle_t hTrackedCamera, vr::glUInt_t glTextureId );
-};
-
-class IVRTrackedCamera
-{
-	VR_IVRTrackedCamera_FnTable _table;
-public:
-	/** Returns a string for an error */
-	const char *GetCameraErrorNameFromEnum( vr::EVRTrackedCameraError eCameraError ) { return _table.GetCameraErrorNameFromEnum(eCameraError); }
-
-	/** For convenience, same as tracked property request Prop_HasCamera_Bool */
-	vr::EVRTrackedCameraError HasCamera( vr::TrackedDeviceIndex_t nDeviceIndex, bool *pHasCamera ) { return _table.HasCamera(nDeviceIndex, pHasCamera); }
-
-	/** Gets size of the image frame. */
-	vr::EVRTrackedCameraError GetCameraFrameSize( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, uint32_t *pnWidth, uint32_t *pnHeight, uint32_t *pnFrameBufferSize ) { return _table.GetCameraFrameSize(nDeviceIndex, eFrameType, pnWidth, pnHeight, pnFrameBufferSize); }
-
-	vr::EVRTrackedCameraError GetCameraIntrinsics( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, vr::HmdVector2_t *pFocalLength, vr::HmdVector2_t *pCenter ) { return _table.GetCameraIntrinsics(nDeviceIndex, eFrameType, pFocalLength, pCenter); }
-
-	vr::EVRTrackedCameraError GetCameraProjection( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, float flZNear, float flZFar, vr::HmdMatrix44_t *pProjection ) { return _table.GetCameraProjection(nDeviceIndex, eFrameType, flZNear, flZFar, pProjection); }
-
-	/** Acquiring streaming service permits video streaming for the caller. Releasing hints the system that video services do not need to be maintained for this client.
-	* If the camera has not already been activated, a one time spin up may incur some auto exposure as well as initial streaming frame delays.
-	* The camera should be considered a global resource accessible for shared consumption but not exclusive to any caller.
-	* The camera may go inactive due to lack of active consumers or headset idleness. */
-	vr::EVRTrackedCameraError AcquireVideoStreamingService( vr::TrackedDeviceIndex_t nDeviceIndex, vr::TrackedCameraHandle_t *pHandle ) { return _table.AcquireVideoStreamingService(nDeviceIndex, pHandle); }
-	vr::EVRTrackedCameraError ReleaseVideoStreamingService( vr::TrackedCameraHandle_t hTrackedCamera ) { return _table.ReleaseVideoStreamingService(hTrackedCamera); }
-
-	/** Copies the image frame into a caller's provided buffer. The image data is currently provided as RGBA data, 4 bytes per pixel.
-	* A caller can provide null for the framebuffer or frameheader if not desired. Requesting the frame header first, followed by the frame buffer allows
-	* the caller to determine if the frame as advanced per the frame header sequence. 
-	* If there is no frame available yet, due to initial camera spinup or re-activation, the error will be VRTrackedCameraError_NoFrameAvailable.
-	* Ideally a caller should be polling at ~16ms intervals */
-	vr::EVRTrackedCameraError GetVideoStreamFrameBuffer( vr::TrackedCameraHandle_t hTrackedCamera, vr::EVRTrackedCameraFrameType eFrameType, void *pFrameBuffer, uint32_t nFrameBufferSize, vr::CameraVideoStreamFrameHeader_t *pFrameHeader, uint32_t nFrameHeaderSize ) { return _table.GetVideoStreamFrameBuffer(hTrackedCamera, eFrameType, pFrameBuffer, nFrameBufferSize, pFrameHeader, nFrameHeaderSize); }
-
-	/** Gets size of the image frame. */
-	vr::EVRTrackedCameraError GetVideoStreamTextureSize( vr::TrackedDeviceIndex_t nDeviceIndex, vr::EVRTrackedCameraFrameType eFrameType, vr::VRTextureBounds_t *pTextureBounds, uint32_t *pnWidth, uint32_t *pnHeight ) { return _table.GetVideoStreamTextureSize(nDeviceIndex, eFrameType, pTextureBounds, pnWidth, pnHeight); }
-
-	/** Access a shared D3D11 texture for the specified tracked camera stream.
-	* The camera frame type VRTrackedCameraFrameType_Undistorted is not supported directly as a shared texture. It is an interior subregion of the shared texture VRTrackedCameraFrameType_MaximumUndistorted.
-	* Instead, use GetVideoStreamTextureSize() with VRTrackedCameraFrameType_Undistorted to determine the proper interior subregion bounds along with GetVideoStreamTextureD3D11() with
-	* VRTrackedCameraFrameType_MaximumUndistorted to provide the texture. The VRTrackedCameraFrameType_MaximumUndistorted will yield an image where the invalid regions are decoded
-	* by the alpha channel having a zero component. The valid regions all have a non-zero alpha component. The subregion as described by VRTrackedCameraFrameType_Undistorted 
-	* guarantees a rectangle where all pixels are valid. */
-	vr::EVRTrackedCameraError GetVideoStreamTextureD3D11( vr::TrackedCameraHandle_t hTrackedCamera, vr::EVRTrackedCameraFrameType eFrameType, void *pD3D11DeviceOrResource, void **ppD3D11ShaderResourceView, vr::CameraVideoStreamFrameHeader_t *pFrameHeader, uint32_t nFrameHeaderSize ) { return _table.GetVideoStreamTextureD3D11(hTrackedCamera, eFrameType, pD3D11DeviceOrResource, ppD3D11ShaderResourceView, pFrameHeader, nFrameHeaderSize); }
-
-	/** Access a shared GL texture for the specified tracked camera stream */
-	vr::EVRTrackedCameraError GetVideoStreamTextureGL( vr::TrackedCameraHandle_t hTrackedCamera, vr::EVRTrackedCameraFrameType eFrameType, vr::glUInt_t *pglTextureId, vr::CameraVideoStreamFrameHeader_t *pFrameHeader, uint32_t nFrameHeaderSize ) { return _table.GetVideoStreamTextureGL(hTrackedCamera, eFrameType, pglTextureId, pFrameHeader, nFrameHeaderSize); }
-	vr::EVRTrackedCameraError ReleaseVideoStreamTextureGL( vr::TrackedCameraHandle_t hTrackedCamera, vr::glUInt_t glTextureId ) { return _table.ReleaseVideoStreamTextureGL(hTrackedCamera, glTextureId); }
-};
-
-static const char * const IVRTrackedCamera_Version = "FnTable:IVRTrackedCamera_003";
-
-} // namespace vr
-
-
-// ivrscreenshots.h
-namespace vr
-{
-
-/** Errors that can occur with the VR compositor */
-enum EVRScreenshotError
-{
-	VRScreenshotError_None							= 0,
-	VRScreenshotError_RequestFailed					= 1,
-	VRScreenshotError_IncompatibleVersion			= 100,
-	VRScreenshotError_NotFound						= 101,
-	VRScreenshotError_BufferTooSmall				= 102,
-	VRScreenshotError_ScreenshotAlreadyInProgress	= 108,
-};
-
-/** Allows the application to generate screenshots */
-struct VR_IVRScreenshots_FnTable
-{
-	vr::EVRScreenshotError (__stdcall *RequestScreenshot)( vr::ScreenshotHandle_t *pOutScreenshotHandle, vr::EVRScreenshotType type, const char *pchPreviewFilename, const char *pchVRFilename );
-	vr::EVRScreenshotError (__stdcall *HookScreenshot)(  const vr::EVRScreenshotType *pSupportedTypes, int numTypes );
-	vr::EVRScreenshotType (__stdcall *GetScreenshotPropertyType)( vr::ScreenshotHandle_t screenshotHandle, vr::EVRScreenshotError *pError );
-	uint32_t (__stdcall *GetScreenshotPropertyFilename)( vr::ScreenshotHandle_t screenshotHandle, vr::EVRScreenshotPropertyFilenames filenameType,  char *pchFilename, uint32_t cchFilename, vr::EVRScreenshotError *pError );
-	vr::EVRScreenshotError (__stdcall *UpdateScreenshotProgress)( vr::ScreenshotHandle_t screenshotHandle, float flProgress );
-	vr::EVRScreenshotError (__stdcall *TakeStereoScreenshot)( vr::ScreenshotHandle_t *pOutScreenshotHandle, const char *pchPreviewFilename, const char *pchVRFilename );
-	vr::EVRScreenshotError (__stdcall *SubmitScreenshot)( vr::ScreenshotHandle_t screenshotHandle, vr::EVRScreenshotType type, const char *pchSourcePreviewFilename, const char *pchSourceVRFilename );
-};
-
-class IVRScreenshots
-{
-	VR_IVRScreenshots_FnTable _table;
-public:
-	/** Request a screenshot of the requested type.
-	 *  A request of the VRScreenshotType_Stereo type will always
-	 *  work. Other types will depend on the underlying application
-	 *  support.
-	 *  The first file name is for the preview image and should be a
-	 *  regular screenshot (ideally from the left eye). The second
-	 *  is the VR screenshot in the correct format. They should be
-	 *  in the same aspect ratio.  Formats per type:
-	 *  VRScreenshotType_Mono: the VR filename is ignored (can be
-	 *  nullptr), this is a normal flat single shot.
-	 *  VRScreenshotType_Stereo:  The VR image should be a
-	 *  side-by-side with the left eye image on the left.
-	 *  VRScreenshotType_Cubemap: The VR image should be six square
-	 *  images composited horizontally.
-	 *  VRScreenshotType_StereoPanorama: above/below with left eye
-	 *  panorama being the above image.  Image is typically square
-	 *  with the panorama being 2x horizontal.
-	 *  
-	 *  Note that the VR dashboard will call this function when
-	 *  the user presses the screenshot binding (currently System
-	 *  Button + Trigger).  If Steam is running, the destination
-	 *  file names will be in %TEMP% and will be copied into
-	 *  Steam's screenshot library for the running application
-	 *  once SubmitScreenshot() is called.
-	 *  If Steam is not running, the paths will be in the user's
-	 *  documents folder under Documents\SteamVR\Screenshots.
-	 *  Other VR applications can call this to initate a
-	 *  screenshot outside of user control.
-	 *  The destination file names do not need an extension,
-	 *  will be replaced with the correct one for the format
-	 *  which is currently .png. */
-	vr::EVRScreenshotError RequestScreenshot( vr::ScreenshotHandle_t *pOutScreenshotHandle, vr::EVRScreenshotType type, const char *pchPreviewFilename, const char *pchVRFilename ) { return _table.RequestScreenshot(pOutScreenshotHandle, type, pchPreviewFilename, pchVRFilename); }
-
-	/** Called by the running VR application to indicate that it
-	 *  wishes to be in charge of screenshots.  If the
-	 *  application does not call this, the Compositor will only
-	 *  support VRScreenshotType_Stereo screenshots that will be
-	 *  captured without notification to the running app.
-	 *  Once hooked your application will receive a
-	 *  VREvent_RequestScreenshot event when the user presses the
-	 *  buttons to take a screenshot. */
-	vr::EVRScreenshotError HookScreenshot( VR_ARRAY_COUNT( numTypes ) const vr::EVRScreenshotType *pSupportedTypes, int numTypes ) { return _table.HookScreenshot(pSupportedTypes, numTypes); }
-
-	/** When your application receives a
-	 *  VREvent_RequestScreenshot event, call these functions to get
-	 *  the details of the screenshot request. */
-	vr::EVRScreenshotType GetScreenshotPropertyType( vr::ScreenshotHandle_t screenshotHandle, vr::EVRScreenshotError *pError ) { return _table.GetScreenshotPropertyType(screenshotHandle, pError); }
-
-	/** Get the filename for the preview or vr image (see
-	 *  vr::EScreenshotPropertyFilenames).  The return value is
-	 *  the size of the string.   */
-	uint32_t GetScreenshotPropertyFilename( vr::ScreenshotHandle_t screenshotHandle, vr::EVRScreenshotPropertyFilenames filenameType, VR_OUT_STRING() char *pchFilename, uint32_t cchFilename, vr::EVRScreenshotError *pError ) { return _table.GetScreenshotPropertyFilename(screenshotHandle, filenameType, pchFilename, cchFilename, pError); }
-
-	/** Call this if the application is taking the screen shot
-	 *  will take more than a few ms processing. This will result
-	 *  in an overlay being presented that shows a completion
-	 *  bar. */
-	vr::EVRScreenshotError UpdateScreenshotProgress( vr::ScreenshotHandle_t screenshotHandle, float flProgress ) { return _table.UpdateScreenshotProgress(screenshotHandle, flProgress); }
-
-	/** Tells the compositor to take an internal screenshot of
-	 *  type VRScreenshotType_Stereo. It will take the current
-	 *  submitted scene textures of the running application and
-	 *  write them into the preview image and a side-by-side file
-	 *  for the VR image.
-	 *  This is similiar to request screenshot, but doesn't ever
-	 *  talk to the application, just takes the shot and submits. */
-	vr::EVRScreenshotError TakeStereoScreenshot( vr::ScreenshotHandle_t *pOutScreenshotHandle, const char *pchPreviewFilename, const char *pchVRFilename ) { return _table.TakeStereoScreenshot(pOutScreenshotHandle, pchPreviewFilename, pchVRFilename); }
-
-	/** Submit the completed screenshot.  If Steam is running
-	 *  this will call into the Steam client and upload the
-	 *  screenshot to the screenshots section of the library for
-	 *  the running application.  If Steam is not running, this
-	 *  function will display a notification to the user that the
-	 *  screenshot was taken. The paths should be full paths with
-	 *  extensions.
-	 *  File paths should be absolute including
-	 *  exntensions.
-	 *  screenshotHandle can be k_unScreenshotHandleInvalid if this
-	 *  was a new shot taking by the app to be saved and not
-	 *  initiated by a user (achievement earned or something) */
-	vr::EVRScreenshotError SubmitScreenshot( vr::ScreenshotHandle_t screenshotHandle, vr::EVRScreenshotType type, const char *pchSourcePreviewFilename, const char *pchSourceVRFilename ) { return _table.SubmitScreenshot(screenshotHandle, type, pchSourcePreviewFilename, pchSourceVRFilename); }
-};
-
-static const char * const IVRScreenshots_Version = "FnTable:IVRScreenshots_001";
-
-} // namespace vr
-
-
-
-// ivrresources.h
-namespace vr
-{
-
-struct VR_IVRResources_FnTable
-{
-	uint32_t (__stdcall *LoadSharedResource)( const char *pchResourceName, char *pchBuffer, uint32_t unBufferLen );
-	uint32_t (__stdcall *GetResourceFullPath)( const char *pchResourceName, const char *pchResourceTypeDirectory, char *pchPathBuffer, uint32_t unBufferLen );
-};
-
-class IVRResources
-{
-	VR_IVRResources_FnTable _table;
-public:
-
-	// ------------------------------------
-	// Shared Resource Methods
-	// ------------------------------------
-
-	/** Loads the specified resource into the provided buffer if large enough.
-	* Returns the size in bytes of the buffer required to hold the specified resource. */
-	uint32_t LoadSharedResource( const char *pchResourceName, char *pchBuffer, uint32_t unBufferLen ) { return _table.LoadSharedResource(pchResourceName, pchBuffer, unBufferLen); }
-
-	/** Provides the full path to the specified resource. Resource names can include named directories for
-	* drivers and other things, and this resolves all of those and returns the actual physical path. 
-	* pchResourceTypeDirectory is the subdirectory of resources to look in. */
-	uint32_t GetResourceFullPath( const char *pchResourceName, const char *pchResourceTypeDirectory, char *pchPathBuffer, uint32_t unBufferLen ) { return _table.GetResourceFullPath(pchResourceName, pchResourceTypeDirectory, pchPathBuffer, unBufferLen); }
-};
-
-static const char * const IVRResources_Version = "FnTable:IVRResources_001";
-
-
-}// End
-
-#endif // _OPENVR_API
-
-
-namespace vr
-{
-	/** Finds the active installation of the VR API and initializes it. The provided path must be absolute
-	* or relative to the current working directory. These are the local install versions of the equivalent
-	* functions in steamvr.h and will work without a local Steam install.
-	*
-	* This path is to the "root" of the VR API install. That's the directory with
-	* the "drivers" directory and a platform (i.e. "win32") directory in it, not the directory with the DLL itself.
-	*/
-	inline IVRSystem *VR_Init( EVRInitError *peError, EVRApplicationType eApplicationType );
-
-	/** unloads vrclient.dll. Any interface pointers from the interface are
-	* invalid after this point */
-	inline void VR_Shutdown();
-
-	/** Returns true if there is an HMD attached. This check is as lightweight as possible and
-	* can be called outside of VR_Init/VR_Shutdown. It should be used when an application wants
-	* to know if initializing VR is a possibility but isn't ready to take that step yet.
-	*/
-	VR_INTERFACE bool VR_CALLTYPE VR_IsHmdPresent();
-
-	/** Returns true if the OpenVR runtime is installed. */
-	VR_INTERFACE bool VR_CALLTYPE VR_IsRuntimeInstalled();
-
-	/** Returns where the OpenVR runtime is installed. */
-	VR_INTERFACE const char *VR_CALLTYPE VR_RuntimePath();
-
-	/** Returns the name of the enum value for an EVRInitError. This function may be called outside of VR_Init()/VR_Shutdown(). */
-	VR_INTERFACE const char *VR_CALLTYPE VR_GetVRInitErrorAsSymbol( EVRInitError error );
-
-	/** Returns an english string for an EVRInitError. Applications should call VR_GetVRInitErrorAsSymbol instead and
-	* use that as a key to look up their own localized error message. This function may be called outside of VR_Init()/VR_Shutdown(). */
-	VR_INTERFACE const char *VR_CALLTYPE VR_GetVRInitErrorAsEnglishDescription( EVRInitError error );
-
-	/** Returns the interface of the specified version. This method must be called after VR_Init. The
-	* pointer returned is valid until VR_Shutdown is called.
-	*/
-	VR_INTERFACE void *VR_CALLTYPE VR_GetGenericInterface( const char *pchInterfaceVersion, EVRInitError *peError );
-
-	/** Returns whether the interface of the specified version exists.
-	*/
-	VR_INTERFACE bool VR_CALLTYPE VR_IsInterfaceVersionValid( const char *pchInterfaceVersion );
-
-	/** Returns a token that represents whether the VR interface handles need to be reloaded */
-	VR_INTERFACE uint32_t VR_CALLTYPE VR_GetInitToken();
-
-	// These typedefs allow old enum names from SDK 0.9.11 to be used in applications.
-	// They will go away in the future.
-	typedef EVRInitError HmdError;
-	typedef EVREye Hmd_Eye;
-	typedef EColorSpace ColorSpace;
-	typedef ETrackingResult HmdTrackingResult;
-	typedef ETrackedDeviceClass TrackedDeviceClass;
-	typedef ETrackingUniverseOrigin TrackingUniverseOrigin;
-	typedef ETrackedDeviceProperty TrackedDeviceProperty;
-	typedef ETrackedPropertyError TrackedPropertyError;
-	typedef EVRSubmitFlags VRSubmitFlags_t;
-	typedef EVRState VRState_t;
-	typedef ECollisionBoundsStyle CollisionBoundsStyle_t;
-	typedef EVROverlayError VROverlayError;
-	typedef EVRFirmwareError VRFirmwareError;
-	typedef EVRCompositorError VRCompositorError;
-	typedef EVRScreenshotError VRScreenshotsError;
-
-	inline uint32_t &VRToken()
-	{
-		static uint32_t token;
-		return token;
-	}
-
-	class COpenVRContext
-	{
-	public:
-		COpenVRContext() { Clear(); }
-		void Clear();
-
-		inline void CheckClear()
-		{
-			if ( VRToken() != VR_GetInitToken() )
-			{
-				Clear();
-				VRToken() = VR_GetInitToken();
-			}
-		}
-
-		IVRSystem *VRSystem()
-		{
-			CheckClear();
-			if ( m_pVRSystem == nullptr )
-			{
-				EVRInitError eError;
-				m_pVRSystem = ( IVRSystem * )VR_GetGenericInterface( IVRSystem_Version, &eError );
-			}
-			return m_pVRSystem;
-		}
-		IVRChaperone *VRChaperone()
-		{
-			CheckClear();
-			if ( m_pVRChaperone == nullptr )
-			{
-				EVRInitError eError;
-				m_pVRChaperone = ( IVRChaperone * )VR_GetGenericInterface( IVRChaperone_Version, &eError );
-			}
-			return m_pVRChaperone;
-		}
-
-		IVRChaperoneSetup *VRChaperoneSetup()
-		{
-			CheckClear();
-			if ( m_pVRChaperoneSetup == nullptr )
-			{
-				EVRInitError eError;
-				m_pVRChaperoneSetup = ( IVRChaperoneSetup * )VR_GetGenericInterface( IVRChaperoneSetup_Version, &eError );
-			}
-			return m_pVRChaperoneSetup;
-		}
-
-		IVRCompositor *VRCompositor()
-		{
-			CheckClear();
-			if ( m_pVRCompositor == nullptr )
-			{
-				EVRInitError eError;
-				m_pVRCompositor = ( IVRCompositor * )VR_GetGenericInterface( IVRCompositor_Version, &eError );
-			}
-			return m_pVRCompositor;
-		}
-
-		IVROverlay *VROverlay()
-		{
-			CheckClear();
-			if ( m_pVROverlay == nullptr )
-			{
-				EVRInitError eError;
-				m_pVROverlay = ( IVROverlay * )VR_GetGenericInterface( IVROverlay_Version, &eError );
-			}
-			return m_pVROverlay;
-		}
-
-		IVRResources *VRResources()
-		{
-			CheckClear();
-			if ( m_pVRResources == nullptr )
-			{
-				EVRInitError eError;
-				m_pVRResources = (IVRResources *)VR_GetGenericInterface( IVRResources_Version, &eError );
-			}
-			return m_pVRResources;
-		}
-
-		IVRScreenshots *VRScreenshots()
-		{
-			CheckClear();
-			if ( m_pVRScreenshots == nullptr )
-			{
-				EVRInitError eError;
-				m_pVRScreenshots = ( IVRScreenshots * )VR_GetGenericInterface( IVRScreenshots_Version, &eError );
-			}
-			return m_pVRScreenshots;
-		}
-
-		IVRRenderModels *VRRenderModels()
-		{
-			CheckClear();
-			if ( m_pVRRenderModels == nullptr )
-			{
-				EVRInitError eError;
-				m_pVRRenderModels = ( IVRRenderModels * )VR_GetGenericInterface( IVRRenderModels_Version, &eError );
-			}
-			return m_pVRRenderModels;
-		}
-
-		IVRExtendedDisplay *VRExtendedDisplay()
-		{
-			CheckClear();
-			if ( m_pVRExtendedDisplay == nullptr )
-			{
-				EVRInitError eError;
-				m_pVRExtendedDisplay = ( IVRExtendedDisplay * )VR_GetGenericInterface( IVRExtendedDisplay_Version, &eError );
-			}
-			return m_pVRExtendedDisplay;
-		}
-
-		IVRSettings *VRSettings()
-		{
-			CheckClear();
-			if ( m_pVRSettings == nullptr )
-			{
-				EVRInitError eError;
-				m_pVRSettings = ( IVRSettings * )VR_GetGenericInterface( IVRSettings_Version, &eError );
-			}
-			return m_pVRSettings;
-		}
-
-		IVRApplications *VRApplications()
-		{
-			CheckClear();
-			if ( m_pVRApplications == nullptr )
-			{
-				EVRInitError eError;
-				m_pVRApplications = ( IVRApplications * )VR_GetGenericInterface( IVRApplications_Version, &eError );
-			}
-			return m_pVRApplications;
-		}
-
-		IVRTrackedCamera *VRTrackedCamera()
-		{
-			CheckClear();
-			if ( m_pVRTrackedCamera == nullptr )
-			{
-				EVRInitError eError;
-				m_pVRTrackedCamera = ( IVRTrackedCamera * )VR_GetGenericInterface( IVRTrackedCamera_Version, &eError );
-			}
-			return m_pVRTrackedCamera;
-		}
-
-	private:
-		IVRSystem			*m_pVRSystem;
-		IVRChaperone		*m_pVRChaperone;
-		IVRChaperoneSetup	*m_pVRChaperoneSetup;
-		IVRCompositor		*m_pVRCompositor;
-		IVROverlay			*m_pVROverlay;
-		IVRResources		*m_pVRResources;
-		IVRRenderModels		*m_pVRRenderModels;
-		IVRExtendedDisplay	*m_pVRExtendedDisplay;
-		IVRSettings			*m_pVRSettings;
-		IVRApplications		*m_pVRApplications;
-		IVRTrackedCamera	*m_pVRTrackedCamera;
-		IVRScreenshots		*m_pVRScreenshots;
-	};
-
-	inline COpenVRContext &OpenVRInternal_ModuleContext()
-	{
-		static void *ctx[ sizeof( COpenVRContext ) / sizeof( void * ) ];
-		return *( COpenVRContext * )ctx; // bypass zero-init constructor
-	}
-
-	inline IVRSystem *VR_CALLTYPE VRSystem() { return OpenVRInternal_ModuleContext().VRSystem(); }
-	inline IVRChaperone *VR_CALLTYPE VRChaperone() { return OpenVRInternal_ModuleContext().VRChaperone(); }
-	inline IVRChaperoneSetup *VR_CALLTYPE VRChaperoneSetup() { return OpenVRInternal_ModuleContext().VRChaperoneSetup(); }
-	inline IVRCompositor *VR_CALLTYPE VRCompositor() { return OpenVRInternal_ModuleContext().VRCompositor(); }
-	inline IVROverlay *VR_CALLTYPE VROverlay() { return OpenVRInternal_ModuleContext().VROverlay(); }
-	inline IVRScreenshots *VR_CALLTYPE VRScreenshots() { return OpenVRInternal_ModuleContext().VRScreenshots(); }
-	inline IVRRenderModels *VR_CALLTYPE VRRenderModels() { return OpenVRInternal_ModuleContext().VRRenderModels(); }
-	inline IVRApplications *VR_CALLTYPE VRApplications() { return OpenVRInternal_ModuleContext().VRApplications(); }
-	inline IVRSettings *VR_CALLTYPE VRSettings() { return OpenVRInternal_ModuleContext().VRSettings(); }
-	inline IVRResources *VR_CALLTYPE VRResources() { return OpenVRInternal_ModuleContext().VRResources(); }
-	inline IVRExtendedDisplay *VR_CALLTYPE VRExtendedDisplay() { return OpenVRInternal_ModuleContext().VRExtendedDisplay(); }
-	inline IVRTrackedCamera *VR_CALLTYPE VRTrackedCamera() { return OpenVRInternal_ModuleContext().VRTrackedCamera(); }
-
-	inline void COpenVRContext::Clear()
-	{
-		m_pVRSystem = nullptr;
-		m_pVRChaperone = nullptr;
-		m_pVRChaperoneSetup = nullptr;
-		m_pVRCompositor = nullptr;
-		m_pVROverlay = nullptr;
-		m_pVRRenderModels = nullptr;
-		m_pVRExtendedDisplay = nullptr;
-		m_pVRSettings = nullptr;
-		m_pVRApplications = nullptr;
-		m_pVRTrackedCamera = nullptr;
-		m_pVRResources = nullptr;
-		m_pVRScreenshots = nullptr;
-	}
-
-	VR_INTERFACE uint32_t VR_CALLTYPE VR_InitInternal( EVRInitError *peError, EVRApplicationType eApplicationType );
-	VR_INTERFACE void VR_CALLTYPE VR_ShutdownInternal();
-
-	/** Finds the active installation of vrclient.dll and initializes it */
-	inline IVRSystem *VR_Init( EVRInitError *peError, EVRApplicationType eApplicationType )
-	{
-		IVRSystem *pVRSystem = nullptr;
-
-		EVRInitError eError;
-		VRToken() = VR_InitInternal( &eError, eApplicationType );
-		COpenVRContext &ctx = OpenVRInternal_ModuleContext();
-		ctx.Clear();
-
-		if ( eError == VRInitError_None )
-		{
-			if ( VR_IsInterfaceVersionValid( IVRSystem_Version ) )
-			{
-				pVRSystem = VRSystem();
-			}
-			else
-			{
-				VR_ShutdownInternal();
-				eError = VRInitError_Init_InterfaceNotFound;
-			}
-		}
-
-		if ( peError )
-			*peError = eError;
-		return pVRSystem;
-	}
-
-	/** unloads vrclient.dll. Any interface pointers from the interface are
-	* invalid after this point */
-	inline void VR_Shutdown()
-	{
-		VR_ShutdownInternal();
-	}
-}

+ 0 - 62
libraries/openvr/include/wrap_openvr.py

@@ -1,62 +0,0 @@
-#! python3
-
-import shlex
-import sys
-import re
-import io
-
-header = open('openvr.h', newline='\n').read()
-
-annoyingMacroPattern = re.compile(r'#define\s+(\w+).*VR_CLANG_ATTR.*')
-fullClassPattern = re.compile(r'^([^\S\n]*)class\s+(\w+).*?\{.*?\};', re.MULTILINE | re.DOTALL)
-virtualPattern = re.compile(r'([^\S\n]*)virtual\s(.*?)(\w+)(\((.+?,\s*)*.*?\s*\))\s*=\s*0\s*;[^\S\n]*', re.MULTILINE)
-optionalParamPattern = re.compile(r'\s*=\s*[^,)]+')
-versionPattern = re.compile(r'\s*static\s*const\s*char\s*\*\s*const\s*IVR\w+\s*=\s*\"IVR\w+\";')
-
-annoyingMacros = [match.group(1) for match in annoyingMacroPattern.finditer(header)]
-
-newHeader = header
-for match in versionPattern.finditer(newHeader):
-    newHeader = newHeader.replace(match.group(0), match.group(0).replace('"IVR', '"FnTable:IVR'))
-
-for match in fullClassPattern.finditer(header):
-    if match.group(0).find('virtual') == -1:
-        continue
-    fullClass = match.group(0)
-    indent = match.group(1)
-    className = match.group(2)
-    
-    newClass = fullClass
-    
-    declarations = []
-    for function in virtualPattern.finditer(fullClass):
-        returnType = function.group(2)
-        functionName = function.group(3)
-        params = function.group(4)
-        paramsNoDefault = re.sub(optionalParamPattern, '', params)
-        for macro in annoyingMacros:
-            paramsNoDefault = re.sub(macro + r'\(.*?\)', '', paramsNoDefault)
-        
-        args = []
-        paramTokens = list(shlex.shlex(io.StringIO(paramsNoDefault)))
-        for i, token in enumerate(paramTokens):
-            if token == ',' or (token == ')' and paramTokens[i - 1] not in ['(', 'void']):
-                args.append(paramTokens[i - 1])
-        
-        declaration = indent + '\t{}(__stdcall *{}){};'.format(returnType, functionName, paramsNoDefault)
-        definition = indent + '\t' + returnType + functionName + params + ' { '
-        if returnType.strip() != 'void':
-            definition = definition + 'return '
-        definition = definition + '_table.' + functionName + '(' + ', '.join(args) + '); }'
-        
-        declarations.append(declaration)
-        newClass = newClass.replace(function.group(0), definition)
-        
-    tableName = 'VR_{}_FnTable'.format(className)
-    table = indent + 'struct ' + tableName + '\n' + indent + '{\n' + '\n'.join(declarations) + '\n' + indent + '};\n\n'
-    
-    newClass = newClass.replace('public:', '\t{} _table;\n{}public:'.format(tableName, indent))
-    
-    newHeader = newHeader.replace(fullClass, table + newClass)
-
-open('openvr_mingw.hpp', 'w', newline='\n').write(newHeader)

BIN
libraries/openvr/lib/windows/openvr_api.lib


+ 0 - 23
resources/shaders/cursortrailVR.fsh

@@ -1,23 +0,0 @@
-#version 110
-
-uniform float time;
-uniform sampler2D tex;
-
-varying vec2 tex_coord;
-varying float vtx_alpha;
-
-void main()
-{
-	vec4 color = texture2D(tex, tex_coord);
-	color.a *= vtx_alpha;
-	
-	/*
-	float speedMultiplier = 0.8;
-	float spreadMultiplier = 2.0;
-	color.r = sin(time*speedMultiplier + vtx_alpha*spreadMultiplier + 0.0)*0.5 + 0.5;
-	color.g = sin(time*speedMultiplier + vtx_alpha*spreadMultiplier + 2.0)*0.5 + 0.5;
-	color.b = sin(time*speedMultiplier + vtx_alpha*spreadMultiplier + 4.0)*0.5 + 0.5;
-	*/
-	
-	gl_FragColor = color; 
-}

+ 0 - 16
resources/shaders/cursortrailVR.vsh

@@ -1,16 +0,0 @@
-#version 110
-
-uniform mat4 matrix;
-uniform float time;
-
-varying vec2 tex_coord;
-varying float vtx_alpha;
-
-void main()
-{	
-	gl_Position = matrix * gl_ModelViewMatrix * vec4(gl_Vertex.x, gl_Vertex.y, 0.0, 1.0);
-	gl_FrontColor = gl_Color;
-	
-	tex_coord = gl_MultiTexCoord0.xy;
-	vtx_alpha = gl_Vertex.z;
-}

+ 0 - 136
resources/shaders/sliderVR.fsh

@@ -1,136 +0,0 @@
-#version 110
-
-uniform sampler2D tex;
-uniform int part;
-uniform int style;
-uniform float bodyColorSaturation;
-uniform float bodyAlphaMultiplier;
-uniform float borderSizeMultiplier;
-uniform vec3 colBorder;
-uniform vec3 colBody;
-
-varying vec2 tex_coord;
-
-const float defaultTransitionSize = 0.011;
-const float defaultBorderSize = 0.11;
-const float defaultOuterShadowSize = 0.08;
-
-vec4 getInnerBodyColor(in vec4 bodyColor)
-{
-	float brightnessMultiplier = 0.25;
-	bodyColor.r = min(1.0, bodyColor.r * (1.0 + 0.5 * brightnessMultiplier) + brightnessMultiplier);
-	bodyColor.g = min(1.0, bodyColor.g * (1.0 + 0.5 * brightnessMultiplier) + brightnessMultiplier);
-	bodyColor.b = min(1.0, bodyColor.b * (1.0 + 0.5 * brightnessMultiplier) + brightnessMultiplier);
-	return vec4(bodyColor);
-}
-
-vec4 getOuterBodyColor(in vec4 bodyColor)
-{
-	float darknessMultiplier = 0.1;
-	bodyColor.r = min(1.0, bodyColor.r / (1.0 + darknessMultiplier));
-	bodyColor.g = min(1.0, bodyColor.g / (1.0 + darknessMultiplier));
-	bodyColor.b = min(1.0, bodyColor.b / (1.0 + darknessMultiplier));
-	return vec4(bodyColor);
-}
-
-void main()
-{
-	float borderSize = defaultBorderSize*borderSizeMultiplier;
-	float transitionSize = defaultTransitionSize;
-	float outerShadowSize = defaultOuterShadowSize;
-
-	// output var
-	vec4 out_color = vec4(0.0);
-	
-	// dynamic color calculations
-	vec4 borderColor = vec4(colBorder.x, colBorder.y, colBorder.z, 1.0);
-	vec4 bodyColor = vec4(colBody.x, colBody.y, colBody.z, 0.7*bodyAlphaMultiplier);
-	vec4 outerShadowColor = vec4(0, 0, 0, 0.25);
-	vec4 innerBodyColor = getInnerBodyColor(bodyColor);
-	vec4 outerBodyColor = getOuterBodyColor(bodyColor);
-	
-	innerBodyColor.rgb *= bodyColorSaturation;
-	outerBodyColor.rgb *= bodyColorSaturation;
-	
-	// osu!next style color modifications
-	if (style == 1)
-	{
-		outerBodyColor.rgb = bodyColor.rgb * bodyColorSaturation;
-		outerBodyColor.a = 1.0*bodyAlphaMultiplier;
-		innerBodyColor.rgb = bodyColor.rgb * 0.5 * bodyColorSaturation;
-		innerBodyColor.a = 0.0;
-	}
-	
-	// a bit of a hack, but better than rough edges
-	if (borderSizeMultiplier < 0.01)
-		borderColor = outerShadowColor;
-		
-	if (part == 1) // render body
-	{
-		outerShadowSize = 0.0;
-		transitionSize = 0.0;
-		borderSize = 0.0;
-	}
-	else // render border
-	{
-		// the border is done by the mesh, force full body
-		borderSize = 1.0;
-		
-		// this smoothes the outer edge of the border of the slider
-		// (it's impossible to smoooth the inner edge of the border without an fbo, since we are using the mesh as a crude stencil)
-		transitionSize = 0.03;
-	}
-	
-	// conditional variant
-	
-	if (tex_coord.x < outerShadowSize - transitionSize) // just shadow
-	{
-		float delta = tex_coord.x / (outerShadowSize - transitionSize);
-		out_color = mix(vec4(0), outerShadowColor, delta);
-	}
-	if (tex_coord.x > outerShadowSize - transitionSize && tex_coord.x < outerShadowSize + transitionSize) // shadow + border
-	{
-		float delta = (tex_coord.x - outerShadowSize + transitionSize) / (2.0*transitionSize);
-		out_color = mix(outerShadowColor, borderColor, delta);
-	}
-	if (tex_coord.x > outerShadowSize + transitionSize && tex_coord.x < outerShadowSize + borderSize - transitionSize) // just border
-	{
-		out_color = borderColor;
-	}
-	if (tex_coord.x > outerShadowSize + borderSize - transitionSize && tex_coord.x < outerShadowSize + borderSize + transitionSize) // border + outer body
-	{
-		float delta = (tex_coord.x - outerShadowSize - borderSize + transitionSize) / (2.0*transitionSize);
-		out_color = mix(borderColor, outerBodyColor, delta);
-	}
-	if (tex_coord.x > outerShadowSize + borderSize + transitionSize) // outer body + inner body
-	{	
-		float size = outerShadowSize + borderSize + transitionSize;
-		float delta = ((tex_coord.x - size) / (1.0-size));
-		out_color = mix(outerBodyColor, innerBodyColor, delta);
-	}
-	
-	// linear variant
-	/*
-	// just shadow
-	float delta = tex_coord.x/(outerShadowSize-transitionSize);
-	out_color += mix(vec4(0.0), outerShadowColor, delta) * clamp(ceil(-delta+1.0), 0.0, 1.0);
-	
-	// shadow + border
-	delta = (tex_coord.x - outerShadowSize + transitionSize) / (2.0*transitionSize);
-	out_color += mix(outerShadowColor, borderColor, delta) * clamp(ceil(tex_coord.x - (outerShadowSize - transitionSize)), 0.0, 1.0) * clamp(ceil(-abs(delta)+1.0), 0.0, 1.0);
-	
-	// just border
-	out_color += borderColor * clamp(ceil(tex_coord.x - (outerShadowSize + transitionSize)), 0.0, 1.0) * clamp(ceil(-(tex_coord.x - (outerShadowSize + borderSize - transitionSize))), 0.0, 1.0);
-	
-	// border + outer body
-	delta = (tex_coord.x - outerShadowSize - borderSize + transitionSize) / (2.0*transitionSize);
-	out_color += mix(borderColor, outerBodyColor, delta) * clamp(ceil(tex_coord.x - (outerShadowSize + borderSize - transitionSize)), 0.0, 1.0) * clamp(ceil(-abs(delta)+1.0), 0.0, 1.0);
-	
-	// outer body + inner body
-	delta = outerShadowSize + borderSize + transitionSize;
-	delta = (tex_coord.x - delta) / (1.0-delta); // [VARIABLE REUSING INTENSIFIES]
-	out_color += mix(outerBodyColor, innerBodyColor, delta) * clamp(ceil(tex_coord.x - (outerShadowSize + borderSize + transitionSize)), 0.0, 1.0);
-	*/
-	
-	gl_FragColor = out_color;
-}

+ 0 - 13
resources/shaders/sliderVR.vsh

@@ -1,13 +0,0 @@
-#version 110
-
-uniform mat4 matrix;
-varying vec2 tex_coord;
-
-void main()
-{	
-	tex_coord = gl_MultiTexCoord0.xy;
-	vec4 vertex = gl_Vertex;
-	gl_Position = matrix * gl_ModelViewMatrix * vertex;
-	gl_FrontColor = gl_Color;
-}
-

+ 17 - 138
src/App/Osu/Osu.cpp

@@ -22,8 +22,6 @@
 #include "Environment.h"
 #include "Keyboard.h"
 #include "Mouse.h"
-#include "OpenVRController.h"
-#include "OpenVRInterface.h"
 #include "OsuDatabase.h"
 #include "RenderTarget.h"
 #include "ResourceManager.h"
@@ -63,18 +61,11 @@
 #include "OsuUIUserContextMenu.h"
 #include "OsuUpdateHandler.h"
 #include "OsuUserStatsScreen.h"
-#include "OsuVR.h"
-#include "OsuVRTutorial.h"
 #include "OsuVolumeOverlay.h"
 
 // release configuration
 ConVar auto_update("auto_update", true, FCVAR_NONE);
 ConVar osu_version("osu_version", 34.09f, FCVAR_NONE);
-#ifdef MCENGINE_FEATURE_OPENVR
-ConVar osu_release_stream("osu_release_stream", "vr", FCVAR_NONE);
-#else
-ConVar osu_release_stream("osu_release_stream", "desktop", FCVAR_NONE);
-#endif
 
 #ifdef _DEBUG
 ConVar osu_debug("osu_debug", true, FCVAR_NONE);
@@ -82,15 +73,12 @@ ConVar osu_debug("osu_debug", true, FCVAR_NONE);
 ConVar osu_debug("osu_debug", false, FCVAR_NONE);
 #endif
 
-ConVar osu_vr("osu_vr", false, FCVAR_NONE);
-ConVar osu_vr_tutorial("osu_vr_tutorial", true, FCVAR_NONE);
-
 ConVar osu_disable_mousebuttons("osu_disable_mousebuttons", false, FCVAR_NONE);
 ConVar osu_disable_mousewheel("osu_disable_mousewheel", false, FCVAR_NONE);
 ConVar osu_confine_cursor_windowed("osu_confine_cursor_windowed", false, FCVAR_NONE);
 ConVar osu_confine_cursor_fullscreen("osu_confine_cursor_fullscreen", true, FCVAR_NONE);
 
-ConVar osu_skin("osu_skin", "", FCVAR_NONE);  // set dynamically below in the constructor
+ConVar osu_skin("osu_skin", "default", FCVAR_NONE);
 ConVar osu_skin_reload("osu_skin_reload");
 
 ConVar osu_volume_master("osu_volume_master", 1.0f, FCVAR_NONE);
@@ -198,7 +186,6 @@ Osu::Osu(int instanceID) {
     m_ui_scrollview_scrollbarwidth_ref = convar->getConVarByName("ui_scrollview_scrollbarwidth");
     m_mouse_raw_input_absolute_to_window_ref = convar->getConVarByName("mouse_raw_input_absolute_to_window");
     m_win_disable_windows_key_ref = convar->getConVarByName("win_disable_windows_key");
-    m_osu_vr_draw_desktop_playfield_ref = convar->getConVarByName("osu_vr_draw_desktop_playfield");
 
     // experimental mods list
     m_experimentalMods.push_back(convar->getConVarByName("fposu_mod_strafing"));
@@ -229,11 +216,6 @@ Osu::Osu(int instanceID) {
     m_experimentalMods.push_back(convar->getConVarByName("osu_mod_shirone"));
     m_experimentalMods.push_back(convar->getConVarByName("osu_mod_approach_different"));
 
-    // engine settings/overrides
-    openvr->setDrawCallback(fastdelegate::MakeDelegate(this, &Osu::drawVR));
-    if(openvr->isReady())  // automatically enable VR mode if it was compiled with OpenVR support and is available
-        osu_vr.setValue(1.0f);
-
     env->setWindowTitle("McOsu");
     env->setCursorVisible(false);
 
@@ -268,17 +250,7 @@ Osu::Osu(int instanceID) {
         convar->getConVarByName("name")->setValue(env->getUsername());
     }
 
-    // VR specific settings
-    if(isInVRMode()) {
-        osu_skin.setValue("defaultvr");
-        ConVar *osu_drain_type_ref = convar->getConVarByName("osu_drain_type");
-        osu_drain_type_ref->setDefaultFloat(1.0f);
-        osu_drain_type_ref->setValue(1.0f);
-        env->setWindowResizable(true);
-    } else {
-        osu_skin.setValue("default");
-        env->setWindowResizable(false);
-    }
+    env->setWindowResizable(false);
 
     // generate default osu! appdata user path
     std::string userDataPath = env->getUserDataPath();
@@ -350,7 +322,6 @@ Osu::Osu(int instanceID) {
     m_bToggleOptionsMenuScheduled = false;
     m_bOptionsMenuFullscreen = true;
     m_bToggleUserStatsScreenScheduled = false;
-    m_bToggleVRTutorialScheduled = false;
     m_bToggleChangelogScheduled = false;
     m_bToggleEditorScheduled = false;
 
@@ -379,7 +350,6 @@ Osu::Osu(int instanceID) {
     m_gamemode = GAMEMODE::STD;
     m_bScheduleEndlessModNextBeatmap = false;
     m_iMultiplayerClientNumEscPresses = 0;
-    m_bIsInVRDraw = false;
     m_bWasBossKeyPaused = false;
     m_bSkinLoadScheduled = false;
     m_bSkinLoadWasReload = false;
@@ -408,7 +378,7 @@ Osu::Osu(int instanceID) {
     // exec the main config file (this must be right here!)
     if(m_iInstanceID < 2) {
         Console::execConfigFile("underride");  // same as override, but for defaults
-        Console::execConfigFile(isInVRMode() ? "osuvr" : "osu");
+        Console::execConfigFile("osu");
         Console::execConfigFile("override");  // used for quickfixing live builds without redeploying/recompiling
     }
 
@@ -489,7 +459,6 @@ Osu::Osu(int instanceID) {
     // load subsystems, add them to the screens array
     m_volumeOverlay = new OsuVolumeOverlay(this);
     m_tooltipOverlay = new OsuTooltipOverlay(this);
-    m_vr = new OsuVR(this);
     m_mainMenu = new OsuMainMenu(this);
     m_optionsMenu = new OsuOptionsMenu(this);
     m_songBrowser2 = new OsuSongBrowser2(this);
@@ -499,7 +468,6 @@ Osu::Osu(int instanceID) {
     m_userStatsScreen = new OsuUserStatsScreen(this);
     m_pauseMenu = new OsuPauseMenu(this);
     m_hud = new OsuHUD(this);
-    m_vrTutorial = new OsuVRTutorial(this);
     m_changelog = new OsuChangelog(this);
     m_editor = new OsuEditor(this);
     m_fposu = new OsuModFPoSu(this);
@@ -524,7 +492,6 @@ Osu::Osu(int instanceID) {
     m_screens.push_back(m_hud);
     m_screens.push_back(m_songBrowser2);
     m_screens.push_back(m_lobby);
-    m_screens.push_back(m_vrTutorial);
     m_screens.push_back(m_changelog);
     m_screens.push_back(m_editor);
     m_screens.push_back(m_mainMenu);
@@ -554,13 +521,8 @@ Osu::Osu(int instanceID) {
         reconnect();
     }
 
-    if(isInVRMode() && osu_vr_tutorial.getBool()) {
-        m_mainMenu->setStartupAnim(false);
-        m_vrTutorial->setVisible(true);
-    } else {
-        m_mainMenu->setVisible(true);
-        m_mainMenu->selectRandomBeatmap();
-    }
+    m_mainMenu->setVisible(true);
+    m_mainMenu->selectRandomBeatmap();
 
     m_updateHandler->checkForUpdates();
 
@@ -606,9 +568,7 @@ Osu::~Osu() {
     }
 
     SAFE_DELETE(m_fposu);
-
     SAFE_DELETE(m_score);
-    SAFE_DELETE(m_vr);
     SAFE_DELETE(m_skin);
     SAFE_DELETE(m_backgroundImageHandler);
 }
@@ -623,8 +583,8 @@ void Osu::draw(Graphics *g) {
 
     // if we are not using the native window resolution, or in vr mode, or playing on a nintendo switch, or multiple
     // instances are active, draw into the buffer
-    const bool isBufferedDraw = osu_resolution_enabled.getBool() || isInVRMode() ||
-                                env->getOS() == Environment::OS::OS_HORIZON || m_iInstanceID > 0;
+    const bool isBufferedDraw =
+        osu_resolution_enabled.getBool() || env->getOS() == Environment::OS::OS_HORIZON || m_iInstanceID > 0;
 
     if(isBufferedDraw) m_backBuffer->enable();
 
@@ -725,9 +685,7 @@ void Osu::draw(Graphics *g) {
         }
 
         // draw player cursor
-        if((!isAuto || allowDoubleCursor) && allowDrawCursor &&
-           (!isInVRMode() || (m_osu_vr_draw_desktop_playfield_ref->getBool() &&
-                              (m_vr->isVirtualCursorOnScreen() || engine->hasFocus())))) {
+        if((!isAuto || allowDoubleCursor) && allowDrawCursor) {
             Vector2 cursorPos =
                 (beatmapStd != NULL && !isAuto) ? beatmapStd->getCursorPos() : engine->getMouse()->getPos();
 
@@ -740,21 +698,6 @@ void Osu::draw(Graphics *g) {
             m_hud->drawCursor(g, cursorPos, (osu_mod_fadingcursor.getBool() && !isAuto) ? fadingCursorAlpha : 1.0f,
                               isAuto, updateAndDrawTrail);
         }
-
-        // draw projected VR cursors for spectators
-        if(isInVRMode() && isInPlayMode() && !getSelectedBeatmap()->isPaused() &&
-           m_osu_vr_draw_desktop_playfield_ref->getBool() && beatmapStd != NULL) {
-            m_hud->drawCursorSpectator1(
-                g,
-                beatmapStd->osuCoords2RawPixels(m_vr->getCursorPos1() + Vector2(OsuGameRules::OSU_COORD_WIDTH / 2,
-                                                                                OsuGameRules::OSU_COORD_HEIGHT / 2)),
-                1.0f);
-            m_hud->drawCursorSpectator2(
-                g,
-                beatmapStd->osuCoords2RawPixels(m_vr->getCursorPos2() + Vector2(OsuGameRules::OSU_COORD_WIDTH / 2,
-                                                                                OsuGameRules::OSU_COORD_HEIGHT / 2)),
-                1.0f);
-        }
     } else  // if we are not playing
     {
         m_lobby->draw(g);
@@ -763,7 +706,6 @@ void Osu::draw(Graphics *g) {
         if(m_songBrowser2 != NULL) m_songBrowser2->draw(g);
 
         m_mainMenu->draw(g);
-        m_vrTutorial->draw(g);
         m_changelog->draw(g);
         m_editor->draw(g);
         m_userStatsScreen->draw(g);
@@ -777,9 +719,7 @@ void Osu::draw(Graphics *g) {
         if(osu_draw_fps.getBool()) m_hud->drawFps(g);
 
         m_windowManager->draw(g);
-
-        if(!isInVRMode() || (m_vr->isVirtualCursorOnScreen() || engine->hasFocus()))
-            m_hud->drawCursor(g, engine->getMouse()->getPos());
+        m_hud->drawCursor(g, engine->getMouse()->getPos());
     }
 
     m_tooltipOverlay->draw(g);
@@ -791,9 +731,7 @@ void Osu::draw(Graphics *g) {
         m_hud->drawLoadingSmall(g);
     }
 
-    // if we are not using the native window resolution;
-    // we must also do this if we are in VR mode, since we only draw once and the buffer is used to draw the virtual
-    // screen later. otherwise we wouldn't see anything on the desktop window
+    // if we are not using the native window resolution
     if(isBufferedDraw) {
         // draw a scaled version from the buffer to the screen
         m_backBuffer->disable();
@@ -883,43 +821,11 @@ void Osu::draw(Graphics *g) {
         }
         g->setBlending(true);
     }
-
-    // now, let OpenVR draw (this internally then calls the registered callback, meaning drawVR() here)
-    if(isInVRMode()) openvr->draw(g);
-}
-
-void Osu::drawVR(Graphics *g) {
-    m_bIsInVRDraw = true;
-
-    Matrix4 mvp = openvr->getCurrentModelViewProjectionMatrix();
-
-    // draw virtual screen + environment
-    m_vr->drawVR(g, mvp, m_backBuffer);
-
-    // draw everything in the correct order
-    if(isInPlayMode())  // if we are playing a beatmap
-    {
-        m_vr->drawVRHUD(g, mvp, m_hud);
-
-        // all beatmap elements are more important than anything else, so reset depth buffer to always draw on top
-        g->clearDepthBuffer();
-
-        m_vr->drawVRBeatmap(g, mvp, getSelectedBeatmap());
-    } else  // not playing
-    {
-        if(m_optionsMenu->shouldDrawVRDummyHUD()) m_vr->drawVRHUDDummy(g, mvp, m_hud);
-
-        m_vr->drawVRPlayfieldDummy(g, mvp);
-    }
-
-    m_bIsInVRDraw = false;
 }
 
 void Osu::update() {
     if(m_skin != NULL) m_skin->update();
 
-    if(isInVRMode()) m_vr->update();
-
     if(isInPlayMode() && m_osu_mod_fposu_ref->getBool()) m_fposu->update();
 
     bool propagate_clicks = true;
@@ -971,14 +877,7 @@ void Osu::update() {
            !m_volumeOverlay->isBusy()) {
             const bool isAnyOsuKeyDown = (m_bKeyboardKey1Down || m_bKeyboardKey12Down || m_bKeyboardKey2Down ||
                                           m_bKeyboardKey22Down || m_bMouseKey1Down || m_bMouseKey2Down);
-            const bool isAnyVRKeyDown =
-                isInVRMode() && !m_vr->isUIActive() &&
-                (openvr->getLeftController()->isButtonPressed(OpenVRController::BUTTON::BUTTON_STEAMVR_TOUCHPAD) ||
-                 openvr->getRightController()->isButtonPressed(OpenVRController::BUTTON::BUTTON_STEAMVR_TOUCHPAD) ||
-                 openvr->getLeftController()->getTrigger() > 0.95f ||
-                 openvr->getRightController()->getTrigger() > 0.95f);
-
-            const bool isAnyKeyDown = (isAnyOsuKeyDown || isAnyVRKeyDown || engine->getMouse()->isLeftDown());
+            const bool isAnyKeyDown = (isAnyOsuKeyDown || engine->getMouse()->isLeftDown());
 
             if(isAnyKeyDown) {
                 if(!m_bSkipDownCheck) {
@@ -987,7 +886,7 @@ void Osu::update() {
                     const bool isCursorInsideSkipButton =
                         m_hud->getSkipClickRect().contains(engine->getMouse()->getPos());
 
-                    if(isCursorInsideSkipButton || isAnyVRKeyDown) {
+                    if(isCursorInsideSkipButton) {
                         if(!m_bSkipScheduled) {
                             m_bSkipScheduled = true;
 
@@ -1089,12 +988,10 @@ void Osu::update() {
     if(m_bToggleOptionsMenuScheduled) {
         m_bToggleOptionsMenuScheduled = false;
 
-        const bool fullscreen = (isInVRMode() ? m_bOptionsMenuFullscreen : false);
         const bool wasFullscreen = m_optionsMenu->isFullscreen();
-
-        m_optionsMenu->setFullscreen(fullscreen);
+        m_optionsMenu->setFullscreen(false);
         m_optionsMenu->setVisible(!m_optionsMenu->isVisible());
-        if(fullscreen || wasFullscreen) m_mainMenu->setVisible(!m_optionsMenu->isVisible());
+        if(wasFullscreen) m_mainMenu->setVisible(!m_optionsMenu->isVisible());
     }
     if(m_bToggleUserStatsScreenScheduled) {
         m_bToggleUserStatsScreenScheduled = false;
@@ -1105,12 +1002,6 @@ void Osu::update() {
             if(m_songBrowser2 != NULL && m_songBrowser2->isVisible()) m_songBrowser2->setVisible(false);
         }
     }
-    if(m_bToggleVRTutorialScheduled) {
-        m_bToggleVRTutorialScheduled = false;
-
-        m_mainMenu->setVisible(!m_mainMenu->isVisible());
-        m_vrTutorial->setVisible(!m_mainMenu->isVisible());
-    }
     if(m_bToggleChangelogScheduled) {
         m_bToggleChangelogScheduled = false;
 
@@ -1137,10 +1028,9 @@ void Osu::update() {
         }
     }
 
-    // TODO: shitty override, but it works well enough for now => see OsuVR.cpp
     // it's a bit of a hack, because using cursor visibility to work around SetCursorPos() affecting the windows cursor
     // in the Mouse class
-    if(isInVRMode() && !env->isCursorVisible()) env->setCursorVisible(true);
+    if(!env->isCursorVisible()) env->setCursorVisible(true);
 
     // endless mod
     if(m_bScheduleEndlessModNextBeatmap) {
@@ -1311,12 +1201,10 @@ void Osu::onKeyDown(KeyboardEvent &key) {
     // reload & recompile shaders
     if(engine->getKeyboard()->isAltDown() && engine->getKeyboard()->isControlDown() && key == KEY_R) {
         Shader *sliderShader = engine->getResourceManager()->getShader("slider");
-        Shader *sliderShaderVR = engine->getResourceManager()->getShader("sliderVR");
         Shader *cursorTrailShader = engine->getResourceManager()->getShader("cursortrail");
         Shader *hitcircle3DShader = engine->getResourceManager()->getShader("hitcircle3D");
 
         if(sliderShader != NULL) sliderShader->reload();
-        if(sliderShaderVR != NULL) sliderShaderVR->reload();
         if(cursorTrailShader != NULL) cursorTrailShader->reload();
         if(hitcircle3DShader != NULL) hitcircle3DShader->reload();
 
@@ -1689,8 +1577,6 @@ void Osu::toggleOptionsMenu() {
 
 void Osu::toggleUserStatsScreen() { m_bToggleUserStatsScreenScheduled = true; }
 
-void Osu::toggleVRTutorial() { m_bToggleVRTutorialScheduled = true; }
-
 void Osu::toggleChangelog() { m_bToggleChangelogScheduled = true; }
 
 void Osu::toggleEditor() { m_bToggleEditorScheduled = true; }
@@ -1901,8 +1787,6 @@ bool Osu::isNotInPlayModeOrPaused() {
     return !isInPlayMode() || (getSelectedBeatmap() != NULL && getSelectedBeatmap()->isPaused());
 }
 
-bool Osu::isInVRMode() { return (osu_vr.getBool() && openvr->isReady()); }
-
 bool Osu::shouldFallBackToLegacySliderRenderer() {
     return osu_force_legacy_slider_renderer.getBool() || m_osu_mod_wobble_ref->getBool() ||
            m_osu_mod_wobble2_ref->getBool() || m_osu_mod_minimize_ref->getBool() ||
@@ -2045,8 +1929,6 @@ void Osu::updateMouseSettings() {
 void Osu::updateWindowsKeyDisable() {
     if(debug->getBool()) debugLog("Osu::updateWindowsKeyDisable()\n");
 
-    if(isInVRMode()) return;
-
     if(osu_win_disable_windows_key_while_playing.getBool()) {
         const bool isPlayerPlaying =
             engine->hasFocus() && isInPlayMode() && getSelectedBeatmap() != NULL &&
@@ -2177,8 +2059,7 @@ void Osu::onSkinChange(UString oldValue, UString newValue) {
     skinFolder.append("/");
     std::string sf = skinFolder.toUtf8();
 
-    m_skinScheduledToLoad =
-        new OsuSkin(this, newValue, sf, (newValue == UString("default") || newValue == UString("defaultvr")));
+    m_skinScheduledToLoad = new OsuSkin(this, newValue, sf, (newValue == UString("default")));
 
     // initial load
     if(m_skin == NULL) m_skin = m_skinScheduledToLoad;
@@ -2273,7 +2154,7 @@ void Osu::onLetterboxingChange(UString oldValue, UString newValue) {
 void Osu::updateConfineCursor() {
     if(debug->getBool()) debugLog("Osu::updateConfineCursor()\n");
 
-    if(isInVRMode() || m_iInstanceID > 0) return;
+    if(m_iInstanceID > 0) return;
 
     if((osu_confine_cursor_fullscreen.getBool() && env->isFullscreen()) ||
        (osu_confine_cursor_windowed.getBool() && !env->isFullscreen()) ||
@@ -2440,8 +2321,6 @@ float Osu::getUIScale(Osu *osu, float osuResolutionRatio) {
 }
 
 float Osu::getUIScale(Osu *osu) {
-    if(isInVRMode()) return 1.0f;
-
     if(osu != NULL) {
         if(osu->getScreenWidth() < osu_ui_scale_to_dpi_minimum_width.getInt() ||
            osu->getScreenHeight() < osu_ui_scale_to_dpi_minimum_height.getInt())

+ 0 - 12
src/App/Osu/Osu.h

@@ -19,7 +19,6 @@ class OsuLobby;
 class OsuRoom;
 class OsuPromptScreen;
 class OsuUIUserContextMenuScreen;
-class OsuVR;
 class OsuMainMenu;
 class OsuPauseMenu;
 class OsuOptionsMenu;
@@ -36,7 +35,6 @@ class OsuScreen;
 class OsuScore;
 class OsuSkin;
 class OsuHUD;
-class OsuVRTutorial;
 class OsuChangelog;
 class OsuEditor;
 class OsuModFPoSu;
@@ -72,7 +70,6 @@ class Osu : public App, public MouseListener {
     virtual ~Osu();
 
     virtual void draw(Graphics *g);
-    void drawVR(Graphics *g);
     virtual void update();
 
     virtual void onKeyDown(KeyboardEvent &e);
@@ -104,7 +101,6 @@ class Osu : public App, public MouseListener {
     void toggleSongBrowser();
     void toggleOptionsMenu();
     void toggleUserStatsScreen();
-    void toggleVRTutorial();
     void toggleChangelog();
     void toggleEditor();
 
@@ -124,7 +120,6 @@ class Osu : public App, public MouseListener {
 
     OsuBeatmap *getSelectedBeatmap();
 
-    inline OsuVR *getVR() const { return m_vr; }
     inline OsuOptionsMenu *getOptionsMenu() const { return m_optionsMenu; }
     inline OsuSongBrowser2 *getSongBrowser() const { return m_songBrowser2; }
     inline OsuBackgroundImageHandler *getBackgroundImageHandler() const { return m_backgroundImageHandler; }
@@ -182,8 +177,6 @@ class Osu : public App, public MouseListener {
 
     bool isInPlayMode();
     bool isNotInPlayModeOrPaused();
-    static bool isInVRMode();
-    inline bool isInVRDraw() const { return m_bIsInVRDraw; }
     inline bool isSkinLoading() const { return m_bSkinLoadScheduled; }
 
     inline bool isSkipScheduled() const { return m_bSkipScheduled; }
@@ -264,11 +257,9 @@ class Osu : public App, public MouseListener {
     ConVar *m_ui_scrollview_scrollbarwidth_ref;
     ConVar *m_mouse_raw_input_absolute_to_window_ref;
     ConVar *m_win_disable_windows_key_ref;
-    ConVar *m_osu_vr_draw_desktop_playfield_ref;
 
     // interfaces
     OsuVolumeOverlay *m_volumeOverlay;
-    OsuVR *m_vr;
     OsuMainMenu *m_mainMenu;
     OsuOptionsMenu *m_optionsMenu;
     OsuChat *m_chat = nullptr;
@@ -287,7 +278,6 @@ class Osu : public App, public MouseListener {
     OsuTooltipOverlay *m_tooltipOverlay;
     OsuNotificationOverlay *m_notificationOverlay;
     OsuScore *m_score;
-    OsuVRTutorial *m_vrTutorial;
     OsuChangelog *m_changelog;
     OsuEditor *m_editor;
     OsuUpdateHandler *m_updateHandler;
@@ -355,7 +345,6 @@ class Osu : public App, public MouseListener {
     bool m_bToggleOptionsMenuScheduled;
     bool m_bOptionsMenuFullscreen;
     bool m_bToggleUserStatsScreenScheduled;
-    bool m_bToggleVRTutorialScheduled;
     bool m_bToggleChangelogScheduled;
     bool m_bToggleEditorScheduled;
 
@@ -377,7 +366,6 @@ class Osu : public App, public MouseListener {
     GAMEMODE m_gamemode;
     bool m_bScheduleEndlessModNextBeatmap;
     int m_iMultiplayerClientNumEscPresses;
-    bool m_bIsInVRDraw;
     int m_iInstanceID;
     bool m_bWasBossKeyPaused;
     bool m_bSkinLoadScheduled;

+ 6 - 45
src/App/Osu/OsuBeatmap.cpp

@@ -40,7 +40,6 @@
 #include "OsuSkin.h"
 #include "OsuSkinImage.h"
 #include "OsuSlider.h"
-#include "OsuVR.h"
 #include "ResourceManager.h"
 #include "SoundEngine.h"
 
@@ -48,7 +47,6 @@ ConVar osu_pvs("osu_pvs", true, FCVAR_NONE,
                "optimizes all loops over all hitobjects by clamping the range to the Potentially Visible Set");
 ConVar osu_draw_hitobjects("osu_draw_hitobjects", true, FCVAR_NONE);
 ConVar osu_draw_beatmap_background_image("osu_draw_beatmap_background_image", true, FCVAR_NONE);
-ConVar osu_vr_draw_desktop_playfield("osu_vr_draw_desktop_playfield", true, FCVAR_NONE);
 
 ConVar osu_universal_offset("osu_universal_offset", 0.0f, FCVAR_NONE);
 ConVar osu_universal_offset_hardcoded_fallback_dsound("osu_universal_offset_hardcoded_fallback_dsound", -15.0f,
@@ -155,7 +153,7 @@ ConVar osu_mod_suddendeath_restart("osu_mod_suddendeath_restart", false, FCVAR_N
 
 ConVar osu_drain_type(
     "osu_drain_type", 2, FCVAR_CHEAT,
-    "which hp drain algorithm to use (0 = None, 1 = VR, 2 = osu!stable, 3 = osu!lazer 2020, 4 = osu!lazer 2018)");
+    "which hp drain algorithm to use (1 = None, 2 = osu!stable, 3 = osu!lazer 2020, 4 = osu!lazer 2018)");
 ConVar osu_drain_kill("osu_drain_kill", true, FCVAR_CHEAT, "whether to kill the player upon failing");
 ConVar osu_drain_kill_notification_duration(
     "osu_drain_kill_notification_duration", 1.0f, FCVAR_NONE,
@@ -190,7 +188,6 @@ ConVar osu_debug_draw_timingpoints("osu_debug_draw_timingpoints", false, FCVAR_C
 
 ConVar *OsuBeatmap::m_osu_pvs = &osu_pvs;
 ConVar *OsuBeatmap::m_osu_draw_hitobjects_ref = &osu_draw_hitobjects;
-ConVar *OsuBeatmap::m_osu_vr_draw_desktop_playfield_ref = &osu_vr_draw_desktop_playfield;
 ConVar *OsuBeatmap::m_osu_followpoints_prevfadetime_ref = &osu_followpoints_prevfadetime;
 ConVar *OsuBeatmap::m_osu_universal_offset_ref = &osu_universal_offset;
 ConVar *OsuBeatmap::m_osu_early_note_time_ref = &osu_early_note_time;
@@ -308,12 +305,6 @@ void OsuBeatmap::drawInt(Graphics *g) {
     if(isLoading()) m_osu->getHUD()->drawLoadingSmall(g);
 }
 
-void OsuBeatmap::drawVR(Graphics *g, Matrix4 &mvp, OsuVR *vr) {
-    if(!canDraw()) return;
-
-    // empty atm
-}
-
 void OsuBeatmap::drawDebug(Graphics *g) {
     if(osu_debug_draw_timingpoints.getBool()) {
         McFont *debugFont = engine->getResourceManager()->getFont("FONT_DEFAULT");
@@ -1050,7 +1041,7 @@ void OsuBeatmap::update() {
     }
 
     // hp drain & failing
-    if(osu_drain_type.getInt() > 0) {
+    if(osu_drain_type.getInt() > 1) {
         const int drainType = osu_drain_type.getInt();
 
         // handle constant drain
@@ -1111,10 +1102,6 @@ void OsuBeatmap::update() {
             bool hasFailed = false;
 
             switch(drainType) {
-                case 1:  // VR
-                    hasFailed = m_fHealth2 < 0.001f;
-                    break;
-
                 case 2:  // osu!stable
                     hasFailed = (m_fHealth < 0.001) && osu_drain_stable_passive_fail.getBool();
                     break;
@@ -1194,8 +1181,6 @@ void OsuBeatmap::skipEmptySection() {
 void OsuBeatmap::keyPressed1(bool mouse) {
     if(m_bContinueScheduled) m_bClickedContinue = !m_osu->getModSelector()->isMouseInside();
 
-    if(m_osu->isInVRMode() && !m_osu_vr_draw_desktop_playfield_ref->getBool()) return;
-
     if(osu_mod_fullalternate.getBool() && m_bPrevKeyWasKey1) {
         if(m_iCurrentHitObjectIndex > m_iAllowAnyNextKeyForFullAlternateUntilHitObjectIndex) {
             engine->getSound()->play(getSkin()->getCombobreak());
@@ -1232,8 +1217,6 @@ void OsuBeatmap::keyPressed1(bool mouse) {
 void OsuBeatmap::keyPressed2(bool mouse) {
     if(m_bContinueScheduled) m_bClickedContinue = !m_osu->getModSelector()->isMouseInside();
 
-    if(m_osu->isInVRMode() && !m_osu_vr_draw_desktop_playfield_ref->getBool()) return;
-
     if(osu_mod_fullalternate.getBool() && !m_bPrevKeyWasKey1) {
         if(m_iCurrentHitObjectIndex > m_iAllowAnyNextKeyForFullAlternateUntilHitObjectIndex) {
             engine->getSound()->play(getSkin()->getCombobreak());
@@ -1268,8 +1251,6 @@ void OsuBeatmap::keyPressed2(bool mouse) {
 }
 
 void OsuBeatmap::keyReleased1(bool mouse) {
-    if(m_osu->isInVRMode() && !m_osu_vr_draw_desktop_playfield_ref->getBool()) return;
-
     // key overlay
     m_osu->getHUD()->animateInputoverlay(1, false);
     m_osu->getHUD()->animateInputoverlay(3, false);
@@ -1280,8 +1261,6 @@ void OsuBeatmap::keyReleased1(bool mouse) {
 }
 
 void OsuBeatmap::keyReleased2(bool mouse) {
-    if(m_osu->isInVRMode() && !m_osu_vr_draw_desktop_playfield_ref->getBool()) return;
-
     // key overlay
     m_osu->getHUD()->animateInputoverlay(2, false);
     m_osu->getHUD()->animateInputoverlay(4, false);
@@ -1559,9 +1538,6 @@ void OsuBeatmap::pause(bool quitIfWaiting) {
     else
         onUnpaused();
 
-    // don't kill VR players while paused
-    if(m_osu_drain_type_ref->getInt() == 1) anim->deleteExistingAnimation(&m_fHealth2);
-
     // if we have failed, and the user early exits to the pause menu, stop the failing animation
     if(m_bFailed) anim->deleteExistingAnimation(&m_fFailAnim);
 }
@@ -1865,11 +1841,7 @@ float OsuBeatmap::getOD() const {
     return OD;
 }
 
-bool OsuBeatmap::isClickHeld() const {
-    return m_bClick1Held || m_bClick2Held ||
-           (m_osu->isInVRMode() && (!m_osu->getVR()->isVirtualCursorOnScreen() ||
-                                    !m_osu_vr_draw_desktop_playfield_ref->getBool()));  // a bit shit, but whatever
-}
+bool OsuBeatmap::isClickHeld() const { return m_bClick1Held || m_bClick2Held; }
 
 UString OsuBeatmap::getTitle() const {
     if(m_selectedDifficulty2 != NULL)
@@ -2025,7 +1997,7 @@ void OsuBeatmap::addScorePoints(int points, bool isSpinner) { m_osu->getScore()-
 
 void OsuBeatmap::addHealth(double percent, bool isFromHitResult) {
     const int drainType = osu_drain_type.getInt();
-    if(drainType < 1) return;
+    if(drainType < 2) return;
 
     // never drain before first hitobject
     if(m_hitobjects.size() > 0 && m_iCurMusicPosWithOffsets < m_hitobjects[0]->getTime()) return;
@@ -2051,18 +2023,7 @@ void OsuBeatmap::addHealth(double percent, bool isFromHitResult) {
         if(m_fHealth > 0.9) m_osu->getHUD()->animateKiExplode();
     }
 
-    switch(drainType) {
-        case 1:  // VR
-        {
-            const float targetHealth = clamp<float>(m_fHealth2 + percent, -0.1f, 1.0f);
-            m_fHealth = targetHealth;
-            anim->moveQuadOut(&m_fHealth2, targetHealth, osu_drain_vr_duration.getFloat(), true);
-        } break;
-
-        default:
-            m_fHealth = clamp<double>(m_fHealth + percent, 0.0, 1.0);
-            break;
-    }
+    m_fHealth = clamp<double>(m_fHealth + percent, 0.0, 1.0);
 
     // handle generic fail state (2)
     const bool isDead = m_fHealth < 0.001;
@@ -2258,7 +2219,7 @@ void OsuBeatmap::playMissSound() {
 }
 
 unsigned long OsuBeatmap::getMusicPositionMSInterpolated() {
-    if(!osu_interpolate_music_pos.getBool() || (m_bFailed && m_osu->isInVRMode()) || isLoading())
+    if(!osu_interpolate_music_pos.getBool() || isLoading())
         return m_music->getPositionMS();
     else {
         const double interpolationMultiplier = 1.0;

+ 0 - 3
src/App/Osu/OsuBeatmap.h

@@ -18,7 +18,6 @@ class Sound;
 class ConVar;
 
 class Osu;
-class OsuVR;
 class OsuSkin;
 class OsuHitObject;
 
@@ -39,7 +38,6 @@ class OsuBeatmap {
 
     virtual void draw(Graphics *g);
     virtual void drawInt(Graphics *g);
-    virtual void drawVR(Graphics *g, Matrix4 &mvp, OsuVR *vr);
     void drawDebug(Graphics *g);
     void drawBackground(Graphics *g);
     virtual void update();
@@ -210,7 +208,6 @@ class OsuBeatmap {
    protected:
     static ConVar *m_osu_pvs;
     static ConVar *m_osu_draw_hitobjects_ref;
-    static ConVar *m_osu_vr_draw_desktop_playfield_ref;
     static ConVar *m_osu_followpoints_prevfadetime_ref;
     static ConVar *m_osu_universal_offset_ref;
     static ConVar *m_osu_early_note_time_ref;

+ 5 - 233
src/App/Osu/OsuBeatmapStandard.cpp

@@ -40,7 +40,6 @@
 #include "OsuSlider.h"
 #include "OsuSongBrowser2.h"
 #include "OsuSpinner.h"
-#include "OsuVR.h"
 #include "ResourceManager.h"
 #include "SoundEngine.h"
 
@@ -165,9 +164,6 @@ OsuBeatmapStandard::OsuBeatmapStandard(Osu *osu) : OsuBeatmap(osu) {
     m_fPrevPlayfieldStretchY = 0.0f;
     m_fPrevHitCircleDiameterForStarCache = 1.0f;
     m_fPrevSpeedForStarCache = 1.0f;
-
-    m_bIsVRDraw = false;
-
     m_bIsPreLoading = true;
     m_iPreLoadingIndex = 0;
 
@@ -242,9 +238,6 @@ void OsuBeatmapStandard::draw(Graphics *g) {
         g->drawLine((int)(center.x - length), center.y, (int)(center.x + length + 1), center.y);
     }
 
-    // allow players to not draw all hitobjects twice if in VR
-    if(m_osu->isInVRMode() && !m_osu_vr_draw_desktop_playfield_ref->getBool()) return;
-
     // draw followpoints
     if(osu_draw_followpoints.getBool() && !OsuGameRules::osu_mod_mafham.getBool()) drawFollowPoints(g);
 
@@ -314,122 +307,6 @@ void OsuBeatmapStandard::drawInt(Graphics *g) {
     }
 }
 
-void OsuBeatmapStandard::drawVR(Graphics *g, Matrix4 &mvp, OsuVR *vr) {
-    OsuBeatmap::drawVR(g, mvp, vr);
-    if(!canDraw()) return;
-
-    m_bIsVRDraw =
-        true;  // this flag is used by getHitcircleDiameter() and osuCoords2Pixels(), for easier backwards compatibility
-    {
-        updateHitobjectMetrics();  // needed for raw hitcircleDiameter
-
-        // draw playfield border
-        if(osu_draw_playfield_border.getBool()) {
-            vr->getShaderUntexturedLegacyGeneric()->enable();
-            {
-                vr->getShaderUntexturedLegacyGeneric()->setUniformMatrix4fv("matrix", mvp);
-                g->setColor(0xffffffff);
-                m_osu->getHUD()->drawPlayfieldBorder(
-                    g, Vector2(0, 0), Vector2(OsuGameRules::OSU_COORD_WIDTH, OsuGameRules::OSU_COORD_HEIGHT),
-                    getHitcircleDiameter());
-            }
-            vr->getShaderUntexturedLegacyGeneric()->disable();
-        }
-
-        // only start drawing the rest of the playfield if the music has loaded
-        if(!isLoading()) {
-            // draw all hitobjects in reverse
-            if(m_osu_draw_hitobjects_ref->getBool()) {
-                g->setDepthBuffer(false);
-                vr->getShaderTexturedLegacyGeneric()->enable();
-                {
-                    const long curPos = m_iCurMusicPosWithOffsets;
-                    const long pvs = getPVS();
-                    const bool usePVS = m_osu_pvs->getBool();
-
-                    if(!osu_draw_reverse_order.getBool()) {
-                        for(int i = m_hitobjectsSortedByEndTime.size() - 1; i >= 0; i--) {
-                            // PVS optimization (reversed)
-                            if(usePVS) {
-                                if(m_hitobjectsSortedByEndTime[i]->isFinished() &&
-                                   (curPos - pvs > m_hitobjectsSortedByEndTime[i]->getTime() +
-                                                       m_hitobjectsSortedByEndTime[i]->getDuration()))  // past objects
-                                    break;
-                                if(m_hitobjectsSortedByEndTime[i]->getTime() > curPos + pvs)  // future objects
-                                    continue;
-                            }
-
-                            m_hitobjectsSortedByEndTime[i]->drawVR(g, mvp, vr);
-                        }
-                    } else {
-                        for(int i = 0; i < m_hitobjectsSortedByEndTime.size(); i++) {
-                            // PVS optimization
-                            if(usePVS) {
-                                if(m_hitobjectsSortedByEndTime[i]->isFinished() &&
-                                   (curPos - pvs > m_hitobjectsSortedByEndTime[i]->getTime() +
-                                                       m_hitobjectsSortedByEndTime[i]->getDuration()))  // past objects
-                                    continue;
-                                if(m_hitobjectsSortedByEndTime[i]->getTime() > curPos + pvs)  // future objects
-                                    break;
-                            }
-
-                            m_hitobjectsSortedByEndTime[i]->drawVR(g, mvp, vr);
-                        }
-                    }
-                    if(OsuHitObject::m_osu_vr_draw_approach_circles->getBool() &&
-                       OsuHitObject::m_osu_vr_approach_circles_on_top->getBool()) {
-                        for(int i = 0; i < m_hitobjectsSortedByEndTime.size(); i++) {
-                            // PVS optimization
-                            if(usePVS) {
-                                if(m_hitobjectsSortedByEndTime[i]->isFinished() &&
-                                   (curPos - pvs > m_hitobjectsSortedByEndTime[i]->getTime() +
-                                                       m_hitobjectsSortedByEndTime[i]->getDuration()))  // past objects
-                                    continue;
-                                if(m_hitobjectsSortedByEndTime[i]->getTime() > curPos + pvs)  // future objects
-                                    break;
-                            }
-
-                            m_hitobjectsSortedByEndTime[i]->drawVR2(g, mvp, vr);
-                        }
-                    }
-                }
-                vr->getShaderTexturedLegacyGeneric()->disable();
-                g->setDepthBuffer(true);
-            }
-
-            if(m_bFailed) {
-                vr->getShaderUntexturedLegacyGeneric()->enable();
-                vr->getShaderUntexturedLegacyGeneric()->setUniformMatrix4fv("matrix", mvp);
-                {
-                    Vector2 vrPlayfieldCenter = Vector2(0, 0);
-                    Vector2 vrPlayfieldSize = Vector2(OsuGameRules::OSU_COORD_WIDTH, OsuGameRules::OSU_COORD_HEIGHT);
-                    float vrHitcircleDiameter = getHitcircleDiameter();
-
-                    float failTimePercentInv =
-                        1.0f - m_fFailAnim;  // goes from 0 to 1 over the duration of osu_fail_time
-                    Vector2 playfieldBorderTopLeft =
-                        Vector2((int)(vrPlayfieldCenter.x - vrPlayfieldSize.x / 2 - vrHitcircleDiameter / 2),
-                                (int)(vrPlayfieldCenter.y - vrPlayfieldSize.y / 2 - vrHitcircleDiameter / 2));
-                    Vector2 playfieldBorderSize = Vector2((int)(vrPlayfieldSize.x + vrHitcircleDiameter),
-                                                          (int)(vrPlayfieldSize.y + vrHitcircleDiameter));
-
-                    g->setColor(0xff000000);
-                    g->setAlpha(failTimePercentInv);
-                    g->pushTransform();
-                    {
-                        g->translate(0, 0, 1.0f);
-                        g->fillRect(playfieldBorderTopLeft.x, playfieldBorderTopLeft.y, playfieldBorderSize.x,
-                                    playfieldBorderSize.y);
-                    }
-                    g->popTransform();
-                }
-                vr->getShaderUntexturedLegacyGeneric()->disable();
-            }
-        }
-    }
-    m_bIsVRDraw = false;
-}
-
 void OsuBeatmapStandard::drawFollowPoints(Graphics *g) {
     OsuSkin *skin = m_osu->getSkin();
 
@@ -779,10 +656,9 @@ void OsuBeatmapStandard::update() {
 
         double startTime = engine->getTimeReal();
         double delta = 0.0;
-        while(delta < 0.010 &&
-              m_bIsPreLoading)  // hardcoded VR deadline of 10 ms (11 but sanity), will temporarily bring us down to 45
-                                // fps on average (better than freezing). works fine for desktop gameplay too
-        {
+
+        // hardcoded deadline of 10 ms, will temporarily bring us down to 45fps on average (better than freezing)
+        while(delta < 0.010 && m_bIsPreLoading) {
             if(m_iPreLoadingIndex >= m_hitobjects.size()) {
                 m_bIsPreLoading = false;
                 debugLog("OsuBeatmapStandard: Preloading done.\n");
@@ -975,8 +851,6 @@ Vector2 OsuBeatmapStandard::pixels2OsuCoords(Vector2 pixelCoords) const {
 }
 
 Vector2 OsuBeatmapStandard::osuCoords2Pixels(Vector2 coords) const {
-    if(m_bIsVRDraw) return osuCoords2VRPixels(coords);
-
     if(m_osu->getModHR()) coords.y = OsuGameRules::OSU_COORD_HEIGHT - coords.y;
     if(osu_playfield_mirror_horizontal.getBool()) coords.y = OsuGameRules::OSU_COORD_HEIGHT - coords.y;
     if(osu_playfield_mirror_vertical.getBool()) coords.x = OsuGameRules::OSU_COORD_WIDTH - coords.x;
@@ -1114,104 +988,6 @@ Vector2 OsuBeatmapStandard::osuCoords2RawPixels(Vector2 coords) const {
     return coords;
 }
 
-Vector2 OsuBeatmapStandard::osuCoords2VRPixels(Vector2 coords) const {
-    if(m_osu->getModHR()) coords.y = OsuGameRules::OSU_COORD_HEIGHT - coords.y;
-    if(osu_playfield_mirror_horizontal.getBool()) coords.y = OsuGameRules::OSU_COORD_HEIGHT - coords.y;
-    if(osu_playfield_mirror_vertical.getBool()) coords.x = OsuGameRules::OSU_COORD_WIDTH - coords.x;
-
-    // wobble
-    if(osu_mod_wobble.getBool()) {
-        const float speedMultiplierCompensation = 1.0f / getSpeedMultiplier();
-        coords.x += std::sin((m_iCurMusicPos / 1000.0f) * 5 * speedMultiplierCompensation *
-                             osu_mod_wobble_frequency.getFloat()) *
-                    osu_mod_wobble_strength.getFloat();
-        coords.y += std::sin((m_iCurMusicPos / 1000.0f) * 4 * speedMultiplierCompensation *
-                             osu_mod_wobble_frequency.getFloat()) *
-                    osu_mod_wobble_strength.getFloat();
-    }
-
-    // wobble2
-    if(osu_mod_wobble2.getBool()) {
-        const float speedMultiplierCompensation = 1.0f / getSpeedMultiplier();
-        Vector2 centerDelta = coords - Vector2(OsuGameRules::OSU_COORD_WIDTH, OsuGameRules::OSU_COORD_HEIGHT) / 2;
-        coords.x += centerDelta.x * 0.25f *
-                    std::sin((m_iCurMusicPos / 1000.0f) * 5 * speedMultiplierCompensation *
-                             osu_mod_wobble_frequency.getFloat()) *
-                    osu_mod_wobble_strength.getFloat();
-        coords.y += centerDelta.y * 0.25f *
-                    std::sin((m_iCurMusicPos / 1000.0f) * 3 * speedMultiplierCompensation *
-                             osu_mod_wobble_frequency.getFloat()) *
-                    osu_mod_wobble_strength.getFloat();
-    }
-
-    // rotation
-    if(m_fPlayfieldRotation + osu_playfield_rotation.getFloat() != 0.0f) {
-        coords.x -= OsuGameRules::OSU_COORD_WIDTH / 2;
-        coords.y -= OsuGameRules::OSU_COORD_HEIGHT / 2;
-
-        Vector3 coords3 = Vector3(coords.x, coords.y, 0);
-        Matrix4 rot;
-        rot.rotateZ(m_fPlayfieldRotation + osu_playfield_rotation.getFloat());
-
-        coords3 = coords3 * rot;
-        coords3.x += OsuGameRules::OSU_COORD_WIDTH / 2;
-        coords3.y += OsuGameRules::OSU_COORD_HEIGHT / 2;
-
-        coords.x = coords3.x;
-        coords.y = coords3.y;
-    }
-
-    // if wobble, clamp coordinates
-    if(osu_mod_wobble.getBool() || osu_mod_wobble2.getBool()) {
-        coords.x = clamp<float>(coords.x, 0.0f, OsuGameRules::OSU_COORD_WIDTH);
-        coords.y = clamp<float>(coords.y, 0.0f, OsuGameRules::OSU_COORD_HEIGHT);
-    }
-
-    if(m_bFailed) {
-        float failTimePercentInv = 1.0f - m_fFailAnim;  // goes from 0 to 1 over the duration of osu_fail_time
-        failTimePercentInv *= failTimePercentInv;
-
-        coords.x -= OsuGameRules::OSU_COORD_WIDTH / 2;
-        coords.y -= OsuGameRules::OSU_COORD_HEIGHT / 2;
-
-        Vector3 coords3 = Vector3(coords.x, coords.y, 0);
-        Matrix4 rot;
-        rot.rotateZ(failTimePercentInv * 60.0f);
-
-        coords3 = coords3 * rot;
-        coords3.x += OsuGameRules::OSU_COORD_WIDTH / 2;
-        coords3.y += OsuGameRules::OSU_COORD_HEIGHT / 2;
-
-        coords.x = coords3.x + failTimePercentInv * OsuGameRules::OSU_COORD_WIDTH * 0.25f;
-        coords.y = coords3.y + failTimePercentInv * OsuGameRules::OSU_COORD_HEIGHT * 1.25f;
-    }
-
-    // VR center
-    coords.x -= OsuGameRules::OSU_COORD_WIDTH / 2;
-    coords.y -= OsuGameRules::OSU_COORD_HEIGHT / 2;
-
-    if(osu_playfield_circular.getBool()) {
-        // normalize to -1 +1
-        coords.x /= (float)OsuGameRules::OSU_COORD_WIDTH / 2.0f;
-        coords.y /= (float)OsuGameRules::OSU_COORD_HEIGHT / 2.0f;
-
-        // clamp (for sqrt) and transform
-        coords.x = clamp<float>(coords.x, -1.0f, 1.0f);
-        coords.y = clamp<float>(coords.y, -1.0f, 1.0f);
-        coords = mapNormalizedCoordsOntoUnitCircle(coords);
-
-        // and scale back up
-        coords.x *= (float)OsuGameRules::OSU_COORD_WIDTH / 2.0f;
-        coords.y *= (float)OsuGameRules::OSU_COORD_HEIGHT / 2.0f;
-    }
-
-    // VR scale
-    coords.x *= 1.0f + osu_playfield_stretch_x.getFloat();
-    coords.y *= 1.0f + osu_playfield_stretch_y.getFloat();
-
-    return coords;
-}
-
 Vector2 OsuBeatmapStandard::osuCoords2LegacyPixels(Vector2 coords) const {
     if(m_osu->getModHR()) coords.y = OsuGameRules::OSU_COORD_HEIGHT - coords.y;
     if(osu_playfield_mirror_horizontal.getBool()) coords.y = OsuGameRules::OSU_COORD_HEIGHT - coords.y;
@@ -1285,11 +1061,7 @@ Vector2 OsuBeatmapStandard::getFirstPersonCursorDelta() const {
            (m_osu->getModAuto() || m_osu->getModAutopilot() ? m_vAutoCursorPos : engine->getMouse()->getPos());
 }
 
-float OsuBeatmapStandard::getHitcircleDiameter() const {
-    // in VR, there is no resolution to which the playfield would have to get scaled up to (since the entire playfield
-    // is scaled at once as the player sees fit) therefore just return the raw hitcircle diameter (osu!pixels)
-    return m_bIsVRDraw ? m_fRawHitcircleDiameter : m_fHitcircleDiameter;
-}
+float OsuBeatmapStandard::getHitcircleDiameter() const { return m_fHitcircleDiameter; }
 
 void OsuBeatmapStandard::onBeforeLoad() {
     debugLog("OsuBeatmapStandard::onBeforeLoad()\n");
@@ -1865,7 +1637,7 @@ void OsuBeatmapStandard::computeDrainRate() {
     m_fHpMultiplierNormal = 1.0;
     m_fHpMultiplierComboEnd = 1.0;
 
-    if(m_osu->isInVRMode() || m_hitobjects.size() < 1 || m_selectedDifficulty2 == NULL) return;
+    if(m_hitobjects.size() < 1 || m_selectedDifficulty2 == NULL) return;
 
     debugLog("OsuBeatmapStandard: Calculating drain ...\n");
 

+ 0 - 4
src/App/Osu/OsuBeatmapStandard.h

@@ -19,7 +19,6 @@ class OsuBeatmapStandard : public OsuBeatmap {
 
     virtual void draw(Graphics *g);
     virtual void drawInt(Graphics *g);
-    virtual void drawVR(Graphics *g, Matrix4 &mvp, OsuVR *vr);
     virtual void update();
 
     virtual void onModUpdate() { onModUpdate(true, true); }
@@ -32,8 +31,6 @@ class OsuBeatmapStandard : public OsuBeatmap {
         Vector2 coords) const;  // hitobjects should use this one (includes lots of special behaviour)
     Vector2 osuCoords2RawPixels(
         Vector2 coords) const;  // raw transform from osu!pixels to absolute screen pixels (without any mods whatsoever)
-    Vector2 osuCoords2VRPixels(Vector2 coords)
-        const;  // this gets called by osuCoords2Pixels() during a VR draw(), for easier backwards compatibility
     Vector3 osuCoordsTo3D(Vector2 coords, const OsuHitObject *hitObject) const;
     Vector3 osuCoordsToRaw3D(Vector2 coords) const;  // (without any mods whatsoever)
     Vector2 osuCoords2LegacyPixels(
@@ -179,7 +176,6 @@ class OsuBeatmapStandard : public OsuBeatmap {
     // custom
     bool m_bIsPreLoading;
     int m_iPreLoadingIndex;
-    bool m_bIsVRDraw;      // for switching legacy drawing to osuCoords2Pixels/osuCoords2VRPixels
     bool m_bWasHREnabled;  // dynamic stack recalculation
 
     RenderTarget *m_mafhamActiveRenderTarget;

+ 1 - 0
src/App/Osu/OsuChangelog.cpp

@@ -36,6 +36,7 @@ OsuChangelog::OsuChangelog(Osu *osu) : OsuScreenBackable(osu) {
     CHANGELOG latest;
     latest.title =
         UString::format("%.2f (%s, %s)", convar->getConVarByName("osu_version")->getFloat(), __DATE__, __TIME__);
+    latest.changes.push_back("- Removed VR support");
     changelogs.push_back(latest);
 
     CHANGELOG v34_08;

+ 2 - 99
src/App/Osu/OsuCircle.cpp

@@ -15,15 +15,12 @@
 #include "OpenGLES2Interface.h"
 #include "OpenGLHeaders.h"
 #include "OpenGLLegacyInterface.h"
-#include "OpenVRController.h"
-#include "OpenVRInterface.h"
 #include "Osu.h"
 #include "OsuBeatmapStandard.h"
 #include "OsuGameRules.h"
 #include "OsuModFPoSu.h"
 #include "OsuSkin.h"
 #include "OsuSkinImage.h"
-#include "OsuVR.h"
 #include "ResourceManager.h"
 #include "SoundEngine.h"
 
@@ -430,8 +427,6 @@ OsuCircle::OsuCircle(int x, int y, long time, int sampleType, int comboNumber, b
     m_bWaiting = false;
     m_fHitAnimation = 0.0f;
     m_fShakeAnimation = 0.0f;
-
-    m_bOnHitVRLeftControllerHapticFeedback = false;
 }
 
 OsuCircle::~OsuCircle() { onReset(0); }
@@ -515,53 +510,6 @@ void OsuCircle::draw2(Graphics *g) {
                        m_bWaiting && !hd ? 1.0f : m_fAlphaForApproachCircle, m_bOverrideHDApproachCircle);
 }
 
-void OsuCircle::drawVR(Graphics *g, Matrix4 &mvp, OsuVR *vr) {
-    // TODO: performance! if nothing of the circle is visible, then we don't have to calculate anything
-    /// if (m_bVisible)
-    {
-        float clampedApproachScalePercent =
-            m_fApproachScale - 1.0f;  // goes from <m_osu_approach_scale_multiplier_ref> to 0
-        clampedApproachScalePercent =
-            clamp<float>(clampedApproachScalePercent / m_osu_approach_scale_multiplier_ref->getFloat(), 0.0f,
-                         1.0f);  // goes from 1 to 0
-
-        Matrix4 translation;
-        translation.translate(0, 0, -clampedApproachScalePercent * vr->getApproachDistance());
-        Matrix4 finalMVP = mvp * translation;
-
-        vr->getShaderTexturedLegacyGeneric()->setUniformMatrix4fv("matrix", finalMVP);
-        draw(g);
-
-        if(m_osu_vr_draw_approach_circles->getBool() && !m_osu_vr_approach_circles_on_top->getBool()) {
-            if(m_osu_vr_approach_circles_on_playfield->getBool())
-                vr->getShaderTexturedLegacyGeneric()->setUniformMatrix4fv("matrix", mvp);
-
-            draw2(g);
-        }
-    }
-}
-
-void OsuCircle::drawVR2(Graphics *g, Matrix4 &mvp, OsuVR *vr) {
-    // TODO: performance! if nothing of the circle is visible, then we don't have to calculate anything
-    /// if (m_bVisible)
-    {
-        float clampedApproachScalePercent =
-            m_fApproachScale - 1.0f;  // goes from <m_osu_approach_scale_multiplier_ref> to 0
-        clampedApproachScalePercent =
-            clamp<float>(clampedApproachScalePercent / m_osu_approach_scale_multiplier_ref->getFloat(), 0.0f,
-                         1.0f);  // goes from 1 to 0
-
-        if(m_osu_vr_approach_circles_on_playfield->getBool()) clampedApproachScalePercent = 0.0f;
-
-        Matrix4 translation;
-        translation.translate(0, 0, -clampedApproachScalePercent * vr->getApproachDistance());
-        Matrix4 finalMVP = mvp * translation;
-
-        vr->getShaderTexturedLegacyGeneric()->setUniformMatrix4fv("matrix", finalMVP);
-        draw2(g);
-    }
-}
-
 void OsuCircle::update(long curPos) {
     OsuHitObject::update(curPos);
 
@@ -572,31 +520,12 @@ void OsuCircle::update(long curPos) {
         } else {
             const long delta = curPos - m_iTime;
 
-            if(m_beatmap->getOsu()->getModRelax() || m_beatmap->getOsu()->isInVRMode()) {
+            if(m_beatmap->getOsu()->getModRelax()) {
                 if(curPos >= m_iTime + (long)m_osu_relax_offset_ref->getInt() && !m_beatmap->isPaused() &&
                    !m_beatmap->isContinueScheduled()) {
                     const Vector2 pos = m_beatmap->osuCoords2Pixels(m_vRawPos);
                     const float cursorDelta = (m_beatmap->getCursorPos() - pos).length();
-
-                    float vrCursor1Delta = 0.0f;
-                    float vrCursor2Delta = 0.0f;
-                    bool vrCursor1Inside = false;
-                    bool vrCursor2Inside = false;
-                    if(m_beatmap->getOsu()->isInVRMode()) {
-                        vrCursor1Delta =
-                            (m_beatmap->getOsu()->getVR()->getCursorPos1() - m_beatmap->osuCoords2VRPixels(m_vRawPos))
-                                .length();
-                        vrCursor2Delta =
-                            (m_beatmap->getOsu()->getVR()->getCursorPos2() - m_beatmap->osuCoords2VRPixels(m_vRawPos))
-                                .length();
-                        vrCursor1Inside = vrCursor1Delta < ((m_beatmap->getRawHitcircleDiameter() / 2.0f) *
-                                                            m_beatmap->getOsu()->getVR()->getCircleHitboxScale());
-                        vrCursor2Inside = vrCursor2Delta < ((m_beatmap->getRawHitcircleDiameter() / 2.0f) *
-                                                            m_beatmap->getOsu()->getVR()->getCircleHitboxScale());
-                    }
-
-                    if((cursorDelta < m_beatmap->getHitcircleDiameter() / 2.0f && m_beatmap->getOsu()->getModRelax()) ||
-                       (vrCursor1Inside || vrCursor2Inside)) {
+                    if((cursorDelta < m_beatmap->getHitcircleDiameter() / 2.0f && m_beatmap->getOsu()->getModRelax())) {
                         OsuScore::HIT result = OsuGameRules::getHitResult(delta, m_beatmap);
 
                         if(result != OsuScore::HIT::HIT_NULL) {
@@ -604,24 +533,6 @@ void OsuCircle::update(long curPos) {
                             const float targetAngle = rad2deg(
                                 atan2(m_beatmap->getCursorPos().y - pos.y, m_beatmap->getCursorPos().x - pos.x));
 
-                            if(m_beatmap->getOsu()->isInVRMode()) {
-                                // distance to circle
-                                if(vrCursor1Delta < vrCursor2Delta)
-                                    m_bOnHitVRLeftControllerHapticFeedback = true;
-                                else
-                                    m_bOnHitVRLeftControllerHapticFeedback = false;
-
-                                // distance to playfield, if both cursors were valid (overrides distance to circle for
-                                // haptic feedback)
-                                if(vrCursor1Inside && vrCursor2Inside) {
-                                    if(m_beatmap->getOsu()->getVR()->getCursorDist1() <
-                                       m_beatmap->getOsu()->getVR()->getCursorDist2())
-                                        m_bOnHitVRLeftControllerHapticFeedback = true;
-                                    else
-                                        m_bOnHitVRLeftControllerHapticFeedback = false;
-                                }
-                            }
-
                             onHit(result, delta, targetDelta, targetAngle);
                         }
                     }
@@ -691,14 +602,6 @@ void OsuCircle::onHit(OsuScore::HIT result, long delta, float targetDelta, float
 
         m_fHitAnimation = 0.001f;  // quickfix for 1 frame missing images
         anim->moveQuadOut(&m_fHitAnimation, 1.0f, OsuGameRules::getFadeOutTime(m_beatmap), true);
-
-        if(m_beatmap->getOsu()->isInVRMode()) {
-            if(m_bOnHitVRLeftControllerHapticFeedback)
-                openvr->getLeftController()->triggerHapticPulse(m_beatmap->getOsu()->getVR()->getHapticPulseStrength());
-            else
-                openvr->getRightController()->triggerHapticPulse(
-                    m_beatmap->getOsu()->getVR()->getHapticPulseStrength());
-        }
     }
 
     // add it, and we are finished

+ 0 - 4
src/App/Osu/OsuCircle.h

@@ -64,8 +64,6 @@ class OsuCircle : public OsuHitObject {
 
     virtual void draw(Graphics *g);
     virtual void draw2(Graphics *g);
-    virtual void drawVR(Graphics *g, Matrix4 &mvp, OsuVR *vr);
-    virtual void drawVR2(Graphics *g, Matrix4 &mvp, OsuVR *vr);
     virtual void update(long curPos);
 
     virtual bool isCircle() { return true; }
@@ -95,8 +93,6 @@ class OsuCircle : public OsuHitObject {
     bool m_bWaiting;
     float m_fHitAnimation;
     float m_fShakeAnimation;
-
-    bool m_bOnHitVRLeftControllerHapticFeedback;
 };
 
 #endif

+ 2 - 2
src/App/Osu/OsuDatabase.cpp

@@ -1786,7 +1786,7 @@ void OsuDatabase::loadScores() {
         const unsigned char hackIsImportedLegacyScoreFlag =
             0xA9;  // TODO: remove this once all builds on steam (even previous-version) have loading version cap logic
 
-        Packet db = load_db(m_osu->isInVRMode() ? "scoresvr.db" : "scores.db");
+        Packet db = load_db("scores.db");
         if(db.size > 0) {
             customScoresFileSize = db.size;
 
@@ -2182,7 +2182,7 @@ void OsuDatabase::saveScores() {
             }
         }
 
-        if(!save_db(&db, (m_osu->isInVRMode() ? "scoresvr.db" : "scores.db"))) {
+        if(!save_db(&db, ("scores.db"))) {
             debugLog("Couldn't write scores.db!\n");
         }
 

+ 7 - 281
src/App/Osu/OsuHUD.cpp

@@ -34,7 +34,6 @@
 #include "OsuSkinImage.h"
 #include "OsuSongBrowser2.h"
 #include "OsuUIAvatar.h"
-#include "OsuVR.h"
 #include "ResourceManager.h"
 #include "Shader.h"
 #include "VertexArrayObject.h"
@@ -272,15 +271,6 @@ OsuHUD::OsuHUD(Osu *osu) : OsuScreen(osu) {
     m_cursorTrail.reserve(osu_cursor_trail_max_size.getInt() * 2);
     if(env->getOS() == Environment::OS::OS_HORIZON) m_cursorTrail2.reserve(osu_cursor_trail_max_size.getInt() * 2);
 
-    m_cursorTrailShaderVR = NULL;
-    if(m_osu->isInVRMode()) {
-        m_cursorTrailShaderVR =
-            engine->getResourceManager()->loadShader("cursortrailVR.vsh", "cursortrailVR.fsh", "cursortrailVR");
-        m_cursorTrailVR1.reserve(osu_cursor_trail_max_size.getInt() * 2);
-        m_cursorTrailVR2.reserve(osu_cursor_trail_max_size.getInt() * 2);
-        m_cursorTrailSpectator1.reserve(osu_cursor_trail_max_size.getInt() * 2);
-        m_cursorTrailSpectator2.reserve(osu_cursor_trail_max_size.getInt() * 2);
-    }
     m_cursorTrailVAO = engine->getResourceManager()->createVertexArrayObject(Graphics::PRIMITIVE::PRIMITIVE_QUADS,
                                                                              Graphics::USAGE_TYPE::USAGE_DYNAMIC);
 
@@ -559,131 +549,22 @@ void OsuHUD::drawDummy(Graphics *g) {
     if(osu_draw_hiterrorbar.getBool()) drawHitErrorBar(g, 50, 100, 150, 400, 70);
 }
 
-void OsuHUD::drawVR(Graphics *g, Matrix4 &mvp, OsuVR *vr) {
-    OsuBeatmapStandard *beatmap = dynamic_cast<OsuBeatmapStandard *>(m_osu->getSelectedBeatmap());
-    if(beatmap == NULL) return;  // sanity check
-
-    vr->getShaderTexturedLegacyGeneric()->enable();
-    vr->getShaderTexturedLegacyGeneric()->setUniformMatrix4fv("matrix", mvp);
-    {
-        if(osu_draw_hud.getBool()) {
-            if(osu_draw_scorebarbg.getBool())
-                drawScorebarBg(g,
-                               osu_hud_scorebar_hide_during_breaks.getBool()
-                                   ? (1.0f - beatmap->getBreakBackgroundFadeAnim())
-                                   : 1.0f,
-                               m_fScoreBarBreakAnim);
-
-            if(osu_draw_scorebar.getBool())
-                drawHPBar(g, m_fHealth,
-                          osu_hud_scorebar_hide_during_breaks.getBool() ? (1.0f - beatmap->getBreakBackgroundFadeAnim())
-                                                                        : 1.0f,
-                          m_fScoreBarBreakAnim);
-
-            if(!m_osu->isSkipScheduled() && beatmap->isInSkippableSection() &&
-               ((m_osu_skip_intro_enabled_ref->getBool() && beatmap->getHitObjectIndexForCurrentTime() < 1) ||
-                (m_osu_skip_breaks_enabled_ref->getBool() && beatmap->getHitObjectIndexForCurrentTime() > 0)))
-                drawSkip(g);
-
-            const int hitObjectIndexForCurrentTime =
-                (beatmap->getHitObjectIndexForCurrentTime() < 1 ? -1 : beatmap->getHitObjectIndexForCurrentTime());
-
-            drawStatistics(g, m_osu->getScore()->getNumMisses(), m_osu->getScore()->getNumSliderBreaks(),
-                           beatmap->getMaxPossibleCombo(),
-                           OsuDifficultyCalculator::calculateTotalStarsFromSkills(
-                               beatmap->getAimStarsForUpToHitObjectIndex(hitObjectIndexForCurrentTime),
-                               beatmap->getSpeedStarsForUpToHitObjectIndex(hitObjectIndexForCurrentTime)),
-                           m_osu->getSongBrowser()->getDynamicStarCalculator()->getTotalStars(),
-                           beatmap->getMostCommonBPM(),
-                           OsuGameRules::getApproachRateForSpeedMultiplier(beatmap, beatmap->getSpeedMultiplier()),
-                           beatmap->getCS(),
-                           OsuGameRules::getOverallDifficultyForSpeedMultiplier(beatmap, beatmap->getSpeedMultiplier()),
-                           beatmap->getHP(), beatmap->getNPS(), beatmap->getND(), m_osu->getScore()->getUnstableRate(),
-                           m_osu->getScore()->getPPv2(), m_osu->getSongBrowser()->getDynamicStarCalculator()->getPPv2(),
-                           ((int)OsuGameRules::getHitWindow300(beatmap) - 0.5f) *
-                               (1.0f / m_osu->getSpeedMultiplier()),  // see OsuUISongBrowserInfoLabel::update()
-                           m_osu->getScore()->getHitErrorAvgCustomMin(), m_osu->getScore()->getHitErrorAvgCustomMax());
-
-            if(osu_draw_score.getBool()) drawScore(g, m_osu->getScore()->getScore());
-
-            if(osu_draw_combo.getBool()) drawCombo(g, m_osu->getScore()->getCombo());
-
-            if(osu_draw_progressbar.getBool())
-                drawProgressBarVR(g, mvp, vr, beatmap->getPercentFinishedPlayable(), beatmap->isWaiting());
-
-            if(osu_draw_accuracy.getBool()) drawAccuracy(g, m_osu->getScore()->getAccuracy() * 100.0f);
-        }
-
-        if(beatmap->shouldFlashSectionPass()) drawSectionPass(g, beatmap->shouldFlashSectionPass());
-        if(beatmap->shouldFlashSectionFail()) drawSectionFail(g, beatmap->shouldFlashSectionFail());
-
-        if(beatmap->shouldFlashWarningArrows()) drawWarningArrows(g, beatmap->getHitcircleDiameter());
-
-        if(beatmap->isLoading()) drawLoadingSmall(g);
-    }
-    vr->getShaderTexturedLegacyGeneric()->disable();
-}
-
-void OsuHUD::drawVRDummy(Graphics *g, Matrix4 &mvp, OsuVR *vr) {
-    vr->getShaderTexturedLegacyGeneric()->enable();
-    vr->getShaderTexturedLegacyGeneric()->setUniformMatrix4fv("matrix", mvp);
-    {
-        if(osu_draw_scorebarbg.getBool()) drawScorebarBg(g, 1.0f, 0.0f);
-
-        if(osu_draw_scorebar.getBool()) drawHPBar(g, 1.0, 1.0f, 0.0f);
-
-        SCORE_ENTRY scoreEntry;
-        scoreEntry.name = m_name_ref->getString();
-        scoreEntry.combo = 1234;
-        scoreEntry.score = 12345678;
-        scoreEntry.accuracy = 1.0f;
-        scoreEntry.dead = false;
-        scoreEntry.highlight = true;
-        if((osu_draw_scoreboard.getBool() && !bancho.is_playing_a_multi_map()) ||
-           (osu_draw_scoreboard_mp.getBool() && bancho.is_playing_a_multi_map())) {
-            static std::vector<SCORE_ENTRY> scoreEntries;
-            scoreEntries.clear();
-            { scoreEntries.push_back(scoreEntry); }
-        }
-
-        drawSkip(g);
-
-        drawStatistics(g, 0, 0, 727, 2.3f, 5.5f, 180, 9.0f, 4.0f, 8.0f, 6.0f, 4, 6, 90.0f, 123, 1234, 25, -5, 15);
-
-        if(osu_draw_score.getBool()) drawScore(g, scoreEntry.score);
-
-        if(osu_draw_combo.getBool()) drawCombo(g, scoreEntry.combo);
-
-        if(osu_draw_progressbar.getBool()) drawProgressBarVR(g, mvp, vr, 0.25f, false);
-
-        if(osu_draw_accuracy.getBool()) drawAccuracy(g, scoreEntry.accuracy * 100.0f);
-
-        drawWarningArrows(g);
-    }
-    vr->getShaderTexturedLegacyGeneric()->disable();
-}
-
 void OsuHUD::drawCursor(Graphics *g, Vector2 pos, float alphaMultiplier, bool secondTrail, bool updateAndDrawTrail) {
     if(osu_draw_cursor_ripples.getBool() && (!m_osu_mod_fposu_ref->getBool() || !m_osu->isInPlayMode()))
         drawCursorRipples(g);
 
-    const bool vrTrailJumpFix = (m_osu->isInVRMode() && !m_osu->getVR()->isVirtualCursorOnScreen());
-
     Matrix4 mvp;
     drawCursorInt(g, m_cursorTrailShader, secondTrail ? m_cursorTrail2 : m_cursorTrail, mvp, pos, alphaMultiplier,
-                  vrTrailJumpFix, updateAndDrawTrail);
+                  false, updateAndDrawTrail);
 }
 
 void OsuHUD::drawCursorTrail(Graphics *g, Vector2 pos, float alphaMultiplier, bool secondTrail) {
-    const bool vrTrailJumpFix = (m_osu->isInVRMode() && !m_osu->getVR()->isVirtualCursorOnScreen());
     const bool fposuTrailJumpFix = (m_osu_mod_fposu_ref->getBool() && m_osu->isInPlayMode() &&
                                     !m_osu->getFPoSu()->isCrosshairIntersectingScreen());
 
-    const bool trailJumpFix = (vrTrailJumpFix || fposuTrailJumpFix);
-
     Matrix4 mvp;
     drawCursorTrailInt(g, m_cursorTrailShader, secondTrail ? m_cursorTrail2 : m_cursorTrail, mvp, pos, alphaMultiplier,
-                       trailJumpFix);
+                       fposuTrailJumpFix);
 }
 
 void OsuHUD::drawCursorSpectator1(Graphics *g, Vector2 pos, float alphaMultiplier) {
@@ -696,14 +577,6 @@ void OsuHUD::drawCursorSpectator2(Graphics *g, Vector2 pos, float alphaMultiplie
     drawCursorInt(g, m_cursorTrailShader, m_cursorTrailSpectator2, mvp, pos, alphaMultiplier);
 }
 
-void OsuHUD::drawCursorVR1(Graphics *g, Matrix4 &mvp, Vector2 pos, float alphaMultiplier) {
-    drawCursorInt(g, m_cursorTrailShaderVR, m_cursorTrailVR1, mvp, pos, alphaMultiplier);
-}
-
-void OsuHUD::drawCursorVR2(Graphics *g, Matrix4 &mvp, Vector2 pos, float alphaMultiplier) {
-    drawCursorInt(g, m_cursorTrailShaderVR, m_cursorTrailVR2, mvp, pos, alphaMultiplier);
-}
-
 void OsuHUD::drawCursorInt(Graphics *g, Shader *trailShader, std::vector<CURSORTRAIL> &trail, Matrix4 &mvp, Vector2 pos,
                            float alphaMultiplier, bool emptyTrailFrame, bool updateAndDrawTrail) {
     if(updateAndDrawTrail) drawCursorTrailInt(g, trailShader, trail, mvp, pos, alphaMultiplier, emptyTrailFrame);
@@ -727,11 +600,6 @@ void OsuHUD::drawCursorTrailInt(Graphics *g, Shader *trailShader, std::vector<CU
         // add the sample for the current frame
         addCursorTrailPosition(trail, pos, emptyTrailFrame);
 
-        // disable depth buffer for drawing any trail in VR
-        if(trailShader == m_cursorTrailShaderVR) {
-            g->setDepthBuffer(false);
-        }
-
         // this loop draws the old style trail, and updates the alpha values for each segment, and fills the vao for the
         // new style trail
         const float trailLength =
@@ -777,10 +645,6 @@ void OsuHUD::drawCursorTrailInt(Graphics *g, Shader *trailShader, std::vector<CU
         if(smoothCursorTrail) {
             trailShader->enable();
             {
-                if(trailShader == m_cursorTrailShaderVR) {
-                    trailShader->setUniformMatrix4fv("matrix", mvp);
-                }
-
                 trailShader->setUniform1f("time", engine->getTime());
 
 #ifdef MCENGINE_FEATURE_OPENGLES
@@ -807,10 +671,6 @@ void OsuHUD::drawCursorTrailInt(Graphics *g, Shader *trailShader, std::vector<CU
             }
             trailShader->disable();
         }
-
-        if(trailShader == m_cursorTrailShaderVR) {
-            g->setDepthBuffer(true);
-        }
     }
 
     // trail cleanup
@@ -954,10 +814,9 @@ void OsuHUD::drawFps(Graphics *g, McFont *font, float fps) {
     g->popTransform();
 
     // top
-    if(fps >= 200 || (m_osu->isInVRMode() && fps >= 80) || (env->getOS() == Environment::OS::OS_HORIZON && fps >= 50))
+    if(fps >= 200 || (env->getOS() == Environment::OS::OS_HORIZON && fps >= 50))
         g->setColor(0xffffffff);
-    else if(fps >= 120 || (m_osu->isInVRMode() && fps >= 60) ||
-            (env->getOS() == Environment::OS::OS_HORIZON && fps >= 40))
+    else if(fps >= 120 || (env->getOS() == Environment::OS::OS_HORIZON && fps >= 40))
         g->setColor(0xffdddd00);
     else {
         const float pulse = std::abs(std::sin(engine->getTime() * 4));
@@ -1322,7 +1181,7 @@ void OsuHUD::drawCombo(Graphics *g, int combo) {
         {
             g->scale(scale, scale);
             g->translate(offset, m_osu->getScreenHeight() - m_osu->getSkin()->getCombo0()->getHeight() * scale / 2.0f,
-                         m_osu->isInVRMode() ? 0.25f : 0.0f);
+                         0.0f);
             drawComboNumber(g, combo, scale);
 
             // draw 'x' at the end
@@ -1344,7 +1203,7 @@ void OsuHUD::drawCombo(Graphics *g, int combo) {
     {
         g->scale(scale, scale);
         g->translate(offset, m_osu->getScreenHeight() - m_osu->getSkin()->getCombo0()->getHeight() * scale / 2.0f,
-                     m_osu->isInVRMode() ? 0.45f : 0.0f);
+                     0.0f);
         drawComboNumber(g, combo, scale);
 
         // draw 'x' at the end
@@ -1386,53 +1245,25 @@ void OsuHUD::drawScorebarBg(Graphics *g, float alpha, float breakAnim) {
     const float ratio = Osu::getImageScale(m_osu, Vector2(1, 1), 1.0f);
 
     const Vector2 breakAnimOffset = Vector2(0, -20.0f * breakAnim) * ratio;
-
-    if(m_osu->isInVRDraw()) {
-        g->pushTransform();
-        g->translate(0.0f, 0.0f, -0.2f);
-    }
-
     g->setColor(0xffffffff);
     g->setAlpha(alpha * (1.0f - breakAnim));
     m_osu->getSkin()->getScorebarBg()->draw(
         g, (m_osu->getSkin()->getScorebarBg()->getSize() / 2.0f) * scale + (breakAnimOffset * scale), scale);
-
-    if(m_osu->isInVRDraw()) {
-        g->popTransform();
-    }
 }
 
 void OsuHUD::drawSectionPass(Graphics *g, float alpha) {
     if(!m_osu->getSkin()->getSectionPassImage()->isMissingTexture()) {
-        if(m_osu->isInVRDraw()) {
-            g->pushTransform();
-            g->translate(0.0f, 0.0f, 0.2f);
-        }
-
         g->setColor(0xffffffff);
         g->setAlpha(alpha);
         m_osu->getSkin()->getSectionPassImage()->draw(g, m_osu->getScreenSize() / 2);
-
-        if(m_osu->isInVRDraw()) {
-            g->popTransform();
-        }
     }
 }
 
 void OsuHUD::drawSectionFail(Graphics *g, float alpha) {
     if(!m_osu->getSkin()->getSectionFailImage()->isMissingTexture()) {
-        if(m_osu->isInVRDraw()) {
-            g->pushTransform();
-            g->translate(0.0f, 0.0f, 0.2f);
-        }
-
         g->setColor(0xffffffff);
         g->setAlpha(alpha);
         m_osu->getSkin()->getSectionFailImage()->draw(g, m_osu->getScreenSize() / 2);
-
-        if(m_osu->isInVRDraw()) {
-            g->popTransform();
-        }
     }
 }
 
@@ -1465,21 +1296,8 @@ void OsuHUD::drawHPBar(Graphics *g, double health, float alpha, float breakAnim)
 
     if(breakAnim != 0.0f || alpha != 1.0f) g->setAlpha(alpha * (1.0f - breakAnim));
 
-    if(m_osu->isInVRDraw()) {
-        g->pushTransform();
-    }
-
     // draw health bar fill
     {
-        if(m_osu->isInVRDraw()) {
-            g->translate(0.0f, 0.0f, 0.15f);
-        }
-
-        // DEBUG:
-        /*
-        g->fillRect(0, 25, m_osu->getScreenWidth()*health, 10);
-        */
-
         m_osu->getSkin()->getScorebarColour()->setDrawClipWidthPercent(health);
         m_osu->getSkin()->getScorebarColour()->draw(g,
                                                     (m_osu->getSkin()->getScorebarColour()->getSize() / 2.0f * scale) +
@@ -1505,18 +1323,10 @@ void OsuHUD::drawHPBar(Graphics *g, double health, float alpha, float breakAnim)
 
         if(ki != NULL && !ki->isMissingTexture()) {
             if(!useNewDefault || health >= 0.2) {
-                if(m_osu->isInVRDraw()) {
-                    g->translate(0.0f, 0.0f, 0.15f);
-                }
-
                 ki->draw(g, (markerOffset * scale) + (breakAnimOffset * scale), scale * m_fKiScaleAnim);
             }
         }
     }
-
-    if(m_osu->isInVRDraw()) {
-        g->popTransform();
-    }
 }
 
 void OsuHUD::drawAccuracySimple(Graphics *g, float accuracy, float scale) {
@@ -1624,7 +1434,7 @@ void OsuHUD::drawWarningArrow(Graphics *g, Vector2 pos, bool flipVertically, boo
         g->translate(pos.x + (flipVertically ? (-m_osu->getSkin()->getPlayWarningArrow()->getWidth() * scale / 2.0f)
                                              : (m_osu->getSkin()->getPlayWarningArrow()->getWidth() * scale / 2.0f)) *
                                  (originLeft ? 1.0f : -1.0f),
-                     pos.y, m_osu->isInVRMode() ? 0.75f : 0.0f);
+                     pos.y, 0.0f);
         g->drawImage(m_osu->getSkin()->getPlayWarningArrow());
     }
     g->popTransform();
@@ -2214,90 +2024,6 @@ void OsuHUD::drawProgressBar(Graphics *g, float percent, bool waiting) {
     g->popTransform();
 }
 
-void OsuHUD::drawProgressBarVR(Graphics *g, Matrix4 &mvp, OsuVR *vr, float percent, bool waiting) {
-    if(!osu_draw_accuracy.getBool()) m_fAccuracyXOffset = m_osu->getScreenWidth();
-
-    const float num_segments = 15 * 8;
-    const int offset = 20;
-    const float radius =
-        m_osu->getUIScale(m_osu, 10.5f) * osu_hud_scale.getFloat() * osu_hud_progressbar_scale.getFloat();
-    const float circularMetreScale =
-        ((2 * radius) / m_osu->getSkin()->getCircularmetre()->getWidth()) * 1.3f;  // hardcoded 1.3 multiplier?!
-    const float actualCircularMetreScale = ((2 * radius) / m_osu->getSkin()->getCircularmetre()->getWidth());
-    Vector2 center = Vector2(m_fAccuracyXOffset - radius - offset, m_fAccuracyYOffset);
-
-    // clamp to top edge of screen
-    if(center.y - (m_osu->getSkin()->getCircularmetre()->getHeight() * actualCircularMetreScale + 5) / 2.0f < 0)
-        center.y += std::abs(center.y -
-                             (m_osu->getSkin()->getCircularmetre()->getHeight() * actualCircularMetreScale + 5) / 2.0f);
-
-    // clamp to bottom edge of score numbers
-    if(osu_draw_score.getBool() && center.y - radius < m_fScoreHeight) center.y = m_fScoreHeight + radius;
-
-    const float theta = 2 * PI / float(num_segments);
-    const float s = sinf(theta);  // precalculate the sine and cosine
-    const float c = cosf(theta);
-    float t;
-    float x = 0;
-    float y = -radius;  // we start at the top
-
-    if(waiting)
-        g->setColor(0xaa00f200);
-    else
-        g->setColor(0xaaf2f2f2);
-
-    {
-        static VertexArrayObject vao;
-        vao.empty();
-
-        Vector2 prevVertex;
-        for(int i = 0; i < num_segments + 1; i++) {
-            float curPercent = (i * (360.0f / num_segments)) / 360.0f;
-            if(curPercent > percent) break;
-
-            // build current vertex
-            Vector2 curVertex = Vector2(x + center.x, y + center.y);
-
-            // add vertex, triangle strip style (counter clockwise)
-            if(i > 0) {
-                vao.addVertex(curVertex);
-                vao.addVertex(prevVertex);
-                vao.addVertex(center);
-            }
-
-            // apply the rotation
-            t = x;
-            x = c * x - s * y;
-            y = s * t + c * y;
-
-            // save
-            prevVertex = curVertex;
-        }
-
-        // draw it
-        g->setAntialiasing(true);
-        vr->getShaderUntexturedLegacyGeneric()->enable();
-        vr->getShaderUntexturedLegacyGeneric()->setUniformMatrix4fv("matrix", mvp);
-        { g->drawVAO(&vao); }
-        vr->getShaderUntexturedLegacyGeneric()->disable();
-        g->setAntialiasing(false);
-    }
-
-    // draw circularmetre
-    vr->getShaderTexturedLegacyGeneric()->enable();
-    vr->getShaderTexturedLegacyGeneric()->setUniformMatrix4fv("matrix", mvp);
-    {
-        g->setColor(0xffffffff);
-        g->pushTransform();
-        {
-            g->scale(circularMetreScale, circularMetreScale);
-            g->translate(center.x, center.y, m_osu->isInVRMode() ? 0.65f : 0.0f);
-            g->drawImage(m_osu->getSkin()->getCircularmetre());
-        }
-        g->popTransform();
-    }
-}
-
 void OsuHUD::drawStatistics(Graphics *g, int misses, int sliderbreaks, int maxPossibleCombo, float liveStars,
                             float totalStars, int bpm, float ar, float cs, float od, float hp, int nps, int nd, int ur,
                             float pp, float ppfc, float hitWindow300, int hitdeltaMin, int hitdeltaMax) {

+ 0 - 9
src/App/Osu/OsuHUD.h

@@ -12,7 +12,6 @@
 
 class Osu;
 class OsuUIAvatar;
-class OsuVR;
 class OsuScore;
 class OsuScoreboardSlot;
 class OsuBeatmapStandard;
@@ -46,8 +45,6 @@ class OsuHUD : public OsuScreen {
     virtual void mouse_update(bool *propagate_clicks);
 
     void drawDummy(Graphics *g);
-    void drawVR(Graphics *g, Matrix4 &mvp, OsuVR *vr);
-    void drawVRDummy(Graphics *g, Matrix4 &mvp, OsuVR *vr);
 
     void drawCursor(Graphics *g, Vector2 pos, float alphaMultiplier = 1.0f, bool secondTrail = false,
                     bool updateAndDrawTrail = true);
@@ -56,8 +53,6 @@ class OsuHUD : public OsuScreen {
         bool secondTrail = false);  // NOTE: only use if drawCursor() with updateAndDrawTrail = false (FPoSu)
     void drawCursorSpectator1(Graphics *g, Vector2 pos, float alphaMultiplier = 1.0f);
     void drawCursorSpectator2(Graphics *g, Vector2 pos, float alphaMultiplier = 1.0f);
-    void drawCursorVR1(Graphics *g, Matrix4 &mvp, Vector2 pos, float alphaMultiplier = 1.0f);
-    void drawCursorVR2(Graphics *g, Matrix4 &mvp, Vector2 pos, float alphaMultiplier = 1.0f);
     void drawCursorRipples(Graphics *g);
     void drawFps(Graphics *g) { drawFps(g, m_tempFont, m_fCurFps); }
     void drawHitErrorBar(Graphics *g, OsuBeatmapStandard *beatmapStd);
@@ -158,7 +153,6 @@ class OsuHUD : public OsuScreen {
                             float hitWindowMiss);
     void drawHitErrorBarInt2(Graphics *g, Vector2 center, int ur);
     void drawProgressBar(Graphics *g, float percent, bool waiting);
-    void drawProgressBarVR(Graphics *g, Matrix4 &mvp, OsuVR *vr, float percent, bool waiting);
     void drawStatistics(Graphics *g, int misses, int sliderbreaks, int maxPossibleCombo, float liveStars,
                         float totalStars, int bpm, float ar, float cs, float od, float hp, int nps, int nd, int ur,
                         float pp, float ppfc, float hitWindow300, int hitdeltaMin, int hitdeltaMax);
@@ -223,10 +217,7 @@ class OsuHUD : public OsuScreen {
     std::vector<CURSORTRAIL> m_cursorTrail2;
     std::vector<CURSORTRAIL> m_cursorTrailSpectator1;
     std::vector<CURSORTRAIL> m_cursorTrailSpectator2;
-    std::vector<CURSORTRAIL> m_cursorTrailVR1;
-    std::vector<CURSORTRAIL> m_cursorTrailVR2;
     Shader *m_cursorTrailShader;
-    Shader *m_cursorTrailShaderVR;
     VertexArrayObject *m_cursorTrailVAO;
     std::vector<CURSORRIPPLE> m_cursorRipples;
 

+ 0 - 12
src/App/Osu/OsuHitObject.cpp

@@ -50,10 +50,6 @@ ConVar osu_hitresult_delta_colorize_late_g("osu_hitresult_delta_colorize_late_g"
 ConVar osu_hitresult_delta_colorize_late_b("osu_hitresult_delta_colorize_late_b", 255, FCVAR_NONE, "from 0 to 255");
 
 ConVar osu_approach_scale_multiplier("osu_approach_scale_multiplier", 3.0f, FCVAR_NONE);
-ConVar osu_vr_approach_type("osu_vr_approach_type", 0, FCVAR_NONE, "0 = linear (default), 1 = quadratic");
-ConVar osu_vr_draw_approach_circles("osu_vr_draw_approach_circles", false, FCVAR_NONE);
-ConVar osu_vr_approach_circles_on_playfield("osu_vr_approach_circles_on_playfield", false, FCVAR_NONE);
-ConVar osu_vr_approach_circles_on_top("osu_vr_approach_circles_on_top", false, FCVAR_NONE);
 
 ConVar osu_timingpoints_force("osu_timingpoints_force", true, FCVAR_NONE,
                               "Forces the correct sample type and volume to be used, by getting the active timingpoint "
@@ -96,14 +92,8 @@ ConVar osu_relax_offset(
 
 ConVar *OsuHitObject::m_osu_approach_scale_multiplier_ref = &osu_approach_scale_multiplier;
 ConVar *OsuHitObject::m_osu_timingpoints_force = &osu_timingpoints_force;
-ConVar *OsuHitObject::m_osu_vr_approach_type = &osu_vr_approach_type;
-ConVar *OsuHitObject::m_osu_vr_draw_approach_circles = &osu_vr_draw_approach_circles;
-ConVar *OsuHitObject::m_osu_vr_approach_circles_on_playfield = &osu_vr_approach_circles_on_playfield;
-ConVar *OsuHitObject::m_osu_vr_approach_circles_on_top = &osu_vr_approach_circles_on_top;
 ConVar *OsuHitObject::m_osu_relax_offset_ref = &osu_relax_offset;
 
-ConVar *OsuHitObject::m_osu_vr_draw_desktop_playfield = NULL;
-
 ConVar *OsuHitObject::m_osu_mod_mafham_ref = NULL;
 
 unsigned long long OsuHitObject::sortHackCounter = 0;
@@ -322,8 +312,6 @@ OsuHitObject::OsuHitObject(long time, int sampleType, int comboNumber, bool isEn
     m_iColorOffset = colorOffset;
     m_beatmap = beatmap;
 
-    if(m_osu_vr_draw_desktop_playfield == NULL)
-        m_osu_vr_draw_desktop_playfield = convar->getConVarByName("osu_vr_draw_desktop_playfield");
     if(m_osu_mod_mafham_ref == NULL) m_osu_mod_mafham_ref = convar->getConVarByName("osu_mod_mafham");
 
     m_fAlpha = 0.0f;

+ 0 - 8
src/App/Osu/OsuHitObject.h

@@ -24,14 +24,8 @@ class OsuHitObject {
 
     static ConVar *m_osu_approach_scale_multiplier_ref;
     static ConVar *m_osu_timingpoints_force;
-    static ConVar *m_osu_vr_approach_type;
-    static ConVar *m_osu_vr_draw_approach_circles;
-    static ConVar *m_osu_vr_approach_circles_on_playfield;
-    static ConVar *m_osu_vr_approach_circles_on_top;
     static ConVar *m_osu_relax_offset_ref;
 
-    static ConVar *m_osu_vr_draw_desktop_playfield;
-
     static ConVar *m_osu_mod_mafham_ref;
 
    public:
@@ -41,8 +35,6 @@ class OsuHitObject {
 
     virtual void draw(Graphics *g) { ; }
     virtual void draw2(Graphics *g);
-    virtual void drawVR(Graphics *g, Matrix4 &mvp, OsuVR *vr) { ; }
-    virtual void drawVR2(Graphics *g, Matrix4 &mvp, OsuVR *vr) { ; }
     virtual void update(long curPos);
 
     virtual void updateStackPosition(float stackOffset) = 0;

+ 1 - 3
src/App/Osu/OsuMainMenu.cpp

@@ -198,8 +198,6 @@ ConVar *OsuMainMenu::m_osu_songbrowser_background_fade_in_duration_ref = NULL;
 
 OsuMainMenu::OsuMainMenu(Osu *osu) : OsuScreen(osu) {
     if(env->getOS() == Environment::OS::OS_HORIZON) MCOSU_MAIN_BUTTON_TEXT.append(" NX");
-    if(m_osu->isInVRMode()) MCOSU_MAIN_BUTTON_TEXT.append(" VR");
-    if(m_osu->isInVRMode()) MCOSU_MAIN_BUTTON_SUBTEXT.clear();
 
     if(m_osu_universal_offset_ref == NULL) m_osu_universal_offset_ref = convar->getConVarByName("osu_universal_offset");
     if(m_osu_universal_offset_hardcoded_ref == NULL)
@@ -292,7 +290,7 @@ OsuMainMenu::OsuMainMenu(Osu *osu) : OsuScreen(osu) {
         ->setClickCallback(fastdelegate::MakeDelegate(this, &OsuMainMenu::onPlayButtonPressed));
     addMainMenuButton("Multiplayer")
         ->setClickCallback(fastdelegate::MakeDelegate(this, &OsuMainMenu::onMultiplayerButtonPressed));
-    addMainMenuButton((m_osu->isInVRMode() ? "Options" : "Options (CTRL + O)"))
+    addMainMenuButton("Options (CTRL + O)")
         ->setClickCallback(fastdelegate::MakeDelegate(this, &OsuMainMenu::onOptionsButtonPressed));
     addMainMenuButton("Exit")->setClickCallback(fastdelegate::MakeDelegate(this, &OsuMainMenu::onExitButtonPressed));
 

+ 1 - 1
src/App/Osu/OsuModSelector.cpp

@@ -318,7 +318,7 @@ void OsuModSelector::updateButtons(bool initial) {
                            "You can't fail. No matter what.\nNOTE: To disable drain completely:\nOptions > Gameplay > "
                            "Mechanics > \"Select HP Drain\" > \"None\".",
                            [this]() -> OsuSkinImage * { return m_osu->getSkin()->getSelectionModNoFail(); });
-    m_modButtonNofail->setAvailable(m_osu_drain_type_ref->getInt() > 0);
+    m_modButtonNofail->setAvailable(m_osu_drain_type_ref->getInt() > 1);
     setModButtonOnGrid(4, 0, 0, initial && m_osu->getModNightmare(), "nightmare",
                        "Unnecessary clicks count as misses.\nMassively reduced slider follow circle radius.",
                        [this]() -> OsuSkinImage * { return m_osu->getSkin()->getSelectionModNightmare(); });

+ 16 - 231
src/App/Osu/OsuOptionsMenu.cpp

@@ -24,8 +24,6 @@
 #include "File.h"
 #include "Keyboard.h"
 #include "Mouse.h"
-#include "OpenVRController.h"
-#include "OpenVRInterface.h"
 #include "Osu.h"
 #include "OsuChat.h"
 #include "OsuCircle.h"
@@ -46,7 +44,6 @@
 #include "OsuUIModSelectorModButton.h"
 #include "OsuUISearchOverlay.h"
 #include "OsuUISlider.h"
-#include "OsuVR.h"
 #include "ResourceManager.h"
 #include "SoundEngine.h"
 
@@ -462,20 +459,11 @@ OsuOptionsMenu::OsuOptionsMenu(Osu *osu) : OsuScreenBackable(osu) {
     osu_options_high_quality_sliders.setCallback(
         fastdelegate::MakeDelegate(this, &OsuOptionsMenu::onHighQualitySlidersConVarChange));
 
-    if(m_osu->isInVRMode())
-        OSU_CONFIG_FILE_NAME = "osuvr";
-    else
-        OSU_CONFIG_FILE_NAME = "osu";
+    OSU_CONFIG_FILE_NAME = "osu";
 
     m_osu->getNotificationOverlay()->addKeyListener(this);
 
     m_waitingKey = NULL;
-    m_vrRenderTargetResolutionLabel = NULL;
-    m_vrApproachDistanceSlider = NULL;
-    m_vrVibrationStrengthSlider = NULL;
-    m_vrSliderVibrationStrengthSlider = NULL;
-    m_vrHudDistanceSlider = NULL;
-    m_vrHudScaleSlider = NULL;
     m_resolutionLabel = NULL;
     m_fullscreenCheckbox = NULL;
     m_sliderQualitySlider = NULL;
@@ -519,7 +507,7 @@ OsuOptionsMenu::OsuOptionsMenu(Osu *osu) : OsuScreenBackable(osu) {
     m_notelockTypes.push_back("osu!lazer 2020");
 
     m_drainTypes.push_back("None");
-    m_drainTypes.push_back("VR");
+    m_drainTypes.push_back("None");  // was "VR" previously
     m_drainTypes.push_back("osu!stable (default)");
     m_drainTypes.push_back("osu!lazer 2020");
     m_drainTypes.push_back("osu!lazer 2018");
@@ -637,7 +625,7 @@ OsuOptionsMenu::OsuOptionsMenu(Osu *osu) : OsuScreenBackable(osu) {
     if(env->getOS() != Environment::OS::OS_HORIZON) {
         addSpacer();
 
-        if(!m_osu->isInVRMode()) addCheckbox("Unlimited FPS", convar->getConVarByName("fps_unlimited"));
+        addCheckbox("Unlimited FPS", convar->getConVarByName("fps_unlimited"));
 
         CBaseUISlider *fpsSlider =
             addSlider("FPS Limiter:", 60.0f, 1000.0f, convar->getConVarByName("fps_max"), -1.0f, true);
@@ -677,19 +665,17 @@ OsuOptionsMenu::OsuOptionsMenu(Osu *osu) : OsuScreenBackable(osu) {
                 ->setAnimated(false);
     }
 
-    if(!m_osu->isInVRMode()) {
-        addSubSection("UI Scaling");
-        addCheckbox(
-            "DPI Scaling",
-            UString::format("Automatically scale to the DPI of your display: %i DPI.\nScale factor = %i / 96 = %.2gx",
-                            env->getDPI(), env->getDPI(), env->getDPIScale()),
-            convar->getConVarByName("osu_ui_scale_to_dpi"))
-            ->setChangeCallback(fastdelegate::MakeDelegate(this, &OsuOptionsMenu::onDPIScalingChange));
-        m_uiScaleSlider = addSlider("UI Scale:", 1.0f, 1.5f, convar->getConVarByName("osu_ui_scale"));
-        m_uiScaleSlider->setChangeCallback(fastdelegate::MakeDelegate(this, &OsuOptionsMenu::onSliderChangeUIScale));
-        m_uiScaleSlider->setKeyDelta(0.01f);
-        m_uiScaleSlider->setAnimated(false);
-    }
+    addSubSection("UI Scaling");
+    addCheckbox(
+        "DPI Scaling",
+        UString::format("Automatically scale to the DPI of your display: %i DPI.\nScale factor = %i / 96 = %.2gx",
+                        env->getDPI(), env->getDPI(), env->getDPIScale()),
+        convar->getConVarByName("osu_ui_scale_to_dpi"))
+        ->setChangeCallback(fastdelegate::MakeDelegate(this, &OsuOptionsMenu::onDPIScalingChange));
+    m_uiScaleSlider = addSlider("UI Scale:", 1.0f, 1.5f, convar->getConVarByName("osu_ui_scale"));
+    m_uiScaleSlider->setChangeCallback(fastdelegate::MakeDelegate(this, &OsuOptionsMenu::onSliderChangeUIScale));
+    m_uiScaleSlider->setKeyDelta(0.01f);
+    m_uiScaleSlider->setAnimated(false);
 
     addSubSection("Detail Settings");
     addCheckbox("Avoid flashing elements",
@@ -725,112 +711,6 @@ OsuOptionsMenu::OsuOptionsMenu(Osu *osu) : OsuScreenBackable(osu) {
 
     //**************************************************************************************************************************//
 
-    CBaseUIElement *sectionVR = NULL;
-    if(m_osu->isInVRMode()) {
-        sectionVR = addSection("Virtual Reality");
-
-        addSpacer();
-        addSubSection("VR Renderer");
-        addSpacer();
-        m_vrRenderTargetResolutionLabel = addLabel("Final Resolution: %ix%i");
-        addSpacer();
-        CBaseUISlider *ssSlider =
-            addSlider("SuperSampling Multiplier", 0.5f, 2.0f, convar->getConVarByName("vr_ss"), 230.0f);
-        ssSlider->setChangeCallback(fastdelegate::MakeDelegate(this, &OsuOptionsMenu::onSliderChangeVRSuperSampling));
-        ssSlider->setKeyDelta(0.1f);
-        ssSlider->setAnimated(false);
-        CBaseUISlider *aaSlider =
-            addSlider("AntiAliasing (MSAA)", 0.0f, 16.0f, convar->getConVarByName("vr_aa"), 230.0f);
-        aaSlider->setChangeCallback(fastdelegate::MakeDelegate(this, &OsuOptionsMenu::onSliderChangeVRAntiAliasing));
-        aaSlider->setKeyDelta(2.0f);
-        aaSlider->setAnimated(false);
-
-        addSpacer();
-        addSubSection("Play Area / Playfield");
-        addSpacer();
-        addSlider("Controller Model Brightness", 0.1f, 10.0f,
-                  convar->getConVarByName("vr_controller_model_brightness_multiplier"))
-            ->setKeyDelta(0.1f);
-        addSlider("Head Model Brightness", 0.0f, 1.5f, convar->getConVarByName("vr_head_rendermodel_brightness"))
-            ->setKeyDelta(0.01f);
-        addSlider("Background Brightness", 0.0f, 1.0f, convar->getConVarByName("vr_background_brightness"))
-            ->setKeyDelta(0.05f);
-        addSlider("VR Cursor Opacity", 0.0f, 1.0f, convar->getConVarByName("osu_vr_cursor_alpha"))->setKeyDelta(0.1f);
-        addSpacer();
-        m_vrApproachDistanceSlider =
-            addSlider("Approach Distance", 0.0f, 50.0f, convar->getConVarByName("osu_vr_approach_distance"), 175.0f);
-        m_vrApproachDistanceSlider->setChangeCallback(
-            fastdelegate::MakeDelegate(this, &OsuOptionsMenu::onSliderChangeOneDecimalPlaceMeters));
-        m_vrApproachDistanceSlider->setKeyDelta(1.0f);
-        m_vrHudDistanceSlider =
-            addSlider("HUD Distance", 1.0f, 50.0f, convar->getConVarByName("osu_vr_hud_distance"), 175.0f);
-        m_vrHudDistanceSlider->setChangeCallback(
-            fastdelegate::MakeDelegate(this, &OsuOptionsMenu::onSliderChangeOneDecimalPlaceMeters));
-        m_vrHudDistanceSlider->setKeyDelta(1.0f);
-        m_vrHudScaleSlider = addSlider("HUD Scale", 0.1f, 10.0f, convar->getConVarByName("osu_vr_hud_scale"));
-        m_vrHudScaleSlider->setKeyDelta(0.1f);
-
-        addSpacer();
-        addSubSection("Haptic Feedback");
-        addSpacer();
-        m_vrVibrationStrengthSlider = addSlider("Circle Vibration Strength", 0.0f, 1.0f,
-                                                convar->getConVarByName("osu_vr_controller_vibration_strength"));
-        m_vrVibrationStrengthSlider->setChangeCallback(
-            fastdelegate::MakeDelegate(this, &OsuOptionsMenu::onSliderChangePercent));
-        m_vrVibrationStrengthSlider->setKeyDelta(0.01f);
-        m_vrSliderVibrationStrengthSlider =
-            addSlider("Slider Vibration Strength", 0.0f, 1.0f,
-                      convar->getConVarByName("osu_vr_slider_controller_vibration_strength"));
-        m_vrSliderVibrationStrengthSlider->setChangeCallback(
-            fastdelegate::MakeDelegate(this, &OsuOptionsMenu::onSliderChangePercent));
-        m_vrSliderVibrationStrengthSlider->setKeyDelta(0.01f);
-
-        addSpacer();
-        addSubSection("Gameplay");
-        addSpacer();
-        addCheckbox("Draw VR Approach Circles", convar->getConVarByName("osu_vr_draw_approach_circles"));
-        addCheckbox("Draw VR Approach Circles on top (!)",
-                    "\"on top\" = In front of closer objects, overlapping everything (!)",
-                    convar->getConVarByName("osu_vr_approach_circles_on_top"));
-        addCheckbox("Draw VR Approach Circles on Playfield (flat)",
-                    "\"flat\" = On the Playfield plane, instead of flying in.",
-                    convar->getConVarByName("osu_vr_approach_circles_on_playfield"));
-
-        addSpacer();
-        addSubSection("Miscellaneous");
-        addSpacer();
-        addCheckbox("Spectator Camera (ALT + C)",
-                    "Needs \"Draw HMD to Window\" enabled to work.\nToggle camera-control-mode with ALT + C.\nUse "
-                    "mouse + keyboard (WASD) to rotate/position the camera.",
-                    convar->getConVarByName("vr_spectator_mode"));
-        addCheckbox("Auto Switch Primary Controller", convar->getConVarByName("vr_auto_switch_primary_controller"));
-        addSpacer();
-        addCheckbox("Draw HMD to Window (!)", "If this is disabled, then nothing will be drawn to the window.",
-                    convar->getConVarByName("vr_draw_hmd_to_window"));
-        addCheckbox("Draw Both Eyes to Window", "Only applies if \"Draw HMD to Window\" is enabled, see above.",
-                    convar->getConVarByName("vr_draw_hmd_to_window_draw_both_eyes"));
-        addCheckbox("Draw Laser in Game", convar->getConVarByName("osu_vr_draw_laser_game"));
-        addCheckbox("Draw Laser in Menu", convar->getConVarByName("osu_vr_draw_laser_menu"));
-        addCheckbox("Draw Floor", convar->getConVarByName("osu_vr_draw_floor"));
-        addCheckbox("Draw Controller Models", convar->getConVarByName("vr_draw_controller_models"));
-        addCheckbox("Draw Lighthouse Models", convar->getConVarByName("vr_draw_lighthouse_models"));
-        addSpacer();
-        addCheckbox("Draw VR Game (3D)",
-                    "Only disable this if you want to play the flat version in VR.\nThat is, on the virtual flat "
-                    "screen with the mouse cursor.",
-                    convar->getConVarByName("osu_vr_draw_playfield"));
-        addCheckbox("Draw Desktop Game (2D)",
-                    "Disable this to increase VR performance (by not drawing the flat/desktop game additionally).",
-                    convar->getConVarByName("osu_vr_draw_desktop_playfield"));
-        addSpacer();
-        addCheckbox("Controller Distance Color Warning",
-                    convar->getConVarByName("osu_vr_controller_warning_distance_enabled"));
-        addCheckbox("Show Tutorial on Startup", convar->getConVarByName("osu_vr_tutorial"));
-        addSpacer();
-    }
-
-    //**************************************************************************************************************************//
-
     CBaseUIElement *sectionAudio = addSection("Audio");
 
     addSubSection("Devices");
@@ -1217,7 +1097,6 @@ OsuOptionsMenu::OsuOptionsMenu(Osu *osu) : OsuScreenBackable(osu) {
     addLabel("");
     addLabel("Info about different drain algorithms:")->setTextColor(0xff666666);
     addLabel("");
-    addLabel("- VR: No constant drain, very hard on accuracy.")->setTextColor(0xff666666);
     addLabel("- osu!stable: Constant drain, moderately hard (default).")->setTextColor(0xff666666);
     addLabel("- osu!lazer 2020: Constant drain, very easy (too easy?).")->setTextColor(0xff666666);
     addLabel("- osu!lazer 2018: No constant drain, scales with HP.")->setTextColor(0xff666666);
@@ -1522,9 +1401,6 @@ OsuOptionsMenu::OsuOptionsMenu(Osu *osu) : OsuScreenBackable(osu) {
     // build categories
     addCategory(sectionGeneral, OsuIcons::GEAR);
     addCategory(sectionGraphics, OsuIcons::DESKTOP);
-
-    if(m_osu->isInVRMode()) addCategory(sectionVR, OsuIcons::EYE);
-
     addCategory(sectionAudio, OsuIcons::VOLUME_UP);
     addCategory(m_skinSection, OsuIcons::PAINTBRUSH);
     addCategory(sectionInput, OsuIcons::GAMEPAD);
@@ -1641,17 +1517,6 @@ void OsuOptionsMenu::mouse_update(bool *propagate_clicks) {
     } else
         m_osuFolderTextbox->setBackgroundColor(0xff000000);
 
-    // demo vibration strength while sliding
-    if(m_vrVibrationStrengthSlider != NULL && m_vrVibrationStrengthSlider->isActive()) {
-        if(engine->getTime() > m_fVibrationStrengthExampleTimer) {
-            m_fVibrationStrengthExampleTimer = engine->getTime() + 0.65f;
-
-            openvr->getController()->triggerHapticPulse(m_osu->getVR()->getHapticPulseStrength());
-        }
-    }
-    if(m_vrSliderVibrationStrengthSlider != NULL && m_vrSliderVibrationStrengthSlider->isActive())
-        openvr->getController()->triggerHapticPulse(m_osu->getVR()->getSliderHapticPulseStrength());
-
     // hack to avoid entering search text while binding keys
     if(m_osu->getNotificationOverlay()->isVisible() && m_osu->getNotificationOverlay()->isWaitingForKey())
         m_fSearchOnCharKeybindHackTime = engine->getTime() + 0.1f;
@@ -1943,12 +1808,6 @@ bool OsuOptionsMenu::isBusy() {
     return (m_backButton->isActive() || m_options->isBusy() || m_categories->isBusy()) && isVisible();
 }
 
-bool OsuOptionsMenu::shouldDrawVRDummyHUD() {
-    return isVisible();
-    /*return m_vrHudDistanceSlider != NULL && m_vrHudScaleSlider != NULL && (m_vrHudDistanceSlider->isActive() ||
-     * m_vrHudScaleSlider->isActive());*/
-}
-
 void OsuOptionsMenu::updateLayout() {
     m_updating_layout = true;
 
@@ -2001,7 +1860,6 @@ void OsuOptionsMenu::updateLayout() {
 
     if(m_fullscreenCheckbox != NULL) m_fullscreenCheckbox->setChecked(env->isFullscreen(), false);
 
-    updateVRRenderTargetResolutionLabel();
     updateSkinNameLabel();
     updateNotelockSelectLabel();
     updateHPDrainSelectLabel();
@@ -2462,15 +2320,6 @@ void OsuOptionsMenu::updateFposuCMper360() {
     convar->getConVarByName("fposu_mouse_cm_360")->setValue(value);
 }
 
-void OsuOptionsMenu::updateVRRenderTargetResolutionLabel() {
-    if(m_vrRenderTargetResolutionLabel == NULL || !openvr->isReady() || !m_osu->isInVRMode()) return;
-
-    Vector2 vrRenderTargetResolution = openvr->getRenderTargetResolution();
-    m_vrRenderTargetResolutionLabel->setText(UString::format(m_vrRenderTargetResolutionLabel->getName().toUtf8(),
-                                                             (int)vrRenderTargetResolution.x,
-                                                             (int)vrRenderTargetResolution.y));
-}
-
 void OsuOptionsMenu::updateSkinNameLabel() {
     if(m_skinLabel == NULL) return;
 
@@ -2588,10 +2437,6 @@ void OsuOptionsMenu::onSkinSelect() {
         CBaseUIButton *buttonDefault = m_contextMenu->addButton(defaultText);
         if(defaultText == m_osu_skin_ref->getString()) buttonDefault->setTextBrightColor(0xff00ff00);
 
-        const UString defaultVRText = "defaultvr";
-        CBaseUIButton *buttonDefaultVR = m_contextMenu->addButton(defaultVRText);
-        if(defaultVRText == m_osu_skin_ref->getString()) buttonDefaultVR->setTextBrightColor(0xff00ff00);
-
         for(int i = 0; i < skinFolders.size(); i++) {
             if(skinFolders[i].compare(".") == 0 ||
                skinFolders[i].compare("..") == 0)  // is this universal in every file system? too lazy to check. should
@@ -2852,7 +2697,7 @@ void OsuOptionsMenu::onHPDrainSelect() {
     m_contextMenu->setRelPos(m_hpDrainSelectButton->getRelPos());
     m_contextMenu->begin(m_hpDrainSelectButton->getSize().x);
     {
-        for(int i = 0; i < m_drainTypes.size(); i++) {
+        for(int i = 1; i < m_drainTypes.size(); i++) {
             CBaseUIButton *button = m_contextMenu->addButton(m_drainTypes[i], i);
             if(i == m_osu_drain_type_ref->getInt()) button->setTextBrightColor(0xff00ff00);
         }
@@ -2870,7 +2715,7 @@ void OsuOptionsMenu::onHPDrainSelect2(UString hpDrainType, int id) {
 }
 
 void OsuOptionsMenu::onHPDrainSelectResetClicked() {
-    if(m_drainTypes.size() > 1 && (size_t)m_osu_drain_type_ref->getDefaultFloat() < m_drainTypes.size())
+    if((size_t)m_osu_drain_type_ref->getDefaultFloat() < m_drainTypes.size())
         onHPDrainSelect2(m_drainTypes[(size_t)m_osu_drain_type_ref->getDefaultFloat()],
                          (size_t)m_osu_drain_type_ref->getDefaultFloat());
 }
@@ -3125,65 +2970,6 @@ void OsuOptionsMenu::onKeyBindingsResetAllPressed(CBaseUIButton *button) {
     }
 }
 
-void OsuOptionsMenu::onSliderChangeVRSuperSampling(CBaseUISlider *slider) {
-    for(int i = 0; i < m_elements.size(); i++) {
-        for(int e = 0; e < m_elements[i].elements.size(); e++) {
-            if(m_elements[i].elements[e] == slider) {
-                if(m_elements[i].cvar != NULL)
-                    m_elements[i].cvar->setValue(std::round(slider->getFloat() * 10.0f) /
-                                                 10.0f);  // round to 1 decimal place
-
-                if(m_elements[i].elements.size() == 3) {
-                    CBaseUILabel *labelPointer = dynamic_cast<CBaseUILabel *>(m_elements[i].elements[2]);
-                    UString labelText = m_elements[i].cvar->getString();
-                    labelText.append("x");
-                    labelPointer->setText(labelText);
-                }
-
-                onResetUpdate(m_elements[i].resetButton);
-
-                break;
-            }
-        }
-    }
-
-    updateVRRenderTargetResolutionLabel();
-}
-
-void OsuOptionsMenu::onSliderChangeVRAntiAliasing(CBaseUISlider *slider) {
-    for(int i = 0; i < m_elements.size(); i++) {
-        for(int e = 0; e < m_elements[i].elements.size(); e++) {
-            if(m_elements[i].elements[e] == slider) {
-                const int prevAA = (m_elements[i].cvar != NULL ? m_elements[i].cvar->getInt() : -1);
-
-                int number = std::round(slider->getFloat());  // round to int
-                int aa = 0;
-                if(number > 8)
-                    aa = 16;
-                else if(number > 4)
-                    aa = 8;
-                else if(number > 2)
-                    aa = 4;
-                else if(number > 0)
-                    aa = 2;
-
-                if(aa != prevAA) {
-                    if(m_elements[i].cvar != NULL) m_elements[i].cvar->setValue(aa);
-                }
-
-                if(m_elements[i].elements.size() == 3) {
-                    CBaseUILabel *labelPointer = dynamic_cast<CBaseUILabel *>(m_elements[i].elements[2]);
-                    labelPointer->setText(UString::format("%ix", aa));
-                }
-
-                onResetUpdate(m_elements[i].resetButton);
-
-                break;
-            }
-        }
-    }
-}
-
 void OsuOptionsMenu::onSliderChangeSliderQuality(CBaseUISlider *slider) {
     for(int i = 0; i < m_elements.size(); i++) {
         for(int e = 0; e < m_elements[i].elements.size(); e++) {
@@ -3840,7 +3626,6 @@ void OsuOptionsMenu::save() {
     manualConVars.push_back(convar->getConVarByName("mp_autologin"));
     manualConVars.push_back(m_osu_notelock_type_ref);
     manualConVars.push_back(m_osu_drain_type_ref);
-    if(m_osu->isInVRMode()) manualConVars.push_back(convar->getConVarByName("osu_vr_layout_lock"));
 
     removeConCommands.push_back(convar->getConVarByName("monitor"));
     removeConCommands.push_back(convar->getConVarByName("windowed"));

+ 0 - 11
src/App/Osu/OsuOptionsMenu.h

@@ -62,8 +62,6 @@ class OsuOptionsMenu : public OsuScreenBackable, public OsuNotificationOverlayKe
     bool isMouseInside();
     bool isBusy();
 
-    bool shouldDrawVRDummyHUD();
-
    public:
     static const char *OSU_CONFIG_FILE_NAME;
 
@@ -114,7 +112,6 @@ class OsuOptionsMenu : public OsuScreenBackable, public OsuNotificationOverlayKe
     void updateOsuFolder();
     void updateFposuDPI();
     void updateFposuCMper360();
-    void updateVRRenderTargetResolutionLabel();
     void updateSkinNameLabel();
     void updateNotelockSelectLabel();
     void updateHPDrainSelectLabel();
@@ -162,8 +159,6 @@ class OsuOptionsMenu : public OsuScreenBackable, public OsuNotificationOverlayKe
     void onKeyBindingButtonPressed(CBaseUIButton *button);
     void onKeyUnbindButtonPressed(CBaseUIButton *button);
     void onKeyBindingsResetAllPressed(CBaseUIButton *button);
-    void onSliderChangeVRSuperSampling(CBaseUISlider *slider);
-    void onSliderChangeVRAntiAliasing(CBaseUISlider *slider);
     void onSliderChangeSliderQuality(CBaseUISlider *slider);
     void onSliderChangeLetterboxingOffset(CBaseUISlider *slider);
     void onSliderChangeUIScale(CBaseUISlider *slider);
@@ -256,12 +251,6 @@ class OsuOptionsMenu : public OsuScreenBackable, public OsuNotificationOverlayKe
     OsuOptionsMenuResetButton *m_wasapiBufferSizeResetButton;
     OsuOptionsMenuResetButton *m_wasapiPeriodSizeResetButton;
     CBaseUISlider *m_asioBufferSizeSlider = nullptr;
-    CBaseUILabel *m_vrRenderTargetResolutionLabel;
-    CBaseUISlider *m_vrApproachDistanceSlider;
-    CBaseUISlider *m_vrVibrationStrengthSlider;
-    CBaseUISlider *m_vrSliderVibrationStrengthSlider;
-    CBaseUISlider *m_vrHudDistanceSlider;
-    CBaseUISlider *m_vrHudScaleSlider;
     CBaseUISlider *m_sliderQualitySlider;
     CBaseUISlider *m_letterboxingOffsetXSlider;
     CBaseUISlider *m_letterboxingOffsetYSlider;

+ 1 - 20
src/App/Osu/OsuScore.cpp

@@ -441,26 +441,7 @@ double OsuScore::getHealthIncrease(OsuBeatmap *beatmap, HIT hit) {
 double OsuScore::getHealthIncrease(OsuScore::HIT hit, double HP, double hpMultiplierNormal, double hpMultiplierComboEnd,
                                    double hpBarMaximumForNormalization) {
     const int drainType = m_osu_drain_type_ref->getInt();
-    if(drainType == 1)  // VR
-    {
-        switch(hit) {
-            case OsuScore::HIT::HIT_MISS:
-                return osu_drain_vr_miss.getFloat() * osu_drain_vr_multiplier.getFloat();
-
-            case OsuScore::HIT::HIT_50:
-                return osu_drain_vr_50.getFloat() * osu_drain_vr_multiplier.getFloat();
-
-            case OsuScore::HIT::HIT_100:
-                return osu_drain_vr_100.getFloat() * osu_drain_vr_multiplier.getFloat();
-
-            case OsuScore::HIT::HIT_300:
-            case OsuScore::HIT::HIT_SLIDER30:
-                return osu_drain_vr_300.getFloat() * osu_drain_vr_multiplier.getFloat();
-
-            case OsuScore::HIT::HIT_MISS_SLIDERBREAK:
-                return osu_drain_vr_sliderbreak.getFloat() * osu_drain_vr_multiplier.getFloat();
-        }
-    } else if(drainType == 2)  // osu!stable
+    if(drainType == 2)  // osu!stable
     {
         switch(hit) {
             case OsuScore::HIT::HIT_MISS:

+ 2 - 6
src/App/Osu/OsuSkin.cpp

@@ -79,10 +79,7 @@ OsuSkin::OsuSkin(Osu *osu, UString name, std::string filepath, bool isDefaultSki
 
     if(m_missingTexture == NULL) m_missingTexture = engine->getResourceManager()->getImage("MISSING_TEXTURE");
 
-    if(m_osu->isInVRMode())
-        OSUSKIN_DEFAULT_SKIN_PATH = "defaultvr/";
-    else
-        OSUSKIN_DEFAULT_SKIN_PATH = "default/";
+    OSUSKIN_DEFAULT_SKIN_PATH = "default/";
 
     // vars
     m_hitCircle = m_missingTexture;
@@ -963,8 +960,7 @@ void OsuSkin::load() {
     debugLog("OsuSkin: HitCircleOverlap = %i\n", m_iHitCircleOverlap);
 
     // delayed error notifications due to resource loading potentially blocking engine time
-    if(!parseSkinIni1Status && parseSkinIni2Status && m_osu_skin_ref->getString() != UString("default") &&
-       m_osu_skin_ref->getString() != UString("defaultvr"))
+    if(!parseSkinIni1Status && parseSkinIni2Status && m_osu_skin_ref->getString() != UString("default"))
         m_osu->getNotificationOverlay()->addNotification("Error: Couldn't load skin.ini!", 0xffff0000);
     else if(!parseSkinIni2Status)
         m_osu->getNotificationOverlay()->addNotification("Error: Couldn't load DEFAULT skin.ini!!!", 0xffff0000);

+ 5 - 454
src/App/Osu/OsuSlider.cpp

@@ -12,8 +12,6 @@
 #include "Camera.h"
 #include "ConVar.h"
 #include "Engine.h"
-#include "OpenVRController.h"
-#include "OpenVRInterface.h"
 #include "Osu.h"
 #include "OsuBeatmapStandard.h"
 #include "OsuCircle.h"
@@ -23,7 +21,6 @@
 #include "OsuSkinImage.h"
 #include "OsuSliderCurves.h"
 #include "OsuSliderRenderer.h"
-#include "OsuVR.h"
 #include "RenderTarget.h"
 #include "ResourceManager.h"
 #include "Shader.h"
@@ -196,10 +193,7 @@ OsuSlider::OsuSlider(char type, int repeat, float pixelLength, std::vector<Vecto
 
     m_fSliderBreakRapeTime = 0.0f;
 
-    m_bOnHitVRLeftControllerHapticFeedback = false;
-
     m_vao = NULL;
-    m_vaoVR2 = NULL;
 }
 
 OsuSlider::~OsuSlider() {
@@ -207,7 +201,6 @@ OsuSlider::~OsuSlider() {
 
     SAFE_DELETE(m_curve);
     SAFE_DELETE(m_vao);
-    SAFE_DELETE(m_vaoVR2);
 }
 
 void OsuSlider::draw(Graphics *g) {
@@ -555,279 +548,6 @@ void OsuSlider::draw2(Graphics *g, bool drawApproachCircle, bool drawOnlyApproac
     }
 }
 
-void OsuSlider::drawVR(Graphics *g, Matrix4 &mvp, OsuVR *vr) {
-    const float foscale = OsuGameRules::osu_circle_fade_out_scale.getFloat();
-
-    // HACKHACK: code duplication
-    // aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaah
-    if(m_points.size() <= 0) return;
-
-    // the approachscale for sliders will get negative (since they are hitobjects with a duration)
-    float clampedApproachScalePercent =
-        m_fApproachScale - 1.0f;  // goes from <m_osu_approach_scale_multiplier_ref> to 0
-    clampedApproachScalePercent = clamp<float>(
-        clampedApproachScalePercent / m_osu_approach_scale_multiplier_ref->getFloat(), 0.0f, 1.0f);  // goes from 1 to 0
-
-    Matrix4 translation;
-    translation.translate(0, 0, -clampedApproachScalePercent * vr->getApproachDistance());
-    Matrix4 finalMVP = mvp * translation;
-
-    vr->getShaderTexturedLegacyGeneric()->setUniformMatrix4fv("matrix", finalMVP);
-
-    OsuSkin *skin = m_beatmap->getSkin();
-
-    if(m_bVisible ||
-       (m_bStartFinished && !m_bFinished))  // extra possibility to avoid flicker between OsuHitObject::m_bVisible delay
-                                            // and the fadeout animation below this if block
-    {
-        float alpha = (osu_mod_hd_slider_fast_fade.getBool() ? m_fAlpha : m_fBodyAlpha);
-        float sliderSnake = osu_snaking_sliders.getBool() ? m_fSliderSnakePercent : 1.0f;
-
-        // shrinking sliders
-        float sliderSnakeStart = 0.0f;
-        if(osu_slider_shrink.getBool() && m_iReverseArrowPos == 0) {
-            sliderSnakeStart = (m_bInReverse ? 0.0f : m_fSlidePercent);
-            if(m_bInReverse) sliderSnake = m_fSlidePercent;
-        }
-
-        // draw slider body
-        if(alpha > 0.0f && osu_slider_draw_body.getBool())
-            drawBodyVR(g, vr, finalMVP, alpha, sliderSnakeStart, sliderSnake);
-
-        // draw slider ticks
-        const float tickImageScale =
-            (m_beatmap->getHitcircleDiameter() / (16.0f * (skin->isSliderScorePoint2x() ? 2.0f : 1.0f))) * 0.125f;
-        for(int t = 0; t < m_ticks.size(); t++) {
-            if(m_ticks[t].finished || m_ticks[t].percent > sliderSnake) continue;
-
-            Vector2 pos = m_beatmap->osuCoords2Pixels(m_curve->pointAt(m_ticks[t].percent));
-
-            g->setColor(0xffffffff);
-            g->setAlpha(alpha);
-            g->pushTransform();
-            {
-                g->scale(tickImageScale, tickImageScale);
-                g->translate(pos.x, pos.y);
-                g->drawImage(skin->getSliderScorePoint());
-            }
-            g->popTransform();
-        }
-
-        // draw start & end circle & reverse arrows
-        if(m_points.size() > 1) {
-            // HACKHACK: very dirty code
-            bool sliderRepeatStartCircleFinished = (m_iRepeat < 2);
-            bool sliderRepeatEndCircleFinished = false;
-            bool endCircleIsAtActualSliderEnd = true;
-            for(int i = 0; i < m_clicks.size(); i++) {
-                // repeats
-                if(m_clicks[i].type == 0) {
-                    endCircleIsAtActualSliderEnd = m_clicks[i].sliderend;
-
-                    if(endCircleIsAtActualSliderEnd)
-                        sliderRepeatEndCircleFinished = m_clicks[i].finished;
-                    else
-                        sliderRepeatStartCircleFinished = m_clicks[i].finished;
-                }
-            }
-
-            const bool ifStrictTrackingModShouldDrawEndCircle =
-                (!m_osu_mod_strict_tracking_ref->getBool() || m_endResult != OsuScore::HIT::HIT_MISS);
-
-            // end circle
-            if((!m_bEndFinished && m_iRepeat % 2 != 0 && ifStrictTrackingModShouldDrawEndCircle) ||
-               (!sliderRepeatEndCircleFinished &&
-                (ifStrictTrackingModShouldDrawEndCircle || (m_iRepeat > 1 && endCircleIsAtActualSliderEnd) ||
-                 (m_iRepeat > 1 && std::abs(m_iRepeat - m_iCurRepeat) > 2))))
-                drawEndCircle(g, alpha, sliderSnake);
-
-            // start circle
-            if(!m_bStartFinished ||
-               (!sliderRepeatStartCircleFinished &&
-                (ifStrictTrackingModShouldDrawEndCircle || (m_iRepeat > 1 && !endCircleIsAtActualSliderEnd) ||
-                 (m_iRepeat > 1 && std::abs(m_iRepeat - m_iCurRepeat) > 2))) ||
-               (!m_bEndFinished && m_iRepeat % 2 == 0 && ifStrictTrackingModShouldDrawEndCircle))
-                drawStartCircle(g, alpha);
-
-            // reverse arrows
-            if(m_fReverseArrowAlpha > 0.0f) {
-                // if the combo color is nearly white, blacken the reverse arrow
-                Color comboColor = skin->getComboColorForCounter(m_iColorCounter, m_iColorOffset);
-                Color reverseArrowColor = 0xffffffff;
-                if((COLOR_GET_Rf(comboColor) + COLOR_GET_Gf(comboColor) + COLOR_GET_Bf(comboColor)) / 3.0f >
-                   osu_slider_reverse_arrow_black_threshold.getFloat())
-                    reverseArrowColor = 0xff000000;
-
-                float div = 0.30f;
-                float pulse = (div - fmod(std::abs(m_beatmap->getCurMusicPos()) / 1000.0f, div)) / div;
-                pulse *= pulse;  // quad in
-
-                if(!osu_slider_reverse_arrow_animated.getBool() || m_beatmap->isInMafhamRenderChunk()) pulse = 0.0f;
-
-                // end
-                if(m_iReverseArrowPos == 2 || m_iReverseArrowPos == 3) {
-                    /*Vector2 pos = m_beatmap->osuCoords2Pixels(m_curve->pointAt(sliderSnake));*/  // osu doesn't snake
-                                                                                                   // the reverse arrow
-                    Vector2 pos = m_beatmap->osuCoords2Pixels(m_curve->pointAt(1.0f));
-                    float rotation = m_curve->getEndAngle() - m_osu_playfield_rotation_ref->getFloat() -
-                                     m_beatmap->getPlayfieldRotation();
-                    if(m_beatmap->getOsu()->getModHR()) rotation = 360.0f - rotation;
-                    if(m_osu_playfield_mirror_horizontal_ref->getBool()) rotation = 360.0f - rotation;
-                    if(m_osu_playfield_mirror_vertical_ref->getBool()) rotation = 180.0f - rotation;
-
-                    const float osuCoordScaleMultiplier =
-                        m_beatmap->getHitcircleDiameter() / m_beatmap->getRawHitcircleDiameter();
-                    float reverseArrowImageScale =
-                        (m_beatmap->getRawHitcircleDiameter() / (128.0f * (skin->isReverseArrow2x() ? 2.0f : 1.0f))) *
-                        osuCoordScaleMultiplier;
-
-                    reverseArrowImageScale *= 1.0f + pulse * 0.30f;
-
-                    g->setColor(reverseArrowColor);
-                    g->setAlpha(m_fReverseArrowAlpha);
-                    g->pushTransform();
-                    {
-                        g->rotate(rotation);
-                        g->scale(reverseArrowImageScale, reverseArrowImageScale);
-                        g->translate(pos.x, pos.y);
-                        g->drawImage(skin->getReverseArrow());
-                    }
-                    g->popTransform();
-                }
-
-                // start
-                if(m_iReverseArrowPos == 1 || m_iReverseArrowPos == 3) {
-                    Vector2 pos = m_beatmap->osuCoords2Pixels(m_curve->pointAt(0.0f));
-                    float rotation = m_curve->getStartAngle() - m_osu_playfield_rotation_ref->getFloat() -
-                                     m_beatmap->getPlayfieldRotation();
-                    if(m_beatmap->getOsu()->getModHR()) rotation = 360.0f - rotation;
-                    if(m_osu_playfield_mirror_horizontal_ref->getBool()) rotation = 360.0f - rotation;
-                    if(m_osu_playfield_mirror_vertical_ref->getBool()) rotation = 180.0f - rotation;
-
-                    const float osuCoordScaleMultiplier =
-                        m_beatmap->getHitcircleDiameter() / m_beatmap->getRawHitcircleDiameter();
-                    float reverseArrowImageScale =
-                        (m_beatmap->getRawHitcircleDiameter() / (128.0f * (skin->isReverseArrow2x() ? 2.0f : 1.0f))) *
-                        osuCoordScaleMultiplier;
-
-                    reverseArrowImageScale *= 1.0f + pulse * 0.30f;
-
-                    g->setColor(reverseArrowColor);
-                    g->setAlpha(m_fReverseArrowAlpha);
-                    g->pushTransform();
-                    {
-                        g->rotate(rotation);
-                        g->scale(reverseArrowImageScale, reverseArrowImageScale);
-                        g->translate(pos.x, pos.y);
-                        g->drawImage(skin->getReverseArrow());
-                    }
-                    g->popTransform();
-                }
-            }
-        }
-    }
-
-    // draw slider body fade animation, start/end circle hit animation
-    // NOTE: sliderbody alpha fades don't work in VR yet, due to the hacky rendering method
-    if(m_fStartHitAnimation > 0.0f && m_fStartHitAnimation != 1.0f && !m_beatmap->getOsu()->getModHD()) {
-        float alpha = 1.0f - m_fStartHitAnimation;
-
-        float scale = m_fStartHitAnimation;
-        scale = -scale * (scale - 2.0f);  // quad out scale
-
-        bool drawNumber = (skin->getVersion() > 1.0f ? false : true) && m_iCurRepeat < 1;
-
-        g->pushTransform();
-        {
-            g->scale((1.0f + scale * foscale), (1.0f + scale * foscale));
-            if(m_iCurRepeat < 1) {
-                skin->getHitCircleOverlay2()->setAnimationTimeOffset(skin->getAnimationSpeed(),
-                                                                     !m_beatmap->isInMafhamRenderChunk()
-                                                                         ? m_iTime - m_iApproachTime
-                                                                         : m_beatmap->getCurMusicPosWithOffsets());
-                skin->getSliderStartCircleOverlay2()->setAnimationTimeOffset(
-                    skin->getAnimationSpeed(), !m_beatmap->isInMafhamRenderChunk()
-                                                   ? m_iTime - m_iApproachTime
-                                                   : m_beatmap->getCurMusicPosWithOffsets());
-
-                OsuCircle::drawSliderStartCircle(g, m_beatmap, m_curve->pointAt(0.0f), m_iComboNumber, m_iColorCounter,
-                                                 m_iColorOffset, m_fHittableDimRGBColorMultiplierPercent, 1.0f, alpha,
-                                                 alpha, drawNumber);
-            } else {
-                skin->getHitCircleOverlay2()->setAnimationTimeOffset(
-                    skin->getAnimationSpeed(),
-                    !m_beatmap->isInMafhamRenderChunk() ? m_iTime : m_beatmap->getCurMusicPosWithOffsets());
-                skin->getSliderEndCircleOverlay2()->setAnimationTimeOffset(
-                    skin->getAnimationSpeed(),
-                    !m_beatmap->isInMafhamRenderChunk() ? m_iTime : m_beatmap->getCurMusicPosWithOffsets());
-
-                OsuCircle::drawSliderEndCircle(g, m_beatmap, m_curve->pointAt(0.0f), m_iComboNumber, m_iColorCounter,
-                                               m_iColorOffset, m_fHittableDimRGBColorMultiplierPercent, 1.0f, alpha,
-                                               alpha, drawNumber);
-            }
-        }
-        g->popTransform();
-    }
-
-    if(m_fEndHitAnimation > 0.0f && m_fEndHitAnimation != 1.0f && !m_beatmap->getOsu()->getModHD()) {
-        float alpha = 1.0f - m_fEndHitAnimation;
-
-        float scale = m_fEndHitAnimation;
-        scale = -scale * (scale - 2.0f);  // quad out scale
-
-        g->pushTransform();
-        {
-            g->scale((1.0f + scale * foscale), (1.0f + scale * foscale));
-            {
-                skin->getHitCircleOverlay2()->setAnimationTimeOffset(skin->getAnimationSpeed(),
-                                                                     !m_beatmap->isInMafhamRenderChunk()
-                                                                         ? m_iTime - m_iFadeInTime
-                                                                         : m_beatmap->getCurMusicPosWithOffsets());
-                skin->getSliderEndCircleOverlay2()->setAnimationTimeOffset(
-                    skin->getAnimationSpeed(), !m_beatmap->isInMafhamRenderChunk()
-                                                   ? m_iTime - m_iFadeInTime
-                                                   : m_beatmap->getCurMusicPosWithOffsets());
-
-                OsuCircle::drawSliderEndCircle(g, m_beatmap, m_curve->pointAt(1.0f), m_iComboNumber, m_iColorCounter,
-                                               m_iColorOffset, 1.0f, 1.0f, alpha, 0.0f, false);
-            }
-        }
-        g->popTransform();
-    }
-
-    OsuHitObject::draw(g);
-
-    draw2(g, false, false);
-
-    if(m_osu_vr_draw_approach_circles->getBool() && !m_osu_vr_approach_circles_on_top->getBool()) {
-        if(m_osu_vr_approach_circles_on_playfield->getBool())
-            vr->getShaderTexturedLegacyGeneric()->setUniformMatrix4fv("matrix", mvp);
-
-        draw2(g, true, true);
-    }
-}
-
-void OsuSlider::drawVR2(Graphics *g, Matrix4 &mvp, OsuVR *vr) {
-    // HACKHACK: code duplication
-    // aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-    if(m_points.size() <= 0) return;
-
-    // the approachscale for sliders will get negative (since they are hitobjects with a duration)
-    float clampedApproachScalePercent =
-        m_fApproachScale - 1.0f;  // goes from <m_osu_approach_scale_multiplier_ref> to 0
-    clampedApproachScalePercent = clamp<float>(
-        clampedApproachScalePercent / m_osu_approach_scale_multiplier_ref->getFloat(), 0.0f, 1.0f);  // goes from 1 to 0
-
-    if(m_osu_vr_approach_circles_on_playfield->getBool()) clampedApproachScalePercent = 0.0f;
-
-    Matrix4 translation;
-    translation.translate(0, 0, -clampedApproachScalePercent * vr->getApproachDistance());
-    Matrix4 finalMVP = mvp * translation;
-
-    vr->getShaderTexturedLegacyGeneric()->setUniformMatrix4fv("matrix", finalMVP);
-    draw2(g, true, true);
-}
-
 void OsuSlider::drawStartCircle(Graphics *g, float alpha) {
     OsuSkin *skin = m_beatmap->getSkin();
 
@@ -923,46 +643,6 @@ void OsuSlider::drawBody(Graphics *g, float alpha, float from, float to) {
     }
 }
 
-void OsuSlider::drawBodyVR(Graphics *g, OsuVR *vr, Matrix4 &mvp, float alpha, float from, float to) {
-    // HACKHACK: code duplication
-    // aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
-    Color comboColor = m_beatmap->getSkin()->getComboColorForCounter(m_iColorCounter, m_iColorOffset);
-    comboColor = COLOR(255, (int)(COLOR_GET_Ri(comboColor) * m_fHittableDimRGBColorMultiplierPercent),
-                       (int)(COLOR_GET_Gi(comboColor) * m_fHittableDimRGBColorMultiplierPercent),
-                       (int)(COLOR_GET_Bi(comboColor) * m_fHittableDimRGBColorMultiplierPercent));
-
-    // smooth begin/end while snaking/shrinking
-    std::vector<Vector2> alwaysPoints;
-    if(osu_slider_body_smoothsnake.getBool()) {
-        if(osu_slider_shrink.getBool() && m_fSliderSnakePercent > 0.999f) {
-            alwaysPoints.push_back(m_beatmap->osuCoords2Pixels(m_curve->pointAt(m_fSlidePercent)));  // curpoint
-            alwaysPoints.push_back(m_beatmap->osuCoords2Pixels(
-                getRawPosAt(m_iTime + m_iObjectDuration + 1)));  // endpoint (because setDrawPercent() causes the last
-                                                                 // circle mesh to become invisible too quickly)
-        }
-        if(osu_snaking_sliders.getBool() && m_fSliderSnakePercent < 1.0f)
-            alwaysPoints.push_back(m_beatmap->osuCoords2Pixels(
-                m_curve->pointAt(m_fSliderSnakePercent)));  // snakeoutpoint (only while snaking out)
-    }
-
-    if(m_beatmap->getOsu()->shouldFallBackToLegacySliderRenderer()) {
-        // peppy sliders
-        std::vector<Vector2> screenPoints = m_curve->getPoints();
-        for(int p = 0; p < screenPoints.size(); p++) {
-            screenPoints[p] = m_beatmap->osuCoords2Pixels(screenPoints[p]);
-        }
-        OsuSliderRenderer::drawVR(g, m_beatmap->getOsu(), vr, mvp, m_fApproachScale, screenPoints, alwaysPoints,
-                                  m_beatmap->getHitcircleDiameter(), from, to, comboColor,
-                                  m_fHittableDimRGBColorMultiplierPercent, alpha, getTime());
-    } else {
-        // vertex buffered sliders
-        OsuSliderRenderer::drawVR(g, m_beatmap->getOsu(), vr, mvp, m_fApproachScale, m_vao, m_vaoVR2, alwaysPoints,
-                                  m_beatmap->getHitcircleDiameter(), from, to, comboColor,
-                                  m_fHittableDimRGBColorMultiplierPercent, alpha, getTime());
-    }
-}
-
 void OsuSlider::update(long curPos) {
     OsuHitObject::update(curPos);
 
@@ -1072,39 +752,6 @@ void OsuSlider::update(long curPos) {
     m_bCursorInside = (isAutoCursorInside || isBeatmapCursorInside);
     m_bCursorLeft = !m_bCursorInside;
 
-    if(m_beatmap->getOsu()->isInVRMode()) {
-        // if we are in vr mode, and the user has disabled the desktop playfield, then the desktop cursor should be
-        // ignored
-        if(!m_osu_vr_draw_desktop_playfield->getBool()) m_bCursorInside = isAutoCursorInside;
-
-        // vr always uses the default (raw!) followradius (don't have to go within circle radius again after leaving the
-        // slider, would be too hard otherwise)
-        followRadius = m_beatmap->getRawSliderFollowCircleDiameter() / 2.0f;
-        float vrCursor1Delta =
-            (m_beatmap->getOsu()->getVR()->getCursorPos1() - m_beatmap->osuCoords2VRPixels(m_vCurPointRaw)).length();
-        float vrCursor2Delta =
-            (m_beatmap->getOsu()->getVR()->getCursorPos2() - m_beatmap->osuCoords2VRPixels(m_vCurPointRaw)).length();
-        bool vrCursor1Inside = vrCursor1Delta < followRadius;
-        bool vrCursor2Inside = vrCursor2Delta < followRadius;
-        m_bCursorInside = m_bCursorInside || (vrCursor1Inside || vrCursor2Inside);
-
-        // calculate which controller to do haptic feedback on (for reverse arrows and sliderendcircle)
-
-        // distance to circle
-        if(vrCursor1Delta < vrCursor2Delta)
-            m_bOnHitVRLeftControllerHapticFeedback = true;
-        else
-            m_bOnHitVRLeftControllerHapticFeedback = false;
-
-        // distance to playfield, if both cursors were valid (overrides distance to circle for haptic feedback)
-        if(vrCursor1Inside && vrCursor2Inside) {
-            if(m_beatmap->getOsu()->getVR()->getCursorDist1() < m_beatmap->getOsu()->getVR()->getCursorDist2())
-                m_bOnHitVRLeftControllerHapticFeedback = true;
-            else
-                m_bOnHitVRLeftControllerHapticFeedback = false;
-        }
-    }
-
     // handle slider start
     if(!m_bStartFinished) {
         if(m_beatmap->getOsu()->getModAuto()) {
@@ -1115,31 +762,12 @@ void OsuSlider::update(long curPos) {
         } else {
             long delta = curPos - m_iTime;
 
-            if(m_beatmap->getOsu()->getModRelax() || m_beatmap->getOsu()->isInVRMode()) {
+            if(m_beatmap->getOsu()->getModRelax()) {
                 if(curPos >= m_iTime + (long)m_osu_relax_offset_ref->getInt() && !m_beatmap->isPaused() &&
                    !m_beatmap->isContinueScheduled()) {
                     const Vector2 pos = m_beatmap->osuCoords2Pixels(m_curve->pointAt(0.0f));
                     const float cursorDelta = (m_beatmap->getCursorPos() - pos).length();
-
-                    float vrCursor1Delta = 0.0f;
-                    float vrCursor2Delta = 0.0f;
-                    bool vrCursor1Inside = false;
-                    bool vrCursor2Inside = false;
-                    if(m_beatmap->getOsu()->isInVRMode()) {
-                        vrCursor1Delta = (m_beatmap->getOsu()->getVR()->getCursorPos1() -
-                                          m_beatmap->osuCoords2VRPixels(m_curve->pointAt(0.0f)))
-                                             .length();
-                        vrCursor2Delta = (m_beatmap->getOsu()->getVR()->getCursorPos2() -
-                                          m_beatmap->osuCoords2VRPixels(m_curve->pointAt(0.0f)))
-                                             .length();
-                        vrCursor1Inside = vrCursor1Delta < ((m_beatmap->getRawHitcircleDiameter() / 2.0f) *
-                                                            m_beatmap->getOsu()->getVR()->getCircleHitboxScale());
-                        vrCursor2Inside = vrCursor2Delta < ((m_beatmap->getRawHitcircleDiameter() / 2.0f) *
-                                                            m_beatmap->getOsu()->getVR()->getCircleHitboxScale());
-                    }
-
-                    if((cursorDelta < m_beatmap->getHitcircleDiameter() / 2.0f && m_beatmap->getOsu()->getModRelax()) ||
-                       (vrCursor1Inside || vrCursor2Inside)) {
+                    if((cursorDelta < m_beatmap->getHitcircleDiameter() / 2.0f && m_beatmap->getOsu()->getModRelax())) {
                         OsuScore::HIT result = OsuGameRules::getHitResult(delta, m_beatmap);
 
                         if(result != OsuScore::HIT::HIT_NULL) {
@@ -1147,27 +775,6 @@ void OsuSlider::update(long curPos) {
                             const float targetAngle = rad2deg(
                                 atan2(m_beatmap->getCursorPos().y - pos.y, m_beatmap->getCursorPos().x - pos.x));
 
-                            if(m_beatmap->getOsu()->isInVRMode()) {
-                                // calculate again which controller to do haptic feedback on (since startcircle radius
-                                // != followcircle radius)
-
-                                // distance to circle
-                                if(vrCursor1Delta < vrCursor2Delta)
-                                    m_bOnHitVRLeftControllerHapticFeedback = true;
-                                else
-                                    m_bOnHitVRLeftControllerHapticFeedback = false;
-
-                                // distance to playfield, if both cursors were valid (overrides distance to circle for
-                                // haptic feedback)
-                                if(vrCursor1Inside && vrCursor2Inside) {
-                                    if(m_beatmap->getOsu()->getVR()->getCursorDist1() <
-                                       m_beatmap->getOsu()->getVR()->getCursorDist2())
-                                        m_bOnHitVRLeftControllerHapticFeedback = true;
-                                    else
-                                        m_bOnHitVRLeftControllerHapticFeedback = false;
-                                }
-                            }
-
                             m_startResult = result;
                             onHit(m_startResult, delta, false, targetDelta, targetAngle);
                             bancho.osu->holding_slider = true;
@@ -1188,7 +795,7 @@ void OsuSlider::update(long curPos) {
         }
     }
 
-    // handle slider end, repeats, ticks, and constant VR controller vibration while sliding
+    // handle slider end, repeats, ticks
     if(!m_bEndFinished) {
         // NOTE: we have 2 timing conditions after which we start checking for strict tracking: 1) startcircle was
         // clicked, 2) slider has started timing wise it is easily possible to hit the startcircle way before the
@@ -1352,22 +959,6 @@ void OsuSlider::update(long curPos) {
             }
         }
 
-        // handle VR controller constant sliding vibration
-        if(m_beatmap->getOsu()->isInVRMode()) {
-            if(m_bStartFinished && !m_bEndFinished && m_bCursorInside && !m_beatmap->isPaused() &&
-               !m_beatmap->isWaiting() && m_beatmap->isPlaying()) {
-                // clicks have priority over the constant sliding vibration, that's why this is at the bottom here AFTER
-                // the other function above have had a chance to call triggerHapticPulse() while sliding the slider,
-                // vibrate the controller constantly
-                if(m_bOnHitVRLeftControllerHapticFeedback)
-                    openvr->getLeftController()->triggerHapticPulse(
-                        m_beatmap->getOsu()->getVR()->getSliderHapticPulseStrength());
-                else
-                    openvr->getRightController()->triggerHapticPulse(
-                        m_beatmap->getOsu()->getVR()->getSliderHapticPulseStrength());
-            }
-        }
-
         // handle sliderslide sound
         if(m_bStartFinished && !m_bEndFinished && m_bCursorInside && m_iDelta <= 0 &&
            (isClickHeldSlider() || m_beatmap->getOsu()->getModAuto() || m_beatmap->getOsu()->getModRelax()) &&
@@ -1570,15 +1161,6 @@ void OsuSlider::onHit(OsuScore::HIT result, long delta, bool startOrEnd, float t
                     anim->moveQuadOut(&m_fStartHitAnimation, 1.0f, OsuGameRules::getFadeOutTime(m_beatmap), true);
                 }
             }
-
-            if(m_beatmap->getOsu()->isInVRMode()) {
-                if(m_bOnHitVRLeftControllerHapticFeedback)
-                    openvr->getLeftController()->triggerHapticPulse(
-                        m_beatmap->getOsu()->getVR()->getHapticPulseStrength());
-                else
-                    openvr->getRightController()->triggerHapticPulse(
-                        m_beatmap->getOsu()->getVR()->getHapticPulseStrength());
-            }
         }
 
         // end body fadeout
@@ -1618,11 +1200,6 @@ void OsuSlider::onHit(OsuScore::HIT result, long delta, bool startOrEnd, float t
         if(result != OsuScore::HIT::HIT_MISS) {
             OsuScore::HIT resultForHealth = OsuScore::HIT::HIT_SLIDER30;
 
-            if(m_osu_drain_type_ref->getInt() == 1)  // VR
-            {
-                resultForHealth = result;
-            }
-
             m_beatmap->addHitResult(this, resultForHealth, 0, false, true, true, true, true,
                                     false);  // only increase health
             m_beatmap->addScorePoints(30);
@@ -1700,14 +1277,6 @@ void OsuSlider::onRepeatHit(bool successful, bool sliderend) {
             m_fStartHitAnimation = 0.001f;  // quickfix for 1 frame missing images
             anim->moveQuadOut(&m_fStartHitAnimation, 1.0f, OsuGameRules::getFadeOutTime(m_beatmap), true);
         }
-
-        if(m_beatmap->getOsu()->isInVRMode()) {
-            if(m_bOnHitVRLeftControllerHapticFeedback)
-                openvr->getLeftController()->triggerHapticPulse(m_beatmap->getOsu()->getVR()->getHapticPulseStrength());
-            else
-                openvr->getRightController()->triggerHapticPulse(
-                    m_beatmap->getOsu()->getVR()->getHapticPulseStrength());
-        }
     }
 
     // add score
@@ -1854,8 +1423,7 @@ void OsuSlider::onReset(long curPos) {
 
 void OsuSlider::rebuildVertexBuffer(bool useRawCoords) {
     // base mesh (background) (raw unscaled, size in raw osu coordinates centered at (0, 0, 0))
-    // this mesh can be shared by both the VR draw() and the desktop draw(), although in desktop mode it needs to be
-    // scaled and translated appropriately since we are not 1:1 with the playfield
+    // this mesh needs to be scaled and translated appropriately since we are not 1:1 with the playfield
     std::vector<Vector2> osuCoordPoints = m_curve->getPoints();
     if(!useRawCoords) {
         for(int p = 0; p < osuCoordPoints.size(); p++) {
@@ -1864,20 +1432,6 @@ void OsuSlider::rebuildVertexBuffer(bool useRawCoords) {
     }
     SAFE_DELETE(m_vao);
     m_vao = OsuSliderRenderer::generateVAO(m_beatmap->getOsu(), osuCoordPoints, m_beatmap->getRawHitcircleDiameter());
-
-    if(m_beatmap->getOsu()->isInVRMode()) {
-        // body mesh (foreground)
-        // HACKHACK: magic numbers from shader
-        const float defaultBorderSize = 0.11;
-        const float defaultTransitionSize = 0.011f;
-        const float defaultOuterShadowSize = 0.08f;
-        const float scale = 1.0f - m_osu_slider_border_size_multiplier_ref->getFloat() * defaultBorderSize -
-                            defaultTransitionSize - defaultOuterShadowSize;
-        SAFE_DELETE(m_vaoVR2);
-        m_vaoVR2 = OsuSliderRenderer::generateVAO(m_beatmap->getOsu(), osuCoordPoints,
-                                                  m_beatmap->getRawHitcircleDiameter() * scale,
-                                                  Vector3(0, 0, 0.25f));  // push 0.25f outwards
-    }
 }
 
 bool OsuSlider::isClickHeldSlider() {
@@ -1887,8 +1441,5 @@ bool OsuSlider::isClickHeldSlider() {
     // opposite key it was clicked with has been released at least once already) otherwise, that specific key is the
     // only one which counts for sliding
     const bool mouseDownAcceptable = (m_iDownKey == 1 ? m_beatmap->isKey1Down() : m_beatmap->isKey2Down());
-    return (m_iDownKey < 1 ? m_beatmap->isClickHeld() : mouseDownAcceptable) ||
-           (m_beatmap->getOsu()->isInVRMode() &&
-            (!m_beatmap->getOsu()->getVR()->isVirtualCursorOnScreen() ||
-             !m_osu_vr_draw_desktop_playfield->getBool()));  // a bit shit, but whatever. see OsuBeatmap::isClickHeld()
+    return (m_iDownKey < 1 ? m_beatmap->isClickHeld() : mouseDownAcceptable);
 }

+ 0 - 6
src/App/Osu/OsuSlider.h

@@ -34,8 +34,6 @@ class OsuSlider : public OsuHitObject {
     virtual void draw(Graphics *g);
     virtual void draw2(Graphics *g);
     void draw2(Graphics *g, bool drawApproachCircle, bool drawOnlyApproachCircle);
-    virtual void drawVR(Graphics *g, Matrix4 &mvp, OsuVR *vr);
-    virtual void drawVR2(Graphics *g, Matrix4 &mvp, OsuVR *vr);
     virtual void update(long curPos);
 
     virtual bool isSlider() { return true; }
@@ -79,7 +77,6 @@ class OsuSlider : public OsuHitObject {
     void drawStartCircle(Graphics *g, float alpha);
     void drawEndCircle(Graphics *g, float alpha, float sliderSnake = 1.0f);
     void drawBody(Graphics *g, float alpha, float from, float to);
-    void drawBodyVR(Graphics *g, OsuVR *vr, Matrix4 &mvp, float alpha, float from, float to);
 
     void updateAnimations(long curPos);
 
@@ -150,10 +147,7 @@ class OsuSlider : public OsuHitObject {
 
     float m_fSliderBreakRapeTime;
 
-    bool m_bOnHitVRLeftControllerHapticFeedback;
-
     VertexArrayObject *m_vao;
-    VertexArrayObject *m_vaoVR2;
 };
 
 #endif

+ 0 - 282
src/App/Osu/OsuSliderRenderer.cpp

@@ -17,14 +17,12 @@
 #include "Osu.h"
 #include "OsuGameRules.h"
 #include "OsuSkin.h"
-#include "OsuVR.h"
 #include "RenderTarget.h"
 #include "ResourceManager.h"
 #include "Shader.h"
 #include "VertexArrayObject.h"
 
 Shader *OsuSliderRenderer::BLEND_SHADER = NULL;
-Shader *OsuSliderRenderer::BLEND_SHADER_VR = NULL;
 
 float OsuSliderRenderer::MESH_CENTER_HEIGHT =
     0.5f;  // Camera::buildMatrixOrtho2D() uses -1 to 1 for zn/zf, so don't make this too high
@@ -457,231 +455,6 @@ void OsuSliderRenderer::draw(Graphics *g, Osu *osu, VertexArrayObject *vao, cons
     }
 }
 
-void OsuSliderRenderer::drawVR(Graphics *g, Osu *osu, OsuVR *vr, Matrix4 &mvp, float approachScale,
-                               const std::vector<Vector2> &points, const std::vector<Vector2> &alwaysPoints,
-                               float hitcircleDiameter, float from, float to, Color undimmedColor,
-                               float colorRGBMultiplier, float alpha, long sliderTimeForRainbow) {
-    if(osu_slider_alpha_multiplier.getFloat() <= 0.0f || alpha <= 0.0f) return;
-
-#if defined(MCENGINE_FEATURE_OPENGL)
-
-    const bool isOpenGLRendererHack =
-        (dynamic_cast<OpenGLLegacyInterface *>(g) != NULL || dynamic_cast<OpenGL3Interface *>(g) != NULL);
-
-#elif defined(MCENGINE_FEATURE_OPENGLES)
-
-        // const bool isOpenGLRendererHack = (dynamic_cast<OpenGLES2Interface*>(g) != NULL);
-
-#endif
-
-    checkUpdateVars(osu, hitcircleDiameter);
-
-    const int drawFromIndex = clamp<int>((int)std::round(points.size() * from), 0, points.size());
-    const int drawUpToIndex = clamp<int>((int)std::round(points.size() * to), 0, points.size());
-
-    // draw entire slider into framebuffer
-    g->setDepthBuffer(true);
-    // g->setBlending(false);
-    {
-        const Color undimmedBorderColor =
-            osu_slider_border_tint_combo_color.getBool() ? undimmedColor : osu->getSkin()->getSliderBorderColor();
-        const Color undimmedBodyColor =
-            osu->getSkin()->isSliderTrackOverridden() ? osu->getSkin()->getSliderTrackOverride() : undimmedColor;
-
-        Color dimmedBorderColor = COLOR(255, (int)(COLOR_GET_Ri(undimmedBorderColor) * colorRGBMultiplier),
-                                        (int)(COLOR_GET_Gi(undimmedBorderColor) * colorRGBMultiplier),
-                                        (int)(COLOR_GET_Bi(undimmedBorderColor) * colorRGBMultiplier));
-        Color dimmedBodyColor = COLOR(255, (int)(COLOR_GET_Ri(undimmedBodyColor) * colorRGBMultiplier),
-                                      (int)(COLOR_GET_Gi(undimmedBodyColor) * colorRGBMultiplier),
-                                      (int)(COLOR_GET_Bi(undimmedBodyColor) * colorRGBMultiplier));
-
-        if(osu_slider_rainbow.getBool()) {
-            float frequency = 0.3f;
-            float time = engine->getTime() * 20;
-
-            char red1 = std::sin(frequency * time + 0 + sliderTimeForRainbow) * 127 + 128;
-            char green1 = std::sin(frequency * time + 2 + sliderTimeForRainbow) * 127 + 128;
-            char blue1 = std::sin(frequency * time + 4 + sliderTimeForRainbow) * 127 + 128;
-
-            char red2 = std::sin(frequency * time * 1.5f + 0 + sliderTimeForRainbow) * 127 + 128;
-            char green2 = std::sin(frequency * time * 1.5f + 2 + sliderTimeForRainbow) * 127 + 128;
-            char blue2 = std::sin(frequency * time * 1.5f + 4 + sliderTimeForRainbow) * 127 + 128;
-
-            dimmedBorderColor = COLOR(255, red1, green1, blue1);
-            dimmedBodyColor = COLOR(255, red2, green2, blue2);
-        }
-
-        // if (!osu_slider_use_gradient_image.getBool())
-        {
-            BLEND_SHADER_VR->enable();
-            BLEND_SHADER_VR->setUniformMatrix4fv("matrix", mvp);
-            BLEND_SHADER_VR->setUniform1i("style", osu_slider_osu_next_style.getBool() ? 1 : 0);
-            BLEND_SHADER_VR->setUniform1f("bodyAlphaMultiplier", osu_slider_body_alpha_multiplier.getFloat());
-            BLEND_SHADER_VR->setUniform1f("bodyColorSaturation", osu_slider_body_color_saturation.getFloat());
-            BLEND_SHADER_VR->setUniform1f("borderSizeMultiplier", osu_slider_border_size_multiplier.getFloat());
-            BLEND_SHADER_VR->setUniform3f("colBorder", COLOR_GET_Rf(dimmedBorderColor), COLOR_GET_Gf(dimmedBorderColor),
-                                          COLOR_GET_Bf(dimmedBorderColor));
-            BLEND_SHADER_VR->setUniform3f("colBody", COLOR_GET_Rf(dimmedBodyColor), COLOR_GET_Gf(dimmedBodyColor),
-                                          COLOR_GET_Bf(dimmedBodyColor));
-        }
-
-        g->setColor(0xffffffff);
-        osu->getSkin()->getSliderGradient()->bind();
-        {
-#if defined(MCENGINE_FEATURE_OPENGL)
-
-            if(isOpenGLRendererHack) glBlendEquation(GL_MAX);  // HACKHACK: OpenGL hardcoded
-
-#endif
-
-            // draw curve mesh
-            {
-                BLEND_SHADER_VR->setUniform1i("part", 1);
-                drawFillSliderBodyPeppyVR2(
-                    g, vr, mvp, points,
-                    (osu_slider_legacy_use_baked_vao.getBool() ? UNIT_CIRCLE_VAO_BAKED : UNIT_CIRCLE_VAO),
-                    hitcircleDiameter / 2.0f, drawFromIndex, drawUpToIndex);
-
-                if(alwaysPoints.size() > 0)
-                    drawFillSliderBodyPeppyVR2(g, vr, mvp, alwaysPoints, UNIT_CIRCLE_VAO_BAKED,
-                                               hitcircleDiameter / 2.0f, 0, alwaysPoints.size());
-
-                BLEND_SHADER_VR->setUniform1i("part", 0);
-                drawFillSliderBodyPeppyVR(
-                    g, osu, vr, mvp, points,
-                    (osu_slider_legacy_use_baked_vao.getBool() ? UNIT_CIRCLE_VAO_BAKED : UNIT_CIRCLE_VAO),
-                    hitcircleDiameter / 2.0f, drawFromIndex, drawUpToIndex);
-
-                if(alwaysPoints.size() > 0)
-                    drawFillSliderBodyPeppyVR(g, osu, vr, mvp, alwaysPoints, UNIT_CIRCLE_VAO_BAKED,
-                                              hitcircleDiameter / 2.0f, 0, alwaysPoints.size());
-            }
-
-#if defined(MCENGINE_FEATURE_OPENGL)
-
-            if(isOpenGLRendererHack) glBlendEquation(GL_FUNC_ADD);  // HACKHACK: OpenGL hardcoded
-
-#endif
-
-            // if (!osu_slider_use_gradient_image.getBool())
-            BLEND_SHADER_VR->disable();
-        }
-    }
-    // g->setBlending(true);
-    g->setDepthBuffer(false);
-
-    vr->getShaderTexturedLegacyGeneric()->enable();
-}
-
-void OsuSliderRenderer::drawVR(Graphics *g, Osu *osu, OsuVR *vr, Matrix4 &mvp, float approachScale,
-                               VertexArrayObject *vao1, VertexArrayObject *vao2,
-                               const std::vector<Vector2> &alwaysPoints, float hitcircleDiameter, float from, float to,
-                               Color undimmedColor, float colorRGBMultiplier, float alpha, long sliderTimeForRainbow) {
-    if(osu_slider_alpha_multiplier.getFloat() <= 0.0f || alpha <= 0.0f || vao1 == NULL || vao2 == NULL) return;
-
-#if defined(MCENGINE_FEATURE_OPENGL)
-
-    const bool isOpenGLRendererHack =
-        (dynamic_cast<OpenGLLegacyInterface *>(g) != NULL || dynamic_cast<OpenGL3Interface *>(g) != NULL);
-
-#elif defined(MCENGINE_FEATURE_OPENGLES)
-
-        // const bool isOpenGLRendererHack = (dynamic_cast<OpenGLES2Interface*>(g) != NULL);
-
-#endif
-
-    checkUpdateVars(osu, hitcircleDiameter);
-
-    // draw entire slider into framebuffer
-    g->setDepthBuffer(true);
-    // g->setBlending(false);
-    {
-        const Color undimmedBorderColor =
-            osu_slider_border_tint_combo_color.getBool() ? undimmedColor : osu->getSkin()->getSliderBorderColor();
-        const Color undimmedBodyColor =
-            osu->getSkin()->isSliderTrackOverridden() ? osu->getSkin()->getSliderTrackOverride() : undimmedColor;
-
-        Color dimmedBorderColor = COLOR(255, (int)(COLOR_GET_Ri(undimmedBorderColor) * colorRGBMultiplier),
-                                        (int)(COLOR_GET_Gi(undimmedBorderColor) * colorRGBMultiplier),
-                                        (int)(COLOR_GET_Bi(undimmedBorderColor) * colorRGBMultiplier));
-        Color dimmedBodyColor = COLOR(255, (int)(COLOR_GET_Ri(undimmedBodyColor) * colorRGBMultiplier),
-                                      (int)(COLOR_GET_Gi(undimmedBodyColor) * colorRGBMultiplier),
-                                      (int)(COLOR_GET_Bi(undimmedBodyColor) * colorRGBMultiplier));
-
-        if(osu_slider_rainbow.getBool()) {
-            float frequency = 0.3f;
-            float time = engine->getTime() * 20;
-
-            char red1 = std::sin(frequency * time + 0 + sliderTimeForRainbow) * 127 + 128;
-            char green1 = std::sin(frequency * time + 2 + sliderTimeForRainbow) * 127 + 128;
-            char blue1 = std::sin(frequency * time + 4 + sliderTimeForRainbow) * 127 + 128;
-
-            char red2 = std::sin(frequency * time * 1.5f + 0 + sliderTimeForRainbow) * 127 + 128;
-            char green2 = std::sin(frequency * time * 1.5f + 2 + sliderTimeForRainbow) * 127 + 128;
-            char blue2 = std::sin(frequency * time * 1.5f + 4 + sliderTimeForRainbow) * 127 + 128;
-
-            dimmedBorderColor = COLOR(255, red1, green1, blue1);
-            dimmedBodyColor = COLOR(255, red2, green2, blue2);
-        }
-
-        // if (!osu_slider_use_gradient_image.getBool())
-        {
-            BLEND_SHADER_VR->enable();
-            BLEND_SHADER_VR->setUniformMatrix4fv("matrix", mvp);
-            BLEND_SHADER_VR->setUniform1i("style", osu_slider_osu_next_style.getBool() ? 1 : 0);
-            BLEND_SHADER_VR->setUniform1f("bodyAlphaMultiplier", osu_slider_body_alpha_multiplier.getFloat());
-            BLEND_SHADER_VR->setUniform1f("bodyColorSaturation", osu_slider_body_color_saturation.getFloat());
-            BLEND_SHADER_VR->setUniform1f("borderSizeMultiplier", osu_slider_border_size_multiplier.getFloat());
-            BLEND_SHADER_VR->setUniform3f("colBorder", COLOR_GET_Rf(dimmedBorderColor), COLOR_GET_Gf(dimmedBorderColor),
-                                          COLOR_GET_Bf(dimmedBorderColor));
-            BLEND_SHADER_VR->setUniform3f("colBody", COLOR_GET_Rf(dimmedBodyColor), COLOR_GET_Gf(dimmedBodyColor),
-                                          COLOR_GET_Bf(dimmedBodyColor));
-        }
-
-        g->setColor(0xffffffff);
-        osu->getSkin()->getSliderGradient()->bind();
-        {
-#if defined(MCENGINE_FEATURE_OPENGL)
-
-            if(isOpenGLRendererHack) glBlendEquation(GL_MAX);  // HACKHACK: OpenGL hardcoded
-
-#endif
-
-            // draw curve mesh
-            {
-                BLEND_SHADER_VR->setUniform1i("part", 1);
-                vao2->setDrawPercent(from, to, UNIT_CIRCLE_VAO_TRIANGLES->getVertices().size());
-                g->drawVAO(vao2);
-
-                if(alwaysPoints.size() > 0)
-                    drawFillSliderBodyPeppyVR2(g, vr, mvp, alwaysPoints, UNIT_CIRCLE_VAO_BAKED,
-                                               hitcircleDiameter / 2.0f, 0, alwaysPoints.size());
-
-                BLEND_SHADER_VR->setUniform1i("part", 0);
-                vao1->setDrawPercent(from, to, UNIT_CIRCLE_VAO_TRIANGLES->getVertices().size());
-                g->drawVAO(vao1);
-
-                if(alwaysPoints.size() > 0)
-                    drawFillSliderBodyPeppyVR(g, osu, vr, mvp, alwaysPoints, UNIT_CIRCLE_VAO_BAKED,
-                                              hitcircleDiameter / 2.0f, 0, alwaysPoints.size());
-            }
-
-#if defined(MCENGINE_FEATURE_OPENGL)
-
-            if(isOpenGLRendererHack) glBlendEquation(GL_FUNC_ADD);  // HACKHACK: OpenGL hardcoded
-
-#endif
-
-            // if (!osu_slider_use_gradient_image.getBool())
-            BLEND_SHADER_VR->disable();
-        }
-    }
-    // g->setBlending(true);
-    g->setDepthBuffer(false);
-
-    vr->getShaderTexturedLegacyGeneric()->enable();
-}
-
 void OsuSliderRenderer::drawMM(Graphics *g, Osu *osu, const std::vector<Vector2> &points, float hitcircleDiameter,
                                float from, float to, Color undimmedColor, float colorRGBMultiplier, float alpha,
                                long sliderTimeForRainbow) {
@@ -829,59 +602,6 @@ void OsuSliderRenderer::drawFillSliderBodyPeppy(Graphics *g, Osu *osu, const std
     g->popTransform();
 }
 
-void OsuSliderRenderer::drawFillSliderBodyPeppyVR(Graphics *g, Osu *osu, OsuVR *vr, Matrix4 &mvp,
-                                                  const std::vector<Vector2> &points, VertexArrayObject *circleMesh,
-                                                  float radius, int drawFromIndex, int drawUpToIndex) {
-    if(drawFromIndex < 0) drawFromIndex = 0;
-    if(drawUpToIndex < 0) drawUpToIndex = points.size();
-
-    g->pushTransform();
-    {
-        // now, translate and draw the master vao for every curve point
-        float startX = 0.0f;
-        float startY = 0.0f;
-        for(int i = drawFromIndex; i < drawUpToIndex; ++i) {
-            const float x = points[i].x;
-            const float y = points[i].y;
-
-            g->translate(x - startX, y - startY, 0);
-            g->drawVAO(circleMesh);
-
-            startX = x;
-            startY = y;
-        }
-    }
-    g->popTransform();
-}
-
-void OsuSliderRenderer::drawFillSliderBodyPeppyVR2(Graphics *g, OsuVR *vr, Matrix4 &mvp,
-                                                   const std::vector<Vector2> &points, VertexArrayObject *circleMesh,
-                                                   float radius, int drawFromIndex, int drawUpToIndex) {
-    if(drawFromIndex < 0) drawFromIndex = 0;
-    if(drawUpToIndex < 0) drawUpToIndex = points.size();
-
-    // HACKHACK: magic numbers from shader
-    const float defaultBorderSize = 0.11;
-    const float defaultTransitionSize = 0.011f;
-    const float defaultOuterShadowSize = 0.08f;
-    const float scale = 1.0f - osu_slider_border_size_multiplier.getFloat() * defaultBorderSize -
-                        defaultTransitionSize - defaultOuterShadowSize;
-
-    // now, translate and draw the master vao for every curve point
-    for(int i = drawFromIndex; i < drawUpToIndex; ++i) {
-        const float x = points[i].x;
-        const float y = points[i].y;
-
-        g->pushTransform();
-        {
-            g->scale(scale, scale, 1.0f);
-            g->translate(x, y, 0.25f);
-            g->drawVAO(circleMesh);
-        }
-        g->popTransform();
-    }
-}
-
 void OsuSliderRenderer::drawFillSliderBodyMM(Graphics *g, const std::vector<Vector2> &points, float radius,
                                              int drawFromIndex, int drawUpToIndex) {
     // modified version of
@@ -1033,8 +753,6 @@ void OsuSliderRenderer::checkUpdateVars(Osu *osu, float hitcircleDiameter) {
     {
         // build shaders
         BLEND_SHADER = engine->getResourceManager()->loadShader("slider.vsh", "slider.fsh", "slider");
-        if(osu != NULL && osu->isInVRMode())
-            BLEND_SHADER_VR = engine->getResourceManager()->loadShader("sliderVR.vsh", "sliderVR.fsh", "sliderVR");
     }
 
     const int subdivisions = osu_slider_body_unit_circle_subdivisions.getInt();

+ 0 - 16
src/App/Osu/OsuSliderRenderer.h

@@ -14,12 +14,10 @@ class Shader;
 class VertexArrayObject;
 
 class Osu;
-class OsuVR;
 
 class OsuSliderRenderer {
    public:
     static Shader *BLEND_SHADER;
-    static Shader *BLEND_SHADER_VR;
 
     static float UNIT_CIRCLE_VAO_DIAMETER;
 
@@ -36,14 +34,6 @@ class OsuSliderRenderer {
                      Color undimmedColor = 0xffffffff, float colorRGBMultiplier = 1.0f, float alpha = 1.0f,
                      long sliderTimeForRainbow = 0, bool doEnableRenderTarget = true, bool doDisableRenderTarget = true,
                      bool doDrawSliderFrameBufferToScreen = true);
-    static void drawVR(Graphics *g, Osu *osu, OsuVR *vr, Matrix4 &mvp, float approachScale,
-                       const std::vector<Vector2> &points, const std::vector<Vector2> &alwaysPoints,
-                       float hitcircleDiameter, float from = 0.0f, float to = 1.0f, Color undimmedColor = 0xffffffff,
-                       float colorRGBMultiplier = 1.0f, float alpha = 1.0f, long sliderTimeForRainbow = 0);
-    static void drawVR(Graphics *g, Osu *osu, OsuVR *vr, Matrix4 &mvp, float approachScale, VertexArrayObject *vao1,
-                       VertexArrayObject *vao2, const std::vector<Vector2> &alwaysPoints, float hitcircleDiameter,
-                       float from = 0.0f, float to = 1.0f, Color undimmedColor = 0xffffffff,
-                       float colorRGBMultiplier = 1.0f, float alpha = 1.0f, long sliderTimeForRainbow = 0);
     static void drawMM(Graphics *g, Osu *osu, const std::vector<Vector2> &points, float hitcircleDiameter,
                        float from = 0.0f, float to = 1.0f, Color undimmedColor = 0xffffffff,
                        float colorRGBMultiplier = 1.0f, float alpha = 1.0f, long sliderTimeForRainbow = 0);
@@ -52,12 +42,6 @@ class OsuSliderRenderer {
     static void drawFillSliderBodyPeppy(Graphics *g, Osu *osu, const std::vector<Vector2> &points,
                                         VertexArrayObject *circleMesh, float radius, int drawFromIndex,
                                         int drawUpToIndex, Shader *shader = NULL);
-    static void drawFillSliderBodyPeppyVR(Graphics *g, Osu *osu, OsuVR *vr, Matrix4 &mvp,
-                                          const std::vector<Vector2> &points, VertexArrayObject *circleMesh,
-                                          float radius, int drawFromIndex, int drawUpToIndex);
-    static void drawFillSliderBodyPeppyVR2(Graphics *g, OsuVR *vr, Matrix4 &mvp, const std::vector<Vector2> &points,
-                                           VertexArrayObject *circleMesh, float radius, int drawFromIndex,
-                                           int drawUpToIndex);
     static void drawFillSliderBodyMM(Graphics *g, const std::vector<Vector2> &points, float radius, int drawFromIndex,
                                      int drawUpToIndex);
 

+ 2 - 2
src/App/Osu/OsuSongBrowser2.cpp

@@ -574,7 +574,7 @@ OsuSongBrowser2::OsuSongBrowser2(Osu *osu) : OsuScreenBackable(osu) {
     m_scoreBrowser->setDrawFrame(false);
     m_scoreBrowser->setHorizontalScrolling(false);
     m_scoreBrowser->setScrollbarSizeMultiplier(0.25f);
-    m_scoreBrowser->setScrollResistance((m_osu->isInVRMode() || env->getOS() == Environment::OS::OS_HORIZON)
+    m_scoreBrowser->setScrollResistance((env->getOS() == Environment::OS::OS_HORIZON)
                                             ? convar->getConVarByName("ui_scrollview_resistance")->getInt()
                                             : 15);  // a bit shitty this check + convar, but works well enough
     m_scoreBrowserScoresStillLoadingElement = new OsuUISongBrowserScoresStillLoadingElement(m_osu, "Loading...");
@@ -595,7 +595,7 @@ OsuSongBrowser2::OsuSongBrowser2(Osu *osu) : OsuScreenBackable(osu) {
     m_songBrowser->setDrawBackground(false);
     m_songBrowser->setDrawFrame(false);
     m_songBrowser->setHorizontalScrolling(false);
-    m_songBrowser->setScrollResistance((m_osu->isInVRMode() || env->getOS() == Environment::OS::OS_HORIZON)
+    m_songBrowser->setScrollResistance((env->getOS() == Environment::OS::OS_HORIZON)
                                            ? convar->getConVarByName("ui_scrollview_resistance")->getInt()
                                            : 15);  // a bit shitty this check + convar, but works well enough
 

+ 0 - 41
src/App/Osu/OsuSpinner.cpp

@@ -11,13 +11,10 @@
 #include "ConVar.h"
 #include "Engine.h"
 #include "Mouse.h"
-#include "OpenVRController.h"
-#include "OpenVRInterface.h"
 #include "Osu.h"
 #include "OsuBeatmapStandard.h"
 #include "OsuGameRules.h"
 #include "OsuSkin.h"
-#include "OsuVR.h"
 #include "ResourceManager.h"
 #include "SoundEngine.h"
 
@@ -58,8 +55,6 @@ OsuSpinner::OsuSpinner(int x, int y, long time, int sampleType, bool isEndOfComb
     m_fDeltaAngleOverflow = 0.0f;
     m_fRPM = 0.0f;
     m_fLastMouseAngle = 0.0f;
-    m_fLastVRCursorAngle1 = 0.0f;
-    m_fLastVRCursorAngle2 = 0.0f;
     m_fRatio = 0.0f;
 
     // spinners don't need misaims
@@ -275,24 +270,6 @@ void OsuSpinner::draw(Graphics *g) {
     }
 }
 
-void OsuSpinner::drawVR(Graphics *g, Matrix4 &mvp, OsuVR *vr) {
-    /// if (m_bVisible)
-    {
-        float clampedApproachScalePercent =
-            m_fApproachScale - 1.0f;  // goes from <m_osu_approach_scale_multiplier_ref> to 0
-        clampedApproachScalePercent =
-            clamp<float>(clampedApproachScalePercent / m_osu_approach_scale_multiplier_ref->getFloat(), 0.0f,
-                         1.0f);  // goes from 1 to 0
-
-        Matrix4 translation;
-        translation.translate(0, 0, -clampedApproachScalePercent * vr->getApproachDistance());
-        Matrix4 finalMVP = mvp * translation;
-
-        vr->getShaderTexturedLegacyGeneric()->setUniformMatrix4fv("matrix", finalMVP);
-        draw(g);
-    }
-}
-
 void OsuSpinner::update(long curPos) {
     OsuHitObject::update(curPos);
 
@@ -334,24 +311,6 @@ void OsuSpinner::update(long curPos) {
             const float currentMouseAngle = (float)std::atan2(mouseDelta.y, mouseDelta.x);
             angleDiff = (currentMouseAngle - m_fLastMouseAngle);
 
-            if(m_beatmap->getOsu()->isInVRMode()) {
-                Vector2 vrCursorDelta1 =
-                    m_beatmap->getOsu()->getVR()->getCursorPos1() - m_beatmap->osuCoords2VRPixels(m_vRawPos);
-                Vector2 vrCursorDelta2 =
-                    m_beatmap->getOsu()->getVR()->getCursorPos2() - m_beatmap->osuCoords2VRPixels(m_vRawPos);
-
-                const float currentVRCursorAngle1 = (float)std::atan2(vrCursorDelta1.x, vrCursorDelta1.y);
-                const float currentVRCursorAngle2 = (float)std::atan2(vrCursorDelta2.x, vrCursorDelta2.y);
-
-                angleDiff -= (currentVRCursorAngle1 - m_fLastVRCursorAngle1);
-                angleDiff -= (currentVRCursorAngle2 - m_fLastVRCursorAngle2);
-
-                if(std::abs(angleDiff) > 0.001f) {
-                    m_fLastVRCursorAngle1 = currentVRCursorAngle1;
-                    m_fLastVRCursorAngle2 = currentVRCursorAngle2;
-                }
-            }
-
             if(std::abs(angleDiff) > 0.001f)
                 m_fLastMouseAngle = currentMouseAngle;
             else

+ 0 - 3
src/App/Osu/OsuSpinner.h

@@ -16,7 +16,6 @@ class OsuSpinner : public OsuHitObject {
     virtual ~OsuSpinner();
 
     virtual void draw(Graphics *g);
-    virtual void drawVR(Graphics *g, Matrix4 &mvp, OsuVR *vr);
     virtual void update(long curPos);
 
     virtual bool isSpinner() { return true; }
@@ -57,8 +56,6 @@ class OsuSpinner : public OsuHitObject {
     float m_fRPM;
 
     float m_fLastMouseAngle;
-    float m_fLastVRCursorAngle1;
-    float m_fLastVRCursorAngle2;
     float m_fRatio;
 };
 

+ 0 - 19
src/App/Osu/OsuUpdateHandler.cpp

@@ -22,8 +22,6 @@
 
 const char *OsuUpdateHandler::TEMP_UPDATE_DOWNLOAD_FILEPATH = "update.zip";
 
-ConVar *OsuUpdateHandler::m_osu_release_stream_ref = NULL;
-
 void *OsuUpdateHandler::run(void *data) {
     // not using semaphores/mutexes here because it's not critical
 
@@ -70,9 +68,6 @@ OsuUpdateHandler::OsuUpdateHandler() {
                                                                  : STATUS::STATUS_UP_TO_DATE;
     m_iNumRetries = 0;
     _m_bKYS = false;
-
-    // convar refs
-    if(m_osu_release_stream_ref == NULL) m_osu_release_stream_ref = convar->getConVarByName("osu_release_stream");
 }
 
 OsuUpdateHandler::~OsuUpdateHandler() {
@@ -293,16 +288,6 @@ void OsuUpdateHandler::_installUpdate(std::string zipFilePath) {
     m_status = STATUS::STATUS_SUCCESS_INSTALLATION;
 }
 
-OsuUpdateHandler::STREAM OsuUpdateHandler::stringToStream(UString streamString) {
-    STREAM stream = STREAM::STREAM_NULL;
-    if(streamString.find("desktop") != -1)
-        stream = STREAM::STREAM_DESKTOP;
-    else if(streamString.find("vr") != -1)
-        stream = STREAM::STREAM_VR;
-
-    return stream;
-}
-
 Environment::OS OsuUpdateHandler::stringToOS(UString osString) {
     Environment::OS os = Environment::OS::OS_NULL;
     if(osString.find("windows") != -1)
@@ -314,7 +299,3 @@ Environment::OS OsuUpdateHandler::stringToOS(UString osString) {
 
     return os;
 }
-
-OsuUpdateHandler::STREAM OsuUpdateHandler::getReleaseStream() {
-    return stringToStream(m_osu_release_stream_ref->getString());
-}

+ 0 - 5
src/App/Osu/OsuUpdateHandler.h

@@ -38,7 +38,6 @@ class OsuUpdateHandler {
 
    private:
     static const char *TEMP_UPDATE_DOWNLOAD_FILEPATH;
-    static ConVar *m_osu_release_stream_ref;
 
     // async
     void _requestUpdate();
@@ -49,11 +48,7 @@ class OsuUpdateHandler {
     bool _m_bKYS;
 
     // releases
-    enum class STREAM { STREAM_NULL, STREAM_DESKTOP, STREAM_VR };
-
-    STREAM stringToStream(UString streamString);
     Environment::OS stringToOS(UString osString);
-    STREAM getReleaseStream();
 
     // status
     STATUS m_status;

+ 0 - 1088
src/App/Osu/OsuVR.cpp

@@ -1,1088 +0,0 @@
-//================ Copyright (c) 2017, PG, All rights reserved. =================//
-//
-// Purpose:		handles all VR related stuff (input, scene, screens)
-//
-// $NoKeywords: $osuvr
-//===============================================================================//
-
-#include "OsuVR.h"
-
-#include "ConVar.h"
-#include "Console.h"
-#include "Engine.h"
-#include "Keyboard.h"
-#include "Mouse.h"
-#include "OpenVRController.h"
-#include "OpenVRInterface.h"
-#include "Osu.h"
-#include "OsuBeatmap.h"
-#include "OsuGameRules.h"
-#include "OsuHUD.h"
-#include "OsuKeyBindings.h"
-#include "OsuNotificationOverlay.h"
-#include "OsuSkin.h"
-#include "OsuVRUIImageButton.h"
-#include "OsuVRUIImageCheckbox.h"
-#include "OsuVRUISlider.h"
-#include "OsuVolumeOverlay.h"
-#include "ResourceManager.h"
-#include "SoundEngine.h"
-#include "VertexArrayObject.h"
-
-ConVar osu_vr_matrix_screen("osu_vr_matrix_screen");
-ConVar osu_vr_matrix_playfield("osu_vr_matrix_playfield");
-ConVar osu_vr_reset_matrices("osu_vr_reset_matrices");
-ConVar osu_vr_layout_lock("osu_vr_layout_lock", false, FCVAR_NONE);
-
-ConVar osu_vr_screen_scale("osu_vr_screen_scale", 1.64613f, FCVAR_NONE);
-ConVar osu_vr_playfield_scale("osu_vr_playfield_scale", 0.945593f, FCVAR_NONE);
-ConVar osu_vr_hud_scale("osu_vr_hud_scale", 4.0f, FCVAR_NONE);
-ConVar osu_vr_controller_offset_x("osu_vr_controller_offset_x", 0.0f, FCVAR_NONE);
-ConVar osu_vr_controller_offset_y("osu_vr_controller_offset_y", 0.0f, FCVAR_NONE);
-ConVar osu_vr_controller_offset_z("osu_vr_controller_offset_z", 0.0f, FCVAR_NONE);
-ConVar osu_vr_controller_pinch_scale_multiplier("osu_vr_controller_pinch_scale_multiplier", 2.0f, FCVAR_NONE);
-ConVar osu_vr_controller_warning_distance_enabled("osu_vr_controller_warning_distance_enabled", true, FCVAR_NONE);
-ConVar osu_vr_controller_warning_distance_start("osu_vr_controller_warning_distance_start", -0.20f, FCVAR_NONE);
-ConVar osu_vr_controller_warning_distance_end("osu_vr_controller_warning_distance_end", -0.30f, FCVAR_NONE);
-
-ConVar osu_vr_approach_distance("osu_vr_approach_distance", 15.0f, FCVAR_NONE,
-                                "distance from which hitobjects start flying + fading in, in meters");
-ConVar osu_vr_hud_distance("osu_vr_hud_distance", 15.0f, FCVAR_NONE, "distance at which the HUD is drawn, in meters");
-ConVar osu_vr_playfield_native_draw_scale("osu_vr_playfield_native_draw_scale", 0.003f, FCVAR_NONE);
-
-ConVar osu_vr_circle_hitbox_scale("osu_vr_circle_hitbox_scale", 1.5f, FCVAR_NONE,
-                                  "scales the invisible hitbox radius of all hitobjects, to make it feel better");
-
-ConVar osu_vr_cursor_alpha("osu_vr_cursor_alpha", 0.15f, FCVAR_NONE);
-
-ConVar osu_vr_controller_vibration_strength("osu_vr_controller_vibration_strength", 0.45f, FCVAR_NONE);
-ConVar osu_vr_slider_controller_vibration_strength("osu_vr_slider_controller_vibration_strength", 0.05f /*0.0f*/,
-                                                   FCVAR_NONE);
-
-ConVar osu_vr_draw_playfield("osu_vr_draw_playfield", true, FCVAR_NONE);
-ConVar osu_vr_draw_floor("osu_vr_draw_floor", true, FCVAR_NONE);
-ConVar osu_vr_draw_laser_game("osu_vr_draw_laser_game", true, FCVAR_NONE);
-ConVar osu_vr_draw_laser_menu("osu_vr_draw_laser_menu", true, FCVAR_NONE);
-
-ConVar osu_vr_ui_offset("osu_vr_ui_offset", 0.1f, FCVAR_NONE);
-
-const char *OsuVR::OSUVR_CONFIG_FILE_NAME = "osuvrplayarea";
-
-OsuVR::OsuVR(Osu *osu) {
-    m_osu = osu;
-
-    // convar refs
-    m_osu_draw_cursor_trail_ref = convar->getConVarByName("osu_draw_cursor_trail");
-    m_osu_volume_master_ref = convar->getConVarByName("osu_volume_master");
-
-    // convar callbacks
-    osu_vr_matrix_screen.setCallback(fastdelegate::MakeDelegate(this, &OsuVR::onScreenMatrixChange));
-    osu_vr_matrix_playfield.setCallback(fastdelegate::MakeDelegate(this, &OsuVR::onPlayfieldMatrixChange));
-    osu_vr_reset_matrices.setCallback(fastdelegate::MakeDelegate(this, &OsuVR::resetMatrices));
-
-    // vars
-    m_bMovingPlayfieldCheck = true;
-    m_bMovingPlayfieldAllow = true;
-    m_bMovingScreenCheck = true;
-    m_bMovingScreenAllow = true;
-    m_bIsLeftControllerMovingScreen = false;
-    m_bIsRightControllerMovingScreen = true;
-
-    m_bDrawLaser = false;
-    m_bScreenIntersection = false;
-    m_bClickHeldStartedInScreen = false;
-    m_bPlayfieldIntersection1 = false;
-    m_bPlayfieldIntersection2 = false;
-    m_fPlayfieldCursorDist1 = 0.0f;
-    m_fPlayfieldCursorDist2 = 0.0f;
-    m_fPlayfieldCursorDistSigned1 = 0.0f;
-    m_fPlayfieldCursorDistSigned2 = 0.0f;
-
-    m_fAspect = 1.0f;
-
-    m_bClickCheck = true;
-    m_bMenuCheck = true;
-
-    m_bScaleCheck = true;
-    m_bIsPlayerScalingPlayfield = false;
-    m_fScaleBackup = osu_vr_screen_scale.getFloat();
-    m_fDefaultScreenScale = osu_vr_screen_scale.getFloat();
-    m_fDefaultPlayfieldScale = osu_vr_playfield_scale.getFloat();
-
-    m_vPlayfieldCursorPos1.x = 0;
-    m_vPlayfieldCursorPos1.y = 0;
-
-    m_vPlayfieldCursorPos2.x = OsuGameRules::OSU_COORD_WIDTH;
-    m_vPlayfieldCursorPos2.y = OsuGameRules::OSU_COORD_HEIGHT;
-
-    // UI elements
-    OsuVRUISlider *slider = new OsuVRUISlider(this, 0, 0, 1.0f, 0.125f);
-    slider->setChangeCallback(fastdelegate::MakeDelegate(this, &OsuVR::onVolumeSliderChange));
-    m_volumeSlider = slider;
-    m_uiElements.push_back(m_volumeSlider);
-
-    OsuVRUIImageButton *button = new OsuVRUIImageButton(this, 0, 0, 0.36f, 0.30f, "OSU_VR_UI_ICON_KEYBOARD");
-    button->setClickCallback(fastdelegate::MakeDelegate(this, &OsuVR::onKeyboardButtonClicked));
-    m_keyboardButton = button;
-    m_uiElements.push_back(m_keyboardButton);
-
-    button = new OsuVRUIImageButton(this, 0, 0, 0.30f, 0.30f, "OSU_VR_UI_ICON_MINUS");
-    button->setClickCallback(fastdelegate::MakeDelegate(this, &OsuVR::onOffsetDownClicked));
-    m_offsetDownButton = button;
-    m_offsetDownButton->setVisible(false);
-    m_uiElements.push_back(m_offsetDownButton);
-
-    button = new OsuVRUIImageButton(this, 0, 0, 0.30f, 0.30f, "OSU_VR_UI_ICON_PLUS");
-    button->setClickCallback(fastdelegate::MakeDelegate(this, &OsuVR::onOffsetUpClicked));
-    m_offsetUpButton = button;
-    m_offsetUpButton->setVisible(false);
-    m_uiElements.push_back(m_offsetUpButton);
-
-    slider = new OsuVRUISlider(this, 0, 0, 1.5f, 0.10f);
-    slider->setChangeCallback(fastdelegate::MakeDelegate(this, &OsuVR::onScrubbingSliderChange));
-    m_scrubbingSlider = slider;
-    m_uiElements.push_back(m_scrubbingSlider);
-
-    button = new OsuVRUIImageButton(this, 0, 0, 0.30f, 0.30f, "OSU_VR_UI_ICON_RESET");
-    button->setClickCallback(fastdelegate::MakeDelegate(this, &OsuVR::onMatrixResetClicked));
-    m_matrixResetButton = button;
-    m_uiElements.push_back(m_matrixResetButton);
-
-    m_lockLayoutCheckbox =
-        new OsuVRUIImageCheckbox(this, 0, 0, 0.3f, 0.3f, "OSU_VR_UI_ICON_LOCK_LOCKED", "OSU_VR_UI_ICON_LOCK_UNLOCKED");
-    m_lockLayoutCheckbox->setChecked(osu_vr_layout_lock.getBool());
-    m_lockLayoutCheckbox->setClickCallback(fastdelegate::MakeDelegate(this, &OsuVR::onLayoutLockClicked));
-    m_uiElements.push_back(m_lockLayoutCheckbox);
-
-    // load/execute VR stuff only in VR builds
-    if(openvr->isReady()) {
-        engine->getResourceManager()->loadImage("ic_keyboard_white_48dp.png", "OSU_VR_UI_ICON_KEYBOARD");
-        engine->getResourceManager()->loadImage("ic_replay_white_48dp.png", "OSU_VR_UI_ICON_RESET");
-        engine->getResourceManager()->loadImage("ic_lock_outline_white_48dp.png", "OSU_VR_UI_ICON_LOCK_LOCKED");
-        engine->getResourceManager()->loadImage("ic_lock_open_white_48dp.png", "OSU_VR_UI_ICON_LOCK_UNLOCKED");
-        engine->getResourceManager()->loadImage("ic_add_white_48dp.png", "OSU_VR_UI_ICON_PLUS");
-        engine->getResourceManager()->loadImage("ic_remove_white_48dp.png", "OSU_VR_UI_ICON_MINUS");
-
-        m_shaderGenericTextured = engine->getResourceManager()->createShader(
-
-            // vertex Shader
-            "#version 110\n"
-            "uniform mat4 matrix;\n"
-            "varying vec2 texCoords;\n"
-            "void main()\n"
-            "{\n"
-            "	texCoords = gl_MultiTexCoord0.xy;\n"
-            "	gl_Position = matrix * gl_Vertex;\n"
-            "	gl_FrontColor = gl_Color;\n"
-            "}\n",
-
-            // fragment Shader
-            "#version 110\n"
-            "uniform sampler2D mytexture;\n"
-            "varying vec2 texCoords;\n"
-            "void main()\n"
-            "{\n"
-            "   gl_FragColor = texture2D(mytexture, texCoords) * gl_Color;\n"
-            "}\n");
-
-        m_shaderTexturedLegacyGeneric = engine->getResourceManager()->createShader(
-
-            // vertex Shader
-            "#version 110\n"
-            "uniform mat4 matrix;\n"
-            "varying vec2 texCoords;\n"
-            "void main()\n"
-            "{\n"
-            "	texCoords = gl_MultiTexCoord0.xy;\n"
-            "	vec4 vertex = gl_Vertex;\n"
-            "	gl_Position = matrix * gl_ModelViewMatrix * vertex;\n"
-            "	gl_FrontColor = gl_Color;\n"
-            "}\n",
-
-            // fragment Shader
-            "#version 110\n"
-            "uniform sampler2D mytexture;\n"
-            "varying vec2 texCoords;\n"
-            "void main()\n"
-            "{\n"
-            "   gl_FragColor = texture2D(mytexture, texCoords) * gl_Color;\n"
-            "}\n");
-        /// m_shaderTexturedLegacyGeneric = engine->getResourceManager()->loadShader("texturedLegacyGeneric.vsh",
-        /// "texturedLegacyGeneric.fsh");
-
-        m_shaderGenericUntextured = engine->getResourceManager()->createShader(
-
-            // vertex Shader
-            "#version 110\n"
-            "uniform mat4 matrix;\n"
-            "void main()\n"
-            "{\n"
-            "	gl_Position = matrix * gl_Vertex;\n"
-            "	gl_FrontColor = gl_Color;\n"
-            "}\n",
-
-            // fragment Shader
-            "#version 110\n"
-            "void main()\n"
-            "{\n"
-            "   gl_FragColor = gl_Color;\n"
-            "}\n");
-
-        m_shaderUntexturedLegacyGeneric = engine->getResourceManager()->createShader(
-
-            // vertex Shader
-            "#version 110\n"
-            "uniform mat4 matrix;\n"
-            "void main()\n"
-            "{\n"
-            "	vec4 vertex = gl_Vertex;\n"
-            "	gl_Position = matrix * gl_ModelViewMatrix * vertex;\n"
-            "	gl_FrontColor = gl_Color;\n"
-            "}\n",
-
-            // fragment Shader
-            "#version 110\n"
-            "void main()\n"
-            "{\n"
-            "   gl_FragColor = gl_Color;\n"
-            "}\n");
-
-        // set default matrices to conform to play area
-        resetMatrices();
-
-        // execute the vr config file (this then overwrites the matrices with the user settings if they exist)
-        Console::execConfigFile(OSUVR_CONFIG_FILE_NAME);
-    }
-}
-
-OsuVR::~OsuVR() {
-    for(int i = 0; i < m_uiElements.size(); i++) {
-        delete m_uiElements[i];
-    }
-}
-
-void OsuVR::drawVR(Graphics *g, Matrix4 &mvp, RenderTarget *screen) {
-    // draw floor
-    if(osu_vr_draw_floor.getBool()) {
-        m_shaderGenericUntextured->enable();
-        {
-            m_shaderGenericUntextured->setUniformMatrix4fv("matrix", mvp);
-
-            VertexArrayObject vao(Graphics::PRIMITIVE::PRIMITIVE_QUADS);
-
-            float width = openvr->getPlayAreaSize().x;
-            float height = openvr->getPlayAreaSize().y;
-
-            vao.addVertex(width / 2.0f, 0.0f, height / 2.0f);
-            vao.addVertex(width / 2.0f, 0.0f, -height / 2.0f);
-            vao.addVertex(-width / 2.0f, 0.0f, -height / 2.0f);
-            vao.addVertex(-width / 2.0f, 0.0f, height / 2.0f);
-
-            g->setColor(0xff111111);
-            g->drawVAO(&vao);
-
-            if(Osu::debug->getBool()) {
-                g->setColor(0xff00ff00);
-                VertexArrayObject vao2(Graphics::PRIMITIVE::PRIMITIVE_LINES);
-                OpenVRInterface::PLAY_AREA_RECT playAreaRect = openvr->getPlayAreaRect();
-                for(int i = 0; i < 4; i++) {
-                    vao2.addVertex(playAreaRect.corners[i]);
-                    vao2.addVertex(playAreaRect.corners[i] + Vector3(0, 0.15f, 0));
-                }
-                g->drawVAO(&vao2);
-
-                VertexArrayObject vao3(Graphics::PRIMITIVE::PRIMITIVE_LINES);
-                Vector2 playAreaSize = openvr->getPlayAreaSize();
-                vao3.addVertex(Vector3(0, 0.001f, 0));
-                vao3.addColor(0xffff0000);
-                vao3.addVertex(Vector3(playAreaSize.x / 2.0f, 0.001f, 0));
-                vao3.addColor(0xffff0000);
-                vao3.addVertex(Vector3(0, 0.001f, 0));
-                vao3.addColor(0xff00ff00);
-                vao3.addVertex(Vector3(0, 0.001f, playAreaSize.y / 2.0f));
-                vao3.addColor(0xff00ff00);
-                g->drawVAO(&vao3);
-            }
-        }
-        m_shaderGenericUntextured->disable();
-    }
-
-    // draw screen
-    Matrix4 finalScreenMatrix = mvp * m_screenMatrix;
-    m_shaderGenericTextured->enable();
-    {
-        m_shaderGenericTextured->setUniformMatrix4fv("matrix", finalScreenMatrix);
-
-        const float scale = osu_vr_screen_scale.getFloat();
-        m_fAspect = screen->getHeight() / screen->getWidth();
-        float x = 0;
-        float y = 0;
-        m_vVirtualScreenSize.x = scale;
-        m_vVirtualScreenSize.y = -m_fAspect * scale;
-        float width = m_vVirtualScreenSize.x;
-        float height = m_vVirtualScreenSize.y;
-        screen->bind();
-        {
-            VertexArrayObject vao;
-
-            vao.addTexcoord(0, 1);
-            vao.addVertex(x, y);
-
-            vao.addTexcoord(0, 0);
-            vao.addVertex(x, y + height);
-
-            vao.addTexcoord(1, 0);
-            vao.addVertex(x + width, y + height);
-
-            vao.addTexcoord(1, 0);
-            vao.addVertex(x + width, y + height);
-
-            vao.addTexcoord(1, 1);
-            vao.addVertex(x + width, y);
-
-            vao.addTexcoord(0, 1);
-            vao.addVertex(x, y);
-
-            // if the keyboard is visible we want to make the screen pretty transparent, to reduce the amount of
-            // brainfuck due to depth overlaps
-            if(!openvr->isKeyboardVisible()) g->setBlending(false);
-
-            g->setColor(0xffffffff);
-
-            if(openvr->isKeyboardVisible()) g->setAlpha(0.15f);
-
-            g->drawVAO(&vao);
-
-            if(!openvr->isKeyboardVisible()) g->setBlending(true);
-        }
-        screen->unbind();
-    }
-    m_shaderGenericTextured->disable();
-
-    // draw VR UI elements (buttons etc.)
-    for(int i = 0; i < m_uiElements.size(); i++) {
-        m_uiElements[i]->drawVR(g, finalScreenMatrix);
-    }
-
-    // draw controller laser
-    const bool drawLaserInGame = m_osu->isInPlayMode() && osu_vr_draw_laser_game.getBool();
-    const bool drawLaserInMenu = m_osu->isNotInPlayModeOrPaused() && osu_vr_draw_laser_menu.getBool();
-    if(m_bDrawLaser && openvr->hasInputFocus() && (drawLaserInGame || drawLaserInMenu)) {
-        m_shaderGenericUntextured->enable();
-        {
-            m_shaderGenericUntextured->setUniformMatrix4fv("matrix", mvp);
-
-            VertexArrayObject vao(Graphics::PRIMITIVE::PRIMITIVE_LINES);
-
-            vao.addVertex(openvr->getController()->getPosition());
-            vao.addVertex(m_vScreenIntersectionPoint);
-
-            g->setColor(0x44ffffff);
-            g->drawVAO(&vao);
-        }
-        m_shaderGenericUntextured->disable();
-    }
-
-    /*
-    VertexArrayObject playfieldWireframeVao(Graphics::PRIMITIVE::PRIMITIVE_LINES);
-    Vector4 topLeft = m_playfieldMatrix * Vector4((-OsuGameRules::OSU_COORD_WIDTH/2.0f)*getDrawScale(),
-    (OsuGameRules::OSU_COORD_HEIGHT/2.0f)*getDrawScale(), 0, 1); playfieldWireframeVao.addVertex(topLeft.x, topLeft.y,
-    topLeft.z); playfieldWireframeVao.addVertex(topLeft.x, topLeft.y, topLeft.z - osu_vr_approach_distance.getFloat());
-    playfieldWireframeVao.addVertex(topLeft.x + OsuGameRules::OSU_COORD_WIDTH*getDrawScale(), topLeft.y, topLeft.z);
-    playfieldWireframeVao.addVertex(topLeft.x + OsuGameRules::OSU_COORD_WIDTH*getDrawScale(), topLeft.y, topLeft.z -
-    osu_vr_approach_distance.getFloat());
-
-    g->setColor(0x44ffffff);
-    g->drawVAO(&playfieldWireframeVao);
-    */
-}
-
-void OsuVR::drawVRBeatmap(Graphics *g, Matrix4 &mvp, OsuBeatmap *beatmap) {
-    if(!osu_vr_draw_playfield.getBool()) return;
-
-    Matrix4 scale;
-    scale.scale(getDrawScale(), -getDrawScale(), getDrawScale());
-    Matrix4 finalMVP = mvp * m_playfieldMatrix * scale;
-
-    // draw beatmap (this also draws the border, because the border is dependent on the current CS while playing)
-    beatmap->drawVR(g, finalMVP, this);
-
-    // draw cursors
-    drawVRCursors(g, finalMVP);
-}
-
-void OsuVR::drawVRHUD(Graphics *g, Matrix4 &mvp, OsuHUD *hud) {
-    if(!osu_vr_draw_playfield.getBool()) return;
-
-    Matrix4 scale;
-    scale.scale(getDrawScale() * osu_vr_hud_scale.getFloat(), -getDrawScale() * osu_vr_hud_scale.getFloat(),
-                getDrawScale() * osu_vr_hud_scale.getFloat());
-    Matrix4 translation;
-    translation.translate(-(m_osu->getScreenWidth() / 2.0f) * getDrawScale() * osu_vr_hud_scale.getFloat(),
-                          (m_osu->getScreenHeight() / 2.0f) * getDrawScale() * osu_vr_hud_scale.getFloat(),
-                          -osu_vr_hud_distance.getFloat());
-    Matrix4 finalMVP = mvp * m_playfieldMatrix * translation * scale;
-
-    hud->drawVR(g, finalMVP, this);
-}
-
-void OsuVR::drawVRHUDDummy(Graphics *g, Matrix4 &mvp, OsuHUD *hud) {
-    Matrix4 scale;
-    scale.scale(getDrawScale() * osu_vr_hud_scale.getFloat(), -getDrawScale() * osu_vr_hud_scale.getFloat(),
-                getDrawScale() * osu_vr_hud_scale.getFloat());
-    Matrix4 translation;
-    translation.translate(-(m_osu->getScreenWidth() / 2.0f) * getDrawScale() * osu_vr_hud_scale.getFloat(),
-                          (m_osu->getScreenHeight() / 2.0f) * getDrawScale() * osu_vr_hud_scale.getFloat(),
-                          -osu_vr_hud_distance.getFloat());
-    Matrix4 finalMVP = mvp * m_playfieldMatrix * translation * scale;
-
-    hud->drawVRDummy(g, finalMVP, this);
-}
-
-void OsuVR::drawVRPlayfieldDummy(Graphics *g, Matrix4 &mvp) {
-    Matrix4 scale;
-    scale.scale(getDrawScale(), -getDrawScale(), getDrawScale());
-    Matrix4 finalMVP = mvp * m_playfieldMatrix * scale;
-
-    // draw border
-    m_shaderUntexturedLegacyGeneric->enable();
-    {
-        m_shaderUntexturedLegacyGeneric->setUniformMatrix4fv("matrix", finalMVP);
-
-        g->setColor(0xffffffff);
-        m_osu->getHUD()->drawPlayfieldBorder(
-            g, Vector2(0, 0), Vector2(OsuGameRules::OSU_COORD_WIDTH, OsuGameRules::OSU_COORD_HEIGHT), 80.0f);
-
-        // back wall (hitobject spawnpoint)
-        g->setColor(0xff00ff00);
-        g->pushTransform();
-        g->translate(0, 0, -getApproachDistance());
-        m_osu->getHUD()->drawPlayfieldBorder(
-            g, Vector2(0, 0), Vector2(OsuGameRules::OSU_COORD_WIDTH, OsuGameRules::OSU_COORD_HEIGHT), 80.0f, 250.0f);
-        g->popTransform();
-    }
-    m_shaderUntexturedLegacyGeneric->disable();
-
-    // draw approach distance text
-    m_shaderTexturedLegacyGeneric->enable();
-    {
-        const float textScaleMultiplier = 5.0f;
-
-        Matrix4 textScale;
-        textScale.scale(textScaleMultiplier);
-        Matrix4 approachTextMVP = mvp * m_playfieldMatrix * textScale * scale;
-        m_shaderTexturedLegacyGeneric->setUniformMatrix4fv("matrix", approachTextMVP);
-
-        g->pushTransform();
-        UString distanceString =
-            UString::format(osu_vr_approach_distance.getFloat() == 1.0f ? "%.1f meter" : "%.1f meters",
-                            osu_vr_approach_distance.getFloat());
-        g->translate(-m_osu->getTitleFont()->getStringWidth(distanceString) / 2.0f,
-                     -m_osu->getTitleFont()->getHeight() * 2.5f,
-                     -getApproachDistance() / textScaleMultiplier +
-                         2.0f);  // + 2.0f to avoid z-fighting with back playfieldborder
-        g->setColor(0xffffffff);
-        g->drawString(m_osu->getTitleFont(), distanceString);
-        g->popTransform();
-    }
-    m_shaderTexturedLegacyGeneric->disable();
-
-    // draw cursors
-    drawVRCursors(g, finalMVP);
-}
-
-void OsuVR::drawVRCursors(Graphics *g, Matrix4 &mvp) {
-    m_shaderTexturedLegacyGeneric->enable();
-    {
-        m_shaderTexturedLegacyGeneric->setUniformMatrix4fv("matrix", mvp);
-
-        g->pushTransform();
-        {
-            g->translate(0, 0, 0.8f);  // to avoid z-fighting with the border and sliders (slider = 0.5, extra 0.3 for
-                                       // good measure, but can't go above 0.999f!)
-            m_osu->getHUD()->drawCursorVR1(g, mvp, m_vPlayfieldCursorPos1, osu_vr_cursor_alpha.getFloat());
-            g->translate(0, 0, 0.9f);  // to avoid z-fighting with the first cursor
-            m_osu->getHUD()->drawCursorVR2(g, mvp, m_vPlayfieldCursorPos2, osu_vr_cursor_alpha.getFloat());
-        }
-        g->popTransform();
-    }
-    m_shaderTexturedLegacyGeneric->disable();
-}
-
-void OsuVR::update() {
-    OpenVRController *primaryController = openvr->getController();
-    OpenVRController *rightController = openvr->getRightController();
-    OpenVRController *leftController = openvr->getLeftController();
-
-    // calculate virtual screen plane and cursor pos, and set it
-    float virtualScreenPlaneIntersectionDistance = 0.0f;
-    {
-        Vector4 topLeft = m_screenMatrix * Vector4(0, 0, 0, 1);
-        Vector4 right = (m_screenMatrix * Vector4(1, 0, 1, 1));
-        Vector4 down = (m_screenMatrix * Vector4(0, -1, 1, 1));
-        Vector3 normal = (m_screenMatrix * Vector3(0, 0, 1)).normalize();
-
-        // get ray intersection with screen
-        virtualScreenPlaneIntersectionDistance =
-            intersectRayPlane(primaryController->getPosition(), primaryController->getDirection(),
-                              Vector3(topLeft.x, topLeft.y, topLeft.z), normal);
-        if(virtualScreenPlaneIntersectionDistance > 0.0f) {
-            m_vScreenIntersectionPoint = primaryController->getPosition() +
-                                         primaryController->getDirection() * virtualScreenPlaneIntersectionDistance;
-
-            // calculate virtual cursor position
-            Vector3 localRight = (Vector3(right.x, right.y, right.z) - Vector3(topLeft.x, topLeft.y, topLeft.z));
-            Vector3 localDown = (Vector3(down.x, down.y, down.z) - Vector3(topLeft.x, topLeft.y, topLeft.z));
-            Vector3 localIntersectionPoint = m_vScreenIntersectionPoint - Vector3(topLeft.x, topLeft.y, topLeft.z);
-
-            float x = localRight.dot(localIntersectionPoint) / m_vVirtualScreenSize.x;
-            float y = localDown.dot(localIntersectionPoint) /
-                      std::abs(m_vVirtualScreenSize.y);  // abs because negative size due to image flipping
-
-            m_vScreenIntersectionPoint2D.x = x * m_vVirtualScreenSize.x;
-            m_vScreenIntersectionPoint2D.y = y * m_vVirtualScreenSize.y;
-
-            Vector2 newMousePos = Vector2(x * engine->getScreenWidth(), y * engine->getScreenHeight());
-            if((newMousePos.x >= 0 && newMousePos.y >= 0 && newMousePos.x < engine->getScreenWidth() &&
-                newMousePos.y < engine->getScreenHeight()) ||
-               m_bClickHeldStartedInScreen) {
-                m_bDrawLaser = true;
-                m_bScreenIntersection = true;
-
-                // force new mouse pos
-                engine->getMouse()->onPosChange(newMousePos);
-            } else {
-                // TODO: shitty override, but it works well enough for now => see Osu.cpp
-                // if the laser has left the virtual screen, and the engine has focus, then move the cursor out of the
-                // window (so it doesn't jump back to the actual mouse pos)
-                if(m_bScreenIntersection && engine->hasFocus() && env->isCursorInWindow())
-                    engine->getMouse()->setPos(engine->getScreenSize() + Vector2(50, 50));
-
-                m_bDrawLaser = false;
-                m_bScreenIntersection = false;
-            }
-        } else {
-            m_bScreenIntersection = false;
-        }
-    }
-
-    // calculate virtual playfield plane and the two virtual cursors
-    {
-        // certain controllers need (hardcoded) offsets, e.g. Oculus Touch
-        // this offset is only really necessary for the virtual cursors on the playfield
-        Vector3 controllerOffset = Vector3(osu_vr_controller_offset_x.getFloat(), osu_vr_controller_offset_z.getFloat(),
-                                           -osu_vr_controller_offset_y.getFloat());
-        // if (openvr->getTrackingSystemName().find("oculus") != -1)
-        //	controllerOffset += Vector3(0, 0, 0.08f); // TODO: insert correct values here
-
-        Vector4 topLeft = m_playfieldMatrix * Vector4(0, 0, 0, 1);
-        Vector4 right = (m_playfieldMatrix * Vector4(1, 0, 1, 1));
-        Vector4 down = (m_playfieldMatrix * Vector4(0, -1, 1, 1));
-        Vector3 normal = (m_playfieldMatrix * Vector3(0, 0, 1)).normalize();
-
-        // get closest distance intersection with playfield
-        Vector3 leftControllerPosition =
-            leftController->getPosition() + (leftController->getMatrixPose() * controllerOffset);
-        float leftIntersectionDistance =
-            intersectRayPlane(leftControllerPosition, -normal, Vector3(topLeft.x, topLeft.y, topLeft.z), normal);
-        if(leftIntersectionDistance != 0.0f) {
-            m_vPlayfieldIntersectionPoint1 = leftControllerPosition - normal * leftIntersectionDistance;
-
-            // calculate virtual cursor position
-            Vector3 localRight = (Vector3(right.x, right.y, right.z) - Vector3(topLeft.x, topLeft.y, topLeft.z));
-            Vector3 localDown = (Vector3(down.x, down.y, down.z) - Vector3(topLeft.x, topLeft.y, topLeft.z));
-            Vector3 localIntersectionPoint = m_vPlayfieldIntersectionPoint1 - Vector3(topLeft.x, topLeft.y, topLeft.z);
-
-            float x = localRight.dot(localIntersectionPoint) / (getDrawScale() * OsuGameRules::OSU_COORD_WIDTH);
-            float y = localDown.dot(localIntersectionPoint) / (getDrawScale() * OsuGameRules::OSU_COORD_HEIGHT);
-
-            Vector2 newCursorPos = Vector2(x * OsuGameRules::OSU_COORD_WIDTH, y * OsuGameRules::OSU_COORD_HEIGHT);
-            {
-                m_vPlayfieldCursorPos1 = newCursorPos;
-                m_fPlayfieldCursorDist1 = std::abs(leftIntersectionDistance);
-                m_fPlayfieldCursorDistSigned1 = leftIntersectionDistance;
-            }
-
-            /*
-            if (newCursorPos.x >= 0 && newCursorPos.y >= 0 && newCursorPos.x <= OsuGameRules::OSU_COORD_WIDTH &&
-            newCursorPos.y <= OsuGameRules::OSU_COORD_HEIGHT)
-            {
-            }
-            */
-        }
-
-        Vector3 rightControllerPosition =
-            rightController->getPosition() + (rightController->getMatrixPose() * controllerOffset);
-        float rightIntersectionDistance =
-            intersectRayPlane(rightControllerPosition, -normal, Vector3(topLeft.x, topLeft.y, topLeft.z), normal);
-        if(rightIntersectionDistance != 0.0f) {
-            m_vPlayfieldIntersectionPoint2 = rightControllerPosition - normal * rightIntersectionDistance;
-
-            // calculate virtual cursor position
-            Vector3 localRight = (Vector3(right.x, right.y, right.z) - Vector3(topLeft.x, topLeft.y, topLeft.z));
-            Vector3 localDown = (Vector3(down.x, down.y, down.z) - Vector3(topLeft.x, topLeft.y, topLeft.z));
-            Vector3 localIntersectionPoint = m_vPlayfieldIntersectionPoint2 - Vector3(topLeft.x, topLeft.y, topLeft.z);
-
-            float x = localRight.dot(localIntersectionPoint) / (getDrawScale() * OsuGameRules::OSU_COORD_WIDTH);
-            float y = localDown.dot(localIntersectionPoint) / (getDrawScale() * OsuGameRules::OSU_COORD_HEIGHT);
-
-            Vector2 newCursorPos = Vector2(x * OsuGameRules::OSU_COORD_WIDTH, y * OsuGameRules::OSU_COORD_HEIGHT);
-            {
-                m_vPlayfieldCursorPos2 = newCursorPos;
-                m_fPlayfieldCursorDist2 = std::abs(rightIntersectionDistance);
-                m_fPlayfieldCursorDistSigned2 = rightIntersectionDistance;
-            }
-
-            /*
-            if (newCursorPos.x >= 0 && newCursorPos.y >= 0 && newCursorPos.x <= OsuGameRules::OSU_COORD_WIDTH &&
-            newCursorPos.y <= OsuGameRules::OSU_COORD_HEIGHT)
-            {
-            }
-            */
-        }
-
-        // get ray intersection with playfield (this is only used for grip button movement logic atm)
-        leftIntersectionDistance = intersectRayPlane(leftController->getPosition(), leftController->getDirection(),
-                                                     Vector3(topLeft.x, topLeft.y, topLeft.z), normal);
-        if(leftIntersectionDistance != 0.0f) {
-            Vector3 intersectionPoint =
-                leftController->getPosition() + leftController->getDirection() * leftIntersectionDistance;
-
-            // calculate virtual cursor position
-            Vector3 localRight = (Vector3(right.x, right.y, right.z) - Vector3(topLeft.x, topLeft.y, topLeft.z));
-            Vector3 localDown = (Vector3(down.x, down.y, down.z) - Vector3(topLeft.x, topLeft.y, topLeft.z));
-            Vector3 localIntersectionPoint = intersectionPoint - Vector3(topLeft.x, topLeft.y, topLeft.z);
-
-            float x = localRight.dot(localIntersectionPoint) / (getDrawScale() * OsuGameRules::OSU_COORD_WIDTH);
-            float y = localDown.dot(localIntersectionPoint) / (getDrawScale() * OsuGameRules::OSU_COORD_HEIGHT);
-
-            Vector2 newCursorPos = Vector2(x * OsuGameRules::OSU_COORD_WIDTH, y * OsuGameRules::OSU_COORD_HEIGHT);
-
-            if(newCursorPos.x >= -OsuGameRules::OSU_COORD_WIDTH / 2.0f &&
-               newCursorPos.y >= -OsuGameRules::OSU_COORD_HEIGHT / 2.0f &&
-               newCursorPos.x <= OsuGameRules::OSU_COORD_WIDTH / 2.0f &&
-               newCursorPos.y <= OsuGameRules::OSU_COORD_HEIGHT / 2.0f)
-                m_bPlayfieldIntersection1 = true;
-            else
-                m_bPlayfieldIntersection1 = false;
-        }
-
-        rightIntersectionDistance = intersectRayPlane(rightController->getPosition(), rightController->getDirection(),
-                                                      Vector3(topLeft.x, topLeft.y, topLeft.z), normal);
-        if(rightIntersectionDistance != 0.0f) {
-            Vector3 intersectionPoint =
-                rightController->getPosition() + rightController->getDirection() * rightIntersectionDistance;
-
-            // calculate virtual cursor position
-            Vector3 localRight = (Vector3(right.x, right.y, right.z) - Vector3(topLeft.x, topLeft.y, topLeft.z));
-            Vector3 localDown = (Vector3(down.x, down.y, down.z) - Vector3(topLeft.x, topLeft.y, topLeft.z));
-            Vector3 localIntersectionPoint = intersectionPoint - Vector3(topLeft.x, topLeft.y, topLeft.z);
-
-            float x = localRight.dot(localIntersectionPoint) / (getDrawScale() * OsuGameRules::OSU_COORD_WIDTH);
-            float y = localDown.dot(localIntersectionPoint) / (getDrawScale() * OsuGameRules::OSU_COORD_HEIGHT);
-
-            Vector2 newCursorPos = Vector2(x * OsuGameRules::OSU_COORD_WIDTH, y * OsuGameRules::OSU_COORD_HEIGHT);
-
-            if(newCursorPos.x >= -OsuGameRules::OSU_COORD_WIDTH / 2.0f &&
-               newCursorPos.y >= -OsuGameRules::OSU_COORD_HEIGHT / 2.0f &&
-               newCursorPos.x <= OsuGameRules::OSU_COORD_WIDTH / 2.0f &&
-               newCursorPos.y <= OsuGameRules::OSU_COORD_HEIGHT / 2.0f)
-                m_bPlayfieldIntersection2 = true;
-            else
-                m_bPlayfieldIntersection2 = false;
-        }
-    }
-
-    if(m_osu->isNotInPlayModeOrPaused() &&
-       !osu_vr_layout_lock.getBool())  // only allow moving while not actively playing
-    {
-        // move virtual screen while grip button is pressed on right controller, anchor at controller
-        if(rightController->isButtonPressed(OpenVRController::BUTTON::BUTTON_GRIP)) {
-            if(m_bMovingScreenAllow) {
-                if(m_bMovingScreenCheck) {
-                    m_bMovingScreenCheck = false;
-
-                    // determine which screen to move, allow direct pointing to a screen to override it
-                    m_bIsRightControllerMovingScreen =
-                        (!m_bPlayfieldIntersection2 || m_bScreenIntersection) && primaryController == rightController;
-
-                    Matrix4 controllerMatrixPose = rightController->getMatrixPose();
-                    if(m_bIsRightControllerMovingScreen)
-                        m_screenMatrixBackup = controllerMatrixPose.invert() * m_screenMatrix;  // relative base
-                    else
-                        m_playfieldMatrixBackup = controllerMatrixPose.invert() * m_playfieldMatrix;  // relative base
-                }
-
-                if(!m_bMovingScreenCheck) {
-                    if(m_bIsRightControllerMovingScreen)
-                        m_screenMatrix = rightController->getMatrixPose() * m_screenMatrixBackup;
-                    else {
-                        m_bMovingPlayfieldAllow = false;
-                        m_playfieldMatrix = rightController->getMatrixPose() * m_playfieldMatrixBackup;
-                    }
-                }
-            }
-        } else if(!m_bMovingScreenCheck) {
-            m_bMovingScreenCheck = true;
-
-            // immediately save the changes
-            save();
-        } else
-            m_bMovingScreenAllow = true;
-
-        // move virtual playfield while grip button is pressed on left controller, anchor at controller
-        if(leftController->isButtonPressed(OpenVRController::BUTTON::BUTTON_GRIP)) {
-            if(m_bMovingPlayfieldAllow) {
-                if(m_bMovingPlayfieldCheck) {
-                    m_bMovingPlayfieldCheck = false;
-
-                    // determine which screen to move, allow direct pointing to a screen to override it
-                    m_bIsLeftControllerMovingScreen =
-                        m_bScreenIntersection &&
-                        primaryController == leftController;  // bit of a hack, but it'll work without changing the
-                                                              // primaryController screen intersection logic
-
-                    Matrix4 controllerMatrixPose = leftController->getMatrixPose();
-                    if(!m_bIsLeftControllerMovingScreen)
-                        m_playfieldMatrixBackup = controllerMatrixPose.invert() * m_playfieldMatrix;  // relative base
-                    else
-                        m_screenMatrixBackup = controllerMatrixPose.invert() * m_screenMatrix;  // relative base
-                }
-
-                if(!m_bMovingPlayfieldCheck) {
-                    if(!m_bIsLeftControllerMovingScreen)
-                        m_playfieldMatrix = leftController->getMatrixPose() * m_playfieldMatrixBackup;
-                    else {
-                        m_bMovingScreenAllow = false;
-                        m_screenMatrix = leftController->getMatrixPose() * m_screenMatrixBackup;
-                    }
-                }
-            }
-        } else if(!m_bMovingPlayfieldCheck) {
-            m_bMovingPlayfieldCheck = true;
-
-            // immediately save the changes
-            save();
-        } else
-            m_bMovingPlayfieldAllow = true;
-    }
-
-    // HACKHACK: if we are not drawing the VR playfield (e.g. because the player only wants to play regularly but with a
-    // virtual screen in VR), set the virtual cursor positions to somewhere they don't interfere
-    if(!osu_vr_draw_playfield.getBool()) {
-        m_vPlayfieldCursorPos1 = Vector2(0, 9999);
-        m_vPlayfieldCursorPos2 = m_vPlayfieldCursorPos1;
-
-        m_fPlayfieldCursorDist1 = 9999;
-        m_fPlayfieldCursorDist2 = 0;
-    }
-
-    // handle scaling (pinching/zooming/whatever)
-    if(m_osu->isNotInPlayModeOrPaused() &&
-       !osu_vr_layout_lock.getBool())  // only allow scaling while not actively playing
-    {
-        if(openvr->getLeftController()->getTrigger() > 0.95f && openvr->getRightController()->getTrigger() > 0.95f) {
-            const float controllerDistance =
-                (openvr->getLeftController()->getPosition() - openvr->getRightController()->getPosition()).length();
-
-            if(m_bScaleCheck) {
-                m_bScaleCheck = false;
-                if(m_bScreenIntersection) {
-                    m_bIsPlayerScalingPlayfield = false;
-                    m_fScaleBackup = osu_vr_screen_scale.getFloat() -
-                                     controllerDistance * osu_vr_controller_pinch_scale_multiplier.getFloat();
-                } else {
-                    m_bIsPlayerScalingPlayfield = true;
-                    m_fScaleBackup = osu_vr_playfield_scale.getFloat() -
-                                     controllerDistance * osu_vr_controller_pinch_scale_multiplier.getFloat();
-                }
-            }
-
-            if(m_bIsPlayerScalingPlayfield)
-                osu_vr_playfield_scale.setValue(
-                    m_fScaleBackup + controllerDistance * osu_vr_controller_pinch_scale_multiplier.getFloat());
-            else
-                osu_vr_screen_scale.setValue(m_fScaleBackup +
-                                             controllerDistance * osu_vr_controller_pinch_scale_multiplier.getFloat());
-        } else if(!m_bScaleCheck) {
-            m_bScaleCheck = true;
-
-            // immediately save the changes
-            save();
-        }
-    } else
-        m_bScaleCheck = true;
-
-    // handle clicking (trigger + touchpad click) (scaling has priority over clicking on the usage of the trigger
-    // button)
-    if(((leftController->getTrigger() > 0.95f || rightController->getTrigger() > 0.95f) && m_bScaleCheck) ||
-       leftController->isButtonPressed(OpenVRController::BUTTON::BUTTON_STEAMVR_TOUCHPAD) ||
-       rightController->isButtonPressed(OpenVRController::BUTTON::BUTTON_STEAMVR_TOUCHPAD)) {
-        if(m_bClickCheck) {
-            m_bClickCheck = false;
-            engine->onMouseLeftChange(true);
-
-            if(m_bScreenIntersection) m_bClickHeldStartedInScreen = true;
-        }
-    } else {
-        if(!m_bClickCheck) {
-            m_bClickCheck = true;
-            engine->onMouseLeftChange(false);
-
-            m_bClickHeldStartedInScreen = false;
-        }
-    }
-
-    // handle menu button (escape)
-    if((leftController->isButtonPressed(OpenVRController::BUTTON::BUTTON_APPLICATIONMENU) ||
-        rightController->isButtonPressed(OpenVRController::BUTTON::BUTTON_APPLICATIONMENU))) {
-        if(m_bMenuCheck) {
-            m_bMenuCheck = false;
-            engine->onKeyboardKeyDown(KEY_ESCAPE);
-        }
-    } else {
-        if(!m_bMenuCheck) {
-            m_bMenuCheck = true;
-            engine->onKeyboardKeyUp(KEY_ESCAPE);
-        }
-    }
-
-    // controller distance warning by color (if reaching too far behind/into the playfield)
-    float smallestDist =
-        getCursorDistSigned1() < getCursorDistSigned2() ? getCursorDistSigned1() : getCursorDistSigned2();
-    if(osu_vr_controller_warning_distance_enabled.getBool() &&
-       smallestDist < osu_vr_controller_warning_distance_start.getFloat()) {
-        float interpStart = osu_vr_controller_warning_distance_start.getFloat();
-        float interpEnd = osu_vr_controller_warning_distance_end.getFloat();
-
-        float percent = 1.0f - ((interpEnd - smallestDist) / (interpEnd - interpStart));
-        openvr->setControllerColorOverride(COLORf(1.0f, percent, 0.0f, 0.0f));
-    } else
-        openvr->setControllerColorOverride(0xff000000);
-
-    // update all VR UI elements
-    updateLayout();
-    float smallestBoundsY = std::numeric_limits<float>::min();
-    float largestBoundsX = 0.0f;
-    float largestBoundsY = std::numeric_limits<float>::max();
-    m_bIsUIActive = false;
-    for(int i = 0; i < m_uiElements.size(); i++) {
-        m_uiElements[i]->update(m_vScreenIntersectionPoint2D);
-
-        m_bIsUIActive = m_bIsUIActive || m_uiElements[i]->isActive() || m_uiElements[i]->isCursorInside();
-
-        float boundsX = m_uiElements[i]->getPos().x + m_uiElements[i]->getSize().x;
-        if(boundsX > largestBoundsX) largestBoundsX = boundsX;
-
-        float boundsY = m_uiElements[i]->getPos().y - m_uiElements[i]->getSize().y;
-        if(boundsY < largestBoundsY) largestBoundsY = boundsY;
-
-        float minY = m_uiElements[i]->getPos().y;
-        if(minY > smallestBoundsY) smallestBoundsY = minY;
-
-        // override laser
-        if(m_uiElements[i]->isCursorInside()) m_bDrawLaser = true;
-    }
-
-    // override laser for UI element block on the right
-    if(m_vScreenIntersectionPoint2D.x > 0 && m_vScreenIntersectionPoint2D.x < largestBoundsX &&
-       m_vScreenIntersectionPoint2D.y < 0 && m_vScreenIntersectionPoint2D.y > m_vVirtualScreenSize.y)
-        m_bDrawLaser = true;
-    // and the block on top
-    if(m_vScreenIntersectionPoint2D.x > 0 && m_vScreenIntersectionPoint2D.x < largestBoundsX &&
-       m_vScreenIntersectionPoint2D.y < smallestBoundsY && m_vScreenIntersectionPoint2D.y > m_vVirtualScreenSize.y)
-        m_bDrawLaser = true;
-    // and the block on the bottom
-    if(m_vScreenIntersectionPoint2D.x > 0 && m_vScreenIntersectionPoint2D.x < largestBoundsX &&
-       m_vScreenIntersectionPoint2D.y < 0 && m_vScreenIntersectionPoint2D.y > largestBoundsY)
-        m_bDrawLaser = true;
-    if(!openvr->hasInputFocus())  // quickfix for 1 frame laser flicker between keyboard overlay switch
-        m_bDrawLaser = false;
-
-    // handle UI element visibility depending on game state
-    m_keyboardButton->setVisible(!m_osu->isInPlayMode());
-    m_matrixResetButton->setVisible(!m_osu->isInPlayMode() && !m_lockLayoutCheckbox->isChecked());
-    m_lockLayoutCheckbox->setVisible(!m_osu->isInPlayMode());
-    m_offsetDownButton->setVisible(m_osu->isInPlayMode());
-    m_offsetUpButton->setVisible(m_osu->isInPlayMode());
-    m_scrubbingSlider->setVisible(m_osu->isInPlayMode());
-
-    // force update to current volume
-    m_volumeSlider->setValue(m_osu_volume_master_ref->getFloat(), true);
-
-    // force update to current songPos
-    if(m_osu->isInPlayMode() && m_osu->getSelectedBeatmap() != NULL)
-        m_scrubbingSlider->setValue(m_osu->getSelectedBeatmap()->getPercentFinishedPlayable(), true);
-}
-
-float OsuVR::intersectRayPlane(Vector3 rayOrigin, Vector3 rayDir, Vector3 planeOrigin, Vector3 planeNormal) {
-    float d = -(planeNormal.dot(planeOrigin));
-    float numer = planeNormal.dot(rayOrigin) + d;
-    float denom = planeNormal.dot(rayDir);
-
-    if(denom == 0.0f)  // normal is orthogonal to vector, can't intersect
-        return 0.0f;
-
-    return -(numer / denom);
-}
-
-float OsuVR::getCircleHitboxScale() { return osu_vr_circle_hitbox_scale.getFloat(); }
-
-float OsuVR::getApproachDistance() {
-    return osu_vr_approach_distance.getFloat() /
-           getDrawScale();  // keep approach distance consistent in meters, even if the playfield scale changes
-}
-
-unsigned short OsuVR::getHapticPulseStrength() {
-    return (unsigned short)(osu_vr_controller_vibration_strength.getFloat() * 3999.0f);
-}
-
-unsigned short OsuVR::getSliderHapticPulseStrength() {
-    return (unsigned short)(osu_vr_slider_controller_vibration_strength.getFloat() * 3999.0f);
-}
-
-void OsuVR::updateLayout() {
-    m_keyboardButton->setPosX(m_vVirtualScreenSize.x + osu_vr_ui_offset.getFloat());
-    m_matrixResetButton->setPos(m_vVirtualScreenSize.x + osu_vr_ui_offset.getFloat(),
-                                (-m_vVirtualScreenSize.y - m_matrixResetButton->getSize().y <
-                                         m_keyboardButton->getPos().y + m_keyboardButton->getSize().y
-                                     ? -(m_keyboardButton->getPos().y + m_keyboardButton->getSize().y)
-                                     : m_vVirtualScreenSize.y + m_matrixResetButton->getSize().y));
-    m_lockLayoutCheckbox->setPos(m_vVirtualScreenSize.x + osu_vr_ui_offset.getFloat() +
-                                     m_matrixResetButton->getSize().x + osu_vr_ui_offset.getFloat(),
-                                 (-m_vVirtualScreenSize.y - m_matrixResetButton->getSize().y <
-                                          m_keyboardButton->getPos().y + m_keyboardButton->getSize().y
-                                      ? -(m_keyboardButton->getPos().y + m_keyboardButton->getSize().y)
-                                      : m_vVirtualScreenSize.y + m_matrixResetButton->getSize().y));
-    m_volumeSlider->setPos(m_vVirtualScreenSize.x / 2.0f - m_volumeSlider->getSize().x / 2.0f,
-                           m_volumeSlider->getSize().y + osu_vr_ui_offset.getFloat());
-
-    const float gap = 0.05f;
-    m_scrubbingSlider->setPos(m_vVirtualScreenSize.x / 2.0f - m_scrubbingSlider->getSize().x / 2.0f,
-                              m_vVirtualScreenSize.y - osu_vr_ui_offset.getFloat());
-    m_offsetDownButton->setPos(m_vVirtualScreenSize.x / 2.0f - m_offsetDownButton->getSize().x - gap / 2.0f,
-                               m_scrubbingSlider->getPos().y - m_scrubbingSlider->getSize().y - gap);
-    m_offsetUpButton->setPos(m_vVirtualScreenSize.x / 2.0f + gap / 2.0f,
-                             m_scrubbingSlider->getPos().y - m_scrubbingSlider->getSize().y - gap);
-}
-
-void OsuVR::save() {
-    debugLog("Osu: Saving VR config file ...\n");
-
-    UString userVRConfigFile = MCENGINE_DATA_DIR "cfg/";
-    userVRConfigFile.append(OSUVR_CONFIG_FILE_NAME);
-    userVRConfigFile.append(".cfg");
-
-    // write new config file
-    // thankfully this path is relative and hardcoded, and thus not susceptible to unicode characters
-    std::ofstream out(userVRConfigFile.toUtf8());
-    if(!out.good()) {
-        if(m_osu != NULL)
-            m_osu->getNotificationOverlay()->addNotification("Error: Couldn't save VR config file", 0xffff0000);
-        return;
-    }
-
-    out << osu_vr_matrix_screen.getName().toUtf8() << " ";
-    for(int i = 0; i < 16; i++) {
-        if(i != 15)
-            out << m_screenMatrix[i] << " ";
-        else
-            out << m_screenMatrix[i];
-    }
-    out << "\n";
-
-    out << osu_vr_matrix_playfield.getName().toUtf8() << " ";
-    for(int i = 0; i < 16; i++) {
-        if(i != 15)
-            out << m_playfieldMatrix[i] << " ";
-        else
-            out << m_playfieldMatrix[i];
-    }
-    out << "\n";
-
-    out << osu_vr_screen_scale.getName().toUtf8() << " " << osu_vr_screen_scale.getString().toUtf8();
-    out << "\n";
-    out << osu_vr_playfield_scale.getName().toUtf8() << " " << osu_vr_playfield_scale.getString().toUtf8();
-    out << "\n";
-
-    out.close();
-}
-
-void OsuVR::resetMatrices() {
-    Matrix4 screenRotation;
-    screenRotation.rotate(-90.0f, 0, 1, 0);
-    Matrix4 screenTranslation;
-    screenTranslation.translate(-openvr->getPlayAreaSize().y * 0.3f, 2.0f, -openvr->getPlayAreaSize().x / 2.0f);
-    m_screenMatrix = screenRotation * screenTranslation;
-    m_playfieldMatrix.identity();
-    m_playfieldMatrix.translate(0, 1.5f, -(openvr->getPlayAreaSize().y / 2.0f) * 0.35f);
-
-    osu_vr_screen_scale.setValue(m_fDefaultScreenScale);
-    osu_vr_playfield_scale.setValue(m_fDefaultPlayfieldScale);
-}
-
-float OsuVR::getDrawScale() {
-    return osu_vr_playfield_native_draw_scale.getFloat() * osu_vr_playfield_scale.getFloat();
-}
-
-void OsuVR::onScreenMatrixChange(UString oldValue, UString newValue) {
-    std::vector<UString> tokens = newValue.split(" ");
-    if(tokens.size() == 16) {
-        float newMatrix[16];
-        for(int i = 0; i < 16; i++) {
-            newMatrix[i] = tokens[i].toFloat();
-        }
-        m_screenMatrix.set(newMatrix);
-    }
-}
-
-void OsuVR::onPlayfieldMatrixChange(UString oldValue, UString newValue) {
-    std::vector<UString> tokens = newValue.split(" ");
-    if(tokens.size() == 16) {
-        float newMatrix[16];
-        for(int i = 0; i < 16; i++) {
-            newMatrix[i] = tokens[i].toFloat();
-        }
-        m_playfieldMatrix.set(newMatrix);
-    }
-}
-
-void OsuVR::onMatrixResetClicked() {
-    resetMatrices();
-    save();
-}
-
-void OsuVR::onLayoutLockClicked() { osu_vr_layout_lock.setValue(m_lockLayoutCheckbox->isChecked() ? 1.0f : 0.0f); }
-
-void OsuVR::onKeyboardButtonClicked() {
-    openvr->getController()->triggerHapticPulse(2500);
-    engine->getSound()->play(m_osu->getSkin()->getCheckOn());
-
-    openvr->showKeyboard();
-}
-
-void OsuVR::onOffsetUpClicked() {
-    openvr->getController()->triggerHapticPulse(2500);
-    engine->getSound()->play(m_osu->getSkin()->getCheckOn());
-
-    engine->onKeyboardKeyDown((KEYCODE)OsuKeyBindings::INCREASE_LOCAL_OFFSET.getInt());
-    engine->onKeyboardKeyUp((KEYCODE)OsuKeyBindings::INCREASE_LOCAL_OFFSET.getInt());
-}
-
-void OsuVR::onOffsetDownClicked() {
-    openvr->getController()->triggerHapticPulse(2500);
-    engine->getSound()->play(m_osu->getSkin()->getCheckOff());
-
-    engine->onKeyboardKeyDown((KEYCODE)OsuKeyBindings::DECREASE_LOCAL_OFFSET.getInt());
-    engine->onKeyboardKeyUp((KEYCODE)OsuKeyBindings::DECREASE_LOCAL_OFFSET.getInt());
-}
-
-void OsuVR::onVolumeSliderChange(OsuVRUISlider *slider) {
-    m_osu_volume_master_ref->setValue(slider->getFloat());
-    m_osu->m_volumeOverlay->animate();
-}
-
-void OsuVR::onScrubbingSliderChange(OsuVRUISlider *slider) {
-    if(m_osu->isInPlayMode() && m_osu->getSelectedBeatmap() != NULL)
-        m_osu->getSelectedBeatmap()->seekPercentPlayable(slider->getFloat());
-}

+ 0 - 158
src/App/Osu/OsuVR.h

@@ -1,158 +0,0 @@
-//================ Copyright (c) 2017, PG, All rights reserved. =================//
-//
-// Purpose:		handles all VR related stuff (input, scene, screens)
-//
-// $NoKeywords: $osuvr
-//===============================================================================//
-
-#ifndef OSUVR_H
-#define OSUVR_H
-
-#include "cbase.h"
-
-class Osu;
-class OsuHUD;
-class OsuBeatmap;
-
-class Shader;
-class RenderTarget;
-
-class OsuVRUIElement;
-class OsuVRUISlider;
-class OsuVRUIImageCheckbox;
-
-class OsuVR {
-   public:
-    OsuVR(Osu *osu);
-    ~OsuVR();
-
-    void drawVR(Graphics *g, Matrix4 &mvp, RenderTarget *screen);
-    void drawVRBeatmap(Graphics *g, Matrix4 &mvp, OsuBeatmap *beatmap);
-    void drawVRHUD(Graphics *g, Matrix4 &mvp, OsuHUD *hud);
-    void drawVRHUDDummy(Graphics *g, Matrix4 &mvp, OsuHUD *hud);
-    void drawVRPlayfieldDummy(Graphics *g, Matrix4 &mvp);
-    void update();
-
-    inline Shader *getShaderTexturedLegacyGeneric() { return m_shaderTexturedLegacyGeneric; }
-    inline Shader *getShaderTexturedGeneric() { return m_shaderGenericTextured; }
-    inline Shader *getShaderUntexturedLegacyGeneric() { return m_shaderUntexturedLegacyGeneric; }
-    inline Shader *getShaderUntexturedGeneric() { return m_shaderGenericUntextured; }
-
-    float getCircleHitboxScale();  // lenience multiplier, since the controllers/hands are not small points (would feel
-                                   // like shit without this)
-    float getApproachDistance();   // in osu!pixels (scaled to the osu coordinate system)
-
-    inline Vector2 getCursorPos1() {
-        return m_vPlayfieldCursorPos1;
-    }  // 2d cursor position on virtual playfield in osu!pixels
-    inline Vector2 getCursorPos2() {
-        return m_vPlayfieldCursorPos2;
-    }  // 2d cursor position on virtual playfield in osu!pixels
-
-    inline float getCursorDist1() {
-        return m_fPlayfieldCursorDist1;
-    }  // 3d distance from controller to virtual 2d cursor on playfield
-    inline float getCursorDist2() {
-        return m_fPlayfieldCursorDist2;
-    }  // 3d distance from controller to virtual 2d cursor on playfield
-    inline float getCursorDistSigned1() {
-        return m_fPlayfieldCursorDistSigned1;
-    }  // 3d distance from controller to virtual 2d cursor on playfield
-    inline float getCursorDistSigned2() {
-        return m_fPlayfieldCursorDistSigned2;
-    }  // 3d distance from controller to virtual 2d cursor on playfield
-
-    unsigned short getHapticPulseStrength();
-    unsigned short getSliderHapticPulseStrength();
-
-    inline bool isVirtualCursorOnScreen() { return m_bScreenIntersection; }
-    inline bool isUIActive() {
-        return m_bIsUIActive;
-    }  // if the user is currently interacting with the UI (this includes the laser touching an element!)
-
-   private:
-    static const char *OSUVR_CONFIG_FILE_NAME;
-
-    static float intersectRayPlane(Vector3 rayOrigin, Vector3 rayDir, Vector3 planeOrigin, Vector3 planeNormal);
-
-    void drawVRCursors(Graphics *g, Matrix4 &mvp);
-
-    void updateLayout();
-
-    void save();
-    void resetMatrices();
-
-    float getDrawScale();
-    inline Vector2 getVirtualScreenSize() { return m_vVirtualScreenSize; }
-
-    void onScreenMatrixChange(UString oldValue, UString newValue);
-    void onPlayfieldMatrixChange(UString oldValue, UString newValue);
-    void onMatrixResetClicked();
-    void onLayoutLockClicked();
-    void onKeyboardButtonClicked();
-    void onOffsetUpClicked();
-    void onOffsetDownClicked();
-    void onVolumeSliderChange(OsuVRUISlider *slider);
-    void onScrubbingSliderChange(OsuVRUISlider *slider);
-
-    Osu *m_osu;
-
-    ConVar *m_osu_draw_cursor_trail_ref;
-    ConVar *m_osu_volume_master_ref;
-
-    Shader *m_shaderGenericTextured;
-    Shader *m_shaderTexturedLegacyGeneric;
-    Shader *m_shaderGenericUntextured;
-    Shader *m_shaderUntexturedLegacyGeneric;
-
-    Matrix4 m_screenMatrix;
-    Matrix4 m_screenMatrixBackup;
-    Matrix4 m_playfieldMatrix;
-    Matrix4 m_playfieldMatrixBackup;
-    bool m_bMovingPlayfieldCheck;
-    bool m_bMovingPlayfieldAllow;
-    bool m_bMovingScreenCheck;
-    bool m_bMovingScreenAllow;
-    bool m_bIsLeftControllerMovingScreen;
-    bool m_bIsRightControllerMovingScreen;
-
-    bool m_bDrawLaser;
-    bool m_bScreenIntersection;
-    bool m_bClickHeldStartedInScreen;
-    bool m_bPlayfieldIntersection1;
-    bool m_bPlayfieldIntersection2;
-    Vector3 m_vScreenIntersectionPoint;
-    Vector2 m_vScreenIntersectionPoint2D;
-    Vector3 m_vPlayfieldIntersectionPoint1;
-    Vector3 m_vPlayfieldIntersectionPoint2;
-    Vector2 m_vPlayfieldCursorPos1;
-    Vector2 m_vPlayfieldCursorPos2;
-    float m_fPlayfieldCursorDist1;
-    float m_fPlayfieldCursorDist2;
-    float m_fPlayfieldCursorDistSigned1;
-    float m_fPlayfieldCursorDistSigned2;
-
-    float m_fAspect;
-    Vector2 m_vVirtualScreenSize;
-
-    bool m_bClickCheck;
-    bool m_bMenuCheck;
-
-    bool m_bScaleCheck;
-    bool m_bIsPlayerScalingPlayfield;
-    float m_fScaleBackup;
-    float m_fDefaultScreenScale;
-    float m_fDefaultPlayfieldScale;
-
-    bool m_bIsUIActive;
-    std::vector<OsuVRUIElement *> m_uiElements;
-    OsuVRUIElement *m_keyboardButton;
-    OsuVRUIElement *m_matrixResetButton;
-    OsuVRUIImageCheckbox *m_lockLayoutCheckbox;
-    OsuVRUIElement *m_offsetDownButton;
-    OsuVRUIElement *m_offsetUpButton;
-    OsuVRUISlider *m_volumeSlider;
-    OsuVRUISlider *m_scrubbingSlider;
-};
-
-#endif

+ 0 - 96
src/App/Osu/OsuVRTutorial.cpp

@@ -1,96 +0,0 @@
-//================ Copyright (c) 2017, PG, All rights reserved. =================//
-//
-// Purpose:		tutorial screen for controls
-//
-// $NoKeywords: $osuvrtut
-//===============================================================================//
-
-#include "OsuVRTutorial.h"
-
-#include "CBaseUIContainer.h"
-#include "CBaseUIImage.h"
-#include "CBaseUIImageButton.h"
-#include "CBaseUIScrollView.h"
-#include "Engine.h"
-#include "Keyboard.h"
-#include "Osu.h"
-#include "OsuSkin.h"
-#include "ResourceManager.h"
-#include "SoundEngine.h"
-
-OsuVRTutorial::OsuVRTutorial(Osu *osu) : OsuScreenBackable(osu) {
-    setPos(-1, -1);
-    m_scrollView = new CBaseUIScrollView(-1, -1, 0, 0, "");
-    m_scrollView->setHorizontalScrolling(false);
-    m_scrollView->setScrollbarColor(0xff000000);
-    m_scrollView->setDrawBackground(false);
-    m_scrollView->setDrawFrame(false);
-    m_scrollView->setScrollResistance(0);
-    addBaseUIElement(m_scrollView);
-
-    // load/execute VR stuff only in VR builds
-    if(m_osu->isInVRMode()) {
-        engine->getResourceManager()->loadImage("mcosuvr_controls_1.png", "OSU_VR_CONTROLS_TUTORIAL_1");
-        engine->getResourceManager()->loadImage("mcosuvr_controls_2.png", "OSU_VR_CONTROLS_TUTORIAL_2");
-    }
-
-    m_tutorialImage1 = new CBaseUIImage("OSU_VR_CONTROLS_TUTORIAL_1", 0, 0, 0, 0, "");
-    m_scrollView->getContainer()->addBaseUIElement(m_tutorialImage1);
-    m_tutorialImage2 = new CBaseUIImage("OSU_VR_CONTROLS_TUTORIAL_2", 0, 0, 0, 0, "");
-    m_scrollView->getContainer()->addBaseUIElement(m_tutorialImage2);
-
-    m_backButton->setVisible(false);
-}
-
-void OsuVRTutorial::mouse_update(bool *propagate_clicks) {
-    if(!m_bVisible) return;
-    OsuScreenBackable::mouse_update(propagate_clicks);
-
-    float minPosToUnlockBackButton = m_tutorialImage1->getSize().y * 0.75f;
-    if(m_scrollView->getScrollPosY() < -minPosToUnlockBackButton && !m_backButton->isVisible())
-        m_backButton->setVisible(true);
-}
-
-void OsuVRTutorial::onKeyDown(KeyboardEvent &e) {
-    if(!m_bVisible) return;
-
-    if(e == KEY_ESCAPE && !m_backButton->isVisible())
-        e.consume();
-    else
-        OsuScreenBackable::onKeyDown(e);
-}
-
-CBaseUIContainer *OsuVRTutorial::setVisible(bool visible) {
-    OsuScreenBackable::setVisible(visible);
-
-    if(m_bVisible) updateLayout();
-
-    return this;
-}
-
-void OsuVRTutorial::updateLayout() {
-    OsuScreenBackable::updateLayout();
-
-    setSize(m_osu->getScreenSize() + Vector2(2, 2));
-    m_scrollView->setSize(m_osu->getScreenSize() + Vector2(2, 2));
-
-    // TODO: this scaling shit should be part of CBaseUIImage, clean up sometime
-    Vector2 imageSize = m_tutorialImage1->getImage() != NULL ? m_tutorialImage1->getImage()->getSize() : Vector2(1, 1);
-    float scale = (m_osu->getScreenWidth() + 1) / imageSize.x;
-    m_tutorialImage1->setScale(scale, scale);
-    m_tutorialImage1->setSize(imageSize * scale);
-
-    imageSize = m_tutorialImage2->getImage() != NULL ? m_tutorialImage2->getImage()->getSize() : Vector2(1, 1);
-    scale = (m_osu->getScreenWidth() + 1) / imageSize.x;
-    m_tutorialImage2->setRelPosY(m_tutorialImage1->getSize().y - 2);
-    m_tutorialImage2->setScale(scale, scale);
-    m_tutorialImage2->setSize(imageSize * scale);
-
-    m_scrollView->setScrollSizeToContent(0);
-}
-
-void OsuVRTutorial::onBack() {
-    engine->getSound()->play(m_osu->getSkin()->getMenuClick());
-
-    m_osu->toggleVRTutorial();
-}

+ 0 - 36
src/App/Osu/OsuVRTutorial.h

@@ -1,36 +0,0 @@
-//================ Copyright (c) 2017, PG, All rights reserved. =================//
-//
-// Purpose:		tutorial screen for controls
-//
-// $NoKeywords: $osuvrtut
-//===============================================================================//
-
-#ifndef OSUVRTUTORIAL_H
-#define OSUVRTUTORIAL_H
-
-#include "OsuScreenBackable.h"
-
-class CBaseUIContainer;
-class CBaseUIScrollView;
-class CBaseUIImage;
-
-class OsuVRTutorial : public OsuScreenBackable {
-   public:
-    OsuVRTutorial(Osu *osu);
-
-    virtual void mouse_update(bool *propagate_clicks);
-
-    virtual void onKeyDown(KeyboardEvent &e);
-
-    virtual CBaseUIContainer *setVisible(bool visible);
-
-   private:
-    virtual void updateLayout();
-    virtual void onBack();
-
-    CBaseUIScrollView *m_scrollView;
-    CBaseUIImage *m_tutorialImage1;
-    CBaseUIImage *m_tutorialImage2;
-};
-
-#endif

+ 0 - 92
src/App/Osu/OsuVRUIButton.cpp

@@ -1,92 +0,0 @@
-//================ Copyright (c) 2017, PG, All rights reserved. =================//
-//
-// Purpose:		a simple empty VR button
-//
-// $NoKeywords: $osuvrbt
-//===============================================================================//
-
-#include "OsuVRUIButton.h"
-
-#include "OpenVRController.h"
-#include "OpenVRInterface.h"
-#include "OsuVR.h"
-#include "Shader.h"
-#include "VertexArrayObject.h"
-
-OsuVRUIButton::OsuVRUIButton(OsuVR *vr, float x, float y, float width, float height)
-    : OsuVRUIElement(vr, x, y, width, height) {
-    m_bClickCheck = false;
-    m_clickVoidCallback = NULL;
-}
-
-void OsuVRUIButton::drawVR(Graphics *g, Matrix4 &mvp) {
-    OsuVRUIElement::drawVR(g, mvp);
-    if(!m_bIsVisible) return;
-
-    const float lineThickness = 0.0035f;
-
-    // border line mesh
-    VertexArrayObject vao2(Graphics::PRIMITIVE::PRIMITIVE_QUADS);
-
-    vao2.addVertex(0, 0, 0);
-    vao2.addVertex(lineThickness, 0, 0);
-    vao2.addVertex(lineThickness, -m_vSize.y, 0);
-    vao2.addVertex(0, -m_vSize.y, 0);
-
-    vao2.addVertex(m_vSize.x, 0, 0);
-    vao2.addVertex(m_vSize.x - lineThickness, 0, 0);
-    vao2.addVertex(m_vSize.x - lineThickness, -m_vSize.y, 0);
-    vao2.addVertex(m_vSize.x, -m_vSize.y, 0);
-
-    vao2.addVertex(0, 0, 0);
-    vao2.addVertex(m_vSize.x, 0, 0);
-    vao2.addVertex(m_vSize.x, -lineThickness, 0);
-    vao2.addVertex(0, -lineThickness, 0);
-
-    vao2.addVertex(0, -m_vSize.y, 0);
-    vao2.addVertex(m_vSize.x, -m_vSize.y, 0);
-    vao2.addVertex(m_vSize.x, -m_vSize.y + lineThickness, 0);
-    vao2.addVertex(0, -m_vSize.y + lineThickness, 0);
-
-    // position
-    Matrix4 translation;
-    translation.translate(m_vPos.x, m_vPos.y, 0);
-    Matrix4 finalMVP = mvp * translation;
-
-    // draw border line
-    m_vr->getShaderUntexturedGeneric()->enable();
-    m_vr->getShaderUntexturedGeneric()->setUniformMatrix4fv("matrix", finalMVP);
-    {
-        g->setColor(m_bIsCursorInside ? 0xffffffff : 0xff666666);
-        g->drawVAO(&vao2);
-    }
-    m_vr->getShaderUntexturedGeneric()->disable();
-}
-
-void OsuVRUIButton::update(Vector2 cursorPos) {
-    OsuVRUIElement::update(cursorPos);
-    if(!m_bIsVisible) return;
-
-    OpenVRController *controller = openvr->getController();
-
-    if(controller->getTrigger() > 0.95f ||
-       controller->isButtonPressed(OpenVRController::BUTTON::BUTTON_STEAMVR_TOUCHPAD)) {
-        // trigger click callback once (until released again)
-        if(!m_bClickCheck) {
-            m_bClickCheck = true;
-
-            // within bounds
-            if(m_bIsCursorInside) {
-                m_bIsActive = true;
-                onClicked();
-            }
-        }
-    } else {
-        m_bClickCheck = false;
-        m_bIsActive = false;
-    }
-}
-
-void OsuVRUIButton::onClicked() {
-    if(m_clickVoidCallback != NULL) m_clickVoidCallback();
-}

+ 0 - 31
src/App/Osu/OsuVRUIButton.h

@@ -1,31 +0,0 @@
-//================ Copyright (c) 2017, PG, All rights reserved. =================//
-//
-// Purpose:		a simple empty VR button
-//
-// $NoKeywords: $osuvrbt
-//===============================================================================//
-
-#ifndef OSUVRUIBUTTON_H
-#define OSUVRUIBUTTON_H
-
-#include "OsuVRUIElement.h"
-
-class OsuVRUIButton : public OsuVRUIElement {
-   public:
-    OsuVRUIButton(OsuVR *vr, float x, float y, float width, float height);
-
-    virtual void drawVR(Graphics *g, Matrix4 &mvp);
-    virtual void update(Vector2 cursorPos);
-
-    typedef fastdelegate::FastDelegate0<> ButtonClickVoidCallback;
-    void setClickCallback(ButtonClickVoidCallback clickCallback) { m_clickVoidCallback = clickCallback; }
-
-   protected:
-    virtual void onClicked();
-
-   private:
-    bool m_bClickCheck;
-    ButtonClickVoidCallback m_clickVoidCallback;
-};
-
-#endif

+ 0 - 33
src/App/Osu/OsuVRUIElement.cpp

@@ -1,33 +0,0 @@
-//================ Copyright (c) 2017, PG, All rights reserved. =================//
-//
-// Purpose:		baseclass for VR UI elements, see ~CBaseUIElement
-//
-// $NoKeywords: $osuvrui
-//===============================================================================//
-
-#include "OsuVRUIElement.h"
-
-OsuVRUIElement::OsuVRUIElement(OsuVR *vr, float x, float y, float width, float height) {
-    m_vr = vr;
-    m_vPos = Vector2(x, y);
-    m_vSize = Vector2(width, height);
-
-    m_bIsVisible = true;
-    m_bIsActive = false;
-    m_bIsCursorInside = false;
-}
-
-void OsuVRUIElement::drawVR(Graphics *g, Matrix4 &mvp) {}
-
-void OsuVRUIElement::update(Vector2 cursorPos) {
-    McRect bounds(m_vPos.x, -m_vPos.y, m_vSize.x, m_vSize.y);
-    if(bounds.contains(Vector2(cursorPos.x, -cursorPos.y))) {
-        if(!m_bIsCursorInside) {
-            m_bIsCursorInside = true;
-            onCursorInside();
-        }
-    } else if(m_bIsCursorInside) {
-        m_bIsCursorInside = false;
-        onCursorOutside();
-    }
-}

+ 0 - 55
src/App/Osu/OsuVRUIElement.h

@@ -1,55 +0,0 @@
-//================ Copyright (c) 2017, PG, All rights reserved. =================//
-//
-// Purpose:		baseclass for VR UI elements, similar to ~CBaseUIElement
-//
-// $NoKeywords: $osuvrui
-//===============================================================================//
-
-#ifndef OSUVRUIELEMENT_H
-#define OSUVRUIELEMENT_H
-
-#include "cbase.h"
-
-class OsuVR;
-
-class OsuVRUIElement {
-   public:
-    OsuVRUIElement(OsuVR *vr, float x, float y, float width, float height);
-    virtual ~OsuVRUIElement() { ; }
-
-    virtual void drawVR(Graphics *g, Matrix4 &mvp);
-    virtual void update(Vector2 cursorPos);
-
-    virtual void setPos(Vector2 pos) { m_vPos = pos; }
-    virtual void setPos(float x, float y) {
-        m_vPos.x = x;
-        m_vPos.y = y;
-    }
-    virtual void setPosX(float x) { m_vPos.x = x; }
-    virtual void setPosY(float y) { m_vPos.y = y; }
-    virtual void setSize(Vector2 size) { m_vSize = size; }
-
-    virtual void setVisible(bool visible) { m_bIsVisible = visible; }
-
-    inline const Vector2 &getPos() const { return m_vPos; }
-    inline const Vector2 &getSize() const { return m_vSize; }
-
-    virtual bool isVisible() { return m_bIsVisible; }
-    virtual bool isActive() { return m_bIsActive && isVisible(); }
-    virtual bool isCursorInside() { return m_bIsCursorInside && isVisible(); }
-
-   protected:
-    virtual void onCursorInside() { ; }
-    virtual void onCursorOutside() { ; }
-
-    OsuVR *m_vr;
-
-    Vector2 m_vPos;
-    Vector2 m_vSize;
-
-    bool m_bIsVisible;
-    bool m_bIsActive;
-    bool m_bIsCursorInside;
-};
-
-#endif

+ 0 - 82
src/App/Osu/OsuVRUIImageButton.cpp

@@ -1,82 +0,0 @@
-//================ Copyright (c) 2017, PG, All rights reserved. =================//
-//
-// Purpose:		a simple VR button with an image/icon on top
-//
-// $NoKeywords: $osuvribt
-//===============================================================================//
-
-#include "OsuVRUIImageButton.h"
-
-#include "AnimationHandler.h"
-#include "Engine.h"
-#include "OsuVR.h"
-#include "ResourceManager.h"
-
-OsuVRUIImageButton::OsuVRUIImageButton(OsuVR *vr, float x, float y, float width, float height,
-                                       std::string imageResourceName)
-    : OsuVRUIButton(vr, x, y, width, height) {
-    m_sImageResourceName = imageResourceName;
-    updateImageResource();
-
-    m_fAnimation = 0.0f;
-}
-
-void OsuVRUIImageButton::drawVR(Graphics *g, Matrix4 &mvp) {
-    OsuVRUIButton::drawVR(g, mvp);
-    if(!m_bIsVisible) return;
-    if(m_image == NULL) return;
-
-    // icon mesh
-    VertexArrayObject vao(Graphics::PRIMITIVE::PRIMITIVE_QUADS);
-
-    const Color color = m_bIsCursorInside ? COLORf(1.0f, 0.4f + 0.6f * m_fAnimation, 0.4f + 0.6f * m_fAnimation,
-                                                   0.4f + 0.6f * m_fAnimation)
-                                          : COLORf(1.0f, 0.4f, 0.4f, 0.4f);
-
-    const float animationDistance = m_fAnimation * 0.02f;
-
-    vao.addVertex(0, 0, animationDistance);
-    vao.addTexcoord(0, 0);
-    vao.addColor(color);
-    vao.addVertex(m_vSize.x, 0, animationDistance);
-    vao.addTexcoord(1, 0);
-    vao.addColor(color);
-    vao.addVertex(m_vSize.x, -m_vSize.y, animationDistance);
-    vao.addTexcoord(1, 1);
-    vao.addColor(color);
-    vao.addVertex(0, -m_vSize.y, animationDistance);
-    vao.addTexcoord(0, 1);
-    vao.addColor(color);
-
-    // position
-    Matrix4 translation;
-    translation.translate(m_vPos.x, m_vPos.y, 0);
-    Matrix4 finalMVP = mvp * translation;
-
-    // draw icon
-    m_vr->getShaderTexturedGeneric()->enable();
-    m_vr->getShaderTexturedGeneric()->setUniformMatrix4fv("matrix", finalMVP);
-    {
-        if(m_image != NULL) m_image->bind();
-
-        g->drawVAO(&vao);
-
-        if(m_image != NULL) m_image->unbind();
-    }
-    m_vr->getShaderTexturedGeneric()->disable();
-}
-
-void OsuVRUIImageButton::update(Vector2 cursorPos) {
-    OsuVRUIButton::update(cursorPos);
-    if(!m_bIsVisible) return;
-
-    if(m_image == NULL) updateImageResource();
-}
-
-void OsuVRUIImageButton::onCursorInside() { anim->moveLinear(&m_fAnimation, 1.0f, 0.1f, true); }
-
-void OsuVRUIImageButton::onCursorOutside() { anim->moveLinear(&m_fAnimation, 0.0f, 0.1f, true); }
-
-void OsuVRUIImageButton::updateImageResource() {
-    m_image = engine->getResourceManager()->getImage(m_sImageResourceName);
-}

+ 0 - 32
src/App/Osu/OsuVRUIImageButton.h

@@ -1,32 +0,0 @@
-//================ Copyright (c) 2017, PG, All rights reserved. =================//
-//
-// Purpose:		a simple VR button with an image/icon on top
-//
-// $NoKeywords: $osuvribt
-//===============================================================================//
-
-#ifndef OSUVRUIIMAGEBUTTON_H
-#define OSUVRUIIMAGEBUTTON_H
-
-#include "OsuVRUIButton.h"
-
-class OsuVRUIImageButton : public OsuVRUIButton {
-   public:
-    OsuVRUIImageButton(OsuVR *vr, float x, float y, float width, float height, std::string imageResourceName);
-
-    virtual void drawVR(Graphics *g, Matrix4 &mvp);
-    virtual void update(Vector2 cursorPos);
-
-   private:
-    virtual void onCursorInside();
-    virtual void onCursorOutside();
-
-    void updateImageResource();
-
-    std::string m_sImageResourceName;
-    Image *m_image;
-
-    float m_fAnimation;
-};
-
-#endif

+ 0 - 99
src/App/Osu/OsuVRUIImageCheckbox.cpp

@@ -1,99 +0,0 @@
-//================ Copyright (c) 2017, PG, All rights reserved. =================//
-//
-// Purpose:		a simple VR checkbox with an image/icon on top
-//
-// $NoKeywords: $osuvricb
-//===============================================================================//
-
-#include "OsuVRUIImageCheckbox.h"
-
-#include "AnimationHandler.h"
-#include "Engine.h"
-#include "OsuVR.h"
-#include "ResourceManager.h"
-
-OsuVRUIImageCheckbox::OsuVRUIImageCheckbox(OsuVR *vr, float x, float y, float width, float height,
-                                           std::string imageResourceNameChecked, std::string imageResourceNameUnchecked)
-    : OsuVRUIButton(vr, x, y, width, height) {
-    m_sImageResourceNameChecked = imageResourceNameChecked;
-    m_sImageResourceNameUnchecked = imageResourceNameUnchecked;
-    updateImageResource();
-
-    m_bChecked = false;
-
-    m_fAnimation = 0.0f;
-}
-
-void OsuVRUIImageCheckbox::drawVR(Graphics *g, Matrix4 &mvp) {
-    OsuVRUIButton::drawVR(g, mvp);
-    if(!m_bIsVisible) return;
-    if(m_imageChecked == NULL || m_imageUnchecked == NULL) return;
-
-    // icon mesh
-    VertexArrayObject vao(Graphics::PRIMITIVE::PRIMITIVE_QUADS);
-
-    const Color color = m_bIsCursorInside ? COLORf(1.0f, 0.4f + 0.6f * m_fAnimation, 0.4f + 0.6f * m_fAnimation,
-                                                   0.4f + 0.6f * m_fAnimation)
-                                          : COLORf(1.0f, 0.4f, 0.4f, 0.4f);
-
-    const float animationDistance = m_fAnimation * 0.02f;
-
-    vao.addVertex(0, 0, animationDistance);
-    vao.addTexcoord(0, 0);
-    vao.addColor(color);
-    vao.addVertex(m_vSize.x, 0, animationDistance);
-    vao.addTexcoord(1, 0);
-    vao.addColor(color);
-    vao.addVertex(m_vSize.x, -m_vSize.y, animationDistance);
-    vao.addTexcoord(1, 1);
-    vao.addColor(color);
-    vao.addVertex(0, -m_vSize.y, animationDistance);
-    vao.addTexcoord(0, 1);
-    vao.addColor(color);
-
-    // position
-    Matrix4 translation;
-    translation.translate(m_vPos.x, m_vPos.y, 0);
-    Matrix4 finalMVP = mvp * translation;
-
-    // draw icon
-    m_vr->getShaderTexturedGeneric()->enable();
-    m_vr->getShaderTexturedGeneric()->setUniformMatrix4fv("matrix", finalMVP);
-    {
-        if(m_bChecked) {
-            if(m_imageChecked != NULL) m_imageChecked->bind();
-        } else {
-            if(m_imageUnchecked != NULL) m_imageUnchecked->bind();
-        }
-
-        g->drawVAO(&vao);
-
-        if(m_bChecked) {
-            if(m_imageChecked != NULL) m_imageChecked->unbind();
-        } else {
-            if(m_imageUnchecked != NULL) m_imageUnchecked->unbind();
-        }
-    }
-    m_vr->getShaderTexturedGeneric()->disable();
-}
-
-void OsuVRUIImageCheckbox::update(Vector2 cursorPos) {
-    OsuVRUIButton::update(cursorPos);
-    if(!m_bIsVisible) return;
-
-    if(m_imageChecked == NULL || m_imageUnchecked == NULL) updateImageResource();
-}
-
-void OsuVRUIImageCheckbox::onClicked() {
-    m_bChecked = !m_bChecked;
-    OsuVRUIButton::onClicked();
-}
-
-void OsuVRUIImageCheckbox::onCursorInside() { anim->moveLinear(&m_fAnimation, 1.0f, 0.1f, true); }
-
-void OsuVRUIImageCheckbox::onCursorOutside() { anim->moveLinear(&m_fAnimation, 0.0f, 0.1f, true); }
-
-void OsuVRUIImageCheckbox::updateImageResource() {
-    m_imageChecked = engine->getResourceManager()->getImage(m_sImageResourceNameChecked);
-    m_imageUnchecked = engine->getResourceManager()->getImage(m_sImageResourceNameUnchecked);
-}

+ 0 - 43
src/App/Osu/OsuVRUIImageCheckbox.h

@@ -1,43 +0,0 @@
-//================ Copyright (c) 2017, PG, All rights reserved. =================//
-//
-// Purpose:		a simple VR checkbox with an image/icon on top
-//
-// $NoKeywords: $osuvricb
-//===============================================================================//
-
-#ifndef OSUVRUIIMAGECHECKBOX_H
-#define OSUVRUIIMAGECHECKBOX_H
-
-#include "OsuVRUIButton.h"
-
-class OsuVRUIImageCheckbox : public OsuVRUIButton {
-   public:
-    OsuVRUIImageCheckbox(OsuVR *vr, float x, float y, float width, float height, std::string imageResourceNameChecked,
-                         std::string imageResourceNameUnchecked);
-
-    virtual void drawVR(Graphics *g, Matrix4 &mvp);
-    virtual void update(Vector2 cursorPos);
-
-    void setChecked(bool checked) { m_bChecked = checked; }
-
-    inline bool isChecked() const { return m_bChecked; }
-
-   private:
-    virtual void onClicked();
-
-    virtual void onCursorInside();
-    virtual void onCursorOutside();
-
-    void updateImageResource();
-
-    bool m_bChecked;
-
-    std::string m_sImageResourceNameChecked;
-    std::string m_sImageResourceNameUnchecked;
-    Image *m_imageChecked;
-    Image *m_imageUnchecked;
-
-    float m_fAnimation;
-};
-
-#endif

+ 0 - 123
src/App/Osu/OsuVRUISlider.cpp

@@ -1,123 +0,0 @@
-//================ Copyright (c) 2017, PG, All rights reserved. =================//
-//
-// Purpose:		a simple filled VR slider
-//
-// $NoKeywords: $osuvrsl
-//===============================================================================//
-
-#include "OsuVRUISlider.h"
-
-#include "OpenVRController.h"
-#include "OpenVRInterface.h"
-#include "OsuVR.h"
-#include "Shader.h"
-#include "VertexArrayObject.h"
-
-OsuVRUISlider::OsuVRUISlider(OsuVR *vr, float x, float y, float width, float height)
-    : OsuVRUIElement(vr, x, y, width, height) {
-    m_bClickCheck = false;
-    m_sliderChangeCallback = NULL;
-
-    m_fMinValue = 0.0f;
-    m_fMaxValue = 1.0f;
-    m_fCurValue = 0.0f;
-    m_fCurPercent = 0.0f;
-}
-
-void OsuVRUISlider::drawVR(Graphics *g, Matrix4 &mvp) {
-    OsuVRUIElement::drawVR(g, mvp);
-    if(!m_bIsVisible) return;
-
-    const float lineThickness = 0.0035f;
-
-    Color color = (m_bIsCursorInside || m_bIsActive) ? 0xffffffff : 0xff666666;
-
-    // border line mesh
-    VertexArrayObject vao(Graphics::PRIMITIVE::PRIMITIVE_QUADS);
-
-    vao.addVertex(0, 0, 0);
-    vao.addVertex(lineThickness, 0, 0);
-    vao.addVertex(lineThickness, -m_vSize.y, 0);
-    vao.addVertex(0, -m_vSize.y, 0);
-
-    vao.addVertex(m_vSize.x, 0, 0);
-    vao.addVertex(m_vSize.x - lineThickness, 0, 0);
-    vao.addVertex(m_vSize.x - lineThickness, -m_vSize.y, 0);
-    vao.addVertex(m_vSize.x, -m_vSize.y, 0);
-
-    vao.addVertex(0, 0, 0);
-    vao.addVertex(m_vSize.x, 0, 0);
-    vao.addVertex(m_vSize.x, -lineThickness, 0);
-    vao.addVertex(0, -lineThickness, 0);
-
-    vao.addVertex(0, -m_vSize.y, 0);
-    vao.addVertex(m_vSize.x, -m_vSize.y, 0);
-    vao.addVertex(m_vSize.x, -m_vSize.y + lineThickness, 0);
-    vao.addVertex(0, -m_vSize.y + lineThickness, 0);
-
-    // percentage fill mesh
-    VertexArrayObject vao2(Graphics::PRIMITIVE::PRIMITIVE_QUADS);
-
-    vao2.addVertex(0, 0, 0);
-    vao2.addVertex(m_vSize.x * m_fCurPercent, 0, 0);
-    vao2.addVertex(m_vSize.x * m_fCurPercent, -m_vSize.y, 0);
-    vao2.addVertex(0, -m_vSize.y, 0);
-
-    // position
-    Matrix4 translation;
-    translation.translate(m_vPos.x, m_vPos.y, 0);
-    Matrix4 finalMVP = mvp * translation;
-
-    // draw border line and fill
-    m_vr->getShaderUntexturedGeneric()->enable();
-    m_vr->getShaderUntexturedGeneric()->setUniformMatrix4fv("matrix", finalMVP);
-    {
-        g->setColor(color);
-        g->drawVAO(&vao);
-        g->drawVAO(&vao2);
-    }
-    m_vr->getShaderUntexturedGeneric()->disable();
-}
-
-void OsuVRUISlider::update(Vector2 cursorPos) {
-    OsuVRUIElement::update(cursorPos);
-    if(!m_bIsVisible) return;
-
-    OpenVRController *controller = openvr->getController();
-
-    if(controller->getTrigger() > 0.95f ||
-       controller->isButtonPressed(OpenVRController::BUTTON::BUTTON_STEAMVR_TOUCHPAD)) {
-        // trigger once if clicked
-        if(!m_bClickCheck) {
-            m_bClickCheck = true;
-
-            // within bounds
-            if(m_bIsCursorInside) m_bIsActive = true;
-        }
-    } else {
-        m_bClickCheck = false;
-        m_bIsActive = false;
-    }
-
-    // handle sliding
-    if(m_bIsActive) {
-        const float percent = clamp<float>((cursorPos.x - m_vPos.x) / m_vSize.x, 0.0f, 1.0f);
-        bool hasChanged = percent != m_fCurPercent;
-        m_fCurPercent = percent;
-        m_fCurValue = lerp<float>(m_fMinValue, m_fMaxValue, m_fCurPercent);
-
-        if(m_sliderChangeCallback != NULL && hasChanged) m_sliderChangeCallback(this);
-    }
-}
-
-void OsuVRUISlider::setValue(float value, bool ignoreCallback) {
-    if(value == m_fCurValue || m_bIsActive) return;
-
-    float newValue = clamp<float>(value, m_fMinValue, m_fMaxValue);
-    if(newValue == m_fCurValue) return;
-
-    m_fCurValue = newValue;
-    m_fCurPercent = clamp<float>((m_fCurValue - m_fMinValue) / (std::abs(m_fMaxValue - m_fMinValue)), 0.0f, 1.0f);
-
-    if(m_sliderChangeCallback != NULL && !ignoreCallback) m_sliderChangeCallback(this);
-}

+ 0 - 34
src/App/Osu/OsuVRUISlider.h

@@ -1,34 +0,0 @@
-//================ Copyright (c) 2017, PG, All rights reserved. =================//
-//
-// Purpose:		a simple filled VR slider
-//
-// $NoKeywords: $osuvrsl
-//===============================================================================//
-
-#ifndef OSUVRUISLIDER_H
-#define OSUVRUISLIDER_H
-
-#include "OsuVRUIElement.h"
-
-class OsuVRUISlider : public OsuVRUIElement {
-   public:
-    OsuVRUISlider(OsuVR *vr, float x, float y, float width, float height);
-
-    virtual void drawVR(Graphics *g, Matrix4 &mvp);
-    virtual void update(Vector2 cursorPos);
-
-    typedef fastdelegate::FastDelegate1<OsuVRUISlider *> SliderChangeCallback;
-    void setChangeCallback(SliderChangeCallback changeCallback) { m_sliderChangeCallback = changeCallback; }
-
-    void setValue(float value, bool ignoreCallback = false);
-
-    inline float getFloat() { return m_fCurValue; }
-
-   private:
-    SliderChangeCallback m_sliderChangeCallback;
-
-    float m_fMinValue, m_fMaxValue, m_fCurValue, m_fCurPercent;
-    bool m_bClickCheck;
-};
-
-#endif

+ 0 - 2
src/App/Osu/OsuVolumeOverlay.cpp

@@ -19,7 +19,6 @@
 #include "OsuSongBrowser2.h"
 #include "OsuUIVolumeSlider.h"
 #include "OsuUserStatsScreen.h"
-#include "OsuVRTutorial.h"
 #include "Sound.h"
 #include "SoundEngine.h"
 
@@ -250,7 +249,6 @@ bool OsuVolumeOverlay::canChangeVolume() {
     bool can_scroll = true;
     if(m_osu->m_songBrowser2->isVisible()) can_scroll = false;
     if(m_osu->m_optionsMenu->isVisible()) can_scroll = false;
-    if(m_osu->m_vrTutorial->isVisible()) can_scroll = false;
     if(m_osu->m_userStatsScreen->isVisible()) can_scroll = false;
     if(m_osu->m_changelog->isVisible()) can_scroll = false;
     if(m_osu->m_rankingScreen->isVisible()) can_scroll = false;

+ 0 - 8
src/Engine/Engine.cpp

@@ -22,7 +22,6 @@
 #include "Mouse.h"
 #include "NetworkHandler.h"
 #include "OpenCLInterface.h"
-#include "OpenVRInterface.h"
 #include "Profiler.h"
 #include "ResourceManager.h"
 #include "SoundEngine.h"
@@ -176,7 +175,6 @@ Engine::Engine(Environment *environment, const char *args) {
         m_sound = new SoundEngine();
         m_animationHandler = new AnimationHandler();
         m_openCL = new OpenCLInterface();
-        m_openVR = new OpenVRInterface();
         m_networkHandler = new NetworkHandler();
         m_discord = new DiscordInterface();
 
@@ -210,9 +208,6 @@ Engine::~Engine() {
     debugLog("Engine: Freeing OpenCL...\n");
     SAFE_DELETE(m_openCL);
 
-    debugLog("Engine: Freeing OpenVR...\n");
-    SAFE_DELETE(m_openVR);
-
     debugLog("Engine: Freeing Sound...\n");
     SAFE_DELETE(m_sound);
 
@@ -388,8 +383,6 @@ void Engine::onUpdate() {
             m_inputDevices[i]->update();
         }
 
-        m_openVR->update();  // (this also handles its input devices)
-
         {
             VPROF_BUDGET("AnimationHandler::update", VPROF_BUDGETGROUP_UPDATE);
             m_animationHandler->update();
@@ -504,7 +497,6 @@ void Engine::onResolutionChange(Vector2 newResolution) {
     // update everything
     m_vScreenSize = newResolution;
     if(m_graphics != NULL) m_graphics->onResolutionChange(newResolution);
-    if(m_openVR != NULL) m_openVR->onResolutionChange(newResolution);
     if(m_app != NULL) m_app->onResolutionChanged(newResolution);
 }
 

+ 0 - 2
src/Engine/Engine.h

@@ -21,7 +21,6 @@ class SoundEngine;
 class ContextMenu;
 class NetworkHandler;
 class OpenCLInterface;
-class OpenVRInterface;
 class VulkanInterface;
 class ResourceManager;
 class AnimationHandler;
@@ -142,7 +141,6 @@ class Engine {
     Graphics *m_graphics;
     SoundEngine *m_sound;
     OpenCLInterface *m_openCL;
-    OpenVRInterface *m_openVR;
     VulkanInterface *m_vulkan;
     ContextMenu *m_contextMenu;
     Environment *m_environment;

+ 0 - 1
src/Engine/Graphics.h

@@ -69,7 +69,6 @@ class Graphics {
 
    public:
     friend class Engine;
-    friend class OpenVRInterface;
 
     Graphics();
     virtual ~Graphics() {}

+ 0 - 207
src/Engine/Input/OpenVRController.cpp

@@ -1,207 +0,0 @@
-//================ Copyright (c) 2016, PG, All rights reserved. =================//
-//
-// Purpose:		openvr controller wrapper
-//
-// $NoKeywords: $vrc
-//===============================================================================//
-
-#include "OpenVRController.h"
-
-#include "ConVar.h"
-#include "Engine.h"
-
-ConVar steamvr_hapticpulse_bug_workaround("steamvr_hapticpulse_bug_workaround", false, FCVAR_NONE);
-
-bool OpenVRController::STEAMVR_BUG_WORKAROUND_FLIPFLOP = false;
-
-#if !defined(MCENGINE_FEATURE_OPENVR)
-
-OpenVRController::OpenVRController() : InputDevice() { m_role = OpenVRController::ROLE::ROLE_INVALID; }
-
-#endif
-
-#ifdef MCENGINE_FEATURE_OPENVR
-
-OpenVRController::OpenVRController(vr::IVRSystem *hmd, OpenVRController::ROLE role) : InputDevice() {
-    m_hmd = hmd;
-    m_role = role;
-
-    m_ulButtonPressed = 0;
-    m_ulButtonTouched = 0;
-
-    m_fLastTriggerHapticPulseTime = 0.0f;
-
-    for(int i = 0; i < vr::k_unControllerStateAxisCount; i++) {
-        m_rAxis[i].x = 0.0f;
-        m_rAxis[i].y = 0.0f;
-    }
-}
-
-void OpenVRController::update(uint64_t buttonPressed, uint64_t buttonTouched,
-                              vr::VRControllerAxis_t axes[vr::k_unControllerStateAxisCount]) {
-    m_ulButtonPressed = buttonPressed;
-    m_ulButtonTouched = buttonTouched;
-
-    for(int i = 0; i < vr::k_unControllerStateAxisCount; i++) {
-        m_rAxis[i] = axes[i];
-    }
-
-    if(steamvr_hapticpulse_bug_workaround.getBool()) {
-        // execute buffered TriggerHapticPulse events
-        // we only execute the newest buffered event here, all others are discarded
-        if((!STEAMVR_BUG_WORKAROUND_FLIPFLOP && m_role == OpenVRController::ROLE::ROLE_RIGHTHAND) ||
-           (STEAMVR_BUG_WORKAROUND_FLIPFLOP && m_role == OpenVRController::ROLE::ROLE_LEFTHAND)) {
-            if(m_triggerHapticPulseBuffer.size() > 0) {
-                TRIGGER_HAPTIC_PULSE_EVENT ev = m_triggerHapticPulseBuffer[m_triggerHapticPulseBuffer.size() - 1];
-                m_triggerHapticPulseBuffer.clear();
-
-                triggerHapticPulse(ev.durationMicroSec, ev.button);
-            }
-        }
-    }
-}
-
-void OpenVRController::updateMatrixPose(Matrix4 &deviceToAbsoluteTracking) {
-    m_matrix = deviceToAbsoluteTracking;
-
-    m_vPos.x = m_matrix[12];
-    m_vPos.y = m_matrix[13];
-    m_vPos.z = m_matrix[14];
-
-    m_vDir = (m_matrix * Vector3(0, 0, -1)).normalize();
-    m_vUp = (m_matrix * Vector3(0, 1, 0)).normalize();
-    m_vRight = (m_matrix * Vector3(1, 0, 0)).normalize();
-}
-
-#endif
-
-void OpenVRController::updateDebug(float triggerValue) {
-#if defined(MCENGINE_FEATURE_OPENVR)
-    m_rAxis[vr::EVRButtonId::k_EButton_SteamVR_Trigger - vr::EVRButtonId::k_EButton_Axis0].x = triggerValue;
-#else
-    (void)triggerValue;
-#endif
-}
-
-void OpenVRController::updateMatrixPoseDebug(Vector3 pos, Vector3 forward, Vector3 up, Vector3 right) {
-    m_vPos = pos;
-
-    m_vDir = forward;
-    m_vUp = up;
-    m_vRight = right;
-}
-
-void OpenVRController::triggerHapticPulse(unsigned short durationMicroSec, OpenVRController::BUTTON button) {
-    if(durationMicroSec == 0 || engine->getTime() < m_fLastTriggerHapticPulseTime) return;
-
-    m_fLastTriggerHapticPulseTime = engine->getTime();  // default, override below for specific libraries as needed
-
-#if defined(MCENGINE_FEATURE_OPENVR)
-
-    if(m_hmd == NULL) return;
-
-    // "After this call the application may not trigger another haptic pulse on this controller and axis combination for
-    // 5ms."
-    m_fLastTriggerHapticPulseTime = engine->getTime() + 0.00515f;
-
-    if(steamvr_hapticpulse_bug_workaround.getBool()) {
-        if((STEAMVR_BUG_WORKAROUND_FLIPFLOP && m_role == OpenVRController::ROLE::ROLE_RIGHTHAND) ||
-           (!STEAMVR_BUG_WORKAROUND_FLIPFLOP && m_role == OpenVRController::ROLE::ROLE_LEFTHAND)) {
-            // not our turn, buffer the call and execute it in the next update()
-            TRIGGER_HAPTIC_PULSE_EVENT ev;
-            ev.durationMicroSec = durationMicroSec;
-            ev.button = button;
-            m_triggerHapticPulseBuffer.push_back(ev);
-        } else  // ok, it's our turn
-            m_hmd->TriggerHapticPulse(m_hmd->GetTrackedDeviceIndexForControllerRole(roleIdToOpenVR(m_role)),
-                                      buttonIdToOpenVR(button) - vr::EVRButtonId::k_EButton_Axis0, durationMicroSec);
-    } else
-        m_hmd->TriggerHapticPulse(m_hmd->GetTrackedDeviceIndexForControllerRole(roleIdToOpenVR(m_role)),
-                                  buttonIdToOpenVR(button) - vr::EVRButtonId::k_EButton_Axis0, durationMicroSec);
-
-#else
-    (void)button;
-#endif
-}
-
-bool OpenVRController::isButtonPressed(OpenVRController::BUTTON button) {
-#if defined(MCENGINE_FEATURE_OPENVR)
-    return m_ulButtonPressed & vr::ButtonMaskFromId(buttonIdToOpenVR(button));
-#else
-    (void)button;
-    return false;
-#endif
-}
-
-float OpenVRController::getTrigger() {
-#if defined(MCENGINE_FEATURE_OPENVR)
-
-    return m_rAxis[vr::EVRButtonId::k_EButton_SteamVR_Trigger - vr::EVRButtonId::k_EButton_Axis0].x;
-
-#else
-    return 0.0f;
-#endif
-}
-
-Vector2 OpenVRController::getTouchpad() {
-#if defined(MCENGINE_FEATURE_OPENVR)
-
-    return Vector2(m_rAxis[vr::EVRButtonId::k_EButton_SteamVR_Touchpad - vr::EVRButtonId::k_EButton_Axis0].x,
-                   m_rAxis[vr::EVRButtonId::k_EButton_SteamVR_Touchpad - vr::EVRButtonId::k_EButton_Axis0].y);
-
-#else
-    return Vector2(0, 0);
-#endif
-}
-
-#ifdef MCENGINE_FEATURE_OPENVR
-
-vr::EVRButtonId OpenVRController::buttonIdToOpenVR(OpenVRController::BUTTON buttonId) {
-    switch(buttonId) {
-        case OpenVRController::BUTTON::BUTTON_SYSTEM:
-            return vr::EVRButtonId::k_EButton_System;
-        case OpenVRController::BUTTON::BUTTON_APPLICATIONMENU:
-            return vr::EVRButtonId::k_EButton_ApplicationMenu;
-        case OpenVRController::BUTTON::BUTTON_GRIP:
-            return vr::EVRButtonId::k_EButton_Grip;
-        case OpenVRController::BUTTON::BUTTON_DPAD_LEFT:
-            return vr::EVRButtonId::k_EButton_DPad_Left;
-        case OpenVRController::BUTTON::BUTTON_DPAD_UP:
-            return vr::EVRButtonId::k_EButton_DPad_Up;
-        case OpenVRController::BUTTON::BUTTON_DPAD_RIGHT:
-            return vr::EVRButtonId::k_EButton_DPad_Right;
-        case OpenVRController::BUTTON::BUTTON_DPAD_DOWN:
-            return vr::EVRButtonId::k_EButton_DPad_Down;
-        case OpenVRController::BUTTON::BUTTON_A:
-            return vr::EVRButtonId::k_EButton_A;
-        case OpenVRController::BUTTON::BUTTON_PROXIMITYSENSOR:
-            return vr::EVRButtonId::k_EButton_ProximitySensor;
-        case OpenVRController::BUTTON::BUTTON_AXIS0:
-            return vr::EVRButtonId::k_EButton_Axis0;
-        case OpenVRController::BUTTON::BUTTON_AXIS1:
-            return vr::EVRButtonId::k_EButton_Axis1;
-        case OpenVRController::BUTTON::BUTTON_AXIS2:
-            return vr::EVRButtonId::k_EButton_Axis2;
-        case OpenVRController::BUTTON::BUTTON_AXIS3:
-            return vr::EVRButtonId::k_EButton_Axis3;
-        case OpenVRController::BUTTON::BUTTON_AXIS4:
-            return vr::EVRButtonId::k_EButton_Axis4;
-    }
-
-    return vr::EVRButtonId::k_EButton_Max;
-}
-
-vr::ETrackedControllerRole OpenVRController::roleIdToOpenVR(OpenVRController::ROLE roleId) {
-    switch(roleId) {
-        case OpenVRController::ROLE::ROLE_INVALID:
-            return vr::ETrackedControllerRole::TrackedControllerRole_Invalid;
-        case OpenVRController::ROLE::ROLE_LEFTHAND:
-            return vr::ETrackedControllerRole::TrackedControllerRole_LeftHand;
-        case OpenVRController::ROLE::ROLE_RIGHTHAND:
-            return vr::ETrackedControllerRole::TrackedControllerRole_RightHand;
-    }
-
-    return vr::ETrackedControllerRole::TrackedControllerRole_Invalid;
-}
-
-#endif

+ 0 - 124
src/Engine/Input/OpenVRController.h

@@ -1,124 +0,0 @@
-//================ Copyright (c) 2016, PG, All rights reserved. =================//
-//
-// Purpose:		openvr controller wrapper
-//
-// $NoKeywords: $vrc
-//===============================================================================//
-
-#ifndef OPENVRCONTROLLER_H
-#define OPENVRCONTROLLER_H
-
-#include "InputDevice.h"
-
-#ifdef MCENGINE_FEATURE_OPENVR
-
-#ifdef MCENGINE_USE_SYSTEM_OPENVR
-#include <openvr.h>
-#else
-#include <openvr_mingw.hpp>
-#endif
-
-#endif
-
-class OpenVRController : public InputDevice {
-   public:
-    enum class BUTTON {
-        BUTTON_SYSTEM,
-        BUTTON_APPLICATIONMENU,
-        BUTTON_GRIP,
-        BUTTON_DPAD_LEFT,
-        BUTTON_DPAD_UP,
-        BUTTON_DPAD_RIGHT,
-        BUTTON_DPAD_DOWN,
-        BUTTON_A,
-        BUTTON_PROXIMITYSENSOR,
-        BUTTON_AXIS0,
-        BUTTON_AXIS1,
-        BUTTON_AXIS2,
-        BUTTON_AXIS3,
-        BUTTON_AXIS4,
-
-        BUTTON_STEAMVR_TOUCHPAD = BUTTON_AXIS0,
-        BUTTON_STEAMVR_TRIGGER = BUTTON_AXIS1,
-        BUTTON_DASHBOARD_BACK = BUTTON_GRIP
-    };
-
-    enum class ROLE { ROLE_INVALID, ROLE_LEFTHAND, ROLE_RIGHTHAND };
-
-    static bool STEAMVR_BUG_WORKAROUND_FLIPFLOP;  // only allow 1 controller to send 1 TriggerHapticPulse() within 1
-                                                  // frame, buffer all other calls
-
-   public:
-#if !defined(MCENGINE_FEATURE_OPENVR)
-
-    OpenVRController();
-
-#endif
-
-#ifdef MCENGINE_FEATURE_OPENVR
-
-    OpenVRController(vr::IVRSystem *hmd, OpenVRController::ROLE role);
-
-    void update(uint64_t buttonPressed, uint64_t buttonTouched,
-                vr::VRControllerAxis_t axes[vr::k_unControllerStateAxisCount]);
-    void updateMatrixPose(Matrix4 &deviceToAbsoluteTracking);
-
-    void setHmd(vr::IVRSystem *hmd) { m_hmd = hmd; }
-
-#endif
-
-    void updateDebug(float triggerValue);
-    void updateMatrixPoseDebug(Vector3 pos, Vector3 forward, Vector3 up, Vector3 right);
-
-    void triggerHapticPulse(unsigned short durationMicroSec = 500,
-                            OpenVRController::BUTTON button = OpenVRController::BUTTON::BUTTON_STEAMVR_TOUCHPAD);
-
-    bool isButtonPressed(OpenVRController::BUTTON button);
-
-    inline OpenVRController::ROLE getRole() const { return m_role; }
-
-    inline Matrix4 getMatrixPose() const { return m_matrix; }
-    inline Vector3 getPosition() const { return m_vPos; }
-    inline Vector3 getDirection() const { return m_vDir; }
-    inline Vector3 getUp() const { return m_vUp; }
-    inline Vector3 getRight() const { return m_vRight; }
-
-    float getTrigger();
-    Vector2 getTouchpad();
-
-#ifdef MCENGINE_FEATURE_OPENVR
-
-    static vr::EVRButtonId buttonIdToOpenVR(OpenVRController::BUTTON buttonId);
-    static vr::ETrackedControllerRole roleIdToOpenVR(OpenVRController::ROLE roleId);
-
-#endif
-
-   private:
-    ROLE m_role;
-    Matrix4 m_matrix;
-
-    Vector3 m_vPos;
-    Vector3 m_vDir;
-    Vector3 m_vUp;
-    Vector3 m_vRight;
-
-    float m_fLastTriggerHapticPulseTime;
-
-#ifdef MCENGINE_FEATURE_OPENVR
-
-    vr::IVRSystem *m_hmd;
-
-    uint64_t m_ulButtonPressed;
-    uint64_t m_ulButtonTouched;
-    vr::VRControllerAxis_t m_rAxis[vr::k_unControllerStateAxisCount];
-
-    struct TRIGGER_HAPTIC_PULSE_EVENT {
-        unsigned short durationMicroSec;
-        OpenVRController::BUTTON button;
-    };
-    std::vector<TRIGGER_HAPTIC_PULSE_EVENT> m_triggerHapticPulseBuffer;
-
-#endif
-};
-
-#endif

+ 0 - 5
src/Engine/Main/EngineFeatures.h

@@ -31,11 +31,6 @@
  */
 // #define MCENGINE_FEATURE_VULKAN
 
-/*
- * OpenVR
- */
-// #define MCENGINE_FEATURE_OPENVR
-
 /*
  * Discord RPC (rich presence)
  */

+ 0 - 1945
src/Engine/OpenVRInterface.cpp

@@ -1,1945 +0,0 @@
-//================ Copyright (c) 2016, PG, All rights reserved. =================//
-//
-// Purpose:		openvr wrapper and vr renderer
-//
-// $NoKeywords: $vr
-//===============================================================================//
-
-#include "OpenVRInterface.h"
-
-#include "CBaseUIContainer.h"
-#include "Camera.h"
-#include "ConVar.h"
-#include "Console.h"
-#include "ConsoleBox.h"
-#include "DirectX11Interface.h"
-#include "Engine.h"
-#include "Environment.h"
-#include "File.h"
-#include "Keyboard.h"
-#include "Mouse.h"
-#include "OpenGLRenderTarget.h"
-#include "OpenVRController.h"
-#include "RenderTarget.h"
-#include "ResourceManager.h"
-#include "Shader.h"
-#include "VertexArrayObject.h"
-
-// NOTE: SteamVR has a "bug", making size changes of the submitted RenderTargets distort the image in the compositor
-// (and going from bigger to smaller causes OpenGL errors, yay)
-// ("it's not a bug, it's a feature" because they added magic caching of the RenderTarget width/height)
-// therefore, vr_ss_compositor can only be set ONCE upon application startup (in the app constructor, before the first
-// frame is submitted!) however, vr_ss can be set dynamically because the rendered frame is blit into ANOTHER
-// framebuffer (m_compositorEye)
-
-ConVar vr_bug_workaround_triggerhapticpulse("vr_bug_workaround_triggerhapticpulse", true, FCVAR_NONE);
-
-ConVar vr_ss("vr_ss", 1.3f, FCVAR_NONE,
-             "internal engine supersampling factor. the recommended rendertarget size, as reported by OpenVR, is "
-             "multiplied by this value");
-ConVar vr_ss_compositor("vr_ss_compositor", 1.6f, FCVAR_NONE,
-                        "external compositor submission texture supersampling factor. the recommended rendertarget "
-                        "size, as reported by OpenVR, is multiplied by this value");
-ConVar vr_compositor_submit_double(
-    "vr_compositor_submit_double", false, FCVAR_NONE,
-    "use separate submission texture for each eye (trades VRAM for speed/compatibility)");
-ConVar vr_compositor_texture_size_max("vr_compositor_texture_size_max", 4096.0f, FCVAR_NONE,
-                                      "submission texture size is force clamped to less or equal to this value");
-ConVar vr_aa("vr_aa", 2.0f, FCVAR_NONE, "antialiasing/multisampling factor. valid values are: 0, 2, 4, 8, 16");
-ConVar vr_nearz("vr_nearz", 0.1f, FCVAR_NONE);
-ConVar vr_farz("vr_farz", 300.0f, FCVAR_NONE);
-
-ConVar vr_draw_lighthouse_models("vr_draw_lighthouse_models", true, FCVAR_NONE);
-ConVar vr_draw_controller_models("vr_draw_controller_models", true, FCVAR_NONE);
-ConVar vr_draw_head_model("vr_draw_head_model", true, FCVAR_NONE);
-ConVar vr_draw_hmd_to_window("vr_draw_hmd_to_window", true, FCVAR_NONE);
-ConVar vr_draw_hmd_to_window_draw_both_eyes("vr_draw_hmd_to_window_draw_both_eyes", true, FCVAR_NONE);
-ConVar vr_controller_model_brightness_multiplier("vr_controller_model_brightness_multiplier", 8.0f, FCVAR_NONE);
-ConVar vr_background_brightness("vr_background_brightness", 0.1f, FCVAR_NONE);
-
-ConVar vr_spectator_mode("vr_spectator_mode", false, FCVAR_NONE);
-ConVar vr_spectator_camera_rotation("vr_spectator_camera_rotation", "0 0 0", FCVAR_NONE,
-                                    "rotation of the camera (in degrees): yaw pitch roll");
-ConVar vr_spectator_camera_position("vr_spectator_camera_position", "0 0 0", FCVAR_NONE,
-                                    "position of the camera (in meters): x y z");
-ConVar vr_auto_switch_primary_controller("vr_auto_switch_primary_controller", true, FCVAR_NONE);
-ConVar vr_fake_camera_movement("vr_fake_camera_movement", false, FCVAR_NONE);
-ConVar vr_fake_controller_movement("vr_fake_controller_movement", false, FCVAR_NONE);
-ConVar vr_reset_fake_camera_movement("vr_reset_fake_camera_movement");
-ConVar vr_noclip_walk_speed("vr_noclip_walk_speed", 4.0f, FCVAR_NONE);
-ConVar vr_noclip_sprint_speed("vr_noclip_sprint_speed", 20.0f, FCVAR_NONE);
-ConVar vr_noclip_crouch_speed("vr_noclip_crouch_speed", 1.0f, FCVAR_NONE);
-ConVar vr_mousespeed("vr_mousespeed", 0.18f, FCVAR_NONE);
-
-ConVar vr_console_overlay("vr_console_overlay", false, FCVAR_NONE);
-ConVar vr_console_overlay_x("vr_console_overlay_x", -0.3f, FCVAR_NONE);
-ConVar vr_console_overlay_y("vr_console_overlay_y", 0.2f, FCVAR_NONE);
-ConVar vr_console_overlay_z("vr_console_overlay_z", 0.75f, FCVAR_NONE);
-
-ConVar vr_showkeyboard("vr_showkeyboard");
-ConVar vr_hidekeyboard("vr_hidekeyboard");
-
-ConVar vr_debug_controllers("vr_debug_controllers", false, FCVAR_NONE);
-
-ConVar vr_debug_rendermodel_name("vr_debug_rendermodel_name", "generic_hmd", FCVAR_NONE);
-ConVar vr_debug_rendermodel_scale("vr_debug_rendermodel_scale", 1.0f, FCVAR_NONE);
-ConVar vr_debug_rendermodel_component_name("vr_debug_rendermodel_component_name", "button", FCVAR_NONE);
-
-ConVar vr_head_rendermodel_name("vr_head_rendermodel_name", "generic_hmd", FCVAR_NONE,
-                                "name of the model to use for the hmd in spectator mode, see "
-                                "/<Steam>/steamapps/common/SteamVR/resources/rendermodels/ for all available models");
-ConVar vr_head_rendermodel_scale("vr_head_rendermodel_scale", 1.0f, FCVAR_NONE);
-ConVar vr_head_rendermodel_brightness("vr_head_rendermodel_brightness", 1.5f, FCVAR_NONE);
-/*
-ConVar vr_head_image_scale("vr_head_image_scale", 0.55f, FCVAR_NONE);
-ConVar vr_head_translation("vr_head_translation", -0.12f, FCVAR_NONE);
-*/
-
-OpenVRInterface *openvr = NULL;
-
-#if defined(MCENGINE_FEATURE_OPENVR)
-
-std::string OpenVRInterface::getTrackedDeviceString(vr::IVRSystem *pHmd, vr::TrackedDeviceIndex_t unDevice,
-                                                    vr::TrackedDeviceProperty prop, vr::TrackedPropertyError *peError) {
-    uint32_t unRequiredBufferLen = pHmd->GetStringTrackedDeviceProperty(unDevice, prop, NULL, 0, peError);
-    if(unRequiredBufferLen == 0) return "";
-
-    char *pchBuffer = new char[unRequiredBufferLen];
-    unRequiredBufferLen = pHmd->GetStringTrackedDeviceProperty(unDevice, prop, pchBuffer, unRequiredBufferLen, peError);
-    std::string sResult = pchBuffer;
-    delete[] pchBuffer;
-    return sResult;
-}
-
-Matrix4 OpenVRInterface::convertSteamVRMatrixToMatrix4(const vr::HmdMatrix34_t &matPose) {
-    Matrix4 matrixObj(matPose.m[0][0], matPose.m[1][0], matPose.m[2][0], 0.0, matPose.m[0][1], matPose.m[1][1],
-                      matPose.m[2][1], 0.0, matPose.m[0][2], matPose.m[1][2], matPose.m[2][2], 0.0, matPose.m[0][3],
-                      matPose.m[1][3], matPose.m[2][3], 1.0f);
-    return matrixObj;
-}
-
-vr::Hmd_Eye OpenVRInterface::eyeToOpenVR(OpenVRInterface::EYE eye) {
-    if(eye == OpenVRInterface::EYE::EYE_LEFT)
-        return vr::Hmd_Eye::Eye_Left;
-    else
-        return vr::Hmd_Eye::Eye_Right;
-}
-
-#endif
-
-OpenVRInterface::OpenVRInterface() {
-    openvr = this;
-
-    m_bReady = false;
-    m_bIsKeyboardVisible = false;
-
-    m_drawCallback = NULL;
-
-    // controllers
-    m_controllerLeft = NULL;
-    m_controllerRight = NULL;
-    m_controller = NULL;
-
-    m_controllerColorOverride = 0xff000000;
-
-    // rendertargets
-    m_leftEye = NULL;
-    m_rightEye = NULL;
-    m_compositorEye1 = NULL;
-    m_compositorEye2 = NULL;
-    m_debugOverlay = NULL;
-
-    // shaders
-    m_renderModelShader = NULL;
-    m_controllerAxisShader = NULL;
-    m_genericTexturedShader = NULL;
-    m_genericUntexturedShader = NULL;
-
-    m_vPlayAreaSize = Vector2(2, 2);
-    m_playAreaRect.corners[0] = Vector3(m_vPlayAreaSize.x / 2.0f, 0, -m_vPlayAreaSize.y / 2.0f);
-    m_playAreaRect.corners[1] = Vector3(-m_vPlayAreaSize.x / 2.0f, 0, -m_vPlayAreaSize.y / 2.0f);
-    m_playAreaRect.corners[2] = Vector3(-m_vPlayAreaSize.x / 2.0f, 0, m_vPlayAreaSize.y / 2.0f);
-    m_playAreaRect.corners[3] = Vector3(m_vPlayAreaSize.x / 2.0f, 0, m_vPlayAreaSize.y / 2.0f);
-
-    // debugging
-    m_fakeCamera = NULL;
-    m_bCaptureMouse = false;
-    m_bWDown = false;
-    m_bADown = false;
-    m_bSDown = false;
-    m_bDDown = false;
-    m_bShiftDown = false;
-    m_bCtrlDown = false;
-    m_bIsSpectatorDraw = false;
-
-#if !defined(MCENGINE_FEATURE_OPENVR)
-
-    // initialize required stuff for non-VR builds
-
-    m_controllerLeft = new OpenVRController();
-    m_controllerRight = new OpenVRController();
-    m_controller = m_controllerRight;
-
-    return;  // note the early return here
-
-#endif
-
-    // initialize shared stuff which is the same across all VR runtimes, but which shouldn't/doesn't have to be
-    // initialized on non-vr builds
-
-    // TEMP:
-    // engine->getResourceManager()->loadImage("osu_blue.png", "vrhead", true);
-
-    // convar callbacks
-    vr_ss.setCallback(fastdelegate::MakeDelegate(this, &OpenVRInterface::onSSChange));
-    vr_ss_compositor.setCallback(fastdelegate::MakeDelegate(this, &OpenVRInterface::onSSCompositorChange));
-    vr_compositor_submit_double.setCallback(
-        fastdelegate::MakeDelegate(this, &OpenVRInterface::onCompositorSubmitDoubleChange));
-    vr_aa.setCallback(fastdelegate::MakeDelegate(this, &OpenVRInterface::onAAChange));
-    vr_background_brightness.setCallback(
-        fastdelegate::MakeDelegate(this, &OpenVRInterface::onBackgroundBrightnessChange));
-    vr_head_rendermodel_name.setCallback(fastdelegate::MakeDelegate(this, &OpenVRInterface::onHeadRenderModelChange));
-    vr_showkeyboard.setCallback(fastdelegate::MakeDelegate(this, &OpenVRInterface::showKeyboard));
-    vr_hidekeyboard.setCallback(fastdelegate::MakeDelegate(this, &OpenVRInterface::hideKeyboard));
-    vr_reset_fake_camera_movement.setCallback(
-        fastdelegate::MakeDelegate(this, &OpenVRInterface::resetFakeCameraMovement));
-    vr_spectator_camera_position.setCallback(
-        fastdelegate::MakeDelegate(this, &OpenVRInterface::onSpectatorCameraPositionChange));
-    vr_spectator_camera_rotation.setCallback(
-        fastdelegate::MakeDelegate(this, &OpenVRInterface::onSpectatorCameraRotationChange));
-
-    // debugging
-    m_fakeCamera = new Camera();
-
-    // custom
-    m_bSteamVRBugWorkaroundCompositorSSChangeAllowed = true;
-    m_fPrevSSMultiplier = vr_ss.getFloat();
-    m_fCompositorSSMultiplier = vr_ss_compositor.getFloat();
-    m_fPrevAA = vr_aa.getFloat();
-
-#if defined(MCENGINE_FEATURE_OPENVR)
-
-    // initialize controllers
-    m_controllerLeft = new OpenVRController(NULL, OpenVRController::ROLE::ROLE_LEFTHAND);
-    m_controllerRight = new OpenVRController(NULL, OpenVRController::ROLE::ROLE_RIGHTHAND);
-    m_controller = m_controllerRight;
-
-    m_pHMD = NULL;
-    m_iTrackedControllerCount = 0;
-    m_iValidPoseCount = 0;
-    m_strPoseClasses = "";
-
-    m_pRenderModels = NULL;
-    m_headRenderModel = NULL;
-
-    m_glControllerVertBuffer = 0;
-    m_unControllerVAO = 0;
-
-    memset(m_rDevClassChar, 0, sizeof(m_rDevClassChar));
-
-    /// return;
-    if(engine->getArgs().length() > 0 && engine->getArgs().find("novr") != -1) return;
-
-#ifdef MCENGINE_FEATURE_DIRECTX11
-
-    if(dynamic_cast<DirectX11Interface *>(engine->getGraphics()) != NULL) return;
-
-#endif
-
-    // check if openvr runtime is installed
-    if(!vr::VR_IsRuntimeInstalled()) {
-        engine->showMessageWarning("OpenVR Warning",
-                                   "OpenVR runtime is not installed!\nProceeding without VR support ...");
-        return;
-    }
-
-    // load openvr runtime
-    debugLog("OpenVR: Loading OpenVR runtime ...\n");
-    vr::EVRInitError eError = vr::VRInitError_None;
-    m_pHMD = vr::VR_Init(&eError, vr::VRApplication_Scene);
-    if(eError != vr::VRInitError_None) {
-        m_pHMD = NULL;
-
-        if(eError == vr::VRInitError_Init_HmdNotFound || eError == vr::VRInitError_Init_HmdNotFoundPresenceFailed) {
-            engine->showMessageInfo("OpenVR",
-                                    "Couldn't find HMD, if you want to play in VR then please connect your headset and "
-                                    "restart the engine!");
-            return;
-        }
-
-        char buf[1024];
-        memset(buf, '\0', 1024);
-        snprintf(buf, sizeof(buf), "%s", vr::VR_GetVRInitErrorAsEnglishDescription(eError));
-        engine->showMessageError("OpenVR Error", UString::format("Couldn't VR_Init() (%s)", buf));
-        return;
-    }
-
-    // set controller hmd
-    m_controllerLeft->setHmd(m_pHMD);
-    m_controllerRight->setHmd(m_pHMD);
-
-    // get render model interface
-    debugLog("OpenVR: Getting render model interface ...\n");
-    m_pRenderModels = (vr::IVRRenderModels *)vr::VR_GetGenericInterface(vr::IVRRenderModels_Version, &eError);
-    if(!m_pRenderModels) {
-        m_pHMD = NULL;
-        vr::VR_Shutdown();
-
-        char buf[1024];
-        memset(buf, '\0', 1024);
-        snprintf(buf, sizeof(buf), "Unable to get render model interface: %s",
-                 vr::VR_GetVRInitErrorAsEnglishDescription(eError));
-        engine->showMessageError("OpenVR Error", UString::format("Couldn't VR_GetGenericInterface() (%s)", buf));
-        return;
-    }
-
-    // initialize renderer
-    debugLog("OpenVR: Initializing renderer ...\n");
-    if(!initRenderer()) {
-        engine->showMessageError("OpenVR Error", "Couldn't initialize renderer!");
-        return;
-    }
-
-    // initialize compositor
-    debugLog("OpenVR: Initializing compositor ...\n");
-    if(!initCompositor()) {
-        engine->showMessageError("OpenVR Error", "Couldn't initialize VRCompositor()!");
-        return;
-    }
-
-    // initialize play area metrics
-    updatePlayAreaMetrics();
-
-    // get device strings
-    m_sTrackingSystemName = "No Driver";
-    m_strDisplay = "No Display";
-    m_sTrackingSystemName = UString::format(
-        "%s",
-        getTrackedDeviceString(m_pHMD, vr::k_unTrackedDeviceIndex_Hmd, vr::Prop_TrackingSystemName_String).c_str());
-    m_strDisplay = getTrackedDeviceString(m_pHMD, vr::k_unTrackedDeviceIndex_Hmd, vr::Prop_SerialNumber_String);
-    debugLog("OpenVR: driver = %s, display = %s\n", m_sTrackingSystemName.toUtf8(), m_strDisplay.c_str());
-
-    // debugging
-    // convar->getConVarByName("debug_shaders")->setValue(1.0f);
-    UString windowTitle = "McEngine VR - ";
-    windowTitle.append(m_sTrackingSystemName);
-    windowTitle.append(" ");
-    windowTitle.append(UString::format("%s", m_strDisplay.c_str()));
-    engine->getEnvironment()->setWindowTitle(windowTitle);
-
-    if(m_sTrackingSystemName == "null")  // autodetect SteamVR null driver when debugging
-    {
-        /// convar->getConVarByName("debug_shaders")->setValue(1.0f);
-        vr_fake_camera_movement.setValue(1.0f);
-        vr_console_overlay.setValue(1.0f);
-    }
-
-#endif
-
-    loadFakeCamera();
-
-    // listen to keyboard events for debug + spectator cam movement
-    engine->getKeyboard()->addListener(this);
-
-    // engine setting overrides
-    convar->getConVarByName("fps_unlimited")
-        ->setValue(1.0f);  // VR applications shouldn't depend on being in the foreground (e.g. SteamVR status window is
-                           // in foreground)
-    convar->getConVarByName("fps_max_background")->setValue(9999.0f);
-    convar->getConVarByName("ui_scrollview_resistance")
-        ->setValue(30.0f);  // makes clicking things in scrollviews a bit more consistent/usable
-
-    m_bReady = true;
-}
-
-OpenVRInterface::~OpenVRInterface() {
-    m_bReady = false;
-
-#if defined(MCENGINE_FEATURE_OPENVR)
-
-    // unload openvr runtime
-    if(m_pHMD) {
-        vr::VR_Shutdown();
-        m_pHMD = NULL;
-    }
-
-    // rendermodels
-    for(std::vector<CGLRenderModel *>::iterator i = m_vecRenderModels.begin(); i != m_vecRenderModels.end(); i++) {
-        delete(*i);
-    }
-    m_vecRenderModels.clear();
-
-    // vertex buffers
-    if(m_unControllerVAO != 0) glDeleteVertexArrays(1, &m_unControllerVAO);
-
-#endif
-
-    // controllers
-    SAFE_DELETE(m_controllerLeft);
-    SAFE_DELETE(m_controllerRight);
-    m_controller = NULL;
-
-    openvr = NULL;
-}
-
-bool OpenVRInterface::initRenderer() {
-    debugLog("OpenVRInterface::initRenderer()\n");
-    if(!initShaders()) return false;
-
-    initRenderTargets();
-    initRenderModels();
-
-    return true;
-}
-
-bool OpenVRInterface::initCompositor() {
-    debugLog("OpenVRInterface::initCompositor()\n");
-
-#if defined(MCENGINE_FEATURE_OPENVR)
-
-    return vr::VRCompositor();
-
-#else
-
-    return false;
-
-#endif
-}
-
-void OpenVRInterface::initRenderModels() {
-    debugLog("OpenVR: Creating rendermodels ...\n");
-
-#if defined(MCENGINE_FEATURE_OPENVR)
-
-    memset(m_rTrackedDeviceToRenderModel, 0, sizeof(m_rTrackedDeviceToRenderModel));
-    if(!m_pHMD) return;
-
-    for(uint32_t unTrackedDevice = vr::k_unTrackedDeviceIndex_Hmd + 1; unTrackedDevice < vr::k_unMaxTrackedDeviceCount;
-        unTrackedDevice++) {
-        if(!m_pHMD->IsTrackedDeviceConnected(unTrackedDevice)) continue;
-
-        updateRenderModelForTrackedDevice(unTrackedDevice);
-    }
-
-#endif
-}
-
-bool OpenVRInterface::initRenderTargets() {
-    debugLog("OpenVR: Creating/Updating rendertargets ...\n");
-
-    uint32_t recommendedRenderTargetWidth = 1;
-    uint32_t recommendedRenderTargetHeight = 1;
-
-#if defined(MCENGINE_FEATURE_OPENVR)
-
-    if(!m_pHMD) return false;
-
-    m_pHMD->GetRecommendedRenderTargetSize(&recommendedRenderTargetWidth, &recommendedRenderTargetHeight);
-
-#endif
-
-    uint32_t finalRenderTargetWidth = recommendedRenderTargetWidth * vr_ss.getFloat();
-    uint32_t finalRenderTargetHeight = recommendedRenderTargetHeight * vr_ss.getFloat();
-
-    uint32_t finalCompositorRenderTargetWidth = recommendedRenderTargetWidth * m_fCompositorSSMultiplier;
-    uint32_t finalCompositorRenderTargetHeight = recommendedRenderTargetHeight * m_fCompositorSSMultiplier;
-
-    // ensure that SteamVR doesn't shit itself due to too large submission textures >:(
-    // clamp to vr_compositor_texture_size_max, while keeping the aspect ratio
-    if(finalCompositorRenderTargetWidth > vr_compositor_texture_size_max.getInt() ||
-       finalCompositorRenderTargetHeight > vr_compositor_texture_size_max.getInt()) {
-        bool swapped = false;
-        if(finalCompositorRenderTargetHeight < finalCompositorRenderTargetWidth) {
-            swapped = true;
-            uint32_t temp = finalCompositorRenderTargetWidth;
-            finalCompositorRenderTargetWidth = finalCompositorRenderTargetHeight;
-            finalCompositorRenderTargetHeight = temp;
-        }
-
-        float aspectRatio = (float)finalCompositorRenderTargetWidth / (float)finalCompositorRenderTargetHeight;
-
-        finalCompositorRenderTargetHeight = vr_compositor_texture_size_max.getInt();
-        finalCompositorRenderTargetWidth = (uint32_t)(aspectRatio * (float)finalCompositorRenderTargetHeight);
-
-        // swap back if necessary
-        if(swapped) {
-            uint32_t temp = finalCompositorRenderTargetWidth;
-            finalCompositorRenderTargetWidth = finalCompositorRenderTargetHeight;
-            finalCompositorRenderTargetHeight = temp;
-        }
-    }
-
-    debugLog("OpenVR: Recommended RenderTarget size = (%i, %i) x %g, final Engine RenderTarget size = (%i, %i)\n",
-             recommendedRenderTargetWidth, recommendedRenderTargetHeight, vr_ss.getFloat(), finalRenderTargetWidth,
-             finalRenderTargetHeight);
-    debugLog("OpenVR: Compositor RenderTarget size = (%i, %i) x %g, final Compositor RenderTarget size = (%i, %i)\n",
-             recommendedRenderTargetWidth, recommendedRenderTargetHeight, m_fCompositorSSMultiplier,
-             finalCompositorRenderTargetWidth, finalCompositorRenderTargetHeight);
-
-    Graphics::MULTISAMPLE_TYPE multisampleType = Graphics::MULTISAMPLE_TYPE::MULTISAMPLE_0X;
-    if(vr_aa.getInt() > 8)
-        multisampleType = Graphics::MULTISAMPLE_TYPE::MULTISAMPLE_16X;
-    else if(vr_aa.getInt() > 4)
-        multisampleType = Graphics::MULTISAMPLE_TYPE::MULTISAMPLE_8X;
-    else if(vr_aa.getInt() > 2)
-        multisampleType = Graphics::MULTISAMPLE_TYPE::MULTISAMPLE_4X;
-    else if(vr_aa.getInt() > 0)
-        multisampleType = Graphics::MULTISAMPLE_TYPE::MULTISAMPLE_2X;
-
-    Color clearColor =
-        COLORf(0.0f, vr_background_brightness.getFloat(), vr_background_brightness.getFloat(),
-               vr_background_brightness.getFloat() + (vr_background_brightness.getFloat() > 0.0f ? 0.03f : 0.0f));
-
-    // both eyes
-    if(m_leftEye == NULL) {
-        m_leftEye = engine->getResourceManager()->createRenderTarget(finalRenderTargetWidth, finalRenderTargetHeight,
-                                                                     multisampleType);
-        m_leftEye->setClearColorOnDraw(true);
-        m_leftEye->setClearDepthOnDraw(true);
-        m_leftEye->setClearColor(clearColor);
-    } else
-        m_leftEye->rebuild(finalRenderTargetWidth, finalRenderTargetHeight, multisampleType);
-
-    if(m_rightEye == NULL) {
-        m_rightEye = engine->getResourceManager()->createRenderTarget(finalRenderTargetWidth, finalRenderTargetHeight,
-                                                                      multisampleType);
-        m_rightEye->setClearColorOnDraw(true);
-        m_rightEye->setClearDepthOnDraw(true);
-        m_rightEye->setClearColor(clearColor);
-    } else
-        m_rightEye->rebuild(finalRenderTargetWidth, finalRenderTargetHeight, multisampleType);
-
-    // compositor temporary (for dynamic ss)
-    if(m_compositorEye1 == NULL)
-        m_compositorEye1 = engine->getResourceManager()->createRenderTarget(finalCompositorRenderTargetWidth,
-                                                                            finalCompositorRenderTargetHeight);
-    else if(m_bSteamVRBugWorkaroundCompositorSSChangeAllowed)
-        m_compositorEye1->rebuild(finalCompositorRenderTargetWidth, finalCompositorRenderTargetHeight);
-
-    if(vr_compositor_submit_double.getBool()) {
-        if(m_compositorEye2 == NULL)
-            m_compositorEye2 = engine->getResourceManager()->createRenderTarget(finalCompositorRenderTargetWidth,
-                                                                                finalCompositorRenderTargetHeight);
-        else if(m_bSteamVRBugWorkaroundCompositorSSChangeAllowed)
-            m_compositorEye2->rebuild(finalCompositorRenderTargetWidth, finalCompositorRenderTargetHeight);
-    }
-
-    // engine overlay
-    if(m_debugOverlay == NULL) {
-        m_debugOverlay =
-            engine->getResourceManager()->createRenderTarget(engine->getScreenWidth(), engine->getScreenHeight());
-        m_debugOverlay->setClearColorOnDraw(true);
-    }
-
-    return true;
-}
-
-bool OpenVRInterface::initShaders() {
-    m_genericTexturedShader = engine->getResourceManager()->createShader(
-
-        // vertex Shader
-        "#version 110\n"
-        "uniform mat4 matrix;\n"
-        "varying vec2 texCoords;\n"
-        "void main()\n"
-        "{\n"
-        "	texCoords = gl_MultiTexCoord0.xy;\n"
-        "	gl_Position = matrix * gl_Vertex;\n"
-        "}\n",
-
-        // fragment Shader
-        "#version 110\n"
-        "uniform sampler2D mytexture;\n"
-        "varying vec2 texCoords;\n"
-        "void main()\n"
-        "{\n"
-        "   gl_FragColor = texture2D(mytexture, texCoords);\n"
-        "}\n");
-
-    m_genericUntexturedShader = engine->getResourceManager()->createShader(
-
-        // vertex Shader
-        "#version 110\n"
-        "uniform mat4 matrix;\n"
-        "void main()\n"
-        "{\n"
-        "	gl_Position = matrix * gl_Vertex;\n"
-        " 	gl_FrontColor = gl_Color;"
-        "}\n",
-
-        // fragment Shader
-        "#version 110\n"
-        "void main()\n"
-        "{\n"
-        "   gl_FragColor = gl_Color;\n"
-        "}\n");
-
-    m_controllerAxisShader = engine->getResourceManager()->createShader(
-
-        // vertex shader
-        "#version 410\n"
-        "uniform mat4 matrix;\n"
-        "layout(location = 0) in vec4 position;\n"
-        "layout(location = 1) in vec3 v3ColorIn;\n"
-        "out vec4 v4Color;\n"
-        "void main()\n"
-        "{\n"
-        "	v4Color.xyz = v3ColorIn; v4Color.a = 1.0;\n"
-        "	gl_Position = matrix * position;\n"
-        "}\n",
-
-        // fragment shader
-        "#version 410\n"
-        "in vec4 v4Color;\n"
-        "out vec4 outputColor;\n"
-        "void main()\n"
-        "{\n"
-        "   outputColor = v4Color;\n"
-        "}\n");
-
-    m_renderModelShader = engine->getResourceManager()->createShader(
-
-        // vertex shader
-        "#version 410\n"
-        "uniform mat4 matrix;\n"
-        "layout(location = 0) in vec4 position;\n"
-        "layout(location = 1) in vec3 v3NormalIn;\n"
-        "layout(location = 2) in vec2 v2TexCoordsIn;\n"
-        "out vec2 v2TexCoord;\n"
-        "void main()\n"
-        "{\n"
-        "	v2TexCoord = v2TexCoordsIn;\n"
-        "	gl_Position = matrix * vec4(position.xyz, 1);\n"
-        "}\n",
-
-        // fragment shader
-        "#version 410 core\n"
-        "uniform float brightness;\n"
-        "uniform vec3 colorOverride;\n"
-        "uniform sampler2D diffuse;\n"
-        "in vec2 v2TexCoord;\n"
-        "out vec4 outputColor;\n"
-        "void main()\n"
-        "{\n"
-        "   outputColor = texture(diffuse, v2TexCoord);\n"
-        "	outputColor.rgb *= brightness;\n"
-        "	float overrideMultiplier = (1.0f - colorOverride.x) * (1.0f - colorOverride.y) * (1.0f - "
-        "colorOverride.z);\n"
-        "	outputColor.r = outputColor.r * overrideMultiplier + colorOverride.x;\n"
-        "	outputColor.g = outputColor.g * overrideMultiplier + colorOverride.y;\n"
-        "	outputColor.b = outputColor.b * overrideMultiplier + colorOverride.z;\n"
-        "}\n");
-
-    return m_genericTexturedShader->isReady() && m_controllerAxisShader->isReady() && m_renderModelShader->isReady();
-}
-
-void OpenVRInterface::draw(Graphics *g) {
-    if(!m_bReady) return;
-
-#ifdef MCENGINE_FEATURE_OPENVR
-
-    if(m_pHMD == NULL) return;
-
-#endif
-
-    if(!updateMatrixPoses()) return;
-
-        // debug
-#ifdef MCENGINE_FEATURE_OPENVR
-
-    if(vr_debug_controllers.getBool()) updateControllerAxes();
-
-#endif
-
-    // draw 2d debug overlay
-    if(vr_console_overlay.getBool()) {
-        m_debugOverlay->enable();
-        { engine->getGUI()->draw(g); }
-        m_debugOverlay->disable();
-    }
-
-    // draw everything
-    g->setDepthBuffer(true);
-    { renderStereoTargets(g); }
-    g->setDepthBuffer(false);
-
-    // viewer window (without spectator mode)
-    if(!vr_spectator_mode.getBool() && vr_draw_hmd_to_window.getBool()) renderStereoToWindow(g);
-
-#ifdef MCENGINE_FEATURE_OPENGL
-
-    // push to hmd
-    // only OpenGL is supported atm
-    OpenGLRenderTarget *glLeftEye = dynamic_cast<OpenGLRenderTarget *>(m_leftEye);
-    OpenGLRenderTarget *glRightEye = dynamic_cast<OpenGLRenderTarget *>(m_rightEye);
-    OpenGLRenderTarget *glCompositorEye1 = dynamic_cast<OpenGLRenderTarget *>(m_compositorEye1);
-    OpenGLRenderTarget *glCompositorEye2 =
-        m_compositorEye2 != NULL ? dynamic_cast<OpenGLRenderTarget *>(m_compositorEye2) : NULL;
-    if(glLeftEye != NULL && glRightEye != NULL && glCompositorEye1 != NULL) {
-        // there are no words for how angry I am having to do supersampling like this >:(
-        // at least it only costs memory and not extra time
-
-        const bool submitDouble = vr_compositor_submit_double.getBool() && glCompositorEye2 != NULL;
-
-        // blit left
-        if(glLeftEye->isMultiSampled())
-            glLeftEye->blitResolveFrameBufferIntoFrameBuffer(glCompositorEye1);
-        else
-            glLeftEye->blitFrameBufferIntoFrameBuffer(glCompositorEye1);
-
-        // blit right double
-        if(submitDouble) {
-            if(glRightEye->isMultiSampled())
-                glRightEye->blitResolveFrameBufferIntoFrameBuffer(glCompositorEye2);
-            else
-                glRightEye->blitFrameBufferIntoFrameBuffer(glCompositorEye2);
-        }
-
-        // submit left
-#if defined(MCENGINE_FEATURE_OPENVR)
-
-        vr::Texture_t leftEyeTexture = {(void *)glCompositorEye1->getRenderTexture(),
-                                        vr::ETextureType::TextureType_OpenGL, vr::EColorSpace::ColorSpace_Gamma};
-        vr::EVRCompositorError res = vr::VRCompositor()->Submit(vr::Eye_Left, &leftEyeTexture);
-
-        if(res != vr::EVRCompositorError::VRCompositorError_None)
-            debugLog("OpenVR Error: Compositor::Submit(Eye_Left) error %i!!!\n", (int)res);
-
-#endif
-
-        // blit right
-        if(!submitDouble) {
-            if(glRightEye->isMultiSampled())
-                glRightEye->blitResolveFrameBufferIntoFrameBuffer(glCompositorEye1);
-            else
-                glRightEye->blitFrameBufferIntoFrameBuffer(glCompositorEye1);
-        }
-
-        // submit right (double)
-#if defined(MCENGINE_FEATURE_OPENVR)
-
-        vr::Texture_t rightEyeTexture = {
-            (void *)(submitDouble ? glCompositorEye2->getRenderTexture() : glCompositorEye1->getRenderTexture()),
-            vr::ETextureType::TextureType_OpenGL, vr::EColorSpace::ColorSpace_Gamma};
-        res = vr::VRCompositor()->Submit(vr::Eye_Right, &rightEyeTexture);
-
-        if(res != vr::EVRCompositorError::VRCompositorError_None)
-            debugLog("OpenVR Error: Compositor::Submit(Eye_Right) error %i!!!\n", (int)res);
-
-        // from the OpenVR documentation:
-        // "If [Submit] called from an OpenGL app, consider adding a glFlush after submitting both frames to signal the
-        // driver to start processing, otherwise it may wait until the command buffer fills up, causing the app to miss
-        // frames"
-        g->flush();
-
-#endif
-
-        m_bSteamVRBugWorkaroundCompositorSSChangeAllowed =
-            false;  // we can no longer change the texture size, after the first submit
-    }
-
-#endif
-
-    // spectator mode
-    if(vr_spectator_mode.getBool()) {
-        g->setDepthBuffer(true);
-        { renderSpectatorTarget(g, m_leftEye); }
-        g->setDepthBuffer(false);
-    }
-
-    // viewer window (with spectator mode)
-    if(vr_spectator_mode.getBool() && vr_draw_hmd_to_window.getBool()) renderStereoToWindow(g);
-}
-
-void OpenVRInterface::renderScene(Graphics *g, OpenVRInterface::EYE eye) {
-    Matrix4 matCurrentEye = getCurrentEyePosMatrix(eye);
-    Matrix4 matCurrentM = m_mat4HMDPose;
-    Matrix4 matCurrentP = getCurrentProjectionMatrix(eye);
-    Matrix4 matCurrentVP = getCurrentViewProjectionMatrix(eye);
-    Matrix4 matCurrentMVP = matCurrentVP * matCurrentM;
-
-    // allow debug position/rotation overrides on the matrices (if not in spectator mode)
-    if(vr_fake_camera_movement.getBool() && !vr_spectator_mode.getBool()) {
-        Matrix4 translation;
-        translation.translate(m_fakeCamera->getPos());
-        matCurrentM = matCurrentM * m_fakeCamera->getRotation().getMatrix() * translation;
-        matCurrentMVP = matCurrentMVP * m_fakeCamera->getRotation().getMatrix() * translation;
-    }
-
-    renderScene(g, matCurrentEye, matCurrentM, matCurrentP, matCurrentVP, matCurrentMVP);
-}
-
-void OpenVRInterface::renderScene(Graphics *g, Matrix4 &matCurrentEye, Matrix4 &matCurrentM, Matrix4 &matCurrentP,
-                                  Matrix4 &matCurrentVP, Matrix4 &matCurrentMVP) {
-    // set current matrices
-    m_matCurrentM = matCurrentM;
-    m_matCurrentVP = matCurrentVP;
-    m_matCurrentMVP = matCurrentMVP;
-
-    // OpenVR/SteamVR rendermodels
-#ifdef MCENGINE_FEATURE_OPENVR
-
-    // TODO: render stencil mesh
-    /*
-    g->pushStencil();
-    g->setCulling(false);
-    {
-            vr::HiddenAreaMesh_t hiddenAreaMesh = m_pHMD->GetHiddenAreaMesh(eye);
-            if (hiddenAreaMesh.unTriangleCount > 0 && hiddenAreaMesh.pVertexData != NULL)
-            {
-                    VertexArrayObject vao;
-                    for (int i=0; i<hiddenAreaMesh.unTriangleCount*3; i++)
-                    {
-                            vao.addVertex(hiddenAreaMesh.pVertexData[i].v[0], hiddenAreaMesh.pVertexData[i].v[1]);
-                    }
-                    g->drawVAO(&vao);
-            }
-    }
-    g->fillStencil(false);
-    ///g->setCulling(true);
-    */
-
-#ifndef MCENGINE_USE_SYSTEM_OPENVR
-    // debug controllers
-    const bool bIsInputCapturedByAnotherProcess = m_pHMD->IsInputFocusCapturedByAnotherProcess();
-    if(vr_debug_controllers.getBool()) {
-        if(!bIsInputCapturedByAnotherProcess) {
-            m_controllerAxisShader->enable();
-            {
-                m_controllerAxisShader->setUniformMatrix4fv("matrix", m_matCurrentMVP);
-                glBindVertexArray(m_unControllerVAO);
-                { glDrawArrays(GL_LINES, 0, m_uiControllerVertcount); }
-                glBindVertexArray(0);
-            }
-            m_controllerAxisShader->disable();
-        }
-    }
-#else
-    // TODO: why is this API missing from latest openvr?
-    const bool bIsInputCapturedByAnotherProcess = false;
-#endif
-
-    // internal rendermodel rendering (all connected tracked devices which have models)
-    m_renderModelShader->enable();
-    {
-        for(uint32_t unTrackedDevice = 0; unTrackedDevice < vr::k_unMaxTrackedDeviceCount; unTrackedDevice++) {
-            if(!m_rTrackedDeviceToRenderModel[unTrackedDevice]) continue;
-
-            const vr::TrackedDevicePose_t &pose = m_rTrackedDevicePose[unTrackedDevice];
-            if(!pose.bPoseIsValid) continue;
-
-            vr::ETrackedDeviceClass trackedDeviceClass = m_pHMD->GetTrackedDeviceClass(unTrackedDevice);
-
-            if((bIsInputCapturedByAnotherProcess || !vr_draw_controller_models.getBool()) &&
-               trackedDeviceClass == vr::TrackedDeviceClass_Controller)
-                continue;
-
-            if(!vr_draw_lighthouse_models.getBool() && trackedDeviceClass != vr::TrackedDeviceClass_Controller)
-                continue;
-
-            const Matrix4 &matDeviceToTracking = m_rmat4DevicePose[unTrackedDevice];
-            Matrix4 matMVP = m_matCurrentMVP * matDeviceToTracking;
-
-            m_renderModelShader->setUniformMatrix4fv("matrix", matMVP);
-
-            if(trackedDeviceClass == vr::TrackedDeviceClass_Controller) {
-                m_renderModelShader->setUniform1f("brightness",
-                                                  (trackedDeviceClass == vr::TrackedDeviceClass_Controller
-                                                       ? vr_controller_model_brightness_multiplier.getFloat()
-                                                       : 1.0f));
-                m_renderModelShader->setUniform3f("colorOverride", COLOR_GET_Rf(m_controllerColorOverride),
-                                                  COLOR_GET_Gf(m_controllerColorOverride),
-                                                  COLOR_GET_Bf(m_controllerColorOverride));
-            } else {
-                m_renderModelShader->setUniform1f("brightness", 1.0f);
-                m_renderModelShader->setUniform3f("colorOverride", 0.0f, 0.0f, 0.0f);
-            }
-
-            m_rTrackedDeviceToRenderModel[unTrackedDevice]->draw();
-        }
-    }
-    m_renderModelShader->disable();
-
-    // draw head rendermodel if in spectator mode/draw
-    if(m_bIsSpectatorDraw && vr_draw_head_model.getBool()) {
-        // lazy loading
-        if(m_headRenderModel == NULL) onHeadRenderModelChange("", vr_head_rendermodel_name.getString());
-
-        if(m_headRenderModel != NULL) {
-            m_renderModelShader->enable();
-            {
-                Matrix4 pose = m_mat4HMDPose;
-                Matrix4 scale;
-                scale.scale(vr_head_rendermodel_scale.getFloat());
-                Matrix4 finalMVP = m_matCurrentMVP * pose.invert() * scale;
-
-                m_renderModelShader->setUniformMatrix4fv("matrix", finalMVP);
-                m_renderModelShader->setUniform1f("brightness", vr_head_rendermodel_brightness.getFloat());
-                m_headRenderModel->draw();
-            }
-            m_renderModelShader->disable();
-        }
-    }
-
-    // TEMP:
-    /*
-    m_renderModelShader->enable();
-    {
-            Matrix4 translation;
-            translation.translate(0, 1, 0);
-            Matrix4 finalMVP = m_matCurrentMVP * translation;
-            Matrix4 tempCopy = m_mat4HMDPose;
-            Matrix4 tempScale;
-            tempScale.scale(vr_debug_rendermodel_scale.getFloat());
-            finalMVP = m_matCurrentMVP * tempCopy.invert() * tempScale;
-
-            m_renderModelShader->setUniformMatrix4fv("matrix", finalMVP);
-            m_renderModelShader->setUniform1f("brightness", 3.0f);
-
-            CGLRenderModel *lolwhat = findOrLoadRenderModel(vr_debug_rendermodel_name.getString().toUtf8());
-            if (lolwhat != NULL)
-            {
-                    //for (uint32_t i=0;
-    i<vr::VRRenderModels()->GetComponentCount(vr_debug_rendermodel_name.getString().toUtf8()); i++)
-                    //{
-                    //	char componentName[512];
-                    //	vr::VRRenderModels()->GetComponentName(vr_debug_rendermodel_name.getString().toUtf8(), i,
-    componentName, 512);
-                    //	debugLog("#%i = %s\n", i, componentName);
-                    //}
-                    vr::VRControllerState_t controllerState;
-                    vr::RenderModel_ControllerMode_State_t renderModelControllerModeState;
-                    vr::RenderModel_ComponentState_t componentState;
-                    vr::VRRenderModels()->GetComponentState(vr_debug_rendermodel_name.getString().toUtf8(),
-    vr_debug_rendermodel_component_name.getString().toUtf8(), &controllerState, &renderModelControllerModeState,
-    &componentState);
-
-
-                    m_renderModelShader->disable();
-                    m_genericUntexturedShader->enable();
-                    {
-                            Matrix4 componentWorldMatrix =
-    convertSteamVRMatrixToMatrix4(componentState.mTrackingToComponentLocal); Vector3 componentPos; componentPos.x =
-    componentWorldMatrix[12]; componentPos.y = componentWorldMatrix[13]; componentPos.z = componentWorldMatrix[14];
-
-                            Matrix4 componentMVP = finalMVP;
-
-                            m_genericUntexturedShader->setUniformMatrix4fv("matrix", componentMVP);
-
-                            VertexArrayObject vao(Graphics::PRIMITIVE::PRIMITIVE_LINES);
-                            vao.addVertex(componentPos.x, componentPos.y, componentPos.z);
-                            vao.addVertex(componentPos.x, componentPos.y + 0.1f, componentPos.z);
-
-                            g->setColor(0xff00ff00);
-                            g->drawVAO(&vao);
-                    }
-                    m_genericUntexturedShader->disable();
-                    m_renderModelShader->enable();
-
-
-                    lolwhat->draw();
-            }
-    }
-    m_renderModelShader->disable();
-    */
-    /*
-    for (uint32_t i=0; i<vr::VRRenderModels()->GetRenderModelCount(); i++)
-    {
-            char name[512];
-            vr::VRRenderModels()->GetRenderModelName(i, name, 512);
-            debugLog("#%i = %s\n", i, name);
-    }
-    */
-
-#endif
-
-    // draw
-    m_genericTexturedShader->enable();
-    {
-        m_genericTexturedShader->setUniformMatrix4fv("matrix", m_matCurrentMVP);
-
-        // main draw callback
-        if(m_drawCallback != NULL) m_drawCallback(g);
-
-        // TEMP:
-        /*
-        if (m_bIsSpectatorDraw)
-        {
-                m_genericTexturedShader->enable();
-                Matrix4 headRotation;
-                headRotation.rotateX(90.0f + 180.0f);
-                Matrix4 headTranslation;
-                headTranslation.translate(0, 0, vr_head_translation.getFloat());
-                Matrix4 headMatrix = headRotation * headTranslation * m_mat4HMDPose;
-                Matrix4 vrheadmatrix = m_matCurrentMVP * headMatrix.invert();
-                m_genericTexturedShader->setUniformMatrix4fv("matrix", vrheadmatrix);
-
-                Image *vrHeadImage = engine->getResourceManager()->getImage("vrhead");
-                vrHeadImage->bind();
-
-                VertexArrayObject ovao(Graphics::PRIMITIVE::PRIMITIVE_QUADS);
-
-                float width = 0.45f*vr_head_image_scale.getFloat();
-                float height = 0.45f*vr_head_image_scale.getFloat();
-
-                ovao.addTexcoord(0, 1);
-                ovao.addVertex(width/2.0f, 0.0f, height/2.0f);
-                ovao.addTexcoord(0, 0);
-                ovao.addVertex(width/2.0f, 0.0f, -height/2.0f);
-                ovao.addTexcoord(1, 0);
-                ovao.addVertex(-width/2.0f, 0.0f, -height/2.0f);
-                ovao.addTexcoord(1, 1);
-                ovao.addVertex(-width/2.0f, 0.0f, height/2.0f);
-
-                g->drawVAO(&ovao);
-        }
-        */
-
-        // draw engine debug gui
-        if(vr_console_overlay.getBool()) {
-            g->setDepthBuffer(false);
-            {
-                const float scaleFactor = 1.0f;
-                float aspectRatio = m_debugOverlay->getWidth() / m_debugOverlay->getHeight();
-
-                Matrix4 translation;
-                translation.translate(vr_console_overlay_x.getFloat() * scaleFactor,
-                                      vr_console_overlay_y.getFloat() * scaleFactor,
-                                      -vr_console_overlay_z.getFloat() * scaleFactor);
-                Matrix4 eyeViewProjectionMatrix = matCurrentEye * matCurrentP * translation;  // good enough for now
-                m_genericTexturedShader->setUniformMatrix4fv("matrix", eyeViewProjectionMatrix);
-
-                float x = 0;
-                float y = 0;
-                float width = aspectRatio * scaleFactor;
-                float height = 1.0f * scaleFactor;
-
-                VertexArrayObject vao;
-
-                vao.addTexcoord(0, 1);
-                vao.addVertex(x, y);
-
-                vao.addTexcoord(0, 0);
-                vao.addVertex(x, y - height);
-
-                vao.addTexcoord(1, 0);
-                vao.addVertex(x + width, y - height);
-
-                vao.addTexcoord(1, 0);
-                vao.addVertex(x + width, y - height);
-
-                vao.addTexcoord(1, 1);
-                vao.addVertex(x + width, y);
-
-                vao.addTexcoord(0, 1);
-                vao.addVertex(x, y);
-
-                m_debugOverlay->bind();
-                {
-                    g->setColor(0xffffffff);
-                    g->drawVAO(&vao);
-                }
-                m_debugOverlay->unbind();
-            }
-            g->setDepthBuffer(true);
-        }
-    }
-    m_genericTexturedShader->disable();
-
-    // g->popStencil();
-}
-
-void OpenVRInterface::renderStereoTargets(Graphics *g) {
-    // backup engine resolution
-    const Vector2 resolutionBackup = g->getResolution();
-
-    g->setAntialiasing(true);
-    {
-        // left Eye
-        {
-            g->onResolutionChange(m_leftEye->getSize());  // force renderer resolution
-            m_leftEye->enable();
-            { renderScene(g, OpenVRInterface::EYE::EYE_LEFT); }
-            m_leftEye->disable();
-        }
-
-        // right Eye
-        g->setAntialiasing(true);
-        {
-            g->onResolutionChange(m_rightEye->getSize());  // force renderer resolution
-            m_rightEye->enable();
-            { renderScene(g, OpenVRInterface::EYE::EYE_RIGHT); }
-            m_rightEye->disable();
-        }
-    }
-    g->setAntialiasing(false);
-
-    // restore engine resolution
-    g->onResolutionChange(resolutionBackup);
-}
-
-void OpenVRInterface::renderSpectatorTarget(Graphics *g, RenderTarget *rt) {
-    // backup engine resolution
-    Vector2 resolutionBackup = g->getResolution();
-
-    g->setAntialiasing(true);
-    {
-        g->onResolutionChange(rt->getSize());  // force renderer resolution
-        rt->enable();
-        {
-            Matrix4 matCurrentEye;
-            Matrix4 matCurrentM;
-            Matrix4 matCurrentP = getCurrentProjectionMatrix(OpenVRInterface::EYE::EYE_LEFT);
-            Matrix4 matCurrentVP = getCurrentViewProjectionMatrix(OpenVRInterface::EYE::EYE_LEFT);
-            Matrix4 matCurrentMVP;
-
-            Matrix4 translation;
-            translation.translate(m_fakeCamera->getPos());
-            matCurrentM = m_fakeCamera->getRotation().getMatrix() * translation;
-            matCurrentMVP = matCurrentVP * matCurrentM;
-
-            m_bIsSpectatorDraw = true;
-            { renderScene(g, matCurrentEye, matCurrentM, matCurrentP, matCurrentVP, matCurrentMVP); }
-            m_bIsSpectatorDraw = false;
-        }
-        rt->disable();
-    }
-    g->setAntialiasing(false);
-
-    // restore engine resolution
-    g->onResolutionChange(resolutionBackup);
-}
-
-void OpenVRInterface::renderStereoToWindow(Graphics *g) {
-    g->setBlending(false);
-    {
-        if(vr_draw_hmd_to_window.getBool()) {
-            if(vr_draw_hmd_to_window_draw_both_eyes.getBool()) {
-                m_leftEye->draw(g, 0, 0, engine->getScreenWidth() / 2, engine->getScreenHeight());
-                m_rightEye->draw(g, engine->getScreenWidth() / 2, 0, engine->getScreenWidth() / 2,
-                                 engine->getScreenHeight());
-            } else
-                m_leftEye->draw(g, 0, 0, engine->getScreenWidth(), engine->getScreenHeight());
-        }
-    }
-    g->setBlending(true);
-}
-
-void OpenVRInterface::update() {
-    if(!m_bReady) return;
-
-#if defined(MCENGINE_FEATURE_OPENVR)
-
-    // process openvr events
-    vr::VREvent_t event;
-    while(m_pHMD->PollNextEvent(&event, sizeof(event))) {
-        switch(event.eventType) {
-            case vr::VREvent_TrackedDeviceActivated: {
-                updateRenderModelForTrackedDevice(event.trackedDeviceIndex);
-                debugLog("OpenVR: Device %u attached. Setting up render model.\n", event.trackedDeviceIndex);
-            } break;
-            case vr::VREvent_TrackedDeviceDeactivated:
-                debugLog("OpenVR: Device %u detached.\n", event.trackedDeviceIndex);
-                break;
-            case vr::VREvent_TrackedDeviceUpdated:
-                debugLog("OpenVR: Device %u updated.\n", event.trackedDeviceIndex);
-                break;
-            case vr::VREvent_KeyboardCharInput:
-                debugLog("OpenVR::VREvent_KeyboardCharInput: %i, %i, %i, %i, %i, %i, %i, %i, userValue = %lu\n",
-                         (int)event.data.keyboard.cNewInput[0], (int)event.data.keyboard.cNewInput[1],
-                         (int)event.data.keyboard.cNewInput[2], (int)event.data.keyboard.cNewInput[3],
-                         (int)event.data.keyboard.cNewInput[4], (int)event.data.keyboard.cNewInput[5],
-                         (int)event.data.keyboard.cNewInput[6], (int)event.data.keyboard.cNewInput[7],
-                         event.data.keyboard.uUserValue);
-                break;
-            case vr::VREvent_KeyboardClosed:
-                m_bIsKeyboardVisible = false;
-                {
-                    char keyboardText[256];
-                    uint32_t numChars = vr::VROverlay()->GetKeyboardText(keyboardText, 256);
-                    debugLog("OpenVR::VREvent_KeyboardClosed got %i chars\n", numChars);
-                    for(uint32_t i = 0; i < numChars; i++) {
-                        engine->onKeyboardChar(keyboardText[i]);
-                    }
-                }
-                break;
-            case vr::VREvent_KeyboardDone:
-                debugLog("OpenVR::VREvent_KeyboardDone\n");
-                break;
-        }
-    }
-
-    // update controllers
-    for(vr::TrackedDeviceIndex_t unDevice = 0; unDevice < vr::k_unMaxTrackedDeviceCount; unDevice++) {
-        vr::VRControllerState_t state;
-        if(m_pHMD->GetControllerState(unDevice, &state, sizeof(state))) {
-            if(unDevice == m_pHMD->GetTrackedDeviceIndexForControllerRole(
-                               OpenVRController::roleIdToOpenVR(m_controllerLeft->getRole())))
-                m_controllerLeft->update(state.ulButtonPressed, state.ulButtonTouched, state.rAxis);
-            else if(unDevice == m_pHMD->GetTrackedDeviceIndexForControllerRole(
-                                    OpenVRController::roleIdToOpenVR(m_controllerRight->getRole())))
-                m_controllerRight->update(state.ulButtonPressed, state.ulButtonTouched, state.rAxis);
-        }
-    }
-    OpenVRController::STEAMVR_BUG_WORKAROUND_FLIPFLOP = !OpenVRController::STEAMVR_BUG_WORKAROUND_FLIPFLOP;
-
-#endif
-
-    // update play area metrics
-    updatePlayAreaMetrics();
-
-    // automatically switch primary/default controller on trigger/grip/thumbpad pressed (for games which only need 1
-    // controller)
-    if(vr_auto_switch_primary_controller.getBool()) {
-        if(m_controllerRight->getTrigger() > 0.3f ||
-           m_controllerRight->isButtonPressed(OpenVRController::BUTTON::BUTTON_GRIP) ||
-           m_controllerRight->isButtonPressed(OpenVRController::BUTTON::BUTTON_STEAMVR_TOUCHPAD))
-            m_controller = m_controllerRight;
-        else if(m_controllerLeft->getTrigger() > 0.3f ||
-                m_controllerLeft->isButtonPressed(OpenVRController::BUTTON::BUTTON_GRIP) ||
-                m_controllerLeft->isButtonPressed(OpenVRController::BUTTON::BUTTON_STEAMVR_TOUCHPAD))
-            m_controller = m_controllerLeft;
-    }
-
-    // movement override for debugging (and spectating)
-    if(vr_fake_camera_movement.getBool() || vr_spectator_mode.getBool()) {
-        // rotation
-        if(m_bCaptureMouse) {
-            Vector2 rawDelta = engine->getMouse()->getRawDelta();
-            if(rawDelta.x != 0.0f || rawDelta.y != 0.0f) {
-                m_fakeCamera->rotateX(rawDelta.y * vr_mousespeed.getFloat());
-                m_fakeCamera->rotateY(-rawDelta.x * vr_mousespeed.getFloat());
-            }
-            engine->getMouse()->setPos(engine->getScreenSize() - Vector2(2, 2));  // HACKHACK: works ok-ish for now
-        }
-
-        // translation
-        Vector3 velocity =
-            Vector3(((m_bADown ? 1 : 0) + (m_bDDown ? -1 : 0)), 0, -((m_bSDown ? 1 : 0) + (m_bWDown ? -1 : 0)));
-
-        if(velocity.x != 0.0f || velocity.z != 0.0f || velocity.z != 0.0f) {
-            velocity.normalize();
-            velocity *= engine->getFrameTime();
-            Vector3 camVelocity = m_fakeCamera->getNextPosition(velocity) - m_fakeCamera->getPos();
-
-            float speed = vr_noclip_walk_speed.getFloat();
-            if(m_bCtrlDown)
-                speed = vr_noclip_crouch_speed.getFloat();
-            else if(m_bShiftDown)
-                speed = vr_noclip_sprint_speed.getFloat();
-
-            camVelocity *= speed;
-            Vector3 nextPos = m_fakeCamera->getPos() + camVelocity;
-            m_fakeCamera->setPos(nextPos);
-        }
-
-        // fake controller
-        if(vr_fake_controller_movement.getBool()) {
-            m_controller->updateDebug(engine->getMouse()->isLeftDown() ? 1.0f : 0.0f);
-            m_controller->updateMatrixPoseDebug(-m_fakeCamera->getPos(), -m_fakeCamera->getViewDirection(),
-                                                m_fakeCamera->getViewUp(), -m_fakeCamera->getViewRight());
-        }
-
-        if(!engine->hasFocus() && m_bCaptureMouse) toggleFakeCameraMouseCapture();
-    }
-}
-
-void OpenVRInterface::onKeyDown(KeyboardEvent &e) {
-    if(!m_bReady) return;
-
-    if(m_bCaptureMouse) {
-        if(e == KEY_W) m_bWDown = true;
-        if(e == KEY_A) m_bADown = true;
-        if(e == KEY_S) m_bSDown = true;
-        if(e == KEY_D) m_bDDown = true;
-        if(e == KEY_SHIFT) m_bShiftDown = true;
-        if(e == KEY_CONTROL) m_bCtrlDown = true;
-
-        e.consume();
-    }
-
-    // toggle fake camera on ALT + C
-    if(e == KEY_C && engine->getKeyboard()->isAltDown()) toggleFakeCameraMouseCapture();
-
-    // always release fake camera mouse capture on ESC
-    if(e == KEY_ESCAPE && m_bCaptureMouse) toggleFakeCameraMouseCapture();
-}
-
-void OpenVRInterface::onKeyUp(KeyboardEvent &e) {
-    if(!m_bReady) return;
-
-    if(e == KEY_W) m_bWDown = false;
-    if(e == KEY_A) m_bADown = false;
-    if(e == KEY_S) m_bSDown = false;
-    if(e == KEY_D) m_bDDown = false;
-    if(e == KEY_SHIFT) m_bShiftDown = false;
-    if(e == KEY_CONTROL) m_bCtrlDown = false;
-
-    if(m_bCaptureMouse) e.consume();
-}
-
-void OpenVRInterface::onChar(KeyboardEvent &e) {
-    if(m_bCaptureMouse) e.consume();
-}
-
-void OpenVRInterface::onResolutionChange(Vector2 newResolution) {
-    if(!m_bReady) return;
-
-#if defined(MCENGINE_FEATURE_OPENVR)
-
-    m_debugOverlay->rebuild(newResolution.x, newResolution.y);
-
-#endif
-}
-
-void OpenVRInterface::showKeyboardEx(UString description, UString text) {
-    if(!m_bReady || m_bIsKeyboardVisible) return;
-
-#if defined(MCENGINE_FEATURE_OPENVR)
-
-#ifdef MCENGINE_USE_SYSTEM_OPENVR
-    vr::EVROverlayError res =
-        vr::VROverlay()->ShowKeyboard(vr::EGamepadTextInputMode::k_EGamepadTextInputModeNormal,
-                                      vr::EGamepadTextInputLineMode::k_EGamepadTextInputLineModeSingleLine, 0,
-                                      description.toUtf8(), 256, text.toUtf8(), false);
-#else
-    vr::EVROverlayError res =
-        vr::VROverlay()->ShowKeyboard(vr::EGamepadTextInputMode::k_EGamepadTextInputModeNormal,
-                                      vr::EGamepadTextInputLineMode::k_EGamepadTextInputLineModeSingleLine,
-                                      description.toUtf8(), 256, text.toUtf8(), false, 0);
-#endif
-
-    if(res != vr::EVROverlayError::VROverlayError_None)
-        debugLog("OpenVR Error: VROverlay::ShowKeyboard() error %i!!!\n", (int)res);
-    else
-        m_bIsKeyboardVisible = true;
-
-#endif
-}
-
-void OpenVRInterface::hideKeyboard() {
-    if(!m_bReady || !m_bIsKeyboardVisible) return;
-
-#ifdef MCENGINE_FEATURE_OPENVR
-
-    vr::VROverlay()->HideKeyboard();
-
-    m_bIsKeyboardVisible = false;
-
-#endif
-}
-
-void OpenVRInterface::updatePlayAreaMetrics() {
-    if(!m_bReady) return;
-
-#ifdef MCENGINE_FEATURE_OPENVR
-
-    float playAreaSizeX = 0.0f;
-    float playAreaSizeZ = 0.0f;
-    if(vr::VRChaperone()->GetPlayAreaSize(&playAreaSizeX, &playAreaSizeZ)) {
-        m_vPlayAreaSize.x = playAreaSizeX;
-        m_vPlayAreaSize.y = playAreaSizeZ;
-    }
-
-    vr::HmdQuad_t corners;
-    if(vr::VRChaperone()->GetPlayAreaRect(&corners)) {
-        for(int i = 0; i < 4; i++) {
-            m_playAreaRect.corners[i] =
-                Vector3(corners.vCorners[i].v[0], corners.vCorners[i].v[1], corners.vCorners[i].v[2]);
-        }
-    }
-
-#endif
-}
-
-void OpenVRInterface::resetFakeCameraMovement() {
-    if(!m_bReady) return;
-
-    m_fakeCamera->setPos(Vector3(0, 0, 0));
-    m_fakeCamera->setRotation(0, 0, 0);
-}
-
-void OpenVRInterface::resetFakeCameraMouseCapture() {
-    if(!m_bReady) return;
-
-    if(m_bCaptureMouse) toggleFakeCameraMouseCapture();
-}
-
-void OpenVRInterface::setControllerColorOverride(Color controllerColor) { m_controllerColorOverride = controllerColor; }
-
-Vector2 OpenVRInterface::getRenderTargetResolution() {
-    const Vector2 errorReturnResolution = Vector2(1, 1);
-
-    if(!m_bReady || m_rightEye == NULL) return errorReturnResolution;
-
-    return m_rightEye->getSize();
-}
-
-bool OpenVRInterface::hasInputFocus() {
-#if defined(MCENGINE_FEATURE_OPENVR)
-
-    return m_bReady && m_pHMD != NULL
-#ifndef MCENGINE_USE_SYSTEM_OPENVR
-           && !m_pHMD->IsInputFocusCapturedByAnotherProcess()
-#endif
-        ;
-
-#else
-
-    return false;
-
-#endif
-}
-
-#ifdef MCENGINE_FEATURE_OPENVR
-
-void OpenVRInterface::updateControllerAxes() {
-#ifndef MCENGINE_USE_SYSTEM_OPENVR
-    // don't update controller axis lines if we don't have input focus
-    if(m_pHMD->IsInputFocusCapturedByAnotherProcess()) return;
-#endif
-
-    std::vector<float> vertdataarray;
-
-    m_uiControllerVertcount = 0;
-    m_iTrackedControllerCount = 0;
-
-    for(vr::TrackedDeviceIndex_t unTrackedDevice = vr::k_unTrackedDeviceIndex_Hmd + 1;
-        unTrackedDevice < vr::k_unMaxTrackedDeviceCount; ++unTrackedDevice) {
-        if(!m_pHMD->IsTrackedDeviceConnected(unTrackedDevice)) continue;
-
-        if(m_pHMD->GetTrackedDeviceClass(unTrackedDevice) != vr::TrackedDeviceClass_Controller) continue;
-
-        m_iTrackedControllerCount += 1;
-
-        if(!m_rTrackedDevicePose[unTrackedDevice].bPoseIsValid) continue;
-
-        const Matrix4 &mat = m_rmat4DevicePose[unTrackedDevice];
-
-        Vector4 center = mat * Vector4(0, 0, 0, 1);
-
-        for(int i = 0; i < 3; ++i) {
-            Vector3 color(0, 0, 0);
-            Vector4 point(0, 0, 0, 1);
-            point[i] += 0.05f;  // offset in X, Y, Z
-            color[i] = 1.0;     // R, G, B
-            point = mat * point;
-
-            vertdataarray.push_back(center.x);
-            vertdataarray.push_back(center.y);
-            vertdataarray.push_back(center.z);
-
-            vertdataarray.push_back(color.x);
-            vertdataarray.push_back(color.y);
-            vertdataarray.push_back(color.z);
-
-            vertdataarray.push_back(point.x);
-            vertdataarray.push_back(point.y);
-            vertdataarray.push_back(point.z);
-
-            vertdataarray.push_back(color.x);
-            vertdataarray.push_back(color.y);
-            vertdataarray.push_back(color.z);
-
-            m_uiControllerVertcount += 2;
-        }
-
-        Vector4 start = mat * Vector4(0, 0, 0, 1);
-        Vector4 end = mat * Vector4(0, 0, -1.0f, 1);
-        Vector3 color(.92f, .92f, .71f);
-
-        vertdataarray.push_back(start.x);
-        vertdataarray.push_back(start.y);
-        vertdataarray.push_back(start.z);
-        vertdataarray.push_back(color.x);
-        vertdataarray.push_back(color.y);
-        vertdataarray.push_back(color.z);
-
-        vertdataarray.push_back(end.x);
-        vertdataarray.push_back(end.y);
-        vertdataarray.push_back(end.z);
-        vertdataarray.push_back(color.x);
-        vertdataarray.push_back(color.y);
-        vertdataarray.push_back(color.z);
-        m_uiControllerVertcount += 2;
-    }
-
-    // setup the VAO the first time through.
-    if(m_unControllerVAO == 0) {
-        glGenVertexArrays(1, &m_unControllerVAO);
-        glBindVertexArray(m_unControllerVAO);
-
-        glGenBuffers(1, &m_glControllerVertBuffer);
-        glBindBuffer(GL_ARRAY_BUFFER, m_glControllerVertBuffer);
-
-        GLuint stride = 2 * 3 * sizeof(float);
-        GLuint offset = 0;
-
-        glEnableVertexAttribArray(0);
-        glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, stride, (const void *)offset);
-
-        offset += sizeof(Vector3);
-        glEnableVertexAttribArray(1);
-        glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, stride, (const void *)offset);
-
-        glBindVertexArray(0);
-    }
-
-    glBindBuffer(GL_ARRAY_BUFFER, m_glControllerVertBuffer);
-
-    // set vertex data if we have some
-    if(vertdataarray.size() > 0)
-        glBufferData(GL_ARRAY_BUFFER, sizeof(float) * vertdataarray.size(), &vertdataarray[0], GL_STREAM_DRAW);
-}
-
-void OpenVRInterface::updateRenderModelForTrackedDevice(vr::TrackedDeviceIndex_t unTrackedDeviceIndex) {
-    if(unTrackedDeviceIndex >= vr::k_unMaxTrackedDeviceCount) return;
-
-    // try to find a model we've already set up
-    std::string sRenderModelName =
-        getTrackedDeviceString(m_pHMD, unTrackedDeviceIndex, vr::Prop_RenderModelName_String);
-    if(sRenderModelName.length() > 0) {
-        CGLRenderModel *pRenderModel = findOrLoadRenderModel(sRenderModelName.c_str());
-        if(!pRenderModel) {
-            std::string sTrackingSystemName =
-                getTrackedDeviceString(m_pHMD, unTrackedDeviceIndex, vr::Prop_TrackingSystemName_String);
-            debugLog("OpenVR: Unable to load render model for tracked device %d (%s.%s)", unTrackedDeviceIndex,
-                     sTrackingSystemName.c_str(), sRenderModelName.c_str());
-        } else
-            m_rTrackedDeviceToRenderModel[unTrackedDeviceIndex] = pRenderModel;
-    } else
-        debugLog("OpenVR: WARNING! findOrLoadRenderModel( %s ) would have been called!\n", sRenderModelName.c_str());
-}
-
-CGLRenderModel *OpenVRInterface::findOrLoadRenderModel(const char *pchRenderModelName) {
-    if(pchRenderModelName == NULL) debugLog("OpenVRInterface::findOrLoadRenderModel( NULL )!!!\n");
-
-    /// debugLog("OpenVRInterface::findOrLoadRenderModel( %s )\n", pchRenderModelName);
-
-    CGLRenderModel *pRenderModel = NULL;
-    for(std::vector<CGLRenderModel *>::iterator i = m_vecRenderModels.begin(); i != m_vecRenderModels.end(); i++) {
-        if(!strcmp((*i)->getName().c_str(), pchRenderModelName)) {
-            pRenderModel = *i;
-            break;
-        }
-    }
-
-    // load the model if we didn't find one
-    if(!pRenderModel) {
-        // load mesh
-        vr::RenderModel_t *pModel;
-        vr::EVRRenderModelError error;
-        while(true) {
-            error = vr::VRRenderModels()->LoadRenderModel_Async(pchRenderModelName, &pModel);
-            if(error != vr::VRRenderModelError_Loading) break;
-        }
-
-        if(error != vr::VRRenderModelError_None) {
-            debugLog("OpenVR: Unable to load render model %s - %s\n", pchRenderModelName,
-                     vr::VRRenderModels()->GetRenderModelErrorNameFromEnum(error));
-            return NULL;  // move on to the next tracked device
-        }
-
-        // load texture
-        vr::RenderModel_TextureMap_t *pTexture;
-        while(true) {
-            error = vr::VRRenderModels()->LoadTexture_Async(pModel->diffuseTextureId, &pTexture);
-            if(error != vr::VRRenderModelError_Loading) break;
-        }
-
-        if(error != vr::VRRenderModelError_None) {
-            debugLog("OpenVR: Unable to load render texture id:%d for render model %s\n", pModel->diffuseTextureId,
-                     pchRenderModelName);
-            vr::VRRenderModels()->FreeRenderModel(pModel);
-            return NULL;  // move on to the next tracked device
-        }
-
-        // build rendermodel
-        pRenderModel = new CGLRenderModel(pchRenderModelName);
-        if(!pRenderModel->init(*pModel, *pTexture)) {
-            debugLog("OpenVR: Unable to create GL model from render model %s\n", pchRenderModelName);
-            SAFE_DELETE(pRenderModel);
-        } else
-            m_vecRenderModels.push_back(pRenderModel);
-
-        // cleanup
-        vr::VRRenderModels()->FreeRenderModel(pModel);
-        vr::VRRenderModels()->FreeTexture(pTexture);
-    }
-
-    return pRenderModel;
-}
-
-#endif
-
-Matrix4 OpenVRInterface::getHMDMatrixProjectionEye(OpenVRInterface::EYE eye) {
-#if defined(MCENGINE_FEATURE_OPENVR)
-
-    if(!m_pHMD) return Matrix4();
-
-    vr::HmdMatrix44_t mat = m_pHMD->GetProjectionMatrix(eyeToOpenVR(eye), vr_nearz.getFloat(), vr_farz.getFloat());
-
-    return Matrix4(mat.m[0][0], mat.m[1][0], mat.m[2][0], mat.m[3][0], mat.m[0][1], mat.m[1][1], mat.m[2][1],
-                   mat.m[3][1], mat.m[0][2], mat.m[1][2], mat.m[2][2], mat.m[3][2], mat.m[0][3], mat.m[1][3],
-                   mat.m[2][3], mat.m[3][3]);
-
-#else
-
-    return Matrix4();
-
-#endif
-}
-
-Matrix4 OpenVRInterface::getHMDMatrixPoseEye(OpenVRInterface::EYE eye) {
-#if defined(MCENGINE_FEATURE_OPENVR)
-
-    if(!m_pHMD) return Matrix4();
-
-    vr::HmdMatrix34_t matEyeRight = m_pHMD->GetEyeToHeadTransform(eyeToOpenVR(eye));
-    Matrix4 matrixObj(matEyeRight.m[0][0], matEyeRight.m[1][0], matEyeRight.m[2][0], 0.0, matEyeRight.m[0][1],
-                      matEyeRight.m[1][1], matEyeRight.m[2][1], 0.0, matEyeRight.m[0][2], matEyeRight.m[1][2],
-                      matEyeRight.m[2][2], 0.0, matEyeRight.m[0][3], matEyeRight.m[1][3], matEyeRight.m[2][3], 1.0f);
-
-    return matrixObj.invert();
-
-#else
-
-    return Matrix4();
-
-#endif
-}
-
-Matrix4 OpenVRInterface::getCurrentModelViewProjectionMatrix(OpenVRInterface::EYE eye) {
-    Matrix4 matMVP;
-    if(eye == OpenVRInterface::EYE::EYE_LEFT)
-        matMVP = m_mat4ProjectionLeft * m_mat4eyePosLeft * m_mat4HMDPose;
-    else if(eye == OpenVRInterface::EYE::EYE_RIGHT)
-        matMVP = m_mat4ProjectionRight * m_mat4eyePosRight * m_mat4HMDPose;
-    return matMVP;
-}
-
-Matrix4 OpenVRInterface::getCurrentViewProjectionMatrix(OpenVRInterface::EYE eye) {
-    Matrix4 matVP;
-    if(eye == OpenVRInterface::EYE::EYE_LEFT)
-        matVP = m_mat4ProjectionLeft * m_mat4eyePosLeft;
-    else if(eye == OpenVRInterface::EYE::EYE_RIGHT)
-        matVP = m_mat4ProjectionRight * m_mat4eyePosRight;
-    return matVP;
-}
-
-Matrix4 OpenVRInterface::getCurrentProjectionMatrix(OpenVRInterface::EYE eye) {
-    Matrix4 matP;
-    if(eye == OpenVRInterface::EYE::EYE_LEFT)
-        matP = m_mat4ProjectionLeft;
-    else if(eye == OpenVRInterface::EYE::EYE_RIGHT)
-        matP = m_mat4ProjectionRight;
-    return matP;
-}
-
-Matrix4 OpenVRInterface::getCurrentEyePosMatrix(OpenVRInterface::EYE eye) {
-    Matrix4 matEyePos;
-    if(eye == OpenVRInterface::EYE::EYE_LEFT)
-        matEyePos = m_mat4eyePosLeft;
-    else if(eye == OpenVRInterface::EYE::EYE_RIGHT)
-        matEyePos = m_mat4eyePosRight;
-    return matEyePos;
-}
-
-bool OpenVRInterface::updateMatrixPoses() {
-    if(!m_bReady) return false;
-
-#if defined(MCENGINE_FEATURE_OPENVR)
-
-    vr::EVRCompositorError res =
-        vr::VRCompositor()->WaitGetPoses(m_rTrackedDevicePose, vr::k_unMaxTrackedDeviceCount, NULL, 0);
-
-    if(res != vr::VRCompositorError_None) {
-        debugLog("OpenVR Error: Compositor::WaitGetPoses() error %i!!!\n", res);
-
-        if(vr_bug_workaround_triggerhapticpulse.getBool()) {
-            if(res == vr::VRCompositorError_DoNotHaveFocus) m_controller->triggerHapticPulse(255);
-        }
-
-        return false;
-    }
-
-    m_iValidPoseCount = 0;
-    m_strPoseClasses = "";
-    for(int nDevice = 0; nDevice < vr::k_unMaxTrackedDeviceCount; ++nDevice) {
-        if(m_rTrackedDevicePose[nDevice].bPoseIsValid) {
-            const bool isConnected = m_pHMD->IsTrackedDeviceConnected(nDevice);
-            const bool isController =
-                m_pHMD->GetTrackedDeviceClass(nDevice) == vr::TrackedDeviceClass::TrackedDeviceClass_Controller;
-
-            m_iValidPoseCount++;
-            m_rmat4DevicePose[nDevice] =
-                convertSteamVRMatrixToMatrix4(m_rTrackedDevicePose[nDevice].mDeviceToAbsoluteTracking);
-            if(m_rDevClassChar[nDevice] == 0) {
-                switch(m_pHMD->GetTrackedDeviceClass(nDevice)) {
-                    case vr::TrackedDeviceClass_Controller:
-                        m_rDevClassChar[nDevice] = 'C';
-                        break;
-                    case vr::TrackedDeviceClass_HMD:
-                        m_rDevClassChar[nDevice] = 'H';
-                        break;
-                    case vr::TrackedDeviceClass_Invalid:
-                        m_rDevClassChar[nDevice] = 'I';
-                        break;
-                    case vr::TrackedDeviceClass_GenericTracker:
-                        m_rDevClassChar[nDevice] = 'G';
-                        break;
-                    case vr::TrackedDeviceClass_TrackingReference:
-                        m_rDevClassChar[nDevice] = 'T';
-                        break;
-                    default:
-                        m_rDevClassChar[nDevice] = '?';
-                        break;
-                }
-            }
-            m_strPoseClasses += m_rDevClassChar[nDevice];
-
-            // update controller matrices
-            if(isConnected && isController) {
-#ifndef MCENGINE_USE_SYSTEM_OPENVR
-                if(!m_pHMD->IsInputFocusCapturedByAnotherProcess())
-#endif
-                {
-                    if(nDevice == m_pHMD->GetTrackedDeviceIndexForControllerRole(
-                                      OpenVRController::roleIdToOpenVR(m_controllerLeft->getRole())))
-                        m_controllerLeft->updateMatrixPose(m_rmat4DevicePose[nDevice]);
-                    else if(nDevice == m_pHMD->GetTrackedDeviceIndexForControllerRole(
-                                           OpenVRController::roleIdToOpenVR(m_controllerRight->getRole())))
-                        m_controllerRight->updateMatrixPose(m_rmat4DevicePose[nDevice]);
-                }
-            }
-        }
-    }
-
-    // update hmd matrix
-    if(m_rTrackedDevicePose[vr::k_unTrackedDeviceIndex_Hmd].bPoseIsValid)
-        m_mat4HMDPose = m_rmat4DevicePose[vr::k_unTrackedDeviceIndex_Hmd].invert();
-
-#endif
-
-    // update all other matrices
-    m_mat4ProjectionLeft = getHMDMatrixProjectionEye(OpenVRInterface::EYE::EYE_LEFT);
-    m_mat4ProjectionRight = getHMDMatrixProjectionEye(OpenVRInterface::EYE::EYE_RIGHT);
-    m_mat4eyePosLeft = getHMDMatrixPoseEye(OpenVRInterface::EYE::EYE_LEFT);
-    m_mat4eyePosRight = getHMDMatrixPoseEye(OpenVRInterface::EYE::EYE_RIGHT);
-
-    return true;
-}
-
-void OpenVRInterface::onSSChange(UString oldValue, UString newValue) {
-    if(!m_bReady || newValue.toFloat() == m_fPrevSSMultiplier) return;
-
-    m_fPrevSSMultiplier = newValue.toFloat();
-    m_bReady = initRenderTargets();
-}
-
-void OpenVRInterface::onSSCompositorChange(UString oldValue, UString newValue) {
-    if(!m_bReady) return;
-
-    if(!m_bSteamVRBugWorkaroundCompositorSSChangeAllowed) {
-        debugLog("OpenVR: Can't change compositor submission texture resolution after first submitted frame!\n");
-        return;
-    }
-
-    m_fCompositorSSMultiplier = newValue.toFloat();
-    m_bReady = initRenderTargets();
-}
-
-void OpenVRInterface::onCompositorSubmitDoubleChange(UString oldValue, UString newValue) {
-    if(!m_bReady) return;
-
-    m_bReady = initRenderTargets();
-}
-
-void OpenVRInterface::onAAChange(UString oldValue, UString newValue) {
-    if(!m_bReady || newValue.toFloat() == m_fPrevAA) return;
-
-    m_fPrevAA = newValue.toFloat();
-    m_bReady = initRenderTargets();
-}
-
-void OpenVRInterface::onBackgroundBrightnessChange(UString oldValue, UString newValue) {
-    if(!m_bReady) return;
-
-    Color clearColor =
-        COLORf(0.0f, vr_background_brightness.getFloat(), vr_background_brightness.getFloat(),
-               vr_background_brightness.getFloat() + (vr_background_brightness.getFloat() > 0.0f ? 0.03f : 0.0f));
-
-    m_leftEye->setClearColor(clearColor);
-    m_rightEye->setClearColor(clearColor);
-}
-
-void OpenVRInterface::onHeadRenderModelChange(UString oldValue, UString newValue) {
-#ifdef MCENGINE_FEATURE_OPENVR
-
-    if(newValue.length() > 0) m_headRenderModel = findOrLoadRenderModel(newValue.toUtf8());
-
-#endif
-}
-
-void OpenVRInterface::onSpectatorCameraPositionChange(UString oldValue, UString newValue) {
-#ifdef MCENGINE_FEATURE_OPENVR
-
-    std::vector<UString> tokens = newValue.split(" ");
-    if(tokens.size() > 2) m_fakeCamera->setPos(Vector3(tokens[0].toFloat(), tokens[1].toFloat(), tokens[2].toFloat()));
-
-#endif
-}
-
-void OpenVRInterface::onSpectatorCameraRotationChange(UString oldValue, UString newValue) {
-#ifdef MCENGINE_FEATURE_OPENVR
-
-    std::vector<UString> tokens = newValue.split(" ");
-    if(tokens.size() > 2) m_fakeCamera->setRotation(tokens[0].toFloat(), tokens[1].toFloat(), tokens[2].toFloat());
-
-#endif
-}
-
-void OpenVRInterface::toggleFakeCameraMouseCapture() {
-    m_bCaptureMouse = !m_bCaptureMouse;
-    if(m_bCaptureMouse) {
-        engine->getMouse()->setCursorVisible(false);
-        engine->getEnvironment()->setCursorClip(true, McRect());
-    } else {
-        engine->getEnvironment()->setCursorClip(false, McRect());
-        engine->getMouse()->setCursorVisible(true);
-        engine->getMouse()->setPos(engine->getScreenSize() / 2);
-
-        saveFakeCamera();
-    }
-}
-
-void OpenVRInterface::saveFakeCamera() {
-    debugLog("OpenVRInterface::saveFakeCamera()\n");
-
-    vr_spectator_camera_position.setValue(
-        UString::format("%f %f %f", m_fakeCamera->getPos().x, m_fakeCamera->getPos().y, m_fakeCamera->getPos().z));
-    vr_spectator_camera_rotation.setValue(
-        UString::format("%f %f %f", m_fakeCamera->getYaw(), m_fakeCamera->getPitch(), m_fakeCamera->getRoll()));
-
-    std::ofstream out(MCENGINE_DATA_DIR "/cfg/vrspectatorcamera.cfg");
-    if(!out.good()) {
-        debugLog("OpenVRInterface::saveFakeCamera() failed!\n");
-        return;
-    }
-
-    out << vr_spectator_camera_position.getName().toUtf8() << " " << vr_spectator_camera_position.getString().toUtf8();
-    out << "\n";
-    out << vr_spectator_camera_rotation.getName().toUtf8() << " " << vr_spectator_camera_rotation.getString().toUtf8();
-    out << "\n";
-
-    out.close();
-}
-
-void OpenVRInterface::loadFakeCamera() { Console::execConfigFile("vrspectatorcamera"); }
-
-CGLRenderModel::CGLRenderModel(const std::string &sRenderModelName) {
-    m_sModelName = sRenderModelName;
-
-#ifdef MCENGINE_FEATURE_OPENVR
-
-    m_glIndexBuffer = 0;
-    m_glVertArray = 0;
-    m_glVertBuffer = 0;
-    m_glTexture = 0;
-    m_unVertexCount = 0;
-
-#endif
-}
-
-CGLRenderModel::~CGLRenderModel() { cleanup(); }
-
-void CGLRenderModel::cleanup() {
-#ifdef MCENGINE_FEATURE_OPENVR
-
-    if(m_glVertBuffer) {
-        glDeleteBuffers(1, &m_glIndexBuffer);
-        glDeleteVertexArrays(1, &m_glVertArray);
-        glDeleteBuffers(1, &m_glVertBuffer);
-
-        m_glIndexBuffer = 0;
-        m_glVertArray = 0;
-        m_glVertBuffer = 0;
-    }
-
-#endif
-}
-
-void CGLRenderModel::draw() {
-#ifdef MCENGINE_FEATURE_OPENVR
-
-    glBindVertexArray(m_glVertArray);
-
-    glActiveTexture(GL_TEXTURE0);
-    glBindTexture(GL_TEXTURE_2D, m_glTexture);
-
-    glDrawElements(GL_TRIANGLES, m_unVertexCount, GL_UNSIGNED_SHORT, 0);
-
-    glBindVertexArray(0);
-
-#endif
-}
-
-#ifdef MCENGINE_FEATURE_OPENVR
-
-bool CGLRenderModel::init(const vr::RenderModel_t &vrModel, const vr::RenderModel_TextureMap_t &vrDiffuseTexture) {
-    // create and bind a VAO to hold state for this model
-    glGenVertexArrays(1, &m_glVertArray);
-    glBindVertexArray(m_glVertArray);
-
-    // populate a vertex buffer
-    glGenBuffers(1, &m_glVertBuffer);
-    glBindBuffer(GL_ARRAY_BUFFER, m_glVertBuffer);
-    glBufferData(GL_ARRAY_BUFFER, sizeof(vr::RenderModel_Vertex_t) * vrModel.unVertexCount, vrModel.rVertexData,
-                 GL_STATIC_DRAW);
-
-    // identify the components in the vertex buffer
-    glEnableVertexAttribArray(0);
-    glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, sizeof(vr::RenderModel_Vertex_t),
-                          (void *)offsetof(vr::RenderModel_Vertex_t, vPosition));
-    glEnableVertexAttribArray(1);
-    glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, sizeof(vr::RenderModel_Vertex_t),
-                          (void *)offsetof(vr::RenderModel_Vertex_t, vNormal));
-    glEnableVertexAttribArray(2);
-    glVertexAttribPointer(2, 2, GL_FLOAT, GL_FALSE, sizeof(vr::RenderModel_Vertex_t),
-                          (void *)offsetof(vr::RenderModel_Vertex_t, rfTextureCoord));
-
-    // create and populate the index buffer
-    glGenBuffers(1, &m_glIndexBuffer);
-    glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_glIndexBuffer);
-    glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(uint16_t) * vrModel.unTriangleCount * 3, vrModel.rIndexData,
-                 GL_STATIC_DRAW);
-
-    glBindVertexArray(0);
-
-    // create and populate the texture
-    glGenTextures(1, &m_glTexture);
-    glBindTexture(GL_TEXTURE_2D, m_glTexture);
-
-    glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, vrDiffuseTexture.unWidth, vrDiffuseTexture.unHeight, 0, GL_RGBA,
-                 GL_UNSIGNED_BYTE, vrDiffuseTexture.rubTextureMapData);
-
-    // VALVE: if this renders black ask McJohn what's wrong.
-    glGenerateMipmap(GL_TEXTURE_2D);
-
-    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
-    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
-    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
-
-    GLfloat fLargest;
-    glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &fLargest);
-    glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, fLargest);
-
-    glBindTexture(GL_TEXTURE_2D, 0);
-
-    m_unVertexCount = vrModel.unTriangleCount * 3;
-
-    return true;
-}
-
-#endif

+ 0 - 268
src/Engine/OpenVRInterface.h

@@ -1,268 +0,0 @@
-//================ Copyright (c) 2016, PG, All rights reserved. =================//
-//
-// Purpose:		openvr wrapper and vr renderer
-//
-// $NoKeywords: $vr
-//===============================================================================//
-
-#ifndef OPENVRINTERFACE_H
-#define OPENVRINTERFACE_H
-
-#include "KeyboardListener.h"
-#include "cbase.h"
-
-// HACKHACK: remove this header once a proper model wrapper exists
-#include <string>
-
-#include "OpenGLHeaders.h"
-
-#if defined(MCENGINE_FEATURE_OPENVR)
-
-#ifdef MCENGINE_USE_SYSTEM_OPENVR
-#include <openvr.h>
-#else
-#include <openvr_mingw.hpp>
-#endif
-
-#endif
-
-class Shader;
-class Camera;
-class RenderTarget;
-class OpenVRController;
-
-class DirectX11Interface;
-class DirectX11Image;
-class CGLRenderModel;
-
-class OpenVRInterface : public KeyboardListener {
-   public:
-    typedef fastdelegate::FastDelegate1<Graphics *> DrawCallback;
-
-    struct PLAY_AREA_RECT {
-        Vector3 corners[4];
-    };
-
-   public:
-    OpenVRInterface();
-    virtual ~OpenVRInterface();
-
-    void draw(Graphics *g);
-    void update();
-
-    virtual void onKeyDown(KeyboardEvent &e);
-    virtual void onKeyUp(KeyboardEvent &e);
-    virtual void onChar(KeyboardEvent &e);
-
-    void onResolutionChange(Vector2 newResolution);
-
-    void showKeyboard() { showKeyboardEx("", ""); }
-    void showKeyboardEx(UString description, UString text);
-    void hideKeyboard();
-
-    void updatePlayAreaMetrics();
-    void resetFakeCameraMovement();
-    void resetFakeCameraMouseCapture();
-
-    void setDrawCallback(DrawCallback drawCallback) { m_drawCallback = drawCallback; }
-
-    void setControllerColorOverride(Color controllerColor);
-
-    inline UString getTrackingSystemName() const { return m_sTrackingSystemName; }
-
-    inline Matrix4 getCurrentModelMatrix() const { return m_matCurrentM; }
-    inline Matrix4 getCurrentViewProjectionMatrix() const { return m_matCurrentVP; }
-    inline Matrix4 getCurrentModelViewProjectionMatrix() const { return m_matCurrentMVP; }
-
-    inline OpenVRController *getController() const { return m_controller; }
-    inline OpenVRController *getLeftController() const { return m_controllerLeft; }
-    inline OpenVRController *getRightController() const { return m_controllerRight; }
-
-    inline Vector2 getPlayAreaSize() const { return m_vPlayAreaSize; }
-    inline PLAY_AREA_RECT getPlayAreaRect() const { return m_playAreaRect; }
-
-    Vector2 getRenderTargetResolution();
-
-    inline bool isReady() const { return m_bReady; }
-    inline bool isKeyboardVisible() const { return m_bIsKeyboardVisible; }
-
-    bool hasInputFocus();
-
-   private:
-    enum class EYE { EYE_LEFT, EYE_RIGHT };
-
-    bool initRenderer();
-    bool initCompositor();
-    void initRenderModels();
-    bool initRenderTargets();
-    bool initShaders();
-
-    void renderStereoTargets(Graphics *g);
-    void renderSpectatorTarget(Graphics *g, RenderTarget *rt);
-    void renderScene(Graphics *g, OpenVRInterface::EYE eye);
-    void renderScene(Graphics *g, Matrix4 &matCurrentEye, Matrix4 &matCurrentM, Matrix4 &matCurrentP,
-                     Matrix4 &matCurrentVP, Matrix4 &matCurrentMVP);
-    void renderStereoToWindow(Graphics *g);
-
-    bool updateMatrixPoses();
-
-    Matrix4 getHMDMatrixProjectionEye(OpenVRInterface::EYE eye);
-    Matrix4 getHMDMatrixPoseEye(OpenVRInterface::EYE eye);
-    Matrix4 getCurrentModelViewProjectionMatrix(OpenVRInterface::EYE eye);
-    Matrix4 getCurrentViewProjectionMatrix(OpenVRInterface::EYE eye);
-    Matrix4 getCurrentProjectionMatrix(OpenVRInterface::EYE eye);
-    Matrix4 getCurrentEyePosMatrix(OpenVRInterface::EYE eye);
-
-    void onSSChange(UString oldValue, UString newValue);
-    void onSSCompositorChange(UString oldValue, UString newValue);
-    void onCompositorSubmitDoubleChange(UString oldValue, UString newValue);
-    void onAAChange(UString oldValue, UString newValue);
-    void onBackgroundBrightnessChange(UString oldValue, UString newValue);
-    void onHeadRenderModelChange(UString oldValue, UString newValue);
-    void onSpectatorCameraPositionChange(UString oldValue, UString newValue);
-    void onSpectatorCameraRotationChange(UString oldValue, UString newValue);
-
-#ifdef MCENGINE_FEATURE_OPENVR
-
-    void updateControllerAxes();  // for debugging
-    void updateRenderModelForTrackedDevice(vr::TrackedDeviceIndex_t unTrackedDeviceIndex);
-    CGLRenderModel *findOrLoadRenderModel(const char *pchRenderModelName);
-
-#endif
-
-   private:
-#if defined(MCENGINE_FEATURE_OPENVR)
-
-    static std::string getTrackedDeviceString(vr::IVRSystem *pHmd, vr::TrackedDeviceIndex_t unDevice,
-                                              vr::TrackedDeviceProperty prop, vr::TrackedPropertyError *peError = NULL);
-    static Matrix4 convertSteamVRMatrixToMatrix4(const vr::HmdMatrix34_t &matPose);
-    static vr::Hmd_Eye eyeToOpenVR(OpenVRInterface::EYE eye);
-
-#endif
-
-    void toggleFakeCameraMouseCapture();
-    void saveFakeCamera();
-    void loadFakeCamera();
-
-    bool m_bReady;
-    UString m_sTrackingSystemName;
-
-    // main draw callback
-    DrawCallback m_drawCallback;
-
-    // controllers
-    OpenVRController *m_controller;
-    OpenVRController *m_controllerLeft;
-    OpenVRController *m_controllerRight;
-    Color m_controllerColorOverride;
-
-    // matrices
-    Matrix4 m_mat4HMDPose;
-    Matrix4 m_mat4eyePosLeft;
-    Matrix4 m_mat4eyePosRight;
-
-    Matrix4 m_mat4ProjectionCenter;
-    Matrix4 m_mat4ProjectionLeft;
-    Matrix4 m_mat4ProjectionRight;
-
-    Matrix4 m_matCurrentM;
-    Matrix4 m_matCurrentVP;
-    Matrix4 m_matCurrentMVP;
-
-    // framebuffers
-    RenderTarget *m_leftEye;
-    RenderTarget *m_rightEye;
-    RenderTarget *m_compositorEye1;
-    RenderTarget *m_compositorEye2;
-    RenderTarget *m_debugOverlay;
-
-    // shaders
-    Shader *m_renderModelShader;
-    Shader *m_controllerAxisShader;
-    Shader *m_genericTexturedShader;
-    Shader *m_genericUntexturedShader;
-
-    // play area
-    Vector2 m_vPlayAreaSize;
-    PLAY_AREA_RECT m_playAreaRect;
-
-    // keyboard
-    bool m_bIsKeyboardVisible;
-
-    // debugging
-    Camera *m_fakeCamera;
-    bool m_bCaptureMouse;
-    bool m_bWDown;
-    bool m_bADown;
-    bool m_bSDown;
-    bool m_bDDown;
-    bool m_bShiftDown;
-    bool m_bCtrlDown;
-    bool m_bIsSpectatorDraw;
-
-    // custom
-    float m_fPrevSSMultiplier;
-    float m_fCompositorSSMultiplier;
-    float m_fPrevAA;
-    bool m_bSteamVRBugWorkaroundCompositorSSChangeAllowed;
-
-#if defined(MCENGINE_FEATURE_OPENVR)
-
-    std::vector<CGLRenderModel *> m_vecRenderModels;
-    CGLRenderModel *m_rTrackedDeviceToRenderModel[vr::k_unMaxTrackedDeviceCount];
-    CGLRenderModel *m_headRenderModel;
-
-    // openvr system
-    vr::IVRSystem *m_pHMD;
-    vr::IVRRenderModels *m_pRenderModels;
-    std::string m_strDisplay;
-    vr::TrackedDevicePose_t m_rTrackedDevicePose[vr::k_unMaxTrackedDeviceCount];
-    Matrix4 m_rmat4DevicePose[vr::k_unMaxTrackedDeviceCount];
-
-    // tracking
-    int m_iTrackedControllerCount;
-    int m_iValidPoseCount;
-    std::string m_strPoseClasses;                         // what classes we saw poses for this frame
-    char m_rDevClassChar[vr::k_unMaxTrackedDeviceCount];  // for each device, a character representing its class
-
-    // TEMP: mesh buffers
-    GLuint m_glControllerVertBuffer;
-    GLuint m_unControllerVAO;
-    unsigned int m_uiControllerVertcount;
-
-#endif
-};
-
-extern OpenVRInterface *openvr;
-
-class CGLRenderModel {
-   public:
-    CGLRenderModel(const std::string &sRenderModelName);
-    ~CGLRenderModel();
-    void cleanup();
-
-    void draw();
-
-#ifdef MCENGINE_FEATURE_OPENVR
-
-    bool init(const vr::RenderModel_t &vrModel, const vr::RenderModel_TextureMap_t &vrDiffuseTexture);
-
-#endif
-
-    const std::string &getName() const { return m_sModelName; }
-
-   private:
-#ifdef MCENGINE_FEATURE_OPENVR
-
-    GLuint m_glVertBuffer;
-    GLuint m_glIndexBuffer;
-    GLuint m_glVertArray;
-    GLuint m_glTexture;
-    GLsizei m_unVertexCount;
-
-#endif
-
-    std::string m_sModelName;
-};
-
-#endif

+ 0 - 1
src/Engine/Platform/WinGLLegacyInterface.cpp

@@ -14,7 +14,6 @@
 #include "ConVar.h"
 #include "Engine.h"
 #include "OpenGLHeaders.h"
-#include "OpenVRInterface.h"
 #include "WinEnvironment.h"
 
 bool g_bARBMultisampleSupported = false;