slightly different ortho() setup in P2D allows for identity modelview

This commit is contained in:
codeanticode
2013-10-03 15:02:05 -04:00
parent 0388ebbe4a
commit dbc9b78804

View File

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