private int convertAttachmentSlot(int attachmentSlot) {
        // can also add support for stencil here
        if (attachmentSlot == FrameBuffer.SLOT_DEPTH) {
            return GLFbo.GL_DEPTH_ATTACHMENT_EXT;
        } else if (attachmentSlot == FrameBuffer.SLOT_DEPTH_STENCIL) {
            // NOTE: Using depth stencil format requires GL3, this is already
            // checked via render caps.
            return GL3.GL_DEPTH_STENCIL_ATTACHMENT;
        } else if (attachmentSlot < 0 || attachmentSlot >= 16) {
            throw new UnsupportedOperationException("Invalid FBO attachment slot: " + attachmentSlot);
        }

        return GLFbo.GL_COLOR_ATTACHMENT0_EXT + attachmentSlot;
    }
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