From 395e7fba41e2a9ee5574cae31feedb99adf44c8d Mon Sep 17 00:00:00 2001 From: lgtst Date: Tue, 29 Nov 2022 13:24:02 +0000 Subject: [PATCH 1/2] added checkWebGLSupport flag check in openWindow(); --- src/core/Window.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/core/Window.js b/src/core/Window.js index 6d961b3..135eb24 100644 --- a/src/core/Window.js +++ b/src/core/Window.js @@ -108,6 +108,12 @@ export class Window extends PsychObject this._addAttribute("autoLog", autoLog); this._addAttribute("size", []); + if (this._psychoJS._checkWebGLSupport) + { + // see checkWebGLSupport() method for details. + PIXI.settings.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT = true; + } + // setup PIXI: this._setupPixi(); From 1f6a816fbf3158698d869f2f5a6863cbdef57dda Mon Sep 17 00:00:00 2001 From: lgtst Date: Wed, 30 Nov 2022 09:49:29 +0000 Subject: [PATCH 2/2] wgl fail if perf issues flag moved to setupPixi(); --- src/core/Window.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/core/Window.js b/src/core/Window.js index 135eb24..cb6acbe 100644 --- a/src/core/Window.js +++ b/src/core/Window.js @@ -108,12 +108,6 @@ export class Window extends PsychObject this._addAttribute("autoLog", autoLog); this._addAttribute("size", []); - if (this._psychoJS._checkWebGLSupport) - { - // see checkWebGLSupport() method for details. - PIXI.settings.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT = true; - } - // setup PIXI: this._setupPixi(); @@ -442,6 +436,12 @@ export class Window extends PsychObject this._size[0] = window.innerWidth; this._size[1] = window.innerHeight; + if (this._psychoJS._checkWebGLSupport) + { + // see checkWebGLSupport() method for details. + PIXI.settings.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT = true; + } + // create a PIXI renderer and add it to the document: this._renderer = PIXI.autoDetectRenderer({ width: this._size[0],