| 35 | } |
| 36 | |
| 37 | defineTexture() { |
| 38 | const { context: gl } = this; |
| 39 | gl.activeTexture(this.contextHandle); |
| 40 | gl.bindTexture(gl.TEXTURE_2D, this.texture); |
| 41 | gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE); |
| 42 | gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE); |
| 43 | gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST); |
| 44 | gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST); |
| 45 | } |
| 46 | |
| 47 | setupTexture() { |
| 48 | this.contextHandle = this.onRequestContextHandle(); |