WebGL

From Wikipedia, the free encyclopedia
Jump to: navigation, search
WebGL
WebGL logo
Original author(s) Mozilla Foundation
Developer(s) Khronos WebGL Working Group
Initial release March 3, 2011 (2011-03-03)[1]
Stable release 1.0.2 / March 1, 2013 (2013-03-01)
Platform Cross-platform
Type API
Website www.khronos.org/webgl/

WebGL (Web Graphics Library) is a JavaScript API for rendering interactive 3D graphics and 2D graphics within any compatible web browser without the use of plug-ins.[2] 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[edit]

WebGL is based on OpenGL ES 2.0 and provides an API for 3D graphics.[5] 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]

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[edit]

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.

Early applications of WebGL include Google Maps and Zygote Body.[9][10] More recently[when?]Autodesk ported most of their applications to the cloud running on local WebGL clients. These applications included Fusion 360 and AutoCAD 360.[11]

Development of the WebGL 2 specification started in 2013.[12] This specification is based on OpenGL ES 3.0.

Support[edit]

WebGL is widely supported in modern browsers.

Desktop browsers[edit]

  • Mozilla Firefox – WebGL has been enabled on all platforms that have a capable graphics card with updated drivers since version 4.0.[13]
  • Google Chrome – WebGL has been enabled on all platforms that have a capable graphics card with updated drivers since version 9.[14]
  • 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.[15][16][17][18][19]
  • Opera – WebGL has been implemented in Opera 11 and 12, although disabled by default.[20][21]
  • Internet Explorer – WebGL is partially supported in Internet Explorer 11,[22][23][24][25] 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.[26] WebGL support can be manually added to earlier versions of Internet Explorer using third-party plugins such as IEWebGL.[27]

Mobile browsers[edit]

  • Android Browser - Basically unsupported, but the Sony Ericsson Xperia range of Android smartphones have had WebGL capabilities following a firmware upgrade.[28] Samsung smartphones also have WebGL enabled (verified on Galaxy SII (4.1.2) and Galaxy Note 8.0 (4.2)). Supported in Google Chrome that replaced Android browser in many phones (but is not a new standard Android Browser).
  • Internet Explorer - WebGL is available on Windows Phone 8.1
  • BlackBerry PlayBook – WebGL is available via WebWorks and browser in PlayBook OS 2.00[29]
  • Firefox for mobile – WebGL is available for Android devices since Firefox 4.[30]
  • Firefox OS
  • Google Chrome - WebGL is available for Android devices since Google Chrome 25 and enabled by default since version 30.[31]
  • Maemo - In Nokia N900, WebGL is available in the stock microB browser from the PR1.2 firmware update onwards.[32]
  • Opera Mobile - Opera Mobile 12 supports WebGL (on Android only).[33]
  • 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.[34]

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[edit]

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 (such as Threejs or OSG.JS) 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.[35]

X3D also make a project called X3DOM to make X3D and VRML content running by WebGL. The 3D model will in XML tag <X3D> 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[edit]

References[edit]

  1. ^ a b "Khronos Releases Final WebGL 1.0 Specification". Retrieved 2011-03-03. 
  2. ^ Gregg Tavares (2012-02-09). "WebGL Fundamentals". HTML5 Rocks. 
  3. ^ Tony Parisi (2012-08-15). "WebGL: Up and Running". O'Reilly Media, Incorporated. 
  4. ^ a b c "WebGL – OpenGL ES 2.0 for the Web". Khronos.org. Retrieved 2011-05-14. 
  5. ^ "WebGL Specification". Khronos.org. Retrieved 2011-05-14. 
  6. ^ "Canvas 3D: GL power, web-style". Blog.vlad1.com. Retrieved 2011-05-14. 
  7. ^ "Taking the canvas to another dimension". My.opera.com. 2007-11-26. Retrieved 2011-05-14. 
  8. ^ "Khronos Details WebGL Initiative to Bring Hardware-Accelerated 3D Graphics to the Internet". Khronos.org. 2009-08-04. Retrieved 2011-05-14. 
  9. ^ "Google Body – Google Labs". Bodybrowser.googlelabs.com. Retrieved 2011-05-14. 
  10. ^ Bhanoo, Sindya N. (2010-12-23). "New From Google: The Body Browser". Well.blogs.nytimes.com. Retrieved 2011-05-14. 
  11. ^ "AUTODESK FUSION 360: THE FUTURE OF CAD, PT. 1". 3dcadworld.com. Retrieved 2013-08-21. 
  12. ^ "WebGL 2 Specification". khronos.org. 2013-09-26. Retrieved 2013-10-28. 
  13. ^ "Mozilla Firefox 4 Release Notes". Mozilla.com. 2011-03-22. Retrieved 2012-03-20. 
  14. ^ Paul Mah (2012-02-08). "Google releases Chrome 9; comes with Google Instant, WebGL – FierceCIO:TechWatch". FierceCIO. Retrieved 2012-03-20. 
  15. ^ "New in OS X Lion: Safari 5.1 brings WebGL, Do Not Track and more". Fairerplatform.com. 2011-05-03. Retrieved 2012-03-20. 
  16. ^ "Enable WebGL in Safari". Ikriz.nl. 2011-08-23. Retrieved 2012-03-20. 
  17. ^ "Getting a WebGL Implementation". Khronos.org. 2012-01-13. Retrieved 2012-03-20. 
  18. ^ "Implementations/WebKit". Khronos.org. 2011-09-03. Retrieved 2012-03-20. 
  19. ^ "WebGL Now Available in WebKit Nightlies". Webkit.org. Retrieved 2012-03-20. 
  20. ^ "WebGL and Hardware Acceleration". My.opera.com. 2011-02-28. Retrieved 2012-03-20. 
  21. ^ "Introducing Opera 12 alpha". My.opera.com. 2011-10-13. Retrieved 2012-03-20. 
  22. ^ http://msdn.microsoft.com/en-US/library/ie/bg182648%28v=vs.85%29
  23. ^ "Internet Explorer 11 Preview guide for developers". Microsoft. 2013-07-17. Retrieved 2013-07-24. 
  24. ^ "WebGL". Microsoft. 2013-07-17. Retrieved 2013-07-24. 
  25. ^ "Internet Explorer 11 to support WebGL and MPEG Dash". Engadget. 2013-06-26. Retrieved 2013-06-26. 
  26. ^ http://connect.microsoft.com/IE/feedback/details/795172/ie11-fails-more-than-half-tests-in-official-webgl-conformance-test-suite
  27. ^ "FAQ". Iewebgl. Retrieved 2012-03-20. 
  28. ^ "Xperia™ phones first to support WebGL™ – Developer World". blogs.sonyericsson.com. The Sony Ericsson Developer Program. 2011-11-29. Retrieved 2011-12-05. 
  29. ^ Halevy, Ronen. "PlayBook OS 2.0 Developer Beta Includes WebGL, Flash 11, & AIR 3.0". BerryReview. Retrieved 2011-11-15. 
  30. ^ iclkevin (2011-11-12). "WebGL on Mobile Devices". iChemLabs. Retrieved 2011-11-25. 
  31. ^ Kersey, Jason. "Chrome Beta for Android Update". Chrome Releases Blog. Google. Retrieved 2013-08-23. 
  32. ^ suihkulokki (2010-06-07). "WebGL on N900". Suihkulokki.blogspot.com. Retrieved 2011-05-14. 
  33. ^ "Opera Mobile 12". Opera Software. Retrieved 27 February 2012. 
  34. ^ "WebGL Enabler for iOS". Retrieved 2013-08-04. 
  35. ^ https://hacks.mozilla.org/2013/11/live-editing-webgl-shaders-with-firefox-developer-tools/

External links[edit]