"use strict" var bindAttribs = require("./do-bind.js") function VertexAttribute(location, dimension, a, b, c, d) { this.location = location this.dimension = dimension this.a = a this.b = b this.c = c this.d = d } VertexAttribute.prototype.bind = function(gl) { switch(this.dimension) { case 1: gl.vertexAttrib1f(this.location, this.a) break case 2: gl.vertexAttrib2f(this.location, this.a, this.b) break case 3: gl.vertexAttrib3f(this.location, this.a, this.b, this.c) break case 4: gl.vertexAttrib4f(this.location, this.a, this.b, this.c, this.d) break } } function VAONative(gl, ext, handle) { this.gl = gl this._ext = ext this.handle = handle this._attribs = [] this._useElements = false this._elementsType = gl.UNSIGNED_SHORT } VAONative.prototype.bind = function() { this._ext.bindVertexArrayOES(this.handle) for(var i=0; i