What is WebGL?
So, what is WebGL?
WebGL stands for Web Graphic Library. It’s the Web counterpart of OpenGL which is a cross platform Graphic Library, specified by the Khronos Group and implemented by most graphic card vendors drivers. This library is quite low level and is used by some games or graphic applications on desktop computers, laptops and mobiles (called Native applications).
Most browsers now support WebGL 1, and that’s how Sketchfab is compatible with most of them.
Sketchfab and WebGL
Cedric, our CTO, was one of the very first 3D programmers to work on WebGL, back in 2011. WebGL was initiated by Mozilla in 2011, and Cedric worked with Mozilla to make the first demo of WebGL for the launch of Firefox 4. Our initial name before Sketchfab was actually ShowWebGL.
How do we use WebGL?
WebGL comes with what is called an API which is the acronym for Application Program Interface. It’s a fancy phrase that describes a list of functions an application can call to draw things on a web page. For example, each time Sketchfab draws something on the screen, there is a call to this API.
Why is it good?
WebGL is cross-platform. This means one can use the same API on all browsers that support it, and by extension on all platform/devices where those browsers can run.
This makes Sketchfab available on desktops, laptops, mobiles.
According to https://webglstats.com/ WebGL1 is supported by 98% of browsers.
What are some of its limitations?
As said in the introduction, WebGL is a subset of OpenGL, and it comes with limitations, that prevents Sketchfab from having even better rendering. WebGL 2 removes quite a lot of these limitations, but is not yet widely enough supported yet for us to use it.
How does WebGL impact me when I make a configurator?
The Sketchfab Viewer API, which is used by Configurators, is a higher level API where you only manipulate objects in the scene, materials, lights, camera. The drawing part with WebGL is handled behind the scenes by Sketchfab.
WebGPU is a new specification and is likely to be the future of graphic libraries on the Web. It’s bringing the 3D on the Web closer to what you can have in a native application. It’s not yet implemented in browsers, but be sure that we are watching this closely and that we already have plans to use it.