createTexture method

  1. @override
TextureHandle createTexture(
  1. RenderTargetSpec spec, {
  2. int levels = 1,
})

A brand-new texture matching spec, with the single TextureHandle that will ever stand for it.

Implementation

@override
TextureHandle createTexture(RenderTargetSpec spec, {int levels = 1}) => guard(
  'a ${spec.width}x${spec.height} ${spec.format.name} target',
  () => webgpuCreateTexture(gpuDevice, _textures, spec, levels: levels),
);