Apple's WebKit HTML rendering engine has gained experimental support for WebGL, an emerging standard that aims to bring native 3D graphics to the Web. The WebGL implementation has landed in the WebKit source tree, but the feature is not yet enabled by default in nightly builds, indicating that it is still at a very early stage of development.

The WebGL standard is being devised by a coalition of browser vendors and other interested parties in collaboration with the Khronos Group, an industry consortium that oversees OpenGL and a number of other standards relating to graphics and media. The goal of WebGL is to expose the low-level OpenGL ES 2.0 APIs through JavaScript so that they can be used to draw hardware-accelerated 3D graphics in the HTML Canvas element.

The WebGL standardization effort first emerged last year when a Mozilla developer built a proof-of-concept Firefox plugin that demonstrated 3D graphics in the browser. A team at Seneca College began working on a complementary initiative to build a high-level 3D library called C3DL on top of the plugin. Mozilla and Khronos teamed up in March to explore the potential for turning the concept into a standard. Last month, Khronos officially announced the formation of the WebGL working group and invited the industry to participate in the standards process.

Apple is clearly on board with the effort and is actively working on its own implementation for WebKit. Jeffrey Rosen, a developer at independent game studio Wolfire Games, noticed the new WebGL code while compiling a recent revision of WebKit trunk. He recorded a video that shows WebKit running Apple's WebGL tests, which include spinning 3D shapes such as the famous Utah teapot.

"In the same way Gmail is killing desktop mail applications, full-fledged 3D video games could start migrating to the web," wrote Rosen in a blog entry. "Flash gaming would have a serious run for its money as more advanced, standards-based, hardware-accelerated games started popping up. This would have huge implications for the entire PC gaming market, which I might explore in a separate blog post."

Apple's support for WebGL in WebKit demonstrates that the concept is gaining traction among browser vendors. Google also recently affirmed its commitment to support the standard despite having its own 3D Web initiative. Apple has shown considerable interest in the potential of 3D graphics on the Web. Previous to its effort to implement WebGL, Apple devised its own CSS extensions for applying 3D animations to Web elements. The company's novel 3D CSS transforms are already relatively mature and supported on the iPhone and in the version of Safari that is included in Snow Leopard.

Although it will take time for WebGL to gain robust support across the full spectrum of modern browsers, there appears to be considerable progress and swift forward momentum. Between Apple and Mozilla, there are now two open source implementations that can push 3D graphics to the screen. As these implementations mature, it's likely that more sophisticated demos will emerge. This is a major victory for the open Web as it will expand the range of rich content that can be delivered with vendor-neutral standards-based technologies without needing proprietary plugins.

Listing image by Martin Newell