Class OVR
- java.lang.Object
-
- org.lwjgl.ovr.OVR
-
public class OVR extends java.lang.ObjectNative bindings to libOVR, using the Oculus SDK C API.
-
-
Field Summary
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intnovr_BeginFrame(long session, long frameIndex)Unsafe version of:BeginFramestatic voidnovr_ClearShouldRecenterFlag(long session)Unsafe version of:ClearShouldRecenterFlagstatic intnovr_CommitTextureSwapChain(long session, long chain)Unsafe version of:CommitTextureSwapChainstatic intnovr_Create(long pSession, long pLuid)Unsafe version of:Createstatic voidnovr_Destroy(long session)Unsafe version of:Destroystatic voidnovr_DestroyMirrorTexture(long session, long mirrorTexture)Unsafe version of:DestroyMirrorTexturestatic voidnovr_DestroyTextureSwapChain(long session, long chain)Unsafe version of:DestroyTextureSwapChainstatic intnovr_EnableExtension(long session, int extension)Unsafe version of:EnableExtensionstatic intnovr_EndFrame(long session, long frameIndex, long viewScaleDesc, long layerPtrList, int layerCount)Unsafe version of:EndFramestatic booleannovr_GetBool(long session, long propertyName, boolean defaultVal)Unsafe version of:GetBoolstatic intnovr_GetBoundaryDimensions(long session, int boundaryType, long outDimensions)Unsafe version of:GetBoundaryDimensionsstatic intnovr_GetBoundaryGeometry(long session, int boundaryType, long outFloorPoints, int[] outFloorPointsCount)Array version of:novr_GetBoundaryGeometry(long, int, long, long)static intnovr_GetBoundaryGeometry(long session, int boundaryType, long outFloorPoints, long outFloorPointsCount)Unsafe version of:GetBoundaryGeometrystatic intnovr_GetBoundaryVisible(long session, long outIsVisible)Unsafe version of:GetBoundaryVisiblestatic intnovr_GetConnectedControllerTypes(long session)Unsafe version of:GetConnectedControllerTypesstatic intnovr_GetControllerVibrationState(long session, int controllerType, long outState)Unsafe version of:GetControllerVibrationStatestatic intnovr_GetDevicePoses(long session, int[] deviceTypes, int deviceCount, double absTime, long outDevicePoses)Array version of:novr_GetDevicePoses(long, long, int, double, long)static intnovr_GetDevicePoses(long session, long deviceTypes, int deviceCount, double absTime, long outDevicePoses)Unsafe version of:GetDevicePosesstatic intnovr_GetExternalCameras(long session, long cameras, int[] inoutCameraCount)Array version of:novr_GetExternalCameras(long, long, long)static intnovr_GetExternalCameras(long session, long cameras, long inoutCameraCount)Unsafe version of:GetExternalCamerasstatic floatnovr_GetFloat(long session, long propertyName, float defaultVal)Unsafe version of:GetFloatstatic intnovr_GetFloatArray(long session, long propertyName, float[] values, int valuesCapacity)Array version of:novr_GetFloatArray(long, long, long, int)static intnovr_GetFloatArray(long session, long propertyName, long values, int valuesCapacity)Unsafe version of:GetFloatArraystatic intnovr_GetFovStencil(long session, long fovStencilDesc, long meshBuffer)Unsafe version of:GetFovStencilstatic voidnovr_GetFovTextureSize(long session, int eye, long fov, float pixelsPerDisplayPixel, long __result)Unsafe version of:GetFovTextureSizestatic voidnovr_GetHmdDesc(long session, long __result)Unsafe version of:GetHmdDescstatic intnovr_GetInputState(long session, int controllerType, long inputState)Unsafe version of:GetInputStatestatic intnovr_GetInt(long session, long propertyName, int defaultVal)Unsafe version of:GetIntstatic voidnovr_GetLastErrorInfo(long errorInfo)Unsafe version of:GetLastErrorInfostatic intnovr_GetPerfStats(long session, long outStats)Unsafe version of:GetPerfStatsstatic doublenovr_GetPredictedDisplayTime(long session, long frameIndex)Unsafe version of:GetPredictedDisplayTimestatic voidnovr_GetRenderDesc(long session, int eyeType, long fov, long __result)Unsafe version of:GetRenderDescstatic intnovr_GetSessionStatus(long session, long sessionStatus)Unsafe version of:GetSessionStatusstatic longnovr_GetString(long session, long propertyName, long defaultVal)Unsafe version of:GetStringstatic intnovr_GetTextureSwapChainCurrentIndex(long session, long chain, int[] out_Index)Array version of:novr_GetTextureSwapChainCurrentIndex(long, long, long)static intnovr_GetTextureSwapChainCurrentIndex(long session, long chain, long out_Index)Unsafe version of:GetTextureSwapChainCurrentIndexstatic intnovr_GetTextureSwapChainDesc(long session, long chain, long out_Desc)Unsafe version of:GetTextureSwapChainDescstatic intnovr_GetTextureSwapChainLength(long session, long chain, int[] out_Length)Array version of:novr_GetTextureSwapChainLength(long, long, long)static intnovr_GetTextureSwapChainLength(long session, long chain, long out_Length)Unsafe version of:GetTextureSwapChainLengthstatic voidnovr_GetTouchHapticsDesc(long session, int controllerType, long __result)Unsafe version of:GetTouchHapticsDescstatic intnovr_GetTrackerCount(long session)Unsafe version of:GetTrackerCountstatic voidnovr_GetTrackerDesc(long session, int trackerDescIndex, long __result)Unsafe version of:GetTrackerDescstatic voidnovr_GetTrackerPose(long session, int trackerPoseIndex, long __result)Unsafe version of:GetTrackerPosestatic intnovr_GetTrackingOriginType(long session)Unsafe version of:GetTrackingOriginTypestatic voidnovr_GetTrackingState(long session, double absTime, boolean latencyMarker, long __result)Unsafe version of:GetTrackingStatestatic longnovr_GetVersionString()Unsafe version of:GetVersionStringstatic intnovr_IdentifyClient(long identity)Unsafe version of:IdentifyClientstatic intnovr_Initialize(long params)Unsafe version of:Initializestatic intnovr_IsExtensionSupported(long session, int extension, long outExtensionSupported)Unsafe version of:IsExtensionSupportedstatic intnovr_RecenterTrackingOrigin(long session)Unsafe version of:RecenterTrackingOriginstatic intnovr_RequestBoundaryVisible(long session, boolean visible)Unsafe version of:RequestBoundaryVisiblestatic intnovr_ResetBoundaryLookAndFeel(long session)Unsafe version of:ResetBoundaryLookAndFeelstatic intnovr_ResetPerfStats(long session)Unsafe version of:ResetPerfStatsstatic booleannovr_SetBool(long session, long propertyName, boolean value)Unsafe version of:SetBoolstatic intnovr_SetBoundaryLookAndFeel(long session, long lookAndFeel)Unsafe version of:SetBoundaryLookAndFeelstatic intnovr_SetControllerVibration(long session, int controllerType, float frequency, float amplitude)Unsafe version of:SetControllerVibrationstatic intnovr_SetExternalCameraProperties(long session, long name, long intrinsics, long extrinsics)Unsafe version of:SetExternalCameraPropertiesstatic booleannovr_SetFloat(long session, long propertyName, float value)Unsafe version of:SetFloatstatic booleannovr_SetFloatArray(long session, long propertyName, float[] values, int valuesSize)Array version of:novr_SetFloatArray(long, long, long, int)static booleannovr_SetFloatArray(long session, long propertyName, long values, int valuesSize)Unsafe version of:SetFloatArraystatic booleannovr_SetInt(long session, long propertyName, int value)Unsafe version of:SetIntstatic booleannovr_SetString(long hmddesc, long propertyName, long value)Unsafe version of:SetStringstatic intnovr_SetTrackingOriginType(long session, int origin)Unsafe version of:SetTrackingOriginTypestatic intnovr_SpecifyTrackingOrigin(long session, long originPose)Unsafe version of:SpecifyTrackingOriginstatic intnovr_SubmitControllerVibration(long session, int controllerType, long buffer)Unsafe version of:SubmitControllerVibrationstatic intnovr_SubmitFrame(long session, long frameIndex, long viewScaleDesc, long layerPtrList, int layerCount)Unsafe version of:SubmitFramestatic intnovr_TestBoundary(long session, int deviceBitmask, int boundaryType, long outTestResult)Unsafe version of:TestBoundarystatic intnovr_TestBoundaryPoint(long session, long point, int singleBoundaryType, long outTestResult)Unsafe version of:TestBoundaryPointstatic intnovr_TraceMessage(int level, long message)Unsafe version of:TraceMessagestatic intnovr_WaitToBeginFrame(long session, long frameIndex)Unsafe version of:WaitToBeginFramestatic intovr_BeginFrame(long session, long frameIndex)Called from render thread before application begins rendering.static voidovr_ClearShouldRecenterFlag(long session)Clears theShouldRecenterstatus bit inOVRSessionStatus.static intovr_CommitTextureSwapChain(long session, long chain)Commits any pending changes to anovrTextureSwapChain, and advances its current index.static intovr_Create(org.lwjgl.PointerBuffer pSession, OVRGraphicsLuid pLuid)Creates a handle to a VR session.static voidovr_Destroy(long session)Destroys the session.static voidovr_DestroyMirrorTexture(long session, long mirrorTexture)Destroys a mirror texture previously created by one of the mirror texture creation functions.static voidovr_DestroyTextureSwapChain(long session, long chain)Destroys anovrTextureSwapChainand frees all the resources associated with it.static intovr_EnableExtension(long session, int extension)Enable extension.static intovr_EndFrame(long session, long frameIndex, OVRViewScaleDesc viewScaleDesc, org.lwjgl.PointerBuffer layerPtrList)Called from render thread after application has finished rendering.static booleanovr_GetBool(long session, java.lang.CharSequence propertyName, boolean defaultVal)Reads a boolean property.static booleanovr_GetBool(long session, java.nio.ByteBuffer propertyName, boolean defaultVal)Reads a boolean property.static intovr_GetBoundaryDimensions(long session, int boundaryType, OVRVector3f outDimensions)Gets the dimension of the Boundary System's "play area" or "outer boundary".static intovr_GetBoundaryGeometry(long session, int boundaryType, OVRVector3f outFloorPoints, int[] outFloorPointsCount)Array version of:GetBoundaryGeometrystatic intovr_GetBoundaryGeometry(long session, int boundaryType, OVRVector3f outFloorPoints, java.nio.IntBuffer outFloorPointsCount)Gets the geometry of the Boundary System's "play area" or "outer boundary" as 3D floor points.static intovr_GetBoundaryVisible(long session, java.nio.ByteBuffer outIsVisible)Returns if the boundary is currently visible.static intovr_GetConnectedControllerTypes(long session)Returns controller types connected to the system OR'ed together.static intovr_GetControllerVibrationState(long session, int controllerType, OVRHapticsPlaybackState outState)Gets the Haptics engine playback state of a specific Touch controller.static intovr_GetDevicePoses(long session, int[] deviceTypes, double absTime, OVRPoseStatef.Buffer outDevicePoses)Array version of:GetDevicePosesstatic intovr_GetDevicePoses(long session, java.nio.IntBuffer deviceTypes, double absTime, OVRPoseStatef.Buffer outDevicePoses)Returns an array of poses, where each pose matches a device type provided by thedeviceTypesarray parameter.static intovr_GetExternalCameras(long session, OVRExternalCamera.Buffer cameras, int[] inoutCameraCount)Array version of:GetExternalCamerasstatic intovr_GetExternalCameras(long session, OVRExternalCamera.Buffer cameras, java.nio.IntBuffer inoutCameraCount)Returns the number of camera properties of all camerasstatic floatovr_GetFloat(long session, java.lang.CharSequence propertyName, float defaultVal)Reads a float property.static floatovr_GetFloat(long session, java.nio.ByteBuffer propertyName, float defaultVal)Reads a float property.static intovr_GetFloatArray(long session, java.lang.CharSequence propertyName, float[] values)Array version of:GetFloatArraystatic intovr_GetFloatArray(long session, java.lang.CharSequence propertyName, java.nio.FloatBuffer values)Reads a float array property.static intovr_GetFloatArray(long session, java.nio.ByteBuffer propertyName, float[] values)Array version of:GetFloatArraystatic intovr_GetFloatArray(long session, java.nio.ByteBuffer propertyName, java.nio.FloatBuffer values)Reads a float array property.static intovr_GetFovStencil(long session, OVRFovStencilDesc fovStencilDesc, OVRFovStencilMeshBuffer meshBuffer)Returns a viewport stencil mesh to be used for defining the area or outline the user can see through the lens on an area defined by a givenovrFovPort.static OVRSizeiovr_GetFovTextureSize(long session, int eye, OVRFovPort fov, float pixelsPerDisplayPixel, OVRSizei __result)Calculates the recommended viewport size for rendering a given eye within the HMD with a given FOV cone.static OVRHmdDescovr_GetHmdDesc(long session, OVRHmdDesc __result)Returns information about the current HMD.static intovr_GetInputState(long session, int controllerType, OVRInputState inputState)Returns the most recent input state for controllers, without positional tracking info.static intovr_GetInt(long session, java.lang.CharSequence propertyName, int defaultVal)Reads an integer property.static intovr_GetInt(long session, java.nio.ByteBuffer propertyName, int defaultVal)Reads an integer property.static voidovr_GetLastErrorInfo(OVRErrorInfo errorInfo)Returns information about the most recent failed return value by the current thread for this library.static intovr_GetPerfStats(long session, OVRPerfStats outStats)Retrieves performance stats for the VR app as well as the SDK compositor.static doubleovr_GetPredictedDisplayTime(long session, long frameIndex)Gets the time of the specified frame midpoint.static OVREyeRenderDescovr_GetRenderDesc(long session, int eyeType, OVRFovPort fov, OVREyeRenderDesc __result)Computes the distortion viewport, view adjust, and other rendering parameters for the specified eye.static intovr_GetSessionStatus(long session, OVRSessionStatus sessionStatus)Returns status information for the application.static java.lang.Stringovr_GetString(long session, java.lang.CharSequence propertyName, java.lang.CharSequence defaultVal)Reads a string property.static java.lang.Stringovr_GetString(long session, java.nio.ByteBuffer propertyName, java.nio.ByteBuffer defaultVal)Reads a string property.static intovr_GetTextureSwapChainCurrentIndex(long session, long chain, int[] out_Index)Array version of:GetTextureSwapChainCurrentIndexstatic intovr_GetTextureSwapChainCurrentIndex(long session, long chain, java.nio.IntBuffer out_Index)Gets the current index in anovrTextureSwapChain.static intovr_GetTextureSwapChainDesc(long session, long chain, OVRTextureSwapChainDesc out_Desc)Gets the description of the buffers in anovrTextureSwapChain.static intovr_GetTextureSwapChainLength(long session, long chain, int[] out_Length)Array version of:GetTextureSwapChainLengthstatic intovr_GetTextureSwapChainLength(long session, long chain, java.nio.IntBuffer out_Length)Gets the number of buffers in anovrTextureSwapChain.static doubleovr_GetTimeInSeconds()Returns global, absolute high-resolution time in seconds.static OVRTouchHapticsDescovr_GetTouchHapticsDesc(long session, int controllerType, OVRTouchHapticsDesc __result)Gets information about Haptics engine for the specified Touch controller.static intovr_GetTrackerCount(long session)Returns the number of attached trackers.static OVRTrackerDescovr_GetTrackerDesc(long session, int trackerDescIndex, OVRTrackerDesc __result)Returns a given attached tracker description.static OVRTrackerPoseovr_GetTrackerPose(long session, int trackerPoseIndex, OVRTrackerPose __result)Returns theOVRTrackerPosefor the given attached tracker.static intovr_GetTrackingOriginType(long session)Gets the tracking origin state.static OVRTrackingStateovr_GetTrackingState(long session, double absTime, boolean latencyMarker, OVRTrackingState __result)Returns tracking state reading based on the specified absolute system time.static java.lang.Stringovr_GetVersionString()Returns the version string representing the LibOVRRT version.static intovr_IdentifyClient(java.lang.CharSequence identity)Identifies client application info.static intovr_IdentifyClient(java.nio.ByteBuffer identity)Identifies client application info.static intovr_Initialize(OVRInitParams params)Initialize LibOVR for application usage.static intovr_IsExtensionSupported(long session, int extension, java.nio.ByteBuffer outExtensionSupported)Queries extension support status.static intovr_RecenterTrackingOrigin(long session)Re-centers the sensor position and orientation.static intovr_RequestBoundaryVisible(long session, boolean visible)Requests boundary to be visible.static intovr_ResetBoundaryLookAndFeel(long session)Resets the look and feel of the Boundary System to its default state.static intovr_ResetPerfStats(long session)Resets the accumulated stats reported in eachOVRPerfStatsPerCompositorFrameback to zero.static booleanovr_SetBool(long session, java.lang.CharSequence propertyName, boolean value)Writes or creates a boolean property.static booleanovr_SetBool(long session, java.nio.ByteBuffer propertyName, boolean value)Writes or creates a boolean property.static intovr_SetBoundaryLookAndFeel(long session, OVRBoundaryLookAndFeel lookAndFeel)Sets the look and feel of the Boundary System.static intovr_SetControllerVibration(long session, int controllerType, float frequency, float amplitude)Sets constant vibration (with specified frequency and amplitude) to a controller.static intovr_SetExternalCameraProperties(long session, java.lang.CharSequence name, OVRCameraIntrinsics intrinsics, OVRCameraExtrinsics extrinsics)Sets the camera intrinsics and/or extrinsics stored for thecameraNamecamera.static intovr_SetExternalCameraProperties(long session, java.nio.ByteBuffer name, OVRCameraIntrinsics intrinsics, OVRCameraExtrinsics extrinsics)Sets the camera intrinsics and/or extrinsics stored for thecameraNamecamera.static booleanovr_SetFloat(long session, java.lang.CharSequence propertyName, float value)Writes or creates a float property.static booleanovr_SetFloat(long session, java.nio.ByteBuffer propertyName, float value)Writes or creates a float property.static booleanovr_SetFloatArray(long session, java.lang.CharSequence propertyName, float[] values)Array version of:SetFloatArraystatic booleanovr_SetFloatArray(long session, java.lang.CharSequence propertyName, java.nio.FloatBuffer values)Writes or creates a float array property.static booleanovr_SetFloatArray(long session, java.nio.ByteBuffer propertyName, float[] values)Array version of:SetFloatArraystatic booleanovr_SetFloatArray(long session, java.nio.ByteBuffer propertyName, java.nio.FloatBuffer values)Writes or creates a float array property.static booleanovr_SetInt(long session, java.lang.CharSequence propertyName, int value)Writes or creates an integer property.static booleanovr_SetInt(long session, java.nio.ByteBuffer propertyName, int value)Writes or creates an integer property.static booleanovr_SetString(long hmddesc, java.lang.CharSequence propertyName, java.lang.CharSequence value)Writes or creates a string property.static booleanovr_SetString(long hmddesc, java.nio.ByteBuffer propertyName, java.nio.ByteBuffer value)Writes or creates a string property.static intovr_SetTrackingOriginType(long session, int origin)Sets the tracking origin type.static voidovr_Shutdown()Shuts down LibOVR.static intovr_SpecifyTrackingOrigin(long session, OVRPosef originPose)Allows manually tweaking the sensor position and orientation.static intovr_SubmitControllerVibration(long session, int controllerType, OVRHapticsBuffer buffer)Submits a Haptics buffer (used for vibration) to Touch (only) controllers.static intovr_SubmitFrame(long session, long frameIndex, OVRViewScaleDesc viewScaleDesc, org.lwjgl.PointerBuffer layerPtrList)Submits layers for distortion and display.static intovr_TestBoundary(long session, int deviceBitmask, int boundaryType, OVRBoundaryTestResult outTestResult)Tests collision/proximity of position tracked devices (e.g.static intovr_TestBoundaryPoint(long session, OVRVector3f point, int singleBoundaryType, OVRBoundaryTestResult outTestResult)Tests collision/proximity of a 3D point against the Boundary System.static intovr_TraceMessage(int level, java.lang.CharSequence message)Writes a message string to the LibOVR tracing mechanism (if enabled).static intovr_TraceMessage(int level, java.nio.ByteBuffer message)Writes a message string to the LibOVR tracing mechanism (if enabled).static intovr_WaitToBeginFrame(long session, long frameIndex)Waits until surfaces are available and it is time to begin rendering the frame.
-
-
-
Field Detail
-
ovrInit_Debug, ovrInit_RequestVersion, ovrInit_Invisible, ovrInit_MixedRendering, ovrInit_FocusAware, ovrInit_WritableBits
Initialization flags. (ovrInitFlags)Enum values:
Init_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.Init_RequestVersion- When a version is requested, the LibOVR runtime respects theRequestedMinorVersionfield and verifies that theRequestedMinorVersionis supported.When a version is requested, the LibOVR runtime respects the
RequestedMinorVersionfield and verifies that theRequestedMinorVersionis supported. Normally when you specify this flag you simply useMINOR_VERSIONforOVRInitParams::RequestedMinorVersion, though you could use a lower version thanMINOR_VERSIONto specify previous version behavior.Init_Invisible- This client will not be visible in the HMD. Typically set by diagnostic or debugging utilities.Init_MixedRendering- This client will alternate between VR and 2D rendering. Typically set by game engine editors and VR-enabled web browsers.Init_FocusAware- This client is aware ofOVRSessionStatusfocus states (e.g.ovrSessionStatus::HasInputFocus), and responds to them appropriately (e.g. pauses and stops drawing hands when lacking focus).Init_WritableBits- These bits are writable by user code.
-
ovrLogLevel_Debug, ovrLogLevel_Info, ovrLogLevel_Error
Logging levels. (ovrLogLevel)Enum values:
LogLevel_Debug- Debug-level log event.LogLevel_Info- Info-level log event.LogLevel_Error- Error-level log event.
-
ovrHmd_None, ovrHmd_DK1, ovrHmd_DKHD, ovrHmd_DK2, ovrHmd_CB, ovrHmd_Other, ovrHmd_E3_2015, ovrHmd_ES06, ovrHmd_ES09, ovrHmd_ES11, ovrHmd_CV1, ovrHmd_RiftS
-
ovrHmdCap_DebugDevice
HMD capability bits reported by device. (ovrHmdCaps)Enum values:
HmdCap_DebugDevice- (read only) Specifies that the HMD is a virtual debug device.
-
ovrTrackingCap_Orientation, ovrTrackingCap_MagYawCorrection, ovrTrackingCap_Position
Tracking capability bits reported by the device. (ovrTrackingCaps)Enum values:
TrackingCap_Orientation- Supports orientation tracking (IMU).TrackingCap_MagYawCorrection- Supports yaw drift correction.TrackingCap_Position- Supports positional tracking.
-
ovrExtension_TextureLayout_Octilinear
Optional extensions. (ovrExtensions)Enum values:
Extension_TextureLayout_Octilinear- Enable before first layer submission.
-
ovrEye_Left, ovrEye_Right, ovrEye_Count
Specifies which eye is being used for rendering. (ovrEyeType)This type explicitly does not include a third "NoStereo" monoscopic option, as such is not required for an HMD-centered API.
Enum values:
-
ovrTrackingOrigin_EyeLevel, ovrTrackingOrigin_FloorLevel
Specifies the coordinate system ovrTrackingState returns tracking poses in. (ovrTrackingOrigin)Used with
SetTrackingOriginType.Enum values:
TrackingOrigin_EyeLevel- Tracking system origin reported at eye (HMD) height.Prefer using this origin when your application requires matching user's current physical head pose to a virtual head pose without any regards to a the height of the floor. Cockpit-based, or 3rd-person experiences are ideal candidates. When used, all poses in
OVRTrackingStateare reported as an offset transform from the profile calibrated or recentered HMD pose. It is recommended that apps using this origin type callRecenterTrackingOriginprior to starting the VR experience, but notify the user before doing so to make sure the user is in a comfortable pose, facing a comfortable direction.TrackingOrigin_FloorLevel- Tracking system origin reported at floor height.Prefer using this origin when your application requires the physical floor height to match the virtual floor height, such as standing experiences. When used, all poses in
OVRTrackingStateare reported as an offset transform from the profile calibrated floor pose. CallingRecenterTrackingOriginwill recenter the X & Z axes as well as yaw, but the Y-axis (i.e. height) will continue to be reported using the floor height as the origin for all poses.
-
ovrStatus_OrientationTracked, ovrStatus_PositionTracked, ovrStatus_OrientationValid, ovrStatus_PositionValid
Bit flags describing the current status of sensor tracking. (ovrStatusBitsEnum values:
Status_OrientationTracked- Device orientation is currently tracked.It's possible that the device orientation is not tracked, but its reported orientation is nevertheless valid (e.g. due to estimation).
Status_PositionTracked- Device position is currently tracked.It's possible that the device position is not tracked, but its reported position is nevertheless valid (e.g. due to estimation).
Status_OrientationValid- The reported device orientation is valid for application use.In the case that
OrientationValidis true andOrientationTrackedis false, the runtime may be estimating the orientation of the device. In the case thatOrientationValidis false, the application should not use the returned orientation value.Status_PositionValid- The reported device orientation is valid for application use.In the case that
PositionValidis true andPositionTrackedis false, the runtime may be estimating the position of the device. In the case thatPositionValidis false, the application should not use the returned position value.
-
ovrTracker_Connected, ovrTracker_PoseTracked
Specifies sensor flags. (ovrTrackerFlags)Enum values:
Tracker_Connected- The sensor is present, else the sensor is absent or offline.Tracker_PoseTracked- The sensor has a valid pose, else the pose is unavailable. This will only be set if ovrTracker_Connected is set.
-
ovrTexture_2D, ovrTexture_2D_External, ovrTexture_Cube
The type of texture resource. (ovrTextureType)Enum values:
Texture_2D- 2D texturesTexture_2D_External- Application-provided 2D texture. Not supported on PC.Texture_Cube- Cube maps.OVRTextureSwapChainDesc::ArraySizemust be 6 for this type.
-
ovrTextureBind_None, ovrTextureBind_DX_RenderTarget, ovrTextureBind_DX_UnorderedAccess, ovrTextureBind_DX_DepthStencil
The bindings required for texture swap chain. (ovrTextureBindFlags)All texture swap chains are automatically bindable as shader input resources since the Oculus runtime needs this to read them.
Enum values:
TextureBind_NoneTextureBind_DX_RenderTarget- The application can write into the chain with pixel shaderTextureBind_DX_UnorderedAccess- The application can write to the chain with compute shaderTextureBind_DX_DepthStencil- The chain buffers can be bound as depth and/or stencil buffers. This flag cannot be combined withTextureBind_DX_RenderTarget.
-
OVR_FORMAT_UNKNOWN, OVR_FORMAT_B5G6R5_UNORM, OVR_FORMAT_B5G5R5A1_UNORM, OVR_FORMAT_B4G4R4A4_UNORM, OVR_FORMAT_R8G8B8A8_UNORM, OVR_FORMAT_R8G8B8A8_UNORM_SRGB, OVR_FORMAT_B8G8R8A8_UNORM, OVR_FORMAT_B8G8R8_UNORM, OVR_FORMAT_B8G8R8A8_UNORM_SRGB, OVR_FORMAT_B8G8R8X8_UNORM, OVR_FORMAT_B8G8R8X8_UNORM_SRGB, OVR_FORMAT_R16G16B16A16_FLOAT, OVR_FORMAT_R11G11B10_FLOAT, OVR_FORMAT_D16_UNORM, OVR_FORMAT_D24_UNORM_S8_UINT, OVR_FORMAT_D32_FLOAT, OVR_FORMAT_D32_FLOAT_S8X24_UINT, 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_UF16, OVR_FORMAT_BC6H_SF16, OVR_FORMAT_BC7_UNORM, OVR_FORMAT_BC7_UNORM_SRGB
The format of a texture. (ovrTextureFormat)Enum values:
OVR_FORMAT_UNKNOWNOVR_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_UNORMOVR_FORMAT_R8G8B8A8_UNORM_SRGBOVR_FORMAT_B8G8R8A8_UNORMOVR_FORMAT_B8G8R8_UNORMOVR_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_FLOATOVR_FORMAT_R11G11B10_FLOAT- Not supported for D3D12 applications.OVR_FORMAT_D16_UNORMOVR_FORMAT_D24_UNORM_S8_UINTOVR_FORMAT_D32_FLOATOVR_FORMAT_D32_FLOAT_S8X24_UINTOVR_FORMAT_BC1_UNORMOVR_FORMAT_BC1_UNORM_SRGBOVR_FORMAT_BC2_UNORMOVR_FORMAT_BC2_UNORM_SRGBOVR_FORMAT_BC3_UNORMOVR_FORMAT_BC3_UNORM_SRGBOVR_FORMAT_BC6H_UF16OVR_FORMAT_BC6H_SF16OVR_FORMAT_BC7_UNORMOVR_FORMAT_BC7_UNORM_SRGB
-
ovrTextureMisc_None, ovrTextureMisc_DX_Typeless, ovrTextureMisc_AllowGenerateMips, ovrTextureMisc_ProtectedContent, ovrTextureMisc_AutoGenerateMips
Misc flags overriding particular behaviors of a texture swap chain. (ovrTextureFlags)Enum values:
TextureMisc_NoneTextureMisc_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.TextureMisc_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.TextureMisc_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 contentsTextureMisc_AutoGenerateMips- Automatically generate and use the mip chain in composition on each submission. Mips are regenerated from highest quality level, ignoring other pre-existing mip levels.Not supported for depth or compressed (BC) formats.
-
ovrMirrorOption_Default, ovrMirrorOption_PostDistortion, ovrMirrorOption_LeftEyeOnly, ovrMirrorOption_RightEyeOnly, ovrMirrorOption_IncludeGuardian, ovrMirrorOption_IncludeNotifications, ovrMirrorOption_IncludeSystemGui, ovrMirrorOption_ForceSymmetricFov
Bit flags used as part ofOVRMirrorTextureDesc'sMirrorOptionsfield.ovrMirrorOptionsEnum values:
MirrorOption_Default- By default the mirror texture will be:- Pre-distortion (i.e. rectilinear)
- Contain both eye textures
- Exclude Guardian, Notifications, System Menu GUI
MirrorOption_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.
MirrorOption_LeftEyeOnly- SinceMirrorOption_Defaultrenders both eyes into the mirror texture, these two flags are exclusive (i.e. cannot use them simultaneously)MirrorOption_RightEyeOnly- SeeMirrorOption_LeftEyeOnlyMirrorOption_IncludeGuardian- Shows the boundary system aka Guardian on the mirror texture.MirrorOption_IncludeNotifications- Shows system notifications the user receives on the mirror texture.MirrorOption_IncludeSystemGui- Shows the system menu (triggered by hitting the Home button) on the mirror texture.MirrorOption_ForceSymmetricFov- Forces mirror output to use max symmetric FOV instead of asymmetric full FOV used by HMD.Only valid for rectilinear mirrors i.e. using
MirrorOption_PostDistortionwithovrMirrorOption_ForceSymmetricFovwill result inError_InvalidParametererror.
-
ovrFovStencil_HiddenArea, ovrFovStencil_VisibleArea, ovrFovStencil_BorderLine, ovrFovStencil_VisibleRectangle
Viewport stencil types provided by theGetFovStencilcall.ovrFovStencilTypeEnum values:
FovStencil_HiddenArea- Triangle list covering parts that are hidden to users.FovStencil_VisibleArea- Triangle list covering parts that are visible to users.FovStencil_BorderLine- Line list that draws the boundary visible to users.FovStencil_VisibleRectangle- Axis-aligned rectangle fit in visible region. 4x vertices: TopLeft, TopRight, BottomRight, BottomLeft.
-
ovrFovStencilFlag_MeshOriginAtBottomLeft
Flags used byOVRFovStencilDescand which are passed toGetFovStencil. (ovrFovStencilFlagsEnum values:
FovStencilFlag_MeshOriginAtBottomLeft- When used, flips the Y component of the provided 2D mesh coordinates, such that Y increases upwards. When not used, places mesh origin at top-left where Y increases downwards.
-
ovrButton_A, ovrButton_B, ovrButton_RThumb, ovrButton_RShoulder, ovrButton_X, ovrButton_Y, ovrButton_LThumb, ovrButton_LShoulder, ovrButton_Up, ovrButton_Down, ovrButton_Left, ovrButton_Right, ovrButton_Enter, ovrButton_Back, ovrButton_VolUp, ovrButton_VolDown, ovrButton_Home, ovrButton_Private, ovrButton_RMask, ovrButton_LMask
Describes button input types.(ovrButton)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/Rightmap to both XBox D-Pad and directional buttons. TheovrButton_EnterandovrButton_Returnmap to Start and Back controller buttons, respectively.Enum values:
Button_A- A button on XBox controllers and right Touch controller. Select button on Oculus Remote.Button_B- B button on XBox controllers and right Touch controller. Back button on Oculus Remote.Button_RThumb- Right thumbstick on XBox controllers and Touch controllers. Not present on Oculus Remote.Button_RShoulder- Right shoulder button on XBox controllers. Not present on Touch controllers or Oculus Remote.Button_X- X button on XBox controllers and left Touch controller. Not present on Oculus Remote.Button_Y- Y button on XBox controllers and left Touch controller. Not present on Oculus Remote.Button_LThumb- Left thumbstick on XBox controllers and Touch controllers. Not present on Oculus Remote.Button_LShoulder- Left shoulder button on XBox controllers. Not present on Touch controllers or Oculus Remote.Button_Up- Up button on XBox controllers and Oculus Remote. Not present on Touch controllers.Button_Down- Down button on XBox controllers and Oculus Remote. Not present on Touch controllers.Button_Left- Left button on XBox controllers and Oculus Remote. Not present on Touch controllers.Button_Right- Right button on XBox controllers and Oculus Remote. Not present on Touch controllers.Button_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.Button_Back- Back on Xbox 360 controller. View button on XBox One controller. Not present on Touch controllers or Oculus Remote.Button_VolUp- Volume button on Oculus Remote. Not present on XBox or Touch controllers.Button_VolDown- Volume button on Oculus Remote. Not present on XBox or Touch controllers.Button_Home- Home button on XBox controllers. Oculus button on Touch controllers and Oculus Remote.Button_Private- Bit mask of all buttons that are for private usage by OculusButton_RMask- Bit mask of all buttons on the right Touch controllerButton_LMask- Bit mask of all buttons on the left Touch controller
-
ovrTouch_A, ovrTouch_B, ovrTouch_RThumb, ovrTouch_RThumbRest, ovrTouch_RIndexTrigger, ovrTouch_RButtonMask, ovrTouch_X, ovrTouch_Y, ovrTouch_LThumb, ovrTouch_LThumbRest, ovrTouch_LIndexTrigger, ovrTouch_LButtonMask, ovrTouch_RIndexPointing, ovrTouch_RThumbUp, ovrTouch_LIndexPointing, ovrTouch_LThumbUp, ovrTouch_RPoseMask, ovrTouch_LPoseMask
Describes touch input types. (ovrTouch)These values map to capacitive touch values reported
OVRInputState::Touch. Some of these values are mapped to button bits for consistency.Enum values:
Touch_A- Touch ATouch_B- Touch BTouch_RThumb- Touch RThumbTouch_RThumbRest- Touch RThumbRestTouch_RIndexTrigger- Touch RIndexTriggerTouch_RButtonMask- Bit mask of all the button touches on the right controllerTouch_X- Touch XTouch_Y- Touch YTouch_LThumb- Touch LThumbTouch_LThumbRest- Touch LThumbRestTouch_LIndexTrigger- Touch LIndexTriggerTouch_LButtonMask- Bit mask of all the button touches on the left controllerTouch_RIndexPointing- TouchRIndexPointingTouch_RThumbUp- Touch RThumbUpTouch_LIndexPointing- Touch LIndexPointingTouch_LThumbUp- Touch LThumbUpTouch_RPoseMask- Bit mask of all right controller posesTouch_LPoseMask- Bit mask of all left controller poses.
-
ovrControllerType_None, ovrControllerType_LTouch, ovrControllerType_RTouch, ovrControllerType_Touch, ovrControllerType_Remote, ovrControllerType_XBox, ovrControllerType_Object0, ovrControllerType_Object1, ovrControllerType_Object2, ovrControllerType_Object3, ovrControllerType_Active
Which controller is connected; multiple can be connected at once. (ovrControllerType)Enum values:
ControllerType_NoneControllerType_LTouchControllerType_RTouchControllerType_TouchControllerType_RemoteControllerType_XBoxControllerType_Object0ControllerType_Object1ControllerType_Object2ControllerType_Object3ControllerType_Active- Operate on or query whichever controller is active.
-
ovrHapticsBufferSubmit_Enqueue
Haptics buffer submit mode. (ovrHapticsBufferSubmitMode)Enum values:
HapticsBufferSubmit_Enqueue- Enqueue buffer for later playback
-
ovrTrackedDevice_None, ovrTrackedDevice_HMD, ovrTrackedDevice_LTouch, ovrTrackedDevice_RTouch, ovrTrackedDevice_Touch, ovrTrackedDevice_Object0, ovrTrackedDevice_Object1, ovrTrackedDevice_Object2, ovrTrackedDevice_Object3, ovrTrackedDevice_All
Position tracked devices. (ovrTrackedDeviceType)Enum values:
-
ovrCameraStatus_None, ovrCameraStatus_Connected, ovrCameraStatus_Calibrating, ovrCameraStatus_CalibrationFailed, ovrCameraStatus_Calibrated, ovrCameraStatus_Capturing
Camera status flags. (ovrCameraStatusFlags)Enum values:
CameraStatus_None- Initial state of camera.CameraStatus_Connected- Bit set when the camera is connected to the system.CameraStatus_Calibrating- Bit set when the camera is undergoing calibration.CameraStatus_CalibrationFailed- Bit set when the camera has tried & failed calibration.CameraStatus_Calibrated- Bit set when the camera has tried & passed calibration.CameraStatus_Capturing- Bit set when the camera is capturing.
-
ovrBoundary_Outer, ovrBoundary_PlayArea
Boundary types that specified while using the boundary system. (ovrBoundaryType)Enum values:
Boundary_Outer- Outer boundary - closely represents user setup wallsBoundary_PlayArea- Play area - safe rectangular area inside outer boundary which can optionally be used to restrict user interactions and motion.
-
ovrHand_Left, ovrHand_Right, ovrHand_Count
Names for the left and right hand array indexes. (ovrHandType)Enum values:
-
ovrMaxProvidedFrameStats
Enum values:
MaxProvidedFrameStats- Maximum number of frames of performance stats provided back to the caller ofGetPerfStats.
-
OVR_HAPTICS_BUFFER_SAMPLES_MAX
Maximum number of samples inOVRHapticsBuffer.
-
OVR_MAX_EXTERNAL_CAMERA_COUNT, OVR_EXTERNAL_CAMERA_NAME_SIZE
External camera constants
-
ovrMaxLayerCount
Specifies the maximum number of layers supported bySubmitFrame.
-
ovrLayerType_Disabled, ovrLayerType_EyeFov, ovrLayerType_EyeFovDepth, ovrLayerType_Quad, ovrLayerType_EyeMatrix, ovrLayerType_EyeFovMultires, ovrLayerType_Cylinder, ovrLayerType_Cube
Describes layer types that can be passed toSubmitFrame. (ovrLayerType)Each layer type has an associated struct, such as
OVRLayerEyeFov.Enum values:
LayerType_Disabled- Layer is disabled.LayerType_EyeFov- Described byOVRLayerEyeFov.LayerType_EyeFovDepth- Described byOVRLayerEyeFovDepth.LayerType_Quad- Described byOVRLayerQuad.LayerType_EyeMatrix- Described byOVRLayerEyeMatrix.LayerType_EyeFovMultires- Described byOVRLayerEyeFovMultires.LayerType_Cylinder- Described byOVRLayerCylinder.LayerType_Cube- Described byOVRLayerCube.
-
ovrLayerFlag_HighQuality, ovrLayerFlag_TextureOriginAtBottomLeft, ovrLayerFlag_HeadLocked
Identifies flags used byOVRLayerHeaderand which are passed toSubmitFrame. (ovrLayerFlags)Enum values:
LayerFlag_HighQuality- Enables 4x anisotropic sampling during the composition of the layer. The benefits are mostly visible at the periphery for high-frequency & high-contrast visuals. For best results consider combining this flag with anovrTextureSwapChainthat has mipmaps and instead of using arbitrary sized textures, prefer texture sizes that are powers-of-two. Actual rendered viewport and doesn't necessarily have to fill the whole texture.LayerFlag_TextureOriginAtBottomLeft- the opposite is TopLeft. Generally this is false for D3D, true for OpenGL.LayerFlag_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. What used to beovrLayerType_QuadHeadLockedis nowLayerType_Quadplus this flag. However the flag can be applied to any layer type to achieve a similar effect.
-
ovrTextureLayout_Rectilinear, ovrTextureLayout_Octilinear
Describes eye texture layouts. Used withOVRLayerEyeFovMultires. (ovrTextureLayout)Enum values:
TextureLayout_Rectilinear- Regular eyeFov layer.TextureLayout_Octilinear- Octilinear extension must be enabled.
-
ovrPerfHud_Off, ovrPerfHud_PerfSummary, ovrPerfHud_LatencyTiming, ovrPerfHud_AppRenderTiming, ovrPerfHud_CompRenderTiming, ovrPerfHud_AwsStats, ovrPerfHud_VersionInfo
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.App can toggle performance HUD modes as such:
ovrPerfHudMode PerfHudMode = ovrPerfHud_LatencyTiming; ovr_SetInt(session, OVR_PERF_HUD_MODE, (int)PerfHudMode);Enum values:
PerfHud_Off- Turns off the performance HUDPerfHud_PerfSummary- Shows performance summary and headroomPerfHud_LatencyTiming- Shows latency related timing infoPerfHud_AppRenderTiming- Shows render timing info for applicationPerfHud_CompRenderTiming- Shows render timing info for OVR compositorPerfHud_AwsStats- Shows Async Spacewarp-specific infoPerfHud_VersionInfo- Shows SDK & HMD version Info
-
ovrLayerHud_Off, ovrLayerHud_Info
Layer HUD enables the HMD user to see information about a layer.App can toggle layer HUD modes as such:
ovrLayerHudMode LayerHudMode = ovrLayerHud_Info; ovr_SetInt(Hmd, OVR_LAYER_HUD_MODE, (int)LayerHudMode);Enum values:
LayerHud_Off- Turns off the layer HUDLayerHud_Info- Shows info about a specific layer
-
ovrDebugHudStereo_Off, ovrDebugHudStereo_Quad, ovrDebugHudStereo_QuadWithCrosshair, ovrDebugHudStereo_CrosshairAtInfinity
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.App can toggle the debug HUD modes as such:
ovrDebugHudStereoMode DebugHudMode = ovrDebugHudStereo_QuadWithCrosshair; ovr_SetInt(session, OVR_DEBUG_HUD_STEREO_MODE, (int)DebugHudMode);The app can modify the visual properties of the stereo guide (i.e. quad, crosshair) using the
SetFloatArrayfunction. For a list of tweakable properties, see theOVR_DEBUG_HUD_STEREO_GUIDE_*keys inOVRKeys.Enum values:
DebugHudStereo_Off- Turns off the Stereo Debug HUDDebugHudStereo_Quad- Renders Quad in world for Stereo DebuggingDebugHudStereo_QuadWithCrosshair- Renders Quad+crosshair in world for Stereo DebuggingDebugHudStereo_CrosshairAtInfinity- Renders screen-space crosshair at infinity for Stereo Debugging
-
-
Method Detail
-
novr_Initialize
public static int novr_Initialize(long params)
Unsafe version of:Initialize
-
ovr_Initialize
public static int ovr_Initialize(@Nullable OVRInitParams params)Initialize LibOVR for application usage. This includes finding and loading the LibOVRRT shared library. No LibOVR API functions, other thanGetLastErrorInfoand_Detect, can be called unlessInitializesucceeds. A successful call toovr_Initializemust be eventually followed by a call toShutdown.ovr_Initializecalls are idempotent. Callingovr_Initializetwice does not require two matching calls toovr_Shutdown. If already initialized, the return value isSuccess.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 directory
- Development directory (only if OVR_ENABLE_DEVELOPER_SEARCH is enabled, which is off by default).
- Standard OS shared library search location(s) (OS-specific).
- Parameters:
params- specifies custom initialization options. May beNULLto indicate default options when using the CAPI shim. If you are directly calling the LibOVRRT version ofovr_Initializein the LibOVRRT DLL then this must be valid and includeInit_RequestVersion.- Returns:
- an
ovrResultindicating success or failure. In the case of failure, useGetLastErrorInfoto get more information. Example failed results include:Error_Initialize: Generic initialization error.Error_LibLoad: Couldn't load LibOVRRT.Error_LibVersion: LibOVRRT version incompatibility.Error_ServiceConnection: Couldn't connect to the OVR Service.Error_ServiceVersion: OVR Service version incompatibility.Error_IncompatibleOS: The operating system version is incompatible.Error_DisplayInit: Unable to initialize the HMD display.Error_ServerStart: Unable to start the server. Is it already running?Error_Reinitialization: Attempted to re-initialize with a different version.
-
ovr_Shutdown
public static void ovr_Shutdown()
Shuts down LibOVR.A successful call to
Initializemust be eventually matched by a call toovr_Shutdown. After callingovr_Shutdown, no LibOVR functions can be called exceptGetLastErrorInfoor anotherInitialize.ovr_Shutdowninvalidates all pointers, references, and created objects previously returned by LibOVR functions. The LibOVRRT shared library can be unloaded byovr_Shutdown.
-
novr_GetLastErrorInfo
public static void novr_GetLastErrorInfo(long errorInfo)
Unsafe version of:GetLastErrorInfo
-
ovr_GetLastErrorInfo
public static 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,GetLastErrorInfoshould be called immediately after an API function that returned a failedovrResult, with no other API functions called in the interim.- Parameters:
errorInfo- The lastOVRErrorInfofor the current thread
-
novr_GetVersionString
public static long novr_GetVersionString()
Unsafe version of:GetVersionString
-
ovr_GetVersionString
public static java.lang.String ovr_GetVersionString()
Returns the version string representing the LibOVRRT version.The returned string pointer is valid until the next call to
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
-
novr_TraceMessage
public static int novr_TraceMessage(int level, long message)Unsafe version of:TraceMessage
-
ovr_TraceMessage
public static int ovr_TraceMessage(int level, java.nio.ByteBuffer message) public static int ovr_TraceMessage(int level, java.lang.CharSequence message)Writes a message string to the LibOVR tracing mechanism (if enabled).This message will be passed back to the application via the
OVRLogCallbackif it was registered.- Parameters:
level- anovrLogLevelconstant. One of:LogLevel_DebugLogLevel_InfoLogLevel_Errormessage- a UTF8-encoded null-terminated string- Returns:
- the
strlenof the message or a negative value if the message is too large
-
novr_IdentifyClient
public static int novr_IdentifyClient(long identity)
Unsafe version of:IdentifyClient
-
ovr_IdentifyClient
public static int ovr_IdentifyClient(java.nio.ByteBuffer identity) public static int ovr_IdentifyClient(java.lang.CharSequence identity)
Identifies 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
Initializeand before the first call toCreate. Each value is limited to 20 characters. Key names such as 'EngineName:', 'EngineVersion:' do not count towards this limit.EngineName: %s\n EngineVersion: %s\n EnginePluginName: %s\n EnginePluginVersion: %s\n EngineEditor: <boolean> ('true' or 'false')\nExample code:
ovr_IdentifyClient( "EngineName: Unity\n" + "EngineVersion: 5.3.3\n" + "EnginePluginName: OVRPlugin\n" + "EnginePluginVersion: 1.2.0\n" + "EngineEditor: true");- Parameters:
identity- specifies one or more newline-delimited lines of optional info
-
novr_GetHmdDesc
public static void novr_GetHmdDesc(long session, long __result)Unsafe version of:GetHmdDesc
-
ovr_GetHmdDesc
public static OVRHmdDesc ovr_GetHmdDesc(long session, OVRHmdDesc __result)
Returns information about the current HMD.Initializemust be called prior to calling this function, otherwiseovrHmdDesc::Typewill be set toHmd_Nonewithout checking for the HMD presence.For newer headsets being used on a game built against an old SDK version, we may return the
ovrHmdTypeasHmd_CV1for backwards compatibility.- Parameters:
session- anovrSessionpreviously returned byCreateorNULL__result- anOVRHmdDesc. If invoked withNULLsession argument,ovrHmdDesc::TypetoHmd_Noneindicates that the HMD is not connected.
-
novr_GetTrackerCount
public static int novr_GetTrackerCount(long session)
Unsafe version of:GetTrackerCount
-
ovr_GetTrackerCount
public static int ovr_GetTrackerCount(long 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.
For newer headsets being used on a game built against an old SDK version, we may simulate three CV1 trackers to maintain backwards compatibility.
- Parameters:
session- anovrSessionpreviously returned byCreate
-
novr_GetTrackerDesc
public static void novr_GetTrackerDesc(long session, int trackerDescIndex, long __result)Unsafe version of:GetTrackerDesc
-
ovr_GetTrackerDesc
public static OVRTrackerDesc ovr_GetTrackerDesc(long session, int trackerDescIndex, OVRTrackerDesc __result)
Returns a given attached tracker description.Initializemust have first been called in order for this to succeed, otherwise the returnedtrackerDescArraywill be zero-initialized. The data returned by this function can change at runtime.For newer headsets being used on a game built against an old SDK version, we may simulate three CV1 trackers to maintain backwards compatibility.
- Parameters:
session- anovrSessionpreviously returned byCreatetrackerDescIndex- a tracker index. The valid indexes are in the range of 0 to the tracker count returned byGetTrackerCount.__result- anOVRTrackerDesc. An emptyOVRTrackerDescwill be returned iftrackerDescIndexis out of range.
-
novr_Create
public static int novr_Create(long pSession, long pLuid)Unsafe version of:Create
-
ovr_Create
public static int ovr_Create(org.lwjgl.PointerBuffer pSession, OVRGraphicsLuid pLuid)Creates a handle to a VR session.Upon success the returned
ovrSessionmust be eventually freed withDestroywhen it is no longer needed. A second call toCreatewill result in an error return value if the previous session has not been destroyed.- Parameters:
pSession- a pointer to anovrSessionwhich will be written to upon successpLuid- 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
ovrResultindicating success or failure. Upon failure the returnedovrSessionwill beNULL.
-
novr_Destroy
public static void novr_Destroy(long session)
Unsafe version of:Destroy
-
ovr_Destroy
public static void ovr_Destroy(long session)
Destroys the session.- Parameters:
session- anovrSessionpreviously returned byCreate
-
novr_GetSessionStatus
public static int novr_GetSessionStatus(long session, long sessionStatus)Unsafe version of:GetSessionStatus
-
ovr_GetSessionStatus
public static int ovr_GetSessionStatus(long session, OVRSessionStatus sessionStatus)Returns status information for the application.- Parameters:
session- anovrSessionpreviously returned byCreatesessionStatus- anOVRSessionStatusthat is filled in
-
novr_IsExtensionSupported
public static int novr_IsExtensionSupported(long session, int extension, long outExtensionSupported)Unsafe version of:IsExtensionSupported
-
ovr_IsExtensionSupported
public static int ovr_IsExtensionSupported(long session, int extension, java.nio.ByteBuffer outExtensionSupported)Queries extension support status.- Parameters:
session- anovrSessionpreviously returned byCreateextension- extension to queryoutExtensionSupported- set to extension support status.Trueif supported.- Returns:
- an
ovrResultindicating success or failure. In the case of failure useGetLastErrorInfoto get more information.
-
novr_EnableExtension
public static int novr_EnableExtension(long session, int extension)Unsafe version of:EnableExtension
-
ovr_EnableExtension
public static int ovr_EnableExtension(long session, int extension)Enable extension. Extensions must be enabled afterCreateis called.- Parameters:
session- anovrSessionpreviously returned byCreateextension- extension to enable.- Returns:
- an
ovrResultindicating success or failure. Extension is only enabled if successful. In the case of failure useGetLastErrorInfoto get more information.
-
novr_SetTrackingOriginType
public static int novr_SetTrackingOriginType(long session, int origin)Unsafe version of:SetTrackingOriginType
-
ovr_SetTrackingOriginType
public static int ovr_SetTrackingOriginType(long session, int 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.
-
novr_GetTrackingOriginType
public static int novr_GetTrackingOriginType(long session)
Unsafe version of:GetTrackingOriginType
-
ovr_GetTrackingOriginType
public static int ovr_GetTrackingOriginType(long session)
Gets the tracking origin state.- Parameters:
session- anovrSessionpreviously returned byCreate
-
novr_RecenterTrackingOrigin
public static int novr_RecenterTrackingOrigin(long session)
Unsafe version of:RecenterTrackingOrigin
-
ovr_RecenterTrackingOrigin
public static int ovr_RecenterTrackingOrigin(long 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
SpecifyTrackingOrigininstead.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
ovrTrackerPosesthen you will need to callGetTrackerPoseafter 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
Error_InvalidHeadsetOrientation.For more info, see the notes on each
ovrTrackingOriginenumeration to understand how recenter will vary slightly in its behavior based on the currentovrTrackingOriginsetting.- Parameters:
session- anovrSessionpreviously returned byCreate
-
novr_SpecifyTrackingOrigin
public static int novr_SpecifyTrackingOrigin(long session, long originPose)Unsafe version of:SpecifyTrackingOrigin
-
ovr_SpecifyTrackingOrigin
public static int ovr_SpecifyTrackingOrigin(long session, OVRPosef originPose)Allows manually tweaking the sensor position and orientation.This function is similar to
RecenterTrackingOriginin 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_RecenterTrackingOriginresets the tracking origin in reference to the HMD's current pose,ovr_SpecifyTrackingOriginallows 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
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
ovrTrackerPosesthen you will need to callGetTrackerPoseafter this, because the sensor position(s) will change as a result of this.For more info, see the notes on each
ovrTrackingOriginenumeration to understand how recenter will vary slightly in its behavior based on the currentovrTrackingOriginsetting.- Parameters:
session- anovrSessionpreviously returned byCreateoriginPose- specifies a pose that will be used to transform the current tracking origin
-
novr_ClearShouldRecenterFlag
public static void novr_ClearShouldRecenterFlag(long session)
Unsafe version of:ClearShouldRecenterFlag
-
ovr_ClearShouldRecenterFlag
public static void ovr_ClearShouldRecenterFlag(long session)
Clears theShouldRecenterstatus bit inOVRSessionStatus.Clears the
ShouldRecenterstatus bit inOVRSessionStatus, allowing further recenter requests to be detected. Since this is automatically done byRecenterTrackingOriginandSpecifyTrackingOrigin, this function only needs to be called when application is doing its own re-centering logic.- Parameters:
session- anovrSessionpreviously returned byCreate
-
novr_GetTrackingState
public static void novr_GetTrackingState(long session, double absTime, boolean latencyMarker, long __result)Unsafe version of:GetTrackingState
-
ovr_GetTrackingState
public static OVRTrackingState ovr_GetTrackingState(long session, double absTime, boolean latencyMarker, OVRTrackingState __result)
Returns tracking state reading based on the specified absolute system time.Pass an
absTimevalue of 0.0 to request the most recent sensor reading. In this case bothPredictedPoseandSamplePosewill 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.
- Parameters:
session- anovrSessionpreviously returned byCreateabsTime- the absolute future time to predict the returnOVRTrackingStatevalue. 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 givenovrLayerprovides "SensorSampleTime", that will override the value stored here.__result- theOVRTrackingStatethat is predicted for the givenabsTime
-
novr_GetDevicePoses
public static int novr_GetDevicePoses(long session, long deviceTypes, int deviceCount, double absTime, long outDevicePoses)Unsafe version of:GetDevicePoses- Parameters:
deviceCount- number of queried poses. This number must match the length of theoutDevicePosesanddeviceTypesarray.
-
ovr_GetDevicePoses
public static int ovr_GetDevicePoses(long session, java.nio.IntBuffer deviceTypes, double absTime, OVRPoseStatef.Buffer outDevicePoses)Returns an array of poses, where each pose matches a device type provided by thedeviceTypesarray 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].- Parameters:
session- anovrSessionpreviously returned byCreatedeviceTypes- array of device types to query for their posesabsTime- specifies the absolute future time to predict the returnovrTrackingStatevalue. Use 0 to request the most recent tracking state.outDevicePoses- array of poses, one for each device type indeviceTypesarrays- Returns:
- an
ovrResultfor whichOVR_SUCCESS(result)is false upon error and true upon success
-
novr_GetTrackerPose
public static void novr_GetTrackerPose(long session, int trackerPoseIndex, long __result)Unsafe version of:GetTrackerPose
-
ovr_GetTrackerPose
public static OVRTrackerPose ovr_GetTrackerPose(long session, int trackerPoseIndex, OVRTrackerPose __result)
Returns theOVRTrackerPosefor the given attached tracker.For newer headsets being used on a game built against an old SDK version, we may simulate three CV1 trackers to maintain backwards compatibility.
- Parameters:
session- anovrSessionpreviously returned byCreatetrackerPoseIndex- index of the tracker being requested.
-
novr_GetInputState
public static int novr_GetInputState(long session, int controllerType, long inputState)Unsafe version of:GetInputState
-
ovr_GetInputState
public static int ovr_GetInputState(long session, int controllerType, OVRInputState inputState)Returns the most recent input state for controllers, without positional tracking info. Developers can tell whether the same state was returned by checking thePacketNumber.
-
novr_GetConnectedControllerTypes
public static int novr_GetConnectedControllerTypes(long session)
Unsafe version of:GetConnectedControllerTypes
-
ovr_GetConnectedControllerTypes
public static int ovr_GetConnectedControllerTypes(long session)
Returns controller types connected to the system OR'ed together.- Parameters:
session- anovrSessionpreviously returned byCreate
-
novr_GetTouchHapticsDesc
public static void novr_GetTouchHapticsDesc(long session, int controllerType, long __result)Unsafe version of:GetTouchHapticsDesc
-
ovr_GetTouchHapticsDesc
public static OVRTouchHapticsDesc ovr_GetTouchHapticsDesc(long session, int controllerType, OVRTouchHapticsDesc __result)
Gets information about Haptics engine for the specified Touch controller.- Parameters:
session- anovrSessionpreviously returned byCreatecontrollerType- the controller to retrieve the information from__result- anOVRTouchHapticsDesc
-
novr_SetControllerVibration
public static int novr_SetControllerVibration(long session, int controllerType, float frequency, float amplitude)Unsafe version of:SetControllerVibration
-
ovr_SetControllerVibration
public static int ovr_SetControllerVibration(long session, int controllerType, float frequency, float amplitude)Sets constant vibration (with specified frequency and amplitude) to a controller.Note:
ovr_SetControllerVibrationcannot be used interchangeably withSubmitControllerVibration.This method should be called periodically, vibration lasts for a maximum of 2.5 seconds.
- Parameters:
session- anovrSessionpreviously returned byCreatecontrollerType- the controller to set the vibration tofrequency- the vibration frequency. Supported values are: 0.0 (disabled), 0.5 and 1.0. Non valid values will be clamped.amplitude- the vibration amplitude in the[0.0, 1.0]range- Returns:
- an
ovrResultfor whichOVR_SUCCESS(result)is false upon error and true upon success. Return values include but aren't limited to:Success: The call succeeded and a result was returned.Success_DeviceUnavailable: The call succeeded but the device referred to bycontrollerTypeis not available.
-
novr_SubmitControllerVibration
public static int novr_SubmitControllerVibration(long session, int controllerType, long buffer)Unsafe version of:SubmitControllerVibration
-
ovr_SubmitControllerVibration
public static int ovr_SubmitControllerVibration(long session, int controllerType, OVRHapticsBuffer buffer)Submits a Haptics buffer (used for vibration) to Touch (only) controllers.Note:
ovr_SubmitControllerVibrationcannot be used interchangeably withSetControllerVibration.- Parameters:
session- anovrSessionpreviously returned byCreatecontrollerType- the controller where the Haptics buffer will be playedbuffer- the Haptics buffer containing amplitude samples to be played- Returns:
- an
ovrResultfor whichOVR_SUCCESS(result)is false upon error and true upon success. Return values include but aren't limited to:Success: The call succeeded and a result was returned.Success_DeviceUnavailable: The call succeeded but the device referred to bycontrollerTypeis not available.
-
novr_GetControllerVibrationState
public static int novr_GetControllerVibrationState(long session, int controllerType, long outState)Unsafe version of:GetControllerVibrationState
-
ovr_GetControllerVibrationState
public static int ovr_GetControllerVibrationState(long session, int controllerType, OVRHapticsPlaybackState outState)Gets the Haptics engine playback state of a specific Touch controller.- Parameters:
session- anovrSessionpreviously returned byCreatecontrollerType- the controller where the Haptics buffer will be playedoutState- the state of the haptics engine- Returns:
- an
ovrResultfor whichOVR_SUCCESS(result)is false upon error and true upon success. Return values include but aren't limited to:Success: The call succeeded and a result was returned.Success_DeviceUnavailable: The call succeeded but the device referred to bycontrollerTypeis not available.
-
novr_TestBoundary
public static int novr_TestBoundary(long session, int deviceBitmask, int boundaryType, long outTestResult)Unsafe version of:TestBoundary
-
ovr_TestBoundary
public static int ovr_TestBoundary(long session, int deviceBitmask, int 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
TestBoundaryPointbut can be more precise as it may take into account device acceleration/momentum.- Parameters:
session- anovrSessionpreviously returned byCreatedeviceBitmask- bitmask of one or more tracked devices to test. One or more of:TrackedDevice_NoneTrackedDevice_HMDTrackedDevice_LTouchTrackedDevice_RTouchTrackedDevice_TouchTrackedDevice_Object0TrackedDevice_Object1TrackedDevice_Object2TrackedDevice_Object3TrackedDevice_AllboundaryType- the boundary type. One of:Boundary_OuterBoundary_PlayAreaoutTestResult- result of collision/proximity test, contains information such as distance and closest point- Returns:
- an
ovrResultfor whichOVR_SUCCESS(result)is false upon error and true upon success. Return values include but aren't limited to:Success: The call succeeded and a result was returned.Success_BoundaryInvalid: The call succeeded but the result is not a valid boundary due to not being set up.Success_DeviceUnavailable: The call succeeded but the device referred to bydeviceBitmaskis not available.
-
novr_TestBoundaryPoint
public static int novr_TestBoundaryPoint(long session, long point, int singleBoundaryType, long outTestResult)Unsafe version of:TestBoundaryPoint
-
ovr_TestBoundaryPoint
public static int ovr_TestBoundaryPoint(long session, OVRVector3f point, int singleBoundaryType, OVRBoundaryTestResult outTestResult)Tests collision/proximity of a 3D point against the Boundary System.- Parameters:
session- anovrSessionpreviously returned byCreatepoint- the 3D point to testsingleBoundaryType- the boundary type. One of:Boundary_OuterBoundary_PlayAreaoutTestResult- result of collision/proximity test, contains information such as distance and closest point- Returns:
- an
ovrResultfor whichOVR_SUCCESS(result)is false upon error and true upon success. Return values include but aren't limited to:Success: The call succeeded and a result was returned.Success_BoundaryInvalid: The call succeeded but the result is not a valid boundary due to not being set up.
-
novr_SetBoundaryLookAndFeel
public static int novr_SetBoundaryLookAndFeel(long session, long lookAndFeel)Unsafe version of:SetBoundaryLookAndFeel
-
ovr_SetBoundaryLookAndFeel
public static int ovr_SetBoundaryLookAndFeel(long session, OVRBoundaryLookAndFeel lookAndFeel)Sets the look and feel of the Boundary System.
-
novr_ResetBoundaryLookAndFeel
public static int novr_ResetBoundaryLookAndFeel(long session)
Unsafe version of:ResetBoundaryLookAndFeel
-
ovr_ResetBoundaryLookAndFeel
public static int ovr_ResetBoundaryLookAndFeel(long session)
Resets the look and feel of the Boundary System to its default state.
-
novr_GetBoundaryGeometry
public static int novr_GetBoundaryGeometry(long session, int boundaryType, long outFloorPoints, long outFloorPointsCount)Unsafe version of:GetBoundaryGeometry
-
ovr_GetBoundaryGeometry
public static int ovr_GetBoundaryGeometry(long session, int boundaryType, @Nullable OVRVector3f outFloorPoints, @Nullable java.nio.IntBuffer outFloorPointsCount)Gets the geometry of the Boundary System's "play area" or "outer boundary" as 3D floor points.- Parameters:
session- anovrSessionpreviously returned byCreateboundaryType- the boundary type. One of:Boundary_OuterBoundary_PlayAreaoutFloorPoints- an array of 3D points (in clockwise order) defining the boundary at floor height (can beNULLto retrieve only the number of points)outFloorPointsCount- the number of 3D points returned in the array- Returns:
- an
ovrResultfor whichOVR_SUCCESS(result)is false upon error and true upon success. Return values include but aren't limited to:Success: The call succeeded and a result was returned.Success_BoundaryInvalid: The call succeeded but the result is not a valid boundary due to not being set up.
-
novr_GetBoundaryDimensions
public static int novr_GetBoundaryDimensions(long session, int boundaryType, long outDimensions)Unsafe version of:GetBoundaryDimensions
-
ovr_GetBoundaryDimensions
public static int ovr_GetBoundaryDimensions(long session, int boundaryType, OVRVector3f outDimensions)Gets the dimension of the Boundary System's "play area" or "outer boundary".- Parameters:
session- anovrSessionpreviously returned byCreateboundaryType- the boundary type. One of:Boundary_OuterBoundary_PlayAreaoutDimensions- dimensions of the axis aligned bounding box that encloses the area in meters (width, height and length)- Returns:
- an
ovrResultfor whichOVR_SUCCESS(result)is false upon error and true upon success. Return values include but aren't limited to:Success: The call succeeded and a result was returned.Success_BoundaryInvalid: The call succeeded but the result is not a valid boundary due to not being set up.
-
novr_GetBoundaryVisible
public static int novr_GetBoundaryVisible(long session, long outIsVisible)Unsafe version of:GetBoundaryVisible
-
ovr_GetBoundaryVisible
public static int ovr_GetBoundaryVisible(long session, java.nio.ByteBuffer 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.
- Parameters:
session- anovrSessionpreviously returned byCreateoutIsVisible-True, if the boundary is visible- Returns:
- an
ovrResultfor whichOVR_SUCCESS(result)is false upon error and true upon success. Return values include but aren't limited to:Success: The call succeeded and a result was returned.Success_BoundaryInvalid: The call succeeded but the result is not a valid boundary due to not being set up.
-
novr_RequestBoundaryVisible
public static int novr_RequestBoundaryVisible(long session, boolean visible)Unsafe version of:RequestBoundaryVisible
-
ovr_RequestBoundaryVisible
public static int ovr_RequestBoundaryVisible(long session, boolean visible)Requests boundary to be visible.
-
novr_GetExternalCameras
public static int novr_GetExternalCameras(long session, long cameras, long inoutCameraCount)Unsafe version of:GetExternalCameras- Parameters:
inoutCameraCount- supply the array capacity, will return the actual \\# of cameras defined. If*inoutCameraCountis too small, will returnError_InsufficientArraySize.
-
ovr_GetExternalCameras
public static int ovr_GetExternalCameras(long session, @Nullable OVRExternalCamera.Buffer cameras, java.nio.IntBuffer inoutCameraCount)Returns the number of camera properties of all cameras- Parameters:
session- anovrSessionpreviously returned byCreatecameras- pointer to the array. If null and the provided array capacity is sufficient, will returnovrError_NullArrayPointer.inoutCameraCount- supply the array capacity, will return the actual \\# of cameras defined. If*inoutCameraCountis too small, will returnError_InsufficientArraySize.- Returns:
- the list of external cameras the system knows about. Returns
Error_NoExternalCameraInfoif there is not any external camera information.
-
novr_SetExternalCameraProperties
public static int novr_SetExternalCameraProperties(long session, long name, long intrinsics, long extrinsics)Unsafe version of:SetExternalCameraProperties
-
ovr_SetExternalCameraProperties
public static int ovr_SetExternalCameraProperties(long session, java.nio.ByteBuffer name, OVRCameraIntrinsics intrinsics, OVRCameraExtrinsics extrinsics) public static int ovr_SetExternalCameraProperties(long session, java.lang.CharSequence name, OVRCameraIntrinsics intrinsics, OVRCameraExtrinsics extrinsics)Sets the camera intrinsics and/or extrinsics stored for thecameraNamecamera.Names must be < 32 characters and null-terminated.
- Parameters:
session- anovrSessionpreviously returned byCreatename- specifies which camera to set the intrinsics or extrinsics for. The name must be at mostOVR_EXTERNAL_CAMERA_NAME_SIZE- 1 characters. Otherwise,Error_ExternalCameraNameWrongSizeis returned.intrinsics- contains the intrinsic parameters to set, can be nullextrinsics- ontains the extrinsic parameters to set, can be null- Returns:
Successor anovrErrorcode
-
novr_GetTextureSwapChainLength
public static int novr_GetTextureSwapChainLength(long session, long chain, long out_Length)Unsafe version of:GetTextureSwapChainLength
-
ovr_GetTextureSwapChainLength
public static int ovr_GetTextureSwapChainLength(long session, long chain, java.nio.IntBuffer out_Length)Gets the number of buffers in anovrTextureSwapChain.- Parameters:
session- anovrSessionpreviously returned byCreatechain- theovrTextureSwapChainfor which the length should be retrievedout_Length- returns the number of buffers in the specified chain
-
novr_GetTextureSwapChainCurrentIndex
public static int novr_GetTextureSwapChainCurrentIndex(long session, long chain, long out_Index)Unsafe version of:GetTextureSwapChainCurrentIndex
-
ovr_GetTextureSwapChainCurrentIndex
public static int ovr_GetTextureSwapChainCurrentIndex(long session, long chain, java.nio.IntBuffer out_Index)Gets the current index in anovrTextureSwapChain.- Parameters:
session- anovrSessionpreviously returned byCreatechain- theovrTextureSwapChainfor which the index should be retrievedout_Index- returns the current (free) index in specified chain
-
novr_GetTextureSwapChainDesc
public static int novr_GetTextureSwapChainDesc(long session, long chain, long out_Desc)Unsafe version of:GetTextureSwapChainDesc
-
ovr_GetTextureSwapChainDesc
public static int ovr_GetTextureSwapChainDesc(long session, long chain, OVRTextureSwapChainDesc out_Desc)Gets the description of the buffers in anovrTextureSwapChain.- Parameters:
session- anovrSessionpreviously returned byCreatechain- theovrTextureSwapChainfor which the description should be retrievedout_Desc- returns the description of the specified chain
-
novr_CommitTextureSwapChain
public static int novr_CommitTextureSwapChain(long session, long chain)Unsafe version of:CommitTextureSwapChain
-
ovr_CommitTextureSwapChain
public static int ovr_CommitTextureSwapChain(long session, long chain)Commits any pending changes to anovrTextureSwapChain, and advances its current index.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.
- Parameters:
session- anovrSessionpreviously returned byCreatechain- theovrTextureSwapChainto commit
-
novr_DestroyTextureSwapChain
public static void novr_DestroyTextureSwapChain(long session, long chain)Unsafe version of:DestroyTextureSwapChain
-
ovr_DestroyTextureSwapChain
public static void ovr_DestroyTextureSwapChain(long session, long chain)Destroys anovrTextureSwapChainand frees all the resources associated with it.- Parameters:
session- anovrSessionpreviously returned byCreatechain- theovrTextureSwapChainto destroy. If it isNULLthen this function has no effect.
-
novr_DestroyMirrorTexture
public static void novr_DestroyMirrorTexture(long session, long mirrorTexture)Unsafe version of:DestroyMirrorTexture
-
ovr_DestroyMirrorTexture
public static void ovr_DestroyMirrorTexture(long session, long mirrorTexture)Destroys a mirror texture previously created by one of the mirror texture creation functions.- Parameters:
session- anovrSessionpreviously returned byCreatemirrorTexture- theovrTextureto destroy. If it isNULLthen this function has no effect.
-
novr_GetFovTextureSize
public static void novr_GetFovTextureSize(long session, int eye, long fov, float pixelsPerDisplayPixel, long __result)Unsafe version of:GetFovTextureSize
-
ovr_GetFovTextureSize
public static OVRSizei ovr_GetFovTextureSize(long session, int eye, OVRFovPort fov, float pixelsPerDisplayPixel, OVRSizei __result)
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.
Example code:
ovrHmdDesc hmdDesc = ovr_GetHmdDesc(session); ovrSizei eyeSizeLeft = ovr_GetFovTextureSize(session, ovrEye_Left, hmdDesc.DefaultEyeFov[ovrEye_Left], 1.0f); ovrSizei eyeSizeRight = ovr_GetFovTextureSize(session, ovrEye_Right, hmdDesc.DefaultEyeFov[ovrEye_Right], 1.0f);- Parameters:
session- anovrSessionpreviously returned byCreateeye- which eye (left or right) to calculate for. One of:Eye_LeftEye_Rightfov- theOVRFovPortto usepixelsPerDisplayPixel- 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.__result- the texture width and height size
-
novr_GetRenderDesc
public static void novr_GetRenderDesc(long session, int eyeType, long fov, long __result)Unsafe version of:GetRenderDesc
-
ovr_GetRenderDesc
public static OVREyeRenderDesc ovr_GetRenderDesc(long session, int eyeType, OVRFovPort fov, OVREyeRenderDesc __result)
Computes the distortion viewport, view adjust, and other rendering parameters for the specified eye.- Parameters:
session- anovrSessionpreviously returned byCreateeyeType- which eye (left or right) for which to perform calculations. One of:Eye_LeftEye_Rightfov- theOVRFovPortto use.__result- the computedOVREyeRenderDescfor the giveneyeTypeand field of view
-
novr_GetFovStencil
public static int novr_GetFovStencil(long session, long fovStencilDesc, long meshBuffer)Unsafe version of:GetFovStencil
-
ovr_GetFovStencil
public static int ovr_GetFovStencil(long session, OVRFovStencilDesc fovStencilDesc, OVRFovStencilMeshBuffer meshBuffer)Returns a viewport stencil mesh to be used for defining the area or outline the user can see through the lens on an area defined by a givenovrFovPort.To find out how big the vertex and index buffers in
meshBufferbuffer should be, first call this function settingAllocVertexCount&AllocIndexCountto 0 while also sending innullptrforVertexBuffer&IndexBuffer. The SDK will populateUsedVertexCount&UsedIndexCountvalues.If
Alloc*Countfields inmeshBufferare smaller than the expectedUsed*Countfields, (except when they are 0) then the SDK will returnError_InvalidParameterand leaveVertexBufferandIndexBufferuntouched.2D positions provided in the buffer will be in the
[0,1]range where Y increases downward, similar to texture-UV space. If Y coordinates need to be flipped upside down, use theFovStencilFlag_MeshOriginAtBottomLeft.- Parameters:
session- anovrSessionpreviously returned byCreatefovStencilDesc- info provided by caller necessary to generate a stencil meshmeshBuffer- mesh buffer to be partially filled in and returned by the SDK- Returns:
- an ovrResult indicating success or failure. In the case of failure, use
GetLastErrorInfoto get more information. Return values include but aren't limited to:Success: Completed successfully.Error_ServiceConnection: The service connection was lost and the application must destroy the session.Error_InvalidParameter: One or more of the parameters
-
novr_WaitToBeginFrame
public static int novr_WaitToBeginFrame(long session, long frameIndex)Unsafe version of:WaitToBeginFrame
-
ovr_WaitToBeginFrame
public static int ovr_WaitToBeginFrame(long session, long frameIndex)Waits until surfaces are available and it is time to begin rendering the frame. Must be called beforeBeginFrame, but not necessarily from the same thread.- Parameters:
session- anovrSessionpreviously returned byCreateframeIndex- specifies the targeted application frame index- Returns:
- an
ovrResultfor whichOVR_SUCCESS(result)is false upon error and true upon success. Return values include but aren't limited to:Success: command completed successfully.Success_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 callGetSessionStatusto detect visibility.Error_DisplayLost: The session has become invalid (such as due to a device removal) and the shared resources need to be released (DestroyTextureSwapChain), the session needs to destroyed (Destroy) and recreated (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 newovr_Createcall returns a differentGraphicsLuid.
-
novr_BeginFrame
public static int novr_BeginFrame(long session, long frameIndex)Unsafe version of:BeginFrame
-
ovr_BeginFrame
public static int ovr_BeginFrame(long session, long frameIndex)Called from render thread before application begins rendering. Must be called afterWaitToBeginFrameand beforeEndFrame, but not necessarily from the same threads.- Parameters:
session- anovrSessionpreviously returned byCreateframeIndex- specifies the targeted application frame index. It must match what was passed toWaitToBeginFrame.- Returns:
- an
ovrResultfor whichOVR_SUCCESS(result)is false upon error and true upon success. Return values include but aren't limited to:Success: command completed successfully.Error_DisplayLost: The session has become invalid (such as due to a device removal) and the shared resources need to be released (DestroyTextureSwapChain), the session needs to destroyed (Destroy) and recreated (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 newovr_Createcall returns a differentGraphicsLuid.
-
novr_EndFrame
public static int novr_EndFrame(long session, long frameIndex, long viewScaleDesc, long layerPtrList, int layerCount)Unsafe version of:EndFrame- Parameters:
layerCount- indicates the number of valid elements inlayerPtrList. The maximum supportedlayerCountis not currently specified, but may be specified in a future version.
-
ovr_EndFrame
public static int ovr_EndFrame(long session, long frameIndex, @Nullable OVRViewScaleDesc viewScaleDesc, org.lwjgl.PointerBuffer layerPtrList)Called from render thread after application has finished rendering. Must be called afterBeginFrame, but not necessarily from the same thread. Submits layers for distortion and display, which will happen asynchronously.- 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
SubmitFrame. A layer must be specified in every call toovr_SubmitFrameor it won't be displayed. - If a
layerPtrListentry that was specified in a previous call toSubmitFrameis passed asNULLor is of typeLayerType_Disabled, that layer is no longer displayed. - A
layerPtrListentry can be of any layer type and multiple entries of the same layer type are allowed. NolayerPtrListentry may be duplicated (i.e. the same pointer as an earlier entry).
Example code
ovrLayerEyeFov layer0; ovrLayerQuad layer1; ... ovrLayerHeader* layers[2] = { &layer0.Header, &layer1.Header }; ovrResult result = ovr_EndFrame(session, frameIndex, nullptr, layers, 2);- Parameters:
session- anovrSessionpreviously returned byCreateframeIndex- specifies the targeted application frame index. It must match what was passed toBeginFrame.viewScaleDesc- provides additional information needed only iflayerPtrListcontains anLayerType_Quad. IfNULL, 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 includeNULLentries 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 asOVRLayerEyeFovorOVRLayerQuad, withHeader.Typeidentifying its type. ANULLlayerPtrList entry in the array indicates the absence of the given layer.- Returns:
- an
ovrResultfor whichOVR_SUCCESS(result)is false upon error and true upon success. Return values include but aren't limited to:Success: rendering completed successfully.Error_DisplayLost: The session has become invalid (such as due to a device removal) and the shared resources need to be released (DestroyTextureSwapChain), the session needs to destroyed (Destroy) and recreated (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 newovr_Createcall returns a differentGraphicsLuid.Error_TextureSwapChainInvalid: TheovrTextureSwapChainis in an incomplete or inconsistent state. EnsureCommitTextureSwapChainwas called at least once first.
-
novr_SubmitFrame
public static int novr_SubmitFrame(long session, long frameIndex, long viewScaleDesc, long layerPtrList, int layerCount)Unsafe version of:SubmitFrame- Parameters:
layerCount- the number of valid elements inlayerPtrList. The maximum supportedlayerCountis not currently specified, but may be specified in a future version.
-
ovr_SubmitFrame
public static int ovr_SubmitFrame(long session, long frameIndex, @Nullable OVRViewScaleDesc viewScaleDesc, org.lwjgl.PointerBuffer layerPtrList)Submits layers for distortion and display.Deprecated. Use WaitToBeginFrame(), BeginFrame(), and
EndFrameinstead.ovr_SubmitFrametriggers 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.- 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 toovr_SubmitFrameor it won't be displayed. - If a
layerPtrListentry that was specified in a previous call toovr_SubmitFrameis passed asNULLor is of typeLayerType_Disabled, that layer is no longer displayed. - A
layerPtrListentry can be of any layer type and multiple entries of the same layer type are allowed. NolayerPtrListentry may be duplicated (i.e. the same pointer as an earlier entry).
Example code
ovrLayerEyeFov layer0; ovrLayerQuad layer1; ... ovrLayerHeader* layers[2] = { &layer0.Header, &layer1.Header }; ovrResult result = ovr_SubmitFrame(session, frameIndex, nullptr, layers, 2);- Parameters:
session- anovrSessionpreviously returned byCreateframeIndex- the targeted application frame index, or 0 to refer to one frame after the last timeSubmitFramewas calledviewScaleDesc- provides additional information needed only iflayerPtrListcontains anLayerType_Quad. IfNULL, a default version is used based on the current configuration and a 1.0 world scale.layerPtrList- a list ofovrLayerpointers, which can includeNULLentries 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 asOVRLayerEyeFovorOVRLayerQuad, withHeader.Typeidentifying its type. ANULLlayerPtrListentry in the array indicates the absence of the given layer.- Returns:
- an
ovrResultfor whichOVR_SUCCESS(result)is false upon error and true upon one of the possible success values:Success: rendering completed successfully.Success_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, callGetSessionStatusto detect visibility.Error_DisplayLost: The session has become invalid (such as due to a device removal) and the shared resources need to be released (DestroyTextureSwapChain), the session needs to be destroyed (Destroy) and recreated (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 newovr_Createcall returns a differentGraphicsLuid.Error_TextureSwapChainInvalid: TheovrTextureSwapChainis in an incomplete or inconsistent state. EnsureCommitTextureSwapChainwas called at least once first.
-
novr_GetPerfStats
public static int novr_GetPerfStats(long session, long outStats)Unsafe version of:GetPerfStats
-
ovr_GetPerfStats
public static int ovr_GetPerfStats(long 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
VisibleProcessIdwith their own process ID. Normally this will be the case if the caller is only callingovr_GetPerfStatswhenGetSessionStatushasIsVisibleflag set to be true.If the VR app calling
ovr_GetPerfStatsis actually the one visible in the HMD, then new perf stats will only be populated after a new call toSubmitFrame. That means subsequent calls toovr_GetPerfStatsafter the first one without callingovr_SubmitFramewill receive aFrameStatsCountof zero.If the VR app is not visible, or was initially marked as
Init_Invisible, then each call toovr_GetPerfStatswill immediately fetch new perf stats from the compositor without a need for theovr_SubmitFramecall.Even though invisible VR apps do not require
ovr_SubmitFrameto 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.- Parameters:
session- anovrSessionpreviously returned byCreateoutStats- contains the performance stats for the application and SDK compositor- Returns:
- an
ovrResultfor whichOVR_SUCCESS(result)is false upon error and true upon success
-
novr_ResetPerfStats
public static int novr_ResetPerfStats(long session)
Unsafe version of:ResetPerfStats
-
ovr_ResetPerfStats
public static int ovr_ResetPerfStats(long session)
Resets the accumulated stats reported in eachOVRPerfStatsPerCompositorFrameback to zero.Only the integer values such as
HmdVsyncIndex,AppDroppedFrameCountetc. will be reset as the other fields such asAppMotionToPhotonLatencyare independent timing values updated per-frame.- Parameters:
session- anovrSessionpreviously returned byCreate- Returns:
- an
ovrResultfor whichOVR_SUCCESS(result)is false upon error and true upon success
-
novr_GetPredictedDisplayTime
public static double novr_GetPredictedDisplayTime(long session, long frameIndex)Unsafe version of:GetPredictedDisplayTime
-
ovr_GetPredictedDisplayTime
public static double ovr_GetPredictedDisplayTime(long session, 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 event 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.
- Parameters:
session- anovrSessionpreviously returned byCreateframeIndex- 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
public static 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
-
novr_GetBool
public static boolean novr_GetBool(long session, long propertyName, boolean defaultVal)Unsafe version of:GetBool
-
ovr_GetBool
public static boolean ovr_GetBool(long session, java.nio.ByteBuffer propertyName, boolean defaultVal) public static boolean ovr_GetBool(long session, java.lang.CharSequence propertyName, boolean defaultVal)Reads a boolean property.- Parameters:
session- anovrSessionpreviously returned byCreatepropertyName- the name of the property, which needs to be valid for only the calldefaultVal- specifes the value to return if the property couldn't be read- Returns:
- the property interpreted as a boolean value. Returns
defaultValif the property doesn't exist.
-
novr_SetBool
public static boolean novr_SetBool(long session, long propertyName, boolean value)Unsafe version of:SetBool
-
ovr_SetBool
public static boolean ovr_SetBool(long session, java.nio.ByteBuffer propertyName, boolean value) public static boolean ovr_SetBool(long session, java.lang.CharSequence propertyName, boolean value)Writes or creates a boolean property.If the property wasn't previously a boolean property, it is changed to a boolean property.
- Parameters:
session- anovrSessionpreviously returned byCreatepropertyName- the name of the property, which needs to be valid only for the callvalue- 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.
-
novr_GetInt
public static int novr_GetInt(long session, long propertyName, int defaultVal)Unsafe version of:GetInt
-
ovr_GetInt
public static int ovr_GetInt(long session, java.nio.ByteBuffer propertyName, int defaultVal) public static int ovr_GetInt(long session, java.lang.CharSequence propertyName, int defaultVal)Reads an integer property.- Parameters:
session- anovrSessionpreviously returned byCreatepropertyName- the name of the property, which needs to be valid only for the calldefaultVal- specifes the value to return if the property couldn't be read- Returns:
- the property interpreted as an integer value. Returns
defaultValif the property doesn't exist.
-
novr_SetInt
public static boolean novr_SetInt(long session, long propertyName, int value)Unsafe version of:SetInt
-
ovr_SetInt
public static boolean ovr_SetInt(long session, java.nio.ByteBuffer propertyName, int value) public static boolean ovr_SetInt(long session, java.lang.CharSequence propertyName, int value)Writes or creates an integer property.If the property wasn't previously an integer property, it is changed to an integer property.
- Parameters:
session- anovrSessionpreviously returned byCreatepropertyName- the name of the property, which needs to be valid only for the callvalue- 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.
-
novr_GetFloat
public static float novr_GetFloat(long session, long propertyName, float defaultVal)Unsafe version of:GetFloat
-
ovr_GetFloat
public static float ovr_GetFloat(long session, java.nio.ByteBuffer propertyName, float defaultVal) public static float ovr_GetFloat(long session, java.lang.CharSequence propertyName, float defaultVal)Reads a float property.- Parameters:
session- anovrSessionpreviously returned byCreatepropertyName- the name of the property, which needs to be valid only for the calldefaultVal- specifes the value to return if the property couldn't be read- Returns:
- the property interpreted as a float value. Returns
defaultValif the property doesn't exist.
-
novr_SetFloat
public static boolean novr_SetFloat(long session, long propertyName, float value)Unsafe version of:SetFloat
-
ovr_SetFloat
public static boolean ovr_SetFloat(long session, java.nio.ByteBuffer propertyName, float value) public static boolean ovr_SetFloat(long session, java.lang.CharSequence 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.
- Parameters:
session- anovrSessionpreviously returned byCreatepropertyName- the name of the property, which needs to be valid only for the callvalue- 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.
-
novr_GetFloatArray
public static int novr_GetFloatArray(long session, long propertyName, long values, int valuesCapacity)Unsafe version of:GetFloatArray- Parameters:
valuesCapacity- the maximum number of elements to write to the values array
-
ovr_GetFloatArray
public static int ovr_GetFloatArray(long session, java.nio.ByteBuffer propertyName, java.nio.FloatBuffer values) public static int ovr_GetFloatArray(long session, java.lang.CharSequence propertyName, java.nio.FloatBuffer values)Reads a float array property.- Parameters:
session- anovrSessionpreviously returned byCreatepropertyName- the name of the property, which needs to be valid only for the callvalues- an array of float to write to- Returns:
- the number of elements read, or 0 if property doesn't exist or is empty
-
novr_SetFloatArray
public static boolean novr_SetFloatArray(long session, long propertyName, long values, int valuesSize)Unsafe version of:SetFloatArray- Parameters:
valuesSize- the number of elements to write
-
ovr_SetFloatArray
public static boolean ovr_SetFloatArray(long session, java.nio.ByteBuffer propertyName, java.nio.FloatBuffer values) public static boolean ovr_SetFloatArray(long session, java.lang.CharSequence propertyName, java.nio.FloatBuffer values)Writes or creates a float array property.- Parameters:
session- anovrSessionpreviously returned byCreatepropertyName- the name of the property, which needs to be valid only for the callvalues- an array of float to write from- 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.
-
novr_GetString
public static long novr_GetString(long session, long propertyName, long defaultVal)Unsafe version of:GetString
-
ovr_GetString
@Nullable public static java.lang.String ovr_GetString(long session, java.nio.ByteBuffer propertyName, @Nullable java.nio.ByteBuffer defaultVal) @Nullable public static java.lang.String ovr_GetString(long session, java.lang.CharSequence propertyName, @Nullable java.lang.CharSequence defaultVal)Reads a string property.Strings are UTF8-encoded and null-terminated.
- Parameters:
session- anovrSessionpreviously returned byCreatepropertyName- the name of the property, which needs to be valid only for the calldefaultVal- 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 asNULL. The return memory is guaranteed to be valid until next call toovr_GetStringor until the HMD is destroyed, whichever occurs first.
-
novr_SetString
public static boolean novr_SetString(long hmddesc, long propertyName, long value)Unsafe version of:SetString
-
ovr_SetString
public static boolean ovr_SetString(long hmddesc, java.nio.ByteBuffer propertyName, java.nio.ByteBuffer value) public static boolean ovr_SetString(long hmddesc, java.lang.CharSequence propertyName, java.lang.CharSequence value)Writes or creates a string property.Strings are UTF8-encoded and null-terminated.
- Parameters:
hmddesc- anovrSessionpreviously returned byCreatepropertyName- the name of the property, which needs to be valid only for the callvalue- 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.
-
novr_GetDevicePoses
public static int novr_GetDevicePoses(long session, int[] deviceTypes, int deviceCount, double absTime, long outDevicePoses)Array version of:novr_GetDevicePoses(long, long, int, double, long)
-
ovr_GetDevicePoses
public static int ovr_GetDevicePoses(long session, int[] deviceTypes, double absTime, OVRPoseStatef.Buffer outDevicePoses)Array version of:GetDevicePoses
-
novr_GetBoundaryGeometry
public static int novr_GetBoundaryGeometry(long session, int boundaryType, long outFloorPoints, int[] outFloorPointsCount)Array version of:novr_GetBoundaryGeometry(long, int, long, long)
-
ovr_GetBoundaryGeometry
public static int ovr_GetBoundaryGeometry(long session, int boundaryType, @Nullable OVRVector3f outFloorPoints, @Nullable int[] outFloorPointsCount)Array version of:GetBoundaryGeometry
-
novr_GetExternalCameras
public static int novr_GetExternalCameras(long session, long cameras, int[] inoutCameraCount)Array version of:novr_GetExternalCameras(long, long, long)
-
ovr_GetExternalCameras
public static int ovr_GetExternalCameras(long session, @Nullable OVRExternalCamera.Buffer cameras, int[] inoutCameraCount)Array version of:GetExternalCameras
-
novr_GetTextureSwapChainLength
public static int novr_GetTextureSwapChainLength(long session, long chain, int[] out_Length)Array version of:novr_GetTextureSwapChainLength(long, long, long)
-
ovr_GetTextureSwapChainLength
public static int ovr_GetTextureSwapChainLength(long session, long chain, int[] out_Length)Array version of:GetTextureSwapChainLength
-
novr_GetTextureSwapChainCurrentIndex
public static int novr_GetTextureSwapChainCurrentIndex(long session, long chain, int[] out_Index)Array version of:novr_GetTextureSwapChainCurrentIndex(long, long, long)
-
ovr_GetTextureSwapChainCurrentIndex
public static int ovr_GetTextureSwapChainCurrentIndex(long session, long chain, int[] out_Index)Array version of:GetTextureSwapChainCurrentIndex
-
novr_GetFloatArray
public static int novr_GetFloatArray(long session, long propertyName, float[] values, int valuesCapacity)Array version of:novr_GetFloatArray(long, long, long, int)
-
ovr_GetFloatArray
public static int ovr_GetFloatArray(long session, java.nio.ByteBuffer propertyName, float[] values) public static int ovr_GetFloatArray(long session, java.lang.CharSequence propertyName, float[] values)Array version of:GetFloatArray
-
novr_SetFloatArray
public static boolean novr_SetFloatArray(long session, long propertyName, float[] values, int valuesSize)Array version of:novr_SetFloatArray(long, long, long, int)
-
ovr_SetFloatArray
public static boolean ovr_SetFloatArray(long session, java.nio.ByteBuffer propertyName, float[] values) public static boolean ovr_SetFloatArray(long session, java.lang.CharSequence propertyName, float[] values)Array version of:SetFloatArray
-
-