From 4c83822966dd3b82f79af16cf9e50acbf74254f9 Mon Sep 17 00:00:00 2001 From: Gaurav Tiwary <97665755+Gaurav-1306@users.noreply.github.com> Date: Tue, 17 Oct 2023 19:01:04 +0530 Subject: [PATCH 1/3] resolved issue #6399 --- src/webgl/p5.RendererGL.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/webgl/p5.RendererGL.js b/src/webgl/p5.RendererGL.js index 88ac6eaf16..7e929dc988 100644 --- a/src/webgl/p5.RendererGL.js +++ b/src/webgl/p5.RendererGL.js @@ -996,7 +996,15 @@ p5.RendererGL = class RendererGL extends p5.Renderer { // geometries/borders on this layer should always be invisible this.filterGraphicsLayer.noStroke(); } - + else if( + this.filterGraphicsLayer.width !== this.width || + this.filterGraphicsLayer.height !== this.height || + this.filterGraphicsLayer.pixelDensity() !== this.pixelDensity() + ){ + // Resize the graphics layer + this.filterGraphicsLayer.resizeCanvas(this.width, this.height); + this.filterGraphicsLayer.pixelDensity(this.pixelDensity()); + } let pg = this.filterGraphicsLayer; From 4e91fc92b291864950393a3190ce4bcfa94e0662 Mon Sep 17 00:00:00 2001 From: Gaurav Tiwary <97665755+Gaurav-1306@users.noreply.github.com> Date: Tue, 17 Oct 2023 19:25:19 +0530 Subject: [PATCH 2/3] resolved issues --- src/webgl/p5.RendererGL.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/webgl/p5.RendererGL.js b/src/webgl/p5.RendererGL.js index 7e929dc988..e88af15218 100644 --- a/src/webgl/p5.RendererGL.js +++ b/src/webgl/p5.RendererGL.js @@ -999,11 +999,11 @@ p5.RendererGL = class RendererGL extends p5.Renderer { else if( this.filterGraphicsLayer.width !== this.width || this.filterGraphicsLayer.height !== this.height || - this.filterGraphicsLayer.pixelDensity() !== this.pixelDensity() + this.filterGraphicsLayer.pixelDensity !== this._pInst.pixelDensity() ){ // Resize the graphics layer this.filterGraphicsLayer.resizeCanvas(this.width, this.height); - this.filterGraphicsLayer.pixelDensity(this.pixelDensity()); + this.filterGraphicsLayer.pixelDensity(this._pInst.pixelDensity()); } let pg = this.filterGraphicsLayer; From 213d8fbb872a83b15fce99228807882e2c6ec8c6 Mon Sep 17 00:00:00 2001 From: Gaurav Tiwary <97665755+Gaurav-1306@users.noreply.github.com> Date: Tue, 17 Oct 2023 19:34:59 +0530 Subject: [PATCH 3/3] minor changes --- src/webgl/p5.RendererGL.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webgl/p5.RendererGL.js b/src/webgl/p5.RendererGL.js index e88af15218..077cbc99ee 100644 --- a/src/webgl/p5.RendererGL.js +++ b/src/webgl/p5.RendererGL.js @@ -999,7 +999,7 @@ p5.RendererGL = class RendererGL extends p5.Renderer { else if( this.filterGraphicsLayer.width !== this.width || this.filterGraphicsLayer.height !== this.height || - this.filterGraphicsLayer.pixelDensity !== this._pInst.pixelDensity() + this.filterGraphicsLayer.pixelDensity() !== this._pInst.pixelDensity() ){ // Resize the graphics layer this.filterGraphicsLayer.resizeCanvas(this.width, this.height);