({ width, height, format, dataType })
| 1185 | } |
| 1186 | |
| 1187 | createTexture({ width, height, format, dataType }) { |
| 1188 | const gl = this.GL; |
| 1189 | const tex = gl.createTexture(); |
| 1190 | gl.bindTexture(gl.TEXTURE_2D, tex); |
| 1191 | gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, width, height, 0, |
| 1192 | gl.RGBA, gl.UNSIGNED_BYTE, null); |
| 1193 | // TODO use format and data type |
| 1194 | return { texture: tex, glFormat: gl.RGBA, glDataType: gl.UNSIGNED_BYTE }; |
| 1195 | } |
| 1196 | |
| 1197 | createFramebufferTextureHandle(framebufferTexture) { |
| 1198 | // For WebGL, framebuffer texture handles are designed to be null |
no test coverage detected