A group of Uniforms, Storages, Textures and Samplers described by a GPUBindGroupLayout. This is used to bind resources to a GPU resource (e.g. GPUBuffer, GPUTexture) in a shader.

Hierarchy

  • components
    • BindGroup

Constructors

Properties

_device?: GPUDevice
_generatedLayout?: GPUBindGroupLayout
_givenLayout?: GPUBindGroupLayout
_group?: GPUBindGroup
canvas?: HTMLCanvasElement
canvasFormat: GPUTextureFormat = ...
index: number
label?: string
samplers: Sampler[] = []
storages: Storage[] = []
textures: Texture[] = []
uniforms: Uniform[] = []

Accessors

  • get group(): undefined | GPUBindGroup
  • Returns undefined | GPUBindGroup

  • get layout(): undefined | GPUBindGroupLayout
  • Returns undefined | GPUBindGroupLayout

Methods

  • Parameters

    Returns Promise<void>

  • Parameters

    Returns Promise<void>

  • Parameters

    Returns Promise<void>

  • Parameters

    Returns Promise<void>

  • Parameters

    • canvas: HTMLCanvasElement

    Returns void

  • Parameters

    • label: string

    Returns void

  • Update the GPUBindGroup and GPUBindGroupLayout for this bind group, if using an automatically generated layout. This will create a new bind group and bind group layout if one does not already exist. This will generally only be called once, after all resources have been added to the bind group.

    Returns Promise<GPUBindGroup>

Generated using TypeDoc