From 98b56552139441d591b54fc6abd68a6221f29c67 Mon Sep 17 00:00:00 2001 From: codeanticode Date: Wed, 30 May 2012 15:31:10 +0000 Subject: [PATCH] matrix transformations in PShapeOpenGL are stored even when the shape is not ended yet. --- .../src/processing/opengl/PShapeOpenGL.java | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/java/libraries/opengl/src/processing/opengl/PShapeOpenGL.java b/java/libraries/opengl/src/processing/opengl/PShapeOpenGL.java index b557d45a5..04ee14435 100644 --- a/java/libraries/opengl/src/processing/opengl/PShapeOpenGL.java +++ b/java/libraries/opengl/src/processing/opengl/PShapeOpenGL.java @@ -1715,10 +1715,8 @@ public class PShapeOpenGL extends PShape { public void applyMatrix(PMatrix2D source) { - transform(MATRIX, source.m00, source.m01, 0, source.m02, - source.m10, source.m11, 0, source.m12, - 0, 0, 1, 0, - 0, 0, 0, 1); + transform(MATRIX, source.m00, source.m01, source.m02, + source.m10, source.m11, source.m12); } @@ -1772,13 +1770,11 @@ public class PShapeOpenGL extends PShape { protected void transformImpl(int type, int ncoords, float... args) { - if (shapeEnded) { - checkMatrix(ncoords); - calcTransform(type, ncoords, args); - if (tessellated) { - applyMatrixImpl(transform); - } - } + checkMatrix(ncoords); + calcTransform(type, ncoords, args); + if (tessellated) { + applyMatrixImpl(transform); + } }