@Override public void widgetDisposed( DisposeEvent e ) { // dispose of resources associated with the canvas disposeAttached( ); // destroy the source of the shared glContext sharedContextSource.destroy( ); } } );
@Override public void run() { synchronized(sync) { if( DEBUG ) { System.err.println("AWT print.release "+printAWTTiles); } final GLAutoDrawable glad = getGLAD(); printAWTTiles.dispose(); printAWTTiles= null; if( printGLAD != glad ) { GLDrawableUtil.swapGLContextAndAllGLEventListener(printGLAD, glad); printGLAD.destroy(); } printGLAD = null; if( null != printAnimator ) { printAnimator.add(glad); printAnimator = null; } printActive = false; } } };
@Override public void run() { final RecursiveLock _lock = lock; _lock.lock(); try { if( DEBUG ) { System.err.println("AWT print.release "+printAWTTiles); } printAWTTiles.dispose(); printAWTTiles= null; if( printGLAD != GLCanvas.this ) { GLDrawableUtil.swapGLContextAndAllGLEventListener(printGLAD, GLCanvas.this); printGLAD.destroy(); } printGLAD = null; if( null != printAnimator ) { printAnimator.add(GLCanvas.this); printAnimator = null; } sendReshape = true; // trigger reshape, i.e. gl-viewport and -listener - this component might got resized! printActive = false; display(); } finally { _lock.unlock(); } } };
if( printGLAD != GLJPanel.this ) { GLDrawableUtil.swapGLContextAndAllGLEventListener(printGLAD, GLJPanel.this); printGLAD.destroy();