writeTexture method
void
writeTexture(
- GPUTexelCopyTextureInfo destination,
- JSObject data,
- GPUTexelCopyBufferLayout dataLayout,
- GPUExtent3DDict size,
Pixels into a texture, at a mip level and an array layer named by
destination.
This is how a cube face and a mip level get their contents. There is
no six-argument upload call and no face enumeration in WebGPU: a cube is a
six-layer 2D array, a face is origin.z, and a level is mipLevel. The
contract's createCubeTextureFromPixels becomes six of these per level.
Implementation
external void writeTexture(
GPUTexelCopyTextureInfo destination,
JSObject data,
GPUTexelCopyBufferLayout dataLayout,
GPUExtent3DDict size,
);