From 9b35c57425b0a5f6b789b9b43a62a8b64be51d86 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 4 Jul 2012 18:02:11 +0200 Subject: GLAutoDrawable* refinement of abstraction / generalization - API Change! - GLAutoDrawable (compat change - recompile): - 'void invoke(boolean wait, GLRunnable glRunnable)' -> 'boolean invoke(boolean wait, GLRunnable glRunnable)' Allows notifying caller whether the task has been executed or at least enqueued. - GLAutoDrawable add 'GLEventListener removeGLEventListener(int index)' - This allow one to remove a specific GLEventListener and reusing it (return value). - GLDrawableImpl remove 'destroy()' to favor 'setRealized(false)' - Using more common code of GLAutoDrawableBase, i.e. GLPbufferImpl can use defaultDestroyOp(). - Removes redundancy of methods - GLAutoDrawableBase/Delegate - better 'default' names to emphasize it's purpose, adding API doc - includes more generic functionality - defaultWindowDestroyNotify() - defaultDestroyOp() - TestGLAutoDrawableDelegateNEWT demonstrates a simple example w/ all window events handled. - Fix TestParenting01cSwingAWT's threading use (gl disturbance thread) --- src/jogl/classes/jogamp/opengl/GLDrawableImpl.java | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to 'src/jogl/classes/jogamp/opengl/GLDrawableImpl.java') diff --git a/src/jogl/classes/jogamp/opengl/GLDrawableImpl.java b/src/jogl/classes/jogamp/opengl/GLDrawableImpl.java index b3884830a..58a4ac6b4 100644 --- a/src/jogl/classes/jogamp/opengl/GLDrawableImpl.java +++ b/src/jogl/classes/jogamp/opengl/GLDrawableImpl.java @@ -70,20 +70,6 @@ public abstract class GLDrawableImpl implements GLDrawable { return (GLDrawableFactoryImpl) getFactory(); } - /** For offscreen GLDrawables (pbuffers and "pixmap" drawables), - indicates that native resources should be reclaimed. */ - public void destroy() { - surface.getGraphicsConfiguration().getScreen().getDevice().lock(); - try { - destroyImpl(); - } finally { - surface.getGraphicsConfiguration().getScreen().getDevice().unlock(); - } - } - protected void destroyImpl() { - throw new GLException("Should not call this (should only be called for offscreen GLDrawables)"); - } - @Override public final void swapBuffers() throws GLException { if( !realized ) { @@ -164,7 +150,7 @@ public abstract class GLDrawableImpl implements GLDrawable { AbstractGraphicsDevice aDevice = surface.getGraphicsConfiguration().getScreen().getDevice(); if(realizedArg) { if(NativeSurface.LOCK_SURFACE_NOT_READY >= lockSurface()) { - throw new GLException("GLDrawableImpl.setRealized(true): already realized, but surface not ready (lockSurface)"); + throw new GLException("GLDrawableImpl.setRealized(true): Surface not ready (lockSurface)"); } } else { aDevice.lock(); -- cgit v1.2.3