From e086e917fb4e5250e4a4478a529cda63c635edbc Mon Sep 17 00:00:00 2001 From: Dave Pagurek Date: Tue, 14 Oct 2025 20:41:11 -0400 Subject: [PATCH] Skip text/gridOutput with a warning in WebGL in 2.0 --- src/accessibility/gridOutput.js | 7 +++++++ src/accessibility/textOutput.js | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/src/accessibility/gridOutput.js b/src/accessibility/gridOutput.js index ce19cb37b1..a74ebe8966 100644 --- a/src/accessibility/gridOutput.js +++ b/src/accessibility/gridOutput.js @@ -10,6 +10,13 @@ function gridOutput(p5, fn){ //updates gridOutput fn._updateGridOutput = function(idT) { + if (this._renderer && this._renderer instanceof p5.RendererGL) { + if (!this._didOutputGridWebGLMessage) { + this._didOutputGridWebGLMessage = true; + console.error('gridOutput() does not yet work in WebGL mode.'); + } + return; + } //if html structure is not there yet if (!this.dummyDOM.querySelector(`#${idT}_summary`)) { return; diff --git a/src/accessibility/textOutput.js b/src/accessibility/textOutput.js index 59c55401e7..c1f166edae 100644 --- a/src/accessibility/textOutput.js +++ b/src/accessibility/textOutput.js @@ -10,6 +10,13 @@ function textOutput(p5, fn){ //updates textOutput fn._updateTextOutput = function(idT) { + if (this._renderer && this._renderer instanceof p5.RendererGL) { + if (!this._didOutputTextWebGLMessage) { + this._didOutputTextWebGLMessage = true; + console.error('textOutput() does not yet work in WebGL mode.'); + } + return; + } //if html structure is not there yet if (!this.dummyDOM.querySelector(`#${idT}_summary`)) { return;