Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for MultiDraw functions #219

Open
FarhanWaldo opened this issue Apr 26, 2022 · 3 comments
Open

Support for MultiDraw functions #219

FarhanWaldo opened this issue Apr 26, 2022 · 3 comments

Comments

@FarhanWaldo
Copy link

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

@pervognsen
Copy link

pervognsen commented May 20, 2022

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.

@expenses
Copy link
Contributor

expenses commented Jun 4, 2022

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.

@ennis
Copy link

ennis commented Oct 11, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants