From dbc9b78804e403a22437aeb686e214c370d6cf46 Mon Sep 17 00:00:00 2001 From: codeanticode Date: Thu, 3 Oct 2013 15:02:05 -0400 Subject: [PATCH] slightly different ortho() setup in P2D allows for identity modelview --- core/src/processing/opengl/PGraphics2D.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/core/src/processing/opengl/PGraphics2D.java b/core/src/processing/opengl/PGraphics2D.java index 0f35b711c..9c1761cba 100644 --- a/core/src/processing/opengl/PGraphics2D.java +++ b/core/src/processing/opengl/PGraphics2D.java @@ -119,7 +119,7 @@ public class PGraphics2D extends PGraphicsOpenGL { @Override protected void defaultPerspective() { - super.ortho(0, width, 0, height, -1, +1); + super.ortho(width/2f, (3f/2f) * width, -height/2f, height/2f, -1, +1); } @@ -156,7 +156,7 @@ public class PGraphics2D extends PGraphicsOpenGL { @Override protected void defaultCamera() { - super.camera(width/2f, height/2f); + resetMatrix(); } @@ -180,6 +180,12 @@ public class PGraphics2D extends PGraphicsOpenGL { popProjection(); } +// @Override +// public void resetMatrix() { +// super.resetMatrix(); +// defaultCamera(); +// } + //////////////////////////////////////////////////////////////