public void setReadDrawBuffers(FrameBuffer fb) {
        if (gl2 == null) {
            return;
        }

        final int NONE    = -2;
        final int INITIAL = -1;
        final int MRT_OFF = 100;

        if (fb != null) {
          
            if (fb.getNumColorBuffers() == 0) {
                // make sure to select NONE as draw buf
                // no color buffer attached.                
                gl2.glDrawBuffer(GL.GL_NONE);             
                gl2.glReadBuffer(GL.GL_NONE);                 
            } else {
                if (fb.getNumColorBuffers() > limits.get(Limits.FrameBufferAttachments)) {
                    throw new RendererException("Framebuffer has more color "
                            + "attachments than are supported"
                            + " by the video hardware!");
                }
                if (fb.isMultiTarget()) {
                    if (!caps.contains(Caps.FrameBufferMRT)) {
                        throw new RendererException("Multiple render targets "
                                + " are not supported by the video hardware");
                    }
                    if (fb.getNumColorBuffers() > limits.get(Limits.FrameBufferMrtAttachments)) {
                        throw new RendererException("Framebuffer has more"
                                + " multi targets than are supported"
                                + " by the video hardware!");
                    }

                    intBuf16.clear();
                    for (int i = 0; i < fb.getNumColorBuffers(); i++) {
                        intBuf16.put(GLFbo.GL_COLOR_ATTACHMENT0_EXT + i);
                    }

                    intBuf16.flip();
                    glext.glDrawBuffers(intBuf16);
                } else {
                    RenderBuffer rb = fb.getColorBuffer(fb.getTargetIndex());
                    // select this draw buffer
                    gl2.glDrawBuffer(GLFbo.GL_COLOR_ATTACHMENT0_EXT + rb.getSlot());
                    // select this read buffer
                    gl2.glReadBuffer(GLFbo.GL_COLOR_ATTACHMENT0_EXT + rb.getSlot());
                }
            }
        }

    }
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