Number of draw calls to perform.
Maximum number of multi-draw calls the space is allocated for.
Writes one draw command into the allocated storage.
The baseVertex and firstInstance arguments are used on WebGPU only, and ignored on WebGL2.
On WebGPU, baseVertex applies to a mesh with an index buffer only, and is ignored for a
mesh without one. A non-zero firstInstance requires
GraphicsDevice#supportsIndirectFirstInstance, otherwise the GPU skips the draw. The
shader reads firstInstance as part of the instance index (pcInstanceIndex in WGSL), which
makes it suitable for passing a per-draw value, such as an offset into instance data.
Draw index to update.
Number of indices or vertices to draw.
Number of instances to draw (use 1 if not instanced).
Starting index (in indices, not bytes) or starting vertex.
OptionalbaseVertex: number = 0
Signed base vertex, added to each index (WebGPU only, indexed meshes only). Defaults to 0.
OptionalfirstInstance: number = 0
First instance (WebGPU only). Defaults to 0.
Finalize and set draw count after all commands have been added.
Number of draws to execute.
Container holding parameters for multi-draw commands.
Obtain an instance via MeshInstance#setMultiDraw and populate it using add followed by update.