public void updateFrameBuffer(FrameBuffer fb) {
        if (fb.getNumColorBuffers() == 0 && fb.getDepthBuffer() == null) {
            throw new IllegalArgumentException("The framebuffer: " + fb
                    + "\nDoesn't have any color/depth buffers");
        }

        int id = fb.getId();
        if (id == -1) {
            glfbo.glGenFramebuffersEXT(intBuf1);
            id = intBuf1.get(0);
            fb.setId(id);
            objManager.registerObject(fb);
            statistics.onNewFrameBuffer();
        }

        bindFrameBuffer(fb);

        FrameBuffer.RenderBuffer depthBuf = fb.getDepthBuffer();
        if (depthBuf != null) {
            updateFrameBufferAttachment(fb, depthBuf);
        }

        for (int i = 0; i < fb.getNumColorBuffers(); i++) {
            FrameBuffer.RenderBuffer colorBuf = fb.getColorBuffer(i);
            updateFrameBufferAttachment(fb, colorBuf);
        }

        setReadDrawBuffers(fb);
        checkFrameBufferError();

        fb.clearUpdateNeeded();
    }
Copy the source buffer to the destination buffer, including both color
and depth.

@param src the source buffer (unaffected)
@param dst the destination buffer
jme3-core/src/main/java/com/jme3/renderer/opengl/GLRenderer.java