OculusVR: Call GetPredictedDisplayTime to satasfy SubmitFrame

This commit is contained in:
Campbell Suter 2017-09-28 23:40:04 +13:00
parent f0b4c13515
commit 1c975918b1
No known key found for this signature in database
GPG Key ID: 754A66CCF3F73C0F
2 changed files with 11 additions and 5 deletions

View File

@ -210,6 +210,15 @@ public class OculusVR implements VRAPI {
return true;
}
@Override
public void updatePose() {
double ftiming = ovr_GetPredictedDisplayTime(session, 0);
OVRTrackingState hmdState = OVRTrackingState.malloc();
ovr_GetTrackingState(session, ftiming, true, hmdState);
// TODO
}
@Override
public boolean isInitialized() {
return initialized;
@ -251,11 +260,6 @@ public class OculusVR implements VRAPI {
throw new UnsupportedOperationException();
}
@Override
public void updatePose() {
throw new UnsupportedOperationException();
}
@Override
public Matrix4f getHMDMatrixProjectionLeftEye(Camera cam) {
return matrixO2J(projections[ovrEye_Left], new Matrix4f());

View File

@ -222,6 +222,8 @@ public class VRViewManagerOculus extends AbstractVRViewManager {
@Override
public void update(float tpf) {
// TODO
hardware.updatePose();
}
@Override