Virtual-WebGL (share resources + more contexts)

Skip to first unread message

Gregg Tavares

Mar 30, 2022, 2:17:54 PM3/30/22
to WebGL Dev List
Just passing this on. I wrote a WebGL / WebGL2 wrapper that simulates multiple webgl contexts on top of a single actual webgl context.

I'd actually written it a while ago but that version queried the state and was too slow. I updated it to shadow the state and now it's fast.

Uses include

(*) sharing resources across contexts / libraries.
(*) using more contexts than the browser itself allows

I mostly wrote it just as something fun to try to write but recently someone had a real need which led to the update.

Ken Russell

Mar 30, 2022, 4:49:50 PM3/30/22
to WebGL Dev List
This is a super useful library! Multiple customers have requested this functionality recently. Thanks Gregg for writing this and sharing it!


You received this message because you are subscribed to the Google Groups "WebGL Dev List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

Philip Taylor

Mar 30, 2022, 9:13:44 PM3/30/22
Thanks a lot Gregg. 
This is exactly what I was looking for to build a 'material palette' where I need webgl rendering to lots of small canvases.

Zea Homepage
CTO, Zea Inc.

Montréal, Québec

The contents of this e-mail are confidential with all rights reserved to the author. It is illegal to use or divulge this information without authorization. If you have received this e-mail by mistake, please notify me immediately by replying to the e-mail. 
Reply all
Reply to author
0 new messages