(textures)
| 127 | } |
| 128 | } |
| 129 | bindTextures(textures) { |
| 130 | const gl = this.gl; |
| 131 | let textureId = 0; |
| 132 | for (const [name, tex] of textures) { |
| 133 | const loc = this.program.getUniformLocation(name); |
| 134 | // Make the textureId unit active. |
| 135 | gl.activeTexture(gl.TEXTURE0 + textureId); |
| 136 | // Binds the texture to a TEXTURE_2D target. |
| 137 | tex.bindTexture(); |
| 138 | // Binds the texture at given location to texture unit textureId. |
| 139 | gl.uniform1i(loc, textureId); |
| 140 | textureId++; |
| 141 | } |
| 142 | } |
| 143 | finalizeProcessFrame() { |
| 144 | this.frame.bindFramebuffer(); |
| 145 | this.quad.draw(); |
no test coverage detected