MCPcopy
hub / github.com/processing/p5.js / uploadTextureFromData

Method uploadTextureFromData

src/webgpu/p5.RendererWebGPU.js:2464–2475  ·  view source on GitHub ↗
({ gpuTexture }, data, width, height)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

flushDrawMethod · 0.95

Tested by

no test coverage detected