bug fix for the 2D engine

This commit is contained in:
Antonin Boyon 2021-03-16 15:18:00 +01:00
parent 6371082665
commit 562f366a2b
4 changed files with 2 additions and 7 deletions

View File

@ -51,7 +51,7 @@ public class JoglEventListener2D implements GLEventListener {
float xDefault = -1.0f, yDefault = -1.0f;
DrawHelper.drawStick(gl, 0.1f, xDefault, yDefault, 0);
DrawHelper.drawStick(gl, 0.2f, -0.9f, -0.9f, 90);
DrawHelper.drawStick(gl, 0.2f, 1.1f, 1.1f, 90);
}
@Override

View File

@ -30,7 +30,6 @@ public class JoglMouseListener2D implements MouseListener, MouseMotionListener,
button = 0;
origine = null;
}
}
@Override

View File

@ -7,6 +7,7 @@ public class SwingGLCanvas2D extends AbstractCanvas {
@Override
protected void addEventsListeners() {
glCanvas.addGLEventListener(new JoglEventListener2D(this));
JoglMouseListener2D mouse = new JoglMouseListener2D(this);
glCanvas.addMouseListener(mouse);

View File

@ -167,11 +167,6 @@ public class DrawHelper {
gl.glVertex2f(x, y);
gl.glVertex2f(x + (echelle * newX), y + (echelle * newY));
gl.glEnd();
/* System.out.println("X : " +(x + (echelle * newX)));
System.out.println("Y : " +(y + (echelle * newY)));
System.out.println("angle : " +angle);
System.out.println("newX : " +newX);
System.out.println("newY : " +newY);*/
}
}