Create a new UniformBuffer instance.
The graphics device used to manage this uniform buffer.
Format of the uniform buffer.
Optional
persistent: boolean = trueWhether the buffer is persistent. Defaults to true.
A render version used to track the last time the properties requiring bind group to be updated were changed.
Assign a storage to this uniform buffer.
The storage to assign to this uniform buffer.
Frees resources associated with this uniform buffer.
Called when the rendering context was lost. It releases all context related resources.
Assign a value to the uniform specified by name.
The name of the uniform.
The value to assign to the uniform.
Assign a value to the uniform specified by its format. This is the fast version of assigning a value to a uniform, avoiding any lookups.
The format of the uniform.
The value to assign to the uniform.
Optional
dynamicBindGroup: DynamicBindGroupThe function fills in the info about the dynamic bind group for this frame, which uses this uniform buffer. Only used if the uniform buffer is non-persistent. This allows the uniform buffer to be used without having to create a bind group for it. Note that the bind group can only contains this single uniform buffer, and no other resources.
A uniform buffer represents a GPU memory buffer storing the uniforms.