WebGL
HTML |
---|
Comparisons |
WebGL (Web Graphics Library) is a JavaScript API for rendering interactive 3D graphics and 2D graphics[2] 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.[3] WebGL programs consist of control code written in JavaScript and shader code that is executed on a computer's Graphics Processing Unit (GPU). WebGL is designed and maintained by the non-profit Khronos Group.[4]
Design
WebGL is based on OpenGL ES 2.0 and provides an API for 3D graphics.[5] For security reasons, GL_ARB_robustness
(OpenGL 3.x) or GL_EXT_robustness
(OpenGL ES) is needed. 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.[4]
WebGL lacks the matrix mathematics routines deprecated in OpenGL 3.0. This functionality must instead be provided by the user in the JavaScript code space; this necessary code is frequently supplemented by a matrix library such as glMatrix, TDL, or mjs.
History
WebGL grew 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[6] and Opera[7] 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.[4][8] Version 1.0 of the WebGL specification was released March 2011.[1] As of March 2012, the chair of the working group is Ken Russell.
Notable early applications of WebGL include Google Maps and Zygote Body.[9][10]
Implementation
Desktop Browsers
- Mozilla Firefox – WebGL has been enabled on all platforms that have a capable graphics card with updated drivers since version 4.0.[11] Mozilla Firefox 8.0 and newer versions use Cross-origin resource sharing (CORS) to control all WebGL cross-domain textures.[12][13]
- Google Chrome – WebGL has been enabled on all platforms that have a capable graphics card with updated drivers since version 9.[14] Google Chrome 13.0 and newer versions use Cross-origin resource sharing (CORS) to control all WebGL cross-domain textures.[15]
- Safari – Safari 5.1 and newer versions installed on Mac OS X Lion and Mac OS X Snow Leopard implemented support for WebGL, which is disabled by default.[16][17][18][19][20]
- Opera – WebGL has been implemented in Opera 11 and 12, also disabled by default.[21][22]
- Internet Explorer – As of version 10, there is no built-in support for WebGL, and Microsoft has not announced any plans for implementing it in the future, but current build of IE11 in Windows Blue have support for WebGL.[23] WebGL support can be manually added to Internet Explorer using third-party plugins such as Chrome Frame and IEWebGL.[24]
Mobile Browsers
- Nokia N900 – WebGL is available in the stock microB browser from the PR1.2 firmware update onwards.[25]
- BlackBerry PlayBook – WebGL is available via WebWorks and browser in PlayBook OS 2.0[26]
- Google Chrome - WebGL is available for Android devices in unstable builds since January 2013.[27]
- Firefox for mobile – WebGL is available for Android devices in unstable builds since early 2011.[28]
- The Sony Ericsson Xperia range of Android smartphones have had WebGL capabilities following a firmware upgrade.[29]
- Opera Mobile 12 final supports WebGL (on Android only).[30]
- Tizen 1.0
Content creation
WebGL scenes can be created without programming using a content creation tool such as Blender or Autodesk Maya. The scenes are then exported to WebGL. This was first possible with Inka3D, a WebGL export plugin for Maya. There are also services to publish interactive 3D content online using WebGL such as p3d.in and Sketchfab. Some game and simulation authoring tools combine model creation, scene creation and programming. AgentCubes[31][32] is a 3D game design authoring tool aimed at end users with no modeling and programing background. It combines model creation and drag and drop programing to create WebGL based games.
See also
References
- ^ a b "Khronos Releases Final WebGL 1.0 Specification". Retrieved 3 March 2011.
- ^ Gregg Tavares (Feb. 9, 2012). "WebGL Fundamentals". HTML5 Rocks.
{{cite web}}
: Check date values in:|date=
(help) - ^ Tony Parisi (15 Aug 2012). "WebGL: Up and Running". O'Reilly Media, Incorporated.
- ^ a b c "WebGL – OpenGL ES 2.0 for the Web". Khronos.org. Retrieved 2011-05-14.
- ^ "WebGL Specification". Khronos.org. Retrieved 2011-05-14.
- ^ "Canvas 3D: GL power, web-style". Blog.vlad1.com. Retrieved 2011-05-14.
- ^ "Taking the canvas to another dimension". My.opera.com. 2007-11-26. Retrieved 2011-05-14.
- ^ "Khronos Details WebGL Initiative to Bring Hardware-Accelerated 3D Graphics to the Internet". Khronos.org. 2009-08-04. Retrieved 2011-05-14.
- ^ "Google Body – Google Labs". Bodybrowser.googlelabs.com. Retrieved 2011-05-14.
- ^ Bhanoo, Sindya N. (2010-12-23). "New From Google: The Body Browser". Well.blogs.nytimes.com. Retrieved 2011-05-14.
- ^ "Mozilla Firefox 4 Release Notes". Mozilla.com. 2011-03-22. Retrieved 2012-03-20.
- ^ "Cross-domain textures". Developer.mozilla.org. 2012-01-28. Retrieved 2012-03-20.
- ^ on November 8, 2011 by Benoit Jacob (2011-11-08). "Using CORS to load WebGL textures from cross-domain images". Hacks.mozilla.org. Retrieved 2012-03-20.
{{cite web}}
: CS1 maint: numeric names: authors list (link) - ^ February 8, 2011 – 7:56am ET (2012-03-03). "Google releases Chrome 9; comes with Google Instant, WebGL – FierceCIO:TechWatch". FierceCIO. Retrieved 2012-03-20.
{{cite web}}
: Text "By Paul Mah" ignored (help)CS1 maint: numeric names: authors list (link) - ^ "Using Cross-domain images in WebGL and Chrome 13". Blog.chromium.org. 2011-07-06. Retrieved 2012-03-20.
- ^ "New in OS X Lion: Safari 5.1 brings WebGL, Do Not Track and more". Fairerplatform.com. 2011-05-03. Retrieved 2012-03-20.
- ^ "Enable WebGL in Safari". Ikriz.nl. 2011-08-23. Retrieved 2012-03-20.
- ^ "Getting a WebGL Implementation". Khronos.org. 2012-01-13. Retrieved 2012-03-20.
- ^ "Implementations/WebKit". Khronos.org. 2011-09-03. Retrieved 2012-03-20.
- ^ "WebGL Now Available in WebKit Nightlies". Webkit.org. Retrieved 2012-03-20.
- ^ "WebGL and Hardware Acceleration". My.opera.com. 2011-02-28. Retrieved 2012-03-20.
- ^ "Introducing Opera 12 alpha". My.opera.com. 2011-10-13. Retrieved 2012-03-20.
- ^ http://withinwindows.com/within-windows/2013/3/30/blues-clues-how-to-enable-webgl-in-internet-explorer-11?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+WithinWindows+%28Within+Windows%29.
{{cite web}}
: Missing or empty|title=
(help) - ^ "FAQ". Iewebgl. Retrieved 2012-03-20.
- ^ suihkulokki (2010-06-07). "WebGL on N900". Suihkulokki.blogspot.com. Retrieved 2011-05-14.
- ^ Halevy, Ronen. "PlayBook OS 2.0 Developer Beta Includes WebGL, Flash 11, & AIR 3.0". BerryReview. Retrieved 15 November 2011.
- ^ Brandon Jones (2013-01-10). "Get WebGL working on the Android Chrome Beta". Tojicode. Retrieved 2013-02-12.
- ^ iclkevin (2011-11-12). "WebGL on Mobile Devices". iChemLabs. Retrieved 2011-11-25.
- ^ "Xperia™ phones first to support WebGL™ – Developer World". blogs.sonyericsson.com. The Sony Ericsson Developer Program. November 29, 2011. Retrieved December 5, 2011.
- ^ "Opera Mobile 12". Opera Software. Retrieved 27 February 2012.
- ^ AgentCubes - a game design tool
- ^ The Scalable Game Design arcade featuring WebGL based games
External links
- Official website
- Get Webgl
- PlanetoWeb – virtual Solar System model made in HTML5 and WebGL
- WebGL /Canvas 3D Preview in WebKit r48331
- www.DoesMyBrowserSupportWebGL.com
- WebGL Demo from Google Chromium
- WebGL Demo from Google Chromium (deprecated)
- EndlessForms.com See the power of WebGL by comparing this site (where you can evolve objects) in Chrome and Safari.
- Sand Toy: Particle Physics An example of doing particle physics on the GPU using a shader.
- OpenWebGlobe SDK Virtual Globe SDK using WebGL
- WebGL Earth Complex 3D Earth visualization
- WebGL.com Blog covering the latest webgl/html5 news
- Sketchfab to publish interactive 3D models in your browser
- WebGL-Publisher is used for publishing 2D and 3D models in the web
- Tutorials