@Override
    public boolean initVRCompositor(boolean allowed) {
        hmdErrorStore.setValue(0); // clear the error store
        if( allowed && vrSystemFunctions != null ) {

            IntByReference intptr = JOpenVRLibrary.VR_GetGenericInterface(JOpenVRLibrary.IVRCompositor_Version, hmdErrorStore);
            if (intptr != null){

                if (intptr.getPointer() != null){
                    compositorFunctions = new VR_IVRCompositor_FnTable(intptr.getPointer());
                    if(compositorFunctions != null && hmdErrorStore.getValue() == 0 ){
                        compositorFunctions.setAutoSynch(false);
                        compositorFunctions.read();
                        if( environment.isSeatedExperience() ) {
                            compositorFunctions.SetTrackingSpace.apply(JOpenVRLibrary.ETrackingUniverseOrigin.ETrackingUniverseOrigin_TrackingUniverseSeated);
                        } else {
                            compositorFunctions.SetTrackingSpace.apply(JOpenVRLibrary.ETrackingUniverseOrigin.ETrackingUniverseOrigin_TrackingUniverseStanding);
                        }
                        logger.config("OpenVR Compositor initialized");
                    } else {
                        logger.severe("OpenVR Compositor error: " + hmdErrorStore.getValue());
                        compositorFunctions = null;
                    }
                } else {
                    logger.log(Level.SEVERE, "Cannot get valid pointer for generic interface \""+JOpenVRLibrary.IVRCompositor_Version+"\", "+OpenVRUtil.getEVRInitErrorString(hmdErrorStore.getValue())+" ("+hmdErrorStore.getValue()+")");
                    compositorFunctions = null;
                }

            } else {
                logger.log(Level.SEVERE, "Cannot get generic interface for \""+JOpenVRLibrary.IVRCompositor_Version+"\", "+OpenVRUtil.getEVRInitErrorString(hmdErrorStore.getValue())+" ("+hmdErrorStore.getValue()+")");
                compositorFunctions = null;
            }
        }
        if( compositorFunctions == null ) {
            logger.severe("Skipping VR Compositor...");
            if( vrSystemFunctions != null ) {
                vsyncToPhotons = vrSystemFunctions.GetFloatTrackedDeviceProperty.apply(JOpenVRLibrary.k_unTrackedDeviceIndex_Hmd, JOpenVRLibrary.ETrackedDeviceProperty.ETrackedDeviceProperty_Prop_SecondsFromVsyncToPhotons_Float, hmdErrorStore);
            } else {
                vsyncToPhotons = 0f;
            }
        }
        return compositorFunctions != null;
    }
Create a new <a href="https://github.com/ValveSoftware/openvr/wiki/API-Documentation">OpenVR</a> system
attached to the given {@link VREnvironment VR environment}.
@param environment the VR environment to which this API is attached.
jme3-vr/src/main/java/com/jme3/input/vr/openvr/OpenVR.java