export function createBasicVao(gl: WebGL2RenderingContext, buffer: WebGLBuffer, attrib: number) {
  const vao = gl.createVertexArray();
  if (!vao) {
    throw new Error("Failed to create VAO");
  }

  gl.bindVertexArray(vao);
  gl.enableVertexAttribArray(attrib);
  gl.bindBuffer(gl.ARRAY_BUFFER, buffer);
  gl.vertexAttribPointer(attrib, 2, gl.FLOAT, false, 0, 0);

  gl.bindVertexArray(null);

  return vao;
}