@Override
    public void simpleInitApp() {
        flyCam.setEnabled(false);

        Geometry blueBox = new Geometry("blue box", mesh);
        Material blueMat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
        blueMat.setColor("Color", ColorRGBA.Blue);
        blueBox.setMaterial(blueMat);
        rootNode.attachChild(blueBox);

        Camera rightCam = cam.clone();
        rightCam.setViewPort(0.5f, 1f, 0f, 1f);

        rightView = renderManager.createMainView("right", rightCam);
        rightView.setClearFlags(true, true, true);
        rightView.setEnabled(false);
        rightView.attachScene(rootNode);

        Geometry redBox = new Geometry("red box", mesh);
        Material redMat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
        redMat.setColor("Color", ColorRGBA.Red);
        redBox.setMaterial(redMat);
        leftScene.attachChild(redBox);

        Camera leftCam = cam.clone();
        leftCam.setViewPort(0f, 0.5f, 0f, 1f);

        leftView = renderManager.createMainView("left", leftCam);
        leftView.setClearFlags(true, true, true);
        leftView.setEnabled(false);
        leftView.attachScene(leftScene);

        inputManager.addMapping("lmb", new MouseButtonTrigger(MouseInput.BUTTON_LEFT));
        inputManager.addListener(this, "lmb");
    }
Simple application to test split-screen rendering. Clicking with LMB toggles
between a single camera/viewport (cam) and split screen (leftCam plus
rightCam). See issue #357.
jme3-examples/src/main/java/jme3test/renderer/TestSplitScreen.java