function resizeFramebufferInfo(gl, framebufferInfo, attachments, width, height) {
    width  = width  || gl.drawingBufferWidth;
    height = height || gl.drawingBufferHeight;
    framebufferInfo.width = width;
    framebufferInfo.height = height;
    attachments = attachments || defaultAttachments;
    attachments.forEach(function(attachmentOptions, ndx) {
      var attachment = framebufferInfo.attachments[ndx];
      var format = attachmentOptions.format;
      if (attachment instanceof WebGLRenderbuffer) {
        gl.bindRenderbuffer(gl.RENDERBUFFER, attachment);
        gl.renderbufferStorage(gl.RENDERBUFFER, format, width, height);
      } else if (attachment instanceof WebGLTexture) {
        textures.resizeTexture(gl, attachment, attachmentOptions, width, height);
      } else {
        throw "unknown attachment type";
      }
    });
  }
Resizes the attachments of a framebuffer.

You need to pass in the same `attachments` as you passed in {@link module:twgl.createFramebufferInfo}
because TWGL has no idea the format/type of each attachment.

The simplest usage

    // create an RGBA/UNSIGNED_BYTE texture and DEPTH_STENCIL renderbuffer
    var fbi = twgl.createFramebufferInfo(gl);

    ...

    function render() {
      if (twgl.resizeCanvasToDisplaySize(gl.canvas)) {
        // resize the attachments
        twgl.resizeFramebufferInfo(gl, fbi);
      }

More complex usage

    // create an RGB565 renderbuffer and a STENCIL_INDEX8 renderbuffer
    var attachments = [
      { format: RGB565, mag: NEAREST },
      { format: STENCIL_INDEX8 },
    ]
    var fbi = twgl.createFramebufferInfo(gl, attachments);

    ...

    function render() {
      if (twgl.resizeCanvasToDisplaySize(gl.canvas)) {
        // resize the attachments to match
        twgl.resizeFramebufferInfo(gl, fbi, attachments);
      }

@param {WebGLRenderingContext} gl the WebGLRenderingContext
@param {module:twgl.FramebufferInfo} framebufferInfo a framebufferInfo as returned from {@link module:twgl.createFramebufferInfo}.
@param {module:twgl.AttachmentOptions[]} [attachments] the same attachments options as passed to {@link module:twgl.createFramebufferInfo}.
@param {number} [width] the width for the attachments. Default = size of drawingBuffer
@param {number} [height] the height for the attachments. Defautt = size of drawingBuffer
@memberOf module:twgl/framebuffers