(source)
| 179 | } |
| 180 | |
| 181 | _createTexture(source) { |
| 182 | const gl = this.gl; |
| 183 | const texture = gl.createTexture(); |
| 184 | |
| 185 | gl.bindTexture(gl.TEXTURE_2D, texture); |
| 186 | gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE); |
| 187 | gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE); |
| 188 | gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR); |
| 189 | gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR); |
| 190 | |
| 191 | if (source) { |
| 192 | gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, source); |
| 193 | } |
| 194 | |
| 195 | return texture; |
| 196 | } |
| 197 | |
| 198 | _createFramebuffer(width, height) { |
| 199 | const gl = this.gl; |
no outgoing calls
no test coverage detected