GPUBufferBindingLayout constructor

GPUBufferBindingLayout({
  1. String type,
  2. bool hasDynamicOffset,
  3. int minBindingSize,
})

type is "uniform", "storage" or "read-only-storage".

hasDynamicOffset is what lets one buffer hold every object's uniform block and one bind group serve the whole frame, with GPURenderPassEncoder.setBindGroup's offsets choosing between them — and minBindingSize is the size the shader will read, checked once here rather than on every draw.

Implementation

external factory GPUBufferBindingLayout({
  String type,
  bool hasDynamicOffset,
  int minBindingSize,
});