Skip to content

Commit cccb9b6

Browse files
committed
corrected ortho() params in P2D
1 parent 20ff5c9 commit cccb9b6

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

core/src/processing/opengl/PGraphics2D.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,7 @@ public void frustum(float left, float right, float bottom, float top,
119119

120120
@Override
121121
protected void defaultPerspective() {
122-
// The camera part of the modelview is simply the identity matrix, so in
123-
// order to the ortho projection to be consistent with this, it needs to be
124-
// set as follows, because ortho() will shift the viewing rectangle at
125-
// (width/2, height/2) and will also apply the axis inversion along Y:
126-
super.ortho(width/2f, (3f/2f) * width, -height/2f, height/2f, -1, +1);
122+
super.ortho(0, width, -height, 0, -1, +1);
127123
}
128124

129125

@@ -160,6 +156,7 @@ public void camera(float eyeX, float eyeY, float eyeZ,
160156

161157
@Override
162158
protected void defaultCamera() {
159+
cameraEyeX = cameraEyeY = cameraEyeZ = 0;
163160
resetMatrix();
164161
}
165162

0 commit comments

Comments
 (0)