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§
- ovrBoundary
Look AndFeel - Boundary system look and feel
- ovrBoundary
Test Result - Provides boundary test information
- ovrColorf
- A RGBA color with normalized
f32
components. - ovrDetect
Result - Return values for
ovr_Detect
. - ovrError
Info - Provides information about the last error.
- ovrEye
Render Desc - 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. - ovrFov
Port - Describes the up, down, left, and right angles of the field of view.
- ovrGraphics
Luid - Identifies a graphics device in a platform-specific way. For Windows this is a LUID type.
- ovrHaptics
Buffer - Haptics buffer descriptor, contains amplitude samples used for Touch vibration
- ovrHaptics
Playback State - State of the Haptics playback for Touch vibration
- ovrHmd
Desc - This is a complete descriptor of the HMD.
- ovrInit
Params - Parameters for
ovr_Initialize
. - ovrInput
State 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.- ovrLayer
EyeFov - Describes a layer that specifies a monoscopic or stereoscopic view.
- ovrLayer
EyeMatrix - Describes a layer that specifies a monoscopic or stereoscopic view.
- ovrLayer
Header - Defines properties shared by all
ovrLayer
structs, such asovrLayerEyeFov
. - ovrLayer
Quad - Describes a layer of Quad type, which is a single quad in world or viewer space.
- ovrMatrix4f
- A 4x4 matrix with
f32
elements. - ovrMirror
Texture Desc - Description used to create a mirror texture.
- ovrPerf
Stats - This is a complete descriptor of the performance stats provided by the SDK
- ovrPerf
Stats PerCompositor Frame - Contains the performance stats for a given SDK compositor frame
- ovrPose
Statef - 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.
- ovrSession
Status - Specifies status information for the current session.
- ovrSizei
- A 2D size with integer components.
- ovrTexture
Swap Chain Desc - Description used to create a texture swap chain.
- ovrTimewarp
Projection Desc - Projection information for
ovrLayerEyeFovDepth
. - ovrTouch
Haptics Desc - Describes the Touch Haptics engine. Currently, those values will NOT change during a session.
- ovrTracker
Desc - Specifies the description of a single sensor.
- ovrTracker
Pose - Specifies the pose for a single sensor.
- ovrTracking
State - 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. - ovrView
Scale Desc - 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_ B4G4 R4A4_ UNORM - Not currently supported on PC. Would require a DirectX 11.1 device.
- OVR_
FORMAT_ B5G5 R5A1_ UNORM - Not currently supported on PC. Would require a DirectX 11.1 device.
- OVR_
FORMAT_ B5G6 R5_ UNORM - Not currently supported on PC. Would require a DirectX 11.1 device.
- OVR_
FORMAT_ B8G8 R8A8_ UNORM - OVR_
FORMAT_ B8G8 R8A8_ UNORM_ SRGB - Not supported for OpenGL applications
- OVR_
FORMAT_ B8G8 R8X8_ UNORM - Not supported for OpenGL applications
- OVR_
FORMAT_ B8G8 R8X8_ 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_ R8G8 B8A8_ UNORM - OVR_
FORMAT_ R8G8 B8A8_ UNORM_ SRGB - OVR_
FORMAT_ R11G11 B10_ FLOAT - Introduced in v1.10
- OVR_
FORMAT_ R16G16 B16A16_ 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_
Play Area - 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.
- ovrController
Type_ Active - Operate on or query whichever controller is active.
- ovrController
Type_ LTouch - ovrController
Type_ None - ovrController
Type_ RTouch - ovrController
Type_ Remote - ovrController
Type_ Touch - ovrController
Type_ XBox - ovrDebug
HudStereo_ Crosshair AtInfinity - Renders screen-space crosshair at infinity for Stereo Debugging
- ovrDebug
HudStereo_ Off - Turns off the Stereo Debug HUD
- ovrDebug
HudStereo_ Quad - Renders Quad in world for Stereo Debugging
- ovrDebug
HudStereo_ Quad With Crosshair - Renders Quad+crosshair in world for Stereo Debugging
- ovrError_
Application Invisible - Application declared itself as an invisible type and is not allowed to submit frames.
- ovrError_
Audio ComError - Generic COM error.
- ovrError_
Audio Device NotFound - Failure to find the specified audio device.
- ovrError_
Client Skipped Destroy - The client failed to call
ovr_Destroy
on an active session before callingovr_Shutdown
. Or the client crashed. - ovrError_
Client Skipped Shutdown - The client failed to call
ovr_Shutdown
or the client crashed. - ovrError_
Client Version - Client version too old to connect to service
- ovrError_
Content Protection NotAvailable - Content protection is not available for the display
- ovrError_
Device Unavailable - Specified device type isn’t available.
- ovrError_
Disabled OrDefault Adapter - No supported VR display system found, but disabled or driverless adapter found.
- ovrError_
Disallowed - The given request is disallowed under the current conditions.
- ovrError_
Display Init - Unable to initialize the HMD display.
- ovrError_
Display Lost - In the event of a system-wide graphics reset or cable unplug this is returned to the app.
- ovrError_
Display Manager Init - Initialization of the DisplayManager failed.
- ovrError_
Display Plugged Incorrectly - Display portion of HMD is plugged into an incompatible port (ex: IGP)
- ovrError_
Display Removed - HMD removed from the display adapter
- ovrError_
Graphics Device Reset - Graphics device has been reset (TDR, etc…)
- ovrError_
Hybrid Graphics NotSupported - 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_
Invalid Headset Orientation - The headset was in an invalid orientation for the requested operation (e.g. vertically oriented during
ovr_RecenterPose
). - ovrError_
Invalid Operation - Function call is invalid for object’s current state
- ovrError_
Invalid Parameter - Invalid parameter provided. See error info or log for details.
- ovrError_
Invalid Session - Invalid
ovrSession
parameter provided. - ovrError_
Leaking Resources - Calling application has leaked resources
- ovrError_
LibLoad - Couldn’t load LibOVRRT.
- ovrError_
LibPath - LibOVRRT path failure.
- ovrError_
LibSign Check - LibOVRRT signature check failure.
- ovrError_
LibSymbols - LibOVRRT symbol resolution failure.
- ovrError_
LibVersion - LibOVRRT version incompatibility.
- ovrError_
Memory Allocation Failure - Failure to allocate memory.
- ovrError_
Misformatted Block - Result of a bad calibration block due to lengths
- ovrError_
Mismatched Adapters - 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_
NoValidVR Display System - 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_
OutOf Date GfxDriver - The graphics driver is out of date.
- ovrError_
OutOf DateOS - The operating system is out of date.
- ovrError_
Reinitialization - Attempting to re-initialize with a different version.
- ovrError_
Remote Session - Failed to connect to the service because remote connections to the service are not allowed.
- ovrError_
Runtime Exception - A runtime exception occurred. The application is required to shutdown LibOVR and re-initialize it before this error state will be cleared.
- ovrError_
Server Start - Unable to start the server. Is it already running?
- ovrError_
Service Connection - Couldn’t connect to the OVR Service.
- ovrError_
Service Deadlock Detected - The service watchdog discovered a deadlock.
- ovrError_
Service Error - Generic service error. See error info or log for details.
- ovrError_
Service Version - OVR Service version incompatibility.
- ovrError_
Texture Swap Chain Full ovr_CommitTextureSwapChain
was called too many times on a texture swapchain without calling submit to use the chain.- ovrError_
Texture Swap Chain Invalid - The
ovrTextureSwapChain
is in an incomplete or inconsistent state. Ensureovr_CommitTextureSwapChain
was called at least once first. - ovrError_
Timeout - The operation timed out.
- ovrError_
Tracker Driver Init - 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 - ovrHaptics
Buffer Submit_ Enqueue - Enqueue buffer for later playback
- ovrHmd
Cap_ Debug Device - (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_
Request Version - 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
forovrInitParams
::RequestedMinorVersion, though you could use a lower version thanOVR_MINOR_VERSION
to specify previous version behavior. - ovrLayer
Flag_ Head Locked - 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.
- ovrLayer
Flag_ High Quality ovrLayerFlag_HighQuality
enables 4x anisotropic sampling during the composition of the layer.- ovrLayer
Flag_ Texture Origin AtBottom Left ovrLayerFlag_TextureOriginAtBottomLeft
: the opposite is TopLeft. Generally this is false for D3D, true for OpenGL.- ovrLayer
Hud_ Info - Shows info about a specific layer
- ovrLayer
Hud_ Off - Turns off the layer HUD
- ovrLayer
Type_ Disabled - Layer is disabled.
- ovrLayer
Type_ EyeFov - Described by
ovrLayerEyeFov
. - ovrLayer
Type_ EyeMatrix - Described by
ovrLayerEyeMatrix
. - ovrLayer
Type_ Quad - Described by
ovrLayerQuad
. Previously calledovrLayerType_QuadInWorld
. - ovrLog
Level_ Debug - Debug-level log event.
- ovrLog
Level_ Error - Error-level log event.
- ovrLog
Level_ Info - Info-level log event.
- ovrMax
Layer Count - Specifies the maximum number of layers supported by
ovr_SubmitFrame
. - ovrMax
Provided Frame Stats - Maximum number of frames of performance stats provided back to the caller of
ovr_GetPerfStats
- ovrPerf
Hud_ AppRender Timing - Shows render timing info for application
- ovrPerf
Hud_ Comp Render Timing - Shows render timing info for OVR compositor
- ovrPerf
Hud_ Latency Timing - Shows latency related timing info
- ovrPerf
Hud_ Off - Turns off the performance HUD
- ovrPerf
Hud_ Perf Summary - Shows performance summary and headroom
- ovrPerf
Hud_ Version Info - Shows SDK & HMD version Info
- ovrProjection_
Clip Range OpenGL - 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_
FarClip AtInfinity - When this flag is used, the zfar value pushed into
ovrMatrix4f_Projection()
will be ignored NOTE: Enable only ifovrProjection_FarLessThanNear
is also enabled where the far clipping plane will be pushed to infinity. - ovrProjection_
FarLess Than Near - 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_
Left Handed - Enable if using left-handed transformations in your application.
- ovrProjection_
None - Use for generating a default projection matrix that is:
- ovrStatus_
Orientation Tracked - Orientation is currently tracked (connected and in use).
- ovrStatus_
Position Tracked - Position is currently tracked (false if out of range).
- ovrSuccess
- ovrSuccess_
Boundary Invalid - Boundary is invalid due to sensor change or was not setup.
- ovrSuccess_
Device Unavailable - 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. - ovrTexture
Bind_ DX_ Depth Stencil - The chain buffers can be bound as depth and/or stencil buffers
- ovrTexture
Bind_ DX_ Render Target - The application can write into the chain with pixel shader
- ovrTexture
Bind_ DX_ Unordered Access - The application can write to the chain with compute shader
- ovrTexture
Bind_ None - ovrTexture
Misc_ Allow Generate Mips - DX only: Allow generation of the mip chain on the GPU via the GenerateMips call. This flag requires that RenderTarget binding also be specified.
- ovrTexture
Misc_ 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.
- ovrTexture
Misc_ None - ovrTexture
Misc_ Protected Content - 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_
LButton Mask - Bit mask of all the button touches on the left controller
- ovrTouch_
LIndex Pointing - ovrTouch_
LIndex Trigger - ovrTouch_
LPose Mask - Bit mask of all left controller poses
- ovrTouch_
LThumb - ovrTouch_
LThumb Rest - ovrTouch_
LThumb Up - ovrTouch_
RButton Mask - Bit mask of all the button touches on the right controller
- ovrTouch_
RIndex Pointing - Finger pose state Derived internally based on distance, proximity to sensors and filtering.
- ovrTouch_
RIndex Trigger - ovrTouch_
RPose Mask - Bit mask of all right controller poses
- ovrTouch_
RThumb - ovrTouch_
RThumb Rest - ovrTouch_
RThumb Up - ovrTouch_
X - ovrTouch_
Y - ovrTracked
Device_ All - ovrTracked
Device_ HMD - ovrTracked
Device_ LTouch - ovrTracked
Device_ RTouch - ovrTracked
Device_ Touch - ovrTracker_
Connected - The sensor is present, else the sensor is absent or offline.
- ovrTracker_
Pose Tracked - The sensor has a valid pose, else the pose is unavailable. This will only be set if
ovrTracker_Connected
is set. - ovrTracking
Cap_ MagYaw Correction - Supports yaw drift correction via a magnetometer or other means.
- ovrTracking
Cap_ Orientation - Supports orientation tracking (IMU).
- ovrTracking
Cap_ Position - Supports positional tracking.
- ovrTracking
Origin_ EyeLevel - Tracking system origin reported at eye (HMD) height
- ovrTracking
Origin_ Floor Level - Tracking system origin reported at floor height
- ovrTrue
ovrBool
value of true.- ovrinit_
Writable Bits - 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_
Ortho ⚠SubProjection - Generates an orthographic sub-projection.
- ovrMatrix4f_
Projection ⚠ - Used to generate projection from
ovrEyeDesc::Fov
. - ovrPosef_
Flip ⚠Handedness - Tracking poses provided by the SDK come in a right-handed coordinate system. If an application
is passing in
ovrProjection_LeftHanded
intoovrMatrix4f_Projection
, then it should also use this function to flip the HMD tracking poses to be left-handed. - ovrTimewarp
Projection ⚠Desc_ From Projection - Extracts the required data from the result of
ovrMatrix4f_Projection
. - ovr_
Calc ⚠EyePoses - Computes offset eye poses based on headPose returned by
ovrTrackingState
. - ovr_
Clear ⚠Should Recenter Flag - Clears the ShouldRecenter status bit in
ovrSessionStatus
. - ovr_
Commit ⚠Texture Swap Chain - 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_
Destroy ⚠Mirror Texture - MirrorTexture creation is rendering API-specific.
- ovr_
Destroy ⚠Texture Swap Chain - 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_
GetBoundary ⚠Dimensions - Gets the dimension of the Boundary System’s “play area” or “outer boundary”.
- ovr_
GetBoundary ⚠Geometry - Gets the geometry of the Boundary System’s “play area” or “outer boundary” as 3D floor points.
- ovr_
GetBoundary ⚠Visible - 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_
GetConnected ⚠Controller Types - Returns controller types connected to the system OR’ed together.
- ovr_
GetController ⚠Vibration State - Gets the Haptics engine playback state of a specific Touch controller.
- ovr_
GetDevice ⚠Poses - Returns an array of poses, where each pose matches a device type provided by the
deviceTypes
array parameter. - ovr_
GetEye ⚠Poses - Returns the predicted head pose in outHmdTrackingState and offset eye poses in outEyePoses.
- ovr_
GetFloat ⚠ - Reads a
f32
property. - ovr_
GetFloat ⚠Array - Reads a
f32
array property. - ovr_
GetFov ⚠Texture Size - Calculates the recommended viewport size for rendering a given eye within the HMD with a given FOV cone.
- ovr_
GetHmd ⚠Desc - Returns information about the current HMD.
- ovr_
GetInput ⚠State - Returns the most recent input state for controllers, without positional tracking info.
- ovr_
GetInt ⚠ - Reads an integer property.
- ovr_
GetLast ⚠Error Info - Returns information about the most recent failed return value by the current thread for this library.
- ovr_
GetPerf ⚠Stats - Retrieves performance stats for the VR app as well as the SDK compositor.
- ovr_
GetPredicted ⚠Display Time - Gets the time of the specified frame midpoint.
- ovr_
GetRender ⚠Desc - Computes the distortion viewport, view adjust, and other rendering parameters for the specified eye.
- ovr_
GetSession ⚠Status - Returns status information for the application.
- ovr_
GetString ⚠ - Reads a string property.
- ovr_
GetTexture ⚠Swap Chain Current Index - Gets the current index in an
ovrTextureSwapChain
. - ovr_
GetTexture ⚠Swap Chain Desc - Gets the description of the buffers in an
ovrTextureSwapChain
- ovr_
GetTexture ⚠Swap Chain Length - TextureSwapChain creation is rendering API-specific.
- ovr_
GetTime ⚠InSeconds - Returns global, absolute high-resolution time in seconds.
- ovr_
GetTouch ⚠Haptics Desc - Gets information about Haptics engine for the specified Touch controller.
- ovr_
GetTracker ⚠Count - Returns the number of attached trackers.
- ovr_
GetTracker ⚠Desc - Returns a given attached tracker description.
- ovr_
GetTracker ⚠Pose - Returns the
ovrTrackerPose
for the given attached tracker. - ovr_
GetTracking ⚠Origin Type - Gets the tracking origin state
- ovr_
GetTracking ⚠State - Returns tracking state reading based on the specified absolute system time.
- ovr_
GetVersion ⚠String - Returns the version string representing the LibOVRRT version.
- ovr_
Identify ⚠Client - Identify client application info.
- ovr_
Initialize ⚠ - Initializes LibOVR
- ovr_
Recenter ⚠Tracking Origin - Re-centers the sensor position and orientation.
- ovr_
Request ⚠Boundary Visible - Requests boundary to be visible.
- ovr_
Reset ⚠Boundary Look AndFeel - Resets the look and feel of the Boundary System to its default state.
- ovr_
Reset ⚠Perf Stats - Resets the accumulated stats reported in each
ovrPerfStatsPerCompositorFrame
back to zero. - ovr_
SetBool ⚠ - Writes or creates a boolean property.
- ovr_
SetBoundary ⚠Look AndFeel - Sets the look and feel of the Boundary System.
- ovr_
SetController ⚠Vibration - Sets constant vibration (with specified frequency and amplitude) to a controller.
- ovr_
SetFloat ⚠ - Writes or creates a
f32
property. - ovr_
SetFloat ⚠Array - Writes or creates a
f32
array property. - ovr_
SetInt ⚠ - Writes or creates an integer property.
- ovr_
SetString ⚠ - Writes or creates a string property.
- ovr_
SetTracking ⚠Origin Type - Sets the tracking origin type
- ovr_
Shutdown ⚠ - Shuts down LibOVR
- ovr_
Specify ⚠Tracking Origin - Allows manually tweaking the sensor position and orientation.
- ovr_
Submit ⚠Controller Vibration - Submits a Haptics buffer (used for vibration) to Touch (only) controllers.
- ovr_
Submit ⚠Frame - Submits layers for distortion and display.
- ovr_
Test ⚠Boundary - 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_
Test ⚠Boundary Point - Tests collision/proximity of a 3D point against the Boundary System.
- ovr_
Trace ⚠Message - Writes a message string to the LibOVR tracing mechanism (if enabled).
Type Aliases§
- ovrBool
- Boolean type
- ovrBoundary
Type - 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. TheovrButton_Enter
andovrButton_Return
map to Start and Back controller buttons, respectively. - ovrController
Type - Specifies which controller is connected; multiple can be connected at once.
- ovrDebug
HudStereo Mode - 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.
- ovrError
Type - Public error types
- ovrEye
Type - 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.
- ovrHand
Type - Provides names for the left and right hand array indexes.
- ovrHaptics
Buffer Submit Mode - Haptics buffer submit mode
- ovrHmd
Caps - HMD capability bits reported by device.
- ovrHmd
Type - Enumerates all HMD types that we support.
- ovrInit
Flags - Initialization flags.
- ovrLayer
Flags - Identifies flags used by
ovrLayerHeader
and which are passed toovr_SubmitFrame
. - ovrLayer
HudMode - Layer HUD enables the HMD user to see information about a layer
- ovrLayer
Type - Each layer type has an associated struct, such as
ovrLayerEyeFov
. - ovrLog
Callback - Signature of the logging callback function pointer type.
- ovrLog
Level - Logging levels
- ovrMirror
Texture - ovrPerf
HudMode - 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
- ovrProcess
Id - ovrProjection
Modifier - 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.
- ovrStatus
Bits - Bit flags describing the current status of sensor tracking.
- ovrSuccess
Type - This is a general success result. Use
OVR_SUCCESS
to test for success. - ovrSuccess
Types - Success is a value greater or equal to 0, while all error types are negative values.
- ovrTexture
Bind Flags - The bindings required for texture swap chain.
- ovrTexture
Format - The format of a texture.
- ovrTexture
Misc Flags - Misc flags overriding particular behaviors of a texture swap chain
- ovrTexture
Swap Chain - ovrTexture
Type - 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. - ovrTracked
Device Type - Position tracked devices
- ovrTracker
Flags - Specifies sensor flags.
- ovrTracking
Caps - Tracking capability bits reported by the device.
Used with
ovr_GetTrackingCaps
. - ovrTracking
Origin - Specifies the coordinate system
ovrTrackingState
returns tracking poses in. Used withovr_SetTrackingOriginType()