public void initCamera(boolean allowed) {
      hmdErrorStore.setValue(0); // clear the error store

      if( allowed && vrSystemFunctions != null ) {
        IntByReference intptr = JOpenVRLibrary.VR_GetGenericInterface(JOpenVRLibrary.IVRTrackedCamera_Version, hmdErrorStore);
          if (intptr != null){
            cameraFunctions = new VR_IVRTrackedCamera_FnTable(intptr.getPointer());
            if(cameraFunctions != null && hmdErrorStore.getValue() == 0 ){
              cameraFunctions.setAutoSynch(false);
                cameraFunctions.read();
                logger.config("OpenVR Camera initialized");
            }
          }
       }
    }
Initialize the headset camera.
@param allowed <code>true</code> is the use of the headset camera is allowed and <code>false</code> otherwise.
jme3-vr/src/main/java/com/jme3/input/vr/openvr/OpenVR.java