OculusVR: Fix eye-texture sizing issue, producing correct FOV

empirephoenix-patch-1
Campbell Suter 7 years ago
parent da52de7f7f
commit b6b1687450
No known key found for this signature in database
GPG Key ID: 754A66CCF3F73C0F
  1. 11
      jme3-vr/src/main/java/com/jme3/input/vr/OculusVR.java

@ -252,6 +252,9 @@ public class OculusVR implements VRAPI {
System.out.println("step 7 - recenter");
ovr_RecenterTrackingOrigin(session);
// Do this so others relying on our texture size get it correct.
findHMDTextureSize();
// throw new UnsupportedOperationException("Not yet implemented!");
return true;
}
@ -327,8 +330,11 @@ public class OculusVR implements VRAPI {
@Override
public void getRenderSize(Vector2f store) {
store.x = resolutionW;
store.y = resolutionH;
if(!isInitialized()) {
throw new IllegalStateException("Cannot call getRenderSize() before initialized!");
}
store.x = textureW;
store.y = textureH;
}
@Override
@ -410,7 +416,6 @@ public class OculusVR implements VRAPI {
throw new UnsupportedOperationException("Cannot use LibOVR without compositor!");
}
findHMDTextureSize();
setupLayers();
framebuffers = new FrameBuffer[2][];

Loading…
Cancel
Save