old_contents: var regl = require('../regl')()
  var baboon = require('baboon-image')
  
  regl({
    frag: `
    precision mediump float;
    uniform sampler2D texture;
    varying vec2 uv;
    void main () {
      gl_FragColor = texture2D(texture, uv);
    }`,
  
    vert: `
    precision mediump float;
    attribute vec2 position;
    varying vec2 uv;
    void main () {
      uv = position;
      gl_Position = vec4(1.0 - 2.0 * position, 0, 1);
    }`,
  
    attributes: {
      position: regl.buffer([
        -2, 0,
        0, -2,
        2, 2])
    },
  
    uniforms: {
      texture: regl.texture(baboon)
    },
  
    count: 3
  })()
  
new_contents: const regl = require('../regl')()
  const baboon = require('baboon-image')
  
  regl({
    frag: `
    precision mediump float;
    uniform sampler2D texture;
    varying vec2 uv;
    void main () {
      gl_FragColor = texture2D(texture, uv);
    }`,
  
    vert: `
    precision mediump float;
    attribute vec2 position;
    varying vec2 uv;
    void main () {
      uv = position;
      gl_Position = vec4(1.0 - 2.0 * position, 0, 1);
    }`,
  
    attributes: {
      position: [
        -2, 0,
        0, -2,
        2, 2]
    },
  
    uniforms: {
      texture: regl.texture(baboon)
    },
  
    count: 3
  })()
  
subject: update texture example