GPUBindGroupEntry.buffer constructor

GPUBindGroupEntry.buffer({
  1. int binding,
  2. GPUBufferBinding resource,
})

A slice of a buffer at binding.

The IDL types resource as a union of three unrelated things, so this is three constructors for the reason GPUBindGroupLayoutEntry is three: a union typed as JSAny accepts anything at all, including the texture a caller meant to put in the next slot.

Implementation

external factory GPUBindGroupEntry.buffer({
  int binding,
  GPUBufferBinding resource,
});