coderef

WEBGL_multi_draw WebGL extensionLimited availability

The WEBGL_multi_draw extension for WebGL 1.0 and 2.0 contexts renders more than one primitive with a single function call.

Not yet supported in all major browsers — check the table and provide a fallback.

Browser support

DesktopChrome
1–85Not supported
86+Supportedsince Oct 20, 2020
Current: 155
Edge
12–85Not supported
86+Supportedsince Oct 9, 2020
Current: 154
Firefox
✕Not supportedup to 157
Current: 157
Safari
1–14.1Not supported
15+Supportedsince Sep 20, 2021
Current: 27
MobileChrome Android
18–85Not supported
86+Supportedsince Oct 20, 2020
Current: 155
Firefox Android
✕Not supportedup to 157
Current: 157
Safari iOS
1–14.5Not supported
15+Supportedsince Sep 20, 2021
Current: 27

How to use

Not supported in Firefox, Firefox Android. Use feature detection below and provide a fallback (or a polyfill) for those browsers.

Example

Full syntax and examples are on MDN: WEBGL multi draw.

Feature detection

JS · check before using
if ("WEBGL_multi_draw" in globalThis) {
  // WEBGL_multi_draw is available
} else {
  // load a polyfill or use a fallback
}

Sub-features

Support for each part of the feature (5). The overall table above shows when the whole feature works.

Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
WEBGL_multi_draw8686✕1586✕15
WEBGL_multi_draw.multiDrawArraysInstancedWEBGL8686✕1586✕15
WEBGL_multi_draw.multiDrawArraysWEBGL8686✕1586✕15
WEBGL_multi_draw.multiDrawElementsInstancedWEBGL8686✕1586✕15
WEBGL_multi_draw.multiDrawElementsWEBGL8686✕1586✕15