export function link(gl: WebGLRenderingContext, vertex: string, fragment: string) {
let program = gl.createProgram()!;
gl.attachShader(program, compile(gl, GL_VERTEX_SHADER, vertex));
gl.attachShader(program, compile(gl, GL_FRAGMENT_SHADER, fragment));
gl.linkProgram(program);
if (DEBUG && !gl.getProgramParameter(program, GL_LINK_STATUS)) {
throw new Error(gl.getProgramInfoLog(program)!);
}
return program;
}