mgpuCreateTexture2D function
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;
}