Class
ViewBindGroup
View sourcePer-view bind group state shared by the renderer and plugins.
Plugins register explicit slot descriptors and the renderer keeps the layout current while callers create transient bind groups on demand.
Constructor
Methods
static uniform ( binding: number , name: string , minBindingSize?: number , hasDynamicOffset?: boolean ) : ViewUniformSlot
View source Creates a uniform-buffer slot descriptor.
static texture ( binding: number , name: string , viewDimension?: "2d" | "2d-array" | "cube" | "3d" ) : ViewTextureSlot
View source Creates a texture slot descriptor.
static sampler ( binding: number , name: string ) : ViewSamplerSlot
View source Creates a sampler slot descriptor.
set ( slot: ViewUniformSlot , resource: UniformBuffer ) : ViewBindGroup
View source Registers a slot/resource pair. The slot binding must be empty.
setOrReplace ( slot: ViewUniformSlot , resource: UniformBuffer ) : ViewBindGroup
View source Registers or replaces a slot/resource pair. Use this for resources that may change between frames.
get ( binding: number ) : ViewBindGroupItem | undefined
View source Returns the registered item at the binding point, if any.
items ( ) : ViewBindGroupItem[]
View source Returns all registered items in ascending binding order.
update ( device: WebGLRenderDevice ) : WebGLBindGroupLayout
View source Ensures the view bind group layout is up to date.
createBindGroup ( device: WebGLRenderDevice , caches: Caches ) : WebGLBindGroup
View source Creates a transient view bind group for the current layout.