mirror of
https://github.com/processing/processing4.git
synced 2026-02-18 21:05:36 +01:00
wrong arguments in ortho() call
This commit is contained in:
@@ -81,12 +81,12 @@ public class PGraphics3D extends PGraphicsOpenGL {
|
||||
@Override
|
||||
protected void begin2D() {
|
||||
pushProjection();
|
||||
ortho(0, width, 0, height, -1, +1);
|
||||
ortho(-width/2f, width/2f, -height/2f, height/2f);
|
||||
pushMatrix();
|
||||
|
||||
// Set camera for 2D rendering, it simply centers at (width/2, height/2)
|
||||
float centerX = width/2;
|
||||
float centerY = height/2;
|
||||
float centerX = width/2f;
|
||||
float centerY = height/2f;
|
||||
modelview.reset();
|
||||
modelview.translate(-centerX, -centerY);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user