Bind multiple Uniform Buffer Objects
问题 With WebGL 2 we now can play with Uniform Buffer Objects. They look like a great idea, not having to attach common uniforms to every single program (like projection and view matrices that are common to every object being rendered). I created an helper class which I call every time I want to bind a uniform buffer object. class UniformBuffer { constructor(gl, data, boundLocation = 0) { this.boundLocation = boundLocation; this.data = new Float32Array(data); this.buffer = gl.createBuffer(); gl