diff --git a/src/webgl/p5.RendererGL.js b/src/webgl/p5.RendererGL.js index 2eaa885c11..485d62038d 100644 --- a/src/webgl/p5.RendererGL.js +++ b/src/webgl/p5.RendererGL.js @@ -1145,6 +1145,9 @@ p5.RendererGL = class RendererGL extends p5.Renderer { } // draw pg contents onto main renderer this._pInst.push(); + this._pInst.resetMatrix(); // Reset the transformation matrix to identity + this._pInst.clear(); // Clear the canvas + this._pInst.blendMode(this._pInst.BLEND); // Set blend mode to BLEND this._pInst.noStroke(); this._pInst.image(pg, -this.width/2, -this.height/2, this.width, this.height);