Support for WebGL is present in Firefox 4+, Google Chrome 9+, Opera 12+, Safari 5.1+ and Internet Explorer 11+; however, the user's device must also have hardware that supports these features.
<canvas> element is also used by Canvas 2D to do 2D graphics on web pages.
Constants and types
Guides and tutorials
- WebGL tutorial: A beginner's guide to WebGL core concepts. A good place to start if you don't have previous WebGL experience.
- WebGL best practices: Tips and suggestions to improve your WebGL content.
- Using extensions: How to use extensions that are available in WebGL.
- WebGL model view projection: A detailed explanation of the three core matrices that are typically used to represent a 3D object view: the model, view and projection matrices.
- Matrix math for the web: A useful guide to how 3D transform matrices work, and can be used on the web — both for WebGL calculations and in CSS3 transforms.
- Raw WebGL: An introduction to WebGL A talk by Nick Desaulniers that introduces the basics of WebGL. This is a great place to start if you've never done low-level graphics programming.
- Khronos WebGL site The main web site for WebGL at the Khronos Group.
- Learning WebGL A site with tutorials on how to use WebGL.
- WebGL Fundamentals A basic tutorial with fundamentals of WebGL.
- WebGL playground An online tool for creating and sharing WebGL projects. Good for quick prototyping and experimenting.
- WebGL Stats A site with statistics about WebGL capabilities in browsers on different platforms.
- Sylvester An open source library for manipulating vectors and matrices. Not optimized for WebGL but extremely robust.
|WebGL 1.0||Recommendation||Initial definition. Based on OpenGL ES 2.0|
|WebGL 2.0||Editor's Draft||Builds on top of WebGL1. Based on OpenGL ES 3.0.|
|OpenGL ES 2.0||Standard|
|OpenGL ES 3.0||Standard|
|Feature||Firefox (Gecko)||Chrome||Internet Explorer||Opera||Safari|
|Basic support||4.0 (2.0)||9||11||12||5.1|
|Feature||Firefox Mobile (Gecko)||Chrome for Android||IE Mobile||Opera Mobile||Safari Mobile|
|Basic support||4||25||No support||12||8.1|
 The implementation of this feature is experimental.
In addition to the browser, the GPU itself also needs to support the feature. So, for example, S3 Texture Compression (S3TC) is only available on Tegra-based tablets. Most browsers make the WebGL context available through the
webgl context name, but older ones need
experimental-webgl as well. In addition, the upcoming WebGL 2 is fully backwards-compatible and will have the context name
WebGL debugging and testing
Starting with Gecko 10.0 (Firefox 10.0 / Thunderbird 10.0 / SeaMonkey 2.7), there are two preferences available which let you control the capabilities of WebGL for testing purposes:
- A Boolean property that, when
true, enables a minimum capability mode. When in this mode, WebGL is configured to only support the bare minimum feature set and capabilities required by the WebGL specification. This lets you ensure that your WebGL code will work on any device or browser, regardless of their capabilities. This is
- A Boolean property that, when
true, disables all WebGL extensions. This is
© 2016 Mozilla Contributors
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.