@Override
    public void postRender() {
        if (environment != null){
            if( environment.isInVR() ) {
                VRAPI api = environment.getVRHardware();
                if( api.getCompositor() != null ) {
                    // using the compositor...
                    int errl = 0, errr = 0;
                    if( environment.isInstanceRendering() ) {
                        if( leftTextureType.handle == -1 || leftTextureType.handle != getFullTexId() ) {
                            leftTextureType.handle = getFullTexId();
                            if( leftTextureType.handle != -1 ) {
                                leftTextureType.write();
                            }
                        } else {
                            if( api instanceof OpenVR ) {
                                int submitFlag = JOpenVRLibrary.EVRSubmitFlags.EVRSubmitFlags_Submit_Default;
                                errr = ((OpenVR)api).getCompositor().Submit.apply(JOpenVRLibrary.EVREye.EVREye_Eye_Right, leftTextureType, rightTextureBounds, submitFlag);
                                errl = ((OpenVR)api).getCompositor().Submit.apply(JOpenVRLibrary.EVREye.EVREye_Eye_Left, leftTextureType, leftTextureBounds, submitFlag);
                            }
                        }
                    } else if( leftTextureType.handle == -1 || rightTextureType.handle == -1 ||
                               leftTextureType.handle != getLeftTexId() || rightTextureType.handle != getRightTexId() ) {
                        leftTextureType.handle = getLeftTexId();
                        if( leftTextureType.handle != -1 ) {
                            logger.fine("Writing Left texture to native memory at " + leftTextureType.getPointer());
                            leftTextureType.write();
                        }
                        rightTextureType.handle = getRightTexId();
                        if( rightTextureType.handle != -1 ) {
                            logger.fine("Writing Right texture to native memory at " + leftTextureType.getPointer());
                            rightTextureType.write();
                        }
                    } else {
                        if( api instanceof OpenVR ) {
                            errl = ((OpenVR)api).getCompositor().Submit.apply(JOpenVRLibrary.EVREye.EVREye_Eye_Left, leftTextureType, null,
                                                                   JOpenVRLibrary.EVRSubmitFlags.EVRSubmitFlags_Submit_Default);
                            errr = ((OpenVR)api).getCompositor().Submit.apply(JOpenVRLibrary.EVREye.EVREye_Eye_Right, rightTextureType, null,
                                                                   JOpenVRLibrary.EVRSubmitFlags.EVRSubmitFlags_Submit_Default);
                        } else {

                        }
                    }

                    if( errl != 0 ){
                        logger.severe("Submit to left compositor error: " + OpenVRUtil.getEVRCompositorErrorString(errl)+" ("+Integer.toString(errl)+")");
                        logger.severe("  Texture color space: "+OpenVRUtil.getEColorSpaceString(leftTextureType.eColorSpace));
                        logger.severe("  Texture type: "+OpenVRUtil.getETextureTypeString(leftTextureType.eType));
                        logger.severe("  Texture handle: "+leftTextureType.handle);

                        logger.severe("  Left eye texture "+leftEyeTexture.getName()+" ("+leftEyeTexture.getImage().getId()+")");
                        logger.severe("                 Type: "+leftEyeTexture.getType());
                        logger.severe("                 Size: "+leftEyeTexture.getImage().getWidth()+"x"+leftEyeTexture.getImage().getHeight());
                        logger.severe("          Image depth: "+leftEyeTexture.getImage().getDepth());
                        logger.severe("         Image format: "+leftEyeTexture.getImage().getFormat());
                        logger.severe("    Image color space: "+leftEyeTexture.getImage().getColorSpace());
                    }

                    if( errr != 0 ){
                        logger.severe("Submit to right compositor error: " + OpenVRUtil.getEVRCompositorErrorString(errl)+" ("+Integer.toString(errl)+")");
                        logger.severe("  Texture color space: "+OpenVRUtil.getEColorSpaceString(rightTextureType.eColorSpace));
                        logger.severe("  Texture type: "+OpenVRUtil.getETextureTypeString(rightTextureType.eType));
                        logger.severe("  Texture handle: "+rightTextureType.handle);

                        logger.severe("  Right eye texture "+rightEyeTexture.getName()+" ("+rightEyeTexture.getImage().getId()+")");
                        logger.severe("                 Type: "+rightEyeTexture.getType());
                        logger.severe("                 Size: "+rightEyeTexture.getImage().getWidth()+"x"+rightEyeTexture.getImage().getHeight());
                        logger.severe("          Image depth: "+rightEyeTexture.getImage().getDepth());
                        logger.severe("         Image format: "+rightEyeTexture.getImage().getFormat());
                        logger.severe("    Image color space: "+rightEyeTexture.getImage().getColorSpace());
                    }
                }
            }
        } else {
            throw new IllegalStateException("This VR view manager is not attached to any VR environment.");
        }
    }
Initialize the system binds of the textures.
jme3-vr/src/main/java/com/jme3/input/vr/openvr/OpenVRViewManager.java