Crate ovr_sys

Source
Expand description

This crate provides raw unsafe bindings to LibOVR, the Oculus Rift runtime library.

The currently targeted version of LibOVR is 1.15.0

Good API documentation is provided here, transformed from the original doxygen documentation. More high level documentation can be found on the Oculus developer web site. Example code has been translated from C to mostly equivalent Rust (TODO: except in the DirectX module).

The bindings are generated directly from the LibOVR headers, and some conventions have been followed when translating from the C code.

  • Each enum has been translated into a type definition (defined to be i32) and a collection of constants. This preserves the ability to easily use them as bitflags.

  • Alignment requirements on structs have been implemented using dummy zero-sized array fields. When initialising these fields, the value [] will suffice.

  • Where the layout of structs differs between 32-bit and 64-bit platforms due to dummy padding fields, conditional compilation is used. For this reason it is recommended to not construct the affected structs in a typical fashion as this may result in code that compiles on one but not both architectures (due to missing/spurious padding field).

    A reasonable approach is to use .. struct initialisation syntax, like so:

    let init_params = ovrInitParams {
        Flags: ovrInit_RequestVersion,
        RequestedMinorVersion: OVR_MINOR_VERSION,
        LogCallback: None,
        UserData: 0,
        ConnectionTimeoutMS: 0,
        .. mem::uninitialized()
    };

    Like all unsafe code uses of ::std::mem::uninitialized() should be scrutinised for mistakes.

  • Function-like C macros have been translated into functions with the same name.

Optional features are provided in sub-modules. These features are audio, directx, opengl and vulkan. These sub-modules will only be present if the corresponding feature has been enabled in the Cargo manifest. opengl is enabled by default.

Modules§

opengl
LibOVR functions for performing OpenGL interop.

Structs§

ovrBoundaryLookAndFeel
Boundary system look and feel
ovrBoundaryTestResult
Provides boundary test information
ovrColorf
A RGBA color with normalized f32 components.
ovrDetectResult
Return values for ovr_Detect.
ovrErrorInfo
Provides information about the last error.
ovrEyeRenderDesc
Rendering information for each eye. Computed by ovr_GetRenderDesc() based on the specified FOV. Note that the rendering viewport is not included here as it can be specified separately and modified per frame by passing different Viewport values in the layer structure.
ovrFovPort
Describes the up, down, left, and right angles of the field of view.
ovrGraphicsLuid
Identifies a graphics device in a platform-specific way. For Windows this is a LUID type.
ovrHapticsBuffer
Haptics buffer descriptor, contains amplitude samples used for Touch vibration
ovrHapticsPlaybackState
State of the Haptics playback for Touch vibration
ovrHmdDesc
This is a complete descriptor of the HMD.
ovrInitParams
Parameters for ovr_Initialize.
ovrInputState
ovrInputState describes the complete controller input state, including Oculus Touch, and XBox gamepad. If multiple inputs are connected and used at the same time, their inputs are combined.
ovrLayerEyeFov
Describes a layer that specifies a monoscopic or stereoscopic view.
ovrLayerEyeMatrix
Describes a layer that specifies a monoscopic or stereoscopic view.
ovrLayerHeader
Defines properties shared by all ovrLayer structs, such as ovrLayerEyeFov.
ovrLayerQuad
Describes a layer of Quad type, which is a single quad in world or viewer space.
ovrMatrix4f
A 4x4 matrix with f32 elements.
ovrMirrorTextureDesc
Description used to create a mirror texture.
ovrPerfStats
This is a complete descriptor of the performance stats provided by the SDK
ovrPerfStatsPerCompositorFrame
Contains the performance stats for a given SDK compositor frame
ovrPoseStatef
A full pose (rigid body) configuration with first and second derivatives.
ovrPosef
Position and orientation together.
ovrQuatf
A quaternion rotation.
ovrRecti
A 2D rectangle with a position and size. All components are integers.
ovrSessionStatus
Specifies status information for the current session.
ovrSizei
A 2D size with integer components.
ovrTextureSwapChainDesc
Description used to create a texture swap chain.
ovrTimewarpProjectionDesc
Projection information for ovrLayerEyeFovDepth.
ovrTouchHapticsDesc
Describes the Touch Haptics engine. Currently, those values will NOT change during a session.
ovrTrackerDesc
Specifies the description of a single sensor.
ovrTrackerPose
Specifies the pose for a single sensor.
ovrTrackingState
Tracking state at a given absolute time (describes predicted HMD pose, etc.). Returned by ovr_GetTrackingState.
ovrVector2f
A 2D vector with f32 components.
ovrVector2i
A 2D vector with integer components.
ovrVector3f
A 3D vector with f32 components.
ovrViewScaleDesc
Contains the data necessary to properly calculate position info for various layer types.

Constants§

OVR_BUILD_VERSION
OVR_DEBUG_HUD_STEREO_GUIDE_COLOR
OVR_DEBUG_HUD_STEREO_GUIDE_INFO_ENABLE
OVR_DEBUG_HUD_STEREO_GUIDE_POSITION
OVR_DEBUG_HUD_STEREO_GUIDE_SIZE
OVR_DEBUG_HUD_STEREO_GUIDE_YAWPITCHROLL
OVR_DEBUG_HUD_STEREO_MODE
OVR_DEFAULT_EYE_HEIGHT
OVR_DEFAULT_GENDER
OVR_DEFAULT_NECK_TO_EYE_HORIZONTAL
OVR_DEFAULT_NECK_TO_EYE_VERTICAL
OVR_DEFAULT_PLAYER_HEIGHT
OVR_FORMAT_B4G4R4A4_UNORM
Not currently supported on PC. Would require a DirectX 11.1 device.
OVR_FORMAT_B5G5R5A1_UNORM
Not currently supported on PC. Would require a DirectX 11.1 device.
OVR_FORMAT_B5G6R5_UNORM
Not currently supported on PC. Would require a DirectX 11.1 device.
OVR_FORMAT_B8G8R8A8_UNORM
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_BC1_UNORM
OVR_FORMAT_BC1_UNORM_SRGB
OVR_FORMAT_BC2_UNORM
OVR_FORMAT_BC2_UNORM_SRGB
OVR_FORMAT_BC3_UNORM
OVR_FORMAT_BC3_UNORM_SRGB
OVR_FORMAT_BC6H_SF16
OVR_FORMAT_BC6H_UF16
OVR_FORMAT_BC7_UNORM
OVR_FORMAT_BC7_UNORM_SRGB
OVR_FORMAT_D16_UNORM
OVR_FORMAT_D24_UNORM_S8_UINT
OVR_FORMAT_D32_FLOAT
OVR_FORMAT_D32_FLOAT_S8X24_UINT
OVR_FORMAT_R8G8B8A8_UNORM
OVR_FORMAT_R8G8B8A8_UNORM_SRGB
OVR_FORMAT_R11G11B10_FLOAT
Introduced in v1.10
OVR_FORMAT_R16G16B16A16_FLOAT
OVR_FORMAT_UNKNOWN
OVR_KEY_EYE_HEIGHT
OVR_KEY_EYE_TO_NOSE_DISTANCE
OVR_KEY_GENDER
OVR_KEY_NAME
OVR_KEY_NECK_TO_EYE_DISTANCE
OVR_KEY_PLAYER_HEIGHT
OVR_KEY_USER
OVR_LAYER_HUD_CURRENT_LAYER
OVR_LAYER_HUD_MODE
OVR_LAYER_HUD_SHOW_ALL_LAYERS
OVR_MAJOR_VERSION
OVR_MINOR_VERSION
OVR_PERF_HUD_MODE
OVR_PRODUCT_VERSION
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.
ovrButton_A
A button on XBox controllers and right Touch controller. Select button on Oculus Remote.
ovrButton_B
B button on XBox controllers and right Touch controller. Back button on Oculus Remote.
ovrButton_Back
Back on Xbox 360 controller. View button on XBox One controller. Not present on Touch controllers or Oculus Remote.
ovrButton_Down
Down button on XBox controllers and Oculus Remote. Not present on Touch controllers.
ovrButton_Enter
Start on XBox 360 controller. Menu on XBox One controller and Left Touch controller. Should be referred to as the Menu button in user-facing documentation.
ovrButton_Home
Home button on XBox controllers. Oculus button on Touch controllers and Oculus Remote.
ovrButton_LMask
Bit mask of all buttons on the left Touch controller
ovrButton_LShoulder
Left shoulder button on XBox controllers. Not present on Touch controllers or Oculus Remote.
ovrButton_LThumb
Left thumbstick on XBox controllers and Touch controllers. Not present on Oculus Remote.
ovrButton_Left
Left button on XBox controllers and Oculus Remote. Not present on Touch controllers.
ovrButton_Private
Bit mask of all buttons that are for private usage by Oculus
ovrButton_RMask
Bit mask of all buttons on the right Touch controller
ovrButton_RShoulder
Right shoulder button on XBox controllers. Not present on Touch controllers or Oculus Remote.
ovrButton_RThumb
Right thumbstick on XBox controllers and Touch controllers. Not present on Oculus Remote.
ovrButton_Right
Right button on XBox controllers and Oculus Remote. Not present on Touch controllers.
ovrButton_Up
Up button on XBox controllers and Oculus Remote. Not present on Touch controllers.
ovrButton_VolDown
Volume button on Oculus Remote. Not present on XBox or Touch controllers.
ovrButton_VolUp
Volume button on Oculus Remote. Not present on XBox or Touch controllers.
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.
ovrControllerType_Active
Operate on or query whichever controller is active.
ovrControllerType_LTouch
ovrControllerType_None
ovrControllerType_RTouch
ovrControllerType_Remote
ovrControllerType_Touch
ovrControllerType_XBox
ovrDebugHudStereo_CrosshairAtInfinity
Renders screen-space crosshair at infinity for Stereo Debugging
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
ovrError_ApplicationInvisible
Application declared itself as an invisible type and is not allowed to submit frames.
ovrError_AudioComError
Generic COM error.
ovrError_AudioDeviceNotFound
Failure to find the specified audio device.
ovrError_ClientSkippedDestroy
The client failed to call ovr_Destroy on an active session before calling ovr_Shutdown. Or the client crashed.
ovrError_ClientSkippedShutdown
The client failed to call ovr_Shutdown or the client crashed.
ovrError_ClientVersion
Client version too old to connect to service
ovrError_ContentProtectionNotAvailable
Content protection is not available for the display
ovrError_DeviceUnavailable
Specified device type isn’t available.
ovrError_DisabledOrDefaultAdapter
No supported VR display system found, but disabled or driverless adapter found.
ovrError_Disallowed
The given request is disallowed under the current conditions.
ovrError_DisplayInit
Unable to initialize the HMD display.
ovrError_DisplayLost
In the event of a system-wide graphics reset or cable unplug this is returned to the app.
ovrError_DisplayManagerInit
Initialization of the DisplayManager failed.
ovrError_DisplayPluggedIncorrectly
Display portion of HMD is plugged into an incompatible port (ex: IGP)
ovrError_DisplayRemoved
HMD removed from the display adapter
ovrError_GraphicsDeviceReset
Graphics device has been reset (TDR, etc…)
ovrError_HybridGraphicsNotSupported
The system is using hybrid graphics (Optimus, etc…), which is not support.
ovrError_IncompatibleGPU
The graphics hardware is not supported
ovrError_IncompatibleOS
The operating system version is incompatible.
ovrError_Initialize
Generic initialization error.
ovrError_InvalidHeadsetOrientation
The headset was in an invalid orientation for the requested operation (e.g. vertically oriented during ovr_RecenterPose).
ovrError_InvalidOperation
Function call is invalid for object’s current state
ovrError_InvalidParameter
Invalid parameter provided. See error info or log for details.
ovrError_InvalidSession
Invalid ovrSession parameter provided.
ovrError_LeakingResources
Calling application has leaked resources
ovrError_LibLoad
Couldn’t load LibOVRRT.
ovrError_LibPath
LibOVRRT path failure.
ovrError_LibSignCheck
LibOVRRT signature check failure.
ovrError_LibSymbols
LibOVRRT symbol resolution failure.
ovrError_LibVersion
LibOVRRT version incompatibility.
ovrError_MemoryAllocationFailure
Failure to allocate memory.
ovrError_MisformattedBlock
Result of a bad calibration block due to lengths
ovrError_MismatchedAdapters
Chosen rendering adapters between client and service do not match
ovrError_NoCalibration
Result of a missing calibration block
ovrError_NoHmd
The given HMD doesn’t exist.
ovrError_NoValidVRDisplaySystem
No valid VR display system found.
ovrError_NotInitialized
The system or component has not been initialized.
ovrError_Obsolete
Feature or API is obsolete and no longer supported.
ovrError_OldVersion
Result of an old calibration block
ovrError_OutOfDateGfxDriver
The graphics driver is out of date.
ovrError_OutOfDateOS
The operating system is out of date.
ovrError_Reinitialization
Attempting to re-initialize with a different version.
ovrError_RemoteSession
Failed to connect to the service because remote connections to the service are not allowed.
ovrError_RuntimeException
A runtime exception occurred. The application is required to shutdown LibOVR and re-initialize it before this error state will be cleared.
ovrError_ServerStart
Unable to start the server. Is it already running?
ovrError_ServiceConnection
Couldn’t connect to the OVR Service.
ovrError_ServiceDeadlockDetected
The service watchdog discovered a deadlock.
ovrError_ServiceError
Generic service error. See error info or log for details.
ovrError_ServiceVersion
OVR Service version incompatibility.
ovrError_TextureSwapChainFull
ovr_CommitTextureSwapChain was called too many times on a texture swapchain without calling submit to use the chain.
ovrError_TextureSwapChainInvalid
The ovrTextureSwapChain is in an incomplete or inconsistent state. Ensure ovr_CommitTextureSwapChain was called at least once first.
ovrError_Timeout
The operation timed out.
ovrError_TrackerDriverInit
Failed to get the interface for an attached tracker
ovrError_Unsupported
Function call is not supported on this hardware/software
ovrEye_Count
\internal Count of enumerated elements.
ovrEye_Left
The left eye, from the viewer’s perspective.
ovrEye_Right
The right eye, from the viewer’s perspective.
ovrFalse
ovrBool value of false.
ovrHand_Count
ovrHand_Left
ovrHand_Right
ovrHapticsBufferSubmit_Enqueue
Enqueue buffer for later playback
ovrHmdCap_DebugDevice
(read only) Specifies that the HMD is a virtual debug device.
ovrHmd_CB
ovrHmd_CV1
ovrHmd_DK1
ovrHmd_DK2
ovrHmd_DKHD
ovrHmd_E3_2015
ovrHmd_ES06
ovrHmd_ES09
ovrHmd_ES11
ovrHmd_None
ovrHmd_Other
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. Normally when you specify this flag you simply use OVR_MINOR_VERSION for ovrInitParams::RequestedMinorVersion, though you could use a lower version than OVR_MINOR_VERSION to specify previous version behavior.
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.
ovrLayerFlag_HighQuality
ovrLayerFlag_HighQuality enables 4x anisotropic sampling during the composition of the layer.
ovrLayerFlag_TextureOriginAtBottomLeft
ovrLayerFlag_TextureOriginAtBottomLeft: the opposite is TopLeft. Generally this is false for D3D, true for OpenGL.
ovrLayerHud_Info
Shows info about a specific layer
ovrLayerHud_Off
Turns off the layer HUD
ovrLayerType_Disabled
Layer is disabled.
ovrLayerType_EyeFov
Described by ovrLayerEyeFov.
ovrLayerType_EyeMatrix
Described by ovrLayerEyeMatrix.
ovrLayerType_Quad
Described by ovrLayerQuad. Previously called ovrLayerType_QuadInWorld.
ovrLogLevel_Debug
Debug-level log event.
ovrLogLevel_Error
Error-level log event.
ovrLogLevel_Info
Info-level log event.
ovrMaxLayerCount
Specifies the maximum number of layers supported by ovr_SubmitFrame.
ovrMaxProvidedFrameStats
Maximum number of frames of performance stats provided back to the caller of ovr_GetPerfStats
ovrPerfHud_AppRenderTiming
Shows render timing info for application
ovrPerfHud_CompRenderTiming
Shows render timing info for OVR compositor
ovrPerfHud_LatencyTiming
Shows latency related timing info
ovrPerfHud_Off
Turns off the performance HUD
ovrPerfHud_PerfSummary
Shows performance summary and headroom
ovrPerfHud_VersionInfo
Shows SDK & HMD version Info
ovrProjection_ClipRangeOpenGL
Enable if the application is rendering with OpenGL and expects a projection matrix with a clipping range of (-w to w). Ignore this flag if your application already handles the conversion from D3D range (0 to w) to OpenGL.
ovrProjection_FarClipAtInfinity
When this flag is used, the zfar value pushed into ovrMatrix4f_Projection() will be ignored NOTE: Enable only if ovrProjection_FarLessThanNear is also enabled where the far clipping plane will be pushed to infinity.
ovrProjection_FarLessThanNear
After the projection transform is applied, far values stored in the depth buffer will be less than closer depth values. NOTE: Enable only if the application is using a floating-point depth buffer for proper precision.
ovrProjection_LeftHanded
Enable if using left-handed transformations in your application.
ovrProjection_None
Use for generating a default projection matrix that is:
ovrStatus_OrientationTracked
Orientation is currently tracked (connected and in use).
ovrStatus_PositionTracked
Position is currently tracked (false if out of range).
ovrSuccess
ovrSuccess_BoundaryInvalid
Boundary is invalid due to sensor change or was not setup.
ovrSuccess_DeviceUnavailable
Device is not available for the requested operation.
ovrSuccess_NotVisible
Returned from a call to SubmitFrame. The call succeeded, but what the app rendered will not be visible on the HMD. Ideally the app should continue calling SubmitFrame, but not do any rendering. When the result becomes ovrSuccess, rendering should continue as usual.
ovrTextureBind_DX_DepthStencil
The chain buffers can be bound as depth and/or stencil buffers
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_None
ovrTextureMisc_AllowGenerateMips
DX only: Allow generation of the mip chain on the GPU via the GenerateMips call. This flag requires that RenderTarget binding also be specified.
ovrTextureMisc_DX_Typeless
DX only: The underlying texture is created with a TYPELESS equivalent of the format specified in the texture desc. The SDK will still access the texture using the format specified in the texture desc, but the app can create views with different formats if this is specified.
ovrTextureMisc_None
ovrTextureMisc_ProtectedContent
Texture swap chain contains protected content, and requires HDCP connection in order to display to HMD. Also prevents mirroring or other redirection of any frame containing this contents
ovrTexture_2D
2D textures.
ovrTexture_2D_External
External 2D texture. Not used on PC
ovrTexture_Count
ovrTexture_Cube
Cube maps. Not currently supported on PC.
ovrTouch_A
ovrTouch_B
ovrTouch_LButtonMask
Bit mask of all the button touches on the left controller
ovrTouch_LIndexPointing
ovrTouch_LIndexTrigger
ovrTouch_LPoseMask
Bit mask of all left controller poses
ovrTouch_LThumb
ovrTouch_LThumbRest
ovrTouch_LThumbUp
ovrTouch_RButtonMask
Bit mask of all the button touches on the right controller
ovrTouch_RIndexPointing
Finger pose state Derived internally based on distance, proximity to sensors and filtering.
ovrTouch_RIndexTrigger
ovrTouch_RPoseMask
Bit mask of all right controller poses
ovrTouch_RThumb
ovrTouch_RThumbRest
ovrTouch_RThumbUp
ovrTouch_X
ovrTouch_Y
ovrTrackedDevice_All
ovrTrackedDevice_HMD
ovrTrackedDevice_LTouch
ovrTrackedDevice_RTouch
ovrTrackedDevice_Touch
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. This will only be set if ovrTracker_Connected is set.
ovrTrackingCap_MagYawCorrection
Supports yaw drift correction via a magnetometer or other means.
ovrTrackingCap_Orientation
Supports orientation tracking (IMU).
ovrTrackingCap_Position
Supports positional tracking.
ovrTrackingOrigin_EyeLevel
Tracking system origin reported at eye (HMD) height
ovrTrackingOrigin_FloorLevel
Tracking system origin reported at floor height
ovrTrue
ovrBool value of true.
ovrinit_WritableBits
These bits are writable by user code.

Functions§

OVR_FAILURE
Indicates if an ovrResult indicates failure.
OVR_SUCCESS
Indicates if an ovrResult indicates success.
OVR_UNQUALIFIED_SUCCESS
Indicates if an ovrResult indicates an unqualified success.
ovrMatrix4f_OrthoSubProjection
Generates an orthographic sub-projection.
ovrMatrix4f_Projection
Used to generate projection from ovrEyeDesc::Fov.
ovrPosef_FlipHandedness
Tracking poses provided by the SDK come in a right-handed coordinate system. If an application is passing in ovrProjection_LeftHanded into ovrMatrix4f_Projection, then it should also use this function to flip the HMD tracking poses to be left-handed.
ovrTimewarpProjectionDesc_FromProjection
Extracts the required data from the result of ovrMatrix4f_Projection.
ovr_CalcEyePoses
Computes offset eye poses based on headPose returned by ovrTrackingState.
ovr_ClearShouldRecenterFlag
Clears the ShouldRecenter status bit in ovrSessionStatus.
ovr_CommitTextureSwapChain
Commits any pending changes to an ovrTextureSwapChain, and advances its current index
ovr_Create
Creates a handle to a VR session.
ovr_Destroy
Destroys the session.
ovr_DestroyMirrorTexture
MirrorTexture creation is rendering API-specific.
ovr_DestroyTextureSwapChain
Destroys an ovrTextureSwapChain and frees all the resources associated with it.
ovr_Detect
Detects Oculus Runtime and Device Status
ovr_GetBool
Reads a boolean property.
ovr_GetBoundaryDimensions
Gets the dimension of the Boundary System’s “play area” or “outer boundary”.
ovr_GetBoundaryGeometry
Gets the geometry of the Boundary System’s “play area” or “outer boundary” as 3D floor points.
ovr_GetBoundaryVisible
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.
ovr_GetConnectedControllerTypes
Returns controller types connected to the system OR’ed together.
ovr_GetControllerVibrationState
Gets the Haptics engine playback state of a specific Touch controller.
ovr_GetDevicePoses
Returns an array of poses, where each pose matches a device type provided by the deviceTypes array parameter.
ovr_GetEyePoses
Returns the predicted head pose in outHmdTrackingState and offset eye poses in outEyePoses.
ovr_GetFloat
Reads a f32 property.
ovr_GetFloatArray
Reads a f32 array property.
ovr_GetFovTextureSize
Calculates the recommended viewport size for rendering a given eye within the HMD with a given FOV cone.
ovr_GetHmdDesc
Returns information about the current HMD.
ovr_GetInputState
Returns the most recent input state for controllers, without positional tracking info.
ovr_GetInt
Reads an integer property.
ovr_GetLastErrorInfo
Returns information about the most recent failed return value by the current thread for this library.
ovr_GetPerfStats
Retrieves performance stats for the VR app as well as the SDK compositor.
ovr_GetPredictedDisplayTime
Gets the time of the specified frame midpoint.
ovr_GetRenderDesc
Computes the distortion viewport, view adjust, and other rendering parameters for the specified eye.
ovr_GetSessionStatus
Returns status information for the application.
ovr_GetString
Reads a string property.
ovr_GetTextureSwapChainCurrentIndex
Gets the current index in an ovrTextureSwapChain.
ovr_GetTextureSwapChainDesc
Gets the description of the buffers in an ovrTextureSwapChain
ovr_GetTextureSwapChainLength
TextureSwapChain creation is rendering API-specific.
ovr_GetTimeInSeconds
Returns global, absolute high-resolution time in seconds.
ovr_GetTouchHapticsDesc
Gets information about Haptics engine for the specified Touch controller.
ovr_GetTrackerCount
Returns the number of attached trackers.
ovr_GetTrackerDesc
Returns a given attached tracker description.
ovr_GetTrackerPose
Returns the ovrTrackerPose for the given attached tracker.
ovr_GetTrackingOriginType
Gets the tracking origin state
ovr_GetTrackingState
Returns tracking state reading based on the specified absolute system time.
ovr_GetVersionString
Returns the version string representing the LibOVRRT version.
ovr_IdentifyClient
Identify client application info.
ovr_Initialize
Initializes LibOVR
ovr_RecenterTrackingOrigin
Re-centers the sensor position and orientation.
ovr_RequestBoundaryVisible
Requests boundary to be visible.
ovr_ResetBoundaryLookAndFeel
Resets the look and feel of the Boundary System to its default state.
ovr_ResetPerfStats
Resets the accumulated stats reported in each ovrPerfStatsPerCompositorFrame back to zero.
ovr_SetBool
Writes or creates a boolean property.
ovr_SetBoundaryLookAndFeel
Sets the look and feel of the Boundary System.
ovr_SetControllerVibration
Sets constant vibration (with specified frequency and amplitude) to a controller.
ovr_SetFloat
Writes or creates a f32 property.
ovr_SetFloatArray
Writes or creates a f32 array property.
ovr_SetInt
Writes or creates an integer property.
ovr_SetString
Writes or creates a string property.
ovr_SetTrackingOriginType
Sets the tracking origin type
ovr_Shutdown
Shuts down LibOVR
ovr_SpecifyTrackingOrigin
Allows manually tweaking the sensor position and orientation.
ovr_SubmitControllerVibration
Submits a Haptics buffer (used for vibration) to Touch (only) controllers.
ovr_SubmitFrame
Submits layers for distortion and display.
ovr_TestBoundary
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.
ovr_TestBoundaryPoint
Tests collision/proximity of a 3D point against the Boundary System.
ovr_TraceMessage
Writes a message string to the LibOVR tracing mechanism (if enabled).

Type Aliases§

ovrBool
Boolean type
ovrBoundaryType
Boundary types that specified while using the boundary system
ovrButton
Describes button input types. Button inputs are combined; that is they will be reported as pressed if they are pressed on either one of the two devices. The ovrButton_Up/Down/Left/Right map to both XBox D-Pad and directional buttons. The ovrButton_Enter and ovrButton_Return map to Start and Back controller buttons, respectively.
ovrControllerType
Specifies which controller is connected; multiple can be connected at once.
ovrDebugHudStereoMode
Debug HUD is provided to help developers gauge and debug the fidelity of their app’s stereo rendering characteristics. Using the provided quad and crosshair guides, the developer can verify various aspects such as VR tracking units (e.g. meters), stereo camera-parallax properties (e.g. making sure objects at infinity are rendered with the proper separation), measuring VR geometry sizes and distances and more.
ovrErrorType
Public error types
ovrEyeType
Specifies which eye is being used for rendering. This type explicitly does not include a third “NoStereo” monoscopic option, as such is not required for an HMD-centered API.
ovrHandType
Provides names for the left and right hand array indexes.
ovrHapticsBufferSubmitMode
Haptics buffer submit mode
ovrHmdCaps
HMD capability bits reported by device.
ovrHmdType
Enumerates all HMD types that we support.
ovrInitFlags
Initialization flags.
ovrLayerFlags
Identifies flags used by ovrLayerHeader and which are passed to ovr_SubmitFrame.
ovrLayerHudMode
Layer HUD enables the HMD user to see information about a layer
ovrLayerType
Each layer type has an associated struct, such as ovrLayerEyeFov.
ovrLogCallback
Signature of the logging callback function pointer type.
ovrLogLevel
Logging levels
ovrMirrorTexture
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
ovrProcessId
ovrProjectionModifier
Enumerates modifications to the projection matrix based on the application’s needs.
ovrResult
API call results are represented at the highest level by a single ovrResult.
ovrSession
Used as an opaque pointer to an OVR session.
ovrStatusBits
Bit flags describing the current status of sensor tracking.
ovrSuccessType
This is a general success result. Use OVR_SUCCESS to test for success.
ovrSuccessTypes
Success is a value greater or equal to 0, while all error types are negative values.
ovrTextureBindFlags
The bindings required for texture swap chain.
ovrTextureFormat
The format of a texture.
ovrTextureMiscFlags
Misc flags overriding particular behaviors of a texture swap chain
ovrTextureSwapChain
ovrTextureType
The type of texture resource.
ovrTouch
Describes touch input types. These values map to capacitive touch values reported ovrInputState::Touch. Some of these values are mapped to button bits for consistency.
ovrTrackedDeviceType
Position tracked devices
ovrTrackerFlags
Specifies sensor flags.
ovrTrackingCaps
Tracking capability bits reported by the device. Used with ovr_GetTrackingCaps.
ovrTrackingOrigin
Specifies the coordinate system ovrTrackingState returns tracking poses in. Used with ovr_SetTrackingOriginType()