Add oculus:getDisplayTime;

This commit is contained in:
bjorn 2019-04-30 16:49:20 -07:00
parent 5947a96556
commit 2aace190fe
1 changed files with 5 additions and 0 deletions

View File

@ -137,6 +137,10 @@ static void getDisplayDimensions(uint32_t* width, uint32_t* height) {
*height = size.h;
}
static double getDisplayTime(void) {
return ovr_GetPredictedDisplayTime(state.session, 0);
}
static void getClipDistance(float* clipNear, float* clipFar) {
*clipNear = state.clipNear;
*clipFar = state.clipFar;
@ -418,6 +422,7 @@ HeadsetInterface lovrHeadsetOculusDriver = {
.getName = getName,
.getOriginType = getOriginType,
.getDisplayDimensions = getDisplayDimensions,
.getDisplayTime = getDisplayTime,
.getClipDistance = getClipDistance,
.setClipDistance = setClipDistance,
.getBoundsDimensions = getBoundsDimensions,