({ gpuTexture }, data, width, height)
| 2462 | } |
| 2463 | |
| 2464 | uploadTextureFromData({ gpuTexture }, data, width, height) { |
| 2465 | this.queue.writeTexture( |
| 2466 | { texture: gpuTexture }, |
| 2467 | data, |
| 2468 | { bytesPerRow: width * 4, rowsPerImage: height }, |
| 2469 | { width, height, depthOrArrayLayers: 1 } |
| 2470 | ); |
| 2471 | |
| 2472 | // Force submission to ensure texture upload completes before usage |
| 2473 | this._hasPendingDraws = true; |
| 2474 | this.flushDraw(); |
| 2475 | } |
| 2476 | |
| 2477 | setTextureParams(_texture) {} |
| 2478 |