public OculusViewManager(VREnvironment environment) { this.environment = environment; VRAPI hardware = environment.getVRHardware(); Objects.requireNonNull(hardware, "Attached VR Hardware cannot be null"); if (!(hardware instanceof OculusVR)) { throw new IllegalStateException("Cannot use Oculus VR view manager on non-Oculus hardware state!"); } this.hardware = (OculusVR) hardware; if (!environment.compositorAllowed()) { throw new UnsupportedOperationException("Cannot render without compositor on LibOVR"); } }
environment.getVRHardware().initVRCompositor(environment.compositorAllowed()); } else { logger.warning("No VR system found.");
if( environment.isInVR() && !environment.compositorAllowed() ) { if (!environment.isInVR()){ logger.config("Cannot switch to VR mode (VR disabled by user)."); } else if (!environment.compositorAllowed()){ logger.warning("Cannot switch to VR mode (VR not supported).");
} else if( environment.compositorAllowed() == false ) { origCam.setFrustumFar(100f); origCam.setFrustumNear(1f);
} else if( environment.compositorAllowed() == false ) { origCam.setFrustumFar(100f); origCam.setFrustumNear(1f);
} else if (environment.compositorAllowed() == false) { origCam.setFrustumFar(100f); origCam.setFrustumNear(1f);