MCPcopy Index your code
hub / github.com/processing/p5.js / createTexture

Method createTexture

src/webgpu/p5.RendererWebGPU.js:2439–2450  ·  view source on GitHub ↗
({ width, height, format = 'rgba8unorm', usage })

Source from the content-addressed store, hash-verified

2437 _unbindFramebufferTexture(uniform) {}
2438
2439 createTexture({ width, height, format = 'rgba8unorm', usage }) {
2440 const gpuTexture = this.device.createTexture({
2441 size: [width, height],
2442 format,
2443 usage: usage || (
2444 GPUTextureUsage.TEXTURE_BINDING |
2445 GPUTextureUsage.COPY_DST |
2446 GPUTextureUsage.RENDER_ATTACHMENT
2447 ),
2448 });
2449 return { gpuTexture, view: gpuTexture.createView() };
2450 }
2451
2452 uploadTextureFromSource({ gpuTexture }, source) {
2453 this.queue.copyExternalImageToTexture(

Callers 3

_updateSizeMethod · 0.45
_prepareMipmapDataMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected