Skip to content
Snippets Groups Projects
Commit 22a42682 authored by Alexander Rose's avatar Alexander Rose
Browse files

add gl.finsh before fence

parent cb392470
No related branches found
No related tags found
No related merge requests found
......@@ -57,6 +57,7 @@ const tmpPixel = new Uint8Array(1 * 4);
function fence(gl: WebGL2RenderingContext) {
return new Promise(resolve => {
gl.finish()
const sync = gl.fenceSync(gl.SYNC_GPU_COMMANDS_COMPLETE, 0)
if (!sync) {
console.warn('could not create a WebGL2 sync object')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment