Use WebGL in Internet Explorer 11 to create dynamic 2D and 3D graphics for games and interactive content.
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.
WebGL can range from simple to complex. However, all programs essentially perform the following steps:
- Add a canvas element to the page, and create a new WebGL rendering context.
- Initialize a viewport.
- Upload arrays of coordinate (vertices) and image data (fragments or textures) to the GPU.
- Compile and run vertex and fragment shaders (programs that run on the GPU) to manipulate the vertex and imaged loaded in the previous step.
- 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.
|Learning WebGL||Step-by-step guidance for writing WebGL code. Lots of news, links, and job opportunities.|
|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.
Here are the methods, objects, and properties that are supported as of IE11.