From 61334d46ebad4b86cf556278c37c651d69eafe72 Mon Sep 17 00:00:00 2001 From: codeanticode Date: Tue, 4 Mar 2014 16:32:00 -0500 Subject: [PATCH] corrected ortho() params in P2D --- core/src/processing/opengl/PGraphics2D.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/core/src/processing/opengl/PGraphics2D.java b/core/src/processing/opengl/PGraphics2D.java index 7229e561d..b3fc4e890 100644 --- a/core/src/processing/opengl/PGraphics2D.java +++ b/core/src/processing/opengl/PGraphics2D.java @@ -119,11 +119,7 @@ public class PGraphics2D extends PGraphicsOpenGL { @Override protected void defaultPerspective() { - // The camera part of the modelview is simply the identity matrix, so in - // order to the ortho projection to be consistent with this, it needs to be - // set as follows, because ortho() will shift the viewing rectangle at - // (width/2, height/2) and will also apply the axis inversion along Y: - super.ortho(width/2f, (3f/2f) * width, -height/2f, height/2f, -1, +1); + super.ortho(0, width, -height, 0, -1, +1); } @@ -160,6 +156,7 @@ public class PGraphics2D extends PGraphicsOpenGL { @Override protected void defaultCamera() { + cameraEyeX = cameraEyeY = cameraEyeZ = 0; resetMatrix(); }