From 3fd2f4c28f2fb7fb41e551bd776c4c8bdb04f81e Mon Sep 17 00:00:00 2001 From: Deveshi Dwivedi <120312681+deveshidwivedi@users.noreply.github.com> Date: Sat, 3 Feb 2024 00:29:12 +0530 Subject: [PATCH] Update p5.RendererGL.Retained.js --- src/webgl/p5.RendererGL.Retained.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/webgl/p5.RendererGL.Retained.js b/src/webgl/p5.RendererGL.Retained.js index c9302f83ac..bfeb562450 100644 --- a/src/webgl/p5.RendererGL.Retained.js +++ b/src/webgl/p5.RendererGL.Retained.js @@ -189,15 +189,16 @@ p5.RendererGL.prototype.drawBuffersScaled = function( scaleY, scaleZ ) { + let originalModelMatrix = this.uModelMatrix.copy(); try { this.uModelMatrix.scale(scaleX, scaleY, scaleZ); - this.uMVMatrix.scale(scaleX, scaleY, scaleZ); + this.drawBuffers(gId); } finally { - this.uModelMatrix = uModelMatrix; + + this.uModelMatrix = originalModelMatrix; } }; - p5.RendererGL.prototype._drawArrays = function(drawMode, gId) { this.GL.drawArrays( drawMode,