This website uses cookies to improve our services and deliver relevant ads.
By interacting with this site, you agree to this use. For more information, see our Cookies Policy

HMD Management

ovrHmdDesc
Returns information about the current HMD.
unsigned int
Returns the number of attached trackers.
ovrTrackerDesc
ovr_GetTrackerDesc ( ovrSession session, unsigned int trackerDescIndex )
Returns a given attached tracker description.
ovrResult
ovr_Create ( ovrSession * pSession, ovrGraphicsLuid * pLuid )
Creates a handle to a VR session.
void
ovr_Destroy ( ovrSession session )
Destroys the session.
ovrResult
ovr_GetSessionStatus ( ovrSession session, ovrSessionStatus * sessionStatus )
Returns status information for the application.
ovrResult
ovr_IsExtensionSupported ( ovrSession session, ovrExtensions extension, ovrBool * outExtensionSupported )
Query extension support status.
ovrResult
Enable extension.

Tracking

ovrResult
Sets the tracking origin type.
ovrTrackingOrigin
Gets the tracking origin state.
ovrResult
Re-centers the sensor position and orientation.
ovrResult
Allows manually tweaking the sensor position and orientation.
void
Clears the ShouldRecenter status bit in ovrSessionStatus.
ovrTrackingState
ovr_GetTrackingState ( ovrSession session, double absTime, ovrBool latencyMarker )
Returns tracking state reading based on the specified absolute system time.
ovrResult
ovr_GetDevicePoses ( ovrSession session, ovrTrackedDeviceType * deviceTypes, int deviceCount, double absTime, ovrPoseStatef * outDevicePoses )
Returns an array of poses, where each pose matches a device type provided by the deviceTypes array parameter.
ovrTrackerPose
ovr_GetTrackerPose ( ovrSession session, unsigned int trackerPoseIndex )
Returns the ovrTrackerPose for the given attached tracker.
ovrResult
ovr_GetInputState ( ovrSession session, ovrControllerType controllerType, ovrInputState * inputState )
Returns the most recent input state for controllers, without positional tracking info.
unsigned int
Returns controller types connected to the system OR'ed together.
ovrTouchHapticsDesc
Gets information about Haptics engine for the specified Touch controller.
ovrResult
ovr_SetControllerVibration ( ovrSession session, ovrControllerType controllerType, float frequency, float amplitude )
Sets constant vibration (with specified frequency and amplitude) to a controller.
ovrResult
ovr_SubmitControllerVibration ( ovrSession session, ovrControllerType controllerType, const ovrHapticsBuffer * buffer )
Submits a Haptics buffer (used for vibration) to Touch (only) controllers.
ovrResult
Gets the Haptics engine playback state of a specific Touch controller.
ovrResult
ovr_TestBoundary ( ovrSession session, ovrTrackedDeviceType deviceBitmask, ovrBoundaryType boundaryType, ovrBoundaryTestResult * outTestResult )
Tests collision/proximity of position tracked devices (e.g.
ovrResult
ovr_TestBoundaryPoint ( ovrSession session, const ovrVector3f * point, ovrBoundaryType singleBoundaryType, ovrBoundaryTestResult * outTestResult )
Tests collision/proximity of a 3D point against the Boundary System.
ovrResult
Sets the look and feel of the Boundary System.
ovrResult
Resets the look and feel of the Boundary System to its default state.
ovrResult
ovr_GetBoundaryGeometry ( ovrSession session, ovrBoundaryType boundaryType, ovrVector3f * outFloorPoints, int * outFloorPointsCount )
Gets the geometry of the Boundary System's "play area" or "outer boundary" as 3D floor points.
ovrResult
ovr_GetBoundaryDimensions ( ovrSession session, ovrBoundaryType boundaryType, ovrVector3f * outDimensions )
Gets the dimension of the Boundary System's "play area" or "outer boundary".
ovrResult
ovr_GetBoundaryVisible ( ovrSession session, ovrBool * outIsVisible )
Returns if the boundary is currently visible.
ovrResult
Requests boundary to be visible.

Mixed reality capture support

ovrResult
ovr_GetExternalCameras ( ovrSession session, ovrExternalCamera * cameras, unsigned int * inoutCameraCount )
Returns the number of camera properties of all cameras.
ovrResult
ovr_SetExternalCameraProperties ( ovrSession session, const char * name, const ovrCameraIntrinsics *const intrinsics, const ovrCameraExtrinsics *const extrinsics )
Sets the camera intrinsics and/or extrinsics stored for the cameraName camera Names must be < 32 characters and null-terminated.

User Defined

enum
@0 {
}
Specifies the maximum number of layers supported by ovr_SubmitFrame.
enum
ovrLayerType {
}
Describes layer types that can be passed to ovr_SubmitFrame.
enum
ovrLayerFlags {
}
Identifies flags used by ovrLayerHeader and which are passed to ovr_SubmitFrame.
enum
ovrTextureLayout {
}
Describes eye texture layouts.

SDK Distortion Rendering

ovrResult
ovr_GetTextureSwapChainLength ( ovrSession session, ovrTextureSwapChain chain, int * out_Length )
TextureSwapChain creation is rendering API-specific.
ovrResult
ovr_GetTextureSwapChainCurrentIndex ( ovrSession session, ovrTextureSwapChain chain, int * out_Index )
Gets the current index in an ovrTextureSwapChain.
ovrResult
ovr_GetTextureSwapChainDesc ( ovrSession session, ovrTextureSwapChain chain, ovrTextureSwapChainDesc * out_Desc )
Gets the description of the buffers in an ovrTextureSwapChain.
ovrResult
ovr_CommitTextureSwapChain ( ovrSession session, ovrTextureSwapChain chain )
Commits any pending changes to an ovrTextureSwapChain, and advances its current index.
void
ovr_DestroyTextureSwapChain ( ovrSession session, ovrTextureSwapChain chain )
Destroys an ovrTextureSwapChain and frees all the resources associated with it.
void
ovr_DestroyMirrorTexture ( ovrSession session, ovrMirrorTexture mirrorTexture )
MirrorTexture creation is rendering API-specific.
ovrSizei
ovr_GetFovTextureSize ( ovrSession session, ovrEyeType eye, ovrFovPort fov, float pixelsPerDisplayPixel )
Calculates the recommended viewport size for rendering a given eye within the HMD with a given FOV cone.
ovrEyeRenderDesc
Computes the distortion viewport, view adjust, and other rendering parameters for the specified eye.
ovrResult
ovr_WaitToBeginFrame ( ovrSession session, long long frameIndex )
Waits until surfaces are available and it is time to begin rendering the frame.
ovrResult
ovr_BeginFrame ( ovrSession session, long long frameIndex )
Called from render thread before application begins rendering.
ovrResult
ovr_EndFrame ( ovrSession session, long long frameIndex, const ovrViewScaleDesc * viewScaleDesc, ovrLayerHeader const *const * layerPtrList, unsigned int layerCount )
Called from render thread after application has finished rendering.
ovrResult
ovr_SubmitFrame ( ovrSession session, long long frameIndex, const ovrViewScaleDesc * viewScaleDesc, ovrLayerHeader const *const * layerPtrList, unsigned int layerCount )
Submits layers for distortion and display.

Frame Timing

enum
@1 {
}
Maximum number of frames of performance stats provided back to the caller of ovr_GetPerfStats.
enum
ovrPerfHudMode {
}
Performance HUD enables the HMD user to see information critical to the real-time operation of the VR application such as latency timing, and CPU & GPU performance metrics.
enum
ovrLayerHudMode {
}
Layer HUD enables the HMD user to see information about a layer.
ovrResult
ovr_GetPerfStats ( ovrSession session, ovrPerfStats * outStats )
Retrieves performance stats for the VR app as well as the SDK compositor.
ovrResult
Resets the accumulated stats reported in each ovrPerfStatsPerCompositorFrame back to zero.
double
ovr_GetPredictedDisplayTime ( ovrSession session, long long frameIndex )
Gets the time of the specified frame midpoint.
double
Returns global, absolute high-resolution time in seconds.

Property Access

ovrBool
ovr_GetBool ( ovrSession session, const char * propertyName, ovrBool defaultVal )
Reads a boolean property.
ovrBool
ovr_SetBool ( ovrSession session, const char * propertyName, ovrBool value )
Writes or creates a boolean property.
int
ovr_GetInt ( ovrSession session, const char * propertyName, int defaultVal )
Reads an integer property.
ovrBool
ovr_SetInt ( ovrSession session, const char * propertyName, int value )
Writes or creates an integer property.
float
ovr_GetFloat ( ovrSession session, const char * propertyName, float defaultVal )
Reads a float property.
ovrBool
ovr_SetFloat ( ovrSession session, const char * propertyName, float value )
Writes or creates a float property.
unsigned int
ovr_GetFloatArray ( ovrSession session, const char * propertyName, float values, unsigned int valuesCapacity )
Reads a float array property.
ovrBool
ovr_SetFloatArray ( ovrSession session, const char * propertyName, const float values, unsigned int valuesSize )
Writes or creates a float array property.
const char *
ovr_GetString ( ovrSession session, const char * propertyName, const char * defaultVal )
Reads a string property.
ovrBool
ovr_SetString ( ovrSession session, const char * propertyName, const char * value )
Writes or creates a string property.

Macros

#define
OVR_OS_WIN32
#define
OVR_CDECL
LibOVR calling convention for 32-bit Windows builds.
#define
OVR_EXTERN_C
Defined as extern "C" when built from C++ code.
#define
OVR_CC_HAS_FEATURE
Provided for backward compatibility with older versions of this library.
#define
OVR_SA_UNUSED
#define
OVR_SA_PASTE
#define
OVR_SA_HELP
#define
OVR_STATIC_ASSERT
#define
OVR_UNUSED_STRUCT_PAD
Defines explicitly unused space for a struct.
#define
OVR_PTR_SIZE
Specifies the size of a pointer on the given platform.
#define
OVR_ON32
#define
OVR_ON64
#define
ovrFalse
ovrBool value of false.
#define
ovrTrue
ovrBool value of true.
#define
VK_DEFINE_HANDLE
Fallback definitions for when the vulkan header isn't being included.
#define
VK_DEFINE_NON_DISPATCHABLE_HANDLE
#define
OVR_HAPTICS_BUFFER_SAMPLES_MAX
Maximum number of samples in ovrHapticsBuffer.
#define
OVR_MAX_EXTERNAL_CAMERA_COUNT
#define
OVR_EXTERNAL_CAMERA_NAME_SIZE

Enumerations

enum
ovrHmdType {
}
Enumerates all HMD types that we support.
enum
ovrHmdCaps {
}
HMD capability bits reported by device.
enum
ovrTrackingCaps {
}
Tracking capability bits reported by the device.
enum
ovrExtensions {
}
Optional extensions.
enum
ovrEyeType {
}
Specifies which eye is being used for rendering.
enum
ovrTrackingOrigin {
}
Specifies the coordinate system ovrTrackingState returns tracking poses in.
enum
ovrStatusBits {
}
Bit flags describing the current status of sensor tracking.
enum
ovrTrackerFlags {
}
Specifies sensor flags.
enum
ovrTextureType {
}
The type of texture resource.
enum
ovrTextureBindFlags {
}
The bindings required for texture swap chain.
enum
ovrTextureFormat {
ovrTextureFormat.OVR_FORMAT_UNKNOWN = 0, ovrTextureFormat.OVR_FORMAT_B5G6R5_UNORM = 1, ovrTextureFormat.OVR_FORMAT_B5G5R5A1_UNORM = 2, ovrTextureFormat.OVR_FORMAT_B4G4R4A4_UNORM = 3, ovrTextureFormat.OVR_FORMAT_R8G8B8A8_UNORM = 4, ovrTextureFormat.OVR_FORMAT_R8G8B8A8_UNORM_SRGB = 5, ovrTextureFormat.OVR_FORMAT_B8G8R8A8_UNORM = 6, ovrTextureFormat.OVR_FORMAT_B8G8R8_UNORM = 27, ovrTextureFormat.OVR_FORMAT_B8G8R8A8_UNORM_SRGB = 7, ovrTextureFormat.OVR_FORMAT_B8G8R8X8_UNORM = 8, ovrTextureFormat.OVR_FORMAT_B8G8R8X8_UNORM_SRGB = 9, ovrTextureFormat.OVR_FORMAT_R16G16B16A16_FLOAT = 10, ovrTextureFormat.OVR_FORMAT_R11G11B10_FLOAT = 25, ovrTextureFormat.OVR_FORMAT_D16_UNORM = 11, ovrTextureFormat.OVR_FORMAT_D24_UNORM_S8_UINT = 12, ovrTextureFormat.OVR_FORMAT_D32_FLOAT = 13, ovrTextureFormat.OVR_FORMAT_D32_FLOAT_S8X24_UINT = 14, ovrTextureFormat.OVR_FORMAT_BC1_UNORM = 15, ovrTextureFormat.OVR_FORMAT_BC1_UNORM_SRGB = 16, ovrTextureFormat.OVR_FORMAT_BC2_UNORM = 17, ovrTextureFormat.OVR_FORMAT_BC2_UNORM_SRGB = 18, ovrTextureFormat.OVR_FORMAT_BC3_UNORM = 19, ovrTextureFormat.OVR_FORMAT_BC3_UNORM_SRGB = 20, ovrTextureFormat.OVR_FORMAT_BC6H_UF16 = 21, ovrTextureFormat.OVR_FORMAT_BC6H_SF16 = 22, ovrTextureFormat.OVR_FORMAT_BC7_UNORM = 23, ovrTextureFormat.OVR_FORMAT_BC7_UNORM_SRGB = 24, ovrTextureFormat.OVR_FORMAT_LAST , ovrTextureFormat.OVR_FORMAT_ENUMSIZE = 0x7fffffff
}
The format of a texture.
enum
ovrTextureFlags {
}
Misc flags overriding particular behaviors of a texture swap chain.
enum
ovrMirrorOptions {
}
Bit flags used as part of ovrMirrorTextureDesc's MirrorOptions field.
enum
ovrViewportStencilType {
}
enum
ovrButton {
ovrButton.ovrButton_A = 0x00000001, ovrButton.ovrButton_B = 0x00000002, ovrButton.ovrButton_RThumb = 0x00000004, ovrButton.ovrButton_RShoulder = 0x00000008, ovrButton.ovrButton_X = 0x00000100, ovrButton.ovrButton_Y = 0x00000200, ovrButton.ovrButton_LThumb = 0x00000400, ovrButton.ovrButton_LShoulder = 0x00000800, ovrButton.ovrButton_Up = 0x00010000, ovrButton.ovrButton_Down = 0x00020000, ovrButton.ovrButton_Left = 0x00040000, ovrButton.ovrButton_Right = 0x00080000, ovrButton.ovrButton_Enter = 0x00100000, ovrButton.ovrButton_Back = 0x00200000, ovrButton.ovrButton_VolUp = 0x00400000, ovrButton.ovrButton_VolDown = 0x00800000, ovrButton.ovrButton_Home = 0x01000000, ovrButton.ovrButton_Private = ovrButton_VolUp | ovrButton_VolDown | ovrButton_Home, ovrButton.ovrButton_RMask = ovrButton_A | ovrButton_B | ovrButton_RThumb | ovrButton_RShoulder, ovrButton.ovrButton_LMask = ovrButton_X | ovrButton_Y | ovrButton_LThumb | ovrButton_LShoulder | ovrButton_Enter, ovrButton.ovrButton_EnumSize = 0x7fffffff
}
Describes button input types.
enum
ovrTouch {
ovrTouch.ovrTouch_A = ovrButton_A, ovrTouch.ovrTouch_B = ovrButton_B, ovrTouch.ovrTouch_RThumb = ovrButton_RThumb, ovrTouch.ovrTouch_RThumbRest = 0x00000008, ovrTouch.ovrTouch_RIndexTrigger = 0x00000010, ovrTouch.ovrTouch_RButtonMask = ovrTouch_A | ovrTouch_B | ovrTouch_RThumb | ovrTouch_RThumbRest | ovrTouch_RIndexTrigger, ovrTouch.ovrTouch_X = ovrButton_X, ovrTouch.ovrTouch_Y = ovrButton_Y, ovrTouch.ovrTouch_LThumb = ovrButton_LThumb, ovrTouch.ovrTouch_LThumbRest = 0x00000800, ovrTouch.ovrTouch_LIndexTrigger = 0x00001000, ovrTouch.ovrTouch_LButtonMask = ovrTouch_X | ovrTouch_Y | ovrTouch_LThumb | ovrTouch_LThumbRest | ovrTouch_LIndexTrigger, ovrTouch.ovrTouch_RIndexPointing = 0x00000020, ovrTouch.ovrTouch_RThumbUp = 0x00000040, ovrTouch.ovrTouch_LIndexPointing = 0x00002000, ovrTouch.ovrTouch_LThumbUp = 0x00004000, ovrTouch.ovrTouch_RPoseMask = ovrTouch_RIndexPointing | ovrTouch_RThumbUp, ovrTouch.ovrTouch_LPoseMask = ovrTouch_LIndexPointing | ovrTouch_LThumbUp, ovrTouch.ovrTouch_EnumSize = 0x7fffffff
}
Describes touch input types.
enum
ovrControllerType {
}
Specifies which controller is connected; multiple can be connected at once.
enum
ovrHapticsBufferSubmitMode {
}
Haptics buffer submit mode.
enum
ovrTrackedDeviceType {
}
Position tracked devices.
enum
ovrBoundaryType {
}
Boundary types that specified while using the boundary system.
enum
ovrHandType {
}
Provides names for the left and right hand array indexes.
enum
ovrCameraStatusFlags {
}
enum
ovrInitFlags {
}
Initialization flags.
enum
ovrLogLevel {
}
Logging levels.
enum
ovrDebugHudStereoMode {
}
Debug HUD is provided to help developers gauge and debug the fidelity of their app's stereo rendering characteristics.

Typedefs

char
ovrBool ( )
Boolean type.
struct ovrHmdStruct *
Used as an opaque pointer to an OVR session.
uint32_t
struct ovrTextureSwapChainData *
struct ovrMirrorTextureData *
void(OVR_CDECL *
Signature of the logging callback function pointer type.

Functions

ovrResult
ovr_Initialize ( const ovrInitParams * params )
Initializes LibOVR.
void
Shuts down LibOVR.
void
Returns information about the most recent failed return value by the current thread for this library.
const char *
Returns the version string representing the LibOVRRT version.
int
ovr_TraceMessage ( int level, const char * message )
Writes a message string to the LibOVR tracing mechanism (if enabled).
ovrResult
ovr_IdentifyClient ( const char * identity )
Identify client application info.

Detailed Description

Copyright 2015 Oculus VR, LLC All Rights reserved.

HMD Management Documentation

ovrHmdDesc ovr_GetHmdDesc ( ovrSession session )
Returns information about the current HMD.
ovr_Initialize must be called prior to calling this function, otherwise ovrHmdDesc::Type will be set to ovrHmd_None without checking for the HMD presence. session Specifies an ovrSession previously returned by ovr_Create() or NULL. Returns an ovrHmdDesc. If invoked with NULL session argument, ovrHmdDesc::Type set to ovrHmd_None indicates that the HMD is not connected.
unsigned int ovr_GetTrackerCount ( ovrSession session )
Returns the number of attached trackers.
The number of trackers may change at any time, so this function should be called before use as opposed to once on startup. session Specifies an ovrSession previously returned by ovr_Create. Returns unsigned int count.
ovrTrackerDesc ovr_GetTrackerDesc ( ovrSession session, unsigned int trackerDescIndex )
Returns a given attached tracker description.
ovr_Initialize must have first been called in order for this to succeed, otherwise the returned trackerDescArray will be zero-initialized. The data returned by this function can change at runtime. session Specifies an ovrSession previously returned by ovr_Create. trackerDescIndex Specifies a tracker index. The valid indexes are in the range of 0 to the tracker count returned by ovr_GetTrackerCount. Returns ovrTrackerDesc. An empty ovrTrackerDesc will be returned if trackerDescIndex is out of range. ovrTrackerDesc, ovr_GetTrackerCount
ovrResult ovr_Create ( ovrSession * pSession, ovrGraphicsLuid * pLuid )
Creates a handle to a VR session.
Upon success the returned ovrSession must be eventually freed with ovr_Destroy when it is no longer needed. A second call to ovr_Create will result in an error return value if the previous session has not been destroyed. pSession Provides a pointer to an ovrSession which will be written to upon success. pLuid Provides a system specific graphics adapter identifier that locates which graphics adapter has the HMD attached. This must match the adapter used by the application or no rendering output will be possible. This is important for stability on multi-adapter systems. An application that simply chooses the default adapter will not run reliably on multi-adapter systems. Returns an ovrResult indicating success or failure. Upon failure the returned ovrSession will be NULL. Example code ovrSessionsession; ovrGraphicsLuidluid; ovrResultresult=ovr_Create(&session,&luid); if(OVR_FAILURE(result)) ... ovr_Destroy
void ovr_Destroy ( ovrSession session )
Destroys the session.
session Specifies an ovrSession previously returned by ovr_Create. ovr_Create
ovrResult ovr_GetSessionStatus ( ovrSession session, ovrSessionStatus * sessionStatus )
Returns status information for the application.
session Specifies an ovrSession previously returned by ovr_Create. sessionStatus Provides an ovrSessionStatus that is filled in. Returns an ovrResult indicating success or failure. In the case of failure, use ovr_GetLastErrorInfo to get more information. Return values include but aren't limited to: ovrSuccess: Completed successfully.ovrError_ServiceConnection: The service connection was lost and the application must destroy the session.
ovrResult ovr_IsExtensionSupported ( ovrSession session, ovrExtensions extension, ovrBool * outExtensionSupported )
Query extension support status.
session Specifies an ovrSession previously returned by ovr_Create. extension Extension to query. outExtensionSupported Set to extension support status. ovrTrue if supported. Returns an ovrResult indicating success or failure. In the case of failure use ovr_GetLastErrorInfo to get more information. ovrExtensions
ovrResult ovr_EnableExtension ( ovrSession session, ovrExtensions extension )
Enable extension.
Extensions must be enabled after ovr_Create is called. session Specifies an ovrSession previously returned by ovr_Create. extension Extension to enable. Returns an ovrResult indicating success or failure. Extension is only enabled if successful. In the case of failure use ovr_GetLastErrorInfo to get more information. ovrExtensions

Tracking Documentation

ovrResult ovr_SetTrackingOriginType ( ovrSession session, ovrTrackingOrigin origin )
Sets the tracking origin type.
When the tracking origin is changed, all of the calls that either provide or accept ovrPosef will use the new tracking origin provided. session Specifies an ovrSession previously returned by ovr_Create. origin Specifies an ovrTrackingOrigin to be used for all ovrPosef Returns an ovrResult indicating success or failure. In the case of failure, use ovr_GetLastErrorInfo to get more information. ovrTrackingOrigin, ovr_GetTrackingOriginType
ovrTrackingOrigin ovr_GetTrackingOriginType ( ovrSession session )
Gets the tracking origin state.
session Specifies an ovrSession previously returned by ovr_Create. Returns the ovrTrackingOrigin that was either set by default, or previous set by the application. ovrTrackingOrigin, ovr_SetTrackingOriginType
ovrResult ovr_RecenterTrackingOrigin ( ovrSession session )
Re-centers the sensor position and orientation.
This resets the (x,y,z) positional components and the yaw orientation component of the tracking space for the HMD and controllers using the HMD's current tracking pose. If the caller requires some tweaks on top of the HMD's current tracking pose, consider using ovr_SpecifyTrackingOrigin instead.The roll and pitch orientation components are always determined by gravity and cannot be redefined. All future tracking will report values relative to this new reference position. If you are using ovrTrackerPoses then you will need to call ovr_GetTrackerPose after this, because the sensor position(s) will change as a result of this.The headset cannot be facing vertically upward or downward but rather must be roughly level otherwise this function will fail with ovrError_InvalidHeadsetOrientation.For more info, see the notes on each ovrTrackingOrigin enumeration to understand how recenter will vary slightly in its behavior based on the current ovrTrackingOrigin setting. session Specifies an ovrSession previously returned by ovr_Create. Returns an ovrResult indicating success or failure. In the case of failure, use ovr_GetLastErrorInfo to get more information. Return values include but aren't limited to: ovrSuccess: Completed successfully.ovrError_InvalidHeadsetOrientation: The headset was facing an invalid direction when attempting recentering, such as facing vertically. ovrTrackingOrigin, ovr_GetTrackerPose, ovr_SpecifyTrackingOrigin
ovrResult ovr_SpecifyTrackingOrigin ( ovrSession session, ovrPosef originPose )
Allows manually tweaking the sensor position and orientation.
This function is similar to ovr_RecenterTrackingOrigin in that it modifies the (x,y,z) positional components and the yaw orientation component of the tracking space for the HMD and controllers.While ovr_RecenterTrackingOrigin resets the tracking origin in reference to the HMD's current pose, ovr_SpecifyTrackingOrigin allows the caller to explicitly specify a transform for the tracking origin. This transform is expected to be an offset to the most recent recentered origin, so calling this function repeatedly with the same originPose will keep nudging the recentered origin in that direction.There are several use cases for this function. For example, if the application decides to limit the yaw, or translation of the recentered pose instead of directly using the HMD pose the application can query the current tracking state via ovr_GetTrackingState, and apply some limitations to the HMD pose because feeding this pose back into this function. Similarly, this can be used to "adjust the seating position" incrementally in apps that feature seated experiences such as cockpit-based games.This function can emulate ovr_RecenterTrackingOrigin as such: ovrTrackingState ts = ovr_GetTrackingState(session, 0.0, ovrFalse); ovr_SpecifyTrackingOrigin(session, ts.HeadPose.ThePose);The roll and pitch orientation components are determined by gravity and cannot be redefined. If you are using ovrTrackerPoses then you will need to call ovr_GetTrackerPose after this, because the sensor position(s) will change as a result of this.For more info, see the notes on each ovrTrackingOrigin enumeration to understand how recenter will vary slightly in its behavior based on the current ovrTrackingOrigin setting. session Specifies an ovrSession previously returned by ovr_Create. originPose Specifies a pose that will be used to transform the current tracking origin. Returns an ovrResult indicating success or failure. In the case of failure, use ovr_GetLastErrorInfo to get more information. Return values include but aren't limited to: ovrSuccess: Completed successfully.ovrError_InvalidParameter: The heading direction in originPose was invalid, such as facing vertically. This can happen if the caller is directly feeding the pose of a position-tracked device such as an HMD or controller into this function. ovrTrackingOrigin, ovr_GetTrackerPose, ovr_RecenterTrackingOrigin
void ovr_ClearShouldRecenterFlag ( ovrSession session )
Clears the ShouldRecenter status bit in ovrSessionStatus.
Clears the ShouldRecenter status bit in ovrSessionStatus, allowing further recenter requests to be detected. Since this is automatically done by ovr_RecenterTrackingOrigin and ovr_SpecifyTrackingOrigin, this function only needs to be called when application is doing its own re-centering logic.
ovrTrackingState ovr_GetTrackingState ( ovrSession session, double absTime, ovrBool latencyMarker )
Returns tracking state reading based on the specified absolute system time.
Pass an absTime value of 0.0 to request the most recent sensor reading. In this case both PredictedPose and SamplePose will have the same value.This may also be used for more refined timing of front buffer rendering logic, and so on. This may be called by multiple threads. session Specifies an ovrSession previously returned by ovr_Create. absTime Specifies the absolute future time to predict the return ovrTrackingState value. Use 0 to request the most recent tracking state. latencyMarker Specifies that this call is the point in time where the "App-to-Mid-Photon" latency timer starts from. If a given ovrLayer provides "SensorSampleTime", that will override the value stored here. Returns the ovrTrackingState that is predicted for the given absTime. ovrTrackingState, ovr_GetEyePoses, ovr_GetTimeInSeconds
ovrResult ovr_GetDevicePoses ( ovrSession session, ovrTrackedDeviceType * deviceTypes, int deviceCount, double absTime, ovrPoseStatef * outDevicePoses )
Returns an array of poses, where each pose matches a device type provided by the deviceTypes array parameter.
If any pose cannot be retrieved, it will return a reason for the missing pose and the device pose will be zeroed out with a pose quaternion [x=0, y=0, z=0, w=1]. session Specifies an ovrSession previously returned by ovr_Create. deviceTypes Array of device types to query for their poses. deviceCount Number of queried poses. This number must match the length of the outDevicePoses and deviceTypes array. absTime Specifies the absolute future time to predict the return ovrTrackingState value. Use 0 to request the most recent tracking state. outDevicePoses Array of poses, one for each device type in deviceTypes arrays. Returns an ovrResult for which OVR_SUCCESS(result) is false upon error and true upon success.
ovrTrackerPose ovr_GetTrackerPose ( ovrSession session, unsigned int trackerPoseIndex )
Returns the ovrTrackerPose for the given attached tracker.
session Specifies an ovrSession previously returned by ovr_Create. trackerPoseIndex Index of the tracker being requested. Returns the requested ovrTrackerPose. An empty ovrTrackerPose will be returned if trackerPoseIndex is out of range. ovr_GetTrackerCount
ovrResult ovr_GetInputState ( ovrSession session, ovrControllerType controllerType, ovrInputState * inputState )
Returns the most recent input state for controllers, without positional tracking info.
inputState Input state that will be filled in. controllerType Specifies which controller the input will be returned for. Returns ovrSuccess if the new state was successfully obtained. ovrControllerType
unsigned int ovr_GetConnectedControllerTypes ( ovrSession session )
Returns controller types connected to the system OR'ed together.
A bitmask of ovrControllerTypes connected to the system. ovrControllerType
ovrTouchHapticsDesc ovr_GetTouchHapticsDesc ( ovrSession session, ovrControllerType controllerType )
Gets information about Haptics engine for the specified Touch controller.
session Specifies an ovrSession previously returned by ovr_Create. controllerType The controller to retrieve the information from. Returns an ovrTouchHapticsDesc.
ovrResult ovr_SetControllerVibration ( ovrSession session, ovrControllerType controllerType, float frequency, float amplitude )
Sets constant vibration (with specified frequency and amplitude) to a controller.
Note: ovr_SetControllerVibration cannot be used interchangeably with ovr_SubmitControllerVibration.This method should be called periodically, vibration lasts for a maximum of 2.5 seconds. session Specifies an ovrSession previously returned by ovr_Create. controllerType The controller to set the vibration to. frequency Vibration frequency. Supported values are: 0.0 (disabled), 0.5 and 1.0. Non valid values will be clamped. amplitude Vibration amplitude in the [0.0, 1.0] range. Returns an ovrResult for which OVR_SUCCESS(result) is false upon error and true upon success. Return values include but aren't limited to: ovrSuccess: The call succeeded and a result was returned.ovrSuccess_DeviceUnavailable: The call succeeded but the device referred to by controllerType is not available.
ovrResult ovr_SubmitControllerVibration ( ovrSession session, ovrControllerType controllerType, const ovrHapticsBuffer * buffer )
Submits a Haptics buffer (used for vibration) to Touch (only) controllers.
Note: ovr_SubmitControllerVibration cannot be used interchangeably with ovr_SetControllerVibration. session Specifies an ovrSession previously returned by ovr_Create. controllerType Controller where the Haptics buffer will be played. buffer Haptics buffer containing amplitude samples to be played. Returns an ovrResult for which OVR_SUCCESS(result) is false upon error and true upon success. Return values include but aren't limited to: ovrSuccess: The call succeeded and a result was returned.ovrSuccess_DeviceUnavailable: The call succeeded but the device referred to by controllerType is not available. ovrHapticsBuffer
ovrResult ovr_GetControllerVibrationState ( ovrSession session, ovrControllerType controllerType, ovrHapticsPlaybackState * outState )
Gets the Haptics engine playback state of a specific Touch controller.
session Specifies an ovrSession previously returned by ovr_Create. controllerType Controller where the Haptics buffer wil be played. outState State of the haptics engine. Returns an ovrResult for which OVR_SUCCESS(result) is false upon error and true upon success. Return values include but aren't limited to: ovrSuccess: The call succeeded and a result was returned.ovrSuccess_DeviceUnavailable: The call succeeded but the device referred to by controllerType is not available. ovrHapticsPlaybackState
ovrResult ovr_TestBoundary ( ovrSession session, ovrTrackedDeviceType deviceBitmask, ovrBoundaryType boundaryType, ovrBoundaryTestResult * outTestResult )
Tests collision/proximity of position tracked devices (e.g.
HMD and/or Touch) against the Boundary System. Note: this method is similar to ovr_BoundaryTestPoint but can be more precise as it may take into account device acceleration/momentum. session Specifies an ovrSession previously returned by ovr_Create. deviceBitmask Bitmask of one or more tracked devices to test. boundaryType Must be either ovrBoundary_Outer or ovrBoundary_PlayArea. outTestResult Result of collision/proximity test, contains information such as distance and closest point. Returns an ovrResult for which OVR_SUCCESS(result) is false upon error and true upon success. Return values include but aren't limited to: ovrSuccess: The call succeeded and a result was returned.ovrSuccess_BoundaryInvalid: The call succeeded but the result is not a valid boundary due to not being set up.ovrSuccess_DeviceUnavailable: The call succeeded but the device referred to by deviceBitmask is not available. ovrBoundaryTestResult
ovrResult ovr_TestBoundaryPoint ( ovrSession session, const ovrVector3f * point, ovrBoundaryType singleBoundaryType, ovrBoundaryTestResult * outTestResult )
Tests collision/proximity of a 3D point against the Boundary System.
session Specifies an ovrSession previously returned by ovr_Create. point 3D point to test. singleBoundaryType Must be either ovrBoundary_Outer or ovrBoundary_PlayArea to test against outTestResult Result of collision/proximity test, contains information such as distance and closest point. Returns an ovrResult for which OVR_SUCCESS(result) is false upon error and true upon success. Return values include but aren't limited to: ovrSuccess: The call succeeded and a result was returned.ovrSuccess_BoundaryInvalid: The call succeeded but the result is not a valid boundary due to not being set up. ovrBoundaryTestResult
ovrResult ovr_SetBoundaryLookAndFeel ( ovrSession session, const ovrBoundaryLookAndFeel * lookAndFeel )
Sets the look and feel of the Boundary System.
session Specifies an ovrSession previously returned by ovr_Create. lookAndFeel Look and feel parameters. Returns ovrSuccess upon success. ovrBoundaryLookAndFeel
ovrResult ovr_ResetBoundaryLookAndFeel ( ovrSession session )
Resets the look and feel of the Boundary System to its default state.
session Specifies an ovrSession previously returned by ovr_Create. Returns ovrSuccess upon success. ovrBoundaryLookAndFeel
ovrResult ovr_GetBoundaryGeometry ( ovrSession session, ovrBoundaryType boundaryType, ovrVector3f * outFloorPoints, int * outFloorPointsCount )
Gets the geometry of the Boundary System's "play area" or "outer boundary" as 3D floor points.
session Specifies an ovrSession previously returned by ovr_Create. boundaryType Must be either ovrBoundary_Outer or ovrBoundary_PlayArea. outFloorPoints Array of 3D points (in clockwise order) defining the boundary at floor height (can be NULL to retrieve only the number of points). outFloorPointsCount Number of 3D points returned in the array. Returns an ovrResult for which OVR_SUCCESS(result) is false upon error and true upon success. Return values include but aren't limited to: ovrSuccess: The call succeeded and a result was returned.ovrSuccess_BoundaryInvalid: The call succeeded but the result is not a valid boundary due to not being set up.
ovrResult ovr_GetBoundaryDimensions ( ovrSession session, ovrBoundaryType boundaryType, ovrVector3f * outDimensions )
Gets the dimension of the Boundary System's "play area" or "outer boundary".
session Specifies an ovrSession previously returned by ovr_Create. boundaryType Must be either ovrBoundary_Outer or ovrBoundary_PlayArea. outDimensions Dimensions of the axis aligned bounding box that encloses the area in meters (width, height and length). Returns an ovrResult for which OVR_SUCCESS(result) is false upon error and true upon success. Return values include but aren't limited to: ovrSuccess: The call succeeded and a result was returned.ovrSuccess_BoundaryInvalid: The call succeeded but the result is not a valid boundary due to not being set up.
ovrResult ovr_GetBoundaryVisible ( ovrSession session, ovrBool * outIsVisible )
Returns if the boundary is currently visible.
Note: visibility is false if the user has turned off boundaries, otherwise, it's true if the app has requested boundaries to be visible or if any tracked device is currently triggering it. This may not exactly match rendering due to fade-in and fade-out effects. session Specifies an ovrSession previously returned by ovr_Create. outIsVisible ovrTrue, if the boundary is visible. Returns an ovrResult for which OVR_SUCCESS(result) is false upon error and true upon success. Return values include but aren't limited to: ovrSuccess: Result was successful and a result was returned.ovrSuccess_BoundaryInvalid: The call succeeded but the result is not a valid boundary due to not being set up.
ovrResult ovr_RequestBoundaryVisible ( ovrSession session, ovrBool visible )
Requests boundary to be visible.
session Specifies an ovrSession previously returned by ovr_Create. visible forces the outer boundary to be visible. An application can't force it to be invisible, but can cancel its request by passing false. Returns ovrSuccess upon success.

Mixed reality capture support Documentation

ovrResult ovr_GetExternalCameras ( ovrSession session, ovrExternalCamera * cameras, unsigned int * inoutCameraCount )
Returns the number of camera properties of all cameras.
session Specifies an ovrSession previously returned by ovr_Create. cameras Pointer to the array. If null and the provided array capacity is sufficient, will return ovrError_NullArrayPointer. inoutCameraCount Supply the array capacity, will return the actual # of cameras defined. If *inoutCameraCount is too small, will return ovrError_InsufficientArraySize. Returns the list of external cameras the system knows about. Returns ovrError_NoExternalCameraInfo if there is not any eternal camera information.
ovrResult ovr_SetExternalCameraProperties ( ovrSession session, const char * name, const ovrCameraIntrinsics *const intrinsics, const ovrCameraExtrinsics *const extrinsics )
Sets the camera intrinsics and/or extrinsics stored for the cameraName camera Names must be < 32 characters and null-terminated.
session Specifies an ovrSession previously returned by ovr_Create. name Specifies which camera to set the intrinsics or extrinsics for. The name must be at most OVR_EXTERNAL_CAMERA_NAME_SIZE - 1 characters. Otherwise, ovrError_ExternalCameraNameWrongSize is returned. intrinsics Contains the intrinsic parameters to set, can be null extrinsics Contains the extrinsic parameters to set, can be null Returns ovrSuccess or an ovrError code

User Defined Documentation

enum OVR_CAPI.h.@0
Specifies the maximum number of layers supported by ovr_SubmitFrame.
Enumerator
ovrMaxLayerCount= 16
enum OVR_CAPI.h.ovrLayerType
Describes layer types that can be passed to ovr_SubmitFrame.
Enumerator
ovrLayerType_Disabled
Layer is disabled.
ovrLayerType_EyeFov
Described by ovrLayerEyeFov.
ovrLayerType_EyeFovDepth
Described by ovrLayerEyeFovDepth.
ovrLayerType_Quad
Described by ovrLayerQuad. Previously called ovrLayerType_QuadInWorld.
ovrLayerType_EyeMatrix
Described by ovrLayerEyeMatrix.
ovrLayerType_EyeFovMultires
Described by ovrLayerEyeFovMultires.
ovrLayerType_Cylinder
Described by ovrLayerCylinder.
ovrLayerType_Cube
Described by ovrLayerCube.
ovrLayerType_EnumSize
Force type int32_t.
enum OVR_CAPI.h.ovrLayerFlags
Identifies flags used by ovrLayerHeader and which are passed to ovr_SubmitFrame.
Enumerator
ovrLayerFlag_HighQuality
ovrLayerFlag_HighQuality enables 4x anisotropic sampling during the composition of the layer.
ovrLayerFlag_TextureOriginAtBottomLeft
ovrLayerFlag_TextureOriginAtBottomLeft: the opposite is TopLeft.
ovrLayerFlag_HeadLocked
Mark this surface as "headlocked", which means it is specified relative to the HMD and moves with it, rather than being specified relative to sensor/torso space and remaining still while the head moves.
enum OVR_CAPI.h.ovrTextureLayout
Describes eye texture layouts.
Enumerator
ovrTextureLayout_Rectilinear
Regular eyeFov layer.
ovrTextureLayout_Octilinear
Octilinear extension must be enabled.
ovrTextureLayout_EnumSize
Force type int32_t.

SDK Distortion Rendering Documentation

ovrResult ovr_GetTextureSwapChainLength ( ovrSession session, ovrTextureSwapChain chain, int * out_Length )
TextureSwapChain creation is rendering API-specific.
ovr_CreateTextureSwapChainDX and ovr_CreateTextureSwapChainGL can be found in the rendering API-specific headers, such as OVR_CAPI_D3D.h and OVR_CAPI_GL.h Gets the number of buffers in an ovrTextureSwapChain. session Specifies an ovrSession previously returned by ovr_Create. chain Specifies the ovrTextureSwapChain for which the length should be retrieved. out_Length Returns the number of buffers in the specified chain. Returns an ovrResult for which OVR_SUCCESS(result) is false upon error. ovr_CreateTextureSwapChainDX, ovr_CreateTextureSwapChainGL
ovrResult ovr_GetTextureSwapChainCurrentIndex ( ovrSession session, ovrTextureSwapChain chain, int * out_Index )
Gets the current index in an ovrTextureSwapChain.
session Specifies an ovrSession previously returned by ovr_Create. chain Specifies the ovrTextureSwapChain for which the index should be retrieved. out_Index Returns the current (free) index in specified chain. Returns an ovrResult for which OVR_SUCCESS(result) is false upon error. ovr_CreateTextureSwapChainDX, ovr_CreateTextureSwapChainGL
ovrResult ovr_GetTextureSwapChainDesc ( ovrSession session, ovrTextureSwapChain chain, ovrTextureSwapChainDesc * out_Desc )
Gets the description of the buffers in an ovrTextureSwapChain.
session Specifies an ovrSession previously returned by ovr_Create. chain Specifies the ovrTextureSwapChain for which the description should be retrieved. out_Desc Returns the description of the specified chain. Returns an ovrResult for which OVR_SUCCESS(result) is false upon error. ovr_CreateTextureSwapChainDX, ovr_CreateTextureSwapChainGL
ovrResult ovr_CommitTextureSwapChain ( ovrSession session, ovrTextureSwapChain chain )
Commits any pending changes to an ovrTextureSwapChain, and advances its current index.
session Specifies an ovrSession previously returned by ovr_Create. chain Specifies the ovrTextureSwapChain to commit. When Commit is called, the texture at the current index is considered ready for use by the runtime, and further writes to it should be avoided. The swap chain's current index is advanced, providing there's room in the chain. The next time the SDK dereferences this texture swap chain, it will synchronize with the app's graphics context and pick up the submitted index, opening up room in the swap chain for further commits. Returns an ovrResult for which OVR_SUCCESS(result) is false upon error. Failures include but aren't limited to: ovrError_TextureSwapChainFull: ovr_CommitTextureSwapChain was called too many times on a texture swapchain without calling submit to use the chain. ovr_CreateTextureSwapChainDX, ovr_CreateTextureSwapChainGL
void ovr_DestroyTextureSwapChain ( ovrSession session, ovrTextureSwapChain chain )
Destroys an ovrTextureSwapChain and frees all the resources associated with it.
session Specifies an ovrSession previously returned by ovr_Create. chain Specifies the ovrTextureSwapChain to destroy. If it is NULL then this function has no effect. ovr_CreateTextureSwapChainDX, ovr_CreateTextureSwapChainGL
void ovr_DestroyMirrorTexture ( ovrSession session, ovrMirrorTexture mirrorTexture )
MirrorTexture creation is rendering API-specific.
ovr_CreateMirrorTextureWithOptionsDX and ovr_CreateMirrorTextureWithOptionsGL can be found in rendering API-specific headers, such as OVR_CAPI_D3D.h and OVR_CAPI_GL.h Destroys a mirror texture previously created by one of the mirror texture creation functions. session Specifies an ovrSession previously returned by ovr_Create. mirrorTexture Specifies the ovrTexture to destroy. If it is NULL then this function has no effect. ovr_CreateMirrorTextureWithOptionsDX, ovr_CreateMirrorTextureWithOptionsGL
ovrSizei ovr_GetFovTextureSize ( ovrSession session, ovrEyeType eye, ovrFovPort fov, float pixelsPerDisplayPixel )
Calculates the recommended viewport size for rendering a given eye within the HMD with a given FOV cone.
Higher FOV will generally require larger textures to maintain quality. Apps packing multiple eye views together on the same texture should ensure there are at least 8 pixels of padding between them to prevent texture filtering and chromatic aberration causing images to leak between the two eye views. session Specifies an ovrSession previously returned by ovr_Create. eye Specifies which eye (left or right) to calculate for. fov Specifies the ovrFovPort to use. pixelsPerDisplayPixel Specifies the ratio of the number of render target pixels to display pixels at the center of distortion. 1.0 is the default value. Lower values can improve performance, higher values give improved quality. Example code ovrHmdDeschmdDesc=ovr_GetHmdDesc(session); ovrSizeieyeSizeLeft=ovr_GetFovTextureSize(session,ovrEye_Left, hmdDesc.DefaultEyeFov[ovrEye_Left],1.0f); ovrSizeieyeSizeRight=ovr_GetFovTextureSize(session,ovrEye_Right, hmdDesc.DefaultEyeFov[ovrEye_Right],1.0f); Returns the texture width and height size.
ovrEyeRenderDesc ovr_GetRenderDesc ( ovrSession session, ovrEyeType eyeType, ovrFovPort fov )
Computes the distortion viewport, view adjust, and other rendering parameters for the specified eye.
session Specifies an ovrSession previously returned by ovr_Create. eyeType Specifies which eye (left or right) for which to perform calculations. fov Specifies the ovrFovPort to use. Returns the computed ovrEyeRenderDesc for the given eyeType and field of view. ovrEyeRenderDesc
ovrResult ovr_WaitToBeginFrame ( ovrSession session, long long frameIndex )
Waits until surfaces are available and it is time to begin rendering the frame.
Must be called before ovr_BeginFrame, but not necessarily from the same thread. session Specifies an ovrSession previously returned by ovr_Create. frameIndex Specifies the targeted application frame index. Returns an ovrResult for which OVR_SUCCESS(result) is false upon error and true upon success. Return values include but aren't limited to: ovrSuccess: command completed successfully.ovrSuccess_NotVisible: rendering of a previous frame completed successfully but was not displayed on the HMD, usually because another application currently has ownership of the HMD. Applications receiving this result should stop rendering new content and call ovr_GetSessionStatus to detect visibility.ovrError_DisplayLost: The session has become invalid (such as due to a device removal) and the shared resources need to be released (ovr_DestroyTextureSwapChain), the session needs to destroyed (ovr_Destroy) and recreated (ovr_Create), and new resources need to be created (ovr_CreateTextureSwapChainXXX). The application's existing private graphics resources do not need to be recreated unless the new ovr_Create call returns a different GraphicsLuid. ovr_BeginFrame, ovr_EndFrame, ovr_GetSessionStatus
ovrResult ovr_BeginFrame ( ovrSession session, long long frameIndex )
Called from render thread before application begins rendering.
Must be called after ovr_WaitToBeginFrame and before ovr_EndFrame, but not necessarily from the same threads. session Specifies an ovrSession previously returned by ovr_Create. frameIndex Specifies the targeted application frame index. It must match what was passed to ovr_WaitToBeginFrame. Returns an ovrResult for which OVR_SUCCESS(result) is false upon error and true upon success. Return values include but aren't limited to: ovrSuccess: command completed successfully.ovrError_DisplayLost: The session has become invalid (such as due to a device removal) and the shared resources need to be released (ovr_DestroyTextureSwapChain), the session needs to destroyed (ovr_Destroy) and recreated (ovr_Create), and new resources need to be created (ovr_CreateTextureSwapChainXXX). The application's existing private graphics resources do not need to be recreated unless the new ovr_Create call returns a different GraphicsLuid. ovr_WaitToBeginFrame, ovr_EndFrame
ovrResult ovr_EndFrame ( ovrSession session, long long frameIndex, const ovrViewScaleDesc * viewScaleDesc, ovrLayerHeader const *const * layerPtrList, unsigned int layerCount )
Called from render thread after application has finished rendering.
Must be called after ovr_BeginFrame, but not necessarily from the same thread. Submits layers for distortion and display, which will happen asynchronously. session Specifies an ovrSession previously returned by ovr_Create. frameIndex Specifies the targeted application frame index. It must match what was passed to ovr_BeginFrame. viewScaleDesc Provides additional information needed only if layerPtrList contains an ovrLayerType_Quad. If NULL, a default version is used based on the current configuration and a 1.0 world scale. layerPtrList Specifies a list of ovrLayer pointers, which can include NULL entries to indicate that any previously shown layer at that index is to not be displayed. Each layer header must be a part of a layer structure such as ovrLayerEyeFov or ovrLayerQuad, with Header.Type identifying its type. A NULL layerPtrList entry in the array indicates the absence of the given layer. layerCount Indicates the number of valid elements in layerPtrList. The maximum supported layerCount is not currently specified, but may be specified in a future version. Layers are drawn in the order they are specified in the array, regardless of the layer type.Layers are not remembered between successive calls to ovr_SubmitFrame. A layer must be specified in every call to ovr_SubmitFrame or it won't be displayed.If a layerPtrList entry that was specified in a previous call to ovr_SubmitFrame is passed as NULL or is of type ovrLayerType_Disabled, that layer is no longer displayed.A layerPtrList entry can be of any layer type and multiple entries of the same layer type are allowed. No layerPtrList entry may be duplicated (i.e. the same pointer as an earlier entry). Example code ovrLayerEyeFovlayer0; ovrLayerQuadlayer1; ... ovrLayerHeader*layers[2]={&layer0.Header,&layer1.Header}; ovrResultresult=ovr_EndFrame(session,frameIndex,nullptr,layers,2); Returns an ovrResult for which OVR_SUCCESS(result) is false upon error and true upon success. Return values include but aren't limited to: ovrSuccess: rendering completed successfully.ovrError_DisplayLost: The session has become invalid (such as due to a device removal) and the shared resources need to be released (ovr_DestroyTextureSwapChain), the session needs to destroyed (ovr_Destroy) and recreated (ovr_Create), and new resources need to be created (ovr_CreateTextureSwapChainXXX). The application's existing private graphics resources do not need to be recreated unless the new ovr_Create call returns a different GraphicsLuid.ovrError_TextureSwapChainInvalid: The ovrTextureSwapChain is in an incomplete or inconsistent state. Ensure ovr_CommitTextureSwapChain was called at least once first. ovr_WaitToBeginFrame, ovr_BeginFrame, ovrViewScaleDesc, ovrLayerHeader
ovrResult ovr_SubmitFrame ( ovrSession session, long long frameIndex, const ovrViewScaleDesc * viewScaleDesc, ovrLayerHeader const *const * layerPtrList, unsigned int layerCount )
Submits layers for distortion and display.
Deprecated. Use ovr_WaitToBeginFrame, ovr_BeginFrame, and ovr_EndFrame instead.ovr_SubmitFrame triggers distortion and processing which might happen asynchronously. The function will return when there is room in the submission queue and surfaces are available. Distortion might or might not have completed. session Specifies an ovrSession previously returned by ovr_Create. frameIndex Specifies the targeted application frame index, or 0 to refer to one frame after the last time ovr_SubmitFrame was called. viewScaleDesc Provides additional information needed only if layerPtrList contains an ovrLayerType_Quad. If NULL, a default version is used based on the current configuration and a 1.0 world scale. layerPtrList Specifies a list of ovrLayer pointers, which can include NULL entries to indicate that any previously shown layer at that index is to not be displayed. Each layer header must be a part of a layer structure such as ovrLayerEyeFov or ovrLayerQuad, with Header.Type identifying its type. A NULL layerPtrList entry in the array indicates the absence of the given layer. layerCount Indicates the number of valid elements in layerPtrList. The maximum supported layerCount is not currently specified, but may be specified in a future version. Layers are drawn in the order they are specified in the array, regardless of the layer type.Layers are not remembered between successive calls to ovr_SubmitFrame. A layer must be specified in every call to ovr_SubmitFrame or it won't be displayed.If a layerPtrList entry that was specified in a previous call to ovr_SubmitFrame is passed as NULL or is of type ovrLayerType_Disabled, that layer is no longer displayed.A layerPtrList entry can be of any layer type and multiple entries of the same layer type are allowed. No layerPtrList entry may be duplicated (i.e. the same pointer as an earlier entry). Example code ovrLayerEyeFovlayer0; ovrLayerQuadlayer1; ... ovrLayerHeader*layers[2]={&layer0.Header,&layer1.Header}; ovrResultresult=ovr_SubmitFrame(session,frameIndex,nullptr,layers,2); Returns an ovrResult for which OVR_SUCCESS(result) is false upon error and true upon success. Return values include but aren't limited to: ovrSuccess: rendering completed successfully.ovrSuccess_NotVisible: rendering completed successfully but was not displayed on the HMD, usually because another application currently has ownership of the HMD. Applications receiving this result should stop rendering new content, call ovr_GetSessionStatus to detect visibility.ovrError_DisplayLost: The session has become invalid (such as due to a device removal) and the shared resources need to be released (ovr_DestroyTextureSwapChain), the session needs to destroyed (ovr_Destroy) and recreated (ovr_Create), and new resources need to be created (ovr_CreateTextureSwapChainXXX). The application's existing private graphics resources do not need to be recreated unless the new ovr_Create call returns a different GraphicsLuid.ovrError_TextureSwapChainInvalid: The ovrTextureSwapChain is in an incomplete or inconsistent state. Ensure ovr_CommitTextureSwapChain was called at least once first. ovr_GetPredictedDisplayTime, ovrViewScaleDesc, ovrLayerHeader, ovr_GetSessionStatus

Frame Timing Documentation

enum OVR_CAPI.h.@1
Maximum number of frames of performance stats provided back to the caller of ovr_GetPerfStats.
Enumerator
ovrMaxProvidedFrameStats= 5
enum OVR_CAPI.h.ovrPerfHudMode
Performance HUD enables the HMD user to see information critical to the real-time operation of the VR application such as latency timing, and CPU & GPU performance metrics.
Enumerator
ovrPerfHud_Off
Turns off the performance HUD.
ovrPerfHud_PerfSummary
Shows performance summary and headroom.
ovrPerfHud_LatencyTiming
Shows latency related timing info.
ovrPerfHud_AppRenderTiming
Shows render timing info for application.
ovrPerfHud_CompRenderTiming
Shows render timing info for OVR compositor.
ovrPerfHud_AswStats
Shows Async Spacewarp-specific info.
ovrPerfHud_VersionInfo
Shows SDK & HMD version Info.
ovrPerfHud_Count= 7
ovrPerfHud_EnumSize= 0x7fffffff
enum OVR_CAPI.h.ovrLayerHudMode
Layer HUD enables the HMD user to see information about a layer.
Enumerator
ovrLayerHud_Off
Turns off the layer HUD.
ovrLayerHud_Info
Shows info about a specific layer.
ovrLayerHud_EnumSize= 0x7fffffff
ovrResult ovr_GetPerfStats ( ovrSession session, ovrPerfStats * outStats )
Retrieves performance stats for the VR app as well as the SDK compositor.
This function will return stats for the VR app that is currently visible in the HMD regardless of what VR app is actually calling this function.If the VR app is trying to make sure the stats returned belong to the same application, the caller can compare the VisibleProcessId with their own process ID. Normally this will be the case if the caller is only calling ovr_GetPerfStats when ovr_GetSessionStatus has IsVisible flag set to be true.If the VR app calling ovr_GetPerfStats is actually the one visible in the HMD, then new perf stats will only be populated after a new call to ovr_SubmitFrame. That means subsequent calls to ovr_GetPerfStats after the first one without calling ovr_SubmitFrame will receive a FrameStatsCount of zero.If the VR app is not visible, or was initially marked as ovrInit_Invisible, then each call to ovr_GetPerfStats will immediately fetch new perf stats from the compositor without a need for the ovr_SubmitFrame call.Even though invisible VR apps do not require ovr_SubmitFrame to be called to gather new perf stats, since stats are generated at the native refresh rate of the HMD (i.e. 90 Hz for CV1), calling it at a higher rate than that would be unnecessary. session Specifies an ovrSession previously returned by ovr_Create. outStats Contains the performance stats for the application and SDK compositor Returns an ovrResult for which OVR_SUCCESS(result) is false upon error and true upon success. ovrPerfStats, ovrPerfStatsPerCompositorFrame, ovr_ResetPerfStats
ovrResult ovr_ResetPerfStats ( ovrSession session )
Resets the accumulated stats reported in each ovrPerfStatsPerCompositorFrame back to zero.
Only the integer values such as HmdVsyncIndex, AppDroppedFrameCount etc. will be reset as the other fields such as AppMotionToPhotonLatency are independent timing values updated per-frame. session Specifies an ovrSession previously returned by ovr_Create. Returns an ovrResult for which OVR_SUCCESS(result) is false upon error and true upon success. ovrPerfStats, ovrPerfStatsPerCompositorFrame, ovr_GetPerfStats
double ovr_GetPredictedDisplayTime ( ovrSession session, long long frameIndex )
Gets the time of the specified frame midpoint.
Predicts the time at which the given frame will be displayed. The predicted time is the middle of the time period during which the corresponding eye images will be displayed.The application should increment frameIndex for each successively targeted frame, and pass that index to any relevant OVR functions that need to apply to the frame identified by that index.This function is thread-safe and allows for multiple application threads to target their processing to the same displayed frame.In the even that prediction fails due to various reasons (e.g. the display being off or app has yet to present any frames), the return value will be current CPU time. session Specifies an ovrSession previously returned by ovr_Create. frameIndex Identifies the frame the caller wishes to target. A value of zero returns the next frame index. Returns the absolute frame midpoint time for the given frameIndex. ovr_GetTimeInSeconds
double ovr_GetTimeInSeconds ( )
Returns global, absolute high-resolution time in seconds.
The time frame of reference for this function is not specified and should not be depended upon.Returns seconds as a floating point value. ovrPoseStatef, ovrFrameTiming

Property Access Documentation

ovrBool ovr_GetBool ( ovrSession session, const char * propertyName, ovrBool defaultVal )
Reads a boolean property.
session Specifies an ovrSession previously returned by ovr_Create. propertyName The name of the property, which needs to be valid for only the call. defaultVal specifes the value to return if the property couldn't be read. Returns the property interpreted as a boolean value. Returns defaultVal if the property doesn't exist.
ovrBool ovr_SetBool ( ovrSession session, const char * propertyName, ovrBool value )
Writes or creates a boolean property.
If the property wasn't previously a boolean property, it is changed to a boolean property. session Specifies an ovrSession previously returned by ovr_Create. propertyName The name of the property, which needs to be valid only for the call. value The value to write. Returns true if successful, otherwise false. A false result should only occur if the property name is empty or if the property is read-only.
int ovr_GetInt ( ovrSession session, const char * propertyName, int defaultVal )
Reads an integer property.
session Specifies an ovrSession previously returned by ovr_Create. propertyName The name of the property, which needs to be valid only for the call. defaultVal Specifes the value to return if the property couldn't be read. Returns the property interpreted as an integer value. Returns defaultVal if the property doesn't exist.
ovrBool ovr_SetInt ( ovrSession session, const char * propertyName, int value )
Writes or creates an integer property.
If the property wasn't previously a boolean property, it is changed to an integer property. session Specifies an ovrSession previously returned by ovr_Create. propertyName The name of the property, which needs to be valid only for the call. value The value to write. Returns true if successful, otherwise false. A false result should only occur if the property name is empty or if the property is read-only.
float ovr_GetFloat ( ovrSession session, const char * propertyName, float defaultVal )
Reads a float property.
session Specifies an ovrSession previously returned by ovr_Create. propertyName The name of the property, which needs to be valid only for the call. defaultVal specifes the value to return if the property couldn't be read. Returns the property interpreted as an float value. Returns defaultVal if the property doesn't exist.
ovrBool ovr_SetFloat ( ovrSession session, const char * propertyName, float value )
Writes or creates a float property.
If the property wasn't previously a float property, it's changed to a float property. session Specifies an ovrSession previously returned by ovr_Create. propertyName The name of the property, which needs to be valid only for the call. value The value to write. Returns true if successful, otherwise false. A false result should only occur if the property name is empty or if the property is read-only.
unsigned int ovr_GetFloatArray ( ovrSession session, const char * propertyName, float values, unsigned int valuesCapacity )
Reads a float array property.
session Specifies an ovrSession previously returned by ovr_Create. propertyName The name of the property, which needs to be valid only for the call. values An array of float to write to. valuesCapacity Specifies the maximum number of elements to write to the values array. Returns the number of elements read, or 0 if property doesn't exist or is empty.
ovrBool ovr_SetFloatArray ( ovrSession session, const char * propertyName, const float values, unsigned int valuesSize )
Writes or creates a float array property.
session Specifies an ovrSession previously returned by ovr_Create. propertyName The name of the property, which needs to be valid only for the call. values An array of float to write from. valuesSize Specifies the number of elements to write. Returns true if successful, otherwise false. A false result should only occur if the property name is empty or if the property is read-only.
const char* ovr_GetString ( ovrSession session, const char * propertyName, const char * defaultVal )
Reads a string property.
Strings are UTF8-encoded and null-terminated. session Specifies an ovrSession previously returned by ovr_Create. propertyName The name of the property, which needs to be valid only for the call. defaultVal Specifes the value to return if the property couldn't be read. Returns the string property if it exists. Otherwise returns defaultVal, which can be specified as NULL. The return memory is guaranteed to be valid until next call to ovr_GetString or until the session is destroyed, whichever occurs first.
ovrBool ovr_SetString ( ovrSession session, const char * propertyName, const char * value )
Writes or creates a string property.
Strings are UTF8-encoded and null-terminated. session Specifies an ovrSession previously returned by ovr_Create. propertyName The name of the property, which needs to be valid only for the call. value The string property, which only needs to be valid for the duration of the call. Returns true if successful, otherwise false. A false result should only occur if the property name is empty or if the property is read-only.

Macros Documentation

#define OVR_OS_WIN32
#define OVR_CDECL
LibOVR calling convention for 32-bit Windows builds.
#define OVR_EXTERN_C
Defined as extern "C" when built from C++ code.
#define OVR_CC_HAS_FEATURE
Provided for backward compatibility with older versions of this library.
#define OVR_SA_UNUSED
#define OVR_SA_PASTE
#define OVR_SA_HELP
#define OVR_STATIC_ASSERT
#define OVR_UNUSED_STRUCT_PAD
Defines explicitly unused space for a struct.
When used correcly, usage of this macro should not change the size of the struct. Compile-time and runtime behavior with and without this defined should be identical.
#define OVR_PTR_SIZE
Specifies the size of a pointer on the given platform.
#define OVR_ON32
#define OVR_ON64
#define ovrFalse
ovrBool value of false.
#define ovrTrue
ovrBool value of true.
#define VK_DEFINE_HANDLE
Fallback definitions for when the vulkan header isn't being included.
#define VK_DEFINE_NON_DISPATCHABLE_HANDLE
#define OVR_HAPTICS_BUFFER_SAMPLES_MAX
Maximum number of samples in ovrHapticsBuffer.
#define OVR_MAX_EXTERNAL_CAMERA_COUNT
#define OVR_EXTERNAL_CAMERA_NAME_SIZE

Enumeration Type Documentation

enum OVR_CAPI.h.ovrHmdType
Enumerates all HMD types that we support.
Enumerator
ovrHmd_None= 0
ovrHmd_DK1= 3
ovrHmd_DKHD= 4
ovrHmd_DK2= 6
ovrHmd_CB= 8
ovrHmd_Other= 9
ovrHmd_E3_2015= 10
ovrHmd_ES06= 11
ovrHmd_ES09= 12
ovrHmd_ES11= 13
ovrHmd_CV1= 14
ovrHmd_EnumSize= 0x7fffffff
enum OVR_CAPI.h.ovrHmdCaps
HMD capability bits reported by device.
Enumerator
ovrHmdCap_DebugDevice
(read only) Specifies that the HMD is a virtual debug device.
ovrHmdCap_EnumSize= 0x7fffffff
enum OVR_CAPI.h.ovrTrackingCaps
Tracking capability bits reported by the device.
Enumerator
ovrTrackingCap_Orientation
Supports orientation tracking (IMU).
ovrTrackingCap_MagYawCorrection
Supports yaw drift correction.
ovrTrackingCap_Position
Supports positional tracking.
ovrTrackingCap_EnumSize= 0x7fffffff
enum OVR_CAPI.h.ovrExtensions
Optional extensions.
Enumerator
ovrExtension_TextureLayout_Octilinear
Enable before first layer submission.
ovrExtension_Count
ovrExtension_EnumSize= 0x7fffffff
enum OVR_CAPI.h.ovrEyeType
Specifies which eye is being used for rendering.
Enumerator
ovrEye_Left
The left eye, from the viewer's perspective.
ovrEye_Right
The right eye, from the viewer's perspective.
ovrEye_Count= 2
ovrEye_EnumSize= 0x7fffffff
enum OVR_CAPI.h.ovrTrackingOrigin
Specifies the coordinate system ovrTrackingState returns tracking poses in.
Enumerator
ovrTrackingOrigin_EyeLevel
Tracking system origin reported at eye (HMD) height.
ovrTrackingOrigin_FloorLevel
Tracking system origin reported at floor height.
ovrTrackingOrigin_Count= 2
ovrTrackingOrigin_EnumSize= 0x7fffffff
enum OVR_CAPI.h.ovrStatusBits
Bit flags describing the current status of sensor tracking.
Enumerator
ovrStatus_OrientationTracked
Orientation is currently tracked (connected & in use).
ovrStatus_PositionTracked
Position is currently tracked (false if out of range).
ovrStatus_EnumSize= 0x7fffffff
enum OVR_CAPI.h.ovrTrackerFlags
Specifies sensor flags.
Enumerator
ovrTracker_Connected
The sensor is present, else the sensor is absent or offline.
ovrTracker_PoseTracked
The sensor has a valid pose, else the pose is unavailable.
enum OVR_CAPI.h.ovrTextureType
The type of texture resource.
Enumerator
ovrTexture_2D
2D textures.
ovrTexture_2D_External
Application-provided 2D texture. Not supported on PC.
ovrTexture_Cube
Cube maps. ovrTextureSwapChainDesc::ArraySize must be 6 for this type.
ovrTexture_Count
ovrTexture_EnumSize= 0x7fffffff
enum OVR_CAPI.h.ovrTextureBindFlags
The bindings required for texture swap chain.
Enumerator
ovrTextureBind_None
ovrTextureBind_DX_RenderTarget
The application can write into the chain with pixel shader.
ovrTextureBind_DX_UnorderedAccess
The application can write to the chain with compute shader.
ovrTextureBind_DX_DepthStencil
The chain buffers can be bound as depth and/or stencil buffers.
ovrTextureBind_EnumSize= 0x7fffffff
enum OVR_CAPI.h.ovrTextureFormat
The format of a texture.
Enumerator
OVR_FORMAT_UNKNOWN= 0
OVR_FORMAT_B5G6R5_UNORM
Not currently supported on PC. Requires a DirectX 11.1 device.
OVR_FORMAT_B5G5R5A1_UNORM
Not currently supported on PC. Requires a DirectX 11.1 device.
OVR_FORMAT_B4G4R4A4_UNORM
Not currently supported on PC. Requires a DirectX 11.1 device.
OVR_FORMAT_R8G8B8A8_UNORM= 4
OVR_FORMAT_R8G8B8A8_UNORM_SRGB= 5
OVR_FORMAT_B8G8R8A8_UNORM= 6
OVR_FORMAT_B8G8R8_UNORM= 27
OVR_FORMAT_B8G8R8A8_UNORM_SRGB
Not supported for OpenGL applications.
OVR_FORMAT_B8G8R8X8_UNORM
Not supported for OpenGL applications.
OVR_FORMAT_B8G8R8X8_UNORM_SRGB
Not supported for OpenGL applications.
OVR_FORMAT_R16G16B16A16_FLOAT= 10
OVR_FORMAT_R11G11B10_FLOAT
Introduced in v1.10.
OVR_FORMAT_D16_UNORM= 11
OVR_FORMAT_D24_UNORM_S8_UINT= 12
OVR_FORMAT_D32_FLOAT= 13
OVR_FORMAT_D32_FLOAT_S8X24_UINT= 14
OVR_FORMAT_BC1_UNORM= 15
OVR_FORMAT_BC1_UNORM_SRGB= 16
OVR_FORMAT_BC2_UNORM= 17
OVR_FORMAT_BC2_UNORM_SRGB= 18
OVR_FORMAT_BC3_UNORM= 19
OVR_FORMAT_BC3_UNORM_SRGB= 20
OVR_FORMAT_BC6H_UF16= 21
OVR_FORMAT_BC6H_SF16= 22
OVR_FORMAT_BC7_UNORM= 23
OVR_FORMAT_BC7_UNORM_SRGB= 24
OVR_FORMAT_LAST
OVR_FORMAT_ENUMSIZE= 0x7fffffff
enum OVR_CAPI.h.ovrTextureFlags
Misc flags overriding particular behaviors of a texture swap chain.
Enumerator
ovrTextureMisc_None
ovrTextureMisc_DX_Typeless
Vulkan and DX only: The underlying texture is created with a TYPELESS equivalent of the format specified in the texture desc.
ovrTextureMisc_AllowGenerateMips
DX only: Allow generation of the mip chain on the GPU via the GenerateMips call.
ovrTextureMisc_ProtectedContent
Texture swap chain contains protected content, and requires HDCP connection in order to display to HMD.
ovrTextureMisc_AutoGenerateMips
Automatically generate and use the mip chain in composition on each submission.
ovrTextureMisc_EnumSize= 0x7fffffff
enum OVR_CAPI.h.ovrMirrorOptions
Bit flags used as part of ovrMirrorTextureDesc's MirrorOptions field.
Enumerator
ovrMirrorOption_Default
By default the mirror texture will be:
ovrMirrorOption_PostDistortion
Retrieves the barrel distorted texture contents instead of the rectilinear one This is only recommended for debugging purposes, and not for final desktop presentation.
ovrMirrorOption_LeftEyeOnly
Since ovrMirrorOption_Default renders both eyes into the mirror texture, these two flags are exclusive (i.e.
ovrMirrorOption_RightEyeOnly= 0x0004
ovrMirrorOption_IncludeGuardian
Shows the boundary system aka Guardian on the mirror texture.
ovrMirrorOption_IncludeNotifications
Shows system notifications the user receives on the mirror texture.
ovrMirrorOption_IncludeSystemGui
Shows the system menu (triggered by hitting the Home button) on the mirror texture.
ovrMirrorOption_EnumSize= 0x7fffffff
enum OVR_CAPI.h.ovrViewportStencilType
Enumerator
ovrViewportStencil_HiddenArea= 0
ovrViewportStencil_VisibleArea
Triangle mesh covering parts that are hidden to users.
ovrViewportStencil_BorderLine
Triangle mesh covering parts that are visible to users.
ovrViewportStencilType_EnumSize
Line buffer that draws the boundary visible to users.
enum OVR_CAPI.h.ovrButton
Describes button input types.
Enumerator
ovrButton_A
A button on XBox controllers and right Touch controller. Not present on Oculus Remote.
ovrButton_B
B button on XBox controllers and right Touch controller. Not present on Oculus Remote.
ovrButton_RThumb
Right thumbstick on XBox controllers and Touch controllers. Not present on Oculus Remote.
ovrButton_RShoulder
Right shoulder button on XBox controllers. Not present on Touch controllers or Oculus Remote.
ovrButton_X
X button on XBox controllers and left Touch controller. Not present on Oculus Remote.
ovrButton_Y
Y button on XBox controllers and left Touch controller. Not present on Oculus Remote.
ovrButton_LThumb
Left thumbstick on XBox controllers and Touch controllers. Not present on Oculus Remote.
ovrButton_LShoulder
Left shoulder button on XBox controllers. Not present on Touch controllers or Oculus Remote.
ovrButton_Up
Up button on XBox controllers and Oculus Remote. Not present on Touch controllers.
ovrButton_Down
Down button on XBox controllers and Oculus Remote. Not present on Touch controllers.
ovrButton_Left
Left button on XBox controllers and Oculus Remote. Not present on Touch controllers.
ovrButton_Right
Right button on XBox controllers and Oculus Remote. Not present on Touch controllers.
ovrButton_Enter
Start on XBox 360 controller.
ovrButton_Back
Back on Xbox 360 controller and Oculus Remote.
ovrButton_VolUp
Volume button on Oculus Remote. Not present on XBox or Touch controllers.
ovrButton_VolDown
Volume button on Oculus Remote. Not present on XBox or Touch controllers.
ovrButton_Home
Home button on XBox controllers. Oculus button on Touch controllers and Oculus Remote.
ovrButton_Private= ovrButton_VolUp | ovrButton_VolDown | ovrButton_Home
ovrButton_RMask= ovrButton_A | ovrButton_B | ovrButton_RThumb | ovrButton_RShoulder
ovrButton_LMask= ovrButton_X | ovrButton_Y | ovrButton_LThumb | ovrButton_LShoulder | ovrButton_Enter
ovrButton_EnumSize= 0x7fffffff
enum OVR_CAPI.h.ovrTouch
Describes touch input types.
Enumerator
ovrTouch_A= ovrButton_A
ovrTouch_B= ovrButton_B
ovrTouch_RThumb= ovrButton_RThumb
ovrTouch_RThumbRest= 0x00000008
ovrTouch_RIndexTrigger= 0x00000010
ovrTouch_RButtonMask= ovrTouch_A | ovrTouch_B | ovrTouch_RThumb | ovrTouch_RThumbRest | ovrTouch_RIndexTrigger
ovrTouch_X= ovrButton_X
ovrTouch_Y= ovrButton_Y
ovrTouch_LThumb= ovrButton_LThumb
ovrTouch_LThumbRest= 0x00000800
ovrTouch_LIndexTrigger= 0x00001000
ovrTouch_LButtonMask= ovrTouch_X | ovrTouch_Y | ovrTouch_LThumb | ovrTouch_LThumbRest | ovrTouch_LIndexTrigger
ovrTouch_RIndexPointing= 0x00000020
ovrTouch_RThumbUp= 0x00000040
ovrTouch_LIndexPointing= 0x00002000
ovrTouch_LThumbUp= 0x00004000
ovrTouch_RPoseMask= ovrTouch_RIndexPointing | ovrTouch_RThumbUp
ovrTouch_LPoseMask= ovrTouch_LIndexPointing | ovrTouch_LThumbUp
ovrTouch_EnumSize= 0x7fffffff
enum OVR_CAPI.h.ovrControllerType
Specifies which controller is connected; multiple can be connected at once.
Enumerator
ovrControllerType_None= 0x0000
ovrControllerType_LTouch= 0x0001
ovrControllerType_RTouch= 0x0002
ovrControllerType_Touch= (ovrControllerType_LTouch | ovrControllerType_RTouch)
ovrControllerType_Remote= 0x0004
ovrControllerType_XBox= 0x0010
ovrControllerType_Object0= 0x0100
ovrControllerType_Object1= 0x0200
ovrControllerType_Object2= 0x0400
ovrControllerType_Object3= 0x0800
ovrControllerType_Active
Operate on or query whichever controller is active.
ovrControllerType_EnumSize= 0x7fffffff
enum OVR_CAPI.h.ovrHapticsBufferSubmitMode
Haptics buffer submit mode.
Enumerator
ovrHapticsBufferSubmit_Enqueue
Enqueue buffer for later playback.
enum OVR_CAPI.h.ovrTrackedDeviceType
Position tracked devices.
Enumerator
ovrTrackedDevice_None= 0x0000
ovrTrackedDevice_HMD= 0x0001
ovrTrackedDevice_LTouch= 0x0002
ovrTrackedDevice_RTouch= 0x0004
ovrTrackedDevice_Touch= (ovrTrackedDevice_LTouch | ovrTrackedDevice_RTouch)
ovrTrackedDevice_Object0= 0x0010
ovrTrackedDevice_Object1= 0x0020
ovrTrackedDevice_Object2= 0x0040
ovrTrackedDevice_Object3= 0x0080
ovrTrackedDevice_All= 0xFFFF
enum OVR_CAPI.h.ovrBoundaryType
Boundary types that specified while using the boundary system.
Enumerator
ovrBoundary_Outer
Outer boundary - closely represents user setup walls.
ovrBoundary_PlayArea
Play area - safe rectangular area inside outer boundary which can optionally be used to restrict user interactions and motion.
enum OVR_CAPI.h.ovrHandType
Provides names for the left and right hand array indexes.
Enumerator
ovrHand_Left= 0
ovrHand_Right= 1
ovrHand_Count= 2
ovrHand_EnumSize= 0x7fffffff
enum OVR_CAPI.h.ovrCameraStatusFlags
Enumerator
ovrCameraStatus_None
Initial state of camera.
ovrCameraStatus_Connected
Bit set when the camera is connected to the system.
ovrCameraStatus_Calibrating
Bit set when the camera is undergoing calibration.
ovrCameraStatus_CalibrationFailed
Bit set when the camera has tried & failed calibration.
ovrCameraStatus_Calibrated
Bit set when the camera has tried & passed calibration.
ovrCameraStatus_Capturing
Bit set when the camera is capturing.
ovrCameraStatus_EnumSize= 0x7fffffff
enum OVR_CAPI.h.ovrInitFlags
Initialization flags.
Enumerator
ovrInit_Debug
When a debug library is requested, a slower debugging version of the library will run which can be used to help solve problems in the library and debug application code.
ovrInit_RequestVersion
When a version is requested, the LibOVR runtime respects the RequestedMinorVersion field and verifies that the RequestedMinorVersion is supported.
ovrInit_Invisible
This client will not be visible in the HMD.
ovrInit_MixedRendering
This client will alternate between VR and 2D rendering.
ovrInit_FocusAware
This client is aware of ovrSessionStatus focus states (e.g.
ovrinit_WritableBits
These bits are writable by user code.
ovrInit_EnumSize= 0x7fffffff
enum OVR_CAPI.h.ovrLogLevel
Logging levels.
Enumerator
ovrLogLevel_Debug
Debug-level log event.
ovrLogLevel_Info
Info-level log event.
ovrLogLevel_Error
Error-level log event.
ovrLogLevel_EnumSize= 0x7fffffff
enum OVR_CAPI.h.ovrDebugHudStereoMode
Debug HUD is provided to help developers gauge and debug the fidelity of their app's stereo rendering characteristics.
Enumerator
ovrDebugHudStereo_Off
Turns off the Stereo Debug HUD.
ovrDebugHudStereo_Quad
Renders Quad in world for Stereo Debugging.
ovrDebugHudStereo_QuadWithCrosshair
Renders Quad+crosshair in world for Stereo Debugging.
ovrDebugHudStereo_CrosshairAtInfinity
Renders screen-space crosshair at infinity for Stereo Debugging.
ovrDebugHudStereo_Count
ovrDebugHudStereo_EnumSize= 0x7fffffff

Typedef Documentation

typedef char ovrBool ( )
Boolean type.
typedef struct ovrHmdStruct* ovrSession ( )
Used as an opaque pointer to an OVR session.
typedef uint32_t ovrProcessId ( )
typedef struct ovrTextureSwapChainData* ovrTextureSwapChain ( )
typedef struct ovrMirrorTextureData* ovrMirrorTexture ( )
typedef void(OVR_CDECL* ovrLogCallback) (uintptr_t userData, int level, const char *message) ( )
Signature of the logging callback function pointer type.
userData is an arbitrary value specified by the user of ovrInitParams. level is one of the ovrLogLevel constants. message is a UTF8-encoded null-terminated string. ovrInitParams, ovrLogLevel, ovr_Initialize

Function Documentation

ovrResult ovr_Initialize ( const ovrInitParams * params )
Initializes LibOVR.
Initialize LibOVR for application usage. This includes finding and loading the LibOVRRT shared library. No LibOVR API functions, other than ovr_GetLastErrorInfo and ovr_Detect, can be called unless ovr_Initialize succeeds. A successful call to ovr_Initialize must be eventually followed by a call to ovr_Shutdown. ovr_Initialize calls are idempotent. Calling ovr_Initialize twice does not require two matching calls to ovr_Shutdown. If already initialized, the return value is ovr_Success.LibOVRRT shared library search order: Current working directory (often the same as the application directory).Module directory (usually the same as the application directory, but not if the module is a separate shared library).Application directoryDevelopment directory (only if OVR_ENABLE_DEVELOPER_SEARCH is enabled, which is off by default).Standard OS shared library search location(s) (OS-specific). params Specifies custom initialization options. May be NULL to indicate default options when using the CAPI shim. If you are directly calling the LibOVRRT version of ovr_Initialize in the LibOVRRT DLL then this must be valid and include ovrInit_RequestVersion. Returns an ovrResult indicating success or failure. In the case of failure, use ovr_GetLastErrorInfo to get more information. Example failed results include: ovrError_Initialize: Generic initialization error.ovrError_LibLoad: Couldn't load LibOVRRT.ovrError_LibVersion: LibOVRRT version incompatibility.ovrError_ServiceConnection: Couldn't connect to the OVR Service.ovrError_ServiceVersion: OVR Service version incompatibility.ovrError_IncompatibleOS: The operating system version is incompatible.ovrError_DisplayInit: Unable to initialize the HMD display.ovrError_ServerStart: Unable to start the server. Is it already running?ovrError_Reinitialization: Attempted to re-initialize with a different version. Example code ovrInitParamsinitParams={ovrInit_RequestVersion,OVR_MINOR_VERSION,NULL,0,0}; ovrResultresult=ovr_Initialize(&initParams); if(OVR_FAILURE(result)){ ovrErrorInfoerrorInfo; ovr_GetLastErrorInfo(&errorInfo); DebugLog("ovr_Initializefailed:%s",errorInfo.ErrorString); returnfalse; } [...] ovr_Shutdown
void ovr_Shutdown ( )
Shuts down LibOVR.
A successful call to ovr_Initialize must be eventually matched by a call to ovr_Shutdown. After calling ovr_Shutdown, no LibOVR functions can be called except ovr_GetLastErrorInfo or another ovr_Initialize. ovr_Shutdown invalidates all pointers, references, and created objects previously returned by LibOVR functions. The LibOVRRT shared library can be unloaded by ovr_Shutdown.ovr_Initialize
void ovr_GetLastErrorInfo ( ovrErrorInfo * errorInfo )
Returns information about the most recent failed return value by the current thread for this library.
This function itself can never generate an error. The last error is never cleared by LibOVR, but will be overwritten by new errors. Do not use this call to determine if there was an error in the last API call as successful API calls don't clear the last ovrErrorInfo. To avoid any inconsistency, ovr_GetLastErrorInfo should be called immediately after an API function that returned a failed ovrResult, with no other API functions called in the interim. errorInfo The last ovrErrorInfo for the current thread. ovrErrorInfo
const char* ovr_GetVersionString ( )
Returns the version string representing the LibOVRRT version.
The returned string pointer is valid until the next call to ovr_Shutdown.Note that the returned version string doesn't necessarily match the current OVR_MAJOR_VERSION, etc., as the returned string refers to the LibOVRRT shared library version and not the locally compiled interface version.The format of this string is subject to change in future versions and its contents should not be interpreted.Returns a UTF8-encoded null-terminated version string.
int ovr_TraceMessage ( int level, const char * message )
Writes a message string to the LibOVR tracing mechanism (if enabled).
This message will be passed back to the application via the ovrLogCallback if it was registered. level One of the ovrLogLevel constants. message A UTF8-encoded null-terminated string. returns the strlen of the message or a negative value if the message is too large. ovrLogLevel, ovrLogCallback
ovrResult ovr_IdentifyClient ( const char * identity )
Identify client application info.
The string is one or more newline-delimited lines of optional info indicating engine name, engine version, engine plugin name, engine plugin version, engine editor. The order of the lines is not relevant. Individual lines are optional. A newline is not necessary at the end of the last line. Call after ovr_Initialize and before the first call to ovr_Create. Each value is limited to 20 characters. Key names such as 'EngineName:' 'EngineVersion:' do not count towards this limit. identity Specifies one or more newline-delimited lines of optional info: EngineName: s EngineVersion: s EnginePluginName: s EnginePluginVersion: s EngineEditor: <boolean> ('true' or 'false') Example code ovr_IdentifyClient("EngineName:Unity\n" "EngineVersion:5.3.3\n" "EnginePluginName:OVRPlugin\n" "EnginePluginVersion:1.2.0\n" "EngineEditor:true");
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
60
61
62
63
64
65
66
67
68
69
70
71
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
228
229
230
231
232
233
234
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
272
273
274
275
277
278
279
280
282
283
284
285
288
289
290
291
292
294
295
296
297
299
300
301
302
304
305
306
307
309
310
311
312
314
315
316
317
320
321
322
323
324
330
331
332
333
334
335
336
337
338
339
345
346
347
348
349
350
351
352
353
354
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
377
378
379
381
382
383
384
385
386
389
390
391
392
393
394
395
397
398
399
400
401
402
406
407
408
409
410
411
412
415
427
428
437
438
439
440
441
442
445
446
447
448
449
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
473
474
475
476
477
478
479
480
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
504
505
506
507
508
509
514
515
516
517
518
519
520
525
527
528
531
532
533
536
538
539
542
543
547
548
549
550
551
557
559
560
562
563
567
568
571
572
580
581
582
583
584
585
593
594
595
596
597
598
599
600
608
609
610
611
612
613
614
629
630
631
632
633
634
635
636
641
642
643
644
645
646
647
648
656
657
658
660
661
663
664
667
668
669
670
671
672
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
720
721
722
727
728
731
732
736
737
741
742
743
744
745
746
752
753
754
755
756
757
758
759
760
761
762
763
764
771
776
777
780
781
784
785
786
788
789
791
792
794
795
796
797
798
799
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
832
833
834
835
837
838
839
840
841
842
843
849
851
852
854
855
857
858
860
861
862
864
865
867
868
870
871
873
874
876
877
879
880
882
883
885
886
890
891
894
895
897
898
900
901
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
998
1000
1001
1002
1004
1005
1007
1009
1011
1013
1014
1015
1017
1018
1019
1020
1021
1022
1023
1024
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1042
1044
1045
1048
1049
1050
1052
1054
1055
1056
1058
1061
1062
1064
1065
1067
1068
1070
1071
1072
1077
1078
1079
1080
1081
1082
1083
1087
1089
1090
1092
1093
1095
1096
1102
1103
1108
1109
1114
1115
1117
1118
1124
1125
1131
1132
1136
1137
1143
1144
1150
1151
1155
1156
1157
1158
1160
1161
1163
1164
1166
1167
1169
1170
1172
1173
1175
1176
1178
1179
1181
1182
1183
1184
1185
1187
1188
1190
1191
1193
1194
1196
1197
1199
1200
1202
1203
1204
1205
1206
1207
1210
1211
1213
1214
1219
1220
1223
1224
1226
1227
1229
1230
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1251
1254
1255
1256
1262
1263
1264
1267
1268
1271
1272
1275
1276
1277
1278
1279
1280
1282
1283
1284
1285
1286
1291
1292
1293
1294
1295
1296
1297
1298
1306
1307
1312
1315
1316
1321
1322
1326
1327
1331
1332
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1399
1400
1412
1413
1429
1430
1444
1445
1457
1458
1485
1486
1487
1492
1504
1505
1515
1516
1533
1534
1535
1564
1565
1571
1572
1573
1574
1579
1581
1582
1584
1585
1587
1588
1590
1591
1593
1594
1597
1598
1602
1603
1607
1608
1611
1612
1613
1614
1615
1616
1629
1630
1631
1632
1644
1645
1646
1647
1648
1649
1661
1662
1663
1665
1666
1675
1676
1689
1690
1691
1700
1701
1731
1732
1777
1778
1785
1786
1805
1806
1807
1823
1824
1825
1826
1827
1828
1829
1830
1831
1842
1843
1844
1853
1854
1855
1862
1863
1871
1872
1873
1891
1892
1893
1894
1895
1896
1897
1913
1914
1915
1916
1917
1918
1932
1933
1934
1935
1936
1937
1958
1959
1960
1961
1962
1963
1964
1981
1982
1983
1984
1985
1986
1987
1995
1996
1997
2004
2005
2019
2020
2021
2022
2023
2024
2025
2038
2039
2040
2041
2042
2043
2057
2058
2066
2067
2068
2073
2083
2084
2085
2086
2087
2088
2099
2100
2101
2102
2103
2104
2105
2107
2108
2109
2110
2111
2112
2114
2119
2120
2126
2128
2129
2131
2132
2134
2135
2137
2138
2139
2140
2141
2143
2144
2145
2147
2148
2150
2151
2153
2154
2155
2156
2157
2158
2159
2164
2170
2171
2174
2175
2181
2182
2183
2184
2185
2193
2194
2195
2196
2197
2198
2199
2215
2217
2218
2221
2222
2225
2226
2228
2229
2233
2234
2239
2240
2241
2260
2262
2263
2266
2267
2270
2271
2273
2274
2278
2279
2284
2285
2288
2289
2292
2293
2294
2297
2298
2299
2300
2301
2302
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2368
2369
2370
2371
2387
2389
2390
2393
2394
2397
2398
2400
2401
2405
2406
2411
2412
2414
2415
2417
2418
2419
2438
2440
2441
2444
2445
2448
2449
2453
2454
2460
2461
2466
2467
2468
2482
2484
2485
2487
2488
2490
2491
2497
2498
2500
2501
2502
2538
2540
2541
2543
2544
2546
2547
2552
2553
2555
2556
2559
2560
2566
2567
2568
2579
2581
2582
2584
2585
2587
2588
2589
2590
2591
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2606
2607
2608
2618
2619
2623
2634
2635
2636
2647
2648
2649
2661
2662
2663
2664
2665
2666
2685
2686
2687
2696
2697
2698
2702
2711
2712
2713
2740
2741
2742
2743
2744
2745
2746
2758
2759
2760
2784
2785
2786
2807
2808
2809
2868
2869
2870
2871
2872
2873
2874
2875
2942
2943
2944
2945
2946
2947
2948
2950
2951
2952
2953
2956
2957
2963
2967
2968
2972
2974
2975
2978
2979
2984
2985
2990
2991
2995
2996
2999
3000
3004
3008
3009
3014
3015
3019
3020
3024
3025
3028
3029
3033
3034
3037
3038
3042
3045
3046
3049
3050
3053
3054
3057
3058
3059
3060
3064
3065
3070
3082
3083
3084
3087
3088
3101
3102
3105
3106
3110
3111
3112
3113
3114
3145
3146
3159
3160
3183
3184
3193
3194
3195
3196
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3227
3228
3229
3230
3231
3232
3234
3250
3252
3253
3255
3256
3258
3259
3261
3262
3264
3265
3266
3267
3268
3269
3270
3271
3277
3278
3286
3287
3288
3298
3299
3300
3308
3309
3319
3320
3328
3329
3330
3339
3340
3341
3349
3350
3351
3352
3353
3354
3355
3364
3365
3366
3367
3368
3369
3370
3380
3381
3382
3391
3392
3393
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3424
3425
/************************************************************************************
 \file      OVR_CAPI.h
 \brief     C Interface to the Oculus PC SDK tracking and rendering library.
 \copyright Copyright 2014 Oculus VR, LLC All Rights reserved.
 ************************************************************************************/

// We don't use version numbers within OVR_CAPI_h, as all versioned variations
// of this file are currently mutually exclusive.
#ifndef OVR_CAPI_h
#define OVR_CAPI_h

#include "OVR_CAPI_Keys.h"
#include "OVR_Version.h"
#include "OVR_ErrorCode.h"

#if !defined(_WIN32)
#include <sys/types.h>
#endif


#include <stdint.h>

#if defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable : 4324) // structure was padded due to __declspec(align())
#pragma warning(disable : 4359) // The alignment specified for a type is less than the
// alignment of the type of one of its data members
#endif

//-----------------------------------------------------------------------------------
// ***** OVR_OS
//
#if !defined(OVR_OS_WIN32) && defined(_WIN32)
#define OVR_OS_WIN32
#endif

#if !defined(OVR_OS_MAC) && defined(__APPLE__)
#define OVR_OS_MAC
#endif

#if !defined(OVR_OS_LINUX) && defined(__linux__)
#define OVR_OS_LINUX
#endif

//-----------------------------------------------------------------------------------
// ***** OVR_CPP
//
#if !defined(OVR_CPP)
#if defined(__cplusplus)
#define OVR_CPP(x) x
#else
#define OVR_CPP(x) /* Not C++ */
#endif
#endif

//-----------------------------------------------------------------------------------
// ***** OVR_CDECL
//
//
#if !defined(OVR_CDECL)
#if defined(_WIN32)
#define OVR_CDECL __cdecl
#else
#define OVR_CDECL
#endif
#endif

//-----------------------------------------------------------------------------------
// ***** OVR_EXTERN_C
//
//
#if !defined(OVR_EXTERN_C)
#ifdef __cplusplus
#define OVR_EXTERN_C extern "C"
#else
#define OVR_EXTERN_C
#endif
#endif

//-----------------------------------------------------------------------------------
// ***** OVR_PUBLIC_FUNCTION / OVR_PRIVATE_FUNCTION
//
// OVR_PUBLIC_FUNCTION  - Functions that externally visible from a shared library.
//                        Corresponds to Microsoft __dllexport.
// OVR_PUBLIC_CLASS     - C++ structs and classes that are externally visible from a
//                        shared library. Corresponds to Microsoft __dllexport.
// OVR_PRIVATE_FUNCTION - Functions that are not visible outside of a shared library.
//                        They are private to the shared library.
// OVR_PRIVATE_CLASS    - C++ structs and classes that are not visible outside of a
//                        shared library. They are private to the shared library.
//
// OVR_DLL_BUILD        - Used to indicate that the current compilation unit is of a shared library.
// OVR_DLL_IMPORT       - Used to indicate that the current compilation unit is a
//                        user of the corresponding shared library.
// OVR_STATIC_BUILD     - used to indicate that the current compilation unit is not a
//                        shared library but rather statically linked code.
//
#if !defined(OVR_PUBLIC_FUNCTION)
#if defined(OVR_DLL_BUILD)
#if defined(_WIN32)
#define OVR_PUBLIC_FUNCTION(rval) OVR_EXTERN_C __declspec(dllexport) rval OVR_CDECL
#define OVR_PUBLIC_CLASS __declspec(dllexport)
#define OVR_PRIVATE_FUNCTION(rval) rval OVR_CDECL
#define OVR_PRIVATE_CLASS
#else
#define OVR_PUBLIC_FUNCTION(rval) \
  OVR_EXTERN_C __attribute__((visibility("default"))) rval OVR_CDECL /* Requires GCC 4.0+ */
#define OVR_PUBLIC_CLASS __attribute__((visibility("default"))) /* Requires GCC 4.0+ */
#define OVR_PRIVATE_FUNCTION(rval) __attribute__((visibility("hidden"))) rval OVR_CDECL
#define OVR_PRIVATE_CLASS __attribute__((visibility("hidden")))
#endif
#elif defined(OVR_DLL_IMPORT)
#if defined(_WIN32)
#define OVR_PUBLIC_FUNCTION(rval) OVR_EXTERN_C __declspec(dllimport) rval OVR_CDECL
#define OVR_PUBLIC_CLASS __declspec(dllimport)
#else
#define OVR_PUBLIC_FUNCTION(rval) OVR_EXTERN_C rval OVR_CDECL
#define OVR_PUBLIC_CLASS
#endif
#define OVR_PRIVATE_FUNCTION(rval) rval OVR_CDECL
#define OVR_PRIVATE_CLASS
#else // OVR_STATIC_BUILD
#define OVR_PUBLIC_FUNCTION(rval) OVR_EXTERN_C rval OVR_CDECL
#define OVR_PUBLIC_CLASS
#define OVR_PRIVATE_FUNCTION(rval) rval OVR_CDECL
#define OVR_PRIVATE_CLASS
#endif
#endif

//-----------------------------------------------------------------------------------
// ***** OVR_EXPORT
//
//
#if !defined(OVR_EXPORT)
#ifdef OVR_OS_WIN32
#define OVR_EXPORT __declspec(dllexport)
#else
#define OVR_EXPORT
#endif
#endif

//-----------------------------------------------------------------------------------
// ***** OVR_ALIGNAS
//
#if !defined(OVR_ALIGNAS)
#if defined(__GNUC__) || defined(__clang__)
#define OVR_ALIGNAS(n) __attribute__((aligned(n)))
#elif defined(_MSC_VER) || defined(__INTEL_COMPILER)
#define OVR_ALIGNAS(n) __declspec(align(n))
#elif defined(__CC_ARM)
#define OVR_ALIGNAS(n) __align(n)
#else
#error Need to define OVR_ALIGNAS
#endif
#endif

//-----------------------------------------------------------------------------------
// ***** OVR_CC_HAS_FEATURE
//
// This is a portable way to use compile-time feature identification available
// with some compilers in a clean way. Direct usage of __has_feature in preprocessing
// statements of non-supporting compilers results in a preprocessing error.
//
// Example usage:
//     #if OVR_CC_HAS_FEATURE(is_pod)
//         if(__is_pod(T)) // If the type is plain data then we can safely memcpy it.
//             memcpy(&destObject, &srcObject, sizeof(object));
//     #endif
//
#if !defined(OVR_CC_HAS_FEATURE)
#if defined(__clang__) // http://clang.llvm.org/docs/LanguageExtensions.html#id2
#define OVR_CC_HAS_FEATURE(x) __has_feature(x)
#else
#define OVR_CC_HAS_FEATURE(x) 0
#endif
#endif

// ------------------------------------------------------------------------
// ***** OVR_STATIC_ASSERT
//
// Portable support for C++11 static_assert().
// Acts as if the following were declared:
//     void OVR_STATIC_ASSERT(bool const_expression, const char* msg);
//
// Example usage:
//     OVR_STATIC_ASSERT(sizeof(int32_t) == 4, "int32_t expected to be 4 bytes.");

#if !defined(OVR_STATIC_ASSERT)
#if !(defined(__cplusplus) && (__cplusplus >= 201103L)) /* Other */ && \
    !(defined(__GXX_EXPERIMENTAL_CXX0X__)) /* GCC */ &&                \
    !(defined(__clang__) && defined(__cplusplus) &&                    \
      OVR_CC_HAS_FEATURE(cxx_static_assert)) /* clang */               \
    && !(defined(_MSC_VER) && (_MSC_VER >= 1600) && defined(__cplusplus)) /* VS2010+  */

#if !defined(OVR_SA_UNUSED)
#if defined(OVR_CC_GNU) || defined(OVR_CC_CLANG)
#define OVR_SA_UNUSED __attribute__((unused))
#else
#define OVR_SA_UNUSED
#endif
#define OVR_SA_PASTE(a, b) a##b
#define OVR_SA_HELP(a, b) OVR_SA_PASTE(a, b)
#endif

#if defined(__COUNTER__)
#define OVR_STATIC_ASSERT(expression, msg) \
  typedef char OVR_SA_HELP(staticAssert, __COUNTER__)[((expression) != 0) ? 1 : -1] OVR_SA_UNUSED
#else
#define OVR_STATIC_ASSERT(expression, msg) \
  typedef char OVR_SA_HELP(staticAssert, __LINE__)[((expression) != 0) ? 1 : -1] OVR_SA_UNUSED
#endif

#else
#define OVR_STATIC_ASSERT(expression, msg) static_assert(expression, msg)
#endif
#endif

//-----------------------------------------------------------------------------------
// ***** Padding
//
#if !defined(OVR_UNUSED_STRUCT_PAD)
#define OVR_UNUSED_STRUCT_PAD(padName, size) char padName[size];
#endif

//-----------------------------------------------------------------------------------
// ***** Word Size
//
#if !defined(OVR_PTR_SIZE)
#if defined(__WORDSIZE)
#define OVR_PTR_SIZE ((__WORDSIZE) / 8)
#elif defined(_WIN64) || defined(__LP64__) || defined(_LP64) || defined(_M_IA64) || \
    defined(__ia64__) || defined(__arch64__) || defined(__64BIT__) || defined(__Ptr_Is_64)
#define OVR_PTR_SIZE 8
#elif defined(__CC_ARM) && (__sizeof_ptr == 8)
#define OVR_PTR_SIZE 8
#else
#define OVR_PTR_SIZE 4
#endif
#endif

//-----------------------------------------------------------------------------------
// ***** OVR_ON32 / OVR_ON64
//
#if OVR_PTR_SIZE == 8
#define OVR_ON32(x)
#define OVR_ON64(x) x
#else
#define OVR_ON32(x) x
#define OVR_ON64(x)
#endif

//-----------------------------------------------------------------------------------
// ***** ovrBool

typedefchar ovrBool; 
#define ovrFalse 0 
#define ovrTrue 1 

//-----------------------------------------------------------------------------------
// ***** Simple Math Structures

typedefstruct OVR_ALIGNAS(4) ovrColorf_ {
float r, g, b, a;
} ovrColorf;

typedefstruct OVR_ALIGNAS(4) ovrVector2i_ {
int x, y;
} ovrVector2i;

typedefstruct OVR_ALIGNAS(4) ovrSizei_ {
int w, h;
} ovrSizei;

typedefstruct OVR_ALIGNAS(4) ovrRecti_ {
  ovrVector2i Pos;
  ovrSizei Size;
} ovrRecti;

typedefstruct OVR_ALIGNAS(4) ovrQuatf_ {
float x, y, z, w;
} ovrQuatf;

typedefstruct OVR_ALIGNAS(4) ovrVector2f_ {
float x, y;
} ovrVector2f;

typedefstruct OVR_ALIGNAS(4) ovrVector3f_ {
float x, y, z;
} ovrVector3f;

typedefstruct OVR_ALIGNAS(4) ovrVector4f_ {
float x, y, z, w;
} ovrVector4f;

typedefstruct OVR_ALIGNAS(4) ovrMatrix4f_ {
float M[4][4];
} ovrMatrix4f;

typedefstruct OVR_ALIGNAS(4) ovrPosef_ {
  ovrQuatf Orientation;
  ovrVector3f Position;
} ovrPosef;

typedefstruct OVR_ALIGNAS(8) ovrPoseStatef_ {
  ovrPosef ThePose; 
  ovrVector3f AngularVelocity; 
  ovrVector3f LinearVelocity; 
  ovrVector3f AngularAcceleration; 
  ovrVector3f LinearAcceleration; 
  OVR_UNUSED_STRUCT_PAD(pad0, 4) 
  double TimeInSeconds; 
} ovrPoseStatef;

typedef struct OVR_ALIGNAS(4) ovrFovPort_ {
float UpTan; 
float DownTan; 
float LeftTan; 
float RightTan; 
} ovrFovPort;

//-----------------------------------------------------------------------------------
// ***** HMD Types

typedefenum ovrHmdType_ {
  ovrHmd_None = 0,
  ovrHmd_DK1 = 3,
  ovrHmd_DKHD = 4,
  ovrHmd_DK2 = 6,
  ovrHmd_CB = 8,
  ovrHmd_Other = 9,
  ovrHmd_E3_2015 = 10,
  ovrHmd_ES06 = 11,
  ovrHmd_ES09 = 12,
  ovrHmd_ES11 = 13,
  ovrHmd_CV1 = 14,

  ovrHmd_EnumSize = 0x7fffffff 
} ovrHmdType;

typedefenum ovrHmdCaps_ {
// Read-only flags

  ovrHmdCap_DebugDevice = 0x0010,


  ovrHmdCap_EnumSize = 0x7fffffff 
} ovrHmdCaps;

typedefenum ovrTrackingCaps_ {
  ovrTrackingCap_Orientation = 0x0010, 
  ovrTrackingCap_MagYawCorrection = 0x0020, 
  ovrTrackingCap_Position = 0x0040, 
  ovrTrackingCap_EnumSize = 0x7fffffff 
} ovrTrackingCaps;

typedefenum ovrExtensions_ {
  ovrExtension_TextureLayout_Octilinear = 0, 
  ovrExtension_Count, 
  ovrExtension_EnumSize = 0x7fffffff 
} ovrExtensions;

typedefenum ovrEyeType_ {
  ovrEye_Left = 0, 
  ovrEye_Right = 1, 
  ovrEye_Count = 2, 
  ovrEye_EnumSize = 0x7fffffff 
} ovrEyeType;

typedefenum ovrTrackingOrigin_ {
  ovrTrackingOrigin_EyeLevel = 0,

  ovrTrackingOrigin_FloorLevel = 1,

  ovrTrackingOrigin_Count = 2, 
  ovrTrackingOrigin_EnumSize = 0x7fffffff 
} ovrTrackingOrigin;

typedefstruct OVR_ALIGNAS(OVR_PTR_SIZE) ovrGraphicsLuid_ {
// Public definition reserves space for graphics API-specific implementation
char Reserved[8];
} ovrGraphicsLuid;

typedefstruct OVR_ALIGNAS(OVR_PTR_SIZE) ovrHmdDesc_ {
  ovrHmdType Type; 
  OVR_ON64(OVR_UNUSED_STRUCT_PAD(pad0, 4)) 
  char ProductName[64]; 
char Manufacturer[64]; 
short VendorId; 
short ProductId; 
char SerialNumber[24]; 
short FirmwareMajor; 
short FirmwareMinor; 
unsignedint AvailableHmdCaps; 
unsignedint DefaultHmdCaps; 
unsignedint AvailableTrackingCaps; 
unsignedint DefaultTrackingCaps; 
  ovrFovPort DefaultEyeFov[ovrEye_Count]; 
  ovrFovPort MaxEyeFov[ovrEye_Count]; 
  ovrSizei Resolution; 
float DisplayRefreshRate; 
  OVR_ON64(OVR_UNUSED_STRUCT_PAD(pad1, 4)) 
} ovrHmdDesc;

typedef struct ovrHmdStruct* ovrSession;

#ifdef OVR_OS_WIN32
typedef uint32_t ovrProcessId;
#else
typedef pid_t ovrProcessId;
#endif

#if !defined(VK_VERSION_1_0)
// From <vulkan/vulkan.h>:
#define VK_DEFINE_HANDLE(object) typedef struct object##_T* object;
#if defined(__LP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__)) || \
    defined(_M_X64) || defined(__ia64) || defined(_M_IA64) || defined(__aarch64__) ||       \
    defined(__powerpc64__)
#define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef struct object##_T* object;
#else
#define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef uint64_t object;
#endif
VK_DEFINE_HANDLE(VkInstance)
VK_DEFINE_HANDLE(VkPhysicalDevice)
VK_DEFINE_HANDLE(VkDevice)
VK_DEFINE_HANDLE(VkQueue)
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkImage)
#endif

typedefenum ovrStatusBits_ {
  ovrStatus_OrientationTracked = 0x0001, 
  ovrStatus_PositionTracked = 0x0002, 
  ovrStatus_EnumSize = 0x7fffffff 
} ovrStatusBits;

typedefstruct OVR_ALIGNAS(OVR_PTR_SIZE) ovrTrackerDesc_ {
float FrustumHFovInRadians; 
float FrustumVFovInRadians; 
float FrustumNearZInMeters; 
float FrustumFarZInMeters; 
} ovrTrackerDesc;

typedefenum ovrTrackerFlags_ {
  ovrTracker_Connected = 0x0020,

  ovrTracker_PoseTracked = 0x0004
} ovrTrackerFlags;

typedefstruct OVR_ALIGNAS(8) _ovrTrackerPose {
unsignedint TrackerFlags;

  ovrPosef Pose;

  ovrPosef LeveledPose;

  OVR_UNUSED_STRUCT_PAD(pad0, 4) 
} ovrTrackerPose;

typedefstruct OVR_ALIGNAS(8) ovrTrackingState_ {
  ovrPoseStatef HeadPose;

unsignedint StatusFlags;

  ovrPoseStatef HandPoses[2];

unsignedint HandStatusFlags[2];

  ovrPosef CalibratedOrigin;

} ovrTrackingState;



typedefstruct OVR_ALIGNAS(4) ovrEyeRenderDesc_ {
  ovrEyeType Eye; 
  ovrFovPort Fov; 
  ovrRecti DistortedViewport; 
  ovrVector2f PixelsPerTanAngleAtCenter; 
  ovrPosef HmdToEyePose; 
} ovrEyeRenderDesc;

typedefstruct OVR_ALIGNAS(4) ovrTimewarpProjectionDesc_ {
float Projection22; 
float Projection23; 
float Projection32; 
} ovrTimewarpProjectionDesc;


typedefstruct OVR_ALIGNAS(4) ovrViewScaleDesc_ {
  ovrPosef HmdToEyePose[ovrEye_Count]; 
float HmdSpaceToWorldScaleInMeters; 
} ovrViewScaleDesc;

//-----------------------------------------------------------------------------------
// ***** Platform-independent Rendering Configuration

typedefenum ovrTextureType_ {
  ovrTexture_2D, 
  ovrTexture_2D_External, 
  ovrTexture_Cube, 
  ovrTexture_Count,
  ovrTexture_EnumSize = 0x7fffffff 
} ovrTextureType;

typedefenum ovrTextureBindFlags_ {
  ovrTextureBind_None,

  ovrTextureBind_DX_RenderTarget = 0x0001,

  ovrTextureBind_DX_UnorderedAccess = 0x0002,

  ovrTextureBind_DX_DepthStencil = 0x0004,


  ovrTextureBind_EnumSize = 0x7fffffff 
} ovrTextureBindFlags;

typedefenum ovrTextureFormat_ {
  OVR_FORMAT_UNKNOWN = 0,
  OVR_FORMAT_B5G6R5_UNORM = 1, 
  OVR_FORMAT_B5G5R5A1_UNORM = 2, 
  OVR_FORMAT_B4G4R4A4_UNORM = 3, 
  OVR_FORMAT_R8G8B8A8_UNORM = 4,
  OVR_FORMAT_R8G8B8A8_UNORM_SRGB = 5,
  OVR_FORMAT_B8G8R8A8_UNORM = 6,
  OVR_FORMAT_B8G8R8_UNORM = 27,
  OVR_FORMAT_B8G8R8A8_UNORM_SRGB = 7, 
  OVR_FORMAT_B8G8R8X8_UNORM = 8, 
  OVR_FORMAT_B8G8R8X8_UNORM_SRGB = 9, 
  OVR_FORMAT_R16G16B16A16_FLOAT = 10,
  OVR_FORMAT_R11G11B10_FLOAT = 25, 

// Depth formats
  OVR_FORMAT_D16_UNORM = 11,
  OVR_FORMAT_D24_UNORM_S8_UINT = 12,
  OVR_FORMAT_D32_FLOAT = 13,
  OVR_FORMAT_D32_FLOAT_S8X24_UINT = 14,

// Added in 1.5 compressed formats can be used for static layers
  OVR_FORMAT_BC1_UNORM = 15,
  OVR_FORMAT_BC1_UNORM_SRGB = 16,
  OVR_FORMAT_BC2_UNORM = 17,
  OVR_FORMAT_BC2_UNORM_SRGB = 18,
  OVR_FORMAT_BC3_UNORM = 19,
  OVR_FORMAT_BC3_UNORM_SRGB = 20,
  OVR_FORMAT_BC6H_UF16 = 21,
  OVR_FORMAT_BC6H_SF16 = 22,
  OVR_FORMAT_BC7_UNORM = 23,
  OVR_FORMAT_BC7_UNORM_SRGB = 24,


  OVR_FORMAT_LAST,
  OVR_FORMAT_ENUMSIZE = 0x7fffffff 
} ovrTextureFormat;

typedefenum ovrTextureMiscFlags_ {
  ovrTextureMisc_None,

  ovrTextureMisc_DX_Typeless = 0x0001,

  ovrTextureMisc_AllowGenerateMips = 0x0002,

  ovrTextureMisc_ProtectedContent = 0x0004,

  ovrTextureMisc_AutoGenerateMips = 0x0008,


  ovrTextureMisc_EnumSize = 0x7fffffff 
} ovrTextureFlags;

typedefstruct ovrTextureSwapChainDesc_ {
  ovrTextureType Type; 
  ovrTextureFormat Format;
int ArraySize; 
int Width;
int Height;
int MipLevels;
int SampleCount;
  ovrBool StaticImage; 
  OVR_ALIGNAS(4) unsigned int MiscFlags; 
  OVR_ALIGNAS(4) unsignedint BindFlags; 
} ovrTextureSwapChainDesc;

typedef enum ovrMirrorOptions_ {
  ovrMirrorOption_Default = 0x0000,

  ovrMirrorOption_PostDistortion = 0x0001,

  ovrMirrorOption_LeftEyeOnly = 0x0002,
  ovrMirrorOption_RightEyeOnly = 0x0004,

  ovrMirrorOption_IncludeGuardian = 0x0008,

  ovrMirrorOption_IncludeNotifications = 0x0010,

  ovrMirrorOption_IncludeSystemGui = 0x0020,


  ovrMirrorOption_EnumSize = 0x7fffffff 
} ovrMirrorOptions;

typedefstruct ovrMirrorTextureDesc_ {
  ovrTextureFormat Format;
int Width;
int Height;
unsignedint MiscFlags; 
unsignedint MirrorOptions; 
} ovrMirrorTextureDesc;

typedefstruct ovrTextureSwapChainData* ovrTextureSwapChain;
typedefstruct ovrMirrorTextureData* ovrMirrorTexture;

typedefenum ovrViewportStencilType_ {
  ovrViewportStencil_HiddenArea = 0, 
  ovrViewportStencil_VisibleArea = 1, 
  ovrViewportStencil_BorderLine = 2, 

  ovrViewportStencilType_EnumSize = 0x7fffffff 
} ovrViewportStencilType;
typedefstruct ovrViewportStencilDesc_ {
  ovrViewportStencilType StencilType;
  ovrEyeType Eye;
  ovrFovPort FovPort; 
  ovrQuatf HmdToEyeRotation; 
} ovrViewportStencilDesc;
typedefstruct ovrViewportStencilMeshBuffer_ {
int AllocVertexCount; 
int UsedVertexCount; 
  ovrVector2f* VertexBuffer; 

int AllocIndexCount; 
int UsedIndexCount; 
  uint16_t* IndexBuffer; 
} ovrViewportStencilMeshBuffer;

//-----------------------------------------------------------------------------------

typedefenum ovrButton_ {
  ovrButton_A = 0x00000001,

  ovrButton_B = 0x00000002,

  ovrButton_RThumb = 0x00000004,

  ovrButton_RShoulder = 0x00000008,


  ovrButton_X = 0x00000100,

  ovrButton_Y = 0x00000200,

  ovrButton_LThumb = 0x00000400,

  ovrButton_LShoulder = 0x00000800,

  ovrButton_Up = 0x00010000,

  ovrButton_Down = 0x00020000,

  ovrButton_Left = 0x00040000,

  ovrButton_Right = 0x00080000,

  ovrButton_Enter = 0x00100000,

  ovrButton_Back = 0x00200000,

  ovrButton_VolUp = 0x00400000,

  ovrButton_VolDown = 0x00800000,

  ovrButton_Home = 0x01000000,

// Bit mask of all buttons that are for private usage by Oculus
  ovrButton_Private = ovrButton_VolUp | ovrButton_VolDown | ovrButton_Home,

// Bit mask of all buttons on the right Touch controller
  ovrButton_RMask = ovrButton_A | ovrButton_B | ovrButton_RThumb | ovrButton_RShoulder,

// Bit mask of all buttons on the left Touch controller
  ovrButton_LMask =
      ovrButton_X | ovrButton_Y | ovrButton_LThumb | ovrButton_LShoulder | ovrButton_Enter,

  ovrButton_EnumSize = 0x7fffffff 
} ovrButton;

typedefenum ovrTouch_ {
  ovrTouch_A = ovrButton_A,
  ovrTouch_B = ovrButton_B,
  ovrTouch_RThumb = ovrButton_RThumb,
  ovrTouch_RThumbRest = 0x00000008,
  ovrTouch_RIndexTrigger = 0x00000010,

// Bit mask of all the button touches on the right controller
  ovrTouch_RButtonMask =
      ovrTouch_A | ovrTouch_B | ovrTouch_RThumb | ovrTouch_RThumbRest | ovrTouch_RIndexTrigger,

  ovrTouch_X = ovrButton_X,
  ovrTouch_Y = ovrButton_Y,
  ovrTouch_LThumb = ovrButton_LThumb,
  ovrTouch_LThumbRest = 0x00000800,
  ovrTouch_LIndexTrigger = 0x00001000,

// Bit mask of all the button touches on the left controller
  ovrTouch_LButtonMask =
      ovrTouch_X | ovrTouch_Y | ovrTouch_LThumb | ovrTouch_LThumbRest | ovrTouch_LIndexTrigger,

// Finger pose state
// Derived internally based on distance, proximity to sensors and filtering.
  ovrTouch_RIndexPointing = 0x00000020,
  ovrTouch_RThumbUp = 0x00000040,
  ovrTouch_LIndexPointing = 0x00002000,
  ovrTouch_LThumbUp = 0x00004000,

// Bit mask of all right controller poses
  ovrTouch_RPoseMask = ovrTouch_RIndexPointing | ovrTouch_RThumbUp,

// Bit mask of all left controller poses
  ovrTouch_LPoseMask = ovrTouch_LIndexPointing | ovrTouch_LThumbUp,

  ovrTouch_EnumSize = 0x7fffffff 
} ovrTouch;

typedefstruct OVR_ALIGNAS(OVR_PTR_SIZE) ovrTouchHapticsDesc_ {
// Haptics engine frequency/sample-rate, sample time in seconds equals 1.0/sampleRateHz
int SampleRateHz;
// Size of each Haptics sample, sample value range is [0, 2^(Bytes*8)-1]
int SampleSizeInBytes;

// Queue size that would guarantee Haptics engine would not starve for data
// Make sure size doesn't drop below it for best results
int QueueMinSizeToAvoidStarvation;

// Minimum, Maximum and Optimal number of samples that can be sent to Haptics through
// ovr_SubmitControllerVibration
int SubmitMinSamples;
int SubmitMaxSamples;
int SubmitOptimalSamples;
} ovrTouchHapticsDesc;

typedefenum ovrControllerType_ {
  ovrControllerType_None = 0x0000,
  ovrControllerType_LTouch = 0x0001,
  ovrControllerType_RTouch = 0x0002,
  ovrControllerType_Touch = (ovrControllerType_LTouch | ovrControllerType_RTouch),
  ovrControllerType_Remote = 0x0004,

  ovrControllerType_XBox = 0x0010,

  ovrControllerType_Object0 = 0x0100,
  ovrControllerType_Object1 = 0x0200,
  ovrControllerType_Object2 = 0x0400,
  ovrControllerType_Object3 = 0x0800,

  ovrControllerType_Active = 0xffffffff, 

  ovrControllerType_EnumSize = 0x7fffffff 
} ovrControllerType;

typedefenum ovrHapticsBufferSubmitMode_ {
  ovrHapticsBufferSubmit_Enqueue
} ovrHapticsBufferSubmitMode;

#define OVR_HAPTICS_BUFFER_SAMPLES_MAX 256

typedefstruct ovrHapticsBuffer_ {
constvoid* Samples;
int SamplesCount;
  ovrHapticsBufferSubmitMode SubmitMode;
} ovrHapticsBuffer;

typedefstruct ovrHapticsPlaybackState_ {
// Remaining space available to queue more samples
int RemainingQueueSpace;

// Number of samples currently queued
int SamplesQueued;
} ovrHapticsPlaybackState;

typedefenum ovrTrackedDeviceType_ {
  ovrTrackedDevice_None = 0x0000,
  ovrTrackedDevice_HMD = 0x0001,
  ovrTrackedDevice_LTouch = 0x0002,
  ovrTrackedDevice_RTouch = 0x0004,
  ovrTrackedDevice_Touch = (ovrTrackedDevice_LTouch | ovrTrackedDevice_RTouch),

  ovrTrackedDevice_Object0 = 0x0010,
  ovrTrackedDevice_Object1 = 0x0020,
  ovrTrackedDevice_Object2 = 0x0040,
  ovrTrackedDevice_Object3 = 0x0080,

  ovrTrackedDevice_All = 0xFFFF,
} ovrTrackedDeviceType;

typedefenum ovrBoundaryType_ {
  ovrBoundary_Outer = 0x0001,

  ovrBoundary_PlayArea = 0x0100,
} ovrBoundaryType;

typedefstruct ovrBoundaryLookAndFeel_ {
  ovrColorf Color;
} ovrBoundaryLookAndFeel;

typedefstruct ovrBoundaryTestResult_ {
  ovrBool IsTriggering;

float ClosestDistance;

  ovrVector3f ClosestPoint;

  ovrVector3f ClosestPointNormal;
} ovrBoundaryTestResult;

typedefenum ovrHandType_ {
  ovrHand_Left = 0,
  ovrHand_Right = 1,
  ovrHand_Count = 2,
  ovrHand_EnumSize = 0x7fffffff 
} ovrHandType;

typedefstruct ovrInputState_ {
double TimeInSeconds;

unsignedint Buttons;

unsignedint Touches;

float IndexTrigger[ovrHand_Count];

float HandTrigger[ovrHand_Count];

  ovrVector2f Thumbstick[ovrHand_Count];

  ovrControllerType ControllerType;

float IndexTriggerNoDeadzone[ovrHand_Count];

float HandTriggerNoDeadzone[ovrHand_Count];

  ovrVector2f ThumbstickNoDeadzone[ovrHand_Count];

float IndexTriggerRaw[ovrHand_Count];

float HandTriggerRaw[ovrHand_Count];

  ovrVector2f ThumbstickRaw[ovrHand_Count];
} ovrInputState;

typedefstruct ovrCameraIntrinsics_ {
double LastChangedTime;

  ovrFovPort FOVPort;

float VirtualNearPlaneDistanceMeters;

float VirtualFarPlaneDistanceMeters;

  ovrSizei ImageSensorPixelResolution;

  ovrMatrix4f LensDistortionMatrix;

double ExposurePeriodSeconds;

double ExposureDurationSeconds;

} ovrCameraIntrinsics;

typedefenum ovrCameraStatusFlags_ {
  ovrCameraStatus_None = 0x0,

  ovrCameraStatus_Connected = 0x1,

  ovrCameraStatus_Calibrating = 0x2,

  ovrCameraStatus_CalibrationFailed = 0x4,

  ovrCameraStatus_Calibrated = 0x8,

  ovrCameraStatus_Capturing = 0x10,

  ovrCameraStatus_EnumSize = 0x7fffffff 
} ovrCameraStatusFlags;

typedefstruct ovrCameraExtrinsics_ {
double LastChangedTimeSeconds;

unsignedint CameraStatusFlags;

  ovrTrackedDeviceType AttachedToDevice;

  ovrPosef RelativePose;

double LastExposureTimeSeconds;

double ExposureLatencySeconds;

double AdditionalLatencySeconds;

} ovrCameraExtrinsics;
#define OVR_MAX_EXTERNAL_CAMERA_COUNT 16
#define OVR_EXTERNAL_CAMERA_NAME_SIZE 32
typedefstruct ovrExternalCamera_ {
char Name[OVR_EXTERNAL_CAMERA_NAME_SIZE]; // camera identifier: vid + pid + serial number etc.
  ovrCameraIntrinsics Intrinsics;
  ovrCameraExtrinsics Extrinsics;
} ovrExternalCamera;

//-----------------------------------------------------------------------------------
// ***** Initialize structures

typedefenum ovrInitFlags_ {
  ovrInit_Debug = 0x00000001,


  ovrInit_RequestVersion = 0x00000004,


  ovrInit_Invisible = 0x00000010,

  ovrInit_MixedRendering = 0x00000020,

  ovrInit_FocusAware = 0x00000040,





  ovrinit_WritableBits = 0x00ffffff,

  ovrInit_EnumSize = 0x7fffffff 
} ovrInitFlags;

typedefenum ovrLogLevel_ {
  ovrLogLevel_Debug = 0, 
  ovrLogLevel_Info = 1, 
  ovrLogLevel_Error = 2, 

  ovrLogLevel_EnumSize = 0x7fffffff 
} ovrLogLevel;

typedef void(OVR_CDECL* ovrLogCallback)(uintptr_t userData, int level, constchar* message);

typedefstruct OVR_ALIGNAS(8) ovrInitParams_ {
  uint32_t Flags;

  uint32_t RequestedMinorVersion;

  ovrLogCallback LogCallback;

  uintptr_t UserData;

  uint32_t ConnectionTimeoutMS;

  OVR_ON64(OVR_UNUSED_STRUCT_PAD(pad0, 4)) 

} ovrInitParams;

#ifdef __cplusplus
extern"C" {
#endif

#if !defined(OVR_EXPORTING_CAPI)

// -----------------------------------------------------------------------------------
// ***** API Interfaces

OVR_PUBLIC_FUNCTION(ovrResult) ovr_Initialize(const ovrInitParams* params);

OVR_PUBLIC_FUNCTION(void) ovr_Shutdown();

OVR_PUBLIC_FUNCTION(void) ovr_GetLastErrorInfo(ovrErrorInfo* errorInfo);

OVR_PUBLIC_FUNCTION(constchar*) ovr_GetVersionString();

OVR_PUBLIC_FUNCTION(int) ovr_TraceMessage(int level, constchar* message);

OVR_PUBLIC_FUNCTION(ovrResult) ovr_IdentifyClient(constchar* identity);

//-------------------------------------------------------------------------------------

OVR_PUBLIC_FUNCTION(ovrHmdDesc) ovr_GetHmdDesc(ovrSession session);

OVR_PUBLIC_FUNCTION(unsignedint) ovr_GetTrackerCount(ovrSession session);

OVR_PUBLIC_FUNCTION(ovrTrackerDesc)
ovr_GetTrackerDesc(ovrSession session, unsignedint trackerDescIndex);

OVR_PUBLIC_FUNCTION(ovrResult) ovr_Create(ovrSession* pSession, ovrGraphicsLuid* pLuid);

OVR_PUBLIC_FUNCTION(void) ovr_Destroy(ovrSession session);

#endif // !defined(OVR_EXPORTING_CAPI)

typedefstruct ovrSessionStatus_ {
  ovrBool IsVisible;

  ovrBool HmdPresent;

  ovrBool HmdMounted;

  ovrBool DisplayLost;

  ovrBool ShouldQuit;

  ovrBool ShouldRecenter;

  ovrBool HasInputFocus;

  ovrBool OverlayPresent;

  ovrBool DepthRequested;

} ovrSessionStatus;

#if !defined(OVR_EXPORTING_CAPI)

OVR_PUBLIC_FUNCTION(ovrResult)
ovr_GetSessionStatus(ovrSession session, ovrSessionStatus* sessionStatus);


OVR_PUBLIC_FUNCTION(ovrResult)
ovr_IsExtensionSupported(
    ovrSession session,
    ovrExtensions extension,
    ovrBool* outExtensionSupported);

OVR_PUBLIC_FUNCTION(ovrResult)
ovr_EnableExtension(ovrSession session, ovrExtensions extension);


//-------------------------------------------------------------------------------------


OVR_PUBLIC_FUNCTION(ovrResult)
ovr_SetTrackingOriginType(ovrSession session, ovrTrackingOrigin origin);

OVR_PUBLIC_FUNCTION(ovrTrackingOrigin) ovr_GetTrackingOriginType(ovrSession session);

OVR_PUBLIC_FUNCTION(ovrResult) ovr_RecenterTrackingOrigin(ovrSession session);

OVR_PUBLIC_FUNCTION(ovrResult) ovr_SpecifyTrackingOrigin(ovrSession session, ovrPosef originPose);

OVR_PUBLIC_FUNCTION(void) ovr_ClearShouldRecenterFlag(ovrSession session);

OVR_PUBLIC_FUNCTION(ovrTrackingState)
ovr_GetTrackingState(ovrSession session, double absTime, ovrBool latencyMarker);

OVR_PUBLIC_FUNCTION(ovrResult)
ovr_GetDevicePoses(
    ovrSession session,
    ovrTrackedDeviceType* deviceTypes,
int deviceCount,
double absTime,
    ovrPoseStatef* outDevicePoses);


OVR_PUBLIC_FUNCTION(ovrTrackerPose)
ovr_GetTrackerPose(ovrSession session, unsignedint trackerPoseIndex);

OVR_PUBLIC_FUNCTION(ovrResult)
ovr_GetInputState(ovrSession session, ovrControllerType controllerType, ovrInputState* inputState);

OVR_PUBLIC_FUNCTION(unsignedint) ovr_GetConnectedControllerTypes(ovrSession session);

OVR_PUBLIC_FUNCTION(ovrTouchHapticsDesc)
ovr_GetTouchHapticsDesc(ovrSession session, ovrControllerType controllerType);

OVR_PUBLIC_FUNCTION(ovrResult)
ovr_SetControllerVibration(
    ovrSession session,
    ovrControllerType controllerType,
float frequency,
float amplitude);

OVR_PUBLIC_FUNCTION(ovrResult)
ovr_SubmitControllerVibration(
    ovrSession session,
    ovrControllerType controllerType,
const ovrHapticsBuffer* buffer);

OVR_PUBLIC_FUNCTION(ovrResult)
ovr_GetControllerVibrationState(
    ovrSession session,
    ovrControllerType controllerType,
    ovrHapticsPlaybackState* outState);

OVR_PUBLIC_FUNCTION(ovrResult)
ovr_TestBoundary(
    ovrSession session,
    ovrTrackedDeviceType deviceBitmask,
    ovrBoundaryType boundaryType,
    ovrBoundaryTestResult* outTestResult);

OVR_PUBLIC_FUNCTION(ovrResult)
ovr_TestBoundaryPoint(
    ovrSession session,
const ovrVector3f* point,
    ovrBoundaryType singleBoundaryType,
    ovrBoundaryTestResult* outTestResult);

OVR_PUBLIC_FUNCTION(ovrResult)
ovr_SetBoundaryLookAndFeel(ovrSession session, const ovrBoundaryLookAndFeel* lookAndFeel);

OVR_PUBLIC_FUNCTION(ovrResult) ovr_ResetBoundaryLookAndFeel(ovrSession session);

OVR_PUBLIC_FUNCTION(ovrResult)
ovr_GetBoundaryGeometry(
    ovrSession session,
    ovrBoundaryType boundaryType,
    ovrVector3f* outFloorPoints,
int* outFloorPointsCount);

OVR_PUBLIC_FUNCTION(ovrResult)
ovr_GetBoundaryDimensions(
    ovrSession session,
    ovrBoundaryType boundaryType,
    ovrVector3f* outDimensions);

OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetBoundaryVisible(ovrSession session, ovrBool* outIsVisible);

OVR_PUBLIC_FUNCTION(ovrResult) ovr_RequestBoundaryVisible(ovrSession session, ovrBool visible);

// -----------------------------------------------------------------------------------

OVR_PUBLIC_FUNCTION(ovrResult)
ovr_GetExternalCameras(
    ovrSession session,
    ovrExternalCamera* cameras,
unsignedint* inoutCameraCount);

OVR_PUBLIC_FUNCTION(ovrResult)
ovr_SetExternalCameraProperties(
    ovrSession session,
constchar* name,
const ovrCameraIntrinsics* const intrinsics,
const ovrCameraExtrinsics* const extrinsics);


#endif // !defined(OVR_EXPORTING_CAPI)

//-------------------------------------------------------------------------------------
// @name Layers
//

enum { ovrMaxLayerCount = 16 };

typedefenum ovrLayerType_ {
  ovrLayerType_Disabled = 0,

  ovrLayerType_EyeFov = 1,

  ovrLayerType_EyeFovDepth = 2,

  ovrLayerType_Quad = 3,

// enum 4 used to be ovrLayerType_QuadHeadLocked. Instead, use ovrLayerType_Quad with
// ovrLayerFlag_HeadLocked.

  ovrLayerType_EyeMatrix = 5,


  ovrLayerType_EyeFovMultires = 7,

  ovrLayerType_Cylinder = 8,

  ovrLayerType_Cube = 10,


  ovrLayerType_EnumSize = 0x7fffffff 

} ovrLayerType;

typedefenum ovrLayerFlags_ {
  ovrLayerFlag_HighQuality = 0x01,

  ovrLayerFlag_TextureOriginAtBottomLeft = 0x02,

  ovrLayerFlag_HeadLocked = 0x04,


} ovrLayerFlags;

typedefstruct OVR_ALIGNAS(OVR_PTR_SIZE) ovrLayerHeader_ {
  ovrLayerType Type; 
unsigned Flags; 

char Reserved[128];
} ovrLayerHeader;

typedefstruct OVR_ALIGNAS(OVR_PTR_SIZE) ovrLayerEyeFov_ {
  ovrLayerHeader Header;

  ovrTextureSwapChain ColorTexture[ovrEye_Count];

  ovrRecti Viewport[ovrEye_Count];

  ovrFovPort Fov[ovrEye_Count];

  ovrPosef RenderPose[ovrEye_Count];

double SensorSampleTime;
} ovrLayerEyeFov;

typedefstruct OVR_ALIGNAS(OVR_PTR_SIZE) ovrLayerEyeFovDepth_ {
  ovrLayerHeader Header;

  ovrTextureSwapChain ColorTexture[ovrEye_Count];

  ovrRecti Viewport[ovrEye_Count];

  ovrFovPort Fov[ovrEye_Count];

  ovrPosef RenderPose[ovrEye_Count];

double SensorSampleTime;

  ovrTextureSwapChain DepthTexture[ovrEye_Count];

  ovrTimewarpProjectionDesc ProjectionDesc;
} ovrLayerEyeFovDepth;

typedefenum ovrTextureLayout_ {
  ovrTextureLayout_Rectilinear = 0, 
  ovrTextureLayout_Octilinear = 1, 
  ovrTextureLayout_EnumSize = 0x7fffffff 
} ovrTextureLayout;

typedefstruct OVR_ALIGNAS(OVR_PTR_SIZE) ovrTextureLayoutOctilinear_ {
// W warping
float WarpLeft;
float WarpRight;
float WarpUp;
float WarpDown;

// Size of W quadrants.
//
// SizeLeft + SizeRight <= Viewport.Size.w
// SizeUp   + sizeDown  <= Viewport.Size.h
//
// Clip space (0,0) is located at Viewport.Pos + (SizeLeft,SizeUp) where
// Viewport is given in the layer description.
//
// Viewport Top left
// +-----------------------------------------------------+
// |                        ^                       |    |
// |                        |                       |    |
// |           0          SizeUp         1          |    |
// |                        |                       |<--Portion of viewport
// |                        |                       |   determined by sizes
// |                        |                       |    |
// |<--------SizeLeft-------+-------SizeRight------>|    |
// |                        |                       |    |
// |                        |                       |    |
// |           2         SizeDown        3          |    |
// |                        |                       |    |
// |                        |                       |    |
// |                        v                       |    |
// +------------------------------------------------+    |
// |                                                     |
// +-----------------------------------------------------+
//                                                       Viewport bottom right
//
// For example, when rendering quadrant 0 its scissor rectangle will be
//
//  Top    = 0
//  Left   = 0
//  Right  = SizeLeft
//  Bottom = SizeUp
//
// and the scissor rectangle for quadrant 1 will be:
//
//  Top    = 0
//  Left   = SizeLeft
//  Right  = SizeLeft + SizeRight
//  Bottom = SizeUp
//
float SizeLeft;
float SizeRight;
float SizeUp;
float SizeDown;

} ovrTextureLayoutOctilinear;

typedefunion OVR_ALIGNAS(OVR_PTR_SIZE) ovrTextureLayoutDesc_Union_ {
  ovrTextureLayoutOctilinear Octilinear[ovrEye_Count];
} ovrTextureLayoutDesc_Union;

typedefstruct OVR_ALIGNAS(OVR_PTR_SIZE) ovrLayerEyeFovMultires_ {
  ovrLayerHeader Header;

  ovrTextureSwapChain ColorTexture[ovrEye_Count];

  ovrRecti Viewport[ovrEye_Count];

  ovrFovPort Fov[ovrEye_Count];

  ovrPosef RenderPose[ovrEye_Count];

double SensorSampleTime;

  ovrTextureLayout TextureLayout;

  ovrTextureLayoutDesc_Union TextureLayoutDesc;
} ovrLayerEyeFovMultires;

typedefstruct OVR_ALIGNAS(OVR_PTR_SIZE) ovrLayerEyeMatrix_ {
  ovrLayerHeader Header;

  ovrTextureSwapChain ColorTexture[ovrEye_Count];

  ovrRecti Viewport[ovrEye_Count];

  ovrPosef RenderPose[ovrEye_Count];

  ovrMatrix4f Matrix[ovrEye_Count];

double SensorSampleTime;
} ovrLayerEyeMatrix;

typedefstruct OVR_ALIGNAS(OVR_PTR_SIZE) ovrLayerQuad_ {
  ovrLayerHeader Header;

  ovrTextureSwapChain ColorTexture;

  ovrRecti Viewport;

  ovrPosef QuadPoseCenter;

  ovrVector2f QuadSize;
} ovrLayerQuad;

typedefstruct OVR_ALIGNAS(OVR_PTR_SIZE) ovrLayerCylinder_ {
  ovrLayerHeader Header;

  ovrTextureSwapChain ColorTexture;

  ovrRecti Viewport;

  ovrPosef CylinderPoseCenter;

float CylinderRadius;

float CylinderAngle;

float CylinderAspectRatio;
} ovrLayerCylinder;

typedefstruct OVR_ALIGNAS(OVR_PTR_SIZE) ovrLayerCube_ {
  ovrLayerHeader Header;

  ovrQuatf Orientation;

  ovrTextureSwapChain CubeMapTexture;
} ovrLayerCube;



typedefunion ovrLayer_Union_ {
  ovrLayerHeader Header;
  ovrLayerEyeFov EyeFov;
  ovrLayerEyeFovDepth EyeFovDepth;
  ovrLayerQuad Quad;
  ovrLayerEyeMatrix EyeMatrix;
  ovrLayerEyeFovMultires Multires;
  ovrLayerCylinder Cylinder;
  ovrLayerCube Cube;
} ovrLayer_Union;


#if !defined(OVR_EXPORTING_CAPI)




OVR_PUBLIC_FUNCTION(ovrResult)
ovr_GetTextureSwapChainLength(ovrSession session, ovrTextureSwapChain chain, int* out_Length);

OVR_PUBLIC_FUNCTION(ovrResult)
ovr_GetTextureSwapChainCurrentIndex(ovrSession session, ovrTextureSwapChain chain, int* out_Index);

OVR_PUBLIC_FUNCTION(ovrResult)
ovr_GetTextureSwapChainDesc(
    ovrSession session,
    ovrTextureSwapChain chain,
    ovrTextureSwapChainDesc* out_Desc);

OVR_PUBLIC_FUNCTION(ovrResult)
ovr_CommitTextureSwapChain(ovrSession session, ovrTextureSwapChain chain);

OVR_PUBLIC_FUNCTION(void)
ovr_DestroyTextureSwapChain(ovrSession session, ovrTextureSwapChain chain);


OVR_PUBLIC_FUNCTION(void)
ovr_DestroyMirrorTexture(ovrSession session, ovrMirrorTexture mirrorTexture);

OVR_PUBLIC_FUNCTION(ovrSizei)
ovr_GetFovTextureSize(
    ovrSession session,
    ovrEyeType eye,
    ovrFovPort fov,
float pixelsPerDisplayPixel);

OVR_PUBLIC_FUNCTION(ovrEyeRenderDesc)
ovr_GetRenderDesc(ovrSession session, ovrEyeType eyeType, ovrFovPort fov);

OVR_PUBLIC_FUNCTION(ovrResult)
ovr_WaitToBeginFrame(ovrSession session, longlong frameIndex);

OVR_PUBLIC_FUNCTION(ovrResult)
ovr_BeginFrame(ovrSession session, longlong frameIndex);

OVR_PUBLIC_FUNCTION(ovrResult)
ovr_EndFrame(
    ovrSession session,
longlong frameIndex,
const ovrViewScaleDesc* viewScaleDesc,
    ovrLayerHeader const* const* layerPtrList,
unsignedint layerCount);

OVR_PUBLIC_FUNCTION(ovrResult)
ovr_SubmitFrame(
    ovrSession session,
longlong frameIndex,
const ovrViewScaleDesc* viewScaleDesc,
    ovrLayerHeader const* const* layerPtrList,
unsignedint layerCount);

#endif // !defined(OVR_EXPORTING_CAPI)

//-------------------------------------------------------------------------------------


typedefstruct OVR_ALIGNAS(4) ovrPerfStatsPerCompositorFrame_ {
int HmdVsyncIndex;


int AppFrameIndex;

int AppDroppedFrameCount;

float AppMotionToPhotonLatency;

float AppQueueAheadTime;

float AppCpuElapsedTime;

float AppGpuElapsedTime;


int CompositorFrameIndex;

int CompositorDroppedFrameCount;

float CompositorLatency;

float CompositorCpuElapsedTime;

float CompositorGpuElapsedTime;

float CompositorCpuStartToGpuEndElapsedTime;

float CompositorGpuEndToVsyncElapsedTime;


  ovrBool AswIsActive;

int AswActivatedToggleCount;

int AswPresentedFrameCount;

int AswFailedFrameCount;

} ovrPerfStatsPerCompositorFrame;

enum { ovrMaxProvidedFrameStats = 5 };

typedefstruct OVR_ALIGNAS(4) ovrPerfStats_ {
  ovrPerfStatsPerCompositorFrame FrameStats[ovrMaxProvidedFrameStats];
int FrameStatsCount;

  ovrBool AnyFrameStatsDropped;

float AdaptiveGpuPerformanceScale;

  ovrBool AswIsAvailable;

  ovrProcessId VisibleProcessId;
} ovrPerfStats;

#if !defined(OVR_EXPORTING_CAPI)

OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetPerfStats(ovrSession session, ovrPerfStats* outStats);

OVR_PUBLIC_FUNCTION(ovrResult) ovr_ResetPerfStats(ovrSession session);

OVR_PUBLIC_FUNCTION(double) ovr_GetPredictedDisplayTime(ovrSession session, longlong frameIndex);

OVR_PUBLIC_FUNCTION(double) ovr_GetTimeInSeconds();

#endif // !defined(OVR_EXPORTING_CAPI)

typedefenum ovrPerfHudMode_ {
  ovrPerfHud_Off = 0, 
  ovrPerfHud_PerfSummary = 1, 
  ovrPerfHud_LatencyTiming = 2, 
  ovrPerfHud_AppRenderTiming = 3, 
  ovrPerfHud_CompRenderTiming = 4, 
  ovrPerfHud_AswStats = 6, 
  ovrPerfHud_VersionInfo = 5, 
  ovrPerfHud_Count = 7, 
  ovrPerfHud_EnumSize = 0x7fffffff 
} ovrPerfHudMode;

typedefenum ovrLayerHudMode_ {
  ovrLayerHud_Off = 0, 
  ovrLayerHud_Info = 1, 
  ovrLayerHud_EnumSize = 0x7fffffff
} ovrLayerHudMode;


typedefenum ovrDebugHudStereoMode_ {
  ovrDebugHudStereo_Off = 0,

  ovrDebugHudStereo_Quad = 1,

  ovrDebugHudStereo_QuadWithCrosshair = 2,

  ovrDebugHudStereo_CrosshairAtInfinity = 3,

  ovrDebugHudStereo_Count,

  ovrDebugHudStereo_EnumSize = 0x7fffffff 
} ovrDebugHudStereoMode;

#if !defined(OVR_EXPORTING_CAPI)

// -----------------------------------------------------------------------------------


OVR_PUBLIC_FUNCTION(ovrBool)
ovr_GetBool(ovrSession session, constchar* propertyName, ovrBool defaultVal);

OVR_PUBLIC_FUNCTION(ovrBool)
ovr_SetBool(ovrSession session, constchar* propertyName, ovrBool value);

OVR_PUBLIC_FUNCTION(int) ovr_GetInt(ovrSession session, constchar* propertyName, int defaultVal);

OVR_PUBLIC_FUNCTION(ovrBool) ovr_SetInt(ovrSession session, constchar* propertyName, int value);

OVR_PUBLIC_FUNCTION(float)
ovr_GetFloat(ovrSession session, constchar* propertyName, float defaultVal);

OVR_PUBLIC_FUNCTION(ovrBool)
ovr_SetFloat(ovrSession session, constchar* propertyName, float value);

OVR_PUBLIC_FUNCTION(unsignedint)
ovr_GetFloatArray(
    ovrSession session,
constchar* propertyName,
float values[],
unsignedint valuesCapacity);

OVR_PUBLIC_FUNCTION(ovrBool)
ovr_SetFloatArray(
    ovrSession session,
constchar* propertyName,
constfloat values[],
unsignedint valuesSize);

OVR_PUBLIC_FUNCTION(constchar*)
ovr_GetString(ovrSession session, constchar* propertyName, constchar* defaultVal);

OVR_PUBLIC_FUNCTION(ovrBool)
ovr_SetString(ovrSession session, constchar* propertyName, constchar* value);


#endif // !defined(OVR_EXPORTING_CAPI)

#ifdef __cplusplus
} // extern "C"
#endif

#if defined(_MSC_VER)
#pragma warning(pop)
#endif



OVR_STATIC_ASSERT(
sizeof(ovrTextureSwapChainDesc) == 10 * 4,
"ovrTextureSwapChainDesc size mismatch");

// -----------------------------------------------------------------------------------
// ***** Backward compatibility #includes
//
// This is at the bottom of this file because the following is dependent on the
// declarations above.

#if !defined(OVR_CAPI_NO_UTILS)
#include "Extras/OVR_CAPI_Util.h"
#endif


#endif // OVR_CAPI_h
The documentation for this file was generated from the following file: Include/OVR_CAPI.h