The CPU and the GPU

Next we configure the renderer. Vertex and fragment shader source strings are acquired…

var vertexSource   = document.getElementById('vertexShader').text;
var fragmentSource = document.getElementById('fragmentShader').text;

… compiled, linked, and loaded onto the GPU for execution.

program = createProgram(gl, vertexSource, fragmentSource);

In return, we receive a handle to the program on the GPU. To use this program, we make it current.