Function createDynamicTexture
-
createDynamicTexture(
engine: EngineContext,
width: number,
height: number,
options?: DynamicTexture2DOptions,
): DynamicTexture2DParameters
- engine: EngineContext
Engine context.
- width: number
Texture width in texels (>= 1).
- height: number
Texture height in texels (>= 1).
- options: DynamicTexture2DOptions = {}
Sampler / format / mipmap overrides.
Returns DynamicTexture2D
- engine: EngineContext
Create a blank, immediately-sampleable
DynamicTexture2Dofwidth × heightwhose pixels are pushed on demand with updateDynamicTexture. Reads as transparent black until the first update.The texture is created with
TEXTURE_BINDING | COPY_DST | RENDER_ATTACHMENTusage —copyExternalImageToTexture(used by the update helper) requires bothCOPY_DSTandRENDER_ATTACHMENTon the destination, and the render attachment is also what the mipmap-blit pass writes into.