adbackBuffer = gl.createBuffer();
    gl.bindBuffer(gl.COPY_WRITE_BUFFER, readbackBuffer);
    gl.bufferData(gl.COPY_WRITE_BUFFER, 8, gl.STREAM_READ);
}
recreateReadbackBuffer();

const dest = new Uint8Array(8);

// Makes a new "resolvable" Promise
function resolvable() {
    let resolve;
    const promise = new Promise(res => { resolve = res; });
    promise.resolve = resolve;
    return promise;
}

function wait() {
    return new Promise(res => {
        setTimeout(res, 0);
    });
}

async function fenc