GPUTextureDescriptor constructor

GPUTextureDescriptor({
  1. GPUExtent3DDict size,
  2. String format,
  3. int usage,
  4. int sampleCount,
  5. int mipLevelCount,
  6. String dimension,
  7. String label,
})

usage is a bitwise or of GpuTextureUsage values.

A cube map is dimension "2d" with a size whose depthOrArrayLayers is six — the cube-ness is a property of the view, not of the texture, which is the one place this API is simpler than the ones the other three backends sit on.

Implementation

external factory GPUTextureDescriptor({
  GPUExtent3DDict size,
  String format,
  int usage,
  int sampleCount,
  int mipLevelCount,
  String dimension,
  String label,
});