WebGL

Use WebGL in Microsoft Edge to create dynamic 2D and 3D graphics for games and interactive content. With WebGL you can create 2D and 3D experiences powered by the computer's graphics processing unit (GPU). Since WebGL is a web standard, you can write content that works across browsers and devices.

Warning

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

Create WebGL content on your page

WebGL can range from simple to complex. However, most programs 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 image loaded in the previous step.
  5. Draw to the screen.

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

API reference

WebGL

Demos

Flight Arcade

Hyper-Fast Web Graphics with WebGL

Specification

WebGL Specification