From 0a1f9fd9c07a5fabf0d28bdb3272d9b019209b24 Mon Sep 17 00:00:00 2001 From: Radek Oslejsek <oslejsek@fi.muni.cz> Date: Mon, 11 May 2020 16:39:11 +0200 Subject: [PATCH] Transformed from old javax.media.opengl to new com.jogamp.opengl --- .../java/cz/fidentis/analyst/gui/Canvas.java | 10 ++++---- .../analyst/gui/GeneralGLEventListener.java | 24 +++++++++---------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/Canvas.java b/GUI/src/main/java/cz/fidentis/analyst/gui/Canvas.java index 0715b036..b49e6ea9 100644 --- a/GUI/src/main/java/cz/fidentis/analyst/gui/Canvas.java +++ b/GUI/src/main/java/cz/fidentis/analyst/gui/Canvas.java @@ -1,16 +1,16 @@ package cz.fidentis.analyst.gui; +import com.jogamp.opengl.GLCapabilities; +import com.jogamp.opengl.GLEventListener; +import com.jogamp.opengl.GLProfile; +import com.jogamp.opengl.awt.GLCanvas; import cz.fidentis.analyst.mesh.io.ModelFileFilter; import cz.fidentis.analyst.mesh.core.MeshModel; import cz.fidentis.analyst.mesh.io.MeshObjLoader; -import javax.media.opengl.GLCapabilities; -import javax.media.opengl.GLProfile; -import javax.media.opengl.awt.GLCanvas; import com.jogamp.opengl.util.FPSAnimator; import java.awt.Color; import java.awt.Cursor; import java.awt.Dimension; -import java.awt.image.BufferedImage; import java.io.File; import java.util.Timer; import java.util.TimerTask; @@ -186,7 +186,7 @@ public class Canvas extends javax.swing.JPanel { if (model != null) { // listener enables to manipulate and interact with model listener.setCameraPosition(0, 0, 300); - glCanvas.addGLEventListener(listener); + glCanvas.addGLEventListener((GLEventListener) listener); listener.setModel(model); listener.rotationAndSizeRestart(); loadModelButton.setVisible(false); diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/GeneralGLEventListener.java b/GUI/src/main/java/cz/fidentis/analyst/gui/GeneralGLEventListener.java index 24566d99..cffb06a2 100644 --- a/GUI/src/main/java/cz/fidentis/analyst/gui/GeneralGLEventListener.java +++ b/GUI/src/main/java/cz/fidentis/analyst/gui/GeneralGLEventListener.java @@ -2,18 +2,18 @@ package cz.fidentis.analyst.gui; import cz.fidentis.analyst.mesh.core.MeshModel; import cz.fidentis.analyst.mesh.core.MeshFacet; -import javax.media.opengl.GL; -import static javax.media.opengl.GL.GL_DEPTH_TEST; -import static javax.media.opengl.GL.GL_FRONT_AND_BACK; -import static javax.media.opengl.GL.GL_VIEWPORT; -import javax.media.opengl.GL2; -import static javax.media.opengl.GL2GL3.GL_FILL; -import static javax.media.opengl.GL2GL3.GL_LINE; -import javax.media.opengl.GLAutoDrawable; -import javax.media.opengl.GLEventListener; -import static javax.media.opengl.fixedfunc.GLMatrixFunc.GL_MODELVIEW_MATRIX; -import static javax.media.opengl.fixedfunc.GLMatrixFunc.GL_PROJECTION_MATRIX; -import javax.media.opengl.glu.GLU; +import com.jogamp.opengl.GL; +import static com.jogamp.opengl.GL.GL_DEPTH_TEST; +import static com.jogamp.opengl.GL.GL_FRONT_AND_BACK; +import static com.jogamp.opengl.GL.GL_VIEWPORT; +import com.jogamp.opengl.GL2; +import static com.jogamp.opengl.GL2GL3.GL_FILL; +import static com.jogamp.opengl.GL2GL3.GL_LINE; +import com.jogamp.opengl.GLAutoDrawable; +import com.jogamp.opengl.GLEventListener; +import static com.jogamp.opengl.fixedfunc.GLMatrixFunc.GL_MODELVIEW_MATRIX; +import static com.jogamp.opengl.fixedfunc.GLMatrixFunc.GL_PROJECTION_MATRIX; +import com.jogamp.opengl.glu.GLU; import javax.vecmath.Vector3d; import javax.vecmath.Vector3f; -- GitLab