Compartir a través de


WebGL

Use WebGL in Internet Explorer 11 to create dynamic 2D and 3D graphics for games and interactive content.

Note  There are memory limits that affect WebGL for Windows Phone 8. See App memory limits for Windows Phone 8 for more info.

 

WebGL is available on all IE11 devices. IE11 supports rendering WebGL pages including those written with three.js, a popular WebGL library.

With the emerging WebGL web standard, web developers can create new kinds of 2D and 3D experiences by programming the computer’s graphics processing unit (GPU). Using WebGL, you program the GPU directly to quickly render complex 3D objects and scenes.

Create WebGL content on your page

WebGL can range from simple to complex. However, all programs essentially perform the following steps:

  1. Add a canvas element to the page, and create a new WebGL rendering context.
  2. Initialize a viewport.
  3. Upload arrays of coordinate (vertices) and image data (fragments or textures) to the GPU.
  4. Compile and run vertex and fragment shaders (programs that run on the GPU) to manipulate the vertex and imaged loaded in the previous step.
  5. Draw to the screen.

The GPU is optimized for these types of operations which enables WebGL programs to perform at a high level.

Note  For an example that shows some of these steps, see the Get started with WebGL.

 

Here are a few resources to help you get started writing your own WebGL content.

Link Description
Three.JS page Demos, source code, and links to resources for the popular three.js WebGL library.
Webplatform.org WebGL documentation and examples

 

For more ideas, see this WebGL Resources page.

The WebGL implementation in IE11 is an early preview version. If you're writing WebGL pages, you can use IE11 to develop your content. Some of the WebGL functionality is unsupported at this time. For more about the IE11 implementation, see the IEblog.

Since WebGL is a web standard, you can write content that works across browsers and devices. For more info and best practices, see Hyper-Fast Web Graphics with WebGL.

For methods, objects, and properties that are supported as of IE11, see the WebGL API.

API reference

WebGL

Samples and tutorials

Get started with WebGL

Hyper-Fast Web Graphics with WebGL

Internet Explorer Test Drive demos

Everest: Rivers of Ice