Using initShaders() (cont’d)

let canvas = undefined;  // HTML <canvas> element
let gl = undefined;      // WebGL context
let program = undefined; // Shader program

function init() {
    canvas = document.getElementById("webgl-canvas");
    if (!canvas) { alert("Unable to find WebGL canvas"); }

    gl = canvas.getContext("webgl2");
    if (!gl) { alert("WebGL2 isn't supported"); }

    program = initShaders(gl, "vertex-shader", "fragment-shader");

    gl.clearColor(0.25, 0.25, 0.25, 1.0);

    // Lots more stuff to come ...
}