Adds a draw range to the list for the current frame.
The draw range to add. start is a index offset,
count is the number of indices.
Resets the list for the next frame.
Must be called at the beginning of each frame before pushing new ranges.
Merges overlapping or contiguous ranges and writes the results into
the provided multiDraw buffers.
Ranges are sorted by start and merged in a single linear pass.
Merging reduces the number of draw calls when adjacent geometry
shares contiguous buffer regions.
Must be called after all push calls for the current frame,
and before issuing the multiDraw GPU call.
Output buffer for draw call start offsets, in bytes. Must be large enough to hold all merged intervals.
Output buffer for draw call element counts.
Must be the same size as multiDrawStarts.
Byte size of one index element.
The number of merged draw calls written to the output buffers.
Returns 0 if no ranges were pushed.
Manages a list of draw ranges for WebGL
multiDrawcalls.Designed for use in a batched rendering pipeline where multiple geometry ranges need to be drawn in a single GPU call. Handles range collection, interval merging, and buffer writing.
Usage