mgpuCreateTexture2D function

MGPUTexture? mgpuCreateTexture2D(
  1. int width,
  2. int height,
  3. int format,
  4. int usage,
  5. int layers,
  6. int mipLevels,
)

Implementation

MGPUTexture? mgpuCreateTexture2D(
  int width,
  int height,
  int format,
  int usage,
  int layers,
  int mipLevels,
) {
  if (!hasTextureResourceV1) return null;
  final texture = _mgpuCreateTexture2D(
    width.toJS,
    height.toJS,
    format.toJS,
    usage.toJS,
    layers.toJS,
    mipLevels.toJS,
  );
  return texture.toDartInt == 0 ? null : texture;
}