(gl: WebGLRenderingContext, ndarray: *)
| 376 | } |
| 377 | |
| 378 | export function createNDArrayTexture(gl: WebGLRenderingContext, ndarray: *) { |
| 379 | const texture = gl.createTexture(); |
| 380 | gl.bindTexture(gl.TEXTURE_2D, texture); |
| 381 | // webgltexture-loader-ndarray@2.1.x signature: (gl, ndarray, floatSupported). |
| 382 | // The function operates on the currently-bound texture; we just bound `texture`. |
| 383 | const floatSupported = !!gl.getExtension("OES_texture_float_linear"); |
| 384 | drawNDArrayTexture(gl, ndarray, floatSupported); |
| 385 | return texture; |
| 386 | } |
| 387 | class FakeTextureLoader extends WebGLTextureLoader<FakeTexture> { |
| 388 | textures: Array<WebGLTexture>; |
| 389 | constructor(gl: WebGLRenderingContext) { |
no outgoing calls
searching dependent graphs…