From: Chris Duncan Date: Thu, 2 Apr 2026 21:27:42 +0000 (-0700) Subject: Check if context loss is immediately available. X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=95f029dc2f20a3a9881dbbb5e3f2221cf58881af;p=nano-pow.git Check if context loss is immediately available. --- diff --git a/test/index.html b/test/index.html index 1fe9c80..bd56d01 100644 --- a/test/index.html +++ b/test/index.html @@ -45,6 +45,7 @@ SPDX-License-Identifier: GPL-3.0-or-later console.log('NanoPow test page WebGL context restored during glSize()', ev.statusMessage) }) const gl = canvas.getContext('webgl2') + console.log('gl.isContextLost()', gl.isContextLost()) const MAX_VIEWPORT_DIMS = gl.getParameter(gl.MAX_VIEWPORT_DIMS) canvas.height = MAX_VIEWPORT_DIMS?.[0] ?? 0x1000 canvas.width = MAX_VIEWPORT_DIMS?.[1] ?? 0x1000