GPUBindingCommandsMixin
- class wgpu.GPUBindingCommandsMixin
Bases:
objectMixin for classes that defines bindings.
- set_bind_group(index: int, bind_group: GPUBindGroup, dynamic_offsets_data: Sequence[int] = (), dynamic_offsets_data_start: int | None = None, dynamic_offsets_data_length: int | None = None) None
Associate the given bind group (i.e. group or resources) with the given slot/index.
- Parameters:
index (int) – The slot to bind at.
bind_group (
GPUBindGroup) – The bind group to bind.dynamic_offsets_data (list of int) – A list of offsets (one for each entry in bind group marked as
buffer.has_dynamic_offset). Default[].dynamic_offsets_data_start (int) – Offset in elements into dynamic_offsets_data where the buffer offset data begins. Default None.
dynamic_offsets_data_length (int) – Number of buffer offsets to read from dynamic_offsets_data. Default None.
- set_immediates(range_offset: int, data: memoryview | object, data_offset: int = 0, data_size: int | None = None) None
Set immediate data for subsequent draw calls.
Writes
data_sizebytes fromdatato immediate storage, starting at the specified offset. These bytes are visible to all stages.Requires the “immediates” feature to be enabled.