Ver Fonte

Added experimental OpenVR module

Adam Kruckenberg há 9 anos atrás
pai
commit
670e1d11ad

+ 0 - 22
assets/modules/oculusVR/VRCorrect.frag

@@ -1,22 +0,0 @@
-uniform vec2 scale;
-uniform vec2 screenCenter;
-uniform vec2 lensCenter;
-uniform vec2 scaleIn;
-uniform vec4 hmdWarpParam;
-
-uniform sampler2D screenColorBuffer;
-
-void main()
-{
-
-	vec2 theta = (gl_TexCoord[0].st - lensCenter) * scaleIn;
-
-	float rSq = theta.x*theta.x + theta.y*theta.y;
-	vec2 rvector = theta*(hmdWarpParam.x + hmdWarpParam.y*rSq + hmdWarpParam.z*rSq*rSq + hmdWarpParam.w*rSq*rSq*rSq);
-	vec2 tc = (lensCenter + scale * rvector);
-
-	if (any(bvec2(clamp(tc, screenCenter - vec2(0.5,0.5), screenCenter + vec2(0.5,0.5))-tc)))
-		gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);
-	else
-		gl_FragColor = texture2D(screenColorBuffer, tc);
-}

+ 0 - 18
assets/modules/oculusVR/VRCorrect.mat

@@ -1,18 +0,0 @@
-<?xml version="1.0" ?>
-<polycode>	
-	<shaders>
-		<shader type="glsl" name="VRCorrect" screen="true">
-			<vp source="default/ScreenShader.vert"/>
-			<fp source="VRCorrect.frag"/>
-		</shader>							
-	</shaders>
-	<materials>								
-		<material name="VRCorrect" screen="true">
-			<shader name="VRCorrect">
-				<targettextures>			
-					<targettexture mode="color" name="screenColorBuffer"/>			
-				</targettextures>			
-			</shader>
-		</material>			
-	</materials>
-</polycode>

+ 3227 - 0
include/openvr.h

@@ -0,0 +1,3227 @@
+#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 
+
+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 EGraphicsAPIConvention
+{
+	API_DirectX = 0, // Normalized Z goes from 0 at the viewer to 1 at the far clip plane
+	API_OpenGL = 1,  // Normalized Z goes from 1 at the viewer to -1 at the far clip plane
+};
+
+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; // Native d3d texture pointer or GL texture id.
+	EGraphicsAPIConvention eType;
+	EColorSpace eColorSpace;
+};
+
+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_unTrackingStringSize = 32;
+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_TrackingReference = 4,	// Camera and base stations that serve as tracking reference points
+
+	TrackedDeviceClass_Other = 1000,
+};
+
+
+/** 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. You probably don't want this one.
+};
+
+
+/** 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
+{
+	// 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,
+
+	// 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,
+
+	// 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
+
+	// 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,
+
+	// 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,
+	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.
+};
+
+/** 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,
+};
+
+
+/** 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,
+};
+
+/** 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_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_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
+
+	// 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_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_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_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_PerformanceTest_EnableCapture = 1600,
+	VREvent_PerformanceTest_DisableCapture = 1601,
+	VREvent_PerformanceTest_FidelityLevel = 1602,
+	
+	// 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_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;
+};
+
+/** 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_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;
+};
+
+
+/** 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,
+};
+
+/** 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
+};
+
+
+/** 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_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_IPC_ServerInitFailed		= 300,
+	VRInitError_IPC_ConnectFailed			= 301,
+	VRInitError_IPC_SharedStateInitFailed	= 302,
+	VRInitError_IPC_CompositorInitFailed	= 303,
+	VRInitError_IPC_MutexInitFailed			= 304,
+	VRInitError_IPC_Failed					= 305,
+
+	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, EGraphicsAPIConvention eProjType ) = 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;
+
+	/** 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 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 ) = 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 generally fit in buffers of k_unTrackingStringSize 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 stencil mesh information for the current HMD. If this HMD does not have a stencil 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. The pixels covered by this mesh will never be seen by the user after the lens distortion is applied and based on visibility to the panels.
+	* This will improve perf 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.
+	*/
+	virtual HiddenAreaMesh_t GetHiddenAreaMesh( EVREye eEye ) = 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 ) = 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, 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_012";
+
+}
+
+
+// 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_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;
+	};
+
+	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, 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 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, 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;
+
+		// ---------------  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;
+	};
+
+	static const char * const IVRApplications_Version = "IVRApplications_005";
+
+} // namespace vr
+
+// ivrsettings.h
+namespace vr
+{
+	enum EVRSettingsError
+	{
+		VRSettingsError_None = 0,
+		VRSettingsError_IPCFailed = 1,
+		VRSettingsError_WriteFailed = 2,
+		VRSettingsError_ReadFailed = 3,
+	};
+
+	// 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 bool GetBool( const char *pchSection, const char *pchSettingsKey, bool bDefaultValue, EVRSettingsError *peError = nullptr ) = 0;
+		virtual void SetBool( const char *pchSection, const char *pchSettingsKey, bool bValue, EVRSettingsError *peError = nullptr ) = 0;
+		virtual int32_t GetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nDefaultValue, EVRSettingsError *peError = nullptr ) = 0;
+		virtual void SetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nValue, EVRSettingsError *peError = nullptr ) = 0;
+		virtual float GetFloat( const char *pchSection, const char *pchSettingsKey, float flDefaultValue, EVRSettingsError *peError = nullptr ) = 0;
+		virtual void SetFloat( const char *pchSection, const char *pchSettingsKey, float flValue, EVRSettingsError *peError = nullptr ) = 0;
+		virtual void GetString( const char *pchSection, const char *pchSettingsKey, char *pchValue, uint32_t unValueLen, const char *pchDefaultValue, EVRSettingsError *peError = nullptr ) = 0;
+		virtual void SetString( const char *pchSection, const char *pchSettingsKey, const char *pchValue, 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_001";
+
+	//-----------------------------------------------------------------------------
+	// 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_BackgroundCameraHeight_Float = "backgroundCameraHeight";
+	static const char * const k_pch_SteamVR_BackgroundDomeRadius_Float = "backgroundDomeRadius";
+	static const char * const k_pch_SteamVR_Environment_String = "environment";
+	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_PowerOffOnExit_Bool = "powerOffOnExit";
+	static const char * const k_pch_SteamVR_StandbyAppRunningTimeout_Float = "standbyAppRunningTimeout";
+	static const char * const k_pch_SteamVR_StandbyNoAppTimeout_Float = "standbyNoAppTimeout";
+	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_AllowReprojection_Bool = "allowReprojection";
+	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";
+
+	//-----------------------------------------------------------------------------
+	// 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_LighthouseName_String = "lighthousename";
+	static const char * const k_pch_Lighthouse_MaxIncidenceAngleDegrees_Float = "maxincidenceangledegrees";
+	static const char * const k_pch_Lighthouse_UseLighthouseDirect_Bool = "uselighthousedirect";
+	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_EnableNullDriver_Bool = "enable";
+	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_EnableScreenshots_Bool = "EnableScreenshots";
+
+	//-----------------------------------------------------------------------------
+	// 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";
+
+	//-----------------------------------------------------------------------------
+	// 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";
+
+	//-----------------------------------------------------------------------------
+	// model skin keys
+	static const char * const k_pch_modelskin_Section = "modelskins";
+
+} // 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_BaseStationUninitalized = 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,
+};
+
+const uint32_t VRCompositor_ReprojectionReason_Cpu = 0x01;
+const uint32_t VRCompositor_ReprojectionReason_Gpu = 0x02;
+
+/** 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_nNumDroppedFrames; // number of additional times previous frame was scanned out
+
+	/** 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_flSceneRenderGpuMs; // time spent rendering the scene
+	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
+	int32_t m_nFidelityLevel; // app reported value
+
+	uint32_t m_nReprojectionFlags;
+};
+
+/** 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;
+
+	/** Returns pose(s) to use to render scene (and optionally poses predicted two frames out for gameplay). */
+	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
+	*/
+	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;
+
+	/** 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;
+
+	/** Fading the Grid in or out in fSeconds */
+	virtual void FadeGrid( float fSeconds, bool bFadeIn ) = 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;
+
+	/** Screenshot support */
+
+	/** These functions are no longer used and will be removed in
+	 *  a future update.  Use the functions via the
+	 *  IVRScreenshots interface */
+	virtual vr::EVRCompositorError RequestScreenshot( vr::EVRScreenshotType type, const char *pchDestinationFileName, const char *pchVRDestinationFileName ) = 0;
+	virtual vr::EVRScreenshotType GetCurrentScreenshotType() = 0;
+
+	/** Opens a shared D3D11 texture with the undistorted composited image for each eye. */
+	virtual vr::EVRCompositorError GetMirrorTextureD3D11( vr::EVREye eEye, void *pD3D11DeviceOrResource, void **ppD3D11ShaderResourceView ) = 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;
+};
+
+static const char * const IVRCompositor_Version = "IVRCompositor_015";
+
+} // 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 = 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
+	};
+
+	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,
+	};
+
+	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 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, EGraphicsAPIConvention *pAPI, EColorSpace *pColorSpace ) = 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;
+
+	};
+
+	static const char * const IVROverlay_Version = "IVROverlay_012";
+
+} // 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. It 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 GetCameraIntrinisics( 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;
+};
+
+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
+
+
+// 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 EGraphicsAPIConvention GraphicsAPIConvention;
+	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;
+		}
+
+		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;
+		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 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_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();
+	}
+}

+ 1626 - 0
include/openvr_capi.h

@@ -0,0 +1,1626 @@
+//======= 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;
+#endif
+
+
+// OpenVR Constants
+
+static const unsigned int k_unTrackingStringSize = 32;
+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 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_012";
+static const char * IVRExtendedDisplay_Version = "IVRExtendedDisplay_001";
+static const char * IVRTrackedCamera_Version = "IVRTrackedCamera_003";
+static const unsigned int k_unMaxApplicationKeyLength = 128;
+static const char * IVRApplications_Version = "IVRApplications_005";
+static const char * IVRChaperone_Version = "IVRChaperone_003";
+static const char * IVRChaperoneSetup_Version = "IVRChaperoneSetup_005";
+static const char * IVRCompositor_Version = "IVRCompositor_015";
+static const unsigned int k_unVROverlayMaxKeyLength = 128;
+static const unsigned int k_unVROverlayMaxNameLength = 128;
+static const unsigned int k_unMaxOverlayCount = 32;
+static const char * IVROverlay_Version = "IVROverlay_012";
+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_001";
+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_BackgroundCameraHeight_Float = "backgroundCameraHeight";
+static const char * k_pch_SteamVR_BackgroundDomeRadius_Float = "backgroundDomeRadius";
+static const char * k_pch_SteamVR_Environment_String = "environment";
+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_PowerOffOnExit_Bool = "powerOffOnExit";
+static const char * k_pch_SteamVR_StandbyAppRunningTimeout_Float = "standbyAppRunningTimeout";
+static const char * k_pch_SteamVR_StandbyNoAppTimeout_Float = "standbyNoAppTimeout";
+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_AllowReprojection_Bool = "allowReprojection";
+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_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_LighthouseName_String = "lighthousename";
+static const char * k_pch_Lighthouse_MaxIncidenceAngleDegrees_Float = "maxincidenceangledegrees";
+static const char * k_pch_Lighthouse_UseLighthouseDirect_Bool = "uselighthousedirect";
+static const char * k_pch_Lighthouse_DBHistory_Bool = "dbhistory";
+static const char * k_pch_Null_Section = "driver_null";
+static const char * k_pch_Null_EnableNullDriver_Bool = "enable";
+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_EnableScreenshots_Bool = "EnableScreenshots";
+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_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_modelskin_Section = "modelskins";
+static const char * IVRScreenshots_Version = "IVRScreenshots_001";
+
+// OpenVR Enums
+
+typedef enum EVREye
+{
+	EVREye_Eye_Left = 0,
+	EVREye_Eye_Right = 1,
+} EVREye;
+
+typedef enum EGraphicsAPIConvention
+{
+	EGraphicsAPIConvention_API_DirectX = 0,
+	EGraphicsAPIConvention_API_OpenGL = 1,
+} EGraphicsAPIConvention;
+
+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_TrackingReference = 4,
+	ETrackedDeviceClass_TrackedDeviceClass_Other = 1000,
+} 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_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_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_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_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_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;
+
+typedef enum EVRSubmitFlags
+{
+	EVRSubmitFlags_Submit_Default = 0,
+	EVRSubmitFlags_Submit_LensDistortionAlreadyApplied = 1,
+	EVRSubmitFlags_Submit_GlRenderBuffer = 2,
+} 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;
+
+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_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_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_RequestScreenshot = 520,
+	EVREventType_VREvent_ScreenshotTaken = 521,
+	EVREventType_VREvent_ScreenshotFailed = 522,
+	EVREventType_VREvent_SubmitScreenshotToDashboard = 523,
+	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_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_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_PerformanceTest_EnableCapture = 1600,
+	EVREventType_VREvent_PerformanceTest_DisableCapture = 1601,
+	EVREventType_VREvent_PerformanceTest_FidelityLevel = 1602,
+	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_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 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;
+
+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;
+
+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_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_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_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_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_BaseStationUninitalized = 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;
+
+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;
+
+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 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;
+
+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 uint32_t TrackedDeviceIndex_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 EGraphicsAPIConvention GraphicsAPIConvention;
+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 EGraphicsAPIConvention 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 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 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_nNumDroppedFrames;
+	double m_flSystemTimeInSeconds;
+	float m_flSceneRenderGpuMs;
+	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;
+	int32_t m_nFidelityLevel;
+	uint32_t m_nReprojectionFlags;
+} 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 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_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;
+};
+
+
+// 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, EGraphicsAPIConvention eProjType);
+	void (OPENVR_FNTABLE_CALLTYPE *GetProjectionRaw)(EVREye eEye, float * pfLeft, float * pfRight, float * pfTop, float * pfBottom);
+	struct DistortionCoordinates_t (OPENVR_FNTABLE_CALLTYPE *ComputeDistortion)(EVREye eEye, float fU, float fV);
+	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);
+	bool (OPENVR_FNTABLE_CALLTYPE *GetControllerState)(TrackedDeviceIndex_t unControllerDeviceIndex, VRControllerState_t * pControllerState);
+	bool (OPENVR_FNTABLE_CALLTYPE *GetControllerStateWithPose)(ETrackingUniverseOrigin eOrigin, TrackedDeviceIndex_t unControllerDeviceIndex, VRControllerState_t * pControllerState, 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 *GetCameraIntrinisics)(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);
+};
+
+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 *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 *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);
+};
+
+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);
+	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);
+	void (OPENVR_FNTABLE_CALLTYPE *FadeGrid)(float fSeconds, bool bFadeIn);
+	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 *RequestScreenshot)(EVRScreenshotType type, char * pchDestinationFileName, char * pchVRDestinationFileName);
+	EVRScreenshotType (OPENVR_FNTABLE_CALLTYPE *GetCurrentScreenshotType)();
+	EVRCompositorError (OPENVR_FNTABLE_CALLTYPE *GetMirrorTextureD3D11)(EVREye eEye, void * pD3D11DeviceOrResource, void ** ppD3D11ShaderResourceView);
+	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);
+};
+
+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 *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, EGraphicsAPIConvention * pAPI, EColorSpace * pColorSpace);
+	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);
+};
+
+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);
+	bool (OPENVR_FNTABLE_CALLTYPE *GetBool)(char * pchSection, char * pchSettingsKey, bool bDefaultValue, EVRSettingsError * peError);
+	void (OPENVR_FNTABLE_CALLTYPE *SetBool)(char * pchSection, char * pchSettingsKey, bool bValue, EVRSettingsError * peError);
+	int32_t (OPENVR_FNTABLE_CALLTYPE *GetInt32)(char * pchSection, char * pchSettingsKey, int32_t nDefaultValue, EVRSettingsError * peError);
+	void (OPENVR_FNTABLE_CALLTYPE *SetInt32)(char * pchSection, char * pchSettingsKey, int32_t nValue, EVRSettingsError * peError);
+	float (OPENVR_FNTABLE_CALLTYPE *GetFloat)(char * pchSection, char * pchSettingsKey, float flDefaultValue, EVRSettingsError * peError);
+	void (OPENVR_FNTABLE_CALLTYPE *SetFloat)(char * pchSection, char * pchSettingsKey, float flValue, EVRSettingsError * peError);
+	void (OPENVR_FNTABLE_CALLTYPE *GetString)(char * pchSection, char * pchSettingsKey, char * pchValue, uint32_t unValueLen, char * pchDefaultValue, EVRSettingsError * peError);
+	void (OPENVR_FNTABLE_CALLTYPE *SetString)(char * pchSection, char * pchSettingsKey, char * pchValue, 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);
+};
+
+
+#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__
+
+

+ 1829 - 0
include/openvr_driver.h

@@ -0,0 +1,1829 @@
+#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 
+
+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 EGraphicsAPIConvention
+{
+	API_DirectX = 0, // Normalized Z goes from 0 at the viewer to 1 at the far clip plane
+	API_OpenGL = 1,  // Normalized Z goes from 1 at the viewer to -1 at the far clip plane
+};
+
+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; // Native d3d texture pointer or GL texture id.
+	EGraphicsAPIConvention eType;
+	EColorSpace eColorSpace;
+};
+
+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_unTrackingStringSize = 32;
+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_TrackingReference = 4,	// Camera and base stations that serve as tracking reference points
+
+	TrackedDeviceClass_Other = 1000,
+};
+
+
+/** 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. You probably don't want this one.
+};
+
+
+/** 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
+{
+	// 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,
+
+	// 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,
+
+	// 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
+
+	// 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,
+
+	// 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,
+	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.
+};
+
+/** 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,
+};
+
+
+/** 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,
+};
+
+/** 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_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_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
+
+	// 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_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_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_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_PerformanceTest_EnableCapture = 1600,
+	VREvent_PerformanceTest_DisableCapture = 1601,
+	VREvent_PerformanceTest_FidelityLevel = 1602,
+	
+	// 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_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;
+};
+
+/** 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_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;
+};
+
+
+/** 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,
+};
+
+/** 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
+};
+
+
+/** 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_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_IPC_ServerInitFailed		= 300,
+	VRInitError_IPC_ConnectFailed			= 301,
+	VRInitError_IPC_SharedStateInitFailed	= 302,
+	VRInitError_IPC_CompositorInitFailed	= 303,
+	VRInitError_IPC_MutexInitFailed			= 304,
+	VRInitError_IPC_Failed					= 305,
+
+	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
+
+
+// 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,
+	};
+
+	// 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 bool GetBool( const char *pchSection, const char *pchSettingsKey, bool bDefaultValue, EVRSettingsError *peError = nullptr ) = 0;
+		virtual void SetBool( const char *pchSection, const char *pchSettingsKey, bool bValue, EVRSettingsError *peError = nullptr ) = 0;
+		virtual int32_t GetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nDefaultValue, EVRSettingsError *peError = nullptr ) = 0;
+		virtual void SetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nValue, EVRSettingsError *peError = nullptr ) = 0;
+		virtual float GetFloat( const char *pchSection, const char *pchSettingsKey, float flDefaultValue, EVRSettingsError *peError = nullptr ) = 0;
+		virtual void SetFloat( const char *pchSection, const char *pchSettingsKey, float flValue, EVRSettingsError *peError = nullptr ) = 0;
+		virtual void GetString( const char *pchSection, const char *pchSettingsKey, char *pchValue, uint32_t unValueLen, const char *pchDefaultValue, EVRSettingsError *peError = nullptr ) = 0;
+		virtual void SetString( const char *pchSection, const char *pchSettingsKey, const char *pchValue, 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_001";
+
+	//-----------------------------------------------------------------------------
+	// 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_BackgroundCameraHeight_Float = "backgroundCameraHeight";
+	static const char * const k_pch_SteamVR_BackgroundDomeRadius_Float = "backgroundDomeRadius";
+	static const char * const k_pch_SteamVR_Environment_String = "environment";
+	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_PowerOffOnExit_Bool = "powerOffOnExit";
+	static const char * const k_pch_SteamVR_StandbyAppRunningTimeout_Float = "standbyAppRunningTimeout";
+	static const char * const k_pch_SteamVR_StandbyNoAppTimeout_Float = "standbyNoAppTimeout";
+	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_AllowReprojection_Bool = "allowReprojection";
+	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";
+
+	//-----------------------------------------------------------------------------
+	// 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_LighthouseName_String = "lighthousename";
+	static const char * const k_pch_Lighthouse_MaxIncidenceAngleDegrees_Float = "maxincidenceangledegrees";
+	static const char * const k_pch_Lighthouse_UseLighthouseDirect_Bool = "uselighthousedirect";
+	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_EnableNullDriver_Bool = "enable";
+	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_EnableScreenshots_Bool = "EnableScreenshots";
+
+	//-----------------------------------------------------------------------------
+	// 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";
+
+	//-----------------------------------------------------------------------------
+	// 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";
+
+	//-----------------------------------------------------------------------------
+	// model skin keys
+	static const char * const k_pch_modelskin_Section = "modelskins";
+
+} // 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 power off this device */
+	virtual void PowerOff() = 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;
+
+	// ------------------------------------
+	// Property Methods
+	// ------------------------------------
+
+	/** Returns a bool property. If the property is not available this function will return false. */
+	virtual bool GetBoolTrackedDeviceProperty( ETrackedDeviceProperty prop, ETrackedPropertyError *pError ) = 0;
+
+	/** Returns a float property. If the property is not available this function will return 0. */
+	virtual float GetFloatTrackedDeviceProperty( ETrackedDeviceProperty prop, ETrackedPropertyError *pError ) = 0;
+
+	/** Returns an int property. If the property is not available this function will return 0. */
+	virtual int32_t GetInt32TrackedDeviceProperty( ETrackedDeviceProperty prop, ETrackedPropertyError *pError ) = 0;
+
+	/** Returns a uint64 property. If the property is not available this function will return 0. */
+	virtual uint64_t GetUint64TrackedDeviceProperty( ETrackedDeviceProperty prop, ETrackedPropertyError *pError ) = 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( ETrackedDeviceProperty prop, ETrackedPropertyError *pError ) = 0;
+
+	/** Returns a string property. If the property is not available this function will return 0 and pError will be 
+	* set to an error. Otherwise it returns the length of the number of bytes necessary to hold this string including 
+	* the trailing null. If the buffer is too small the error will be TrackedProp_BufferTooSmall. Strings will 
+	* generally fit in buffers of k_unTrackingStringSize characters. Drivers may not return strings longer than 
+	* k_unMaxPropertyStringSize. */
+	virtual uint32_t GetStringTrackedDeviceProperty( ETrackedDeviceProperty prop, char *pchValue, uint32_t unBufferSize, ETrackedPropertyError *pError ) = 0;
+
+};
+
+
+
+static const char *ITrackedDeviceServerDriver_Version = "ITrackedDeviceServerDriver_004";
+
+}
+// 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, void *(*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( void *pSharedTextureHandle ) {}
+
+		/** 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( void *pSharedTextureHandles[ 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( void *pSharedTextureHandles[ 2 ], const vr::VRTextureBounds_t( &bounds )[ 2 ], const vr::HmdMatrix34_t *pPose ) {}
+
+		/** Submits queued layers for display. */
+		virtual void Present( void *hSyncTexture ) {}
+
+	};
+
+	static const char *IVRDriverDirectModeComponent_Version = "IVRDriverDirectModeComponent_001";
+
+}
+
+// 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 HasCamera() = 0;
+		virtual bool GetCameraFirmwareDescription( char *pBuffer, uint32_t nBufferLen ) = 0;
+		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() = 0;
+		virtual float GetVideoStreamElapsedTime() = 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 IsVideoStreamPaused() = 0;
+		virtual bool GetCameraDistortion( float flInputU, float flInputV, float *pflOutputU, float *pflOutputV ) = 0;
+		virtual bool GetCameraProjection( float flWidthPixels, float flHeightPixels, float flZNear, float flZFar, vr::HmdMatrix44_t *pProjection ) = 0;
+		virtual bool GetRecommendedCameraUndistortion( uint32_t *pUndistortionWidthPixels, uint32_t *pUndistortionHeightPixels ) = 0;
+		virtual bool SetCameraUndistortion( uint32_t nUndistortionWidthPixels, uint32_t nUndistortionHeightPixels ) = 0;
+		virtual bool GetCameraFirmwareVersion( uint64_t *pFirmwareVersion ) = 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_001";
+}
+// itrackeddevicedriverprovider.h
+namespace vr
+{
+
+class ITrackedDeviceServerDriver;
+struct TrackedDeviceDriverInfo_t;
+struct DriverPose_t;
+
+class IDriverLog
+{
+public:
+	/** Writes a log message to the log file prefixed with the driver name */
+	virtual void Log( const char *pchLogMessage ) = 0;
+};
+
+/** 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 IServerDriverHost
+{
+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 ) = 0;
+
+	/** Notifies the server that a tracked device's pose has been updated */
+	virtual void TrackedDevicePoseUpdated( uint32_t unWhichDevice, const DriverPose_t & newPose ) = 0;
+
+	/** Notifies the server that the property cache for the specified device should be invalidated */
+	virtual void TrackedDevicePropertiesChanged( uint32_t unWhichDevice ) = 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 MC image has been updated for the display attached to the device. This is
+	* only permitted on devices of the HMD class. */
+	virtual void MCImageUpdated() = 0;
+	
+	/** always returns a pointer to a valid interface pointer of IVRSettings */
+	virtual IVRSettings *GetSettings( const char *pchInterfaceVersion ) = 0;
+
+	/** Notifies the server that the physical IPD adjustment has been moved on the HMD */
+	virtual void PhysicalIpdSet( uint32_t unWhichDevice, float fPhysicalIpdMeters ) = 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;
+};
+
+
+/** 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( IDriverLog *pDriverLog, vr::IServerDriverHost *pDriverHost, const char *pchUserDriverConfigDir, const char *pchDriverInstallDir ) = 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;
+
+	/** returns the number of HMDs that this driver manages that are physically connected. */
+	virtual uint32_t GetTrackedDeviceCount() = 0;
+
+	/** returns a single HMD */
+	virtual ITrackedDeviceServerDriver *GetTrackedDeviceDriver( uint32_t unWhich ) = 0;
+
+	/** returns a single HMD by ID */
+	virtual ITrackedDeviceServerDriver* FindTrackedDeviceDriver( const char *pchId ) = 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_003";
+
+
+/** This interface is provided by vrclient to allow the driver call back and query various information */
+class IClientDriverHost
+{
+public:
+	/** 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 string property. If the device index is not valid or the property is not a float 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 generally fit in buffers of k_unTrackingStringSize characters. */
+	virtual uint32_t GetStringTrackedDeviceProperty( vr::TrackedDeviceIndex_t unDeviceIndex, ETrackedDeviceProperty prop, char *pchValue, uint32_t unBufferSize, ETrackedPropertyError *pError = 0L ) = 0;
+
+	/** always returns a pointer to a valid interface pointer of IVRSettings */
+	virtual IVRSettings *GetSettings( const char *pchInterfaceVersion ) = 0; 
+};
+
+
+
+/** This interface must be implemented in each driver. It will be loaded in vrclient.dll */
+class IClientTrackedDeviceProvider
+{
+public:
+	/** initializes the driver. This will be called before any other methods are called,
+	* except BIsHmdPresent(). BIsHmdPresent is called outside of the Init/Cleanup pair.
+	* 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 IClientDriverHost 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( IDriverLog *pDriverLog, vr::IClientDriverHost *pDriverHost, const char *pchUserDriverConfigDir, const char *pchDriverInstallDir ) = 0;
+
+	/** cleans up the driver right before it is unloaded */
+	virtual void Cleanup() = 0;
+
+	/** Called when the client needs to inform an application if an HMD is attached that uses
+	* this driver. This method should be as lightweight as possible and should have no side effects
+	* such as hooking process functions or leaving resources loaded. Init will not be called before 
+	* this method and Cleanup will not be called after it.
+	*/
+	virtual bool BIsHmdPresent( const char *pchUserConfigDir ) = 0;
+
+	/** called when the client inits an HMD to let the client driver know which one is in use */
+	virtual EVRInitError SetDisplayId( const char *pchDisplayId ) = 0;
+
+	/** Returns the stencil mesh information for the current HMD. If this HMD does not have a stencil 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. The pixels covered by this mesh will never be seen by the user after the lens distortion is applied and based on visibility to the panels.
+	* This will improve perf 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.
+	*/
+	virtual HiddenAreaMesh_t GetHiddenAreaMesh( EVREye eEye ) = 0;
+
+	/** Get the MC image for the current HMD.
+	* Returns the size in bytes of the buffer required to hold the specified resource. */
+	virtual uint32_t GetMCImage( uint32_t *pImgWidth, uint32_t *pImgHeight, uint32_t *pChannels, void *pDataBuffer, uint32_t unBufferLen ) = 0;
+};
+
+static const char *IClientTrackedDeviceProvider_Version = "IClientTrackedDeviceProvider_003";
+
+}
+
+
+
+
+namespace vr
+{
+	static const char * const k_InterfaceVersions[] =
+	{
+		IVRSettings_Version,
+		ITrackedDeviceServerDriver_Version,
+		IVRDisplayComponent_Version,
+		IVRDriverDirectModeComponent_Version,
+		IVRControllerComponent_Version,
+		IVRCameraComponent_Version,
+		IServerTrackedDeviceProvider_Version,
+		IClientTrackedDeviceProvider_Version,
+		nullptr
+	};
+}
+// End
+
+#endif // _OPENVR_DRIVER_API
+
+

+ 5 - 1
include/polycode/core/PolyRenderer.h

@@ -130,6 +130,10 @@ namespace Polycode {
 		
 		std::queue<GPUDrawBuffer*> drawBuffers;
 		Polycode::Rectangle viewport;
+
+		void *customFrameFinalizerData;
+		void(*customFrameFinalizer)(void*);
+
 	};
 	
 	class _PolyExport RenderThread : public Threaded {
@@ -167,7 +171,7 @@ namespace Polycode {
 			static const int JOB_DESTROY_PROGRAM = 10;
 			static const int JOB_DESTROY_SUBMESH_BUFFER = 11;
 			static const int JOB_DESTROY_RENDER_BUFFER = 13;
-		
+
 		protected:
         
 			unsigned int frameStart;

+ 77 - 0
include/polycode/modules/VR/PolycodeVR.h

@@ -0,0 +1,77 @@
+/*
+ Copyright (C) 2016 by Ivan Safrin
+ 
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ 
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ 
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+ */
+
+#pragma once
+
+#include <openvr.h>
+#include "Polycode.h"
+
+using namespace Polycode;
+
+class PolycodeVR {
+public:
+	PolycodeVR();
+
+	int shutdownVR();
+	int initVR(Core *core, Scene *targetScene);
+
+	void processEvents();
+	void Update();
+	void Render();
+	void submitToCompositorLeft();
+	void submitToCompositorRight();
+	std::mutex updateMutex;
+
+private:
+
+
+	static void VRRenderCallbackLeft(void *data);
+	static void VRRenderCallbackRight(void *data);
+
+	Matrix4 GetHMDMatrixProjectionEye(vr::Hmd_Eye nEye, Number nearClip, Number farClip);
+	Matrix4 GetHMDMatrixPoseEye(vr::Hmd_Eye nEye);
+	void UpdateHMDMatrixPose();
+	Matrix4 ConvertSteamVRMatrixToMatrix4(const vr::HmdMatrix34_t &matPose);
+
+	void ProcessVREvent(const vr::VREvent_t & event);
+
+	vr::IVRSystem *m_pHMD;
+	vr::TrackedDevicePose_t m_rTrackedDevicePose[vr::k_unMaxTrackedDeviceCount];
+	std::string m_strPoseClasses;
+	Matrix4 m_rmat4DevicePose[vr::k_unMaxTrackedDeviceCount];
+	char m_rDevClassChar[vr::k_unMaxTrackedDeviceCount];
+	Matrix4 m_mat4HMDPose;
+	float lastTicks;
+
+	int m_iTrackedControllerCount;
+	int m_iValidPoseCount;
+	int m_iValidPoseCount_Last;
+
+	Camera *leftEyeCamera;
+	Camera *rightEyeCamera;
+
+	Core *core;
+	Scene *targetScene;
+
+	std::shared_ptr<RenderBuffer> leftRenderTexture;
+	std::shared_ptr<RenderBuffer> rightRenderTexture;
+};

+ 0 - 66
include/polycode/modules/oculusVR/PolycodeOVR.h

@@ -1,66 +0,0 @@
-/*
- Copyright (C) 2014 by Ivan Safrin
- 
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
- 
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
- 
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.
- */
-
-#pragma once
-
- #include "OVR.h"
- #include "Polycode.h"
-
-using namespace Polycode;
-
-class PolycodeOVR {
-	public:
-		PolycodeOVR(Scene *parentScene, Number scale);
-		~PolycodeOVR();
-	
-		void initOVR();
-	
-		Texture *getLeftTexture();
-		Texture *getRightTexture();
-	
-		void Update();
-		Entity *getCameraRoot();
-		Entity *getCameraBase();
-	
-		void setEyeDistanceScale(Number scale);
-		Number getEyeDistanceScale();
-	protected:
-	
-		float	 interpupilaryDistance;
-		Number eyeDistanceScale;
-	
-		OVR::Ptr<OVR::DeviceManager> pManager;
-		OVR::Ptr<OVR::HMDDevice>	 pHMD;
-		OVR::Ptr<OVR::SensorDevice> pSensor;
-		OVR::SensorFusion *SFusion;
-	
-		Entity *cameraRoot;
-		Entity *cameraBase;
-	
-		SceneRenderTexture *leftTexture;
-		SceneRenderTexture *rightTexture;
-	
-		Scene *parentScene; 
-	
-		Camera *leftCamera;
-		Camera *rightCamera;
-};

+ 1 - 1
lib

@@ -1 +1 @@
-Subproject commit cbd0b400c695ee6626d562365990846bc74cfc99
+Subproject commit f36b6f33b9500894b2d8585772ed78ff8e710636

+ 7 - 1
src/core/PolyRenderer.cpp

@@ -33,7 +33,7 @@
 
 using namespace Polycode;
 
-RenderFrame::RenderFrame(const Polycode::Rectangle &viewport) : viewport(viewport) {
+RenderFrame::RenderFrame(const Polycode::Rectangle &viewport) : viewport(viewport), customFrameFinalizer(NULL), customFrameFinalizerData(NULL) {
 	
 }
 
@@ -138,6 +138,12 @@ void RenderThread::updateRenderThread() {
 		
 		endFrame();
 		
+
+		if (nextFrame->customFrameFinalizer) {
+			nextFrame->customFrameFinalizer(nextFrame->customFrameFinalizerData);
+		}
+
+
 		delete nextFrame;
 	}
 	

+ 0 - 1
src/core/PolyScene.cpp

@@ -220,7 +220,6 @@ void Scene::Render(RenderFrame *frame, Camera *targetCamera, std::shared_ptr<Ren
 	}
 	
 	Matrix4 textureMatrix;
-	targetCamera->rebuildTransformMatrix();
 	
 	drawBuffer->projectionMatrix = targetCamera->createProjectionMatrix();
 	drawBuffer->viewMatrix = targetCamera->getConcatenatedMatrix().Inverse();

+ 289 - 0
src/modules/VR/PolycodeVR.cpp

@@ -0,0 +1,289 @@
+/*
+ Copyright (C) 2016 by Ivan Safrin
+ 
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ 
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ 
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+ */
+
+#include "polycode/modules/VR/PolycodeVR.h"
+
+
+PolycodeVR::PolycodeVR() {
+
+}
+
+int PolycodeVR::initVR(Core *core, Scene *targetScene) {
+
+	this->core = core;
+
+	vr::EVRInitError eError = vr::VRInitError_None;
+	m_pHMD = vr::VR_Init(&eError, vr::VRApplication_Scene);
+
+	this->targetScene = targetScene;
+
+	if (eError != vr::VRInitError_None)
+	{
+		Logger::log("Error initializing OpenVR!\n");
+		return 0;
+	}
+
+	if (!vr::VRCompositor())
+	{
+		Logger::log("Compositor initialization failed. See log file for details\n");
+		return 0;
+	}
+
+	uint32_t nRenderWidth;
+	uint32_t nRenderHeight;
+	m_pHMD->GetRecommendedRenderTargetSize(&nRenderWidth, &nRenderHeight);
+
+
+	leftEyeCamera = new Camera();
+	rightEyeCamera = new Camera();
+
+	leftEyeCamera->setProjectionMode(Camera::MANUAL_MATRIX);
+	rightEyeCamera->setProjectionMode(Camera::MANUAL_MATRIX);
+
+	targetScene->addChild(leftEyeCamera);
+	targetScene->addChild(rightEyeCamera);
+
+	leftRenderTexture = std::make_shared<RenderBuffer>(nRenderWidth, nRenderHeight, true, false);
+	rightRenderTexture = std::make_shared<RenderBuffer>(nRenderWidth, nRenderHeight, true, false);
+
+
+	vr::VRCompositor()->FadeGrid(0.0, false);
+	vr::VRCompositor()->WaitGetPoses(m_rTrackedDevicePose, 0, NULL, 0);
+
+	return 1;
+}
+
+int PolycodeVR::shutdownVR() {
+	vr::VR_Shutdown();
+	return 1;
+}
+
+Matrix4 PolycodeVR::GetHMDMatrixProjectionEye(vr::Hmd_Eye nEye, Number nearClip, Number farClip) {
+	if (!m_pHMD) {
+		return Matrix4();
+	}
+
+	vr::HmdMatrix44_t mat = m_pHMD->GetProjectionMatrix(nEye, nearClip, farClip, vr::API_OpenGL);
+
+	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]
+	);
+}
+
+Matrix4 PolycodeVR::GetHMDMatrixPoseEye(vr::Hmd_Eye nEye) {
+	if (!m_pHMD) {
+		return Matrix4();
+	}
+
+	vr::HmdMatrix34_t matEyeRight = m_pHMD->GetEyeToHeadTransform(nEye);
+	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;
+}
+
+Matrix4 PolycodeVR::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;
+}
+
+void PolycodeVR::UpdateHMDMatrixPose() {
+	if (!m_pHMD) {
+		return;
+	}
+
+	//vr::VRCompositor()->WaitGetPoses(m_rTrackedDevicePose, 0, NULL, 0);
+	
+	float frameTime = (float)(core->getRenderer()->getRenderThread()->getFrameInfo().timeTaken)/1000.0f;
+	float fDisplayFrequency = m_pHMD->GetFloatTrackedDeviceProperty(vr::k_unTrackedDeviceIndex_Hmd, vr::Prop_DisplayFrequency_Float);
+	float fFrameDuration = 1.f / fDisplayFrequency;
+	float fVsyncToPhotons = m_pHMD->GetFloatTrackedDeviceProperty(vr::k_unTrackedDeviceIndex_Hmd, vr::Prop_SecondsFromVsyncToPhotons_Float);
+	float fSecondsSinceLastVsync = core->getTicksFloat() - lastTicks;
+	float fPredictedSecondsFromNow = fFrameDuration - fSecondsSinceLastVsync + fVsyncToPhotons;
+
+	m_pHMD->GetDeviceToAbsoluteTrackingPose(vr::TrackingUniverseStanding, fPredictedSecondsFromNow, m_rTrackedDevicePose, vr::k_unMaxTrackedDeviceCount);
+	
+	vr::VRCompositor()->WaitGetPoses(NULL, 0, m_rTrackedDevicePose, vr::k_unMaxTrackedDeviceCount);
+	//vr::VRCompositor()->WaitGetPoses(m_rTrackedDevicePose, vr::k_unMaxTrackedDeviceCount, NULL, 0);
+
+
+	m_iValidPoseCount = 0;
+	m_strPoseClasses = "";
+	for (int nDevice = 0; nDevice < vr::k_unMaxTrackedDeviceCount; ++nDevice)
+	{
+		if (m_rTrackedDevicePose[nDevice].bPoseIsValid)
+		{
+			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_Other:             m_rDevClassChar[nDevice] = 'O'; break;
+				case vr::TrackedDeviceClass_TrackingReference: m_rDevClassChar[nDevice] = 'T'; break;
+				default:                                       m_rDevClassChar[nDevice] = '?'; break;
+				}
+			}
+			m_strPoseClasses += m_rDevClassChar[nDevice];
+		}
+	}
+
+	if (m_rTrackedDevicePose[vr::k_unTrackedDeviceIndex_Hmd].bPoseIsValid)
+	{
+		m_mat4HMDPose = m_rmat4DevicePose[vr::k_unTrackedDeviceIndex_Hmd];
+	}
+}
+
+
+void PolycodeVR::ProcessVREvent(const vr::VREvent_t & event)
+{
+	switch (event.eventType)
+	{
+	case vr::VREvent_TrackedDeviceActivated:
+	{
+		//SetupRenderModelForTrackedDevice(event.trackedDeviceIndex);
+		//dprintf("Device %u attached. Setting up render model.\n", event.trackedDeviceIndex);
+	}
+	break;
+	case vr::VREvent_TrackedDeviceDeactivated:
+	{
+		//dprintf("Device %u detached.\n", event.trackedDeviceIndex);
+	}
+	break;
+	case vr::VREvent_TrackedDeviceUpdated:
+	{
+		//dprintf("Device %u updated.\n", event.trackedDeviceIndex);
+	}
+	break;
+	}
+}
+
+void PolycodeVR::processEvents() {
+	if (!m_pHMD) {
+		return;
+	}
+
+	vr::VREvent_t event;
+	while (m_pHMD->PollNextEvent(&event, sizeof(event)))
+	{
+		ProcessVREvent(event);
+	}
+
+	for (vr::TrackedDeviceIndex_t unDevice = 0; unDevice < vr::k_unMaxTrackedDeviceCount; unDevice++)
+	{
+		vr::VRControllerState_t state;
+		if (m_pHMD->GetControllerState(unDevice, &state))
+		{
+			//m_rbShowTrackedDevice[unDevice] = state.ulButtonPressed == 0;
+		}
+	}
+
+}
+
+void PolycodeVR::Update() {
+	if (!m_pHMD) {
+		return;
+	}
+
+	UpdateHMDMatrixPose();
+	processEvents();
+
+
+	Matrix4 mat4ProjectionLeft = GetHMDMatrixProjectionEye(vr::Eye_Left, leftEyeCamera->getNearClippingPlane(), leftEyeCamera->getFarClippingPlane());
+	Matrix4 mat4ProjectionRight = GetHMDMatrixProjectionEye(vr::Eye_Right, rightEyeCamera->getNearClippingPlane(), rightEyeCamera->getFarClippingPlane());
+	Matrix4 mat4eyePosLeft = GetHMDMatrixPoseEye(vr::Eye_Left) * m_mat4HMDPose;
+	Matrix4 mat4eyePosRight = GetHMDMatrixPoseEye(vr::Eye_Right) * m_mat4HMDPose;
+
+	leftEyeCamera->setCustomProjectionMatrix(mat4ProjectionLeft);
+	rightEyeCamera->setCustomProjectionMatrix(mat4ProjectionRight);
+
+	targetScene->getDefaultCamera()->setTransformByMatrixPure(m_mat4HMDPose);
+
+	leftEyeCamera->setTransformByMatrixPure(mat4eyePosLeft);
+	rightEyeCamera->setTransformByMatrixPure(mat4eyePosRight);
+
+;
+
+}
+
+void PolycodeVR::Render() {
+	RenderFrame *frame = new RenderFrame(leftEyeCamera->getViewport());
+	frame->customFrameFinalizer = &PolycodeVR::VRRenderCallbackLeft;
+	frame->customFrameFinalizerData = (void*)this;
+	targetScene->Render(frame, leftEyeCamera, leftRenderTexture, NULL, false);
+	core->getRenderer()->submitRenderFrame(frame);
+
+	frame = new RenderFrame(rightEyeCamera->getViewport());
+	frame->customFrameFinalizer = &PolycodeVR::VRRenderCallbackRight;
+	frame->customFrameFinalizerData = (void*)this;
+	targetScene->Render(frame, rightEyeCamera, rightRenderTexture, NULL, false);
+	core->getRenderer()->submitRenderFrame(frame);
+}
+
+
+void PolycodeVR::submitToCompositorRight() {
+	if (rightRenderTexture->colorTexture) {
+		if (rightRenderTexture->colorTexture->platformData.data) {
+			uint32_t val = *((uint32_t*)rightRenderTexture->colorTexture->platformData.data);
+			vr::Texture_t rightEyeTexture = { (void*)val, vr::API_OpenGL, vr::ColorSpace_Gamma };
+			vr::VRCompositor()->Submit(vr::Eye_Right, &rightEyeTexture);
+		}
+	}
+
+	lastTicks = core->getTicksFloat();
+}
+
+void PolycodeVR::submitToCompositorLeft() {
+	if (leftRenderTexture->colorTexture) {
+		if (leftRenderTexture->colorTexture->platformData.data) {
+			uint32_t val = *((uint32_t*)leftRenderTexture->colorTexture->platformData.data);
+			vr::Texture_t leftEyeTexture = { (void*)val, vr::API_OpenGL, vr::ColorSpace_Gamma };
+			vr::VRCompositor()->Submit(vr::Eye_Left, &leftEyeTexture);
+		}
+	}
+}
+
+void PolycodeVR::VRRenderCallbackRight(void *data) {
+	PolycodeVR *vr = (PolycodeVR*)data;
+	vr->submitToCompositorRight();
+}
+
+void PolycodeVR::VRRenderCallbackLeft(void *data) {
+	PolycodeVR *vr = (PolycodeVR*)data;
+	vr->submitToCompositorLeft();
+}

+ 0 - 181
src/modules/oculusVR/PolycodeOVR.cpp

@@ -1,181 +0,0 @@
-/*
- Copyright (C) 2014 by Ivan Safrin
- 
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
- 
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
- 
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.
- */
-
-#include "PolycodeOVR.h"
-
-PolycodeOVR::PolycodeOVR(Scene *parentScene, Number eyeDistanceScale) {
-	
-	this->eyeDistanceScale = eyeDistanceScale;
-	this->parentScene = parentScene;
-	
-	cameraRoot = new Entity();
-	
-	cameraBase = new Entity();
-	cameraRoot->addChild(cameraBase);
-	
-	leftCamera = new Camera(parentScene);
-	rightCamera = new Camera(parentScene);
-	
-	leftCamera->setClippingPlanes(0.001, 100.0);
-	leftCamera->frustumCulling = false;
-	rightCamera->setClippingPlanes(0.001, 100.0);
-	rightCamera->frustumCulling = false;
-	
-	cameraBase->addChild(leftCamera);
-	cameraBase->addChild(rightCamera);
-	
-	initOVR();
-}
-
-void PolycodeOVR::initOVR() {
-	OVR::System::Init(OVR::Log::ConfigureDefaultLog(OVR::LogMask_All));
-	
-	pManager = *OVR::DeviceManager::Create();
-	pHMD	 = *pManager->EnumerateDevices<OVR::HMDDevice>().CreateDevice();
-	
-	if(!pHMD) {
-		Logger::log("Could not detect Oculus device\n");
-		return;
-	}
-	
-	pSensor = *pHMD->GetSensor();
-	if (!pSensor) {
-		Logger::log("Could not get Oculus sensor\n");
-		return;
-	}
-	
-	SFusion = new OVR::SensorFusion();
-	SFusion->AttachToSensor(pSensor);
-	
-	OVR::HMDInfo hmd;
-	if (!pHMD->GetDeviceInfo(&hmd)) {
-		Logger::log("Unable to get Oculus device information.\n");
-		return;
-	}
-	
-	leftTexture = new SceneRenderTexture(parentScene, leftCamera, hmd.HResolution/2, hmd.VResolution);
-	rightTexture = new SceneRenderTexture(parentScene, rightCamera, hmd.HResolution/2, hmd.VResolution);
-	
-	float halfScreenDistance = (hmd.VScreenSize / 2);
-	float yfov = 2.0f * atan(halfScreenDistance/hmd.EyeToScreenDistance);
-	
-//	  leftCamera->setFOV(yfov);
-//	  rightCamera->setFOV(yfov);
-	
-	float aspectRatio = float(hmd.HResolution * 0.5f) / float(hmd.VResolution);
-	
-	float viewCenter			 = hmd.HScreenSize * 0.25f;
-	float eyeProjectionShift	 = viewCenter - hmd.LensSeparationDistance*0.5f;
-	float projectionCenterOffset = 4.0f * eyeProjectionShift / hmd.HScreenSize;
-	
-	OVR::Matrix4f projCenter = OVR::Matrix4f::PerspectiveRH(yfov, aspectRatio, 0.3f, 1000.0f);
-	OVR::Matrix4f projLeft	 = OVR::Matrix4f::Translation(projectionCenterOffset, 0, 0) * projCenter;
-	OVR::Matrix4f projRight	 = OVR::Matrix4f::Translation(-projectionCenterOffset, 0, 0) * projCenter;
-	
-	Matrix4 projLeftPolycode(projLeft.M[0][0], projLeft.M[1][0], projLeft.M[2][0], projLeft.M[3][0],
-							 projLeft.M[0][1], projLeft.M[1][1], projLeft.M[2][1], projLeft.M[3][1],
-							 projLeft.M[0][2], projLeft.M[1][2], projLeft.M[2][2], projLeft.M[3][2],
-							 projLeft.M[0][3], projLeft.M[1][3], projLeft.M[2][3], projLeft.M[3][3]);
-	
-	leftCamera->setProjectionMode(Camera::MANUAL_MATRIX);
-	leftCamera->setProjectionMatrix(projLeftPolycode);
-	
-
-	Matrix4 projRightPolycode(projRight.M[0][0], projRight.M[1][0], projRight.M[2][0], projRight.M[3][0],
-							  projRight.M[0][1], projRight.M[1][1], projRight.M[2][1], projRight.M[3][1],
-							  projRight.M[0][2], projRight.M[1][2], projRight.M[2][2], projRight.M[3][2],
-							  projRight.M[0][3], projRight.M[1][3], projRight.M[2][3], projRight.M[3][3]);
-	
-	rightCamera->setProjectionMode(Camera::MANUAL_MATRIX);
-	rightCamera->setProjectionMatrix(projRightPolycode);
-	
-	interpupilaryDistance = hmd.InterpupillaryDistance;
-	float halfIPD  = interpupilaryDistance * 0.5f * eyeDistanceScale;
-	leftCamera->setPosition(-halfIPD, 0.0, 0.0);
-	rightCamera->setPosition(halfIPD, 0.0, 0.0);
-	
-	Number scale = 1.0;
-	
-	leftCamera->setPostFilterByName("VRCorrect");
-	leftCamera->getLocalShaderOptions()[0]->addParam(ProgramParam::PARAM_VECTOR2, "screenCenter")->setVector2(Vector2(0.5, 0.5));
-	leftCamera->getLocalShaderOptions()[0]->addParam(ProgramParam::PARAM_VECTOR2, "lensCenter")->setVector2(Vector2(0.5, 0.5));
-	leftCamera->getLocalShaderOptions()[0]->addParam(ProgramParam::PARAM_VECTOR2, "scale")->setVector2(Vector2(0.5f / scale, 0.5f * aspectRatio / scale));
-	leftCamera->getLocalShaderOptions()[0]->addParam(ProgramParam::PARAM_VECTOR2, "scaleIn")->setVector2(Vector2(2.0f, 2.0f / aspectRatio));
-	leftCamera->getLocalShaderOptions()[0]->addParam(ProgramParam::PARAM_COLOR, "hmdWarpParam")->setColor(Color(hmd.DistortionK[0], hmd.DistortionK[1], hmd.DistortionK[2], hmd.DistortionK[3]));
-
-	
-	rightCamera->setPostFilterByName("VRCorrect");
-	rightCamera->getLocalShaderOptions()[0]->addParam(ProgramParam::PARAM_VECTOR2, "screenCenter")->setVector2(Vector2(0.5, 0.5));
-	rightCamera->getLocalShaderOptions()[0]->addParam(ProgramParam::PARAM_VECTOR2, "lensCenter")->setVector2(Vector2(0.5, 0.5));
-	rightCamera->getLocalShaderOptions()[0]->addParam(ProgramParam::PARAM_VECTOR2, "scale")->setVector2(Vector2(0.5f / scale, 0.5f * aspectRatio / scale));
-	rightCamera->getLocalShaderOptions()[0]->addParam(ProgramParam::PARAM_VECTOR2, "scaleIn")->setVector2(Vector2(2.0f, 2.0f / aspectRatio));
-	rightCamera->getLocalShaderOptions()[0]->addParam(ProgramParam::PARAM_COLOR, "hmdWarpParam")->setColor(Color(hmd.DistortionK[0], hmd.DistortionK[1], hmd.DistortionK[2], hmd.DistortionK[3]));
-	
-}
-
-Number PolycodeOVR::getEyeDistanceScale() {
-	return eyeDistanceScale;
-}
-
-void PolycodeOVR::setEyeDistanceScale(Number scale) {
-	this->eyeDistanceScale = scale;
-	float halfIPD  = interpupilaryDistance * 0.5f * eyeDistanceScale;
-	leftCamera->setPosition(-halfIPD, 0.0, 0.0);
-	rightCamera->setPosition(halfIPD, 0.0, 0.0);
-
-	
-}
-
-Texture *PolycodeOVR::getLeftTexture() {
-	return leftTexture->getTargetTexture();
-}
-
-Texture *PolycodeOVR::getRightTexture() {
-	return rightTexture->getTargetTexture();
-}
-
-void PolycodeOVR::Update() {
-	Quaternion q;
-	OVR::Quatf ovrQ = SFusion->GetOrientation();
-	q.set(ovrQ.w, ovrQ.x, ovrQ.y, ovrQ.z);
-	cameraBase->setRotationByQuaternion(q);
-}
-
-Entity *PolycodeOVR::getCameraRoot() {
-	return cameraRoot;
-}
-
-Entity *PolycodeOVR::getCameraBase() {
-	return cameraBase;
-}
-
-PolycodeOVR::~PolycodeOVR() {
-	if(cameraRoot->getParentEntity()) {
-		cameraRoot->getParentEntity()->removeChild(cameraRoot);
-	}
-	delete cameraRoot;
-	delete leftCamera;
-	delete rightCamera;
-	delete SFusion;
-	delete leftTexture;
-	delete rightTexture;
-}