mgpuCreateBufferWithUsage function

MGPUBuffer? mgpuCreateBufferWithUsage(
  1. int sizeBytes,
  2. int usage
)

Implementation

MGPUBuffer? mgpuCreateBufferWithUsage(int sizeBytes, int usage) {
  if (!hasBufferDescriptorV1) return null;
  final result = _mgpuCreateBufferWithUsage(sizeBytes.toJS, usage.toJS);
  return result.toDartInt == 0 ? null : result;
}