mirror of
https://github.com/processing/processing4.git
synced 2026-02-11 17:40:48 +01:00
corrected ortho() params in P2D
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user