Function updateTexture2DArrayFromPixels
-
updateTexture2DArrayFromPixels(
engine: EngineContext,
tex: Texture2DArray,
data: Uint8Array,
mipLevel?: number,
): voidParameters
- engine: EngineContext
Engine context.
- tex: Texture2DArray
Target texture array (from
createTexture2DArray/createTexture2DArrayFromPixels). - data: Uint8Array
mipWidth * mipHeight * tex.layers * 4bytes, RGBA8, layer-major. - mipLevel: number = 0
Destination mip level (default 0). Level dimensions are
max(1, size >> mipLevel).
Returns void
- engine: EngineContext
Re-upload one mip level of every layer of a texture array from a tightly-packed RGBA8 byte buffer. This is the runtime counterpart to createTexture2DArrayFromPixels.
Uploading the base level (
mipLevel = 0) of a mipmapped array regenerates the rest of the chain; uploading an explicit higher level writes only that level, so an application can author its own mip chain level by level.