corrected ortho() params in P2D

This commit is contained in:
codeanticode
2014-03-04 16:32:00 -05:00
parent 7576859457
commit 61334d46eb

View File

@@ -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();
}