(name, vec)
| 114 | this.program.useProgram(); |
| 115 | } |
| 116 | setUniform(name, vec) { |
| 117 | const gl = this.gl; |
| 118 | const loc = this.program.getUniformLocation(name); |
| 119 | if (vec.length === 1) { |
| 120 | gl.uniform1fv(loc, vec); |
| 121 | } else if (vec.length === 2) { |
| 122 | gl.uniform2fv(loc, vec); |
| 123 | } else if (vec.length === 3) { |
| 124 | gl.uniform3fv(loc, vec); |
| 125 | } else if (vec.length === 4) { |
| 126 | gl.uniform4fv(loc, vec); |
| 127 | } |
| 128 | } |
| 129 | bindTextures(textures) { |
| 130 | const gl = this.gl; |
| 131 | let textureId = 0; |
nothing calls this directly
no test coverage detected