From 3882c3b5e00ffe475d8a33dcad6ffb7b8d1f6992 Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Thu, 2 Apr 2026 14:39:35 -0700 Subject: [PATCH] Tests WebGL availability by additionally checking for immediate context loss. --- src/utils/api-support/webgl.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/api-support/webgl.ts b/src/utils/api-support/webgl.ts index c31c4ef..7d87b71 100644 --- a/src/utils/api-support/webgl.ts +++ b/src/utils/api-support/webgl.ts @@ -7,7 +7,7 @@ Object.defineProperty(webgl, 'isSupported', { let isWebglSupported = false try { const gl = new OffscreenCanvas(0, 0)?.getContext?.('webgl2') - isWebglSupported = (gl instanceof WebGL2RenderingContext) + isWebglSupported = (gl instanceof WebGL2RenderingContext && !gl.isContextLost()) } catch (err) { console.warn('WebGL is not supported in this environment.\n', err) isWebglSupported = false -- 2.47.3