/** * A bind group represents a collection of {@link UniformBuffer}, {@link Texture} and * {@link StorageBuffer} instanced, which can be bind on a GPU for rendering. * * @ignore */ export class BindGroup { /** * Create a new Bind Group. * * @param {import('./graphics-device.js').GraphicsDevice} graphicsDevice - The graphics device * used to manage this uniform buffer. * @param {import('./bind-group-format.js').BindGroupFormat} format - Format of the bind group. * @param {import('./uniform-buffer.js').UniformBuffer} [defaultUniformBuffer] - The default * uniform buffer. Typically a bind group only has a single uniform buffer, and this allows * easier access. */ constructor(graphicsDevice: import("./graphics-device.js").GraphicsDevice, format: import("./bind-group-format.js").BindGroupFormat, defaultUniformBuffer?: import("./uniform-buffer.js").UniformBuffer); /** * A render version the bind group was last updated on. * * @type {number} * @ignore */ renderVersionUpdated: number; /** @type {import('./uniform-buffer.js').UniformBuffer[]} */ uniformBuffers: import("./uniform-buffer.js").UniformBuffer[]; /** * An array of offsets for each uniform buffer in the bind group. This is the offset in the * buffer where the uniform buffer data starts. * * @type {number[]} */ uniformBufferOffsets: number[]; id: number; device: import("./graphics-device.js").GraphicsDevice; format: import("./bind-group-format.js").BindGroupFormat; dirty: boolean; impl: any; textures: any[]; storageTextures: any[]; storageBuffers: any[]; /** @type {import('./uniform-buffer.js').UniformBuffer} */ defaultUniformBuffer: import("./uniform-buffer.js").UniformBuffer; /** * Frees resources associated with this bind group. */ destroy(): void; /** * Assign a uniform buffer to a slot. * * @param {string} name - The name of the uniform buffer slot * @param {import('./uniform-buffer.js').UniformBuffer} uniformBuffer - The Uniform buffer to * assign to the slot. */ setUniformBuffer(name: string, uniformBuffer: import("./uniform-buffer.js").UniformBuffer): void; /** * Assign a storage buffer to a slot. * * @param {string} name - The name of the storage buffer slot. * @param {import('./storage-buffer.js').StorageBuffer} storageBuffer - The storage buffer to * assign to the slot. */ setStorageBuffer(name: string, storageBuffer: import("./storage-buffer.js").StorageBuffer): void; /** * Assign a texture to a named slot. * * @param {string} name - The name of the texture slot. * @param {import('./texture.js').Texture} texture - Texture to assign to the slot. */ setTexture(name: string, texture: import("./texture.js").Texture): void; /** * Assign a storage texture to a named slot. * * @param {string} name - The name of the texture slot. * @param {import('./texture.js').Texture} texture - Texture to assign to the slot. */ setStorageTexture(name: string, texture: import("./texture.js").Texture): void; /** * Updates the uniform buffers in this bind group. */ updateUniformBuffers(): void; /** * Applies any changes made to the bind group's properties. Note that the content of used * uniform buffers needs to be updated before calling this method. */ update(): void; }