Jump to content

WebGL

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Chip123456 (talk | contribs) at 21:05, 22 May 2012 (Reverted 1 edit by 93.9.68.254 (talk): Unexplained removal. (TW)). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

WebGL
Original author(s)Mozilla Foundation
Developer(s)WebGL Working Group
Stable release
1.0 / March 3, 2011 (2011-03-03)[1]
Operating systemCross-platform
TypeAPI
Websitewww.khronos.org/webgl

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

Design

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

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[4] and Opera[5] 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.[6][2] 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 Google Body.[7][8]

Implementation

Desktop Browsers

Mobile Browsers

  • Nokia N900 - WebGL is available in the stock microB browser from the PR1.2 firmware update onwards.[22]
  • BlackBerry PlayBook - WebGL is available via WebWorks and browser in PlayBook OS 2.0[23]
  • Firefox for mobile - WebGL is available for Android devices in unstable builds since early 2011.[24]
  • The Sony Ericsson Xperia range of Android smartphones have had WebGL capabilities following a firmware upgrade.[25]
  • Opera Mobile 12 final supports WebGL (on Android only).[26]

Developer libraries

There are several libraries for WebGL development:[27]

  • WebGLU, the first WebGL library made publicly available[28]
  • GLGE
  • C3DL
  • CopperLicht
  • GLOW (WebGL wrapper)
  • SpiderGL (JavaScript 3D Graphics library based on WebGL)
  • PhiloGL (WebGL framework)
  • gwt-g3d (WebGL wrapper) for GWT (Google Web Toolkit)
  • SceneJS (3D engine for JavaScript based on WebGL)
  • X3DOM
  • Oak3D
  • Processing.js
  • Three.js
  • OSGJS (WebGL framework based on OpenSceneGraph)
  • XB PointStream (WebGL framework)
  • CubicVR.js (WebGL 3D engine)
  • A3 (Aerotwist) (3D engine for JavaScript based on WebGL)
  • Jax (WebGL environment)
  • ANGLE (Almost Native Graphics Layer Engine) is an ongoing open source project released under the BSD license that allows translating WebGL content OpenGL ES 2.0 API calls to DirectX 9 API calls on Microsoft Windows platforms without the need for separate OpenGL drivers. In November 2011 ANGLE has reached an important milestone: it now passes the OpenGL ES 2.0 test suite and has been certified as a compliant GL ES 2.0 implementation.[29] In April 2012 ANGLE passed the WebGL 1.0.1 conformance tests.[30]
  • WebGL playground (an online tool for quick prototyping and experimenting with WebGL. Allows sharing, forking, creating projects from templates, and contains a gallery of user contributions.
  • XTK The X Toolkit: WebGL for Scientific Visualization

Content creation

WebGL scenes can be created without programming in 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.

Security

In May and June 2011, the security firm Context Information Security published two reports on vulnerabilities that were present in Google Chrome and Mozilla Firefox WebGL implementations at the time. The reports provided example exploits capable of cross-domain image theft, graphics memory theft, and client-side denial of service.[31][32] This prompted the release of a WebGL security advisory from the United States Computer Emergency Readiness Team (US-CERT);[33] an announcement by Microsoft that they could not endorse WebGL in its current form;[34] tweets from notable independent experts John Carmack[35] and Dan Kaminsky;[36] as well as responses from The Khronos Group[37] and Mozilla.[38]

The affected browser vendors subsequently addressed the cross-domain image vulnerability by enforcing the same origin policy on WebGL textures. The graphics memory theft issue was fixed in Firefox 5. The ability of a malicious script to crash or freeze the client machine remains a concern, depending on the robustness of the underlying operating system and graphics driver, but does not allow an attacker to gain control of the client machine or to steal information from it. As of March 2012, there are no WebGL-related entries in the National Vulnerability Database that would affect the currently shipping version of any browser.

Sample renderings

See also

References

  1. ^ a b "Khronos Releases Final WebGL 1.0 Specification". Retrieved 3 March 2011.
  2. ^ a b c "WebGL - OpenGL ES 2.0 for the Web". Khronos.org. Retrieved 2011-05-14.
  3. ^ "WebGL Specification". Khronos.org. Retrieved 2011-05-14.
  4. ^ "Canvas 3D: GL power, web-style". Blog.vlad1.com. Retrieved 2011-05-14.
  5. ^ "Taking the canvas to another dimension". My.opera.com. 2007-11-26. Retrieved 2011-05-14.
  6. ^ "Khronos Details WebGL Initiative to Bring Hardware-Accelerated 3D Graphics to the Internet". Khronos.org. 2009-08-04. Retrieved 2011-05-14.
  7. ^ "Google Body - Google Labs". Bodybrowser.googlelabs.com. Retrieved 2011-05-14.
  8. ^ Bhanoo, Sindya N. (2010-12-23). "New From Google: The Body Browser". Well.blogs.nytimes.com. Retrieved 2011-05-14.
  9. ^ "Mozilla Firefox 4 Release Notes". Mozilla.com. 2011-03-22. Retrieved 2012-03-20.
  10. ^ "Cross-domain textures". Developer.mozilla.org. 2012-01-28. Retrieved 2012-03-20.
  11. ^ 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)
  12. ^ 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)
  13. ^ "Using Cross-domain images in WebGL and Chrome 13". Blog.chromium.org. 2011-07-06. Retrieved 2012-03-20.
  14. ^ "New in OS X Lion: Safari 5.1 brings WebGL, Do Not Track and more". Fairerplatform.com. 2011-05-03. Retrieved 2012-03-20.
  15. ^ "Enable WebGL in Safari". Ikriz.nl. 2011-08-23. Retrieved 2012-03-20.
  16. ^ "Getting a WebGL Implementation". Khronos.org. 2012-01-13. Retrieved 2012-03-20.
  17. ^ "Implementations/WebKit". Khronos.org. 2011-09-03. Retrieved 2012-03-20.
  18. ^ "WebGL Now Available in WebKit Nightlies". Webkit.org. Retrieved 2012-03-20.
  19. ^ "WebGL and Hardware Acceleration". My.opera.com. 2011-02-28. Retrieved 2012-03-20.
  20. ^ "Introducing Opera 12 alpha". My.opera.com. 2011-10-13. Retrieved 2012-03-20.
  21. ^ "FAQ". Iewebgl. Retrieved 2012-03-20.
  22. ^ suihkulokki (2010-06-07). "WebGL on N900". Suihkulokki.blogspot.com. Retrieved 2011-05-14.
  23. ^ Halevy, Ronen. "PlayBook OS 2.0 Developer Beta Includes WebGL, Flash 11, & AIR 3.0". BerryReview. Retrieved 15 November 2011.
  24. ^ iclkevin (2011-11-12). "WebGL on Mobile Devices". iChemLabs. Retrieved 2011-11-25.
  25. ^ "Xperia™ phones first to support WebGL™— Developer World". blogs.sonyericsson.com. The Sony Ericsson Developer Program. November 29, 2011. Retrieved December 5, 2011.
  26. ^ "Opera Mobile 12". Opera Software. Retrieved 27 February 2012.
  27. ^ "The WebGL Cookbook". Learning WebGL. 2011-01-30. Retrieved 2012-03-27.
  28. ^ Benjamin DeLillo (2009-10-02). "First WebGLU release". Bjartr.blogspot.com. Retrieved 2011-05-14.
  29. ^ "Chromium Blog: OpenGL ES 2.0 Certification for ANGLE". Blog.chromium.org. 2011-11-30. Retrieved 2012-03-20.
  30. ^ "WebGL Conformance Test Runner Version 1.0.1". khronos.org. 2012-05-09. Retrieved 2012-05-09.
  31. ^ Forshaw, James (2011-05-08). "WebGL - A New Dimension for Browser Exploitation". Context Information Security. Retrieved 2011-05-11.
  32. ^ "WebGL – More WebGL Security Flaws". Context Information Security. 2011-06-16. Retrieved 2011-06-12.
  33. ^ "WebGL Security Risks". US-CERT. 2011-05-10. Retrieved 2011-05-10.
  34. ^ "WebGL Considered Harmful". Microsoft. 2011-06-16. Retrieved 2011-06-16.
  35. ^ Carmack, John (2011-06-17). "Tweet". Retrieved 2011-06-20.
  36. ^ Kaminsky, Dan (2011-06-16). "Tweet". Retrieved 2011-06-20.
  37. ^ "WebGL - Security". Khronos Group. 2011-06-17. Retrieved 2011-06-19.
  38. ^ "Mozilla rejects Microsoft criticism of WebGL". The Inquirer. 2011-06-20. Retrieved 2011-06-29.