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
})()

@@ -1,11 +1,13 @@
-var
+const
  regl = 
@@ -27,19 +27,21 @@
 egl')()%0A
-var
+const
  baboon 
@@ -438,20 +438,8 @@
 on: 
-regl.buffer(
 %5B%0A  
@@ -473,17 +473,16 @@
    2, 2%5D
-)
 %0A  %7D,%0A%0A 

update texture example