This website uses cookies to improve our services and deliver relevant ads.
By interacting with this site, you agree to this use. For more information, see our Cookies Policy
| const char * | Returns the version + compile time stamp as a string. |
| double | Returns global, absolute high-resolution time in seconds. |
| ovrInitializeStatus | vrapi_Initialize ( const ovrInitParms * initParms ) Initializes the API for application use. |
| void | vrapi_Shutdown ( ) Shuts down the API on application exit. |
| void | Returns a VrApi property. |
| void | |
| bool | Returns false if the property cannot be read. |
| int | Returns a system property. |
| float | |
| int | vrapi_GetSystemPropertyFloatArray ( const ovrJava * java, const ovrSystemProperty propType, float * values, int numArrayValues ) Returns the number of elements written to values array. |
| int | vrapi_GetSystemPropertyInt64Array ( const ovrJava * java, const ovrSystemProperty propType, int64_t * values, int numArrayValues ) |
| const char * | The return memory is guaranteed to be valid until the next call to vrapi_GetSystemPropertyString. |
| int | Returns a system status. |
| float | |
| ovrMobile * | vrapi_EnterVrMode ( const ovrModeParms * parms ) Starts up the time warp, V-sync tracking, sensor reading, clock locking, thread scheduling, and sets video options. |
| void | vrapi_LeaveVrMode ( ovrMobile * ovr ) Shut everything down for window destruction or when the activity is paused. |
| double | Returns a predicted absolute system time in seconds at which the next set of eye images will be displayed. |
| ovrTracking2 | Returns the predicted sensor state based on the specified absolute system time in seconds. |
| ovrTracking | |
OVR_VRAPI_DEPRECATED ( void vrapi_RecenterPose ) Recenters the orientation on the yaw axis and will recenter the position when position tracking is available. | |
OVR_VRAPI_DEPRECATED ( ovrPosef vrapi_GetTrackingTransform ) The coordinate system used by the tracking system is defined in meters with its positive y axis pointing up, but its origin and yaw are unspecified. | |
OVR_VRAPI_DEPRECATED ( void vrapi_SetTrackingTransform ) Sets the transform used convert between tracking coordinates and a canonical application-defined space. | |
| ovrTrackingSpace | vrapi_GetTrackingSpace ( ovrMobile * ovr ) Returns the current tracking space. |
| ovrResult | Set the tracking space. |
| ovrPosef | Returns pose of the requested space relative to the current space. |
| ovrResult | vrapi_GetBoundaryGeometry ( ovrMobile * ovr, const uint32_t pointsCountInput, uint32_t * pointsCountOutput, ovrVector3f * points ) Get the geometry of the Guardian System as a list of points that define the outer boundary space. |
| ovrResult | Gets the dimension of the Oriented Bounding box for the Guardian System. |
| ovrResult | vrapi_TestPointIsInBoundary ( ovrMobile * ovr, const ovrVector3f point, bool * pointInsideBoundary, ovrBoundaryTriggerResult * result ) Tests collision/proximity of a 3D point against the Guardian System Boundary and returns whether or not a given point is inside or outside of the boundary. |
| ovrResult | vrapi_GetBoundaryTriggerState ( ovrMobile * ovr, const ovrTrackedDeviceTypeId deviceId, ovrBoundaryTriggerResult * result ) Tests collision/proximity of position tracked devices (e.g. |
| ovrResult | Used to force Guardian System mesh visibility to true. |
| ovrResult | Used to access whether or not the Guardian System is visible or not. |
| ovrTextureSwapChain * | vrapi_CreateTextureSwapChain3 ( ovrTextureType type, int64_t format, int width, int height, int levels, int bufferCount ) Texture Swap Chain lifetime is explicitly controlled by the application via calls to vrapi_CreateTextureSwapChain* or vrapi_CreateAndroidSurfaceSwapChain and vrapi_DestroyTextureSwapChain. |
| ovrTextureSwapChain * | vrapi_CreateTextureSwapChain2 ( ovrTextureType type, ovrTextureFormat format, int width, int height, int levels, int bufferCount ) |
| ovrTextureSwapChain * | vrapi_CreateTextureSwapChain ( ovrTextureType type, ovrTextureFormat format, int width, int height, int levels, bool buffered ) |
| ovrTextureSwapChain * | Create an Android SurfaceTexture based texture swap chain suitable for use with vrapi_SubmitFrame. |
| void | vrapi_DestroyTextureSwapChain ( ovrTextureSwapChain * chain ) Destroy the given texture swap chain. |
| int | vrapi_GetTextureSwapChainLength ( ovrTextureSwapChain * chain ) Returns the number of textures in the swap chain. |
| unsigned int | Get the OpenGL name of the texture at the given index. |
| jobject | Get the Android Surface object associated with the swap chain. |
| void | Accepts new eye images plus poses that will be used for future warps. |
| ovrResult | vrapi_SubmitFrame2 takes a frameDescription describing per-frame information such as: a flexible list of layers which should be drawn this frame and a frame index. |
| ovrResult | Set the CPU and GPU performance levels. |
| ovrResult | Specify which app threads should be given higher scheduling priority. |
| ovrResult | If VRAPI_EXTRA_LATENCY_MODE_ON specified, adds an extra frame of latency for full GPU utilization. |
| ovrResult | Set the Display Refresh Rate. |
/************************************************************************************
Filename : VrApi.h
Content : Minimum necessary API for mobile VR
Created : June 25, 2014
Authors : John Carmack, J.M.P. van Waveren
Language : C99
Copyright : Copyright (c) Facebook Technologies, LLC and its affiliates. All rights reserved.
*************************************************************************************/
#ifndef OVR_VrApi_h
#define OVR_VrApi_h
#include "VrApi_Config.h"
#include "VrApi_Version.h"
#include "VrApi_Types.h"
#if defined( __cplusplus )
extern"C" {
#endif
OVR_VRAPI_EXPORT constchar * vrapi_GetVersionString();
OVR_VRAPI_EXPORT double vrapi_GetTimeInSeconds();
//-----------------------------------------------------------------
// Initialization/Shutdown
//-----------------------------------------------------------------
OVR_VRAPI_EXPORT ovrInitializeStatus vrapi_Initialize( const ovrInitParms * initParms );
OVR_VRAPI_EXPORT void vrapi_Shutdown();
//-----------------------------------------------------------------
// VrApi Properties
//-----------------------------------------------------------------
OVR_VRAPI_EXPORT void vrapi_SetPropertyInt( const ovrJava * java, const ovrProperty propType, constint intVal );
OVR_VRAPI_EXPORT void vrapi_SetPropertyFloat( const ovrJava * java, const ovrProperty propType, constfloat floatVal );
OVR_VRAPI_EXPORT bool vrapi_GetPropertyInt( const ovrJava * java, const ovrProperty propType, int * intVal );
//-----------------------------------------------------------------
// System Properties
//-----------------------------------------------------------------
OVR_VRAPI_EXPORT int vrapi_GetSystemPropertyInt( const ovrJava * java, const ovrSystemProperty propType );
OVR_VRAPI_EXPORT float vrapi_GetSystemPropertyFloat( const ovrJava * java, const ovrSystemProperty propType );
OVR_VRAPI_EXPORT int vrapi_GetSystemPropertyFloatArray( const ovrJava * java, const ovrSystemProperty propType,
float * values, int numArrayValues );
OVR_VRAPI_EXPORT int vrapi_GetSystemPropertyInt64Array( const ovrJava * java, const ovrSystemProperty propType,
int64_t * values, int numArrayValues );
OVR_VRAPI_EXPORT constchar * vrapi_GetSystemPropertyString( const ovrJava * java, const ovrSystemProperty propType );
//-----------------------------------------------------------------
// System Status
//-----------------------------------------------------------------
OVR_VRAPI_EXPORT int vrapi_GetSystemStatusInt( const ovrJava * java, const ovrSystemStatus statusType );
OVR_VRAPI_EXPORT float vrapi_GetSystemStatusFloat( const ovrJava * java, const ovrSystemStatus statusType );
//-----------------------------------------------------------------
// Enter/Leave VR mode
//-----------------------------------------------------------------
OVR_VRAPI_EXPORT ovrMobile * vrapi_EnterVrMode( const ovrModeParms * parms );
OVR_VRAPI_EXPORT void vrapi_LeaveVrMode( ovrMobile * ovr );
//-----------------------------------------------------------------
// Tracking
//-----------------------------------------------------------------
OVR_VRAPI_EXPORT double vrapi_GetPredictedDisplayTime( ovrMobile * ovr, longlong frameIndex );
OVR_VRAPI_EXPORT ovrTracking2 vrapi_GetPredictedTracking2( ovrMobile * ovr, double absTimeInSeconds );
OVR_VRAPI_EXPORT ovrTracking vrapi_GetPredictedTracking( ovrMobile * ovr, double absTimeInSeconds );
// vrapi_RecenterPose() is being deprecated because it is supported at the user
// level via system interaction, and at the app level, the app is free to use
// any means it likes to control the mapping of virtual space to physical space.
OVR_VRAPI_DEPRECATED( OVR_VRAPI_EXPORT void vrapi_RecenterPose( ovrMobile * ovr ) );
//-----------------------------------------------------------------
// Tracking Transform
//
//-----------------------------------------------------------------
OVR_VRAPI_DEPRECATED( OVR_VRAPI_EXPORT ovrPosef vrapi_GetTrackingTransform( ovrMobile * ovr, ovrTrackingTransform whichTransform ) );
OVR_VRAPI_DEPRECATED( OVR_VRAPI_EXPORT void vrapi_SetTrackingTransform( ovrMobile * ovr, ovrPosef pose ) );
OVR_VRAPI_EXPORT ovrTrackingSpace vrapi_GetTrackingSpace( ovrMobile * ovr );
OVR_VRAPI_EXPORT ovrResult vrapi_SetTrackingSpace( ovrMobile * ovr, ovrTrackingSpace whichSpace );
OVR_VRAPI_EXPORT ovrPosef vrapi_LocateTrackingSpace( ovrMobile * ovr, ovrTrackingSpace target );
//-----------------------------------------------------------------
// Guardian System
//
//-----------------------------------------------------------------
OVR_VRAPI_EXPORT ovrResult vrapi_GetBoundaryGeometry( ovrMobile * ovr, const uint32_t pointsCountInput, uint32_t * pointsCountOutput, ovrVector3f * points );
OVR_VRAPI_EXPORT ovrResult vrapi_GetBoundaryOrientedBoundingBox( ovrMobile * ovr, ovrPosef * pose, ovrVector3f * scale );
OVR_VRAPI_EXPORT ovrResult vrapi_TestPointIsInBoundary( ovrMobile * ovr, const ovrVector3f point, bool * pointInsideBoundary, ovrBoundaryTriggerResult * result );
OVR_VRAPI_EXPORT ovrResult vrapi_GetBoundaryTriggerState( ovrMobile * ovr, const ovrTrackedDeviceTypeId deviceId, ovrBoundaryTriggerResult * result );
OVR_VRAPI_EXPORT ovrResult vrapi_RequestBoundaryVisible( ovrMobile * ovr, constbool visible );
OVR_VRAPI_EXPORT ovrResult vrapi_GetBoundaryVisible( ovrMobile * ovr, bool * visible );
//-----------------------------------------------------------------
// Texture Swap Chains
//
//-----------------------------------------------------------------
OVR_VRAPI_EXPORT ovrTextureSwapChain * vrapi_CreateTextureSwapChain3( ovrTextureType type, int64_t format,
int width, int height, int levels, int bufferCount );
OVR_VRAPI_EXPORT ovrTextureSwapChain * vrapi_CreateTextureSwapChain2( ovrTextureType type, ovrTextureFormat format,
int width, int height, int levels, int bufferCount );
OVR_VRAPI_EXPORT ovrTextureSwapChain * vrapi_CreateTextureSwapChain( ovrTextureType type, ovrTextureFormat format,
int width, int height, int levels, bool buffered );
OVR_VRAPI_EXPORT ovrTextureSwapChain * vrapi_CreateAndroidSurfaceSwapChain( int width, int height );
OVR_VRAPI_EXPORT void vrapi_DestroyTextureSwapChain( ovrTextureSwapChain * chain );
OVR_VRAPI_EXPORT int vrapi_GetTextureSwapChainLength( ovrTextureSwapChain * chain );
OVR_VRAPI_EXPORT unsignedint vrapi_GetTextureSwapChainHandle( ovrTextureSwapChain * chain, int index );
OVR_VRAPI_EXPORT jobject vrapi_GetTextureSwapChainAndroidSurface( ovrTextureSwapChain * chain );
//-----------------------------------------------------------------
// Frame Submission
//-----------------------------------------------------------------
OVR_VRAPI_EXPORT void vrapi_SubmitFrame( ovrMobile * ovr, const ovrFrameParms * parms );
OVR_VRAPI_EXPORT ovrResult vrapi_SubmitFrame2( ovrMobile * ovr, const ovrSubmitFrameDescription2 * frameDescription );
//-----------------------------------------------------------------
// Performance
//-----------------------------------------------------------------
OVR_VRAPI_EXPORT ovrResult vrapi_SetClockLevels( ovrMobile * ovr, const int32_t cpuLevel, const int32_t gpuLevel );
OVR_VRAPI_EXPORT ovrResult vrapi_SetPerfThread( ovrMobile * ovr, const ovrPerfThreadType type, const uint32_t threadId );
OVR_VRAPI_EXPORT ovrResult vrapi_SetExtraLatencyMode( ovrMobile * ovr, const ovrExtraLatencyMode mode );
//-----------------------------------------------------------------
// Display Refresh Rate
//-----------------------------------------------------------------
OVR_VRAPI_EXPORT ovrResult vrapi_SetDisplayRefreshRate( ovrMobile * ovr, constfloat refreshRate );
#if defined( __cplusplus )
} // extern "C"
#endif
#endif // OVR_VrApi_h