Class
MeshInstancePhaseBindGroup
View sourcePhase-local mesh-instance payload cache.
Constructor
View source
Properties
readonly buffer : UniformBuffer
View sourceDefault: ...
bindGroup : WebGLBindGroup | undefined
View sourceinstances : MeshInstanceUniform[]
View sourceMesh-instance uniforms in this phase.
Default: []
Methods
add ( meshInstance: MeshInstanceUniform ) : number
View source Adds a mesh-instance uniform to this phase.
clear ( ) : void
View source Removes all mesh-instance uniforms registered for this phase.
reserve ( instanceCount: number ) : void
View source Ensures the phase buffer can hold the requested number of slots.
getOffset ( index: number ) : number
View source Returns the byte offset for the supplied slot index.
setData ( index: number , meshInstance: MeshInstanceUniform ) : number
View source Writes a payload into the slot at the supplied index.
getBindGroup ( device: WebGLRenderDevice , caches: Caches , layout: WebGLBindGroupLayout ) : WebGLBindGroup
View source Returns a cached bind group for this phase, recreating it when the underlying GPU buffer changes.