It is important to remember that any calls to OpenGL from WebAssembly are calling WebGL using a function table. Part of the reason this is important is because any time you use OpenGL ES and OpenGL functionality that is not available in WebGL, Emscripten must perform some very slow software emulation on those functions. It is also important to remember that WebGL calls are more expensive than OpenGL calls on a native platform because WebGL is sandboxed, and various security checks are performed by the browser when it calls WebGL. Emscripten provides you with several flags that allow you to emulate OpenGL and OpenGL ES calls that are not available in WebGL. For performance reasons, however do not use these functions unless you absolutely have to.





















































