@Override public void dispose(GLAutoDrawable drawable) { System.out.println("-> [VRL-JOGL]: gl dispose"); program.delete(); scalableSurface = null; try { animator.remove(drawable); } catch (Exception ex) { // animator already removed } }
@Override public void dispose(JOGLCanvas3D canvas) { if(animator!=null) { animator.stop(); try { animator.remove(canvas); } catch(Exception ex) { // if it fails, we already removed it } } canvas.removeGLEventListener(this); }
@Override public void dispose(JOGLCanvas3D canvas) { System.out.println("-> [VRL-JOGL]: visualization dispose"); canvas.removeGLEventListener(this); canvas.removeMouseListener(this); canvas.removeMouseMotionListener(this); canvas.removeMouseWheelListener(this); setScalableSurface(null); try { animator.remove(drawable); } catch (Exception ex) { // animator already removed } } }