From de958c9f1551fd4a8ac345cab7e13c84446a48da Mon Sep 17 00:00:00 2001 From: Antonin Boyon Date: Tue, 2 Mar 2021 18:36:05 +0100 Subject: [PATCH] correction of JoglEventListener2D --- src/lsystem/screen/Jogl.java | 8 ++++++-- src/lsystem/screen/listener/JoglEventListener2D.java | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/lsystem/screen/Jogl.java b/src/lsystem/screen/Jogl.java index ee9da97..8c06df1 100644 --- a/src/lsystem/screen/Jogl.java +++ b/src/lsystem/screen/Jogl.java @@ -7,6 +7,8 @@ import com.jogamp.opengl.GLEventListener; import com.jogamp.opengl.awt.GLCanvas; import com.jogamp.opengl.util.Animator; +import lsystem.screen.listener.JoglEventListener2D; + import java.awt.*; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; @@ -105,8 +107,10 @@ public class Jogl implements GLEventListener { } public static void main(String[] args) { - Jogl jogl = new Jogl(); - jogl.initialize(args); + //Jogl jogl = new Jogl(); + //jogl.initialize(args); + SwingGLCanvas2D canvas = new SwingGLCanvas2D(); + JoglEventListener2D a = new JoglEventListener2D(canvas); } } diff --git a/src/lsystem/screen/listener/JoglEventListener2D.java b/src/lsystem/screen/listener/JoglEventListener2D.java index d6127e3..476124d 100644 --- a/src/lsystem/screen/listener/JoglEventListener2D.java +++ b/src/lsystem/screen/listener/JoglEventListener2D.java @@ -91,7 +91,7 @@ public class JoglEventListener2D implements GLEventListener { DrawHelper.drawStick(gl, 0.1f, xDefault, yDefault, 0); - DrawHelper.drawStick(gl, 0.2f, 1.1f, 1.1f, 90); + DrawHelper.drawStick(gl, 0.2f, -0.9f, -0.9f, 90); } @Override