Hi,
What's the status of the WEBGL_draw_instanced_base_vertex_base_instance extension, which is in draft state and hasn't been updated for two years? It seems available in Chrome upon enabling the "WebGL Draft Extensions" flag.
My use case: I have a large buffer comprising hundreds of concatenated "slices," each representing a varying number of instanced meshes. I'm rendering different combinations of these slices.
Because gl.drawArraysInstanced does not support the baseInstance parameter, I have worked around the limitation by calling vertexAttribPointer with a suitable offset for each buffer before the draw call. There are also other possible techniques, but none of them is perfect.
While the baseInstance would allow for reducing the number of WebGL calls from ~4000 to ~1500 with my data set, the multi-draw variant of the extension would be fantastic – only a few calls would be enough. Multi draw without base instances cannot be used in this situation.
Here's a snippet that demonstrates the use of the extension when available:
https://github.com/genome-spy/genome-spy/blob/1de9e1844a0bc23117f4ed82e781618f5a4deb1c/packages/core/src/marks/link.js#L188
For those interested, here's a video of the use case:
https://twitter.com/KariLavikka/status/1735651512053850590 (I'm rendering a large number of arcs using Bézier curves. The slices represent different samples that are shown as horizontal "tracks".)
Best,
Kari