The CPU and the GPU

Our JavaScript program is one of many that run on the CPU.

The first thing it must do is initialize a GL context which maintains the state of the GPU and its memory.

canvas = document.getElementById('webgl');
gl = getWebGLContext(canvas, false);

We can manipulate that context, but we can't directly touch the state and memory that it manages.