(gl, source, i)
| 4804 | } |
| 4805 | |
| 4806 | function createTexture(gl, source, i) { |
| 4807 | var texture = gl.createTexture(); |
| 4808 | activeTexture(gl, i); |
| 4809 | gl.bindTexture(gl.TEXTURE_2D, texture); |
| 4810 | |
| 4811 | // Set the parameters so we can render any size image. |
| 4812 | gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE); |
| 4813 | gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE); |
| 4814 | gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR); |
| 4815 | gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR); |
| 4816 | |
| 4817 | updateTexture(gl, source); |
| 4818 | |
| 4819 | return texture; |
| 4820 | } |
| 4821 | |
| 4822 | function createUniform(gl, program, type, name) { |
| 4823 | var location = gl.getUniformLocation(program, "u_" + name); |
nothing calls this directly
no test coverage detected