mirror of
https://github.com/processing/processing4.git
synced 2026-02-11 17:40:48 +01:00
trying to fix regression introduced in camera setup in P2D (issue #2259)
This commit is contained in:
@@ -119,7 +119,8 @@ public class PGraphics2D extends PGraphicsOpenGL {
|
||||
|
||||
@Override
|
||||
protected void defaultPerspective() {
|
||||
super.ortho(width/2f, (3f/2f) * width, -height/2f, height/2f, -1, +1);
|
||||
// super.ortho(width/2f, (3f/2f) * width, -height/2f, height/2f, -1, +1);
|
||||
super.ortho(0, width, 0, height, -1, +1);
|
||||
}
|
||||
|
||||
|
||||
@@ -156,7 +157,8 @@ public class PGraphics2D extends PGraphicsOpenGL {
|
||||
|
||||
@Override
|
||||
protected void defaultCamera() {
|
||||
resetMatrix();
|
||||
super.camera(width/2f, height/2f);
|
||||
// resetMatrix();
|
||||
}
|
||||
|
||||
|
||||
@@ -180,6 +182,11 @@ public class PGraphics2D extends PGraphicsOpenGL {
|
||||
popProjection();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resetMatrix() {
|
||||
super.resetMatrix();
|
||||
defaultCamera();
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
Reference in New Issue
Block a user