From 33d672407d72c522df8960e6df331e971e736a3d Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Thu, 21 May 2026 11:18:34 -0700 Subject: [PATCH] Account for lack of GL support. --- test/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/index.html b/test/index.html index 1660fb8..b2e2f03 100644 --- a/test/index.html +++ b/test/index.html @@ -28,8 +28,8 @@ SPDX-License-Identifier: GPL-3.0-or-later const glSize = (canvas => { const gl = canvas.getContext('webgl2') - const MAX_VIEWPORT_DIMS = gl?.getParameter(gl.MAX_VIEWPORT_DIMS) - const size = Math.min(0x2000, ...MAX_VIEWPORT_DIMS) || 0x1000 + const MAX_VIEWPORT_DIMS = gl?.getParameter(gl.MAX_VIEWPORT_DIMS) ?? [0x1000, 0x1000] + const size = Math.min(0x2000, ...MAX_VIEWPORT_DIMS) canvas.height = canvas.width = size return gl?.drawingBufferHeight < gl?.drawingBufferWidth ? gl?.drawingBufferHeight : gl?.drawingBufferWidth })(new OffscreenCanvas(0, 0)) -- 2.52.0