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.
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:
- 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 image loaded in the previous step.
- Draw to the screen.
The GPU is optimized for these types of operations which enable WebGL programs to perform at a high level.