WebGPUStorageBuffer constructor

WebGPUStorageBuffer(
  1. dynamic name,
  2. dynamic attribute
)

Implementation

WebGPUStorageBuffer(name, attribute) : super(name) {
  this.type = GPUBindingType.StorageBuffer;

  this.usage = GPUBufferUsage.Uniform |
      GPUBufferUsage.Vertex |
      GPUBufferUsage.Storage |
      GPUBufferUsage.CopyDst;

  this.attribute = attribute;
  this.bufferGPU = null; // set by the renderer
}