From 4a4d72d8eb737bbeb0f6277aba31b65f32b2af73 Mon Sep 17 00:00:00 2001 From: codeanticode Date: Thu, 14 Apr 2011 12:50:50 +0000 Subject: [PATCH] Updated projection and modelview matrices in the print methods --- .../opengl2/src/processing/opengl2/PGraphicsOpenGL2.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/java/libraries/opengl2/src/processing/opengl2/PGraphicsOpenGL2.java b/java/libraries/opengl2/src/processing/opengl2/PGraphicsOpenGL2.java index c6be2d767..68ca12d54 100644 --- a/java/libraries/opengl2/src/processing/opengl2/PGraphicsOpenGL2.java +++ b/java/libraries/opengl2/src/processing/opengl2/PGraphicsOpenGL2.java @@ -3969,8 +3969,14 @@ public class PGraphicsOpenGL2 extends PGraphics { */ public void printMatrix() { if (matrixMode == PROJECTION) { + if (!projectionUpdated) { + getProjectionMatrix(); + } projection.print(); } else { + if (!modelviewUpdated) { + getModelviewMatrix(); + } modelview.print(); } } @@ -4602,6 +4608,9 @@ public class PGraphicsOpenGL2 extends PGraphics { * Print the current projection matrix. */ public void printProjection() { + if (!projectionUpdated) { + getProjectionMatrix(); + } projection.print(); }