glow icon indicating copy to clipboard operation
glow copied to clipboard

Support for MultiDraw functions

Open FarhanWaldo opened this issue 4 years ago • 3 comments

Hi! I couldn't find a way to use multi draw indirect functions using glow, I hope I didn't just miss something obvious. Will functions like this be supported eventually? https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glMultiDrawElementsIndirect.xhtml

FarhanWaldo avatar Apr 26 '22 11:04 FarhanWaldo

The multi-draw functions have been around in OpenGL since 2.0 but they are not available in OpenGL ES and WebGL. Under the hood, they don't actually do anything very useful, which is why they weren't included in ES; they don't map to fewer draw calls at the lower GPU driver level.

pervognsen avatar May 20 '22 02:05 pervognsen

Chrome implements a multidraw extension for webgl: https://www.khronos.org/registry/webgl/extensions/WEBGL_multi_draw/

It doesn't speed up anything at the driver level but it does reduce the number of times you're going back and forth between wasm and js.

expenses avatar Jun 04 '22 16:06 expenses

If I'm not mistaken those functions are the only way to execute multiple draw commands generated by the GPU (via SSBOs bound to GL_DRAW_INDIRECT_BUFFER), so they can be useful in that sense. Though I'm not sure if the webgl extension supports that.

ennis avatar Oct 11 '23 09:10 ennis