Bike-X  0.8
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
OVR_CAPI.cpp File Reference
#include "OVR_CAPI.h"
#include "Kernel/OVR_Timer.h"
#include "Kernel/OVR_Math.h"
#include "Kernel/OVR_System.h"
#include "OVR_Stereo.h"
#include "OVR_Profile.h"
#include "CAPI/CAPI_GlobalState.h"
#include "CAPI/CAPI_HMDState.h"
#include "CAPI/CAPI_FrameTimeManager.h"
Include dependency graph for OVR_CAPI.cpp:

Go to the source code of this file.

Namespaces

 OVR
 

Macros

#define OVR_OFFSET_OF(s, field)   ((size_t)&((s*)0)->field)
 

Functions

OVR_EXPORT ovrMatrix4f ovrMatrix4f_Projection (ovrFovPort fov, float znear, float zfar, ovrBool rightHanded)
 
OVR_EXPORT ovrMatrix4f ovrMatrix4f_OrthoSubProjection (ovrMatrix4f projection, ovrVector2f orthoScale, float orthoDistance, float eyeViewAdjustX)
 
OVR_EXPORT double ovr_GetTimeInSeconds ()
 
OVR_EXPORT double ovr_WaitTillTime (double absTime)
 
OVR_EXPORT ovrBool ovr_Initialize ()
 
OVR_EXPORT void ovr_Shutdown ()
 
OVR_EXPORT int ovrHmd_Detect ()
 
OVR_EXPORT ovrHmd ovrHmd_Create (int index)
 
OVR_EXPORT ovrHmd ovrHmd_CreateDebug (ovrHmdType type)
 
OVR_EXPORT void ovrHmd_Destroy (ovrHmd hmd)
 
OVR_EXPORT const char * ovrHmd_GetLastError (ovrHmd hmd)
 
OVR_EXPORT unsigned int ovrHmd_GetEnabledCaps (ovrHmd hmd)
 
OVR_EXPORT void ovrHmd_SetEnabledCaps (ovrHmd hmd, unsigned int capsBits)
 
OVR_EXPORT ovrBool ovrHmd_StartSensor (ovrHmd hmd, unsigned int supportedCaps, unsigned int requiredCaps)
 
OVR_EXPORT void ovrHmd_StopSensor (ovrHmd hmd)
 
OVR_EXPORT void ovrHmd_ResetSensor (ovrHmd hmd)
 
OVR_EXPORT ovrSensorState ovrHmd_GetSensorState (ovrHmd hmd, double absTime)
 
OVR_EXPORT ovrBool ovrHmd_GetSensorDesc (ovrHmd hmd, ovrSensorDesc *descOut)
 
OVR_EXPORT void ovrHmd_GetDesc (ovrHmd hmd, ovrHmdDesc *desc)
 
OVR_EXPORT ovrSizei ovrHmd_GetFovTextureSize (ovrHmd hmd, ovrEyeType eye, ovrFovPort fov, float pixelsPerDisplayPixel)
 
OVR_EXPORT ovrBool ovrHmd_ConfigureRendering (ovrHmd hmd, const ovrRenderAPIConfig *apiConfig, unsigned int distortionCaps, const ovrFovPort eyeFovIn[2], ovrEyeRenderDesc eyeRenderDescOut[2])
 
void ovrHmd_SetVsync (ovrHmd hmd, ovrBool vsync)
 
OVR_EXPORT ovrFrameTiming ovrHmd_BeginFrame (ovrHmd hmd, unsigned int frameIndex)
 
OVR_EXPORT void ovrHmd_EndFrame (ovrHmd hmd)
 
OVR_EXPORT ovrPosef ovrHmd_BeginEyeRender (ovrHmd hmd, ovrEyeType eye)
 
OVR_EXPORT void ovrHmd_EndEyeRender (ovrHmd hmd, ovrEyeType eye, ovrPosef renderPose, ovrTexture *eyeTexture)
 
OVR_EXPORT ovrFrameTiming ovrHmd_GetFrameTiming (ovrHmd hmd, unsigned int frameIndex)
 
OVR_EXPORT ovrFrameTiming ovrHmd_BeginFrameTiming (ovrHmd hmd, unsigned int frameIndex)
 
OVR_EXPORT void ovrHmd_EndFrameTiming (ovrHmd hmd)
 
OVR_EXPORT void ovrHmd_ResetFrameTiming (ovrHmd hmd, unsigned int frameIndex)
 
OVR_EXPORT ovrPosef ovrHmd_GetEyePose (ovrHmd hmd, ovrEyeType eye)
 
OVR_EXPORT void ovrHmd_GetEyeTimewarpMatrices (ovrHmd hmd, ovrEyeType eye, ovrPosef renderPose, ovrMatrix4f twmOut[2])
 
OVR_EXPORT ovrEyeRenderDesc ovrHmd_GetRenderDesc (ovrHmd hmd, ovrEyeType eyeType, ovrFovPort fov)
 
OVR_EXPORT ovrBool ovrHmd_CreateDistortionMesh (ovrHmd hmd, ovrEyeType eyeType, ovrFovPort fov, unsigned int distortionCaps, ovrDistortionMesh *meshData)
 
OVR_EXPORT void ovrHmd_DestroyDistortionMesh (ovrDistortionMesh *meshData)
 
OVR_EXPORT void ovrHmd_GetRenderScaleAndOffset (ovrFovPort fov, ovrSizei textureSize, ovrRecti renderViewport, ovrVector2f uvScaleOffsetOut[2])
 
OVR_EXPORT ovrBool ovrHmd_GetLatencyTestDrawColor (ovrHmd hmd, unsigned char rgbColorOut[3])
 
OVR_EXPORT const char * ovrHmd_GetLatencyTestResult (ovrHmd hmd)
 
OVR_EXPORT double ovrHmd_GetMeasuredLatencyTest2 (ovrHmd hmd)
 
OVR_EXPORT float ovrHmd_GetFloat (ovrHmd hmd, const char *propertyName, float defaultVal)
 
OVR_EXPORT ovrBool ovrHmd_SetFloat (ovrHmd hmd, const char *propertyName, float value)
 
OVR_EXPORT unsigned int ovrHmd_GetFloatArray (ovrHmd hmd, const char *propertyName, float values[], unsigned int arraySize)
 
OVR_EXPORT ovrBool ovrHmd_SetFloatArray (ovrHmd hmd, const char *propertyName, float values[], unsigned int arraySize)
 
OVR_EXPORT const char * ovrHmd_GetString (ovrHmd hmd, const char *propertyName, const char *defaultVal)
 
OVR_EXPORT unsigned int ovrHmd_GetArraySize (ovrHmd hmd, const char *propertyName)
 
OVR::SensorFusionovrHmd_GetSensorFusion (ovrHmd hmd)
 

Variables

static ovrBool CAPI_SystemInitCalled = 0
 

Macro Definition Documentation

#define OVR_OFFSET_OF (   s,
  field 
)    ((size_t)&((s*)0)->field)

Definition at line 673 of file OVR_CAPI.cpp.

Function Documentation

OVR_EXPORT double ovr_GetTimeInSeconds ( )

Definition at line 182 of file OVR_CAPI.cpp.

OVR_EXPORT ovrBool ovr_Initialize ( )

Definition at line 211 of file OVR_CAPI.cpp.

OVR_EXPORT void ovr_Shutdown ( )

Definition at line 228 of file OVR_CAPI.cpp.

OVR_EXPORT double ovr_WaitTillTime ( double  absTime)

Definition at line 188 of file OVR_CAPI.cpp.

OVR_EXPORT ovrPosef ovrHmd_BeginEyeRender ( ovrHmd  hmd,
ovrEyeType  eye 
)

Definition at line 509 of file OVR_CAPI.cpp.

OVR_EXPORT ovrFrameTiming ovrHmd_BeginFrame ( ovrHmd  hmd,
unsigned int  frameIndex 
)

Definition at line 440 of file OVR_CAPI.cpp.

OVR_EXPORT ovrFrameTiming ovrHmd_BeginFrameTiming ( ovrHmd  hmd,
unsigned int  frameIndex 
)

Definition at line 557 of file OVR_CAPI.cpp.

OVR_EXPORT ovrBool ovrHmd_ConfigureRendering ( ovrHmd  hmd,
const ovrRenderAPIConfig apiConfig,
unsigned int  distortionCaps,
const ovrFovPort  eyeFovIn[2],
ovrEyeRenderDesc  eyeRenderDescOut[2] 
)

Definition at line 418 of file OVR_CAPI.cpp.

OVR_EXPORT ovrHmd ovrHmd_Create ( int  index)

Definition at line 268 of file OVR_CAPI.cpp.

OVR_EXPORT ovrHmd ovrHmd_CreateDebug ( ovrHmdType  type)

Definition at line 283 of file OVR_CAPI.cpp.

OVR_EXPORT ovrBool ovrHmd_CreateDistortionMesh ( ovrHmd  hmd,
ovrEyeType  eyeType,
ovrFovPort  fov,
unsigned int  distortionCaps,
ovrDistortionMesh meshData 
)

Definition at line 679 of file OVR_CAPI.cpp.

OVR_EXPORT void ovrHmd_Destroy ( ovrHmd  hmd)

Definition at line 292 of file OVR_CAPI.cpp.

OVR_EXPORT void ovrHmd_DestroyDistortionMesh ( ovrDistortionMesh meshData)

Definition at line 740 of file OVR_CAPI.cpp.

OVR_EXPORT int ovrHmd_Detect ( )

Definition at line 255 of file OVR_CAPI.cpp.

OVR_EXPORT void ovrHmd_EndEyeRender ( ovrHmd  hmd,
ovrEyeType  eye,
ovrPosef  renderPose,
ovrTexture eyeTexture 
)

Definition at line 516 of file OVR_CAPI.cpp.

OVR_EXPORT void ovrHmd_EndFrame ( ovrHmd  hmd)

Definition at line 463 of file OVR_CAPI.cpp.

OVR_EXPORT void ovrHmd_EndFrameTiming ( ovrHmd  hmd)

Definition at line 592 of file OVR_CAPI.cpp.

OVR_EXPORT unsigned int ovrHmd_GetArraySize ( ovrHmd  hmd,
const char *  propertyName 
)

Definition at line 894 of file OVR_CAPI.cpp.

OVR_EXPORT void ovrHmd_GetDesc ( ovrHmd  hmd,
ovrHmdDesc desc 
)

Definition at line 396 of file OVR_CAPI.cpp.

OVR_EXPORT unsigned int ovrHmd_GetEnabledCaps ( ovrHmd  hmd)

Definition at line 327 of file OVR_CAPI.cpp.

OVR_EXPORT ovrPosef ovrHmd_GetEyePose ( ovrHmd  hmd,
ovrEyeType  eye 
)

Definition at line 621 of file OVR_CAPI.cpp.

OVR_EXPORT void ovrHmd_GetEyeTimewarpMatrices ( ovrHmd  hmd,
ovrEyeType  eye,
ovrPosef  renderPose,
ovrMatrix4f  twmOut[2] 
)

Definition at line 631 of file OVR_CAPI.cpp.

OVR_EXPORT float ovrHmd_GetFloat ( ovrHmd  hmd,
const char *  propertyName,
float  defaultVal 
)

Definition at line 804 of file OVR_CAPI.cpp.

OVR_EXPORT unsigned int ovrHmd_GetFloatArray ( ovrHmd  hmd,
const char *  propertyName,
float  values[],
unsigned int  arraySize 
)

Definition at line 827 of file OVR_CAPI.cpp.

OVR_EXPORT ovrSizei ovrHmd_GetFovTextureSize ( ovrHmd  hmd,
ovrEyeType  eye,
ovrFovPort  fov,
float  pixelsPerDisplayPixel 
)

Definition at line 404 of file OVR_CAPI.cpp.

OVR_EXPORT ovrFrameTiming ovrHmd_GetFrameTiming ( ovrHmd  hmd,
unsigned int  frameIndex 
)

Definition at line 529 of file OVR_CAPI.cpp.

OVR_EXPORT const char* ovrHmd_GetLastError ( ovrHmd  hmd)

Definition at line 308 of file OVR_CAPI.cpp.

OVR_EXPORT ovrBool ovrHmd_GetLatencyTestDrawColor ( ovrHmd  hmd,
unsigned char  rgbColorOut[3] 
)

Definition at line 774 of file OVR_CAPI.cpp.

OVR_EXPORT const char* ovrHmd_GetLatencyTestResult ( ovrHmd  hmd)

Definition at line 783 of file OVR_CAPI.cpp.

OVR_EXPORT double ovrHmd_GetMeasuredLatencyTest2 ( ovrHmd  hmd)

Definition at line 789 of file OVR_CAPI.cpp.

OVR_EXPORT ovrEyeRenderDesc ovrHmd_GetRenderDesc ( ovrHmd  hmd,
ovrEyeType  eyeType,
ovrFovPort  fov 
)

Definition at line 656 of file OVR_CAPI.cpp.

OVR_EXPORT void ovrHmd_GetRenderScaleAndOffset ( ovrFovPort  fov,
ovrSizei  textureSize,
ovrRecti  renderViewport,
ovrVector2f  uvScaleOffsetOut[2] 
)

Definition at line 755 of file OVR_CAPI.cpp.

OVR_EXPORT ovrBool ovrHmd_GetSensorDesc ( ovrHmd  hmd,
ovrSensorDesc descOut 
)

Definition at line 384 of file OVR_CAPI.cpp.

OVR::SensorFusion* ovrHmd_GetSensorFusion ( ovrHmd  hmd)

Definition at line 919 of file OVR_CAPI.cpp.

OVR_EXPORT ovrSensorState ovrHmd_GetSensorState ( ovrHmd  hmd,
double  absTime 
)

Definition at line 377 of file OVR_CAPI.cpp.

OVR_EXPORT const char* ovrHmd_GetString ( ovrHmd  hmd,
const char *  propertyName,
const char *  defaultVal 
)

Definition at line 853 of file OVR_CAPI.cpp.

OVR_EXPORT void ovrHmd_ResetFrameTiming ( ovrHmd  hmd,
unsigned int  frameIndex 
)

Definition at line 607 of file OVR_CAPI.cpp.

OVR_EXPORT void ovrHmd_ResetSensor ( ovrHmd  hmd)

Definition at line 371 of file OVR_CAPI.cpp.

OVR_EXPORT void ovrHmd_SetEnabledCaps ( ovrHmd  hmd,
unsigned int  capsBits 
)

Definition at line 335 of file OVR_CAPI.cpp.

OVR_EXPORT ovrBool ovrHmd_SetFloat ( ovrHmd  hmd,
const char *  propertyName,
float  value 
)

Definition at line 815 of file OVR_CAPI.cpp.

OVR_EXPORT ovrBool ovrHmd_SetFloatArray ( ovrHmd  hmd,
const char *  propertyName,
float  values[],
unsigned int  arraySize 
)

Definition at line 841 of file OVR_CAPI.cpp.

void ovrHmd_SetVsync ( ovrHmd  hmd,
ovrBool  vsync 
)

Definition at line 432 of file OVR_CAPI.cpp.

OVR_EXPORT ovrBool ovrHmd_StartSensor ( ovrHmd  hmd,
unsigned int  supportedCaps,
unsigned int  requiredCaps 
)

Definition at line 358 of file OVR_CAPI.cpp.

OVR_EXPORT void ovrHmd_StopSensor ( ovrHmd  hmd)

Definition at line 365 of file OVR_CAPI.cpp.

OVR_EXPORT ovrMatrix4f ovrMatrix4f_OrthoSubProjection ( ovrMatrix4f  projection,
ovrVector2f  orthoScale,
float  orthoDistance,
float  eyeViewAdjustX 
)

Definition at line 111 of file OVR_CAPI.cpp.

OVR_EXPORT ovrMatrix4f ovrMatrix4f_Projection ( ovrFovPort  fov,
float  znear,
float  zfar,
ovrBool  rightHanded 
)

Definition at line 105 of file OVR_CAPI.cpp.

Variable Documentation

ovrBool CAPI_SystemInitCalled = 0
static

Definition at line 209 of file OVR_CAPI.cpp.