WebGL is a JavaScript API for rendering interactive 3D graphics and 2D graphics within any compatible
web browser without the use of plug-ins.
WebGL is integrated completely into all the web standards of the browser allowing GPU
accelerated usage of physics and image processing and effects as part of the web page canvas.
WebGL elements can be mixed with other HTML elements and composited with other parts of
the page or page background.
WebGL programs consist of control code written in JavaScript and shader code that is executed
on a computer's Graphics Processing Unit.
WebGL is designed and maintained by the non-profit Khronos Group.
Design WebGL is based on OpenGL ES 2.0 and provides
an API for 3D graphics.
It uses the HTML5 canvas element and is accessed using Document Object Model interfaces.
Automatic memory management is provided as part of the JavaScript language.
Like OpenGL ES 2.0, WebGL does not have the fixed-function APIs introduced in OpenGL 1.0
and deprecated in OpenGL 3.0.
This functionality can instead be provided by the user in the JavaScript code space.
History WebGL evolved out of the Canvas 3D experiments
started by Vladimir Vukićević at Mozilla.
Vukićević first demonstrated a Canvas 3D prototype in 2006.
By the end of 2007, both Mozilla and Opera had made their own separate implementations.
In early 2009, the non-profit technology consortium Khronos Group started the WebGL Working Group,
with initial participation from Apple, Google, Mozilla, Opera, and others.
Version 1.0 of the WebGL specification was released March 2011.
As of March 2012, the chair of the working group is Ken Russell.
Early applications of WebGL include Google Maps and Zygote Body.
More recently, Autodesk ported most of their applications to the cloud running on local
WebGL clients.
These applications included Fusion 360 and AutoCAD 360.
Development of the WebGL 2 specification started in 2013.
This specification is based on OpenGL ES 3.0.
Support WebGL is widely supported in modern browsers.
Desktop browsers Mozilla Firefox – WebGL has been enabled
on all platforms that have a capable graphics card with updated drivers since version 4.0.
Google Chrome – WebGL has been enabled on all platforms that have a capable graphics
card with updated drivers since version 9.
Safari – Safari 6.0 and newer versions installed on OS X Mountain Lion, Mac OS X Lion and Safari
5.1 on Mac OS X Snow Leopard implemented support for WebGL, which is disabled by default.
Opera – WebGL has been implemented in Opera 11 and 12, although disabled by default.
Internet Explorer – WebGL is partially supported in Internet Explorer 11, even though Microsoft
has never supported the OpenGL ES it is based on.
It is said to have partial WebGL support because it fails the majority of official WebGL conformance
tests.
WebGL support can be manually added to earlier versions of Internet Explorer using third-party
plugins such as IEWebGL.
Mobile browsers Android Browser - Basically unsupported, but
the Sony Ericsson Xperia range of Android smartphones have had WebGL capabilities following
a firmware upgrade.
Samsung smartphones also have WebGL enabled and Galaxy Note 8.0).
Supported in Google Chrome that replaced Android browser in many phones.
Internet Explorer - WebGL is available on Windows Phone 8.1
BlackBerry PlayBook – WebGL is available via WebWorks and browser in PlayBook OS 2.00
Firefox for mobile – WebGL is available for Android devices since Firefox 4.
Firefox OS Google Chrome - WebGL is available for Android
devices since Google Chrome 25 and enabled by default since version 30.
Maemo - In Nokia N900, WebGL is available in the stock microB browser from the PR1.2
firmware update onwards.
Opera Mobile - Opera Mobile 12 supports WebGL.
Tizen Ubuntu Touch
WebOS iOS - Officially only available through iAd
on iOS 4.2 and higher, for all devices except for 2nd Gen iPod Touch or iPhone 3G and earlier.
However, there is a tweak for jailbroken devices to enable functionality for Mobile Safari
and all other WebKit browsers.
Near Future: Apple has officially announced that iOS 8 will support WebGL with its new
mobile Safari set to release this fall.
However its availability is dependent on other factors like the GPU supporting it.
To check if a determined device supports WebGL, anyone could go to: Your browser supports
WebGL.
Content creation As WebGL is providing a low level 3D API,
there is no built-in support for loading a 3D scene defined in regular 3D file formats.
A JavaScript WebGL viewer code or library is necessary to load a 3D file and display
it on a web page.
Creating content for WebGL scenes often means using a regular 3D content creation tool and
exporting the scene to a format that is readable by the viewer.
It can be a regular software such as Blender or Autodesk Maya, a dedicated WebGL software
such as CopperCube) or an online WebGL-based editors such as Clara.io.
Online platforms such as Sketchfab allow users to directly upload their 3D models and display
them using a hosted WebGL viewer.
Additionally, Mozilla Firefox implemented built-in WebGL tools starting with version
27 that allow editing vertex and fragment shaders.
X3D also made a project called X3DOM to make X3D and VRML content running by WebGL.
The 3D model will in XML tag in HTML5 and interactive script will use JavaScript
and DOM.
BS Content Studio and InstantReality X3D exporter can exported X3D in HTML and running by WebGL.
See also ANGLE
O3D GLSL
VRML X3D
Java OpenGL Stage3D — the equivalent layer in Adobe
Flash 11 and later Three.js
References
External links Official website
WebGL /Canvas 3D Preview in WebKit r48331 WebGL Demo from Google Chromium
Mozilla Developer Network