[libjogl2-java] 30/58: Imported Upstream version 2.0-rc10

Tony Mancill tmancill at moszumanska.debian.org
Thu Sep 4 03:59:15 UTC 2014


This is an automated email from the git hooks/post-receive script.

tmancill pushed a commit to branch master
in repository libjogl2-java.

commit d2b118b7b009c85f1dcbac4173846585b1fa7c7f
Author: tony mancill <tmancill at debian.org>
Date:   Fri Aug 29 18:44:33 2014 -0700

    Imported Upstream version 2.0-rc10
---
 doc/Platform.GLES.txt                              |    4 +-
 doc/TODO.txt                                       |   15 +-
 etc/profile.jogl                                   |   19 +-
 etc/test.bat                                       |    2 +-
 etc/test_dbg.bat                                   |    2 +-
 jnlp-files/atomic/jogl-awt.jnlp                    |   54 +-
 jnlp-files/atomic/jogl-noawt.jnlp                  |   50 +-
 jnlp-files/atomic/nativewindow-awt.jnlp            |   19 +-
 jnlp-files/atomic/nativewindow-noawt.jnlp          |   30 +-
 jnlp-files/atomic/newt-awt-jogl.jnlp               |   36 +-
 jnlp-files/atomic/newt-awt.jnlp                    |   34 +-
 jnlp-files/atomic/newt-noawt-jogl.jnlp             |   36 +-
 jnlp-files/atomic/newt-noawt.jnlp                  |   30 +-
 jnlp-files/jogl-all-awt-cg.jnlp                    |   36 +-
 jnlp-files/jogl-all-awt.jnlp                       |    2 +-
 jnlp-files/jogl-all-mobile.jnlp                    |    2 +-
 jnlp-files/jogl-all-noawt.jnlp                     |    2 +-
 ...nner-newt-ElektronenMultiplizierer-napplet.html |    8 +-
 ...pplet-runner-newt-ElektronenMultiplizierer.html |    8 +-
 ...applet-runner-newt-GraphTextDemo01-napplet.html |    8 +-
 .../jogl-applet-runner-newt-GraphTextDemo01.html   |    8 +-
 ...let-runner-newt-GraphUISceneDemo01-napplet.html |    8 +-
 ...jogl-applet-runner-newt-GraphUISceneDemo01.html |    8 +-
 .../jogl-applet-runner-newt-MovieCube-napplet.html |    8 +-
 jnlp-files/jogl-applet-runner-newt-MovieCube.html  |    8 +-
 ...plet-runner-newt-gears-normal-launcheronly.html |   16 +-
 ...gl-applet-runner-newt-gears-normal-napplet.html |   18 +-
 ...l-applet-runner-newt-gears-normal-napplet2.html |   18 +-
 .../jogl-applet-runner-newt-gears-normal.html      |   20 +-
 ...l-applet-runner-newt-gears-special-napplet.html |    8 +-
 .../jogl-applet-runner-newt-gears-special.html     |    8 +-
 jnlp-files/jogl-applet-runner-newt.jnlp            |    2 +-
 jnlp-files/jogl-applet-version-lancheronly.html    |    4 +-
 jnlp-files/jogl-applet-version-napplet.html        |    8 +-
 jnlp-files/jogl-applet-version.html                |    4 +-
 make/build-common.xml                              |  291 +--
 make/build-jogl.xml                                |   46 +-
 make/build-nativewindow.xml                        |   10 +-
 make/build-newt.xml                                |   41 +-
 make/build-test.xml                                |  113 +-
 make/build.xml                                     |   18 +-
 make/config/jogl/gl-common.cfg                     |   13 +
 make/config/jogl/gl-if-CustomJavaCode-gl.java      |   26 -
 .../config/jogl/gl-impl-CustomJavaCode-common.java |   57 +-
 .../jogl/gl-impl-CustomJavaCode-desktop.java       |   25 +-
 .../jogl/gl-impl-CustomJavaCode-gl2_es2.java       |    6 +-
 make/config/jogl/gl-impl-CustomJavaCode-gl4bc.java |   74 +-
 make/config/jogl/gl-impl-CustomJavaCode-gles1.java |   84 +-
 make/config/jogl/gl-impl-CustomJavaCode-gles2.java |   81 +-
 make/config/nativewindow/x11-CustomJavaCode.java   |    4 +-
 make/scripts/adb-install-all-armv7.sh              |    6 +-
 make/scripts/java-win32-dbg.bat                    |   15 +-
 make/scripts/java-win32.bat                        |    6 +-
 make/scripts/java-win64-dbg.bat                    |   16 +-
 make/scripts/java-win64.bat                        |    5 +-
 make/scripts/setenv-jogl.sh                        |   10 +-
 make/scripts/tests-osx-x64-mainthread.sh           |   11 +
 make/scripts/tests-x32.bat                         |    3 +-
 make/scripts/tests-x64.bat                         |   33 +-
 make/scripts/tests.sh                              |  109 +-
 make/stub_includes/opengl/macosx-window-system.h   |    2 +-
 make/stub_includes/win32/wingdi.h                  |    2 +
 .../gluegen/opengl/BuildComposablePipeline.java    |    2 +-
 .../jogamp/gluegen/opengl/BuildStaticGLInfo.java   |    4 +-
 .../com/jogamp/gluegen/opengl/GLConfiguration.java |   10 +-
 .../com/jogamp/gluegen/opengl/GLEmitter.java       |   18 +-
 .../{GLExtensionNames.java => GLNameResolver.java} |    3 +-
 .../runtime/opengl/GLProcAddressResolver.java      |    4 +-
 src/jogl/classes/com/jogamp/opengl/FBObject.java   | 1943 ++++++++++++++++++++
 .../classes/com/jogamp/opengl/GLExtensions.java    |   81 +
 .../classes/com/jogamp/opengl/JoglVersion.java     |   32 +-
 .../com/jogamp/opengl/OffscreenAutoDrawable.java   |   98 +
 .../opengl/cg/CgDynamicLibraryBundleInfo.java      |    4 +-
 .../classes/com/jogamp/opengl/swt/GLCanvas.java    |  586 +++---
 .../com/jogamp/opengl/util/AnimatorBase.java       |    2 +-
 .../classes/com/jogamp/opengl/util/FBObject.java   |  483 -----
 .../classes/com/jogamp/opengl/util/GLBuffers.java  |  179 +-
 .../com/jogamp/opengl/util/GLReadBufferUtil.java   |   12 +-
 .../com/jogamp/opengl/util/ImmModeSink.java        |   25 +-
 .../com/jogamp/opengl/util/awt/Screenshot.java     |    3 +-
 .../com/jogamp/opengl/util/awt/TextRenderer.java   |    3 +-
 .../com/jogamp/opengl/util/texture/Texture.java    |   25 +-
 .../com/jogamp/opengl/util/texture/TextureIO.java  |    8 +
 .../opengl/util/texture/TextureSequence.java       |    1 -
 .../util/texture/spi/NetPbmTextureWriter.java      |    6 +-
 .../media/opengl/DefaultGLCapabilitiesChooser.java |   17 +-
 .../classes/javax/media/opengl/GLAutoDrawable.java |  211 ++-
 .../javax/media/opengl/GLAutoDrawableDelegate.java |  144 ++
 src/jogl/classes/javax/media/opengl/GLBase.java    |   55 +
 .../classes/javax/media/opengl/GLCapabilities.java |  198 +-
 .../javax/media/opengl/GLCapabilitiesChooser.java  |   12 +-
 .../media/opengl/GLCapabilitiesImmutable.java      |    9 +-
 src/jogl/classes/javax/media/opengl/GLContext.java |  585 ++++--
 .../classes/javax/media/opengl/GLDrawable.java     |   30 +-
 .../javax/media/opengl/GLDrawableFactory.java      |   68 +-
 src/jogl/classes/javax/media/opengl/GLPbuffer.java |   15 +-
 src/jogl/classes/javax/media/opengl/GLProfile.java |  171 +-
 .../javax/media/opengl/awt/AWTGLAutoDrawable.java  |   16 +-
 .../classes/javax/media/opengl/awt/GLCanvas.java   |  521 ++++--
 .../classes/javax/media/opengl/awt/GLJPanel.java   |  256 ++-
 .../jogamp/graph/curve/opengl/VBORegion2PES2.java  |   32 +-
 .../classes/jogamp/opengl/GLAutoDrawableBase.java  |  532 ++++++
 src/jogl/classes/jogamp/opengl/GLContextImpl.java  |  638 ++++---
 .../jogamp/opengl/GLDebugMessageHandler.java       |   22 +-
 .../jogamp/opengl/GLDrawableFactoryImpl.java       |  245 ++-
 .../classes/jogamp/opengl/GLDrawableHelper.java    |  174 +-
 src/jogl/classes/jogamp/opengl/GLDrawableImpl.java |  127 +-
 .../classes/jogamp/opengl/GLFBODrawableImpl.java   |  138 ++
 .../opengl/GLGraphicsConfigurationFactory.java     |    2 +-
 .../jogamp/opengl/GLGraphicsConfigurationUtil.java |   75 +-
 src/jogl/classes/jogamp/opengl/GLPbufferImpl.java  |  292 +--
 src/jogl/classes/jogamp/opengl/GLRunnableTask.java |   39 +-
 src/jogl/classes/jogamp/opengl/egl/EGLContext.java |  129 +-
 .../classes/jogamp/opengl/egl/EGLDisplayUtil.java  |  100 +-
 .../classes/jogamp/opengl/egl/EGLDrawable.java     |  245 +--
 .../jogamp/opengl/egl/EGLDrawableFactory.java      |  441 ++++-
 .../jogamp/opengl/egl/EGLExternalContext.java      |   23 +-
 .../jogamp/opengl/egl/EGLGLCapabilities.java       |   25 +-
 .../opengl/egl/EGLGraphicsConfiguration.java       |   50 +-
 .../egl/EGLGraphicsConfigurationFactory.java       |  135 +-
 .../jogamp/opengl/egl/EGLOnscreenContext.java      |   19 +-
 .../jogamp/opengl/egl/EGLOnscreenDrawable.java     |   20 +-
 .../jogamp/opengl/egl/EGLPbufferContext.java       |   20 +-
 .../jogamp/opengl/egl/EGLPbufferDrawable.java      |   54 +-
 .../jogamp/opengl/egl/EGLUpstreamSurfaceHook.java  |   56 +
 .../jogamp/opengl/macosx/cgl/MacOSXCGLContext.java |  217 ++-
 .../opengl/macosx/cgl/MacOSXCGLDrawable.java       |   44 +-
 .../macosx/cgl/MacOSXCGLDrawableFactory.java       |  226 ++-
 .../macosx/cgl/MacOSXCGLGraphicsConfiguration.java |    9 +-
 .../cgl/MacOSXCGLGraphicsConfigurationFactory.java |    4 +-
 .../macosx/cgl/MacOSXExternalCGLContext.java       |   30 +-
 .../macosx/cgl/MacOSXOffscreenCGLContext.java      |   22 +-
 .../macosx/cgl/MacOSXOffscreenCGLDrawable.java     |   15 +-
 .../macosx/cgl/MacOSXOnscreenCGLContext.java       |   28 +-
 .../macosx/cgl/MacOSXOnscreenCGLDrawable.java      |   17 +-
 .../opengl/macosx/cgl/MacOSXPbufferCGLContext.java |   21 +-
 .../macosx/cgl/MacOSXPbufferCGLDrawable.java       |   65 +-
 .../MacOSXAWTCGLGraphicsConfigurationFactory.java  |    8 +-
 .../jogamp/opengl/util/av/EGLMediaPlayerImpl.java  |    8 +-
 .../opengl/windows/wgl/WGLGLCapabilities.java      |   23 +-
 .../windows/wgl/WindowsBitmapWGLContext.java       |   19 +-
 .../windows/wgl/WindowsBitmapWGLDrawable.java      |   35 +-
 .../windows/wgl/WindowsDummyWGLDrawable.java       |  105 --
 .../windows/wgl/WindowsExternalWGLContext.java     |   27 +-
 .../windows/wgl/WindowsExternalWGLDrawable.java    |   34 +-
 .../windows/wgl/WindowsOnscreenWGLContext.java     |   20 +-
 .../windows/wgl/WindowsOnscreenWGLDrawable.java    |   20 +-
 .../windows/wgl/WindowsPbufferWGLContext.java      |   24 +-
 .../windows/wgl/WindowsPbufferWGLDrawable.java     |   90 +-
 .../opengl/windows/wgl/WindowsWGLContext.java      |   77 +-
 .../opengl/windows/wgl/WindowsWGLDrawable.java     |   35 +-
 .../windows/wgl/WindowsWGLDrawableFactory.java     |  261 ++-
 .../wgl/WindowsWGLGraphicsConfiguration.java       |   46 +-
 .../WindowsWGLGraphicsConfigurationFactory.java    |   37 +-
 .../WindowsAWTWGLGraphicsConfigurationFactory.java |    8 +-
 .../jogamp/opengl/x11/glx/X11DummyGLXDrawable.java |   93 -
 .../opengl/x11/glx/X11ExternalGLXContext.java      |   42 +-
 .../opengl/x11/glx/X11ExternalGLXDrawable.java     |   21 +-
 .../jogamp/opengl/x11/glx/X11GLCapabilities.java   |    7 +-
 .../jogamp/opengl/x11/glx/X11GLXContext.java       |   83 +-
 .../jogamp/opengl/x11/glx/X11GLXDrawable.java      |   24 +-
 .../opengl/x11/glx/X11GLXDrawableFactory.java      |  257 ++-
 .../x11/glx/X11GLXGraphicsConfiguration.java       |  117 +-
 .../glx/X11GLXGraphicsConfigurationFactory.java    |  134 +-
 .../opengl/x11/glx/X11OnscreenGLXContext.java      |   14 +-
 .../opengl/x11/glx/X11OnscreenGLXDrawable.java     |   48 +-
 .../opengl/x11/glx/X11PbufferGLXContext.java       |   17 +-
 .../opengl/x11/glx/X11PbufferGLXDrawable.java      |   53 +-
 .../jogamp/opengl/x11/glx/X11PixmapGLXContext.java |   19 +-
 .../opengl/x11/glx/X11PixmapGLXDrawable.java       |   39 +-
 .../jogamp_opengl_util_av_impl_FFMPEGMediaPlayer.c |    6 +-
 .../macosx/MacOSXWindowSystemInterface-pbuffer.m   |  110 +-
 .../native/macosx/MacOSXWindowSystemInterface.m    |   14 +-
 .../com/jogamp/nativewindow/WrappedSurface.java    |   48 +-
 .../nativewindow/awt/AWTGraphicsConfiguration.java |    4 +-
 .../com/jogamp/nativewindow/awt/JAWTWindow.java    |  181 +-
 .../jogamp/nativewindow/egl/EGLGraphicsDevice.java |   67 +-
 .../com/jogamp/nativewindow/swt/SWTAccessor.java   |   47 +-
 .../jogamp/nativewindow/x11/X11GraphicsDevice.java |   37 +-
 .../jogamp/nativewindow/x11/X11GraphicsScreen.java |    8 +-
 .../media/nativewindow/AbstractGraphicsDevice.java |   31 +-
 .../javax/media/nativewindow/Capabilities.java     |  157 +-
 .../media/nativewindow/CapabilitiesChooser.java    |    2 +-
 .../media/nativewindow/CapabilitiesImmutable.java  |    4 +-
 .../nativewindow/DefaultCapabilitiesChooser.java   |    4 +-
 .../media/nativewindow/DefaultGraphicsDevice.java  |   13 +
 .../nativewindow/GraphicsConfigurationFactory.java |  226 ++-
 .../javax/media/nativewindow/MutableSurface.java}  |   42 +-
 .../javax/media/nativewindow/NativeSurface.java    |   23 +-
 .../javax/media/nativewindow/NativeWindow.java     |   60 +-
 .../media/nativewindow/NativeWindowFactory.java    |   17 +
 .../media/nativewindow/OffscreenLayerSurface.java  |    9 +-
 .../javax/media/nativewindow/ProxySurface.java     |  161 +-
 .../media/nativewindow/SurfaceChangeable.java      |   54 -
 .../DefaultGraphicsConfigurationFactoryImpl.java   |    2 +-
 .../jogamp/nativewindow/NWJNILibLoader.java        |    4 +-
 .../jogamp/nativewindow/SurfaceUpdatedHelper.java  |    4 +-
 .../classes/jogamp/nativewindow/jawt/JAWTUtil.java |   16 +-
 .../nativewindow/jawt/macosx/MacOSXJAWTWindow.java |   31 +-
 .../jogamp/nativewindow/macosx/OSXUtil.java        |   76 +-
 .../jogamp/nativewindow/windows/GDISurface.java    |   67 +-
 .../jogamp/nativewindow/x11/X11Capabilities.java   |    7 +-
 .../x11/X11GraphicsConfigurationFactory.java       |   18 +-
 .../classes/jogamp/nativewindow/x11/X11Util.java   |   37 +-
 .../awt/X11AWTGraphicsConfigurationFactory.java    |   16 +-
 src/nativewindow/native/NativewindowCommon.c       |   19 +
 src/nativewindow/native/NativewindowCommon.h       |    1 +
 src/nativewindow/native/macosx/OSXmisc.m           |  139 +-
 src/nativewindow/native/x11/Xmisc.c                |  238 +--
 .../native/x11/Xmisc.h}                            |   38 +-
 src/newt/classes/com/jogamp/newt/Display.java      |   17 +
 src/newt/classes/com/jogamp/newt/Window.java       |  134 +-
 .../classes/com/jogamp/newt/awt/NewtCanvasAWT.java |   80 +-
 .../classes/com/jogamp/newt/event/KeyEvent.java    |    2 +-
 .../classes/com/jogamp/newt/opengl/GLWindow.java   |  590 +++---
 .../classes/com/jogamp/newt/swt/NewtCanvasSWT.java |  508 +++++
 .../com/jogamp/newt/swt/SWTEDTUtil.java}           |  105 +-
 src/newt/classes/jogamp/newt/DefaultEDTUtil.java   |    2 +-
 src/newt/classes/jogamp/newt/DisplayImpl.java      |   96 +-
 src/newt/classes/jogamp/newt/NEWTJNILibLoader.java |    7 +-
 src/newt/classes/jogamp/newt/OffscreenWindow.java  |   46 +-
 src/newt/classes/jogamp/newt/WindowImpl.java       |  175 +-
 .../newt/awt/event/AWTParentWindowAdapter.java     |   21 +-
 .../jogamp/newt/driver/android/AndroidDisplay.java |   16 +-
 .../jogamp/newt/driver/android/AndroidWindow.java  |   50 +
 .../classes/jogamp/newt/driver/android/MD.java     |    2 +-
 .../classes/jogamp/newt/driver/awt/AWTCanvas.java  |    6 +-
 .../classes/jogamp/newt/driver/awt/AWTDisplay.java |   11 +-
 .../jogamp/newt/driver/broadcom/egl/Display.java   |    4 +-
 .../jogamp/newt/driver/broadcom/egl/Window.java    |    5 +-
 .../jogamp/newt/driver/intel/gdl/Window.java       |    4 +-
 .../classes/jogamp/newt/driver/kd/KDDisplay.java   |   15 +-
 .../classes/jogamp/newt/driver/kd/KDWindow.java    |   15 +-
 .../jogamp/newt/driver/macosx/MacWindow.java       |   23 +-
 .../jogamp/newt/driver/windows/WindowsWindow.java  |   25 +-
 .../classes/jogamp/newt/driver/x11/X11Display.java |    4 +-
 .../classes/jogamp/newt/driver/x11/X11Window.java  |    7 +-
 .../classes/jogamp/newt/event/NEWTEventTask.java   |   13 +-
 src/newt/native/KDWindow.c                         |   21 +-
 src/newt/native/MacWindow.m                        |   56 +-
 src/newt/native/NewtCommon.c                       |   19 +
 src/newt/native/NewtCommon.h                       |    1 +
 src/newt/native/NewtMacWindow.m                    |    6 +-
 src/newt/native/X11Common.h                        |    2 +-
 src/newt/native/X11Display.c                       |   81 +-
 src/newt/native/X11Window.c                        |   12 +-
 .../opengl/test/android/MovieCubeActivity0.java    |    8 +-
 .../opengl/test/android/NEWTGearsES2Activity.java  |    8 +-
 .../test/android/NEWTGearsES2ActivityLauncher.java |    2 +-
 .../test/junit/graph/TestTextRendererNEWT00.java   |    2 +-
 .../graph/demos/GPURendererListenerBase01.java     |    2 +-
 .../junit/graph/demos/ui/UIListenerBase01.java     |    2 +-
 .../test/junit/jogl/acore/TestFBODrawableNEWT.java |  272 +++
 .../jogl/{glsl => acore}/TestFBOMRTNEWT01.java     |   61 +-
 .../junit/jogl/acore/TestFBOMix2DemosES2NEWT.java  |  258 +++
 .../jogl/acore/TestGLAutoDrawableDelegateNEWT.java |  152 ++
 .../acore/TestGLContextDrawableSwitchNEWT.java     |  322 ++++
 .../jogl/acore/TestGLContextSurfaceLockNEWT.java   |   92 +-
 .../test/junit/jogl/acore/TestGLProfile01NEWT.java |    2 +-
 .../junit/jogl/acore/TestInitConcurrentNEWT.java   |    2 +-
 .../jogl/acore/TestNEWTCloseX11DisplayBug565.java  |    8 +-
 .../junit/jogl/acore/TestShutdownCompleteNEWT.java |   19 +-
 .../TestAWTCardLayoutAnimatorStartStopBug532.java  |   11 +-
 .../test/junit/jogl/caps/MultisampleChooser01.java |    7 +-
 .../junit/jogl/caps/TestMultisampleES1AWT.java     |   42 +-
 .../junit/jogl/caps/TestMultisampleES1NEWT.java    |   77 +-
 ...pleES1NEWT.java => TestMultisampleES2NEWT.java} |   78 +-
 .../test/junit/jogl/caps/TestTranslucencyAWT.java  |    1 -
 .../opengl/test/junit/jogl/demos/es1/GearsES1.java |   27 +-
 .../{caps => demos/es1}/MultisampleDemoES1.java    |   37 +-
 .../jogl/demos/es1/newt/TestGearsES1NEWT.java      |    4 +-
 .../test/junit/jogl/demos/es2/FBOMix2DemosES2.java |  309 ++++
 .../opengl/test/junit/jogl/demos/es2/GearsES2.java |   54 +-
 .../junit/jogl/demos/es2/MultisampleDemoES2.java   |  178 ++
 .../test/junit/jogl/demos/es2/RedSquareES2.java    |   80 +-
 .../jogl/demos/es2/TextureSequenceCubeES2.java     |    9 +-
 .../test/junit/jogl/demos/es2/av/MovieCube.java    |    5 +-
 .../test/junit/jogl/demos/es2/av/MovieSimple.java  |    5 +-
 .../junit/jogl/demos/es2/awt/TestGearsES2AWT.java  |   31 +-
 .../jogl/demos/es2/newt/TestGearsES2NEWT.java      |   20 +-
 .../jogl/demos/es2/newt/TestRedSquareES2NEWT.java  |    7 +-
 .../junit/jogl/demos/es2/shader/mgl_default_xxx.fp |   10 +
 .../junit/jogl/demos/es2/shader/mgl_default_xxx.vp |   14 +
 .../junit/jogl/demos/es2/shader/texture02_xxx.fp   |   20 +
 .../opengl/test/junit/jogl/demos/gl2/Gears.java    |   35 +-
 ...elAWTBug450.java => TestGLJPanelAWTBug450.java} |   50 +-
 .../junit/jogl/demos/gl2/awt/TestGearsAWT.java     |   12 +-
 .../jogl/demos/gl2/awt/TestGearsGLJPanelAWT.java   |   12 +-
 .../junit/jogl/demos/gl2/newt/TestGearsNEWT.java   |    4 +-
 .../demos/gl2/newt/TestGearsNewtAWTWrapper.java    |    4 +-
 .../junit/jogl/glsl/TestGLSLShaderState01NEWT.java |    1 -
 .../junit/jogl/glsl/TestGLSLShaderState02NEWT.java |    1 -
 .../test/junit/jogl/offscreen/ReadBufferBase.java  |    4 +-
 .../test/junit/jogl/offscreen/Surface2File.java    |   27 +-
 .../offscreen/TestOffscreen01GLPBufferNEWT.java    |   14 +-
 .../jogl/offscreen/TestOffscreen02BitmapNEWT.java  |   13 +-
 .../test/junit/jogl/offscreen/WindowUtilNEWT.java  |   31 +-
 .../test/junit/jogl/swt/TestNewtCanvasSWTGLn.java  |  233 +++
 .../test/junit/jogl/swt/TestSWTAccessor02GLn.java  |  257 ---
 ...TAWT01GLn.java => TestSWTAccessor03AWTGLn.java} |   10 +-
 .../jogl/swt/TestSWTEclipseGLCanvas01GLn.java      |   29 +-
 ...01GLnAWT.java => TestSWTJOGLGLCanvas01GLn.java} |   89 +-
 .../TestGLReadBufferUtilTextureIOWrite01AWT.java   |  156 ++
 .../TestGLReadBufferUtilTextureIOWrite01NEWT.java  |   58 +-
 .../TestGLReadBufferUtilTextureIOWrite02AWT.java   |  181 ++
 .../TestGLReadBufferUtilTextureIOWrite02NEWT.java  |  125 +-
 .../util/texture/TestPNGTextureFromFileAWT.java    |   13 +-
 .../util/texture/TestPNGTextureFromFileNEWT.java   |   11 +-
 .../junit/newt/parenting/TestParenting01aSWT.java  |  210 +++
 .../newt/parenting/TestParenting01cSwingAWT.java   |  161 +-
 .../junit/newt/parenting/TestParenting02NEWT.java  |    8 +-
 .../junit/newt/parenting/TestParenting04AWT.java   |  239 +++
 .../junit/newt/parenting/TestParenting04SWT.java   |  264 +++
 .../TestParentingOffscreenLayer01GLCanvasAWT.java  |   33 +-
 .../parenting/TestTranslucentParentingAWT.java     |    1 -
 .../opengl/test/junit/util/NEWTGLContext.java      |    8 +-
 .../jogamp/opengl/test/junit/util/UITestCase.java  |   55 +-
 www/index.html                                     |    9 +-
 318 files changed, 15706 insertions(+), 6775 deletions(-)

diff --git a/doc/Platform.GLES.txt b/doc/Platform.GLES.txt
index 0bcd3bc..901e040 100644
--- a/doc/Platform.GLES.txt
+++ b/doc/Platform.GLES.txt
@@ -33,7 +33,7 @@ a request for e.g. GL2ES2 will utilize the highest common desktop profile.
 ...>
 
 Linux:
-    PVRVFrame 2.09.29.0649
+    PVRVFrame 2.09.29.0649, Version_REL_2.10
         Debian Wheezy/testing x64, NV 290.10, 32bit libraries: OK
             GL_VENDOR     Imagination Technologies (Host GL: `NVIDIA Corporation`)
             GL_RENDERER   PowerVR PVRVFrame 8.1 SGX (Host GL: `GeForce GTX 460/PCI/SSE2`)
@@ -75,7 +75,7 @@ Linux:
         Ubuntu 11.10 x64, AMD Catalyst 12.1, 64bit libraries, libgles2-mesa 7.11-0ubuntu3: Error (swrast error, null values)
 
 Windows:
-    PVRVFrame 2.09.29.0649
+    PVRVFrame 2.09.29.0649, Version_REL_2.10
        Windows7 64bit, NV 290.10, 32bit libraries: OK 
             GL_VENDOR     Imagination Technologies (Host GL: `NVIDIA Corporation`)
             GL_RENDERER   PowerVR PVRVFrame 8.1 SGX (Host GL: `GeForce GTX 460/PCIe/SSE2`)
diff --git a/doc/TODO.txt b/doc/TODO.txt
index f86d31e..d31466f 100644
--- a/doc/TODO.txt
+++ b/doc/TODO.txt
@@ -1,16 +1,19 @@
 WIP:
 
+- GLPbuffer -> GLOffscreenAutoDrawable
+    - GLPbuffer GLDrawableFactory.createPbuffer() ->
+      GLOffscreenAutoDrawable GLDrawableFactory.createOffsceenAutoDrawable()
+    - Mark both deprecated!
+
+- Optimize/Fix NIO caching of glMapBuffer/glUnmapBuffer
+  - optimize the NIO caching, i.e. memory range, incr. reference count
+  - _remove_ the cached object w/ decr. ref count, remove object
+
 Random, somewhat old to-do list:
 
 - Non-const array types must be properly released with JNI_COMMIT in
   order to see side effects if the array was copied.
 
-- figure out how to deal with WGL entry points:
-    WINGDIAPI HGLRC WINAPI wglCreateLayerContext(HDC, int);
-    WINGDIAPI BOOL  WINAPI wglUseFontBitmapsA(HDC, DWORD, DWORD, DWORD);
-    WINGDIAPI BOOL  WINAPI wglUseFontBitmapsW(HDC, DWORD, DWORD, DWORD);
-  see commented-out section in make/stub_includes/win32/wingdi.h
-
 - Need a disciplined mechanism for converting char* argument types. For
   example, many C functions accept a "char*" argument with the semantic that
   output data will be written into the buffer pointed to by the
diff --git a/etc/profile.jogl b/etc/profile.jogl
index 1177aaa..7dd5191 100755
--- a/etc/profile.jogl
+++ b/etc/profile.jogl
@@ -25,17 +25,20 @@ function concat_jogl_list()
 
 ARCH=`uname -m`
 KERNEL=`uname -s | awk ' { printf "%s",tolower($0) ; } '`
+if [ "$KERNEL" = "sunos" ] ; then
+    KERNEL="solaris"
+fi
 
 uname -a | grep -i LINUX && OSS=x11
 uname -a | grep -i Darwin && OSS=osx
 uname -a | grep -i CYGWIN && OSS=win
 
-JOGL_TEST="jogl.test.jar"
+JOGL_TEST="jogl-test.jar"
 
-JOGL_JAR_ALL="jogl.all.jar"
-JOGL_JAR_ALL_NOAWT="jogl.all-noawt.jar"
-JOGL_JAR_ALL_MOBILE="jogl.all-mobile.jar"
-JOGL_JAR_SWT="atomic/jogl.swt.jar"
+JOGL_JAR_ALL="jogl-all.jar"
+JOGL_JAR_ALL_NOAWT="jogl-all-noawt.jar"
+JOGL_JAR_ALL_MOBILE="jogl-all-mobile.jar"
+JOGL_JAR_SWT="atomic/jogl-swt.jar"
 
 JOGL_LIB_ALL="libnativewindow_x11.so libnativewindow_awt.so libjogl_desktop.so libjogl_mobile.so libjogl_cg.so libnewt.so"
 JOGL_LIB_ALL_NOAWT="libnativewindow_x11.so libjogl_desktop.so libjogl_mobile.so libjogl_cg.so libnewt.so"
@@ -76,8 +79,8 @@ export JOGL_LIB_DIR
 
 JOGL_ALL_AWT_CLASSPATH=$(concat_jogl_list $JOGL_BUILD_DIR $JOGL_JAR_ALL $JOGL_TEST)
 JOGL_ALL_NOAWT_CLASSPATH=$(concat_jogl_list $JOGL_BUILD_DIR $JOGL_JAR_ALL_NOAWT $JOGL_TEST)
-JOGL_MOBILE_CLASSPATH=$(concat_jogl_list $JOGL_BUILD_DIR $JOGL_JAR_ALL_MOBILE)
-JOGL_SWT_CLASSPATH=$(concat_jogl_list $JOGL_BUILD_DIR $JOGL_JAR_SWT)
+JOGL_MOBILE_CLASSPATH=$(concat_jogl_list $JOGL_BUILD_DIR $JOGL_JAR_ALL_MOBILE $JOGL_TEST)
+JOGL_SWT_CLASSPATH=$(concat_jogl_list $JOGL_BUILD_DIR $JOGL_JAR_SWT $JOGL_TEST)
 export JOGL_ALL_AWT_CLASSPATH JOGL_ALL_NOAWT_CLASSPATH JOGL_MOBILE_CLASSPATH JOGL_SWT_CLASSPATH
 
 if [ ! -z "$JOGL_PROFILE" ] ; then
@@ -99,6 +102,8 @@ export JOGL_CLASSPATH
 
 if [ "$KERNEL" = "linux" ] ; then
     SWT_SUB="gtk"
+elif [ "$KERNEL" = "solaris" ] ; then
+    SWT_SUB="gtk"
 elif [ "$KERNEL" = "darwin" ] ; then
     SWT_SUB="cocoa"
     KERNEL="macosx"
diff --git a/etc/test.bat b/etc/test.bat
index 0c82233..d635c7e 100755
--- a/etc/test.bat
+++ b/etc/test.bat
@@ -1,7 +1,7 @@
 
 set BLD_DIR=jar
 
-set CP_ALL=.;%BLD_DIR%\gluegen-rt.jar;%BLD_DIR%\jogl.all.jar
+set CP_ALL=.;%BLD_DIR%\gluegen-rt.jar;%BLD_DIR%\jogl-all.jar
 echo CP_ALL %CP_ALL%
 
 set X_ARGS="-Dsun.java2d.noddraw=true" "-Dsun.awt.noerasebackground=true"
diff --git a/etc/test_dbg.bat b/etc/test_dbg.bat
index 33bbb91..2096907 100755
--- a/etc/test_dbg.bat
+++ b/etc/test_dbg.bat
@@ -1,7 +1,7 @@
 
 set BLD_DIR=jar
 
-set CP_ALL=.;%BLD_DIR%\gluegen-rt.jar;%BLD_DIR%\jogl.all.jar
+set CP_ALL=.;%BLD_DIR%\gluegen-rt.jar;%BLD_DIR%\jogl-all.jar
 echo CP_ALL %CP_ALL%
 
 set D_ARGS="-Djogamp.debug=all" "-Dnativewindow.debug=all" "-Djogl.debug=all" "-Dnewt.debug=all"
diff --git a/jnlp-files/atomic/jogl-awt.jnlp b/jnlp-files/atomic/jogl-awt.jnlp
index a33eb35..8f15a6c 100644
--- a/jnlp-files/atomic/jogl-awt.jnlp
+++ b/jnlp-files/atomic/jogl-awt.jnlp
@@ -14,83 +14,83 @@
       <all-permissions/>
   </security>
     <resources>
-      <jar href="jar/atomic/jogl.core.jar" />
-      <jar href="jar/atomic/jogl.sdk.jar" />
-      <jar href="jar/atomic/jogl.util.jar" />
-      <jar href="jar/atomic/jogl.awt.jar" />
-      <jar href="jar/atomic/jogl.util.awt.jar" />
-      <jar href="jar/atomic/jogl.glutess.jar" />
-      <jar href="jar/atomic/jogl.glumipmap.jar" />
-      <jar href="jar/atomic/jogl.gldesktop.jar" />
-      <jar href="jar/atomic/jogl.gldesktop.dbg.jar" />
-      <jar href="jar/atomic/jogl.glugldesktop.jar" />
-      <jar href="jar/atomic/jogl.util.gldesktop.jar" />
+      <jar href="jar/atomic/jogl-core.jar" />
+      <jar href="jar/atomic/jogl-sdk.jar" />
+      <jar href="jar/atomic/jogl-util.jar" />
+      <jar href="jar/atomic/jogl-awt.jar" />
+      <jar href="jar/atomic/jogl-util.awt.jar" />
+      <jar href="jar/atomic/jogl-glutess.jar" />
+      <jar href="jar/atomic/jogl-glumipmap.jar" />
+      <jar href="jar/atomic/jogl-gldesktop.jar" />
+      <jar href="jar/atomic/jogl-gldesktop-dbg.jar" />
+      <jar href="jar/atomic/jogl-glu-gldesktop.jar" />
+      <jar href="jar/atomic/jogl-util-gldesktop.jar" />
 
       <extension name="nativewindow" href="JOGL_CODEBASE_TAG/nativewindow-awt.jnlp" />
     </resources>
 
     <resources os="Windows" arch="x86">
-      <jar href="jar/atomic/jogl.os.win.jar" />
+      <jar href="jar/atomic/jogl-os-win.jar" />
       <nativelib href = "jar/atomic/jogl-natives-windows-i586.jar" />
     </resources>
     <resources os="Windows" arch="amd64">
-      <jar href="jar/atomic/jogl.os.win.jar" />
+      <jar href="jar/atomic/jogl-os-win.jar" />
       <nativelib href = "jar/atomic/jogl-natives-windows-amd64.jar" />
     </resources>
     <resources os="Windows" arch="x86_64">
-      <jar href="jar/atomic/jogl.os.win.jar" />
+      <jar href="jar/atomic/jogl-os-win.jar" />
       <nativelib href = "jar/atomic/jogl-natives-windows-amd64.jar" />
     </resources>
     <resources os="SunOS" arch="sparc">
-      <jar href="jar/atomic/jogl.os.x11.jar" />
+      <jar href="jar/atomic/jogl-os-x11.jar" />
       <nativelib href = "jar/atomic/jogl-natives-solaris-sparc.jar" />
     </resources>
     <resources os="SunOS" arch="sparcv9">
-      <jar href="jar/atomic/jogl.os.x11.jar" />
+      <jar href="jar/atomic/jogl-os-x11.jar" />
       <nativelib href = "jar/atomic/jogl-natives-solaris-sparcv9.jar" />
     </resources>
     <resources os="SunOS" arch="x86">
-      <jar href="jar/atomic/jogl.os.x11.jar" />
+      <jar href="jar/atomic/jogl-os-x11.jar" />
       <nativelib href = "jar/atomic/jogl-natives-solaris-i586.jar" />
     </resources>
     <resources os="SunOS" arch="amd64">
-      <jar href="jar/atomic/jogl.os.x11.jar" />
+      <jar href="jar/atomic/jogl-os-x11.jar" />
       <nativelib href = "jar/atomic/jogl-natives-solaris-amd64.jar" />
     </resources>
     <resources os="SunOS" arch="x86_64">
-      <jar href="jar/atomic/jogl.os.x11.jar" />
+      <jar href="jar/atomic/jogl-os-x11.jar" />
       <nativelib href = "jar/atomic/jogl-natives-solaris-amd64.jar" />
     </resources>
     <resources os="Linux" arch="i386">
-      <jar href="jar/atomic/jogl.os.x11.jar" />
+      <jar href="jar/atomic/jogl-os-x11.jar" />
       <nativelib href = "jar/atomic/jogl-natives-linux-i586.jar" />
     </resources>
     <resources os="Linux" arch="x86">
-      <jar href="jar/atomic/jogl.os.x11.jar" />
+      <jar href="jar/atomic/jogl-os-x11.jar" />
       <nativelib href = "jar/atomic/jogl-natives-linux-i586.jar" />
     </resources>
     <resources os="Linux" arch="amd64">
-      <jar href="jar/atomic/jogl.os.x11.jar" />
+      <jar href="jar/atomic/jogl-os-x11.jar" />
       <nativelib href = "jar/atomic/jogl-natives-linux-amd64.jar" />
     </resources>
     <resources os="Linux" arch="x86_64">
-      <jar href="jar/atomic/jogl.os.x11.jar" />
+      <jar href="jar/atomic/jogl-os-x11.jar" />
       <nativelib href = "jar/atomic/jogl-natives-linux-amd64.jar" />
     </resources>
     <resources os="Linux" arch="arm">
-      <jar href="jar/atomic/jogl.os.x11.jar" />
+      <jar href="jar/atomic/jogl-os-x11.jar" />
       <nativelib href = "jar/atomic/jogl-natives-linux-armv7.jar" />
     </resources>
     <resources os="Linux" arch="armv7">
-      <jar href="jar/atomic/jogl.os.x11.jar" />
+      <jar href="jar/atomic/jogl-os-x11.jar" />
       <nativelib href = "jar/atomic/jogl-natives-linux-armv7.jar" />
     </resources>
     <resources os="Mac OS X" arch="i386">
-      <jar href="jar/atomic/jogl.os.osx.jar" />
+      <jar href="jar/atomic/jogl-os-osx.jar" />
       <nativelib href = "jar/atomic/jogl-natives-macosx-universal.jar" />
     </resources>
     <resources os="Mac OS X" arch="x86_64">
-      <jar href="jar/atomic/jogl.os.osx.jar" />
+      <jar href="jar/atomic/jogl-os-osx.jar" />
       <nativelib href = "jar/atomic/jogl-natives-macosx-universal.jar" />
     </resources>
 
diff --git a/jnlp-files/atomic/jogl-noawt.jnlp b/jnlp-files/atomic/jogl-noawt.jnlp
index 3463a19..91a1fe8 100644
--- a/jnlp-files/atomic/jogl-noawt.jnlp
+++ b/jnlp-files/atomic/jogl-noawt.jnlp
@@ -14,81 +14,81 @@
       <all-permissions/>
   </security>
     <resources>
-      <jar href="jar/atomic/jogl.core.jar" />
-      <jar href="jar/atomic/jogl.sdk.jar" />
-      <jar href="jar/atomic/jogl.util.jar" />
-      <jar href="jar/atomic/jogl.glutess.jar" />
-      <jar href="jar/atomic/jogl.glumipmap.jar" />
-      <jar href="jar/atomic/jogl.gldesktop.jar" />
-      <jar href="jar/atomic/jogl.gldesktop.dbg.jar" />
-      <jar href="jar/atomic/jogl.glugldesktop.jar" />
-      <jar href="jar/atomic/jogl.util.gldesktop.jar" />
+      <jar href="jar/atomic/jogl-core.jar" />
+      <jar href="jar/atomic/jogl-sdk.jar" />
+      <jar href="jar/atomic/jogl-util.jar" />
+      <jar href="jar/atomic/jogl-glutess.jar" />
+      <jar href="jar/atomic/jogl-glumipmap.jar" />
+      <jar href="jar/atomic/jogl-gldesktop.jar" />
+      <jar href="jar/atomic/jogl-gldesktop-dbg.jar" />
+      <jar href="jar/atomic/jogl-glu-gldesktop.jar" />
+      <jar href="jar/atomic/jogl-util-gldesktop.jar" />
 
       <extension name="nativewindow" href="JOGL_CODEBASE_TAG/nativewindow-noawt.jnlp" />
     </resources>
 
     <resources os="Windows" arch="x86">
-      <jar href="jar/atomic/jogl.os.win.jar" />
+      <jar href="jar/atomic/jogl-os-win.jar" />
       <nativelib href = "jar/atomic/jogl-natives-windows-i586.jar" />
     </resources>
     <resources os="Windows" arch="amd64">
-      <jar href="jar/atomic/jogl.os.win.jar" />
+      <jar href="jar/atomic/jogl-os-win.jar" />
       <nativelib href = "jar/atomic/jogl-natives-windows-amd64.jar" />
     </resources>
     <resources os="Windows" arch="x86_64">
-      <jar href="jar/atomic/jogl.os.win.jar" />
+      <jar href="jar/atomic/jogl-os-win.jar" />
       <nativelib href = "jar/atomic/jogl-natives-windows-amd64.jar" />
     </resources>
     <resources os="SunOS" arch="sparc">
-      <jar href="jar/atomic/jogl.os.x11.jar" />
+      <jar href="jar/atomic/jogl-os-x11.jar" />
       <nativelib href = "jar/atomic/jogl-natives-solaris-sparc.jar" />
     </resources>
     <resources os="SunOS" arch="sparcv9">
-      <jar href="jar/atomic/jogl.os.x11.jar" />
+      <jar href="jar/atomic/jogl-os-x11.jar" />
       <nativelib href = "jar/atomic/jogl-natives-solaris-sparcv9.jar" />
     </resources>
     <resources os="SunOS" arch="x86">
-      <jar href="jar/atomic/jogl.os.x11.jar" />
+      <jar href="jar/atomic/jogl-os-x11.jar" />
       <nativelib href = "jar/atomic/jogl-natives-solaris-i586.jar" />
     </resources>
     <resources os="SunOS" arch="amd64">
-      <jar href="jar/atomic/jogl.os.x11.jar" />
+      <jar href="jar/atomic/jogl-os-x11.jar" />
       <nativelib href = "jar/atomic/jogl-natives-solaris-amd64.jar" />
     </resources>
     <resources os="SunOS" arch="x86_64">
-      <jar href="jar/atomic/jogl.os.x11.jar" />
+      <jar href="jar/atomic/jogl-os-x11.jar" />
       <nativelib href = "jar/atomic/jogl-natives-solaris-amd64.jar" />
     </resources>
     <resources os="Linux" arch="i386">
-      <jar href="jar/atomic/jogl.os.x11.jar" />
+      <jar href="jar/atomic/jogl-os-x11.jar" />
       <nativelib href = "jar/atomic/jogl-natives-linux-i586.jar" />
     </resources>
     <resources os="Linux" arch="x86">
-      <jar href="jar/atomic/jogl.os.x11.jar" />
+      <jar href="jar/atomic/jogl-os-x11.jar" />
       <nativelib href = "jar/atomic/jogl-natives-linux-i586.jar" />
     </resources>
     <resources os="Linux" arch="amd64">
-      <jar href="jar/atomic/jogl.os.x11.jar" />
+      <jar href="jar/atomic/jogl-os-x11.jar" />
       <nativelib href = "jar/atomic/jogl-natives-linux-amd64.jar" />
     </resources>
     <resources os="Linux" arch="x86_64">
-      <jar href="jar/atomic/jogl.os.x11.jar" />
+      <jar href="jar/atomic/jogl-os-x11.jar" />
       <nativelib href = "jar/atomic/jogl-natives-linux-amd64.jar" />
     </resources>
     <resources os="Linux" arch="arm">
-      <jar href="jar/atomic/jogl.os.x11.jar" />
+      <jar href="jar/atomic/jogl-os-x11.jar" />
       <nativelib href = "jar/atomic/jogl-natives-linux-armv7.jar" />
     </resources>
     <resources os="Linux" arch="armv7">
-      <jar href="jar/atomic/jogl.os.x11.jar" />
+      <jar href="jar/atomic/jogl-os-x11.jar" />
       <nativelib href = "jar/atomic/jogl-natives-linux-armv7.jar" />
     </resources>
     <resources os="Mac OS X" arch="i386">
-      <jar href="jar/atomic/jogl.os.osx.jar" />
+      <jar href="jar/atomic/jogl-os-osx.jar" />
       <nativelib href = "jar/atomic/jogl-natives-macosx-universal.jar" />
     </resources>
     <resources os="Mac OS X" arch="x86_64">
-      <jar href="jar/atomic/jogl.os.osx.jar" />
+      <jar href="jar/atomic/jogl-os-osx.jar" />
       <nativelib href = "jar/atomic/jogl-natives-macosx-universal.jar" />
     </resources>
 
diff --git a/jnlp-files/atomic/nativewindow-awt.jnlp b/jnlp-files/atomic/nativewindow-awt.jnlp
index db80b64..a993ab1 100644
--- a/jnlp-files/atomic/nativewindow-awt.jnlp
+++ b/jnlp-files/atomic/nativewindow-awt.jnlp
@@ -14,57 +14,72 @@
       <all-permissions/>
   </security>
     <resources>
-      <jar href="jar/atomic/nativewindow.core.jar" />
-      <jar href="jar/atomic/nativewindow.awt.jar"/>
+      <jar href="jar/atomic/nativewindow-core.jar" />
+      <jar href="jar/atomic/nativewindow-awt.jar"/>
       <extension name="gluegen-rt"   href="GLUEGEN_CODEBASE_TAG/gluegen-rt.jnlp" />
     </resources>
 
     <resources os="Windows" arch="x86">
+      <jar href="jar/atomic/nativewindow-os-win.jar" />
       <nativelib href = "jar/atomic/nativewindow-natives-windows-i586.jar" />
     </resources>
     <resources os="Windows" arch="amd64">
+      <jar href="jar/atomic/nativewindow-os-win.jar" />
       <nativelib href = "jar/atomic/nativewindow-natives-windows-amd64.jar" />
     </resources>
     <resources os="Windows" arch="x86_64">
+      <jar href="jar/atomic/nativewindow-os-win.jar" />
       <nativelib href = "jar/atomic/nativewindow-natives-windows-amd64.jar" />
     </resources>
     <resources os="SunOS" arch="sparc">
+      <jar href="jar/atomic/nativewindow-os-x11.jar" />
       <nativelib href = "jar/atomic/nativewindow-natives-solaris-sparc.jar" />
     </resources>
     <resources os="SunOS" arch="sparcv9">
+      <jar href="jar/atomic/nativewindow-os-x11.jar" />
       <nativelib href = "jar/atomic/nativewindow-natives-solaris-sparcv9.jar" />
     </resources>
     <resources os="SunOS" arch="x86">
+      <jar href="jar/atomic/nativewindow-os-x11.jar" />
       <nativelib href = "jar/atomic/nativewindow-natives-solaris-i586.jar" />
     </resources>
     <resources os="SunOS" arch="amd64">
+      <jar href="jar/atomic/nativewindow-os-x11.jar" />
       <nativelib href = "jar/atomic/nativewindow-natives-solaris-amd64.jar" />
     </resources>
     <resources os="SunOS" arch="x86_64">
+      <jar href="jar/atomic/nativewindow-os-x11.jar" />
       <nativelib href = "jar/atomic/nativewindow-natives-solaris-amd64.jar" />
     </resources>
     <resources os="Linux" arch="i386">
       <nativelib href = "jar/atomic/nativewindow-natives-linux-i586.jar" />
     </resources>
     <resources os="Linux" arch="x86">
+      <jar href="jar/atomic/nativewindow-os-x11.jar" />
       <nativelib href = "jar/atomic/nativewindow-natives-linux-i586.jar" />
     </resources>
     <resources os="Linux" arch="amd64">
+      <jar href="jar/atomic/nativewindow-os-x11.jar" />
       <nativelib href = "jar/atomic/nativewindow-natives-linux-amd64.jar" />
     </resources>
     <resources os="Linux" arch="x86_64">
+      <jar href="jar/atomic/nativewindow-os-x11.jar" />
       <nativelib href = "jar/atomic/nativewindow-natives-linux-amd64.jar" />
     </resources>
     <resources os="Linux" arch="arm">
+      <jar href="jar/atomic/nativewindow-os-x11.jar" />
       <nativelib href = "jar/atomic/nativewindow-natives-linux-armv7.jar" />
     </resources>
     <resources os="Linux" arch="armv7">
+      <jar href="jar/atomic/nativewindow-os-x11.jar" />
       <nativelib href = "jar/atomic/nativewindow-natives-linux-armv7.jar" />
     </resources>
     <resources os="Mac OS X" arch="i386">
+      <jar href="jar/atomic/nativewindow-os-osx.jar" />
       <nativelib href = "jar/atomic/nativewindow-natives-macosx-universal.jar" />
     </resources>
     <resources os="Mac OS X" arch="x86_64">
+      <jar href="jar/atomic/nativewindow-os-osx.jar" />
       <nativelib href = "jar/atomic/nativewindow-natives-macosx-universal.jar" />
     </resources>
 
diff --git a/jnlp-files/atomic/nativewindow-noawt.jnlp b/jnlp-files/atomic/nativewindow-noawt.jnlp
index fed7310..5cd4872 100644
--- a/jnlp-files/atomic/nativewindow-noawt.jnlp
+++ b/jnlp-files/atomic/nativewindow-noawt.jnlp
@@ -14,68 +14,72 @@
       <all-permissions/>
   </security>
     <resources>
-      <jar href="jar/atomic/nativewindow.core.jar" />
+      <jar href="jar/atomic/nativewindow-core.jar" />
       <extension name="gluegen-rt"   href="GLUEGEN_CODEBASE_TAG/gluegen-rt.jnlp" />
     </resources>
 
     <resources os="Windows" arch="x86">
-      <jar href="jar/atomic/nativewindow.os.win.jar" />
+      <jar href="jar/atomic/nativewindow-os-win.jar" />
       <nativelib href = "jar/atomic/nativewindow-natives-windows-i586.jar" />
     </resources>
     <resources os="Windows" arch="amd64">
-      <jar href="jar/atomic/nativewindow.os.win.jar" />
+      <jar href="jar/atomic/nativewindow-os-win.jar" />
       <nativelib href = "jar/atomic/nativewindow-natives-windows-amd64.jar" />
     </resources>
     <resources os="Windows" arch="x86_64">
-      <jar href="jar/atomic/nativewindow.os.win.jar" />
+      <jar href="jar/atomic/nativewindow-os-win.jar" />
       <nativelib href = "jar/atomic/nativewindow-natives-windows-amd64.jar" />
     </resources>
     <resources os="SunOS" arch="sparc">
-      <jar href="jar/atomic/nativewindow.os.x11.jar" />
+      <jar href="jar/atomic/nativewindow-os-x11.jar" />
       <nativelib href = "jar/atomic/nativewindow-natives-solaris-sparc.jar" />
     </resources>
     <resources os="SunOS" arch="sparcv9">
-      <jar href="jar/atomic/nativewindow.os.x11.jar" />
+      <jar href="jar/atomic/nativewindow-os-x11.jar" />
       <nativelib href = "jar/atomic/nativewindow-natives-solaris-sparcv9.jar" />
     </resources>
     <resources os="SunOS" arch="x86">
-      <jar href="jar/atomic/nativewindow.os.x11.jar" />
+      <jar href="jar/atomic/nativewindow-os-x11.jar" />
       <nativelib href = "jar/atomic/nativewindow-natives-solaris-i586.jar" />
     </resources>
     <resources os="SunOS" arch="amd64">
-      <jar href="jar/atomic/nativewindow.os.x11.jar" />
+      <jar href="jar/atomic/nativewindow-os-x11.jar" />
       <nativelib href = "jar/atomic/nativewindow-natives-solaris-amd64.jar" />
     </resources>
     <resources os="SunOS" arch="x86_64">
-      <jar href="jar/atomic/nativewindow.os.x11.jar" />
+      <jar href="jar/atomic/nativewindow-os-x11.jar" />
       <nativelib href = "jar/atomic/nativewindow-natives-solaris-amd64.jar" />
     </resources>
     <resources os="Linux" arch="i386">
-      <jar href="jar/atomic/nativewindow.os.x11.jar" />
+      <jar href="jar/atomic/nativewindow-os-x11.jar" />
       <nativelib href = "jar/atomic/nativewindow-natives-linux-i586.jar" />
     </resources>
     <resources os="Linux" arch="x86">
-      <jar href="jar/atomic/nativewindow.os.x11.jar" />
+      <jar href="jar/atomic/nativewindow-os-x11.jar" />
       <nativelib href = "jar/atomic/nativewindow-natives-linux-i586.jar" />
     </resources>
     <resources os="Linux" arch="amd64">
-      <jar href="jar/atomic/nativewindow.os.x11.jar" />
+      <jar href="jar/atomic/nativewindow-os-x11.jar" />
       <nativelib href = "jar/atomic/nativewindow-natives-linux-amd64.jar" />
     </resources>
     <resources os="Linux" arch="x86_64">
-      <jar href="jar/atomic/nativewindow.os.x11.jar" />
+      <jar href="jar/atomic/nativewindow-os-x11.jar" />
       <nativelib href = "jar/atomic/nativewindow-natives-linux-amd64.jar" />
     </resources>
     <resources os="Linux" arch="arm">
+      <jar href="jar/atomic/nativewindow-os-x11.jar" />
       <nativelib href = "jar/atomic/nativewindow-natives-linux-armv7.jar" />
     </resources>
     <resources os="Linux" arch="armv7">
+      <jar href="jar/atomic/nativewindow-os-x11.jar" />
       <nativelib href = "jar/atomic/nativewindow-natives-linux-armv7.jar" />
     </resources>
     <resources os="Mac OS X" arch="i386">
+      <jar href="jar/atomic/nativewindow-os-osx.jar" />
       <nativelib href = "jar/atomic/nativewindow-natives-macosx-universal.jar" />
     </resources>
     <resources os="Mac OS X" arch="x86_64">
+      <jar href="jar/atomic/nativewindow-os-osx.jar" />
       <nativelib href = "jar/atomic/nativewindow-natives-macosx-universal.jar" />
     </resources>
 
diff --git a/jnlp-files/atomic/newt-awt-jogl.jnlp b/jnlp-files/atomic/newt-awt-jogl.jnlp
index 69406e4..0a43128 100644
--- a/jnlp-files/atomic/newt-awt-jogl.jnlp
+++ b/jnlp-files/atomic/newt-awt-jogl.jnlp
@@ -14,50 +14,50 @@
       <all-permissions/>
   </security>
     <resources>
-      <jar href="jar/atomic/newt.core.jar" />
-      <jar href="jar/atomic/newt.ogl.jar" />
-      <jar href="jar/atomic/newt.awt.jar" />
+      <jar href="jar/atomic/newt-core.jar" />
+      <jar href="jar/atomic/newt-ogl.jar" />
+      <jar href="jar/atomic/newt-awt.jar" />
       <extension name="jogl-awt" href="JOGL_CODEBASE_TAG/jogl-awt.jnlp" />
     </resources>
 
     <resources os="Windows" arch="x86">
-      <jar href="jar/atomic/newt.driver.win.jar" />
+      <jar href="jar/atomic/newt-driver-win.jar" />
       <nativelib href = "jar/atomic/newt-natives-windows-i586.jar" />
     </resources>
     <resources os="Windows" arch="amd64">
-      <jar href="jar/atomic/newt.driver.win.jar" />
+      <jar href="jar/atomic/newt-driver-win.jar" />
       <nativelib href = "jar/atomic/newt-natives-windows-amd64.jar" />
     </resources>
     <resources os="Windows" arch="x86_64">
-      <jar href="jar/atomic/newt.driver.win.jar" />
+      <jar href="jar/atomic/newt-driver-win.jar" />
       <nativelib href = "jar/atomic/newt-natives-windows-amd64.jar" />
     </resources>
     <resources os="SunOS" arch="sparc">
-      <jar href="jar/atomic/newt.driver.x11.jar" />
+      <jar href="jar/atomic/newt-driver-x11.jar" />
       <nativelib href = "jar/atomic/newt-natives-solaris-sparc.jar" />
     </resources>
     <resources os="SunOS" arch="sparcv9">
-      <jar href="jar/atomic/newt.driver.x11.jar" />
+      <jar href="jar/atomic/newt-driver-x11.jar" />
       <nativelib href = "jar/atomic/newt-natives-solaris-sparcv9.jar" />
     </resources>
     <resources os="SunOS" arch="x86">
-      <jar href="jar/atomic/newt.driver.x11.jar" />
+      <jar href="jar/atomic/newt-driver-x11.jar" />
       <nativelib href = "jar/atomic/newt-natives-solaris-i586.jar" />
     </resources>
     <resources os="SunOS" arch="amd64">
-      <jar href="jar/atomic/newt.driver.x11.jar" />
+      <jar href="jar/atomic/newt-driver-x11.jar" />
       <nativelib href = "jar/atomic/newt-natives-solaris-amd64.jar" />
     </resources>
     <resources os="SunOS" arch="x86_64">
-      <jar href="jar/atomic/newt.driver.x11.jar" />
+      <jar href="jar/atomic/newt-driver-x11.jar" />
       <nativelib href = "jar/atomic/newt-natives-solaris-amd64.jar" />
     </resources>
     <resources os="Linux" arch="i386">
-      <jar href="jar/atomic/newt.driver.x11.jar" />
+      <jar href="jar/atomic/newt-driver-x11.jar" />
       <nativelib href = "jar/atomic/newt-natives-linux-i586.jar" />
     </resources>
     <resources os="Linux" arch="x86">
-      <jar href="jar/atomic/newt.driver.x11.jar" />
+      <jar href="jar/atomic/newt-driver-x11.jar" />
       <nativelib href = "jar/atomic/newt-natives-linux-i586.jar" />
     </resources>
     <resources os="Linux" arch="amd64">
@@ -65,23 +65,23 @@
       <nativelib href = "jar/atomic/newt-natives-linux-amd64.jar" />
     </resources>
     <resources os="Linux" arch="x86_64">
-      <jar href="jar/atomic/newt.driver.x11.jar" />
+      <jar href="jar/atomic/newt-driver-x11.jar" />
       <nativelib href = "jar/atomic/newt-natives-linux-amd64.jar" />
     </resources>
     <resources os="Linux" arch="arm">
-      <jar href="jar/atomic/newt.driver.x11.jar" />
+      <jar href="jar/atomic/newt-driver-x11.jar" />
       <nativelib href = "jar/atomic/newt-natives-linux-armv7.jar" />
     </resources>
     <resources os="Linux" arch="armv7">
-      <jar href="jar/atomic/newt.driver.x11.jar" />
+      <jar href="jar/atomic/newt-driver-x11.jar" />
       <nativelib href = "jar/atomic/newt-natives-linux-armv7.jar" />
     </resources>
     <resources os="Mac OS X" arch="i386">
-      <jar href="jar/atomic/newt.driver.osx.jar" />
+      <jar href="jar/atomic/newt-driver-osx.jar" />
       <nativelib href = "jar/atomic/newt-natives-macosx-universal.jar" />
     </resources>
     <resources os="Mac OS X" arch="x86_64">
-      <jar href="jar/atomic/newt.driver.osx.jar" />
+      <jar href="jar/atomic/newt-driver-osx.jar" />
       <nativelib href = "jar/atomic/newt-natives-macosx-universal.jar" />
     </resources>
 
diff --git a/jnlp-files/atomic/newt-awt.jnlp b/jnlp-files/atomic/newt-awt.jnlp
index 26e45e3..6e46b82 100644
--- a/jnlp-files/atomic/newt-awt.jnlp
+++ b/jnlp-files/atomic/newt-awt.jnlp
@@ -14,71 +14,73 @@
       <all-permissions/>
   </security>
     <resources>
-      <jar href="jar/atomic/newt.core.jar" />
-      <jar href="jar/atomic/newt.awt.jar" />
+      <jar href="jar/atomic/newt-core.jar" />
+      <jar href="jar/atomic/newt-awt.jar" />
       <extension name="nativewindow-awt" href="JOGL_CODEBASE_TAG/nativewindow-awt.jnlp" />
     </resources>
 
     <resources os="Windows" arch="x86">
-      <jar href="jar/atomic/newt.driver.win.jar" />
+      <jar href="jar/atomic/newt-driver-win.jar" />
       <nativelib href = "jar/atomic/newt-natives-windows-i586.jar" />
     </resources>
     <resources os="Windows" arch="amd64">
-      <jar href="jar/atomic/newt.driver.win.jar" />
+      <jar href="jar/atomic/newt-driver-win.jar" />
       <nativelib href = "jar/atomic/newt-natives-windows-amd64.jar" />
     </resources>
     <resources os="Windows" arch="x86_64">
-      <jar href="jar/atomic/newt.driver.win.jar" />
+      <jar href="jar/atomic/newt-driver-win.jar" />
       <nativelib href = "jar/atomic/newt-natives-windows-amd64.jar" />
     </resources>
     <resources os="SunOS" arch="sparc">
-      <jar href="jar/atomic/newt.driver.x11.jar" />
+      <jar href="jar/atomic/newt-driver-x11.jar" />
       <nativelib href = "jar/atomic/newt-natives-solaris-sparc.jar" />
     </resources>
     <resources os="SunOS" arch="sparcv9">
-      <jar href="jar/atomic/newt.driver.x11.jar" />
+      <jar href="jar/atomic/newt-driver-x11.jar" />
       <nativelib href = "jar/atomic/newt-natives-solaris-sparcv9.jar" />
     </resources>
     <resources os="SunOS" arch="x86">
-      <jar href="jar/atomic/newt.driver.x11.jar" />
+      <jar href="jar/atomic/newt-driver-x11.jar" />
       <nativelib href = "jar/atomic/newt-natives-solaris-i586.jar" />
     </resources>
     <resources os="SunOS" arch="amd64">
-      <jar href="jar/atomic/newt.driver.x11.jar" />
+      <jar href="jar/atomic/newt-driver-x11.jar" />
       <nativelib href = "jar/atomic/newt-natives-solaris-amd64.jar" />
     </resources>
     <resources os="SunOS" arch="x86_64">
-      <jar href="jar/atomic/newt.driver.x11.jar" />
+      <jar href="jar/atomic/newt-driver-x11.jar" />
       <nativelib href = "jar/atomic/newt-natives-solaris-amd64.jar" />
     </resources>
     <resources os="Linux" arch="i386">
-      <jar href="jar/atomic/newt.driver.x11.jar" />
+      <jar href="jar/atomic/newt-driver-x11.jar" />
       <nativelib href = "jar/atomic/newt-natives-linux-i586.jar" />
     </resources>
     <resources os="Linux" arch="x86">
-      <jar href="jar/atomic/newt.driver.x11.jar" />
+      <jar href="jar/atomic/newt-driver-x11.jar" />
       <nativelib href = "jar/atomic/newt-natives-linux-i586.jar" />
     </resources>
     <resources os="Linux" arch="amd64">
-      <jar href="jar/atomic/newt.driver.x11.jar" />
+      <jar href="jar/atomic/newt-driver-x11.jar" />
       <nativelib href = "jar/atomic/newt-natives-linux-amd64.jar" />
     </resources>
     <resources os="Linux" arch="x86_64">
-      <jar href="jar/atomic/newt.driver.x11.jar" />
+      <jar href="jar/atomic/newt-driver-x11.jar" />
       <nativelib href = "jar/atomic/newt-natives-linux-amd64.jar" />
     </resources>
     <resources os="Linux" arch="arm">
+      <jar href="jar/atomic/newt-driver-x11.jar" />
       <nativelib href = "jar/atomic/newt-natives-linux-armv7.jar" />
     </resources>
     <resources os="Linux" arch="armv7">
+      <jar href="jar/atomic/newt-driver-x11.jar" />
       <nativelib href = "jar/atomic/newt-natives-linux-armv7.jar" />
     </resources>
     <resources os="Mac OS X" arch="i386">
-      <jar href="jar/atomic/newt.driver.osx.jar" />
+      <jar href="jar/atomic/newt-driver-osx.jar" />
       <nativelib href = "jar/atomic/newt-natives-macosx-universal.jar" />
     </resources>
     <resources os="Mac OS X" arch="x86_64">
-      <jar href="jar/atomic/newt.driver.osx.jar" />
+      <jar href="jar/atomic/newt-driver-osx.jar" />
       <nativelib href = "jar/atomic/newt-natives-macosx-universal.jar" />
     </resources>
 
diff --git a/jnlp-files/atomic/newt-noawt-jogl.jnlp b/jnlp-files/atomic/newt-noawt-jogl.jnlp
index ced8b29..5b671ed 100644
--- a/jnlp-files/atomic/newt-noawt-jogl.jnlp
+++ b/jnlp-files/atomic/newt-noawt-jogl.jnlp
@@ -14,73 +14,73 @@
       <all-permissions/>
   </security>
     <resources>
-      <jar href="jar/atomic/newt.core.jar" />
-      <jar href="jar/atomic/newt.ogl.jar" />
+      <jar href="jar/atomic/newt-core.jar" />
+      <jar href="jar/atomic/newt-ogl.jar" />
       <extension name="jogl-noawt" href="JOGL_CODEBASE_TAG/jogl-noawt.jnlp" />
     </resources>
 
     <resources os="Windows" arch="x86">
-      <jar href="jar/atomic/newt.driver.win.jar" />
+      <jar href="jar/atomic/newt-driver-win.jar" />
       <nativelib href = "jar/atomic/newt-natives-windows-i586.jar" />
     </resources>
     <resources os="Windows" arch="amd64">
-      <jar href="jar/atomic/newt.driver.win.jar" />
+      <jar href="jar/atomic/newt-driver-win.jar" />
       <nativelib href = "jar/atomic/newt-natives-windows-amd64.jar" />
     </resources>
     <resources os="Windows" arch="x86_64">
-      <jar href="jar/atomic/newt.driver.win.jar" />
+      <jar href="jar/atomic/newt-driver-win.jar" />
       <nativelib href = "jar/atomic/newt-natives-windows-amd64.jar" />
     </resources>
     <resources os="SunOS" arch="sparc">
-      <jar href="jar/atomic/newt.driver.x11.jar" />
+      <jar href="jar/atomic/newt-driver-x11.jar" />
       <nativelib href = "jar/atomic/newt-natives-solaris-sparc.jar" />
     </resources>
     <resources os="SunOS" arch="sparcv9">
-      <jar href="jar/atomic/newt.driver.x11.jar" />
+      <jar href="jar/atomic/newt-driver-x11.jar" />
       <nativelib href = "jar/atomic/newt-natives-solaris-sparcv9.jar" />
     </resources>
     <resources os="SunOS" arch="x86">
-      <jar href="jar/atomic/newt.driver.x11.jar" />
+      <jar href="jar/atomic/newt-driver-x11.jar" />
       <nativelib href = "jar/atomic/newt-natives-solaris-i586.jar" />
     </resources>
     <resources os="SunOS" arch="amd64">
-      <jar href="jar/atomic/newt.driver.x11.jar" />
+      <jar href="jar/atomic/newt-driver-x11.jar" />
       <nativelib href = "jar/atomic/newt-natives-solaris-amd64.jar" />
     </resources>
     <resources os="SunOS" arch="x86_64">
-      <jar href="jar/atomic/newt.driver.x11.jar" />
+      <jar href="jar/atomic/newt-driver-x11.jar" />
       <nativelib href = "jar/atomic/newt-natives-solaris-amd64.jar" />
     </resources>
     <resources os="Linux" arch="i386">
-      <jar href="jar/atomic/newt.driver.x11.jar" />
+      <jar href="jar/atomic/newt-driver-x11.jar" />
       <nativelib href = "jar/atomic/newt-natives-linux-i586.jar" />
     </resources>
     <resources os="Linux" arch="x86">
-      <jar href="jar/atomic/newt.driver.x11.jar" />
+      <jar href="jar/atomic/newt-driver-x11.jar" />
       <nativelib href = "jar/atomic/newt-natives-linux-i586.jar" />
     </resources>
     <resources os="Linux" arch="amd64">
-      <jar href="jar/atomic/newt.driver.x11.jar" />
+      <jar href="jar/atomic/newt-driver-x11.jar" />
       <nativelib href = "jar/atomic/newt-natives-linux-amd64.jar" />
     </resources>
     <resources os="Linux" arch="x86_64">
-      <jar href="jar/atomic/newt.driver.x11.jar" />
+      <jar href="jar/atomic/newt-driver-x11.jar" />
       <nativelib href = "jar/atomic/newt-natives-linux-amd64.jar" />
     </resources>
     <resources os="Linux" arch="arm">
-      <jar href="jar/atomic/newt.driver.x11.jar" />
+      <jar href="jar/atomic/newt-driver-x11.jar" />
       <nativelib href = "jar/atomic/newt-natives-linux-armv7.jar" />
     </resources>
     <resources os="Linux" arch="armv7">
-      <jar href="jar/atomic/newt.driver.x11.jar" />
+      <jar href="jar/atomic/newt-driver-x11.jar" />
       <nativelib href = "jar/atomic/newt-natives-linux-armv7.jar" />
     </resources>
     <resources os="Mac OS X" arch="i386">
-      <jar href="jar/atomic/newt.driver.osx.jar" />
+      <jar href="jar/atomic/newt-driver-osx.jar" />
       <nativelib href = "jar/atomic/newt-natives-macosx-universal.jar" />
     </resources>
     <resources os="Mac OS X" arch="x86_64">
-      <jar href="jar/atomic/newt.driver.osx.jar" />
+      <jar href="jar/atomic/newt-driver-x11.jar" />
       <nativelib href = "jar/atomic/newt-natives-macosx-universal.jar" />
     </resources>
 
diff --git a/jnlp-files/atomic/newt-noawt.jnlp b/jnlp-files/atomic/newt-noawt.jnlp
index 1616dff..1161d7a 100644
--- a/jnlp-files/atomic/newt-noawt.jnlp
+++ b/jnlp-files/atomic/newt-noawt.jnlp
@@ -14,56 +14,56 @@
       <all-permissions/>
   </security>
     <resources>
-      <jar href="jar/atomic/newt.core.jar" />
+      <jar href="jar/atomic/newt-core.jar" />
       <extension name="nativewindow" href="JOGL_CODEBASE_TAG/nativewindow-noawt.jnlp" />
     </resources>
 
     <resources os="Windows" arch="x86">
-      <jar href="jar/atomic/newt.driver.win.jar" />
+      <jar href="jar/atomic/newt-driver-win.jar" />
       <nativelib href = "jar/atomic/newt-natives-windows-i586.jar" />
     </resources>
     <resources os="Windows" arch="amd64">
-      <jar href="jar/atomic/newt.driver.win.jar" />
+      <jar href="jar/atomic/newt-driver-win.jar" />
       <nativelib href = "jar/atomic/newt-natives-windows-amd64.jar" />
     </resources>
     <resources os="Windows" arch="x86_64">
-      <jar href="jar/atomic/newt.driver.win.jar" />
+      <jar href="jar/atomic/newt-driver-win.jar" />
       <nativelib href = "jar/atomic/newt-natives-windows-amd64.jar" />
     </resources>
     <resources os="SunOS" arch="sparc">
-      <jar href="jar/atomic/newt.driver.x11.jar" />
+      <jar href="jar/atomic/newt-driver-x11.jar" />
       <nativelib href = "jar/atomic/newt-natives-solaris-sparc.jar" />
     </resources>
     <resources os="SunOS" arch="sparcv9">
-      <jar href="jar/atomic/newt.driver.x11.jar" />
+      <jar href="jar/atomic/newt-driver-x11.jar" />
       <nativelib href = "jar/atomic/newt-natives-solaris-sparcv9.jar" />
     </resources>
     <resources os="SunOS" arch="x86">
-      <jar href="jar/atomic/newt.driver.x11.jar" />
+      <jar href="jar/atomic/newt-driver-x11.jar" />
       <nativelib href = "jar/atomic/newt-natives-solaris-i586.jar" />
     </resources>
     <resources os="SunOS" arch="amd64">
-      <jar href="jar/atomic/newt.driver.x11.jar" />
+      <jar href="jar/atomic/newt-driver-x11.jar" />
       <nativelib href = "jar/atomic/newt-natives-solaris-amd64.jar" />
     </resources>
     <resources os="SunOS" arch="x86_64">
-      <jar href="jar/atomic/newt.driver.x11.jar" />
+      <jar href="jar/atomic/newt-driver-x11.jar" />
       <nativelib href = "jar/atomic/newt-natives-solaris-amd64.jar" />
     </resources>
     <resources os="Linux" arch="i386">
-      <jar href="jar/atomic/newt.driver.x11.jar" />
+      <jar href="jar/atomic/newt-driver-x11.jar" />
       <nativelib href = "jar/atomic/newt-natives-linux-i586.jar" />
     </resources>
     <resources os="Linux" arch="x86">
-      <jar href="jar/atomic/newt.driver.x11.jar" />
+      <jar href="jar/atomic/newt-driver-x11.jar" />
       <nativelib href = "jar/atomic/newt-natives-linux-i586.jar" />
     </resources>
     <resources os="Linux" arch="amd64">
-      <jar href="jar/atomic/newt.driver.x11.jar" />
+      <jar href="jar/atomic/newt-driver-x11.jar" />
       <nativelib href = "jar/atomic/newt-natives-linux-amd64.jar" />
     </resources>
     <resources os="Linux" arch="x86_64">
-      <jar href="jar/atomic/newt.driver.x11.jar" />
+      <jar href="jar/atomic/newt-driver-x11.jar" />
       <nativelib href = "jar/atomic/newt-natives-linux-amd64.jar" />
     </resources>
     <resources os="Linux" arch="arm">
@@ -73,11 +73,11 @@
       <nativelib href = "jar/atomic/newt-natives-linux-armv7.jar" />
     </resources>
     <resources os="Mac OS X" arch="i386">
-      <jar href="jar/atomic/newt.driver.osx.jar" />
+      <jar href="jar/atomic/newt-driver-osx.jar" />
       <nativelib href = "jar/atomic/newt-natives-macosx-universal.jar" />
     </resources>
     <resources os="Mac OS X" arch="x86_64">
-      <jar href="jar/atomic/newt.driver.osx.jar" />
+      <jar href="jar/atomic/newt-driver-osx.jar" />
       <nativelib href = "jar/atomic/newt-natives-macosx-universal.jar" />
     </resources>
 
diff --git a/jnlp-files/jogl-all-awt-cg.jnlp b/jnlp-files/jogl-all-awt-cg.jnlp
index 18f8f49..24c22c2 100644
--- a/jnlp-files/jogl-all-awt-cg.jnlp
+++ b/jnlp-files/jogl-all-awt-cg.jnlp
@@ -14,75 +14,75 @@
       <all-permissions/>
   </security>
     <resources>
-      <jar href="jar/jogl.all.jar" />
-      <jar href="jar/atomic/jogl.cg.jar" />
+      <jar href="jar/jogl-all.jar" />
+      <jar href="jar/atomic/jogl-cg.jar" />
 
       <extension name="gluegen-rt"   href="GLUEGEN_CODEBASE_TAG/gluegen-rt.jnlp" />
     </resources>
 
     <resources os="Windows" arch="x86">
       <nativelib href = "jar/jogl-all-natives-windows-i586.jar" />
-      <nativelib href = "jar/atomic/jogl_cg-natives-windows-i586.jar" />
+      <nativelib href = "jar/atomic/jogl-cg-natives-windows-i586.jar" />
     </resources>
     <resources os="Windows" arch="amd64">
       <nativelib href = "jar/jogl-all-natives-windows-amd64.jar" />
-      <nativelib href = "jar/atomic/jogl_cg-natives-windows-amd64.jar" />
+      <nativelib href = "jar/atomic/jogl-cg-natives-windows-amd64.jar" />
     </resources>
     <resources os="Windows" arch="x86_64">
       <nativelib href = "jar/jogl-all-natives-windows-amd64.jar" />
-      <nativelib href = "jar/atomic/jogl_cg-natives-windows-amd64.jar" />
+      <nativelib href = "jar/atomic/jogl-cg-natives-windows-amd64.jar" />
     </resources>
     <resources os="SunOS" arch="sparc">
       <nativelib href = "jar/jogl-all-natives-solaris-sparc.jar" />
-      <nativelib href = "jar/atomic/jogl_cg-natives-solaris-sparc.jar" />
+      <nativelib href = "jar/atomic/jogl-cg-natives-solaris-sparc.jar" />
     </resources>
     <resources os="SunOS" arch="sparcv9">
       <nativelib href = "jar/jogl-all-natives-solaris-sparcv9.jar" />
-      <nativelib href = "jar/atomic/jogl_cg-natives-solaris-sparcv9.jar" />
+      <nativelib href = "jar/atomic/jogl-cg-natives-solaris-sparcv9.jar" />
     </resources>
     <resources os="SunOS" arch="x86">
       <nativelib href = "jar/jogl-all-natives-solaris-i586.jar" />
-      <nativelib href = "jar/atomic/jogl_cg-natives-solaris-i586.jar" />
+      <nativelib href = "jar/atomic/jogl-cg-natives-solaris-i586.jar" />
     </resources>
     <resources os="SunOS" arch="amd64">
       <nativelib href = "jar/jogl-all-natives-solaris-amd64.jar" />
-      <nativelib href = "jar/atomic/jogl_cg-natives-solaris-amd64.jar" />
+      <nativelib href = "jar/atomic/jogl-cg-natives-solaris-amd64.jar" />
     </resources>
     <resources os="SunOS" arch="x86_64">
       <nativelib href = "jar/jogl-all-natives-solaris-amd64.jar" />
-      <nativelib href = "jar/atomic/jogl_cg-natives-solaris-amd64.jar" />
+      <nativelib href = "jar/atomic/jogl-cg-natives-solaris-amd64.jar" />
     </resources>
     <resources os="Linux" arch="i386">
       <nativelib href = "jar/jogl-all-natives-linux-i586.jar" />
-      <nativelib href = "jar/atomic/jogl_cg-natives-linux-i586.jar" />
+      <nativelib href = "jar/atomic/jogl-cg-natives-linux-i586.jar" />
     </resources>
     <resources os="Linux" arch="x86">
       <nativelib href = "jar/jogl-all-natives-linux-i586.jar" />
-      <nativelib href = "jar/atomic/jogl_cg-natives-linux-i586.jar" />
+      <nativelib href = "jar/atomic/jogl-cg-natives-linux-i586.jar" />
     </resources>
     <resources os="Linux" arch="amd64">
       <nativelib href = "jar/jogl-all-natives-linux-amd64.jar" />
-      <nativelib href = "jar/atomic/jogl_cg-natives-linux-amd64.jar" />
+      <nativelib href = "jar/atomic/jogl-cg-natives-linux-amd64.jar" />
     </resources>
     <resources os="Linux" arch="x86_64">
       <nativelib href = "jar/jogl-all-natives-linux-amd64.jar" />
-      <nativelib href = "jar/atomic/jogl_cg-natives-linux-amd64.jar" />
+      <nativelib href = "jar/atomic/jogl-cg-natives-linux-amd64.jar" />
     </resources>
     <resources os="Linux" arch="arm">
       <nativelib href = "jar/jogl-all-natives-linux-armv7.jar" />
-      <nativelib href = "jar/atomic/jogl_cg-natives-linux-armv7.jar" />
+      <nativelib href = "jar/atomic/jogl-cg-natives-linux-armv7.jar" />
     </resources>
     <resources os="Linux" arch="armv7">
       <nativelib href = "jar/jogl-all-natives-linux-armv7.jar" />
-      <nativelib href = "jar/atomic/jogl_cg-natives-linux-armv7.jar" />
+      <nativelib href = "jar/atomic/jogl-cg-natives-linux-armv7.jar" />
     </resources>
     <resources os="Mac OS X" arch="i386">
       <nativelib href = "jar/jogl-all-natives-macosx-universal.jar" />
-      <nativelib href = "jar/atomic/jogl_cg-natives-macosx-universal.jar" />
+      <nativelib href = "jar/atomic/jogl-cg-natives-macosx-universal.jar" />
     </resources>
     <resources os="Mac OS X" arch="x86_64">
       <nativelib href = "jar/jogl-all-natives-macosx-universal.jar" />
-      <nativelib href = "jar/atomic/jogl_cg-natives-macosx-universal.jar" />
+      <nativelib href = "jar/atomic/jogl-cg-natives-macosx-universal.jar" />
     </resources>
 
   <component-desc />
diff --git a/jnlp-files/jogl-all-awt.jnlp b/jnlp-files/jogl-all-awt.jnlp
index 55ae21d..4e05f8d 100644
--- a/jnlp-files/jogl-all-awt.jnlp
+++ b/jnlp-files/jogl-all-awt.jnlp
@@ -14,7 +14,7 @@
       <all-permissions/>
   </security>
     <resources>
-      <jar href="jar/jogl.all.jar" />
+      <jar href="jar/jogl-all.jar" />
 
       <extension name="gluegen-rt"   href="GLUEGEN_CODEBASE_TAG/gluegen-rt.jnlp" />
     </resources>
diff --git a/jnlp-files/jogl-all-mobile.jnlp b/jnlp-files/jogl-all-mobile.jnlp
index 5f96137..43b9b3b 100644
--- a/jnlp-files/jogl-all-mobile.jnlp
+++ b/jnlp-files/jogl-all-mobile.jnlp
@@ -14,7 +14,7 @@
       <all-permissions/>
   </security>
     <resources>
-      <jar href="jar/jogl.all-mobile.jar" />
+      <jar href="jar/jogl-all-mobile.jar" />
 
       <extension name="gluegen-rt"   href="GLUEGEN_CODEBASE_TAG/gluegen-rt.jnlp" />
     </resources>
diff --git a/jnlp-files/jogl-all-noawt.jnlp b/jnlp-files/jogl-all-noawt.jnlp
index 63f558d..eed6749 100644
--- a/jnlp-files/jogl-all-noawt.jnlp
+++ b/jnlp-files/jogl-all-noawt.jnlp
@@ -14,7 +14,7 @@
       <all-permissions/>
   </security>
     <resources>
-      <jar href="jar/jogl.all-noawt.jar" />
+      <jar href="jar/jogl-all-noawt.jar" />
 
       <extension name="gluegen-rt"   href="GLUEGEN_CODEBASE_TAG/gluegen-rt.jnlp" />
     </resources>
diff --git a/jnlp-files/jogl-applet-runner-newt-ElektronenMultiplizierer-napplet.html b/jnlp-files/jogl-applet-runner-newt-ElektronenMultiplizierer-napplet.html
index 3b77157..19a3b29 100644
--- a/jnlp-files/jogl-applet-runner-newt-ElektronenMultiplizierer-napplet.html
+++ b/jnlp-files/jogl-applet-runner-newt-ElektronenMultiplizierer-napplet.html
@@ -14,8 +14,8 @@ Demoscene Passivist's Elektronen-Multiplizierer
       width="640" height="480">
    <param name="code" value="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run">
    <param name="archive" value="jar/gluegen-rt.jar,
-                                jar/jogl.all.jar,
-                                jar/jogl.test.jar">
+                                jar/jogl-all.jar,
+                                jar/jogl-test.jar">
    <param name="java_arguments" value="-Dsun.java2d.noddraw=true">
    <param name="gl_event_listener_class" value="com.jogamp.opengl.test.junit.jogl.demos.es2.ElektronenMultiplizierer">
    <param name="gl_profile" value="GL2ES2">
@@ -28,8 +28,8 @@ Demoscene Passivist's Elektronen-Multiplizierer
           type="application/x-java-applet;version=1.6"
           pluginspage="http://java.sun.com/javase/downloads/ea.jsp"
           archive="jar/gluegen-rt.jar,
-                   jar/jogl.all.jar,
-                   jar/jogl.test.jar"
+                   jar/jogl-all.jar,
+                   jar/jogl-test.jar"
           codebase_lookup" value="false"
           java_arguments="-Dsun.java2d.noddraw=true"
           gl_event_listener_class="com.jogamp.opengl.test.junit.jogl.demos.es2.ElektronenMultiplizierer"
diff --git a/jnlp-files/jogl-applet-runner-newt-ElektronenMultiplizierer.html b/jnlp-files/jogl-applet-runner-newt-ElektronenMultiplizierer.html
index 2a500c9..71c9baf 100644
--- a/jnlp-files/jogl-applet-runner-newt-ElektronenMultiplizierer.html
+++ b/jnlp-files/jogl-applet-runner-newt-ElektronenMultiplizierer.html
@@ -15,8 +15,8 @@ Demoscene Passivist's Elektronen-Multiplizierer
    <param name="code" value="org.jdesktop.applet.util.JNLPAppletLauncher">
    <param name="archive" value="jar/applet-launcher.jar,
                                 jar/gluegen-rt.jar,
-                                jar/jogl.all.jar,
-                                jar/jogl.test.jar">
+                                jar/jogl-all.jar,
+                                jar/jogl-test.jar">
    <param name="codebase_lookup" value="false">
    <param name="subapplet.classname" value="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run">
    <param name="subapplet.displayname" value="ElektronenMultiplizierer">
@@ -38,8 +38,8 @@ Demoscene Passivist's Elektronen-Multiplizierer
           pluginspage="http://java.sun.com/javase/downloads/ea.jsp"
           archive="jar/applet-launcher.jar,
                    jar/gluegen-rt.jar,
-                   jar/jogl.all.jar,
-                   jar/jogl.test.jar"
+                   jar/jogl-all.jar,
+                   jar/jogl-test.jar"
           codebase_lookup" value="false"
           subapplet.classname="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run"
           subapplet.displayname="ElektronenMultiplizierer"
diff --git a/jnlp-files/jogl-applet-runner-newt-GraphTextDemo01-napplet.html b/jnlp-files/jogl-applet-runner-newt-GraphTextDemo01-napplet.html
index 59115ca..9648b57 100644
--- a/jnlp-files/jogl-applet-runner-newt-GraphTextDemo01-napplet.html
+++ b/jnlp-files/jogl-applet-runner-newt-GraphTextDemo01-napplet.html
@@ -14,8 +14,8 @@ JOGL Graph Text Demo 01
       width="800" height="400">
    <param name="code" value="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run">
    <param name="archive" value="jar/gluegen-rt.jar,
-                                jar/jogl.all.jar,
-                                jar/jogl.test.jar">
+                                jar/jogl-all.jar,
+                                jar/jogl-test.jar">
    <param name="java_arguments" value="-Dsun.java2d.noddraw=true">
    <param name="gl_event_listener_class" value="com.jogamp.opengl.test.junit.graph.demos.GPUTextGLListener0A">
    <param name="gl_profile" value="GL2ES2">
@@ -31,8 +31,8 @@ JOGL Graph Text Demo 01
           type="application/x-java-applet;version=1.6"
           pluginspage="http://java.sun.com/javase/downloads/ea.jsp"
           archive="jar/gluegen-rt.jar,
-                   jar/jogl.all.jar,
-                   jar/jogl.test.jar"
+                   jar/jogl-all.jar,
+                   jar/jogl-test.jar"
           java_arguments="-Dsun.java2d.noddraw=true"
           gl_event_listener_class="com.jogamp.opengl.test.junit.graph.demos.GPUTextGLListener0A"
           gl_profile="GL2ES2"
diff --git a/jnlp-files/jogl-applet-runner-newt-GraphTextDemo01.html b/jnlp-files/jogl-applet-runner-newt-GraphTextDemo01.html
index 1c7d347..489984b 100644
--- a/jnlp-files/jogl-applet-runner-newt-GraphTextDemo01.html
+++ b/jnlp-files/jogl-applet-runner-newt-GraphTextDemo01.html
@@ -15,8 +15,8 @@ JOGL Graph Text Demo 01
    <param name="code" value="org.jdesktop.applet.util.JNLPAppletLauncher">
    <param name="archive" value="jar/applet-launcher.jar,
                                 jar/gluegen-rt.jar,
-                                jar/jogl.all.jar,
-                                jar/jogl.test.jar">
+                                jar/jogl-all.jar,
+                                jar/jogl-test.jar">
    <param name="codebase_lookup" value="false">
    <param name="subapplet.classname" value="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run">
    <param name="subapplet.displayname" value="JOGL Graph Text Demo01">
@@ -41,8 +41,8 @@ JOGL Graph Text Demo 01
           pluginspage="http://java.sun.com/javase/downloads/ea.jsp"
           archive="jar/applet-launcher.jar,
                    jar/gluegen-rt.jar,
-                   jar/jogl.all.jar,
-                   jar/jogl.test.jar"
+                   jar/jogl-all.jar,
+                   jar/jogl-test.jar"
           codebase_lookup" value="false"
           subapplet.classname="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run"
           subapplet.displayname="JOGL Graph Text Demo01"
diff --git a/jnlp-files/jogl-applet-runner-newt-GraphUISceneDemo01-napplet.html b/jnlp-files/jogl-applet-runner-newt-GraphUISceneDemo01-napplet.html
index 6efeefc..8f9783f 100644
--- a/jnlp-files/jogl-applet-runner-newt-GraphUISceneDemo01-napplet.html
+++ b/jnlp-files/jogl-applet-runner-newt-GraphUISceneDemo01-napplet.html
@@ -14,8 +14,8 @@ JOGL Graph UI-Scene Demo 01
       width="640" height="480">
    <param name="code" value="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run">
    <param name="archive" value="jar/gluegen-rt.jar,
-                                jar/jogl.all.jar,
-                                jar/jogl.test.jar">
+                                jar/jogl-all.jar,
+                                jar/jogl-test.jar">
    <param name="java_arguments" value="-Dsun.java2d.noddraw=true">
    <param name="gl_event_listener_class" value="com.jogamp.opengl.test.junit.graph.demos.GPUUISceneGLListener0A">
    <param name="gl_profile" value="GL2ES2">
@@ -30,8 +30,8 @@ JOGL Graph UI-Scene Demo 01
           type="application/x-java-applet;version=1.6"
           pluginspage="http://java.sun.com/javase/downloads/ea.jsp"
           archive="jar/gluegen-rt.jar,
-                   jar/jogl.all.jar,
-                   jar/jogl.test.jar"
+                   jar/jogl-all.jar,
+                   jar/jogl-test.jar"
           java_arguments="-Dsun.java2d.noddraw=true"
           gl_event_listener_class="com.jogamp.opengl.test.junit.graph.demos.GPUUISceneGLListener0A"
           gl_profile="GL2ES2"
diff --git a/jnlp-files/jogl-applet-runner-newt-GraphUISceneDemo01.html b/jnlp-files/jogl-applet-runner-newt-GraphUISceneDemo01.html
index 6b32b11..429e803 100644
--- a/jnlp-files/jogl-applet-runner-newt-GraphUISceneDemo01.html
+++ b/jnlp-files/jogl-applet-runner-newt-GraphUISceneDemo01.html
@@ -15,8 +15,8 @@ JOGL Graph UI-Scene Demo 01
    <param name="code" value="org.jdesktop.applet.util.JNLPAppletLauncher">
    <param name="archive" value="jar/applet-launcher.jar,
                                 jar/gluegen-rt.jar,
-                                jar/jogl.all.jar,
-                                jar/jogl.test.jar">
+                                jar/jogl-all.jar,
+                                jar/jogl-test.jar">
    <param name="codebase_lookup" value="false">
    <param name="subapplet.classname" value="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run">
    <param name="subapplet.displayname" value="JOGL Graph UI Demo01">
@@ -40,8 +40,8 @@ JOGL Graph UI-Scene Demo 01
           pluginspage="http://java.sun.com/javase/downloads/ea.jsp"
           archive="jar/applet-launcher.jar,
                    jar/gluegen-rt.jar,
-                   jar/jogl.all.jar,
-                   jar/jogl.test.jar"
+                   jar/jogl-all.jar,
+                   jar/jogl-test.jar"
           codebase_lookup" value="false"
           subapplet.classname="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run"
           subapplet.displayname="JOGL Graph UI Demo01"
diff --git a/jnlp-files/jogl-applet-runner-newt-MovieCube-napplet.html b/jnlp-files/jogl-applet-runner-newt-MovieCube-napplet.html
index def7b72..f569c7c 100644
--- a/jnlp-files/jogl-applet-runner-newt-MovieCube-napplet.html
+++ b/jnlp-files/jogl-applet-runner-newt-MovieCube-napplet.html
@@ -14,8 +14,8 @@ JogAmp's MovieCube - GLMediaPlayer Demo 01
       width="510" height="300">
    <param name="code" value="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run">
    <param name="archive" value="jar/gluegen-rt.jar,
-                                jar/jogl.all.jar,
-                                jar/jogl.test.jar">
+                                jar/jogl-all.jar,
+                                jar/jogl-test.jar">
    <param name="java_arguments" value="-Dsun.java2d.noddraw=true">
    <param name="gl_event_listener_class" value="com.jogamp.opengl.test.junit.jogl.demos.es2.av.MovieCube">
    <param name="gl_profile" value="GL2ES2">
@@ -28,8 +28,8 @@ JogAmp's MovieCube - GLMediaPlayer Demo 01
           type="application/x-java-applet;version=1.6"
           pluginspage="http://java.sun.com/javase/downloads/ea.jsp"
           archive="jar/gluegen-rt.jar,
-                   jar/jogl.all.jar,
-                   jar/jogl.test.jar"
+                   jar/jogl-all.jar,
+                   jar/jogl-test.jar"
           codebase_lookup" value="false"
           java_arguments="-Dsun.java2d.noddraw=true"
           gl_event_listener_class="com.jogamp.opengl.test.junit.jogl.demos.es2.av.MovieCube"
diff --git a/jnlp-files/jogl-applet-runner-newt-MovieCube.html b/jnlp-files/jogl-applet-runner-newt-MovieCube.html
index 6b1654e..7cb0024 100644
--- a/jnlp-files/jogl-applet-runner-newt-MovieCube.html
+++ b/jnlp-files/jogl-applet-runner-newt-MovieCube.html
@@ -15,8 +15,8 @@ JogAmp's MovieCube - GLMediaPlayer Demo 01
    <param name="code" value="org.jdesktop.applet.util.JNLPAppletLauncher">
    <param name="archive" value="jar/applet-launcher.jar,
                                 jar/gluegen-rt.jar,
-                                jar/jogl.all.jar,
-                                jar/jogl.test.jar">
+                                jar/jogl-all.jar,
+                                jar/jogl-test.jar">
    <param name="codebase_lookup" value="false">
    <param name="subapplet.classname" value="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run">
    <param name="subapplet.displayname" value="MovieCube">
@@ -38,8 +38,8 @@ JogAmp's MovieCube - GLMediaPlayer Demo 01
           pluginspage="http://java.sun.com/javase/downloads/ea.jsp"
           archive="jar/applet-launcher.jar,
                    jar/gluegen-rt.jar,
-                   jar/jogl.all.jar,
-                   jar/jogl.test.jar"
+                   jar/jogl-all.jar,
+                   jar/jogl-test.jar"
           codebase_lookup" value="false"
           subapplet.classname="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run"
           subapplet.displayname="MovieCube"
diff --git a/jnlp-files/jogl-applet-runner-newt-gears-normal-launcheronly.html b/jnlp-files/jogl-applet-runner-newt-gears-normal-launcheronly.html
index 91e9893..a9e42d3 100644
--- a/jnlp-files/jogl-applet-runner-newt-gears-normal-launcheronly.html
+++ b/jnlp-files/jogl-applet-runner-newt-gears-normal-launcheronly.html
@@ -21,8 +21,8 @@ JOGL NEWT JNLP Applet Runner Special Keys:<br>
    <param name="code" value="org.jdesktop.applet.util.JNLPAppletLauncher">
    <param name="archive" value="jar/applet-launcher.jar,
                                 jar/gluegen-rt.jar,
-                                jar/jogl.all.jar,
-                                jar/jogl.test.jar">
+                                jar/jogl-all.jar,
+                                jar/jogl-test.jar">
    <param name="codebase_lookup" value="false">
    <param name="subapplet.classname" value="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run">
    <param name="subapplet.displayname" value="JOGL GearsES2 Applet">
@@ -43,8 +43,8 @@ JOGL NEWT JNLP Applet Runner Special Keys:<br>
           pluginspage="http://java.sun.com/javase/downloads/ea.jsp"
           archive="jar/applet-launcher.jar,
                    jar/gluegen-rt.jar,
-                   jar/jogl.all.jar,
-                   jar/jogl.test.jar"
+                   jar/jogl-all.jar,
+                   jar/jogl-test.jar"
           codebase_lookup" value="false"
           subapplet.classname="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run"
           subapplet.displayname="JOGL GearsES2 Applet"
@@ -75,8 +75,8 @@ The applet above is instantiated with the following code:
    <param name="code" value="org.jdesktop.applet.util.JNLPAppletLauncher">
    <param name="archive" value="jar/applet-launcher.jar,
                                 jar/gluegen-rt.jar,
-                                jar/jogl.all.jar,
-                                jar/jogl.test.jar">
+                                jar/jogl-all.jar,
+                                jar/jogl-test.jar">
    <param name="codebase_lookup" value="false">
    <param name="subapplet.classname" value="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run">
    <param name="subapplet.displayname" value="JOGL GearsES2 Applet">
@@ -97,8 +97,8 @@ The applet above is instantiated with the following code:
           pluginspage="http://java.sun.com/javase/downloads/ea.jsp"
           archive="jar/applet-launcher.jar,
                    jar/gluegen-rt.jar,
-                   jar/jogl.all.jar,
-                   jar/jogl.test.jar"
+                   jar/jogl-all.jar,
+                   jar/jogl-test.jar"
           codebase_lookup" value="false"
           subapplet.classname="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run"
           subapplet.displayname="JOGL GearsES2 Applet"
diff --git a/jnlp-files/jogl-applet-runner-newt-gears-normal-napplet.html b/jnlp-files/jogl-applet-runner-newt-gears-normal-napplet.html
index 9db6d8c..37473be 100644
--- a/jnlp-files/jogl-applet-runner-newt-gears-normal-napplet.html
+++ b/jnlp-files/jogl-applet-runner-newt-gears-normal-napplet.html
@@ -20,8 +20,8 @@ JOGL NEWT Applet Runner Special Keys:<br>
       width="200" height="200">
    <param name="code" value="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run">
    <param name="archive" value="jar/gluegen-rt.jar,
-                                jar/jogl.all.jar,
-                                jar/jogl.test.jar">
+                                jar/jogl-all.jar,
+                                jar/jogl-test.jar">
    <param name="java_arguments" value="-Dsun.java2d.noddraw=true">
    <param name="gl_event_listener_class" value="com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2">
    <param name="gl_profile" value="GL2ES2">
@@ -34,8 +34,8 @@ JOGL NEWT Applet Runner Special Keys:<br>
           type="application/x-java-applet;version=1.6"
           pluginspage="http://java.sun.com/javase/downloads/ea.jsp"
           archive="jar/gluegen-rt.jar,
-                   jar/jogl.all.jar,
-                   jar/jogl.test.jar"
+                   jar/jogl-all.jar,
+                   jar/jogl-test.jar"
           java_arguments="-Dsun.java2d.noddraw=true"
           gl_event_listener_class="com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2"
           gl_profile="GL2ES2"
@@ -58,8 +58,8 @@ The applet above is instantiated with the following code:
       width="200" height="200">
    <param name="code" value="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run">
    <param name="archive" value="jar/gluegen-rt.jar,
-                                jar/jogl.all.jar,
-                                jar/jogl.test.jar">
+                                jar/jogl-all.jar,
+                                jar/jogl-test.jar">
    <param name="java_arguments" value="-Dsun.java2d.noddraw=true">
    <param name="gl_event_listener_class" value="com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2">
    <param name="gl_profile" value="GL2ES2">
@@ -72,8 +72,8 @@ The applet above is instantiated with the following code:
           type="application/x-java-applet;version=1.6"
           pluginspage="http://java.sun.com/javase/downloads/ea.jsp"
           archive="jar/gluegen-rt.jar,
-                   jar/jogl.all.jar,
-                   jar/jogl.test.jar"
+                   jar/jogl-all.jar,
+                   jar/jogl-test.jar"
           java_arguments="-Dsun.java2d.noddraw=true"
           gl_event_listener_class="com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2"
           gl_profile="GL2ES2"
@@ -90,7 +90,7 @@ The applet above is instantiated with the following code:
 </P>
 <P>
 
-Note that the jogl.test.jar, which contains the test applet class,
+Note that the jogl-test.jar, which contains the test applet class,
 <B>does not need to be signed</B>! JogAmp Community signs
 jogl.jar and gluegen-rt.jar, which contain
 JOGL's supporting classes; this is the only
diff --git a/jnlp-files/jogl-applet-runner-newt-gears-normal-napplet2.html b/jnlp-files/jogl-applet-runner-newt-gears-normal-napplet2.html
index ba2f69e..63df4ed 100644
--- a/jnlp-files/jogl-applet-runner-newt-gears-normal-napplet2.html
+++ b/jnlp-files/jogl-applet-runner-newt-gears-normal-napplet2.html
@@ -21,8 +21,8 @@ If Applet is out of browser window, it is closeable.
       width="200" height="200">
    <param name="code" value="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run">
    <param name="archive" value="jar/gluegen-rt.jar,
-                                jar/jogl.all.jar,
-                                jar/jogl.test.jar">
+                                jar/jogl-all.jar,
+                                jar/jogl-test.jar">
    <param name="java_arguments" value="-Dsun.java2d.noddraw=true">
    <param name="gl_event_listener_class" value="com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2">
    <param name="gl_profile" value="GL2ES2">
@@ -36,8 +36,8 @@ If Applet is out of browser window, it is closeable.
           type="application/x-java-applet;version=1.6"
           pluginspage="http://java.sun.com/javase/downloads/ea.jsp"
           archive="jar/gluegen-rt.jar,
-                   jar/jogl.all.jar,
-                   jar/jogl.test.jar"
+                   jar/jogl-all.jar,
+                   jar/jogl-test.jar"
           java_arguments="-Dsun.java2d.noddraw=true"
           gl_event_listener_class="com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2"
           gl_profile="GL2ES2"
@@ -61,8 +61,8 @@ The applet above is instantiated with the following code:
       width="200" height="200">
    <param name="code" value="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run">
    <param name="archive" value="jar/gluegen-rt.jar,
-                                jar/jogl.all.jar,
-                                jar/jogl.test.jar">
+                                jar/jogl-all.jar,
+                                jar/jogl-test.jar">
    <param name="java_arguments" value="-Dsun.java2d.noddraw=true">
    <param name="gl_event_listener_class" value="com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2">
    <param name="gl_profile" value="GL2ES2">
@@ -76,8 +76,8 @@ The applet above is instantiated with the following code:
           type="application/x-java-applet;version=1.6"
           pluginspage="http://java.sun.com/javase/downloads/ea.jsp"
           archive="jar/gluegen-rt.jar,
-                   jar/jogl.all.jar,
-                   jar/jogl.test.jar"
+                   jar/jogl-all.jar,
+                   jar/jogl-test.jar"
           java_arguments="-Dsun.java2d.noddraw=true"
           gl_event_listener_class="com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2"
           gl_profile="GL2ES2"
@@ -95,7 +95,7 @@ The applet above is instantiated with the following code:
 </P>
 <P>
 
-Note that the jogl.test.jar, which contains the test applet class,
+Note that the jogl-test.jar, which contains the test applet class,
 <B>does not need to be signed</B>! JogAmp Community signs
 jogl.jar and gluegen-rt.jar, which contain
 JOGL's supporting classes; this is the only
diff --git a/jnlp-files/jogl-applet-runner-newt-gears-normal.html b/jnlp-files/jogl-applet-runner-newt-gears-normal.html
index c8d654d..a6dd16a 100644
--- a/jnlp-files/jogl-applet-runner-newt-gears-normal.html
+++ b/jnlp-files/jogl-applet-runner-newt-gears-normal.html
@@ -35,8 +35,8 @@ JOGL NEWT JNLP Applet Runner Special Keys:<br>
    <param name="code" value="org.jdesktop.applet.util.JNLPAppletLauncher">
    <param name="archive" value="jar/applet-launcher.jar,
                                 jar/gluegen-rt.jar,
-                                jar/jogl.all.jar,
-                                jar/jogl.test.jar">
+                                jar/jogl-all.jar,
+                                jar/jogl-test.jar">
    <param name="codebase_lookup" value="false">
    <param name="subapplet.classname" value="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run">
    <param name="subapplet.displayname" value="JOGL GearsES2 Applet">
@@ -58,8 +58,8 @@ JOGL NEWT JNLP Applet Runner Special Keys:<br>
           pluginspage="http://java.sun.com/javase/downloads/ea.jsp"
           archive="jar/applet-launcher.jar,
                    jar/gluegen-rt.jar,
-                   jar/jogl.all.jar,
-                   jar/jogl.test.jar"
+                   jar/jogl-all.jar,
+                   jar/jogl-test.jar"
           codebase_lookup" value="false"
           subapplet.classname="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run"
           subapplet.displayname="JOGL GearsES2 Applet"
@@ -91,8 +91,8 @@ The applet above is instantiated with the following code:
    <param name="code" value="org.jdesktop.applet.util.JNLPAppletLauncher">
    <param name="archive" value="jar/applet-launcher.jar,
                                 jar/gluegen-rt.jar,
-                                jar/jogl.all.jar,
-                                jar/jogl.test.jar">
+                                jar/jogl-all.jar,
+                                jar/jogl-test.jar">
    <param name="codebase_lookup" value="false">
    <param name="subapplet.classname" value="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run">
    <param name="subapplet.displayname" value="JOGL GearsES2 Applet">
@@ -114,8 +114,8 @@ The applet above is instantiated with the following code:
           pluginspage="http://java.sun.com/javase/downloads/ea.jsp"
           archive="jar/applet-launcher.jar,
                    jar/gluegen-rt.jar,
-                   jar/jogl.all.jar,
-                   jar/jogl.test.jar"
+                   jar/jogl-all.jar,
+                   jar/jogl-test.jar"
           codebase_lookup" value="false"
           subapplet.classname="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run"
           subapplet.displayname="JOGL GearsES2 Applet"
@@ -154,7 +154,7 @@ Where the referenced JNLP file <em>jogl-applet-runner-newt.jnlp</em> looks as fo
     <resources>
       <j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+"/>
       <property name="sun.java2d.noddraw" value="true"/>
-      <jar href="jar/jogl.test.jar" main="true"/>
+      <jar href="jar/jogl-test.jar" main="true"/>
       <extension name="jogl-all-awt" href="http://jogamp.org/deployment/jogamp-current/jogl-all-awt.jnlp" />
     </resources>
 
@@ -170,7 +170,7 @@ Where the referenced JNLP file <em>jogl-applet-runner-newt.jnlp</em> looks as fo
 </P>
 <P>
 
-Note that the jogl.test.jar, which contains the test applet class,
+Note that the jogl-test.jar, which contains the test applet class,
 <B>does not need to be signed</B>! JogAmp Community signs
 applet-launcher.jar, jogl.jar and gluegen-rt.jar, which contain the
 JNLPAppletLauncher and JOGL's supporting classes; this is the only
diff --git a/jnlp-files/jogl-applet-runner-newt-gears-special-napplet.html b/jnlp-files/jogl-applet-runner-newt-gears-special-napplet.html
index 3c1895b..7df1678 100644
--- a/jnlp-files/jogl-applet-runner-newt-gears-special-napplet.html
+++ b/jnlp-files/jogl-applet-runner-newt-gears-special-napplet.html
@@ -11,8 +11,8 @@ JOGL NEWT JNLP Applet Runner Special Keys:
       width="1" height="1">
    <param name="code" value="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run">
    <param name="archive" value="jar/gluegen-rt.jar,
-                                jar/jogl.all.jar,
-                                jar/jogl.test.jar">
+                                jar/jogl-all.jar,
+                                jar/jogl-test.jar">
    <param name="java_arguments" value="-Dsun.java2d.noddraw=true">
    <param name="gl_event_listener_class" value="com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2">
    <param name="gl_profile" value="GL2ES2">
@@ -32,8 +32,8 @@ JOGL NEWT JNLP Applet Runner Special Keys:
           type="application/x-java-applet;version=1.6"
           pluginspage="http://java.sun.com/javase/downloads/ea.jsp"
           archive="jar/gluegen-rt.jar,
-                   jar/jogl.all.jar,
-                   jar/jogl.test.jar"
+                   jar/jogl-all.jar,
+                   jar/jogl-test.jar"
           java_arguments="-Dsun.java2d.noddraw=true"
           gl_event_listener_class="com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2"
           gl_profile="GL2ES2"
diff --git a/jnlp-files/jogl-applet-runner-newt-gears-special.html b/jnlp-files/jogl-applet-runner-newt-gears-special.html
index dcbe898..0f59114 100644
--- a/jnlp-files/jogl-applet-runner-newt-gears-special.html
+++ b/jnlp-files/jogl-applet-runner-newt-gears-special.html
@@ -12,8 +12,8 @@ JOGL NEWT JNLP Applet Runner Special Keys:
    <param name="code" value="org.jdesktop.applet.util.JNLPAppletLauncher">
    <param name="archive" value="jar/applet-launcher.jar,
                                 jar/gluegen-rt.jar,
-                                jar/jogl.all.jar,
-                                jar/jogl.test.jar">
+                                jar/jogl-all.jar,
+                                jar/jogl-test.jar">
    <param name="codebase_lookup" value="false">
    <param name="subapplet.classname" value="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run">
    <param name="subapplet.displayname" value="JOGL GearsES2 Applet Transparent">
@@ -42,8 +42,8 @@ JOGL NEWT JNLP Applet Runner Special Keys:
           pluginspage="http://java.sun.com/javase/downloads/ea.jsp"
           archive="jar/applet-launcher.jar,
                    jar/gluegen-rt.jar,
-                   jar/jogl.all.jar,
-                   jar/jogl.test.jar"
+                   jar/jogl-all.jar,
+                   jar/jogl-test.jar"
           codebase_lookup" value="false"
           subapplet.classname="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run"
           subapplet.displayname="JOGL GearsES2 Applet Transparent"
diff --git a/jnlp-files/jogl-applet-runner-newt.jnlp b/jnlp-files/jogl-applet-runner-newt.jnlp
index 259e39f..c33e1b7 100644
--- a/jnlp-files/jogl-applet-runner-newt.jnlp
+++ b/jnlp-files/jogl-applet-runner-newt.jnlp
@@ -12,7 +12,7 @@
     <resources>
       <j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+"/>
       <property name="sun.java2d.noddraw" value="true"/>
-      <jar href="jar/jogl.test.jar" main="true"/>
+      <jar href="jar/jogl-test.jar" main="true"/>
       <extension name="jogl-all-awt" href="jogl-all-awt.jnlp" />
     </resources>
 
diff --git a/jnlp-files/jogl-applet-version-lancheronly.html b/jnlp-files/jogl-applet-version-lancheronly.html
index 685d911..6880152 100644
--- a/jnlp-files/jogl-applet-version-lancheronly.html
+++ b/jnlp-files/jogl-applet-version-lancheronly.html
@@ -20,7 +20,7 @@ and your platform.
    <param name="code" value="org.jdesktop.applet.util.JNLPAppletLauncher">
    <param name="archive" value="jar/applet-launcher.jar,
                                 jar/gluegen-rt.jar,
-                                jar/jogl.all.jar">
+                                jar/jogl-all.jar">
    <param name="codebase_lookup" value="false">
    <param name="subapplet.classname" value="jogamp.opengl.awt.VersionApplet">
    <param name="subapplet.displayname" value="JOGL Applet Version">
@@ -36,7 +36,7 @@ and your platform.
           pluginspage="http://java.sun.com/javase/downloads/ea.jsp"
           archive="jar/applet-launcher.jar,
                    jar/gluegen-rt.jar,
-                   jar/jogl.all.jar"
+                   jar/jogl-all.jar"
           codebase_lookup" value="false"
           subapplet.classname="jogamp.opengl.awt.VersionApplet"
           subapplet.displayname="JOGL Applet Version"
diff --git a/jnlp-files/jogl-applet-version-napplet.html b/jnlp-files/jogl-applet-version-napplet.html
index e8104cb..aeccb71 100644
--- a/jnlp-files/jogl-applet-version-napplet.html
+++ b/jnlp-files/jogl-applet-version-napplet.html
@@ -16,7 +16,7 @@ and your platform.
       width="800" height="600">
    <param name="code" value="jogamp.opengl.awt.VersionApplet">
    <param name="archive" value="jar/gluegen-rt.jar,
-                                jar/jogl.all.jar">
+                                jar/jogl-all.jar">
    <param name="java_arguments" value="-Dsun.java2d.noddraw=true">
    <comment>
      <embed code="jogamp.opengl.awt.VersionApplet"
@@ -24,7 +24,7 @@ and your platform.
           type="application/x-java-applet;version=1.6"
           pluginspage="http://java.sun.com/javase/downloads/ea.jsp"
           archive="jar/gluegen-rt.jar,
-                   jar/jogl.all.jar"
+                   jar/jogl-all.jar"
           java_arguments="-Dsun.java2d.noddraw=true">
         <noembed>Sorry, no Java support detected.</noembed>
      </embed>
@@ -41,7 +41,7 @@ The applet above is instantiated with the following code:
       width="800" height="600">
    <param name="code" value="jogamp.opengl.awt.VersionApplet">
    <param name="archive" value="jar/gluegen-rt.jar,
-                                jar/jogl.all.jar">
+                                jar/jogl-all.jar">
    <param name="java_arguments" value="-Dsun.java2d.noddraw=true">
    <comment>
      <embed code="jogamp.opengl.awt.VersionApplet"
@@ -49,7 +49,7 @@ The applet above is instantiated with the following code:
           type="application/x-java-applet;version=1.6"
           pluginspage="http://java.sun.com/javase/downloads/ea.jsp"
           archive="jar/gluegen-rt.jar,
-                   jar/jogl.all.jar"
+                   jar/jogl-all.jar"
           java_arguments="-Dsun.java2d.noddraw=true">
         <noembed>Sorry, no Java support detected.</noembed>
      </embed>
diff --git a/jnlp-files/jogl-applet-version.html b/jnlp-files/jogl-applet-version.html
index 5b73896..948e630 100644
--- a/jnlp-files/jogl-applet-version.html
+++ b/jnlp-files/jogl-applet-version.html
@@ -22,7 +22,7 @@ otherwise it shall fallback to <a href="http://jogamp.org/applet-launcher/www/">
    <param name="code" value="org.jdesktop.applet.util.JNLPAppletLauncher">
    <param name="archive" value="jar/applet-launcher.jar,
                                 jar/gluegen-rt.jar,
-                                jar/jogl.all.jar">
+                                jar/jogl-all.jar">
    <param name="codebase_lookup" value="false">
    <param name="subapplet.classname" value="jogamp.opengl.awt.VersionApplet">
    <param name="subapplet.displayname" value="JOGL Applet Version">
@@ -39,7 +39,7 @@ otherwise it shall fallback to <a href="http://jogamp.org/applet-launcher/www/">
           pluginspage="http://java.sun.com/javase/downloads/ea.jsp"
           archive="jar/applet-launcher.jar,
                    jar/gluegen-rt.jar,
-                   jar/jogl.all.jar"
+                   jar/jogl-all.jar"
           codebase_lookup" value="false"
           subapplet.classname="jogamp.opengl.awt.VersionApplet"
           subapplet.displayname="JOGL Applet Version"
diff --git a/make/build-common.xml b/make/build-common.xml
index 93835e0..4de5de5 100644
--- a/make/build-common.xml
+++ b/make/build-common.xml
@@ -250,167 +250,170 @@
 
         <!-- Atomic JavaSE JARS -->
 
-        <property name="nativewindow.core.jar"         value="${build.nativewindow}/nativewindow.core.jar" />
-        <property name="nativewindow.awt.jar"          value="${build.nativewindow}/nativewindow.awt.jar"  />
-        <property name="nativewindow.os.x11.jar"       value="${build.nativewindow}/nativewindow.os.x11.jar"  />
-        <property name="nativewindow.os.win.jar"       value="${build.nativewindow}/nativewindow.os.win.jar"  />
-        <property name="nativewindow.os.macosx.jar"    value="${build.nativewindow}/nativewindow.os.macosx.jar"  />
+        <property name="nativewindow-core.jar"         value="${build.nativewindow}/nativewindow-core.jar" />
+        <property name="nativewindow-awt.jar"          value="${build.nativewindow}/nativewindow-awt.jar"  />
+        <property name="nativewindow-os-x11.jar"       value="${build.nativewindow}/nativewindow-os-x11.jar"  />
+        <property name="nativewindow-os-win.jar"       value="${build.nativewindow}/nativewindow-os-win.jar"  />
+        <property name="nativewindow-os-osx.jar"       value="${build.nativewindow}/nativewindow-os-osx.jar"  />
 
         <path id="nativewindow_all_atoms.classpath">
-            <pathelement location="${nativewindow.core.jar}" />
-            <pathelement location="${nativewindow.awt.jar}" />
-            <pathelement location="${nativewindow.os.x11.jar}" />
-            <pathelement location="${nativewindow.os.win.jar}" />
-            <pathelement location="${nativewindow.os.macosx.jar}" />
+            <pathelement location="${nativewindow-core.jar}" />
+            <pathelement location="${nativewindow-awt.jar}" />
+            <pathelement location="${nativewindow-os-x11.jar}" />
+            <pathelement location="${nativewindow-os-win.jar}" />
+            <pathelement location="${nativewindow-os-osx.jar}" />
         </path>
         <path id="nativewindow_all-noawt_atoms.classpath">
-            <pathelement location="${nativewindow.core.jar}" />
-            <pathelement location="${nativewindow.os.x11.jar}" />
-            <pathelement location="${nativewindow.os.win.jar}" />
-            <pathelement location="${nativewindow.os.macosx.jar}" />
+            <pathelement location="${nativewindow-core.jar}" />
+            <pathelement location="${nativewindow-os-x11.jar}" />
+            <pathelement location="${nativewindow-os-win.jar}" />
+            <pathelement location="${nativewindow-os-osx.jar}" />
         </path>
         <path id="nativewindow_core_atoms.classpath">
-            <pathelement location="${nativewindow.core.jar}" />
+            <pathelement location="${nativewindow-core.jar}" />
         </path>
         
-        <property name="jogl.core.jar"                  value="${build.jogl}/jogl.core.jar" />
-        <property name="jogl.sdk.jar"                   value="${build.jogl}/jogl.sdk.jar" />
-        <property name="jogl.glmobile.jar"              value="${build.jogl}/jogl.glmobile.jar" />
-        <property name="jogl.glmobile.dbg.jar"          value="${build.jogl}/jogl.glmobile.dbg.jar" />
-        <property name="jogl.util.jar"                  value="${build.jogl}/jogl.util.jar" />
-        <property name="jogl.glutess.jar"               value="${build.jogl}/jogl.glu.tess.jar" />
-        <property name="jogl.glumipmap.jar"             value="${build.jogl}/jogl.glu.mipmap.jar" />
-        <property name="jogl.util.fixedfuncemu.jar"     value="${build.jogl}/jogl.util.fixedfuncemu.jar" />
-        <property name="jogl.awt.jar"                   value="${build.jogl}/jogl.awt.jar" />
-        <property name="jogl.swt.jar"                   value="${build.jogl}/jogl.swt.jar" />
-        <property name="jogl.util.awt.jar"              value="${build.jogl}/jogl.util.awt.jar" />
-        <property name="jogl.os.x11.jar"                value="${build.jogl}/jogl.os.x11.jar" />
-        <property name="jogl.os.win.jar"                value="${build.jogl}/jogl.os.win.jar" />
-        <property name="jogl.os.osx.jar"                value="${build.jogl}/jogl.os.osx.jar" />
-        <property name="jogl.os.android.jar"            value="${build.jogl}/jogl.os.android.jar" />
-        <property name="jogl.gldesktop.jar"             value="${build.jogl}/jogl.gldesktop.jar" />
-        <property name="jogl.gldesktop.dbg.jar"         value="${build.jogl}/jogl.gldesktop.dbg.jar" />
-        <property name="jogl.glugldesktop.jar"          value="${build.jogl}/jogl.glu.gldesktop.jar" />
-        <property name="jogl.util.gldesktop.jar"        value="${build.jogl}/jogl.util.gldesktop.jar" />
-        <property name="jogl.omx.jar"                   value="${build.jogl}/jogl.omx.jar" />
-        <property name="jogl.cg.jar"                    value="${build.jogl}/jogl.cg.jar" />
+        <property name="jogl-core.jar"                  value="${build.jogl}/jogl-core.jar" />
+        <property name="jogl-sdk.jar"                   value="${build.jogl}/jogl-sdk.jar" />
+        <property name="jogl-glmobile.jar"              value="${build.jogl}/jogl-glmobile.jar" />
+        <property name="jogl-glmobile-dbg.jar"          value="${build.jogl}/jogl-glmobile-dbg.jar" />
+        <property name="jogl-util.jar"                  value="${build.jogl}/jogl-util.jar" />
+        <property name="jogl-glutess.jar"               value="${build.jogl}/jogl-glu-tess.jar" />
+        <property name="jogl-glumipmap.jar"             value="${build.jogl}/jogl-glu-mipmap.jar" />
+        <property name="jogl-util-fixedfuncemu.jar"     value="${build.jogl}/jogl-util-fixedfuncemu.jar" />
+        <property name="jogl-awt.jar"                   value="${build.jogl}/jogl-awt.jar" />
+        <property name="jogl-swt.jar"                   value="${build.jogl}/jogl-swt.jar" />
+        <property name="jogl-util-awt.jar"              value="${build.jogl}/jogl-util-awt.jar" />
+        <property name="jogl-os-x11.jar"                value="${build.jogl}/jogl-os-x11.jar" />
+        <property name="jogl-os-win.jar"                value="${build.jogl}/jogl-os-win.jar" />
+        <property name="jogl-os-osx.jar"                value="${build.jogl}/jogl-os-osx.jar" />
+        <property name="jogl-os-android.jar"            value="${build.jogl}/jogl-os-android.jar" />
+        <property name="jogl-gldesktop.jar"             value="${build.jogl}/jogl-gldesktop.jar" />
+        <property name="jogl-gldesktop-dbg.jar"         value="${build.jogl}/jogl-gldesktop-dbg.jar" />
+        <property name="jogl-glu-gldesktop.jar"         value="${build.jogl}/jogl-glu-gldesktop.jar" />
+        <property name="jogl-util-gldesktop.jar"        value="${build.jogl}/jogl-util-gldesktop.jar" />
+        <property name="jogl-omx.jar"                   value="${build.jogl}/jogl-omx.jar" />
+        <property name="jogl-cg.jar"                    value="${build.jogl}/jogl-cg.jar" />
 
         <path id="jogl_all_atoms.classpath">
-            <pathelement location="${jogl.core.jar}" />
-            <pathelement location="${jogl.sdk.jar}" />
-            <pathelement location="${jogl.glmobile.jar}" />
-            <pathelement location="${jogl.glmobile.dbg.jar}" />
-            <pathelement location="${jogl.util.jar}" />
-            <pathelement location="${jogl.glutess.jar}" />
-            <pathelement location="${jogl.glumipmap.jar}" />
-            <pathelement location="${jogl.util.fixedfuncemu.jar}" />
-            <pathelement location="${jogl.awt.jar}" />
-            <pathelement location="${jogl.swt.jar}" />
-            <pathelement location="${jogl.util.awt.jar}" />
-            <pathelement location="${jogl.os.x11.jar}" />
-            <pathelement location="${jogl.os.win.jar}" />
-            <pathelement location="${jogl.os.osx.jar}" />
-            <pathelement location="${jogl.gldesktop.jar}" />
-            <pathelement location="${jogl.gldesktop.dbg.jar}" />
-            <pathelement location="${jogl.glugldesktop.jar}" />
-            <pathelement location="${jogl.util.gldesktop.jar}" />
-            <pathelement location="${jogl.omx.jar}" />
+            <pathelement location="${jogl-core.jar}" />
+            <pathelement location="${jogl-sdk.jar}" />
+            <pathelement location="${jogl-glmobile.jar}" />
+            <pathelement location="${jogl-glmobile-dbg.jar}" />
+            <pathelement location="${jogl-util.jar}" />
+            <pathelement location="${jogl-glutess.jar}" />
+            <pathelement location="${jogl-glumipmap.jar}" />
+            <pathelement location="${jogl-util-fixedfuncemu.jar}" />
+            <pathelement location="${jogl-awt.jar}" />
+            <pathelement location="${jogl-swt.jar}" />
+            <pathelement location="${jogl-util-awt.jar}" />
+            <pathelement location="${jogl-os-x11.jar}" />
+            <pathelement location="${jogl-os-win.jar}" />
+            <pathelement location="${jogl-os-osx.jar}" />
+            <pathelement location="${jogl-gldesktop.jar}" />
+            <pathelement location="${jogl-gldesktop-dbg.jar}" />
+            <pathelement location="${jogl-glu-gldesktop.jar}" />
+            <pathelement location="${jogl-util-gldesktop.jar}" />
+            <pathelement location="${jogl-omx.jar}" />
         </path>
         <path id="jogl_all-noawt_atoms.classpath">
-            <pathelement location="${jogl.core.jar}" />
-            <pathelement location="${jogl.sdk.jar}" />
-            <pathelement location="${jogl.glmobile.jar}" />
-            <pathelement location="${jogl.glmobile.dbg.jar}" />
-            <pathelement location="${jogl.util.jar}" />
-            <pathelement location="${jogl.glutess.jar}" />
-            <pathelement location="${jogl.glumipmap.jar}" />
-            <pathelement location="${jogl.util.fixedfuncemu.jar}" />
-            <pathelement location="${jogl.os.x11.jar}" />
-            <pathelement location="${jogl.os.win.jar}" />
-            <pathelement location="${jogl.os.osx.jar}" />
-            <pathelement location="${jogl.gldesktop.jar}" />
-            <pathelement location="${jogl.gldesktop.dbg.jar}" />
-            <pathelement location="${jogl.glugldesktop.jar}" />
-            <pathelement location="${jogl.util.gldesktop.jar}" />
-            <pathelement location="${jogl.omx.jar}" />
+            <pathelement location="${jogl-core.jar}" />
+            <pathelement location="${jogl-sdk.jar}" />
+            <pathelement location="${jogl-glmobile.jar}" />
+            <pathelement location="${jogl-glmobile-dbg.jar}" />
+            <pathelement location="${jogl-util.jar}" />
+            <pathelement location="${jogl-glutess.jar}" />
+            <pathelement location="${jogl-glumipmap.jar}" />
+            <pathelement location="${jogl-util-fixedfuncemu.jar}" />
+            <pathelement location="${jogl-os-x11.jar}" />
+            <pathelement location="${jogl-os-win.jar}" />
+            <pathelement location="${jogl-os-osx.jar}" />
+            <pathelement location="${jogl-gldesktop.jar}" />
+            <pathelement location="${jogl-gldesktop-dbg.jar}" />
+            <pathelement location="${jogl-glu-gldesktop.jar}" />
+            <pathelement location="${jogl-util-gldesktop.jar}" />
+            <pathelement location="${jogl-omx.jar}" />
         </path>
         <path id="jogl_all-mobile_atoms.classpath">
-            <pathelement location="${jogl.core.jar}" />
-            <pathelement location="${jogl.glmobile.jar}" />
-            <pathelement location="${jogl.glmobile.dbg.jar}" />
-            <pathelement location="${jogl.util.jar}" />
-            <pathelement location="${jogl.glutess.jar}" />
-            <pathelement location="${jogl.glumipmap.jar}" />
-            <pathelement location="${jogl.util.fixedfuncemu.jar}" />
-            <pathelement location="${jogl.omx.jar}" />
+            <pathelement location="${jogl-core.jar}" />
+            <pathelement location="${jogl-glmobile.jar}" />
+            <pathelement location="${jogl-glmobile-dbg.jar}" />
+            <pathelement location="${jogl-util.jar}" />
+            <pathelement location="${jogl-glutess.jar}" />
+            <pathelement location="${jogl-glumipmap.jar}" />
+            <pathelement location="${jogl-util-fixedfuncemu.jar}" />
+            <pathelement location="${jogl-os-x11.jar}" />
+            <pathelement location="${jogl-omx.jar}" />
         </path>
         <path id="jogl_all-android_atoms.classpath">
-            <pathelement location="${jogl.core.jar}" />
-            <pathelement location="${jogl.glmobile.jar}" />
-            <pathelement location="${jogl.glmobile.dbg.jar}" />
-            <pathelement location="${jogl.util.jar}" />
-            <pathelement location="${jogl.glutess.jar}" />
-            <pathelement location="${jogl.glumipmap.jar}" />
-            <pathelement location="${jogl.util.fixedfuncemu.jar}" />
-            <pathelement location="${jogl.os.android.jar}" />
-            <pathelement location="${jogl.omx.jar}" />
+            <pathelement location="${jogl-core.jar}" />
+            <pathelement location="${jogl-glmobile.jar}" />
+            <pathelement location="${jogl-glmobile-dbg.jar}" />
+            <pathelement location="${jogl-util.jar}" />
+            <pathelement location="${jogl-glutess.jar}" />
+            <pathelement location="${jogl-glumipmap.jar}" />
+            <pathelement location="${jogl-util-fixedfuncemu.jar}" />
+            <pathelement location="${jogl-os-android.jar}" />
+            <pathelement location="${jogl-omx.jar}" />
         </path>
         <!-- 
-            ${jogl.core.jar} ${jogl.glutess.jar} ${jogl.glumipmap.jar} ${jogl.glugldesktop.jar} ${jogl.os.x11.jar} ${jogl.os.win.jar} ${jogl.os.osx.jar} ${jogl.gldesktop.jar} ${jogl.gldesktop.dbg.jar} ${jogl.glmobile.jar} ${jogl.glmobile.dbg.jar} ${jogl.omx.jar} ${jogl.util.jar} ${jogl.util.gldesktop.jar} ${jogl.util.awt.jar} ${jogl.util.fixedfuncemu.jar} ${jogl.sdk.jar} -->
-
-        <property name="newt.core.jar"                  value="${build.newt}/newt.core.jar" />
-        <property name="newt.ogl.jar"                   value="${build.newt}/newt.ogl.jar" />
-        <property name="newt.awt.jar"                   value="${build.newt}/newt.awt.jar" />
-        <property name="newt.event.jar"                 value="${build.newt}/newt.event.jar" />              <!-- using NEWT events w/o NEWT -->
-        <property name="newt.driver.x11.jar"            value="${build.newt}/newt.driver.x11.jar" />
-        <property name="newt.driver.win.jar"            value="${build.newt}/newt.driver.win.jar" />
-        <property name="newt.driver.macosx.jar"         value="${build.newt}/newt.driver.macosx.jar" />
-        <property name="newt.driver.android.jar"        value="${build.newt}/newt.driver.android.jar" />     <!-- excluded from all -->
-        <property name="newt.driver.kd.jar"             value="${build.newt}/newt.driver.kd.jar" />          <!-- excluded from all -->
-        <property name="newt.driver.intelgdl.jar"       value="${build.newt}/newt.driver.intelgdl.jar" />    <!-- excluded from all -->
-        <property name="newt.driver.broadcomegl.jar"    value="${build.newt}/newt.driver.broadcomegl.jar" /> <!-- excluded from all -->
+            ${jogl-core.jar} ${jogl-glutess.jar} ${jogl-glumipmap.jar} ${jogl-glu-gldesktop.jar} ${jogl-os-x11.jar} ${jogl-os-win.jar} ${jogl-os-osx.jar} ${jogl-gldesktop.jar} ${jogl-gldesktop-dbg.jar} ${jogl-glmobile.jar} ${jogl-glmobile-dbg.jar} ${jogl-omx.jar} ${jogl-util.jar} ${jogl-util-gldesktop.jar} ${jogl-util-awt.jar} ${jogl-util-fixedfuncemu.jar} ${jogl-sdk.jar} -->
+
+        <property name="newt-core.jar"                  value="${build.newt}/newt-core.jar" />
+        <property name="newt-ogl.jar"                   value="${build.newt}/newt-ogl.jar" />
+        <property name="newt-awt.jar"                   value="${build.newt}/newt-awt.jar" />
+        <property name="newt-swt.jar"                   value="${build.newt}/newt-swt.jar" />
+        <property name="newt-event.jar"                 value="${build.newt}/newt-event.jar" />              <!-- using NEWT events w/o NEWT -->
+        <property name="newt-driver-x11.jar"            value="${build.newt}/newt-driver-x11.jar" />
+        <property name="newt-driver-win.jar"            value="${build.newt}/newt-driver-win.jar" />
+        <property name="newt-driver-osx.jar"            value="${build.newt}/newt-driver-osx.jar" />
+        <property name="newt-driver-android.jar"        value="${build.newt}/newt-driver-android.jar" />     <!-- excluded from all -->
+        <property name="newt-driver-kd.jar"             value="${build.newt}/newt-driver-kd.jar" />          <!-- excluded from all -->
+        <property name="newt-driver-intelgdl.jar"       value="${build.newt}/newt-driver-intelgdl.jar" />    <!-- excluded from all -->
+        <property name="newt-driver-broadcomegl.jar"    value="${build.newt}/newt-driver-broadcomegl.jar" /> <!-- excluded from all -->
         <path id="newt_all_atoms.classpath">
-            <pathelement location="${newt.core.jar}" />
-            <pathelement location="${newt.ogl.jar}" />
-            <pathelement location="${newt.awt.jar}" />
-            <pathelement location="${newt.driver.x11.jar}" />
-            <pathelement location="${newt.driver.win.jar}" />
-            <pathelement location="${newt.driver.macosx.jar}" />
+            <pathelement location="${newt-core.jar}" />
+            <pathelement location="${newt-ogl.jar}" />
+            <pathelement location="${newt-awt.jar}" />
+            <pathelement location="${newt-swt.jar}" />
+            <pathelement location="${newt-driver-x11.jar}" />
+            <pathelement location="${newt-driver-win.jar}" />
+            <pathelement location="${newt-driver-osx.jar}" />
         </path>
         <path id="newt_all-noawt_atoms.classpath">
-            <pathelement location="${newt.core.jar}" />
-            <pathelement location="${newt.ogl.jar}" />
-            <pathelement location="${newt.driver.x11.jar}" />
-            <pathelement location="${newt.driver.win.jar}" />
-            <pathelement location="${newt.driver.macosx.jar}" />
+            <pathelement location="${newt-core.jar}" />
+            <pathelement location="${newt-ogl.jar}" />
+            <pathelement location="${newt-driver-x11.jar}" />
+            <pathelement location="${newt-driver-win.jar}" />
+            <pathelement location="${newt-driver-osx.jar}" />
         </path>
         <path id="newt_all-mobile_atoms.classpath">
-            <pathelement location="${newt.core.jar}" />
-            <pathelement location="${newt.ogl.jar}" />
-            <pathelement location="${newt.driver.x11.jar}" />
-            <pathelement location="${newt.driver.win.jar}" />
+            <pathelement location="${newt-core.jar}" />
+            <pathelement location="${newt-ogl.jar}" />
+            <pathelement location="${newt-driver-x11.jar}" />
+            <pathelement location="${newt-driver-win.jar}" />
         </path>
         <path id="newt_all-android_atoms.classpath">
-            <pathelement location="${newt.core.jar}" />
-            <pathelement location="${newt.ogl.jar}" />
-            <pathelement location="${newt.driver.android.jar}" />
+            <pathelement location="${newt-core.jar}" />
+            <pathelement location="${newt-ogl.jar}" />
+            <pathelement location="${newt-driver-android.jar}" />
         </path>
 
         <!-- JavaSE combinations -->
         <property name="gluegen-rt.jar"                 value="${build.gluegen}/gluegen-rt.jar" />
         <property name="gluegen-rt-android.jar"         value="${build.gluegen}/gluegen-rt-android.jar" />
-        <property name="jogl.test.jar"                  value="${jar}/jogl.test.jar"/>
-        <property name="jogl.test-android.jar"          value="${jar}/jogl.test-android.jar"/>
-        <property name="jogl.test-android.apk"          value="${jar}/jogl.test-android.apk"/>
+        <property name="jogl-test.jar"                  value="${jar}/jogl-test.jar"/>
+        <property name="jogl-test-android.jar"          value="${jar}/jogl-test-android.jar"/>
+        <property name="jogl-test-android.apk"          value="${jar}/jogl-test-android.apk"/>
 
         <!-- JavaSE combinations . AWT -->
-        <property name="jogl.all.jar"                   value="${jar}/jogl.all.jar" />
+        <property name="jogl-all.jar"                   value="${jar}/jogl-all.jar" />
 
         <!-- JavaSE combinations . NO.AWT -->
-        <property name="jogl.all-noawt.jar"             value="${jar}/jogl.all-noawt.jar" />
-        <property name="jogl.all-mobile.jar"            value="${jar}/jogl.all-mobile.jar" />
-        <property name="jogl.all-android.jar"           value="${jar}/jogl.all-android.jar" />
-        <property name="jogl.all-android.apk"           value="${jar}/jogl.all-android-${android.abi}.apk" />
+        <property name="jogl-all-noawt.jar"             value="${jar}/jogl-all-noawt.jar" />
+        <property name="jogl-all-mobile.jar"            value="${jar}/jogl-all-mobile.jar" />
+        <property name="jogl-all-android.jar"           value="${jar}/jogl-all-android.jar" />
+        <property name="jogl-all-android.apk"           value="${jar}/jogl-all-android-${android.abi}.apk" />
 
         <path id="swt_gluegen.classpath">
             <pathelement location="${gluegen-rt.jar}" />
@@ -469,7 +472,7 @@
             <path refid="nativewindow_all_atoms.classpath" />
             <path refid="jogl_all_atoms.classpath" />
             <path refid="newt_all_atoms.classpath" />
-            <pathelement location="${newt.driver.android.jar}" />
+            <pathelement location="${newt-driver-android.jar}" />
         </path>
 
         <!-- Postbuild: javadoc .. -->
@@ -477,7 +480,7 @@
             <pathelement location="${android.jar}" />
             <pathelement location="${gluegen-rt.jar}" />
             <pathelement location="${swt.jar}" />
-            <pathelement location="${jogl.all.jar}" />
+            <pathelement location="${jogl-all.jar}" />
         </path>
 
         <!-- Test Run w/ AWT .. -->
@@ -486,12 +489,12 @@
             <pathelement location="${ant.jar}" />
             <pathelement location="${ant-junit.jar}" />
             <pathelement location="${gluegen-rt.jar}" />
-            <pathelement location="${jogl.all.jar}" />
-            <pathelement location="${jogl.test.jar}" />
+            <pathelement location="${jogl-all.jar}" />
+            <pathelement location="${jogl-test.jar}" />
         </path>
         <property name="junit_jogl_awt.run.jars"
-                  value="${junit.jar}${path.separator}${ant.jar}${path.separator}${ant-junit.jar}${path.separator}${gluegen-rt.jar}${path.separator}${jogl.all.jar}${path.separator}${jogl.test.jar}"/>
-        <property name="junit_jogl_awt.run.remote.jars" value="${junit.jar}${path.separator}${env.TARGET_ANT_HOME}/lib/ant.jar${path.separator}${env.TARGET_ANT_HOME}/lib/ant-junit.jar${path.separator}${gluegen-rt.jar}${path.separator}${jogl.all.jar}${path.separator}${jogl.test.jar}"/>
+                  value="${junit.jar}${path.separator}${ant.jar}${path.separator}${ant-junit.jar}${path.separator}${gluegen-rt.jar}${path.separator}${jogl-all.jar}${path.separator}${jogl-test.jar}"/>
+        <property name="junit_jogl_awt.run.remote.jars" value="${junit.jar}${path.separator}${env.TARGET_ANT_HOME}/lib/ant.jar${path.separator}${env.TARGET_ANT_HOME}/lib/ant-junit.jar${path.separator}${gluegen-rt.jar}${path.separator}${jogl-all.jar}${path.separator}${jogl-test.jar}"/>
 
         <!-- Test Run w/o AWT .. -->
         <path id="junit_jogl_noawt.run.classpath">
@@ -499,12 +502,12 @@
             <pathelement location="${ant.jar}" />
             <pathelement location="${ant-junit.jar}" />
             <pathelement location="${gluegen-rt.jar}" />
-            <pathelement location="${jogl.all-noawt.jar}" />
-            <pathelement location="${jogl.test.jar}" />
+            <pathelement location="${jogl-all-noawt.jar}" />
+            <pathelement location="${jogl-test.jar}" />
         </path>
         <property name="junit_jogl_noawt.run.jars"
-                  value="${junit.jar}${path.separator}${ant.jar}${path.separator}${ant-junit.jar}${path.separator}${gluegen-rt.jar}${path.separator}${jogl.all-noawt.jar}${path.separator}${jogl.test.jar}"/>
-        <property name="junit_jogl_noawt.run.remote.jars" value="${junit.jar}${path.separator}${env.TARGET_ANT_HOME}/lib/ant.jar${path.separator}${env.TARGET_ANT_HOME}/lib/ant-junit.jar${path.separator}${gluegen-rt.jar}${path.separator}${jogl.all-noawt.jar}${path.separator}${jogl.test.jar}"/>
+                  value="${junit.jar}${path.separator}${ant.jar}${path.separator}${ant-junit.jar}${path.separator}${gluegen-rt.jar}${path.separator}${jogl-all-noawt.jar}${path.separator}${jogl-test.jar}"/>
+        <property name="junit_jogl_noawt.run.remote.jars" value="${junit.jar}${path.separator}${env.TARGET_ANT_HOME}/lib/ant.jar${path.separator}${env.TARGET_ANT_HOME}/lib/ant-junit.jar${path.separator}${gluegen-rt.jar}${path.separator}${jogl-all-noawt.jar}${path.separator}${jogl-test.jar}"/>
 
         <!-- Test Run w/ SWT .. -->
         <path id="junit_jogl_swt.run.classpath">
@@ -513,11 +516,11 @@
           <pathelement location="${ant-junit.jar}" />
           <pathelement location="${gluegen-rt.jar}" />
           <pathelement location="${swt.jar}" />
-          <pathelement location="${jogl.all.jar}" />
-          <pathelement location="${jogl.test.jar}" />
+          <pathelement location="${jogl-all.jar}" />
+          <pathelement location="${jogl-test.jar}" />
         </path>
         <property name="junit_jogl_swt.run.jars"
-                  value="${junit.jar}${path.separator}${ant.jar}${path.separator}${ant-junit.jar}${path.separator}${gluegen-rt.jar}${path.separator}${swt.jar}${path.separator}${jogl.all.jar}${path.separator}${jogl.test.jar}"/>
+                  value="${junit.jar}${path.separator}${ant.jar}${path.separator}${ant-junit.jar}${path.separator}${gluegen-rt.jar}${path.separator}${swt.jar}${path.separator}${jogl-all.jar}${path.separator}${jogl-test.jar}"/>
 
         <!-- Test Run w/ Android [w/o AWT] .. -->
         <path id="junit_jogl_android.run.classpath">
@@ -526,13 +529,13 @@
             <pathelement location="${ant-junit.jar}" />
             <pathelement location="${android.jar}" />
             <pathelement location="${gluegen-rt-android.jar}" />
-            <pathelement location="${jogl.all-android.jar}" />
-            <pathelement location="${jogl.test.jar}" />
+            <pathelement location="${jogl-all-android.jar}" />
+            <pathelement location="${jogl-test.jar}" />
         </path>
         <property name="junit_jogl_android.run.jars"
-                  value="${junit.jar}${path.separator}${ant.jar}${path.separator}${ant-junit.jar}${path.separator}${gluegen-rt-android.jar}${path.separator}${jogl.all-android.jar}${path.separator}${jogl.test.jar}"/>
+                  value="${junit.jar}${path.separator}${ant.jar}${path.separator}${ant-junit.jar}${path.separator}${gluegen-rt-android.jar}${path.separator}${jogl-all-android.jar}${path.separator}${jogl-test.jar}"/>
         <property name="junit.run.remote.apks" 
-                  value="${gluegen.root}/${rootrel.build}/jogamp.android-launcher.apk${path.separator}${ant-junit-all.apk}${path.separator}${gluegen.root}/${rootrel.build}/gluegen-rt-android-${android.abi}.apk${path.separator}${jogl.all-android.apk}${path.separator}${jogl.test.apk}"/>
+                  value="${gluegen.root}/${rootrel.build}/jogamp.android-launcher.apk${path.separator}${ant-junit-all.apk}${path.separator}${gluegen.root}/${rootrel.build}/gluegen-rt-android-${android.abi}.apk${path.separator}${jogl-all-android.apk}${path.separator}${jogl-test.apk}"/>
 
         <!-- Dummy extra CLASSPATH value, maybe overwritten -->  
         <property name="junit_extra_classpath" value=""/>
diff --git a/make/build-jogl.xml b/make/build-jogl.xml
index 0c7328c..2605104 100644
--- a/make/build-jogl.xml
+++ b/make/build-jogl.xml
@@ -1550,7 +1550,7 @@
             <srcfileset dir="${src.java}"
                      includes="${java.part.nonjava}"/>
             <targetfileset dir="."
-                     includes="${jogl.util.jar} ${jogl.util.fixedfuncemu.jar}" />
+                     includes="${jogl-util.jar} ${jogl-util-fixedfuncemu.jar}" />
         </dependset>
     </target>
     <target name="build-jars" depends="build-jars-dependset,build-jars-javase" />
@@ -1570,48 +1570,48 @@
     </target>
 
     <target name="build-jars-os-desktop-javase" depends="setup-manifestfile">
-        <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl.os.x11.jar}" filesonly="true">
+        <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl-os-x11.jar}" filesonly="true">
             <fileset dir="${classes}" includes="${java.part.glx}"/>
         </jar>
-        <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl.os.win.jar}" filesonly="true">
+        <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl-os-win.jar}" filesonly="true">
             <fileset dir="${classes}" includes="${java.part.wgl}" />
         </jar>
-        <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl.os.osx.jar}" filesonly="true">
+        <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl-os-osx.jar}" filesonly="true">
             <fileset dir="${classes}" includes="${java.part.cgl}"/>
         </jar>
     </target>
 
     <target name="build-jars-android" depends="setup-manifestfile" if="isAndroid">
-        <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl.os.android.jar}" filesonly="true">
+        <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl-os-android.jar}" filesonly="true">
             <fileset dir="${classes}" includes="${java.part.android}"/>
         </jar>
     </target>
 
     <target name="build-jars-mobile-javase" depends="setup-manifestfile">
-        <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl.glmobile.jar}" filesonly="true">
+        <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl-glmobile.jar}" filesonly="true">
             <fileset dir="${classes}"
                      includes="${java.part.egl} ${java.part.es1} ${java.part.es2}"
                      excludes="${java.part.awt} ${java.part.swt} ${java.part.es1.dbg} ${java.part.es2.dbg}"/>
         </jar>
-        <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl.glmobile.dbg.jar}" filesonly="true">
+        <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl-glmobile-dbg.jar}" filesonly="true">
             <fileset dir="${classes}"
                      includes="${java.part.es1.dbg} ${java.part.es2.dbg}"/>
         </jar>
     </target>
 
     <target name="build-jars-awt-javase" depends="setup-manifestfile" unless="setup.noAWT">
-        <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl.awt.jar}" filesonly="true">
+        <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl-awt.jar}" filesonly="true">
             <fileset dir="${classes}"
                      includes="${java.part.awt}" />
         </jar>
-        <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl.util.awt.jar}" filesonly="true">
+        <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl-util-awt.jar}" filesonly="true">
             <fileset dir="${classes}"
                      includes="${java.part.util.awt}"/>
         </jar>
     </target>
 
     <target name="build-jars-swt-javase" depends="setup-manifestfile" unless="setup.noSWT">
-        <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl.swt.jar}" filesonly="true">
+        <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl-swt.jar}" filesonly="true">
             <fileset dir="${classes}"
                      includes="${java.part.swt}" />
         </jar>
@@ -1619,22 +1619,22 @@
 
     <target name="build-jars-desktop-javase" depends="setup-manifestfile,build-jars-os-desktop-javase">
         <!--os specific gldesktop-->
-        <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl.gldesktop.jar}" filesonly="true">
+        <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl-gldesktop.jar}" filesonly="true">
             <fileset dir="${classes}"
                      includes="${java.part.gldesktop}"
                      excludes="${java.part.gldesktop.dbg} ${java.part.glugldesktop}"/>
         </jar>
 
         <!-- misc -->
-        <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl.gldesktop.dbg.jar}" filesonly="true">
+        <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl-gldesktop-dbg.jar}" filesonly="true">
             <fileset dir="${classes}"
                      includes="${java.part.gldesktop.dbg}"/>
         </jar>
-        <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl.glugldesktop.jar}" filesonly="true">
+        <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl-glu-gldesktop.jar}" filesonly="true">
             <fileset dir="${classes}"
                      includes="${java.part.glugldesktop}"/>
         </jar>
-        <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl.util.gldesktop.jar}" filesonly="true">
+        <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl-util-gldesktop.jar}" filesonly="true">
             <fileset dir="${classes}"
                      includes="${java.part.util.gldesktop}"
                      excludes="${java.part.awt} ${java.part.util.awt} ${java.part.swt}"/>
@@ -1643,38 +1643,38 @@
 
     <target name="build-jars-javase" depends="setup-manifestfile, build-jars-android, build-jars-mobile-javase, 
                                               build-jars-desktop-javase, build-jars-awt-javase, build-jars-swt-javase">
-        <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl.core.jar}" filesonly="true">
+        <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl-core.jar}" filesonly="true">
             <fileset dir="${classes}"
                      includes="${java.part.core}"
                      excludes="${java.part.core.exclude}"/>
         </jar>
-        <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl.sdk.jar}" filesonly="true">
+        <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl-sdk.jar}" filesonly="true">
             <fileset dir="${classes}"
                      includes="${java.part.sdk}"/>
         </jar>
-        <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl.glutess.jar}" filesonly="true">
+        <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl-glutess.jar}" filesonly="true">
             <fileset dir="${classes}"
                      includes="${java.part.glutess}"/>
         </jar>
-        <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl.glumipmap.jar}" filesonly="true">
+        <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl-glumipmap.jar}" filesonly="true">
             <fileset dir="${classes}"
                      includes="${java.part.glumipmap}"/>
         </jar>
-        <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl.util.jar}" filesonly="true">
+        <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl-util.jar}" filesonly="true">
             <fileset dir="${classes}"
                      includes="${java.part.util} ${java.part.util.glsl} ${java.part.util.graph}"
                      excludes="${java.part.util.awt} ${java.part.util.gldesktop} ${java.part.util.fixedfuncemu}"/>
             <fileset dir="resources/assets" includes="jogl/util/**" />
         </jar>
-        <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl.util.fixedfuncemu.jar}" filesonly="true">
+        <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl-util-fixedfuncemu.jar}" filesonly="true">
             <fileset dir="${classes}"
                      includes="${java.part.util.fixedfuncemu}"/>
         </jar>
-        <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl.omx.jar}" filesonly="true">
+        <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl-omx.jar}" filesonly="true">
             <fileset dir="${classes}"
                      includes="${java.part.openmax}"/>
         </jar>
-        <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl.cg.jar}" filesonly="true">
+        <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl-cg.jar}" filesonly="true">
             <fileset dir="${classes}"
                      includes="${java.part.nv-cg}"/>
         </jar>
@@ -1684,7 +1684,7 @@
               <exclude name="*jogl_cg.${native.library.suffix}" />
             </fileset>
         </jar>
-        <jar manifest="${build.jogl}/manifest.mf" destfile="${build.jogl}/jogl_cg-natives-${os.and.arch}.jar" filesonly="true">
+        <jar manifest="${build.jogl}/manifest.mf" destfile="${build.jogl}/jogl-cg-natives-${os.and.arch}.jar" filesonly="true">
             <fileset dir="${obj.jogl}">
               <include name="*jogl_cg.${native.library.suffix}" />
             </fileset>
diff --git a/make/build-nativewindow.xml b/make/build-nativewindow.xml
index 2331088..c77558d 100644
--- a/make/build-nativewindow.xml
+++ b/make/build-nativewindow.xml
@@ -820,7 +820,7 @@
     </target>
 
     <target name="build-jars-awt" depends="setup-manifestfile" unless="setup.noAWT">
-        <jar manifest="${build.nativewindow}/manifest.mf" destfile="${nativewindow.awt.jar}" filesonly="true">
+        <jar manifest="${build.nativewindow}/manifest.mf" destfile="${nativewindow-awt.jar}" filesonly="true">
             <fileset dir="${classes}"
                      includes="${java.part.awt}"
                      excludes="${java.excludes.awt}"/>
@@ -828,28 +828,28 @@
     </target>
 
     <target name="build-jars-x11" depends="setup-manifestfile">
-        <jar manifest="${build.nativewindow}/manifest.mf" destfile="${nativewindow.os.x11.jar}" filesonly="true">
+        <jar manifest="${build.nativewindow}/manifest.mf" destfile="${nativewindow-os-x11.jar}" filesonly="true">
             <fileset dir="${classes}"
                      includes="${java.part.x11}" />
         </jar>
     </target>
 
     <target name="build-jars-windows" depends="setup-manifestfile">
-        <jar manifest="${build.nativewindow}/manifest.mf" destfile="${nativewindow.os.win.jar}" filesonly="true">
+        <jar manifest="${build.nativewindow}/manifest.mf" destfile="${nativewindow-os-win.jar}" filesonly="true">
             <fileset dir="${classes}"
                      includes="${java.part.windows}" />
         </jar>
     </target>
 
     <target name="build-jars-macosx" depends="setup-manifestfile">
-        <jar manifest="${build.nativewindow}/manifest.mf" destfile="${nativewindow.os.macosx.jar}" filesonly="true">
+        <jar manifest="${build.nativewindow}/manifest.mf" destfile="${nativewindow-os-osx.jar}" filesonly="true">
             <fileset dir="${classes}"
                      includes="${java.part.macosx}" />
         </jar>
     </target>
 
     <target name="build-jars-javase" depends="setup-manifestfile,build-jars-awt,build-jars-x11,build-jars-windows,build-jars-macosx">
-        <jar manifest="${build.nativewindow}/manifest.mf" destfile="${nativewindow.core.jar}" filesonly="true">
+        <jar manifest="${build.nativewindow}/manifest.mf" destfile="${nativewindow-core.jar}" filesonly="true">
             <fileset dir="${classes}"
                      includes="${java.part.core}"
                      excludes="${java.part.awt} ${java.part.x11} ${java.part.windows}"/>
diff --git a/make/build-newt.xml b/make/build-newt.xml
index 695c86d..7767088 100644
--- a/make/build-newt.xml
+++ b/make/build-newt.xml
@@ -107,6 +107,9 @@
         <property name="java.part.awt"
                   value="com/jogamp/newt/awt/** com/jogamp/newt/event/awt/** jogamp/newt/awt/** ${java.part.driver.awt}"/>
 
+        <property name="java.part.swt"
+                  value="com/jogamp/newt/swt/**"/>
+
         <property name="java.part.driver.x11"
                   value="jogamp/newt/driver/x11/**"/>
 
@@ -135,11 +138,16 @@
            <isset property="setup.noAWT"/>
         </condition>
 
+        <condition property="java.excludes.swt"
+                   value="${java.part.swt}">
+           <isset property="setup.noSWT"/> 
+        </condition>
+
         <condition property="java.excludes.opengl" value="${java.part.opengl}">
            <isset property="setup.noOpenGL"/>
         </condition>
 
-        <property name="java.excludes.all" value="${java.excludes.awt}, ${java.excludes.opengl}" />
+        <property name="java.excludes.all" value="${java.excludes.awt}, ${java.excludes.swt}, ${java.excludes.opengl}" />
         <echo message="java.excludes.all: ${java.excludes.all}" />
 
     </target>
@@ -701,52 +709,59 @@
     </target>
 
     <target name="build-jars-awt" depends="setup-manifestfile" unless="setup.noAWT">
-        <jar manifest="${build.newt}/manifest.mf" destfile="${newt.awt.jar}" filesonly="true">
+        <jar manifest="${build.newt}/manifest.mf" destfile="${newt-awt.jar}" filesonly="true">
             <fileset dir="${classes}"
                      includes="${java.part.awt}"/>
         </jar>
     </target>
 
+    <target name="build-jars-swt" depends="setup-manifestfile" unless="setup.noSWT">
+        <jar manifest="${build.newt}/manifest.mf" destfile="${newt-swt.jar}" filesonly="true">
+            <fileset dir="${classes}"
+                     includes="${java.part.swt}"/>
+        </jar>
+    </target>
+
     <target name="build-jars-opengl" depends="setup-manifestfile" unless="setup.noOpenGL">
-        <jar manifest="${build.newt}/manifest.mf" destfile="${newt.ogl.jar}" filesonly="true">
+        <jar manifest="${build.newt}/manifest.mf" destfile="${newt-ogl.jar}" filesonly="true">
             <fileset dir="${classes}"
                      includes="${java.part.opengl}"/>
         </jar>
     </target>
 
     <target name="build-jars-driver" depends="setup-manifestfile">
-        <jar manifest="${build.newt}/manifest.mf" destfile="${newt.driver.x11.jar}" filesonly="true">
+        <jar manifest="${build.newt}/manifest.mf" destfile="${newt-driver-x11.jar}" filesonly="true">
             <fileset dir="${classes}"
                      includes="${java.part.driver.x11}"/>
         </jar>
-        <jar manifest="${build.newt}/manifest.mf" destfile="${newt.driver.win.jar}" filesonly="true">
+        <jar manifest="${build.newt}/manifest.mf" destfile="${newt-driver-win.jar}" filesonly="true">
             <fileset dir="${classes}"
                      includes="${java.part.driver.windows}"/>
         </jar>
-        <jar manifest="${build.newt}/manifest.mf" destfile="${newt.driver.macosx.jar}" filesonly="true">
+        <jar manifest="${build.newt}/manifest.mf" destfile="${newt-driver-osx.jar}" filesonly="true">
             <fileset dir="${classes}"
                      includes="${java.part.driver.macosx}"/>
         </jar>
-        <jar manifest="${build.newt}/manifest.mf" destfile="${newt.driver.kd.jar}" filesonly="true">
+        <jar manifest="${build.newt}/manifest.mf" destfile="${newt-driver-kd.jar}" filesonly="true">
             <fileset dir="${classes}"
                      includes="${java.part.driver.kd}"/>
         </jar>
-        <jar manifest="${build.newt}/manifest.mf" destfile="${newt.driver.broadcomegl.jar}" filesonly="true">
+        <jar manifest="${build.newt}/manifest.mf" destfile="${newt-driver-broadcomegl.jar}" filesonly="true">
             <fileset dir="${classes}"
                      includes="${java.part.driver.broadcomegl}"/>
         </jar>
-        <jar manifest="${build.newt}/manifest.mf" destfile="${newt.driver.intelgdl.jar}" filesonly="true">
+        <jar manifest="${build.newt}/manifest.mf" destfile="${newt-driver-intelgdl.jar}" filesonly="true">
             <fileset dir="${classes}"
                      includes="${java.part.driver.intelgdl}"/>
         </jar>
     </target>
 
-    <target name="build-jars-javase" depends="setup-manifestfile,build-jars-opengl,build-jars-awt,build-jars-driver">
-        <jar manifest="${build.newt}/manifest.mf" destfile="${newt.core.jar}" filesonly="true">
+    <target name="build-jars-javase" depends="setup-manifestfile,build-jars-opengl,build-jars-awt,build-jars-swt,build-jars-driver">
+        <jar manifest="${build.newt}/manifest.mf" destfile="${newt-core.jar}" filesonly="true">
             <fileset dir="${classes}"
                      includes="${java.part.core}"/>
         </jar>
-        <jar manifest="${build.newt}/manifest.mf" destfile="${newt.event.jar}" filesonly="true">
+        <jar manifest="${build.newt}/manifest.mf" destfile="${newt-event.jar}" filesonly="true">
             <fileset dir="${classes}">
                 <include name="com/jogamp/newt/Display*" />
                 <include name="com/jogamp/newt/Screen*" />
@@ -759,7 +774,7 @@
     </target>
 
     <target name="build-jars-android" depends="setup-manifestfile" if="isAndroid">
-        <jar manifest="${build.newt}/manifest.mf" destfile="${newt.driver.android.jar}" filesonly="true">
+        <jar manifest="${build.newt}/manifest.mf" destfile="${newt-driver-android.jar}" filesonly="true">
             <fileset dir="${classes}"
                      includes="${java.part.driver.android}"/>
         </jar>
diff --git a/make/build-test.xml b/make/build-test.xml
index f543790..f295ae3 100644
--- a/make/build-test.xml
+++ b/make/build-test.xml
@@ -51,7 +51,7 @@
             <fileset dir="." includes="*.png" />
             <fileset dir="." includes="*.pam" />
             <fileset dir="." includes="*.tga" />
-            <fileset file="${jogl.test.jar}" />
+            <fileset file="${jogl-test.jar}" />
         </delete>
     </target>
 
@@ -85,7 +85,7 @@
             </filterset>
         </copy>
 
-        <jar manifest="${build.test}/manifest-test.mf" destfile="${jogl.test.jar}" filesonly="true">
+        <jar manifest="${build.test}/manifest-test.mf" destfile="${jogl-test.jar}" filesonly="true">
             <!-- get all class files, but skip any resource files that external tools
                  might have copied into the class directory (otherwise, it's possible
                  to get the same resource file twice in the jar) -->
@@ -121,7 +121,7 @@
             </filterset>
         </copy>
 
-        <jar manifest="${build.test}/manifest-test-android.mf" destfile="${jogl.test-android.jar}" filesonly="true">
+        <jar manifest="${build.test}/manifest-test-android.mf" destfile="${jogl-test-android.jar}" filesonly="true">
             <!-- get all class files, but skip any resource files that external tools
                  might have copied into the class directory (otherwise, it's possible
                  to get the same resource file twice in the jar) -->
@@ -134,7 +134,7 @@
             assetsdir="resources/assets-test"
             jarsrcdir="${src}/test"
             jarbuilddir="${jar}"
-            jarbasename="jogl.test-android"
+            jarbasename="jogl-test-android"
             nativebuilddir="${lib}"
             nativebasename="non-existing"
             androidmanifest.path="resources/android/AndroidManifest-test.xml"
@@ -149,8 +149,8 @@
       <mkdir dir="${obj.test}" />
       <mkdir dir="${classes}" />
 
-      <property name="jogl.test.jar.path" location="${jogl.test.jar}"/> <!-- absolute path -->
-      <echo message="jogl.test.jar ${jogl.test.jar.path}"/>
+      <property name="jogl-test.jar.path" location="${jogl-test.jar}"/> <!-- absolute path -->
+      <echo message="jogl-test.jar ${jogl-test.jar.path}"/>
       <uptodate property="test.compile.skip">
         <srcfiles dir= "."                 includes="*.xml"/>
         <srcfiles dir= "${src.test}"       includes="**"/>
@@ -159,7 +159,7 @@
         <srcfiles                          dir="${src}/nativewindow" />
         <srcfiles                          dir="${src}/jogl" />
         <srcfiles                          dir="${src}/newt" />
-        <mapper type="merge" to="${jogl.test.jar.path}"/>
+        <mapper type="merge" to="${jogl-test.jar.path}"/>
       </uptodate>
     </target>
 
@@ -427,7 +427,7 @@
     </target>
 
     <target name="junit.run.swt.headless" depends="test.compile" description="Runs all pure SWT tests." if="isSWTRuntimeAvailable">
-        <!-- Test*SWT* 
+        <!-- Test*SWTHeadless* 
 
              Emulation of junit task.
 
@@ -436,10 +436,8 @@
         <for param="test.class.path.m" keepgoing="true">
             <!-- results in absolute path -->
             <fileset dir="${classes}">
-                <include name="${java.dir.junit}/**/Test*SWT*"/>
+                <include name="${java.dir.junit}/**/Test*SWTHeadless*"/>
                 <exclude name="**/*$$*"/>
-                <exclude name="**/*AWT*"/>
-                <exclude name="**/newt/**"/>
             </fileset>
           <sequential>
             <var name="test.class.path" unset="true"/>
@@ -491,40 +489,71 @@
         </for>
     </target>
 
-    <target name="junit.run.swt.awt" depends="test.compile" description="Runs all SWT AWT tests." if="isSWTRuntimeAvailable">
-      <!-- Test*SWT*AWT* -->
-      <junit forkmode="perTest" showoutput="true" fork="true" haltonerror="off" timeout="${batchtest.timeout}">
-          <env key="${system.env.library.path}" path="${obj.all.paths}"/>
-          <jvmarg value="${junit.run.arg0}"/>
-          <jvmarg value="${junit.run.arg1}"/>
-          <jvmarg value="${jvmDataModel.arg}"/>
-          <jvmarg value="-Djava.library.path=${obj.all.paths}"/>
-
-          <!--
-          <jvmarg value="-Djogl.debug=all"/>
-          <jvmarg value="-Dgluegen.debug.NativeLibrary=true"/>
-          <jvmarg value="-Dgluegen.debug.ProcAddressHelper=true"/>
-          <jvmarg value="-Djogl.debug.GLSLState"/>
-          <jvmarg value="-Dnativewindow.debug=all"/>
-          <jvmarg value="-verbose:jni"/> 
-          <jvmarg value="-client"/>
-          <jvmarg value="-d32"/>
-          -->
-
-          <formatter usefile="false" type="plain"/>
-          <formatter usefile="true" type="xml"/>
-          <classpath path="${junit_extra_classpath}${junit_jogl_swt.run.jars}"/>
-
-          <batchtest todir="${results.test}">
+    <target name="junit.run.swt.awt" depends="test.compile" description="Runs all pure SWT AWT tests." if="isSWTRuntimeAvailable">
+        <!-- Test*SWT* 
+
+             Emulation of junit task.
+
+             Utilizing Ant-1.8.0 and ant-contrib-1.0b3 (loops, mutable properties).
+          --> 
+        <for param="test.class.path.m" keepgoing="true">
+            <!-- results in absolute path -->
             <fileset dir="${classes}">
-                <include name="${java.dir.junit}/**/Test*SWT*AWT*"/>
+                <include name="${java.dir.junit}/**/Test*SWT*"/>
                 <exclude name="**/*$$*"/>
-                <exclude name="**/newt/**"/>
+                <exclude name="**/Test*SWTHeadless*"/>
             </fileset>
-            <formatter usefile="false" type="brief"/>
-            <formatter usefile="true" type="xml"/>
-          </batchtest>
-      </junit>
+          <sequential>
+            <var name="test.class.path" unset="true"/>
+            <property name="test.class.path" basedir="${classes}" relative="true" location="@{test.class.path.m}"/>
+            <var name="test.class.fqn" unset="true"/>
+            <pathconvert property="test.class.fqn">
+              <fileset file="${classes}${file.separator}${test.class.path}"/>
+              <chainedmapper>
+                  <globmapper    from="${classes.path}${file.separator}*" to="*"/> <!-- rel. -->
+                  <packagemapper from="*.class"           to="*"/> <!-- FQCN -->
+              </chainedmapper>
+            </pathconvert>
+            <var name="test.class.result.file" value="${results.test}/TEST-${test.class.fqn}.xml"/>
+            <echo message="Testing ${test.class.fqn} -- ${test.class.result.file}"/>
+            <apply dir="." executable="${java.home}/bin/java" 
+                 parallel="false" 
+                 timeout="${batchtest.timeout}"
+                 vmlauncher="false"
+                 relative="true"
+                 failonerror="false">
+                <env key="${system.env.library.path}" path="${obj.all.paths}"/>
+                <env key="CLASSPATH" value="${junit_extra_classpath}${junit_jogl_swt.run.jars}"/>
+                <arg line="${junit.run.arg0}"/>
+                <arg line="${junit.run.arg1}"/>
+                <arg line="${jvmDataModel.arg}"/>
+                <arg value="-Djava.library.path=${obj.all.paths}"/>
+                <arg line="${jvmarg.mainthrd}"/>
+                <!--
+                <arg line="-Dnewt.debug.EDT"/>
+                <arg line="-Dnativewindow.debug=all"/>
+                <arg line="-Djogl.debug=all"/>
+                <arg line="-Dnewt.debug=all"/>
+                -->
+                <!-- arg line="com.jogamp.newt.util.MainThread"/-->
+                <arg line="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner"/>
+                <srcfile/>
+                <arg line="filtertrace=true"/>
+                <arg line="haltOnError=false"/>
+                <arg line="haltOnFailure=false"/>
+                <arg line="showoutput=true"/>
+                <arg line="outputtoformatters=true"/>
+                <arg line="logfailedtests=true"/>
+                <arg line="logtestlistenerevents=true"/>
+                <arg line="formatter=org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResultFormatter"/>
+                <arg line="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.class.result.file}"/>
+                <mappedresources>
+                    <fileset dir="${classes}" includes="${test.class.path}"/>
+                    <packagemapper from="*.class" to="*"/>
+                </mappedresources>
+            </apply>
+          </sequential>
+        </for>
     </target>
 
     <target name="junit.run.newt.awt" depends="test.compile">
diff --git a/make/build.xml b/make/build.xml
index 9258df0..23aa218 100644
--- a/make/build.xml
+++ b/make/build.xml
@@ -99,7 +99,7 @@
     </target>
 
     <target name="one.jar.dir.android" depends="one.jar.dir.prep" if="isAndroid" unless="one.dir.skip">
-        <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl.all-android.jar}" filesonly="true" excludes="META-INF/*">
+        <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl-all-android.jar}" filesonly="true" excludes="META-INF/*">
             <archives>
                 <zips>
                     <path refid="nativewindow_core_atoms.classpath"/>
@@ -111,7 +111,7 @@
     </target>
 
     <target name="one.jar.dir" depends="one.jar.dir.prep,one.jar.dir.android" unless="one.dir.skip">
-        <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl.all.jar}" filesonly="true" excludes="META-INF/*">
+        <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl-all.jar}" filesonly="true" excludes="META-INF/*">
             <archives>
                 <zips>
                     <path refid="nativewindow_all_atoms.classpath"/>
@@ -120,7 +120,7 @@
                 </zips>
             </archives>
         </jar>
-        <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl.all-noawt.jar}" filesonly="true" excludes="META-INF/*">
+        <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl-all-noawt.jar}" filesonly="true" excludes="META-INF/*">
             <archives>
                 <zips>
                     <path refid="nativewindow_all-noawt_atoms.classpath"/>
@@ -129,7 +129,7 @@
                 </zips>
             </archives>
         </jar>
-        <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl.all-mobile.jar}" filesonly="true" excludes="META-INF/*">
+        <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl-all-mobile.jar}" filesonly="true" excludes="META-INF/*">
             <archives>
                 <zips>
                     <path refid="nativewindow_all-noawt_atoms.classpath"/>
@@ -147,8 +147,8 @@
     </target>
 
     <target name="android.package.jogl.skip.check" depends="init,gluegen.cpptasks.detect.os">
-      <uptodate property="android.package.jogl.skip" targetfile="${jogl.all-android.apk}">
-        <srcfiles dir="${jar}" includes="jogl.all-android.jar" />
+      <uptodate property="android.package.jogl.skip" targetfile="${jogl-all-android.apk}">
+        <srcfiles dir="${jar}" includes="jogl-all-android.jar" />
         <srcfiles dir="resources/android" includes="**" />
       </uptodate>
     </target>
@@ -158,7 +158,7 @@
             assetsdir="resources/assets"
             jarsrcdir="${src}/jogl/classes"
             jarbuilddir="${jar}"
-            jarbasename="jogl.all-android"
+            jarbasename="jogl-all-android"
             nativebuilddir="${lib}"
             nativebasename=""
             android.abi="${android.abi}"
@@ -173,12 +173,12 @@
       <uptodate property="one.dir.skip.native" targetfile="${jar}/jogl-all-natives-${os.and.arch}.jar">
         <srcfiles dir="${lib}" includes="*.${native.library.suffix}" />
       </uptodate>
-      <uptodate property="one.dir.skip.all" targetfile="${jogl.all.jar}">
+      <uptodate property="one.dir.skip.all" targetfile="${jogl-all.jar}">
         <srcfiles dir="${build.nativewindow}" includes="*.jar"/>
         <srcfiles dir="${build.jogl}" includes="*.jar"/>
         <srcfiles dir="${build.newt}" includes="*.jar"/>
       </uptodate>
-      <uptodate property="one.dir.skip.android" targetfile="${jogl.all-android.jar}">
+      <uptodate property="one.dir.skip.android" targetfile="${jogl-all-android.jar}">
         <srcfiles dir="${build.nativewindow}" includes="*.jar"/>
         <srcfiles dir="${build.jogl}" includes="*.jar"/>
         <srcfiles dir="${build.newt}" includes="*.jar"/>
diff --git a/make/config/jogl/gl-common.cfg b/make/config/jogl/gl-common.cfg
index 8af080e..9c54675 100644
--- a/make/config/jogl/gl-common.cfg
+++ b/make/config/jogl/gl-common.cfg
@@ -482,6 +482,19 @@ JavaPrologue glGetString    } */
 JavaPrologue glGetString  }
 
 #
+# Allow special FBO GLContext/GLDrawable to reset to it's
+# default FBO framebuffer.
+#
+JavaPrologue glBindFramebuffer  if( 0 == framebuffer ) {
+JavaPrologue glBindFramebuffer      if( GL_FRAMEBUFFER == target || 0x8CA9 /* GL_DRAW_FRAMEBUFFER */ == target ) {
+JavaPrologue glBindFramebuffer          framebuffer = _context.getDefaultDrawFramebuffer();
+JavaPrologue glBindFramebuffer      } else if( 0x8CA8 /* GL_READ_FRAMEBUFFER */ == target ) {
+JavaPrologue glBindFramebuffer          framebuffer = _context.getDefaultReadFramebuffer();
+JavaPrologue glBindFramebuffer      }
+JavaPrologue glBindFramebuffer  }
+JavaEpilogue glBindFramebuffer  _context.setBoundFramebuffer(target, framebuffer);
+
+#
 # Directives for Vertex Buffer Object and Pixel Buffer Object checking
 #
 # NOTE: we currently don't emit glue code for some of these but
diff --git a/make/config/jogl/gl-if-CustomJavaCode-gl.java b/make/config/jogl/gl-if-CustomJavaCode-gl.java
index 77378aa..9ea4f98 100644
--- a/make/config/jogl/gl-if-CustomJavaCode-gl.java
+++ b/make/config/jogl/gl-if-CustomJavaCode-gl.java
@@ -57,29 +57,3 @@
       earmarked for ES 3.0 (hence kept in GL while fixing Bug 590)  */
   public static final int GL_HALF_FLOAT = 0x140B;
 
-  public void glClearDepth( double depth );
-
-  public void glDepthRange(double zNear, double zFar);
-
-  /**
-   * @param target a GL buffer (VBO) target as used in {@link GL#glBindBuffer(int, int)}, ie {@link GL#GL_ELEMENT_ARRAY_BUFFER}, {@link GL#GL_ARRAY_BUFFER}, ..
-   * @return the GL buffer (VBO) name bound to a target via {@link GL#glBindBuffer(int, int)} or 0 if unbound.
-   */
-  public int glGetBoundBuffer(int target);
-
-  /**
-   * @param buffer a GL buffer name, generated with {@link GL#glGenBuffers(int, int[], int)} and used in {@link GL#glBindBuffer(int, int)}, {@link GL#glBufferData(int, long, java.nio.Buffer, int)} or {@link GL2#glNamedBufferDataEXT(int, long, java.nio.Buffer, int)} for example.
-   * @return the size of the given GL buffer
-   */
-  public long glGetBufferSize(int buffer);
-
-  /**
-   * @return true if a VBO is bound to {@link GL.GL_ARRAY_BUFFER} via {@link GL#glBindBuffer(int, int)}, otherwise false
-   */
-  public boolean glIsVBOArrayEnabled();
-
-  /**
-   * @return true if a VBO is bound to {@link GL.GL_ELEMENT_ARRAY_BUFFER} via {@link GL#glBindBuffer(int, int)}, otherwise false
-   */
-  public boolean glIsVBOElementArrayEnabled();
-
diff --git a/make/config/jogl/gl-impl-CustomJavaCode-common.java b/make/config/jogl/gl-impl-CustomJavaCode-common.java
index 2c3227e..b05ba26 100644
--- a/make/config/jogl/gl-impl-CustomJavaCode-common.java
+++ b/make/config/jogl/gl-impl-CustomJavaCode-common.java
@@ -1,68 +1,95 @@
+    @Override
     public GLProfile getGLProfile() {
         return this.glProfile;
     }
-    private GLProfile glProfile;
+    private final GLProfile glProfile;
 
-    public int glGetBoundBuffer(int target) {
+    @Override
+    public final int glGetBoundBuffer(int target) {
         return bufferStateTracker.getBoundBufferObject(target, this);
     }
 
-    public long glGetBufferSize(int buffer) {
+    @Override
+    public final long glGetBufferSize(int buffer) {
         return bufferSizeTracker.getDirectStateBufferSize(buffer, this);
     }
 
-    public boolean glIsVBOArrayEnabled() {
+    @Override
+    public final boolean glIsVBOArrayEnabled() {
         return checkArrayVBOEnabled(false);
     }
 
-    public boolean glIsVBOElementArrayEnabled() {
+    @Override
+    public final boolean glIsVBOElementArrayEnabled() {
         return checkElementVBOEnabled(false);
     }
 
+    @Override
     public final boolean isGL() {
         return true;
     }
       
+    @Override
     public final GL getGL() throws GLException {
         return this;
     }
 
-    public boolean isFunctionAvailable(String glFunctionName) {
+    @Override
+    public final boolean isFunctionAvailable(String glFunctionName) {
       return _context.isFunctionAvailable(glFunctionName);
     }
 
-    public boolean isExtensionAvailable(String glExtensionName) {
+    @Override
+    public final boolean isExtensionAvailable(String glExtensionName) {
       return _context.isExtensionAvailable(glExtensionName);
     }
 
-    public Object getExtension(String extensionName) {
+    @Override
+    public final Object getExtension(String extensionName) {
       // At this point we don't expose any extensions using this mechanism
       return null;
     }
 
-    /** Returns the context this GL object is associated with for better
-        error checking by DebugGL. */
-    public GLContext getContext() {
+    @Override
+    public final GLContext getContext() {
       return _context;
     }
 
-    private GLContextImpl _context;
+    private final GLContextImpl _context;
 
     /**
      * @see javax.media.opengl.GLContext#setSwapInterval(int)
      */
-    public void setSwapInterval(int interval) {
+    @Override
+    public final void setSwapInterval(int interval) {
       _context.setSwapInterval(interval);
     }
 
     /**
      * @see javax.media.opengl.GLContext#getSwapInterval()
      */
-    public int getSwapInterval() {
+    @Override
+    public final int getSwapInterval() {
       return _context.getSwapInterval();
     }
 
-    public Object getPlatformGLExtensions() {
+    @Override
+    public final Object getPlatformGLExtensions() {
       return _context.getPlatformGLExtensions();
     }
 
+    @Override
+    public final int getBoundFramebuffer(int target) {
+      return _context.getBoundFramebuffer(target);
+    }
+
+    @Override
+    public final int getDefaultDrawFramebuffer() {
+      return _context.getDefaultDrawFramebuffer();
+    }
+
+    @Override
+    public final int getDefaultReadFramebuffer() {
+      return _context.getDefaultReadFramebuffer();
+    }
+
diff --git a/make/config/jogl/gl-impl-CustomJavaCode-desktop.java b/make/config/jogl/gl-impl-CustomJavaCode-desktop.java
index 33b0f13..6a74b80 100644
--- a/make/config/jogl/gl-impl-CustomJavaCode-desktop.java
+++ b/make/config/jogl/gl-impl-CustomJavaCode-desktop.java
@@ -4,34 +4,42 @@
         return GLBuffers.sizeof(this, imageSizeTemp, format, type, width, height, depth, pack) ;                                    
     }
 
+    @Override
     public final boolean isGL4bc() {
         return _context.isGL4bc();
     }
 
+    @Override
     public final boolean isGL4() {
         return _context.isGL4();
     }
 
+    @Override
     public final boolean isGL3bc() {
         return _context.isGL3bc();
     }
 
+    @Override
     public final boolean isGL3() {
         return _context.isGL3();
     }
 
+    @Override
     public final boolean isGL2() {
         return _context.isGL2();
     }
       
+    @Override
     public final boolean isGL2ES1() {
         return _context.isGL2ES1();
     }
 
+    @Override
     public final boolean isGL2ES2() {
         return _context.isGL2ES2();
     }
 
+    @Override
     public final boolean isGLES2Compatible() {
         return _context.isGLES2Compatible();
     }
@@ -40,10 +48,12 @@
         return _context.isGL2GL3();
     }
 
+    @Override
     public final boolean hasGLSL() {
         return _context.hasGLSL();
     }
 
+    @Override
     public final GL4bc getGL4bc() throws GLException {
         if(!isGL4bc()) {
             throw new GLException("Not a GL4bc implementation");
@@ -51,6 +61,7 @@
         return this;
     }
 
+    @Override
     public final GL4 getGL4() throws GLException {
         if(!isGL4()) {
             throw new GLException("Not a GL4 implementation");
@@ -58,6 +69,7 @@
         return this;
     }
 
+    @Override
     public final GL3bc getGL3bc() throws GLException {
         if(!isGL3bc()) {
             throw new GLException("Not a GL3bc implementation");
@@ -65,6 +77,7 @@
         return this;
     }
 
+    @Override
     public final GL3 getGL3() throws GLException {
         if(!isGL3()) {
             throw new GLException("Not a GL3 implementation");
@@ -72,6 +85,7 @@
         return this;
     }
 
+    @Override
     public final GL2 getGL2() throws GLException {
         if(!isGL2()) {
             throw new GLException("Not a GL2 implementation");
@@ -79,6 +93,7 @@
         return this;
     }
 
+    @Override
     public final GL2ES1 getGL2ES1() throws GLException {
         if(!isGL2ES1()) {
             throw new GLException("Not a GL2ES1 implementation");
@@ -86,6 +101,7 @@
         return this;
     }
 
+    @Override
     public final GL2ES2 getGL2ES2() throws GLException {
         if(!isGL2ES2()) {
             throw new GLException("Not a GL2ES2 implementation");
@@ -93,6 +109,7 @@
         return this;
     }
 
+    @Override
     public final GL2GL3 getGL2GL3() throws GLException {
         if(!isGL2GL3()) {
             throw new GLException("Not a GL2GL3 implementation");
@@ -100,26 +117,32 @@
         return this;
     }
 
+    @Override
     public final boolean isGLES1() {
         return false;
     }
 
+    @Override
     public final boolean isGLES2() {
         return false;
     }
 
+    @Override
     public final boolean isGLES() {
         return false;
     }
 
+    @Override
     public final GLES1 getGLES1() throws GLException {
         throw new GLException("Not a GLES1 implementation");
     }
 
+    @Override
     public final GLES2 getGLES2() throws GLException {
         throw new GLException("Not a GLES2 implementation");
     }
 
-    public boolean isNPOTTextureAvailable() {
+    @Override
+    public final boolean isNPOTTextureAvailable() {
       return _context.isNPOTTextureAvailable();
     }
diff --git a/make/config/jogl/gl-impl-CustomJavaCode-gl2_es2.java b/make/config/jogl/gl-impl-CustomJavaCode-gl2_es2.java
index b31a087..82b7912 100644
--- a/make/config/jogl/gl-impl-CustomJavaCode-gl2_es2.java
+++ b/make/config/jogl/gl-impl-CustomJavaCode-gl2_es2.java
@@ -1,4 +1,5 @@
-  public void glVertexAttribPointer(GLArrayData array) {
+  @Override
+  public final void glVertexAttribPointer(GLArrayData array) {
     if(array.getComponentCount()==0) return;
     if(array.isVBO()) {
         glVertexAttribPointer(array.getLocation(), array.getComponentCount(), array.getComponentType(), 
@@ -9,7 +10,8 @@
     }
   }
 
-  public void glUniform(GLUniformData data) {
+  @Override
+  public final void glUniform(GLUniformData data) {
     boolean done=false;
     if(data.isBuffer()) {
         Buffer buffer = data.getBuffer();
diff --git a/make/config/jogl/gl-impl-CustomJavaCode-gl4bc.java b/make/config/jogl/gl-impl-CustomJavaCode-gl4bc.java
index dc4f898..e079a1a 100644
--- a/make/config/jogl/gl-impl-CustomJavaCode-gl4bc.java
+++ b/make/config/jogl/gl-impl-CustomJavaCode-gl4bc.java
@@ -17,9 +17,15 @@ public void setObjectTracker(GLObjectTracker tracker) {
 
 public GL4bcImpl(GLProfile glp, GLContextImpl context) {
   this._context = context; 
-  this.bufferSizeTracker  = context.getBufferSizeTracker();
-  this.bufferStateTracker = context.getBufferStateTracker();
-  this.glStateTracker     = context.getGLStateTracker();
+  if(null != context) {
+      this.bufferSizeTracker  = context.getBufferSizeTracker();
+      this.bufferStateTracker = context.getBufferStateTracker();
+      this.glStateTracker     = context.getGLStateTracker();
+  } else {
+      this.bufferSizeTracker  = null;
+      this.bufferStateTracker = null;
+      this.glStateTracker     = null;
+  }
   this.glProfile = glp;
 }
 
@@ -27,7 +33,7 @@ public GL4bcImpl(GLProfile glp, GLContextImpl context) {
  * Provides platform-independent access to the wglAllocateMemoryNV /
  * glXAllocateMemoryNV extension.
  */
-public java.nio.ByteBuffer glAllocateMemoryNV(int arg0, float arg1, float arg2, float arg3) {
+public final java.nio.ByteBuffer glAllocateMemoryNV(int arg0, float arg1, float arg2, float arg3) {
   return _context.glAllocateMemoryNV(arg0, arg1, arg2, arg3);
 }
 
@@ -35,9 +41,9 @@ public java.nio.ByteBuffer glAllocateMemoryNV(int arg0, float arg1, float arg2,
 // Helpers for ensuring the correct amount of texture data
 //
 
-private GLBufferSizeTracker  bufferSizeTracker;
-private GLBufferStateTracker bufferStateTracker;
-private GLStateTracker       glStateTracker;
+private final GLBufferSizeTracker  bufferSizeTracker;
+private final GLBufferStateTracker bufferStateTracker;
+private final GLStateTracker       glStateTracker;
 
 private boolean bufferObjectExtensionsInitialized = false;
 private boolean haveARBPixelBufferObject;
@@ -46,7 +52,7 @@ private boolean haveGL15;
 private boolean haveGL21;
 private boolean haveARBVertexBufferObject;
 
-private void initBufferObjectExtensionChecks() {
+private final void initBufferObjectExtensionChecks() {
   if (bufferObjectExtensionsInitialized)
     return;
   bufferObjectExtensionsInitialized = true;
@@ -57,12 +63,12 @@ private void initBufferObjectExtensionChecks() {
   haveARBVertexBufferObject = isExtensionAvailable("GL_ARB_vertex_buffer_object");
 }
 
-private boolean checkBufferObject(boolean extension1,
-                                  boolean extension2,
-                                  boolean extension3,
-                                  boolean enabled,
-                                  int state,
-                                  String kind, boolean throwException) {
+private final boolean checkBufferObject(boolean extension1,
+                                        boolean extension2,
+                                        boolean extension3,
+                                        boolean enabled,
+                                        int state,
+                                        String kind, boolean throwException) {
   if (inBeginEndPair) {
     throw new GLException("May not call this between glBegin and glEnd");
   }
@@ -94,7 +100,7 @@ private boolean checkBufferObject(boolean extension1,
   return true;
 }  
 
-private boolean checkArrayVBODisabled(boolean throwException) { 
+private final boolean checkArrayVBODisabled(boolean throwException) { 
   initBufferObjectExtensionChecks();
   return checkBufferObject(haveGL15,
                     haveARBVertexBufferObject,
@@ -104,7 +110,7 @@ private boolean checkArrayVBODisabled(boolean throwException) {
                     "array vertex_buffer_object", throwException);
 }
 
-private boolean checkArrayVBOEnabled(boolean throwException) { 
+private final boolean checkArrayVBOEnabled(boolean throwException) { 
   initBufferObjectExtensionChecks();
   return checkBufferObject(haveGL15,
                     haveARBVertexBufferObject,
@@ -114,7 +120,7 @@ private boolean checkArrayVBOEnabled(boolean throwException) {
                     "array vertex_buffer_object", throwException);
 }
 
-private boolean checkElementVBODisabled(boolean throwException) { 
+private final boolean checkElementVBODisabled(boolean throwException) { 
   initBufferObjectExtensionChecks();
   return checkBufferObject(haveGL15,
                     haveARBVertexBufferObject,
@@ -124,7 +130,7 @@ private boolean checkElementVBODisabled(boolean throwException) {
                     "element vertex_buffer_object", throwException);
 }
 
-private boolean checkElementVBOEnabled(boolean throwException) { 
+private final boolean checkElementVBOEnabled(boolean throwException) { 
   initBufferObjectExtensionChecks();
   return checkBufferObject(haveGL15,
                     haveARBVertexBufferObject,
@@ -134,7 +140,7 @@ private boolean checkElementVBOEnabled(boolean throwException) {
                     "element vertex_buffer_object", throwException);
 }
 
-private boolean checkUnpackPBODisabled(boolean throwException) { 
+private final boolean checkUnpackPBODisabled(boolean throwException) { 
   initBufferObjectExtensionChecks();
   return checkBufferObject(haveARBPixelBufferObject,
                     haveEXTPixelBufferObject,
@@ -144,7 +150,7 @@ private boolean checkUnpackPBODisabled(boolean throwException) {
                     "unpack pixel_buffer_object", throwException);
 }
 
-private boolean checkUnpackPBOEnabled(boolean throwException) { 
+private final boolean checkUnpackPBOEnabled(boolean throwException) { 
   initBufferObjectExtensionChecks();
   return checkBufferObject(haveARBPixelBufferObject,
                     haveEXTPixelBufferObject,
@@ -154,7 +160,7 @@ private boolean checkUnpackPBOEnabled(boolean throwException) {
                     "unpack pixel_buffer_object", throwException);
 }
 
-private boolean checkPackPBODisabled(boolean throwException) { 
+private final boolean checkPackPBODisabled(boolean throwException) { 
   initBufferObjectExtensionChecks();
   return checkBufferObject(haveARBPixelBufferObject,
                     haveEXTPixelBufferObject,
@@ -164,7 +170,7 @@ private boolean checkPackPBODisabled(boolean throwException) {
                     "pack pixel_buffer_object", throwException);
 }
 
-private boolean checkPackPBOEnabled(boolean throwException) { 
+private final boolean checkPackPBOEnabled(boolean throwException) { 
   initBufferObjectExtensionChecks();
   return checkBufferObject(haveARBPixelBufferObject,
                     haveEXTPixelBufferObject,
@@ -174,18 +180,20 @@ private boolean checkPackPBOEnabled(boolean throwException) {
                     "pack pixel_buffer_object", throwException);
 }
 
-public boolean glIsPBOPackEnabled() {
+ at Override
+public final boolean glIsPBOPackEnabled() {
     return checkPackPBOEnabled(false);
 }
 
-public boolean glIsPBOUnpackEnabled() {
+ at Override
+public final boolean glIsPBOUnpackEnabled() {
     return checkUnpackPBOEnabled(false);
 }
 
-private HashMap<MemoryObject, MemoryObject> arbMemCache = new HashMap<MemoryObject, MemoryObject>();
+private final HashMap<MemoryObject, MemoryObject> arbMemCache = new HashMap<MemoryObject, MemoryObject>();
 
 /** Entry point to C language function: <br> <code> LPVOID glMapBuffer(GLenum target, GLenum access); </code>    */
-public java.nio.ByteBuffer glMapBuffer(int target, int access) {
+public final java.nio.ByteBuffer glMapBuffer(int target, int access) {
   final long __addr_ = ((GL4bcProcAddressTable)_context.getGLProcAddressTable())._addressof_glMapBuffer;
   if (__addr_ == 0) {
     throw new GLException("Method \"glMapBuffer\" not available");
@@ -224,7 +232,7 @@ public java.nio.ByteBuffer glMapBuffer(int target, int access) {
 native private long dispatch_glMapBuffer(int target, int access, long glProcAddress);
 
 /** Entry point to C language function: <code> GLvoid *  {@native glMapNamedBufferEXT}(GLuint buffer, GLenum access); </code> <br>Part of <code>GL_EXT_direct_state_access</code>   */
-public java.nio.ByteBuffer glMapNamedBufferEXT(int bufferName, int access)  {
+public final java.nio.ByteBuffer glMapNamedBufferEXT(int bufferName, int access)  {
   final long __addr_ = ((GL4bcProcAddressTable)_context.getGLProcAddressTable())._addressof_glMapNamedBufferEXT;
   if (__addr_ == 0) {
     throw new GLException("Method \"glMapNamedBufferEXT\" not available");
@@ -263,7 +271,8 @@ private native long dispatch_glMapNamedBufferEXT(int buffer, int access, long pr
 
 native private ByteBuffer newDirectByteBuffer(long addr, long capacity);
 
-    public void glVertexPointer(GLArrayData array) {
+    @Override
+    public final void glVertexPointer(GLArrayData array) {
       if(array.getComponentCount()==0) return;
       if(array.isVBO()) {
           glVertexPointer(array.getComponentCount(), array.getComponentType(), array.getStride(), array.getVBOOffset());
@@ -271,7 +280,8 @@ native private ByteBuffer newDirectByteBuffer(long addr, long capacity);
           glVertexPointer(array.getComponentCount(), array.getComponentType(), array.getStride(), array.getBuffer());
       }
     }
-    public void glColorPointer(GLArrayData array) {
+    @Override
+    public final void glColorPointer(GLArrayData array) {
       if(array.getComponentCount()==0) return;
       if(array.isVBO()) {
           glColorPointer(array.getComponentCount(), array.getComponentType(), array.getStride(), array.getVBOOffset());
@@ -280,7 +290,8 @@ native private ByteBuffer newDirectByteBuffer(long addr, long capacity);
       }
 
     }
-    public void glNormalPointer(GLArrayData array) {
+    @Override
+    public final void glNormalPointer(GLArrayData array) {
       if(array.getComponentCount()==0) return;
       if(array.getComponentCount()!=3) {
         throw new GLException("Only 3 components per normal allowed");
@@ -291,7 +302,8 @@ native private ByteBuffer newDirectByteBuffer(long addr, long capacity);
           glNormalPointer(array.getComponentType(), array.getStride(), array.getBuffer());
       }
     }
-    public void glTexCoordPointer(GLArrayData array) {
+    @Override
+    public final void glTexCoordPointer(GLArrayData array) {
       if(array.getComponentCount()==0) return;
       if(array.isVBO()) {
           glTexCoordPointer(array.getComponentCount(), array.getComponentType(), array.getStride(), array.getVBOOffset());
diff --git a/make/config/jogl/gl-impl-CustomJavaCode-gles1.java b/make/config/jogl/gl-impl-CustomJavaCode-gles1.java
index 9b0d98f..68eadc6 100644
--- a/make/config/jogl/gl-impl-CustomJavaCode-gles1.java
+++ b/make/config/jogl/gl-impl-CustomJavaCode-gles1.java
@@ -1,103 +1,133 @@
 public GLES1Impl(GLProfile glp, GLContextImpl context) {
   this._context = context; 
-  this.bufferSizeTracker  = context.getBufferSizeTracker();
-  this.bufferStateTracker = context.getBufferStateTracker();
-  this.glStateTracker     = context.getGLStateTracker();
+  if(null != context) {
+      this.bufferSizeTracker  = context.getBufferSizeTracker();
+      this.bufferStateTracker = context.getBufferStateTracker();
+      this.glStateTracker     = context.getGLStateTracker();
+  } else {
+      this.bufferSizeTracker  = null;
+      this.bufferStateTracker = null;
+      this.glStateTracker     = null;
+  }
   this.glProfile = glp;
 }
 
+ at Override
 public final boolean isGL4bc() {
     return false;
 }
 
+ at Override
 public final boolean isGL4() {
     return false;
 }
 
+ at Override
 public final boolean isGL3bc() {
     return false;
 }
 
+ at Override
 public final boolean isGL3() {
     return false;
 }
 
+ at Override
 public final boolean isGL2() {
     return false;
 }
 
+ at Override
 public final boolean isGLES1() {
     return true;
 }
 
+ at Override
 public final boolean isGLES2() {
     return false;
 }
 
+ at Override
 public final boolean isGLES() {
     return true;
 }
 
+ at Override
 public final boolean isGL2ES1() {
     return true;
 }
 
+ at Override
 public final boolean isGL2ES2() {
     return false;
 }
 
+ at Override
 public final boolean isGLES2Compatible() {
     return false;
 }
 
+ at Override
 public final boolean isGL2GL3() {
     return false;
 }
 
+ at Override
 public final boolean hasGLSL() {
     return false;
 }
 
+ at Override
 public boolean isNPOTTextureAvailable() {
   return false;
 }
 
+ at Override
 public final GL4bc getGL4bc() throws GLException {
     throw new GLException("Not a GL4bc implementation");
 }
 
+ at Override
 public final GL4 getGL4() throws GLException {
     throw new GLException("Not a GL4 implementation");
 }
 
+ at Override
 public final GL3bc getGL3bc() throws GLException {
     throw new GLException("Not a GL3bc implementation");
 }
 
+ at Override
 public final GL3 getGL3() throws GLException {
     throw new GLException("Not a GL3 implementation");
 }
 
+ at Override
 public final GL2 getGL2() throws GLException {
     throw new GLException("Not a GL2 implementation");
 }
 
+ at Override
 public final GLES1 getGLES1() throws GLException {
     return this;
 }
 
+ at Override
 public final GLES2 getGLES2() throws GLException {
     throw new GLException("Not a GLES2 implementation");
 }
 
+ at Override
 public final GL2ES1 getGL2ES1() throws GLException {
     return this;
 }
 
+ at Override
 public final GL2ES2 getGL2ES2() throws GLException {
     throw new GLException("Not a GL2ES2 implementation");
 }
 
+ at Override
 public final GL2GL3 getGL2GL3() throws GLException {
     throw new GLException("Not a GL2GL3 implementation");
 }
@@ -106,24 +136,24 @@ public final GL2GL3 getGL2GL3() throws GLException {
 // Helpers for ensuring the correct amount of texture data
 //
 
-private GLBufferSizeTracker  bufferSizeTracker;
-private GLBufferStateTracker bufferStateTracker;
-private GLStateTracker       glStateTracker;
+private final GLBufferSizeTracker  bufferSizeTracker;
+private final GLBufferStateTracker bufferStateTracker;
+private final GLStateTracker       glStateTracker;
 
 private boolean bufferObjectExtensionsInitialized = false;
 private boolean haveOESFramebufferObject;
 
-private void initBufferObjectExtensionChecks() {
+private final void initBufferObjectExtensionChecks() {
   if (bufferObjectExtensionsInitialized)
     return;
   bufferObjectExtensionsInitialized = true;
   haveOESFramebufferObject  = isExtensionAvailable("GL_OES_framebuffer_object");
 }
 
-private boolean checkBufferObject(boolean avail,
-                                  boolean enabled,
-                                  int state,
-                                  String kind, boolean throwException) {
+private final boolean checkBufferObject(boolean avail,
+                                        boolean enabled,
+                                        int state,
+                                        String kind, boolean throwException) {
   if (!avail) {
     if (!enabled)
       return true;
@@ -151,7 +181,7 @@ private boolean checkBufferObject(boolean avail,
   return true;
 }  
 
-private boolean checkArrayVBODisabled(boolean throwException) { 
+private final boolean checkArrayVBODisabled(boolean throwException) { 
   initBufferObjectExtensionChecks();
   return checkBufferObject(true,
                     false,
@@ -159,7 +189,7 @@ private boolean checkArrayVBODisabled(boolean throwException) {
                     "array vertex_buffer_object", throwException);
 }
 
-private boolean checkArrayVBOEnabled(boolean throwException) { 
+private final boolean checkArrayVBOEnabled(boolean throwException) { 
   initBufferObjectExtensionChecks();
   return checkBufferObject(true,
                     true,
@@ -167,7 +197,7 @@ private boolean checkArrayVBOEnabled(boolean throwException) {
                     "array vertex_buffer_object", throwException);
 }
 
-private boolean checkElementVBODisabled(boolean throwException) { 
+private final boolean checkElementVBODisabled(boolean throwException) { 
   initBufferObjectExtensionChecks();
   return checkBufferObject(true,
                     false,
@@ -175,7 +205,7 @@ private boolean checkElementVBODisabled(boolean throwException) {
                     "element vertex_buffer_object", throwException);
 }
 
-private boolean checkElementVBOEnabled(boolean throwException) { 
+private final boolean checkElementVBOEnabled(boolean throwException) { 
   initBufferObjectExtensionChecks();
   return checkBufferObject(true,
                     true,
@@ -183,30 +213,30 @@ private boolean checkElementVBOEnabled(boolean throwException) {
                     "element vertex_buffer_object", throwException);
 }
 
-private boolean checkUnpackPBODisabled(boolean throwException) { 
+private final boolean checkUnpackPBODisabled(boolean throwException) { 
     // PBO n/a for ES 1.1 or ES 2.0
     return true;
 }
 
-private boolean checkUnpackPBOEnabled(boolean throwException) { 
+private final boolean checkUnpackPBOEnabled(boolean throwException) { 
     // PBO n/a for ES 1.1 or ES 2.0
     return false;
 }
 
-private boolean checkPackPBODisabled(boolean throwException) { 
+private final boolean checkPackPBODisabled(boolean throwException) { 
     // PBO n/a for ES 1.1 or ES 2.0
     return true;
 }
 
-private boolean checkPackPBOEnabled(boolean throwException) { 
+private final boolean checkPackPBOEnabled(boolean throwException) { 
     // PBO n/a for ES 1.1 or ES 2.0
     return false;
 }
 
-private HashMap<MemoryObject, MemoryObject> arbMemCache = new HashMap<MemoryObject, MemoryObject>();
+private final HashMap<MemoryObject, MemoryObject> arbMemCache = new HashMap<MemoryObject, MemoryObject>();
 
 /** Entry point to C language function: <br> <code> LPVOID glMapBuffer(GLenum target, GLenum access); </code>    */
-public java.nio.ByteBuffer glMapBuffer(int target, int access) {
+public final java.nio.ByteBuffer glMapBuffer(int target, int access) {
   final long __addr_ = ((GLES1ProcAddressTable)_context.getGLProcAddressTable())._addressof_glMapBuffer;
   if (__addr_ == 0) {
     throw new GLException("Method \"glMapBuffer\" not available");
@@ -246,7 +276,8 @@ native private long dispatch_glMapBuffer(int target, int access, long glProcAddr
 
 native private ByteBuffer newDirectByteBuffer(long addr, long capacity);
 
-public void glVertexPointer(GLArrayData array) {
+ at Override
+public final void glVertexPointer(GLArrayData array) {
   if(array.getComponentCount()==0) return;
   if(array.isVBO()) {
       glVertexPointer(array.getComponentCount(), array.getComponentType(), array.getStride(), array.getVBOOffset());
@@ -254,7 +285,8 @@ public void glVertexPointer(GLArrayData array) {
       glVertexPointer(array.getComponentCount(), array.getComponentType(), array.getStride(), array.getBuffer());
   }
 }
-public void glColorPointer(GLArrayData array) {
+ at Override
+public final void glColorPointer(GLArrayData array) {
   if(array.getComponentCount()==0) return;
   if(array.isVBO()) {
       glColorPointer(array.getComponentCount(), array.getComponentType(), array.getStride(), array.getVBOOffset());
@@ -263,7 +295,8 @@ public void glColorPointer(GLArrayData array) {
   }
 
 }
-public void glNormalPointer(GLArrayData array) {
+ at Override
+public final void glNormalPointer(GLArrayData array) {
   if(array.getComponentCount()==0) return;
   if(array.getComponentCount()!=3) {
     throw new GLException("Only 3 components per normal allowed");
@@ -274,7 +307,8 @@ public void glNormalPointer(GLArrayData array) {
       glNormalPointer(array.getComponentType(), array.getStride(), array.getBuffer());
   }
 }
-public void glTexCoordPointer(GLArrayData array) {
+ at Override
+public final void glTexCoordPointer(GLArrayData array) {
   if(array.getComponentCount()==0) return;
   if(array.isVBO()) {
       glTexCoordPointer(array.getComponentCount(), array.getComponentType(), array.getStride(), array.getVBOOffset());
diff --git a/make/config/jogl/gl-impl-CustomJavaCode-gles2.java b/make/config/jogl/gl-impl-CustomJavaCode-gles2.java
index ea6544d..7602873 100644
--- a/make/config/jogl/gl-impl-CustomJavaCode-gles2.java
+++ b/make/config/jogl/gl-impl-CustomJavaCode-gles2.java
@@ -1,27 +1,34 @@
-// Tracks glBegin/glEnd calls to determine whether it is legal to
-// query Vertex Buffer Object state
-private boolean inBeginEndPair;
 
 public GLES2Impl(GLProfile glp, GLContextImpl context) {
   this._context = context; 
-  this.bufferSizeTracker  = context.getBufferSizeTracker();
-  this.bufferStateTracker = context.getBufferStateTracker();
-  this.glStateTracker     = context.getGLStateTracker();
+  if(null != context) {
+      this.bufferSizeTracker  = context.getBufferSizeTracker();
+      this.bufferStateTracker = context.getBufferStateTracker();
+      this.glStateTracker     = context.getGLStateTracker();
+  } else {
+      this.bufferSizeTracker  = null;
+      this.bufferStateTracker = null;
+      this.glStateTracker     = null;
+  }
   this.glProfile = glp;
 }
 
+ at Override
 public final boolean isGL4bc() {
     return false;
 }
 
+ at Override
 public final boolean isGL4() {
     return false;
 }
 
+ at Override
 public final boolean isGL3bc() {
     return false;
 }
 
+ at Override
 public final boolean isGL3() {
     return false;
 }
@@ -30,78 +37,97 @@ public final boolean isGL2() {
     return false;
 }
 
+ at Override
 public final boolean isGLES1() {
     return false;
 }
 
+ at Override
 public final boolean isGLES2() {
     return true;
 }
 
+ at Override
 public final boolean isGLES() {
     return true;
 }
 
+ at Override
 public final boolean isGL2ES1() {
     return false;
 }
 
+ at Override
 public final boolean isGL2ES2() {
     return true;
 }
 
+ at Override
 public final boolean isGLES2Compatible() {
     return true;
 }
 
+ at Override
 public final boolean isGL2GL3() {
     return false;
 }
 
+ at Override
 public final boolean hasGLSL() {
     return true;
 }
 
+ at Override
 public boolean isNPOTTextureAvailable() {
   return true;
 }
 
+ at Override
 public final GL4bc getGL4bc() throws GLException {
     throw new GLException("Not a GL4bc implementation");
 }
 
+ at Override
 public final GL4 getGL4() throws GLException {
     throw new GLException("Not a GL4 implementation");
 }
 
+ at Override
 public final GL3bc getGL3bc() throws GLException {
     throw new GLException("Not a GL3bc implementation");
 }
 
+ at Override
 public final GL3 getGL3() throws GLException {
     throw new GLException("Not a GL3 implementation");
 }
 
+ at Override
 public final GL2 getGL2() throws GLException {
     throw new GLException("Not a GL2 implementation");
 }
 
+ at Override
 public final GLES1 getGLES1() throws GLException {
     throw new GLException("Not a GLES1 implementation");
 }
 
+ at Override
 public final GLES2 getGLES2() throws GLException {
     return this;
 }
 
+ at Override
 public final GL2ES1 getGL2ES1() throws GLException {
     throw new GLException("Not a GL2ES1 implementation");
 }
 
+ at Override
 public final GL2ES2 getGL2ES2() throws GLException {
     return this;
 }
 
+ at Override
 public final GL2GL3 getGL2GL3() throws GLException {
     throw new GLException("Not a GL2GL3 implementation");
 }
@@ -110,24 +136,24 @@ public final GL2GL3 getGL2GL3() throws GLException {
 // Helpers for ensuring the correct amount of texture data
 //
 
-private GLBufferSizeTracker  bufferSizeTracker;
-private GLBufferStateTracker bufferStateTracker;
-private GLStateTracker       glStateTracker;
+private final GLBufferSizeTracker  bufferSizeTracker;
+private final GLBufferStateTracker bufferStateTracker;
+private final GLStateTracker       glStateTracker;
 
 private boolean bufferObjectExtensionsInitialized = false;
 private boolean haveOESFramebufferObject;
 
-private void initBufferObjectExtensionChecks() {
+private final void initBufferObjectExtensionChecks() {
   if (bufferObjectExtensionsInitialized)
     return;
   bufferObjectExtensionsInitialized = true;
   haveOESFramebufferObject  = isExtensionAvailable("GL_OES_framebuffer_object");
 }
 
-private boolean checkBufferObject(boolean avail,
-                                  boolean enabled,
-                                  int state,
-                                  String kind, boolean throwException) {
+private final boolean checkBufferObject(boolean avail,
+                                        boolean enabled,
+                                        int state,
+                                        String kind, boolean throwException) {
   if (!avail) {
     if (!enabled)
       return true;
@@ -155,7 +181,7 @@ private boolean checkBufferObject(boolean avail,
   return true;
 }  
 
-private boolean checkArrayVBODisabled(boolean throwException) { 
+private final boolean checkArrayVBODisabled(boolean throwException) { 
   initBufferObjectExtensionChecks();
   return checkBufferObject(true,
                     false,
@@ -163,7 +189,7 @@ private boolean checkArrayVBODisabled(boolean throwException) {
                     "array vertex_buffer_object", throwException);
 }
 
-private boolean checkArrayVBOEnabled(boolean throwException) { 
+private final boolean checkArrayVBOEnabled(boolean throwException) { 
   initBufferObjectExtensionChecks();
   return checkBufferObject(true,
                     true,
@@ -171,7 +197,7 @@ private boolean checkArrayVBOEnabled(boolean throwException) {
                     "array vertex_buffer_object", throwException);
 }
 
-private boolean checkElementVBODisabled(boolean throwException) { 
+private final boolean checkElementVBODisabled(boolean throwException) { 
   initBufferObjectExtensionChecks();
   return checkBufferObject(true,
                     false,
@@ -179,7 +205,7 @@ private boolean checkElementVBODisabled(boolean throwException) {
                     "element vertex_buffer_object", throwException);
 }
 
-private boolean checkElementVBOEnabled(boolean throwException) { 
+private final boolean checkElementVBOEnabled(boolean throwException) { 
   initBufferObjectExtensionChecks();
   return checkBufferObject(true,
                     true,
@@ -187,30 +213,31 @@ private boolean checkElementVBOEnabled(boolean throwException) {
                     "element vertex_buffer_object", throwException);
 }
 
-private boolean checkUnpackPBODisabled(boolean throwException) { 
+private final boolean checkUnpackPBODisabled(boolean throwException) { 
     // PBO n/a for ES 1.1 or ES 2.0
     return true;
 }
 
-private boolean checkUnpackPBOEnabled(boolean throwException) { 
+private final boolean checkUnpackPBOEnabled(boolean throwException) { 
     // PBO n/a for ES 1.1 or ES 2.0
     return false;
 }
 
-private boolean checkPackPBODisabled(boolean throwException) { 
+private final boolean checkPackPBODisabled(boolean throwException) { 
     // PBO n/a for ES 1.1 or ES 2.0
     return true;
 }
 
-private boolean checkPackPBOEnabled(boolean throwException) { 
+private final boolean checkPackPBOEnabled(boolean throwException) { 
     // PBO n/a for ES 1.1 or ES 2.0
     return false;
 }
 
-private HashMap<MemoryObject, MemoryObject> arbMemCache = new HashMap<MemoryObject, MemoryObject>();
+private final HashMap<MemoryObject, MemoryObject> arbMemCache = new HashMap<MemoryObject, MemoryObject>();
 
 /** Entry point to C language function: <br> <code> LPVOID glMapBuffer(GLenum target, GLenum access); </code>    */
-public java.nio.ByteBuffer glMapBuffer(int target, int access) {
+ at Override
+public final java.nio.ByteBuffer glMapBuffer(int target, int access) {
   final long __addr_ = ((GLES2ProcAddressTable)_context.getGLProcAddressTable())._addressof_glMapBuffer;
   if (__addr_ == 0) {
     throw new GLException("Method \"glMapBuffer\" not available");
@@ -250,11 +277,13 @@ native private long dispatch_glMapBuffer(int target, int access, long glProcAddr
 
 native private ByteBuffer newDirectByteBuffer(long addr, long capacity);
 
-public void glClearDepth(double depth) {
+ at Override
+public final void glClearDepth(double depth) {
     glClearDepthf((float)depth); 
 }
 
-public void glDepthRange(double zNear, double zFar) {
+ at Override
+public final void glDepthRange(double zNear, double zFar) {
     glDepthRangef((float)zNear, (float)zFar); 
 }
 
diff --git a/make/config/nativewindow/x11-CustomJavaCode.java b/make/config/nativewindow/x11-CustomJavaCode.java
index 73439fc..56aec47 100644
--- a/make/config/nativewindow/x11-CustomJavaCode.java
+++ b/make/config/nativewindow/x11-CustomJavaCode.java
@@ -24,7 +24,9 @@
   /** Entry point to C language function: <code> XVisualInfo *  XGetVisualInfo(Display * , long, XVisualInfo * , int * ); </code>    */
   private static native java.nio.ByteBuffer XGetVisualInfo1(long arg0, long arg1, java.nio.ByteBuffer arg2, Object arg3, int arg3_byte_offset);
 
-  public static native long DefaultVisualID(long display, int screen);
+  public static native int GetVisualIDFromWindow(long display, long window);
+
+  public static native int DefaultVisualID(long display, int screen);
 
   public static native long CreateDummyWindow(long display, int screen_index, int visualID, int width, int height);
   public static native void DestroyDummyWindow(long display, long window);
diff --git a/make/scripts/adb-install-all-armv7.sh b/make/scripts/adb-install-all-armv7.sh
index fe97655..f0a1dc5 100755
--- a/make/scripts/adb-install-all-armv7.sh
+++ b/make/scripts/adb-install-all-armv7.sh
@@ -1,4 +1,4 @@
-#adb $* install ../../gluegen/build-android-armv7/jogamp.android-launcher.apk
+#adb $* install ../../gluegen/build-android-armv7/jogamp-android-launcher.apk
 #adb $* install ../../gluegen/build-android-armv7/gluegen-rt-android-armeabi-v7a.apk
-adb $* install ../build-android-armv7/jar/jogl.all-android-armeabi-v7a.apk
-adb $* install ../build-android-armv7/jar/jogl.test-android.apk
+adb $* install ../build-android-armv7/jar/jogl-all-android-armeabi-v7a.apk
+adb $* install ../build-android-armv7/jar/jogl-test-android.apk
diff --git a/make/scripts/java-win32-dbg.bat b/make/scripts/java-win32-dbg.bat
index 9ad090a..6f82067 100755
--- a/make/scripts/java-win32-dbg.bat
+++ b/make/scripts/java-win32-dbg.bat
@@ -9,22 +9,25 @@ set BLD_DIR=..\%BLD_SUB%
 
 set FFMPEG_LIB=%PROJECT_ROOT%\make\lib\ffmpeg\x32
 
-set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;%FFMPEG_LIB%;%PATH%
-REM set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;%PROJECT_ROOT%\make\lib\angle\win32;%PATH%
-REM set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;%PROJECT_ROOT%\make\lib\PVRVFrame\OGLES-2.0\Windows_x86_32;%PATH%
+REM set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;%FFMPEG_LIB%;%PATH%
+REM set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;%PROJECT_ROOT%\make\lib\external\angle\win32;%PATH%
+set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;%PROJECT_ROOT%\make\lib\external\PVRVFrame\OGLES-2.0\Windows_x86_32;%PATH%
 
 REM set LIB_DIR=%BLD_DIR%\lib;..\..\gluegen\%BLD_SUB%\obj
 set LIB_DIR=%FFMPEG_LIB%
 
-set CP_ALL=.;%BLD_DIR%\jar\jogl.all.jar;%BLD_DIR%\jar\jogl.test.jar;..\..\gluegen\%BLD_SUB%\gluegen-rt.jar;..\..\gluegen\make\lib\junit.jar;%ANT_PATH%\lib\ant.jar;%ANT_PATH%\lib\ant-junit.jar;%BLD_DIR%\..\make\lib\swt\win32-win32-x86\swt-debug.jar
+set CP_ALL=.;%BLD_DIR%\jar\jogl-all.jar;%BLD_DIR%\jar\jogl-test.jar;..\..\gluegen\%BLD_SUB%\gluegen-rt.jar;..\..\gluegen\make\lib\junit.jar;%ANT_PATH%\lib\ant.jar;%ANT_PATH%\lib\ant-junit.jar;%BLD_DIR%\..\make\lib\swt\win32-win32-x86\swt-debug.jar
 
 echo CP_ALL %CP_ALL%
 
-set D_ARGS="-Djogamp.debug.IOUtil" "-Djogl.debug.GLSLCode" "-Djogl.debug.GLMediaPlayer"
+set D_ARGS="-Djogl.debug.GLContext" "-Djogl.debug.FBObject"
+REM set D_ARGS="-Djogl.debug.GLDrawable" "-Djogl.debug.EGLDrawableFactory.DontQuery"
+REM set D_ARGS="-Djogl.debug.GLDrawable" "-Djogl.debug.EGLDrawableFactory.QueryNativeTK"
+REM set D_ARGS="-Djogl.debug=all" "-Dnewt.debug=all" "-Dnativewindow.debug=all"
+REM set D_ARGS="-Djogamp.debug.IOUtil" "-Djogl.debug.GLSLCode" "-Djogl.debug.GLMediaPlayer"
 REM set D_ARGS="-Djogl.debug.ExtensionAvailabilityCache" "-Djogl.debug=all" "-Dnewt.debug=all" "-Dnativewindow.debug=all" "-Djogamp.debug.ProcAddressHelper=true" "-Djogamp.debug.NativeLibrary=true" "-Djogamp.debug.NativeLibrary.Lookup=true"
 REM set D_ARGS="-Djogl.debug=all" "-Dnewt.debug=all" "-Dnativewindow.debug=all" "-Djogamp.debug.NativeLibrary=true"
 REM set D_ARGS="-Djogamp.debug.JNILibLoader=true" "-Djogamp.debug.NativeLibrary=true" "-Djogamp.debug.NativeLibrary.Lookup=true" "-Djogl.debug.GLProfile=true"
-REM set D_ARGS="-Djogl.debug=all" "-Dnewt.debug=all" "-Dnativewindow.debug=all"
 REM set D_ARGS="-Dnewt.debug.Window" "-Dnativewindow.debug.TraceLock"
 REM set D_ARGS="-Dnativewindow.debug.TraceLock"
 REM set D_ARGS="-Dnewt.debug.Window" "-Dnewt.debug.Display"
diff --git a/make/scripts/java-win32.bat b/make/scripts/java-win32.bat
index 6dc0f3c..1d84302 100755
--- a/make/scripts/java-win32.bat
+++ b/make/scripts/java-win32.bat
@@ -8,14 +8,14 @@ set PROJECT_ROOT=D:\projects\jogamp\jogl
 set BLD_DIR=..\%BLD_SUB%
 
 REM set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;c:\mingw\bin;%PATH%
-set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;%PROJECT_ROOT%\make\lib\angle\win32;%PATH%
-REM set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;%PROJECT_ROOT%\make\lib\PVRVFrame\OGLES-2.0\Windows_x86_32;%PATH%
+REM set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;%PROJECT_ROOT%\make\lib\angle\win32;%PATH%
+set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;%PROJECT_ROOT%\make\lib\PVRVFrame\OGLES-2.0\Windows_x86_32;%PATH%
 
 set BLD_DIR=..\%BLD_SUB%
 REM set LIB_DIR=..\..\gluegen\%BLD_SUB%\obj;%BLD_DIR%\lib
 set LIB_DIR=
 
-set CP_ALL=.;%BLD_DIR%\jar\jogl.all.jar;%BLD_DIR%\jar\jogl.test.jar;..\..\gluegen\%BLD_SUB%\gluegen-rt.jar;..\..\gluegen\make\lib\junit.jar;%ANT_PATH%\lib\ant.jar;%ANT_PATH%\lib\ant-junit.jar;%BLD_DIR%\..\make\lib\swt\win32-win32-x86\swt-debug.jar
+set CP_ALL=.;%BLD_DIR%\jar\jogl-all.jar;%BLD_DIR%\jar\jogl-test.jar;..\..\gluegen\%BLD_SUB%\gluegen-rt.jar;..\..\gluegen\make\lib\junit.jar;%ANT_PATH%\lib\ant.jar;%ANT_PATH%\lib\ant-junit.jar;%BLD_DIR%\..\make\lib\swt\win32-win32-x86\swt-debug.jar
 
 echo CP_ALL %CP_ALL%
 
diff --git a/make/scripts/java-win64-dbg.bat b/make/scripts/java-win64-dbg.bat
index 4b88116..c8a9045 100755
--- a/make/scripts/java-win64-dbg.bat
+++ b/make/scripts/java-win64-dbg.bat
@@ -9,15 +9,22 @@ set BLD_DIR=..\%BLD_SUB%
 
 set FFMPEG_LIB=%PROJECT_ROOT%\make\lib\ffmpeg\x64
 
-set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;%FFMPEG_LIB%;%PATH%
+set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;c:\mingw\bin;%PATH%
+REM set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;%PROJECT_ROOT%\make\lib\external\PVRVFrame\OGLES-2.0\Windows_x86_64;%PATH%
 REM set LIB_DIR=%BLD_DIR%\lib;..\..\gluegen\%BLD_SUB%\obj
 set LIB_DIR=%FFMPEG_LIB%
 
-set CP_ALL=.;%BLD_DIR%\jar\jogl.all.jar;%BLD_DIR%\jar\jogl.test.jar;..\..\gluegen\%BLD_SUB%\gluegen-rt.jar;..\..\gluegen\make\lib\junit.jar;%ANT_PATH%\lib\ant.jar;%ANT_PATH%\lib\ant-junit.jar;%BLD_DIR%\..\make\lib\swt\win32-win32-x86_64\swt-debug.jar
+set CP_ALL=.;%BLD_DIR%\jar\jogl-all.jar;%BLD_DIR%\jar\jogl-test.jar;..\..\gluegen\%BLD_SUB%\gluegen-rt.jar;..\..\gluegen\make\lib\junit.jar;%ANT_PATH%\lib\ant.jar;%ANT_PATH%\lib\ant-junit.jar;%BLD_DIR%\..\make\lib\swt\win32-win32-x86_64\swt-debug.jar
 
 echo CP_ALL %CP_ALL%
 
-set D_ARGS="-Djogamp.debug.IOUtil" "-Djogl.debug.GLSLCode" "-Djogl.debug.GLMediaPlayer"
+REM set D_ARGS="-Djogl.debug.GLContext" "-Djogl.debug.FBObject"
+REM set D_ARGS="-Djogl.debug.GLDrawable" "-Djogl.debug.EGLDrawableFactory.DontQuery"
+REM set D_ARGS="-Djogl.debug.GLDrawable" "-Djogl.debug.EGLDrawableFactory.QueryNativeTK"
+REM set D_ARGS="-Djogl.debug=all" "-Dnewt.debug=all" "-Dnativewindow.debug=all"
+REM set D_ARGS="-Djogl.debug=all" "-Dnewt.debug=all" "-Dnativewindow.debug=all" "-Djogamp.debug=all" "-Djogl.debug.EGLDrawableFactory.DontQuery"
+REM set D_ARGS="-Dnativewindow.debug.GraphicsConfiguration -Djogl.debug.CapabilitiesChooser -Djogl.debug.GLProfile"
+REM set D_ARGS="-Djogamp.debug.IOUtil" "-Djogl.debug.GLSLCode" "-Djogl.debug.GLMediaPlayer"
 REM set D_ARGS="-Djogamp.debug.NativeLibrary=true" "-Djogamp.debug.NativeLibrary.Lookup=true" "-Djogl.debug.GLSLCode"
 REM set D_ARGS="-Djogl.debug.ExtensionAvailabilityCache" "-Djogl.debug=all" "-Dnewt.debug=all" "-Dnativewindow.debug=all" "-Djogamp.debug.ProcAddressHelper=true" "-Djogamp.debug.NativeLibrary=true" "-Djogamp.debug.NativeLibrary.Lookup=true"
 REM set D_ARGS="-Djogl.debug=all" "-Dnewt.debug=all" "-Dnativewindow.debug=all" "-Djogamp.debug.NativeLibrary=true"
@@ -30,10 +37,9 @@ REM set D_ARGS="-Djogl.debug=all"
 REM set D_ARGS="-Djogl.debug.GLCanvas" "-Djogl.debug.Animator" "-Djogl.debug.GLContext" "-Djogl.debug.GLContext.TraceSwitch" "-Djogl.debug.DebugGL" "-Djogl.debug.TraceGL"
 REM set D_ARGS="-Djogl.debug.GLCanvas" "-Djogl.debug.Animator" "-Djogl.debug.GLContext" "-Djogl.debug.GLContext.TraceSwitch" "-Djogl.windows.useWGLVersionOf5WGLGDIFuncSet"
 REM set D_ARGS="-Djogl.debug.GLCanvas" "-Djogl.debug.Animator" "-Djogl.debug.GLContext" "-Djogl.debug.GLContext.TraceSwitch"
-REM set D_ARGS="-Dnewt.debug.Window"
+set D_ARGS="-Dnewt.debug.Window" "-Dnewt.debug.Display"
 REM set D_ARGS="-Djogl.debug.GLDebugMessageHandler" "-Djogl.debug.DebugGL" "-Djogl.debug.TraceGL"
 REM set D_ARGS="-Djogl.debug.DebugGL" "-Djogl.debug.GLDebugMessageHandler" "-Djogl.debug.GLSLCode"
-REM set D_ARGS="-Djogl.debug.GraphicsConfiguration" "-Djogl.debug.CapabilitiesChooser"
 REM set D_ARGS="-Djogl.debug.GLContext" "-Dnewt.debug=all"
 REM set D_ARGS="-Dnewt.debug.Window" "-Dnativewindow.debug.TraceLock"
 REM set D_ARGS="-Dnativewindow.debug.TraceLock"
diff --git a/make/scripts/java-win64.bat b/make/scripts/java-win64.bat
index ba4fdb1..2c09fee 100755
--- a/make/scripts/java-win64.bat
+++ b/make/scripts/java-win64.bat
@@ -4,13 +4,14 @@ set J2RE_HOME=c:\jre1.6.0_30_x64
 set JAVA_HOME=c:\jdk1.6.0_30_x64
 set ANT_PATH=C:\apache-ant-1.8.2
 
-set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;c:\mingw\bin;%PATH%
+REM set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;c:\mingw\bin;%PATH%
+set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;%PROJECT_ROOT%\make\lib\external\PVRVFrame\OGLES-2.0\Windows_x86_64;%PATH%
 
 set BLD_DIR=..\%BLD_SUB%
 REM set LIB_DIR=%BLD_DIR%\lib;..\..\gluegen\%BLD_SUB%\obj
 set LIB_DIR=
 
-set CP_ALL=.;%BLD_DIR%\jar\jogl.all.jar;%BLD_DIR%\jar\jogl.test.jar;..\..\gluegen\%BLD_SUB%\gluegen-rt.jar;..\..\gluegen\make\lib\junit.jar;%ANT_PATH%\lib\ant.jar;%ANT_PATH%\lib\ant-junit.jar;%BLD_DIR%\..\make\lib\swt\win32-win32-x86_64\swt-debug.jar
+set CP_ALL=.;%BLD_DIR%\jar\jogl-all.jar;%BLD_DIR%\jar\jogl-test.jar;..\..\gluegen\%BLD_SUB%\gluegen-rt.jar;..\..\gluegen\make\lib\junit.jar;%ANT_PATH%\lib\ant.jar;%ANT_PATH%\lib\ant-junit.jar;%BLD_DIR%\..\make\lib\swt\win32-win32-x86_64\swt-debug.jar
 echo CP_ALL %CP_ALL%
 
 set X_ARGS="-Dsun.java2d.noddraw=true" "-Dsun.awt.noerasebackground=true"
diff --git a/make/scripts/setenv-jogl.sh b/make/scripts/setenv-jogl.sh
index 38fd8de..4067e65 100755
--- a/make/scripts/setenv-jogl.sh
+++ b/make/scripts/setenv-jogl.sh
@@ -57,7 +57,7 @@ GLUEGEN_OS=$GLUEGEN_BUILDDIR/obj
 JUNIT_JAR=$GLUEGEN_DIR/make/lib/junit.jar
 
 if [ -z "$ANT_PATH" ] ; then
-    ANT_PATH=$(dirname `which ant`)/..
+    ANT_PATH=$(dirname $(dirname $(which ant)))
     if [ -e $ANT_PATH/lib/ant.jar ] ; then
         export ANT_PATH
         echo autosetting ANT_PATH to $ANT_PATH
@@ -76,8 +76,8 @@ echo JOGL BUILDDIR: $JOGL_BUILDDIR
 echo JOGL BUILDDIR BASE: $JOGL_BUILDDIR_BASE
 echo JOGL PROFILE: $JOGL_PROFILE
 
-J2RE_HOME=$(which java)
-JAVA_HOME=$(which javac)
+J2RE_HOME=$(dirname $(dirname $(which java)))
+JAVA_HOME=$(dirname $(dirname $(which javac)))
 CP_SEP=:
 
 . $JOGL_DIR/etc/profile.jogl $JOGL_PROFILE $JOGL_BUILDDIR 
@@ -93,8 +93,8 @@ CLASSPATH=.:$GLUEGEN_JAR:$JOGL_CLASSPATH:$SWT_CLASSPATH:$JUNIT_JAR:$ANT_JARS
 export CLASSPATH
 
 # We use TempJarCache per default now!
-#export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$GLUEGEN_OS:$JOGL_LIB_DIR
-#export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$GLUEGEN_OS:$JOGL_LIB_DIR
+export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$GLUEGEN_OS:$JOGL_LIB_DIR
+export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$GLUEGEN_OS:$JOGL_LIB_DIR
 
 echo JOGAMP_ALL_AWT_CLASSPATH: $CLASSPATH
 echo JOGAMP_ALL_NOAWT_CLASSPATH: $CLASSPATH
diff --git a/make/scripts/tests-osx-x64-mainthread.sh b/make/scripts/tests-osx-x64-mainthread.sh
new file mode 100644
index 0000000..bf95a9b
--- /dev/null
+++ b/make/scripts/tests-osx-x64-mainthread.sh
@@ -0,0 +1,11 @@
+
+export CLASSPATH=.:../../gluegen/make/../build-macosx/gluegen-rt.jar:../build-macosx/jar/jogl-all-noawt.jar:../build-macosx/jar/jogl-test.jar:../build-macosx/../make/lib/swt/cocoa-macosx-x86_64/swt-debug.jar:../../gluegen/make/../make/lib/junit.jar:/opt-share/apache-ant/lib/ant.jar:/opt-share/apache-ant/lib/ant-junit.jar:../build-macosx/jar/atomic/jogl-swt.jar:../build-macosx/jar/jogl-test.jar
+
+/usr/bin/java -d64 -XstartOnFirstThread -Djava.awt.headless=true  com.jogamp.opengl.test.junit.jogl.swt.TestSWTJOGLGLCanvas01GLn
+#/usr/bin/java -d64 -XstartOnFirstThread -Djava.awt.headless=false com.jogamp.opengl.test.junit.jogl.swt.TestSWTJOGLGLCanvas01GLn
+
+#
+# Not working!
+#/usr/bin/java -d64                      -Djava.awt.headless=true  com.jogamp.opengl.test.junit.jogl.swt.TestSWTJOGLGLCanvas01GLn
+#/usr/bin/java -d64                      -Djava.awt.headless=false com.jogamp.opengl.test.junit.jogl.swt.TestSWTJOGLGLCanvas01GLn
+
diff --git a/make/scripts/tests-x32.bat b/make/scripts/tests-x32.bat
index c29dcef..7947759 100755
--- a/make/scripts/tests-x32.bat
+++ b/make/scripts/tests-x32.bat
@@ -51,7 +51,7 @@ REM scripts\java-win32-dbg.bat com.jogamp.opengl.test.junit.newt.TestScreenMode0
 REM scripts\java-win32.bat com.jogamp.opengl.test.junit.newt.ManualScreenMode03NEWT
 
 REM scripts\java-win32-dbg.bat com.jogamp.opengl.test.junit.jogl.demos.es2.av.MovieSimple %*
-scripts\java-win32-dbg.bat com.jogamp.opengl.test.junit.jogl.demos.es2.av.MovieCube %*
+REM scripts\java-win32-dbg.bat com.jogamp.opengl.test.junit.jogl.demos.es2.av.MovieCube %*
 REM scripts\java-win32-dbg.bat com.jogamp.opengl.test.junit.jogl.demos.es2.TexCubeES2 %*
 
 REM scripts\java-win32-dbg.bat com.jogamp.opengl.test.junit.newt.TestDisplayLifecycle01NEWT
@@ -94,6 +94,7 @@ REM scripts\java-win32-dbg.bat com.jogamp.opengl.test.junit.jogl.acore.TestGPUMe
 REM scripts\java-win32.bat com.jogamp.opengl.test.junit.jogl.acore.TestMapBuffer01NEWT
 
 REM scripts\java-win32.bat com.jogamp.opengl.test.junit.jogl.glsl.TestRulerNEWT01
+scripts\java-win32-dbg.bat com.jogamp.opengl.test.junit.jogl.acore.TestFBODrawableNEWT %*
 REM scripts\java-win32.bat com.jogamp.opengl.test.junit.jogl.glsl.TestFBOMRTNEWT01
 
 REM scripts\java-win32-dbg.bat com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestElektronenMultipliziererNEWT %*
diff --git a/make/scripts/tests-x64.bat b/make/scripts/tests-x64.bat
index f0144f1..6d3e46a 100755
--- a/make/scripts/tests-x64.bat
+++ b/make/scripts/tests-x64.bat
@@ -28,22 +28,29 @@ REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.jogl.glsl.TestTransf
 REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.jogl.glsl.TestGLSLSimple01NEWT -time 2000
 
 REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.newt.TestParenting01AWT
-REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.newt.parenting.TestParenting01bAWT %*
-REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.newt.parenting.TestParenting01cAWT -time 50000
 REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.newt.TestListenerCom01AWT
 REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.newt.parenting.TestParenting01NEWT %*
+REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.newt.parenting.TestParenting02NEWT %*
+REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.newt.parenting.TestParenting01bAWT %*
+REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.newt.parenting.TestParenting01cAWT -time 50000
+REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.newt.parenting.TestParenting03AWT %*
+REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.newt.parenting.TestParenting03bAWT -time 100000
+REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.newt.parenting.TestParentingFocusTraversal01AWT %*
+REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.newt.parenting.TestParentingOffscreenLayer01AWT %*
+REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.newt.parenting.TestParenting01aSWT $*
+REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.newt.parenting.TestParenting04AWT $*
+scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.newt.parenting.TestParenting04SWT $*
+
+REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.jogl.swt.TestSWTAccessor03AWTGLn $*
+REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.jogl.swt.TestSWTJOGLGLCanvas01GLn $*
+REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.jogl.swt.TestNewtCanvasSWTGLn $*
 
 REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.newt.TestWindows01NEWT
 REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.newt.TestGLWindows01NEWT
 REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.newt.TestGLWindows02NEWTAnimated
-REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.newt.parenting.TestParenting01NEWT
-REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.newt.TestFocus01SwingAWTRobot %*
+REM scripts\java-win64.bat com.jogamp.opengl.test.junit.newt.TestFocus01SwingAWTRobot %*
 REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.newt.TestFocus02SwingAWTRobot %*
 REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.nativewindow.TestRecursiveToolkitLockCORE
-REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.newt.parenting.TestParenting03AWT %*
-REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.newt.parenting.TestParentingFocusTraversal01AWT %*
-REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.newt.parenting.TestParentingOffscreenLayer01AWT %*
-REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.newt.parenting.TestParenting03bAWT -time 100000
 
 REM scripts\java-win64.bat com.jogamp.opengl.test.junit.newt.TestFocus02SwingAWTRobot
 REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.newt.TestScreenMode00NEWT
@@ -52,12 +59,10 @@ REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.newt.TestScreenMode0
 REM scripts\java-win64.bat com.jogamp.opengl.test.junit.newt.ManualScreenMode03NEWT
 
 REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.jogl.demos.es2.av.MovieSimple %*
-scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.jogl.demos.es2.av.MovieCube %*
+REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.jogl.demos.es2.av.MovieCube %*
 REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.jogl.demos.es2.TexCubeES2 %*
 
 REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.newt.TestDisplayLifecycle01NEWT
-REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.newt.parenting.TestParenting01NEWT
-REM scripts\java-win64.bat com.jogamp.opengl.test.junit.newt.parenting.TestParenting02NEWT %*
 REM scripts\java-win64.bat com.jogamp.opengl.test.junit.newt.TestCloseNewtAWT
 
 REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.jogl.caps.TestMultisampleAWT -time 10000
@@ -71,7 +76,8 @@ REM scripts\java-win64.bat com.jogamp.opengl.test.junit.newt.TestWindowClosingPr
 
 REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.jogl.swt.TestSWT01GLn %*
 REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.jogl.swt.TestSWT02GLn %*
-REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.jogl.swt.TestSWTAWT01GLn $*
+REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.jogl.swt.TestSWTAWT01GLn %*
+REM scripts\java-win64.bat com.jogamp.opengl.test.junit.jogl.swt.TestSWTJOGLGLCanvas01GLn %*
 
 REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.jogl.offscreen.TestOffscreen02BitmapNEWT -time 5000
 
@@ -95,7 +101,8 @@ REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.jogl.acore.TestGPUMe
 REM scripts\java-win64.bat com.jogamp.opengl.test.junit.jogl.acore.TestMapBuffer01NEWT
 
 REM scripts\java-win64.bat com.jogamp.opengl.test.junit.jogl.glsl.TestRulerNEWT01
-REM scripts\java-win64.bat com.jogamp.opengl.test.junit.jogl.glsl.TestFBOMRTNEWT01
+REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.jogl.acore.TestFBODrawableNEWT %*
+REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.jogl.glsl.TestFBOMRTNEWT01 %*
 
 REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestElektronenMultipliziererNEWT %*
 
diff --git a/make/scripts/tests.sh b/make/scripts/tests.sh
index c9db615..43d04c6 100755
--- a/make/scripts/tests.sh
+++ b/make/scripts/tests.sh
@@ -53,12 +53,22 @@ function jrun() {
     swton=$1
     shift
 
-    #D_ARGS="-Djogl.debug.DebugGL -Djogl.debug.TraceGL"
+    #D_ARGS="-Djogl.debug.TraceGL -Djogl.debug.DebugGL -Djogl.debug.GLSLCode"
+    #D_ARGS="-Djogl.debug.FBObject"
+    #D_ARGS="-Dnativewindow.debug.GraphicsConfiguration -Djogl.debug.GLDrawable -Djogl.debug.GLContext -Djogl.debug.FBObject"
+    #D_ARGS="-Djogl.debug.GLContext.NoProfileAliasing"
+    #D_ARGS="-Djogamp.debug=all -Dnativewindow.debug=all -Djogl.debug=all -Dnewt.debug=all"
+    #D_ARGS="-Djogl.debug=all -Dnativewindow.debug=all -Dnewt.debug=all"
+    #D_ARGS="-Djogl.debug=all -Dnativewindow.debug=all -Dnewt.debug=all -Djogamp.debug.Lock"
+    #D_ARGS="-Djogl.debug=all -Dnativewindow.debug=all"
+    #D_ARGS="-Dnewt.debug.Window"
+    #D_ARGS="-Djogl.debug.GLDrawable"
+    #D_ARGS="-Djogl.debug.EGLDrawableFactory.DontQuery -Djogl.debug.GLDrawable"
+    #D_ARGS="-Djogl.debug.EGLDrawableFactory.QueryNativeTK -Djogl.debug.GLDrawable"
     #D_ARGS="-Djogl.debug.GLDebugMessageHandler"
     #D_ARGS="-Djogl.debug.GLDebugMessageHandler -Djogl.debug.DebugGL"
     #D_ARGS="-Djogl.debug.GLDebugMessageHandler -Djogl.debug.TraceGL -Djogl.debug.DebugGL -Djogl.debug.GLSLCode -Djogl.debug.GLSLState"
     #D_ARGS="-Djogl.debug.GLDebugMessageHandler -Djogl.debug.DebugGL -Djogl.debug.TraceGL"
-    #D_ARGS="-Djogl.debug.TraceGL -Djogl.debug.DebugGL -Djogl.debug.GLSLCode"
     #D_ARGS="-Djogamp.debug.NativeLibrary -Djogamp.debug.NativeLibrary.UseCurrentThreadLibLoader"
     #D_ARGS="-Djogl.1thread=false -Djogl.debug.Threading"
     #D_ARGS="-Djogl.1thread=true -Djogl.debug.Threading"
@@ -66,14 +76,12 @@ function jrun() {
     #D_ARGS="-Djogamp.debug.IOUtil -Djogl.debug.GLSLCode -Djogl.debug.GLMediaPlayer"
     #D_ARGS="-Djogl.debug.GLArrayData"
     #D_ARGS="-Djogl.debug.EGL -Dnativewindow.debug.GraphicsConfiguration -Djogl.debug.GLDrawable"
+    #D_ARGS="-Djogl.debug.GLDrawable"
     #D_ARGS="-Dnewt.test.Screen.disableScreenMode -Dnewt.debug.Screen"
     #D_ARGS="-Djogl.debug.ExtensionAvailabilityCache -Djogl.debug=all -Dnativewindow.debug=all -Djogamp.debug.ProcAddressHelper=true -Djogamp.debug.NativeLibrary=true -Djogamp.debug.NativeLibrary.Lookup=true"
-    #D_ARGS="-Djogamp.debug=all -Dnativewindow.debug=all -Djogl.debug=all -Dnewt.debug=all"
     #D_ARGS="-Dnewt.debug.MainThread"
     #D_ARGS="-Dnewt.debug.Window"
-    #D_ARGS="-Djogl.debug=all -Dnativewindow.debug=all"
     #D_ARGS="-Dnativewindow.debug.GraphicsConfiguration -Dnativewindow.debug.NativeWindow"
-    #D_ARGS="-Djogl.debug=all"
     #D_ARGS="-Djogl.debug.GLCanvas -Djogl.debug.Animator -Djogl.debug.GLDrawable -Djogl.debug.GLContext -Djogl.debug.GLContext.TraceSwitch"
     #D_ARGS="-Djogl.debug.GLContext -Djogl.debug.ExtensionAvailabilityCache"
     #D_ARGS="-Djogl.debug.GLContext -Djogl.debug.GLProfile -Djogl.debug.GLDrawable"
@@ -83,11 +91,13 @@ function jrun() {
     #D_ARGS="-Dnativewindow.debug.NativeWindow"
     #D_ARGS="-Dnewt.debug.Window -Dnewt.debug.Display -Dnewt.debug.EDT"
     #D_ARGS="-Dnewt.debug.EDT -Dnewt.debug.Window -Djogl.debug.GLContext"
-    #D_ARGS="-Dnativewindow.debug.ToolkitLock.TraceLock -Dnativewindow.debug.X11Util.TraceDisplayLifecycle=true -Dnativewindow.debug.X11Util"
+    #D_ARGS="-Dnativewindow.debug.X11Util.XErrorStackDump -Dnativewindow.debug.X11Util.TraceDisplayLifecycle -Dnativewindow.debug.X11Util"
     #D_ARGS="-Dnativewindow.debug.X11Util -Djogl.debug.GLContext -Djogl.debug.GLDrawable -Dnewt.debug=all"
+    #D_ARGS="-Dnativewindow.debug.X11Util -Dnativewindow.debug.X11Util.XSync"
+    #D_ARGS="-Dnativewindow.debug.X11Util.XSync -Dnewt.debug.Window"
     #D_ARGS="-Djogl.debug.GLDrawable -Djogl.debug.GLContext"
+    #D_ARGS="-Djogamp.common.utils.locks.Lock.timeout=3000 -Djogamp.debug.Lock -Djogl.debug.GLContext.TraceSwitch"
     #D_ARGS="-Djogamp.common.utils.locks.Lock.timeout=600000 -Djogamp.debug.Lock -Djogamp.debug.Lock.TraceLock"
-    #D_ARGS="-Djogamp.common.utils.locks.Lock.timeout=3000 -Djogamp.debug.Lock -Djogamp.debug.Lock.TraceLock"
     #D_ARGS="-Djogamp.common.utils.locks.Lock.timeout=600000 -Djogamp.debug.Lock -Djogamp.debug.Lock.TraceLock -Dnativewindow.debug.ToolkitLock.TraceLock"
     #D_ARGS="-Djogamp.common.utils.locks.Lock.timeout=600000 -Djogamp.debug.Lock -Dnativewindow.debug.X11Util"
     #D_ARGS="-Dnewt.debug.EDT -Djogamp.common.utils.locks.Lock.timeout=600000 -Djogl.debug.Animator -Dnewt.debug.Display -Dnewt.debug.Screen"
@@ -96,13 +106,10 @@ function jrun() {
     #D_ARGS="-Djogl.debug.Animator -Dnewt.debug=all"
     #D_ARGS="-Dnewt.debug.EDT -Dnewt.debug.Display -Dnativewindow.debug.X11Util -Djogl.debug.GLDrawable -Djogl.debug.GLCanvas"
     #D_ARGS="-Djogl.debug.GLContext"
-    #D_ARGS="-Djogl.debug.GraphicsConfiguration -Djogl.debug.CapabilitiesChooser"
+    #D_ARGS="-Dnativewindow.debug.GraphicsConfiguration -Djogl.debug.CapabilitiesChooser"
     #D_ARGS="-Dnewt.debug.Screen -Dnewt.debug.EDT -Djogamp.debug.Lock"
-    #D_ARGS="-Djogl.debug.GLContext -Djogl.debug.GraphicsConfiguration"
+    #D_ARGS="-Djogl.debug.GLContext -Dnativewindow.debug.GraphicsConfiguration"
     #D_ARGS="-Dnewt.debug.EDT"
-    #D_ARGS="-Djogamp.debug=all -Djogl.debug=all -Dnativewindow.debug=all -Dnewt.debug=all"
-    #D_ARGS="-Djogl.debug=all -Dnativewindow.debug=all -Dnewt.debug=all"
-    #D_ARGS="-Djogl.debug=all -Dnewt.debug=all"
     #D_ARGS="-Dnewt.debug.Window -Dnewt.debug.Display -Dnewt.debug.EDT -Djogl.debug.GLContext"
     #D_ARGS="-Dnewt.debug.Window -Djogl.debug.Animator -Dnewt.debug.Screen"
     #D_ARGS="-Dnewt.debug.Window"
@@ -114,17 +121,13 @@ function jrun() {
     #D_ARGS="-Xprof"
     #D_ARGS="-Djogl.debug.Animator"
     #D_ARGS="-Dnativewindow.debug=all"
-    #D_ARGS="-Djogl.debug.GraphicsConfiguration"
-    #D_ARGS="-Djogl.debug.GLCanvas -Djogl.debug.GraphicsConfiguration"
     #D_ARGS="-Djogl.debug.GLCanvas"
     #D_ARGS="-Dnativewindow.debug.ToolkitLock.TraceLock"
     #D_ARGS="-Djogl.debug.graph.curve -Djogl.debug.GLSLCode -Djogl.debug.TraceGL"
     #D_ARGS="-Djogl.debug.graph.curve -Djogl.debug.GLSLState"
-    #D_ARGS="-Djogamp.debug.JARUtil"
-    #D_ARGS="-Djogamp.debug.TempFileCache"
-    #D_ARGS="-Djogamp.debug.JNILibLoader -Djogamp.debug.TempFileCache -Djogamp.debug.JARUtil"
-    #D_ARGS="-Djogamp.debug.JNILibLoader"
-    #D_ARGS="-Djogamp.debug.JNILibLoader -Djogamp.gluegen.UseTempJarCache=false -Djogamp.debug.JARUtil"
+    #D_ARGS="-Djogamp.debug.JNILibLoader -Djogamp.debug.TempJarCache -Djogamp.debug.JarUtil"
+    #D_ARGS="-Djogamp.debug.JNILibLoader -Djogamp.debug.TempFileCache -Djogamp.debug.TempJarCache -Djogamp.debug.JarUtil"
+    #D_ARGS="-Djogamp.debug.JNILibLoader -Djogamp.debug.TempFileCache -Djogamp.debug.TempJarCache -Djogamp.debug.JarUtil -Djogamp.gluegen.UseTempJarCache=false"
     #D_ARGS="-Dnewt.test.EDTMainThread -Dnewt.debug.MainThread"
     #C_ARG="com.jogamp.newt.util.MainThread"
     #D_ARGS="-Dnewt.debug.MainThread"
@@ -142,7 +145,10 @@ function jrun() {
         echo CLASSPATH $CLASSPATH
         X_ARGS="-Djava.awt.headless=false $X_ARGS"
     else
-        export CLASSPATH=$JOGAMP_ALL_NOAWT_CLASSPATH
+        export CLASSPATH=$JOGAMP_ALL_AWT_CLASSPATH
+        #export CLASSPATH=$JOGAMP_ALL_NOAWT_CLASSPATH
+        #export CLASSPATH=$JOGAMP_MOBILE_CLASSPATH
+        #export CLASSPATH=.:$GLUEGEN_JAR:$JOGL_BUILD_DIR/jar/atomic/jogl-core.jar:$JOGL_BUILD_DIR/jar/atomic/jogl-gldesktop.jar:$JOGL_BUILD_DIR/jar/atomic/jogl-os-x11.jar:$JOGL_BUILD_DIR/jar/atomic/jogl-util.jar:$JOGL_BUILD_DIR/jar/atomic/nativewindow-core.jar:$JOGL_BUILD_DIR/jar/atomic/nativewindow-os-x11.jar:$JOGL_BUILD_DIR/jar/atomic/newt-core.jar:$JOGL_BUILD_DIR/jar/atomic/newt-driver-x11.jar:$JOGL_BUILD_DIR/jar/atomic/newt-ogl.jar:$JOGL_BUILD_DIR/jar/jogl-test.jar:$SWT_CLASSPATH:$JU [...]
         X_ARGS="-Djava.awt.headless=true $X_ARGS"
     fi
     if [ $swton -eq 1 ] ; then
@@ -161,20 +167,20 @@ function jrun() {
             C_ARG="com.jogamp.newt.util.MainThread"
         fi
     fi
+    #export LD_LIBRARY_PATH=$spath/../lib/external/PVRVFrame/OGLES-2.0/Linux_x86_64:$LD_LIBRARY_PATH
+    #export LD_LIBRARY_PATH=$spath/../lib/external/PVRVFrame/OGLES-2.0/Linux_x86_32:$LD_LIBRARY_PATH
+    #export LD_LIBRARY_PATH=/usr/local/projects/Xorg.modular/build-x86_64/lib:$LD_LIBRARY_PATH
+    #export LD_LIBRARY_PATH=/opt-linux-x86_64/x11lib-1.3:$LD_LIBRARY_PATH
+    #export LD_LIBRARY_PATH=/opt-linux-x86_64/mesa-7.8.1/lib64:$LD_LIBRARY_PATH
+    #export LD_LIBRARY_PATH=/usr/lib/mesa:/usr/lib32/mesa:$LD_LIBRARY_PATH
+    #export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/mesa:/usr/lib/i386-linux-gnu/mesa:$LD_LIBRARY_PATH
     echo
     echo "Test Start: $*"
     echo
     echo LD_LIBRARY_PATH $LD_LIBRARY_PATH
     echo
     echo $javaexe $javaxargs $X_ARGS $D_ARGS $C_ARG $*
-    #LD_LIBRARY_PATH=/usr/local/projects/Xorg.modular/build-x86_64/lib:$LD_LIBRARY_PATH \
-    #LD_LIBRARY_PATH=/opt-linux-x86_64/x11lib-1.3:$LD_LIBRARY_PATH \
-    #LD_LIBRARY_PATH=/opt-linux-x86_64/mesa-7.8.1/lib64:$LD_LIBRARY_PATH \
     #LIBGL_DRIVERS_PATH=/usr/lib/mesa:/usr/lib32/mesa \
-    #LD_LIBRARY_PATH=/usr/lib/mesa:/usr/lib32/mesa:$LD_LIBRARY_PATH \
-    #LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/mesa:/usr/lib/i386-linux-gnu/mesa:$LD_LIBRARY_PATH \
-    #LD_LIBRARY_PATH=$spath/../lib/PVRVFrame/OGLES-2.0/Linux_x86_64:$LD_LIBRARY_PATH \
-    #LD_LIBRARY_PATH=$spath/../lib/PVRVFrame/OGLES-2.0/Linux_x86_32:$LD_LIBRARY_PATH \
     #gdb --args $javaexe $javaxargs $X_ARGS $D_ARGS $C_ARG $*
     $javaexe $javaxargs $X_ARGS $D_ARGS $C_ARG $*
     echo
@@ -211,8 +217,7 @@ function testawtswt() {
 #testnoawt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NEWT $*
 #testnoawt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestElektronenMultipliziererNEWT $*
 #testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestFloatUtil01MatrixMatrixMultNOUI $*
-#testnoawt com.jogamp.opengl.test.junit.jogl.glu.TestGluUnprojectFloatNOUI $*
-#testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestNEWTCloseX11DisplayBug565 $*
+testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestNEWTCloseX11DisplayBug565 $*
 #testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestMainVersionGLWindowNEWT $*
 #testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestGLProfile01NEWT $*
 #testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestShutdownCompleteNEWT $*
@@ -226,6 +231,16 @@ function testawtswt() {
 #testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestSharedContextVBOES1NEWT $*
 #testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestSharedContextVBOES2NEWT $*
 #testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestSharedContextVBOES2NEWT2 $*
+#testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestGLAutoDrawableDelegateNEWT $*
+#testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestGLContextDrawableSwitchNEWT $*
+#testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestFBODrawableNEWT $*
+
+#testnoawt com.jogamp.opengl.test.junit.newt.parenting.TestParenting01NEWT $*
+#testnoawt com.jogamp.opengl.test.junit.newt.parenting.TestParenting02NEWT $*
+#testawt com.jogamp.opengl.test.junit.newt.parenting.TestParenting01cSwingAWT $*
+
+
+#testnoawt com.jogamp.opengl.test.junit.jogl.glu.TestGluUnprojectFloatNOUI $*
 #testnoawt com.jogamp.opengl.test.junit.newt.TestRemoteWindow01NEWT $*
 #testnoawt com.jogamp.opengl.test.junit.newt.TestRemoteGLWindows01NEWT $*
 #testnoawt com.jogamp.opengl.test.junit.jogl.demos.gl2.newt.TestGearsNEWT $*
@@ -282,16 +297,19 @@ function testawtswt() {
 #
 # swt (testswt)
 #
-#testswt com.jogamp.opengl.test.junit.jogl.swt.TestSWT01GLn $*
-#testswt com.jogamp.opengl.test.junit.jogl.swt.TestSWT02GLn $*
-#testswt com.jogamp.opengl.test.junit.jogl.swt.TestSWTGLCanvas01GLn $*
-#testawt com.jogamp.opengl.test.junit.jogl.swt.TestSWTAccessor02GLn $*
+#testswt com.jogamp.opengl.test.junit.jogl.swt.TestSWTEclipseGLCanvas01GLn $*
+#testswt com.jogamp.opengl.test.junit.jogl.swt.TestSWTJOGLGLCanvas01GLn $*
+#testswt com.jogamp.opengl.test.junit.jogl.swt.TestNewtCanvasSWTGLn $*
 
 #
-# awtswt (testawtswt)
+# awtswt (testawtswt) 
+#   Per default (unit tests) all test are performed this way
+#   with OSX: -XstartOnFirstThread
 #
-#testawt com.jogamp.opengl.test.junit.jogl.swt.TestSWTAWT01GLn $*
-#testawtswt com.jogamp.opengl.test.junit.jogl.swt.TestSWTJOGLGLCanvas01GLnAWT $*
+#testawtswt com.jogamp.opengl.test.junit.jogl.swt.TestSWTEclipseGLCanvas01GLn $*
+#testawtswt com.jogamp.opengl.test.junit.jogl.swt.TestSWTAccessor03AWTGLn $*
+#testawtswt com.jogamp.opengl.test.junit.jogl.swt.TestSWTJOGLGLCanvas01GLn $*
+#testawtswt com.jogamp.opengl.test.junit.jogl.swt.TestNewtCanvasSWTGLn $*
 
 #
 # newt.awt (testawt)
@@ -308,13 +326,17 @@ function testawtswt() {
 #testawt com.jogamp.opengl.test.junit.newt.parenting.TestParenting01cSwingAWT $*
 #testawt com.jogamp.opengl.test.junit.newt.parenting.TestParenting02AWT $*
 #testawt com.jogamp.opengl.test.junit.newt.parenting.TestParenting03AWT $*
+#testawt com.jogamp.opengl.test.junit.newt.parenting.TestParenting04AWT $*
+#testawtswt com.jogamp.opengl.test.junit.newt.parenting.TestParenting01aSWT $*
+#testawtswt com.jogamp.opengl.test.junit.newt.parenting.TestParenting04SWT $*
 #testawt com.jogamp.opengl.test.junit.newt.parenting.TestParentingFocusTraversal01AWT $*
 #testawt com.jogamp.opengl.test.junit.newt.parenting.TestParentingOffscreenLayer01GLCanvasAWT $*
 #testawt com.jogamp.opengl.test.junit.newt.parenting.TestParentingOffscreenLayer02NewtCanvasAWT $*
 #testawt com.jogamp.opengl.test.junit.newt.parenting.TestTranslucentParentingAWT $*
 #testawt com.jogamp.opengl.test.junit.newt.TestCloseNewtAWT
 #testawt com.jogamp.opengl.test.junit.jogl.caps.TestMultisampleES1AWT $*
-#testawt com.jogamp.opengl.test.junit.jogl.caps.TestMultisampleES1NEWT $*
+#testnoawt com.jogamp.opengl.test.junit.jogl.caps.TestMultisampleES1NEWT $*
+#testnoawt com.jogamp.opengl.test.junit.jogl.caps.TestMultisampleES2NEWT $*
 #testawt com.jogamp.opengl.test.junit.jogl.caps.TestTranslucencyAWT $*
 #testawt com.jogamp.opengl.test.junit.jogl.caps.TestTranslucencyNEWT $*
 #testawt com.jogamp.opengl.test.junit.jogl.glsl.TestShaderCompilationBug459AWT
@@ -330,9 +352,11 @@ function testawtswt() {
 #
 #testnoawt com.jogamp.opengl.test.junit.jogl.util.TestPNGImage01NEWT $*
 #testawt com.jogamp.opengl.test.junit.jogl.util.texture.TestTexture01AWT
-testawt com.jogamp.opengl.test.junit.jogl.util.texture.TestPNGTextureFromFileAWT $*
+#testawt com.jogamp.opengl.test.junit.jogl.util.texture.TestPNGTextureFromFileAWT $*
 #testnoawt com.jogamp.opengl.test.junit.jogl.util.texture.TestPNGTextureFromFileNEWT $*
+#testawt com.jogamp.opengl.test.junit.jogl.util.texture.TestGLReadBufferUtilTextureIOWrite01AWT $*
 #testnoawt com.jogamp.opengl.test.junit.jogl.util.texture.TestGLReadBufferUtilTextureIOWrite01NEWT $*
+#testawt com.jogamp.opengl.test.junit.jogl.util.texture.TestGLReadBufferUtilTextureIOWrite02AWT $*
 #testnoawt com.jogamp.opengl.test.junit.jogl.util.texture.TestGLReadBufferUtilTextureIOWrite02NEWT $*
 #testnoawt com.jogamp.opengl.test.junit.jogl.util.texture.TestTextureSequence01NEWT $*
 #testawt com.jogamp.opengl.test.junit.jogl.util.texture.TestTextureSequence01AWT $*
@@ -348,7 +372,9 @@ testawt com.jogamp.opengl.test.junit.jogl.util.texture.TestPNGTextureFromFileAWT
 #testnoawt com.jogamp.opengl.test.junit.jogl.glsl.TestGLSLShaderState01NEWT $*
 #testnoawt com.jogamp.opengl.test.junit.jogl.glsl.TestGLSLShaderState02NEWT $*
 #testnoawt com.jogamp.opengl.test.junit.jogl.glsl.TestRulerNEWT01 $*
-#testnoawt com.jogamp.opengl.test.junit.jogl.glsl.TestFBOMRTNEWT01 $*
+#testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestFBOMRTNEWT01 $*
+#testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestFBOMix2DemosES2NEWT $*
+#testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestFBODrawableNEWT $*
 
 #
 # Graph
@@ -384,13 +410,12 @@ testawt com.jogamp.opengl.test.junit.jogl.util.texture.TestPNGTextureFromFileAWT
 #testawt com.jogamp.opengl.test.junit.newt.TestFocus02SwingAWTRobot $*
 
 #linux:
-#testawt com.jogamp.opengl.test.junit.newt.parenting.TestParenting01cSwingAWT $*
-#testnoawt com.jogamp.opengl.test.junit.jogl.glsl.TestGLSLShaderState02NEWT $*
 
 # osx:
-#testawtswt com.jogamp.opengl.test.junit.jogl.swt.TestSWTJOGLGLCanvas01GLnAWT $*
 #testawt com.jogamp.opengl.test.junit.newt.parenting.TestParentingFocusTraversal01AWT $*
 #testawt com.jogamp.opengl.test.junit.newt.parenting.TestParentingOffscreenLayer01GLCanvasAWT $*
+
+#testawt com.jogamp.opengl.test.junit.newt.parenting.TestParentingOffscreenLayer01GLCanvasAWT $*
 #testawt com.jogamp.opengl.test.junit.newt.parenting.TestParentingOffscreenLayer02NewtCanvasAWT $*
 
 $spath/count-edt-start.sh java-run.log
diff --git a/make/stub_includes/opengl/macosx-window-system.h b/make/stub_includes/opengl/macosx-window-system.h
index e7fe135..47b51a5 100644
--- a/make/stub_includes/opengl/macosx-window-system.h
+++ b/make/stub_includes/opengl/macosx-window-system.h
@@ -31,7 +31,7 @@ NSView* getNSView(NSOpenGLContext* ctx);
 
 NSOpenGLContext* createContext(NSOpenGLContext* shareContext,
                     NSView* nsView,
-                    Bool isBackingLayerView,
+                    Bool allowIncompleteView,
                     NSOpenGLPixelFormat* pixelFormat,
                     Bool opaque,
                     int* viewNotReady);
diff --git a/make/stub_includes/win32/wingdi.h b/make/stub_includes/win32/wingdi.h
index 2d3e332..7a88582 100644
--- a/make/stub_includes/win32/wingdi.h
+++ b/make/stub_includes/win32/wingdi.h
@@ -44,6 +44,8 @@ WINUSERAPI BOOL WINAPI DestroyWindow(HWND hWnd);
 WINUSERAPI DWORD WINAPI GetObjectType(HGDIOBJ h);
 WINUSERAPI BOOL WINAPI IsWindowVisible(HWND hWnd);
 WINUSERAPI BOOL WINAPI IsWindow(HWND hWnd);
+WINUSERAPI HWND WINAPI GetParent(HWND hWnd);
+WINUSERAPI HWND WINAPI SetParent(HWND hWndChild,HWND hWndNewParent);
 
 WINUSERAPI HANDLE WINAPI GetCurrentProcess(void);
 WINUSERAPI BOOL WINAPI GetProcessAffinityMask(HANDLE hProcess,PDWORD_PTR lpProcessAffinityMask,PDWORD_PTR lpSystemAffinityMask);
diff --git a/src/jogl/classes/com/jogamp/gluegen/opengl/BuildComposablePipeline.java b/src/jogl/classes/com/jogamp/gluegen/opengl/BuildComposablePipeline.java
index 1d9cf36..5334d45 100644
--- a/src/jogl/classes/com/jogamp/gluegen/opengl/BuildComposablePipeline.java
+++ b/src/jogl/classes/com/jogamp/gluegen/opengl/BuildComposablePipeline.java
@@ -410,7 +410,7 @@ public class BuildComposablePipeline {
             output.flush();
             output.close();
 
-            System.out.println("wrote to file: " + file); // JAU
+            System.out.println("wrote to file: " + file);
         }
 
         /** Get the name of the object through which API calls should be routed. */
diff --git a/src/jogl/classes/com/jogamp/gluegen/opengl/BuildStaticGLInfo.java b/src/jogl/classes/com/jogamp/gluegen/opengl/BuildStaticGLInfo.java
index 87a734e..482d35c 100644
--- a/src/jogl/classes/com/jogamp/gluegen/opengl/BuildStaticGLInfo.java
+++ b/src/jogl/classes/com/jogamp/gluegen/opengl/BuildStaticGLInfo.java
@@ -293,9 +293,9 @@ public class BuildStaticGLInfo {
         output.println("  public static String getFunctionAssociation(String glFunctionName)");
         output.println("  {");
         output.println("    String mappedName = null;");
-        output.println("    int  funcNamePermNum = com.jogamp.gluegen.runtime.opengl.GLExtensionNames.getFuncNamePermutationNumber(glFunctionName);");
+        output.println("    int  funcNamePermNum = com.jogamp.gluegen.runtime.opengl.GLNameResolver.getFuncNamePermutationNumber(glFunctionName);");
         output.println("    for(int i = 0; null==mappedName && i < funcNamePermNum; i++) {");
-        output.println("        String tmp = com.jogamp.gluegen.runtime.opengl.GLExtensionNames.getFuncNamePermutation(glFunctionName, i);");
+        output.println("        String tmp = com.jogamp.gluegen.runtime.opengl.GLNameResolver.getFuncNamePermutation(glFunctionName, i);");
         output.println("        try {");
         output.println("          mappedName = (String)funcToAssocMap.get(tmp);");
         output.println("        } catch (Exception e) { }");
diff --git a/src/jogl/classes/com/jogamp/gluegen/opengl/GLConfiguration.java b/src/jogl/classes/com/jogamp/gluegen/opengl/GLConfiguration.java
index c1a4fac..ba025e1 100755
--- a/src/jogl/classes/com/jogamp/gluegen/opengl/GLConfiguration.java
+++ b/src/jogl/classes/com/jogamp/gluegen/opengl/GLConfiguration.java
@@ -43,7 +43,7 @@ import com.jogamp.gluegen.GlueEmitterControls;
 import com.jogamp.gluegen.GlueGen;
 import com.jogamp.gluegen.MethodBinding;
 import com.jogamp.gluegen.procaddress.ProcAddressConfiguration;
-import com.jogamp.gluegen.runtime.opengl.GLExtensionNames;
+import com.jogamp.gluegen.runtime.opengl.GLNameResolver;
 import java.io.File;
 import java.io.IOException;
 import java.util.ArrayList;
@@ -224,11 +224,11 @@ public class GLConfiguration extends ProcAddressConfiguration {
                     }
                 }
             }
-            boolean isGLEnum = GLExtensionNames.isGLEnumeration(symbol);
-            boolean isGLFunc = GLExtensionNames.isGLFunction(symbol);
+            boolean isGLEnum = GLNameResolver.isGLEnumeration(symbol);
+            boolean isGLFunc = GLNameResolver.isGLFunction(symbol);
             if (isGLFunc || isGLEnum) {
-                if (GLExtensionNames.isExtensionVEN(symbol, isGLFunc)) {
-                    String extSuffix = GLExtensionNames.getExtensionSuffix(symbol, isGLFunc);
+                if (GLNameResolver.isExtensionVEN(symbol, isGLFunc)) {
+                    String extSuffix = GLNameResolver.getExtensionSuffix(symbol, isGLFunc);
                     if (getDropUniqVendorExtensions(extSuffix)) {
                         if (DEBUG_IGNORES) {
                             System.err.println("Ignore UniqVendorEXT: " + symbol + ", vendor " + extSuffix);
diff --git a/src/jogl/classes/com/jogamp/gluegen/opengl/GLEmitter.java b/src/jogl/classes/com/jogamp/gluegen/opengl/GLEmitter.java
index f4658ad..809c678 100644
--- a/src/jogl/classes/com/jogamp/gluegen/opengl/GLEmitter.java
+++ b/src/jogl/classes/com/jogamp/gluegen/opengl/GLEmitter.java
@@ -51,7 +51,7 @@ import com.jogamp.gluegen.SymbolFilter;
 import com.jogamp.gluegen.cgram.types.FunctionSymbol;
 import com.jogamp.gluegen.procaddress.ProcAddressEmitter;
 import com.jogamp.gluegen.procaddress.ProcAddressJavaMethodBindingEmitter;
-import com.jogamp.gluegen.runtime.opengl.GLExtensionNames;
+import com.jogamp.gluegen.runtime.opengl.GLNameResolver;
 
 import java.io.IOException;
 import java.io.PrintWriter;
@@ -110,13 +110,13 @@ public class GLEmitter extends ProcAddressEmitter {
             if (declarations != null) {
                 for (Iterator<String> iterator = declarations.iterator(); iterator.hasNext();) {
                     String decl = iterator.next();
-                    boolean isGLFunction = GLExtensionNames.isGLFunction(decl);
+                    boolean isGLFunction = GLNameResolver.isGLFunction(decl);
                     boolean isGLEnumeration = false;
                     if (!isGLFunction) {
-                        isGLEnumeration = GLExtensionNames.isGLEnumeration(decl);
+                        isGLEnumeration = GLNameResolver.isGLEnumeration(decl);
                     }
                     if (isGLFunction || isGLEnumeration) {
-                        String renamed = GLExtensionNames.normalize(decl, isGLFunction);
+                        String renamed = GLNameResolver.normalize(decl, isGLFunction);
                         if (!renamed.equals(decl)) {
                             config.addJavaSymbolRename(decl, renamed);
                         }
@@ -181,7 +181,7 @@ public class GLEmitter extends ProcAddressEmitter {
                 String cause = null;
                 for (String decl : declarations) {
                     boolean isFunc = !decl.startsWith("GL_");
-                    if (!GLExtensionNames.isExtension(decl, isFunc)) {
+                    if (!GLNameResolver.isExtension(decl, isFunc)) {
                         isExtension = false;
                         break;
                     }
@@ -199,7 +199,7 @@ public class GLEmitter extends ProcAddressEmitter {
                         }
                     }
                     cause = decl;
-                    String unifiedName = GLExtensionNames.normalize(decl, isFunc);
+                    String unifiedName = GLNameResolver.normalize(decl, isFunc);
                     // NOTE that we look up the unified name in the
                     // BuildStaticGLInfo's notion of the APIs -- since
                     // we might not be emitting glue code for the
@@ -472,12 +472,12 @@ public class GLEmitter extends ProcAddressEmitter {
         w.println("   *   it was statically linked.");
         w.println("   */");
         w.println("  public long getAddressFor(String functionNameUsr) {");
-        w.println("    String functionNameBase = "+GLExtensionNames.class.getName()+".normalizeVEN(com.jogamp.gluegen.runtime.opengl.GLExtensionNames.normalizeARB(functionNameUsr, true), true);");
+        w.println("    String functionNameBase = "+GLNameResolver.class.getName()+".normalizeVEN(com.jogamp.gluegen.runtime.opengl.GLNameResolver.normalizeARB(functionNameUsr, true), true);");
         w.println("    String addressFieldNameBase = PROCADDRESS_VAR_PREFIX + functionNameBase;");
         w.println("    java.lang.reflect.Field addressField = null;");
-        w.println("    int  funcNamePermNum = "+GLExtensionNames.class.getName()+".getFuncNamePermutationNumber(functionNameBase);");
+        w.println("    int  funcNamePermNum = "+GLNameResolver.class.getName()+".getFuncNamePermutationNumber(functionNameBase);");
         w.println("    for(int i = 0; null==addressField && i < funcNamePermNum; i++) {");
-        w.println("        String addressFieldName = "+GLExtensionNames.class.getName()+".getFuncNamePermutation(addressFieldNameBase, i);");
+        w.println("        String addressFieldName = "+GLNameResolver.class.getName()+".getFuncNamePermutation(addressFieldNameBase, i);");
         w.println("        try {");
         w.println("          addressField = getClass().getField(addressFieldName);");
         w.println("        } catch (Exception e) { }");
diff --git a/src/jogl/classes/com/jogamp/gluegen/runtime/opengl/GLExtensionNames.java b/src/jogl/classes/com/jogamp/gluegen/runtime/opengl/GLNameResolver.java
similarity index 98%
rename from src/jogl/classes/com/jogamp/gluegen/runtime/opengl/GLExtensionNames.java
rename to src/jogl/classes/com/jogamp/gluegen/runtime/opengl/GLNameResolver.java
index 4263330..9255477 100644
--- a/src/jogl/classes/com/jogamp/gluegen/runtime/opengl/GLExtensionNames.java
+++ b/src/jogl/classes/com/jogamp/gluegen/runtime/opengl/GLNameResolver.java
@@ -37,7 +37,8 @@
  */
 package com.jogamp.gluegen.runtime.opengl;
 
-public class GLExtensionNames {
+/** Runtime utility identify and resolve extension names, which may be subsumed to core. */
+public class GLNameResolver {
     //GL_XYZ : GL_XYZ, GL_XYZ_GL2, GL_XYZ_ARB, GL_XYZ_OES, GL_XYZ_OML
     //GL_XYZ : GL_XYZ, GL_GL2_XYZ, GL_ARB_XYZ, GL_OES_XYZ, GL_OML_XYZ
     //
diff --git a/src/jogl/classes/com/jogamp/gluegen/runtime/opengl/GLProcAddressResolver.java b/src/jogl/classes/com/jogamp/gluegen/runtime/opengl/GLProcAddressResolver.java
index fe9efeb..9775de4 100644
--- a/src/jogl/classes/com/jogamp/gluegen/runtime/opengl/GLProcAddressResolver.java
+++ b/src/jogl/classes/com/jogamp/gluegen/runtime/opengl/GLProcAddressResolver.java
@@ -45,10 +45,10 @@ public class GLProcAddressResolver implements FunctionAddressResolver {
     public long resolve(String name, DynamicLookupHelper lookup) {
 
         long newProcAddress = 0;
-        int permutations = GLExtensionNames.getFuncNamePermutationNumber(name);
+        int permutations = GLNameResolver.getFuncNamePermutationNumber(name);
 
         for (int i = 0; 0 == newProcAddress && i < permutations; i++) {
-            String funcName = GLExtensionNames.getFuncNamePermutation(name, i);
+            String funcName = GLNameResolver.getFuncNamePermutation(name, i);
             try {
                 newProcAddress = lookup.dynamicLookupFunction(funcName);
             } catch (Exception e) {
diff --git a/src/jogl/classes/com/jogamp/opengl/FBObject.java b/src/jogl/classes/com/jogamp/opengl/FBObject.java
new file mode 100644
index 0000000..644d87b
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/FBObject.java
@@ -0,0 +1,1943 @@
+/**
+ * Copyright 2012 JogAmp Community. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ *    1. Redistributions of source code must retain the above copyright notice, this list of
+ *       conditions and the following disclaimer.
+ *
+ *    2. Redistributions in binary form must reproduce the above copyright notice, this list
+ *       of conditions and the following disclaimer in the documentation and/or other materials
+ *       provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of JogAmp Community.
+ */
+
+package com.jogamp.opengl;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+
+import javax.media.opengl.GL;
+import javax.media.opengl.GL2GL3;
+import javax.media.opengl.GL3;
+import javax.media.opengl.GLBase;
+import javax.media.opengl.GLContext;
+import javax.media.opengl.GLException;
+import javax.media.opengl.GLProfile;
+
+import jogamp.opengl.Debug;
+
+import com.jogamp.opengl.FBObject.Attachment.Type;
+
+/**
+ * Core utility class simplifying usage of framebuffer objects (FBO)
+ * with all {@link GLProfile}s. 
+ * <p>
+ * Supports on-the-fly reconfiguration of dimension and multisample buffers via {@link #reset(GL, int, int, int)}
+ * while preserving the {@link Attachment} references.
+ * </p>
+ * <p>
+ * Integrates default read/write framebuffers via {@link GLContext#getDefaultReadFramebuffer()} and {@link GLContext#getDefaultReadFramebuffer()},
+ * which is being hooked at {@link GL#glBindFramebuffer(int, int)} when the default (<code>zero</code>) framebuffer is selected.
+ * </p>
+ * 
+ * <p>FIXME: Implement support for {@link Type#DEPTH_TEXTURE}, {@link Type#STENCIL_TEXTURE} .</p>
+ */
+public class FBObject {
+    protected static final boolean DEBUG = Debug.debug("FBObject");
+    
+    /** 
+     * Returns <code>true</code> if basic FBO support is available, otherwise <code>false</code>.
+     * <p>
+     * Basic FBO is supported if the context is either GL-ES >= 2.0, GL >= core 3.0 or implements the extensions
+     * <code>ARB_ES2_compatibility</code>, <code>ARB_framebuffer_object</code>, <code>EXT_framebuffer_object</code> or <code>OES_framebuffer_object</code>.
+     * </p>
+     * <p>
+     * Basic FBO support may only include one color attachment and no multisampling,
+     * as well as limited internal formats for renderbuffer.
+     * </p>
+     * @see GLContext#hasFBO()
+     */
+    public static final boolean supportsBasicFBO(GL gl) {
+        return gl.getContext().hasFBO();
+    }
+  
+    /** 
+     * Returns <code>true</code> if full FBO support is available, otherwise <code>false</code>.
+     * <p>
+     * Full FBO is supported if the context is either GL >= core 3.0 or implements the extensions
+     * <code>ARB_framebuffer_object</code>, or all of
+     * <code>EXT_framebuffer_object</code>, <code>EXT_framebuffer_multisample</code>, 
+     * <code>EXT_framebuffer_blit</code>, <code>GL_EXT_packed_depth_stencil</code>.
+     * </p>
+     * <p>
+     * Full FBO support includes multiple color attachments and multisampling.
+     * </p>
+     */
+    public static final boolean supportsFullFBO(GL gl) {
+        return gl.isGL3() ||                                                         // GL >= 3.0
+                
+               gl.isExtensionAvailable(GLExtensions.ARB_framebuffer_object) ||       // ARB_framebuffer_object
+               
+               ( gl.isExtensionAvailable(GLExtensions.EXT_framebuffer_object) &&     // All EXT_framebuffer_object*
+                 gl.isExtensionAvailable(GLExtensions.EXT_framebuffer_multisample) &&
+                 gl.isExtensionAvailable(GLExtensions.EXT_framebuffer_blit) &&
+                 gl.isExtensionAvailable(GLExtensions.EXT_packed_depth_stencil) ) ;
+    }
+    
+    public static final int getMaxSamples(GL gl) {
+        if( supportsFullFBO(gl) ) {
+            int[] val = new int[] { 0 } ;
+            gl.glGetIntegerv(GL2GL3.GL_MAX_SAMPLES, val, 0);
+            return val[0];
+        } else {
+            return 0;
+        }
+    }
+    
+    /** Common super class of all attachments */
+    public static abstract class Attachment {
+        public enum Type { 
+            NONE, DEPTH, STENCIL, DEPTH_STENCIL, COLOR, COLOR_TEXTURE, DEPTH_TEXTURE, STENCIL_TEXTURE;
+            
+            /** 
+             * Returns {@link #COLOR}, {@link #DEPTH}, {@link #STENCIL} or {@link #DEPTH_STENCIL}
+             * @throws IllegalArgumentException if <code>format</code> cannot be handled. 
+             */
+            public static Type determine(int format) throws IllegalArgumentException {
+                switch(format) {
+                    case GL.GL_RGBA4:
+                    case GL.GL_RGB5_A1:
+                    case GL.GL_RGB565:
+                    case GL.GL_RGB8:
+                    case GL.GL_RGBA8:
+                        return Type.COLOR;
+                    case GL.GL_DEPTH_COMPONENT16:
+                    case GL.GL_DEPTH_COMPONENT24:
+                    case GL.GL_DEPTH_COMPONENT32:
+                        return Type.DEPTH;
+                    case GL.GL_STENCIL_INDEX1:
+                    case GL.GL_STENCIL_INDEX4:
+                    case GL.GL_STENCIL_INDEX8:
+                        return Type.STENCIL;
+                    case GL.GL_DEPTH24_STENCIL8:
+                        return Type.DEPTH_STENCIL;
+                    default:
+                        throw new IllegalArgumentException("format invalid: 0x"+Integer.toHexString(format));
+                }        
+            }
+        };
+                
+        /** immutable type [{@link #COLOR}, {@link #DEPTH}, {@link #STENCIL}, {@link #COLOR_TEXTURE}, {@link #DEPTH_TEXTURE}, {@link #STENCIL_TEXTURE} ] */
+        public final Type type;
+        
+        /** immutable the internal format */
+        public final int format;
+        
+        private int width, height;
+        
+        private int name;
+        
+        /** <code>true</code> if resource is initialized by {@link #initialize(GL)}, hence {@link #free(GL)} is allowed to free the GL resources. */
+        protected boolean resourceOwner;
+        
+        private int initCounter;
+        
+        protected Attachment(Type type, int iFormat, int width, int height, int name) {
+            this.type = type;
+            this.format = iFormat;
+            this.width = width;
+            this.height = height;
+            this.name = name;
+            this.resourceOwner = false;
+            this.initCounter = 0;
+        }
+        
+        /** width of attachment */
+        public final int getWidth() { return width; }
+        /** height of attachment */
+        public final int getHeight() { return height; }
+        /* pp */ final void setSize(int w, int h) { width = w; height = h; }
+        
+        /** buffer name [1..max], maybe a texture or renderbuffer name, depending on type. */
+        public final int getName() { return name; }        
+        /* pp */ final void setName(int n) { name = n; }
+        
+        public final int getInitCounter() { return initCounter; }
+        
+        /** 
+         * Initializes the attachment buffer and set it's parameter, if uninitialized, i.e. name is <code>zero</code>.
+         * <p>Implementation employs an initialization counter, hence it can be paired recursively with {@link #free(GL)}.</p>
+         * @throws GLException if buffer generation or setup fails. The just created buffer name will be deleted in this case. 
+         */
+        public void initialize(GL gl) throws GLException {
+            initCounter++;
+            /*
+            super.initialize(gl);
+            if(1 == getInitCounter() && 0 == getName()  ) {
+                do init ..
+                freeResources = true; // if all OK
+            }
+            */
+        }
+        
+        /** 
+         * Releases the attachment buffer if initialized, i.e. name is <code>zero</code>.
+         * <p>Implementation employs an initialization counter, hence it can be paired recursively with {@link #initialize(GL)}.</p>
+         * @throws GLException if buffer release fails. 
+         */
+        public void free(GL gl) throws GLException {
+            /*
+            if(1 == getInitCounter() && freeResources && .. ) {
+                do free ..
+            }
+            super.free(gl);
+            */
+            initCounter--;
+            if(0 == initCounter) {
+                resourceOwner = false;
+                name = 0;
+            }
+            if(DEBUG) {
+                System.err.println("Attachment.free: "+this);
+            }
+        }
+        
+        /**
+         * <p>
+         * Comparison by {@link #type}, {@link #format}, {@link #width}, {@link #height} and {@link #name}.
+         * </p>
+         * {@inheritDoc}
+         */
+        @Override
+        public boolean equals(Object o) {
+            if( this == o ) return true;
+            if( ! ( o instanceof Attachment ) ) return false;
+            final Attachment a = (Attachment)o;
+            return type == a.type &&
+                   format == a.format ||
+                   width == a.width   ||
+                   height== a.height  ||
+                   name == a.name     ;
+        }
+        
+        /**
+         * <p>
+         * Hashed by {@link #type}, {@link #format}, {@link #width}, {@link #height} and {@link #name}.
+         * </p>
+         * {@inheritDoc}
+         */
+        @Override
+        public int hashCode() {
+            // 31 * x == (x << 5) - x
+            int hash = 31 + type.ordinal();
+            hash = ((hash << 5) - hash) + format;
+            hash = ((hash << 5) - hash) + width;
+            hash = ((hash << 5) - hash) + height;
+            hash = ((hash << 5) - hash) + name;
+            return hash;
+        }
+        
+        int objectHashCode() { return super.hashCode(); }
+        
+        public String toString() {
+            return getClass().getSimpleName()+"[type "+type+", format 0x"+Integer.toHexString(format)+", "+width+"x"+height+
+                   ", name 0x"+Integer.toHexString(name)+", obj 0x"+Integer.toHexString(objectHashCode())+
+                   ", resOwner "+resourceOwner+", initCount "+initCounter+"]";
+        }
+        
+        public static Type getType(int attachmentPoint, int maxColorAttachments) {
+            if( GL.GL_COLOR_ATTACHMENT0 <= attachmentPoint && attachmentPoint < GL.GL_COLOR_ATTACHMENT0+maxColorAttachments ) {
+                return Type.COLOR;
+            }
+            switch(attachmentPoint) {
+                case GL.GL_DEPTH_ATTACHMENT:
+                    return Type.DEPTH;
+                case GL.GL_STENCIL_ATTACHMENT:            
+                    return Type.STENCIL;
+                default: 
+                    throw new IllegalArgumentException("Invalid attachment point 0x"+Integer.toHexString(attachmentPoint));
+            }
+        }
+    }
+    
+    /** Other renderbuffer attachment which maybe a colorbuffer, depth or stencil. */
+    public static class RenderAttachment extends Attachment {
+        private int samples;
+        
+        /**
+         * @param type allowed types are {@link Type#DEPTH}, {@link Type#STENCIL} or {@link Type#COLOR}
+         * @param iFormat
+         * @param samples
+         * @param width
+         * @param height
+         * @param name
+         */
+        public RenderAttachment(Type type, int iFormat, int samples, int width, int height, int name) {
+            super(validateType(type), iFormat, width, height, name);
+            this.samples = samples;
+        }
+        
+        /** number of samples, or zero for no multisampling */
+        public final int getSamples() { return samples; }
+        /* pp */ final void setSamples(int s) { samples = s; }
+        
+        private static Type validateType(Type type) {
+            switch(type) {
+                case DEPTH:
+                case STENCIL:
+                case COLOR:
+                    return type;
+                default: 
+                    throw new IllegalArgumentException("Invalid type: "+type);
+            }
+        }
+        
+        /**
+         * <p>
+         * Comparison by {@link #type}, {@link #format}, {@link #samples}, {@link #width}, {@link #height} and {@link #name}.
+         * </p>
+         * {@inheritDoc}
+         */
+        @Override
+        public boolean equals(Object o) {
+            if( this == o ) return true;
+            if( ! ( o instanceof RenderAttachment ) ) return false;
+            return super.equals(o) &&
+                   samples == ((RenderAttachment)o).samples;
+        }
+        
+        /**
+         * <p>
+         * Hashed by {@link #type}, {@link #format}, {@link #samples}, {@link #width}, {@link #height} and {@link #name}.
+         * </p>
+         * {@inheritDoc}
+         */
+        @Override
+        public int hashCode() {
+            // 31 * x == (x << 5) - x
+            int hash = super.hashCode();
+            hash = ((hash << 5) - hash) + samples;
+            return hash;
+        }
+
+        @Override
+        public void initialize(GL gl) throws GLException {
+            super.initialize(gl);
+            if( 1 == getInitCounter() && 0 == getName() ) {
+                final int[] name = new int[] { -1 };
+                gl.glGenRenderbuffers(1, name, 0);
+                if( 0 == name[0] ) {
+                    throw new GLException("null renderbuffer, "+this);
+                }
+                setName(name[0]);
+                
+                gl.glBindRenderbuffer(GL.GL_RENDERBUFFER, getName());
+                if( samples > 0 ) {
+                    ((GL2GL3)gl).glRenderbufferStorageMultisample(GL.GL_RENDERBUFFER, samples, format, getWidth(), getHeight());            
+                } else {
+                    gl.glRenderbufferStorage(GL.GL_RENDERBUFFER, format, getWidth(), getHeight());
+                }
+                int glerr = gl.glGetError();
+                if(GL.GL_NO_ERROR != glerr) {
+                    gl.glDeleteRenderbuffers(1, name, 0);
+                    setName(0);
+                    throw new GLException("GL Error 0x"+Integer.toHexString(glerr)+" while creating "+this);
+                }
+                resourceOwner = true;
+                if(DEBUG) {
+                    System.err.println("Attachment.init: "+this);
+                }
+            }
+        }
+        
+        @Override
+        public void free(GL gl) {
+            if(1 == getInitCounter() && resourceOwner && 0 != getName() ) {
+                final int[] name = new int[] { getName() };
+                gl.glDeleteRenderbuffers(1, name, 0);
+            }
+            super.free(gl);
+        }
+        
+        public String toString() {
+            return getClass().getSimpleName()+"[type "+type+", format 0x"+Integer.toHexString(format)+", samples "+samples+", "+getWidth()+"x"+getHeight()+
+                   ", name 0x"+Integer.toHexString(getName())+", obj 0x"+Integer.toHexString(objectHashCode())+
+                   ", resOwner "+resourceOwner+", initCount "+getInitCounter()+"]";
+        }
+    }
+    
+    /** 
+     * Marker interface, denotes a color buffer attachment.
+     * <p>Always an instance of {@link Attachment}.</p>
+     * <p>Either an instance of {@link ColorAttachment} or {@link TextureAttachment}.</b> 
+     */
+    public static interface Colorbuffer {        
+    }
+    
+    /** Color render buffer attachment  */
+    public static class ColorAttachment extends RenderAttachment implements Colorbuffer {
+        public ColorAttachment(int iFormat, int samples, int width, int height, int name) {
+            super(Type.COLOR, iFormat, samples, width, height, name);
+        }    
+    }
+    
+    /** Texture attachment */
+    public static class TextureAttachment extends Attachment implements Colorbuffer  {
+        /** details of the texture setup */
+        public final int dataFormat, dataType, magFilter, minFilter, wrapS, wrapT;
+
+        /**
+         * @param type allowed types are [ {@link Type#COLOR_TEXTURE}, {@link Type#DEPTH_TEXTURE}, {@link Type#STENCIL_TEXTURE} ]
+         * @param iFormat
+         * @param width
+         * @param height
+         * @param dataFormat
+         * @param dataType
+         * @param magFilter
+         * @param minFilter
+         * @param wrapS
+         * @param wrapT
+         * @param name
+         */
+        public TextureAttachment(Type type, int iFormat, int width, int height, int dataFormat, int dataType, 
+                                 int magFilter, int minFilter, int wrapS, int wrapT, int name) {
+            super(validateType(type), iFormat, width, height, name);
+            this.dataFormat = dataFormat;
+            this.dataType = dataType;
+            this.magFilter = magFilter;
+            this.minFilter = minFilter;
+            this.wrapS = wrapS;
+            this.wrapT = wrapT;
+        }
+        
+        private static Type validateType(Type type) {
+            switch(type) {
+                case COLOR_TEXTURE:
+                case DEPTH_TEXTURE:
+                case STENCIL_TEXTURE:
+                    return type;
+                default: 
+                    throw new IllegalArgumentException("Invalid type: "+type);
+            }
+        }
+        
+        /** 
+         * Initializes the texture and set it's parameter, if uninitialized, i.e. name is <code>zero</code>.
+         * @throws GLException if texture generation and setup fails. The just created texture name will be deleted in this case. 
+         */
+        @Override
+        public void initialize(GL gl) throws GLException {
+            super.initialize(gl);
+            if( 1 == getInitCounter() && 0 == getName() ) {
+                final int[] name = new int[] { -1 };            
+                gl.glGenTextures(1, name, 0);
+                if(0 == name[0]) {
+                    throw new GLException("null texture, "+this);
+                }
+                setName(name[0]);
+                
+                gl.glBindTexture(GL.GL_TEXTURE_2D, name[0]);
+                gl.glTexImage2D(GL.GL_TEXTURE_2D, 0, format, getWidth(), getHeight(), 0, dataFormat, dataType, null);
+                if( 0 < magFilter ) {
+                    gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MAG_FILTER, magFilter);
+                }
+                if( 0 < minFilter ) {
+                    gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MIN_FILTER, minFilter);
+                }
+                if( 0 < wrapS ) {
+                    gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_S, wrapS);
+                }
+                if( 0 < wrapT ) {
+                    gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_T, wrapT);            
+                }        
+                int glerr = gl.glGetError();
+                if(GL.GL_NO_ERROR != glerr) {
+                    gl.glDeleteTextures(1, name, 0);
+                    setName(0);
+                    throw new GLException("GL Error 0x"+Integer.toHexString(glerr)+" while creating "+this);
+                }
+                resourceOwner = true;
+            }
+            if(DEBUG) {
+                System.err.println("Attachment.init: "+this);
+            }
+        }
+
+        @Override
+        public void free(GL gl) {
+            if(1 == getInitCounter() && resourceOwner && 0 != getName() ) {
+                final int[] name = new int[] { getName() };
+                gl.glDeleteTextures(1, name, 0);
+            }
+            super.free(gl);
+        }
+    }
+    
+    private boolean initialized;
+    private boolean basicFBOSupport;
+    private boolean fullFBOSupport;
+    private boolean rgba8Avail;
+    private boolean depth24Avail;
+    private boolean depth32Avail;
+    private boolean stencil01Avail;
+    private boolean stencil04Avail;
+    private boolean stencil08Avail;
+    private boolean stencil16Avail;
+    private boolean packedDepthStencilAvail;            
+    private int maxColorAttachments, maxSamples, maxTextureSize, maxRenderbufferSize;
+
+    private int width, height, samples;
+    private int vStatus;
+    private int fbName;
+    private boolean bound;
+
+    private int colorAttachmentCount;
+    private Colorbuffer[] colorAttachmentPoints; // colorbuffer attachment points 
+    private RenderAttachment depth, stencil; // depth and stencil maybe equal in case of packed-depth-stencil
+
+    private final FBObject samplesSink; // MSAA sink
+    private TextureAttachment samplesSinkTexture; 
+    private boolean samplesSinkDirty;
+
+    //
+    // ColorAttachment helper ..
+    //
+    
+    private final void validateColorAttachmentPointRange(int point) {
+        if(maxColorAttachments != colorAttachmentPoints.length) {
+            throw new InternalError("maxColorAttachments "+maxColorAttachments+", array.lenght "+colorAttachmentPoints);
+        }
+        if(0 > point || point >= maxColorAttachments) {
+            throw new IllegalArgumentException("attachment point out of range: "+point+", should be within [0.."+(maxColorAttachments-1)+"]");
+        }
+    }
+    
+    private final void validateAddColorAttachment(int point, Colorbuffer ca) {
+        validateColorAttachmentPointRange(point);
+        if( null != colorAttachmentPoints[point] ) {
+            throw new IllegalArgumentException("Cannot attach "+ca+", attachment point already in use by "+colorAttachmentPoints[point]);
+        }        
+    }
+    
+    private final void addColorAttachment(int point, Colorbuffer ca) {
+        validateColorAttachmentPointRange(point);
+        final Colorbuffer c = colorAttachmentPoints[point];
+        if( null != c && c != ca ) {
+            throw new IllegalArgumentException("Add failed: requested to add "+ca+" at "+point+", but slot is holding "+c+"; "+this);
+        }
+        colorAttachmentPoints[point] = ca;
+        colorAttachmentCount++;
+    }
+    
+    private final void removeColorAttachment(int point, Colorbuffer ca) {
+        validateColorAttachmentPointRange(point);
+        final Colorbuffer c = colorAttachmentPoints[point];
+        if( null != c && c != ca ) {
+            throw new IllegalArgumentException("Remove failed: requested to removed "+ca+" at "+point+", but slot is holding "+c+"; "+this);
+        }
+        colorAttachmentPoints[point] = null;
+        colorAttachmentCount--;
+    }
+    
+    /**
+     * Return the {@link Colorbuffer} attachment at <code>attachmentPoint</code> if it is attached to this FBO, otherwise null.
+     * 
+     * @see #attachColorbuffer(GL, boolean)
+     * @see #attachColorbuffer(GL, boolean)
+     * @see #attachTexture2D(GL, int, boolean, int, int, int, int)
+     * @see #attachTexture2D(GL, int, int, int, int, int, int, int, int) 
+     */
+    public final Colorbuffer getColorbuffer(int attachmentPoint) {
+        validateColorAttachmentPointRange(attachmentPoint);        
+        return colorAttachmentPoints[attachmentPoint];
+    }
+    
+    /**
+     * Finds the passed {@link Colorbuffer} within the valid range of attachment points
+     * using <i>reference</i> comparison only.
+     * <p>
+     * Note: Slow. Implementation uses a logN array search to save resources, i.e. not using a HashMap.
+     * </p>
+     * @param ca the {@link Colorbuffer} to look for.
+     * @return -1 if the {@link Colorbuffer} could not be found, otherwise [0..{@link #getMaxColorAttachments()}-1] 
+     */
+    public final int getColorbufferAttachmentPoint(Colorbuffer ca) {
+        for(int i=0; i<colorAttachmentPoints.length; i++) {
+            if( colorAttachmentPoints[i] == ca ) {
+                return i; 
+            }
+        }
+        return -1;
+    }
+    
+    /**
+     * Returns the passed {@link Colorbuffer} if it is attached to this FBO, otherwise null.
+     * Implementation compares the <i>reference</i> only.
+     * 
+     * <p>
+     * Note: Slow. Uses {@link #getColorbufferAttachmentPoint(Colorbuffer)} to determine it's attachment point
+     *       to be used for {@link #getColorbuffer(int)}
+     * </p>
+     * 
+     * @see #attachColorbuffer(GL, boolean)
+     * @see #attachColorbuffer(GL, boolean)
+     * @see #attachTexture2D(GL, int, boolean, int, int, int, int)
+     * @see #attachTexture2D(GL, int, int, int, int, int, int, int, int) 
+     */
+    public final Colorbuffer getColorbuffer(Colorbuffer ca) {
+        final int p = getColorbufferAttachmentPoint(ca);
+        return p>=0 ? getColorbuffer(p) : null;
+    }
+        
+    /**
+     * Creates an uninitialized FBObject instance.
+     * <p>
+     * Call {@link #init(GL, int, int, int)} .. etc to use it.
+     * </p>
+     */
+    public FBObject() {
+        this(false);
+    }
+    /* pp */ FBObject(boolean isSampleSink) {
+        this.initialized = false;
+        
+        // TBD @ init
+        this.basicFBOSupport = false;
+        this.fullFBOSupport = false;
+        this.rgba8Avail = false;
+        this.depth24Avail = false;
+        this.depth32Avail = false;
+        this.stencil01Avail = false;
+        this.stencil04Avail = false;
+        this.stencil08Avail = false;
+        this.stencil16Avail = false;
+        this.packedDepthStencilAvail = false;
+        this.maxColorAttachments=-1;
+        this.maxSamples=-1;
+        this.maxTextureSize = 0;
+        this.maxRenderbufferSize = 0;
+        
+        this.width = 0;
+        this.height = 0;
+        this.samples = 0;
+        this.vStatus = -1;        
+        this.fbName = 0;
+        this.bound = false;
+        
+        this.colorAttachmentPoints = null; // at init ..
+        this.colorAttachmentCount = 0;
+        this.depth = null;
+        this.stencil = null;                
+        
+        this.samplesSink = isSampleSink ? null : new FBObject(true);
+        this.samplesSinkTexture = null;
+        this.samplesSinkDirty = true;
+    }
+    
+    private void init(GL gl, int width, int height, int samples) throws GLException {
+        if(initialized) {
+            throw new GLException("FBO already initialized");
+        }        
+        fullFBOSupport = supportsFullFBO(gl);
+        
+        if( !fullFBOSupport && !supportsBasicFBO(gl) ) {
+            throw new GLException("FBO not supported w/ context: "+gl.getContext()+", "+this);
+        }
+        
+        basicFBOSupport = true;
+        
+        rgba8Avail = gl.isGL2GL3() || gl.isExtensionAvailable(GLExtensions.OES_rgb8_rgba8);
+        depth24Avail = fullFBOSupport || gl.isExtensionAvailable(GLExtensions.OES_depth24);
+        depth32Avail = fullFBOSupport || gl.isExtensionAvailable(GLExtensions.OES_depth32);
+        stencil01Avail = fullFBOSupport || gl.isExtensionAvailable(GLExtensions.OES_stencil1);
+        stencil04Avail = fullFBOSupport || gl.isExtensionAvailable(GLExtensions.OES_stencil4);
+        stencil08Avail = fullFBOSupport || gl.isExtensionAvailable(GLExtensions.OES_stencil8);
+        stencil16Avail = fullFBOSupport;
+        
+        packedDepthStencilAvail = fullFBOSupport || gl.isExtensionAvailable(GLExtensions.OES_packed_depth_stencil);
+        
+        final boolean NV_fbo_color_attachments = gl.isExtensionAvailable(GLExtensions.NV_fbo_color_attachments);
+                                
+        int val[] = new int[1];
+        
+        int glerr = gl.glGetError();
+        if(DEBUG && GL.GL_NO_ERROR != glerr) {
+            System.err.println("FBObject.init-preexisting.0 GL Error 0x"+Integer.toHexString(glerr));
+        }
+
+        int realMaxColorAttachments = 1;
+        maxColorAttachments = 1;
+        if( null != samplesSink && fullFBOSupport || NV_fbo_color_attachments ) {
+            try {
+                gl.glGetIntegerv(GL2GL3.GL_MAX_COLOR_ATTACHMENTS, val, 0);
+                glerr = gl.glGetError();
+                if(GL.GL_NO_ERROR == glerr) {
+                    realMaxColorAttachments = 1 <= val[0] ? val[0] : 1; // cap minimum to 1
+                } else if(DEBUG) {
+                    System.err.println("FBObject.init-GL_MAX_COLOR_ATTACHMENTS query GL Error 0x"+Integer.toHexString(glerr));
+                }
+            } catch (GLException gle) {}
+        }
+        maxColorAttachments = realMaxColorAttachments <= 8 ? realMaxColorAttachments : 8; // cap to limit array size
+        
+        colorAttachmentPoints = new Colorbuffer[maxColorAttachments];
+        colorAttachmentCount = 0;
+        
+        maxSamples = 0;
+        if(fullFBOSupport) {
+            gl.glGetIntegerv(GL2GL3.GL_MAX_SAMPLES, val, 0);
+            glerr = gl.glGetError();
+            if(GL.GL_NO_ERROR == glerr) {
+                maxSamples = val[0];
+            } else if(DEBUG) {
+                System.err.println("FBObject.init-GL_MAX_SAMPLES query GL Error 0x"+Integer.toHexString(glerr));
+            }
+        }
+        gl.glGetIntegerv(GL.GL_MAX_TEXTURE_SIZE, val, 0);
+        maxTextureSize = val[0];
+        gl.glGetIntegerv(GL.GL_MAX_RENDERBUFFER_SIZE, val, 0);
+        this.maxRenderbufferSize = val[0];
+        
+        glerr = gl.glGetError();
+        if(DEBUG && GL.GL_NO_ERROR != glerr) {
+            System.err.println("FBObject.init-preexisting.1 GL Error 0x"+Integer.toHexString(glerr));
+        }
+        
+        this.width = width;
+        this.height = height;
+        this.samples = samples <= maxSamples ? samples : maxSamples;
+        
+        if(DEBUG) {
+            System.err.println("FBObject "+width+"x"+height+", "+samples+" -> "+samples+" samples");
+            System.err.println("basicFBOSupport:          "+basicFBOSupport);
+            System.err.println("fullFBOSupport:           "+fullFBOSupport);
+            System.err.println("maxColorAttachments:      "+maxColorAttachments+"/"+realMaxColorAttachments);
+            System.err.println("maxSamples:               "+maxSamples);
+            System.err.println("maxTextureSize:           "+maxTextureSize);
+            System.err.println("maxRenderbufferSize:      "+maxRenderbufferSize);
+            System.err.println("rgba8:                    "+rgba8Avail);
+            System.err.println("depth24:                  "+depth24Avail);
+            System.err.println("depth32:                  "+depth32Avail);
+            System.err.println("stencil01:                "+stencil01Avail);
+            System.err.println("stencil04:                "+stencil04Avail);
+            System.err.println("stencil08:                "+stencil08Avail);
+            System.err.println("stencil16:                "+stencil16Avail);
+            System.err.println("packedDepthStencil:       "+packedDepthStencilAvail);
+            System.err.println("NV_fbo_color_attachments: "+NV_fbo_color_attachments);
+            System.err.println(gl.getContext().getGLVersion());
+            System.err.println(JoglVersion.getGLStrings(gl, null).toString());
+            System.err.println(gl.getContext());
+        }
+        
+        checkNoError(null, gl.glGetError(), "FBObject Init.pre"); // throws GLException if error
+        
+        if(width > 2 + maxTextureSize  || height> 2 + maxTextureSize ||
+           width > maxRenderbufferSize || height> maxRenderbufferSize  ) {
+            throw new GLException("size "+width+"x"+height+" exceeds on of the maxima [texture "+maxTextureSize+", renderbuffer "+maxRenderbufferSize+"]");
+        }
+
+        if(null != samplesSink) {        
+            // init sampling sink
+            samplesSink.reset(gl, width, height);
+            resetMSAATexture2DSink(gl);
+        }
+
+        // generate fbo ..
+        gl.glGenFramebuffers(1, val, 0);
+        fbName = val[0];
+        if(0 == fbName) {
+            throw new GLException("null framebuffer");
+        }
+
+        // bind fbo ..
+        gl.glBindFramebuffer(GL.GL_FRAMEBUFFER, fbName);        
+        checkNoError(gl, gl.glGetError(), "FBObject Init.bindFB");  // throws GLException if error        
+        if(!gl.glIsFramebuffer(fbName)) {
+            checkNoError(gl, GL.GL_INVALID_VALUE, "FBObject Init.isFB"); // throws GLException
+        }
+        bound = true;        
+        initialized = true;
+        
+        updateStatus(gl);
+        if(DEBUG) {
+            System.err.println("FBObject.init(): "+this);
+        }
+    }
+
+    /**
+     * Initializes or resets this FBO's instance.
+     * <p>
+     * In case the new parameters are compatible with the current ones
+     * no action will be performed. Otherwise all attachments will be recreated
+     * to match the new given parameters.
+     * </p>
+     * <p>
+     * Currently incompatibility and hence recreation is given if
+     * the size or sample count doesn't match for subsequent calls.
+     * </p>
+     * 
+     * <p>Leaves the FBO bound state untouched</p>
+     * 
+     * @param gl the current GL context
+     * @param newWidth
+     * @param newHeight
+     * @throws GLException in case of an error
+     */
+    public final void reset(GL gl, int newWidth, int newHeight) {
+        reset(gl, newWidth, newHeight, 0);
+    }
+    
+    /**
+     * Initializes or resets this FBO's instance.
+     * <p>
+     * In case the new parameters are compatible with the current ones
+     * no action will be performed. Otherwise all attachments will be recreated
+     * to match the new given parameters.
+     * </p>
+     * <p>
+     * Currently incompatibility and hence recreation is given if
+     * the size or sample count doesn't match for subsequent calls.
+     * </p>
+     * 
+     * <p>Leaves the FBO bound state untouched</p>
+     * 
+     * @param gl the current GL context
+     * @param newWidth
+     * @param newHeight
+     * @param newSamples if > 0, MSAA will be used, otherwise no multisampling. Will be capped to {@link #getMaxSamples()}.
+     * @throws GLException in case of an error
+     */
+    public final void reset(GL gl, int newWidth, int newHeight, int newSamples) {
+        if(!initialized) {
+            init(gl, newWidth, newHeight, newSamples);
+            return;
+        }
+        newSamples = newSamples <= maxSamples ? newSamples : maxSamples; // clamp
+        
+        if( newWidth !=  width || newHeight !=  height || newSamples != samples ) {
+            if(DEBUG) {
+                System.err.println("FBObject.reset - START - "+this);
+            }        
+            
+            final boolean wasBound = isBound();
+            
+            width = newWidth;
+            height = newHeight;
+            samples = newSamples;
+            detachAllImpl(gl, true , true);
+            resetMSAATexture2DSink(gl);
+            
+            if(wasBound) {
+                bind(gl);
+            } else {
+                unbind(gl);
+            }
+            
+            if(DEBUG) {
+                System.err.println("FBObject.reset - END - "+this);
+            }
+        }        
+    }
+            
+    /** 
+     * Note that the status may reflect an incomplete state during transition of attachments.
+     * @return The FB status. {@link GL.GL_FRAMEBUFFER_COMPLETE} if ok, otherwise return GL FBO error state or -1
+     * @see #validateStatus() 
+     */
+    public final int getStatus() {
+        return vStatus;
+    }
+
+    /** return the {@link #getStatus()} as a string. */
+    public final String getStatusString() {
+        return getStatusString(vStatus);
+    }
+    
+    public static final String getStatusString(int fbStatus) {
+        switch(fbStatus) {
+            case -1:
+                return "NOT A FBO";
+                
+            case GL.GL_FRAMEBUFFER_COMPLETE:
+                return "OK";
+                
+            case GL.GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT:
+                return("GL FBO: incomplete, incomplete attachment\n");
+            case GL.GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:
+                return("GL FBO: incomplete, missing attachment");
+            case GL.GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS:
+                return("GL FBO: incomplete, attached images must have same dimensions");
+            case GL.GL_FRAMEBUFFER_INCOMPLETE_FORMATS:
+                 return("GL FBO: incomplete, attached images must have same format");
+            case GL2GL3.GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER:
+                return("GL FBO: incomplete, missing draw buffer");
+            case GL2GL3.GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER:
+                return("GL FBO: incomplete, missing read buffer");
+            case GL2GL3.GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE:
+                return("GL FBO: incomplete, missing multisample buffer");
+            case GL3.GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS:                
+                return("GL FBO: incomplete, layer targets");
+                
+            case GL.GL_FRAMEBUFFER_UNSUPPORTED:
+                return("GL FBO: Unsupported framebuffer format");
+            case GL2GL3.GL_FRAMEBUFFER_UNDEFINED:
+                 return("GL FBO: framebuffer undefined");
+                 
+            case 0:
+                return("GL FBO: incomplete, implementation fault");
+            default:
+                return("GL FBO: incomplete, implementation ERROR 0x"+Integer.toHexString(fbStatus));
+        }
+    }
+    
+    /**
+     * The status may even be valid if incomplete during transition of attachments.
+     * @see #getStatus()
+     */
+    public final boolean isStatusValid() {
+        switch(vStatus) {
+            case GL.GL_FRAMEBUFFER_COMPLETE:
+                return true;
+                
+            case GL.GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT:
+            case GL.GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:
+            case GL.GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS:
+            case GL.GL_FRAMEBUFFER_INCOMPLETE_FORMATS:
+            case GL2GL3.GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER:
+            case GL2GL3.GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER:
+            case GL2GL3.GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE:
+            case GL3.GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS:
+                if(0 == colorAttachmentCount || null == depth) {
+                    // we are in transition
+                    return true;
+                }
+         
+            case GL.GL_FRAMEBUFFER_UNSUPPORTED:
+            case GL2GL3.GL_FRAMEBUFFER_UNDEFINED:
+                
+            case 0:                
+            default:
+                System.out.println("Framebuffer " + fbName + " is incomplete: status = 0x" + Integer.toHexString(vStatus) + 
+                        " : " + getStatusString(vStatus));
+                return false;
+        }
+    }
+        
+    private final boolean checkNoError(GL gl, int err, String exceptionMessage) throws GLException {
+        if(GL.GL_NO_ERROR != err) {
+            if(null != gl) {
+                destroy(gl);
+            }
+            if(null != exceptionMessage) {
+                throw new GLException(exceptionMessage+" GL Error 0x"+Integer.toHexString(err));
+            }
+            return false;
+        }
+        return true;
+    }
+
+    private final void checkInitialized() throws GLException {
+        if(!initialized) {
+            throw new GLException("FBO not initialized, call init(GL) first.");
+        }                
+    }
+    
+    /**
+     * Attaches a Texture2D Color Buffer to this FBO's instance at the given attachment point,
+     * selecting the texture data type and format automatically.
+     * 
+     * <p>Using default min/mag filter {@link GL#GL_NEAREST} and default wrapS/wrapT {@link GL#GL_CLAMP_TO_EDGE}.</p>
+     * 
+     * <p>Leaves the FBO bound.</p>
+     * 
+     * @param gl the current GL context
+     * @param attachmentPoint the color attachment point ranging from [0..{@link #getMaxColorAttachments()}-1]
+     * @param alpha set to <code>true</code> if you request alpha channel, otherwise <code>false</code>;
+     * @return TextureAttachment instance describing the new attached texture colorbuffer if bound and configured successfully, otherwise GLException is thrown
+     * @throws GLException in case the texture colorbuffer couldn't be allocated or MSAA has been chosen
+     */
+    public final TextureAttachment attachTexture2D(GL gl, int attachmentPoint, boolean alpha) throws GLException {
+        return attachTexture2D(gl, attachmentPoint, alpha, GL.GL_NEAREST, GL.GL_NEAREST, GL.GL_CLAMP_TO_EDGE, GL.GL_CLAMP_TO_EDGE);
+    }
+    
+    /**
+     * Attaches a Texture2D Color Buffer to this FBO's instance at the given attachment point,
+     * selecting the texture data type and format automatically.
+     * 
+     * <p>Leaves the FBO bound.</p>
+     * 
+     * @param gl the current GL context
+     * @param attachmentPoint the color attachment point ranging from [0..{@link #getMaxColorAttachments()}-1]
+     * @param alpha set to <code>true</code> if you request alpha channel, otherwise <code>false</code>;
+     * @param magFilter if > 0 value for {@link GL#GL_TEXTURE_MAG_FILTER}
+     * @param minFilter if > 0 value for {@link GL#GL_TEXTURE_MIN_FILTER} 
+     * @param wrapS if > 0 value for {@link GL#GL_TEXTURE_WRAP_S}
+     * @param wrapT if > 0 value for {@link GL#GL_TEXTURE_WRAP_T}
+     * @return TextureAttachment instance describing the new attached texture colorbuffer if bound and configured successfully, otherwise GLException is thrown
+     * @throws GLException in case the texture colorbuffer couldn't be allocated or MSAA has been chosen
+     */
+    public final TextureAttachment attachTexture2D(GL gl, int attachmentPoint, boolean alpha, int magFilter, int minFilter, int wrapS, int wrapT) throws GLException {
+        final int textureInternalFormat, textureDataFormat, textureDataType;
+        if(gl.isGLES()) { 
+            textureInternalFormat = alpha ? GL.GL_RGBA : GL.GL_RGB;
+            textureDataFormat = alpha ? GL.GL_RGBA : GL.GL_RGB;
+            textureDataType = GL.GL_UNSIGNED_BYTE;
+        } else { 
+            textureInternalFormat = alpha ? GL.GL_RGBA8 : GL.GL_RGB8;
+            textureDataFormat = alpha ? GL.GL_BGRA : GL.GL_RGB;
+            textureDataType = alpha ? GL2GL3.GL_UNSIGNED_INT_8_8_8_8_REV : GL.GL_UNSIGNED_BYTE;
+        }
+        return attachTexture2D(gl, attachmentPoint, textureInternalFormat, textureDataFormat, textureDataType, magFilter, minFilter, wrapS, wrapT);
+    }
+    
+    /**
+     * Attaches a Texture2D Color Buffer to this FBO's instance at the given attachment point.
+     * 
+     * <p>Leaves the FBO bound.</p>
+     * 
+     * @param gl the current GL context
+     * @param attachmentPoint the color attachment point ranging from [0..{@link #getMaxColorAttachments()}-1]
+     * @param internalFormat internalFormat parameter to {@link GL#glTexImage2D(int, int, int, int, int, int, int, int, long)}
+     * @param dataFormat format parameter to {@link GL#glTexImage2D(int, int, int, int, int, int, int, int, long)}
+     * @param dataType type parameter to {@link GL#glTexImage2D(int, int, int, int, int, int, int, int, long)}
+     * @param magFilter if > 0 value for {@link GL#GL_TEXTURE_MAG_FILTER}
+     * @param minFilter if > 0 value for {@link GL#GL_TEXTURE_MIN_FILTER} 
+     * @param wrapS if > 0 value for {@link GL#GL_TEXTURE_WRAP_S}
+     * @param wrapT if > 0 value for {@link GL#GL_TEXTURE_WRAP_T}
+     * @return TextureAttachment instance describing the new attached texture colorbuffer if bound and configured successfully, otherwise GLException is thrown
+     * @throws GLException in case the texture colorbuffer couldn't be allocated or MSAA has been chosen
+     */
+    public final TextureAttachment attachTexture2D(GL gl, int attachmentPoint,
+                                                   int internalFormat, int dataFormat, int dataType,
+                                                   int magFilter, int minFilter, int wrapS, int wrapT) throws GLException {
+        return attachTexture2D(gl, attachmentPoint, 
+                               new TextureAttachment(Type.COLOR_TEXTURE, internalFormat, width, height, dataFormat, dataType, 
+                                                     magFilter, minFilter, wrapS, wrapT, 0 /* name */));
+    }
+    
+    /**
+     * Attaches a Texture2D Color Buffer to this FBO's instance at the given attachment point.
+     *  
+     * <p>
+     * In case the passed TextureAttachment <code>texA</code> is uninitialized, i.e. it's texture name is <code>zero</code>,
+     * a new texture name is generated and setup w/ the texture parameter.<br/>
+     * Otherwise, i.e. texture name is not <code>zero</code>, the passed TextureAttachment <code>texA</code> is
+     * considered complete and assumed matching this FBO requirement. A GL error may occur is the latter is untrue. 
+     * </p>
+     *    
+     * <p>Leaves the FBO bound.</p>
+     * 
+     * @param gl the current GL context
+     * @param attachmentPoint the color attachment point ranging from [0..{@link #getMaxColorAttachments()}-1]
+     * @param texA the to be attached {@link TextureAttachment}. Maybe complete or uninitialized, see above. 
+     * @return the passed TextureAttachment <code>texA</code> instance describing the new attached texture colorbuffer if bound and configured successfully, otherwise GLException is thrown
+     * @throws GLException in case the texture colorbuffer couldn't be allocated or MSAA has been chosen
+     */
+    public final TextureAttachment attachTexture2D(GL gl, int attachmentPoint, TextureAttachment texA) throws GLException {
+        validateAddColorAttachment(attachmentPoint, texA);
+        
+        if(samples>0) {
+            removeColorAttachment(attachmentPoint, texA);
+            throw new GLException("Texture2D not supported w/ MSAA. If you have enabled MSAA with exisiting texture attachments, you may want to detach them via detachAllTexturebuffer(gl).");
+        }
+        
+        texA.initialize(gl);
+        addColorAttachment(attachmentPoint, texA);
+                
+        bind(gl);
+
+        // Set up the color buffer for use as a renderable texture:
+        gl.glFramebufferTexture2D(GL.GL_FRAMEBUFFER,
+                                  GL.GL_COLOR_ATTACHMENT0 + attachmentPoint,
+                                  GL.GL_TEXTURE_2D, texA.getName(), 0);
+        updateStatus(gl);
+        
+        if(!isStatusValid()) {
+            detachColorbuffer(gl, attachmentPoint);
+            throw new GLException("attachTexture2D "+texA+" at "+attachmentPoint+" failed "+getStatusString()+", "+this);
+        }
+        if(DEBUG) {
+            System.err.println("FBObject.attachTexture2D: "+this);
+        }
+        return texA;
+    }
+    
+    /**
+     * Attaches a Color Buffer to this FBO's instance at the given attachment point,
+     * selecting the format automatically.
+     *  
+     * <p>Leaves the FBO bound.</p>
+     * 
+     * @param gl the current GL context
+     * @param attachmentPoint the color attachment point ranging from [0..{@link #getMaxColorAttachments()}-1]
+     * @param alpha set to <code>true</code> if you request alpha channel, otherwise <code>false</code>;
+     * @return ColorAttachment instance describing the new attached colorbuffer if bound and configured successfully, otherwise GLException is thrown
+     * @throws GLException in case the colorbuffer couldn't be allocated
+     */
+    public final ColorAttachment attachColorbuffer(GL gl, int attachmentPoint, boolean alpha) throws GLException {
+        final int internalFormat;
+        if( rgba8Avail ) {
+            internalFormat = alpha ? GL.GL_RGBA8 : GL.GL_RGB8 ;
+        } else {
+            internalFormat = alpha ? GL.GL_RGBA4 : GL.GL_RGB565;
+        }
+        return attachColorbuffer(gl, attachmentPoint, internalFormat);
+    }
+    
+    /**
+     * Attaches a Color Buffer to this FBO's instance at the given attachment point.
+     *  
+     * <p>Leaves the FBO bound.</p>
+     * 
+     * @param gl the current GL context
+     * @param attachmentPoint the color attachment point ranging from [0..{@link #getMaxColorAttachments()}-1]
+     * @param internalFormat usually {@link GL#GL_RGBA4}, {@link GL#GL_RGB5_A1}, {@link GL#GL_RGB565}, {@link GL#GL_RGB8} or {@link GL#GL_RGBA8}  
+     * @return ColorAttachment instance describing the new attached colorbuffer if bound and configured successfully, otherwise GLException is thrown
+     * @throws GLException in case the colorbuffer couldn't be allocated
+     * @throws IllegalArgumentException if <code>internalFormat</code> doesn't reflect a colorbuffer
+     */
+    public final ColorAttachment attachColorbuffer(GL gl, int attachmentPoint, int internalFormat) throws GLException, IllegalArgumentException {
+        final Attachment.Type atype = Attachment.Type.determine(internalFormat);
+        if( Attachment.Type.COLOR != atype ) {
+            throw new IllegalArgumentException("colorformat invalid: 0x"+Integer.toHexString(internalFormat)+", "+this);
+        }
+        
+        return attachColorbuffer(gl, attachmentPoint, new ColorAttachment(internalFormat, samples, width, height, 0));
+    }
+    
+    /**
+     * Attaches a Color Buffer to this FBO's instance at the given attachment point.
+     *  
+     * <p>Leaves the FBO bound.</p>
+     * 
+     * @param gl
+     * @param attachmentPoint the color attachment point ranging from [0..{@link #getMaxColorAttachments()}-1]
+     * @param colA the template for the new {@link ColorAttachment}   
+     * @return ColorAttachment instance describing the new attached colorbuffer if bound and configured successfully, otherwise GLException is thrown
+     * @throws GLException in case the colorbuffer couldn't be allocated
+     */
+    public final ColorAttachment attachColorbuffer(GL gl, int attachmentPoint, ColorAttachment colA) throws GLException {
+        validateAddColorAttachment(attachmentPoint, colA);
+        
+        colA.initialize(gl);        
+        addColorAttachment(attachmentPoint, colA);
+        
+        bind(gl);
+                
+        // Attach the color buffer
+        gl.glFramebufferRenderbuffer(GL.GL_FRAMEBUFFER, 
+                                     GL.GL_COLOR_ATTACHMENT0 + attachmentPoint, 
+                                     GL.GL_RENDERBUFFER, colA.getName());
+
+        updateStatus(gl);                
+        if(!isStatusValid()) {
+            detachColorbuffer(gl, attachmentPoint);
+            throw new GLException("attachColorbuffer "+colA+" at "+attachmentPoint+" failed "+getStatusString()+", "+this);
+        }
+        if(DEBUG) {
+            System.err.println("FBObject.attachColorbuffer: "+this);
+        }
+        return colA;
+    }
+
+    
+    /**
+     * Attaches one depth, stencil or packed-depth-stencil buffer to this FBO's instance,
+     * selecting the internalFormat automatically.
+     * <p>
+     * Stencil and depth buffer can be attached only once.
+     * </p>
+     * <p>
+     * In case the desired type or bit-number is not supported, the next available one is chosen.
+     * </p>  
+     * <p>
+     * Use {@link #getDepthAttachment()} and/or {@link #getStencilAttachment()} to retrieve details
+     * about the attached buffer. The details cannot be returned, since it's possible 2 buffers
+     * are being created, depth and stencil.
+     * </p>
+     * 
+     * <p>Leaves the FBO bound.</p>
+     * 
+     * @param gl
+     * @param atype either {@link Type#DEPTH}, {@link Type#STENCIL} or {@link Type#DEPTH_STENCIL}  
+     * @param reqBits desired bits for depth or -1 for default (24 bits)
+     * @throws GLException in case the renderbuffer couldn't be allocated or one is already attached.
+     * @throws IllegalArgumentException
+     * @see #getDepthAttachment()
+     * @see #getStencilAttachment()
+     */
+    public final void attachRenderbuffer(GL gl, Attachment.Type atype, int reqBits) throws GLException, IllegalArgumentException {        
+        if( 0 > reqBits ) {
+            reqBits = 24;
+        }        
+        final int internalFormat;
+        int internalStencilFormat = -1;
+        
+        switch ( atype ) {
+            case DEPTH:
+                if( 32 <= reqBits && depth32Avail ) {
+                    internalFormat = GL.GL_DEPTH_COMPONENT32;
+                } else if( 24 <= reqBits && depth24Avail ) {
+                    internalFormat = GL.GL_DEPTH_COMPONENT24;
+                } else {
+                    internalFormat = GL.GL_DEPTH_COMPONENT16;                    
+                }
+                break;
+                
+            case STENCIL:
+                if( 16 <= reqBits && stencil16Avail ) {
+                    internalFormat = GL2GL3.GL_STENCIL_INDEX16;
+                } else if( 8 <= reqBits && stencil08Avail ) {
+                    internalFormat = GL.GL_STENCIL_INDEX8;
+                } else if( 4 <= reqBits && stencil04Avail ) {
+                    internalFormat = GL.GL_STENCIL_INDEX4;
+                } else if( 1 <= reqBits && stencil01Avail ) {
+                    internalFormat = GL.GL_STENCIL_INDEX1;
+                } else {
+                    throw new GLException("stencil buffer n/a");        
+                }
+                break;
+                
+            case DEPTH_STENCIL:
+                if( packedDepthStencilAvail ) {
+                    internalFormat = GL.GL_DEPTH24_STENCIL8;
+                } else {
+                    if( 24 <= reqBits && depth24Avail ) {
+                        internalFormat = GL.GL_DEPTH_COMPONENT24;
+                    } else {
+                        internalFormat = GL.GL_DEPTH_COMPONENT16;                    
+                    }
+                    if( stencil08Avail ) {
+                        internalStencilFormat = GL.GL_STENCIL_INDEX8;
+                    } else if( stencil04Avail ) {
+                        internalStencilFormat = GL.GL_STENCIL_INDEX4;
+                    } else if( stencil01Avail ) {
+                        internalStencilFormat = GL.GL_STENCIL_INDEX1;
+                    } else {
+                        throw new GLException("stencil buffer n/a");
+                    }
+                }
+                break;
+            default:
+                throw new IllegalArgumentException("only depth/stencil types allowed, was "+atype+", "+this);
+        }
+        
+        attachRenderbufferImpl(gl, atype, internalFormat);
+        
+        if(0<=internalStencilFormat) {
+            attachRenderbufferImpl(gl, Attachment.Type.STENCIL, internalStencilFormat);
+        }
+    }
+    
+    /**
+     * Attaches one depth, stencil or packed-depth-stencil buffer to this FBO's instance,
+     * depending on the <code>internalFormat</code>. 
+     * <p>
+     * Stencil and depth buffer can be attached only once.
+     * </p>
+     * <p>
+     * Use {@link #getDepthAttachment()} and/or {@link #getStencilAttachment()} to retrieve details
+     * about the attached buffer. The details cannot be returned, since it's possible 2 buffers
+     * are being created, depth and stencil.
+     * </p>
+     * 
+     * <p>Leaves the FBO bound.</p>
+     * 
+     * @param gl the current GL context
+     * @param internalFormat {@link GL#GL_DEPTH_COMPONENT16}, {@link GL#GL_DEPTH_COMPONENT24}, {@link GL#GL_DEPTH_COMPONENT32},
+     *                       {@link GL#GL_STENCIL_INDEX1}, {@link GL#GL_STENCIL_INDEX4}, {@link GL#GL_STENCIL_INDEX8}
+     *                       or {@link GL#GL_DEPTH24_STENCIL8}
+     * @throws GLException in case the renderbuffer couldn't be allocated or one is already attached.
+     * @throws IllegalArgumentException
+     * @see #getDepthAttachment()
+     * @see #getStencilAttachment()
+     */
+    public final void attachRenderbuffer(GL gl, int internalFormat) throws GLException, IllegalArgumentException {
+        final Attachment.Type atype = Attachment.Type.determine(internalFormat);
+        if( Attachment.Type.DEPTH != atype && Attachment.Type.STENCIL != atype && Attachment.Type.DEPTH_STENCIL != atype ) {
+            throw new IllegalArgumentException("renderformat invalid: 0x"+Integer.toHexString(internalFormat)+", "+this);
+        }
+        attachRenderbufferImpl(gl, atype, internalFormat);
+    }
+    
+    protected final void attachRenderbufferImpl(GL gl, Attachment.Type atype, int internalFormat) throws GLException {
+        if( null != depth && ( Attachment.Type.DEPTH == atype || Attachment.Type.DEPTH_STENCIL == atype ) ) {
+            throw new GLException("FBO depth buffer already attached (rb "+depth+"), type is "+atype+", 0x"+Integer.toHexString(internalFormat)+", "+this);
+        }        
+        if( null != stencil && ( Attachment.Type.STENCIL== atype || Attachment.Type.DEPTH_STENCIL == atype ) ) {
+            throw new GLException("FBO stencil buffer already attached (rb "+stencil+"), type is "+atype+", 0x"+Integer.toHexString(internalFormat)+", "+this);
+        }
+        attachRenderbufferImpl2(gl, atype, internalFormat);
+    }
+        
+    private final void attachRenderbufferImpl2(GL gl, Attachment.Type atype, int internalFormat) throws GLException {
+        if( Attachment.Type.DEPTH == atype ) {
+            if(null == depth) {
+                depth = new RenderAttachment(Type.DEPTH, internalFormat, samples, width, height, 0);
+            } else {
+                depth.setSize(width, height);
+                depth.setSamples(samples);
+            }
+            depth.initialize(gl);
+        } else if( Attachment.Type.STENCIL == atype ) {
+            if(null == stencil) {
+                stencil = new RenderAttachment(Type.STENCIL, internalFormat, samples, width, height, 0);
+            } else {
+                stencil.setSize(width, height);
+                stencil.setSamples(samples);
+            }
+            stencil.initialize(gl);
+        } else if( Attachment.Type.DEPTH_STENCIL == atype ) {
+            if(null == depth) {
+                depth = new RenderAttachment(Type.DEPTH, internalFormat, samples, width, height, 0);
+            } else {
+                depth.setSize(width, height);
+                depth.setSamples(samples);
+            }
+            depth.initialize(gl);
+            if(null == stencil) {
+                stencil = new RenderAttachment(Type.STENCIL, internalFormat, samples, width, height, depth.getName());
+            } else {
+                stencil.setName(depth.getName());
+                stencil.setSize(width, height);
+                stencil.setSamples(samples);
+            }
+            stencil.initialize(gl);
+        }
+
+        bind(gl);
+        
+        // Attach the buffer
+        if( Attachment.Type.DEPTH == atype ) {
+            gl.glFramebufferRenderbuffer(GL.GL_FRAMEBUFFER, GL.GL_DEPTH_ATTACHMENT, GL.GL_RENDERBUFFER, depth.getName());
+        } else if( Attachment.Type.STENCIL == atype ) {
+            gl.glFramebufferRenderbuffer(GL.GL_FRAMEBUFFER, GL.GL_STENCIL_ATTACHMENT, GL.GL_RENDERBUFFER, stencil.getName());
+        } else if( Attachment.Type.DEPTH_STENCIL == atype ) {
+            gl.glFramebufferRenderbuffer(GL.GL_FRAMEBUFFER, GL.GL_DEPTH_ATTACHMENT, GL.GL_RENDERBUFFER, depth.getName());            
+            gl.glFramebufferRenderbuffer(GL.GL_FRAMEBUFFER, GL.GL_STENCIL_ATTACHMENT, GL.GL_RENDERBUFFER, stencil.getName());
+        }
+        
+        updateStatus(gl);
+        if( !isStatusValid() ) {
+            detachRenderbuffer(gl, atype);
+            throw new GLException("renderbuffer attachment failed: "+this.getStatusString());
+        }
+
+        if(DEBUG) {
+            System.err.println("FBObject.attachRenderbuffer: "+this);
+        }
+    }
+    
+    /**
+     * <p>Leaves the FBO bound!</p>
+     * @param gl
+     * @param ca
+     * @throws IllegalArgumentException
+     */
+    public final void detachColorbuffer(GL gl, int attachmentPoint) throws IllegalArgumentException {
+        if(null == detachColorbufferImpl(gl, attachmentPoint, false)) {
+            throw new IllegalArgumentException("ColorAttachment at "+attachmentPoint+", not attached, "+this);            
+        }
+        if(DEBUG) {
+            System.err.println("FBObject.detachAll: "+this);
+        }
+    }
+    
+    private final Colorbuffer detachColorbufferImpl(GL gl, int attachmentPoint, boolean recreate) {
+        final Colorbuffer colbuf = colorAttachmentPoints[attachmentPoint]; // shortcut, don't validate here
+        
+        if(null == colbuf) {
+            return null;
+        }
+        
+        bind(gl);
+        
+        if(colbuf instanceof TextureAttachment) {
+            final TextureAttachment texA = (TextureAttachment) colbuf;
+            if( 0 != texA.getName() ) {
+                gl.glFramebufferTexture2D(GL.GL_FRAMEBUFFER,
+                              GL.GL_COLOR_ATTACHMENT0 + attachmentPoint,
+                              GL.GL_TEXTURE_2D, 0, 0);
+                gl.glBindTexture(GL.GL_TEXTURE_2D, 0);
+            }
+            texA.free(gl);
+            removeColorAttachment(attachmentPoint, texA);                
+            if(recreate) {
+                texA.setSize(width, height);
+                attachTexture2D(gl, attachmentPoint, texA);
+            }
+        } else if(colbuf instanceof ColorAttachment) {
+            final ColorAttachment colA = (ColorAttachment) colbuf;
+            if( 0 != colA.getName() ) {
+                gl.glFramebufferRenderbuffer(GL.GL_FRAMEBUFFER, 
+                                             GL.GL_COLOR_ATTACHMENT0+attachmentPoint, 
+                                             GL.GL_RENDERBUFFER, 0);
+            }
+            colA.free(gl);
+            removeColorAttachment(attachmentPoint, colbuf);
+            if(recreate) {
+                colA.setSize(width, height);
+                colA.setSamples(samples);
+                attachColorbuffer(gl, attachmentPoint, colA);
+            }
+        }
+        return colbuf;
+    }
+    
+    /**
+     * 
+     * @param gl
+     * @param reqAType {@link Type#DEPTH}, {@link Type#DEPTH} or {@link Type#DEPTH_STENCIL} 
+     */
+    public final void detachRenderbuffer(GL gl, Attachment.Type atype) throws IllegalArgumentException {
+        detachRenderbufferImpl(gl, atype, false);
+    }
+    
+    public final boolean isDepthStencilPackedFormat() {
+        final boolean res = null != depth && null != stencil &&
+                            depth.format == stencil.format ;
+        if(res && depth.getName() != stencil.getName() ) {
+            throw new InternalError("depth/stencil packed format not sharing: depth "+depth+", stencil "+stencil);
+        }
+        return res;
+    }
+        
+    private final void detachRenderbufferImpl(GL gl, Attachment.Type atype, boolean recreate) throws IllegalArgumentException {
+        switch ( atype ) {
+            case DEPTH:
+            case STENCIL:
+            case DEPTH_STENCIL:             
+             break;
+             default:
+                 throw new IllegalArgumentException("only depth/stencil types allowed, was "+atype+", "+this);
+        }        
+        if( null == depth && null == stencil ) {
+            return ; // nop
+        } 
+        // reduction of possible combinations, create unique atype command(s)
+        final ArrayList<Attachment.Type> actions = new ArrayList<Attachment.Type>(2);  
+        if( isDepthStencilPackedFormat() ) {
+            // packed
+            actions.add(Attachment.Type.DEPTH_STENCIL);
+        } else {
+            // individual
+            switch ( atype ) {
+                case DEPTH:
+                    if( null != depth ) { actions.add(Attachment.Type.DEPTH); }
+                    break;
+                case STENCIL:
+                    if( null != stencil ) { actions.add(Attachment.Type.STENCIL); }
+                    break;
+                case DEPTH_STENCIL:
+                    if( null != depth ) { actions.add(Attachment.Type.DEPTH); }
+                    if( null != stencil ) { actions.add(Attachment.Type.STENCIL); }
+                    break;
+                 default: // handled
+            }
+        }
+        
+        bind(gl);        
+        
+        for(int i = 0; i < actions.size(); i++) {
+            final int format;
+            
+            Attachment.Type action = actions.get(i);
+            switch ( action ) {
+                case DEPTH:
+                    format = depth.format;
+                    if( 0 != depth.getName() ) {
+                        gl.glFramebufferRenderbuffer(GL.GL_FRAMEBUFFER, GL.GL_DEPTH_ATTACHMENT, GL.GL_RENDERBUFFER, 0);
+                    }
+                    depth.free(gl);
+                    if(!recreate) {
+                        depth = null;
+                    }
+                    break;
+                case STENCIL:
+                    format = stencil.format;
+                    if(0 != stencil.getName()) {
+                        gl.glFramebufferRenderbuffer(GL.GL_FRAMEBUFFER, GL.GL_STENCIL_ATTACHMENT, GL.GL_RENDERBUFFER, 0);
+                    }
+                    stencil.free(gl);
+                    if(!recreate) {
+                        stencil = null;
+                    }
+                    break;
+                case DEPTH_STENCIL:
+                    format = depth.format;
+                    if(0 != depth.getName()) {
+                        gl.glFramebufferRenderbuffer(GL.GL_FRAMEBUFFER, GL.GL_DEPTH_ATTACHMENT, GL.GL_RENDERBUFFER, 0);
+                        gl.glFramebufferRenderbuffer(GL.GL_FRAMEBUFFER, GL.GL_STENCIL_ATTACHMENT, GL.GL_RENDERBUFFER, 0);
+                    }
+                    depth.free(gl);
+                    stencil.free(gl);
+                    if(!recreate) {
+                        depth = null;
+                        stencil = null;
+                    }
+                    break;
+                 default:
+                    throw new InternalError("XXX");
+            }
+            if(recreate) {
+                attachRenderbufferImpl2(gl, action, format);
+            }
+        }        
+    }
+        
+    /** 
+     * Detaches all {@link ColorAttachment}s, {@link TextureAttachment}s and {@link RenderAttachment}s.
+     * <p>Leaves the FBO bound!</p>
+     * <p>
+     * An attached sampling sink texture will be detached as well, see {@link #getSamplingSink()}.
+     * </p> 
+     * @param gl the current GL context
+     */
+    public final void detachAll(GL gl) {
+        if(null != samplesSink) {
+            samplesSink.detachAll(gl);
+        }        
+        detachAllImpl(gl, true/* detachNonColorbuffer */, false /* recreate */);
+    }
+    
+    /** 
+     * Detaches all {@link ColorAttachment}s and {@link TextureAttachment}s.
+     * <p>Leaves the FBO bound!</p>
+     * <p>
+     * An attached sampling sink texture will be detached as well, see {@link #getSamplingSink()}.
+     * </p> 
+     * @param gl the current GL context
+     */
+    public final void detachAllColorbuffer(GL gl) {
+        if(null != samplesSink) {
+            samplesSink.detachAllColorbuffer(gl);
+        }        
+        detachAllImpl(gl, false/* detachNonColorbuffer */, false /* recreate */);
+    }
+    
+    /** 
+     * Detaches all {@link TextureAttachment}s 
+     * <p>Leaves the FBO bound!</p>
+     * <p>
+     * An attached sampling sink texture will be detached as well, see {@link #getSamplingSink()}.
+     * </p> 
+     * @param gl the current GL context
+     */
+    public final void detachAllTexturebuffer(GL gl) {
+        if(null != samplesSink) {
+            samplesSink.detachAllTexturebuffer(gl);
+        }
+        for(int i=0; i<maxColorAttachments; i++) {
+            if(colorAttachmentPoints[i] instanceof TextureAttachment) {
+                detachColorbufferImpl(gl, i, false);
+            }
+        }
+    }
+    
+    public final void detachAllRenderbuffer(GL gl) {
+        if(null != samplesSink) {
+            samplesSink.detachAllRenderbuffer(gl);
+        }
+        detachRenderbufferImpl(gl, Attachment.Type.DEPTH_STENCIL, false);
+    }
+    
+    private final void detachAllImpl(GL gl, boolean detachNonColorbuffer, boolean recreate) {
+        for(int i=0; i<maxColorAttachments; i++) {
+            detachColorbufferImpl(gl, i, recreate);
+        }
+        if( !recreate && colorAttachmentCount>0 ) {
+            throw new InternalError("Non zero ColorAttachments "+this);
+        }
+        
+        if(detachNonColorbuffer) {
+            detachRenderbufferImpl(gl, Attachment.Type.DEPTH_STENCIL, recreate);
+        }
+        
+        if(DEBUG) {
+            System.err.println("FBObject.detachAll: [resetNonColorbuffer "+detachNonColorbuffer+", recreate "+recreate+"]: "+this);
+        }
+    }
+        
+    /**
+     * @param gl the current GL context
+     */
+    public final void destroy(GL gl) {
+        if(null != samplesSink) {
+            samplesSink.destroy(gl);
+        }
+        
+        detachAllImpl(gl, true /* detachNonColorbuffer */, false /* recreate */);
+        
+        // cache FB names, preset exposed to zero,
+        // braking ties w/ GL/GLContext link to getReadFramebuffer()/getWriteFramebuffer()
+        final int fb_cache = fbName;
+        fbName = 0;
+
+        int name[] = new int[1];
+        if(0!=fb_cache) {
+            name[0] = fb_cache;
+            gl.glDeleteFramebuffers(1, name, 0);
+        }        
+        initialized = false;
+        bound = false;
+        if(DEBUG) {
+            System.err.println("FBObject.destroy: "+this);
+        }
+    }
+
+    private final boolean sampleSinkSizeMismatch() {
+        return samplesSink.getWidth() != width || samplesSink.getHeight() != height ;
+    }
+    private final boolean sampleSinkTexMismatch() {
+        return null == samplesSinkTexture || 0 == samplesSinkTexture.getName() ;
+    }
+    private final boolean sampleSinkDepthStencilMismatch() {
+        final boolean depthMismatch   = ( null != depth && null == samplesSink.depth ) ||
+                                        ( null != depth && null != samplesSink.depth &&
+                                          depth.format != samplesSink.depth.format );
+        
+        final boolean stencilMismatch = ( null != stencil && null == samplesSink.stencil ) ||
+                                        ( null != stencil && null != samplesSink.stencil &&
+                                          stencil.format != samplesSink.stencil.format );        
+        
+        return depthMismatch || stencilMismatch;                
+    }
+        
+    private final void resetMSAATexture2DSink(GL gl) throws GLException {
+        if(0 == samples) {
+            // MSAA off
+            if(null != samplesSink) {
+                samplesSink.detachAll(gl);
+            }
+            return;
+        }
+        
+        boolean sampleSinkSizeMismatch = sampleSinkSizeMismatch();
+        boolean sampleSinkTexMismatch = sampleSinkTexMismatch();
+        boolean sampleSinkDepthStencilMismatch = sampleSinkDepthStencilMismatch();
+        
+        /** if(DEBUG) {
+            System.err.println("FBObject.resetMSAATexture2DSink.0: \n\tTHIS "+this+",\n\tSINK "+samplesSink+
+                               "\n\t size "+sampleSinkSizeMismatch +", tex "+sampleSinkTexMismatch +", depthStencil "+sampleSinkDepthStencilMismatch);
+        } */
+        
+        if(!sampleSinkSizeMismatch && !sampleSinkTexMismatch && !sampleSinkDepthStencilMismatch) {
+            // all properties match .. 
+            return;            
+        }
+        
+        unbind(gl);
+        
+        if(DEBUG) {
+            System.err.println("FBObject.resetMSAATexture2DSink: BEGIN\n\tTHIS "+this+",\n\tSINK "+samplesSink+
+                               "\n\t size "+sampleSinkSizeMismatch +", tex "+sampleSinkTexMismatch +", depthStencil "+sampleSinkDepthStencilMismatch);
+        }
+                
+        if( sampleSinkDepthStencilMismatch ) {
+            samplesSink.detachAllRenderbuffer(gl);
+        }
+        
+        if( sampleSinkSizeMismatch ) {
+            samplesSink.reset(gl, width, height);
+        }
+        
+        if(null == samplesSinkTexture) {
+            samplesSinkTexture = samplesSink.attachTexture2D(gl, 0, true);
+        } else if( 0 == samplesSinkTexture.getName() ) {
+            samplesSinkTexture.setSize(width, height);
+            samplesSink.attachTexture2D(gl, 0, samplesSinkTexture);
+        }
+        
+        if( sampleSinkDepthStencilMismatch ) {
+            samplesSink.attachRenderbuffer(gl, depth.format);
+            if( null != stencil && !isDepthStencilPackedFormat() ) {
+                samplesSink.attachRenderbuffer(gl, stencil.format);
+            }
+        }        
+        
+        sampleSinkSizeMismatch = sampleSinkSizeMismatch();
+        sampleSinkTexMismatch = sampleSinkTexMismatch();
+        sampleSinkDepthStencilMismatch = sampleSinkDepthStencilMismatch();
+        if(sampleSinkSizeMismatch || sampleSinkTexMismatch || sampleSinkDepthStencilMismatch) {
+            throw new InternalError("Samples sink mismatch after reset: \n\tTHIS "+this+",\n\t SINK "+samplesSink+
+                                    "\n\t size "+sampleSinkSizeMismatch +", tex "+sampleSinkTexMismatch +", depthStencil "+sampleSinkDepthStencilMismatch);
+        }
+        
+        if(DEBUG) {
+            System.err.println("FBObject.resetMSAATexture2DSink: END\n\tTHIS "+this+",\n\tSINK "+samplesSink+
+                               "\n\t size "+sampleSinkSizeMismatch +", tex "+sampleSinkTexMismatch +", depthStencil "+sampleSinkDepthStencilMismatch);
+        }
+    }
+    
+    /** 
+     * Bind this FBO, i.e. bind write framebuffer to {@link #getWriteFramebuffer()}.
+     * 
+     * <p>If multisampling is used, it sets the read framebuffer to the sampling sink {@link #getWriteFramebuffer()}, 
+     * if full FBO is supported.</p>
+     *  
+     * <p> 
+     * In case you have attached more than one color buffer,
+     * you may want to setup {@link GL2GL3#glDrawBuffers(int, int[], int)}.
+     * </p>
+     * @param gl the current GL context
+     * @throws GLException
+     */
+    public final void bind(GL gl) throws GLException {
+        if(!bound || fbName != gl.getBoundFramebuffer(GL.GL_FRAMEBUFFER)) {
+            checkInitialized();
+            if(samples > 0 && fullFBOSupport) {
+                // draw to multisampling - read from samplesSink
+                gl.glBindFramebuffer(GL2GL3.GL_DRAW_FRAMEBUFFER, getWriteFramebuffer());
+                gl.glBindFramebuffer(GL2GL3.GL_READ_FRAMEBUFFER, getReadFramebuffer());
+            } else {
+                // one for all
+                gl.glBindFramebuffer(GL.GL_FRAMEBUFFER, getWriteFramebuffer());                
+            }
+
+            checkNoError(null, gl.glGetError(), "FBObject post-bind"); // throws GLException if error
+            bound = true;
+            samplesSinkDirty = true;
+        }
+    }
+
+    /** 
+     * Unbind this FBO, i.e. bind read and write framebuffer to default, see {@link GLBase#getDefaultDrawFramebuffer()}.
+     * 
+     * <p>If full FBO is supported, sets the read and write framebuffer individually to default, hence not disturbing 
+     * an optional operating MSAA FBO, see {@link GLBase#getDefaultReadFramebuffer()} and {@link GLBase#getDefaultDrawFramebuffer()}</p>
+     *  
+     * @param gl the current GL context
+     * @throws GLException
+     */
+    public final void unbind(GL gl) throws GLException {
+        if(bound) {
+            if(fullFBOSupport) {
+                // default read/draw buffers, may utilize GLContext/GLDrawable override of 
+                // GLContext.getDefaultDrawFramebuffer() and GLContext.getDefaultReadFramebuffer()
+                gl.glBindFramebuffer(GL2GL3.GL_DRAW_FRAMEBUFFER, 0);
+                gl.glBindFramebuffer(GL2GL3.GL_READ_FRAMEBUFFER, 0);
+            } else {
+                gl.glBindFramebuffer(GL.GL_FRAMEBUFFER, 0); // default draw buffer                
+            }
+            checkNoError(null, gl.glGetError(), "FBObject post-unbind"); // throws GLException if error
+            bound = false;
+        }
+    }
+
+    /** 
+     * Returns <code>true</code> if framebuffer object is bound via {@link #bind(GL)}, otherwise <code>false</code>.
+     * <p>
+     * Method verifies the bound state via {@link GL#getBoundFramebuffer(int)}.
+     * </p>
+     * @param gl the current GL context
+     */
+    public final boolean isBound(GL gl) { 
+        bound = bound &&  fbName != gl.getBoundFramebuffer(GL.GL_FRAMEBUFFER) ;
+        return bound;
+    }
+    
+    /** Returns <code>true</code> if framebuffer object is bound via {@link #bind(GL)}, otherwise <code>false</code>. */
+    public final boolean isBound() { return bound; }
+    
+    /** 
+     * Samples the multisampling colorbuffer (msaa-buffer) to it's sink {@link #getSamplingSink()}.
+     *
+     * <p>The operation is skipped, if no multisampling is used or 
+     * the msaa-buffer has not been flagged dirty by a previous call of {@link #bind(GL)},
+     * see {@link #isSamplingBufferDirty()} </p>
+     * 
+     * <p>If full FBO is supported, sets the read and write framebuffer individually to default after sampling, hence not disturbing 
+     * an optional operating MSAA FBO, see {@link GLBase#getDefaultReadFramebuffer()} and {@link GLBase#getDefaultDrawFramebuffer()}</p>
+     * 
+     * <p>In case you intend to employ {@link GL#glReadPixels(int, int, int, int, int, int, java.nio.Buffer) glReadPixels(..)}
+     * you may want to call {@link GL#glBindFramebuffer(int, int) glBindFramebuffer}({@link GL2GL3#GL_READ_FRAMEBUFFER}, {@link #getReadFramebuffer()});
+     * </p>
+     * 
+     * <p>Leaves the FBO unbound.</p>
+     * 
+     * @param gl the current GL context
+     * @param ta {@link TextureAttachment} to use, prev. attached w/  {@link #attachTexture2D(GL, int, boolean, int, int, int, int) attachTexture2D(..)}
+     * @throws IllegalArgumentException  
+     */
+    public final void syncSamplingBuffer(GL gl) {
+        unbind(gl);
+        if(samples>0 && samplesSinkDirty) {
+            samplesSinkDirty = false;
+            resetMSAATexture2DSink(gl);
+            gl.glBindFramebuffer(GL2GL3.GL_READ_FRAMEBUFFER, fbName);
+            gl.glBindFramebuffer(GL2GL3.GL_DRAW_FRAMEBUFFER, samplesSink.getWriteFramebuffer());
+            ((GL2GL3)gl).glBlitFramebuffer(0, 0, width, height, 0, 0, width, height, // since MSAA is supported, ugly cast is OK
+                                           GL.GL_COLOR_BUFFER_BIT, GL.GL_NEAREST);
+            if(fullFBOSupport) {
+                // default read/draw buffers, may utilize GLContext/GLDrawable override of 
+                // GLContext.getDefaultDrawFramebuffer() and GLContext.getDefaultReadFramebuffer()
+                gl.glBindFramebuffer(GL2GL3.GL_DRAW_FRAMEBUFFER, 0);
+                gl.glBindFramebuffer(GL2GL3.GL_READ_FRAMEBUFFER, 0);
+            } else {
+                gl.glBindFramebuffer(GL.GL_FRAMEBUFFER, 0); // default draw buffer                
+            }
+        }
+    }
+    
+    /** 
+     * Bind the given texture colorbuffer.
+     * 
+     * <p>If multisampling is being used, {@link #syncSamplingBuffer(GL)} is being called.</p>
+     *  
+     * <p>Leaves the FBO unbound!</p>
+     * 
+     * @param gl the current GL context
+     * @param ta {@link TextureAttachment} to use, prev. attached w/  {@link #attachTexture2D(GL, int, boolean, int, int, int, int) attachTexture2D(..)}
+     * @throws IllegalArgumentException  
+     */
+    public final void use(GL gl, TextureAttachment ta) throws IllegalArgumentException {
+        if(null == ta) { throw new IllegalArgumentException("null TextureAttachment"); }
+        if(samples > 0 && samplesSinkTexture == ta) {
+            syncSamplingBuffer(gl);
+        } else {
+            unbind(gl);            
+        }
+        gl.glBindTexture(GL.GL_TEXTURE_2D, ta.getName()); // use it ..
+    }
+
+    /** 
+     * Unbind texture, ie bind 'non' texture 0
+     *  
+     * <p>Leaves the FBO unbound.</p>
+     */    
+    public final void unuse(GL gl) {
+        unbind(gl);
+        gl.glBindTexture(GL.GL_TEXTURE_2D, 0); // don't use it
+    }
+
+    /** 
+     * Returns <code>true</code> if <i>basic</i> or <i>full</i> FBO is supported, otherwise <code>false</code>.
+     * @param full <code>true</code> for <i>full</i> FBO supported query, otherwise <code>false</code> for <i>basic</i> FBO support query.
+     * @see #supportsFullFBO(GL)
+     * @see #supportsBasicFBO(GL)
+     * @throws GLException if {@link #init(GL)} hasn't been called.
+     */
+    public final boolean supportsFBO(boolean full) throws GLException { checkInitialized(); return full ? fullFBOSupport : basicFBOSupport; }
+    
+    /** 
+     * Returns <code>true</code> if renderbuffer accepts internal format {@link GL#GL_RGB8} and {@link GL#GL_RGBA8}, otherwise <code>false</code>.
+     * @throws GLException if {@link #init(GL)} hasn't been called.
+     */
+    public final boolean supportsRGBA8() throws GLException { checkInitialized(); return rgba8Avail; }
+    
+    /** 
+     * Returns <code>true</code> if {@link GL#GL_DEPTH_COMPONENT16}, {@link GL#GL_DEPTH_COMPONENT24} or {@link GL#GL_DEPTH_COMPONENT32} is supported, otherwise <code>false</code>.
+     * @param bits 16, 24 or 32 bits
+     * @throws GLException if {@link #init(GL)} hasn't been called.
+     */
+    public final boolean supportsDepth(int bits) throws GLException {
+        checkInitialized();
+        switch(bits) {
+            case 16: return basicFBOSupport; 
+            case 24: return depth24Avail;
+            case 32: return depth32Avail;
+            default: return false;            
+        }
+    }
+    
+    /** 
+     * Returns <code>true</code> if {@link GL#GL_STENCIL_INDEX1}, {@link GL#GL_STENCIL_INDEX4}, {@link GL#GL_STENCIL_INDEX8} or {@link GL2GL3#GL_STENCIL_INDEX16} is supported, otherwise <code>false</code>.
+     * @param bits 1, 4, 8 or 16 bits
+     * @throws GLException if {@link #init(GL)} hasn't been called.
+     */
+    public final boolean supportsStencil(int bits) throws GLException {
+        checkInitialized();
+        switch(bits) {
+            case  1: return stencil01Avail; 
+            case  4: return stencil04Avail;
+            case  8: return stencil08Avail;
+            case 16: return stencil16Avail;
+            default: return false;            
+        }
+    }
+    
+    /** 
+     * Returns <code>true</code> if {@link GL#GL_DEPTH24_STENCIL8} is supported, otherwise <code>false</code>.
+     * @throws GLException if {@link #init(GL)} hasn't been called.
+     */
+    public final boolean supportsPackedDepthStencil() throws GLException { checkInitialized(); return packedDepthStencilAvail; }
+    
+    /**
+     * Returns the maximum number of colorbuffer attachments.
+     * @throws GLException if {@link #init(GL)} hasn't been called.
+     */
+    public final int getMaxColorAttachments() throws GLException { checkInitialized(); return maxColorAttachments; }
+    
+    /**
+     * Returns the maximum number of samples for multisampling. Maybe zero if multisampling is not supported. 
+     * @throws GLException if {@link #init(GL)} hasn't been called.
+     */
+    public final int getMaxSamples() throws GLException { checkInitialized(); return maxSamples; }
+    
+    /**
+     * Returns <code>true</code> if this instance has been initialized with {@link #reset(GL, int, int)} 
+     * or {@link #reset(GL, int, int, int)}, otherwise <code>false</code>
+     */
+    public final boolean isInitialized() { return initialized; }
+    /** Returns the width */
+    public final int getWidth() { return width; }
+    /** Returns the height */
+    public final int getHeight() { return height; }
+    /** Returns the number of samples for multisampling (MSAA). zero if no multisampling is used. */
+    public final int getNumSamples() { return samples; }
+    /** Returns the framebuffer name to render to. */
+    public final int getWriteFramebuffer() { return fbName; }
+    /** Returns the framebuffer name to read from. Depending on multisampling, this may be a different framebuffer. */
+    public final int getReadFramebuffer() { return ( samples > 0 ) ? samplesSink.getReadFramebuffer() : fbName; }
+    /** Return the number of color/texture attachments */
+    public final int getColorAttachmentCount() { return colorAttachmentCount; }
+    /** Return the stencil {@link RenderAttachment} attachment, if exist. Maybe share the same {@link Attachment#getName()} as {@link #getDepthAttachment()}, if packed depth-stencil is being used. */ 
+    public final RenderAttachment getStencilAttachment() { return stencil; }
+    /** Return the depth {@link RenderAttachment} attachment. Maybe share the same {@link Attachment#getName()} as {@link #getStencilAttachment()}, if packed depth-stencil is being used. */ 
+    public final RenderAttachment getDepthAttachment() { return depth; }
+    
+    /** Return the complete multisampling {@link FBObject} sink, if using multisampling. */ 
+    public final FBObject getSamplingSinkFBO() { return samplesSink; }
+    
+    /** Return the multisampling {@link TextureAttachment} sink, if using multisampling. */ 
+    public final TextureAttachment getSamplingSink() { return samplesSinkTexture; }
+    /** 
+     * Returns <code>true</code> if the multisampling colorbuffer (msaa-buffer) 
+     * has been flagged dirty by a previous call of {@link #bind(GL)},
+     * otherwise <code>false</code>.
+     */
+    public final boolean isSamplingBufferDirty() { return samplesSinkDirty; }
+    
+    int objectHashCode() { return super.hashCode(); }
+    
+    public final String toString() {
+        final String caps = null != colorAttachmentPoints ? Arrays.asList(colorAttachmentPoints).toString() : null ; 
+        return "FBO[name r/w "+fbName+"/"+getReadFramebuffer()+", init "+initialized+", bound "+bound+", size "+width+"x"+height+", samples "+samples+"/"+maxSamples+
+               ", depth "+depth+", stencil "+stencil+", color attachments: "+colorAttachmentCount+"/"+maxColorAttachments+
+               ": "+caps+", msaa-sink "+samplesSinkTexture+", isSamplesSink "+(null == samplesSink)+
+               ", obj 0x"+Integer.toHexString(objectHashCode())+"]";
+    }
+    
+    private final void updateStatus(GL gl) {
+        if( 0 == fbName ) {
+            vStatus = -1;
+        } else {
+            vStatus = gl.glCheckFramebufferStatus(GL.GL_FRAMEBUFFER);
+        }
+    }       
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/GLExtensions.java b/src/jogl/classes/com/jogamp/opengl/GLExtensions.java
new file mode 100644
index 0000000..f7e25fa
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/GLExtensions.java
@@ -0,0 +1,81 @@
+/**
+ * Copyright 2012 JogAmp Community. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ *    1. Redistributions of source code must retain the above copyright notice, this list of
+ *       conditions and the following disclaimer.
+ *
+ *    2. Redistributions in binary form must reproduce the above copyright notice, this list
+ *       of conditions and the following disclaimer in the documentation and/or other materials
+ *       provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of JogAmp Community.
+ */
+package com.jogamp.opengl;
+
+/**
+ * Class holding OpenGL extension strings, commonly used by JOGL's implementation. 
+ */
+public class GLExtensions {
+  public static final String VERSION_1_2                     = "GL_VERSION_1_2";
+  public static final String VERSION_1_4                     = "GL_VERSION_1_4";
+  public static final String VERSION_1_5                     = "GL_VERSION_1_5";
+  public static final String VERSION_2_0                     = "GL_VERSION_2_0";
+  
+  public static final String ARB_debug_output                = "GL_ARB_debug_output";
+  public static final String AMD_debug_output                = "GL_AMD_debug_output";
+    
+  public static final String ARB_framebuffer_object          = "GL_ARB_framebuffer_object";
+  public static final String OES_framebuffer_object          = "GL_OES_framebuffer_object";
+  public static final String EXT_framebuffer_object          = "GL_EXT_framebuffer_object";
+  public static final String EXT_framebuffer_blit            = "GL_EXT_framebuffer_blit";
+  public static final String EXT_framebuffer_multisample     = "GL_EXT_framebuffer_multisample";
+  public static final String EXT_packed_depth_stencil        = "GL_EXT_packed_depth_stencil";
+  public static final String OES_depth24                     = "GL_OES_depth24";
+  public static final String OES_depth32                     = "GL_OES_depth32";
+  public static final String OES_packed_depth_stencil        = "GL_OES_packed_depth_stencil";
+  public static final String NV_fbo_color_attachments        = "GL_NV_fbo_color_attachments";
+  
+  public static final String ARB_ES2_compatibility           = "GL_ARB_ES2_compatibility";
+  
+  public static final String EXT_abgr                        = "GL_EXT_abgr";
+  public static final String OES_rgb8_rgba8                  = "GL_OES_rgb8_rgba8";
+  public static final String OES_stencil1                    = "GL_OES_stencil1";
+  public static final String OES_stencil4                    = "GL_OES_stencil4";
+  public static final String OES_stencil8                    = "GL_OES_stencil8";
+  public static final String APPLE_float_pixels              = "GL_APPLE_float_pixels";
+  
+  public static final String ARB_texture_non_power_of_two    = "GL_ARB_texture_non_power_of_two";
+  public static final String ARB_texture_rectangle           = "GL_ARB_texture_rectangle";
+  public static final String EXT_texture_rectangle           = "GL_EXT_texture_rectangle";
+  public static final String NV_texture_rectangle            = "GL_NV_texture_rectangle";
+  public static final String EXT_texture_format_BGRA8888     = "GL_EXT_texture_format_BGRA8888";
+  public static final String IMG_texture_format_BGRA8888     = "GL_IMG_texture_format_BGRA8888";
+  public static final String EXT_texture_compression_s3tc    = "GL_EXT_texture_compression_s3tc";
+  public static final String NV_texture_compression_vtc      = "GL_NV_texture_compression_vtc";
+  public static final String SGIS_generate_mipmap            = "GL_SGIS_generate_mipmap";
+  public static final String OES_read_format                 = "GL_OES_read_format";
+  
+  public static final String OES_EGL_image_external          = "GL_OES_EGL_image_external";
+  
+  //
+  // Aliased GLX/WGL/.. extensions
+  //
+  
+  public static final String ARB_pixel_format                = "GL_ARB_pixel_format"; 
+  public static final String ARB_pbuffer                     = "GL_ARB_pbuffer";
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/JoglVersion.java b/src/jogl/classes/com/jogamp/opengl/JoglVersion.java
index c8e5d21..cdb4b82 100644
--- a/src/jogl/classes/com/jogamp/opengl/JoglVersion.java
+++ b/src/jogl/classes/com/jogamp/opengl/JoglVersion.java
@@ -93,22 +93,26 @@ public class JoglVersion extends JogampVersion {
         return sb;        
     }
     
-    public static StringBuilder getDefaultOpenGLInfo(StringBuilder sb) {
+    public static StringBuilder getDefaultOpenGLInfo(AbstractGraphicsDevice device, StringBuilder sb, boolean withCapabilitiesInfo) {
         if(null==sb) {
             sb = new StringBuilder();
         }
-        final AbstractGraphicsDevice device = GLProfile.getDefaultDevice();
-        sb.append("Default Profiles     ").append(Platform.getNewline());
+        if(null == device) {
+            device = GLProfile.getDefaultDevice();
+        }
+        sb.append("Default Profiles on device ").append(device).append(Platform.getNewline());
         if(null!=device) {
             GLProfile.glAvailabilityToString(device, sb, "\t", 1);
         } else {
             sb.append("none");
         }
-        sb.append(Platform.getNewline()).append(Platform.getNewline());
-        sb.append("Desktop Capabilities: ").append(Platform.getNewline());
-        getAvailableCapabilitiesInfo(GLDrawableFactory.getDesktopFactory(), device, sb);
-        sb.append("EGL Capabilities: ").append(Platform.getNewline());
-        getAvailableCapabilitiesInfo(GLDrawableFactory.getEGLFactory(), device, sb);
+        if(withCapabilitiesInfo) {
+            sb.append(Platform.getNewline()).append(Platform.getNewline());
+            sb.append("Desktop Capabilities: ").append(Platform.getNewline());
+            getAvailableCapabilitiesInfo(GLDrawableFactory.getDesktopFactory(), device, sb);
+            sb.append("EGL Capabilities: ").append(Platform.getNewline());
+            getAvailableCapabilitiesInfo(GLDrawableFactory.getEGLFactory(), device, sb);
+        }
         return sb;
     }
     
@@ -118,13 +122,21 @@ public class JoglVersion extends JogampVersion {
         if(null==sb) {
             sb = new StringBuilder();
         }
-        GLContext ctx = gl.getContext();
-
+        
         sb.append(VersionUtil.SEPERATOR).append(Platform.getNewline());
         sb.append(device.getClass().getSimpleName()).append("[type ")
                 .append(device.getType()).append(", connection ").append(device.getConnection()).append("]: ").append(Platform.getNewline());
         GLProfile.glAvailabilityToString(device, sb, "\t", 1);        
         sb.append(Platform.getNewline());
+
+        return getGLStrings(gl, sb);
+    }
+    
+    public static StringBuilder getGLStrings(GL gl, StringBuilder sb) {        
+        if(null==sb) {
+            sb = new StringBuilder();
+        }
+        final GLContext ctx = gl.getContext();
         sb.append("Swap Interval  ").append(gl.getSwapInterval());
         sb.append(Platform.getNewline());
         sb.append("GL Profile     ").append(gl.getGLProfile());
diff --git a/src/jogl/classes/com/jogamp/opengl/OffscreenAutoDrawable.java b/src/jogl/classes/com/jogamp/opengl/OffscreenAutoDrawable.java
new file mode 100644
index 0000000..8450ffd
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/OffscreenAutoDrawable.java
@@ -0,0 +1,98 @@
+/**
+ * Copyright 2012 JogAmp Community. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ * 
+ *    1. Redistributions of source code must retain the above copyright notice, this list of
+ *       conditions and the following disclaimer.
+ * 
+ *    2. Redistributions in binary form must reproduce the above copyright notice, this list
+ *       of conditions and the following disclaimer in the documentation and/or other materials
+ *       provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * 
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of JogAmp Community.
+ */
+
+package com.jogamp.opengl;
+
+import javax.media.nativewindow.AbstractGraphicsDevice;
+import javax.media.opengl.GLAutoDrawableDelegate;
+import javax.media.opengl.GLContext;
+import javax.media.opengl.GLDrawable;
+import javax.media.opengl.GLException;
+
+import jogamp.opengl.GLFBODrawableImpl;
+
+/** 
+ * Platform-independent class exposing FBO offscreen functionality to
+ * applications.
+ * <p>
+ * This class distinguishes itself from {@link GLAutoDrawableDelegate}
+ * with it's {@link #setSize(int, int)} functionality.
+ * </p>
+ */
+public class OffscreenAutoDrawable extends GLAutoDrawableDelegate {
+  
+    /**
+     * @param drawable a valid {@link GLDrawable}, may not be realized yet.
+     * @param context a valid {@link GLContext}, may not be made current (created) yet.
+     * @param ownDevice pass <code>true</code> if {@link AbstractGraphicsDevice#close()} shall be issued,
+     *                  otherwise pass <code>false</code>. Closing the device is required in case
+     *                  the drawable is created w/ it's own new instance, e.g. offscreen drawables,
+     *                  and no further lifecycle handling is applied.
+     */
+    public OffscreenAutoDrawable(GLDrawable drawable, GLContext context, boolean ownDevice) {
+        super(drawable, context, null, ownDevice);
+    }
+
+    /**
+     * Attempts to resize this offscreen auto drawable, if supported
+     * by the underlying {@link GLDrawable).
+     * @param newWidth
+     * @param newHeight
+     * @return <code>true</code> if resize was executed, otherwise <code>false</code>.
+     * @throws GLException in case of an error during the resize operation
+     */
+    public boolean setSize(int newWidth, int newHeight) throws GLException {
+        boolean done = false;
+        if(drawable instanceof GLFBODrawableImpl) {
+            context.makeCurrent();
+            try {                        
+                ((GLFBODrawableImpl)drawable).setSize(context.getGL(), newWidth, newHeight);
+                done = true;
+            } finally {
+                context.release();
+            }
+        }
+        if(done) {
+            this.defaultWindowResizedOp();
+            return true;
+        }
+        return false;
+    }
+    
+    /**
+     * If the underlying {@link GLDrawable} is an FBO implementation
+     * and contains an {#link FBObject}, the same is returned.
+     * Otherwise returns <code>null</code>.
+     */
+    public FBObject getFBObject() { 
+        if(drawable instanceof GLFBODrawableImpl) {
+            return ((GLFBODrawableImpl)drawable).getFBObject();
+        }
+        return null;
+    }
+}
diff --git a/src/jogl/classes/com/jogamp/opengl/cg/CgDynamicLibraryBundleInfo.java b/src/jogl/classes/com/jogamp/opengl/cg/CgDynamicLibraryBundleInfo.java
index d901096..d160ecc 100644
--- a/src/jogl/classes/com/jogamp/opengl/cg/CgDynamicLibraryBundleInfo.java
+++ b/src/jogl/classes/com/jogamp/opengl/cg/CgDynamicLibraryBundleInfo.java
@@ -47,8 +47,8 @@ public class CgDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo {
                 Platform.initSingleton();
                 
                 if(TempJarCache.isInitialized()) {
-                   // Cg class and natives are available in their single atomic JAR files only 
-                   JNILibLoaderBase.addNativeJarLibs(CgDynamicLibraryBundleInfo.class, "jogl_cg", null);
+                   // only: jogl-cg.jar -> jogl-cg-natives-<os.and.arch>.jar [atomic JAR files only]
+                   JNILibLoaderBase.addNativeJarLibs(new Class<?>[] { CgDynamicLibraryBundleInfo.class }, null, null );                   
                 }
                 return null;
             }
diff --git a/src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java b/src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java
index 73ad97f..8d23716 100644
--- a/src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java
+++ b/src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java
@@ -45,9 +45,9 @@ import javax.media.opengl.GLProfile;
 import javax.media.opengl.GLRunnable;
 import javax.media.opengl.Threading;
 
+import jogamp.opengl.Debug;
 import jogamp.opengl.GLContextImpl;
 import jogamp.opengl.GLDrawableHelper;
-import jogamp.opengl.ThreadingImpl;
 
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.ControlAdapter;
@@ -62,6 +62,7 @@ import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Shell;
 
 import com.jogamp.common.GlueGenVersion;
+import com.jogamp.common.os.Platform;
 import com.jogamp.common.util.VersionUtil;
 import com.jogamp.common.util.locks.LockFactory;
 import com.jogamp.common.util.locks.RecursiveLock;
@@ -70,89 +71,104 @@ import com.jogamp.opengl.JoglVersion;
 
 /**
  * Native SWT Canvas implementing GLAutoDrawable
- * <p>
- * FIXME: Still needs AWT for threading impl., 
- *        ie. will issue a 'wrong thread' error if runs in headless mode!
- * </p>
+ * 
+ * <p>Note: To employ custom GLCapabilities, NewtCanvasSWT shall be used instead.</p>
+ * 
  */
 public class GLCanvas extends Canvas implements GLAutoDrawable {
+  private static final boolean DEBUG = Debug.debug("GLCanvas");
 
    /*
     * Flag for whether the SWT thread should be used for OpenGL calls when in single-threaded mode. This is controlled
     * by the setting of the threading mode to worker (do not use SWT thread), awt (use SWT thread), or false (always use
     * calling thread).
-    * 
+    *
     * @see Threading
-    * 
+    *
     * Now done dynamically to avoid early loading of gluegen library.
     */
    //private static final boolean useSWTThread = ThreadingImpl.getMode() != ThreadingImpl.WORKER;
 
    /* GL Stuff */
-   private final GLDrawableHelper drawableHelper = new GLDrawableHelper();
-   private GLDrawable drawable;
+   private final RecursiveLock lock = LockFactory.createRecursiveLock();
+   private final GLDrawableHelper helper = new GLDrawableHelper();
+   
+   private final GLContext shareWith;
+   private final GLCapabilitiesImmutable capsRequested;
+   private final GLCapabilitiesChooser capsChooser; 
+   
+   private volatile GLDrawable drawable; // volatile: avoid locking for read-only access
    private GLContext context;
 
    /* Native window surface */
    private AbstractGraphicsDevice device;
-   private final long nativeWindowHandle;
-   private final ProxySurface proxySurface;
 
    /* Construction parameters stored for GLAutoDrawable accessor methods */
-   private int ctxCreationFlags = 0;
-   
-   private final GLCapabilitiesImmutable glCapsRequested;
+   private int additionalCtxCreationFlags = 0;
 
-   /*
-    * Lock for access to GLDrawable, as used in GLCanvas,
-    */
-   private final RecursiveLock lock = LockFactory.createRecursiveLock();
 
    /* Flag indicating whether an unprocessed reshape is pending. */
-   private volatile boolean sendReshape;
+   private volatile boolean sendReshape; // volatile: maybe written by WindowManager thread w/o locking
 
    /*
     * Invokes init(...) on all GLEventListeners. Assumes context is current when run.
     */
    private final Runnable initAction = new Runnable() {
+      @Override
       public void run() {
-         drawableHelper.init(GLCanvas.this);
+         helper.init(GLCanvas.this);
       }
    };
 
    /*
     * Action to handle display in OpenGL, also processes reshape since they should be done at the same time.
-    * 
+    *
     * Assumes GLContext is current when run.
     */
    private final Runnable displayAction = new Runnable() {
+      @Override
       public void run() {
          if (sendReshape) {
-            drawableHelper.reshape(GLCanvas.this, 0, 0, getWidth(), getHeight());
+            helper.reshape(GLCanvas.this, 0, 0, getWidth(), getHeight());
             sendReshape = false;
          }
-         drawableHelper.display(GLCanvas.this);
+         helper.display(GLCanvas.this);
       }
    };
 
    /* Action to make specified context current prior to running displayAction */
-   private final Runnable makeCurrentAndDisplayAction = new Runnable() {
+   private final Runnable makeCurrentAndDisplayOnEDTAction = new Runnable() {
+      @Override
       public void run() {
-         drawableHelper.invokeGL(drawable, context, displayAction, initAction);
+        final RecursiveLock _lock = lock;
+        _lock.lock();
+        try {            
+            helper.invokeGL(drawable, context, displayAction, initAction);
+        } finally {
+            _lock.unlock();
+        }
       }
    };
 
    /* Swaps buffers, assuming the GLContext is current */
    private final Runnable swapBuffersAction = new Runnable() {
+      @Override
       public void run() {
          drawable.swapBuffers();
       }
    };
 
    /* Swaps buffers, making the GLContext current first */
-   private final Runnable makeCurrentAndSwapBuffersAction = new Runnable() {
+   private final Runnable makeCurrentAndSwapBuffersOnEDTAction = new Runnable() {
+      @Override
       public void run() {
-         drawableHelper.invokeGL(drawable, context, swapBuffersAction, initAction);
+         final RecursiveLock _lock = lock;
+         _lock.lock();
+         try {            
+           helper.invokeGL(drawable, context, swapBuffersAction, initAction);
+         } finally {
+             _lock.unlock();
+         }
       }
    };
 
@@ -160,8 +176,9 @@ public class GLCanvas extends Canvas implements GLAutoDrawable {
     * Disposes of OpenGL resources
     */
    private final Runnable postDisposeGLAction = new Runnable() {
+      @Override
       public void run() {
-         context = null;         
+         context = null;
          if (null != drawable) {
             drawable.setRealized(false);
             drawable = null;
@@ -170,16 +187,35 @@ public class GLCanvas extends Canvas implements GLAutoDrawable {
    };
 
    private final Runnable disposeOnEDTGLAction = new Runnable() {
+      @Override
       public void run() {
-         drawableHelper.disposeGL(GLCanvas.this, drawable, context, postDisposeGLAction);
-      }
-   };
-
-   private final Runnable disposeGraphicsDeviceAction = new Runnable() {
-      public void run() {
-         if (null != device) {
-            device.close();
-            device = null;
+         final RecursiveLock _lock = lock;
+         _lock.lock();
+         try {
+             if (null != drawable && null != context) {
+                boolean animatorPaused = false;
+                final GLAnimatorControl animator = getAnimator();
+                if (null != animator) {
+                   animatorPaused = animator.pause();
+                }
+        
+                if(context.isCreated()) {
+                    helper.disposeGL(GLCanvas.this, drawable, context, postDisposeGLAction);
+                }
+        
+                if (animatorPaused) {
+                   animator.resume();
+                }
+             }
+             // SWT is owner of the device handle, not us.
+             // Hence close() operation is a NOP. 
+             if (null != device) {
+                device.close();
+                device = null;
+             }
+             SWTAccessor.setRealized(GLCanvas.this, false); // unrealize ..
+         } finally {
+             _lock.unlock();
          }
       }
    };
@@ -189,9 +225,40 @@ public class GLCanvas extends Canvas implements GLAutoDrawable {
     */
    private volatile Rectangle clientArea;
 
+   /** 
+    * Creates an instance using {@link #GLCanvas(Composite, int, GLCapabilitiesImmutable, GLCapabilitiesChooser, GLContext)} 
+    * on the SWT thread.
+    * 
+    * @param parent
+    *           Required (non-null) parent Composite.
+    * @param style
+    *           Optional SWT style bit-field. The {@link SWT#NO_BACKGROUND} bit is set before passing this up to the
+    *           Canvas constructor, so OpenGL handles the background.
+    * @param caps
+    *           Optional GLCapabilities. If not provided, the default capabilities for the default GLProfile for the
+    *           graphics device determined by the parent Composite are used. Note that the GLCapabilities that are
+    *           actually used may differ based on the capabilities of the graphics device.
+    * @param chooser
+    *           Optional GLCapabilitiesChooser to customize the selection of the used GLCapabilities based on the
+    *           requested GLCapabilities, and the available capabilities of the graphics device.
+    * @param shareWith
+    *           Optional GLContext to share state (textures, vbos, shaders, etc.) with.
+    * @return a new instance
+    */
+   public static GLCanvas create(final Composite parent, final int style, final GLCapabilitiesImmutable caps,
+                                 final GLCapabilitiesChooser chooser, final GLContext shareWith) {
+       final GLCanvas[] res = new GLCanvas[] { null }; 
+       parent.getDisplay().syncExec(new Runnable() {
+           public void run() {
+               res[0] = new GLCanvas( parent, style, caps, chooser, shareWith );
+           }
+       });
+       return res[0];
+   }
+
    /**
     * Creates a new SWT GLCanvas.
-    * 
+    *
     * @param parent
     *           Required (non-null) parent Composite.
     * @param style
@@ -211,333 +278,374 @@ public class GLCanvas extends Canvas implements GLAutoDrawable {
                    final GLCapabilitiesChooser chooser, final GLContext shareWith) {
       /* NO_BACKGROUND required to avoid clearing bg in native SWT widget (we do this in the GL display) */
       super(parent, style | SWT.NO_BACKGROUND);
-      
+
       GLProfile.initSingleton(); // ensure JOGL is completly initialized
 
       SWTAccessor.setRealized(this, true);
 
       clientArea = GLCanvas.this.getClientArea();
 
-      /* Get the nativewindow-Graphics Device associated with this control (which is determined by the parent Composite) */
+      /* Get the nativewindow-Graphics Device associated with this control (which is determined by the parent Composite). 
+       * Note: SWT is owner of the native handle, hence no closing operation will be a NOP. */
       device = SWTAccessor.getDevice(this);
-      /* Native handle for the control, used to associate with GLContext */
-      nativeWindowHandle = SWTAccessor.getWindowHandle(this);
 
       /* Select default GLCapabilities if none was provided, otherwise clone provided caps to ensure safety */
       if(null == caps) {
           caps = new GLCapabilities(GLProfile.getDefault(device));
       }
-      glCapsRequested = caps;
-      
-      final GLDrawableFactory glFactory = GLDrawableFactory.getFactory(caps.getGLProfile());
-
-      /* Create a NativeWindow proxy for the SWT canvas */
-      proxySurface = glFactory.createProxySurface(device, nativeWindowHandle, caps, chooser);
+      this.capsRequested = caps;
+      this.capsChooser = chooser;
+      this.shareWith = shareWith;
 
-      /* Associate a GL surface with the proxy */
-      drawable = glFactory.createGLDrawable(proxySurface);
-      drawable.setRealized(true);
-
-      context = drawable.createContext(shareWith);
+      // post create .. when ready
+      drawable = null;
+      context = null;
       
       /* Register SWT listeners (e.g. PaintListener) to render/resize GL surface. */
       /* TODO: verify that these do not need to be manually de-registered when destroying the SWT component */
       addPaintListener(new PaintListener() {
-         public void paintControl(final PaintEvent arg0) {
-            if (!drawableHelper.isExternalAnimatorAnimating()) {
-               display();
+         @Override
+        public void paintControl(final PaintEvent arg0) {
+            if ( !helper.isExternalAnimatorAnimating() ) {                
+               display(); // checks: null != drawable
             }
          }
       });
-      
+
       addControlListener(new ControlAdapter() {
          @Override
          public void controlResized(final ControlEvent arg0) {
-            clientArea = GLCanvas.this.getClientArea();
-            /* Mark for OpenGL reshape next time the control is painted */
-            sendReshape = true;
+            updateSizeCheck();
          }
       });
    }
+   private final ProxySurface.UpstreamSurfaceHook swtCanvasUpStreamHook = new ProxySurface.UpstreamSurfaceHook() {
+       @Override
+       public final void create(ProxySurface s) { /* nop */ }
+
+       @Override
+       public final void destroy(ProxySurface s) { /* nop */ }
+
+       @Override
+       public final int getWidth(ProxySurface s) {
+           return clientArea.width;
+       }
+
+       @Override
+       public final int getHeight(ProxySurface s) {
+           return clientArea.height;
+       }
 
+       @Override
+       public String toString() {
+           return "SWTCanvasUpstreamSurfaceHook[upstream: "+GLCanvas.this.toString()+", "+clientArea.width+"x"+clientArea.height+"]";
+       }
+   };
+
+   protected final void updateSizeCheck() {
+      final Rectangle oClientArea = clientArea;
+      final Rectangle nClientArea = GLCanvas.this.getClientArea();
+      if ( nClientArea != null && 
+           ( nClientArea.width != oClientArea.width || nClientArea.height != oClientArea.height )
+         ) {
+          clientArea = nClientArea; // write back new value
+          sendReshape = true; // Mark for OpenGL reshape next time the control is painted
+      }
+   }
+   
+   @Override
+   public void display() {
+      if( null != drawable || validateDrawableAndContext() ) {
+          runInGLThread(makeCurrentAndDisplayOnEDTAction);
+      }
+   }
+
+   
+   /** assumes drawable == null ! */
+   protected final boolean validateDrawableAndContext() {
+      if( GLCanvas.this.isDisposed() ) {
+          return false;
+      }
+      final Rectangle nClientArea = clientArea;
+      if(0 == nClientArea.width * nClientArea.height) {
+          return false;
+      }
+               
+      final RecursiveLock _lock = lock;
+      _lock.lock();
+      try {
+          final GLDrawableFactory glFactory = GLDrawableFactory.getFactory(capsRequested.getGLProfile());
+    
+          /* Native handle for the control, used to associate with GLContext */
+          final long nativeWindowHandle = SWTAccessor.getWindowHandle(this);
+          
+          /* Create a NativeWindow proxy for the SWT canvas */
+          ProxySurface proxySurface = null;
+          try {
+              proxySurface = glFactory.createProxySurface(device, 0 /* screenIdx */, nativeWindowHandle, 
+                                                          capsRequested, capsChooser, swtCanvasUpStreamHook);
+          } catch (GLException gle) {
+              // not ready yet ..
+              if(DEBUG) { System.err.println(gle.getMessage()); }
+          }
+          
+          if(null != proxySurface) {
+              /* Associate a GL surface with the proxy */
+              drawable = glFactory.createGLDrawable(proxySurface);
+              drawable.setRealized(true);
+        
+              context = drawable.createContext(shareWith);
+          }
+      } finally {
+          _lock.unlock();
+      }
+      final boolean res = null != drawable;
+      if(DEBUG && res) {
+          System.err.println("SWT GLCanvas realized! "+this+", "+drawable);
+          Thread.dumpStack();
+      }
+      return res;
+   }
+   
+   @Override
+   public final Object getUpstreamWidget() {
+       return this;
+   }
+   
+   @Override
+   public int getWidth() {
+      return clientArea.width;
+   }
+
+   @Override
+   public int getHeight() {
+      return clientArea.height;
+   }
+
+   @Override
    public void addGLEventListener(final GLEventListener arg0) {
-      drawableHelper.addGLEventListener(arg0);
+      helper.addGLEventListener(arg0);
    }
 
+   @Override
    public void addGLEventListener(final int arg0, final GLEventListener arg1) throws IndexOutOfBoundsException {
-      drawableHelper.addGLEventListener(arg0, arg1);
+      helper.addGLEventListener(arg0, arg1);
    }
 
    /**
     * {@inheritDoc}
+    *
     * <p>
-    * Also disposes of the SWT component.
+    * This impl. calls this class's {@link #dispose()} SWT override,
+    * where the actual implementation resides.
+    * </p>
     */
+   @Override
    public void destroy() {
-      drawable.setRealized(false);
       dispose();
    }
 
-   public void display() {
-      runInGLThread(makeCurrentAndDisplayAction, displayAction);
-   }
-
+   @Override
    public GLAnimatorControl getAnimator() {
-      return drawableHelper.getAnimator();
+      return helper.getAnimator();
    }
 
+   @Override
    public boolean getAutoSwapBufferMode() {
-      return drawableHelper.getAutoSwapBufferMode();
+      return helper.getAutoSwapBufferMode();
    }
 
+   @Override
    public GLContext getContext() {
-      return context;
+      return null != drawable ? context : null;
    }
 
+   @Override
    public int getContextCreationFlags() {
-      return ctxCreationFlags;
+      return additionalCtxCreationFlags;
    }
 
+   @Override
    public GL getGL() {
-      final GLContext ctx = getContext();
-      return (ctx == null) ? null : ctx.getGL();
+      final GLContext _context = context;
+      return (null == _context) ? null : _context.getGL();
    }
 
-   public void invoke(final boolean wait, final GLRunnable run) {
-      /* Queue task for running during the next display(). */
-      drawableHelper.invoke(this, wait, run);
+   @Override
+   public boolean invoke(final boolean wait, final GLRunnable run) {
+      return helper.invoke(this, wait, run);
    }
 
+   @Override
    public void removeGLEventListener(final GLEventListener arg0) {
-      drawableHelper.removeGLEventListener(arg0);
+      helper.removeGLEventListener(arg0);
    }
 
+   @Override
+   public GLEventListener removeGLEventListener(int index) throws IndexOutOfBoundsException {
+      return helper.removeGLEventListener(index);
+   }
+       
+   @Override
    public void setAnimator(final GLAnimatorControl arg0) throws GLException {
-      drawableHelper.setAnimator(arg0);
+      helper.setAnimator(arg0);
    }
 
+   @Override
    public void setAutoSwapBufferMode(final boolean arg0) {
-      drawableHelper.setAutoSwapBufferMode(arg0);
-   }
-
-   public void setContext(final GLContext ctx) {
-      this.context = ctx;
-      if (ctx instanceof GLContextImpl) {
-         ((GLContextImpl) ctx).setContextCreationFlags(ctxCreationFlags);
+      helper.setAutoSwapBufferMode(arg0);
+   }
+
+   @Override
+   public GLContext setContext(GLContext newCtx) {
+      final RecursiveLock _lock = lock;
+      _lock.lock();
+      try {            
+          final GLContext oldCtx = context;
+          final boolean newCtxCurrent = helper.switchContext(drawable, oldCtx, newCtx, additionalCtxCreationFlags);
+          context=(GLContextImpl)newCtx;
+          if(newCtxCurrent) {
+              context.makeCurrent();
+          }
+          return oldCtx;
+      } finally {
+          _lock.unlock();
       }
    }
 
+   @Override
    public void setContextCreationFlags(final int arg0) {
-      ctxCreationFlags = arg0;
+      additionalCtxCreationFlags = arg0;
+      final GLContext _context = context;
+      if(null != _context) {
+        _context.setContextCreationFlags(additionalCtxCreationFlags);
+      }
    }
 
+   @Override
    public GL setGL(final GL arg0) {
-      final GLContext ctx = getContext();
-      if (ctx != null) {
-         ctx.setGL(arg0);
+       final GLContext _context = context;
+      if (null != _context) {
+         _context.setGL(arg0);
          return arg0;
       }
       return null;
    }
 
-   public GLContext createContext(final GLContext arg0) {
-      lock.lock();
-      try {
-         final GLDrawable drawable = this.drawable;
-         return (drawable != null) ? drawable.createContext(arg0) : null;
-      } finally {
-         lock.unlock();
-      }
+   @Override
+   public GLContext createContext(final GLContext shareWith) {
+     final RecursiveLock _lock = lock;
+     _lock.lock();
+     try {
+         if(drawable != null) {
+             final GLContext _ctx = drawable.createContext(shareWith);
+             _ctx.setContextCreationFlags(additionalCtxCreationFlags);
+             return _ctx;
+         }
+         return null;
+     } finally {
+         _lock.unlock();
+     }
    }
 
+   @Override
    public GLCapabilitiesImmutable getChosenGLCapabilities() {
-      return (GLCapabilitiesImmutable)proxySurface.getGraphicsConfiguration().getChosenCapabilities();
+      final GLDrawable _drawable = drawable; 
+      return null != _drawable ? (GLCapabilitiesImmutable)_drawable.getChosenGLCapabilities() : null;
    }
 
    /**
     * Accessor for the GLCapabilities that were requested (via the constructor parameter).
-    * 
+    *
     * @return Non-null GLCapabilities.
     */
    public GLCapabilitiesImmutable getRequestedGLCapabilities() {
-      return (GLCapabilitiesImmutable)proxySurface.getGraphicsConfiguration().getRequestedCapabilities();
+      final GLDrawable _drawable = drawable; 
+      return null != _drawable ? (GLCapabilitiesImmutable)_drawable.getNativeSurface().getGraphicsConfiguration().getRequestedCapabilities() : null;
    }
 
+   @Override
    public GLDrawableFactory getFactory() {
-      lock.lock();
-      try {
-         final GLDrawable drawable = this.drawable;
-         return (drawable != null) ? drawable.getFactory() : null;
-      } finally {
-         lock.unlock();
-      }
+      final GLDrawable _drawable = drawable;
+      return (_drawable != null) ? _drawable.getFactory() : null;
    }
 
+   @Override
    public GLProfile getGLProfile() {
-      return glCapsRequested.getGLProfile();
+      return capsRequested.getGLProfile();
    }
 
+   @Override
    public long getHandle() {
-      lock.lock();
-      try {
-         final GLDrawable drawable = this.drawable;
-         return (drawable != null) ? drawable.getHandle() : 0;
-      } finally {
-         lock.unlock();
-      }
-   }
-
-   public int getHeight() {
-      final Rectangle clientArea = this.clientArea;
-      if (clientArea == null) return 0;
-      return clientArea.height;
+      final GLDrawable _drawable = drawable; 
+      return (_drawable != null) ? _drawable.getHandle() : 0;
    }
 
+   @Override
    public NativeSurface getNativeSurface() {
-      lock.lock();
-      try {
-         final GLDrawable drawable = this.drawable;
-         return (drawable != null) ? drawable.getNativeSurface() : null;
-      } finally {
-         lock.unlock();
-      }
-   }
-
-   public int getWidth() {
-      final Rectangle clientArea = this.clientArea;
-      if (clientArea == null) return 0;
-      return clientArea.width;
+      final GLDrawable _drawable = drawable;
+      return (_drawable != null) ? _drawable.getNativeSurface() : null;
    }
 
+   @Override
    public boolean isRealized() {
-      lock.lock();
-      try {
-         final GLDrawable drawable = this.drawable;
-         return (drawable != null) ? drawable.isRealized() : false;
-      } finally {
-         lock.unlock();
-      }
+      final GLDrawable _drawable = drawable;
+      return (_drawable != null) ? _drawable.isRealized() : false;
    }
 
+   @Override
    public void setRealized(final boolean arg0) {
       /* Intentionally empty */
    }
 
+   @Override
    public void swapBuffers() throws GLException {
-      runInGLThread(makeCurrentAndSwapBuffersAction, swapBuffersAction);
+      runInGLThread(makeCurrentAndSwapBuffersOnEDTAction);
    }
 
-   // FIXME: API of update() method ?
+   @Override
    public void update() {
-    // FIXME:     display();
+      // don't paint background etc .. nop avoids flickering
    }
 
+   @Override
    public void dispose() {
-      lock.lock();
-      try {
-         final Display display = getDisplay();
-
-         if (null != context) {
-            boolean animatorPaused = false;
-            final GLAnimatorControl animator = getAnimator();
-            if (null != animator) {
-               // can't remove us from animator for recreational addNotify()
-               animatorPaused = animator.pause();
-            }
-            if(context.isCreated()) {
-                if (Threading.isSingleThreaded() && !Threading.isOpenGLThread()) {
-                   runInDesignatedGLThread(disposeOnEDTGLAction);
-                } else if (context.isCreated()) {
-                   drawableHelper.disposeGL(GLCanvas.this, drawable, context, postDisposeGLAction);
-                }
-            }
-
-            if (animatorPaused) {
-               animator.resume();
-            }
-         }
-         if (display.getThread() == Thread.currentThread()) {
-            disposeGraphicsDeviceAction.run();
-         } else {
-            display.syncExec(disposeGraphicsDeviceAction);
-         }
-      } finally {
-         lock.unlock();
-      }
+      runInGLThread(disposeOnEDTGLAction);
       super.dispose();
    }
 
    /**
-    * Determines whether the current thread is the appropriate thread to use the GLContext in. If we are using one of
-    * the single-threaded policies in {@link Threading}, than this is either the SWT event dispatch thread, or the
-    * OpenGL worker thread depending on the state of {@link #useSWTThread}. Otherwise this always returns true because
-    * the threading model is user defined.
-    * <p>
-    * TODO: should this be moved to {@link Threading}?
-    * 
-    * @return true if the calling thread is the correct thread to execute OpenGL calls in, false otherwise.
+    * Runs the specified action in an SWT compatible thread, which is:
+    * <ul>
+    *   <li>Mac OSX
+    *   <ul>
+    *     <!--li>AWT EDT: In case AWT is available, the AWT EDT is the OSX UI main thread</li-->
+    *     <li><i>Main Thread</i>: Run on OSX UI main thread.</li>
+    *   </ul></li>
+    *   <li>Linux, Windows, ..
+    *   <ul>
+    *     <li>Use {@link Threading#invokeOnOpenGLThread(boolean, Runnable)}</li>
+    *   </ul></li>  
+    * </ul>
+    * @see Platform#AWT_AVAILABLE
+    * @see Platform#getOSType()
     */
-   protected boolean isRenderThread() {
-      if (Threading.isSingleThreaded()) {
-         if (ThreadingImpl.getMode() != ThreadingImpl.Mode.ST_WORKER) {
-            final Display display = getDisplay();
-            return display != null && display.getThread() == Thread.currentThread();
-         }
-         return Threading.isOpenGLThread();
-      }
-      /*
-       * For multi-threaded rendering, the render thread is not defined...
-       */
-      return true;
-   }
-
-   /**
-    * Runs the specified action in the designated OpenGL thread. If the current thread is designated, then the
-    * syncAction is run synchronously, otherwise the asyncAction is dispatched to the appropriate worker thread.
-    * 
-    * @param asyncAction
-    *           The non-null action to dispatch to an OpenGL worker thread. This action should not assume that a
-    *           GLContext is current when invoked.
-    * @param syncAction
-    *           The non-null action to run synchronously if the current thread is designated to handle OpenGL calls.
-    *           This action may assume the GLContext is current.
-    */
-   private void runInGLThread(final Runnable asyncAction, final Runnable syncAction) {
-      if (Threading.isSingleThreaded() && !isRenderThread()) {
-         /* Run in designated GL thread */
-         runInDesignatedGLThread(asyncAction);
+   private static void runInGLThread(final Runnable action) {
+      if(Platform.OSType.MACOS == Platform.OS_TYPE) {
+          SWTAccessor.invoke(true, action);
       } else {
-         /* Run in current thread... */
-         drawableHelper.invokeGL(drawable, context, syncAction, initAction);
+          Threading.invokeOnOpenGLThread(true, action);
       }
    }
 
-   /**
-    * Dispatches the specified runnable to the appropriate OpenGL worker thread (either the SWT event dispatch thread,
-    * or the OpenGL worker thread depending on the state of {@link #useSWTThread}).
-    * 
-    * @param makeCurrentAndRunAction
-    *           The non-null action to dispatch.
-    */
-   private void runInDesignatedGLThread(final Runnable makeCurrentAndRunAction) {
-      if (ThreadingImpl.getMode() != ThreadingImpl.Mode.ST_WORKER) {
-         final Display display = getDisplay();
-         assert display.getThread() != Thread.currentThread() : "Incorrect use of thread dispatching.";
-         display.syncExec(makeCurrentAndRunAction);
-      } else {
-         Threading.invokeOnOpenGLThread(true, makeCurrentAndRunAction);
-      }
-   }
-
-   
    public static void main(final String[] args) {
        System.err.println(VersionUtil.getPlatformInfo());
        System.err.println(GlueGenVersion.getInstance());
        // System.err.println(NativeWindowVersion.getInstance());
        System.err.println(JoglVersion.getInstance());
 
-       System.err.println(JoglVersion.getDefaultOpenGLInfo(null).toString());
-       
+       System.err.println(JoglVersion.getDefaultOpenGLInfo(null, null, true).toString());
+
        final GLCapabilitiesImmutable caps = new GLCapabilities( GLProfile.getDefault(GLProfile.getDefaultDevice()) );
        final Display display = new Display();
        final Shell shell = new Shell(display);
@@ -547,13 +655,17 @@ public class GLCanvas extends Canvas implements GLAutoDrawable {
        final GLCanvas canvas = new GLCanvas(shell, 0, caps, null, null);
 
        canvas.addGLEventListener(new GLEventListener() {
+           @Override
            public void init(final GLAutoDrawable drawable) {
                GL gl = drawable.getGL();
                System.err.println(JoglVersion.getGLInfo(gl, null));
            }
-           public void reshape(final GLAutoDrawable drawable, final int x, final int y, final int width, final int height) {}                 
+           @Override
+           public void reshape(final GLAutoDrawable drawable, final int x, final int y, final int width, final int height) {}
+           @Override
            public void display(final GLAutoDrawable drawable) {}
-           public void dispose(final GLAutoDrawable drawable) {}         
+           @Override
+           public void dispose(final GLAutoDrawable drawable) {}
        });
        shell.open();
        canvas.display();
diff --git a/src/jogl/classes/com/jogamp/opengl/util/AnimatorBase.java b/src/jogl/classes/com/jogamp/opengl/util/AnimatorBase.java
index d65967d..46fc1d9 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/AnimatorBase.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/AnimatorBase.java
@@ -208,6 +208,6 @@ public abstract class AnimatorBase implements GLAnimatorControl {
     }
 
     public String toString() {
-        return getClass().getName()+"[started "+isStarted()+", animating "+isAnimating()+", paused "+isPaused()+", drawable "+drawables.size()+"]";
+        return getClass().getName()+"[started "+isStarted()+", animating "+isAnimating()+", paused "+isPaused()+", drawable "+drawables.size()+", totals[dt "+getTotalFPSDuration()+", frames "+getTotalFPSFrames()+", fps "+getTotalFPS()+"]]";
     }
 }
diff --git a/src/jogl/classes/com/jogamp/opengl/util/FBObject.java b/src/jogl/classes/com/jogamp/opengl/util/FBObject.java
deleted file mode 100644
index 3e049a3..0000000
--- a/src/jogl/classes/com/jogamp/opengl/util/FBObject.java
+++ /dev/null
@@ -1,483 +0,0 @@
-/*
- * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- * Copyright (c) 2011 JogAmp Community. All rights reserved.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- * 
- * - Redistribution of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * 
- * - Redistribution in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * 
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * 
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
- */
-
-package com.jogamp.opengl.util;
-
-import javax.media.opengl.*;
-
-public class FBObject {
-    static final int MAX_FBO_TEXTURES = 32; // just for our impl .. not the real 'max' FBO color attachments
-    private int[] fbo_tex_names;
-    private int[] fbo_tex_units;
-    private int fbo_tex_num;
-    private int colorattachment_num;
-
-    private boolean initialized;
-    private int width, height;
-    private int fb, depth_rb, stencil_rb, vStatus;
-    private boolean bound;
-    
-    public FBObject(int width, int height) {
-        this.fbo_tex_names = new int[MAX_FBO_TEXTURES];
-        this.fbo_tex_units = new int[MAX_FBO_TEXTURES];
-        this.fbo_tex_num = 0;
-        this.colorattachment_num = 0;
-        this.initialized = false;
-        this.width = width;
-        this.height = height;
-        this.fb = 0;
-        this.depth_rb = 0;
-        this.stencil_rb = 0;
-        this.bound = false;
-    }        
-    
-    /**
-     * @return true if the FB status is valid, otherwise false
-     * @see #getStatus()
-     */
-    public boolean isStatusValid() {
-        switch(vStatus) {
-            case GL.GL_FRAMEBUFFER_COMPLETE:
-                return true;
-            case GL.GL_FRAMEBUFFER_UNSUPPORTED:
-            case GL.GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT:
-            case GL.GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:
-            case GL.GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS:
-            case GL.GL_FRAMEBUFFER_INCOMPLETE_FORMATS:
-            //case GL2.GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER:
-            //case GL2.GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER:
-            //case GL2.GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT:
-            case 0:
-            default:
-                System.out.println("Framebuffer " + fb + " is incomplete: status = 0x" + Integer.toHexString(vStatus) + 
-                        " : " + getStatusString(vStatus));
-                return false;
-        }
-    }
-        
-    /** 
-     * @return The FB status. {@link GL.GL_FRAMEBUFFER_COMPLETE} if ok, otherwise return GL FBO error state or -1
-     * @see #validateStatus() 
-     */
-    public int getStatus() {
-        return vStatus;
-    }
-
-    public String getStatusString() {
-        return getStatusString(vStatus);
-    }
-    
-    public static final String getStatusString(int fbStatus) {
-        switch(fbStatus) {
-            case -1:
-                return "NOT A FBO";
-            case GL.GL_FRAMEBUFFER_COMPLETE:
-                return "OK";
-            case GL.GL_FRAMEBUFFER_UNSUPPORTED:
-                return("GL FBO: Unsupported framebuffer format");
-            case GL.GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT:
-                return("GL FBO: incomplete, incomplete attachment\n");
-            case GL.GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:
-                return("GL FBO: incomplete, missing attachment");
-            case GL.GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS:
-                return("GL FBO: incomplete, attached images must have same dimensions");
-            case GL.GL_FRAMEBUFFER_INCOMPLETE_FORMATS:
-                 return("GL FBO: incomplete, attached images must have same format");
-            case GL2.GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER:
-                return("GL FBO: incomplete, missing draw buffer");
-            case GL2.GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER:
-                return("GL FBO: incomplete, missing read buffer");
-            case GL2.GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE:
-                return("GL FBO: incomplete, missing multisample buffer");
-            case 0:
-                return("GL FBO: incomplete, implementation fault");
-            default:
-                return("GL FBO: incomplete, implementation ERROR");
-        }
-    }
-    
-    private boolean checkNoError(GL gl, int err, String exceptionMessage) {
-        if(GL.GL_NO_ERROR != err) {
-            if(null != gl) {
-                destroy(gl);
-            }
-            if(null != exceptionMessage) {
-                throw new GLException(exceptionMessage+" GL Error 0x"+Integer.toHexString(err));
-            }
-            return false;
-        }
-        return true;
-    }
-
-    private final void checkInitialized() {
-        if(!initialized) {
-            throw new GLException("FBO not initialized, call init(GL) first.");
-        }                
-    }
-    
-    private final void checkBound(GL gl, boolean shallBeBound) {
-        checkInitialized();
-        if(bound != shallBeBound) {
-            final String s0 = shallBeBound ? "not" : "already" ; 
-            throw new GLException("FBO "+s0+" bound "+toString());
-        }
-        checkNoError(null, gl.glGetError(), "FBObject pre"); // throws GLException if error
-    }
-
-    /**
-     * Initializes this FBO's instance with it's texture.
-     * 
-     * <p>Leaves the FBO bound!</p>
-     * 
-     * @param gl the current GL context
-     * @throws GLException in case of an error
-     */
-    public void init(GL gl) throws GLException {
-        if(initialized) {
-            throw new GLException("FBO already initialized");
-        }        
-        checkNoError(null, gl.glGetError(), "FBObject Init.pre"); // throws GLException if error
-                
-        // generate fbo ..
-        int name[] = new int[1];
-
-        gl.glGenFramebuffers(1, name, 0);
-        fb = name[0];
-        if(fb==0) {
-            throw new GLException("null generated framebuffer");
-        }
-
-        // bind fbo ..
-        gl.glBindFramebuffer(GL.GL_FRAMEBUFFER, fb);        
-        checkNoError(gl, gl.glGetError(), "FBObject Init.bindFB");  // throws GLException if error        
-        if(!gl.glIsFramebuffer(fb)) {
-            checkNoError(gl, GL.GL_INVALID_VALUE, "FBObject Init.isFB"); // throws GLException
-        }
-        bound = true;        
-        initialized = true;
-        
-        updateStatus(gl);        
-    }
-
-    /**
-     * Attaches a[nother] Texture2D Color Buffer to this FBO's instance,
-     * selecting the texture data type and format automatically.
-     * <p>This may be done as many times as many color attachments are supported,
-     * see {@link GL2GL3#GL_MAX_COLOR_ATTACHMENTS}.</p> 
-     * 
-     * <p>Assumes a bound FBO</p>
-     * <p>Leaves the FBO bound!</p>
-     * 
-     * @param gl the current GL context
-     * @param texUnit the desired texture unit ranging from [0..{@link GL2#GL_MAX_TEXTURE_UNITS}-1], or -1 if no unit shall be activate at {@link #use(GL, int)}
-     * @param magFilter if > 0 value for {@link GL#GL_TEXTURE_MAG_FILTER}
-     * @param minFilter if > 0 value for {@link GL#GL_TEXTURE_MIN_FILTER} 
-     * @param wrapS if > 0 value for {@link GL#GL_TEXTURE_WRAP_S}
-     * @param wrapT if > 0 value for {@link GL#GL_TEXTURE_WRAP_T}
-     * @return idx of the new attached texture, otherwise -1
-     * @throws GLException in case of an error
-     */
-    public int attachTexture2D(GL gl, int texUnit, int magFilter, int minFilter, int wrapS, int wrapT) throws GLException {
-        final int textureInternalFormat, textureDataFormat, textureDataType;
-        if(gl.isGLES()) { 
-            textureInternalFormat=GL.GL_RGBA;
-            textureDataFormat=GL.GL_RGBA;
-            textureDataType=GL.GL_UNSIGNED_BYTE;
-        } else { 
-            textureInternalFormat=GL.GL_RGBA8;
-            textureDataFormat=GL.GL_BGRA;
-            textureDataType=GL2GL3.GL_UNSIGNED_INT_8_8_8_8_REV;
-        }
-        return attachTexture2D(gl, texUnit, textureInternalFormat, textureDataFormat, textureDataType, magFilter, minFilter, wrapS, wrapT);
-    }
-    
-    /**
-     * Attaches a[nother] Texture2D Color Buffer to this FBO's instance,
-     * selecting the texture data type and format automatically.
-     * <p>This may be done as many times as many color attachments are supported,
-     * see {@link GL2GL3#GL_MAX_COLOR_ATTACHMENTS}.</p> 
-     * 
-     * <p>Assumes a bound FBO</p>
-     * <p>Leaves the FBO bound!</p>
-     * 
-     * @param gl the current GL context
-     * @param texUnit the desired texture unit ranging from [0..{@link GL2#GL_MAX_TEXTURE_UNITS}-1], or -1 if no unit shall be activate at {@link #use(GL, int)}
-     * @param textureInternalFormat internalFormat parameter to {@link GL#glTexImage2D(int, int, int, int, int, int, int, int, long)}
-     * @param textureDataFormat format parameter to {@link GL#glTexImage2D(int, int, int, int, int, int, int, int, long)}
-     * @param textureDataType type parameter to {@link GL#glTexImage2D(int, int, int, int, int, int, int, int, long)}
-     * @param magFilter if > 0 value for {@link GL#GL_TEXTURE_MAG_FILTER}
-     * @param minFilter if > 0 value for {@link GL#GL_TEXTURE_MIN_FILTER} 
-     * @param wrapS if > 0 value for {@link GL#GL_TEXTURE_WRAP_S}
-     * @param wrapT if > 0 value for {@link GL#GL_TEXTURE_WRAP_T}
-     * @return index of the texture colorbuffer if bound and configured successfully, otherwise -1
-     * @throws GLException in case the texture colorbuffer couldn't be allocated
-     */
-    public int attachTexture2D(GL gl, int texUnit,
-                               int textureInternalFormat, int textureDataFormat, int textureDataType,
-                               int magFilter, int minFilter, int wrapS, int wrapT) throws GLException {
-        checkBound(gl, true);
-        final int fbo_tex_idx = fbo_tex_num;
-        gl.glGenTextures(1, fbo_tex_names, fbo_tex_num);
-        if(fbo_tex_names[fbo_tex_idx]==0) {
-            throw new GLException("null generated texture");
-        }
-        fbo_tex_units[fbo_tex_idx] = texUnit;
-        fbo_tex_num++;
-        if(0<=texUnit) {
-            gl.glActiveTexture(GL.GL_TEXTURE0 + texUnit);
-        }
-        gl.glBindTexture(GL.GL_TEXTURE_2D, fbo_tex_names[fbo_tex_idx]);
-        checkNoError(gl, gl.glGetError(), "FBObject Init.bindTex");  // throws GLException if error        
-        gl.glTexImage2D(GL.GL_TEXTURE_2D, 0, textureInternalFormat, width, height, 0,
-                        textureDataFormat, textureDataType, null);
-        int glerr = gl.glGetError();
-        if(GL.GL_NO_ERROR != glerr) {
-            int[] sz = new int[1];
-            gl.glGetIntegerv(GL.GL_MAX_TEXTURE_SIZE, sz, 0);
-            // throws GLException if error
-            checkNoError(gl, glerr, "FBObject Init.texImage2D: "+
-                                    " int-fmt 0x"+Integer.toHexString(textureInternalFormat)+
-                                    ", "+width+"x"+height+
-                                    ", data-fmt 0x"+Integer.toHexString(textureDataFormat)+
-                                    ", data-type 0x"+Integer.toHexString(textureDataType)+
-                                    ", max tex-sz "+sz[0]);
-        }
-        if( 0 < magFilter ) {
-            gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MAG_FILTER, magFilter);
-        }
-        if( 0 < minFilter ) {
-            gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MIN_FILTER, minFilter);
-        }
-        if( 0 < wrapS ) {
-            gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_S, wrapS);
-        }
-        if( 0 < wrapT ) {
-            gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_T, wrapT);            
-        }
-
-        // Set up the color buffer for use as a renderable texture:
-        gl.glFramebufferTexture2D(GL.GL_FRAMEBUFFER,
-                                  GL.GL_COLOR_ATTACHMENT0 + colorattachment_num++,
-                                  GL.GL_TEXTURE_2D, fbo_tex_names[fbo_tex_idx], 0); 
-
-        updateStatus(gl);                
-        return isStatusValid() ? fbo_tex_idx : -1;
-    }
-    
-    /**
-     * Attaches one Depth Buffer to this FBO's instance.
-     * <p>This may be done only one time.</p>
-     * 
-     * <p>Assumes a bound FBO</p>
-     * <p>Leaves the FBO bound!</p>
-     * @param gl the current GL context
-     * @param depthComponentType {@link GL#GL_DEPTH_COMPONENT16}, {@link GL#GL_DEPTH_COMPONENT24} or {@link GL#GL_DEPTH_COMPONENT32}
-     * @return true if the depth renderbuffer could be bound and configured, otherwise false
-     * @throws GLException in case the depth renderbuffer couldn't be allocated or one is already attached.
-     */
-    public boolean attachDepthBuffer(GL gl, int depthComponentType) throws GLException {
-        checkBound(gl, true);
-        if(depth_rb != 0) {
-            throw new GLException("FBO depth buffer already attached (rb "+depth_rb+")");
-        }        
-        int name[] = new int[1];
-        gl.glGenRenderbuffers(1, name, 0);
-        depth_rb = name[0];        
-        if(depth_rb==0) {
-            throw new GLException("null generated renderbuffer");
-        }
-        // Initialize the depth buffer:
-        gl.glBindRenderbuffer(GL.GL_RENDERBUFFER, depth_rb);
-        if(!gl.glIsRenderbuffer(depth_rb)) {
-            System.err.println("not a depthbuffer: "+ depth_rb);
-            name[0] = depth_rb;
-            gl.glDeleteRenderbuffers(1, name, 0);
-            depth_rb=0;
-            return false;            
-        }
-        
-        gl.glRenderbufferStorage(GL.GL_RENDERBUFFER, depthComponentType, width, height);
-        // Set up the depth buffer attachment:
-        gl.glFramebufferRenderbuffer(GL.GL_FRAMEBUFFER,
-                                     GL.GL_DEPTH_ATTACHMENT,
-                                     GL.GL_RENDERBUFFER, depth_rb);
-        updateStatus(gl);
-        return isStatusValid();                
-    }
-    
-    /**
-     * Attaches one Stencil Buffer to this FBO's instance.
-     * <p>This may be done only one time.</p>
-     * 
-     * <p>Assumes a bound FBO</p>
-     * <p>Leaves the FBO bound!</p>
-     * @param gl the current GL context
-     * @param stencilComponentType {@link GL#GL_STENCIL_INDEX1}, {@link GL#GL_STENCIL_INDEX4} or {@link GL#GL_STENCIL_INDEX8}
-     * @return true if the stencil renderbuffer could be bound and configured, otherwise false
-     * @throws GLException in case the stencil renderbuffer couldn't be allocated  or one is already attached.
-     */
-    public boolean attachStencilBuffer(GL gl, int stencilComponentType) throws GLException {
-        checkBound(gl, true);
-        if(stencil_rb != 0) {
-            throw new GLException("FBO stencil buffer already attached (rb "+stencil_rb+")");
-        }
-        int name[] = new int[1];
-        gl.glGenRenderbuffers(1, name, 0);
-        stencil_rb = name[0];
-        if(stencil_rb==0) {
-            throw new GLException("null generated stencilbuffer");
-        }
-        // Initialize the stencil buffer:
-        gl.glBindRenderbuffer(GL.GL_RENDERBUFFER, stencil_rb);
-        if(!gl.glIsRenderbuffer(stencil_rb)) {
-            System.err.println("not a stencilbuffer: "+ stencil_rb);
-            name[0] = stencil_rb;
-            gl.glDeleteRenderbuffers(1, name, 0);
-            stencil_rb=0;
-            return false;
-        }
-        gl.glRenderbufferStorage(GL.GL_RENDERBUFFER, stencilComponentType, width, height);
-        gl.glFramebufferRenderbuffer(GL.GL_FRAMEBUFFER,
-                                     GL.GL_STENCIL_ATTACHMENT,
-                                     GL.GL_RENDERBUFFER, stencil_rb);
-        updateStatus(gl);        
-        return isStatusValid();                
-    }
-
-    /**
-     * @param gl the current GL context
-     */
-    public void destroy(GL gl) {
-        if(bound) {
-            unbind(gl);
-        }
-
-        int name[] = new int[1];
-
-        if(0!=stencil_rb) {
-            name[0] = stencil_rb;
-            gl.glDeleteRenderbuffers(1, name, 0);
-            stencil_rb = 0;
-        }
-        if(0!=depth_rb) {
-            name[0] = depth_rb;
-            gl.glDeleteRenderbuffers(1, name, 0);
-            depth_rb=0;
-        }
-        if(null!=fbo_tex_names && fbo_tex_num>0) {
-            gl.glDeleteTextures(1, fbo_tex_names, fbo_tex_num);
-            fbo_tex_names = new int[MAX_FBO_TEXTURES];
-            fbo_tex_units = new int[MAX_FBO_TEXTURES];
-            fbo_tex_num = 0;
-        }
-        colorattachment_num = 0;
-        if(0!=fb) {
-            name[0] = fb;
-            gl.glDeleteFramebuffers(1, name, 0);
-            fb = 0;
-        }
-        initialized = false;
-    }
-
-    /** 
-     * Bind this FBO 
-     * <p>In case you have attached more than one color buffer,
-     * you may want to setup {@link GL2GL3#glDrawBuffers(int, int[], int)}.</p>
-     * @param gl the current GL context
-     */
-    public void bind(GL gl) {
-        checkBound(gl, false);
-        gl.glBindFramebuffer(GL.GL_FRAMEBUFFER, fb);
-        bound = true;
-    }
-
-    /** 
-     * Unbind FBO, ie bind 'non' FBO 0 
-     * @param gl the current GL context
-     */
-    public void unbind(GL gl) {
-        checkBound(gl, true);
-        gl.glBindFramebuffer(GL.GL_FRAMEBUFFER, 0);
-        bound = false;
-    }
-
-    /** 
-     * Bind the texture with given index.
-     * 
-     * <p>If a valid texture unit was named via {@link #attachTexture2D(GL, int, int, int, int, int) attachTexture2D(..)},
-     * the unit is activated via {@link GL#glActiveTexture(int) glActiveTexture(GL.GL_TEXTURE0 + unit)}.</p>
-     * @param gl the current GL context
-     * @param texIdx index of the texture to use, prev. attached w/  {@link #attachTexture2D(GL, int, int, int, int, int) attachTexture2D(..)}  
-     */
-    public void use(GL gl, int texIdx) {
-        checkBound(gl, false);
-        if(texIdx >= fbo_tex_num) {
-            throw new GLException("Invalid texId, only "+fbo_tex_num+" textures are attached");
-        }
-        if(0<=fbo_tex_units[texIdx]) {
-            gl.glActiveTexture(GL.GL_TEXTURE0 + fbo_tex_units[texIdx]);
-        }
-        gl.glBindTexture(GL.GL_TEXTURE_2D, fbo_tex_names[texIdx]); // use it ..
-    }
-
-    /** Unbind texture, ie bind 'non' texture 0 */    
-    public void unuse(GL gl) {
-        checkBound(gl, false);
-        gl.glBindTexture(GL.GL_TEXTURE_2D, 0); // don't use it
-    }
-    
-    public final boolean isBound() { return bound; }
-    public final int getWidth() { return width; }
-    public final int getHeight() { return height; }       
-    public final int getFBName() { return fb; }
-    public final int getTextureNumber() { return fbo_tex_num; }
-    public final int getTextureName(int idx) { return fbo_tex_names[idx]; }
-    
-    /** @return the named texture unit ranging from [0..{@link GL2#GL_MAX_TEXTURE_UNITS}-1], or -1 if no unit was desired. */
-    public final int getTextureUnit(int idx) { return fbo_tex_units[idx]; }
-    public final int getColorAttachmentNumber() { return colorattachment_num; }
-    public final int getStencilBuffer() { return stencil_rb; }
-    public final int getDepthBuffer() { return depth_rb; }
-    public final String toString() {
-        return "FBO[name "+fb+", size "+width+"x"+height+", color num "+colorattachment_num+", tex num "+fbo_tex_num+", depth "+depth_rb+", stencil "+stencil_rb+"]";
-    }
-    
-    private void updateStatus(GL gl) {
-        if(!gl.glIsFramebuffer(fb)) {
-            vStatus = -1;
-        } else {
-            vStatus = gl.glCheckFramebufferStatus(GL.GL_FRAMEBUFFER);
-        }
-    }       
-}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/GLBuffers.java b/src/jogl/classes/com/jogamp/opengl/util/GLBuffers.java
index 8401b9c..331d6fa 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/GLBuffers.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/GLBuffers.java
@@ -39,6 +39,7 @@
 package com.jogamp.opengl.util;
 
 import com.jogamp.common.nio.Buffers;
+
 import javax.media.opengl.GL;
 import javax.media.opengl.GL2;
 import javax.media.opengl.GL2ES2;
@@ -56,22 +57,32 @@ import java.nio.*;
 public class GLBuffers extends Buffers {
 
     /**
-     * @param glType shall be one of 
-     *              GL_UNSIGNED_BYTE, GL_BYTE, GL_UNSIGNED_SHORT, GL_SHORT,
-     *              GL_UNSIGNED_INT, GL_INT, GL_HALF_FLOAT, GL_FLOAT, GL_DOUBLE, 
-     *              GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV,
-     *              GL_UNSIGNED_SHORT_5_6_5, GL_UNSIGNED_SHORT_5_6_5_REV, 
-     *              GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV, 
-     *              GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV,
-     *              GL_UNSIGNED_INT_8_8_8_8, GL_UNSIGNED_INT_8_8_8_8_REV, 
-     *              GL_UNSIGNED_INT_10_10_10_2, GL_UNSIGNED_INT_2_10_10_10_REV
-     *              GL_UNSIGNED_INT_24_8, GL_UNSIGNED_INT_10F_11F_11F_REV,
-     *              GL_UNSIGNED_INT_5_9_9_9_REV, GL_FLOAT_32_UNSIGNED_INT_24_8_REV,         
-     *              GL_HILO16_NV, GL_SIGNED_HILO16_NV (27)         
+     * @param glType shall be one of (29) <br/>
+     *              GL_BYTE, GL_UNSIGNED_BYTE, <br/>
+     *              GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV, <br/>
+     *              <br/>
+     *              GL_SHORT, GL_UNSIGNED_SHORT, <br/>
+     *              GL_UNSIGNED_SHORT_5_6_5, GL_UNSIGNED_SHORT_5_6_5_REV, <br/> 
+     *              GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV, <br/>
+     *              GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV, <br/>
+     *              GL.GL_HALF_FLOAT, GLES2.GL_HALF_FLOAT_OES: <br/>
+     *              <br/>
+     *              GL_FIXED, GL_INT <br/>
+     *              GL_UNSIGNED_INT, GL_UNSIGNED_INT_8_8_8_8, <br/>
+     *              GL_UNSIGNED_INT_8_8_8_8_REV, GL_UNSIGNED_INT_10_10_10_2, <br/> 
+     *              GL_UNSIGNED_INT_2_10_10_10_REV, GL_UNSIGNED_INT_24_8, <br/>
+     *              GL_UNSIGNED_INT_10F_11F_11F_REV, GL_UNSIGNED_INT_5_9_9_9_REV <br/> 
+     *              GL_HILO16_NV, GL_SIGNED_HILO16_NV <br/>
+     *              <br/>
+     *              GL2GL3.GL_FLOAT_32_UNSIGNED_INT_24_8_REV <br/>
+     *              <br/>
+     *              GL_FLOAT, GL_DOUBLE <br/> 
+     *              
      * @return -1 if glType is unhandled, otherwise the actual value > 0 
      */
     public static final int sizeOfGLType(int glType) {
-        switch (glType) { // 25
+        switch (glType) { // 29
+            // case GL2.GL_BITMAP:
             case GL.GL_BYTE:
             case GL.GL_UNSIGNED_BYTE:
             case GL2GL3.GL_UNSIGNED_BYTE_3_3_2:
@@ -86,6 +97,8 @@ public class GLBuffers extends Buffers {
             case GL2GL3.GL_UNSIGNED_SHORT_4_4_4_4_REV:
             case GL2GL3.GL_UNSIGNED_SHORT_5_5_5_1:
             case GL2GL3.GL_UNSIGNED_SHORT_1_5_5_5_REV:
+            case GL.GL_HALF_FLOAT:
+            case GLES2.GL_HALF_FLOAT_OES:
                 return SIZEOF_SHORT;
                                 
             case GL.GL_FIXED:
@@ -108,29 +121,38 @@ public class GLBuffers extends Buffers {
             case GL.GL_FLOAT:
                 return SIZEOF_FLOAT;
                 
-            case GL2.GL_DOUBLE:
+            case GL2GL3.GL_DOUBLE:
                 return SIZEOF_DOUBLE;
         }
         return -1;
     }
     
     /**
-     * @param glType shall be one of 
-     *              GL_UNSIGNED_BYTE, GL_BYTE, GL_UNSIGNED_SHORT, GL_SHORT,
-     *              GL_UNSIGNED_INT, GL_INT, GL_HALF_FLOAT, GL_FLOAT, GL_DOUBLE, 
-     *              GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV,
-     *              GL_UNSIGNED_SHORT_5_6_5, GL_UNSIGNED_SHORT_5_6_5_REV, 
-     *              GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV, 
-     *              GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV,
-     *              GL_UNSIGNED_INT_8_8_8_8, GL_UNSIGNED_INT_8_8_8_8_REV, 
-     *              GL_UNSIGNED_INT_10_10_10_2, GL_UNSIGNED_INT_2_10_10_10_REV
-     *              GL_UNSIGNED_INT_24_8, GL_UNSIGNED_INT_10F_11F_11F_REV,
-     *              GL_UNSIGNED_INT_5_9_9_9_REV, GL_FLOAT_32_UNSIGNED_INT_24_8_REV,         
-     *              GL_HILO16_NV, GL_SIGNED_HILO16_NV (27)         
+     * @param glType shall be one of (29) <br/>
+     *              GL_BYTE, GL_UNSIGNED_BYTE, <br/>
+     *              GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV, <br/>
+     *              <br/>
+     *              GL_SHORT, GL_UNSIGNED_SHORT, <br/>
+     *              GL_UNSIGNED_SHORT_5_6_5, GL_UNSIGNED_SHORT_5_6_5_REV, <br/> 
+     *              GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV, <br/>
+     *              GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV, <br/>
+     *              GL_HALF_FLOAT, GL_HALF_FLOAT_OES <br/>
+     *              <br/>
+     *              GL_FIXED, GL_INT <br/>
+     *              GL_UNSIGNED_INT, GL_UNSIGNED_INT_8_8_8_8, <br/>
+     *              GL_UNSIGNED_INT_8_8_8_8_REV, GL_UNSIGNED_INT_10_10_10_2, <br/> 
+     *              GL_UNSIGNED_INT_2_10_10_10_REV, GL_UNSIGNED_INT_24_8, <br/>
+     *              GL_UNSIGNED_INT_10F_11F_11F_REV, GL_UNSIGNED_INT_5_9_9_9_REV <br/> 
+     *              GL_HILO16_NV, GL_SIGNED_HILO16_NV <br/>
+     *              <br/>
+     *              GL_FLOAT_32_UNSIGNED_INT_24_8_REV <br/>
+     *              <br/>
+     *              GL_FLOAT, GL_DOUBLE <br/> 
+     *              
      * @return null if glType is unhandled, otherwise the new Buffer object 
      */
     public static final Buffer newDirectGLBuffer(int glType, int numElements) {
-        switch (glType) {
+        switch (glType) { // 29
             case GL.GL_BYTE:
             case GL.GL_UNSIGNED_BYTE:
             case GL2GL3.GL_UNSIGNED_BYTE_3_3_2:
@@ -145,6 +167,8 @@ public class GLBuffers extends Buffers {
             case GL2GL3.GL_UNSIGNED_SHORT_4_4_4_4_REV:
             case GL2GL3.GL_UNSIGNED_SHORT_5_5_5_1:
             case GL2GL3.GL_UNSIGNED_SHORT_1_5_5_5_REV:
+            case GL.GL_HALF_FLOAT:
+            case GLES2.GL_HALF_FLOAT_OES:
                 return newDirectShortBuffer(numElements);
                 
             case GL.GL_FIXED:
@@ -174,18 +198,26 @@ public class GLBuffers extends Buffers {
     }
 
     /**
-     * @param glType shall be one of 
-     *              GL_UNSIGNED_BYTE, GL_BYTE, GL_UNSIGNED_SHORT, GL_SHORT,
-     *              GL_UNSIGNED_INT, GL_INT, GL_HALF_FLOAT, GL_FLOAT, GL_DOUBLE, 
-     *              GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV,
-     *              GL_UNSIGNED_SHORT_5_6_5, GL_UNSIGNED_SHORT_5_6_5_REV, 
-     *              GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV, 
-     *              GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV,
-     *              GL_UNSIGNED_INT_8_8_8_8, GL_UNSIGNED_INT_8_8_8_8_REV, 
-     *              GL_UNSIGNED_INT_10_10_10_2, GL_UNSIGNED_INT_2_10_10_10_REV
-     *              GL_UNSIGNED_INT_24_8, GL_UNSIGNED_INT_10F_11F_11F_REV,
-     *              GL_UNSIGNED_INT_5_9_9_9_REV, GL_FLOAT_32_UNSIGNED_INT_24_8_REV,      
-     *              GL_HILO16_NV, GL_SIGNED_HILO16_NV (27)         
+     * @param glType shall be one of (29) <br/>
+     *              GL_BYTE, GL_UNSIGNED_BYTE, <br/>
+     *              GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV, <br/>
+     *              <br/>
+     *              GL_SHORT, GL_UNSIGNED_SHORT, <br/>
+     *              GL_UNSIGNED_SHORT_5_6_5, GL_UNSIGNED_SHORT_5_6_5_REV, <br/> 
+     *              GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV, <br/>
+     *              GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV, <br/>
+     *              GL_HALF_FLOAT, GL_HALF_FLOAT_OES <br/>
+     *              <br/>
+     *              GL_FIXED, GL_INT <br/>
+     *              GL_UNSIGNED_INT, GL_UNSIGNED_INT_8_8_8_8, <br/>
+     *              GL_UNSIGNED_INT_8_8_8_8_REV, GL_UNSIGNED_INT_10_10_10_2, <br/> 
+     *              GL_UNSIGNED_INT_2_10_10_10_REV, GL_UNSIGNED_INT_24_8, <br/>
+     *              GL_UNSIGNED_INT_10F_11F_11F_REV, GL_UNSIGNED_INT_5_9_9_9_REV <br/> 
+     *              GL_HILO16_NV, GL_SIGNED_HILO16_NV <br/>
+     *              <br/>
+     *              GL_FLOAT_32_UNSIGNED_INT_24_8_REV <br/>
+     *              <br/>
+     *              GL_FLOAT, GL_DOUBLE <br/> 
      * @return null if glType is unhandled or parent is null or bufLen is 0, otherwise the new Buffer object 
      */
     public static final Buffer sliceGLBuffer(ByteBuffer parent, int bytePos, int byteLen, int glType) {
@@ -195,7 +227,7 @@ public class GLBuffers extends Buffers {
         parent.position(bytePos);
         parent.limit(bytePos + byteLen);
 
-        switch (glType) {
+        switch (glType) { // 29
             case GL.GL_BYTE:
             case GL.GL_UNSIGNED_BYTE:
             case GL2GL3.GL_UNSIGNED_BYTE_3_3_2:
@@ -210,6 +242,8 @@ public class GLBuffers extends Buffers {
             case GL2GL3.GL_UNSIGNED_SHORT_4_4_4_4_REV:
             case GL2GL3.GL_UNSIGNED_SHORT_5_5_5_1:
             case GL2GL3.GL_UNSIGNED_SHORT_1_5_5_5_REV:
+            case GL.GL_HALF_FLOAT:
+            case GLES2.GL_HALF_FLOAT_OES:
                 return parent.asShortBuffer();
                 
             case GL.GL_FIXED:
@@ -362,28 +396,46 @@ public class GLBuffers extends Buffers {
      * 
      * @param tmp a pass through integer array of size >= 1 used to store temp data (performance)
      * 
-     * @param format must be one of 
-     *              GL_COLOR_INDEX, GL_STENCIL_INDEX, GL_DEPTH_COMPONENT, GL_DEPTH_STENCIL,
-     *              GL_RED, GL_GREEN, GL_BLUE, GL_ALPHA, GL_LUMINANCE,
-     *              GL_RG, GL_LUMINANCE_ALPHA,
-     *              GL_RGB, GL_BGR, GL_RGBA, GL_BGRA, GL_ABGR_EXT,
-     *              GL_RED_INTEGER, GL_GREEN_INTEGER, GL_BLUE_INTEGER,
-     *              GL_RG_INTEGER, GL_RGB_INTEGER, GL_BGR_INTEGER, 
-     *              GL_RGBA_INTEGER, GL_BGRA_INTEGER, GL_HILO_NV, GL_SIGNED_HILO_NV (26)
+     * @param format must be one of (26) <br/> 
+     *              GL_COLOR_INDEX GL_STENCIL_INDEX <br/> 
+     *              GL_DEPTH_COMPONENT GL_DEPTH_STENCIL <br/> 
+     *              GL_RED GL_RED_INTEGER <br/> 
+     *              GL_GREEN GL_GREEN_INTEGER <br/> 
+     *              GL_BLUE GL_BLUE_INTEGER <br/> 
+     *              GL_ALPHA GL_LUMINANCE (12) <br/> 
+     *              <br/> 
+     *              GL_LUMINANCE_ALPHA GL_RG <br/>
+     *              GL_RG_INTEGER GL_HILO_NV <br/> 
+     *              GL_SIGNED_HILO_NV (5) <br/> 
+     *              <br/> 
+     *              GL_RGB GL_RGB_INTEGER <br/> 
+     *              GL_BGR GL_BGR_INTEGER (4)<br/>  
+     *              <br/> 
+     *              GL_RGBA GL_RGBA_INTEGER <br/> 
+     *              GL_BGRA GL_BGRA_INTEGER <br/>
+     *              GL_ABGR_EXT (5)<br/> 
      *           
-     * @param type must be one of 
-     *              GL_BITMAP, 
-     *              GL_UNSIGNED_BYTE, GL_BYTE, GL_UNSIGNED_SHORT, GL_SHORT,
-     *              GL_UNSIGNED_INT, GL_INT, GL_HALF_FLOAT, GL_FLOAT, GL_DOUBLE, 
-     *              GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV,
-     *              GL_UNSIGNED_SHORT_5_6_5, GL_UNSIGNED_SHORT_5_6_5_REV, 
-     *              GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV, 
-     *              GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV,
-     *              GL_UNSIGNED_INT_8_8_8_8, GL_UNSIGNED_INT_8_8_8_8_REV, 
-     *              GL_UNSIGNED_INT_10_10_10_2, GL_UNSIGNED_INT_2_10_10_10_REV
-     *              GL_UNSIGNED_INT_24_8, GL_UNSIGNED_INT_10F_11F_11F_REV,
-     *              GL_UNSIGNED_INT_5_9_9_9_REV, GL_FLOAT_32_UNSIGNED_INT_24_8_REV,
-     *              GL_HILO16_NV, GL_SIGNED_HILO16_NV (28)         
+     * @param type must be one of (30) <br/>  
+     *              GL_BITMAP, <br/> 
+     *              GL_BYTE, GL_UNSIGNED_BYTE, <br/>
+     *              GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV, <br/>
+     *              <br/>
+     *              GL_SHORT, GL_UNSIGNED_SHORT, <br/>
+     *              GL_UNSIGNED_SHORT_5_6_5, GL_UNSIGNED_SHORT_5_6_5_REV, <br/> 
+     *              GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV, <br/>
+     *              GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV, <br/>
+     *              GL_HALF_FLOAT, GL_HALF_FLOAT_OES <br/>
+     *              <br/>
+     *              GL_FIXED, GL_INT <br/>
+     *              GL_UNSIGNED_INT, GL_UNSIGNED_INT_8_8_8_8, <br/>
+     *              GL_UNSIGNED_INT_8_8_8_8_REV, GL_UNSIGNED_INT_10_10_10_2, <br/> 
+     *              GL_UNSIGNED_INT_2_10_10_10_REV, GL_UNSIGNED_INT_24_8, <br/>
+     *              GL_UNSIGNED_INT_10F_11F_11F_REV, GL_UNSIGNED_INT_5_9_9_9_REV <br/> 
+     *              GL_HILO16_NV, GL_SIGNED_HILO16_NV <br/>
+     *              <br/>
+     *              GL_FLOAT_32_UNSIGNED_INT_24_8_REV <br/>
+     *              <br/>
+     *              GL_FLOAT, GL_DOUBLE <br/> 
      * 
      * @param width in pixels
      * @param height in pixels
@@ -402,7 +454,7 @@ public class GLBuffers extends Buffers {
         if (height < 0) return 0;
         if (depth < 0) return 0;
         
-        switch (format) /* 24 */ {
+        switch (format) /* 26 */ {
             case GL2.GL_COLOR_INDEX:
             case GL2GL3.GL_STENCIL_INDEX:
             case GL2GL3.GL_DEPTH_COMPONENT:
@@ -445,7 +497,7 @@ public class GLBuffers extends Buffers {
               throw new GLException("format 0x"+Integer.toHexString(format)+" not supported [yet], pls notify the maintainer in case this is our bug.");
         }
                 
-        switch (type) /* 26 */ {
+        switch (type) /* 30 */ {
             case GL2.GL_BITMAP:
               if (GL2.GL_COLOR_INDEX == format || GL2GL3.GL_STENCIL_INDEX == format) {
                 return (depth * (height * ((width+7)/8)));
@@ -460,6 +512,7 @@ public class GLBuffers extends Buffers {
             case GLES2.GL_HALF_FLOAT_OES:
               esize = 2;
               break;
+            case GL.GL_FIXED:
             case GL2ES2.GL_INT:
             case GL.GL_UNSIGNED_INT:
             case GL.GL_FLOAT:
diff --git a/src/jogl/classes/com/jogamp/opengl/util/GLReadBufferUtil.java b/src/jogl/classes/com/jogamp/opengl/util/GLReadBufferUtil.java
index 368cbc0..b0fae8a 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/GLReadBufferUtil.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/GLReadBufferUtil.java
@@ -35,6 +35,7 @@ import java.io.IOException;
 import java.nio.*;
 import javax.media.opengl.*;
 
+import com.jogamp.opengl.GLExtensions;
 import com.jogamp.opengl.util.texture.Texture;
 import com.jogamp.opengl.util.texture.TextureData;
 import com.jogamp.opengl.util.texture.TextureIO;
@@ -67,6 +68,10 @@ public class GLReadBufferUtil {
       return null!=readTextureData && null!=readPixelBuffer ;
     }
     
+    public boolean hasAlpha() { return 4 == components ? true : false ; }
+    
+    public GLPixelStorageModes getGLPixelStorageModes() { return psm; }
+    
     /**
      * @return the raw pixel ByteBuffer, filled by {@link #readPixels(GLAutoDrawable, boolean)}
      */
@@ -104,13 +109,14 @@ public class GLReadBufferUtil {
     /**
      * Read the drawable's pixels to TextureData and Texture, if requested at construction
      * 
-     * @param gl the current GL object
+     * @param gl the current GL context object. It's read drawable is being used as the pixel source.
      * @param drawable the drawable to read from
      * @param flip weather to flip the data vertically or not
      * 
      * @see #GLReadBufferUtil(boolean, boolean)
      */
-    public boolean readPixels(GL gl, GLDrawable drawable, boolean flip) {
+    public boolean readPixels(GL gl, boolean flip) {
+        final GLDrawable drawable = gl.getContext().getGLReadDrawable();
         final int textureInternalFormat, textureDataFormat, textureDataType;
         final int[] glImplColorReadVals = new int[] { 0, 0 };
         
@@ -118,7 +124,7 @@ public class GLReadBufferUtil {
             textureInternalFormat=GL.GL_RGB;
             textureDataFormat=GL.GL_RGB;
             textureDataType = GL.GL_UNSIGNED_BYTE;            
-        } else if(gl.isGLES2Compatible() || gl.isExtensionAvailable("GL_OES_read_format")) {
+        } else if(gl.isGLES2Compatible() || gl.isExtensionAvailable(GLExtensions.OES_read_format)) {
             gl.glGetIntegerv(GL.GL_IMPLEMENTATION_COLOR_READ_FORMAT, glImplColorReadVals, 0);
             gl.glGetIntegerv(GL.GL_IMPLEMENTATION_COLOR_READ_TYPE, glImplColorReadVals, 1);            
             textureInternalFormat = (4 == components) ? GL.GL_RGBA : GL.GL_RGB;
diff --git a/src/jogl/classes/com/jogamp/opengl/util/ImmModeSink.java b/src/jogl/classes/com/jogamp/opengl/util/ImmModeSink.java
index 3b817af..cf03730 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/ImmModeSink.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/ImmModeSink.java
@@ -1,15 +1,20 @@
 
 package com.jogamp.opengl.util;
 
-import com.jogamp.common.util.*;
-import com.jogamp.opengl.util.glsl.ShaderState;
+import java.nio.Buffer;
+import java.nio.ByteBuffer;
+import java.nio.ShortBuffer;
+import java.util.ArrayList;
+import java.util.Iterator;
 
-import javax.media.opengl.*;
-import javax.media.opengl.fixedfunc.*;
+import javax.media.opengl.GL;
+import javax.media.opengl.GL2ES1;
+import javax.media.opengl.GL2ES2;
+import javax.media.opengl.GLException;
+import javax.media.opengl.fixedfunc.GLPointerFunc;
 
-import java.nio.*;
-import java.util.Iterator;
-import java.util.ArrayList;
+import com.jogamp.common.util.ReflectionUtil;
+import com.jogamp.opengl.util.glsl.ShaderState;
 
 public class ImmModeSink {
 
@@ -337,10 +342,8 @@ public class ImmModeSink {
         enableBuffer(gl, true);
 
         if (buffer!=null) {
-            GL2ES1 glf = gl.getGL2ES1();
-
             if(null==indices) {
-                glf.glDrawArrays(mode, 0, count);
+                gl.glDrawArrays(mode, 0, count);
             } else {
                 Class<?> clazz = indices.getClass();
                 int type=-1;
@@ -352,7 +355,7 @@ public class ImmModeSink {
                 if(0>type) {
                     throw new GLException("Given Buffer Class not supported: "+clazz+", should be ubyte or ushort:\n\t"+this);
                 }
-                glf.glDrawElements(mode, indices.remaining(), type, indices);
+                gl.glDrawElements(mode, indices.remaining(), type, indices);
                 // GL2: gl.glDrawRangeElements(mode, 0, indices.remaining()-1, indices.remaining(), type, indices);
             }
         }
diff --git a/src/jogl/classes/com/jogamp/opengl/util/awt/Screenshot.java b/src/jogl/classes/com/jogamp/opengl/util/awt/Screenshot.java
index fa66673..0022d5c 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/awt/Screenshot.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/awt/Screenshot.java
@@ -48,6 +48,7 @@ import javax.media.opengl.GLException;
 import javax.media.opengl.glu.gl2.GLUgl2;
 
 import com.jogamp.common.util.IOUtil;
+import com.jogamp.opengl.GLExtensions;
 import com.jogamp.opengl.util.GLPixelStorageModes;
 import com.jogamp.opengl.util.TGAWriter;
 
@@ -392,7 +393,7 @@ public class Screenshot {
 
   private static void checkExtABGR() {
     GL2 gl = GLUgl2.getCurrentGL2();
-    if (!gl.isExtensionAvailable("GL_EXT_abgr")) {
+    if (!gl.isExtensionAvailable(GLExtensions.EXT_abgr)) {
       throw new IllegalArgumentException("Saving alpha channel requires GL_EXT_abgr");
     }
   } 
diff --git a/src/jogl/classes/com/jogamp/opengl/util/awt/TextRenderer.java b/src/jogl/classes/com/jogamp/opengl/util/awt/TextRenderer.java
index 622ee1b..1735fcd 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/awt/TextRenderer.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/awt/TextRenderer.java
@@ -41,6 +41,7 @@ package com.jogamp.opengl.util.awt;
 
 import com.jogamp.common.nio.Buffers;
 
+import com.jogamp.opengl.GLExtensions;
 import com.jogamp.opengl.util.*;
 import com.jogamp.opengl.util.packrect.*;
 import com.jogamp.opengl.util.texture.*;
@@ -1976,7 +1977,7 @@ public class TextRenderer {
 
     private final boolean is15Available(GL gl) {
         if (!checkFor_isExtensionAvailable_GL_VERSION_1_5) {
-            isExtensionAvailable_GL_VERSION_1_5 = gl.isExtensionAvailable("GL_VERSION_1_5");
+            isExtensionAvailable_GL_VERSION_1_5 = gl.isExtensionAvailable(GLExtensions.VERSION_1_5);
             checkFor_isExtensionAvailable_GL_VERSION_1_5 = true;
         }
         return isExtensionAvailable_GL_VERSION_1_5;
diff --git a/src/jogl/classes/com/jogamp/opengl/util/texture/Texture.java b/src/jogl/classes/com/jogamp/opengl/util/texture/Texture.java
index 49d4add..e7bf87a 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/texture/Texture.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/texture/Texture.java
@@ -44,6 +44,7 @@ import javax.media.nativewindow.NativeWindowFactory;
 
 import jogamp.opengl.*;
 
+import com.jogamp.opengl.GLExtensions;
 import com.jogamp.opengl.util.texture.spi.*;
 
 /**
@@ -262,8 +263,8 @@ public class Texture {
      *
      * See the <a href="#perftips">performance tips</a> above for hints
      * on how to maximize performance when using many Texture objects.
-     * @param gl TODO
-     *
+     * 
+     * @param gl the current GL context
      * @throws GLException if no OpenGL context was current or if any
      * OpenGL-related errors occurred
      */
@@ -448,12 +449,12 @@ public class Texture {
 
         // See whether we have automatic mipmap generation support
         boolean haveAutoMipmapGeneration =
-            (gl.isExtensionAvailable("GL_VERSION_1_4") ||
-             gl.isExtensionAvailable("GL_SGIS_generate_mipmap"));
+            (gl.isExtensionAvailable(GLExtensions.VERSION_1_4) ||
+             gl.isExtensionAvailable(GLExtensions.SGIS_generate_mipmap));
 
         // Indicate to the TextureData what functionality is available
-        data.setHaveEXTABGR(gl.isExtensionAvailable("GL_EXT_abgr"));
-        data.setHaveGL12(gl.isExtensionAvailable("GL_VERSION_1_2"));
+        data.setHaveEXTABGR(gl.isExtensionAvailable(GLExtensions.EXT_abgr));
+        data.setHaveGL12(gl.isExtensionAvailable(GLExtensions.VERSION_1_2));
 
         // Indicates whether both width and height are power of two
         boolean isPOT = isPowerOfTwo(imgWidth) && isPowerOfTwo(imgHeight);
@@ -646,7 +647,7 @@ public class Texture {
 
         int minFilter = (data.getMipmap() ? GL.GL_LINEAR_MIPMAP_LINEAR : GL.GL_LINEAR);
         int magFilter = GL.GL_LINEAR;
-        int wrapMode = (gl.isExtensionAvailable("GL_VERSION_1_2") || !gl.isGL2()) ? GL.GL_CLAMP_TO_EDGE : GL2.GL_CLAMP;
+        int wrapMode = (gl.isExtensionAvailable(GLExtensions.VERSION_1_2) || !gl.isGL2()) ? GL.GL_CLAMP_TO_EDGE : GL2.GL_CLAMP;
 
         // REMIND: figure out what to do for GL_TEXTURE_RECTANGLE_ARB
         if (texTarget != GL2.GL_TEXTURE_RECTANGLE_ARB) {
@@ -925,8 +926,8 @@ public class Texture {
     private void updateSubImageImpl(GL gl, TextureData data, int newTarget, int mipmapLevel,
                                     int dstx, int dsty,
                                     int srcx, int srcy, int width, int height) throws GLException {
-        data.setHaveEXTABGR(gl.isExtensionAvailable("GL_EXT_abgr"));
-        data.setHaveGL12(gl.isExtensionAvailable("GL_VERSION_1_2"));
+        data.setHaveEXTABGR(gl.isExtensionAvailable(GLExtensions.EXT_abgr));
+        data.setHaveGL12(gl.isExtensionAvailable(GLExtensions.VERSION_1_2));
 
         Buffer buffer = data.getBuffer();
         if (buffer == null && data.getMipmapData() == null) {
@@ -1044,8 +1045,8 @@ public class Texture {
             case GL.GL_COMPRESSED_RGBA_S3TC_DXT1_EXT:
             case GL.GL_COMPRESSED_RGBA_S3TC_DXT3_EXT:
             case GL.GL_COMPRESSED_RGBA_S3TC_DXT5_EXT:
-                if (!gl.isExtensionAvailable("GL_EXT_texture_compression_s3tc") &&
-                    !gl.isExtensionAvailable("GL_NV_texture_compression_vtc")) {
+                if (!gl.isExtensionAvailable(GLExtensions.EXT_texture_compression_s3tc) &&
+                    !gl.isExtensionAvailable(GLExtensions.NV_texture_compression_vtc)) {
                     throw new GLException("DXTn compressed textures not supported by this graphics card");
                 }
                 break;
@@ -1081,7 +1082,7 @@ public class Texture {
     private static boolean haveTexRect(GL gl) {
         return (!disableTexRect &&
                 TextureIO.isTexRectEnabled() &&
-                gl.isExtensionAvailable("GL_ARB_texture_rectangle"));
+                gl.isExtensionAvailable(GLExtensions.ARB_texture_rectangle));
     }
 
     private static boolean preferTexRect(GL gl) {
diff --git a/src/jogl/classes/com/jogamp/opengl/util/texture/TextureIO.java b/src/jogl/classes/com/jogamp/opengl/util/texture/TextureIO.java
index ca97cdc..b878c60 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/texture/TextureIO.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/texture/TextureIO.java
@@ -155,6 +155,14 @@ public class TextureIO {
         file. */
     public static final String TIFF    = "tiff";
 
+    /** Constant which can be used as a file suffix to indicate a PAM
+        file, NetPbm magic 7 - binary RGB and RGBA. Write support only. */
+    public static final String PAM     = "pam";
+    
+    /** Constant which can be used as a file suffix to indicate a PAM
+        file, NetPbm magic 6 - binary RGB. Write support only. */
+    public static final String PPM     = "ppm";
+    
     private static final boolean DEBUG = Debug.debug("TextureIO");
 
     // For manually disabling the use of the texture rectangle
diff --git a/src/jogl/classes/com/jogamp/opengl/util/texture/TextureSequence.java b/src/jogl/classes/com/jogamp/opengl/util/texture/TextureSequence.java
index 5ee2104..6b41c0b 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/texture/TextureSequence.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/texture/TextureSequence.java
@@ -102,7 +102,6 @@ import javax.media.opengl.GL;
  */
 public interface TextureSequence {
     public static final String GL_OES_EGL_image_external_Required_Prelude = "#extension GL_OES_EGL_image_external : enable\n";
-    public static final String GL_OES_EGL_image_external = "GL_OES_EGL_image_external";
     public static final String samplerExternalOES = "samplerExternalOES";
     public static final String sampler2D = "sampler2D";
     
diff --git a/src/jogl/classes/com/jogamp/opengl/util/texture/spi/NetPbmTextureWriter.java b/src/jogl/classes/com/jogamp/opengl/util/texture/spi/NetPbmTextureWriter.java
index c2b131b..cd42a11 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/texture/spi/NetPbmTextureWriter.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/texture/spi/NetPbmTextureWriter.java
@@ -77,8 +77,10 @@ public class NetPbmTextureWriter implements TextureWriter {
 
     public int getMagic() { return magic; }
 
-    public static final String PPM     = "ppm";
-    public static final String PAM     = "pam";
+    /** @see TextureIO#PPM */
+    public static final String PPM     = TextureIO.PPM;
+    /** @see TextureIO#PAM */
+    public static final String PAM     = TextureIO.PAM;
 
     public String getSuffix() { return (magic==6)?PPM:PAM; }
 
diff --git a/src/jogl/classes/javax/media/opengl/DefaultGLCapabilitiesChooser.java b/src/jogl/classes/javax/media/opengl/DefaultGLCapabilitiesChooser.java
index f678c70..5fa8ce3 100644
--- a/src/jogl/classes/javax/media/opengl/DefaultGLCapabilitiesChooser.java
+++ b/src/jogl/classes/javax/media/opengl/DefaultGLCapabilitiesChooser.java
@@ -102,8 +102,9 @@ public class DefaultGLCapabilitiesChooser implements GLCapabilitiesChooser {
   final static int STENCIL_MISMATCH_PENALTY_SCALE   = 3;
   final static int MULTISAMPLE_MISMATCH_PENALTY_SCALE   = 3;
   
+  @Override
   public int chooseCapabilities(final CapabilitiesImmutable desired,
-                                final List /*<CapabilitiesImmutable>*/ available,
+                                final List<? extends CapabilitiesImmutable> available,
                                 final int windowSystemRecommendedChoice) {
     if ( null == desired ) {
       throw new NativeWindowException("Null desired capabilities");
@@ -116,6 +117,7 @@ public class DefaultGLCapabilitiesChooser implements GLCapabilitiesChooser {
     final int availnum = available.size();
 
     if (DEBUG) {
+      Thread.dumpStack();
       System.err.println("Desired: " + gldes);
       System.err.println("Available: " + availnum);
       for (int i = 0; i < available.size(); i++) {
@@ -140,11 +142,11 @@ public class DefaultGLCapabilitiesChooser implements GLCapabilitiesChooser {
     for (int i = 0; i < scores.length; i++) {
       scores[i] = NO_SCORE;
     }
-    final int gldes_samples = gldes.getSampleBuffers() ? gldes.getNumSamples() : 0;
+    final int gldes_samples = gldes.getNumSamples();
     
     // Compute score for each
     for (int i = 0; i < availnum; i++) {
-      GLCapabilitiesImmutable cur = (GLCapabilitiesImmutable) available.get(i);
+      final GLCapabilitiesImmutable cur = (GLCapabilitiesImmutable) available.get(i);
       if (cur == null) {
         continue;
       }
@@ -157,8 +159,7 @@ public class DefaultGLCapabilitiesChooser implements GLCapabilitiesChooser {
       if (gldes.getStereo() != cur.getStereo()) {
         continue;
       }
-      final int cur_samples = 
-              cur.getSampleBuffers() ? cur.getNumSamples() : 0;
+      final int cur_samples = cur.getNumSamples() ;
       int score = 0;
               
       // Compute difference in color depth
@@ -207,7 +208,7 @@ public class DefaultGLCapabilitiesChooser implements GLCapabilitiesChooser {
       if (score == NO_SCORE) {
         continue;
       }
-      GLCapabilitiesImmutable cur = (GLCapabilitiesImmutable) available.get(i);
+      final GLCapabilitiesImmutable cur = (GLCapabilitiesImmutable) available.get(i);
       if (cur.getHardwareAccelerated()) {
         int absScore = Math.abs(score);
         if (!gotHW ||
@@ -223,7 +224,7 @@ public class DefaultGLCapabilitiesChooser implements GLCapabilitiesChooser {
         if (score == NO_SCORE) {
           continue;
         }
-        GLCapabilitiesImmutable cur = (GLCapabilitiesImmutable) available.get(i);
+        final GLCapabilitiesImmutable cur = (GLCapabilitiesImmutable) available.get(i);
         if (!cur.getHardwareAccelerated()) {
           if (score <= 0) {
             score -= maxAbsoluteHWScore;
@@ -241,7 +242,7 @@ public class DefaultGLCapabilitiesChooser implements GLCapabilitiesChooser {
         if (i > 0) {
           System.err.print(",");
         }
-        System.err.print(" " + scores[i]);
+        System.err.print(" " + i +": " + scores[i]);
       }
       System.err.println(" ]");
     }
diff --git a/src/jogl/classes/javax/media/opengl/GLAutoDrawable.java b/src/jogl/classes/javax/media/opengl/GLAutoDrawable.java
index c676535..0b2c664 100644
--- a/src/jogl/classes/javax/media/opengl/GLAutoDrawable.java
+++ b/src/jogl/classes/javax/media/opengl/GLAutoDrawable.java
@@ -1,22 +1,22 @@
 /*
  * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
  * Copyright (c) 2010 JogAmp Community. All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- * 
+ *
  * - Redistribution of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
- * 
+ *
  * - Redistribution in binary form must reproduce the above copyright
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the distribution.
- * 
+ *
  * Neither the name of Sun Microsystems, Inc. or the names of
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * This software is provided "AS IS," without a warranty of any kind. ALL
  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -29,11 +29,11 @@
  * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
  * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
  * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
+ *
  * You acknowledge that this software is not designed or intended for use
  * in the design, construction, operation or maintenance of any nuclear
  * facility.
- * 
+ *
  * Sun gratefully acknowledges that this software was originally authored
  * and developed by Kenneth Bradley Russell and Christopher John Kline.
  */
@@ -51,10 +51,10 @@ import jogamp.opengl.Debug;
     calls to {@link GLContext#makeCurrent makeCurrent} will block if
     the context is current on another thread. This allows the internal
     GLContext for the GLAutoDrawable to be used both by the event
-    based rendering mechanism as well by end users directly.<P>
-
+    based rendering mechanism as well by end users directly.
+    <p>
     The implementation shall initialize itself as soon as possible,
-    ie if the attached {@link javax.media.nativewindow.NativeSurface NativeSurface} becomes visible/realized. 
+    ie if the attached {@link javax.media.nativewindow.NativeSurface NativeSurface} becomes visible/realized.
     The following protocol shall be satisfied:
     <ul>
         <li> Create the  {@link GLDrawable} with the requested {@link GLCapabilities}</li>
@@ -64,18 +64,18 @@ import jogamp.opengl.Debug;
              registered {@link GLEventListener}s. This can be done immediatly, or with the followup {@link #display display(..)} call.</li>
         <li> Send a reshape event by calling {@link GLEventListener#reshape reshape(..)} for all
              registered {@link GLEventListener}s. This shall be done after the {@link GLEventListener#init init(..)} calls.</li>
-    </ul><P>
-
-    Another implementation detail is the drawable reconfiguration. One use case is where a window is being 
-    dragged to another screen with a different pixel configuration, ie {@link GLCapabilities}. The implementation 
-    shall be able to detect such cases in conjunction with the associated {@link javax.media.nativewindow.NativeSurface NativeSurface}.<br>
+    </ul></P>
+    <p>
+    Another implementation detail is the drawable reconfiguration. One use case is where a window is being
+    dragged to another screen with a different pixel configuration, ie {@link GLCapabilities}. The implementation
+    shall be able to detect such cases in conjunction with the associated {@link javax.media.nativewindow.NativeSurface NativeSurface}.<br/>
     For example, AWT's {@link java.awt.Canvas} 's {@link java.awt.Canvas#getGraphicsConfiguration getGraphicsConfiguration()}
-    is capable to determine a display device change. This is demonstrated within {@link javax.media.opengl.awt.GLCanvas}'s 
-    and NEWT's <code>AWTCanvas</code> {@link javax.media.opengl.awt.GLCanvas#getGraphicsConfiguration getGraphicsConfiguration()} 
-    specialization. Another demonstration is NEWT's {@link javax.media.nativewindow.NativeWindow NativeWindow} 
-    implementation on the Windows platform, which utilizes the native platform's <i>MonitorFromWindow(HWND)</i> function.<br>
-    All OpenGL resources shall be regenerated, while the drawable's {@link GLCapabilities} has 
-    to be choosen again. The following protocol shall be satisfied.
+    is capable to determine a display device change. This is demonstrated within {@link javax.media.opengl.awt.GLCanvas}'s
+    and NEWT's <code>AWTCanvas</code> {@link javax.media.opengl.awt.GLCanvas#getGraphicsConfiguration getGraphicsConfiguration()}
+    specialization. Another demonstration is NEWT's {@link javax.media.nativewindow.NativeWindow NativeWindow}
+    implementation on the Windows platform, which utilizes the native platform's <i>MonitorFromWindow(HWND)</i> function.<br/>
+    All OpenGL resources shall be regenerated, while the drawable's {@link GLCapabilities} has
+    to be chosen again. The following protocol shall be satisfied.
     <ul>
         <li> Controlled disposal:</li>
         <ul>
@@ -95,21 +95,21 @@ import jogamp.opengl.Debug;
                  registered {@link GLEventListener}s. This shall be done after the {@link GLEventListener#init init(..)} calls.</li>
         </ul>
     </ul>
-    Note: Current graphics driver keep the surface configuration for a given window, even if the window is moved to 
+    Note: Current graphics driver keep the surface configuration for a given window, even if the window is moved to
     a monitor with a different pixel configuration, ie 32bpp to 16bpp. However, it is best to not assume such behavior
-    and make your application comply with the above protocol.<P>
-
-    However, to not introduce to much breakage with older applications and because of the situation 
-    mentioned above, the <code>boolean</code> system property <code>jogl.screenchange.action</code> will control the 
-    screen change action as follows:<br>
-
+    and make your application comply with the above protocol.
+    <p>
+    Avoiding breakage with older applications and because of the situation
+    mentioned above, the <code>boolean</code> system property <code>jogl.screenchange.action</code> will control the
+    screen change action as follows:<br/>
     <PRE>
     -Djogl.screenchange.action=false Disable the drawable reconfiguration (the default)
     -Djogl.screenchange.action=true  Enable  the drawable reconfiguration
-    </PRE>    
+    </PRE>
+    </p>
   */
 public interface GLAutoDrawable extends GLDrawable {
-  /** Flag reflecting wheather the drawable reconfiguration will be issued in 
+  /** Flag reflecting wheather the drawable reconfiguration will be issued in
     * case a screen device change occured, e.g. in a multihead environment,
     * where you drag the window to another monitor. */
   public static final boolean SCREEN_CHANGE_ACTION_ENABLED = Debug.getBooleanProperty("jogl.screenchange.action", true);
@@ -122,33 +122,75 @@ public interface GLAutoDrawable extends GLDrawable {
   public GLContext getContext();
 
   /**
-   * Associate a new context to this drawable.
+   * Associate a new context to this drawable and also propagates the context/drawable switch by 
+   * calling {@link GLContext#setGLDrawable(GLDrawable, boolean) newCtx.setGLDrawable(drawable, true);}.
+   * <code>drawable</code> might be an inner GLDrawable instance if using such a delegation pattern,
+   * or this GLAutoDrawable itself. 
+   * <p>
+   * If the old context's drawable was an {@link GLAutoDrawable}, it's reference to the given drawable
+   * is being cleared by calling 
+   * {@link GLAutoDrawable#setContext(GLContext) ((GLAutoDrawable)oldCtx.getGLDrawable()).setContext(null)}.
+   * </p>
+   * <p>
+   * If the old or new context was current on this thread, it is being released before switching the drawable.
+   * The new context will be made current afterwards, if it was current before. 
+   * However the user shall take extra care that not other thread
+   * attempts to make this context current. Otherwise a race condition may happen.
+   * </p>
+   * <p>
+   * <b>Disclaimer</b>: Even though the API may allows this functionality in theory, your mileage may vary 
+   * switching the drawable of an already established GLContext, i.e. which is already made current once.
+   * FIXME: Validate functionality! 
+   * </p>
+   * 
+   * @param newCtx the new context
+   * @return the replaced GLContext, maybe <code>null</code>
+   *  
+   * @see GLContext#setGLDrawable(GLDrawable, boolean)
+   * @see GLContext#setGLReadDrawable(GLDrawable)
+   * @see jogamp.opengl.GLDrawableHelper#switchContext(GLDrawable, GLContext, GLContext, int)
    */
-  public void setContext(GLContext context);
-
+  public GLContext setContext(GLContext newCtx);
+  
   /** Adds a {@link GLEventListener} to the end of this drawable queue.
       The listeners are notified of events in the order of the queue. */
   public void addGLEventListener(GLEventListener listener);
 
-  /** 
+  /**
    * Adds a {@link GLEventListener} at the given index of this drawable queue.
    * The listeners are notified of events in the order of the queue.
-   * @param index Position where the listener will be inserted. 
+   * @param index Position where the listener will be inserted.
    *              Should be within (0 <= index && index <= size()).
    *              An index value of -1 is interpreted as the end of the list, size().
    * @param listener The GLEventListener object to be inserted
    * @throws IndexOutOfBoundsException If the index is not within (0 <= index && index <= size()), or -1
    */
-  public void addGLEventListener(int index, GLEventListener listener)
-    throws IndexOutOfBoundsException;
+  public void addGLEventListener(int index, GLEventListener listener) throws IndexOutOfBoundsException;
 
-  /** Removes a {@link GLEventListener} from this drawable. Note that
-      if this is done from within a particular drawable's {@link
-      GLEventListener} handler (reshape, display, etc.) that it is not
-      guaranteed that all other listeners will be evaluated properly
-      during this update cycle. */
+  /** 
+   * Removes a {@link GLEventListener} from this drawable. 
+   * Note that if this is done from within a particular drawable's 
+   * {@link GLEventListener} handler (reshape, display, etc.) that it is not
+   * guaranteed that all other listeners will be evaluated properly
+   * during this update cycle.
+   * @param listener The GLEventListener object to be removed
+   */  
   public void removeGLEventListener(GLEventListener listener);
 
+  /** 
+   * Removes a {@link GLEventListener} at the given index from this drawable. 
+   * Note that if this is done from within a particular drawable's 
+   * {@link GLEventListener} handler (reshape, display, etc.) that it is not
+   * guaranteed that all other listeners will be evaluated properly
+   * during this update cycle.
+   * @param index Position of the listener to be removed.
+   *              Should be within (0 <= index && index < size()).
+   *              An index value of -1 is interpreted as last listener, size()-1.
+   * @return The removed GLEventListener object
+   * @throws IndexOutOfBoundsException If the index is not within (0 <= index && index < size()), or -1
+   */  
+  public GLEventListener removeGLEventListener(int index) throws IndexOutOfBoundsException;
+
   /**
    * <p>
    * Registers the usage of an animator, an {@link javax.media.opengl.GLAnimatorControl} implementation.
@@ -168,7 +210,7 @@ public interface GLAutoDrawable extends GLDrawable {
    * @see #display()
    * @see #invoke(boolean, GLRunnable)
    * @see javax.media.opengl.GLAnimatorControl
-   */ 
+   */
   public abstract void setAnimator(GLAnimatorControl animatorControl) throws GLException;
 
   /**
@@ -179,12 +221,12 @@ public interface GLAutoDrawable extends GLDrawable {
    */
   public GLAnimatorControl getAnimator();
 
-  /** 
+  /**
    * <p>
    * Enqueues a one-shot {@link GLRunnable},
    * which will be executed within the next {@link #display()} call
-   * after all registered {@link GLEventListener}s 
-   * {@link GLEventListener#display(GLAutoDrawable) display(GLAutoDrawable)} 
+   * after all registered {@link GLEventListener}s
+   * {@link GLEventListener#display(GLAutoDrawable) display(GLAutoDrawable)}
    * methods has been called.
    * </p>
    * <p>
@@ -195,14 +237,30 @@ public interface GLAutoDrawable extends GLDrawable {
    * <p>
    * If an {@link GLAnimatorControl} is animating,<br>
    * no {@link #display()} call is issued, since the animator thread performs it.<br>
-   * If <code>wait</code> is true, the implementation waits until the <code>GLRunnable</code> is executed.<br>
-   * </p><br>
+   * </p>
+   * <p>
+   * If <code>wait</code> is <code>true</code> the call blocks until the <code>glRunnable</code>
+   * has been executed.<p>
+   * <p>
+   * If <code>wait</code> is <code>true</code> <b>and</b> 
+   * {@link #isRealized()} returns <code>false</code> <i>or</i> {@link #getContext()} returns <code>null</code>,
+   * the call is ignored and returns <code>false</code>.<br>
+   * This helps avoiding deadlocking the caller.
+   * </p>
+   * <p>
+   * The internal queue of {@link GLRunnable}'s is being flushed with {@link #destroy()}
+   * where all blocked callers are being notified.
+   * </p>
    *
+   * @param wait if <code>true</code> block until execution of <code>glRunnable</code> is finished, otherwise return immediatly w/o waiting
+   * @param glRunnable the {@link GLRunnable} to execute within {@link #display()}
+   * @return <code>true</code> if the {@link GLRunnable} has been processed or queued, otherwise <code>false</code>.
+   * 
    * @see #setAnimator(GLAnimatorControl)
    * @see #display()
    * @see GLRunnable
-   */   
-  public void invoke(boolean wait, GLRunnable glRunnable);
+   */
+  public boolean invoke(boolean wait, GLRunnable glRunnable);
 
   /** Destroys all resources associated with this GLAutoDrawable,
       inclusive the GLContext.
@@ -214,7 +272,7 @@ public interface GLAutoDrawable extends GLDrawable {
       routine may be called manually. */
   public void destroy();
 
-  /** 
+  /**
    * <p>
    * Causes OpenGL rendering to be performed for this GLAutoDrawable
    * in the following order:
@@ -224,21 +282,21 @@ public interface GLAutoDrawable extends GLDrawable {
    *     <li> Executes all one-shot {@link javax.media.opengl.GLRunnable GLRunnable},
    *          enqueued via {@link #invoke(boolean, GLRunnable)}.</li>
    * </ul></p>
-   * <p> 
+   * <p>
    * May be called periodically by a running {@link javax.media.opengl.GLAnimatorControl} implementation,<br>
    * which must register itself with {@link #setAnimator(javax.media.opengl.GLAnimatorControl)}.</p>
    * <p>
    * Called automatically by the window system toolkit upon receiving a repaint() request, <br>
    * except an {@link javax.media.opengl.GLAnimatorControl} implementation {@link javax.media.opengl.GLAnimatorControl#isAnimating()}.</p>
-   * <p> 
+   * <p>
    * This routine may also be called manually for better control over the
    * rendering process. It is legal to call another GLAutoDrawable's
    * display method from within the {@link GLEventListener#display
    * display(..)} callback.</p>
    * <p>
-   * In case of a new generated OpenGL context, 
+   * In case of a new generated OpenGL context,
    * the implementation shall call {@link GLEventListener#init init(..)} for all
-   * registered {@link GLEventListener}s <i>before</i> making the 
+   * registered {@link GLEventListener}s <i>before</i> making the
    * actual {@link GLEventListener#display display(..)} calls,
    * in case this has not been done yet.</p>
    *
@@ -260,17 +318,32 @@ public interface GLAutoDrawable extends GLDrawable {
 
   /**
    * @param flags Additional context creation flags.
-   * 
+   *
    * @see GLContext#setContextCreationFlags(int)
    * @see GLContext#enableGLDebugMessage(boolean)
    */
   public void setContextCreationFlags(int flags);
-      
+
   /**
    * @return Additional context creation flags
    */
   public int getContextCreationFlags();
 
+  /**
+   * {@inheritDoc}
+   * <p>
+   * This GLAutoDrawable implementation holds it's own GLContext reference,
+   * thus created a GLContext using this methods won't replace it implicitly.
+   * To replace or set this GLAutoDrawable's GLContext you need to call {@link #setContext(GLContext)}. 
+   * </p>
+   * <p>
+   * The GLAutoDrawable implementation shall also set the 
+   * context creation flags as customized w/ {@link #setContextCreationFlags(int)}. 
+   * </p>
+   */
+  @Override
+  public GLContext createContext(GLContext shareWith);
+  
   /** Returns the {@link GL} pipeline object this GLAutoDrawable uses.
       If this method is called outside of the {@link
       GLEventListener}'s callback methods (init, display, etc.) it may
@@ -289,5 +362,29 @@ public interface GLAutoDrawable extends GLDrawable {
       demos for examples.
       @return the set GL pipeline or null if not successful */
   public GL setGL(GL gl);
+  
+  /**
+   * Method <i>may</i> return the upstream UI toolkit object
+   * holding this {@link GLAutoDrawable} instance, if exist.
+   * <p>
+   * Currently known Java UI toolkits and it's known return types are:
+   * 
+   * <table border="1">
+   *     <tr><td>Toolkit</td>  <td>GLAutoDrawable Implementation</td>            <td>~</td>      <td>Return Type of getUpstreamWidget()</td</tr>
+   *     <tr><td>NEWT</td>     <td>{@link com.jogamp.newt.opengl.GLWindow}</td>  <td>has a</td>  <td>{@link com.jogamp.newt.Window}</td</tr>
+   *     <tr><td>SWT</td>      <td>{@link com.jogamp.opengl.swt.GLCanvas}</td>   <td>is a</td>   <td>{@link org.eclipse.swt.widgets.Canvas}</td</tr>
+   *     <tr><td>AWT</td>      <td>{@link javax.media.opengl.awt.GLCanvas}</td>  <td>is a</td>   <td>{@link java.awt.Canvas}</td</tr>
+   *     <tr><td>AWT</td>      <td>{@link javax.media.opengl.awt.GLJPanel}</td>  <td>is a</td>   <td>{@link javax.swing.JPanel}</td</tr>
+   * </table>
+   * However, the result may be other object types than the listed above 
+   * due to new supported toolkits.
+   * </p>
+   * <p>
+   * This method may also return <code>null</code> if no UI toolkit is being used,
+   * as common for offscreen rendering.
+   * </p>
+   * @return
+   */
+  public Object getUpstreamWidget();
 
 }
diff --git a/src/jogl/classes/javax/media/opengl/GLAutoDrawableDelegate.java b/src/jogl/classes/javax/media/opengl/GLAutoDrawableDelegate.java
new file mode 100644
index 0000000..67e8127
--- /dev/null
+++ b/src/jogl/classes/javax/media/opengl/GLAutoDrawableDelegate.java
@@ -0,0 +1,144 @@
+/**
+ * Copyright 2012 JogAmp Community. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ * 
+ *    1. Redistributions of source code must retain the above copyright notice, this list of
+ *       conditions and the following disclaimer.
+ * 
+ *    2. Redistributions in binary form must reproduce the above copyright notice, this list
+ *       of conditions and the following disclaimer in the documentation and/or other materials
+ *       provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * 
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of JogAmp Community.
+ */
+ 
+package javax.media.opengl;
+
+import javax.media.nativewindow.AbstractGraphicsDevice;
+
+import com.jogamp.common.util.locks.LockFactory;
+import com.jogamp.common.util.locks.RecursiveLock;
+
+import jogamp.opengl.Debug;
+import jogamp.opengl.GLAutoDrawableBase;
+import jogamp.opengl.GLContextImpl;
+import jogamp.opengl.GLDrawableImpl;
+
+
+/**
+ * Fully functional {@link GLAutoDrawable} implementation
+ * utilizing already created created {@link GLDrawable} and {@link GLContext} instances.
+ * <p>
+ * Since no native windowing system events are being processed, it is recommended
+ * to handle at least:
+ * <ul>
+ *   <li>{@link com.jogamp.newt.event.WindowListener#windowRepaint(com.jogamp.newt.event.WindowUpdateEvent) repaint} using {@link #defaultWindowRepaintOp()}</li>
+ *   <li>{@link com.jogamp.newt.event.WindowListener#windowResized(com.jogamp.newt.event.WindowEvent) resize} using {@link #defaultWindowResizedOp()}</li>
+ *   <li>{@link com.jogamp.newt.event.WindowListener#windowDestroyNotify(com.jogamp.newt.event.WindowEvent) destroy-notify}  using {@link #defaultWindowDestroyNotifyOp()}</li> 
+ * </ul> 
+ * </p>
+ * <p> 
+ * See example {@link com.jogamp.opengl.test.junit.jogl.acore.TestGLAutoDrawableDelegateNEWT TestGLAutoDrawableDelegateNEWT}.
+ * </p>
+ */
+public class GLAutoDrawableDelegate extends GLAutoDrawableBase {
+    public static final boolean DEBUG = Debug.debug("GLAutoDrawableDelegate");
+    
+    /**
+     * @param drawable a valid {@link GLDrawable}, may not be realized yet.
+     * @param context a valid {@link GLContext}, may not be made current (created) yet.
+     * @param upstreamWidget optional UI element holding this instance, see {@link #getUpstreamWidget()}.
+     * @param ownDevice pass <code>true</code> if {@link AbstractGraphicsDevice#close()} shall be issued,
+     *                  otherwise pass <code>false</code>. Closing the device is required in case
+     *                  the drawable is created w/ it's own new instance, e.g. offscreen drawables,
+     *                  and no further lifecycle handling is applied.
+     */
+    public GLAutoDrawableDelegate(GLDrawable drawable, GLContext context, Object upstreamWidget, boolean ownDevice) {
+        super((GLDrawableImpl)drawable, (GLContextImpl)context, ownDevice);
+        this.upstreamWidget = null;
+    }
+    
+    //
+    // expose default methods
+    //
+    
+    public final void windowRepaintOp() {
+        super.defaultWindowRepaintOp();
+    }
+    
+    public final void windowResizedOp() {
+        super.defaultWindowResizedOp();
+    }
+    
+    public final void windowDestroyNotifyOp() {
+        super.defaultWindowDestroyNotifyOp();
+    }
+    
+    //
+    // Complete GLAutoDrawable
+    //
+    
+    private final RecursiveLock lock = LockFactory.createRecursiveLock();  // instance wide lock
+    private final Object upstreamWidget;
+    
+    @Override
+    protected final RecursiveLock getLock() { return lock; }
+    
+    @Override
+    public final Object getUpstreamWidget() {
+        return upstreamWidget;
+    }
+    
+    /**
+     * {@inheritDoc}
+     * <p>
+     * This implementation calls {@link #defaultDestroy()}.
+     * </p>
+     * <p>
+     * User still needs to destroy the upstream window, which details are hidden from this aspect.
+     * This can be performed by overriding {@link #destroyImplInLock()}. 
+     * </p>
+     */
+    @Override
+    public final void destroy() {
+        defaultDestroy();
+    }
+
+    @Override
+    public void display() {
+        defaultDisplay();
+    }
+    
+    //
+    // GLDrawable delegation
+    //
+    
+    @Override
+    public final GLDrawableFactory getFactory() {
+        return drawable.getFactory();
+    }
+    
+    @Override
+    public final void setRealized(boolean realized) {
+    }
+
+    @Override
+    public final void swapBuffers() throws GLException {
+         defaultSwapBuffers();
+    }
+        
+}
diff --git a/src/jogl/classes/javax/media/opengl/GLBase.java b/src/jogl/classes/javax/media/opengl/GLBase.java
index bd24b15..f5831a7 100644
--- a/src/jogl/classes/javax/media/opengl/GLBase.java
+++ b/src/jogl/classes/javax/media/opengl/GLBase.java
@@ -340,5 +340,60 @@ public interface GLBase {
     * completeness.
     */
    public Object getExtension(String extensionName);
+
+   /** Aliased entrypoint of <code> void {@native glClearDepth}(GLclampd depth); </code> and <code> void {@native glClearDepthf}(GLclampf depth); </code>. */  
+   public void glClearDepth( double depth );
+
+   /** Aliased entrypoint of <code> void {@native glDepthRange}(GLclampd depth); </code> and <code> void {@native glDepthRangef}(GLclampf depth); </code>. */  
+   public void glDepthRange(double zNear, double zFar);
+
+   /**
+    * @param target a GL buffer (VBO) target as used in {@link GL#glBindBuffer(int, int)}, ie {@link GL#GL_ELEMENT_ARRAY_BUFFER}, {@link GL#GL_ARRAY_BUFFER}, ..
+    * @return the GL buffer (VBO) name bound to a target via {@link GL#glBindBuffer(int, int)} or 0 if unbound.
+    */
+   public int glGetBoundBuffer(int target);
+
+   /**
+    * @param buffer a GL buffer name, generated with {@link GL#glGenBuffers(int, int[], int)} and used in {@link GL#glBindBuffer(int, int)}, {@link GL#glBufferData(int, long, java.nio.Buffer, int)} or {@link GL2#glNamedBufferDataEXT(int, long, java.nio.Buffer, int)} for example.
+    * @return the size of the given GL buffer
+    */
+   public long glGetBufferSize(int buffer);
+
+   /**
+    * @return true if a VBO is bound to {@link GL.GL_ARRAY_BUFFER} via {@link GL#glBindBuffer(int, int)}, otherwise false
+    */
+   public boolean glIsVBOArrayEnabled();
+
+   /**
+    * @return true if a VBO is bound to {@link GL.GL_ELEMENT_ARRAY_BUFFER} via {@link GL#glBindBuffer(int, int)}, otherwise false
+    */
+   public boolean glIsVBOElementArrayEnabled();
+
+   /** 
+    * Return the framebuffer name bound to this context, 
+    * see {@link GL#glBindFramebuffer(int, int)}.
+    */
+   public int getBoundFramebuffer(int target);
+
+   /** 
+    * Return the default draw framebuffer name.
+    * <p> 
+    * May differ from it's default <code>zero</code>
+    * in case an framebuffer object ({@link FBObject}) based drawable
+    * is being used.
+    * </p> 
+    */
+   public int getDefaultDrawFramebuffer();
+
+   /** 
+    * Return the default read framebuffer name.
+    * <p> 
+    * May differ from it's default <code>zero</code>
+    * in case an framebuffer object ({@link FBObject}) based drawable
+    * is being used.
+    * </p> 
+    */
+   public int getDefaultReadFramebuffer();
+
 }
 
diff --git a/src/jogl/classes/javax/media/opengl/GLCapabilities.java b/src/jogl/classes/javax/media/opengl/GLCapabilities.java
index 8b832b3..8845ec6 100644
--- a/src/jogl/classes/javax/media/opengl/GLCapabilities.java
+++ b/src/jogl/classes/javax/media/opengl/GLCapabilities.java
@@ -1,22 +1,22 @@
 /*
  * Copyright (c) 2003-2009 Sun Microsystems, Inc. All Rights Reserved.
  * Copyright (c) 2010 JogAmp Community. All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- * 
+ *
  * - Redistribution of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
- * 
+ *
  * - Redistribution in binary form must reproduce the above copyright
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the distribution.
- * 
+ *
  * Neither the name of Sun Microsystems, Inc. or the names of
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * This software is provided "AS IS," without a warranty of any kind. ALL
  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -29,11 +29,11 @@
  * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
  * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
  * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
+ *
  * You acknowledge that this software is not designed or intended for use
  * in the design, construction, operation or maintenance of any nuclear
  * facility.
- * 
+ *
  * Sun gratefully acknowledges that this software was originally authored
  * and developed by Kenneth Bradley Russell and Christopher John Kline.
  */
@@ -41,6 +41,7 @@
 package javax.media.opengl;
 
 import javax.media.nativewindow.Capabilities;
+import javax.media.nativewindow.CapabilitiesImmutable;
 
 /** Specifies a set of OpenGL capabilities.<br>
     At creation time of a {@link GLDrawable} using {@link GLDrawableFactory},
@@ -54,8 +55,9 @@ import javax.media.nativewindow.Capabilities;
     It currently contains the minimal number of routines which allow
     configuration on all supported window systems. */
 public class GLCapabilities extends Capabilities implements Cloneable, GLCapabilitiesImmutable {
-  private GLProfile glProfile = null;
-  private boolean pbuffer = false;
+  private GLProfile glProfile    = null;
+  private boolean isPBuffer      = false;
+  private boolean isFBO          = false;
   private boolean doubleBuffered = true;
   private boolean stereo         = false;
   private boolean hardwareAccelerated = true;
@@ -86,10 +88,12 @@ public class GLCapabilities extends Capabilities implements Cloneable, GLCapabil
       glProfile = (null!=glp)?glp:GLProfile.getDefault(GLProfile.getDefaultDevice());
   }
 
+  @Override
   public Object cloneMutable() {
     return clone();
   }
 
+  @Override
   public Object clone() {
     try {
       return super.clone();
@@ -98,10 +102,12 @@ public class GLCapabilities extends Capabilities implements Cloneable, GLCapabil
     }
   }
 
+  @Override
   public int hashCode() {
     // 31 * x == (x << 5) - x
     int hash = 31 + this.glProfile.hashCode() ;
-    hash = ((hash << 5) - hash) + ( this.pbuffer ? 1 : 0 );
+    hash = ((hash << 5) - hash) + ( this.isFBO ? 1 : 0 );
+    hash = ((hash << 5) - hash) + ( this.isPBuffer ? 1 : 0 );
     hash = ((hash << 5) - hash) + ( this.stereo ? 1 : 0 );
     hash = ((hash << 5) - hash) + ( this.hardwareAccelerated ? 1 : 0 );
     hash = ((hash << 5) - hash) + this.depthBits;
@@ -119,6 +125,7 @@ public class GLCapabilities extends Capabilities implements Cloneable, GLCapabil
     return hash;
   }
 
+  @Override
   public boolean equals(Object obj) {
     if(this == obj)  { return true; }
     if(!(obj instanceof GLCapabilitiesImmutable)) {
@@ -127,7 +134,8 @@ public class GLCapabilities extends Capabilities implements Cloneable, GLCapabil
     GLCapabilitiesImmutable other = (GLCapabilitiesImmutable)obj;
     boolean res = super.equals(obj) &&
                   other.getGLProfile()==glProfile &&
-                  other.isPBuffer()==pbuffer &&
+                  other.isPBuffer()==isPBuffer &&
+                  other.isFBO()==isFBO &&
                   other.getStereo()==stereo &&
                   other.getHardwareAccelerated()==hardwareAccelerated &&
                   other.getDepthBits()==depthBits &&
@@ -142,46 +150,52 @@ public class GLCapabilities extends Capabilities implements Cloneable, GLCapabil
                   other.getPbufferRenderToTextureRectangle()==pbufferRenderToTextureRectangle;
     if(sampleBuffers) {
         res = res &&
-              other.getNumSamples()==numSamples && 
+              other.getNumSamples()==numSamples &&
               other.getSampleExtension().equals(sampleExtension) ;
     }
     return res;
   }
 
   /** comparing hw/sw, stereo, multisample, stencil, RGBA and depth only */
-  public int compareTo(Object o) {
-    if ( ! ( o instanceof GLCapabilities ) ) {
+  @Override
+  public int compareTo(final CapabilitiesImmutable o) {
+    if ( ! ( o instanceof GLCapabilitiesImmutable ) ) {
         Class<?> c = (null != o) ? o.getClass() : null ;
-        throw new ClassCastException("Not a GLCapabilities object: " + c);
+        throw new ClassCastException("Not a GLCapabilitiesImmutable object, but " + c);
     }
+    final GLCapabilitiesImmutable caps = (GLCapabilitiesImmutable) o;
 
-    final GLCapabilities caps = (GLCapabilities) o;
+    if(hardwareAccelerated && !caps.getHardwareAccelerated()) {
+        return 1;
+    } else if(!hardwareAccelerated && caps.getHardwareAccelerated()) {
+        return -1;
+    }
 
-    if(hardwareAccelerated && !caps.hardwareAccelerated) {
+    if(stereo && !caps.getStereo()) {
         return 1;
-    } else if(!hardwareAccelerated && caps.hardwareAccelerated) {
+    } else if(!stereo && caps.getStereo()) {
         return -1;
     }
 
-    if(stereo && !caps.stereo) {
+    if(doubleBuffered && !caps.getDoubleBuffered()) {
         return 1;
-    } else if(!stereo && caps.stereo) {
+    } else if(!doubleBuffered && caps.getDoubleBuffered()) {
         return -1;
     }
 
-    final int ms = sampleBuffers ? numSamples : 0;
-    final int xms = caps.sampleBuffers ? caps.numSamples : 0;
+    final int ms = getNumSamples();
+    final int xms = caps.getNumSamples() ;
 
     if(ms > xms) {
         return 1;
     } else if( ms < xms ) {
         return -1;
     }
-    // ignore the sample extension 
+    // ignore the sample extension
 
-    if(stencilBits > caps.stencilBits) {
+    if(stencilBits > caps.getStencilBits()) {
         return 1;
-    } else if(stencilBits < caps.stencilBits) {
+    } else if(stencilBits < caps.getStencilBits()) {
         return -1;
     }
 
@@ -190,16 +204,17 @@ public class GLCapabilities extends Capabilities implements Cloneable, GLCapabil
         return sc;
     }
 
-    if(depthBits > caps.depthBits) {
+    if(depthBits > caps.getDepthBits()) {
         return 1;
-    } else if(depthBits < caps.depthBits) {
+    } else if(depthBits < caps.getDepthBits()) {
         return -1;
     }
 
     return 0; // they are equal: hw/sw, stereo, multisample, stencil, RGBA and depth
   }
 
-  public GLProfile getGLProfile() {
+  @Override
+  public final GLProfile getGLProfile() {
     return glProfile;
   }
 
@@ -208,35 +223,61 @@ public class GLCapabilities extends Capabilities implements Cloneable, GLCapabil
     glProfile=profile;
   }
 
-  public boolean isPBuffer() {
-    return pbuffer;
+  @Override
+  public final boolean isPBuffer() {
+    return isPBuffer;
   }
 
-  /** 
-   * Enables or disables pbuffer usage.<br>
-   * If enabled this method also invokes {@link #setOnscreen(int) setOnscreen(false)}<br>
+  /**
+   * Enables or disables pbuffer usage.
+   * <p>
+   * If enabled this method also invokes {@link #setOnscreen(int) setOnscreen(false)}.
+   * </p>
    * Defaults to false.
    */
   public void setPBuffer(boolean enable) {
     if(enable) {
       setOnscreen(false);
     }
-    pbuffer = enable;
+    isPBuffer = enable;
+  }
+
+  @Override
+  public final boolean isFBO() {
+      return isFBO;
+  }
+  
+  /**
+   * Enables or disables FBO usage.
+   * <p>
+   * If enabled this method also invokes {@link #setOnscreen(int) setOnscreen(false)}.
+   * </p>
+   * Defaults to false.
+   */
+  public void setFBO(boolean enable) {
+    if(enable) {
+      setOnscreen(false);
+    }
+    isFBO = enable;
   }
 
   /**
    * Sets whether the drawable surface supports onscreen.<br>
-   * If enabled this method also invokes {@link #setPBuffer(int) setPBuffer(false)}<br>
+   * If enabled this method also invokes {@link #setPBuffer(int) setPBuffer(false)}
+   * and {@link #setFBO(int) setFBO(false)}<br>
    * Defaults to true.
   */
+  @Override
   public void setOnscreen(boolean onscreen) {
     if(onscreen) {
         setPBuffer(false);
+        setFBO(false);
     }
     super.setOnscreen(onscreen);
   }
 
-  public boolean getDoubleBuffered() {
+  @Override
+  public final boolean getDoubleBuffered() {
     return doubleBuffered;
   }
 
@@ -245,25 +286,28 @@ public class GLCapabilities extends Capabilities implements Cloneable, GLCapabil
     doubleBuffered = enable;
   }
 
-  public boolean getStereo() {
+  @Override
+  public final boolean getStereo() {
     return stereo;
   }
-  
+
   /** Enables or disables stereo viewing. */
   public void setStereo(boolean enable) {
     stereo = enable;
   }
 
-  public boolean getHardwareAccelerated() {
+  @Override
+  public final boolean getHardwareAccelerated() {
     return hardwareAccelerated;
   }
-  
+
   /** Enables or disables hardware acceleration. */
   public void setHardwareAccelerated(boolean enable) {
     hardwareAccelerated = enable;
   }
 
-  public int getDepthBits() {
+  @Override
+  public final int getDepthBits() {
     return depthBits;
   }
 
@@ -271,8 +315,9 @@ public class GLCapabilities extends Capabilities implements Cloneable, GLCapabil
   public void setDepthBits(int depthBits) {
     this.depthBits = depthBits;
   }
-  
-  public int getStencilBits() {
+
+  @Override
+  public final int getStencilBits() {
     return stencilBits;
   }
 
@@ -280,8 +325,9 @@ public class GLCapabilities extends Capabilities implements Cloneable, GLCapabil
   public void setStencilBits(int stencilBits) {
     this.stencilBits = stencilBits;
   }
-  
-  public int getAccumRedBits() {
+
+  @Override
+  public final int getAccumRedBits() {
     return accumRedBits;
   }
 
@@ -293,7 +339,8 @@ public class GLCapabilities extends Capabilities implements Cloneable, GLCapabil
     this.accumRedBits = accumRedBits;
   }
 
-  public int getAccumGreenBits() {
+  @Override
+  public final int getAccumGreenBits() {
     return accumGreenBits;
   }
 
@@ -305,7 +352,8 @@ public class GLCapabilities extends Capabilities implements Cloneable, GLCapabil
     this.accumGreenBits = accumGreenBits;
   }
 
-  public int getAccumBlueBits() {
+  @Override
+  public final int getAccumBlueBits() {
     return accumBlueBits;
   }
 
@@ -317,7 +365,8 @@ public class GLCapabilities extends Capabilities implements Cloneable, GLCapabil
     this.accumBlueBits = accumBlueBits;
   }
 
-  public int getAccumAlphaBits() {
+  @Override
+  public final int getAccumAlphaBits() {
     return accumAlphaBits;
   }
 
@@ -333,14 +382,15 @@ public class GLCapabilities extends Capabilities implements Cloneable, GLCapabil
    * Sets the desired extension for full-scene antialiasing
    * (FSAA), default is {@link #DEFAULT_SAMPLE_EXTENSION}.
    */
-  public void setSampleExtension(String se) { 
-      sampleExtension = se; 
+  public void setSampleExtension(String se) {
+      sampleExtension = se;
   }
-    
-  public String getSampleExtension() { 
-      return sampleExtension; 
+
+  @Override
+  public final String getSampleExtension() {
+      return sampleExtension;
   }
-  
+
   /**
    * Defaults to false.<br>
    * Indicates whether sample buffers for full-scene antialiasing
@@ -353,21 +403,26 @@ public class GLCapabilities extends Capabilities implements Cloneable, GLCapabil
     sampleBuffers = enable;
     if(sampleBuffers && getAlphaBits()==0) {
         setAlphaBits(1);
-    }        
+    }
   }
 
-  public boolean getSampleBuffers() {
+  @Override
+  public final boolean getSampleBuffers() {
     return sampleBuffers;
   }
 
-  /** If sample buffers are enabled, indicates the number of buffers
-      to be allocated. Defaults to 2. */
+  /** 
+   * If sample buffers are enabled, indicates the number of buffers
+   * to be allocated. Defaults to 2.
+   * @see #getNumSamples()
+   */
   public void setNumSamples(int numSamples) {
     this.numSamples = numSamples;
   }
 
-  public int getNumSamples() {
-    return numSamples;
+  @Override
+  public final int getNumSamples() {
+    return sampleBuffers ? numSamples : 0;
   }
 
   /** For pbuffers only, indicates whether floating-point buffers
@@ -376,7 +431,8 @@ public class GLCapabilities extends Capabilities implements Cloneable, GLCapabil
     pbufferFloatingPointBuffers = enable;
   }
 
-  public boolean getPbufferFloatingPointBuffers() {
+  @Override
+  public final boolean getPbufferFloatingPointBuffers() {
     return pbufferFloatingPointBuffers;
   }
 
@@ -386,7 +442,8 @@ public class GLCapabilities extends Capabilities implements Cloneable, GLCapabil
     pbufferRenderToTexture = enable;
   }
 
-  public boolean getPbufferRenderToTexture() {
+  @Override
+  public final boolean getPbufferRenderToTexture() {
     return pbufferRenderToTexture;
   }
 
@@ -397,10 +454,12 @@ public class GLCapabilities extends Capabilities implements Cloneable, GLCapabil
     pbufferRenderToTextureRectangle = enable;
   }
 
-  public boolean getPbufferRenderToTextureRectangle() {
+  @Override
+  public final boolean getPbufferRenderToTextureRectangle() {
     return pbufferRenderToTextureRectangle;
   }
 
+  @Override
   public StringBuilder toString(StringBuilder sink) {
     if(null == sink) {
         sink = new StringBuilder();
@@ -432,21 +491,26 @@ public class GLCapabilities extends Capabilities implements Cloneable, GLCapabil
     }
     sink.append(glProfile);
     if(!isOnscreen()) {
-        if(pbuffer) {
+        if(isFBO) {
+            sink.append(", fbo");
+        } 
+        if(isPBuffer) {
             sink.append(", pbuffer [r2t ").append(pbufferRenderToTexture?1:0)
                 .append(", r2tr ").append(pbufferRenderToTextureRectangle?1:0)
                 .append(", float ").append(pbufferFloatingPointBuffers?1:0)
                 .append("]");
-        } else {
+        } 
+        if(!isFBO && !isPBuffer) {
             sink.append(", pixmap");
         }
     }
-    
+
     return sink;
   }
 
   /** Returns a textual representation of this GLCapabilities
-      object. */ 
+      object. */
+  @Override
   public String toString() {
     StringBuilder msg = new StringBuilder();
     msg.append("GLCaps[");
diff --git a/src/jogl/classes/javax/media/opengl/GLCapabilitiesChooser.java b/src/jogl/classes/javax/media/opengl/GLCapabilitiesChooser.java
index 73a77de..5d575c2 100644
--- a/src/jogl/classes/javax/media/opengl/GLCapabilitiesChooser.java
+++ b/src/jogl/classes/javax/media/opengl/GLCapabilitiesChooser.java
@@ -40,17 +40,23 @@
 
 package javax.media.opengl;
 
+import java.util.List;
+
+import javax.media.nativewindow.CapabilitiesImmutable;
 import javax.media.nativewindow.CapabilitiesChooser;
 
+import javax.media.opengl.GLCapabilitiesImmutable;
+
 /** Provides a mechanism by which applications can customize the
     window type selection for a given {@link GLCapabilities}.
     Developers can implement this interface and pass an instance into
     the appropriate method of {@link GLDrawableFactory}; the chooser
     will be called during the OpenGL context creation process. Note
     that this is only a marker interface; its signature is the same as
-    {@link CapabilitiesChooser}, but the array of {@link Capabilities}
-    objects passed to {@link #chooseCapabilities chooseCapabilities}
-    will actually be an array of {@link GLCapabilities}. */
+    {@link CapabilitiesChooser} and the {@link List} of 
+    objects extending {@link CapabilitiesImmutable}
+    passed to {@link #chooseCapabilities chooseCapabilities}
+    is actually a {@link List} of type {@link GLCapabilitiesImmutable}. */
 
 public interface GLCapabilitiesChooser extends CapabilitiesChooser {
 }
diff --git a/src/jogl/classes/javax/media/opengl/GLCapabilitiesImmutable.java b/src/jogl/classes/javax/media/opengl/GLCapabilitiesImmutable.java
index 5f8795e..7e0459b 100644
--- a/src/jogl/classes/javax/media/opengl/GLCapabilitiesImmutable.java
+++ b/src/jogl/classes/javax/media/opengl/GLCapabilitiesImmutable.java
@@ -111,7 +111,7 @@ public interface GLCapabilitiesImmutable extends CapabilitiesImmutable {
 
     /**
      * Returns the number of sample buffers to be allocated if sample
-     * buffers are enabled. Defaults to 2.
+     * buffers are enabled, otherwise returns 0. Defaults to 2.
      */
     int getNumSamples();
 
@@ -144,10 +144,15 @@ public interface GLCapabilitiesImmutable extends CapabilitiesImmutable {
     boolean getStereo();
 
     /**
-     * Indicates whether pbuffer is used/requested.
+     * Indicates whether pbuffer offscreen is used/requested.
      */
     boolean isPBuffer();
 
+    /**
+     * Indicates whether FBO offscreen is used/requested.
+     */
+    boolean isFBO();
+
     @Override
     boolean equals(Object obj);
 
diff --git a/src/jogl/classes/javax/media/opengl/GLContext.java b/src/jogl/classes/javax/media/opengl/GLContext.java
index e23fa74..63a02ad 100644
--- a/src/jogl/classes/javax/media/opengl/GLContext.java
+++ b/src/jogl/classes/javax/media/opengl/GLContext.java
@@ -1,22 +1,22 @@
 /*
  * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
  * Copyright (c) 2010 JogAmp Community. All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- * 
+ *
  * - Redistribution of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
- * 
+ *
  * - Redistribution in binary form must reproduce the above copyright
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the distribution.
- * 
+ *
  * Neither the name of Sun Microsystems, Inc. or the names of
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * This software is provided "AS IS," without a warranty of any kind. ALL
  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -29,11 +29,11 @@
  * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
  * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
  * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
+ *
  * You acknowledge that this software is not designed or intended for use
  * in the design, construction, operation or maintenance of any nuclear
  * facility.
- * 
+ *
  * Sun gratefully acknowledges that this software was originally authored
  * and developed by Kenneth Bradley Russell and Christopher John Kline.
  */
@@ -43,15 +43,19 @@ package javax.media.opengl;
 import java.nio.IntBuffer;
 import java.util.HashMap;
 import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
 
 import javax.media.nativewindow.AbstractGraphicsDevice;
 
+import jogamp.opengl.Debug;
+import jogamp.opengl.GLContextImpl;
+
+import com.jogamp.common.os.Platform;
 import com.jogamp.common.util.IntObjectHashMap;
 import com.jogamp.common.util.locks.LockFactory;
 import com.jogamp.common.util.locks.RecursiveLock;
-
-import jogamp.opengl.Debug;
-import jogamp.opengl.GLContextImpl;
+import com.jogamp.opengl.GLExtensions;
 
 /** Abstraction for an OpenGL rendering context. In order to perform
     OpenGL rendering, a context must be "made current" on the current
@@ -66,14 +70,41 @@ import jogamp.opengl.GLContextImpl;
     abstraction provides a stable object which clients can use to
     refer to a given context. */
 public abstract class GLContext {
-  public static final boolean DEBUG = Debug.debug("GLContext");  
-  public static final boolean TRACE_SWITCH = Debug.isPropertyDefined("jogl.debug.GLContext.TraceSwitch", true);
   
+  /** 
+   * If <code>true</code> (default), bootstrapping the available GL profiles 
+   * will use the highest compatible GL context for each profile, 
+   * hence skipping querying lower profiles if a compatible higher one is found:
+   * <ul>
+   *   <li>4.2-core -> 4.2-core, 3.3-core</li>
+   *   <li>4.2-comp -> 4.2-comp, 3.3-comp, 2</li>
+   * </ul>
+   * Otherwise the dedicated GL context would be queried and used:
+   * <ul>
+   *   <li>4.2-core -> 4.2-core</li>
+   *   <li>3.3-core -> 3.3-core</li>
+   *   <li>4.2-comp -> 4.2-comp</li>
+   *   <li>3.3-comp -> 3.3-comp</li>
+   *   <li>3.0-comp -> 2</li>
+   * </ul>
+   * Using aliasing speeds up initialization about:
+   * <ul>
+   *   <li>Linux x86_64 - Nvidia: 28%,  700ms down to 500ms</li> 
+   *   <li>Linux x86_64 - AMD   : 40%, 1500ms down to 900ms</li> 
+   * <p>
+   * Can be turned off with property <code>jogl.debug.GLContext.NoProfileAliasing</code>.
+   * </p>
+   */
+  public static final boolean PROFILE_ALIASING = !Debug.isPropertyDefined("jogl.debug.GLContext.NoProfileAliasing", true);
+  
+  public static final boolean DEBUG = Debug.debug("GLContext");
+  public static final boolean TRACE_SWITCH = Debug.isPropertyDefined("jogl.debug.GLContext.TraceSwitch", true);
+
   /** Reflects property jogl.debug.DebugGL. If true, the debug pipeline is enabled at context creation. */
-  public final static boolean DEBUG_GL = Debug.isPropertyDefined("jogl.debug.DebugGL", true);
+  public static final boolean DEBUG_GL = Debug.isPropertyDefined("jogl.debug.DebugGL", true);
   /** Reflects property jogl.debug.TraceGL. If true, the trace pipeline is enabled at context creation. */
-  public final static boolean TRACE_GL = Debug.isPropertyDefined("jogl.debug.TraceGL", true);
-  
+  public static final boolean TRACE_GL = Debug.isPropertyDefined("jogl.debug.TraceGL", true);
+
   /** Indicates that the context was not made current during the last call to {@link #makeCurrent makeCurrent}. */
   public static final int CONTEXT_NOT_CURRENT = 0;
   /** Indicates that the context was made current during the last call to {@link #makeCurrent makeCurrent}. */
@@ -81,32 +112,39 @@ public abstract class GLContext {
   /** Indicates that a newly-created context was made current during the last call to {@link #makeCurrent makeCurrent}. */
   public static final int CONTEXT_CURRENT_NEW = 2;
 
-  /** <code>ARB_create_context</code> related: created via ARB_create_context. Cache key value. */
+  /** <code>ARB_create_context</code> related: created via ARB_create_context. Cache key value. See {@link #getAvailableContextProperties(AbstractGraphicsDevice, GLProfile)}. */
   protected static final int CTX_IS_ARB_CREATED  = 1 <<  0;
-  /** <code>ARB_create_context</code> related: compatibility profile. Cache key value. */
+  /** <code>ARB_create_context</code> related: desktop compatibility profile. Cache key value. See {@link #isGLCompatibilityProfile()}, {@link #getAvailableContextProperties(AbstractGraphicsDevice, GLProfile)}. */
   protected static final int CTX_PROFILE_COMPAT  = 1 <<  1;
-  /** <code>ARB_create_context</code> related: core profile. Cache key value. */
+  /** <code>ARB_create_context</code> related: desktop core profile. Cache key value. See {@link #isGLCoreProfile()}, {@link #getAvailableContextProperties(AbstractGraphicsDevice, GLProfile)}. */
   protected static final int CTX_PROFILE_CORE    = 1 <<  2;
-  /** <code>ARB_create_context</code> related: ES profile. Cache key value. */
+  /** <code>ARB_create_context</code> related: ES profile. Cache key value. See {@link #isGLES()}, {@link #getAvailableContextProperties(AbstractGraphicsDevice, GLProfile)}. */
   protected static final int CTX_PROFILE_ES      = 1 <<  3;
-  /** <code>ARB_create_context</code> related: flag forward compatible. Cache key value. */
+  /** <code>ARB_create_context</code> related: flag forward compatible. Cache key value. See {@link #getAvailableContextProperties(AbstractGraphicsDevice, GLProfile)}. */
   protected static final int CTX_OPTION_FORWARD  = 1 <<  4;
-  /** <code>ARB_create_context</code> related: flag debug. Not a cache key. */
+  /** <code>ARB_create_context</code> related: flag debug. Cache key value. See {@link #setContextCreationFlags(int)}, {@link GLAutoDrawable#setContextCreationFlags(int)}, {@link #getAvailableContextProperties(AbstractGraphicsDevice, GLProfile)}. */
   public static final int CTX_OPTION_DEBUG       = 1 <<  5;
-  
-  /** <code>GL_ARB_ES2_compatibility</code> implementation related: Context is compatible w/ ES2. Not a cache key. */
+
+  /** <code>GL_ARB_ES2_compatibility</code> implementation related: Context is compatible w/ ES2. Not a cache key. See {@link #isGLES2Compatible()}, {@link #getAvailableContextProperties(AbstractGraphicsDevice, GLProfile)}. */
   protected static final int CTX_IMPL_ES2_COMPAT = 1 <<  8;
 
-  /** Context uses software rasterizer, otherwise hardware rasterizer. Cache key value. */
+  /** Context supports basic FBO, details see {@link #hasFBO()}.
+   * Not a cache key.
+   * @see #hasFBO()
+   * @see #getAvailableContextProperties(AbstractGraphicsDevice, GLProfile)
+   */
+  protected static final int CTX_IMPL_FBO        = 1 <<  9;
+
+  /** Context uses software rasterizer, otherwise hardware rasterizer. Cache key value. See {@link #isHardwareRasterizer()}, {@link #getAvailableContextProperties(AbstractGraphicsDevice, GLProfile)}. */
   protected static final int CTX_IMPL_ACCEL_SOFT = 1 << 15;
-  
-  private static ThreadLocal<GLContext> currentContext = new ThreadLocal<GLContext>();
 
-  private HashMap<String, Object> attachedObjectsByString = new HashMap<String, Object>();
-  private IntObjectHashMap attachedObjectsByInt = new IntObjectHashMap();
+  private static final ThreadLocal<GLContext> currentContext = new ThreadLocal<GLContext>();
 
-  // RecursiveLock maintains a queue of waiting Threads, ensuring the longest waiting thread will be notified at unlock.  
-  protected RecursiveLock lock = LockFactory.createRecursiveLock();
+  private final HashMap<String, Object> attachedObjectsByString = new HashMap<String, Object>();
+  private final IntObjectHashMap attachedObjectsByInt = new IntObjectHashMap();
+
+  // RecursiveLock maintains a queue of waiting Threads, ensuring the longest waiting thread will be notified at unlock.
+  protected final RecursiveLock lock = LockFactory.createRecursiveLock();
 
   /** The underlying native OpenGL context */
   protected long contextHandle;
@@ -114,7 +152,7 @@ public abstract class GLContext {
   protected GLContext() {
       resetStates();
   }
-  
+
   protected int ctxMajorVersion;
   protected int ctxMinorVersion;
   protected int ctxOptions;
@@ -137,36 +175,74 @@ public abstract class GLContext {
   }
 
   /**
-   * Returns the GLDrawable to which this context may be used to
-   * draw.
+   * Sets the read/write drawable for framebuffer operations.
+   * <p>
+   * If the context was current on this thread, it is being released before switching the drawable
+   * and made current afterwards. However the user shall take extra care that not other thread
+   * attempts to make this context current. Otherwise a race condition may happen.
+   * </p>
+   * <p>
+   * <b>Disclaimer</b>: Even though the API may allows this functionality in theory, your mileage may vary 
+   * switching the drawable of an already established GLContext, i.e. which is already made current once.
+   * FIXME: Validate functionality! 
+   * </p>
+   * @param readWrite the read/write drawable for framebuffer operations.
+   * @param setWriteOnly if <code>true</code> and if the current read-drawable differs 
+   *        from the write-drawable ({@link #setGLReadDrawable(GLDrawable)}), 
+   *        only change the write-drawable. Otherwise set both drawables.
+   * @return the replaced read/write drawable
+   *
+   * @throws GLException in case <code>null</code> is being passed or 
+   *                     this context is made current on another thread.
+   *
+   * @see #isGLReadDrawableAvailable()
+   * @see #getGLReadDrawable()
+   * @see #setGLReadDrawable()
+   * @see #getGLDrawable()
+   */
+  public abstract GLDrawable setGLDrawable(GLDrawable readWrite, boolean setWriteOnly);
+  
+  /**
+   * Returns the write-drawable this context uses for framebuffer operations.
    */
   public abstract GLDrawable getGLDrawable();
 
   /**
-   * Return availability of GL read drawable.
-   * @return true if a GL read drawable is supported with your driver, otherwise false.
+   * Query whether using a distinguished read-drawable is supported.
+   * @return true if using a read-drawable is supported with your driver/OS, otherwise false.
    */
   public abstract boolean isGLReadDrawableAvailable();
 
   /**
-   * Set the read GLDrawable for read framebuffer operations.<br>
+   * Set the read-Drawable for read framebuffer operations.<br>
    * The caller should query if this feature is supported via {@link #isGLReadDrawableAvailable()}.
+   * <p>
+   * If the context was current on this thread, it is being released before switching the drawable
+   * and made current afterwards. However the user shall take extra care that not other thread
+   * attempts to make this context current. Otherwise a race condition may happen.
+   * </p>
    *
-   * @param read the read GLDrawable for read framebuffer operations.
-   * If null is passed, the default write drawable will be set.
+   * @param read the read-drawable for read framebuffer operations.
+   *             If null is passed, the default write drawable will be set.
+   * @return the replaced read-drawable
    *
-   * @throws GLException in case a read drawable is not supported
-   *         and the given drawable is not null and not equal to the internal write drawable.
+   * @throws GLException in case a read drawable is not supported or
+   *                     this context is made current on another thread.
    *
    * @see #isGLReadDrawableAvailable()
    * @see #getGLReadDrawable()
    */
-  public abstract void setGLReadDrawable(GLDrawable read);
+  public abstract GLDrawable setGLReadDrawable(GLDrawable read);
 
   /**
-   * Returns the read GLDrawable this context uses for read framebuffer operations.
+   * Returns the read-Drawable this context uses for read framebuffer operations.
+   * <p>
+   * If the read-drawable has not been changed manually via {@link #setGLReadDrawable(GLDrawable)},
+   * it equals to the write-drawable (default).
+   * </p> 
    * @see #isGLReadDrawableAvailable()
    * @see #setGLReadDrawable(javax.media.opengl.GLDrawable)
+   * @see #getGLDrawable()
    */
   public abstract GLDrawable getGLReadDrawable();
 
@@ -188,15 +264,13 @@ public abstract class GLContext {
    * the underlying drawable has not ben realized on the display) ,
    * a value of CONTEXT_NOT_CURRENT is returned.
    * </p>
-   * <p> 
-   * If the context is in use by another thread at the time of the
-   * call, then if isSynchronized() is true the call will
-   * block. If isSynchronized() is false, an exception will be
-   * thrown and the context will remain current on the other thread.
+   * <p>
+   * This method is blocking, i.e. waits until another thread has
+   * released the context.
    * </p>
    * <p>
    * The drawable's surface is being locked at entry
-   * and unlocked at {@link #release()} 
+   * and unlocked at {@link #release()}
    * </p>
    *
    * @return CONTEXT_CURRENT if the context was successfully made current
@@ -216,7 +290,7 @@ public abstract class GLContext {
    * Releases control of this GLContext from the current thread.
    * <p>
    * The drawable's surface is being unlocked at exit,
-   * assumed to be locked by {@link #makeCurrent()}. 
+   * assumed to be locked by {@link #makeCurrent()}.
    * </p>
    *
    * @throws GLException if the context had not previously been made
@@ -284,18 +358,18 @@ public abstract class GLContext {
    * @return true if this GLContext is current on this thread
    */
   public final boolean isCurrent() {
-    return getCurrent() == this ; 
+    return getCurrent() == this ;
   }
 
   /**
    * @throws GLException if this GLContext is not current on this thread
    */
-  public final void validateCurrent() throws GLException {  
+  public final void validateCurrent() throws GLException {
     if(getCurrent() != this) {
         throw new GLException(getThreadName()+": This context is not current. Current context: "+getCurrent()+", this context "+this);
     }
   }
-  
+
   /**
    * Sets the thread-local variable returned by {@link #getCurrent}
    * and has no other side-effects. For use by third parties adding
@@ -303,18 +377,22 @@ public abstract class GLContext {
    */
   protected static void setCurrent(GLContext cur) {
     if(TRACE_SWITCH) {
-       System.err.println(getThreadName()+": GLContext.ContextSwitch: - setCurrent() - "+cur);
+       if(null == cur) {
+           System.err.println(getThreadName()+": GLContext.ContextSwitch: - setCurrent() - NULL");
+       } else {
+           System.err.println(getThreadName()+": GLContext.ContextSwitch: - setCurrent() - obj " + toHexString(cur.hashCode()) + ", ctx " + toHexString(cur.getHandle()));
+       }
     }
     currentContext.set(cur);
   }
-  
+
   /**
    * Destroys this OpenGL context and frees its associated
    * resources.
    * <p>
    * The context may be current w/o recursion when calling <code>destroy()</code>,
    * in which case this method destroys the context and releases the lock.
-   * </p> 
+   * </p>
    */
   public abstract void destroy();
 
@@ -337,8 +415,8 @@ public abstract class GLContext {
    */
   public final long getHandle() { return contextHandle; }
 
-  /** 
-   * Indicates whether the underlying OpenGL context has been created. 
+  /**
+   * Indicates whether the underlying OpenGL context has been created.
    */
   public final boolean isCreated() {
     return 0 != contextHandle;
@@ -369,7 +447,7 @@ public abstract class GLContext {
   public final Object detachObject(int name) {
       return attachedObjectsByInt.remove(name);
   }
-  
+
   /**
    * Sets the attached user object for the given name to this GLContext.
    * Returns the previously set object or null.
@@ -381,10 +459,11 @@ public abstract class GLContext {
   public final Object detachObject(String name) {
       return attachedObjectsByString.remove(name);
   }
-  
+
   /**
    * Classname, GL, GLDrawable
    */
+  @Override
   public String toString() {
     StringBuilder sb = new StringBuilder();
     sb.append(getClass().getSimpleName());
@@ -403,6 +482,8 @@ public abstract class GLContext {
     sb.append(Integer.toHexString(ctxOptions));
     sb.append(", ");
     sb.append(getGLVersion());
+    sb.append(", this ");
+    sb.append(toHexString(hashCode()));
     sb.append(", handle ");
     sb.append(toHexString(contextHandle));
     sb.append(", ");
@@ -433,7 +514,7 @@ public abstract class GLContext {
    * javax.media.opengl.GL#glPolygonOffset(float,float)} is available).
    */
   public abstract boolean isFunctionAvailable(String glFunctionName);
-  
+
   /**
    * Returns true if the specified OpenGL extension can be
    * successfully called using this GL context given the current host (OpenGL
@@ -445,10 +526,10 @@ public abstract class GLContext {
    * "GL_VERTEX_PROGRAM_ARB").
    */
   public abstract boolean isExtensionAvailable(String glExtensionName);
-  
+
   /** Returns the number of platform extensions */
   public abstract int getPlatformExtensionCount();
-  
+
   /** Returns a non-null (but possibly empty) string containing the
       space-separated list of available platform-dependent (e.g., WGL,
       GLX) extensions. Can only be called while this context is
@@ -457,7 +538,7 @@ public abstract class GLContext {
 
   /** Returns the number of OpenGL extensions */
   public abstract int getGLExtensionCount();
-  
+
   /** Returns a non-null (but possibly empty) string containing the
       space-separated list of available extensions.
       Can only be called while this context is current.
@@ -479,8 +560,8 @@ public abstract class GLContext {
    * @see GLAutoDrawable#setContextCreationFlags(int)
    */
   public abstract void setContextCreationFlags(int flags);
-    
-  /** 
+
+  /**
    * Returns a valid OpenGL version string, ie<br>
    * <pre>
    *     major.minor ([option]?[options,]*) - gl-version
@@ -509,7 +590,7 @@ public abstract class GLContext {
    * <td>row 2, cell 1</td>
    * <td>row 2, cell 2</td>
    * </tr>
-   * </table> 
+   * </table>
    *
    * <table border="0">
    *     <tr><td></td>   <td>ES2</td>  <td><code>2.0 (ES profile, ES2 compatible, hardware) - 2.0 ES Profile</code></td></tr>
@@ -520,7 +601,7 @@ public abstract class GLContext {
    *     <tr><td>NV</td><td>GL3</td>   <td><code>3.3 (Core profile, arb, hardware) - 3.3.0 NVIDIA 195.36.07.03</code></td></tr>
    *     <tr><td>NV</td><td>GL3bc</td> <td><code>3.3 (Compatibility profile, arb, hardware) - 3.3.0 NVIDIA 195.36.07.03</code></td></tr>
    *     <tr><td>NV</td><td>GL2</td>   <td><code>3.0 (Compatibility profile, arb, ES2 compatible, hardware) - 3.0.0 NVIDIA 290.10</code></td></tr>
-   * </table> 
+   * </table>
    */
   public final String getGLVersion() {
     return ctxVersionString;
@@ -533,88 +614,128 @@ public abstract class GLContext {
   public final boolean isGLForwardCompatible()    { return ( 0 != ( CTX_OPTION_FORWARD & ctxOptions ) ); }
   public final boolean isGLDebugEnabled()         { return ( 0 != ( CTX_OPTION_DEBUG   & ctxOptions ) ); }
   public final boolean isCreatedWithARBMethod()   { return ( 0 != ( CTX_IS_ARB_CREATED & ctxOptions ) ); }
-  
+
   /**
-   * @return true if this context is an ES2 context or implements 
-   *         the extension <code>GL_ARB_ES2_compatibility</code>, otherwise false 
+   * @return true if this context is an ES2 context or implements
+   *         the extension <code>GL_ARB_ES2_compatibility</code>, otherwise false
    */
   public final boolean isGLES2Compatible() {
       return 0 != ( ctxOptions & CTX_IMPL_ES2_COMPAT ) ;
   }
+
+  /** 
+   * @return true if impl. is a hardware rasterizer, otherwise false.
+   * @see GLProfile#isHardwareRasterizer() 
+   */
+  public final boolean isHardwareRasterizer() {
+      return 0 == ( ctxOptions & CTX_IMPL_ACCEL_SOFT ) ;
+  }
   
+  /** 
+   * Returns <code>true</code> if basic FBO support is available, otherwise <code>false</code>.
+   * <p>
+   * Basic FBO is supported if the context is either GL-ES >= 2.0, GL >= core 3.0 or implements the extensions
+   * <code>GL_ARB_ES2_compatibility</code>, <code>GL_ARB_framebuffer_object</code>, <code>GL_EXT_framebuffer_object</code> or <code>GL_OES_framebuffer_object</code>.
+   * </p>
+   * <p>
+   * Basic FBO support may only include one color attachment and no multisampling,
+   * as well as limited internal formats for renderbuffer.
+   * </p>
+   * @see #CTX_IMPL_FBO
+   * @see com.jogamp.opengl.FBObject#supportsBasicFBO(GL)
+   * @see com.jogamp.opengl.FBObject#supportsFullFBO(GL)
+   */
+  public final boolean hasFBO() {
+      return 0 != ( ctxOptions & CTX_IMPL_FBO ) ;
+  }
+
+  /**
+   * @return true if context supports GLSL
+   * @see GLProfile#hasGLSL() 
+   */
   public final boolean hasGLSL() {
       return isGL2ES2() ;
   }
-  
+
   /** Note: The GL impl. may return a const value, ie {@link GLES2#isNPOTTextureAvailable()} always returns <code>true</code>. */
   public boolean isNPOTTextureAvailable() {
-      return isGL3() || isGLES2Compatible() || isExtensionAvailable(GL_ARB_texture_non_power_of_two);
+      return isGL3() || isGLES2Compatible() || isExtensionAvailable(GLExtensions.ARB_texture_non_power_of_two);
   }
-  private static final String GL_ARB_texture_non_power_of_two = "GL_ARB_texture_non_power_of_two";
-  
+
   public boolean isTextureFormatBGRA8888Available() {
-      return isGL2GL3() || 
-             isExtensionAvailable("GL_EXT_texture_format_BGRA8888") || 
-             isExtensionAvailable("GL_IMG_texture_format_BGRA8888") ;
+      return isGL2GL3() ||
+             isExtensionAvailable(GLExtensions.EXT_texture_format_BGRA8888) ||
+             isExtensionAvailable(GLExtensions.IMG_texture_format_BGRA8888) ;
   }
 
+  /** @see GLProfile#isGL4bc() */
   public final boolean isGL4bc() {
       return ctxMajorVersion>=4 && 0 != (ctxOptions & CTX_IS_ARB_CREATED)
                                 && 0 != (ctxOptions & CTX_PROFILE_COMPAT);
   }
 
+  /** @see GLProfile#isGL4() */
   public final boolean isGL4() {
       return ctxMajorVersion>=4 && 0 != (ctxOptions & CTX_IS_ARB_CREATED)
                                 && 0 != (ctxOptions & (CTX_PROFILE_COMPAT|CTX_PROFILE_CORE));
   }
 
+  /** @see GLProfile#isGL3bc() */
   public final boolean isGL3bc() {
       return ( ctxMajorVersion>3 || ctxMajorVersion==3 && ctxMinorVersion>=1 )
              && 0 != (ctxOptions & CTX_IS_ARB_CREATED)
              && 0 != (ctxOptions & CTX_PROFILE_COMPAT);
   }
 
+  /** @see GLProfile#isGL3() */
   public final boolean isGL3() {
       return ( ctxMajorVersion>3 || ctxMajorVersion==3 && ctxMinorVersion>=1 )
              && 0 != (ctxOptions & CTX_IS_ARB_CREATED)
              && 0 != (ctxOptions & (CTX_PROFILE_COMPAT|CTX_PROFILE_CORE));
   }
-
+  
+  /** @see GLProfile#isGL2() */
   public final boolean isGL2() {
       return ctxMajorVersion>=1 && 0!=(ctxOptions & CTX_PROFILE_COMPAT);
   }
 
+  /** @see GLProfile#isGL2GL3() */  
   public final boolean isGL2GL3() {
       return isGL2() || isGL3();
   }
 
+  /** @see GLProfile#isGLES1() */
   public final boolean isGLES1() {
       return ctxMajorVersion==1 && 0 != ( ctxOptions & CTX_PROFILE_ES ) ;
   }
 
+  /** @see GLProfile#isGLES2() */
   public final boolean isGLES2() {
       return ctxMajorVersion==2 && 0 != ( ctxOptions & CTX_PROFILE_ES ) ;
   }
 
+  /** @see GLProfile#isGLES() */
   public final boolean isGLES() {
       return 0 != ( CTX_PROFILE_ES & ctxOptions ) ;
   }
 
+  /** @see GLProfile#isGL2ES1() */
   public final boolean isGL2ES1() {
       return isGL2() || isGLES1() ;
   }
 
+  /** @see GLProfile#isGL2ES2() */
   public final boolean isGL2ES2() {
       return isGL2GL3() || isGLES2() ;
   }
 
   /**
    * Set the swap interval if the current context.
-   * @param interval Should be ≥ 0. 0 Disables the vertical synchronisation, 
+   * @param interval Should be ≥ 0. 0 Disables the vertical synchronisation,
    *                 where ≥ 1 is the number of vertical refreshes before a swap buffer occurs.
    *                 A value < 0 is ignored.
-   * @return true if the operation was successful, otherwise false 
-   *  
+   * @return true if the operation was successful, otherwise false
+   *
    * @throws GLException if the context is not current.
    */
   public final boolean setSwapInterval(int interval) throws GLException {
@@ -627,16 +748,16 @@ public abstract class GLContext {
     }
     return false;
   }
-  protected boolean setSwapIntervalImpl(int interval) { 
-      return false; 
-  }    
-  /** Return the current swap interval. 
+  protected boolean setSwapIntervalImpl(int interval) {
+      return false;
+  }
+  /** Return the current swap interval.
    * <p>
    * If the context has not been made current at all,
    * the default value <code>-1</code> is returned.
    * </p>
    * <p>
-   * The default value for a valid context is <code>1</code> for 
+   * The default value for a valid context is <code>1</code> for
    * an EGL based profile (ES1 or ES2) and <code>-1</code> (undefined)
    * for desktop.
    * </p>
@@ -652,9 +773,9 @@ public abstract class GLContext {
         currentSwapInterval = 1;
     } else {
         currentSwapInterval = -1;
-    }      
+    }
   }
-  
+
   public final boolean queryMaxSwapGroups(int[] maxGroups, int maxGroups_offset,
                                           int[] maxBarriers, int maxBarriers_offset) {
     validateCurrent();
@@ -667,21 +788,46 @@ public abstract class GLContext {
     return joinSwapGroupImpl(group);
   }
   protected boolean joinSwapGroupImpl(int group) { /** nop per default .. **/  return false; }
-  protected int currentSwapGroup = -1; // default: not set yet ..  
+  protected int currentSwapGroup = -1; // default: not set yet ..
   public int getSwapGroup() {
       return currentSwapGroup;
   }
   public final boolean bindSwapBarrier(int group, int barrier) {
     validateCurrent();
-    return bindSwapBarrierImpl(group, barrier);    
+    return bindSwapBarrierImpl(group, barrier);
   }
   protected boolean bindSwapBarrierImpl(int group, int barrier) { /** nop per default .. **/  return false; }
 
+  /** 
+   * Return the framebuffer name bound to this context, 
+   * see {@link GL#glBindFramebuffer(int, int)}.
+   */
+  public abstract int getBoundFramebuffer(int target);
+  
+  /** 
+   * Return the default draw framebuffer name.
+   * <p> 
+   * May differ from it's default <code>zero</code>
+   * in case an framebuffer object ({@link FBObject}) based drawable
+   * is being used.
+   * </p> 
+   */
+  public abstract int getDefaultDrawFramebuffer();
+  
+  /** 
+   * Return the default read framebuffer name.
+   * <p> 
+   * May differ from it's default <code>zero</code>
+   * in case an framebuffer object ({@link FBObject}) based drawable
+   * is being used.
+   * </p> 
+   */
+  public abstract int getDefaultReadFramebuffer();
   
   /**
-   * @return The extension implementing the GLDebugOutput feature, 
-   *         either <i>GL_ARB_debug_output</i> or <i>GL_AMD_debug_output</i>. 
-   *         If unavailable or called before initialized via {@link #makeCurrent()}, <i>null</i> is returned. 
+   * @return The extension implementing the GLDebugOutput feature,
+   *         either <i>GL_ARB_debug_output</i> or <i>GL_AMD_debug_output</i>.
+   *         If unavailable or called before initialized via {@link #makeCurrent()}, <i>null</i> is returned.
    */
   public abstract String getGLDebugMessageExtension();
 
@@ -690,84 +836,84 @@ public abstract class GLContext {
    * @see #setSynchronous(boolean)
    */
   public abstract boolean isGLDebugSynchronous();
-    
+
   /**
    * Enables or disables the synchronous debug behavior via
-   * {@link GL2GL3#GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB glEnable/glDisable(GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB)}, 
+   * {@link GL2GL3#GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB glEnable/glDisable(GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB)},
    * if extension is {@link #GL_ARB_debug_output}.
    * There is no equivalent for {@link #GL_AMD_debug_output}.
-   * <p> The default is <code>true</code>, ie {@link GL2GL3#GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB}.</p> 
+   * <p> The default is <code>true</code>, ie {@link GL2GL3#GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB}.</p>
    */
   public abstract void setGLDebugSynchronous(boolean synchronous);
-  
+
   /**
    * @return true if the GLDebugOutput feature is enabled or not.
    */
   public abstract boolean isGLDebugMessageEnabled();
-  
+
   /**
-   * Enables or disables the GLDebugOutput feature of extension <i>GL_ARB_debug_output</i> 
+   * Enables or disables the GLDebugOutput feature of extension <i>GL_ARB_debug_output</i>
    * or <i>GL_AMD_debug_output</i>, if available.
-   * 
+   *
    * <p>To enable the GLDebugOutput feature {@link #enableGLDebugMessage(boolean) enableGLDebugMessage(true)}
    * or {@link #setContextCreationFlags(int) setContextCreationFlags}({@link GLContext#CTX_OPTION_DEBUG})
    * shall be called <b>before</b> context creation via {@link #makeCurrent()}!</p>
-   * 
-   * <p>In case {@link GLAutoDrawable} are being used, 
+   *
+   * <p>In case {@link GLAutoDrawable} are being used,
    * {@link GLAutoDrawable#setContextCreationFlags(int) glAutoDrawable.setContextCreationFlags}({@link GLContext#CTX_OPTION_DEBUG})
    * shall be issued before context creation via {@link #makeCurrent()}!</p>
-   * 
+   *
    * <p>After context creation, the GLDebugOutput feature may be enabled or disabled at any time using this method.</p>
-   * 
+   *
    * @param enable If true enables, otherwise disables the GLDebugOutput feature.
-   * 
+   *
    * @throws GLException if this context is not current or GLDebugOutput registration failed (enable)
-   * 
+   *
    * @see #setContextCreationFlags(int)
    * @see #addGLDebugListener(GLDebugListener)
    * @see GLAutoDrawable#setContextCreationFlags(int)
    */
   public abstract void enableGLDebugMessage(boolean enable) throws GLException;
-  
+
   /**
    * Add {@link GLDebugListener}.<br>
-   * 
+   *
    * @param listener {@link GLDebugListener} handling {@GLDebugMessage}s
-   * @see #enableGLDebugMessage(boolean) 
+   * @see #enableGLDebugMessage(boolean)
    * @see #removeGLDebugListener(GLDebugListener)
    */
   public abstract void addGLDebugListener(GLDebugListener listener);
-  
+
   /**
    * Remove {@link GLDebugListener}.<br>
-   * 
+   *
    * @param listener {@link GLDebugListener} handling {@GLDebugMessage}s
-   * @see #enableGLDebugMessage(boolean) 
+   * @see #enableGLDebugMessage(boolean)
    * @see #addGLDebugListener(GLDebugListener)
    */
   public abstract void removeGLDebugListener(GLDebugListener listener);
-  
+
   /**
-   * Generic entry for {@link GL2GL3#glDebugMessageControlARB(int, int, int, int, IntBuffer, boolean)} 
+   * Generic entry for {@link GL2GL3#glDebugMessageControlARB(int, int, int, int, IntBuffer, boolean)}
    * and {@link GL2GL3#glDebugMessageEnableAMD(int, int, int, IntBuffer, boolean)} of the GLDebugOutput feature.
-   * @see #enableGLDebugMessage(boolean) 
+   * @see #enableGLDebugMessage(boolean)
    */
   public abstract void glDebugMessageControl(int source, int type, int severity, int count, IntBuffer ids, boolean enabled);
-  
+
   /**
-   * Generic entry for {@link GL2GL3#glDebugMessageControlARB(int, int, int, int, int[], int, boolean)} 
-   * and {@link GL2GL3#glDebugMessageEnableAMD(int, int, int, int[], int, boolean)} of the GLDebugOutput feature. 
-   * @see #enableGLDebugMessage(boolean) 
+   * Generic entry for {@link GL2GL3#glDebugMessageControlARB(int, int, int, int, int[], int, boolean)}
+   * and {@link GL2GL3#glDebugMessageEnableAMD(int, int, int, int[], int, boolean)} of the GLDebugOutput feature.
+   * @see #enableGLDebugMessage(boolean)
    */
   public abstract void glDebugMessageControl(int source, int type, int severity, int count, int[] ids, int ids_offset, boolean enabled);
-  
+
   /**
-   * Generic entry for {@link GL2GL3#glDebugMessageInsertARB(int, int, int, int, int, String)} 
+   * Generic entry for {@link GL2GL3#glDebugMessageInsertARB(int, int, int, int, int, String)}
    * and {@link GL2GL3#glDebugMessageInsertAMD(int, int, int, int, String)} of the GLDebugOutput feature.
-   * @see #enableGLDebugMessage(boolean) 
+   * @see #enableGLDebugMessage(boolean)
    */
   public abstract void glDebugMessageInsert(int source, int type, int id, int severity, String buf);
-  
+
   public static final int GL_VERSIONS[][] = {
       /* 0.*/ { -1 },
       /* 1.*/ { 0, 1, 2, 3, 4, 5 },
@@ -832,7 +978,7 @@ public abstract class GLContext {
   //
 
   /**
-   * @see #getDeviceVersionAvailableKey(javax.media.nativewindow.AbstractGraphicsDevice, int, int) 
+   * @see #getDeviceVersionAvailableKey(javax.media.nativewindow.AbstractGraphicsDevice, int, int)
    */
   protected static /*final*/ HashMap<String, Integer> deviceVersionAvailable = new HashMap<String, Integer>();
 
@@ -841,8 +987,11 @@ public abstract class GLContext {
    */
   private static /*final*/ HashSet<String> deviceVersionsAvailableSet = new HashSet<String>();
 
-  protected static String getDeviceVersionAvailableKey(AbstractGraphicsDevice device, int major, int profile) {
-      return device.getUniqueID() + "-" + toHexString(composeBits(major, profile, 0));
+  /** clears the device/context mappings as well as the GL/GLX proc address tables. */
+  protected static void shutdown() {
+      deviceVersionAvailable.clear();
+      deviceVersionsAvailableSet.clear();
+      GLContextImpl.shutdownImpl(); // well ..
   }
 
   protected static boolean getAvailableGLVersionsSet(AbstractGraphicsDevice device) {
@@ -860,15 +1009,13 @@ public abstract class GLContext {
           deviceVersionsAvailableSet.add(devKey);
           if (DEBUG) {
             System.err.println(getThreadName() + ": createContextARB: SET mappedVersionsAvailableSet "+devKey);
+            System.err.println(GLContext.dumpAvailableGLVersions(null).toString());            
           }
       }
   }
-  
-  /** clears the device/context mappings as well as the GL/GLX proc address tables. */
-  protected static void shutdown() {
-      deviceVersionAvailable.clear();
-      deviceVersionsAvailableSet.clear();      
-      GLContextImpl.shutdownImpl(); // well ..
+
+  protected static String getDeviceVersionAvailableKey(AbstractGraphicsDevice device, int major, int profile) {
+      return device.getUniqueID() + "-" + toHexString(composeBits(major, profile, 0));
   }
 
   /**
@@ -889,12 +1036,44 @@ public abstract class GLContext {
     validateProfileBits(profile, "profile");
     validateProfileBits(resCtp, "resCtp");
 
-    String key = getDeviceVersionAvailableKey(device, reqMajor, profile);
-    Integer val = new Integer(composeBits(resMajor, resMinor, resCtp));
+    if(DEBUG) {
+        System.err.println("GLContext.mapAvailableGLVersion: "+device+": "+getGLVersion(reqMajor, 0, profile, null)+" -> "+getGLVersion(resMajor, resMinor, resCtp, null));
+        // Thread.dumpStack();
+    }
+    final String key = getDeviceVersionAvailableKey(device, reqMajor, profile);
+    final Integer val = new Integer(composeBits(resMajor, resMinor, resCtp));
     synchronized(deviceVersionAvailable) {
-        val = deviceVersionAvailable.put( key, val );
+        return deviceVersionAvailable.put( key, val );
     }
-    return val;
+  }
+
+  protected static StringBuffer dumpAvailableGLVersions(StringBuffer sb) {
+    if(null == sb) {
+        sb = new StringBuffer();
+    }
+    synchronized(deviceVersionAvailable) {
+        final Set<String> keys = deviceVersionAvailable.keySet();
+        boolean needsSeparator = false;
+        for(Iterator<String> i = keys.iterator(); i.hasNext(); ) {
+            if(needsSeparator) {
+                sb.append(Platform.getNewline());
+            }
+            final String key = i.next();
+            sb.append(key).append(": ");
+            final Integer valI = deviceVersionAvailable.get(key);
+            if(null != valI) {
+                final int bits32 = valI.intValue();
+                final int major = ( bits32 & 0xFF000000 ) >> 24 ;
+                final int minor = ( bits32 & 0x00FF0000 ) >> 16 ;
+                final int ctp   = ( bits32 & 0x0000FFFF )       ;
+                sb.append(GLContext.getGLVersion(major, minor, ctp, null));
+            } else {
+                sb.append("n/a");
+            }
+            needsSeparator = true;
+        }
+    }
+    return sb;
   }
 
   /**
@@ -911,7 +1090,7 @@ public abstract class GLContext {
     }
     return val;
   }
-
+  
   /**
    * @param reqMajor Key Value either 1, 2, 3 or 4
    * @param reqProfile Key Value either {@link #CTX_PROFILE_COMPAT}, {@link #CTX_PROFILE_CORE} or {@link #CTX_PROFILE_ES}
@@ -919,15 +1098,15 @@ public abstract class GLContext {
    * @param minor if not null, returns the used minor version
    * @param ctp if not null, returns the used context profile
    */
-  protected static boolean getAvailableGLVersion(AbstractGraphicsDevice device, int reqMajor, int reqProfile, 
+  protected static boolean getAvailableGLVersion(AbstractGraphicsDevice device, int reqMajor, int reqProfile,
                                                  int[] major, int minor[], int ctp[]) {
 
-    Integer valI = getAvailableGLVersion(device, reqMajor, reqProfile);
+    final Integer valI = getAvailableGLVersion(device, reqMajor, reqProfile);
     if(null==valI) {
         return false;
     }
 
-    int bits32 = valI.intValue();
+    final int bits32 = valI.intValue();
 
     if(null!=major) {
         major[0] = ( bits32 & 0xFF000000 ) >> 24 ;
@@ -940,52 +1119,123 @@ public abstract class GLContext {
     }
     return true;
   }
-  
-  /** 
+
+  /**
    * returns the highest GLProfile string regarding the implementation version and context profile bits.
    * @throws GLException if version and context profile bits could not be mapped to a GLProfile
    */
-  protected static String getGLProfile(int major, int minor, int ctp) 
+  protected static String getGLProfile(int major, int minor, int ctp)
           throws GLException {
-    if(0 != ( CTX_PROFILE_COMPAT & ctp )) {        
+    if(0 != ( CTX_PROFILE_COMPAT & ctp )) {
         if(major >= 4)                            { return GLProfile.GL4bc; }
         else if(major == 3 && minor >= 1)         { return GLProfile.GL3bc; }
-        else                                      { return GLProfile.GL2; }        
+        else                                      { return GLProfile.GL2; }
     } else if(0 != ( CTX_PROFILE_CORE & ctp )) {
         if(major >= 4)                            { return GLProfile.GL4; }
-        else if(major == 3 && minor >= 1)         { return GLProfile.GL3; }        
+        else if(major == 3 && minor >= 1)         { return GLProfile.GL3; }
     } else if(0 != ( CTX_PROFILE_ES & ctp )) {
         if(major == 2)                            { return GLProfile.GLES2; }
-        else if(major == 1)                       { return GLProfile.GLES1; }                
+        else if(major == 1)                       { return GLProfile.GLES1; }
     }
     throw new GLException("Unhandled OpenGL version/profile: "+GLContext.getGLVersion(major, minor, ctp, null));
   }
+
+  /**
+   * Returns the GLProfile's major version number and it's context property (CTP) for availability mapping request.
+   */
+  protected static final void getRequestMajorAndCompat(final GLProfile glp, int[/*2*/] reqMajorCTP) {
+    final GLProfile glpImpl = glp.getImpl();
+    if(glpImpl.isGL4()) {
+        reqMajorCTP[0]=4;
+    } else if (glpImpl.isGL3()) {
+        reqMajorCTP[0]=3;
+    } else /* if (glpImpl.isGL2()) */ {
+        reqMajorCTP[0]=2;
+    }
+    if( glpImpl.isGLES() ) {
+        reqMajorCTP[1]=CTX_PROFILE_ES;
+    } else if( glpImpl.isGL2() ) { // incl GL3bc and GL4bc
+        reqMajorCTP[1]=CTX_PROFILE_COMPAT;
+    } else {
+        reqMajorCTP[1]=CTX_PROFILE_CORE;
+    }
+  }
   
-  /** 
+  /**
+   * @param device the device the context profile is being requested for
+   * @param GLProfile the GLProfile the context profile is being requested for
+   * @return the GLProfile's context property (CTP) if available, otherwise <code>0</code>
+   */
+  protected static final int getAvailableContextProperties(final AbstractGraphicsDevice device, final GLProfile glp) {
+    final int[] reqMajorCTP = new int[] { 0, 0 };
+    getRequestMajorAndCompat(glp, reqMajorCTP);
+    
+    int _major[] = { 0 };
+    int _minor[] = { 0 };
+    int _ctp[] = { 0 };
+    if( GLContext.getAvailableGLVersion(device, reqMajorCTP[0], reqMajorCTP[1], _major, _minor, _ctp)) {
+      return _ctp[0];
+    }
+    return 0; // n/a
+  }
+
+  /**
+   * @param device the device the profile is being requested
    * @param major Key Value either 1, 2, 3 or 4
    * @param profile Key Value either {@link #CTX_PROFILE_COMPAT}, {@link #CTX_PROFILE_CORE} or {@link #CTX_PROFILE_ES}
-   * @return the highest GLProfile string regarding the version and profile bits.
-   * @throws GLException if version and context profile bits could not be mapped to a GLProfile
-   */  
-  public static String getAvailableGLProfile(AbstractGraphicsDevice device, int reqMajor, int reqProfile) 
+   * @return the highest GLProfile regarding availability, version and profile bits.
+   */
+  protected static GLProfile getAvailableGLProfile(AbstractGraphicsDevice device, int reqMajor, int reqProfile)
           throws GLException {
     int major[] = { 0 };
     int minor[] = { 0 };
     int ctp[] = { 0 };
     if(GLContext.getAvailableGLVersion(device, reqMajor, reqProfile, major, minor, ctp)) {
-        return GLContext.getGLProfile(major[0], minor[0], ctp[0]);
+        return GLProfile.get(GLContext.getGLProfile(major[0], minor[0], ctp[0]));
     }
     return null;
   }
 
   /**
+   * @param device the device the profile is being requested
+   * @param major Key Value either 1, 2, 3 or 4
+   * @param profile Key Value either {@link #CTX_PROFILE_COMPAT}, {@link #CTX_PROFILE_CORE} or {@link #CTX_PROFILE_ES}
+   */
+  protected static String getAvailableGLVersionAsString(AbstractGraphicsDevice device, int major, int profile) {
+    int _major[] = { 0 };
+    int _minor[] = { 0 };
+    int _ctp[] = { 0 };
+    if(getAvailableGLVersion(device, major, profile, _major, _minor, _ctp)) {
+        return getGLVersion(_major[0], _minor[0], _ctp[0], null);
+    }
+    return null;
+  }
+
+  /**
+   * Returns true if it is possible to create an <i>framebuffer object</i> (FBO).
+   * <p>
+   * FBO feature is implemented in OpenGL, hence it is {@link GLProfile} dependent.
+   * </p> 
+   * <p>
+   * FBO support is queried as described in {@link #hasFBO()}.
+   * </p>
+   *
+   * @param device the device to request whether FBO is available for
+   * @param glp {@link GLProfile} to check for FBO capabilities
+   * @see GLContext#hasFBO()
+   */
+  public static final boolean isFBOAvailable(AbstractGraphicsDevice device, GLProfile glp) {
+      return 0 != ( CTX_IMPL_FBO & getAvailableContextProperties(device, glp) );
+  }
+  
+  /**
    * @param device the device to request whether the profile is available for
    * @param reqMajor Key Value either 1, 2, 3 or 4
    * @param reqProfile Key Value either {@link #CTX_PROFILE_COMPAT}, {@link #CTX_PROFILE_CORE} or {@link #CTX_PROFILE_ES}
    * @param isHardware return value of one boolean, whether the profile is a hardware rasterizer or not
    * @return true if the requested GL version is available regardless of a software or hardware rasterizer, otherwise false.
    */
-  public static boolean isGLVersionAvailable(AbstractGraphicsDevice device, int reqMajor, int reqProfile, boolean isHardware[]) {
+  protected static boolean isGLVersionAvailable(AbstractGraphicsDevice device, int reqMajor, int reqProfile, boolean isHardware[]) {
       Integer valI = getAvailableGLVersion(device, reqMajor, reqProfile);
       if(null==valI) {
           return false;
@@ -1022,21 +1272,7 @@ public abstract class GLContext {
     return isGLVersionAvailable(device, 2, CTX_PROFILE_COMPAT, isHardware);
   }
 
-  /**
-   * @param major Key Value either 1, 2, 3 or 4
-   * @param profile Key Value either {@link #CTX_PROFILE_COMPAT}, {@link #CTX_PROFILE_CORE} or {@link #CTX_PROFILE_ES}
-   */
-  public static String getAvailableGLVersionAsString(AbstractGraphicsDevice device, int major, int profile) {
-    int _major[] = { 0 };
-    int _minor[] = { 0 };
-    int _ctp[] = { 0 };
-    if(getAvailableGLVersion(device, major, profile, _major, _minor, _ctp)) {
-        return getGLVersion(_major[0], _minor[0], _ctp[0], null);
-    }
-    return null;
-  }
-
-  public static String getGLVersion(int major, int minor, int ctp, String gl_version) {
+  protected static String getGLVersion(int major, int minor, int ctp, String gl_version) {
     boolean needColon = false;
     StringBuilder sb = new StringBuilder();
     sb.append(major);
@@ -1046,10 +1282,11 @@ public abstract class GLContext {
     needColon = appendString(sb, "ES profile",            needColon, 0 != ( CTX_PROFILE_ES & ctp ));
     needColon = appendString(sb, "Compatibility profile", needColon, 0 != ( CTX_PROFILE_COMPAT & ctp ));
     needColon = appendString(sb, "Core profile",          needColon, 0 != ( CTX_PROFILE_CORE & ctp ));
-    needColon = appendString(sb, "forward",               needColon, 0 != ( CTX_OPTION_FORWARD & ctp )); 
+    needColon = appendString(sb, "forward",               needColon, 0 != ( CTX_OPTION_FORWARD & ctp ));
     needColon = appendString(sb, "arb",                   needColon, 0 != ( CTX_IS_ARB_CREATED & ctp ));
-    needColon = appendString(sb, "debug",                 needColon, 0 != ( CTX_OPTION_DEBUG & ctp ));    
+    needColon = appendString(sb, "debug",                 needColon, 0 != ( CTX_OPTION_DEBUG & ctp ));
     needColon = appendString(sb, "ES2 compatible",        needColon, 0 != ( CTX_IMPL_ES2_COMPAT & ctp ));
+    needColon = appendString(sb, "FBO",                   needColon, 0 != ( CTX_IMPL_FBO & ctp ));
     if( 0 != ( CTX_IMPL_ACCEL_SOFT & ctp ) ) {
         needColon = appendString(sb, "software",          needColon, true);
     } else {
@@ -1064,9 +1301,9 @@ public abstract class GLContext {
   }
 
   //
-  // internal string utils 
+  // internal string utils
   //
-  
+
   protected static String toHexString(int hex) {
     return "0x" + Integer.toHexString(hex);
   }
@@ -1085,7 +1322,7 @@ public abstract class GLContext {
     }
     return needColon;
   }
-  
+
   protected static String getThreadName() {
     return Thread.currentThread().getName();
   }
diff --git a/src/jogl/classes/javax/media/opengl/GLDrawable.java b/src/jogl/classes/javax/media/opengl/GLDrawable.java
index 2b86a04..10eea2e 100644
--- a/src/jogl/classes/javax/media/opengl/GLDrawable.java
+++ b/src/jogl/classes/javax/media/opengl/GLDrawable.java
@@ -1,22 +1,22 @@
 /*
  * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
  * Copyright (c) 2010 JogAmp Community. All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- * 
+ *
  * - Redistribution of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
- * 
+ *
  * - Redistribution in binary form must reproduce the above copyright
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the distribution.
- * 
+ *
  * Neither the name of Sun Microsystems, Inc. or the names of
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * This software is provided "AS IS," without a warranty of any kind. ALL
  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -29,11 +29,11 @@
  * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
  * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
  * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
+ *
  * You acknowledge that this software is not designed or intended for use
  * in the design, construction, operation or maintenance of any nuclear
  * facility.
- * 
+ *
  * Sun gratefully acknowledges that this software was originally authored
  * and developed by Kenneth Bradley Russell and Christopher John Kline.
  */
@@ -104,11 +104,11 @@ public interface GLDrawable {
    *
    * <P>
    *
-   * With an argument of <code>true</code>, 
-   * the minimum implementation shall call 
+   * With an argument of <code>true</code>,
+   * the minimum implementation shall call
    * {@link NativeSurface#lockSurface() NativeSurface's lockSurface()} and if successfull:
    * <ul>
-   *    <li> Update the {@link GLCapabilities}, which are associated with 
+   *    <li> Update the {@link GLCapabilities}, which are associated with
    *         the attached {@link NativeSurface}'s {@link AbstractGraphicsConfiguration}.</li>
    *    <li> Release the lock with {@link NativeSurface#unlockSurface() NativeSurface's unlockSurface()}.</li>
    * </ul><br>
@@ -146,7 +146,7 @@ public interface GLDrawable {
       On some platforms, the pixel format is not directly associated
       with the drawable; a best attempt is made to return a reasonable
       value in this case. <br>
-      This object shall be directly associated to the attached {@link NativeSurface}'s 
+      This object shall be directly associated to the attached {@link NativeSurface}'s
       {@link AbstractGraphicsConfiguration}, and if changes are necessary,
       they should reflect those as well.
       @return A copy of the queried object.
@@ -159,14 +159,14 @@ public interface GLDrawable {
   public GLProfile getGLProfile();
 
   /**
-   * Returns the underlying native surface which surface handle 
+   * Returns the underlying native surface which surface handle
    * represents this OpenGL drawable's native resource.
-   * 
+   *
    * @see #getHandle()
    */
   public NativeSurface getNativeSurface();
 
-  /** 
+  /**
    * This is the GL/Windowing drawable handle.<br>
    * It is usually the {@link javax.media.nativewindow.NativeSurface#getSurfaceHandle()},
    * ie the native surface handle of the underlying windowing toolkit.<br>
@@ -175,7 +175,9 @@ public interface GLDrawable {
    */
   public long getHandle();
 
+  /** Return the {@link GLDrawableFactory} being used to create this instance. */
   public GLDrawableFactory getFactory();
 
+  @Override
   public String toString();
 }
diff --git a/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java b/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java
index 1093685..9a0d2cb 100644
--- a/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java
+++ b/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java
@@ -50,9 +50,11 @@ import com.jogamp.common.JogampRuntimeException;
 import com.jogamp.common.util.ReflectionUtil;
 
 import javax.media.nativewindow.AbstractGraphicsDevice;
+import javax.media.nativewindow.AbstractGraphicsScreen;
 import javax.media.nativewindow.NativeSurface;
 import javax.media.nativewindow.NativeWindowFactory;
 import javax.media.nativewindow.ProxySurface;
+import javax.media.nativewindow.ProxySurface.UpstreamSurfaceHook;
 import javax.media.opengl.GLProfile.ShutdownType;
 
 import jogamp.opengl.Debug;
@@ -398,9 +400,18 @@ public abstract class GLDrawableFactory {
   /**
    * Creates a Offscreen GLDrawable incl it's offscreen {@link javax.media.nativewindow.NativeSurface} with the given capabilites and dimensions.
    * <p>
-   * A Pbuffer drawable/surface is created if both {@link javax.media.opengl.GLCapabilities#isPBuffer() caps.isPBuffer()}
-   * and {@link #canCreateGLPbuffer(javax.media.nativewindow.AbstractGraphicsDevice) canCreateGLPbuffer(device)} is true.<br>
-   * Otherwise a simple pixmap/bitmap drawable/surface is created, which is unlikely to be hardware accelerated.<br>
+   * It's {@link AbstractGraphicsConfiguration} is properly set according to the given {@link GLCapabilitiesImmutable}, see below.
+   * </p>
+   * <p>
+   * A FBO drawable is created if both {@link javax.media.opengl.GLCapabilities#isFBO() caps.isFBO()}
+   * and {@link GLContext#isFBOAvailable(AbstractGraphicsDevice, GLProfile) canCreateFBO(device, caps.getGLProfile())} is true.
+   * </p>
+   * <p>
+   * A Pbuffer drawable is created if both {@link javax.media.opengl.GLCapabilities#isPBuffer() caps.isPBuffer()}
+   * and {@link #canCreateGLPbuffer(javax.media.nativewindow.AbstractGraphicsDevice) canCreateGLPbuffer(device)} is true.
+   * </p>
+   * <p>
+   * If neither FBO nor Pbuffer is available, a simple pixmap/bitmap drawable/surface is created, which is unlikely to be hardware accelerated.
    * </p>
    *
    * @param device which {@link javax.media.nativewindow.AbstractGraphicsDevice#getConnection() connection} denotes the shared device to be used, may be <code>null</code> for the platform's default device.
@@ -421,42 +432,32 @@ public abstract class GLDrawableFactory {
     throws GLException;
 
   /**
-   * Creates an offscreen NativeSurface.<br>
-   * A Pbuffer surface is created if both {@link javax.media.opengl.GLCapabilities#isPBuffer() caps.isPBuffer()}
-   * and {@link #canCreateGLPbuffer(javax.media.nativewindow.AbstractGraphicsDevice) canCreateGLPbuffer(device)} is true.<br>
-   * Otherwise a simple pixmap/bitmap surface is created. The latter is unlikely to be hardware accelerated.<br>
-   *
-   * @param device which {@link javax.media.nativewindow.AbstractGraphicsDevice#getConnection() connection} denotes the shared the target device, may be <code>null</code> for the platform's default device.
-   * @param caps the requested GLCapabilties
-   * @param chooser the custom chooser, may be null for default
-   * @param width the requested offscreen width
-   * @param height the requested offscreen height
-   * @return the created offscreen native surface
-   *
-   * @throws GLException if any window system-specific errors caused
-   *         the creation of the GLDrawable to fail.
-   */
-  public abstract NativeSurface createOffscreenSurface(AbstractGraphicsDevice device,
-                                                       GLCapabilitiesImmutable caps,
-                                                       GLCapabilitiesChooser chooser,
-                                                       int width, int height);
-
-  /**
-   * Highly experimental API entry, allowing developer of new windowing system bindings 
-   * to leverage the native window handle to produce a NativeSurface implementation (ProxySurface), having the required GLCapabilities.<br>
-   * Such surface can be used to instantiate a GLDrawable and hence test your new binding w/o the 
-   * costs of providing a full set of abstraction like the AWT GLCanvas or even the native NEWT bindings.
+   * Creates a proxy {@link NativeSurface} w/ defined surface handle, i.e. a {@link WrappedSurface} or {@link GDISurface} instance. 
+   * <p>
+   * It's {@link AbstractGraphicsConfiguration} is properly set according to the given 
+   * <code>windowHandle</code>'s native visualID if set or the given {@link GLCapabilitiesImmutable}.
+   * </p>
+   * <p>
+   * Lifecycle (destruction) of the given surface handle shall be handled by the caller.
+   * </p>
+   * <p>
+   * Such surface can be used to instantiate a GLDrawable. With the help of {@link GLAutoDrawableDelegate}
+   * you will be able to implement a new native windowing system  binding almost on-the-fly, see {@link com.jogamp.opengl.swt.GLCanvas}. 
+   * </p>
    * 
-   * @param device the platform's target device, shall not be <code>null</code>
+   * @param device which {@link javax.media.nativewindow.AbstractGraphicsDevice#getConnection() connection} denotes the shared the target device, may be <code>null</code> for the platform's default device.
+   *        Caller has to ensure it is compatible w/ the given <code>windowHandle</code> 
+   * @param screenIdx matching screen index of given <code>windowHandle</code>
    * @param windowHandle the native window handle
    * @param caps the requested GLCapabilties
    * @param chooser the custom chooser, may be null for default
-   * @return The proxy surface wrapping the windowHandle on the device
+   * @param upstream optional {@link ProxySurface.UpstreamSurfaceHook} allowing control of the {@link ProxySurface}'s lifecycle and data it presents.
+   * @return the created {@link ProxySurface} instance w/ defined surface handle.
    */
-  public abstract ProxySurface createProxySurface(AbstractGraphicsDevice device, 
+  public abstract ProxySurface createProxySurface(AbstractGraphicsDevice device,
+                                                  int screenIdx, 
                                                   long windowHandle, 
-                                                  GLCapabilitiesImmutable caps, 
-                                                  GLCapabilitiesChooser chooser);
+                                                  GLCapabilitiesImmutable caps, GLCapabilitiesChooser chooser, UpstreamSurfaceHook upstream);
 
   /**
    * Returns true if it is possible to create a GLPbuffer. Some older
@@ -492,6 +493,7 @@ public abstract class GLDrawableFactory {
                                             GLContext shareWith)
     throws GLException;
 
+  
   //----------------------------------------------------------------------
   // Methods for interacting with third-party OpenGL libraries
 
diff --git a/src/jogl/classes/javax/media/opengl/GLPbuffer.java b/src/jogl/classes/javax/media/opengl/GLPbuffer.java
index 0250365..273a992 100644
--- a/src/jogl/classes/javax/media/opengl/GLPbuffer.java
+++ b/src/jogl/classes/javax/media/opengl/GLPbuffer.java
@@ -1,21 +1,21 @@
 /*
  * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- * 
+ *
  * - Redistribution of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
- * 
+ *
  * - Redistribution in binary form must reproduce the above copyright
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the distribution.
- * 
+ *
  * Neither the name of Sun Microsystems, Inc. or the names of
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * This software is provided "AS IS," without a warranty of any kind. ALL
  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -28,11 +28,11 @@
  * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
  * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
  * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
+ *
  * You acknowledge that this software is not designed or intended for use
  * in the design, construction, operation or maintenance of any nuclear
  * facility.
- * 
+ *
  * Sun gratefully acknowledges that this software was originally authored
  * and developed by Kenneth Bradley Russell and Christopher John Kline.
  */
@@ -78,6 +78,7 @@ public interface GLPbuffer extends GLAutoDrawable {
       pbuffer, the application must destroy any additional OpenGL
       contexts which have been created for the pbuffer via {@link
       #createContext}. */
+  @Override
   public void destroy();
 
   /** Indicates which vendor's extension is being used to support
diff --git a/src/jogl/classes/javax/media/opengl/GLProfile.java b/src/jogl/classes/javax/media/opengl/GLProfile.java
index f85c6ba..1e10dc9 100644
--- a/src/jogl/classes/javax/media/opengl/GLProfile.java
+++ b/src/jogl/classes/javax/media/opengl/GLProfile.java
@@ -37,7 +37,9 @@
 
 package javax.media.opengl;
 
+import jogamp.nativewindow.NWJNILibLoader;
 import jogamp.opengl.Debug;
+import jogamp.opengl.GLContextImpl;
 import jogamp.opengl.GLDrawableFactoryImpl;
 import jogamp.opengl.DesktopGLDynamicLookupHelper;
 
@@ -84,7 +86,14 @@ public class GLProfile {
      * </p> 
      */
     private static final boolean enableANGLE = Debug.isPropertyDefined("jogl.enable.ANGLE", true);
-
+    
+    /** 
+     * In case no OpenGL ES implementation is required
+     * and if the running platform may have a buggy implementation,
+     * setting the property <code>jogl.disable.opengles</code> disables querying a possible existing OpenGL ES implementation. 
+     */
+    private static final boolean disableOpenGLES = Debug.isPropertyDefined("jogl.disable.opengles", true);
+    
     static {
         // Also initializes TempJarCache if shall be used.
         Platform.initSingleton();
@@ -112,15 +121,15 @@ public class GLProfile {
      * @param firstUIActionOnProcess Should be <code>true</code> if called before the first UI action of the running program,
      * otherwise <code>false</code>.
      * 
-     * @deprecated This method shall not need to be called for other reasons than having a defined initialization sequence.
-     *             To ensure homogeneous behavior with application not calling this method, you shall pass <code>firstUIActionOnProcess=false</code>.
-     *             This method is subject to be removed in future versions of JOGL. 
+     * @deprecated Use {@link #initSingleton()}. This method is subject to be removed in future versions of JOGL. 
      */
     public static void initSingleton(final boolean firstUIActionOnProcess) {
+        final boolean justInitialized; 
         initLock.lock();
         try {
             if(!initialized) { // volatile: ok
                 initialized = true;
+                justInitialized = true;
                 if(DEBUG) {
                     System.err.println("GLProfile.initSingleton(firstUIActionOnProcess: "+firstUIActionOnProcess+") - thread "+Thread.currentThread().getName());
                     Thread.dumpStack();
@@ -132,21 +141,51 @@ public class GLProfile {
                     public Object run() {
                         Platform.initSingleton();
                         
+                        // Performance hack to trigger classloading of the GL classes impl, which makes up to 12%, 800ms down to 700ms
+                        new Thread(new Runnable() {
+                          public void run() {
+                              final ClassLoader cl = GLProfile.class.getClassLoader();
+                              try {
+                                  ReflectionUtil.createInstance(getGLImplBaseClassName(GL4bc)+"Impl", new Class[] { GLProfile.class, GLContextImpl.class }, new Object[] { null, null }, cl);
+                              } catch (Throwable t) {}
+                              try {
+                                  ReflectionUtil.createInstance(getGLImplBaseClassName(GLES2)+"Impl", new Class[] { GLProfile.class, GLContextImpl.class }, new Object[] { null, null }, cl);              
+                              } catch (Throwable t) {}
+                              try {
+                                  ReflectionUtil.createInstance(getGLImplBaseClassName(GLES1)+"Impl", new Class[] { GLProfile.class, GLContextImpl.class }, new Object[] { null, null }, cl);              
+                              } catch (Throwable t) {}
+                          }
+                        }, "GLProfile-GL_Bootstrapping").start();      
+
+                        
                         if(TempJarCache.isInitialized()) {
-                           String[] atomicNativeJarBaseNames = new String[] { "nativewindow", "jogl", null };
-                           if( ReflectionUtil.isClassAvailable("com.jogamp.newt.NewtFactory", GLProfile.class.getClassLoader()) ) {
-                               atomicNativeJarBaseNames[2] = "newt";
+                           final ClassLoader cl = GLProfile.class.getClassLoader();
+                           // either: [jogl-all.jar, jogl-all-noawt.jar, jogl-all-mobile.jar] -> jogl-all-natives-<os.and.arch>.jar
+                           // or:     nativewindow-core.jar                                   -> nativewindow-natives-<os.and.arch>.jar,
+                           //         jogl-core.jar                                           -> jogl-natives-<os.and.arch>.jar,
+                           //        (newt-core.jar                                           -> newt-natives-<os.and.arch>.jar)? (if available)
+                           final String newtFactoryClassName = "com.jogamp.newt.NewtFactory";
+                           final Class<?>[] classesFromJavaJars = new Class<?>[] { NWJNILibLoader.class, GLProfile.class, null };
+                           if( ReflectionUtil.isClassAvailable(newtFactoryClassName, cl) ) {
+                               classesFromJavaJars[2] = ReflectionUtil.getClass(newtFactoryClassName, false, cl);
                            }
-                           JNILibLoaderBase.addNativeJarLibs(GLProfile.class, "jogl-all", atomicNativeJarBaseNames);
+                           JNILibLoaderBase.addNativeJarLibs(classesFromJavaJars, "-all", new String[] { "-noawt", "-mobile", "-core" } );
                         }
                         initProfilesForDefaultDevices(firstUIActionOnProcess);
                         return null;
                     }
                 });
+            } else {
+                justInitialized = false;
             }
         } finally {
             initLock.unlock();
         }
+        if(DEBUG) {
+            if( justInitialized && ( hasGL234Impl || hasGLES1Impl || hasGLES2Impl ) ) {
+                System.err.println(JoglVersion.getDefaultOpenGLInfo(defaultDevice, null, true));
+            }
+        }        
     }
     
     /**
@@ -909,6 +948,22 @@ public class GLProfile {
         return getGLImplBaseClassName(getImplName());
     }
 
+    private static final String getGLImplBaseClassName(String profileImpl) {
+        if( GLES2 == profileImpl ) {
+            return "jogamp.opengl.es2.GLES2";
+        } else if( GLES1 == profileImpl ) {
+            return "jogamp.opengl.es1.GLES1";
+        } else if ( GL4bc == profileImpl ||
+                    GL4   == profileImpl ||
+                    GL3bc == profileImpl ||
+                    GL3   == profileImpl ||
+                    GL2   == profileImpl ) {
+            return "jogamp.opengl.gl4.GL4bc";
+        } else {
+            throw new GLException("unsupported profile \"" + profileImpl + "\"");
+        }
+    }
+    
     /**
      * @param o GLProfile object to compare with
      * @return true if given Object is a GLProfile and
@@ -917,8 +972,8 @@ public class GLProfile {
     public final boolean equals(Object o) {
         if(this==o) { return true; }
         if(o instanceof GLProfile) {
-            GLProfile glp = (GLProfile)o;
-            return getName().equals(glp.getName()) && getImplName().equals(glp.getImplName()) ;
+            final GLProfile glp = (GLProfile)o;
+            return getName() == glp.getName() && getImplName() == glp.getImplName() ;
         }
         return false;
     }
@@ -996,6 +1051,11 @@ public class GLProfile {
     public final boolean isGLES2() {
         return GLES2 == profile;
     }
+    
+    /** Indicates whether this profile is capable of GLES.  <p>Includes [ GLES1, GLES2 ].</p> */
+    public final boolean isGLES() {
+        return GLES2 == profile || GLES1 == profile;
+    }
 
     /** Indicates whether this profile is capable of GL2ES1. <p>Includes [ GL4bc, GL3bc, GL2, GLES1, GL2ES1 ].</p> */
     public final boolean isGL2ES1() {
@@ -1353,7 +1413,6 @@ public class GLProfile {
      */
     private static void initProfilesForDefaultDevices(boolean firstUIActionOnProcess) {
         NativeWindowFactory.initSingleton(firstUIActionOnProcess);
-
         if(DEBUG) {
             System.err.println("GLProfile.init firstUIActionOnProcess: "+ firstUIActionOnProcess
                                + ", thread: " + Thread.currentThread().getName());
@@ -1423,7 +1482,7 @@ public class GLProfile {
             }
         }
 
-        if ( ReflectionUtil.isClassAvailable("jogamp.opengl.egl.EGLDrawableFactory", classloader) ) {
+        if ( !disableOpenGLES && ReflectionUtil.isClassAvailable("jogamp.opengl.egl.EGLDrawableFactory", classloader) ) {
             t=null;
             try {
                 eglFactory = (GLDrawableFactoryImpl) GLDrawableFactory.getFactoryImpl(GLES2);
@@ -1489,16 +1548,17 @@ public class GLProfile {
 
         if(DEBUG) {
             // System.err.println("GLProfile.init addedAnyProfile      "+addedAnyProfile+" (desktop: "+addedDesktopProfile+", egl "+addedEGLProfile+")");
-            System.err.println("GLProfile.init addedAnyProfile      "+addedAnyProfile);
-            System.err.println("GLProfile.init isAWTAvailable       "+isAWTAvailable);
-            System.err.println("GLProfile.init hasDesktopGLFactory  "+hasDesktopGLFactory);
-            System.err.println("GLProfile.init hasGL234Impl         "+hasGL234Impl);
-            System.err.println("GLProfile.init hasEGLFactory        "+hasEGLFactory);
-            System.err.println("GLProfile.init hasGLES1Impl         "+hasGLES1Impl);
-            System.err.println("GLProfile.init hasGLES2Impl         "+hasGLES2Impl);
-            System.err.println("GLProfile.init defaultDevice        "+defaultDevice);
-            System.err.println("GLProfile.init profile order        "+array2String(GL_PROFILE_LIST_ALL));            
-            System.err.println(JoglVersion.getDefaultOpenGLInfo(null));            
+            System.err.println("GLProfile.init addedAnyProfile       "+addedAnyProfile);
+            System.err.println("GLProfile.init isAWTAvailable        "+isAWTAvailable);
+            System.err.println("GLProfile.init hasDesktopGLFactory   "+hasDesktopGLFactory);
+            System.err.println("GLProfile.init hasGL234Impl          "+hasGL234Impl);
+            System.err.println("GLProfile.init hasEGLFactory         "+hasEGLFactory);
+            System.err.println("GLProfile.init hasGLES1Impl          "+hasGLES1Impl);
+            System.err.println("GLProfile.init hasGLES2Impl          "+hasGLES2Impl);
+            System.err.println("GLProfile.init defaultDevice         "+defaultDevice);
+            System.err.println("GLProfile.init defaultDevice Desktop "+defaultDesktopDevice);
+            System.err.println("GLProfile.init defaultDevice EGL     "+defaultEGLDevice);
+            System.err.println("GLProfile.init profile order         "+array2String(GL_PROFILE_LIST_ALL));
         }
     }
 
@@ -1527,7 +1587,7 @@ public class GLProfile {
         boolean isSet = GLContext.getAvailableGLVersionsSet(device);
 
         if(DEBUG) {
-            System.err.println("Info: GLProfile.initProfilesForDevice: "+device+", isSet "+isSet);
+            System.err.println("Info: GLProfile.initProfilesForDevice: "+device+" ("+device.getClass().getName()+"), isSet "+isSet+", hasDesktopGLFactory "+hasDesktopGLFactory+", hasEGLFactory "+hasEGLFactory);
         }
         if(isSet) {
             // Avoid recursion and check whether impl. is sane!
@@ -1541,9 +1601,9 @@ public class GLProfile {
 
         boolean addedDesktopProfile = false;
         boolean addedEGLProfile = false;
-        
-        final boolean deviceIsDesktopCompatible = hasDesktopGLFactory && desktopFactory.getIsDeviceCompatible(device);
-        
+
+        final boolean deviceIsDesktopCompatible = hasDesktopGLFactory && desktopFactory.getIsDeviceCompatible(device);        
+                
         if( deviceIsDesktopCompatible ) {
             // 1st pretend we have all Desktop and EGL profiles ..
             computeProfileMap(device, true /* desktopCtxUndef*/, true  /* esCtxUndef */);
@@ -1597,27 +1657,9 @@ public class GLProfile {
             if (DEBUG) {
                 System.err.println("GLProfile.initProfilesForDevice: "+device+": egl Shared Ctx "+eglSharedCtxAvail);
             }
-            if( hasGLES2Impl ) {
-                // The native ES2 impl. overwrites a previous mapping using 'ES2 compatibility' by a desktop profile 
-                GLContext.mapAvailableGLVersion(device,
-                                                2, GLContext.CTX_PROFILE_ES,
-                                                2, 0, GLContext.CTX_PROFILE_ES|GLContext.CTX_IMPL_ES2_COMPAT);
-                if (DEBUG) {
-                  System.err.println(GLContext.getThreadName() + ": initProfilesForDeviceCritical-MapVersionsAvailable HAVE: ES2 -> ES 2.0");
-                }
-            }
-            if( hasGLES1Impl ) {
-                // Always favor the native ES1 impl.
-                GLContext.mapAvailableGLVersion(device,
-                                                1, GLContext.CTX_PROFILE_ES,
-                                                1, 0, GLContext.CTX_PROFILE_ES);
-                if (DEBUG) {
-                  System.err.println(GLContext.getThreadName() + ": initProfilesForDeviceCritical-MapVersionsAvailable HAVE: ES1 -> ES 1.0");
-                }
-            }
             addedEGLProfile = computeProfileMap(device, false /* desktopCtxUndef*/, false /* esCtxUndef */);
-        } 
-        
+        }
+
         if( !addedDesktopProfile && !addedEGLProfile ) {
             setProfileMap(device, new HashMap<String /*GLProfile_name*/, GLProfile>()); // empty
             if(DEBUG) {
@@ -1722,7 +1764,7 @@ public class GLProfile {
                 }
                 _mappedProfiles.put(profile, glProfile);
                 if (DEBUG) {
-                    System.err.println("GLProfile.init map "+glProfile+" on devide "+device.getConnection());
+                    System.err.println("GLProfile.init map "+glProfile+" on device "+device.getConnection());
                 }
                 if(null==defaultGLProfileHW && isHardwareRasterizer[0]) {
                     defaultGLProfileHW=glProfile;
@@ -1846,42 +1888,12 @@ public class GLProfile {
             return GL2;
         } else if(GLES2.equals(profile) && hasGLES2Impl && ( esCtxUndef || GLContext.isGLES2Available(device, isHardwareRasterizer))) {
             return GLES2;
-        /**
-         * TODO: GLES2_TRUE_DESKTOP (see: GLContextImpl, GLProfile)
-         * Hack to enable GLES2 for desktop profiles w/ ES2 compatibility,
-         * however .. a consequent implementation would need to have all GL2ES2
-         * implementing profile to also implement GLES2!
-         * Let's rely on GL2ES2 and let the user/impl. query isGLES2Compatible()
-        } else if(GLES2.equals(profile)) {
-            if(hasGL234Impl || hasGLES2Impl) {
-                if(esCtxUndef) {
-                    return GLES2;
-                }
-                return GLContext.getAvailableGLProfile(device, 2, GLContext.CTX_PROFILE_ES);
-            }
-          */
         } else if(GLES1.equals(profile) && hasGLES1Impl && ( esCtxUndef || GLContext.isGLES1Available(device, isHardwareRasterizer))) {
             return GLES1;
         }
         return null;
     }
 
-    private static String getGLImplBaseClassName(String profileImpl) {
-        if ( GL4bc.equals(profileImpl) ||
-             GL4.equals(profileImpl)   ||
-             GL3bc.equals(profileImpl) ||
-             GL3.equals(profileImpl)   ||
-             GL2.equals(profileImpl) ) {
-            return "jogamp.opengl.gl4.GL4bc";
-        } else if(GLES1.equals(profileImpl) || GL2ES1.equals(profileImpl)) {
-            return "jogamp.opengl.es1.GLES1";
-        } else if(GLES2.equals(profileImpl) || GL2ES2.equals(profileImpl)) {
-            return "jogamp.opengl.es2.GLES2";
-        } else {
-            throw new GLException("unsupported profile \"" + profileImpl + "\"");
-        }
-    }
-
     private static /*final*/ HashMap<String /*device_connection*/, HashMap<String /*GLProfile_name*/, GLProfile>> deviceConn2ProfileMap = 
                 new HashMap<String /*device_connection*/, HashMap<String /*GLProfile_name*/, GLProfile>>();
 
@@ -1901,9 +1913,14 @@ public class GLProfile {
     {
         initSingleton();
 
+        if(null==defaultDevice) { // avoid NPE and notify of incomplete initialization
+            throw new GLException("No default device available");
+        }
+        
         if(null==device) {
             device = defaultDevice;
         }
+        
         final String deviceKey = device.getUniqueID();
         HashMap<String /*GLProfile_name*/, GLProfile> map = deviceConn2ProfileMap.get(deviceKey);
         if( null != map ) {
diff --git a/src/jogl/classes/javax/media/opengl/awt/AWTGLAutoDrawable.java b/src/jogl/classes/javax/media/opengl/awt/AWTGLAutoDrawable.java
index d1e725b..2698678 100644
--- a/src/jogl/classes/javax/media/opengl/awt/AWTGLAutoDrawable.java
+++ b/src/jogl/classes/javax/media/opengl/awt/AWTGLAutoDrawable.java
@@ -1,21 +1,21 @@
 /*
  * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- * 
+ *
  * - Redistribution of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
- * 
+ *
  * - Redistribution in binary form must reproduce the above copyright
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the distribution.
- * 
+ *
  * Neither the name of Sun Microsystems, Inc. or the names of
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * This software is provided "AS IS," without a warranty of any kind. ALL
  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -28,18 +28,18 @@
  * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
  * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
  * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
+ *
  * You acknowledge that this software is not designed or intended for use
  * in the design, construction, operation or maintenance of any nuclear
  * facility.
- * 
+ *
  * Sun gratefully acknowledges that this software was originally authored
  * and developed by Kenneth Bradley Russell and Christopher John Kline.
  */
 
 package javax.media.opengl.awt;
 
-import javax.media.opengl.*;
+import javax.media.opengl.GLAutoDrawable;
 
 public interface AWTGLAutoDrawable extends GLAutoDrawable, ComponentEvents {
   /** Requests a new width and height for this AWTGLAutoDrawable. */
diff --git a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java
index 0a75865..03fd78a 100644
--- a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java
+++ b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java
@@ -1,22 +1,22 @@
 /*
  * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
  * Copyright (c) 2010 JogAmp Community. All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- * 
+ *
  * - Redistribution of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
- * 
+ *
  * - Redistribution in binary form must reproduce the above copyright
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the distribution.
- * 
+ *
  * Neither the name of Sun Microsystems, Inc. or the names of
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * This software is provided "AS IS," without a warranty of any kind. ALL
  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -29,11 +29,11 @@
  * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
  * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
  * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
+ *
  * You acknowledge that this software is not designed or intended for use
  * in the design, construction, operation or maintenance of any nuclear
  * facility.
- * 
+ *
  * Sun gratefully acknowledges that this software was originally authored
  * and developed by Kenneth Bradley Russell and Christopher John Kline.
  */
@@ -60,6 +60,7 @@ import java.util.ArrayList;
 
 import javax.media.nativewindow.AbstractGraphicsConfiguration;
 import javax.media.nativewindow.OffscreenLayerOption;
+import javax.media.nativewindow.VisualIDHolder;
 import javax.media.nativewindow.WindowClosingProtocol;
 import javax.media.nativewindow.AbstractGraphicsDevice;
 import javax.media.nativewindow.AbstractGraphicsScreen;
@@ -84,6 +85,8 @@ import javax.media.opengl.Threading;
 
 import com.jogamp.common.GlueGenVersion;
 import com.jogamp.common.util.VersionUtil;
+import com.jogamp.common.util.locks.LockFactory;
+import com.jogamp.common.util.locks.RecursiveLock;
 import com.jogamp.nativewindow.awt.AWTGraphicsConfiguration;
 import com.jogamp.nativewindow.awt.AWTGraphicsDevice;
 import com.jogamp.nativewindow.awt.AWTGraphicsScreen;
@@ -139,22 +142,24 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
 
   private static final boolean DEBUG = Debug.debug("GLCanvas");
 
-  private GLDrawableHelper drawableHelper = new GLDrawableHelper();
+  private final RecursiveLock lock = LockFactory.createRecursiveLock();
+  private final GLDrawableHelper helper = new GLDrawableHelper();
   private AWTGraphicsConfiguration awtConfig;
-  private volatile GLDrawable drawable;
+  private volatile GLDrawable drawable; // volatile: avoid locking for read-only access
   private GLContextImpl context;
-  private boolean sendReshape = false;
-  
+  private volatile boolean sendReshape = false; // volatile: maybe written by EDT w/o locking
+
   // copy of the cstr args, mainly for recreation
   private GLCapabilitiesImmutable capsReqUser;
   private GLCapabilitiesChooser chooser;
   private GLContext shareWith;
-  private int additionalCtxCreationFlags = 0;  
+  private int additionalCtxCreationFlags = 0;
   private GraphicsDevice device;
   private boolean shallUseOffscreenLayer = false;
 
   private AWTWindowClosingProtocol awtWindowClosingProtocol =
           new AWTWindowClosingProtocol(this, new Runnable() {
+                @Override
                 public void run() {
                     GLCanvas.this.destroy();
                 }
@@ -162,7 +167,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
 
   /** Creates a new GLCanvas component with a default set of OpenGL
       capabilities, using the default OpenGL capabilities selection
-      mechanism, on the default screen device. 
+      mechanism, on the default screen device.
    * @throws GLException if no default profile is available for the default desktop device.
    */
   public GLCanvas() throws GLException {
@@ -171,7 +176,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
 
   /** Creates a new GLCanvas component with the requested set of
       OpenGL capabilities, using the default OpenGL capabilities
-      selection mechanism, on the default screen device. 
+      selection mechanism, on the default screen device.
    * @throws GLException if no GLCapabilities are given and no default profile is available for the default desktop device.
    * @see GLCanvas#GLCanvas(javax.media.opengl.GLCapabilitiesImmutable, javax.media.opengl.GLCapabilitiesChooser, javax.media.opengl.GLContext, java.awt.GraphicsDevice)
    */
@@ -187,8 +192,8 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
    * @throws GLException if no GLCapabilities are given and no default profile is available for the default desktop device.
    * @see GLCanvas#GLCanvas(javax.media.opengl.GLCapabilitiesImmutable, javax.media.opengl.GLCapabilitiesChooser, javax.media.opengl.GLContext, java.awt.GraphicsDevice)
    */
-  public GLCanvas(GLCapabilitiesImmutable capsReqUser, GLContext shareWith) 
-          throws GLException 
+  public GLCanvas(GLCapabilitiesImmutable capsReqUser, GLContext shareWith)
+          throws GLException
   {
     this(capsReqUser, null, shareWith, null);
   }
@@ -207,14 +212,14 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
       sharing</a>. The passed GraphicsDevice indicates the screen on
       which to create the GLCanvas; the GLDrawableFactory uses the
       default screen device of the local GraphicsEnvironment if null
-      is passed for this argument. 
+      is passed for this argument.
    * @throws GLException if no GLCapabilities are given and no default profile is available for the default desktop device.
    */
   public GLCanvas(GLCapabilitiesImmutable capsReqUser,
                   GLCapabilitiesChooser chooser,
                   GLContext shareWith,
-                  GraphicsDevice device) 
-      throws GLException 
+                  GraphicsDevice device)
+      throws GLException
   {
     /*
      * Determination of the native window is made in 'super.addNotify()',
@@ -246,33 +251,42 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
     this.device = device;
   }
 
+  @Override
+  public final Object getUpstreamWidget() {
+    return this;
+  }
+     
+  @Override
   public void setShallUseOffscreenLayer(boolean v) {
       shallUseOffscreenLayer = v;
   }
 
+  @Override
   public final boolean getShallUseOffscreenLayer() {
-      return shallUseOffscreenLayer;        
+      return shallUseOffscreenLayer;
   }
 
+  @Override
   public final boolean isOffscreenLayerSurfaceEnabled() {
-      if(null != drawable) {
-          return ((JAWTWindow)drawable.getNativeSurface()).isOffscreenLayerSurfaceEnabled();
+      final GLDrawable _drawable = drawable;
+      if(null != _drawable) {
+          return ((JAWTWindow)_drawable.getNativeSurface()).isOffscreenLayerSurfaceEnabled();
       }
       return false;
   }
 
-  
+
   /**
    * Overridden to choose a GraphicsConfiguration on a parent container's
    * GraphicsDevice because both devices
    */
-    @Override
+  @Override
   public GraphicsConfiguration getGraphicsConfiguration() {
     /*
      * Workaround for problems with Xinerama and java.awt.Component.checkGD
      * when adding to a container on a different graphics device than the
      * one that this Canvas is associated with.
-     * 
+     *
      * GC will be null unless:
      *   - A native peer has assigned it. This means we have a native
      *     peer, and are already comitted to a graphics configuration.
@@ -286,7 +300,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
      * chosen is only non-null on platforms where the GLDrawableFactory
      * returns a non-null GraphicsConfiguration (in the GLCanvas
      * constructor).
-     * 
+     *
      * if gc is from this Canvas' native peer then it should equal chosen,
      * otherwise it is from an ancestor component that this Canvas is being
      * added to, and we go into this block.
@@ -298,21 +312,21 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
        * Check for compatibility with gc. If they differ by only the
        * device then return a new GCconfig with the super-class' GDevice
        * (and presumably the same visual ID in Xinerama).
-       * 
+       *
        */
       if (!chosen.getDevice().getIDstring().equals(gc.getDevice().getIDstring())) {
         /*
          * Here we select a GraphicsConfiguration on the alternate
          * device that is presumably identical to the chosen
          * configuration, but on the other device.
-         * 
+         *
          * Should really check to ensure that we select a configuration
          * with the same X visual ID for Xinerama screens, otherwise the
          * GLDrawable may have the wrong visual ID (I don't think this
          * ever gets updated). May need to add a method to
          * X11GLDrawableFactory to do this in a platform specific
          * manner.
-         * 
+         *
          * However, on platforms where we can actually get into this
          * block, both devices should have the same visual list, and the
          * same configuration should be selected here.
@@ -353,7 +367,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
        * return the GC that was selected in the constructor (and might
        * cause an exception in Component.checkGD when adding to a
        * container, but in this case that would be the desired behavior).
-       * 
+       *
        */
       return chosen;
     } else if (gc == null) {
@@ -372,79 +386,63 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
      */
     return gc;
   }
-  
-  public GLContext createContext(GLContext shareWith) {
-      return (null != drawable) ? drawable.createContext(shareWith) : null;
-  }
 
+  @Override
+  public GLContext createContext(final GLContext shareWith) {
+    final RecursiveLock _lock = lock;
+    _lock.lock();
+    try {
+        if(drawable != null) {
+          final GLContext _ctx = drawable.createContext(shareWith);
+          _ctx.setContextCreationFlags(additionalCtxCreationFlags);
+          return _ctx;
+        }
+        return null;
+    } finally {
+        _lock.unlock();
+    }
+  }
+    
+  @Override
   public void setRealized(boolean realized) {
   }
 
+  @Override
   public boolean isRealized() {
-     return ( null != drawable ) ? drawable.isRealized() : false;
-  }
-  protected final boolean isRealizedImpl() {
-      return ( null != drawable ) ? drawable.isRealized() : false;
+      final GLDrawable _drawable = drawable;
+      return ( null != _drawable ) ? _drawable.isRealized() : false;
   }
 
+  @Override
   public WindowClosingMode getDefaultCloseOperation() {
       return awtWindowClosingProtocol.getDefaultCloseOperation();
   }
 
+  @Override
   public WindowClosingMode setDefaultCloseOperation(WindowClosingMode op) {
       return awtWindowClosingProtocol.setDefaultCloseOperation(op);
   }
 
+  @Override
   public void display() {
-    if( !validateGLDrawable() ) {
-        if(DEBUG) {
-            System.err.println(getThreadName()+": Info: GLCanvas display - skipped GL render, drawable not valid yet");
-        }
-        return; // not yet available ..
-    }
-    Threading.invoke(true, displayOnEventDispatchThreadAction, getTreeLock());
-
+    Threading.invoke(true, displayOnEDTAction, getTreeLock());
     awtWindowClosingProtocol.addClosingListenerOneShot();
   }
 
   private void dispose(boolean regenerate) {
-    final GLAnimatorControl animator =  getAnimator();
-    if(DEBUG) {
-        System.err.println(getThreadName()+": Info: dispose("+regenerate+") - START, hasContext " +
-                (null!=context) + ", hasDrawable " + (null!=drawable)+", "+animator);
-        Thread.dumpStack();
-    }
-
-    if(null!=context) {
-        boolean animatorPaused = false;
-        if(null!=animator) {
-            // can't remove us from animator for recreational addNotify()
-            animatorPaused = animator.pause();
-        }
-
-        disposeRegenerate=regenerate;
-
-        if(context.isCreated()) {
-            Threading.invoke(true, disposeOnEventDispatchThreadAction, getTreeLock());
-        }
-
-        if(animatorPaused) {
-            animator.resume();
-        }
-    }
-    
-    if(!regenerate) {
-        disposeAbstractGraphicsDevice();
-    }
-
-    if(DEBUG) {
-        System.err.println(getThreadName()+": dispose("+regenerate+") - END, "+animator);
-    }
+    disposeRegenerate=regenerate;
+    Threading.invoke(true, disposeOnEDTAction, getTreeLock());
   }
 
   /**
-   * Just an alias for removeNotify
+   * {@inheritDoc}
+   *
+   * <p>
+   * This impl. calls this class's {@link #removeNotify()} AWT override,
+   * where the actual implementation resides.
+   * </p>
    */
+  @Override
   public void destroy() {
     removeNotify();
   }
@@ -478,7 +476,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
                    (int) ((getHeight() + bounds.getHeight()) / 2));
       return;
     }
-    if( ! this.drawableHelper.isAnimatorAnimating() ) {
+    if( ! this.helper.isAnimatorAnimating() ) {
         display();
     }
   }
@@ -493,43 +491,49 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
     @SuppressWarnings("deprecation")
     @Override
   public void addNotify() {
-    if(DEBUG) {
-        System.err.println(getThreadName()+": Info: addNotify - start, bounds: "+this.getBounds());
-        Thread.dumpStack();
-    }
-
-    /**
-     * 'super.addNotify()' determines the GraphicsConfiguration,
-     * while calling this class's overriden 'getGraphicsConfiguration()' method
-     * after which it creates the native peer.
-     * Hence we have to set the 'awtConfig' before since it's GraphicsConfiguration
-     * is being used in getGraphicsConfiguration().
-     * This code order also allows recreation, ie re-adding the GLCanvas.
-     */
-    awtConfig = chooseGraphicsConfiguration(capsReqUser, capsReqUser, chooser, device);
-    if(null==awtConfig) {
-        throw new GLException("Error: NULL AWTGraphicsConfiguration");
-    }
-
-    // before native peer is valid: X11
-    disableBackgroundErase();
-
-    // issues getGraphicsConfiguration() and creates the native peer
-    super.addNotify();
-
-    // after native peer is valid: Windows
-    disableBackgroundErase();
-
-    if (!Beans.isDesignTime()) {
-        createDrawableAndContext();
-    }
-
-    // init drawable by paint/display makes the init sequence more equal
-    // for all launch flavors (applet/javaws/..)
-    // validateGLDrawable();
-
-    if(DEBUG) {
-        System.err.println(getThreadName()+": Info: addNotify - end: peer: "+getPeer());
+    final RecursiveLock _lock = lock;
+    _lock.lock();
+    try {    
+        if(DEBUG) {
+            System.err.println(getThreadName()+": Info: addNotify - start, bounds: "+this.getBounds());
+            Thread.dumpStack();
+        }
+    
+        /**
+         * 'super.addNotify()' determines the GraphicsConfiguration,
+         * while calling this class's overriden 'getGraphicsConfiguration()' method
+         * after which it creates the native peer.
+         * Hence we have to set the 'awtConfig' before since it's GraphicsConfiguration
+         * is being used in getGraphicsConfiguration().
+         * This code order also allows recreation, ie re-adding the GLCanvas.
+         */
+        awtConfig = chooseGraphicsConfiguration(capsReqUser, capsReqUser, chooser, device);
+        if(null==awtConfig) {
+            throw new GLException("Error: NULL AWTGraphicsConfiguration");
+        }
+    
+        // before native peer is valid: X11
+        disableBackgroundErase();
+    
+        // issues getGraphicsConfiguration() and creates the native peer
+        super.addNotify();
+    
+        // after native peer is valid: Windows
+        disableBackgroundErase();
+    
+        if (!Beans.isDesignTime()) {
+            createDrawableAndContext();
+        }
+    
+        // init drawable by paint/display makes the init sequence more equal
+        // for all launch flavors (applet/javaws/..)
+        // validateGLDrawable();
+    
+        if(DEBUG) {
+            System.err.println(getThreadName()+": Info: addNotify - end: peer: "+getPeer());
+        }
+    } finally {
+        _lock.unlock();
     }
   }
 
@@ -546,28 +550,30 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
         jawtWindow.unlockSurface();
     }
   }
-  
+
   private boolean validateGLDrawable() {
-    boolean realized = false;
-    if (!Beans.isDesignTime()) {
-        if ( null != drawable ) { // OK: drawable is volatile
-            realized = drawable.isRealized();
-            if ( !realized && 0 < drawable.getWidth() * drawable.getHeight() ) {
-                // make sure drawable realization happens on AWT EDT, due to AWTTree lock
-                AWTEDTExecutor.singleton.invoke(true, setRealizedOnEventDispatchThreadAction);
-                realized = true;
-                sendReshape=true; // ensure a reshape is being send ..
-                if(DEBUG) {
-                    System.err.println(getThreadName()+": Realized Drawable: "+drawable.toString());
-                    Thread.dumpStack();
-                }
+    final GLDrawable _drawable = drawable;
+    if ( null != _drawable ) {
+        if( _drawable.isRealized() ) {
+            return true;
+        }
+        if (!Beans.isDesignTime() &&
+             0 < _drawable.getWidth() * _drawable.getHeight() ) {
+            // make sure drawable realization happens on AWT EDT, due to AWTTree lock
+            AWTEDTExecutor.singleton.invoke(true, setRealizedOnEDTAction);
+            sendReshape=true; // ensure a reshape is being send ..
+            if(DEBUG) {
+                System.err.println(getThreadName()+": Realized Drawable: "+_drawable.toString());
+                Thread.dumpStack();
             }
+            return true;
         }
     }
-    return realized;
+    return false;
   }
-  private Runnable setRealizedOnEventDispatchThreadAction = new Runnable() {
-      public void run() {
+  private Runnable setRealizedOnEDTAction = new Runnable() {
+      @Override
+    public void run() {
           drawable.setRealized(true);
       } };
 
@@ -595,9 +601,6 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
       try {
         dispose(false);
       } finally {
-        context=null;
-        drawable=null;
-        awtConfig=null;
         super.removeNotify();
       }
     }
@@ -617,7 +620,8 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
     @Override
   public void reshape(int x, int y, int width, int height) {
     super.reshape(x, y, width, height);
-    if(null != drawable && drawable.isRealized() && !drawable.getChosenGLCapabilities().isOnscreen()) {
+    final GLDrawable _drawable = drawable;
+    if(null != _drawable && _drawable.isRealized() && !_drawable.getChosenGLCapabilities().isOnscreen()) {
         dispose(true);
     } else {
         sendReshape = true;
@@ -626,7 +630,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
 
   /** <B>Overrides:</B>
       <DL><DD><CODE>update</CODE> in class <CODE>java.awt.Component</CODE></DD></DL> */
-  /** 
+  /**
    * Overridden from Canvas to prevent the AWT's clearing of the
    * canvas from interfering with the OpenGL rendering.
    */
@@ -634,84 +638,119 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
   public void update(Graphics g) {
     paint(g);
   }
-  
+
+  @Override
   public void addGLEventListener(GLEventListener listener) {
-    drawableHelper.addGLEventListener(listener);
+    helper.addGLEventListener(listener);
   }
 
-  public void addGLEventListener(int index, GLEventListener listener) {
-    drawableHelper.addGLEventListener(index, listener);
+  @Override
+  public void addGLEventListener(int index, GLEventListener listener) throws IndexOutOfBoundsException {
+    helper.addGLEventListener(index, listener);
   }
 
+  @Override
   public void removeGLEventListener(GLEventListener listener) {
-    drawableHelper.removeGLEventListener(listener);
+    helper.removeGLEventListener(listener);
   }
 
+  @Override
+  public GLEventListener removeGLEventListener(int index) throws IndexOutOfBoundsException {
+    return helper.removeGLEventListener(index);
+  }
+  
+  @Override
   public void setAnimator(GLAnimatorControl animatorControl) {
-    drawableHelper.setAnimator(animatorControl);
+    helper.setAnimator(animatorControl);
   }
 
+  @Override
   public GLAnimatorControl getAnimator() {
-    return drawableHelper.getAnimator();
+    return helper.getAnimator();
   }
 
-  public void invoke(boolean wait, GLRunnable glRunnable) {
-    drawableHelper.invoke(this, wait, glRunnable);
+  @Override
+  public boolean invoke(boolean wait, GLRunnable glRunnable) {
+    return helper.invoke(this, wait, glRunnable);
   }
 
-  public void setContext(GLContext ctx) {
-    context=(GLContextImpl)ctx;
-    if(null != context) {
-        context.setContextCreationFlags(additionalCtxCreationFlags);
-    }
+  @Override
+  public GLContext setContext(GLContext newCtx) {
+      final RecursiveLock _lock = lock;
+      _lock.lock();
+      try {
+          final GLContext oldCtx = context;
+          final boolean newCtxCurrent = helper.switchContext(drawable, oldCtx, newCtx, additionalCtxCreationFlags);
+          context=(GLContextImpl)newCtx;
+          if(newCtxCurrent) {
+              context.makeCurrent();
+          }
+          return oldCtx;
+      } finally {
+          _lock.unlock();
+      }
   }
 
+  @Override
   public GLContext getContext() {
     return context;
   }
 
+  @Override
   public GL getGL() {
     if (Beans.isDesignTime()) {
       return null;
     }
-    GLContext ctx = getContext();
-    return (ctx == null) ? null : ctx.getGL();
+    final GLContext _context = context;
+    return (_context == null) ? null : _context.getGL();
   }
 
+  @Override
   public GL setGL(GL gl) {
-    GLContext ctx = getContext();
-    if (ctx != null) {
-      ctx.setGL(gl);
+    final GLContext _context = context;
+    if (_context != null) {
+      _context.setGL(gl);
       return gl;
     }
     return null;
   }
 
 
+  @Override
   public void setAutoSwapBufferMode(boolean onOrOff) {
-    drawableHelper.setAutoSwapBufferMode(onOrOff);
+    helper.setAutoSwapBufferMode(onOrOff);
   }
 
+  @Override
   public boolean getAutoSwapBufferMode() {
-    return drawableHelper.getAutoSwapBufferMode();
+    return helper.getAutoSwapBufferMode();
   }
 
+  @Override
   public void swapBuffers() {
-    Threading.invoke(true, swapBuffersOnEventDispatchThreadAction, getTreeLock());
+    Threading.invoke(true, swapBuffersOnEDTAction, getTreeLock());
   }
 
+  @Override
   public void setContextCreationFlags(int flags) {
     additionalCtxCreationFlags = flags;
+    final GLContext _context = context;
+    if(null != _context) {
+      _context.setContextCreationFlags(additionalCtxCreationFlags);
+    }
   }
-      
+
+  @Override
   public int getContextCreationFlags() {
-    return additionalCtxCreationFlags;                
+    return additionalCtxCreationFlags;
   }
-          
+
+  @Override
   public GLProfile getGLProfile() {
     return capsReqUser.getGLProfile();
   }
 
+  @Override
   public GLCapabilitiesImmutable getChosenGLCapabilities() {
     if (awtConfig == null) {
         throw new GLException("No AWTGraphicsConfiguration: "+this);
@@ -728,25 +767,32 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
     return (GLCapabilitiesImmutable)awtConfig.getRequestedCapabilities();
   }
 
+  @Override
   public NativeSurface getNativeSurface() {
-    return (null != drawable) ? drawable.getNativeSurface() : null;
+    final GLDrawable _drawable = drawable;
+    return (null != _drawable) ? _drawable.getNativeSurface() : null;
   }
 
+  @Override
   public long getHandle() {
-    return (null != drawable) ? drawable.getHandle() : 0;
+    final GLDrawable _drawable = drawable;
+    return (null != _drawable) ? _drawable.getHandle() : 0;
   }
 
+  @Override
   public GLDrawableFactory getFactory() {
-    return (null != drawable) ? drawable.getFactory() : null;
+    final GLDrawable _drawable = drawable;
+    return (null != _drawable) ? _drawable.getFactory() : null;
   }
 
   @Override
   public String toString() {
-    final int dw = (null!=drawable) ? drawable.getWidth() : -1;
-    final int dh = (null!=drawable) ? drawable.getHeight() : -1;
-    
+    final GLDrawable _drawable = drawable;
+    final int dw = (null!=_drawable) ? _drawable.getWidth() : -1;
+    final int dh = (null!=_drawable) ? _drawable.getHeight() : -1;
+
     return "AWT-GLCanvas[Realized "+isRealized()+
-                          ",\n\t"+((null!=drawable)?drawable.getClass().getName():"null-drawable")+                         
+                          ",\n\t"+((null!=_drawable)?_drawable.getClass().getName():"null-drawable")+
                           ",\n\tFactory   "+getFactory()+
                           ",\n\thandle    0x"+Long.toHexString(getHandle())+
                           ",\n\tDrawable size "+dw+"x"+dh+
@@ -754,13 +800,14 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
                           ",\n\tvisible "+isVisible()+
                           ",\n\t"+awtConfig+"]";
   }
-  
+
   //----------------------------------------------------------------------
   // Internals only below this point
   //
 
   private boolean disposeRegenerate;
-  private final Runnable postDisposeAction = new Runnable() {
+  private final Runnable postDisposeOnEDTAction = new Runnable() {
+    @Override
     public void run() {
       context=null;
       if(null!=drawable) {
@@ -769,45 +816,86 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
           drawable=null;
           if(null!=jawtWindow) {
             jawtWindow.destroy();
-          }          
+          }
       }
-      
+
       if(disposeRegenerate) {
           // Similar process as in addNotify()!
-          
+
           // Recreate GLDrawable/GLContext to reflect it's new graphics configuration
           createDrawableAndContext();
-          
+
           if(DEBUG) {
             System.err.println(getThreadName()+": GLCanvas.dispose(true): new drawable: "+drawable);
           }
           validateGLDrawable(); // immediate attempt to recreate the drawable
       }
     }
-  }; 
+  };
 
-  private final Runnable disposeOnEventDispatchThreadAction = new Runnable() {
+  private final Runnable disposeOnEDTAction = new Runnable() {
+    @Override
     public void run() {
-      drawableHelper.disposeGL(GLCanvas.this, drawable, context, postDisposeAction);      
+        final RecursiveLock _lock = lock;
+        _lock.lock();
+        try {            
+            final GLAnimatorControl animator =  getAnimator();
+
+            if(DEBUG) {
+                System.err.println(getThreadName()+": Info: dispose("+disposeRegenerate+") - START, hasContext " +
+                        (null!=context) + ", hasDrawable " + (null!=drawable)+", "+animator);
+                Thread.dumpStack();
+            }
+        
+            if(null!=drawable && null!=context) {
+                boolean animatorPaused = false;
+                if(null!=animator) {
+                    // can't remove us from animator for recreational addNotify()
+                    animatorPaused = animator.pause();
+                }
+        
+                if(context.isCreated()) {
+                    helper.disposeGL(GLCanvas.this, drawable, context, postDisposeOnEDTAction);
+                }
+        
+                if(animatorPaused) {
+                    animator.resume();
+                }
+            }
+        
+            if(!disposeRegenerate) {
+                if(null != awtConfig) {
+                    disposeAbstractGraphicsDevice();
+                }
+                awtConfig=null;
+            }
+        
+            if(DEBUG) {
+                System.err.println(getThreadName()+": dispose("+disposeRegenerate+") - END, "+animator);
+            }
+            
+        } finally {
+            _lock.unlock();
+        }
     }
   };
 
   private final Runnable disposeAbstractGraphicsDeviceAction = new Runnable() {
+    @Override
     public void run() {
       if(null != awtConfig) {
-          final AbstractGraphicsConfiguration aconfig = awtConfig.getNativeGraphicsConfiguration();          
+          final AbstractGraphicsConfiguration aconfig = awtConfig.getNativeGraphicsConfiguration();
           final AbstractGraphicsDevice adevice = aconfig.getScreen().getDevice();
           final String adeviceMsg;
           if(DEBUG) {
             adeviceMsg = adevice.toString();
           } else {
-            adeviceMsg = null;  
+            adeviceMsg = null;
           }
           boolean closed = adevice.close();
           if(DEBUG) {
             System.err.println(getThreadName()+": GLCanvas.dispose(false): closed GraphicsDevice: "+adeviceMsg+", result: "+closed);
           }
-          awtConfig=null;
       }
     }
   };
@@ -818,7 +906,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
    *
    * @see #chooseGraphicsConfiguration(javax.media.opengl.GLCapabilitiesImmutable, javax.media.opengl.GLCapabilitiesImmutable, javax.media.opengl.GLCapabilitiesChooser, java.awt.GraphicsDevice)
    */
-  void disposeAbstractGraphicsDevice()  {
+  private void disposeAbstractGraphicsDevice()  {
     if( EventQueue.isDispatchThread() || Thread.holdsLock(getTreeLock()) ) {
         disposeAbstractGraphicsDeviceAction.run();
     } else {
@@ -833,12 +921,14 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
   }
 
   private final Runnable initAction = new Runnable() {
+    @Override
     public void run() {
-      drawableHelper.init(GLCanvas.this);
+      helper.init(GLCanvas.this);
     }
   };
-  
+
   private final Runnable displayAction = new Runnable() {
+    @Override
     public void run() {
       if (sendReshape) {
         if(DEBUG) {
@@ -846,15 +936,16 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
         }
         // Note: we ignore the given x and y within the parent component
         // since we are drawing directly into this heavyweight component.
-        drawableHelper.reshape(GLCanvas.this, 0, 0, getWidth(), getHeight());
+        helper.reshape(GLCanvas.this, 0, 0, getWidth(), getHeight());
         sendReshape = false;
       }
 
-      drawableHelper.display(GLCanvas.this);
+      helper.display(GLCanvas.this);
     }
   };
 
   private final Runnable swapBuffersAction = new Runnable() {
+    @Override
     public void run() {
       drawable.swapBuffers();
     }
@@ -863,16 +954,34 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
   // Workaround for ATI driver bugs related to multithreading issues
   // like simultaneous rendering via Animators to canvases that are
   // being resized on the AWT event dispatch thread
-  private final Runnable displayOnEventDispatchThreadAction = new Runnable() {
+  private final Runnable displayOnEDTAction = new Runnable() {
+    @Override
     public void run() {
-        drawableHelper.invokeGL(drawable, context, displayAction, initAction);
+        final RecursiveLock _lock = lock;
+        _lock.lock();
+        try {            
+            if( validateGLDrawable() ) {
+                helper.invokeGL(drawable, context, displayAction, initAction);
+            } else if(DEBUG) {
+                System.err.println(getThreadName()+": Info: GLCanvas display - skipped GL render, drawable not valid yet");
+            }
+        } finally {
+            _lock.unlock();
+        }
     }
   };
-  
-  private final Runnable swapBuffersOnEventDispatchThreadAction = new Runnable() {
+
+  private final Runnable swapBuffersOnEDTAction = new Runnable() {
+    @Override
     public void run() {
-        drawableHelper.invokeGL(drawable, context, swapBuffersAction, initAction);
-    }  
+        final RecursiveLock _lock = lock;
+        _lock.lock();
+        try {            
+            helper.invokeGL(drawable, context, swapBuffersAction, initAction);
+        } finally {
+            _lock.unlock();
+        }
+    }
   };
 
   // Disables the AWT's erasing of this Canvas's background on Windows
@@ -886,6 +995,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
     if (!disableBackgroundEraseInitialized) {
       try {
         AccessController.doPrivileged(new PrivilegedAction<Object>() {
+            @Override
             public Object run() {
               try {
                 Class<?> clazz = getToolkit().getClass();
@@ -946,25 +1056,26 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
       return null;
     }
 
-    final AbstractGraphicsScreen aScreen = null != device ? 
+    final AbstractGraphicsScreen aScreen = null != device ?
             AWTGraphicsScreen.createScreenDevice(device, AbstractGraphicsDevice.DEFAULT_UNIT):
             AWTGraphicsScreen.createDefault();
     AWTGraphicsConfiguration config = null;
 
     if( EventQueue.isDispatchThread() || Thread.holdsLock(getTreeLock()) ) {
         config = (AWTGraphicsConfiguration)
-                GraphicsConfigurationFactory.getFactory(AWTGraphicsDevice.class).chooseGraphicsConfiguration(capsChosen,
+                GraphicsConfigurationFactory.getFactory(AWTGraphicsDevice.class, GLCapabilitiesImmutable.class).chooseGraphicsConfiguration(capsChosen,
                                                                                                              capsRequested,
-                                                                                                             chooser, aScreen);
+                                                                                                             chooser, aScreen, VisualIDHolder.VID_UNDEFINED);
     } else {
         try {
             final ArrayList<AWTGraphicsConfiguration> bucket = new ArrayList<AWTGraphicsConfiguration>(1);
             EventQueue.invokeAndWait(new Runnable() {
+                @Override
                 public void run() {
                     AWTGraphicsConfiguration c = (AWTGraphicsConfiguration)
-                            GraphicsConfigurationFactory.getFactory(AWTGraphicsDevice.class).chooseGraphicsConfiguration(capsChosen,
+                            GraphicsConfigurationFactory.getFactory(AWTGraphicsDevice.class, GLCapabilitiesImmutable.class).chooseGraphicsConfiguration(capsChosen,
                                                                                                                          capsRequested,
-                                                                                                                         chooser, aScreen);
+                                                                                                                         chooser, aScreen, VisualIDHolder.VID_UNDEFINED);
                     bucket.add(c);
                 }
             });
@@ -982,11 +1093,11 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
 
     return config;
   }
-  
+
   protected static String getThreadName() {
     return Thread.currentThread().getName();
   }
-  
+
   /**
    * A most simple JOGL AWT test entry
    */
@@ -996,7 +1107,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
     // System.err.println(NativeWindowVersion.getInstance());
     System.err.println(JoglVersion.getInstance());
 
-    System.err.println(JoglVersion.getDefaultOpenGLInfo(null).toString());
+    System.err.println(JoglVersion.getDefaultOpenGLInfo(null, null, true).toString());
 
     final GLCapabilitiesImmutable caps = new GLCapabilities( GLProfile.getDefault(GLProfile.getDefaultDevice()) );
     final Frame frame = new Frame("JOGL AWT Test");
@@ -1006,17 +1117,22 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
     frame.setSize(128, 128);
 
     glCanvas.addGLEventListener(new GLEventListener() {
+        @Override
         public void init(GLAutoDrawable drawable) {
             GL gl = drawable.getGL();
             System.err.println(JoglVersion.getGLInfo(gl, null));
         }
+        @Override
         public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) { }
+        @Override
         public void display(GLAutoDrawable drawable) { }
+        @Override
         public void dispose(GLAutoDrawable drawable) { }
     });
 
     try {
         javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
+            @Override
             public void run() {
                 frame.setVisible(true);
             }});
@@ -1026,6 +1142,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
     glCanvas.display();
     try {
         javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
+            @Override
             public void run() {
                 frame.dispose();
             }});
diff --git a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
index 167b993..acb8f21 100644
--- a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
+++ b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
@@ -1,22 +1,22 @@
 /*
  * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
  * Copyright (c) 2010 JogAmp Community. All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- * 
+ *
  * - Redistribution of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
- * 
+ *
  * - Redistribution in binary form must reproduce the above copyright
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the distribution.
- * 
+ *
  * Neither the name of Sun Microsystems, Inc. or the names of
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * This software is provided "AS IS," without a warranty of any kind. ALL
  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -29,21 +29,17 @@
  * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
  * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
  * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
+ *
  * You acknowledge that this software is not designed or intended for use
  * in the design, construction, operation or maintenance of any nuclear
  * facility.
- * 
+ *
  * Sun gratefully acknowledges that this software was originally authored
  * and developed by Kenneth Bradley Russell and Christopher John Kline.
  */
 
 package javax.media.opengl.awt;
 
-import java.nio.ByteBuffer;
-import java.nio.IntBuffer;
-import java.beans.Beans;
-
 import java.awt.Color;
 import java.awt.EventQueue;
 import java.awt.FontMetrics;
@@ -55,13 +51,13 @@ import java.awt.geom.Rectangle2D;
 import java.awt.image.BufferedImage;
 import java.awt.image.DataBufferByte;
 import java.awt.image.DataBufferInt;
-import javax.swing.JPanel;
+import java.beans.Beans;
+import java.nio.ByteBuffer;
+import java.nio.IntBuffer;
 
-import javax.media.nativewindow.WindowClosingProtocol;
 import javax.media.nativewindow.AbstractGraphicsDevice;
 import javax.media.nativewindow.NativeSurface;
-import javax.media.nativewindow.WindowClosingProtocol.WindowClosingMode;
-
+import javax.media.nativewindow.WindowClosingProtocol;
 import javax.media.opengl.DefaultGLCapabilitiesChooser;
 import javax.media.opengl.GL;
 import javax.media.opengl.GL2;
@@ -80,10 +76,7 @@ import javax.media.opengl.GLPbuffer;
 import javax.media.opengl.GLProfile;
 import javax.media.opengl.GLRunnable;
 import javax.media.opengl.Threading;
-
-import com.jogamp.nativewindow.awt.AWTWindowClosingProtocol;
-import com.jogamp.opengl.util.FBObject;
-import com.jogamp.opengl.util.GLBuffers;
+import javax.swing.JPanel;
 
 import jogamp.opengl.Debug;
 import jogamp.opengl.GLContextImpl;
@@ -93,6 +86,10 @@ import jogamp.opengl.GLDrawableImpl;
 import jogamp.opengl.awt.Java2D;
 import jogamp.opengl.awt.Java2DGLContext;
 
+import com.jogamp.nativewindow.awt.AWTWindowClosingProtocol;
+import com.jogamp.opengl.FBObject;
+import com.jogamp.opengl.util.GLBuffers;
+
 // FIXME: Subclasses need to call resetGLFunctionAvailability() on their
 // context whenever the displayChanged() function is called on their
 // GLEventListeners
@@ -107,9 +104,9 @@ import jogamp.opengl.awt.Java2DGLContext;
     #setOpaque}(false). Pixels with resulting OpenGL alpha values less
     than 1.0 will be overlaid on any underlying Swing rendering. </P>
     <P>
-    Notes specific to the Reference Implementation: This component 
-    attempts to use hardware-accelerated rendering via pbuffers and 
-    falls back on to software rendering if problems occur. 
+    Notes specific to the Reference Implementation: This component
+    attempts to use hardware-accelerated rendering via pbuffers and
+    falls back on to software rendering if problems occur.
     Note that because this component attempts to use pbuffers for
     rendering, and because pbuffers can not be resized, somewhat
     surprising behavior may occur during resize operations; the {@link
@@ -128,7 +125,7 @@ import jogamp.opengl.awt.Java2DGLContext;
 public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosingProtocol {
   private static final boolean DEBUG = Debug.debug("GLJPanel");
 
-  private GLDrawableHelper drawableHelper = new GLDrawableHelper();
+  private GLDrawableHelper helper = new GLDrawableHelper();
   private volatile boolean isInitialized;
 
   // Data used for either pbuffers or pixmap-based offscreen surfaces
@@ -138,7 +135,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
   private GLCapabilitiesChooser chooser;
   private GLContext             shareWith;
   private int additionalCtxCreationFlags = 0;
-  
+
   // Width of the actual GLJPanel
   private int panelWidth   = 0;
   private int panelHeight  = 0;
@@ -180,6 +177,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
 
   private AWTWindowClosingProtocol awtWindowClosingProtocol =
           new AWTWindowClosingProtocol(this, new Runnable() {
+                @Override
                 public void run() {
                     GLJPanel.this.destroy();
                 }
@@ -198,7 +196,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
 
   /** Creates a new GLJPanel component with a default set of OpenGL
       capabilities and using the default OpenGL capabilities selection
-      mechanism. 
+      mechanism.
    * @throws GLException if no default profile is available for the default desktop device.
    */
   public GLJPanel() throws GLException {
@@ -207,7 +205,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
 
   /** Creates a new GLJPanel component with the requested set of
       OpenGL capabilities, using the default OpenGL capabilities
-      selection mechanism. 
+      selection mechanism.
    * @throws GLException if no GLCapabilities are given and no default profile is available for the default desktop device.
    */
   public GLJPanel(GLCapabilitiesImmutable userCapsRequest) throws GLException {
@@ -229,8 +227,8 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
       since J2D GL Context must be shared and we can only share one context.
     * @throws GLException if no GLCapabilities are given and no default profile is available for the default desktop device.
   */
-  public GLJPanel(GLCapabilitiesImmutable userCapsRequest, GLCapabilitiesChooser chooser, GLContext shareWith) 
-          throws GLException 
+  public GLJPanel(GLCapabilitiesImmutable userCapsRequest, GLCapabilitiesChooser chooser, GLContext shareWith)
+          throws GLException
   {
     super();
 
@@ -252,6 +250,12 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
     this.shareWith = shareWith;
   }
 
+  @Override
+  public final Object getUpstreamWidget() {
+    return this;
+  }
+  
+  @Override
   public void display() {
     if (EventQueue.isDispatchThread()) {
       // Want display() to be synchronous, so call paintImmediately()
@@ -280,7 +284,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
         animatorPaused = animator.pause();
       }
 
-      if(backend.getContext().isCreated()) {      
+      if(backend.getContext().isCreated()) {
           Threading.invoke(true, disposeAction, getTreeLock());
       }
       if(null != backend) {
@@ -291,9 +295,9 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
 
       if(animatorPaused) {
         animator.resume();
-      }     
+      }
     }
-    
+
     if(DEBUG) {
         System.err.println(getThreadName()+": GLJPanel.dispose() - stop");
     }
@@ -302,6 +306,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
   /**
    * Just an alias for removeNotify
    */
+  @Override
   public void destroy() {
       removeNotify();
   }
@@ -352,11 +357,11 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
     }
 
     updater.setGraphics(g);
-    
+
     backend.doPaintComponent(g);
   }
 
-  
+
   /** Overridden to track when this component is added to a container.
       Subclasses which override this method must call
       super.addNotify() in their addNotify() method in order to
@@ -393,7 +398,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
       <DL><DD><CODE>reshape</CODE> in class <CODE>java.awt.Component</CODE></DD></DL> */
   @SuppressWarnings("deprecation")
   @Override
-public void reshape(int x, int y, int width, int height) {
+  public void reshape(int x, int y, int width, int height) {
     super.reshape(x, y, width, height);
 
     // reshapeX = x;
@@ -411,51 +416,71 @@ public void reshape(int x, int y, int width, int height) {
     super.setOpaque(opaque);
   }
 
+  @Override
   public void addGLEventListener(GLEventListener listener) {
-    drawableHelper.addGLEventListener(listener);
+    helper.addGLEventListener(listener);
   }
 
+  @Override
   public void addGLEventListener(int index, GLEventListener listener) {
-    drawableHelper.addGLEventListener(index, listener);
+    helper.addGLEventListener(index, listener);
   }
 
+  @Override
   public void removeGLEventListener(GLEventListener listener) {
-    drawableHelper.removeGLEventListener(listener);
+    helper.removeGLEventListener(listener);
   }
 
+  @Override
+  public GLEventListener removeGLEventListener(int index) throws IndexOutOfBoundsException {
+    return helper.removeGLEventListener(index);
+  }       
+  
+  @Override
   public void setAnimator(GLAnimatorControl animatorControl) {
-    drawableHelper.setAnimator(animatorControl);
+    helper.setAnimator(animatorControl);
   }
 
+  @Override
   public GLAnimatorControl getAnimator() {
-    return drawableHelper.getAnimator();
+    return helper.getAnimator();
   }
 
-  public void invoke(boolean wait, GLRunnable glRunnable) {
-    drawableHelper.invoke(this, wait, glRunnable);
+  @Override
+  public boolean invoke(boolean wait, GLRunnable glRunnable) {
+    return helper.invoke(this, wait, glRunnable);
   }
 
+  @Override
   public GLContext createContext(GLContext shareWith) {
     return (null != backend) ? backend.createContext(shareWith) : null;
   }
 
+  @Override
   public void setRealized(boolean realized) {
   }
 
+  @Override
   public boolean isRealized() {
       return isInitialized;
   }
 
-  public void setContext(GLContext ctx) {
-    if (backend == null) {
-      return;
-    }
-    if(null != ctx) {
-        ctx.setContextCreationFlags(additionalCtxCreationFlags);
-    }
-    backend.setContext(ctx);
+  @Override
+  public GLContext setContext(GLContext newCtx) {
+      if (backend == null) {
+          return null;
+      }
+      final GLContext oldCtx = backend.getContext();
+      final boolean newCtxCurrent = helper.switchContext(backend.getDrawable(), oldCtx, newCtx, additionalCtxCreationFlags);
+      backend.setContext(newCtx);
+      if(newCtxCurrent) {
+          newCtx.makeCurrent();
+      }
+      return oldCtx;
   }
 
+
+  @Override
   public GLContext getContext() {
     if (backend == null) {
       return null;
@@ -463,6 +488,7 @@ public void reshape(int x, int y, int width, int height) {
     return backend.getContext();
   }
 
+  @Override
   public GL getGL() {
     if (Beans.isDesignTime()) {
       return null;
@@ -471,6 +497,7 @@ public void reshape(int x, int y, int width, int height) {
     return (context == null) ? null : context.getGL();
   }
 
+  @Override
   public GL setGL(GL gl) {
     GLContext context = getContext();
     if (context != null) {
@@ -480,6 +507,7 @@ public void reshape(int x, int y, int width, int height) {
     return null;
   }
 
+  @Override
   public void setAutoSwapBufferMode(boolean onOrOff) {
     // In the current implementation this is a no-op. Both the pbuffer
     // and pixmap based rendering paths use a single-buffered surface
@@ -488,6 +516,7 @@ public void reshape(int x, int y, int width, int height) {
     // Swing portion of the GLJPanel in any of the rendering paths.
   }
 
+  @Override
   public boolean getAutoSwapBufferMode() {
     // In the current implementation this is a no-op. Both the pbuffer
     // and pixmap based rendering paths use a single-buffered surface
@@ -496,7 +525,8 @@ public void reshape(int x, int y, int width, int height) {
     // Swing portion of the GLJPanel in any of the rendering paths.
     return true;
   }
-  
+
+  @Override
   public void swapBuffers() {
     // In the current implementation this is a no-op. Both the pbuffer
     // and pixmap based rendering paths use a single-buffered surface
@@ -505,14 +535,16 @@ public void reshape(int x, int y, int width, int height) {
     // Swing portion of the GLJPanel in any of the rendering paths.
   }
 
+  @Override
   public void setContextCreationFlags(int flags) {
     additionalCtxCreationFlags = flags;
   }
-      
+
+  @Override
   public int getContextCreationFlags() {
-    return additionalCtxCreationFlags;                
+    return additionalCtxCreationFlags;
   }
-            
+
   /** For a translucent GLJPanel (one for which {@link #setOpaque
       setOpaque}(false) has been called), indicates whether the
       application should preserve the OpenGL color buffer
@@ -529,22 +561,27 @@ public void reshape(int x, int y, int width, int height) {
     return oglPipelineEnabled;
   }
 
+  @Override
   public GLCapabilitiesImmutable getChosenGLCapabilities() {
     return backend.getChosenGLCapabilities();
   }
 
+  @Override
   public final GLProfile getGLProfile() {
     return glProfile;
   }
 
+  @Override
   public NativeSurface getNativeSurface() {
     throw new GLException("FIXME");
   }
 
+  @Override
   public long getHandle() {
     throw new GLException("FIXME");
   }
 
+  @Override
   public final GLDrawableFactory getFactory() {
     return factory;
   }
@@ -597,10 +634,12 @@ public void reshape(int x, int y, int width, int height) {
     awtWindowClosingProtocol.addClosingListenerOneShot();
   }
 
+  @Override
   public WindowClosingMode getDefaultCloseOperation() {
       return awtWindowClosingProtocol.getDefaultCloseOperation();
   }
 
+  @Override
   public WindowClosingMode setDefaultCloseOperation(WindowClosingMode op) {
       return awtWindowClosingProtocol.setDefaultCloseOperation(op);
   }
@@ -618,7 +657,7 @@ public void reshape(int x, int y, int width, int height) {
     backend.handleReshape();
     handleReshape = false;
   }
-  
+
   // This is used as the GLEventListener for the pbuffer-based backend
   // as well as the callback mechanism for the other backends
   class Updater implements GLEventListener {
@@ -628,18 +667,21 @@ public void reshape(int x, int y, int width, int height) {
       this.g = g;
     }
 
+    @Override
     public void init(GLAutoDrawable drawable) {
       if (!backend.preGL(g)) {
         return;
       }
-      drawableHelper.init(GLJPanel.this);
+      helper.init(GLJPanel.this);
       backend.postGL(g, false);
     }
 
+    @Override
     public void dispose(GLAutoDrawable drawable) {
-      drawableHelper.dispose(GLJPanel.this);
+      helper.dispose(GLJPanel.this);
     }
 
+    @Override
     public void display(GLAutoDrawable drawable) {
       if (!backend.preGL(g)) {
         return;
@@ -648,14 +690,15 @@ public void reshape(int x, int y, int width, int height) {
         if (DEBUG) {
           System.err.println(getThreadName()+": GLJPanel.display: reshape(" + viewportX + "," + viewportY + " " + panelWidth + "x" + panelHeight + ")");
         }
-        drawableHelper.reshape(GLJPanel.this, viewportX, viewportY, panelWidth, panelHeight);
+        helper.reshape(GLJPanel.this, viewportX, viewportY, panelWidth, panelHeight);
         sendReshape = false;
       }
 
-      drawableHelper.display(GLJPanel.this);
+      helper.display(GLJPanel.this);
       backend.postGL(g, true);
     }
 
+    @Override
     public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
       // This is handled above and dispatched directly to the appropriate context
     }
@@ -664,43 +707,49 @@ public void reshape(int x, int y, int width, int height) {
     }
   }
 
+  @Override
   public String toString() {
     return "AWT-GLJPanel[ "+((null!=backend)?backend.getDrawable().getClass().getName():"null-drawable")+"]";
   }
 
   private final Runnable postDisposeAction = new Runnable() {
+      @Override
       public void run() {
           if (backend != null && !backend.isUsingOwnThreadManagment()) {
               backend.destroy();
               backend = null;
-              isInitialized = false;      
+              isInitialized = false;
           }
       }
-  }; 
+  };
 
   private final Runnable disposeAction = new Runnable() {
+    @Override
     public void run() {
-      drawableHelper.disposeGL(GLJPanel.this, backend.getDrawable(), backend.getContext(), postDisposeAction);
+      helper.disposeGL(GLJPanel.this, backend.getDrawable(), backend.getContext(), postDisposeAction);
     }
-  }; 
+  };
 
   private final Runnable updaterInitAction = new Runnable() {
+    @Override
     public void run() {
       updater.init(GLJPanel.this);
     }
   };
 
   private final Runnable updaterDisplayAction = new Runnable() {
+    @Override
     public void run() {
       updater.display(GLJPanel.this);
     }
   };
 
   private final Runnable paintImmediatelyAction = new Runnable() {
+    @Override
     public void run() {
       paintImmediately(0, 0, getWidth(), getHeight());
     }
-  }; 
+  };
 
   private int getNextPowerOf2(int number) {
     // Workaround for problems where 0 width or height are transiently
@@ -720,7 +769,7 @@ public void reshape(int x, int y, int width, int height) {
   protected static String getThreadName() {
     return Thread.currentThread().getName();
   }
-    
+
   //----------------------------------------------------------------------
   // Implementations of the various backends
   //
@@ -731,7 +780,7 @@ public void reshape(int x, int y, int width, int height) {
   static interface Backend {
     // Create, Destroy, ..
     public boolean isUsingOwnThreadManagment();
-    
+
     // Called each time the backend needs to initialize itself
     public void initialize();
 
@@ -801,6 +850,7 @@ public void reshape(int x, int y, int width, int height) {
     private int[] skippixels   = new int[1];
     private int[] alignment    = new int[1];
 
+    @Override
     public void setOpaque(boolean opaque) {
       if (opaque != isOpaque()) {
         if (offscreenImage != null) {
@@ -810,11 +860,13 @@ public void reshape(int x, int y, int width, int height) {
       }
     }
 
+    @Override
     public boolean preGL(Graphics g) {
       // Empty in this implementation
       return true;
     }
 
+    @Override
     public void postGL(Graphics g, boolean isDisplay) {
       if (isDisplay) {
         // Must now copy pixels from offscreen context into surface
@@ -938,6 +990,7 @@ public void reshape(int x, int y, int width, int height) {
       }
     }
 
+    @Override
     public void doPaintComponent(Graphics g) {
       doPaintComponentImpl();
       if (offscreenImage != null) {
@@ -959,8 +1012,10 @@ public void reshape(int x, int y, int width, int height) {
     private GLDrawableImpl offscreenDrawable;
     private GLContextImpl offscreenContext;
 
+    @Override
     public boolean isUsingOwnThreadManagment() { return false; }
-    
+
+    @Override
     public void initialize() {
       if(DEBUG) {
           System.err.println(getThreadName()+": SoftwareBackend: initialize()");
@@ -975,10 +1030,11 @@ public void reshape(int x, int y, int width, int height) {
       offscreenDrawable.setRealized(true);
       offscreenContext = (GLContextImpl) offscreenDrawable.createContext(shareWith);
       offscreenContext.setContextCreationFlags(additionalCtxCreationFlags);
-      
+
       isInitialized = true;
     }
 
+    @Override
     public void destroy() {
       if(DEBUG) {
           System.err.println(getThreadName()+": SoftwareBackend: destroy() - offscreenContext: "+(null!=offscreenContext)+" - offscreenDrawable: "+(null!=offscreenDrawable));
@@ -989,7 +1045,7 @@ public void reshape(int x, int y, int width, int height) {
       }
       if (offscreenDrawable != null) {
         final AbstractGraphicsDevice adevice = offscreenDrawable.getNativeSurface().getGraphicsConfiguration().getScreen().getDevice();
-        offscreenDrawable.destroy();
+        offscreenDrawable.setRealized(false);
         offscreenDrawable = null;
         if(null != adevice) {
             adevice.close();
@@ -997,22 +1053,27 @@ public void reshape(int x, int y, int width, int height) {
       }
     }
 
+    @Override
     public GLContext createContext(GLContext shareWith) {
       return (null != offscreenDrawable) ? offscreenDrawable.createContext(shareWith) : null;
     }
 
+    @Override
     public void setContext(GLContext ctx) {
       offscreenContext=(GLContextImpl)ctx;
     }
 
+    @Override
     public GLContext getContext() {
       return offscreenContext;
     }
 
+    @Override
     public GLDrawable getDrawable() {
         return offscreenDrawable;
     }
 
+    @Override
     public GLCapabilitiesImmutable getChosenGLCapabilities() {
       if (offscreenDrawable == null) {
         return null;
@@ -1020,6 +1081,7 @@ public void reshape(int x, int y, int width, int height) {
       return offscreenDrawable.getChosenGLCapabilities();
     }
 
+    @Override
     public GLProfile getGLProfile() {
       if (offscreenDrawable == null) {
         return null;
@@ -1027,6 +1089,7 @@ public void reshape(int x, int y, int width, int height) {
       return offscreenDrawable.getGLProfile();
     }
 
+    @Override
     public void handleReshape() {
       destroy();
       initialize();
@@ -1039,14 +1102,17 @@ public void reshape(int x, int y, int width, int height) {
       }
     }
 
+    @Override
     protected void doPaintComponentImpl() {
-      drawableHelper.invokeGL(offscreenDrawable, offscreenContext, updaterDisplayAction, updaterInitAction);
+      helper.invokeGL(offscreenDrawable, offscreenContext, updaterDisplayAction, updaterInitAction);
     }
 
+    @Override
     protected int getGLPixelType() {
       return offscreenContext.getOffscreenContextPixelDataType();
     }
 
+    @Override
     protected boolean flipVertically() {
       return offscreenContext.offscreenImageNeedsVerticalFlip();
     }
@@ -1057,8 +1123,10 @@ public void reshape(int x, int y, int width, int height) {
     private int       pbufferWidth  = 256;
     private int       pbufferHeight = 256;
 
+    @Override
     public boolean isUsingOwnThreadManagment() { return false; }
-    
+
+    @Override
     public void initialize() {
       if (pbuffer != null) {
         throw new InternalError("Creating pbuffer twice without destroying it (memory leak / correctness bug)");
@@ -1073,7 +1141,7 @@ public void reshape(int x, int y, int width, int height) {
                                           pbufferWidth,
                                           pbufferHeight,
                                           shareWith);
-        pbuffer.setContextCreationFlags(additionalCtxCreationFlags);        
+        pbuffer.setContextCreationFlags(additionalCtxCreationFlags);
         pbuffer.addGLEventListener(updater);
         isInitialized = true;
       } catch (GLException e) {
@@ -1088,6 +1156,7 @@ public void reshape(int x, int y, int width, int height) {
       }
     }
 
+    @Override
     public void destroy() {
       if(DEBUG) {
           System.err.println(getThreadName()+": PbufferBackend: destroy() - pbuffer: "+(null!=pbuffer));
@@ -1098,43 +1167,50 @@ public void reshape(int x, int y, int width, int height) {
       }
     }
 
+    @Override
     public GLContext createContext(GLContext shareWith) {
       return (null != pbuffer) ? pbuffer.createContext(shareWith) : null;
     }
 
+    @Override
     public void setContext(GLContext ctx) {
-      if (pbuffer == null && Beans.isDesignTime()) {
+      if (pbuffer == null || Beans.isDesignTime()) {
         return;
       }
       pbuffer.setContext(ctx);
     }
 
+    @Override
     public GLContext getContext() {
       // Workaround for crashes in NetBeans GUI builder
-      if (pbuffer == null && Beans.isDesignTime()) {
+      if (null == pbuffer || Beans.isDesignTime()) {
         return null;
       }
       return pbuffer.getContext();
     }
 
+    @Override
     public GLDrawable getDrawable() {
         return pbuffer;
     }
 
+    @Override
     public GLCapabilitiesImmutable getChosenGLCapabilities() {
       if (pbuffer == null) {
         return null;
       }
       return pbuffer.getChosenGLCapabilities();
     }
-    
+
+    @Override
     public GLProfile getGLProfile() {
       if (pbuffer == null) {
         return null;
       }
       return pbuffer.getGLProfile();
     }
-    
+
+    @Override
     public void handleReshape() {
       // Use factor larger than 2 during shrinks for some hysteresis
       float shrinkFactor = 2.5f;
@@ -1192,15 +1268,18 @@ public void reshape(int x, int y, int width, int height) {
       }
     }
 
+    @Override
     protected void doPaintComponentImpl() {
       pbuffer.display();
     }
 
+    @Override
     protected int getGLPixelType() {
       // This seems to be a good choice on all platforms
       return GL2.GL_UNSIGNED_INT_8_8_8_8_REV;
     }
 
+    @Override
     protected boolean flipVertically() {
       return true;
     }
@@ -1255,8 +1334,10 @@ public void reshape(int x, int y, int width, int height) {
     // comment related to Issue 274 below
     private GraphicsConfiguration workaroundConfig;
 
+    @Override
     public boolean isUsingOwnThreadManagment() { return true; }
-    
+
+    @Override
     public void initialize() {
       if(DEBUG) {
           System.err.println(getThreadName()+": J2DOGL: initialize()");
@@ -1265,8 +1346,10 @@ public void reshape(int x, int y, int width, int height) {
       isInitialized = true;
     }
 
+    @Override
     public void destroy() {
       Java2D.invokeWithOGLContextCurrent(null, new Runnable() {
+          @Override
           public void run() {
             if(DEBUG) {
                 System.err.println(getThreadName()+": J2DOGL: destroy() - joglContext: "+(null!=joglContext)+" - joglDrawable: "+(null!=joglDrawable));
@@ -1284,10 +1367,12 @@ public void reshape(int x, int y, int width, int height) {
         });
     }
 
+    @Override
     public void setOpaque(boolean opaque) {
       // Empty in this implementation
     }
 
+    @Override
     public GLContext createContext(GLContext shareWith) {
       if(null != shareWith) {
           throw new GLException("J2DOGLBackend cannot create context w/ additional shared context, since it already needs to share the context w/ J2D.");
@@ -1295,32 +1380,39 @@ public void reshape(int x, int y, int width, int height) {
       return (null != joglDrawable && null != j2dContext) ? joglDrawable.createContext(j2dContext) : null;
     }
 
+    @Override
     public void setContext(GLContext ctx) {
         joglContext=ctx;
     }
 
+    @Override
     public GLContext getContext() {
       return joglContext;
     }
 
+    @Override
     public GLDrawable getDrawable() {
         return joglDrawable;
     }
 
+    @Override
     public GLCapabilitiesImmutable getChosenGLCapabilities() {
       // FIXME: should do better than this; is it possible to using only platform-independent code?
       return new GLCapabilities(null);
     }
 
+    @Override
     public GLProfile getGLProfile() {
       // FIXME: should do better than this; is it possible to using only platform-independent code?
       return GLProfile.getDefault(GLProfile.getDefaultDevice());
     }
 
+    @Override
     public void handleReshape() {
       // Empty in this implementation
     }
 
+    @Override
     public boolean preGL(Graphics g) {
       GL2 gl = joglContext.getGL().getGL2();
       // Set up needed state in JOGL context from Java2D context
@@ -1403,13 +1495,13 @@ public void reshape(int x, int y, int width, int height) {
           int[] height = new int[1];
           gl.glGetTexLevelParameteriv(fboTextureTarget, 0, GL2.GL_TEXTURE_WIDTH, width, 0);
           gl.glGetTexLevelParameteriv(fboTextureTarget, 0, GL2.GL_TEXTURE_HEIGHT, height, 0);
-                    
+
           gl.glGenRenderbuffers(1, frameBufferDepthBuffer, 0);
           if (DEBUG) {
             System.err.println(getThreadName()+": GLJPanel: Generated frameBufferDepthBuffer " + frameBufferDepthBuffer[0] +
                                " with width " + width[0] + ", height " + height[0]);
           }
-                    
+
           gl.glBindRenderbuffer(GL.GL_RENDERBUFFER, frameBufferDepthBuffer[0]);
           // FIXME: may need a loop here like in Java2D
           gl.glRenderbufferStorage(GL.GL_RENDERBUFFER, GL2GL3.GL_DEPTH_COMPONENT24, width[0], height[0]);
@@ -1457,6 +1549,7 @@ public void reshape(int x, int y, int width, int height) {
       return true;
     }
 
+    @Override
     public void postGL(Graphics g, boolean isDisplay) {
       // Cause OpenGL pipeline to flush its results because
       // otherwise it's possible we will buffer up multiple frames'
@@ -1473,6 +1566,7 @@ public void reshape(int x, int y, int width, int height) {
       }
     }
 
+    @Override
     public void doPaintComponent(final Graphics g) {
       // This is a workaround for an issue in the Java 2D / JOGL
       // bridge (reported by an end user as JOGL Issue 274) where Java
@@ -1498,10 +1592,12 @@ public void reshape(int x, int y, int width, int height) {
             getDefaultScreenDevice().
             getDefaultConfiguration();
         }
-        Java2D.invokeWithOGLSharedContextCurrent(workaroundConfig, new Runnable() { public void run() {}});
+        Java2D.invokeWithOGLSharedContextCurrent(workaroundConfig, new Runnable() { @Override
+        public void run() {}});
       }
 
       Java2D.invokeWithOGLContextCurrent(g, new Runnable() {
+          @Override
           public void run() {
             if (DEBUG) {
               System.err.println(getThreadName()+": GLJPanel.invokeWithOGLContextCurrent");
@@ -1625,7 +1721,7 @@ public void reshape(int x, int y, int width, int height) {
                   ((Java2DGLContext) joglContext).setGraphics(g);
                 }
 
-                drawableHelper.invokeGL(joglDrawable, joglContext, updaterDisplayAction, updaterInitAction);
+                helper.invokeGL(joglDrawable, joglContext, updaterDisplayAction, updaterInitAction);
               }
             } finally {
               j2dContext.release();
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PES2.java b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PES2.java
index 804e9ee..aabef29 100644
--- a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PES2.java
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PES2.java
@@ -32,7 +32,6 @@ import java.nio.FloatBuffer;
 import javax.media.opengl.GL2ES2;
 // FIXME: Subsume GL2GL3.GL_DRAW_FRAMEBUFFER -> GL2ES2.GL_DRAW_FRAMEBUFFER ! 
 import javax.media.opengl.GL;
-import javax.media.opengl.GLException;
 import javax.media.opengl.GLUniformData;
 import javax.media.opengl.fixedfunc.GLMatrixFunc;
 
@@ -45,7 +44,9 @@ import com.jogamp.graph.geom.Vertex;
 
 import com.jogamp.graph.curve.opengl.GLRegion;
 import com.jogamp.graph.curve.opengl.RenderState;
-import com.jogamp.opengl.util.FBObject;
+import com.jogamp.opengl.FBObject;
+import com.jogamp.opengl.FBObject.Attachment;
+import com.jogamp.opengl.FBObject.TextureAttachment;
 import com.jogamp.opengl.util.GLArrayDataServer;
 import com.jogamp.opengl.util.PMVMatrix;
 import com.jogamp.opengl.util.glsl.ShaderState;
@@ -60,6 +61,7 @@ public class VBORegion2PES2  extends GLRegion {
     
     
     private FBObject fbo;
+    private TextureAttachment texA;
     private PMVMatrix fboPMVMatrix;
     GLUniformData mgl_fboPMVMatrix;
     
@@ -72,7 +74,7 @@ public class VBORegion2PES2  extends GLRegion {
         super(renderModes);
         fboPMVMatrix = new PMVMatrix();
         mgl_fboPMVMatrix = new GLUniformData(UniformNames.gcu_PMVMatrix, 4, 4, fboPMVMatrix.glGetPMvMatrixf());        
-        mgl_ActiveTexture = new GLUniformData(UniformNames.gcu_TextureUnit, textureEngine);        
+        mgl_ActiveTexture = new GLUniformData(UniformNames.gcu_TextureUnit, textureEngine);    
     }
     
     public void update(GL2ES2 gl, RenderState rs) {
@@ -214,8 +216,9 @@ public class VBORegion2PES2  extends GLRegion {
         final ShaderState st = rs.getShaderState();
         
         gl.glViewport(0, 0, width, hight);        
-        st.uniform(gl, mgl_ActiveTexture);        
-        fbo.use(gl, 0);                        
+        st.uniform(gl, mgl_ActiveTexture);    
+        gl.glActiveTexture(GL.GL_TEXTURE0 + mgl_ActiveTexture.intValue());
+        fbo.use(gl, texA);                        
         verticeFboAttr.enableBuffer(gl, true);       
         texCoordFboAttr.enableBuffer(gl, true);
         indicesFbo.enableBuffer(gl, true);
@@ -244,20 +247,16 @@ public class VBORegion2PES2  extends GLRegion {
         // System.out.println("FBO Scale: " + m.glGetMatrixf().get(0) +" " + m.glGetMatrixf().get(5));
         
         if(null != fbo && fbo.getWidth() != tex_width_c && fbo.getHeight() != tex_height_c ) {
-            fbo.destroy(gl);
-            fbo = null;
+            fbo.reset(gl, tex_width_c, tex_height_c);
         }
         
-        if(null == fbo) {        
-            fbo = new FBObject(tex_width_c, tex_height_c);
-            fbo.init(gl); 
+        if(null == fbo) {  
+            fbo = new FBObject();
+            fbo.reset(gl, tex_width_c, tex_height_c); 
             // FIXME: shall not use bilinear, due to own AA ? However, w/o bilinear result is not smooth
-            fbo.attachTexture2D(gl, mgl_ActiveTexture.intValue(), GL2ES2.GL_LINEAR, GL2ES2.GL_LINEAR, GL2ES2.GL_CLAMP_TO_EDGE, GL2ES2.GL_CLAMP_TO_EDGE);
-            // fbo.attachTexture2D(gl, mgl_ActiveTexture.intValue(), GL2ES2.GL_NEAREST, GL2ES2.GL_NEAREST, GL2ES2.GL_CLAMP_TO_EDGE, GL2ES2.GL_CLAMP_TO_EDGE);
-            fbo.attachDepthBuffer(gl, GL.GL_DEPTH_COMPONENT16); // FIXME: or shall we use 24 or 32 bit depth ?
-            if(!fbo.isStatusValid()) {
-                throw new GLException("FBO invalid: "+fbo);
-            }
+            texA = fbo.attachTexture2D(gl, 0, true, GL2ES2.GL_LINEAR, GL2ES2.GL_LINEAR, GL2ES2.GL_CLAMP_TO_EDGE, GL2ES2.GL_CLAMP_TO_EDGE);
+            // texA = fbo.attachTexture2D(gl, 0, GL2ES2.GL_NEAREST, GL2ES2.GL_NEAREST, GL2ES2.GL_CLAMP_TO_EDGE, GL2ES2.GL_CLAMP_TO_EDGE);
+            fbo.attachRenderbuffer(gl, Attachment.Type.DEPTH, 24);
         } else {
             fbo.bind(gl);
         }
@@ -305,6 +304,7 @@ public class VBORegion2PES2  extends GLRegion {
         if(null != fbo) {
             fbo.destroy(gl);
             fbo = null;
+            texA = null;
         }        
         if(null != verticeTxtAttr) {
             st.ownAttribute(verticeTxtAttr, false);
diff --git a/src/jogl/classes/jogamp/opengl/GLAutoDrawableBase.java b/src/jogl/classes/jogamp/opengl/GLAutoDrawableBase.java
new file mode 100644
index 0000000..cc4e1b4
--- /dev/null
+++ b/src/jogl/classes/jogamp/opengl/GLAutoDrawableBase.java
@@ -0,0 +1,532 @@
+/**
+ * Copyright 2012 JogAmp Community. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ * 
+ *    1. Redistributions of source code must retain the above copyright notice, this list of
+ *       conditions and the following disclaimer.
+ * 
+ *    2. Redistributions in binary form must reproduce the above copyright notice, this list
+ *       of conditions and the following disclaimer in the documentation and/or other materials
+ *       provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * 
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of JogAmp Community.
+ */
+ 
+package jogamp.opengl;
+
+import java.io.PrintStream;
+
+import javax.media.nativewindow.AbstractGraphicsConfiguration;
+import javax.media.nativewindow.AbstractGraphicsDevice;
+import javax.media.nativewindow.NativeSurface;
+import javax.media.nativewindow.WindowClosingProtocol;
+import javax.media.nativewindow.WindowClosingProtocol.WindowClosingMode;
+import javax.media.opengl.FPSCounter;
+import javax.media.opengl.GL;
+import javax.media.opengl.GLAnimatorControl;
+import javax.media.opengl.GLAutoDrawable;
+import javax.media.opengl.GLAutoDrawableDelegate;
+import javax.media.opengl.GLCapabilitiesImmutable;
+import javax.media.opengl.GLContext;
+import javax.media.opengl.GLDrawable;
+import javax.media.opengl.GLEventListener;
+import javax.media.opengl.GLException;
+import javax.media.opengl.GLProfile;
+import javax.media.opengl.GLRunnable;
+
+import com.jogamp.common.util.locks.RecursiveLock;
+import com.jogamp.opengl.util.Animator;
+
+
+/**
+ * Abstract common code for GLAutoDrawable implementations.
+ * 
+ * @see GLAutoDrawable
+ * @see GLAutoDrawableDelegate
+ * @see GLPBufferImpl
+ * @see GLWindow
+ */
+public abstract class GLAutoDrawableBase implements GLAutoDrawable, FPSCounter {
+    public static final boolean DEBUG = Debug.debug("GLAutoDrawable");
+    
+    protected final GLDrawableHelper helper = new GLDrawableHelper();
+    protected final FPSCounterImpl fpsCounter = new FPSCounterImpl();
+    
+    protected volatile GLDrawableImpl drawable; // volatile: avoid locking for read-only access
+    protected GLContextImpl context;
+    protected final boolean ownDevice;
+    protected int additionalCtxCreationFlags = 0;
+    protected volatile boolean sendReshape = false; // volatile: maybe written by WindowManager thread w/o locking
+    protected volatile boolean sendDestroy = false; // volatile: maybe written by WindowManager thread w/o locking
+
+    /**
+     * @param drawable a valid {@link GLDrawableImpl}, may not be realized yet.
+     * @param context a valid {@link GLContextImpl}, may not be made current (created) yet.
+     * @param ownDevice pass <code>true</code> if {@link AbstractGraphicsDevice#close()} shall be issued,
+     *                  otherwise pass <code>false</code>. Closing the device is required in case
+     *                  the drawable is created w/ it's own new instance, e.g. offscreen drawables,
+     *                  and no further lifecycle handling is applied.
+     */
+    public GLAutoDrawableBase(GLDrawableImpl drawable, GLContextImpl context, boolean ownDevice) {
+        this.drawable = drawable;
+        this.context = context;
+        this.ownDevice = ownDevice;
+        resetFPSCounter();        
+    }
+   
+    protected abstract RecursiveLock getLock();
+    
+    /** Returns the delegated GLDrawable */
+    public final GLDrawable getDelegatedDrawable() { return drawable; }
+    
+    /** Default implementation to handle repaint events from the windowing system */
+    protected final void defaultWindowRepaintOp() {
+        final GLDrawable _drawable = drawable;
+        if( null != _drawable && _drawable.isRealized() ) {
+            if( !_drawable.getNativeSurface().isSurfaceLockedByOtherThread() && !helper.isAnimatorAnimating() ) {
+                display();
+            }
+        }
+    }
+    
+    /** Default implementation to handle resize events from the windowing system */
+    protected final void defaultWindowResizedOp() {
+        final GLDrawable _drawable = drawable;
+        if( null!=_drawable ) {
+            if(DEBUG) {
+                System.err.println("GLAutoDrawableBase.sizeChanged: ("+Thread.currentThread().getName()+"): "+getWidth()+"x"+getHeight()+" - surfaceHandle 0x"+Long.toHexString(getNativeSurface().getSurfaceHandle()));
+            }
+            sendReshape = true; // async if display() doesn't get called below, but avoiding deadlock
+            if( _drawable.isRealized() ) {
+                if( !_drawable.getNativeSurface().isSurfaceLockedByOtherThread() && !helper.isAnimatorAnimating() ) {
+                    display();
+                }
+            }        
+        }
+    }
+
+    /** 
+     * Default implementation to handle destroy notifications from the windowing system.
+     * 
+     * <p>
+     * If the {@link NativeSurface} does not implement {@link WindowClosingProtocol} 
+     * or {@link WindowClosingMode#DISPOSE_ON_CLOSE} is enabled (default),
+     * {@link #defaultDestroy()} is being called.
+     * </p> 
+     */
+    protected final void defaultWindowDestroyNotifyOp() {
+        final NativeSurface ns = getNativeSurface();
+        final boolean shallClose;
+        if(ns instanceof WindowClosingProtocol) {
+            shallClose = WindowClosingMode.DISPOSE_ON_CLOSE == ((WindowClosingProtocol)ns).getDefaultCloseOperation();
+        } else {
+            shallClose = true;
+        }        
+        if( shallClose ) {
+            destroyAvoidAwareOfLocking();
+        }                
+    }
+
+    /**
+     * Calls {@link #destroy()} 
+     * directly if the following requirements are met:
+     * <ul>
+     *   <li>An {@link GLAnimatorControl} is bound (see {@link #getAnimator()}) and running on another thread. 
+     *       Here we pause the animation while issuing the destruction.</li>
+     *   <li>Surface is not locked by another thread (considered anonymous).</li>
+     * </ul>
+     * <p>
+     * Otherwise destroy is being flagged to be called within the next 
+     * call of display().
+     * </p>
+     * <p>
+     * This method is being used to avoid deadlock if
+     * destruction is desired by <i>other</i> threads, e.g. the window manager.
+     * </p>
+     * @see #defaultWindowDestroyNotifyOp()
+     * @see #defaultDisplay()
+     */
+    protected final void destroyAvoidAwareOfLocking() {
+        final NativeSurface ns = getNativeSurface();
+        
+        final GLAnimatorControl ctrl = helper.getAnimator();
+        
+        // Is an animator thread perform rendering?
+        if ( helper.isAnimatorRunningOnOtherThread() ) {
+            // Pause animations before initiating safe destroy.
+            final boolean isPaused = ctrl.pause();
+            destroy();
+            if(isPaused) {
+                ctrl.resume();
+            }
+        } else if (null != ns && ns.isSurfaceLockedByOtherThread()) {
+            // surface is locked by another thread
+            // Flag that destroy should be performed on the next
+            // attempt to display.
+            sendDestroy = true; // async, but avoiding deadlock
+        } else {
+            // Without an external thread animating or locking the
+            // surface, we are safe.
+            destroy();
+        }
+    }
+    
+    /**
+     * Calls {@link #destroyImplInLock()} while claiming the lock.
+     */
+    protected final void defaultDestroy() {
+        final RecursiveLock lock = getLock();
+        lock.lock();
+        try {
+            destroyImplInLock();
+        } finally {
+            lock.unlock();
+        }
+    }
+    
+    /**
+     * Default implementation to destroys the drawable and context of this GLAutoDrawable:
+     * <ul>
+     *   <li>issues the GLEventListener dispose call, if drawable and context are valid</li>
+     *   <li>destroys the GLContext, if valid</li>
+     *   <li>destroys the GLDrawable, if valid</li>
+     * </ul>
+     * <p>Method assumes the lock is being hold.</p>
+     * <p>Override it to extend it to destroy your resources, i.e. the actual window.
+     * In such case call <code>super.destroyImplInLock</code> first.</p>
+     */
+    protected void destroyImplInLock() {
+        final GLContext _context = context;
+        final GLDrawable _drawable = drawable;
+        if( null != _drawable ) {
+            if( _drawable.isRealized() ) {
+                if( null != _context && _context.isCreated() ) {
+                    // Catch dispose GLExceptions by GLEventListener, just 'print' them
+                    // so we can continue with the destruction.
+                    try {
+                        helper.disposeGL(this, _drawable, _context, null);
+                    } catch (GLException gle) {
+                        gle.printStackTrace();
+                    }
+                }
+                _drawable.setRealized(false);
+            }
+            if( ownDevice ) {
+                _drawable.getNativeSurface().getGraphicsConfiguration().getScreen().getDevice().close();
+            }
+        }
+        context = null;
+        drawable = null;        
+    }
+    
+    public final void defaultSwapBuffers() throws GLException {
+        final RecursiveLock _lock = getLock();
+        _lock.lock();
+        try {            
+            if(drawable!=null && context != null) {
+                drawable.swapBuffers();
+                helper.invokeGL(drawable, context, defaultSwapAction, defaultInitAction);
+            }
+        } finally {
+            _lock.unlock();
+        }
+    }
+
+    //
+    // GLAutoDrawable
+    //
+    
+    protected final Runnable defaultInitAction = new Runnable() {
+        @Override
+        public final void run() {
+            // Lock: Locked Surface/Window by MakeCurrent/Release
+            helper.init(GLAutoDrawableBase.this);
+            resetFPSCounter();
+        } };
+
+    protected final Runnable defaultDisplayAction = new Runnable() {
+        @Override
+        public final void run() {
+            // Lock: Locked Surface/Window by display _and_ MakeCurrent/Release
+            if (sendReshape) {
+                helper.reshape(GLAutoDrawableBase.this, 0, 0, getWidth(), getHeight());
+                sendReshape = false;
+            }
+            helper.display(GLAutoDrawableBase.this);
+            fpsCounter.tickFPS();
+        } };
+
+    protected final void defaultDisplay() {
+        if( sendDestroy ) {
+            sendDestroy=false;
+            destroy();
+            return;
+        }
+        final RecursiveLock _lock = getLock();        
+        _lock.lock();
+        try {
+            if( null != context ) {
+                // surface is locked/unlocked implicit by context's makeCurrent/release
+                helper.invokeGL(drawable, context, defaultDisplayAction, defaultInitAction);
+            }
+        } finally {
+            _lock.unlock();
+        }
+    }
+        
+    protected final Runnable defaultSwapAction = new Runnable() {
+        @Override
+        public final void run() {
+            drawable.swapBuffers();
+        } } ;
+        
+    @Override
+    public final GLContext getContext() {
+        return context;
+    }
+
+    @Override
+    public final GLContext setContext(GLContext newCtx) {
+        final RecursiveLock lock = getLock();
+        lock.lock();
+        try {
+            final GLContext oldCtx = context;
+            final boolean newCtxCurrent = helper.switchContext(drawable, oldCtx, newCtx, additionalCtxCreationFlags);
+            context=(GLContextImpl)newCtx;
+            if(newCtxCurrent) {
+                context.makeCurrent();
+            }
+            return oldCtx;
+        } finally {
+            lock.unlock();
+        }
+    }
+
+    @Override
+    public final GL getGL() {
+        final GLContext _context = context;
+        if (_context == null) {
+            return null;
+        }
+        return _context.getGL();
+    }
+
+    @Override
+    public final GL setGL(GL gl) {
+        final GLContext _context = context;
+        if (_context != null) {
+            _context.setGL(gl);
+            return gl;
+        }
+        return null;
+    }
+
+    @Override
+    public final void addGLEventListener(GLEventListener listener) {
+        helper.addGLEventListener(listener);
+    }
+
+    @Override
+    public final void addGLEventListener(int index, GLEventListener listener) throws IndexOutOfBoundsException {
+        helper.addGLEventListener(index, listener);        
+    }
+
+    @Override
+    public final void removeGLEventListener(GLEventListener listener) {
+        helper.removeGLEventListener(listener);        
+    }
+    
+    @Override
+    public GLEventListener removeGLEventListener(int index) throws IndexOutOfBoundsException {
+        return helper.removeGLEventListener(index);
+    }
+    
+    @Override
+    public final void setAnimator(GLAnimatorControl animatorControl)
+            throws GLException {
+        helper.setAnimator(animatorControl);        
+    }
+
+    @Override
+    public final GLAnimatorControl getAnimator() {
+        return helper.getAnimator();
+    }
+
+    @Override
+    public final boolean invoke(boolean wait, GLRunnable glRunnable) {
+        return helper.invoke(this, wait, glRunnable);        
+    }
+
+    @Override
+    public final void setAutoSwapBufferMode(boolean enable) {
+        helper.setAutoSwapBufferMode(enable);        
+    }
+
+    @Override
+    public final boolean getAutoSwapBufferMode() {
+        return helper.getAutoSwapBufferMode();
+    }
+
+    @Override
+    public final void setContextCreationFlags(int flags) {
+        additionalCtxCreationFlags = flags;        
+        final GLContext _context = context;
+        if(null != _context) {
+            _context.setContextCreationFlags(additionalCtxCreationFlags);
+        }
+    }
+
+    @Override
+    public final int getContextCreationFlags() {
+        return additionalCtxCreationFlags;
+    }
+
+    //
+    // FPSCounter
+    //
+    
+    @Override
+    public final void setUpdateFPSFrames(int frames, PrintStream out) {
+        fpsCounter.setUpdateFPSFrames(frames, out);
+    }
+
+    @Override
+    public final void resetFPSCounter() {
+        fpsCounter.resetFPSCounter();
+    }
+
+    @Override
+    public final int getUpdateFPSFrames() {
+        return fpsCounter.getUpdateFPSFrames();
+    }
+
+    @Override
+    public final long getFPSStartTime()   {
+        return fpsCounter.getFPSStartTime();
+    }
+
+    @Override
+    public final long getLastFPSUpdateTime() {
+        return fpsCounter.getLastFPSUpdateTime();
+    }
+
+    @Override
+    public final long getLastFPSPeriod() {
+        return fpsCounter.getLastFPSPeriod();
+    }
+
+    @Override
+    public final float getLastFPS() {
+        return fpsCounter.getLastFPS();
+    }
+
+    @Override
+    public final int getTotalFPSFrames() {
+        return fpsCounter.getTotalFPSFrames();
+    }
+
+    @Override
+    public final long getTotalFPSDuration() {
+        return fpsCounter.getTotalFPSDuration();
+    }
+
+    @Override
+    public final float getTotalFPS() {
+        return fpsCounter.getTotalFPS();
+    }
+    
+    //
+    // GLDrawable delegation
+    //
+        
+    @Override
+    public final GLContext createContext(final GLContext shareWith) {
+        final RecursiveLock lock = getLock();
+        lock.lock();
+        try {
+            if(drawable != null) {
+                final GLContext _ctx = drawable.createContext(shareWith);
+                _ctx.setContextCreationFlags(additionalCtxCreationFlags);
+                return _ctx;
+            }
+            return null;
+        } finally {
+            lock.unlock();
+        }
+    }
+
+    @Override
+    public final boolean isRealized() {
+        final GLDrawable _drawable = drawable;
+        return null != _drawable ? _drawable.isRealized() : false;
+    }
+
+    @Override
+    public int getWidth() {
+        final GLDrawable _drawable = drawable;
+        return null != _drawable ? _drawable.getWidth() : 0;
+    }
+
+    @Override
+    public int getHeight() {
+        final GLDrawable _drawable = drawable;
+        return null != _drawable ? _drawable.getHeight() : 0;
+    }
+
+    /**
+     * @param t the thread for which context release shall be skipped, usually the animation thread,
+     *          ie. {@link Animator#getThread()}.
+     * @deprecated this is an experimental feature,
+     *             intended for measuring performance in regards to GL context switch
+     */
+    @Deprecated
+    public void setSkipContextReleaseThread(Thread t) {
+        helper.setSkipContextReleaseThread(t);
+    }
+
+    /**
+     * @deprecated see {@link #setSkipContextReleaseThread(Thread)}
+     */
+    @Deprecated
+    public Thread getSkipContextReleaseThread() {
+        return helper.getSkipContextReleaseThread();
+    }
+
+    @Override
+    public final GLCapabilitiesImmutable getChosenGLCapabilities() {
+        final GLDrawable _drawable = drawable;
+        return null != _drawable ? _drawable.getChosenGLCapabilities() : null;
+    }
+
+    @Override
+    public final GLProfile getGLProfile() {
+        final GLDrawable _drawable = drawable;
+        return null != _drawable ? _drawable.getGLProfile() : null;
+    }
+
+    @Override
+    public final NativeSurface getNativeSurface() {
+        final GLDrawable _drawable = drawable;
+        return null != _drawable ? _drawable.getNativeSurface() : null;
+    }
+
+    @Override
+    public final long getHandle() {
+        final GLDrawable _drawable = drawable;
+        return null != _drawable ? _drawable.getHandle() : 0;
+    }
+}
diff --git a/src/jogl/classes/jogamp/opengl/GLContextImpl.java b/src/jogl/classes/jogamp/opengl/GLContextImpl.java
index 51201b3..bf6a0ee 100644
--- a/src/jogl/classes/jogamp/opengl/GLContextImpl.java
+++ b/src/jogl/classes/jogamp/opengl/GLContextImpl.java
@@ -1,22 +1,22 @@
 /*
  * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
  * Copyright (c) 2010 JogAmp Community. All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- * 
+ *
  * - Redistribution of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
- * 
+ *
  * - Redistribution in binary form must reproduce the above copyright
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the distribution.
- * 
+ *
  * Neither the name of Sun Microsystems, Inc. or the names of
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * This software is provided "AS IS," without a warranty of any kind. ALL
  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -29,11 +29,11 @@
  * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
  * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
  * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
+ *
  * You acknowledge that this software is not designed or intended for use
  * in the design, construction, operation or maintenance of any nuclear
  * facility.
- * 
+ *
  * Sun gratefully acknowledges that this software was originally authored
  * and developed by Kenneth Bradley Russell and Christopher John Kline.
  */
@@ -49,14 +49,15 @@ import com.jogamp.common.os.DynamicLookupHelper;
 import com.jogamp.common.util.ReflectionUtil;
 import com.jogamp.gluegen.runtime.FunctionAddressResolver;
 import com.jogamp.gluegen.runtime.ProcAddressTable;
-import com.jogamp.gluegen.runtime.opengl.GLExtensionNames;
+import com.jogamp.gluegen.runtime.opengl.GLNameResolver;
 import com.jogamp.gluegen.runtime.opengl.GLProcAddressResolver;
+import com.jogamp.opengl.GLExtensions;
 
 import javax.media.nativewindow.AbstractGraphicsConfiguration;
 import javax.media.nativewindow.AbstractGraphicsDevice;
 import javax.media.nativewindow.NativeSurface;
 import javax.media.opengl.GL;
-import javax.media.opengl.GL3;
+import javax.media.opengl.GL2GL3;
 import javax.media.opengl.GLCapabilitiesImmutable;
 import javax.media.opengl.GLContext;
 import javax.media.opengl.GLDebugListener;
@@ -74,7 +75,7 @@ public abstract class GLContextImpl extends GLContext {
   private String contextFQN;
 
   private int additionalCtxCreationFlags;
-  
+
   // Cache of the functions that are available to be called at the current
   // moment in time
   protected ExtensionAvailabilityCache extensionAvailability;
@@ -84,17 +85,18 @@ public abstract class GLContextImpl extends GLContext {
 
   private String glRenderer;
   private String glRendererLowerCase;
-  
+
   // Tracks creation and initialization of buffer objects to avoid
   // repeated glGet calls upon glMapBuffer operations
   private GLBufferSizeTracker bufferSizeTracker; // Singleton - Set by GLContextShareSet
-  private GLBufferStateTracker bufferStateTracker = new GLBufferStateTracker();
-  private GLStateTracker glStateTracker = new GLStateTracker();
+  private final GLBufferStateTracker bufferStateTracker = new GLBufferStateTracker();
+  private final GLStateTracker glStateTracker = new GLStateTracker();
   private GLDebugMessageHandler glDebugHandler = null;
-  
+  private final int[] boundFBOTarget = new int[] { 0, 0 }; // { draw, read }
+
   protected GLDrawableImpl drawable;
   protected GLDrawableImpl drawableRead;
-
+  
   protected GL gl;
 
   protected static final Object mappedContextTypeObjectLock;
@@ -112,9 +114,9 @@ public abstract class GLContextImpl extends GLContext {
   public static void shutdownImpl() {
       mappedExtensionAvailabilityCache.clear();
       mappedGLProcAddress.clear();
-      mappedGLXProcAddress.clear();      
+      mappedGLXProcAddress.clear();
   }
-  
+
   public GLContextImpl(GLDrawableImpl drawable, GLContext shareWith) {
     super();
 
@@ -125,7 +127,7 @@ public abstract class GLContextImpl extends GLContext {
 
     this.drawable = drawable;
     this.drawableRead = drawable;
-    
+
     this.glDebugHandler = new GLDebugMessageHandler(this);
   }
 
@@ -140,11 +142,11 @@ public abstract class GLContextImpl extends GLContext {
           bufferSizeTracker.clearCachedBufferSizes();
       }
 
-      if (bufferStateTracker != null) {
+      if (bufferStateTracker != null) { // <init>
           bufferStateTracker.clearBufferObjectState();
       }
 
-      if (glStateTracker != null) {
+      if (glStateTracker != null) { // <init>
           glStateTracker.clearStates(false);
       }
 
@@ -157,27 +159,61 @@ public abstract class GLContextImpl extends GLContext {
       glRenderer = "";
       glRendererLowerCase = glRenderer;
       
+      if (boundFBOTarget != null) { // <init>
+          boundFBOTarget[0] = 0; // draw
+          boundFBOTarget[1] = 0; // read
+      }
+
       super.resetStates();
   }
 
-  public final void setGLReadDrawable(GLDrawable read) {
-    if(null!=read && drawable!=read && !isGLReadDrawableAvailable()) {
-        throw new GLException("GL Read Drawable not available");
+  @Override
+  public final GLDrawable setGLReadDrawable(GLDrawable read) {
+    if(!isGLReadDrawableAvailable()) { 
+        throw new GLException("Setting read drawable feature not available");
     }
-    boolean lockHeld = lock.isOwner();
+    final boolean lockHeld = lock.isOwner(Thread.currentThread());
     if(lockHeld) {
         release();
+    } else if(lock.isLockedByOtherThread()) { // still could glitch ..
+        throw new GLException("GLContext current by other thread ("+lock.getOwner()+"), operation not allowed.");
     }
+    final GLDrawable old = drawableRead;
     drawableRead = ( null != read ) ? (GLDrawableImpl) read : drawable;
     if(lockHeld) {
         makeCurrent();
     }
+    return old;
   }
 
+  @Override
   public final GLDrawable getGLReadDrawable() {
     return drawableRead;
   }
 
+  @Override
+  public final GLDrawable setGLDrawable(GLDrawable readWrite, boolean setWriteOnly) {
+    if(null==readWrite) {
+        throw new GLException("Null read/write drawable not allowed");
+    }
+    final boolean lockHeld = lock.isOwner(Thread.currentThread());
+    if(lockHeld) {
+        release();
+    } else if(lock.isLockedByOtherThread()) { // still could glitch ..
+        throw new GLException("GLContext current by other thread ("+lock.getOwner()+"), operation not allowed.");
+    }    
+    if(!setWriteOnly || drawableRead==drawable) { // if !setWriteOnly || !explicitReadDrawable
+        drawableRead = (GLDrawableImpl) readWrite;
+    }
+    final GLDrawable old = drawable;
+    drawable = (GLDrawableImpl) readWrite ;
+    if(lockHeld) {
+        makeCurrent();
+    }
+    return old;
+  }
+
+  @Override
   public final GLDrawable getGLDrawable() {
     return drawable;
   }
@@ -186,10 +222,12 @@ public abstract class GLContextImpl extends GLContext {
     return (GLDrawableImpl) getGLDrawable();
   }
 
+  @Override
   public final GL getGL() {
     return gl;
   }
 
+  @Override
   public GL setGL(GL gl) {
     if(DEBUG) {
         String sgl1 = (null!=this.gl)?this.gl.getClass().getSimpleName()+", "+this.gl.toString():"<null>";
@@ -204,12 +242,12 @@ public abstract class GLContextImpl extends GLContext {
   /**
    * Call this method to notify the OpenGL context
    * that the drawable has changed (size or position).
-   * 
+   *
    * <p>
-   * This is currently being used and overridden by Mac OSX, 
+   * This is currently being used and overridden by Mac OSX,
    * which issues the {@link jogamp.opengl.macosx.cgl.CGL#updateContext(long) NSOpenGLContext update()} call.
    * </p>
-   *  
+   *
    * @throws GLException
    */
   protected void drawableUpdatedNotify() throws GLException { }
@@ -217,22 +255,24 @@ public abstract class GLContextImpl extends GLContext {
   public abstract Object getPlatformGLExtensions();
 
   // Note: the surface is locked within [makeCurrent .. swap .. release]
+  @Override
   public void release() throws GLException {
     release(false);
   }
-  private void release(boolean force) throws GLException {
+  private void release(boolean inDestruction) throws GLException {
     if(TRACE_SWITCH) {
-        System.err.println(getThreadName() +": GLContext.ContextSwitch: - release() - force: "+force+", "+lock);
+        System.err.println(getThreadName() +": GLContext.ContextSwitch: obj " + toHexString(hashCode()) + ", ctx "+toHexString(contextHandle)+" - release() - force: "+inDestruction+", "+lock);
     }
-    if ( !lock.isOwner() ) {
-      throw new GLException("Context not current on current thread "+Thread.currentThread().getName()+": "+this);
+    if ( !lock.isOwner(Thread.currentThread()) ) {
+        throw new GLException("Context not current on current thread "+Thread.currentThread().getName()+": "+this);
     }
-    final boolean actualRelease = force || lock.getHoldCount() == 1 ;
-    try {        
+    final boolean actualRelease = ( inDestruction || lock.getHoldCount() == 1 ) && 0 != contextHandle;
+    try {
         if( actualRelease ) {
-            if (contextHandle != 0) { // allow dbl-release
-                releaseImpl();
+            if( !inDestruction ) {
+                drawable.contextMadeCurrent(this, false);
             }
+            releaseImpl();
         }
     } finally {
       // exception prone ..
@@ -242,15 +282,16 @@ public abstract class GLContextImpl extends GLContext {
       drawable.unlockSurface();
       lock.unlock();
       if(TRACE_SWITCH) {
-          System.err.println(getThreadName() +": GLContext.ContextSwitch: - "+(actualRelease?"switch":"keep  ")+" - CONTEXT_RELEASE - "+lock);
+          System.err.println(getThreadName() +": GLContext.ContextSwitch: obj " + toHexString(hashCode()) + ", ctx "+toHexString(contextHandle)+" - "+(actualRelease?"switch":"keep  ")+" - CONTEXT_RELEASE - "+lock);
       }
     }
   }
   protected abstract void releaseImpl() throws GLException;
 
+  @Override
   public final void destroy() {
-      if (DEBUG || TRACE_SWITCH) {          
-          System.err.println(getThreadName() + ": GLContextImpl.destroy.0: " + toHexString(contextHandle) +
+      if (DEBUG || TRACE_SWITCH) {
+          System.err.println(getThreadName() + ": GLContextImpl.destroy.0: obj " + toHexString(hashCode()) + ", ctx " + toHexString(contextHandle) +
                   ", isShared "+GLContextShareSet.isShared(this)+" - "+lock);
       }
       if (contextHandle != 0) {
@@ -262,24 +303,28 @@ public abstract class GLContextImpl extends GLContext {
           try {
               // Must hold the lock around the destroy operation to make sure we
               // don't destroy the context while another thread renders to it.
-              // FIXME: This is actually impossible now, since we acquired the surface lock already,
-              //        which is a prerequisite to acquire the context lock.
-              lock.lock(); // holdCount++ -> 1 or 2
+              lock.lock(); // holdCount++ -> 1 - 3 (1: not locked, 2-3: destroy while rendering)
               if ( lock.getHoldCount() > 2 ) {
-                  throw new GLException(getThreadName() + ": Lock was hold more than once - makeCurrent/release imbalance: "+lock);
+                  final String msg = getThreadName() + ": GLContextImpl.destroy: obj " + toHexString(hashCode()) + ", ctx " + toHexString(contextHandle);
+                  if (DEBUG || TRACE_SWITCH) {
+                      System.err.println(msg+" - Lock was hold more than once - makeCurrent/release imbalance: "+lock);
+                      Thread.dumpStack();
+                  }
+                  if ( lock.getHoldCount() > 3 ) {
+                      throw new GLException(msg+" - Lock was hold more than twice - makeCurrent/release imbalance: "+lock);
+                  }
               }
-              try {          
+              try {
                   // release current context
-                  if(null != glDebugHandler) {
-                      if(lock.getHoldCount() == 1) {
-                          // needs current context to disable debug handler
-                          makeCurrent();
-                      }
-                      glDebugHandler.enable(false);
+                  if(lock.getHoldCount() == 1) {
+                      // needs current context to disable debug handler
+                      makeCurrent();
                   }
+                  drawable.contextRealized(this, false);
+                  glDebugHandler.enable(false);
                   if(lock.getHoldCount() > 1) {
                       // pending release() after makeCurrent()
-                      release(true); 
+                      release(true);
                   }
                   destroyImpl();
                   contextHandle = 0;
@@ -291,7 +336,7 @@ public abstract class GLContextImpl extends GLContext {
               } finally {
                   lock.unlock();
                   if (TRACE_SWITCH) {
-                      System.err.println(getThreadName() + ": GLContextImpl.destroy.X: " + toHexString(contextHandle) +
+                      System.err.println(getThreadName() + ": GLContextImpl.destroy.X: obj " + toHexString(hashCode()) + ", ctx " + toHexString(contextHandle) +
                               ", isShared "+GLContextShareSet.isShared(this)+" - "+lock);
                   }
               }
@@ -303,6 +348,7 @@ public abstract class GLContextImpl extends GLContext {
   }
   protected abstract void destroyImpl() throws GLException;
 
+  @Override
   public final void copy(GLContext source, int mask) throws GLException {
     if (source.getHandle() == 0) {
       throw new GLException("Source OpenGL context has not been created");
@@ -364,6 +410,7 @@ public abstract class GLContextImpl extends GLContext {
    * @see #mapVersionAvailable
    * @see #destroyContextARBImpl
    */
+  @Override
   public int makeCurrent() throws GLException {
     boolean unlockContextAndDrawable = false;
     int res = CONTEXT_NOT_CURRENT;
@@ -377,9 +424,9 @@ public abstract class GLContextImpl extends GLContext {
         if (NativeSurface.LOCK_SURFACE_CHANGED == lockRes) {
             drawable.updateHandle();
         }
-        
+
         lock.lock();
-        try {        
+        try {
             // One context can only be current by one thread,
             // and one thread can only have one context current!
             final GLContext current = getCurrent();
@@ -389,19 +436,19 @@ public abstract class GLContextImpl extends GLContext {
                     // For Mac OS X, however, we need to update the context to track resizes
                     drawableUpdatedNotify();
                     if(TRACE_SWITCH) {
-                        System.err.println(getThreadName() +": GLContext.ContextSwitch: - keep   - CONTEXT_CURRENT - "+lock);
+                        System.err.println(getThreadName() +": GLContext.ContextSwitch: obj " + toHexString(hashCode()) + ", ctx "+toHexString(contextHandle)+" - keep   - CONTEXT_CURRENT - "+lock);                        
                     }
                     return CONTEXT_CURRENT;
                 } else {
                     current.release();
                 }
-            }    
+            }
             if (0 == drawable.getHandle()) {
                 throw new GLException("drawable has invalid handle: "+drawable);
             }
             res = makeCurrentWithinLock(lockRes);
             unlockContextAndDrawable = CONTEXT_NOT_CURRENT == res;
-            
+
             /**
              * FIXME: refactor dependence on Java 2D / JOGL bridge
                 if ((tracker != null) &&
@@ -416,7 +463,7 @@ public abstract class GLContextImpl extends GLContext {
         } finally {
           if (unlockContextAndDrawable) {
             lock.unlock();
-          }            
+          }
         }
     } catch (RuntimeException e) {
       unlockContextAndDrawable = true;
@@ -424,20 +471,20 @@ public abstract class GLContextImpl extends GLContext {
     } finally {
       if (unlockContextAndDrawable) {
         drawable.unlockSurface();
-      }            
+      }
     }
-    
+
     if (res == CONTEXT_NOT_CURRENT) {
       if(TRACE_SWITCH) {
-          System.err.println(getThreadName() +": GLContext.ContextSwitch: - switch - CONTEXT_NOT_CURRENT - "+lock);
+          System.err.println(getThreadName() +": GLContext.ContextSwitch: obj " + toHexString(hashCode()) + ", ctx "+toHexString(contextHandle)+" - switch - CONTEXT_NOT_CURRENT - "+lock);
       }
     } else {
       setCurrent(this);
       if(res == CONTEXT_CURRENT_NEW) {
         // check if the drawable's and the GL's GLProfile are equal
-        // throws an GLException if not 
+        // throws an GLException if not
         getGLDrawable().getGLProfile().verifyEquality(gl.getGLProfile());
-        
+
         glDebugHandler.init( isGL2GL3() && isGLDebugEnabled() );
 
         if(DEBUG_GL) {
@@ -448,12 +495,19 @@ public abstract class GLContextImpl extends GLContext {
         }
         if(TRACE_GL) {
             gl = gl.getContext().setGL( GLPipelineFactory.create("javax.media.opengl.Trace", null, gl, new Object[] { System.err } ) );
-        }               
+        }
+        
+        drawable.contextRealized(this, true);
+        
         if(DEBUG || TRACE_SWITCH) {
-            System.err.println(getThreadName() +": GLContext.ContextSwitch: - switch - CONTEXT_CURRENT_NEW - "+lock);
+            System.err.println(getThreadName() +": GLContext.ContextSwitch: obj " + toHexString(hashCode()) + ", ctx "+toHexString(contextHandle)+" - switch - CONTEXT_CURRENT_NEW - "+lock);
+        }
+      } else {
+        drawable.contextMadeCurrent(this, true);
+        
+        if(TRACE_SWITCH) {
+            System.err.println(getThreadName() +": GLContext.ContextSwitch: obj " + toHexString(hashCode()) + ", ctx "+toHexString(contextHandle)+" - switch - CONTEXT_CURRENT - "+lock);
         }
-      } else if(TRACE_SWITCH) {
-        System.err.println(getThreadName() +": GLContext.ContextSwitch: - switch - CONTEXT_CURRENT - "+lock);
       }
 
       /* FIXME: refactor dependence on Java 2D / JOGL bridge
@@ -474,7 +528,7 @@ public abstract class GLContextImpl extends GLContext {
             // only impacts w/ createContextARB(..)
             additionalCtxCreationFlags |= GLContext.CTX_OPTION_DEBUG ;
         }
-    
+
         final GLContextImpl shareWith = (GLContextImpl) GLContextShareSet.getShareContext(this);
         if (null != shareWith) {
             shareWith.getDrawableImpl().lockSurface();
@@ -485,33 +539,31 @@ public abstract class GLContextImpl extends GLContext {
         } finally {
             if (null != shareWith) {
                 shareWith.getDrawableImpl().unlockSurface();
-            }                
+            }
         }
-        if (DEBUG) {
+        if (DEBUG || TRACE_SWITCH) {
             if(created) {
-                System.err.println(getThreadName() + ": Create GL context OK: " + toHexString(contextHandle) + " for " + getClass().getName()+" - "+getGLVersion());
+                System.err.println(getThreadName() + ": Create GL context OK: obj " + toHexString(hashCode()) + ", ctx " + toHexString(contextHandle) + " for " + getClass().getName()+" - "+getGLVersion());
+                // Thread.dumpStack();
             } else {
-                System.err.println(getThreadName() + ": Create GL context FAILED for " + getClass().getName());
+                System.err.println(getThreadName() + ": Create GL context FAILED obj " + toHexString(hashCode()) + ", for " + getClass().getName());
             }
-        }        
+        }
         if(!created) {
             return CONTEXT_NOT_CURRENT;
         }
-        
+
         // finalize mapping the available GLVersions, in case it's not done yet
-        {             
+        {
             final AbstractGraphicsConfiguration config = drawable.getNativeSurface().getGraphicsConfiguration();
             final AbstractGraphicsDevice device = config.getScreen().getDevice();
-            
-            if( !GLContext.getAvailableGLVersionsSet(device) ) {
-                final int reqMajor;
-                final int reqProfile;
-                if( 0 != ( ctxOptions & GLContext.CTX_PROFILE_ES) ) {
-                    // ES1 or ES2
-                    reqMajor = ctxMajorVersion;
-                    reqProfile = GLContext.CTX_PROFILE_ES;
-                } else {
-                    if(ctxMajorVersion<3 || ctxMajorVersion==3 && ctxMinorVersion==0) { 
+
+            // Non ARB desktop profiles may not have been registered 
+            if( !GLContext.getAvailableGLVersionsSet(device) ) {        // not yet set
+                if( 0 == ( ctxOptions & GLContext.CTX_PROFILE_ES) ) {   // not ES profile
+                    final int reqMajor;
+                    final int reqProfile;
+                    if(ctxMajorVersion<3 || ctxMajorVersion==3 && ctxMinorVersion==0) {
                         reqMajor = 2;
                     } else {
                         reqMajor = ctxMajorVersion;
@@ -521,12 +573,13 @@ public abstract class GLContextImpl extends GLContext {
                     } else {
                         reqProfile = GLContext.CTX_PROFILE_COMPAT;
                     }
-                }
-                GLContext.mapAvailableGLVersion(device, reqMajor, reqProfile,
-                                                ctxMajorVersion, ctxMinorVersion, ctxOptions);
-                GLContext.setAvailableGLVersionsSet(device);
-                if (DEBUG) {
-                  System.err.println(getThreadName() + ": createContextOLD-MapVersionsAvailable HAVE: " + device+" -> "+reqMajor+"."+reqProfile+ " -> "+getGLVersion());
+                    GLContext.mapAvailableGLVersion(device, reqMajor, reqProfile,
+                                                    ctxMajorVersion, ctxMinorVersion, ctxOptions);
+                    GLContext.setAvailableGLVersionsSet(device);
+                    
+                    if (DEBUG) {
+                      System.err.println(getThreadName() + ": createContextOLD-MapVersionsAvailable HAVE: " + device+" -> "+reqMajor+"."+reqProfile+ " -> "+getGLVersion());
+                    }                    
                 }
             }
         }
@@ -537,30 +590,30 @@ public abstract class GLContextImpl extends GLContext {
       return CONTEXT_CURRENT;
   }
   protected abstract void makeCurrentImpl() throws GLException;
-  
-  /** 
+
+  /**
    * Platform dependent entry point for context creation.<br>
    *
    * This method is called from {@link #makeCurrentWithinLock()} .. {@link #makeCurrent()} .<br>
    *
-   * The implementation shall verify this context with a 
+   * The implementation shall verify this context with a
    * <code>MakeContextCurrent</code> call.<br>
    *
    * The implementation <b>must</b> leave the context current.<br>
-   * 
+   *
    * @param share the shared context or null
    * @return the valid and current context if successful, or null
    * @throws GLException
    */
   protected abstract boolean createImpl(GLContextImpl sharedWith) throws GLException ;
 
-  /** 
+  /**
    * Platform dependent but harmonized implementation of the <code>ARB_create_context</code>
    * mechanism to create a context.<br>
    *
    * This method is called from {@link #createContextARB}, {@link #createImpl(GLContextImpl)} .. {@link #makeCurrent()} .<br>
    *
-   * The implementation shall verify this context with a 
+   * The implementation shall verify this context with a
    * <code>MakeContextCurrent</code> call.<br>
    *
    * The implementation <b>must</b> leave the context current.<br>
@@ -582,7 +635,7 @@ public abstract class GLContextImpl extends GLContext {
    * @see #createContextARBImpl
    * @see #destroyContextARBImpl
    */
-  protected abstract long createContextARBImpl(long share, boolean direct, int ctxOptionFlags, 
+  protected abstract long createContextARBImpl(long share, boolean direct, int ctxOptionFlags,
                                                int major, int minor);
 
   /**
@@ -616,13 +669,10 @@ public abstract class GLContextImpl extends GLContext {
    * @see #createContextARBImpl
    * @see #destroyContextARBImpl
    */
-  protected final long createContextARB(long share, boolean direct) 
+  protected final long createContextARB(final long share, final boolean direct)
   {
-    AbstractGraphicsConfiguration config = drawable.getNativeSurface().getGraphicsConfiguration();
-    AbstractGraphicsDevice device = config.getScreen().getDevice();
-    GLCapabilitiesImmutable glCaps = (GLCapabilitiesImmutable) config.getChosenCapabilities();
-    GLProfile glp = glCaps.getGLProfile();
-    GLProfile glpImpl = glp.getImpl();
+    final AbstractGraphicsConfiguration config = drawable.getNativeSurface().getGraphicsConfiguration();
+    final AbstractGraphicsDevice device = config.getScreen().getDevice();
 
     if (DEBUG) {
       System.err.println(getThreadName() + ": createContextARB: mappedVersionsAvailableSet("+device.getConnection()+"): "+
@@ -631,27 +681,20 @@ public abstract class GLContextImpl extends GLContext {
 
     if ( !GLContext.getAvailableGLVersionsSet(device) ) {
         if(!mapGLVersions(device)) {
-            // none of the ARB context creation calls was successful, bail out 
+            // none of the ARB context creation calls was successful, bail out
             return 0;
         }
     }
 
-    int reqMajor;
-    if(glpImpl.isGL4()) {
-        reqMajor=4;
-    } else if (glpImpl.isGL3()) {
-        reqMajor=3;
-    } else /* if (glpImpl.isGL2()) */ {
-        reqMajor=2;
-    }
-
-    boolean compat = glpImpl.isGL2(); // incl GL3bc and GL4bc
+    final GLCapabilitiesImmutable glCaps = (GLCapabilitiesImmutable) config.getChosenCapabilities();
+    final int[] reqMajorCTP = new int[] { 0, 0 };
+    getRequestMajorAndCompat(glCaps.getGLProfile(), reqMajorCTP);
+    
     int _major[] = { 0 };
     int _minor[] = { 0 };
     int _ctp[] = { 0 };
     long _ctx = 0;
-
-    if( GLContext.getAvailableGLVersion(device, reqMajor, compat?CTX_PROFILE_COMPAT:CTX_PROFILE_CORE,
+    if( GLContext.getAvailableGLVersion(device, reqMajorCTP[0], reqMajorCTP[1],
                                         _major, _minor, _ctp)) {
         _ctp[0] |= additionalCtxCreationFlags;
         _ctx = createContextARBImpl(share, direct, _ctp[0], _major[0], _minor[0]);
@@ -661,33 +704,101 @@ public abstract class GLContextImpl extends GLContext {
     }
     return _ctx;
   }
-
-  private final boolean mapGLVersions(AbstractGraphicsDevice device) {    
+  
+  private final boolean mapGLVersions(AbstractGraphicsDevice device) {
     synchronized (GLContext.deviceVersionAvailable) {
+        final long t0 = ( DEBUG ) ? System.nanoTime() : 0;
         boolean success = false;
         // Following GLProfile.GL_PROFILE_LIST_ALL order of profile detection { GL4bc, GL3bc, GL2, GL4, GL3, GL2GL3, GLES2, GL2ES2, GLES1, GL2ES1 }
-        success |= createContextARBMapVersionsAvailable(4, true  /* compat */);  // GL4bc
-        success |= createContextARBMapVersionsAvailable(3, true  /* compat */);  // GL3bc
-        success |= createContextARBMapVersionsAvailable(2, true  /* compat */);  // GL2        
-        success |= createContextARBMapVersionsAvailable(4, false /* core   */);  // GL4
-        success |= createContextARBMapVersionsAvailable(3, false /* core   */);  // GL3
+        boolean hasGL4bc = false;
+        boolean hasGL3bc = false;
+        boolean hasGL2   = false;
+        boolean hasGL4   = false;
+        boolean hasGL3   = false;
+        if(!hasGL4bc) {
+            hasGL4bc = createContextARBMapVersionsAvailable(4, CTX_PROFILE_COMPAT);  // GL4bc
+            success |= hasGL4bc;
+            if(hasGL4bc) {
+                // Map all lower compatible profiles: GL3bc, GL2, GL4, GL3
+                GLContext.mapAvailableGLVersion(device, 3, CTX_PROFILE_COMPAT, ctxMajorVersion, ctxMinorVersion, ctxOptions);
+                GLContext.mapAvailableGLVersion(device, 2, CTX_PROFILE_COMPAT, ctxMajorVersion, ctxMinorVersion, ctxOptions);
+                GLContext.mapAvailableGLVersion(device, 4, CTX_PROFILE_CORE,   ctxMajorVersion, ctxMinorVersion, ctxOptions);
+                GLContext.mapAvailableGLVersion(device, 3, CTX_PROFILE_CORE,   ctxMajorVersion, ctxMinorVersion, ctxOptions);
+                if(PROFILE_ALIASING) {
+                    hasGL3bc = true;
+                    hasGL2   = true;
+                    hasGL4   = true;
+                    hasGL3   = true;
+                }
+                resetStates(); // clean this context states, since creation was temporary
+            }
+        }
+        if(!hasGL3bc) {
+            hasGL3bc = createContextARBMapVersionsAvailable(3, CTX_PROFILE_COMPAT);  // GL3bc
+            success |= hasGL3bc;
+            if(hasGL3bc) {
+                // Map all lower compatible profiles: GL2 and GL3
+                GLContext.mapAvailableGLVersion(device, 2, CTX_PROFILE_COMPAT, ctxMajorVersion, ctxMinorVersion, ctxOptions);
+                GLContext.mapAvailableGLVersion(device, 3, CTX_PROFILE_CORE,   ctxMajorVersion, ctxMinorVersion, ctxOptions);
+                if(PROFILE_ALIASING) {
+                    hasGL2   = true;
+                    hasGL3   = true;
+                }
+                resetStates(); // clean this context states, since creation was temporary
+            }
+        }
+        if(!hasGL2) {
+            hasGL2   = createContextARBMapVersionsAvailable(2, CTX_PROFILE_COMPAT);  // GL2
+            success |= hasGL2;
+            if(hasGL2) {
+                resetStates(); // clean this context states, since creation was temporary                
+            }
+        }
+        if(!hasGL4) {
+            hasGL4   = createContextARBMapVersionsAvailable(4, CTX_PROFILE_CORE);    // GL4
+            success |= hasGL4;
+            if(hasGL4) {
+                // Map all lower compatible profiles: GL3
+                GLContext.mapAvailableGLVersion(device, 3, CTX_PROFILE_CORE,   ctxMajorVersion, ctxMinorVersion, ctxOptions);                
+                if(PROFILE_ALIASING) {
+                    hasGL3   = true;
+                }
+                resetStates(); // clean this context states, since creation was temporary
+            }
+        }
+        if(!hasGL3) {
+            hasGL3   = createContextARBMapVersionsAvailable(3, CTX_PROFILE_CORE);    // GL3
+            success |= hasGL3;
+            if(hasGL3) {
+                resetStates(); // clean this context states, since creation was temporary                
+            }
+        }
         if(success) {
             // only claim GL versions set [and hence detected] if ARB context creation was successful
             GLContext.setAvailableGLVersionsSet(device);
+            if(DEBUG) {
+                final long t1 = System.nanoTime();
+                System.err.println("GLContextImpl.mapGLVersions: "+device+", profileAliasing: "+PROFILE_ALIASING+", total "+(t1-t0)/1e6 +"ms");
+                System.err.println(GLContext.dumpAvailableGLVersions(null).toString());                
+            }
         } else if (DEBUG) {
             System.err.println(getThreadName() + ": createContextARB-MapVersions NONE for :"+device);
-        }        
+        }
         return success;
     }
   }
 
-  private final boolean createContextARBMapVersionsAvailable(int reqMajor, boolean compat) {
+  /** 
+   * Note: Since context creation is temporary, caller need to issue {@link #resetStates()}, if creation was successful, i.e. returns true.
+   * This method does not reset the states, allowing the caller to utilize the state variables. 
+   **/
+  private final boolean createContextARBMapVersionsAvailable(int reqMajor, int reqProfile) {
     long _context;
-    int reqProfile = compat ? CTX_PROFILE_COMPAT : CTX_PROFILE_CORE ;
-    int ctp = CTX_IS_ARB_CREATED | CTX_PROFILE_CORE; // default
-    if(compat) {
-        ctp &= ~CTX_PROFILE_CORE ;
-        ctp |=  CTX_PROFILE_COMPAT ;
+    int ctp = CTX_IS_ARB_CREATED;
+    if(CTX_PROFILE_COMPAT == reqProfile) {
+        ctp |= CTX_PROFILE_COMPAT ;
+    } else {
+        ctp |= CTX_PROFILE_CORE ;
     }
 
     // To ensure GL profile compatibility within the JOGL application
@@ -704,21 +815,21 @@ public abstract class GLContextImpl extends GLContext {
         majorMax=3; minorMax=GLContext.getMaxMinor(majorMax);
         majorMin=3; minorMin=1;
     } else /* if( glp.isGL2() ) */ {
-        // our minimum desktop OpenGL runtime requirements are 1.1, 
-        // nevertheless we restrict ARB context creation to 2.0 to spare us futile attempts 
+        // our minimum desktop OpenGL runtime requirements are 1.1,
+        // nevertheless we restrict ARB context creation to 2.0 to spare us futile attempts
         majorMax=3; minorMax=0;
         majorMin=2; minorMin=0;
     }
-    _context = createContextARBVersions(0, true, ctp, 
+    _context = createContextARBVersions(0, true, ctp,
                                         /* max */ majorMax, minorMax,
                                         /* min */ majorMin, minorMin,
                                         /* res */ major, minor);
 
-    if(0==_context && !compat) {
+    if(0==_context && CTX_PROFILE_CORE == reqProfile) {
         // try w/ FORWARD instead of CORE
         ctp &= ~CTX_PROFILE_CORE ;
         ctp |=  CTX_OPTION_FORWARD ;
-        _context = createContextARBVersions(0, true, ctp, 
+        _context = createContextARBVersions(0, true, ctp,
                                             /* max */ majorMax, minorMax,
                                             /* min */ majorMin, minorMin,
                                             /* res */ major, minor);
@@ -727,35 +838,35 @@ public abstract class GLContextImpl extends GLContext {
             ctp &= ~CTX_PROFILE_CORE ;
             ctp &= ~CTX_OPTION_FORWARD ;
             ctp |=  CTX_PROFILE_COMPAT ;
-            _context = createContextARBVersions(0, true, ctp, 
+            _context = createContextARBVersions(0, true, ctp,
                                        /* max */ majorMax, minorMax,
                                        /* min */ majorMin, minorMin,
                                        /* res */ major, minor);
        }
     }
+    final boolean res;
     if(0!=_context) {
-        AbstractGraphicsDevice device = drawable.getNativeSurface().getGraphicsConfiguration().getScreen().getDevice();        
-        // ctxMajorVersion, ctxMinorVersion, ctxOptions is being set by 
+        AbstractGraphicsDevice device = drawable.getNativeSurface().getGraphicsConfiguration().getScreen().getDevice();
+        // ctxMajorVersion, ctxMinorVersion, ctxOptions is being set by
         //   createContextARBVersions(..) -> setGLFunctionAvailbility(..) -> setContextVersion(..)
         GLContext.mapAvailableGLVersion(device, reqMajor, reqProfile, ctxMajorVersion, ctxMinorVersion, ctxOptions);
         destroyContextARBImpl(_context);
         if (DEBUG) {
           System.err.println(getThreadName() + ": createContextARB-MapVersionsAvailable HAVE: " +reqMajor+"."+reqProfile+ " -> "+getGLVersion());
         }
-        // only reset [and hence modify] this context state if ARB context creation was successful
-        resetStates(); 
-        return true;
+        res = true;
     } else {
         if (DEBUG) {
           System.err.println(getThreadName() + ": createContextARB-MapVersionsAvailable NOPE: "+reqMajor+"."+reqProfile);
-        }        
-        return false;
+        }
+        res = false;
     }
+    return res;
   }
 
-  private final long createContextARBVersions(long share, boolean direct, int ctxOptionFlags, 
-                                              int majorMax, int minorMax, 
-                                              int majorMin, int minorMin, 
+  private final long createContextARBVersions(long share, boolean direct, int ctxOptionFlags,
+                                              int majorMax, int minorMax,
+                                              int majorMin, int minorMin,
                                               int major[], int minor[]) {
     major[0]=majorMax;
     minor[0]=minorMax;
@@ -765,7 +876,6 @@ public abstract class GLContextImpl extends GLContext {
     while ( !ok &&
             GLContext.isValidGLVersion(major[0], minor[0]) &&
             ( major[0]>majorMin || major[0]==majorMin && minor[0] >=minorMin ) ) {
-
         if (DEBUG) {
             System.err.println(getThreadName() + ": createContextARBVersions: share "+share+", direct "+direct+", version "+major[0]+"."+minor[0]);
         }
@@ -773,15 +883,15 @@ public abstract class GLContextImpl extends GLContext {
 
         if(0 != _context) {
             ok = true;
-            setGLFunctionAvailability(true, major[0], minor[0], ctxOptionFlags);            
+            setGLFunctionAvailability(true, major[0], minor[0], ctxOptionFlags);
         } else {
-            ok = false;            
+            ok = false;
         }
-        
+
         if(ok && major[0]>=3) {
             int[] hasMajor = new int[1]; int[] hasMinor = new int[1];
-            gl.glGetIntegerv(GL3.GL_MAJOR_VERSION, hasMajor, 0);
-            gl.glGetIntegerv(GL3.GL_MINOR_VERSION, hasMinor, 0);
+            gl.glGetIntegerv(GL2GL3.GL_MAJOR_VERSION, hasMajor, 0);
+            gl.glGetIntegerv(GL2GL3.GL_MINOR_VERSION, hasMinor, 0);
             ok = hasMajor[0]>major[0] || ( hasMajor[0]==major[0] && hasMinor[0]>=minor[0] ) ;
             if(!ok) {
                 removeCachedVersion(major[0], minor[0], ctxOptionFlags);
@@ -792,7 +902,7 @@ public abstract class GLContextImpl extends GLContext {
                 System.err.println(getThreadName() + ": createContextARBVersions: version verification - expected "+major[0]+"."+minor[0]+", has "+hasMajor[0]+"."+hasMinor[0]+" == "+ok);
             }
         }
-        
+
         if(!ok) {
             if(!GLContext.decrementGLVersion(major, minor)) break;
         }
@@ -805,8 +915,8 @@ public abstract class GLContextImpl extends GLContext {
   // As a last resort, the GL_VERSION string may be used ..
   //
 
-  /** 
-   * If major > 0 || minor > 0 : Use passed values, determined at creation time 
+  /**
+   * If major > 0 || minor > 0 : Use passed values, determined at creation time
    * If major==0 && minor == 0 : Use GL_VERSION
    * Otherwise .. don't touch ..
    */
@@ -869,8 +979,8 @@ public abstract class GLContextImpl extends GLContext {
 
   /** Create the GL for this context. */
   protected GL createGL(GLProfile glp) {
-    GL gl = (GL) createInstance(glp, "Impl", new Class[] { GLProfile.class, GLContextImpl.class }, new Object[] { glp, this } );
-    
+    final GL gl = (GL) createInstance(glp, "Impl", new Class[] { GLProfile.class, GLContextImpl.class }, new Object[] { glp, this } );
+
     /* FIXME: refactor dependence on Java 2D / JOGL bridge
     if (tracker != null) {
       gl.setObjectTracker(tracker);
@@ -878,11 +988,11 @@ public abstract class GLContextImpl extends GLContext {
     */
     return gl;
   }
-  
+
   public final ProcAddressTable getGLProcAddressTable() {
     return glProcAddressTable;
   }
-  
+
   /**
    * Shall return the platform extension ProcAddressTable,
    * ie for GLXExt, EGLExt, ..
@@ -918,8 +1028,8 @@ public abstract class GLContextImpl extends GLContext {
 
   /** Maps the given "platform-independent" extension name to a real
       function name. Currently this is only used to map
-      "GL_ARB_pbuffer"      to  "WGL_ARB_pbuffer/GLX_SGIX_pbuffer" and 
-      "GL_ARB_pixel_format" to  "WGL_ARB_pixel_format/n.a." 
+      "GL_ARB_pbuffer"      to  "WGL_ARB_pbuffer/GLX_SGIX_pbuffer" and
+      "GL_ARB_pixel_format" to  "WGL_ARB_pixel_format/n.a."
    */
   protected final String mapToRealGLExtensionName(String glExtensionName) {
     Map<String, String> map = getExtensionNameMap();
@@ -937,30 +1047,37 @@ public abstract class GLContextImpl extends GLContext {
     table.reset(getDrawableImpl().getGLDynamicLookupHelper() );
   }
 
-  private final void initGLRendererStrings()  {
+  private final boolean initGLRendererStrings()  {
     final GLDynamicLookupHelper glDynLookupHelper = getDrawableImpl().getGLDynamicLookupHelper();
     final long _glGetString = glDynLookupHelper.dynamicLookupFunction("glGetString");
     if(0 == _glGetString) {
         // FIXME
         System.err.println("Warning: Entry point to 'glGetString' is NULL.");
-        Thread.dumpStack();        
+        if(DEBUG) {
+            Thread.dumpStack();
+        }
+        return false;
     } else {
         final String _glRenderer = glGetStringInt(GL.GL_RENDERER, _glGetString);
         if(null == _glRenderer) {
             // FIXME
-            System.err.println("Warning: GL_RENDERER is NULL.");
-            Thread.dumpStack();                
+            if(DEBUG) {
+                System.err.println("Warning: GL_RENDERER is NULL.");
+                Thread.dumpStack();
+            }
+            return false;
         } else {
             glRenderer = _glRenderer;
             glRendererLowerCase = glRenderer.toLowerCase();
+            return true;
         }
     }
   }
-  
+
   protected final String getGLRendererString(boolean lowerCase) {
       return lowerCase ? glRendererLowerCase : glRenderer;
   }
-  
+
   /**
    * Sets the OpenGL implementation class and
    * the cache of which GL functions are available for calling through this
@@ -975,7 +1092,7 @@ public abstract class GLContextImpl extends GLContext {
    * @param major OpenGL major version
    * @param minor OpenGL minor version
    * @param ctxProfileBits OpenGL context profile and option bits, see {@link javax.media.opengl.GLContext#CTX_OPTION_ANY}
-   * 
+   *
    * @see #setContextVersion
    * @see javax.media.opengl.GLContext#CTX_OPTION_ANY
    * @see javax.media.opengl.GLContext#CTX_PROFILE_COMPAT
@@ -987,21 +1104,24 @@ public abstract class GLContextImpl extends GLContext {
     }
 
     if(null==this.gl || !verifyInstance(gl.getGLProfile(), "Impl", this.gl)) {
-        setGL(createGL(getGLDrawable().getGLProfile()));
+        setGL( createGL( getGLDrawable().getGLProfile() ) );
     }
     updateGLXProcAddressTable();
 
-    initGLRendererStrings();
-    
-    if(!isCurrentContextHardwareRasterizer()) {
-        ctxProfileBits |= GLContext.CTX_IMPL_ACCEL_SOFT;
-    }    
     final AbstractGraphicsConfiguration aconfig = drawable.getNativeSurface().getGraphicsConfiguration();
     final AbstractGraphicsDevice adevice = aconfig.getScreen().getDevice();
     
+    if( !initGLRendererStrings() && DEBUG) {
+        System.err.println("Warning: intialization of GL renderer strings failed. "+adevice+" - "+GLContext.getGLVersion(major, minor, ctxProfileBits, null));
+    }
+
+    if(!isCurrentContextHardwareRasterizer()) {
+        ctxProfileBits |= GLContext.CTX_IMPL_ACCEL_SOFT;
+    }
+
     contextFQN = getContextFQN(adevice, major, minor, ctxProfileBits);
     if (DEBUG) {
-      System.err.println(getThreadName() + ": Context FQN: "+contextFQN+" - "+GLContext.getGLVersion(major, minor, ctxProfileBits, null));
+      System.err.println(getThreadName() + ": GLContext.setGLFuncAvail.0 FQN: "+contextFQN+" - "+GLContext.getGLVersion(major, minor, ctxProfileBits, null));
     }
 
     //
@@ -1011,7 +1131,7 @@ public abstract class GLContextImpl extends GLContext {
     synchronized(mappedContextTypeObjectLock) {
         table = mappedGLProcAddress.get( contextFQN );
         if(null != table && !verifyInstance(gl.getGLProfile(), "ProcAddressTable", table)) {
-            throw new InternalError("GLContext GL ProcAddressTable mapped key("+contextFQN+" - " + GLContext.getGLVersion(major, minor, ctxProfileBits, null)+ 
+            throw new InternalError("GLContext GL ProcAddressTable mapped key("+contextFQN+" - " + GLContext.getGLVersion(major, minor, ctxProfileBits, null)+
                   ") -> "+ table.getClass().getName()+" not matching "+gl.getGLProfile().getGLImplBaseClassName());
         }
     }
@@ -1032,7 +1152,7 @@ public abstract class GLContextImpl extends GLContext {
             }
         }
     }
-    
+
     //
     // Update ExtensionAvailabilityCache
     //
@@ -1055,26 +1175,50 @@ public abstract class GLContextImpl extends GLContext {
                 System.err.println(getThreadName() + ": GLContext GL ExtensionAvailabilityCache mapping key("+contextFQN+") -> "+toHexString(extensionAvailability.hashCode()) + " - entries: "+extensionAvailability.getTotalExtensionCount());
             }
         }
-    }    
-    if( isExtensionAvailable("GL_ARB_ES2_compatibility") ) {
+    }
+    
+    if( ( 0 != ( CTX_PROFILE_ES & ctxProfileBits ) && major >= 2 ) || isExtensionAvailable(GLExtensions.ARB_ES2_compatibility) ) {
         ctxProfileBits |= CTX_IMPL_ES2_COMPAT;
+        ctxProfileBits |= CTX_IMPL_FBO;
+    } else if( hasFBOImpl(major, ctxProfileBits, extensionAvailability) ) {
+        ctxProfileBits |= CTX_IMPL_FBO;
     }
     
     //
     // Set GL Version (complete w/ version string)
     //
     setContextVersion(major, minor, ctxProfileBits, true);
-    
+
     setDefaultSwapInterval();
+    
+    if(DEBUG) {
+        System.err.println(getThreadName() + ": GLContext.setGLFuncAvail.X: "+contextFQN+" - "+GLContext.getGLVersion(ctxMajorVersion, ctxMinorVersion, ctxOptions, null));
+    }
   }
-
+  
+  protected static final boolean hasFBOImpl(int major, int ctp, ExtensionAvailabilityCache extCache) {
+    return ( 0 != (ctp & CTX_PROFILE_ES) && major >= 2 ) ||   // ES >= 2.0
+            
+           major >= 3 ||                                                 // any >= 3.0 GL ctx                       
+           
+           ( null != extCache &&
+           
+               extCache.isExtensionAvailable(GLExtensions.ARB_ES2_compatibility)  ||         // ES 2.0 compatible
+               
+               extCache.isExtensionAvailable(GLExtensions.ARB_framebuffer_object) ||         // ARB_framebuffer_object
+               
+               extCache.isExtensionAvailable(GLExtensions.EXT_framebuffer_object) ||         // EXT_framebuffer_object
+               
+               extCache.isExtensionAvailable(GLExtensions.OES_framebuffer_object) ) ;        // OES_framebuffer_object excluded               
+  }
+  
   protected final void removeCachedVersion(int major, int minor, int ctxProfileBits) {
     if(!isCurrentContextHardwareRasterizer()) {
         ctxProfileBits |= GLContext.CTX_IMPL_ACCEL_SOFT;
     }
     final AbstractGraphicsConfiguration aconfig = drawable.getNativeSurface().getGraphicsConfiguration();
     final AbstractGraphicsDevice adevice = aconfig.getScreen().getDevice();
-    
+
     contextFQN = getContextFQN(adevice, major, minor, ctxProfileBits);
     if (DEBUG) {
       System.err.println(getThreadName() + ": RM Context FQN: "+contextFQN+" - "+GLContext.getGLVersion(major, minor, ctxProfileBits, null));
@@ -1097,26 +1241,27 @@ public abstract class GLContextImpl extends GLContext {
 
   private final boolean isCurrentContextHardwareRasterizer()  {
     boolean isHardwareRasterizer = true;
-    
+
     if(!drawable.getChosenGLCapabilities().getHardwareAccelerated()) {
         isHardwareRasterizer = false;
     } else {
         isHardwareRasterizer = ! ( glRendererLowerCase.contains("software") /* Mesa3D */  ||
                                    glRendererLowerCase.contains("mesa x11") /* Mesa3D*/   ||
                                    glRendererLowerCase.contains("softpipe") /* Gallium */ ||
-                                   glRendererLowerCase.contains("llvmpipe") /* Gallium */                                
+                                   glRendererLowerCase.contains("llvmpipe") /* Gallium */
                                  );
     }
     return isHardwareRasterizer;
   }
-  
+
   /**
    * Updates the platform's 'GLX' function cache
    */
   protected abstract void updateGLXProcAddressTable();
 
   protected abstract StringBuilder getPlatformExtensionsStringImpl();
-  
+
+  @Override
   public final boolean isFunctionAvailable(String glFunctionName) {
     // Check GL 1st (cached)
     if(null!=glProcAddressTable) { // null if this context wasn't not created
@@ -1128,8 +1273,8 @@ public abstract class GLContextImpl extends GLContext {
     }
 
     // Check platform extensions 2nd (cached) - context had to be enabled once
-    final ProcAddressTable pTable = getPlatformExtProcAddressTable(); 
-    if(null!=pTable) { 
+    final ProcAddressTable pTable = getPlatformExtProcAddressTable();
+    if(null!=pTable) {
         try {
             if(0!=pTable.getAddressFor(glFunctionName)) {
                 return true;
@@ -1139,11 +1284,11 @@ public abstract class GLContextImpl extends GLContext {
 
     // dynamic function lookup at last incl name aliasing (not cached)
     DynamicLookupHelper dynLookup = getDrawableImpl().getGLDynamicLookupHelper();
-    String tmpBase = GLExtensionNames.normalizeVEN(GLExtensionNames.normalizeARB(glFunctionName, true), true);
+    String tmpBase = GLNameResolver.normalizeVEN(GLNameResolver.normalizeARB(glFunctionName, true), true);
     long addr = 0;
-    int  variants = GLExtensionNames.getFuncNamePermutationNumber(tmpBase);
+    int  variants = GLNameResolver.getFuncNamePermutationNumber(tmpBase);
     for(int i = 0; 0==addr && i < variants; i++) {
-        String tmp = GLExtensionNames.getFuncNamePermutation(tmpBase, i);
+        String tmp = GLNameResolver.getFuncNamePermutation(tmpBase, i);
         try {
             addr = dynLookup.dynamicLookupFunction(tmp);
         } catch (Exception e) { }
@@ -1154,6 +1299,7 @@ public abstract class GLContextImpl extends GLContext {
     return false;
   }
 
+  @Override
   public boolean isExtensionAvailable(String glExtensionName) {
       if(null!=extensionAvailability) {
         return extensionAvailability.isExtensionAvailable(mapToRealGLExtensionName(glExtensionName));
@@ -1161,10 +1307,12 @@ public abstract class GLContextImpl extends GLContext {
       return false;
   }
 
+  @Override
   public final int getPlatformExtensionCount() {
       return null != extensionAvailability ? extensionAvailability.getPlatformExtensionCount() : 0;
   }
-  
+
+  @Override
   public final String getPlatformExtensionsString() {
       if(null!=extensionAvailability) {
         return extensionAvailability.getPlatformExtensionsString();
@@ -1172,10 +1320,12 @@ public abstract class GLContextImpl extends GLContext {
       return null;
   }
 
+  @Override
   public final int getGLExtensionCount() {
       return null != extensionAvailability ? extensionAvailability.getGLExtensionCount() : 0;
   }
-  
+
+  @Override
   public final String getGLExtensionsString() {
       if(null!=extensionAvailability) {
         return extensionAvailability.getGLExtensionsString();
@@ -1189,11 +1339,11 @@ public abstract class GLContextImpl extends GLContext {
       }
       return false;
   }
-  
+
   protected static String getContextFQN(AbstractGraphicsDevice device, int major, int minor, int ctxProfileBits) {
       // remove non-key values
-      ctxProfileBits &= ~( GLContext.CTX_OPTION_DEBUG | GLContext.CTX_IMPL_ES2_COMPAT ) ; 
-            
+      ctxProfileBits &= ~( GLContext.CTX_IMPL_ES2_COMPAT | GLContext.CTX_IMPL_FBO ) ;
+
       return device.getUniqueID() + "-" + toHexString(composeBits(major, minor, ctxProfileBits));
   }
 
@@ -1220,7 +1370,7 @@ public abstract class GLContextImpl extends GLContext {
 
   //----------------------------------------------------------------------
   // Helpers for buffer object optimizations
-  
+
   public void setBufferSizeTracker(GLBufferSizeTracker bufferSizeTracker) {
     this.bufferSizeTracker = bufferSizeTracker;
   }
@@ -1245,35 +1395,92 @@ public abstract class GLContextImpl extends GLContext {
   public boolean hasWaiters() {
     return lock.getQueueLength()>0;
   }
+
+  //---------------------------------------------------------------------------
+  // Special FBO hook
+  //
+  
+  /**
+   * Tracks {@link GL#GL_FRAMEBUFFER}, {@link GL2GL3#GL_DRAW_FRAMEBUFFER} and {@link GL2GL3#GL_READ_FRAMEBUFFER}
+   * to be returned via {@link #getBoundFramebuffer(int)}.
+   * 
+   * <p>Invoked by {@link GL#glBindFramebuffer(int, int)}. </p>
+   * 
+   * <p>Assumes valid <code>framebufferName</code> range of [0..{@link Integer#MAX_VALUE}]</p> 
+   * 
+   * <p>Does not throw an exception if <code>target</code> is unknown or <code>framebufferName</code> invalid.</p>
+   */
+  public final void setBoundFramebuffer(int target, int framebufferName) {
+      if(0 > framebufferName) {
+          return; // ignore invalid name
+      }
+      switch(target) {
+          case GL.GL_FRAMEBUFFER:
+              boundFBOTarget[0] = framebufferName; // draw
+              boundFBOTarget[1] = framebufferName; // read
+              break;
+          case GL2GL3.GL_DRAW_FRAMEBUFFER:
+              boundFBOTarget[0] = framebufferName; // draw
+              break;
+          case GL2GL3.GL_READ_FRAMEBUFFER:
+              boundFBOTarget[1] = framebufferName; // read
+              break;
+          default: // ignore untracked target
+      }
+  }
+  @Override
+  public final int getBoundFramebuffer(int target) {
+      switch(target) {
+          case GL.GL_FRAMEBUFFER:
+          case GL2GL3.GL_DRAW_FRAMEBUFFER:
+              return boundFBOTarget[0]; // draw
+          case GL2GL3.GL_READ_FRAMEBUFFER:
+              return boundFBOTarget[1]; // read
+          default:
+              throw new InternalError("Invalid FBO target name: "+toHexString(target));
+      }
+  }
+  
+  @Override
+  public final int getDefaultDrawFramebuffer() { return drawable.getDefaultDrawFramebuffer(); }  
+  @Override
+  public final int getDefaultReadFramebuffer() { return drawable.getDefaultReadFramebuffer(); }
   
   //---------------------------------------------------------------------------
   // GL_ARB_debug_output, GL_AMD_debug_output helpers
   //
 
+  @Override
   public final String getGLDebugMessageExtension() {
       return glDebugHandler.getExtension();
   }
 
+  @Override
   public final boolean isGLDebugMessageEnabled() {
       return glDebugHandler.isEnabled();
   }
-  
+
+  @Override
   public final int getContextCreationFlags() {
-      return additionalCtxCreationFlags;                
+      return additionalCtxCreationFlags;
   }
 
+  @Override
   public final void setContextCreationFlags(int flags) {
       if(!isCreated()) {
           additionalCtxCreationFlags = flags & GLContext.CTX_OPTION_DEBUG;
       }
   }
-  
-  public final boolean isGLDebugSynchronous() { return glDebugHandler.isSynchronous(); }     
-  
+
+  @Override
+  public final boolean isGLDebugSynchronous() { return glDebugHandler.isSynchronous(); }
+
+  @Override
   public final void setGLDebugSynchronous(boolean synchronous) {
       glDebugHandler.setSynchronous(synchronous);
   }
-  
+
+  @Override
   public final void enableGLDebugMessage(boolean enable) throws GLException {
       if(!isCreated()) {
           if(enable) {
@@ -1286,23 +1493,27 @@ public abstract class GLContextImpl extends GLContext {
           glDebugHandler.enable(enable);
       }
   }
-  
-  public final void addGLDebugListener(GLDebugListener listener) { 
+
+  @Override
+  public final void addGLDebugListener(GLDebugListener listener) {
       glDebugHandler.addListener(listener);
   }
-  
+
+  @Override
   public final void removeGLDebugListener(GLDebugListener listener) {
       glDebugHandler.removeListener(listener);
-  }    
-  
+  }
+
+  @Override
   public final void glDebugMessageControl(int source, int type, int severity, int count, IntBuffer ids, boolean enabled) {
       if(glDebugHandler.isExtensionARB()) {
           gl.getGL2GL3().glDebugMessageControlARB(source, type, severity, count, ids, enabled);
       } else if(glDebugHandler.isExtensionAMD()) {
           gl.getGL2GL3().glDebugMessageEnableAMD(GLDebugMessage.translateARB2AMDCategory(source, type), severity, count, ids, enabled);
-      }      
+      }
   }
-  
+
+  @Override
   public final void glDebugMessageControl(int source, int type, int severity, int count, int[] ids, int ids_offset, boolean enabled) {
       if(glDebugHandler.isExtensionARB()) {
           gl.getGL2GL3().glDebugMessageControlARB(source, type, severity, count, ids, ids_offset, enabled);
@@ -1310,16 +1521,17 @@ public abstract class GLContextImpl extends GLContext {
           gl.getGL2GL3().glDebugMessageEnableAMD(GLDebugMessage.translateARB2AMDCategory(source, type), severity, count, ids, ids_offset, enabled);
       }
   }
-  
+
+  @Override
   public final void glDebugMessageInsert(int source, int type, int id, int severity, String buf) {
       final int len = (null != buf) ? buf.length() : 0;
       if(glDebugHandler.isExtensionARB()) {
           gl.getGL2GL3().glDebugMessageInsertARB(source, type, id, severity, len, buf);
       } else if(glDebugHandler.isExtensionAMD()) {
           gl.getGL2GL3().glDebugMessageInsertAMD(GLDebugMessage.translateARB2AMDCategory(source, type), severity, id, len, buf);
-      }      
+      }
   }
-  
+
   /** Internal bootstraping glGetString(GL_RENDERER) */
   protected static native String glGetStringInt(int name, long procAddress);
 }
diff --git a/src/jogl/classes/jogamp/opengl/GLDebugMessageHandler.java b/src/jogl/classes/jogamp/opengl/GLDebugMessageHandler.java
index b950c2f..0000e61 100644
--- a/src/jogl/classes/jogamp/opengl/GLDebugMessageHandler.java
+++ b/src/jogl/classes/jogamp/opengl/GLDebugMessageHandler.java
@@ -37,6 +37,8 @@ import javax.media.opengl.GLException;
 
 import com.jogamp.common.os.Platform;
 import com.jogamp.gluegen.runtime.ProcAddressTable;
+import com.jogamp.opengl.GLExtensions;
+
 import jogamp.opengl.gl4.GL4bcProcAddressTable;
 
 /**
@@ -54,12 +56,6 @@ import jogamp.opengl.gl4.GL4bcProcAddressTable;
  * the messages are translated to <i>ARB</i> {@link GLDebugMessage}, using {@link GLDebugMessage#translateAMDEvent(javax.media.opengl.GLContext, long, int, int, int, String)}.</p>
  */
 public class GLDebugMessageHandler {
-    /** Extension <i>GL_ARB_debug_output</i> implementing GLDebugMessage */
-    public static final String GL_ARB_debug_output = "GL_ARB_debug_output".intern();
-    
-    /** Extension <i>GL_AMD_debug_output</i> implementing GLDebugMessage */
-    public static final String GL_AMD_debug_output = "GL_AMD_debug_output".intern();
-    
     private static final boolean DEBUG = Debug.debug("GLDebugMessageHandler");
     
     private static final int EXT_ARB = 1;
@@ -131,11 +127,11 @@ public class GLDebugMessageHandler {
             }
             return;
         }
-        if( ctx.isExtensionAvailable(GL_ARB_debug_output) ) {
-            extName = GL_ARB_debug_output;
+        if( ctx.isExtensionAvailable(GLExtensions.ARB_debug_output) ) {
+            extName = GLExtensions.ARB_debug_output;
             extType = EXT_ARB;
-        } else if( ctx.isExtensionAvailable(GL_AMD_debug_output) ) {
-            extName = GL_AMD_debug_output;
+        } else if( ctx.isExtensionAvailable(GLExtensions.AMD_debug_output) ) {
+            extName = GLExtensions.AMD_debug_output;
             extType = EXT_AMD;
         }
         if(DEBUG) {
@@ -145,6 +141,8 @@ public class GLDebugMessageHandler {
         if(0 == extType) {
             if(DEBUG) {
                 System.err.println("GLDebugMessageHandler: No extension available! "+ctx.getGLVersion());
+                System.err.println("GL_EXTENSIONS  "+ctx.getGLExtensionCount());
+                System.err.println(ctx.getGLExtensionsString());                
             }
             return;
         }
@@ -190,11 +188,11 @@ public class GLDebugMessageHandler {
     }
     
     public final boolean isExtensionARB() {
-        return extName == GL_ARB_debug_output;
+        return extName == GLExtensions.ARB_debug_output;
     }
     
     public final boolean isExtensionAMD() {
-        return extName == GL_AMD_debug_output;
+        return extName == GLExtensions.AMD_debug_output;
     }
     
     /**
diff --git a/src/jogl/classes/jogamp/opengl/GLDrawableFactoryImpl.java b/src/jogl/classes/jogamp/opengl/GLDrawableFactoryImpl.java
index 3c60eb6..f780829 100644
--- a/src/jogl/classes/jogamp/opengl/GLDrawableFactoryImpl.java
+++ b/src/jogl/classes/jogamp/opengl/GLDrawableFactoryImpl.java
@@ -1,22 +1,22 @@
 /*
  * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
  * Copyright (c) 2010 JogAmp Community. All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- * 
+ *
  * - Redistribution of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
- * 
+ *
  * - Redistribution in binary form must reproduce the above copyright
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the distribution.
- * 
+ *
  * Neither the name of Sun Microsystems, Inc. or the names of
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * This software is provided "AS IS," without a warranty of any kind. ALL
  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -29,11 +29,11 @@
  * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
  * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
  * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
+ *
  * You acknowledge that this software is not designed or intended for use
  * in the design, construction, operation or maintenance of any nuclear
  * facility.
- * 
+ *
  * Sun gratefully acknowledges that this software was originally authored
  * and developed by Kenneth Bradley Russell and Christopher John Kline.
  */
@@ -47,7 +47,8 @@ import javax.media.nativewindow.NativeSurface;
 import javax.media.nativewindow.NativeWindowFactory;
 import javax.media.nativewindow.OffscreenLayerSurface;
 import javax.media.nativewindow.ProxySurface;
-import javax.media.nativewindow.SurfaceChangeable;
+import javax.media.nativewindow.MutableSurface;
+import javax.media.nativewindow.ProxySurface.UpstreamSurfaceHook;
 import javax.media.opengl.GLCapabilities;
 import javax.media.opengl.GLCapabilitiesChooser;
 import javax.media.opengl.GLCapabilitiesImmutable;
@@ -88,7 +89,7 @@ public abstract class GLDrawableFactoryImpl extends GLDrawableFactory {
       return null;
   }
   protected abstract GLContext getOrCreateSharedContextImpl(AbstractGraphicsDevice device);
-  
+
   /**
    * Returns the shared device mapped to the <code>device</code> {@link AbstractGraphicsDevice#getConnection()},
    * either a preexisting or newly created, or <code>null</code> if creation failed or not supported.<br>
@@ -115,7 +116,7 @@ public abstract class GLDrawableFactoryImpl extends GLDrawableFactory {
   }
   protected abstract AbstractGraphicsDevice getOrCreateSharedDeviceImpl(AbstractGraphicsDevice device);
 
-  /** 
+  /**
    * Returns the GLDynamicLookupHelper
    * @param profile if EGL/ES, profile <code>1</code> refers to ES1 and <code>2</code> to ES2,
    *        otherwise the profile is ignored.
@@ -125,30 +126,46 @@ public abstract class GLDrawableFactoryImpl extends GLDrawableFactory {
   //---------------------------------------------------------------------------
   // Dispatching GLDrawable construction in respect to the NativeSurface Capabilities
   //
+  @Override
   public GLDrawable createGLDrawable(NativeSurface target) {
     if (target == null) {
       throw new IllegalArgumentException("Null target");
     }
     final MutableGraphicsConfiguration config = (MutableGraphicsConfiguration) target.getGraphicsConfiguration();
-    GLCapabilitiesImmutable chosenCaps = (GLCapabilitiesImmutable) config.getChosenCapabilities();
-    AbstractGraphicsDevice adevice = config.getScreen().getDevice();
+    final GLCapabilitiesImmutable chosenCaps = (GLCapabilitiesImmutable) config.getChosenCapabilities();
+    final AbstractGraphicsDevice adevice = config.getScreen().getDevice();
+    final boolean isFBOAvailable = GLContext.isFBOAvailable(adevice, chosenCaps.getGLProfile());
     GLDrawable result = null;
     adevice.lock();
     try {
         final OffscreenLayerSurface ols = NativeWindowFactory.getOffscreenLayerSurface(target, true);
         if(null != ols) {
-            // layered surface -> Offscreen/PBuffer
+            // layered surface -> Offscreen/[FBO|PBuffer]
             final GLCapabilities chosenCapsMod = (GLCapabilities) chosenCaps.cloneMutable();
             chosenCapsMod.setOnscreen(false);
-            chosenCapsMod.setPBuffer(canCreateGLPbuffer(adevice));
+            /* if( isFBOAvailable ) { // FIXME JAU: FBO n/a yet
+                chosenCapsMod.setFBO(true);
+            } else */ 
+            if( canCreateGLPbuffer(adevice) ) {
+                chosenCapsMod.setPBuffer(true);
+            } else {
+                chosenCapsMod.setFBO(false);
+                chosenCapsMod.setPBuffer(false);
+            }
             config.setChosenCapabilities(chosenCapsMod);
             if(DEBUG) {
                 System.err.println("GLDrawableFactoryImpl.createGLDrawable -> OnscreenDrawable -> Offscreen-Layer: "+target);
             }
-            if( ! ( target instanceof SurfaceChangeable ) ) {
+            if( ! ( target instanceof MutableSurface ) ) {
                 throw new IllegalArgumentException("Passed NativeSurface must implement SurfaceChangeable for offscreen layered surface: "+target);
+            }            
+            if( ((GLCapabilitiesImmutable)config.getRequestedCapabilities()).isFBO() && isFBOAvailable ) {
+                // FIXME JAU: Need to revise passed MutableSurface to work w/ FBO ..
+                final GLDrawableImpl dummyDrawable = createOnscreenDrawableImpl(target);                
+                result = new GLFBODrawableImpl(this, dummyDrawable, target, target.getWidth(), target.getHeight(), 0 /* textureUnit */);
+            } else {            
+                result = createOffscreenDrawableImpl(target);
             }
-            result = createOffscreenDrawableImpl(target);            
         } else if(chosenCaps.isOnscreen()) {
             // onscreen
             if(DEBUG) {
@@ -158,12 +175,18 @@ public abstract class GLDrawableFactoryImpl extends GLDrawableFactory {
         } else {
             // offscreen
             if(DEBUG) {
-                System.err.println("GLDrawableFactoryImpl.createGLDrawable -> OffScreenDrawable (PBuffer: "+chosenCaps.isPBuffer()+"): "+target);
+                System.err.println("GLDrawableFactoryImpl.createGLDrawable -> OffScreenDrawable, FBO-chosen(-avail)/PBuffer: "+chosenCaps.isFBO()+"("+isFBOAvailable+")/"+chosenCaps.isPBuffer()+": "+target);
             }
-            if( ! ( target instanceof SurfaceChangeable ) ) {
+            if( ! ( target instanceof MutableSurface ) ) {
                 throw new IllegalArgumentException("Passed NativeSurface must implement SurfaceChangeable for offscreen: "+target);
             }
-            result = createOffscreenDrawableImpl(target);
+            if( ((GLCapabilitiesImmutable)config.getRequestedCapabilities()).isFBO() && isFBOAvailable ) {
+                // FIXME JAU: Need to revise passed MutableSurface to work w/ FBO ..
+                final GLDrawableImpl dummyDrawable = createOnscreenDrawableImpl(target);                
+                result = new GLFBODrawableImpl(this, dummyDrawable, target, target.getWidth(), target.getHeight(), 0 /* textureUnit */);
+            } else {
+                result = createOffscreenDrawableImpl(target);
+            }
         }
     } finally {
         adevice.unlock();
@@ -176,43 +199,42 @@ public abstract class GLDrawableFactoryImpl extends GLDrawableFactory {
 
   //---------------------------------------------------------------------------
   //
-  // Onscreen GLDrawable construction 
+  // Onscreen GLDrawable construction
   //
 
   protected abstract GLDrawableImpl createOnscreenDrawableImpl(NativeSurface target);
 
   //---------------------------------------------------------------------------
   //
-  // PBuffer GLDrawable construction 
+  // PBuffer Offscreen GLDrawable construction
   //
-
+  
+  @Override
   public abstract boolean canCreateGLPbuffer(AbstractGraphicsDevice device);
 
+  @Override
   public GLPbuffer createGLPbuffer(AbstractGraphicsDevice deviceReq,
                                    GLCapabilitiesImmutable capsRequested,
                                    GLCapabilitiesChooser chooser,
                                    int width,
                                    int height,
                                    GLContext shareWith) {
-    if(height<=0 || height<=0) {
-        throw new GLException("Width and height of pbuffer must be positive (were (" +
-                        width + ", " + height + "))");
+    if(width<=0 || height<=0) {
+        throw new GLException("initial size must be positive (were (" + width + " x " + height + "))");
     }
-
     AbstractGraphicsDevice device = getOrCreateSharedDevice(deviceReq);
     if(null == device) {
         throw new GLException("No shared device for requested: "+deviceReq);
     }
-
-    if (!canCreateGLPbuffer(device)) {
-        throw new GLException("Pbuffer support not available with device: "+device);
+    if ( !canCreateGLPbuffer(device) ) {
+        throw new GLException("Pbuffer not available with device: "+device);
     }
-    
-    GLCapabilitiesImmutable capsChosen = GLGraphicsConfigurationUtil.fixGLPBufferGLCapabilities(capsRequested);
+
+    final GLCapabilitiesImmutable capsChosen = GLGraphicsConfigurationUtil.fixGLPBufferGLCapabilities(capsRequested);
     GLDrawableImpl drawable = null;
     device.lock();
     try {
-        drawable = (GLDrawableImpl) createGLDrawable( createOffscreenSurfaceImpl(device, capsChosen, capsRequested, chooser, width, height) );
+        drawable = (GLDrawableImpl) createGLDrawable( createMutableSurfaceImpl(device, true, capsChosen, capsRequested, chooser, width, height, null) );
         if(null != drawable) {
             drawable.setRealized(true);
         }
@@ -223,81 +245,163 @@ public abstract class GLDrawableFactoryImpl extends GLDrawableFactory {
     if(null==drawable) {
         throw new GLException("Could not create Pbuffer drawable for: "+device+", "+capsChosen+", "+width+"x"+height);
     }
-    return new GLPbufferImpl( drawable, shareWith);
+    return new GLPbufferImpl( drawable, shareWith, true);
   }
 
-
   //---------------------------------------------------------------------------
   //
-  // Offscreen GLDrawable construction 
+  // Offscreen GLDrawable construction
   //
 
-  protected abstract GLDrawableImpl createOffscreenDrawableImpl(NativeSurface target) ;
-
+  @Override
   public GLDrawable createOffscreenDrawable(AbstractGraphicsDevice deviceReq,
                                             GLCapabilitiesImmutable capsRequested,
                                             GLCapabilitiesChooser chooser,
-                                            int width,
-                                            int height) {
+                                            int width, int height) {
     if(width<=0 || height<=0) {
-        throw new GLException("Width and height of pbuffer must be positive (were (" +
-                        width + ", " + height + "))");
+        throw new GLException("initial size must be positive (were (" + width + " x " + height + "))");
     }
-    AbstractGraphicsDevice device = getOrCreateSharedDevice(deviceReq);
+    final AbstractGraphicsDevice device = getOrCreateSharedDevice(deviceReq);
     if(null == device) {
         throw new GLException("No shared device for requested: "+deviceReq);
     }
-    GLCapabilitiesImmutable capsChosen = GLGraphicsConfigurationUtil.fixOffScreenGLCapabilities(capsRequested, canCreateGLPbuffer(deviceReq));
-
+    
+    if( capsRequested.isFBO() && GLContext.isFBOAvailable(device, capsRequested.getGLProfile()) ) {
+        device.lock();
+        try {
+            return createFBODrawableImpl(device, capsRequested, chooser, width, height);
+        } finally {
+            device.unlock();
+        }
+    }
+    
+    final GLCapabilitiesImmutable capsChosen = GLGraphicsConfigurationUtil.fixOffscreenGLCapabilities(capsRequested, false, canCreateGLPbuffer(device));
     device.lock();
     try {
-        return createGLDrawable( createOffscreenSurfaceImpl(device, capsChosen, capsRequested, chooser, width, height) );
+        return createOffscreenDrawableImpl( createMutableSurfaceImpl(device, true, capsChosen, capsRequested, chooser, width, height, null) );
     } finally {
         device.unlock();
     }
   }
 
-  public NativeSurface createOffscreenSurface(AbstractGraphicsDevice deviceReq,
-                                              GLCapabilitiesImmutable capsRequested,
-                                              GLCapabilitiesChooser chooser,
-                                              int width, int height) {
-    AbstractGraphicsDevice device = getOrCreateSharedDevice(deviceReq);
+  /** Creates a platform independent offscreen FBO GLDrawable implementation */  
+  protected GLDrawable createFBODrawableImpl(AbstractGraphicsDevice device, GLCapabilitiesImmutable requestedCaps, GLCapabilitiesChooser chooser, 
+                                            int initialWidth, int initialHeight) {    
+    final GLCapabilitiesImmutable dummyCaps = GLGraphicsConfigurationUtil.fixOnscreenGLCapabilities(requestedCaps);
+    final NativeSurface dummySurface = createDummySurfaceImpl(device, true, dummyCaps, null, 64, 64);
+    final GLDrawableImpl dummyDrawable = createOnscreenDrawableImpl(dummySurface);
+    
+    return new GLFBODrawableImpl(this, dummyDrawable, dummySurface, initialWidth, initialHeight, 0 /* textureUnit */);
+  }
+  
+  /** Creates a platform dependent offscreen pbuffer/pixmap GLDrawable implementation */  
+  protected abstract GLDrawableImpl createOffscreenDrawableImpl(NativeSurface target) ;
+
+  /**
+   * Creates a mutable {@link ProxySurface} w/o defined surface handle.
+   * <p>
+   * It's {@link AbstractGraphicsConfiguration} is properly set according to the given {@link GLCapabilitiesImmutable}.
+   * </p>
+   * <p>
+   * Lifecycle (destruction) of the TBD surface handle shall be handled by the caller.
+   * </p>
+   * @param device a valid platform dependent target device.
+   * @param createNewDevice if <code>true</code> a new device instance is created using <code>device</code> details,
+   *                        otherwise <code>device</code> instance is used as-is.
+   * @param capsChosen
+   * @param capsRequested
+   * @param chooser the custom chooser, may be null for default
+   * @param width the initial width
+   * @param height the initial height
+   * @param lifecycleHook optional control of the surface's lifecycle 
+   * @return the created {@link MutableSurface} instance w/o defined surface handle
+   */
+  protected abstract ProxySurface createMutableSurfaceImpl(AbstractGraphicsDevice device, boolean createNewDevice, 
+                                                           GLCapabilitiesImmutable capsChosen,
+                                                           GLCapabilitiesImmutable capsRequested,
+                                                           GLCapabilitiesChooser chooser, int width, int height, UpstreamSurfaceHook lifecycleHook);
+
+  /**
+   * A dummy surface is not visible on screen and will not be used to render directly to,
+   * it maybe on- or offscreen.
+   * <p>
+   * It is used to allow the creation of a {@link GLDrawable} and {@link GLContext} to query information.
+   * It also allows creation of framebuffer objects which are used for rendering.
+   * </p>
+   * @param deviceReq which {@link javax.media.nativewindow.AbstractGraphicsDevice#getConnection() connection} denotes the shared device to be used, may be <code>null</code> for the platform's default device.
+   * @param requestedCaps
+   * @param chooser the custom chooser, may be null for default
+   * @param width the initial width
+   * @param height the initial height
+   *
+   * @return the created {@link MutableSurface} instance w/o defined surface handle
+   */
+  public NativeSurface createDummySurface(AbstractGraphicsDevice deviceReq, GLCapabilitiesImmutable requestedCaps, GLCapabilitiesChooser chooser,
+                                          int width, int height) {
+    final AbstractGraphicsDevice device = getOrCreateSharedDevice(deviceReq);
     if(null == device) {
         throw new GLException("No shared device for requested: "+deviceReq);
     }
-    GLCapabilitiesImmutable capsChosen = GLGraphicsConfigurationUtil.fixOffScreenGLCapabilities(capsRequested, canCreateGLPbuffer(deviceReq));
-
     device.lock();
     try {
-        return createOffscreenSurfaceImpl(device, capsChosen, capsRequested, chooser, width, height);
+        return createDummySurfaceImpl(device, true, requestedCaps, chooser, width, height);
     } finally {
         device.unlock();
     }
   }
-
+  
   /**
-   * creates an offscreen NativeSurface, which must implement SurfaceChangeable as well,
-   * so the windowing system related implementation is able to set the surface handle.
+   * A dummy surface is not visible on screen and will not be used to render directly to,
+   * it maybe on- or offscreen.
+   * <p>
+   * It is used to allow the creation of a {@link GLDrawable} and {@link GLContext} to query information.
+   * It also allows creation of framebuffer objects which are used for rendering.
+   * </p>
+   * @param device a valid platform dependent target device.
+   * @param createNewDevice if <code>true</code> a new device instance is created using <code>device</code> details,
+   *                        otherwise <code>device</code> instance is used as-is.
+   * @param requestedCaps
+   * @param chooser the custom chooser, may be null for default
+   * @param width the initial width
+   * @param height the initial height
+   * @return the created {@link MutableSurface} instance w/o defined surface handle
    */
-  protected abstract NativeSurface createOffscreenSurfaceImpl(AbstractGraphicsDevice device,
-                                                              GLCapabilitiesImmutable capabilities, GLCapabilitiesImmutable capsRequested,
-                                                              GLCapabilitiesChooser chooser,
-                                                              int width, int height);
+  public abstract ProxySurface createDummySurfaceImpl(AbstractGraphicsDevice device, boolean createNewDevice, 
+                                                      GLCapabilitiesImmutable requestedCaps, GLCapabilitiesChooser chooser, int width, int height);
 
-  public ProxySurface createProxySurface(AbstractGraphicsDevice device, long windowHandle, GLCapabilitiesImmutable capsRequested, GLCapabilitiesChooser chooser) {
+  //---------------------------------------------------------------------------
+  //
+  // ProxySurface (Wrapped pre-existing native surface) construction
+  //
+  
+  @Override
+  public ProxySurface createProxySurface(AbstractGraphicsDevice deviceReq, int screenIdx, long windowHandle, 
+                                         GLCapabilitiesImmutable capsRequested, GLCapabilitiesChooser chooser, UpstreamSurfaceHook upstream) {
+    final AbstractGraphicsDevice device = getOrCreateSharedDevice(deviceReq);
     if(null == device) {
-        throw new GLException("No shared device for requested: "+device);
+        throw new GLException("No shared device for requested: "+deviceReq);
+    }
+    if(0 == windowHandle) {
+        throw new IllegalArgumentException("Null windowHandle");
     }
 
     device.lock();
     try {
-        return createProxySurfaceImpl(device, windowHandle, capsRequested, chooser);
+        return createProxySurfaceImpl(device, screenIdx, windowHandle, capsRequested, chooser, upstream);
     } finally {
         device.unlock();
     }
-  }  
-  
-  protected abstract ProxySurface createProxySurfaceImpl(AbstractGraphicsDevice device, long windowHandle, GLCapabilitiesImmutable capsRequested, GLCapabilitiesChooser chooser);
+  }
+
+  /**
+   * Creates a {@link ProxySurface} with a set surface handle.
+   * <p>
+   * Implementation is also required to allocate it's own {@link AbstractGraphicsDevice} instance.
+   * </p>
+ * @param upstream TODO
+   */
+  protected abstract ProxySurface createProxySurfaceImpl(AbstractGraphicsDevice deviceReq, int screenIdx, long windowHandle, 
+                                                         GLCapabilitiesImmutable capsRequested, GLCapabilitiesChooser chooser, UpstreamSurfaceHook upstream);
 
   //---------------------------------------------------------------------------
   //
@@ -305,7 +409,8 @@ public abstract class GLDrawableFactoryImpl extends GLDrawableFactory {
   //
 
   protected abstract GLContext createExternalGLContextImpl();
-  
+
+  @Override
   public GLContext createExternalGLContext() {
     NativeWindowFactory.getDefaultToolkitLock().lock();
     try {
@@ -317,6 +422,7 @@ public abstract class GLDrawableFactoryImpl extends GLDrawableFactory {
 
   protected abstract GLDrawable createExternalGLDrawableImpl();
 
+  @Override
   public GLDrawable createExternalGLDrawable() {
     NativeWindowFactory.getDefaultToolkitLock().lock();
     try {
@@ -399,7 +505,7 @@ public abstract class GLDrawableFactoryImpl extends GLDrawableFactory {
    * normal ahead of time, use resetDisplayGamma(). Throws
    * IllegalArgumentException if any of the parameters were
    * out-of-bounds.
-   * 
+   *
    * @param gamma The gamma value, typically > 1.0 (default value is
    *   1.0)
    * @param brightness The brightness value between -1.0 and 1.0,
@@ -485,7 +591,8 @@ public abstract class GLDrawableFactoryImpl extends GLDrawableFactory {
       return;
     if (gammaShutdownHook == null) {
       gammaShutdownHook = new Thread(new Runnable() {
-          public void run() {
+          @Override
+        public void run() {
             synchronized (GLDrawableFactoryImpl.this) {
               resetGammaRamp(originalGammaRamp);
             }
diff --git a/src/jogl/classes/jogamp/opengl/GLDrawableHelper.java b/src/jogl/classes/jogamp/opengl/GLDrawableHelper.java
index c992b3c..090c5fe 100644
--- a/src/jogl/classes/jogamp/opengl/GLDrawableHelper.java
+++ b/src/jogl/classes/jogamp/opengl/GLDrawableHelper.java
@@ -61,13 +61,13 @@ public class GLDrawableHelper {
   private static final boolean PERF_STATS = Debug.isPropertyDefined("jogl.debug.GLDrawable.PerfStats", true);
     
   protected static final boolean DEBUG = GLDrawableImpl.DEBUG;
-  private Object listenersLock = new Object();
-  private ArrayList<GLEventListener> listeners;
-  private HashSet<GLEventListener> listenersToBeInit;
+  private final Object listenersLock = new Object();
+  private final ArrayList<GLEventListener> listeners = new ArrayList<GLEventListener>();
+  private final HashSet<GLEventListener> listenersToBeInit = new HashSet<GLEventListener>();
+  private final Object glRunnablesLock = new Object();
+  private volatile ArrayList<GLRunnableTask> glRunnables = new ArrayList<GLRunnableTask>();
   private boolean autoSwapBufferMode;
   private Thread skipContextReleaseThread;
-  private Object glRunnablesLock = new Object();
-  private ArrayList<GLRunnable> glRunnables;
   private GLAnimatorControl animatorCtrl;
 
   public GLDrawableHelper() {
@@ -76,13 +76,13 @@ public class GLDrawableHelper {
 
   public final void reset() {
     synchronized(listenersLock) {
-        listeners = new ArrayList<GLEventListener>();
-        listenersToBeInit = new HashSet<GLEventListener>();
+        listeners.clear();
+        listenersToBeInit.clear();
     }
     autoSwapBufferMode = true;
     skipContextReleaseThread = null;
     synchronized(glRunnablesLock) {
-        glRunnables = new ArrayList<GLRunnable>();
+        glRunnables.clear();
     }
     animatorCtrl = null;
   }
@@ -105,6 +105,46 @@ public class GLDrawableHelper {
     return sb.toString();
   }
 
+  /**
+   * Associate a new context to the drawable and also propagates the context/drawable switch by 
+   * calling {@link GLContext#setGLDrawable(GLDrawable, boolean) newCtx.setGLDrawable(drawable, true);}.
+   * <p>
+   * If the old context's drawable was an {@link GLAutoDrawable}, it's reference to the given drawable
+   * is being cleared by calling 
+   * {@link GLAutoDrawable#setContext(GLContext) ((GLAutoDrawable)oldCtx.getGLDrawable()).setContext(null)}.
+   * </p>
+   * <p> 
+   * If the old or new context was current on this thread, it is being released before switching the drawable.
+   * </p>
+   * 
+   * @param drawable the drawable which context is changed
+   * @param newCtx the new context
+   * @param oldCtx the old context
+   * @return true if the newt context was current, otherwise false
+   *  
+   * @see GLAutoDrawable#setContext(GLContext)
+   */
+  public final boolean switchContext(GLDrawable drawable, GLContext oldCtx, GLContext newCtx, int additionalCtxCreationFlags) {
+      if(null != oldCtx && oldCtx.isCurrent()) {
+          oldCtx.release();
+      }
+      final boolean newCtxCurrent;
+      if(null!=newCtx) {
+          newCtxCurrent = newCtx.isCurrent();
+          if(newCtxCurrent) {
+              newCtx.release();
+          }
+          newCtx.setContextCreationFlags(additionalCtxCreationFlags);
+          newCtx.setGLDrawable(drawable, true); // propagate context/drawable switch
+      } else {
+          newCtxCurrent = false;
+      }
+      if(null!=oldCtx && oldCtx.getGLDrawable() instanceof GLAutoDrawable) {
+          ((GLAutoDrawable)oldCtx.getGLDrawable()).setContext(null);
+      }
+      return newCtxCurrent;
+  }
+  
   public final void addGLEventListener(GLEventListener listener) {
     addGLEventListener(-1, listener);
   }
@@ -128,6 +168,16 @@ public class GLDrawableHelper {
     }
   }
 
+  public final GLEventListener removeGLEventListener(int index)
+    throws IndexOutOfBoundsException {
+    synchronized(listenersLock) {
+        if(0>index) {
+            index = listeners.size()-1;
+        }
+        return listeners.remove(index);
+    }
+  }
+  
   /**
    * Issues {@link javax.media.opengl.GLEventListener#dispose(javax.media.opengl.GLAutoDrawable)}
    * to all listeners.
@@ -139,34 +189,37 @@ public class GLDrawableHelper {
    */
   public final void dispose(GLAutoDrawable drawable) {
     synchronized(listenersLock) {
-        for (int i=0; i < listeners.size(); i++) {
-          listeners.get(i).dispose(drawable);
+        final ArrayList<GLEventListener> _listeners = listeners;
+        for (int i=0; i < _listeners.size(); i++) {
+          _listeners.get(i).dispose(drawable);
         }
     }
   }
-  
-  private boolean init(GLEventListener l, GLAutoDrawable drawable, boolean sendReshape) {
+
+  private final boolean init(GLEventListener l, GLAutoDrawable drawable, boolean sendReshape) {
       if(listenersToBeInit.remove(l)) {
           l.init(drawable);
           if(sendReshape) {
-              reshape(l, drawable, 0, 0, drawable.getWidth(), drawable.getHeight(), true /* setViewport */, false);
+              reshape(l, drawable, 0, 0, drawable.getWidth(), drawable.getHeight(), true /* setViewport */, false /* checkInit */);
           }
           return true;
       }
       return false;
   }
 
+  /** The default init action to be called once after ctx is being created @ 1st makeCurrent(). */
   public final void init(GLAutoDrawable drawable) {
     synchronized(listenersLock) {
-        for (int i=0; i < listeners.size(); i++) {
-          final GLEventListener listener = listeners.get(i) ;
+        final ArrayList<GLEventListener> _listeners = listeners;
+        for (int i=0; i < _listeners.size(); i++) {
+          final GLEventListener listener = _listeners.get(i) ;
 
           // If make current ctx, invoked by invokGL(..), results in a new ctx, init gets called.
           // This may happen not just for initial setup, but for ctx recreation due to resource change (drawable/window),
           // hence the must always be initialized unconditional.
           listenersToBeInit.add(listener);
 
-          if ( ! init( listener, drawable, false ) ) {
+          if ( ! init( listener, drawable, true /* sendReshape */) ) {
             throw new GLException("GLEventListener "+listener+" already initialized: "+drawable);
           }
         }
@@ -179,24 +232,27 @@ public class GLDrawableHelper {
         displayImpl(drawable);  
     }
   }
-  private void displayImpl(GLAutoDrawable drawable) {
+  private final void displayImpl(GLAutoDrawable drawable) {
       synchronized(listenersLock) {
-          for (int i=0; i < listeners.size(); i++) {
-            final GLEventListener listener = listeners.get(i) ;
+          final ArrayList<GLEventListener> _listeners = listeners;
+          for (int i=0; i < _listeners.size(); i++) {
+            final GLEventListener listener = _listeners.get(i) ;
             // GLEventListener may need to be init, 
             // in case this one is added after the realization of the GLAutoDrawable
-            init( listener, drawable, true ) ; 
+            init( listener, drawable, true /* sendReshape */) ; 
             listener.display(drawable);
           }
       }
   }
 
-  private void reshape(GLEventListener listener, GLAutoDrawable drawable,
-                       int x, int y, int width, int height, boolean setViewport, boolean checkInit) {
+  private final void reshape(GLEventListener listener, GLAutoDrawable drawable,
+                             int x, int y, int width, int height, boolean setViewport, boolean checkInit) {
     if(checkInit) {
         // GLEventListener may need to be init, 
-        // in case this one is added after the realization of the GLAutoDrawable      
-        init( listener, drawable, false ) ;
+        // in case this one is added after the realization of the GLAutoDrawable
+        synchronized(listenersLock) {
+            init( listener, drawable, false /* sendReshape */) ;
+        }
     }
     if(setViewport) {
         drawable.getGL().glViewport(x, y, width, height);
@@ -212,27 +268,50 @@ public class GLDrawableHelper {
     }
   }
 
-  private boolean execGLRunnables(GLAutoDrawable drawable) {
+  private final boolean execGLRunnables(GLAutoDrawable drawable) {
     boolean res = true;
-    if(glRunnables.size()>0) {
+    if(glRunnables.size()>0) { // volatile OK
         // swap one-shot list asap
-        ArrayList<GLRunnable> _glRunnables = null;
+        final ArrayList<GLRunnableTask> _glRunnables;
         synchronized(glRunnablesLock) {
             if(glRunnables.size()>0) {
                 _glRunnables = glRunnables;
-                glRunnables = new ArrayList<GLRunnable>();
+                glRunnables = new ArrayList<GLRunnableTask>();
+            } else {
+                _glRunnables = null;
             }
         }
         
         if(null!=_glRunnables) {
             for (int i=0; i < _glRunnables.size(); i++) {
-              res = _glRunnables.get(i).run(drawable) && res;
+                res = _glRunnables.get(i).run(drawable) && res;
             }
         }
     }
     return res;
   }
 
+  public final void flushGLRunnables() {
+    if(glRunnables.size()>0) { // volatile OK
+        // swap one-shot list asap
+        final ArrayList<GLRunnableTask> _glRunnables;
+        synchronized(glRunnablesLock) {
+            if(glRunnables.size()>0) {
+                _glRunnables = glRunnables;
+                glRunnables = new ArrayList<GLRunnableTask>();
+            } else {
+                _glRunnables = null;
+            }
+        }
+        
+        if(null!=_glRunnables) {
+            for (int i=0; i < _glRunnables.size(); i++) {
+                _glRunnables.get(i).flush();
+            }
+        }
+    }
+  }
+  
   public final void setAnimator(GLAnimatorControl animator) throws GLException {
     synchronized(glRunnablesLock) {
         if(animatorCtrl!=animator && null!=animator && null!=animatorCtrl) {
@@ -248,7 +327,7 @@ public class GLDrawableHelper {
     }
   }
 
-  public final boolean isExternalAnimatorRunning() {
+  public final boolean isAnimatorRunningOnOtherThread() {
     return ( null != animatorCtrl ) ? animatorCtrl.isStarted() && animatorCtrl.getThread() != Thread.currentThread() : false ;
   }
 
@@ -264,10 +343,28 @@ public class GLDrawableHelper {
     return ( null != animatorCtrl ) ? animatorCtrl.isAnimating() : false ;
   }
 
-  public final void invoke(GLAutoDrawable drawable, boolean wait, GLRunnable glRunnable) {
-    if( null == drawable || null == glRunnable ) {
-        return;
+  /**
+   * <p>
+   * If <code>wait</code> is <code>true</code> the call blocks until the <code>glRunnable</code>
+   * has been executed.<p>
+   * <p>
+   * If <code>wait</code> is <code>true</code> <b>and</b> 
+   * {@link GLDrawable#isRealized()} returns <code>false</code> <i>or</i> {@link GLAutoDrawable#getContext()} returns <code>null</code>,
+   * the call is ignored and returns <code>false</code>.<br>
+   * This helps avoiding deadlocking the caller.
+   * </p>
+   *
+   * @param drawable the {@link GLAutoDrawable} to be used
+   * @param wait if <code>true</code> block until execution of <code>glRunnable</code> is finished, otherwise return immediatly w/o waiting
+   * @param glRunnable the {@link GLRunnable} to execute within {@link #display()}
+   * @return <code>true</code> if the {@link GLRunnable} has been processed or queued, otherwise <code>false</code>.
+   */
+  public final boolean invoke(GLAutoDrawable drawable, boolean wait, GLRunnable glRunnable) {
+    if( null == glRunnable || null == drawable ||
+        wait && ( !drawable.isRealized() || null==drawable.getContext() ) ) {
+        return false;
     }
+    
     Throwable throwable = null;
     GLRunnableTask rTask = null;
     Object rTaskLock = new Object();
@@ -299,6 +396,7 @@ public class GLDrawableHelper {
             }
         }
     }
+    return true;
   }
 
   public final void setAutoSwapBufferMode(boolean enable) {
@@ -413,10 +511,10 @@ public class GLDrawableHelper {
   
     try {
       res = context.makeCurrent();
-      if (res != GLContext.CONTEXT_NOT_CURRENT) {
+      if (GLContext.CONTEXT_NOT_CURRENT != res) {
         if(!isDisposeAction) {
             perThreadInitAction.set(initAction);
-            if (res == GLContext.CONTEXT_CURRENT_NEW) {
+            if (GLContext.CONTEXT_CURRENT_NEW == res) {
               if (DEBUG) {
                 System.err.println("GLDrawableHelper " + this + ".invokeGL(): Running initAction");
               }
@@ -427,7 +525,7 @@ public class GLDrawableHelper {
                 drawable.swapBuffers();
             }
         } else {
-            if(res == GLContext.CONTEXT_CURRENT_NEW) {
+            if(GLContext.CONTEXT_CURRENT_NEW == res) {
                 throw new GLException(currentThread.getName()+" GLDrawableHelper " + this + ".invokeGL(): Dispose case (no init action given): Native context was not created (new ctx): "+context);
             }
             if(listeners.size()>0) {
@@ -439,7 +537,8 @@ public class GLDrawableHelper {
       try {
           if(isDisposeAction) {
               context.destroy();
-          } else if( res != GLContext.CONTEXT_NOT_CURRENT ) {
+              flushGLRunnables();
+          } else if( GLContext.CONTEXT_NOT_CURRENT != res ) {
               context.release();
           }
       } catch (Exception e) {
@@ -526,6 +625,7 @@ public class GLDrawableHelper {
       try {
           if(isDisposeAction) {
               context.destroy();
+              flushGLRunnables();
               ctxDestroyed = true;
           } else if( res != GLContext.CONTEXT_NOT_CURRENT &&
                      (null == skipContextReleaseThread || currentThread != skipContextReleaseThread) ) {
diff --git a/src/jogl/classes/jogamp/opengl/GLDrawableImpl.java b/src/jogl/classes/jogamp/opengl/GLDrawableImpl.java
index 36f17e5..abf2bf5 100644
--- a/src/jogl/classes/jogamp/opengl/GLDrawableImpl.java
+++ b/src/jogl/classes/jogamp/opengl/GLDrawableImpl.java
@@ -1,22 +1,22 @@
 /*
  * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
  * Copyright (c) 2010 JogAmp Community. All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- * 
+ *
  * - Redistribution of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
- * 
+ *
  * - Redistribution in binary form must reproduce the above copyright
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the distribution.
- * 
+ *
  * Neither the name of Sun Microsystems, Inc. or the names of
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * This software is provided "AS IS," without a warranty of any kind. ALL
  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -29,11 +29,11 @@
  * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
  * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
  * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
+ *
  * You acknowledge that this software is not designed or intended for use
  * in the design, construction, operation or maintenance of any nuclear
  * facility.
- * 
+ *
  * Sun gratefully acknowledges that this software was originally authored
  * and developed by Kenneth Bradley Russell and Christopher John Kline.
  */
@@ -42,6 +42,7 @@ package jogamp.opengl;
 
 import javax.media.nativewindow.AbstractGraphicsDevice;
 import javax.media.nativewindow.NativeSurface;
+import javax.media.nativewindow.ProxySurface;
 import javax.media.opengl.GLCapabilitiesImmutable;
 import javax.media.opengl.GLContext;
 import javax.media.opengl.GLDrawable;
@@ -61,31 +62,21 @@ public abstract class GLDrawableImpl implements GLDrawable {
       this.requestedCapabilities = (GLCapabilitiesImmutable) surface.getGraphicsConfiguration().getRequestedCapabilities();
   }
 
-  /** 
+  /**
    * Returns the DynamicLookupHelper
    */
   public abstract GLDynamicLookupHelper getGLDynamicLookupHelper();
 
-  public GLDrawableFactoryImpl getFactoryImpl() {
+  public final GLDrawableFactoryImpl getFactoryImpl() {
     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 {
-    GLCapabilitiesImmutable caps = (GLCapabilitiesImmutable)surface.getGraphicsConfiguration().getChosenCapabilities();
+    if( !realized ) {
+        return; // destroyed already
+    }
+    final GLCapabilitiesImmutable caps = (GLCapabilitiesImmutable)surface.getGraphicsConfiguration().getChosenCapabilities();
     if ( caps.getDoubleBuffered() ) {
         if(!surface.surfaceSwap()) {
             int lockRes = lockSurface(); // it's recursive, so it's ok within [makeCurrent .. release]
@@ -103,7 +94,7 @@ public abstract class GLDrawableImpl implements GLDrawable {
         }
     } else {
         GLContext ctx = GLContext.getCurrent();
-        if(null!=ctx && ctx.getGLDrawable()==this) { 
+        if(null!=ctx && ctx.getGLDrawable()==this) {
             ctx.getGL().glFinish();
         }
     }
@@ -111,40 +102,46 @@ public abstract class GLDrawableImpl implements GLDrawable {
   }
   protected abstract void swapBuffersImpl();
 
-  public static String toHexString(long hex) {
+  public final static String toHexString(long hex) {
     return "0x" + Long.toHexString(hex);
   }
 
-  public GLProfile getGLProfile() {
+  @Override
+  public final GLProfile getGLProfile() {
     return requestedCapabilities.getGLProfile();
   }
 
+  @Override
   public GLCapabilitiesImmutable getChosenGLCapabilities() {
     return  (GLCapabilitiesImmutable) surface.getGraphicsConfiguration().getChosenCapabilities();
   }
 
-  public GLCapabilitiesImmutable getRequestedGLCapabilities() {
+  public final GLCapabilitiesImmutable getRequestedGLCapabilities() {
     return requestedCapabilities;
   }
 
+  @Override
   public NativeSurface getNativeSurface() {
     return surface;
   }
 
-  /** called with locked surface @ setRealized(false) */ 
+  /** called with locked surface @ setRealized(false) */
   protected void destroyHandle() {}
-  
-  /** called with locked surface @ setRealized(true) or @ lockSurface(..) when surface changed */ 
+
+  /** called with locked surface @ setRealized(true) or @ lockSurface(..) when surface changed */
   protected void updateHandle() {}
 
+  @Override
   public long getHandle() {
     return surface.getSurfaceHandle();
   }
 
-  public GLDrawableFactory getFactory() {
+  @Override
+  public final GLDrawableFactory getFactory() {
     return factory;
   }
 
+  @Override
   public final synchronized void setRealized(boolean realizedArg) {
     if ( realized != realizedArg ) {
         if(DEBUG) {
@@ -153,24 +150,31 @@ public abstract class GLDrawableImpl implements GLDrawable {
         realized = realizedArg;
         AbstractGraphicsDevice aDevice = surface.getGraphicsConfiguration().getScreen().getDevice();
         if(realizedArg) {
+            if(surface instanceof ProxySurface) {
+                ((ProxySurface)surface).createNotify();
+            }
             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();
         }
-        try {            
-            setRealizedImpl();
+        try {
             if(realizedArg) {
+                setRealizedImpl();
                 updateHandle();
             } else {
                 destroyHandle();
+                setRealizedImpl();
             }
         } finally {
             if(realizedArg) {
                 unlockSurface();
             } else {
                 aDevice.unlock();
+                if(surface instanceof ProxySurface) {
+                    ((ProxySurface)surface).destroyNotify();
+                }
             }
         }
     } else if(DEBUG) {
@@ -178,31 +182,66 @@ public abstract class GLDrawableImpl implements GLDrawable {
     }
   }
   protected abstract void setRealizedImpl();
+
+  /** 
+   * Callback for special implementations, allowing GLContext to trigger GL related lifecycle: <code>construct</code>, <code>destroy</code>.
+   * <p>
+   * If <code>realized</code> is <code>true</code>, the context has just been created and made current.
+   * </p>
+   * <p>
+   * If <code>realized</code> is <code>false</code>, the context is still current and will be release and destroyed after this method returns.
+   * </p>
+   * <p>
+   * @see #contextMadeCurrent(GLContext, boolean)
+   */
+  protected void contextRealized(GLContext glc, boolean realized) {}
   
-  public synchronized boolean isRealized() {
+  /** 
+   * Callback for special implementations, allowing GLContext to trigger GL related lifecycle: <code>makeCurrent</code>, <code>release</code>.
+   * <p>
+   * Will not be called if {@link #contextRealized(GLContext, boolean)} has been triggered.
+   * </p>
+   * <p>
+   * If <code>current</code> is <code>true</code>, the context has just been made current.
+   * </p>
+   * <p>
+   * If <code>current</code> is <code>false</code>, the context is still current and will be release after this method returns.
+   * </p>
+   * @see #contextRealized(GLContext, boolean)
+   */ 
+  protected void contextMadeCurrent(GLContext glc, boolean current) { }
+
+  /** Callback for special implementations, allowing GLContext to fetch a custom default render framebuffer. Defaults to zero.*/
+  protected int getDefaultDrawFramebuffer() { return 0; }
+  /** Callback for special implementations, allowing GLContext to fetch a custom default read framebuffer. Defaults to zero. */
+  protected int getDefaultReadFramebuffer() { return 0; }
+  
+  @Override
+  public final synchronized boolean isRealized() {
     return realized;
   }
 
+  @Override
   public int getWidth() {
     return surface.getWidth();
   }
-  
+
+  @Override
   public int getHeight() {
     return surface.getHeight();
   }
 
-  public int lockSurface() throws GLException {
+  /** @see NativeSurface#lockSurface() */
+  public final int lockSurface() throws GLException {
     return surface.lockSurface();
   }
 
-  public void unlockSurface() {
+  /** @see NativeSurface#unlockSurface() */
+  public final void unlockSurface() {
     surface.unlockSurface();
   }
 
-  public boolean isSurfaceLocked() {
-    return surface.isSurfaceLocked();
-  }
-
+  @Override
   public String toString() {
     return getClass().getSimpleName()+"[Realized "+isRealized()+
                 ",\n\tFactory   "+getFactory()+
@@ -213,7 +252,7 @@ public abstract class GLDrawableImpl implements GLDrawable {
   protected static String getThreadName() {
     return Thread.currentThread().getName();
   }
-  
+
   protected GLDrawableFactory factory;
   protected NativeSurface surface;
   protected GLCapabilitiesImmutable requestedCapabilities;
diff --git a/src/jogl/classes/jogamp/opengl/GLFBODrawableImpl.java b/src/jogl/classes/jogamp/opengl/GLFBODrawableImpl.java
new file mode 100644
index 0000000..b7ea4f8
--- /dev/null
+++ b/src/jogl/classes/jogamp/opengl/GLFBODrawableImpl.java
@@ -0,0 +1,138 @@
+package jogamp.opengl;
+
+import javax.media.nativewindow.NativeSurface;
+import javax.media.opengl.GL;
+import javax.media.opengl.GL2GL3;
+import javax.media.opengl.GLCapabilitiesImmutable;
+import javax.media.opengl.GLContext;
+import javax.media.opengl.GLException;
+
+import com.jogamp.nativewindow.MutableGraphicsConfiguration;
+import com.jogamp.opengl.FBObject;
+import com.jogamp.opengl.FBObject.Attachment;
+import com.jogamp.opengl.FBObject.TextureAttachment;
+
+/**
+ * Offscreen GLDrawable implementation using framebuffer object (FBO)
+ * as it's offscreen rendering mechanism.
+ * 
+ * @see GLDrawableImpl#contextRealized(GLContext, boolean)
+ * @see GLDrawableImpl#contextMadeCurrent(GLContext, boolean)
+ * @see GLDrawableImpl#getDefaultDrawFramebuffer()
+ * @see GLDrawableImpl#getDefaultReadFramebuffer()
+ */
+public class GLFBODrawableImpl extends GLDrawableImpl {
+    final GLDrawableImpl parent;
+    final FBObject fbo;
+    int texUnit;
+    int samplesTexUnit = 0;
+    int width=0, height=0, samples=0;
+    
+    protected GLFBODrawableImpl(GLDrawableFactoryImpl factory, GLDrawableImpl parent, 
+                                NativeSurface surface, int initialWidth, int initialHeight, int textureUnit) {
+        super(factory, surface, false);
+        this.parent = parent;
+        this.texUnit = textureUnit;
+        final GLCapabilitiesImmutable caps = (GLCapabilitiesImmutable) surface.getGraphicsConfiguration().getChosenCapabilities();
+        this.width = initialWidth;
+        this.height = initialHeight;
+        this.samples = caps.getNumSamples();
+        this.fbo = new FBObject();
+    }
+    
+    @Override
+    protected void contextRealized(GLContext glc, boolean realized) {
+        final GLCapabilitiesImmutable caps = (GLCapabilitiesImmutable) surface.getGraphicsConfiguration().getChosenCapabilities();
+        final GL gl = glc.getGL();
+        if(realized) {                   
+            fbo.reset(gl, width, height, samples);
+            samples = fbo.getNumSamples(); // update, maybe capped
+            if(samples > 0) {
+                fbo.attachColorbuffer(gl, 0, caps.getAlphaBits()>0);
+            } else {
+                fbo.attachTexture2D(gl, 0, caps.getAlphaBits()>0);
+            }
+            if( caps.getStencilBits() > 0 ) {
+                fbo.attachRenderbuffer(gl, Attachment.Type.DEPTH_STENCIL, 24);
+            } else {
+                fbo.attachRenderbuffer(gl, Attachment.Type.DEPTH, 24);
+            }
+        } else if(null != fbo) {
+            fbo.destroy(gl);
+        }
+    }
+    
+    @Override
+    protected void contextMadeCurrent(GLContext glc, boolean current) {
+        final GL gl = glc.getGL();
+        if(current) {
+            fbo.bind(gl);
+        } else {
+            fbo.unbind(gl);
+            gl.glActiveTexture(GL.GL_TEXTURE0 + texUnit);
+            fbo.use(gl, samples > 0 ? fbo.getSamplingSink() : (TextureAttachment) fbo.getColorbuffer(0) );
+            if( samples > 0) {
+                gl.glBindFramebuffer(GL2GL3.GL_READ_FRAMEBUFFER, fbo.getReadFramebuffer());
+            }
+        }
+    }
+    
+    @Override
+    protected int getDefaultDrawFramebuffer() { return fbo.getWriteFramebuffer(); }
+    
+    @Override
+    protected int getDefaultReadFramebuffer() { return fbo.getReadFramebuffer(); }
+    
+    public FBObject getFBObject() { return fbo; }
+    
+    public void setSize(GL gl, int newWidth, int newHeight) throws GLException {
+        width = newWidth;
+        height = newHeight;        
+        fbo.reset(gl, width, height, samples);
+        samples = fbo.getNumSamples(); // update, maybe capped
+    }
+    
+    public void setSamples(GL gl, int newSamples) throws GLException {
+        samples = newSamples;
+        fbo.reset(gl, width, height, samples);
+        samples = fbo.getNumSamples(); // update, maybe capped
+    }
+    
+    
+    @Override
+    public GLContext createContext(GLContext shareWith) {
+        final GLContext ctx = parent.createContext(shareWith);
+        ctx.setGLDrawable(this, false);
+        return ctx;
+    }
+
+    @Override
+    public GLDynamicLookupHelper getGLDynamicLookupHelper() {
+        return parent.getGLDynamicLookupHelper();
+    }
+
+    @Override
+    protected void swapBuffersImpl() {
+    }
+
+    @Override
+    protected void setRealizedImpl() {
+        parent.setRealized(realized);
+        if(realized) {    
+            final MutableGraphicsConfiguration msConfig = (MutableGraphicsConfiguration) surface.getGraphicsConfiguration();
+            final GLCapabilitiesImmutable chosenCaps = (GLCapabilitiesImmutable) msConfig.getChosenCapabilities();
+            final GLCapabilitiesImmutable chosenFBOCaps = GLGraphicsConfigurationUtil.fixOffscreenGLCapabilities(chosenCaps, true /*FBO*/, false /*PBO*/);    
+            msConfig.setChosenCapabilities(chosenFBOCaps);
+        }
+    }
+
+    @Override
+    public int getWidth() {
+        return width;
+    }
+
+    @Override
+    public int getHeight() {
+        return height;
+    }    
+}
diff --git a/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationFactory.java b/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationFactory.java
index 6fe9f08..5c6b475 100644
--- a/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationFactory.java
+++ b/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationFactory.java
@@ -38,7 +38,7 @@ import javax.media.opengl.DefaultGLCapabilitiesChooser;
 public abstract class GLGraphicsConfigurationFactory extends GraphicsConfigurationFactory {
 
     protected static int chooseCapabilities(CapabilitiesChooser chooser, CapabilitiesImmutable capsRequested,
-                                            List /*<CapabilitiesImmutable>*/ availableCaps, int recommendedIndex) {
+                                            List<? extends CapabilitiesImmutable> availableCaps, int recommendedIndex) {
         if (null == capsRequested) {
             throw new NativeWindowException("Null requested capabilities");
         }
diff --git a/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationUtil.java b/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationUtil.java
index d7958c7..3f38f33 100644
--- a/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationUtil.java
+++ b/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationUtil.java
@@ -28,7 +28,7 @@
 
 package jogamp.opengl;
 
-import java.util.ArrayList;
+import java.util.List;
 
 import javax.media.opengl.GLCapabilities;
 import javax.media.opengl.GLCapabilitiesImmutable;
@@ -38,7 +38,8 @@ public class GLGraphicsConfigurationUtil {
     public static final int WINDOW_BIT  = 1 << 0;
     public static final int BITMAP_BIT  = 1 << 1;
     public static final int PBUFFER_BIT = 1 << 2;
-    public static final int ALL_BITS    = WINDOW_BIT | BITMAP_BIT | PBUFFER_BIT ;
+    public static final int FBO_BIT     = 1 << 3;
+    public static final int ALL_BITS    = WINDOW_BIT | BITMAP_BIT | PBUFFER_BIT | FBO_BIT ;
 
     public static final StringBuilder winAttributeBits2String(StringBuilder sb, int winattrbits) {
         if(null==sb) {
@@ -61,75 +62,102 @@ public class GLGraphicsConfigurationUtil {
                 sb.append(", ");
             }
             sb.append("PBUFFER");
+            seperator=true;
+        }
+        if( 0 != ( FBO_BIT & winattrbits )  )  {
+            if(seperator) {
+                sb.append(", ");
+            }
+            sb.append("FBO");
         }
         return sb;
     }
 
     /**
+     * @param isFBO TODO
      * @return bitmask representing the input boolean in exclusive or logic, ie only one bit will be set
      */
-    public static final int getWinAttributeBits(boolean isOnscreen, boolean isPBuffer) {
+    public static final int getWinAttributeBits(boolean isOnscreen, boolean isPBuffer, boolean isFBO) {
         int winattrbits = 0;
         if(isOnscreen) {
             winattrbits |= WINDOW_BIT;
-        } else if (!isPBuffer) {
-            winattrbits |= BITMAP_BIT;
         } else {
-            winattrbits |= PBUFFER_BIT;
+            if(isFBO) {
+                winattrbits |= FBO_BIT;
+            }
+            if (!isPBuffer) {
+                winattrbits |= BITMAP_BIT;
+            } else {
+                winattrbits |= PBUFFER_BIT;
+            }
         }
         return winattrbits;
     }
 
     /**
-     * @see #getWinAttributeBits(boolean, boolean)
+     * @see #getWinAttributeBits(boolean, boolean, boolean)
      */
     public static final int getWinAttributeBits(GLCapabilitiesImmutable caps) {
-        return getWinAttributeBits(caps.isOnscreen(), caps.isPBuffer());
+        return getWinAttributeBits(caps.isOnscreen(), caps.isPBuffer(), false);
     }
 
-    @SuppressWarnings({ "rawtypes", "unchecked" })
-    public static final boolean addGLCapabilitiesPermutations(ArrayList capsBucket, GLCapabilitiesImmutable temp, int winattrbits) {
+    public static final boolean addGLCapabilitiesPermutations(List<GLCapabilitiesImmutable> capsBucket, GLCapabilitiesImmutable temp, int winattrbits) {
         int preSize = capsBucket.size();
         if( 0 != ( WINDOW_BIT & winattrbits )  )  {
             GLCapabilities cpy  = (GLCapabilities) temp.cloneMutable();
             cpy.setOnscreen(true);
+            cpy.setPBuffer(false);
+            cpy.setFBO(false);
             capsBucket.add(cpy);
         }
-        if( 0 != ( PBUFFER_BIT & winattrbits )  )  {
+        if( 0 != ( PBUFFER_BIT & winattrbits ) || 0 != ( FBO_BIT & winattrbits )  )  {
             GLCapabilities cpy  = (GLCapabilities) temp.cloneMutable();
-            cpy.setPBuffer(true);
+            cpy.setFBO(0 != ( FBO_BIT & winattrbits ));
+            cpy.setPBuffer(0 != ( PBUFFER_BIT & winattrbits ));
             capsBucket.add(cpy);
         }
         if( 0 != ( BITMAP_BIT & winattrbits )  )  {
             GLCapabilities cpy  = (GLCapabilities) temp.cloneMutable();
             cpy.setOnscreen(false);
             cpy.setPBuffer(false);
+            cpy.setFBO(false);
             capsBucket.add(cpy);
         }
         return capsBucket.size() > preSize;
     }
 
-    public static GLCapabilitiesImmutable fixGLCapabilities(GLCapabilitiesImmutable capsRequested, boolean pbufferAvailable)
+    public static GLCapabilitiesImmutable fixGLCapabilities(GLCapabilitiesImmutable capsRequested, boolean fboAvailable, boolean pbufferAvailable)
     {
         if( !capsRequested.isOnscreen() ) {
-            return fixOffScreenGLCapabilities(capsRequested, pbufferAvailable);
+            return fixOffscreenGLCapabilities(capsRequested, fboAvailable, pbufferAvailable);
         }
-        return capsRequested;
+        return fixOnscreenGLCapabilities(capsRequested);
     }
 
-    public static GLCapabilitiesImmutable fixOffScreenGLCapabilities(GLCapabilitiesImmutable capsRequested, boolean pbufferAvailable)
+    public static GLCapabilitiesImmutable fixOnscreenGLCapabilities(GLCapabilitiesImmutable capsRequested)
+    {
+        if( !capsRequested.isOnscreen() ) {
+            // fix caps ..
+            GLCapabilities caps2 = (GLCapabilities) capsRequested.cloneMutable();
+            caps2.setOnscreen(true);
+            return caps2;
+        }
+        return capsRequested;
+    }
+    
+    public static GLCapabilitiesImmutable fixOffscreenGLCapabilities(GLCapabilitiesImmutable capsRequested, boolean fboAvailable, boolean pbufferAvailable)
     {
         if( capsRequested.getDoubleBuffered() ||
             capsRequested.isOnscreen() ||
-            ( !pbufferAvailable && capsRequested.isPBuffer() ) )
+            ( fboAvailable != capsRequested.isFBO() ) || 
+            ( pbufferAvailable != capsRequested.isPBuffer() ) )
         {
             // fix caps ..
             GLCapabilities caps2 = (GLCapabilities) capsRequested.cloneMutable();
             caps2.setDoubleBuffered(false); // FIXME DBLBUFOFFSCRN
             caps2.setOnscreen(false);
-            if(caps2.isPBuffer() && !pbufferAvailable) {
-                caps2.setPBuffer(false);
-            }
+            caps2.setFBO( fboAvailable ); 
+            caps2.setPBuffer( pbufferAvailable );
             return caps2;
         }
         return capsRequested;
@@ -137,25 +165,28 @@ public class GLGraphicsConfigurationUtil {
 
     public static GLCapabilitiesImmutable fixGLPBufferGLCapabilities(GLCapabilitiesImmutable capsRequested)
     {
-        if( capsRequested.getDoubleBuffered() || capsRequested.isOnscreen() || !capsRequested.isPBuffer()) {
+        if( capsRequested.getDoubleBuffered() || capsRequested.isOnscreen() || !capsRequested.isPBuffer() || capsRequested.isFBO() ) {
             // fix caps ..
             GLCapabilities caps2 = (GLCapabilities) capsRequested.cloneMutable();
             caps2.setDoubleBuffered(false); // FIXME DBLBUFOFFSCRN - we don't need to be single buffered ..
             caps2.setOnscreen(false);
             caps2.setPBuffer(true);
+            caps2.setFBO(false);
             return caps2;
         }
         return capsRequested;
     }
 
+    /** Fix opaque setting while preserve alpha bits */
     public static GLCapabilitiesImmutable fixOpaqueGLCapabilities(GLCapabilitiesImmutable capsRequested, boolean isOpaque)
     {
         GLCapabilities caps2 = null;
         
         if( capsRequested.isBackgroundOpaque() != isOpaque) {
-            // fix caps ..
+            final int alphaBits = capsRequested.getAlphaBits();
             caps2 = (GLCapabilities) capsRequested.cloneMutable();
             caps2.setBackgroundOpaque(isOpaque);
+            caps2.setAlphaBits(alphaBits);
             return caps2;
         }
         return capsRequested;
diff --git a/src/jogl/classes/jogamp/opengl/GLPbufferImpl.java b/src/jogl/classes/jogamp/opengl/GLPbufferImpl.java
index 0f4f7f8..32f4cb6 100644
--- a/src/jogl/classes/jogamp/opengl/GLPbufferImpl.java
+++ b/src/jogl/classes/jogamp/opengl/GLPbufferImpl.java
@@ -1,22 +1,22 @@
 /*
  * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
  * Copyright (c) 2010 JogAmp Community. All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- * 
+ *
  * - Redistribution of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
- * 
+ *
  * - Redistribution in binary form must reproduce the above copyright
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the distribution.
- * 
+ *
  * Neither the name of Sun Microsystems, Inc. or the names of
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * This software is provided "AS IS," without a warranty of any kind. ALL
  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -29,50 +29,40 @@
  * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
  * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
  * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
+ *
  * You acknowledge that this software is not designed or intended for use
  * in the design, construction, operation or maintenance of any nuclear
  * facility.
- * 
+ *
  * Sun gratefully acknowledges that this software was originally authored
  * and developed by Kenneth Bradley Russell and Christopher John Kline.
  */
 
 package jogamp.opengl;
 
-import com.jogamp.common.util.locks.LockFactory;
-import com.jogamp.common.util.locks.RecursiveLock;
-
-import javax.media.nativewindow.AbstractGraphicsDevice;
-import javax.media.nativewindow.NativeSurface;
-import javax.media.opengl.GL;
-import javax.media.opengl.GLAnimatorControl;
 import javax.media.opengl.GLCapabilitiesImmutable;
 import javax.media.opengl.GLContext;
 import javax.media.opengl.GLDrawable;
 import javax.media.opengl.GLDrawableFactory;
-import javax.media.opengl.GLEventListener;
 import javax.media.opengl.GLException;
 import javax.media.opengl.GLPbuffer;
-import javax.media.opengl.GLProfile;
-import javax.media.opengl.GLRunnable;
+
+import com.jogamp.common.util.locks.LockFactory;
+import com.jogamp.common.util.locks.RecursiveLock;
 
 /** Platform-independent class exposing pbuffer functionality to
     applications. This class is not exposed in the public API as it
     would probably add no value; however it implements the GLDrawable
     interface so can be interacted with via its display() method. */
 
-public class GLPbufferImpl implements GLPbuffer {
-  private GLDrawableImpl pbufferDrawable;
-  private GLContextImpl context;
-  private GLDrawableHelper drawableHelper = new GLDrawableHelper();
+public class GLPbufferImpl extends GLAutoDrawableBase implements GLPbuffer {
   private int floatMode;
-  private int additionalCtxCreationFlags = 0;
 
-  public GLPbufferImpl(GLDrawableImpl pbufferDrawable,
-                       GLContext parentContext) {
+  public GLPbufferImpl(GLDrawableImpl pbufferDrawable, GLContext sharedContext, boolean ownDevice) {
+    super(pbufferDrawable, null, ownDevice); // drawable := pbufferDrawable 
+    
     GLCapabilitiesImmutable caps = (GLCapabilitiesImmutable)
-         pbufferDrawable.getNativeSurface().getGraphicsConfiguration().getChosenCapabilities();
+         drawable.getNativeSurface().getGraphicsConfiguration().getChosenCapabilities();
     if(caps.isOnscreen()) {
         if(caps.isPBuffer()) {
             throw new IllegalArgumentException("Error: Given drawable is Onscreen and Pbuffer: "+pbufferDrawable);
@@ -83,229 +73,93 @@ public class GLPbufferImpl implements GLPbuffer {
             throw new IllegalArgumentException("Error: Given drawable is not Pbuffer: "+pbufferDrawable);
         }
     }
-    this.pbufferDrawable = pbufferDrawable;
-    context = (GLContextImpl) pbufferDrawable.createContext(parentContext);
-  }
-
-  public GLContext createContext(GLContext shareWith) {
-    return pbufferDrawable.createContext(shareWith);
-  }
-
-  public void setRealized(boolean realized) {
-  }
-
-  public boolean isRealized() {
-    return true;
-  }
-
-  public void destroy() {
-    if(pbufferDrawable.isRealized()) {
-        final AbstractGraphicsDevice adevice = pbufferDrawable.getNativeSurface().getGraphicsConfiguration().getScreen().getDevice();
-        
-        if (null != context && context.isCreated()) {
-            try {
-                drawableHelper.disposeGL(GLPbufferImpl.this, pbufferDrawable, context, null);
-            } catch (GLException gle) {
-                gle.printStackTrace();
-            }
-            context = null;
-            // drawableHelper.reset();
-        }
-        pbufferDrawable.destroy();
-        pbufferDrawable = null;
-        
-        if(null != adevice) {
-            adevice.close();
-        }
-    }
-  }
-
-  public void setSize(int width, int height) {
-    // FIXME
-    throw new GLException("Not yet implemented");
-  }
-
-  public NativeSurface getNativeSurface() {
-      return pbufferDrawable.getNativeSurface();
-  }
-
-  public long getHandle() {
-    return pbufferDrawable.getHandle();
-  }
-
-  public GLDrawableFactory getFactory() {
-      return pbufferDrawable.getFactory();
-  }
-
-  public int getWidth() {
-    return pbufferDrawable.getWidth();
-  }
-
-  public int getHeight() {
-    return pbufferDrawable.getHeight();
-  }
-
-  public void display() {
-    invokeGL(displayAction);
-  }
-
-  public void repaint() {
-    display();
-  }
-
-  public void addGLEventListener(GLEventListener listener) {
-    drawableHelper.addGLEventListener(listener);
-  }
-
-  public void addGLEventListener(int index, GLEventListener listener) {
-    drawableHelper.addGLEventListener(index, listener);
-  }
-
-  public void removeGLEventListener(GLEventListener listener) {
-    drawableHelper.removeGLEventListener(listener);
-  }
-
-  public void setAnimator(GLAnimatorControl animatorControl) {
-    drawableHelper.setAnimator(animatorControl);
-  }
-
-  public GLAnimatorControl getAnimator() {
-    return drawableHelper.getAnimator();
-  }
-
-  public void invoke(boolean wait, GLRunnable glRunnable) {
-    drawableHelper.invoke(this, wait, glRunnable);
-  }
-
-  public void setContext(GLContext ctx) {
-    context=(GLContextImpl)ctx;
-    if(null != context) {
-        context.setContextCreationFlags(additionalCtxCreationFlags);
-    }    
-  }
-
-  public GLContext getContext() {
-    return context;
-  }
-
-  public GLDrawable getDrawable() {
-    return pbufferDrawable;
-  }
-
-  public GL getGL() {
-    return getContext().getGL();
-  }
-
-  public GL setGL(GL gl) {
-    return getContext().setGL(gl);
-  }
-
-  public void setAutoSwapBufferMode(boolean onOrOff) {
-    drawableHelper.setAutoSwapBufferMode(onOrOff);
+    context = (GLContextImpl) drawable.createContext(sharedContext);
   }
 
-  public boolean getAutoSwapBufferMode() {
-    return drawableHelper.getAutoSwapBufferMode();
-  }
-
-  public void swapBuffers() {
-    invokeGL(swapBuffersAction);
-  }
-
-  public void setContextCreationFlags(int flags) {
-    additionalCtxCreationFlags = flags;
-    if(null != context) {
-        context.setContextCreationFlags(additionalCtxCreationFlags);
-    }        
-  }
-      
-  public int getContextCreationFlags() {
-    return additionalCtxCreationFlags;                
-  }
-            
+  //
+  // pbuffer specifics
+  // 
+  
+  @Override
   public void bindTexture() {
     // Doesn't make much sense to try to do this on the event dispatch
     // thread given that it has to be called while the context is current
     context.bindPbufferToTexture();
   }
 
+  @Override
   public void releaseTexture() {
     // Doesn't make much sense to try to do this on the event dispatch
     // thread given that it has to be called while the context is current
     context.releasePbufferFromTexture();
   }
 
-  public GLCapabilitiesImmutable getChosenGLCapabilities() {
-    if (pbufferDrawable == null)
-      return null;
-
-    return pbufferDrawable.getChosenGLCapabilities();
-  }
-
-  public GLCapabilitiesImmutable getRequestedGLCapabilities() {
-    if (pbufferDrawable == null)
-      return null;
-
-    return pbufferDrawable.getRequestedGLCapabilities();
+  @Override
+  public int getFloatingPointMode() {
+    if (floatMode == 0) {
+      throw new GLException("Pbuffer not initialized, or floating-point support not requested");
+    }
+    return floatMode;
   }
 
-  public GLProfile getGLProfile() {
-    if (pbufferDrawable == null)
-      return null;
-
-    return pbufferDrawable.getGLProfile();
+  //
+  // GLDrawable delegation
+  // 
+    
+  @Override
+  public final void setRealized(boolean realized) {
   }
 
-  private RecursiveLock recurLock = LockFactory.createRecursiveLock();
-
-  public int lockSurface() throws GLException {
-    recurLock.lock();
-    return NativeSurface.LOCK_SUCCESS;
+  //
+  // GLAutoDrawable completion
+  //
+  private final RecursiveLock lock = LockFactory.createRecursiveLock();  // instance wide lock
+  
+  @Override
+  protected final RecursiveLock getLock() { return lock; }
+  
+  @Override
+  public final Object getUpstreamWidget() {
+    return null;
   }
-
-  public void unlockSurface() {
-    recurLock.unlock();
+  
+  @Override
+  public void destroy() {
+    defaultDestroy();
   }
 
-  public boolean isSurfaceLocked() {
-    return recurLock.isLocked();
+  @Override
+  public GLDrawableFactory getFactory() {
+    return drawable.getFactory();
   }
 
-  public int getFloatingPointMode() {
-    if (floatMode == 0) {
-      throw new GLException("Pbuffer not initialized, or floating-point support not requested");
+  @Override
+  public final void display() {
+    final RecursiveLock _lock = lock;        
+    _lock.lock(); // sync: context/drawable could been recreated/destroyed while animating
+    try {
+        if( null != context ) {
+          helper.invokeGL(drawable, context, defaultDisplayAction, initAction);
+        }
+    } finally {
+        _lock.unlock();
     }
-    return floatMode;
   }
 
+  @Override
+  public final void swapBuffers() throws GLException {
+      defaultSwapBuffers();
+  }
+  
   //----------------------------------------------------------------------
   // Internals only below this point
   //
 
-  private void invokeGL(Runnable invokeGLAction) {
-    drawableHelper.invokeGL(pbufferDrawable, context, invokeGLAction, initAction);
-  }
-
-
-  class InitAction implements Runnable {
-    public void run() {
-      floatMode = context.getFloatingPointMode();
-      drawableHelper.init(GLPbufferImpl.this);
-    }
-  }
-  private InitAction initAction = new InitAction();
+  protected final Runnable initAction = new Runnable() {
+    @Override
+    public final void run() {
+        floatMode = context.getFloatingPointMode();
+        defaultInitAction.run();
+    } };
   
-  class DisplayAction implements Runnable {
-    public void run() {
-      drawableHelper.display(GLPbufferImpl.this);
-    }
-  }
-  private DisplayAction displayAction = new DisplayAction();
-
-  class SwapBuffersAction implements Runnable {
-    public void run() {
-      pbufferDrawable.swapBuffers();
-    }
-  }
-  private SwapBuffersAction swapBuffersAction = new SwapBuffersAction();
 }
diff --git a/src/jogl/classes/jogamp/opengl/GLRunnableTask.java b/src/jogl/classes/jogamp/opengl/GLRunnableTask.java
index 448f684..244a3fd 100644
--- a/src/jogl/classes/jogamp/opengl/GLRunnableTask.java
+++ b/src/jogl/classes/jogamp/opengl/GLRunnableTask.java
@@ -39,7 +39,8 @@ public class GLRunnableTask implements GLRunnable {
     GLRunnable runnable;
     Object notifyObject;
     boolean catchExceptions;
-    boolean isExecuted;
+    volatile boolean isExecuted;
+    volatile boolean isFlushed;
 
     Throwable runnableException;
 
@@ -48,6 +49,7 @@ public class GLRunnableTask implements GLRunnable {
         this.notifyObject = notifyObject ;
         this.catchExceptions = catchExceptions;
         isExecuted = false;
+        isFlushed = false;
     }
 
     public boolean run(GLAutoDrawable drawable) {
@@ -84,8 +86,41 @@ public class GLRunnableTask implements GLRunnable {
         }
         return res;
     }
-
+    
+    /** 
+     * Simply flush this task and notify a waiting executor.
+     * The executor which might have been blocked until notified
+     * will be unblocked and the task removed from the queue.
+     * 
+     * @see #isFlushed()
+     * @see #isInQueue()
+     */ 
+    public void flush() {
+        if(!isExecuted() && null != notifyObject) {
+            synchronized (notifyObject) {
+                isFlushed=true;
+                notifyObject.notifyAll();                
+            }
+        }
+    }
+    
+    /**
+     * @return !{@link #isExecuted()} && !{@link #isFlushed()}
+     */
+    public boolean isInQueue() { return !isExecuted && !isFlushed; }
+    
+    /**
+     * @return whether this task has been executed.
+     * @see #isInQueue()
+     */
     public boolean isExecuted() { return isExecuted; }
+    
+    /**
+     * @return whether this task has been flushed.
+     * @see #isInQueue()
+     */
+    public boolean isFlushed() { return isFlushed; }
+    
     public Throwable getThrowable() { return runnableException; }
 }
 
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLContext.java b/src/jogl/classes/jogamp/opengl/egl/EGLContext.java
index f5f9f62..c5d0df6 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLContext.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLContext.java
@@ -1,22 +1,22 @@
 /*
  * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
  * Copyright (c) 2011 JogAmp Community. All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- * 
+ *
  * - Redistribution of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
- * 
+ *
  * - Redistribution in binary form must reproduce the above copyright
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the distribution.
- * 
+ *
  * Neither the name of Sun Microsystems, Inc. or the names of
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * This software is provided "AS IS," without a warranty of any kind. ALL
  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -29,7 +29,7 @@
  * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
  * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
  * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
+ *
  * Sun gratefully acknowledges that this software was originally authored
  * and developed by Kenneth Bradley Russell and Christopher John Kline.
  */
@@ -75,7 +75,8 @@ public abstract class EGLContext extends GLContextImpl {
         // no inner state _eglExt = null;
         super.resetStates();
     }
-    
+
+    @Override
     public Object getPlatformGLExtensions() {
       return getEGLExt();
     }
@@ -87,6 +88,7 @@ public abstract class EGLContext extends GLContextImpl {
       return _eglExt;
     }
 
+    @Override
     public final ProcAddressTable getPlatformExtProcAddressTable() {
         return eglExtProcAddressTable;
     }
@@ -95,41 +97,38 @@ public abstract class EGLContext extends GLContextImpl {
         return eglExtProcAddressTable;
     }
 
+    @Override
     protected Map<String, String> getFunctionNameMap() { return null; }
 
+    @Override
     protected Map<String, String> getExtensionNameMap() { return null; }
 
+    @Override
     public final boolean isGLReadDrawableAvailable() {
         return true;
     }
 
+    @Override
     protected void makeCurrentImpl() throws GLException {
-        if(EGL.EGL_NO_DISPLAY==((EGLDrawable)drawable).getDisplay() ) {
-            throw new GLException("drawable not properly initialized, NO DISPLAY: "+drawable);
-        }
         if (EGL.eglGetCurrentContext() != contextHandle) {
-            if (!EGL.eglMakeCurrent(((EGLDrawable)drawable).getDisplay(),
-                                    drawable.getHandle(),
-                                    drawableRead.getHandle(),
-                                    contextHandle)) {
+            if (!EGL.eglMakeCurrent(drawable.getNativeSurface().getDisplayHandle(), drawable.getHandle(), drawableRead.getHandle(), contextHandle)) {
                 throw new GLException("Error making context 0x" +
                                       Long.toHexString(contextHandle) + " current: error code 0x" + Integer.toHexString(EGL.eglGetError()));
             }
         }
     }
 
+    @Override
     protected void releaseImpl() throws GLException {
-      if (!EGL.eglMakeCurrent(((EGLDrawable)drawable).getDisplay(),
-                              EGL.EGL_NO_SURFACE,
-                              EGL.EGL_NO_SURFACE,
-                              EGL.EGL_NO_CONTEXT)) {
+      if (!EGL.eglMakeCurrent(drawable.getNativeSurface().getDisplayHandle(), EGL.EGL_NO_SURFACE, EGL.EGL_NO_SURFACE, EGL.EGL_NO_CONTEXT)) {
             throw new GLException("Error freeing OpenGL context 0x" +
                                   Long.toHexString(contextHandle) + ": error code 0x" + Integer.toHexString(EGL.eglGetError()));
       }
     }
 
+    @Override
     protected void destroyImpl() throws GLException {
-      if (!EGL.eglDestroyContext(((EGLDrawable)drawable).getDisplay(), contextHandle)) {
+      if (!EGL.eglDestroyContext(drawable.getNativeSurface().getDisplayHandle(), contextHandle)) {
           final int eglError = EGL.eglGetError();
           if(EGL.EGL_SUCCESS != eglError) { /* oops, Mesa EGL impl. may return false, but has no EGL error */
               throw new GLException("Error destroying OpenGL context 0x" +
@@ -138,25 +137,28 @@ public abstract class EGLContext extends GLContextImpl {
       }
     }
 
+    @Override
     protected long createContextARBImpl(long share, boolean direct, int ctp, int major, int minor) {
         return 0; // FIXME
     }
 
+    @Override
     protected void destroyContextARBImpl(long _context) {
         // FIXME
     }
 
+    @Override
     protected boolean createImpl(GLContextImpl shareWith) throws GLException {
-        long eglDisplay = ((EGLDrawable)drawable).getDisplay();
-        EGLGraphicsConfiguration config = ((EGLDrawable)drawable).getGraphicsConfiguration();
-        GLProfile glProfile = drawable.getGLProfile();
-        long eglConfig = config.getNativeConfig();
+        final EGLGraphicsConfiguration config = (EGLGraphicsConfiguration) drawable.getNativeSurface().getGraphicsConfiguration();
+        final long eglDisplay = config.getScreen().getDevice().getHandle();
+        final GLProfile glProfile = drawable.getGLProfile();
+        final long eglConfig = config.getNativeConfig();
         long shareWithHandle = EGL.EGL_NO_CONTEXT;
 
-        if (eglDisplay == 0) {
+        if ( 0 == eglDisplay ) {
             throw new GLException("Error: attempted to create an OpenGL context without a display connection");
         }
-        if (eglConfig == 0) {
+        if ( 0 == eglConfig ) {
             throw new GLException("Error: attempted to create an OpenGL context without a graphics configuration");
         }
 
@@ -178,7 +180,7 @@ public abstract class EGLContext extends GLContextImpl {
             }
         }
 
-        final IntBuffer contextAttrsNIO; 
+        final IntBuffer contextAttrsNIO;
         {
             final int[] contextAttrs = new int[] {
                     EGL.EGL_CONTEXT_CLIENT_VERSION, -1,
@@ -200,31 +202,21 @@ public abstract class EGLContext extends GLContextImpl {
         }
         if (DEBUG) {
             System.err.println(getThreadName() + ": Created OpenGL context 0x" +
-                               Long.toHexString(contextHandle) + 
+                               Long.toHexString(contextHandle) +
                                ",\n\twrite surface 0x" + Long.toHexString(drawable.getHandle()) +
                                ",\n\tread  surface 0x" + Long.toHexString(drawableRead.getHandle())+
                                ",\n\t"+this+
                                ",\n\tsharing with 0x" + Long.toHexString(shareWithHandle));
         }
-        if (!EGL.eglMakeCurrent(((EGLDrawable)drawable).getDisplay(),
-                                drawable.getHandle(),
-                                drawableRead.getHandle(),
-                                contextHandle)) {
+        if (!EGL.eglMakeCurrent(eglDisplay, drawable.getHandle(), drawableRead.getHandle(), contextHandle)) {
             throw new GLException("Error making context 0x" +
                                   Long.toHexString(contextHandle) + " current: error code " + EGL.eglGetError());
         }
-        int ctp = CTX_PROFILE_ES;
-        int major;
-        if(glProfile.usesNativeGLES2()) {
-            ctp |= CTX_IMPL_ES2_COMPAT;
-            major = 2;
-        } else {            
-            major = 1;
-        }
-        setGLFunctionAvailability(true, major, 0, ctp);
+        setGLFunctionAvailability(true, glProfile.usesNativeGLES2() ? 2 : 1, 0, CTX_PROFILE_ES);
         return true;
     }
 
+    @Override
     protected final void updateGLXProcAddressTable() {
         final AbstractGraphicsConfiguration aconfig = drawable.getNativeSurface().getGraphicsConfiguration();
         final AbstractGraphicsDevice adevice = aconfig.getScreen().getDevice();
@@ -255,17 +247,17 @@ public abstract class EGLContext extends GLContextImpl {
             }
         }
     }
-  
+
+    @Override
     protected final StringBuilder getPlatformExtensionsStringImpl() {
-        StringBuilder sb = new StringBuilder();        
+        StringBuilder sb = new StringBuilder();
         if (!eglQueryStringInitialized) {
           eglQueryStringAvailable =
             getDrawableImpl().getGLDynamicLookupHelper().dynamicLookupFunction("eglQueryString") != 0;
           eglQueryStringInitialized = true;
         }
         if (eglQueryStringAvailable) {
-            final String ret = EGL.eglQueryString(((EGLDrawable)drawable).getDisplay(), 
-                                                  EGL.EGL_EXTENSIONS);
+            final String ret = EGL.eglQueryString(drawable.getNativeSurface().getDisplayHandle(), EGL.EGL_EXTENSIONS);
             if (DEBUG) {
               System.err.println("EGL extensions: " + ret);
             }
@@ -286,37 +278,82 @@ public abstract class EGLContext extends GLContextImpl {
             }
             return false;
         }
-        return EGL.eglSwapInterval(((EGLDrawable)drawable).getDisplay(), interval);
+        return EGL.eglSwapInterval(drawable.getNativeSurface().getDisplayHandle(), interval);
     }
 
+    @Override
     public abstract void bindPbufferToTexture();
 
+    @Override
     public abstract void releasePbufferFromTexture();
 
+    //
+    // Accessible ..
+    //
+    
+    /**
+     * If context is an ES profile, map it to the given device 
+     * via {@link GLContext#mapAvailableGLVersion(AbstractGraphicsDevice, int, int, int, int, int)}.
+     * <p>
+     * We intentionally override a non native EGL device ES profile mapping,
+     * i.e. this will override/modify an already 'set' X11/WGL/.. mapping.
+     * </p> 
+     * 
+     * @param device
+     */
+    protected void mapCurrentAvailableGLVersion(AbstractGraphicsDevice device) {
+        mapCurrentAvailableGLVersionImpl(device, ctxMajorVersion, ctxMinorVersion, ctxOptions);
+    }
+        
+    protected static void mapStaticGLESVersion(AbstractGraphicsDevice device, int major) {
+        int ctp = ( 2 == major ) ? ( GLContext.CTX_PROFILE_ES | GLContext.CTX_IMPL_ES2_COMPAT | GLContext.CTX_IMPL_FBO ) : ( GLContext.CTX_PROFILE_ES );  
+        mapCurrentAvailableGLVersionImpl(device, major, 0, ctp);
+    }
+    private static void mapCurrentAvailableGLVersionImpl(AbstractGraphicsDevice device, int major, int minor, int ctp) {
+        if( 0 != ( ctp & GLContext.CTX_PROFILE_ES) ) {
+            // ES1 or ES2
+            final int reqMajor = major;
+            final int reqProfile = GLContext.CTX_PROFILE_ES;
+            GLContext.mapAvailableGLVersion(device, reqMajor, reqProfile,
+                                            major, minor, ctp);
+        }
+    }
+    
+    protected static boolean getAvailableGLVersionsSet(AbstractGraphicsDevice device) {
+        return GLContext.getAvailableGLVersionsSet(device);
+    }
+    protected static void setAvailableGLVersionsSet(AbstractGraphicsDevice device) {
+        GLContext.setAvailableGLVersionsSet(device);
+    }
+    
     protected static String toHexString(int hex) {
         return GLContext.toHexString(hex);
     }
     protected static String toHexString(long hex) {
         return GLContext.toHexString(hex);
     }
-    
+
     //----------------------------------------------------------------------
     // Currently unimplemented stuff
     //
 
+    @Override
     protected void copyImpl(GLContext source, int mask) throws GLException {
         throw new GLException("Not yet implemented");
     }
 
 
+    @Override
     public ByteBuffer glAllocateMemoryNV(int arg0, float arg1, float arg2, float arg3) {
         throw new GLException("Should not call this");
     }
 
+    @Override
     public boolean offscreenImageNeedsVerticalFlip() {
         throw new GLException("Should not call this");
     }
 
+    @Override
     public int getOffscreenContextPixelDataType() {
         throw new GLException("Should not call this");
     }
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLDisplayUtil.java b/src/jogl/classes/jogamp/opengl/egl/EGLDisplayUtil.java
index e09400c..432010f 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLDisplayUtil.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLDisplayUtil.java
@@ -30,12 +30,15 @@ package jogamp.opengl.egl;
 
 import java.nio.IntBuffer;
 
+import javax.media.nativewindow.AbstractGraphicsDevice;
 import javax.media.nativewindow.NativeSurface;
 import javax.media.nativewindow.NativeWindowFactory;
+import javax.media.opengl.GLException;
 
 import jogamp.opengl.Debug;
 
 import com.jogamp.common.util.LongIntHashMap;
+import com.jogamp.nativewindow.egl.EGLGraphicsDevice;
 
 /** 
  * This implementation provides recursive calls to  
@@ -67,23 +70,6 @@ public class EGLDisplayUtil {
         return eglDisplay;
     }
     
-    public static long eglGetDisplay(NativeSurface surface, boolean allowFallBackToDefault)  {
-        final long nDisplay;
-        if( NativeWindowFactory.TYPE_WINDOWS.equals(NativeWindowFactory.getNativeWindowType(false)) ) {
-            nDisplay = surface.getSurfaceHandle(); // don't even ask ..
-        } else {
-            nDisplay = surface.getDisplayHandle(); // 0 == EGL.EGL_DEFAULT_DISPLAY
-        }
-        long eglDisplay = EGLDisplayUtil.eglGetDisplay(nDisplay);
-        if (eglDisplay == EGL.EGL_NO_DISPLAY && nDisplay != EGL.EGL_DEFAULT_DISPLAY && allowFallBackToDefault) {
-            if(DEBUG) {
-                System.err.println("EGLDisplayUtil.eglGetDisplay(): Fall back to EGL_DEFAULT_DISPLAY");
-            }
-            eglDisplay = EGLDisplayUtil.eglGetDisplay(EGL.EGL_DEFAULT_DISPLAY);
-        }
-        return eglDisplay;
-    }
-    
     public static synchronized boolean eglInitialize(long eglDisplay, int[] major, int major_offset, int[] minor, int minor_offset)  {
         final boolean res;    
         final int refCnt = eglDisplayCounter.get(eglDisplay) + 1; // 0 + 1 = 1 -> 1st init
@@ -99,7 +85,19 @@ public class EGLDisplayUtil {
         return res;
     }
     
+    /**
+     * 
+     * @param eglDisplay
+     * @param major
+     * @param minor
+     * @return true if the eglDisplay is valid and it's reference counter becomes one and {@link EGL#eglTerminate(long)} was successful, otherwise false
+     * 
+     * @see EGL#eglInitialize(long, int[], int, int[], int)}
+     */
     public static synchronized boolean eglInitialize(long eglDisplay, IntBuffer major, IntBuffer minor)  {    
+        if( EGL.EGL_NO_DISPLAY == eglDisplay) {
+            return false;
+        }
         final boolean res;    
         final int refCnt = eglDisplayCounter.get(eglDisplay) + 1; // 0 + 1 = 1 -> 1st init
         if(1==refCnt) { // only initialize once
@@ -114,7 +112,14 @@ public class EGLDisplayUtil {
         return res;
     }
     
+    /**
+     * @param eglDisplay the EGL display handle
+     * @return true if the eglDisplay is valid and it's reference counter becomes zero and {@link EGL#eglTerminate(long)} was successful, otherwise false
+     */
     public static synchronized boolean eglTerminate(long eglDisplay)  {
+        if( EGL.EGL_NO_DISPLAY == eglDisplay) {
+            return false;
+        }
         final boolean res;    
         final int refCnt = eglDisplayCounter.get(eglDisplay) - 1; // 1 - 1 = 0 -> final terminate
         if(0==refCnt) { // no terminate if still in use or already terminated
@@ -130,4 +135,65 @@ public class EGLDisplayUtil {
         }
         return res;
     }
+    
+    public static final EGLGraphicsDevice.EGLDisplayLifecycleCallback eglLifecycleCallback = new EGLGraphicsDevice.EGLDisplayLifecycleCallback() {
+        public long eglGetAndInitDisplay(long nativeDisplayID) {
+            long eglDisplay = EGLDisplayUtil.eglGetDisplay(nativeDisplayID);
+            if (eglDisplay == EGL.EGL_NO_DISPLAY) {
+                throw new GLException("Failed to created EGL display: 0x"+Long.toHexString(nativeDisplayID)+", error 0x"+Integer.toHexString(EGL.eglGetError()));
+            }
+            if (!EGLDisplayUtil.eglInitialize(eglDisplay, null, null)) {
+                throw new GLException("eglInitialize failed"+", error 0x"+Integer.toHexString(EGL.eglGetError()));
+            }
+            return eglDisplay;
+        }
+        public void eglTerminate(long eglDisplayHandle) {
+            EGLDisplayUtil.eglTerminate(eglDisplayHandle);
+        }
+    };
+    
+    /**
+     * @param nativeDisplayID
+     * @param connection
+     * @param unitID
+     * @return an initialized EGLGraphicsDevice 
+     * @throws GLException if {@link EGL#eglGetDisplay(long)} or {@link EGL#eglInitialize(long, int[], int, int[], int)} fails
+     * @see EGLGraphicsDevice#EGLGraphicsDevice(long, long, String, int, com.jogamp.nativewindow.egl.EGLGraphicsDevice.EGLDisplayLifecycleCallback) 
+     */
+    public static EGLGraphicsDevice eglCreateEGLGraphicsDevice(long nativeDisplayID, String connection, int unitID)  {
+        final EGLGraphicsDevice eglDisplay = new EGLGraphicsDevice(nativeDisplayID, 0, connection, unitID, eglLifecycleCallback);
+        eglDisplay.open();
+        return eglDisplay;
+    }
+    
+    /**
+     * @param surface
+     * @param allowFallBackToDefault
+     * @return an initialized EGLGraphicsDevice 
+     * @throws GLException if {@link EGL#eglGetDisplay(long)} or {@link EGL#eglInitialize(long, int[], int, int[], int)} fails 
+     */
+    public static EGLGraphicsDevice eglCreateEGLGraphicsDevice(NativeSurface surface, boolean allowFallBackToDefault)  {
+        long nativeDisplayID;
+        if( NativeWindowFactory.TYPE_WINDOWS.equals(NativeWindowFactory.getNativeWindowType(false)) ) {
+            nativeDisplayID = surface.getSurfaceHandle(); // don't even ask ..
+        } else {
+            nativeDisplayID = surface.getDisplayHandle(); // 0 == EGL.EGL_DEFAULT_DISPLAY
+        }
+        long eglDisplay = EGLDisplayUtil.eglGetDisplay(nativeDisplayID);
+        if (eglDisplay == EGL.EGL_NO_DISPLAY && nativeDisplayID != EGL.EGL_DEFAULT_DISPLAY && allowFallBackToDefault) {
+            if(DEBUG) {
+                System.err.println("EGLDisplayUtil.eglGetDisplay(): Fall back to EGL_DEFAULT_DISPLAY");
+            }
+            nativeDisplayID = EGL.EGL_DEFAULT_DISPLAY;
+            eglDisplay = EGLDisplayUtil.eglGetDisplay(nativeDisplayID);
+        }
+        if (eglDisplay == EGL.EGL_NO_DISPLAY) {
+            throw new GLException("Failed to created EGL display: "+surface+", error 0x"+Integer.toHexString(EGL.eglGetError()));
+        }
+        if (!EGLDisplayUtil.eglInitialize(eglDisplay, null, null)) {
+            throw new GLException("eglInitialize failed"+", error 0x"+Integer.toHexString(EGL.eglGetError()));
+        }
+        final AbstractGraphicsDevice adevice = surface.getGraphicsConfiguration().getScreen().getDevice();
+        return new EGLGraphicsDevice(nativeDisplayID, eglDisplay, adevice.getConnection(), adevice.getUnitID(), eglLifecycleCallback);                                            
+    }
 }
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLDrawable.java b/src/jogl/classes/jogamp/opengl/egl/EGLDrawable.java
index b2119d7..383b61f 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLDrawable.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLDrawable.java
@@ -1,22 +1,22 @@
 /*
  * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
  * Copyright (c) 2010 JogAmp Community. All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- * 
+ *
  * - Redistribution of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
- * 
+ *
  * - Redistribution in binary form must reproduce the above copyright
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the distribution.
- * 
+ *
  * Neither the name of Sun Microsystems, Inc. or the names of
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * This software is provided "AS IS," without a warranty of any kind. ALL
  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -29,86 +29,72 @@
  * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
  * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
  * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
+ *
  * Sun gratefully acknowledges that this software was originally authored
  * and developed by Kenneth Bradley Russell and Christopher John Kline.
  */
 
 package jogamp.opengl.egl;
 
-import jogamp.opengl.GLDynamicLookupHelper;
-import jogamp.opengl.GLDrawableImpl;
+import javax.media.nativewindow.MutableSurface;
+import javax.media.nativewindow.NativeSurface;
+import javax.media.nativewindow.NativeWindow;
+import javax.media.nativewindow.ProxySurface;
+import javax.media.opengl.GLContext;
+import javax.media.opengl.GLException;
 
-import javax.media.nativewindow.*;
-import javax.media.nativewindow.VisualIDHolder.VIDType;
-import javax.media.opengl.*;
+import jogamp.opengl.GLDrawableImpl;
+import jogamp.opengl.GLDynamicLookupHelper;
 
-import com.jogamp.nativewindow.egl.*;
+import com.jogamp.nativewindow.egl.EGLGraphicsDevice;
 
 public abstract class EGLDrawable extends GLDrawableImpl {
-    protected boolean ownEGLDisplay = false; // for destruction
-    protected boolean ownEGLSurface = false; // for destruction
-    private EGLGraphicsConfiguration eglConfig;
-    protected long eglDisplay;
-    protected long eglSurface;
+    private boolean ownEGLSurface = false; // for destruction
 
-    protected EGLDrawable(EGLDrawableFactory factory,
-                       NativeSurface component) throws GLException {
+    protected EGLDrawable(EGLDrawableFactory factory, NativeSurface component) throws GLException {
         super(factory, component, false);
-        eglSurface=EGL.EGL_NO_SURFACE;
-        eglDisplay=0;
-    }
-
-    public long getDisplay() {
-        return eglDisplay;
-    }
-
-    public long getHandle() {
-        return eglSurface;
-    }
-
-    public EGLGraphicsConfiguration getGraphicsConfiguration() {
-        return eglConfig;
-    }
-
-    public GLCapabilitiesImmutable getChosenGLCapabilities() {
-        return (null==eglConfig)?super.getChosenGLCapabilities():(GLCapabilitiesImmutable)eglConfig.getChosenCapabilities();
     }
 
+    @Override
     public abstract GLContext createContext(GLContext shareWith);
 
-    protected abstract long createSurface(long eglDpy, long eglNativeCfg, long surfaceHandle);
-
-    private void recreateSurface() {
-        // create a new EGLSurface ..
-        if(EGL.EGL_NO_SURFACE!=eglSurface) {
-            EGL.eglDestroySurface(eglDisplay, eglSurface);
-        }
+    protected abstract long createSurface(EGLGraphicsConfiguration config, long nativeSurfaceHandle);
 
+    private final void recreateSurface() {
+        final EGLGraphicsConfiguration eglConfig = (EGLGraphicsConfiguration) surface.getGraphicsConfiguration();
+        final EGLGraphicsDevice eglDevice = (EGLGraphicsDevice) eglConfig.getScreen().getDevice();
         if(DEBUG) {
-            System.err.println(getThreadName() + ": createSurface using eglDisplay "+toHexString(eglDisplay)+", "+eglConfig);
+            System.err.println(getThreadName() + ": createSurface using "+eglConfig);
+        }        
+        if( EGL.EGL_NO_SURFACE != surface.getSurfaceHandle() ) {
+            EGL.eglDestroySurface(eglDevice.getHandle(), surface.getSurfaceHandle());
         }
-
-        eglSurface = createSurface(eglDisplay, eglConfig.getNativeConfig(), surface.getSurfaceHandle());
-        int eglError0 = EGL.EGL_SUCCESS; 
+        
+        final EGLUpstreamSurfaceHook upstreamHook = (EGLUpstreamSurfaceHook) ((ProxySurface)surface).getUpstreamSurfaceHook();
+        final NativeSurface upstreamSurface = upstreamHook.getUpstreamSurface();
+        long eglSurface = createSurface(eglConfig, upstreamSurface.getSurfaceHandle());
+        
+        int eglError0;
         if (EGL.EGL_NO_SURFACE == eglSurface) {
             eglError0 = EGL.eglGetError();
             if(EGL.EGL_BAD_NATIVE_WINDOW == eglError0) {
-                // Try window handle if available and differs (Windows HDC / HWND). 
+                // Try window handle if available and differs (Windows HDC / HWND).
                 // ANGLE impl. required HWND on Windows.
-                if(surface instanceof NativeWindow) {
-                    final NativeWindow nw = (NativeWindow) surface;
+                if(upstreamSurface instanceof NativeWindow) {
+                    final NativeWindow nw = (NativeWindow) upstreamSurface;
                     if(nw.getWindowHandle() != nw.getSurfaceHandle()) {
                         if(DEBUG) {
                             System.err.println(getThreadName() + ": Info: Creation of window surface w/ surface handle failed: "+eglConfig+", error "+toHexString(eglError0)+", retry w/ windowHandle");
                         }
-                        eglSurface = createSurface(eglDisplay, eglConfig.getNativeConfig(), nw.getWindowHandle());
+                        eglSurface = createSurface(eglConfig, nw.getWindowHandle());
                         if (EGL.EGL_NO_SURFACE == eglSurface) {
                             eglError0 = EGL.eglGetError();
                         }
                     }
                 }
             }
+        } else {
+            eglError0 = EGL.EGL_SUCCESS;
         }
         if (EGL.EGL_NO_SURFACE == eglSurface) {
             throw new GLException("Creation of window surface failed: "+eglConfig+", "+surface+", error "+toHexString(eglError0));
@@ -117,6 +103,8 @@ public abstract class EGLDrawable extends GLDrawableImpl {
         if(DEBUG) {
             System.err.println(getThreadName() + ": setSurface using component: handle "+toHexString(surface.getSurfaceHandle())+" -> "+toHexString(eglSurface));
         }
+        
+        ((MutableSurface)surface).setSurfaceHandle(eglSurface);
     }
 
     @Override
@@ -125,131 +113,75 @@ public abstract class EGLDrawable extends GLDrawableImpl {
             recreateSurface();
         }
     }
-    
-    protected void setRealizedImpl() {
+
+    @Override
+    protected final void setRealizedImpl() {
+        final EGLGraphicsConfiguration eglConfig = (EGLGraphicsConfiguration) surface.getGraphicsConfiguration();
+        final EGLGraphicsDevice eglDevice = (EGLGraphicsDevice) eglConfig.getScreen().getDevice();
         if (realized) {
-            AbstractGraphicsConfiguration aConfig = surface.getGraphicsConfiguration();
-            AbstractGraphicsDevice aDevice = aConfig.getScreen().getDevice();
-            if(aDevice instanceof EGLGraphicsDevice) {
-                if(DEBUG) {
-                    System.err.println(getThreadName() + ": EGLDrawable.setRealized(true): using existing EGL config - START");
-                }
-                // just fetch the data .. trust but verify ..
-                eglDisplay = aDevice.getHandle();
-                if (eglDisplay == EGL.EGL_NO_DISPLAY) {
-                    throw new GLException("Invalid EGL display in EGLGraphicsDevice from "+aDevice);
+            final long eglDisplayHandle = eglDevice.getHandle();
+            if (EGL.EGL_NO_DISPLAY == eglDisplayHandle) {
+                throw new GLException("Invalid EGL display in EGLGraphicsDevice "+eglDevice);
+            }
+            int[] tmp = new int[1];
+            boolean eglSurfaceValid = 0 != surface.getSurfaceHandle();
+            if(eglSurfaceValid) {
+                eglSurfaceValid = EGL.eglQuerySurface(eglDisplayHandle, surface.getSurfaceHandle(), EGL.EGL_CONFIG_ID, tmp, 0);
+                if(!eglSurfaceValid) {
+                    if(DEBUG) {
+                        System.err.println(getThreadName() + ": EGLDrawable.setRealizedImpl eglQuerySuface failed: "+toHexString(EGL.eglGetError())+", "+surface);
+                    }                    
                 }
-                if(aConfig instanceof EGLGraphicsConfiguration) {
-                    eglConfig = (EGLGraphicsConfiguration) aConfig; // done ..
-                    if (null == eglConfig) {
-                        throw new GLException("Null EGLGraphicsConfiguration from "+aConfig);
-                    }
-
-                    int[] tmp = new int[1];
-                    if ( 0 != surface.getSurfaceHandle() &&
-                         EGL.eglQuerySurface(eglDisplay, surface.getSurfaceHandle(), EGL.EGL_CONFIG_ID, tmp, 0) ) {
-                        // surface holds static EGLSurface
-                        eglSurface = surface.getSurfaceHandle();
-                        if(DEBUG) {
-                            System.err.println(getThreadName() + ": setSurface re-using component's EGLSurface: handle "+toHexString(eglSurface));
-                        }
-                    } else {
-                        // EGLSurface is ours - subsequent updateHandle() will issue recreateSurface();
-                        ownEGLSurface=true;
-                    }
-                } else {
-                    throw new GLException("EGLGraphicsDevice hold by non EGLGraphicsConfiguration: "+aConfig);
+            }
+            if(eglSurfaceValid) {
+                // surface holds valid EGLSurface
+                if(DEBUG) {
+                    System.err.println(getThreadName() + ": EGLDrawable.setRealizedImpl re-using component's EGLSurface: handle "+toHexString(surface.getSurfaceHandle()));
                 }
+                ownEGLSurface=false;
             } else {
-                if(DEBUG) {
-                    System.err.println(getThreadName() + ": EGLDrawable.setRealized(true): creating new EGL config - START");
+                // EGLSurface is ours - subsequent updateHandle() will issue recreateSurface();
+                // However .. let's validate the surface object first
+                if( ! (surface instanceof ProxySurface) ) {
+                    throw new InternalError("surface not ProxySurface: "+surface.getClass().getName()+", "+surface);
                 }
-                // create a new EGL config ..
-                ownEGLDisplay=true;
-                // EGLSurface is ours ..
-                ownEGLSurface=true;
-
-                eglDisplay = EGLDisplayUtil.eglGetDisplay(surface, true);
-                if (eglDisplay == EGL.EGL_NO_DISPLAY) {
-                    throw new GLException("Failed to created EGL display: "+surface+", "+aDevice+", error "+toHexString(EGL.eglGetError()));
+                final ProxySurface.UpstreamSurfaceHook upstreamHook = ((ProxySurface)surface).getUpstreamSurfaceHook();
+                if( null == upstreamHook ) {
+                    throw new InternalError("null upstreamHook of: "+surface);
                 }
-                if (!EGLDisplayUtil.eglInitialize(eglDisplay, null, null)) {
-                    throw new GLException("eglInitialize failed"+", error "+Integer.toHexString(EGL.eglGetError()));
+                if( ! (upstreamHook instanceof EGLUpstreamSurfaceHook) ) {
+                    throw new InternalError("upstreamHook not EGLUpstreamSurfaceHook: Surface: "+surface.getClass().getName()+", "+surface+"; UpstreamHook: "+upstreamHook.getClass().getName()+", "+upstreamHook);
                 }
-                EGLGraphicsDevice e = new EGLGraphicsDevice(eglDisplay, AbstractGraphicsDevice.DEFAULT_CONNECTION, AbstractGraphicsDevice.DEFAULT_UNIT);
-                AbstractGraphicsScreen s = new DefaultGraphicsScreen(e, aConfig.getScreen().getIndex());
-                final GLCapabilitiesImmutable capsRequested = (GLCapabilitiesImmutable) aConfig.getRequestedCapabilities();
-                if(aConfig instanceof EGLGraphicsConfiguration) {
-                    final EGLGLCapabilities capsChosen = (EGLGLCapabilities) aConfig.getChosenCapabilities();
-                    if(0 == capsChosen.getEGLConfig()) {
-                        // 'refresh' the native EGLConfig handle
-                        capsChosen.setEGLConfig(EGLGraphicsConfiguration.EGLConfigId2EGLConfig(eglDisplay, capsChosen.getEGLConfigID()));
-                        if(0 == capsChosen.getEGLConfig()) {
-                            throw new GLException("Refreshing native EGLConfig handle failed: "+capsChosen+" of "+aConfig);
-                        }
-                    }
-                    eglConfig  = new EGLGraphicsConfiguration(s, capsChosen, capsRequested, null);
-                    if(DEBUG) {
-                        System.err.println(getThreadName() + ": Reusing chosenCaps: "+eglConfig);
-                    }
-                } else {
-                    eglConfig = EGLGraphicsConfigurationFactory.chooseGraphicsConfigurationStatic(
-                            capsRequested, capsRequested, null, s, aConfig.getVisualID(VIDType.NATIVE), false);
-                
-                    if (null == eglConfig) {
-                        throw new GLException("Couldn't create EGLGraphicsConfiguration from "+s);
-                    } else if(DEBUG) {
-                        System.err.println(getThreadName() + ": Chosen eglConfig: "+eglConfig);
-                    }
+                if( null == ((EGLUpstreamSurfaceHook)upstreamHook).getUpstreamSurface() ) {
+                    throw new InternalError("null upstream surface");
+                }
+                ownEGLSurface=true;
+                if(DEBUG) {
+                    System.err.println(getThreadName() + ": EGLDrawable.setRealizedImpl owning EGLSurface");
                 }
-                // subsequent updateHandle() will issue recreateSurface();
-            }
-            if(DEBUG) {
-                System.err.println(getThreadName() + ": EGLDrawable.setRealized(true): END: ownDisplay "+ownEGLDisplay+", ownSurface "+ownEGLSurface);
             }
-        } else if (ownEGLSurface && eglSurface != EGL.EGL_NO_SURFACE) {
+        } else if (ownEGLSurface && surface.getSurfaceHandle() != EGL.EGL_NO_SURFACE) {
             if(DEBUG) {
-                System.err.println(getThreadName() + ": EGLDrawable.setRealized(false): ownDisplay "+ownEGLDisplay+", ownSurface "+ownEGLSurface+", eglDisplay: "+toHexString(eglDisplay)+", eglSurface: "+toHexString(eglSurface));
+                System.err.println(getThreadName() + ": EGLDrawable.setRealized(false): ownSurface "+ownEGLSurface+", "+eglDevice+", eglSurface: "+toHexString(surface.getSurfaceHandle()));
             }
             // Destroy the window surface
-            if (!EGL.eglDestroySurface(eglDisplay, eglSurface)) {
+            if (!EGL.eglDestroySurface(eglDevice.getHandle(), surface.getSurfaceHandle())) {
                 throw new GLException("Error destroying window surface (eglDestroySurface)");
             }
-            eglSurface = EGL.EGL_NO_SURFACE;
-            if (ownEGLDisplay && EGL.EGL_NO_DISPLAY!=eglDisplay) {
-                EGLDisplayUtil.eglTerminate(eglDisplay);
-            }
-            eglDisplay=EGL.EGL_NO_DISPLAY;
-            eglConfig=null;
+            ((MutableSurface)surface).setSurfaceHandle(EGL.EGL_NO_SURFACE);
         }
     }
 
+    @Override
     protected final void swapBuffersImpl() {
+        final EGLGraphicsDevice eglDevice = (EGLGraphicsDevice) surface.getGraphicsConfiguration().getScreen().getDevice();
         // single-buffer is already filtered out @ GLDrawableImpl#swapBuffers()
-        if(!EGL.eglSwapBuffers(eglDisplay, eglSurface)) {
+        if(!EGL.eglSwapBuffers(eglDevice.getHandle(), surface.getSurfaceHandle())) {
             throw new GLException("Error swapping buffers, eglError "+toHexString(EGL.eglGetError())+", "+this);
         }
     }
 
-    /** 
-     * Surface not realizes yet (onscreen) .. Quering EGL surface size only makes sense for external drawable.
-     * Leave it here for later impl. of an EGLExternalDrawable.  
-    public int getWidth() {
-        int[] tmp = new int[1];
-        if (!EGL.eglQuerySurface(eglDisplay, eglSurface, EGL.EGL_WIDTH, tmp, 0)) {
-            throw new GLException("Error querying surface width, eglError "+toHexString(EGL.eglGetError()));
-        }
-        return tmp[0];
-    }
-
-    public int getHeight() {
-        int[] tmp = new int[1];
-        if (!EGL.eglQuerySurface(eglDisplay, eglSurface, EGL.EGL_HEIGHT, tmp, 0)) {
-            throw new GLException("Error querying surface height, eglError "+toHexString(EGL.eglGetError()));
-        }
-        return tmp[0];
-    } */
-
+    @Override
     public GLDynamicLookupHelper getGLDynamicLookupHelper() {
         if (getGLProfile().usesNativeGLES2()) {
             return getFactoryImpl().getGLDynamicLookupHelper(2);
@@ -260,12 +192,13 @@ public abstract class EGLDrawable extends GLDrawableImpl {
         }
     }
 
+    @Override
     public String toString() {
         return getClass().getName()+"[realized "+isRealized()+
                     ",\n\tfactory    "+getFactory()+
                     ",\n\tsurface    "+getNativeSurface()+
-                    ",\n\teglSurface "+toHexString(eglSurface)+
-                    ",\n\teglConfig  "+eglConfig+
+                    ",\n\teglSurface "+toHexString(surface.getSurfaceHandle())+
+                    ",\n\teglConfig  "+surface.getGraphicsConfiguration()+
                     ",\n\trequested  "+getRequestedGLCapabilities()+
                     ",\n\tchosen     "+getChosenGLCapabilities()+"]";
     }
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java b/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java
index 4b77bfa..c848e3e 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java
@@ -1,22 +1,22 @@
 /*
  * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
  * Copyright (c) 2010 JogAmp Community. All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- * 
+ *
  * - Redistribution of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
- * 
+ *
  * - Redistribution in binary form must reproduce the above copyright
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the distribution.
- * 
+ *
  * Neither the name of Sun Microsystems, Inc. or the names of
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * This software is provided "AS IS," without a warranty of any kind. ALL
  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -29,36 +29,61 @@
  * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
  * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
  * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
+ *
  * Sun gratefully acknowledges that this software was originally authored
  * and developed by Kenneth Bradley Russell and Christopher John Kline.
  */
 
 package jogamp.opengl.egl;
 
-import javax.media.nativewindow.*;
-import javax.media.opengl.*;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.media.nativewindow.AbstractGraphicsConfiguration;
+import javax.media.nativewindow.AbstractGraphicsDevice;
+import javax.media.nativewindow.AbstractGraphicsScreen;
+import javax.media.nativewindow.DefaultGraphicsScreen;
+import javax.media.nativewindow.MutableSurface;
+import javax.media.nativewindow.NativeSurface;
+import javax.media.nativewindow.NativeWindowFactory;
+import javax.media.nativewindow.ProxySurface;
+import javax.media.nativewindow.ProxySurface.UpstreamSurfaceHook;
+import javax.media.nativewindow.VisualIDHolder.VIDType;
+import javax.media.nativewindow.VisualIDHolder;
+import javax.media.opengl.GL;
+import javax.media.opengl.GLCapabilities;
+import javax.media.opengl.GLCapabilitiesChooser;
+import javax.media.opengl.GLCapabilitiesImmutable;
+import javax.media.opengl.GLContext;
+import javax.media.opengl.GLDrawable;
+import javax.media.opengl.GLDrawableFactory;
+import javax.media.opengl.GLException;
+import javax.media.opengl.GLProfile;
 import javax.media.opengl.GLProfile.ShutdownType;
 
+import jogamp.opengl.Debug;
+import jogamp.opengl.GLDrawableFactoryImpl;
+import jogamp.opengl.GLDrawableImpl;
+import jogamp.opengl.GLDynamicLookupHelper;
+import jogamp.opengl.GLGraphicsConfigurationUtil;
+
 import com.jogamp.common.JogampRuntimeException;
 import com.jogamp.common.os.Platform;
-import com.jogamp.common.util.*;
+import com.jogamp.common.util.ReflectionUtil;
 import com.jogamp.nativewindow.WrappedSurface;
 import com.jogamp.nativewindow.egl.EGLGraphicsDevice;
 
-import jogamp.opengl.*;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-
 public class EGLDrawableFactory extends GLDrawableFactoryImpl {
+    /* package */ static final boolean QUERY_EGL_ES = !Debug.isPropertyDefined("jogl.debug.EGLDrawableFactory.DontQuery", true);
+    /* package */ static final boolean QUERY_EGL_ES_NATIVE_TK = Debug.isPropertyDefined("jogl.debug.EGLDrawableFactory.QueryNativeTK", true);
+    
     private static GLDynamicLookupHelper eglES1DynamicLookupHelper = null;
     private static GLDynamicLookupHelper eglES2DynamicLookupHelper = null;
     private static boolean isANGLE = false;
-    
+
     private static final boolean isANGLE(GLDynamicLookupHelper dl) {
         if(Platform.OSType.WINDOWS == Platform.OS_TYPE) {
             final boolean r = 0 != dl.dynamicLookupFunction("eglQuerySurfacePointerANGLE") ||
@@ -69,10 +94,10 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl {
             return false;
         }
     }
-    
+
     public EGLDrawableFactory() {
         super();
-        
+
         // Register our GraphicsConfigurationFactory implementations
         // The act of constructing them causes them to be registered
         EGLGraphicsConfigurationFactory.registerFactory();
@@ -85,15 +110,15 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl {
         }
 
         defaultDevice = new EGLGraphicsDevice(AbstractGraphicsDevice.DEFAULT_CONNECTION, AbstractGraphicsDevice.DEFAULT_UNIT);
-        
-        // FIXME: Probably need to move EGL from a static model 
-        // to a dynamic one, where there can be 2 instances 
+
+        // FIXME: Probably need to move EGL from a static model
+        // to a dynamic one, where there can be 2 instances
         // for each ES profile with their own ProcAddressTable.
 
         synchronized(EGLDrawableFactory.class) {
             /**
              * Currently AMD's EGL impl. crashes at eglGetDisplay(EGL_DEFAULT_DISPLAY)
-             *  
+             *
             // Check Desktop ES2 Availability first (AMD, ..)
             if(null==eglES2DynamicLookupHelper) {
                 GLDynamicLookupHelper tmp=null;
@@ -103,19 +128,19 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl {
                     if(DEBUG) {
                         gle.printStackTrace();
                     }
-                }                
+                }
                 if(null!=tmp && tmp.isLibComplete()) {
                     eglES2DynamicLookupHelper = tmp;
                     EGL.resetProcAddressTable(eglES2DynamicLookupHelper);
                     if (GLProfile.DEBUG) {
                         System.err.println("Info: EGLDrawableFactory: Desktop ES2 - OK");
-                    }                    
+                    }
                 } else if (GLProfile.DEBUG) {
                     System.err.println("Info: EGLDrawableFactory: Desktop ES2 - NOPE");
-                }                    
+                }
             } */
             final boolean hasDesktopES2 = null != eglES2DynamicLookupHelper;
-            
+
             if(!hasDesktopES2 && null==eglES1DynamicLookupHelper) {
                 GLDynamicLookupHelper tmp=null;
                 try {
@@ -124,7 +149,7 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl {
                     if(DEBUG) {
                         gle.printStackTrace();
                     }
-                }                
+                }
                 if(null!=tmp && tmp.isLibComplete()) {
                     eglES1DynamicLookupHelper = tmp;
                     EGL.resetProcAddressTable(eglES1DynamicLookupHelper);
@@ -132,10 +157,10 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl {
                     isANGLE |= isANGLEES1;
                     if (GLProfile.DEBUG) {
                         System.err.println("Info: EGLDrawableFactory: EGL ES1 - OK, isANGLE: "+isANGLEES1);
-                    }                    
+                    }
                 } else if (GLProfile.DEBUG) {
                     System.err.println("Info: EGLDrawableFactory: EGL ES1 - NOPE");
-                }                    
+                }
             }
             if(!hasDesktopES2 && null==eglES2DynamicLookupHelper) {
                 GLDynamicLookupHelper tmp=null;
@@ -145,7 +170,7 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl {
                     if(DEBUG) {
                         gle.printStackTrace();
                     }
-                }                
+                }
                 if(null!=tmp && tmp.isLibComplete()) {
                     eglES2DynamicLookupHelper = tmp;
                     EGL.resetProcAddressTable(eglES2DynamicLookupHelper);
@@ -153,14 +178,15 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl {
                     isANGLE |= isANGLEES2;
                     if (GLProfile.DEBUG) {
                         System.err.println("Info: EGLDrawableFactory: EGL ES2 - OK, isANGLE: "+isANGLEES2);
-                    }                    
+                    }
                 } else if (GLProfile.DEBUG) {
                     System.err.println("Info: EGLDrawableFactory: EGL ES2 - NOPE");
-                }                    
+                }
             }
         }
     }
 
+    @Override
     protected final void destroy(ShutdownType shutdownType) {
         if(null != sharedMap) {
             Collection<SharedResource> srl = sharedMap.values();
@@ -169,10 +195,7 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl {
                 if(DEBUG) {
                     System.err.println("EGLDrawableFactory.destroy("+shutdownType+"): "+sr.device.toString());
                 }
-                final long eglDisplay = sr.device.getHandle();
-                if(EGL.EGL_NO_DISPLAY != eglDisplay) {
-                    EGLDisplayUtil.eglTerminate(eglDisplay);
-                }
+                sr.device.close();
             }
             sharedMap.clear();
             sharedMap = null;
@@ -205,7 +228,7 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl {
       private final boolean wasES1ContextCreated;
       private final boolean wasES2ContextCreated;
 
-      SharedResource(EGLGraphicsDevice dev, boolean wasContextES1Created, boolean wasContextES2Created 
+      SharedResource(EGLGraphicsDevice dev, boolean wasContextES1Created, boolean wasContextES2Created
                      /*EGLDrawable draw, EGLContext ctxES1, EGLContext ctxES2 */) {
           this.device = dev;
           // this.drawable = draw;
@@ -219,89 +242,171 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl {
       // final EGLContext getContextES1() { return contextES1; }
       // final EGLContext getContextES2() { return contextES2; }
       final boolean wasES1ContextAvailable() { return wasES1ContextCreated; }
-      final boolean wasES2ContextAvailable() { return wasES2ContextCreated; }
+      final boolean wasES2ContextAvailable() { return wasES2ContextCreated; }      
     }
 
+    @Override
     public final AbstractGraphicsDevice getDefaultDevice() {
       return defaultDevice;
     }
 
+    @Override
     public final boolean getIsDeviceCompatible(AbstractGraphicsDevice device) {
       // via mappings (X11/WGL/.. -> EGL) we shall be able to handle all types.
       return null!=eglES2DynamicLookupHelper || null!=eglES1DynamicLookupHelper;
     }
 
-    /**
-    private boolean isEGLContextAvailable(EGLGraphicsDevice sharedDevice, String profile) {
-        boolean madeCurrent = false;
-        final GLCapabilities caps = new GLCapabilities(GLProfile.get(profile));
-        caps.setRedBits(5); caps.setGreenBits(5); caps.setBlueBits(5); caps.setAlphaBits(0);
-        caps.setDoubleBuffered(false);
-        caps.setOnscreen(false);
-        caps.setPBuffer(true);
-        final EGLDrawable drawable = (EGLDrawable) createGLDrawable( createOffscreenSurfaceImpl(sharedDevice, caps, caps, null, 64, 64) );        
-        if(null!=drawable) {
+    private boolean isEGLContextAvailable(AbstractGraphicsDevice adevice, EGLGraphicsDevice sharedEGLDevice, String profileString) {
+        if( !GLProfile.isAvailable(adevice, profileString) ) {
+            return false;
+        }
+        final GLProfile glp = GLProfile.get(adevice, profileString) ;
+        final GLDrawableFactoryImpl desktopFactory = (GLDrawableFactoryImpl) GLDrawableFactory.getDesktopFactory();
+        EGLGraphicsDevice eglDevice = null;
+        NativeSurface surface = null;
+        ProxySurface upstreamSurface = null; // X11, GLX, ..
+        boolean success = false;
+        boolean deviceFromUpstreamSurface = false;
+        try {            
+            final GLCapabilities caps = new GLCapabilities(glp);
+            caps.setRedBits(5); caps.setGreenBits(5); caps.setBlueBits(5); caps.setAlphaBits(0);
+            if(adevice instanceof EGLGraphicsDevice || null == desktopFactory || !QUERY_EGL_ES_NATIVE_TK) {
+                eglDevice = sharedEGLDevice; // reuse
+                surface = createDummySurfaceImpl(eglDevice, false, caps, null, 64, 64); // egl pbuffer offscreen
+                upstreamSurface = (ProxySurface)surface;
+                upstreamSurface.createNotify();
+                deviceFromUpstreamSurface = false;
+            } else {
+                surface = desktopFactory.createDummySurface(adevice, caps, null, 64, 64); // X11, WGL, .. dummy window
+                upstreamSurface = ( surface instanceof ProxySurface ) ? (ProxySurface)surface : null ;
+                if(null != upstreamSurface) {
+                    upstreamSurface.createNotify();
+                }                    
+                eglDevice = EGLDisplayUtil.eglCreateEGLGraphicsDevice(surface, true);
+                deviceFromUpstreamSurface = true;
+            }
+            
+            final EGLDrawable drawable = (EGLDrawable) createOnscreenDrawableImpl ( surface );
+            drawable.setRealized(true);
             final EGLContext context = (EGLContext) drawable.createContext(null);
             if (null != context) {
-                context.setSynchronized(true);
                 try {
                     context.makeCurrent(); // could cause exception
-                    madeCurrent = context.isCurrent();
+                    success = context.isCurrent();
+                    if(success) {
+                        final String glVersion = context.getGL().glGetString(GL.GL_VERSION);
+                        if(null == glVersion) {
+                            // Oops .. something is wrong
+                            if(DEBUG) {
+                                System.err.println("EGLDrawableFactory.isEGLContextAvailable: "+eglDevice+", "+context.getGLVersion()+" - VERSION is null, dropping availability!");                                
+                            }
+                            success = false;
+                        }
+                    }
+                    if(success) {
+                        context.mapCurrentAvailableGLVersion(eglDevice);
+                        if(eglDevice != adevice) {
+                            context.mapCurrentAvailableGLVersion(adevice);
+                        }
+                    }
                 } catch (GLException gle) {
                     if (DEBUG) {
-                        System.err.println("EGLDrawableFactory.createShared: INFO: makeCurrent failed");
+                        System.err.println("EGLDrawableFactory.createShared: INFO: context create/makeCurrent failed");
                         gle.printStackTrace();
-                    }                    
+                    }
                 } finally {
                     context.destroy();
                 }
             }
-            drawable.destroy();
+            drawable.setRealized(false);
+        } catch (Throwable t) {
+            if(DEBUG) {
+                System.err.println("Catched Exception:");
+                t.printStackTrace();
+            }
+            success = false;
+        } finally {
+            if(eglDevice == sharedEGLDevice) {
+                if(null != upstreamSurface) {
+                    upstreamSurface.destroyNotify();
+                }                
+            } else if( deviceFromUpstreamSurface ) {
+                if(null != eglDevice) {
+                    eglDevice.close();
+                }
+                if(null != upstreamSurface) {
+                    upstreamSurface.destroyNotify();
+                }
+            } else {
+                if(null != upstreamSurface) {
+                    upstreamSurface.destroyNotify();
+                }                
+                if(null != eglDevice) {
+                    eglDevice.close();
+                }
+            }
         }
-        return madeCurrent;
-    } */
-    
+        return success;
+    }
+
     /* package */ SharedResource getOrCreateEGLSharedResource(AbstractGraphicsDevice adevice) {
         if(null == eglES1DynamicLookupHelper && null == eglES2DynamicLookupHelper) {
             return null;
         }
-        String connection = adevice.getConnection();
+        final String connection = adevice.getConnection();
         SharedResource sr;
         synchronized(sharedMap) {
-            sr = (SharedResource) sharedMap.get(connection);
+            sr = sharedMap.get(connection);
         }
         if(null==sr) {
-            long eglDisplay = EGLDisplayUtil.eglGetDisplay(EGL.EGL_DEFAULT_DISPLAY);
-            if (eglDisplay == EGL.EGL_NO_DISPLAY) {
-                throw new GLException("Failed to created EGL default display: error 0x"+Integer.toHexString(EGL.eglGetError()));
-            } else if(DEBUG) {
-                System.err.println("EGLDrawableFactory.createShared: eglDisplay(EGL_DEFAULT_DISPLAY): 0x"+Long.toHexString(eglDisplay));
+            final boolean madeCurrentES1;            
+            final boolean madeCurrentES2;
+            final EGLGraphicsDevice sharedDevice = EGLDisplayUtil.eglCreateEGLGraphicsDevice(EGL.EGL_DEFAULT_DISPLAY, AbstractGraphicsDevice.DEFAULT_CONNECTION, AbstractGraphicsDevice.DEFAULT_UNIT);
+            
+            if(QUERY_EGL_ES) {
+                madeCurrentES1 = isEGLContextAvailable(adevice, sharedDevice, GLProfile.GLES1);
+                madeCurrentES2 = isEGLContextAvailable(adevice, sharedDevice, GLProfile.GLES2);                
+            } else {            
+                madeCurrentES1 = true;            
+                madeCurrentES2 = true;
+                EGLContext.mapStaticGLESVersion(sharedDevice, 1);
+                if(sharedDevice != adevice) {
+                    EGLContext.mapStaticGLESVersion(adevice, 1);
+                }
+                EGLContext.mapStaticGLESVersion(sharedDevice, 2);
+                if(sharedDevice != adevice) {
+                    EGLContext.mapStaticGLESVersion(adevice, 2);
+                }
             }
-            if (!EGLDisplayUtil.eglInitialize(eglDisplay, null, null)) {
-                throw new GLException("eglInitialize failed"+", error 0x"+Integer.toHexString(EGL.eglGetError()));
+            
+            if( !EGLContext.getAvailableGLVersionsSet(adevice) ) {
+                // Even though we override the non EGL native mapping intentionally,
+                // avoid exception due to double 'set' - carefull exception of the rule. 
+                EGLContext.setAvailableGLVersionsSet(adevice);
             }
-            final EGLGraphicsDevice sharedDevice = new EGLGraphicsDevice(eglDisplay, connection, adevice.getUnitID());            
-            // final boolean madeCurrentES1 = isEGLContextAvailable(sharedDevice, GLProfile.GLES1);
-            // final boolean madeCurrentES2 = isEGLContextAvailable(sharedDevice, GLProfile.GLES2);
-            final boolean madeCurrentES1 = true; // FIXME
-            final boolean madeCurrentES2 = true; // FIXME
             sr = new SharedResource(sharedDevice, madeCurrentES1, madeCurrentES2);
+            
             synchronized(sharedMap) {
                 sharedMap.put(connection, sr);
+                if(adevice != sharedDevice) {
+                    sharedMap.put(sharedDevice.getConnection(), sr);
+                }
             }
             if (DEBUG) {
-                System.err.println("EGLDrawableFactory.createShared: device:  " + sharedDevice);
+                System.err.println("EGLDrawableFactory.createShared: devices:  queried " + QUERY_EGL_ES + "[nativeTK "+QUERY_EGL_ES_NATIVE_TK+"], " + adevice + ", " + sharedDevice);
                 System.err.println("EGLDrawableFactory.createShared: context ES1: " + madeCurrentES1);
                 System.err.println("EGLDrawableFactory.createShared: context ES2: " + madeCurrentES2);
-            }                        
+            }
         }
         return sr;
     }
 
+    @Override
     protected final Thread getSharedResourceThread() {
         return null;
     }
-    
+
+    @Override
     protected final boolean createSharedResource(AbstractGraphicsDevice device) {
         try {
             SharedResource sr = getOrCreateEGLSharedResource(device);
@@ -314,13 +419,15 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl {
                 gle.printStackTrace();
             }
         }
-        return false;        
+        return false;
     }
-    
+
+    @Override
     protected final GLContext getOrCreateSharedContextImpl(AbstractGraphicsDevice device) {
         return null; // n/a for EGL .. since we don't keep the resources
     }
-    
+
+    @Override
     protected AbstractGraphicsDevice getOrCreateSharedDeviceImpl(AbstractGraphicsDevice device) {
         SharedResource sr = getOrCreateEGLSharedResource(device);
         if(null!=sr) {
@@ -332,7 +439,8 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl {
     public boolean isANGLE() {
         return isANGLE;
     }
-    
+
+    @Override
     public GLDynamicLookupHelper getGLDynamicLookupHelper(int esProfile) {
         if (2==esProfile) {
             return eglES2DynamicLookupHelper;
@@ -343,6 +451,7 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl {
         }
     }
 
+    @Override
     protected List<GLCapabilitiesImmutable> getAvailableCapabilitiesImpl(AbstractGraphicsDevice device) {
         if(null == eglES1DynamicLookupHelper && null == eglES2DynamicLookupHelper) {
             return new ArrayList<GLCapabilitiesImmutable>(); // null
@@ -350,13 +459,58 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl {
         return EGLGraphicsConfigurationFactory.getAvailableCapabilities(this, device);
     }
 
+    @Override
     protected GLDrawableImpl createOnscreenDrawableImpl(NativeSurface target) {
         if (target == null) {
           throw new IllegalArgumentException("Null target");
         }
-        return new EGLOnscreenDrawable(this, target);
+        return new EGLOnscreenDrawable(this, getEGLSurface(target));
+    }
+    
+    protected static NativeSurface getEGLSurface(NativeSurface surface) {
+        AbstractGraphicsConfiguration aConfig = surface.getGraphicsConfiguration();
+        AbstractGraphicsDevice aDevice = aConfig.getScreen().getDevice();
+        if( aDevice instanceof EGLGraphicsDevice && aConfig instanceof EGLGraphicsConfiguration ) {
+            // already in native EGL format
+            if(DEBUG) {
+                System.err.println(getThreadName() + ": getEGLSurface - already in EGL format - use as-is: "+aConfig);
+            }
+            return surface;
+        }
+        // create EGL instance out of platform native types
+        final EGLGraphicsDevice eglDevice = EGLDisplayUtil.eglCreateEGLGraphicsDevice(surface, true);
+        final AbstractGraphicsScreen eglScreen = new DefaultGraphicsScreen(eglDevice, aConfig.getScreen().getIndex());
+        final GLCapabilitiesImmutable capsRequested = (GLCapabilitiesImmutable) aConfig.getRequestedCapabilities();
+        final EGLGraphicsConfiguration eglConfig;
+        if( aConfig instanceof EGLGraphicsConfiguration ) {
+            // Config is already in EGL type - reuse ..
+            final EGLGLCapabilities capsChosen = (EGLGLCapabilities) aConfig.getChosenCapabilities();
+            if( 0 == capsChosen.getEGLConfig() ) {
+                // 'refresh' the native EGLConfig handle
+                capsChosen.setEGLConfig(EGLGraphicsConfiguration.EGLConfigId2EGLConfig(eglDevice.getHandle(), capsChosen.getEGLConfigID()));
+                if( 0 == capsChosen.getEGLConfig() ) {
+                    throw new GLException("Refreshing native EGLConfig handle failed: "+capsChosen+" of "+aConfig);
+                }
+            }
+            eglConfig  = new EGLGraphicsConfiguration(eglScreen, capsChosen, capsRequested, null);
+            if(DEBUG) {
+                System.err.println(getThreadName() + ": getEGLSurface - Reusing chosenCaps: "+eglConfig);
+            }
+        } else {
+            eglConfig = EGLGraphicsConfigurationFactory.chooseGraphicsConfigurationStatic(
+                    capsRequested, capsRequested, null, eglScreen, aConfig.getVisualID(VIDType.NATIVE), false);
+
+            if (null == eglConfig) {
+                throw new GLException("Couldn't create EGLGraphicsConfiguration from "+eglScreen);
+            } else if(DEBUG) {
+                System.err.println(getThreadName() + ": getEGLSurface - Chosen eglConfig: "+eglConfig);
+            }
+        }
+        return new WrappedSurface(eglConfig, EGL.EGL_NO_SURFACE, surface.getWidth(), surface.getHeight(), new EGLUpstreamSurfaceHook(surface));
     }
+    static String getThreadName() { return Thread.currentThread().getName(); }
 
+    @Override
     protected GLDrawableImpl createOffscreenDrawableImpl(NativeSurface target) {
         if (target == null) {
           throw new IllegalArgumentException("Null target");
@@ -370,42 +524,145 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl {
         return new EGLPbufferDrawable(this, target);
     }
 
+    @Override
     public boolean canCreateGLPbuffer(AbstractGraphicsDevice device) {
         return true;
     }
 
-    protected NativeSurface createOffscreenSurfaceImpl(AbstractGraphicsDevice device, GLCapabilitiesImmutable capsChosen, GLCapabilitiesImmutable capsRequested, GLCapabilitiesChooser chooser, int width, int height) {
-        WrappedSurface ns = new WrappedSurface(EGLGraphicsConfigurationFactory.createOffscreenGraphicsConfiguration(device, capsChosen, capsRequested, chooser));
-        ns.surfaceSizeChanged(width, height);
-        return ns;
+    @Override
+    protected ProxySurface createMutableSurfaceImpl(AbstractGraphicsDevice deviceReq, boolean createNewDevice, 
+                                                    GLCapabilitiesImmutable capsChosen, GLCapabilitiesImmutable capsRequested, 
+                                                    GLCapabilitiesChooser chooser, int width, int height, UpstreamSurfaceHook lifecycleHook) {
+        final EGLGraphicsDevice device;
+        if(createNewDevice) {
+            final EGLGraphicsDevice eglDeviceReq = (EGLGraphicsDevice) deviceReq;
+            device = EGLDisplayUtil.eglCreateEGLGraphicsDevice(eglDeviceReq.getNativeDisplayID(), deviceReq.getConnection(), deviceReq.getUnitID());
+        } else {
+            device = (EGLGraphicsDevice) deviceReq;
+        }
+        final DefaultGraphicsScreen screen = new DefaultGraphicsScreen(device, 0);
+        final EGLGraphicsConfiguration config = EGLGraphicsConfigurationFactory.chooseGraphicsConfigurationStatic(capsChosen, capsRequested, chooser, screen, VisualIDHolder.VID_UNDEFINED, false);
+        if(null == config) {
+            throw new GLException("Choosing GraphicsConfiguration failed w/ "+capsChosen+" on "+screen); 
+        }    
+        return new WrappedSurface(config, 0, width, height, lifecycleHook);
     }
-
-    protected ProxySurface createProxySurfaceImpl(AbstractGraphicsDevice adevice, long windowHandle, GLCapabilitiesImmutable capsRequested, GLCapabilitiesChooser chooser) {    
-        // FIXME device/windowHandle -> screen ?!
-        EGLGraphicsDevice device = (EGLGraphicsDevice) adevice;
-        DefaultGraphicsScreen screen = new DefaultGraphicsScreen(device, 0);
-        EGLGraphicsConfiguration cfg = EGLGraphicsConfigurationFactory.chooseGraphicsConfigurationStatic(capsRequested, capsRequested, chooser, screen, VisualIDHolder.VID_UNDEFINED, false);
-        WrappedSurface ns = new WrappedSurface(cfg, windowHandle);
-        return ns;
+    
+    @Override
+    public final ProxySurface createDummySurfaceImpl(AbstractGraphicsDevice deviceReq, boolean createNewDevice, 
+                                                     GLCapabilitiesImmutable requestedCaps, GLCapabilitiesChooser chooser, int width, int height) {
+        final GLCapabilitiesImmutable chosenCaps = GLGraphicsConfigurationUtil.fixOffscreenGLCapabilities(requestedCaps, false, canCreateGLPbuffer(deviceReq));        
+        return createMutableSurfaceImpl(deviceReq, createNewDevice, chosenCaps, requestedCaps, chooser, width, height, dummySurfaceLifecycleHook);
     }
+    private static final ProxySurface.UpstreamSurfaceHook dummySurfaceLifecycleHook = new ProxySurface.UpstreamSurfaceHook() {
+        @Override
+        public final void create(ProxySurface s) {
+            if( EGL.EGL_NO_SURFACE == s.getSurfaceHandle() ) {
+                final EGLGraphicsDevice eglDevice = (EGLGraphicsDevice) s.getGraphicsConfiguration().getScreen().getDevice();
+                if(0 == eglDevice.getHandle()) {
+                    eglDevice.open();
+                    s.setImplBitfield(ProxySurface.OWN_DEVICE);
+                }
+                createPBufferSurfaceImpl(s, false);
+                if(DEBUG) {
+                    System.err.println("EGLDrawableFactory.dummySurfaceLifecycleHook.create: "+s);
+                }
+            }
+        }
+        @Override
+        public final void destroy(ProxySurface s) {
+            if( EGL.EGL_NO_SURFACE != s.getSurfaceHandle() ) {
+                final EGLGraphicsConfiguration config = (EGLGraphicsConfiguration) s.getGraphicsConfiguration();
+                final EGLGraphicsDevice eglDevice = (EGLGraphicsDevice) config.getScreen().getDevice();
+                EGL.eglDestroySurface(eglDevice.getHandle(), s.getSurfaceHandle());
+                s.setSurfaceHandle(EGL.EGL_NO_SURFACE);
+                if( 0 != ( ProxySurface.OWN_DEVICE & s.getImplBitfield() ) ) {
+                    eglDevice.close();
+                }
+                if(DEBUG) {
+                    System.err.println("EGLDrawableFactory.dummySurfaceLifecycleHook.create: "+s);
+                }
+            }
+        }
+        @Override
+        public final int getWidth(ProxySurface s) {
+            return s.initialWidth;
+        }
+        @Override
+        public final int getHeight(ProxySurface s) {
+            return s.initialHeight;
+        }
+        @Override
+        public String toString() {
+            return "EGLSurfaceLifecycleHook[]";
+        }
+        
+    };
     
+    /**
+     * @param ms {@link MutableSurface} which dimensions and config are being used to create the pbuffer surface. 
+     *           It will also hold the resulting pbuffer surface handle. 
+     * @param useTexture
+     * @return the passed {@link MutableSurface} which now has the EGL pbuffer surface set as it's handle
+     */
+    protected static MutableSurface createPBufferSurfaceImpl(MutableSurface ms, boolean useTexture) {
+        final EGLGraphicsConfiguration config = (EGLGraphicsConfiguration) ms.getGraphicsConfiguration();
+        final EGLGraphicsDevice eglDevice = (EGLGraphicsDevice) config.getScreen().getDevice();
+        final GLCapabilitiesImmutable caps = (GLCapabilitiesImmutable) config.getChosenCapabilities();
+        final int texFormat;
+
+        if(useTexture) {
+            texFormat = caps.getAlphaBits() > 0 ? EGL.EGL_TEXTURE_RGBA : EGL.EGL_TEXTURE_RGB ;
+        } else {
+            texFormat = EGL.EGL_NO_TEXTURE;
+        }
+
+        if (DEBUG) {
+          System.out.println("Pbuffer config: " + config);
+        }
+
+        final int[] attrs = EGLGraphicsConfiguration.CreatePBufferSurfaceAttribList(ms.getWidth(), ms.getHeight(), texFormat);
+        final long surf = EGL.eglCreatePbufferSurface(eglDevice.getHandle(), config.getNativeConfig(), attrs, 0);
+        if (EGL.EGL_NO_SURFACE==surf) {
+            throw new GLException("Creation of window surface (eglCreatePbufferSurface) failed, dim "+ms.getWidth()+"x"+ms.getHeight()+", error 0x"+Integer.toHexString(EGL.eglGetError()));
+        } else if(DEBUG) {
+            System.err.println("PBuffer setSurface result: eglSurface 0x"+Long.toHexString(surf));
+        }
+        ms.setSurfaceHandle(surf);
+        return ms;
+    }
+
+    @Override
+    protected ProxySurface createProxySurfaceImpl(AbstractGraphicsDevice deviceReq, int screenIdx, long windowHandle, GLCapabilitiesImmutable capsRequested, GLCapabilitiesChooser chooser, UpstreamSurfaceHook upstream) {
+        final EGLGraphicsDevice eglDeviceReq = (EGLGraphicsDevice) deviceReq;
+        final EGLGraphicsDevice device = EGLDisplayUtil.eglCreateEGLGraphicsDevice(eglDeviceReq.getNativeDisplayID(), deviceReq.getConnection(), deviceReq.getUnitID());
+        final DefaultGraphicsScreen screen = new DefaultGraphicsScreen(device, screenIdx);
+        final EGLGraphicsConfiguration cfg = EGLGraphicsConfigurationFactory.chooseGraphicsConfigurationStatic(capsRequested, capsRequested, chooser, screen, VisualIDHolder.VID_UNDEFINED, false);
+        return new WrappedSurface(cfg, windowHandle, 0, 0, upstream);
+    }
+
+    @Override
     protected GLContext createExternalGLContextImpl() {
         AbstractGraphicsScreen absScreen = DefaultGraphicsScreen.createDefault(NativeWindowFactory.TYPE_EGL);
         return new EGLExternalContext(absScreen);
     }
 
+    @Override
     public boolean canCreateExternalGLDrawable(AbstractGraphicsDevice device) {
         return false;
     }
 
+    @Override
     protected GLDrawable createExternalGLDrawableImpl() {
         throw new GLException("Not yet implemented");
     }
 
+    @Override
     public boolean canCreateContextOnJava2DSurface(AbstractGraphicsDevice device) {
         return false;
     }
 
+    @Override
     public GLContext createContextOnJava2DSurface(Object graphics, GLContext shareWith)
         throws GLException {
         throw new GLException("Unimplemented on this platform");
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLExternalContext.java b/src/jogl/classes/jogamp/opengl/egl/EGLExternalContext.java
index ff60a52..585638d 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLExternalContext.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLExternalContext.java
@@ -1,21 +1,21 @@
 /*
  * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- * 
+ *
  * - Redistribution of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
- * 
+ *
  * - Redistribution in binary form must reproduce the above copyright
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the distribution.
- * 
+ *
  * Neither the name of Sun Microsystems, Inc. or the names of
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * This software is provided "AS IS," without a warranty of any kind. ALL
  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -28,7 +28,7 @@
  * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
  * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
  * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
+ *
  * Sun gratefully acknowledges that this software was originally authored
  * and developed by Kenneth Bradley Russell and Christopher John Kline.
  */
@@ -45,10 +45,11 @@ public class EGLExternalContext extends EGLContext {
     public EGLExternalContext(AbstractGraphicsScreen screen) {
         super(null, null);
         GLContextShareSet.contextCreated(this);
-        setGLFunctionAvailability(false, 0, 0, CTX_IS_ARB_CREATED|CTX_PROFILE_ES);
+        setGLFunctionAvailability(false, 0, 0, CTX_PROFILE_ES);
         getGLStateTracker().setEnabled(false); // external context usage can't track state in Java
     }
 
+    @Override
     public int makeCurrent() throws GLException {
         // Save last context if necessary to allow external GLContexts to
         // talk to other GLContexts created by this library
@@ -58,27 +59,33 @@ public class EGLExternalContext extends EGLContext {
             setCurrent(null);
         }
         return super.makeCurrent();
-    }  
+    }
 
+    @Override
     public void release() throws GLException {
         super.release();
         setCurrent(lastContext);
         lastContext = null;
     }
 
+    @Override
     protected void makeCurrentImpl() throws GLException {
     }
 
+    @Override
     protected void releaseImpl() throws GLException {
     }
 
+    @Override
     protected void destroyImpl() throws GLException {
     }
 
+    @Override
     public void bindPbufferToTexture() {
         throw new GLException("Should not call this");
     }
 
+    @Override
     public void releasePbufferFromTexture() {
         throw new GLException("Should not call this");
     }
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLGLCapabilities.java b/src/jogl/classes/jogamp/opengl/egl/EGLGLCapabilities.java
index f813edf..70a5701 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLGLCapabilities.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLGLCapabilities.java
@@ -37,17 +37,17 @@ import javax.media.opengl.GLProfile;
 public class EGLGLCapabilities extends GLCapabilities {
   private long eglcfg;
   final private int  eglcfgid;
-  final private int  renderableType;  
+  final private int  renderableType;
   final private int  nativeVisualID;
-  
+
   /**
-   * 
+   *
    * @param eglcfg
    * @param eglcfgid
    * @param visualID native visualID if valid, otherwise VisualIDHolder.VID_UNDEFINED
    * @param glp desired GLProfile, or null if determined by renderableType
    * @param renderableType actual EGL renderableType
-   * 
+   *
    * May throw GLException if given GLProfile is not compatible w/ renderableType
    */
   public EGLGLCapabilities(long eglcfg, int eglcfgid, int visualID, GLProfile glp, int renderableType) {
@@ -62,10 +62,12 @@ public class EGLGLCapabilities extends GLCapabilities {
       this.nativeVisualID = visualID;
   }
 
+  @Override
   public Object cloneMutable() {
     return clone();
   }
 
+  @Override
   public Object clone() {
     try {
       return super.clone();
@@ -73,13 +75,13 @@ public class EGLGLCapabilities extends GLCapabilities {
       throw new GLException(e);
     }
   }
-  
+
   final protected void setEGLConfig(long v) { eglcfg=v; }
   final public long getEGLConfig() { return eglcfg; }
   final public int getEGLConfigID() { return eglcfgid; }
   final public int getRenderableType() { return renderableType; }
   final public int getNativeVisualID() { return nativeVisualID; }
-  
+
   @Override
   final public int getVisualID(VIDType type) throws NativeWindowException {
       switch(type) {
@@ -90,9 +92,9 @@ public class EGLGLCapabilities extends GLCapabilities {
               return getNativeVisualID();
           default:
               throw new NativeWindowException("Invalid type <"+type+">");
-      }      
+      }
   }
-  
+
   public static boolean isCompatible(GLProfile glp, int renderableType) {
     if(null == glp) {
         return true;
@@ -121,7 +123,7 @@ public class EGLGLCapabilities extends GLCapabilities {
     }
     return null;
   }
-  
+
   public static StringBuilder renderableTypeToString(StringBuilder sink, int renderableType) {
     if(null == sink) {
         sink = new StringBuilder();
@@ -139,9 +141,10 @@ public class EGLGLCapabilities extends GLCapabilities {
     if(0 != (renderableType & EGL.EGL_OPENVG_API)) {
         if(!first) sink.append(", "); sink.append("VG");  first=false;
     }
-    return sink;      
+    return sink;
   }
-  
+
+  @Override
   public StringBuilder toString(StringBuilder sink) {
     if(null == sink) {
         sink = new StringBuilder();
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfiguration.java b/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfiguration.java
index 875bcb9..716a6e6 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfiguration.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfiguration.java
@@ -38,9 +38,11 @@ package jogamp.opengl.egl;
 
 import java.nio.IntBuffer;
 import java.util.ArrayList;
+import java.util.List;
 
 import javax.media.nativewindow.AbstractGraphicsDevice;
 import javax.media.nativewindow.AbstractGraphicsScreen;
+import javax.media.nativewindow.CapabilitiesImmutable;
 import javax.media.nativewindow.GraphicsConfigurationFactory;
 import javax.media.nativewindow.VisualIDHolder;
 import javax.media.opengl.DefaultGLCapabilitiesChooser;
@@ -95,9 +97,10 @@ public class EGLGraphicsConfiguration extends MutableGraphicsConfiguration imple
     }
         
     void updateGraphicsConfiguration() {
+        CapabilitiesImmutable capsChosen = getChosenCapabilities(); 
         EGLGraphicsConfiguration newConfig = (EGLGraphicsConfiguration)
-            GraphicsConfigurationFactory.getFactory(getScreen().getDevice()).chooseGraphicsConfiguration(
-                getChosenCapabilities(), getRequestedCapabilities(), chooser, getScreen());
+            GraphicsConfigurationFactory.getFactory(getScreen().getDevice(), capsChosen).chooseGraphicsConfiguration(
+                capsChosen, getRequestedCapabilities(), chooser, getScreen(), VisualIDHolder.VID_UNDEFINED);
         if(null!=newConfig) {
             // FIXME: setScreen( ... );
             setChosenCapabilities(newConfig.getChosenCapabilities());
@@ -149,8 +152,8 @@ public class EGLGraphicsConfiguration extends MutableGraphicsConfiguration imple
 
     public static EGLGLCapabilities EGLConfig2Capabilities(GLProfile glp, long display, long config,
                                                            boolean relaxed, boolean onscreen, boolean usePBuffer, boolean forceTransparentFlag) {
-        ArrayList bucket = new ArrayList();
-        final int winattrmask = GLGraphicsConfigurationUtil.getWinAttributeBits(onscreen, usePBuffer);
+        List<GLCapabilitiesImmutable> bucket = new ArrayList<GLCapabilitiesImmutable>();
+        final int winattrmask = GLGraphicsConfigurationUtil.getWinAttributeBits(onscreen, usePBuffer, false);
         if( EGLConfig2Capabilities(bucket, glp, display, config, winattrmask, forceTransparentFlag) ) {
             return (EGLGLCapabilities) bucket.get(0);
         } else if ( relaxed && EGLConfig2Capabilities(bucket, glp, display, config, GLGraphicsConfigurationUtil.ALL_BITS, forceTransparentFlag) ) {
@@ -159,7 +162,7 @@ public class EGLGraphicsConfiguration extends MutableGraphicsConfiguration imple
         return null;
     }
 
-    public static boolean EGLConfig2Capabilities(ArrayList capsBucket,
+    public static boolean EGLConfig2Capabilities(List<GLCapabilitiesImmutable> capsBucket,
                                                  GLProfile glp, long display, long config,
                                                  int winattrmask, boolean forceTransparentFlag) {
         final int allDrawableTypeBits = EGLConfigDrawableTypeBits(display, config);
@@ -208,24 +211,6 @@ public class EGLGraphicsConfiguration extends MutableGraphicsConfiguration imple
             return false;
         }        
                 
-        if(EGL.eglGetConfigAttrib(display, config, EGL.EGL_RED_SIZE, val)) {
-            caps.setRedBits(val.get(0));
-        }
-        if(EGL.eglGetConfigAttrib(display, config, EGL.EGL_GREEN_SIZE, val)) {
-            caps.setGreenBits(val.get(0));
-        }
-        if(EGL.eglGetConfigAttrib(display, config, EGL.EGL_BLUE_SIZE, val)) {
-            caps.setBlueBits(val.get(0));
-        }
-        if(EGL.eglGetConfigAttrib(display, config, EGL.EGL_ALPHA_SIZE, val)) {
-            caps.setAlphaBits(val.get(0));
-        }
-        if(EGL.eglGetConfigAttrib(display, config, EGL.EGL_STENCIL_SIZE, val)) {
-            caps.setStencilBits(val.get(0));
-        }
-        if(EGL.eglGetConfigAttrib(display, config, EGL.EGL_DEPTH_SIZE, val)) {
-            caps.setDepthBits(val.get(0));
-        }
         if(EGL.eglGetConfigAttrib(display, config, EGL.EGL_SAMPLES, val)) {
             caps.setSampleBuffers(val.get(0)>0?true:false);
             caps.setNumSamples(val.get(0));
@@ -261,6 +246,25 @@ public class EGLGraphicsConfiguration extends MutableGraphicsConfiguration imple
                 caps.setTransparentAlphaValue(val.get(0)==EGL.EGL_DONT_CARE?-1:val.get(0));
             } */
         }
+        // ALPHA shall be set at last - due to it's auto setting by the above (!opaque / samples)
+        if(EGL.eglGetConfigAttrib(display, config, EGL.EGL_RED_SIZE, val)) {
+            caps.setRedBits(val.get(0));
+        }
+        if(EGL.eglGetConfigAttrib(display, config, EGL.EGL_GREEN_SIZE, val)) {
+            caps.setGreenBits(val.get(0));
+        }
+        if(EGL.eglGetConfigAttrib(display, config, EGL.EGL_BLUE_SIZE, val)) {
+            caps.setBlueBits(val.get(0));
+        }
+        if(EGL.eglGetConfigAttrib(display, config, EGL.EGL_ALPHA_SIZE, val)) {
+            caps.setAlphaBits(val.get(0));
+        }
+        if(EGL.eglGetConfigAttrib(display, config, EGL.EGL_STENCIL_SIZE, val)) {
+            caps.setStencilBits(val.get(0));
+        }
+        if(EGL.eglGetConfigAttrib(display, config, EGL.EGL_DEPTH_SIZE, val)) {
+            caps.setDepthBits(val.get(0));
+        }
         return GLGraphicsConfigurationUtil.addGLCapabilitiesPermutations(capsBucket, caps, drawableTypeBits );
     }
 
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfigurationFactory.java b/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfigurationFactory.java
index 904110e..0b21d20 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfigurationFactory.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfigurationFactory.java
@@ -38,7 +38,6 @@ import javax.media.nativewindow.AbstractGraphicsDevice;
 import javax.media.nativewindow.AbstractGraphicsScreen;
 import javax.media.nativewindow.CapabilitiesChooser;
 import javax.media.nativewindow.CapabilitiesImmutable;
-import javax.media.nativewindow.DefaultGraphicsScreen;
 import javax.media.nativewindow.GraphicsConfigurationFactory;
 import javax.media.nativewindow.VisualIDHolder;
 import javax.media.nativewindow.VisualIDHolder.VIDType;
@@ -47,6 +46,7 @@ import javax.media.nativewindow.NativeWindowFactory;
 import javax.media.opengl.GLCapabilities;
 import javax.media.opengl.GLCapabilitiesChooser;
 import javax.media.opengl.GLCapabilitiesImmutable;
+import javax.media.opengl.GLContext;
 import javax.media.opengl.GLException;
 import javax.media.opengl.GLProfile;
 import javax.media.opengl.GLDrawableFactory;
@@ -81,27 +81,27 @@ public class EGLGraphicsConfigurationFactory extends GLGraphicsConfigurationFact
         // become the pre-selector for X11/.. to match the native visual id w/ EGL, if native ES is selected
         final String nwType = NativeWindowFactory.getNativeWindowType(false);
         if(NativeWindowFactory.TYPE_X11 == nwType) {
-            nativeGraphicsConfigurationFactory = GraphicsConfigurationFactory.registerFactory(com.jogamp.nativewindow.x11.X11GraphicsDevice.class, eglFactory);
+            nativeGraphicsConfigurationFactory = GraphicsConfigurationFactory.registerFactory(com.jogamp.nativewindow.x11.X11GraphicsDevice.class, GLCapabilitiesImmutable.class, eglFactory);
         } /* else if(NativeWindowFactory.TYPE_WINDOWS == NativeWindowFactory.getNativeWindowType(false)) {
             nativeGraphicsConfigurationFactory = GraphicsConfigurationFactory.registerFactory(javax.media.nativewindow.windows.WindowsGraphicsDevice.class, eglFactory);
         } else if(NativeWindowFactory.TYPE_MACOSX == NativeWindowFactory.getNativeWindowType(false)) {            
         } */
         
         // become the selector for KD/EGL ..
-        kdeglGraphicsConfigurationFactory = GraphicsConfigurationFactory.registerFactory(com.jogamp.nativewindow.egl.EGLGraphicsDevice.class, eglFactory);
+        kdeglGraphicsConfigurationFactory = GraphicsConfigurationFactory.registerFactory(com.jogamp.nativewindow.egl.EGLGraphicsDevice.class, GLCapabilitiesImmutable.class, eglFactory);
     }
     
     static void unregisterFactory() {
         final String nwType = NativeWindowFactory.getNativeWindowType(false);
         if(NativeWindowFactory.TYPE_X11 == nwType) {
-            GraphicsConfigurationFactory.registerFactory(com.jogamp.nativewindow.x11.X11GraphicsDevice.class, nativeGraphicsConfigurationFactory);                    
+            GraphicsConfigurationFactory.registerFactory(com.jogamp.nativewindow.x11.X11GraphicsDevice.class, GLCapabilitiesImmutable.class, nativeGraphicsConfigurationFactory);                    
         } /* else if(NativeWindowFactory.TYPE_WINDOWS == NativeWindowFactory.getNativeWindowType(false)) {
             GraphicsConfigurationFactory.registerFactory(javax.media.nativewindow.windows.WindowsGraphicsDevice.class, nativeGraphicsConfigurationFactory);
         } else if(NativeWindowFactory.TYPE_MACOSX == NativeWindowFactory.getNativeWindowType(false)) {            
         } */
         nativeGraphicsConfigurationFactory = null;
         
-        GraphicsConfigurationFactory.registerFactory(com.jogamp.nativewindow.egl.EGLGraphicsDevice.class, kdeglGraphicsConfigurationFactory);
+        GraphicsConfigurationFactory.registerFactory(com.jogamp.nativewindow.egl.EGLGraphicsDevice.class, GLCapabilitiesImmutable.class, kdeglGraphicsConfigurationFactory);
         kdeglGraphicsConfigurationFactory = null;
     }
     
@@ -110,7 +110,7 @@ public class EGLGraphicsConfigurationFactory extends GLGraphicsConfigurationFact
 
     protected AbstractGraphicsConfiguration chooseGraphicsConfigurationImpl (
             CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested,
-            CapabilitiesChooser chooser, AbstractGraphicsScreen absScreen) {
+            CapabilitiesChooser chooser, AbstractGraphicsScreen absScreen, int nativeVisualID) {
         if (absScreen == null) {
             throw new IllegalArgumentException("This NativeWindowFactory accepts only AbstractGraphicsDevice objects");
         }
@@ -140,7 +140,7 @@ public class EGLGraphicsConfigurationFactory extends GLGraphicsConfigurationFact
             cfg = chooseGraphicsConfigurationStatic((GLCapabilitiesImmutable) capsChosen,
                                                     (GLCapabilitiesImmutable) capsRequested,
                                                     (GLCapabilitiesChooser) chooser,
-                                                    absScreen, VisualIDHolder.VID_UNDEFINED, false);            
+                                                    absScreen, nativeVisualID, false);            
         } else {
             // handle non native cases (X11, ..) 
             if(null == nativeGraphicsConfigurationFactory) {
@@ -154,7 +154,7 @@ public class EGLGraphicsConfigurationFactory extends GLGraphicsConfigurationFact
                 cfg = chooseGraphicsConfigurationStatic((GLCapabilitiesImmutable) capsChosen,
                                                         (GLCapabilitiesImmutable) capsRequested,
                                                         (GLCapabilitiesChooser) chooser,
-                                                        absScreen, VisualIDHolder.VID_UNDEFINED, false);
+                                                        absScreen, nativeVisualID, false);
                 if(null == cfg || VisualIDHolder.VID_UNDEFINED == cfg.getVisualID(VIDType.NATIVE)) {
                     cfg = null;
                     if(DEBUG) {
@@ -167,7 +167,7 @@ public class EGLGraphicsConfigurationFactory extends GLGraphicsConfigurationFact
                 if(DEBUG) {
                     System.err.println("EGLGraphicsConfigurationFactory.choose..: Delegate to "+nativeGraphicsConfigurationFactory.getClass().getSimpleName());
                 }
-                cfg = nativeGraphicsConfigurationFactory.chooseGraphicsConfiguration(capsChosen, capsRequested, chooser, absScreen);
+                cfg = nativeGraphicsConfigurationFactory.chooseGraphicsConfiguration(capsChosen, capsRequested, chooser, absScreen, nativeVisualID);
             }            
         }
         return cfg;
@@ -180,8 +180,11 @@ public class EGLGraphicsConfigurationFactory extends GLGraphicsConfigurationFact
         }
         EGLGraphicsDevice eglDevice = sharedResource.getDevice();
         long eglDisplay = eglDevice.getHandle();
+        if(0 == eglDisplay) {
+            throw new GLException("null eglDisplay");
+        }
 
-        List/*<EGLGLCapabilities>*/ availableCaps = null;
+        List<GLCapabilitiesImmutable> availableCaps = null;
         IntBuffer numConfigs = Buffers.newDirectIntBuffer(1);
 
         if(!EGL.eglGetConfigs(eglDisplay, null, 0, numConfigs)) {
@@ -223,32 +226,24 @@ public class EGLGraphicsConfigurationFactory extends GLGraphicsConfigurationFact
             throw new GLException("Null AbstractGraphicsDevice");
         }
         
-        final long eglDisplay;
+        final EGLGraphicsDevice eglDevice;
         final boolean ownEGLDisplay;
-        if( !(absDevice instanceof EGLGraphicsDevice) ) {
-            eglDisplay = EGLDisplayUtil.eglGetDisplay(absDevice.getHandle());
-            if (eglDisplay == EGL.EGL_NO_DISPLAY) {
-                throw new GLException("Could not get EGL display from: "+absDevice);
-            }
-            if (!EGLDisplayUtil.eglInitialize(eglDisplay, null, null)) {
-                throw new GLException("eglInitialize failed eglDisplay 0x"+Long.toHexString(eglDisplay)+", "+absDevice+", error 0x"+Integer.toHexString(EGL.eglGetError()));
-            }
-            ownEGLDisplay = true;
-        } else {
-            eglDisplay = absDevice.getHandle();
-            if (eglDisplay == EGL.EGL_NO_DISPLAY) {
-                throw new GLException("Invalid EGL display: "+absDevice);
+        if( absDevice instanceof EGLGraphicsDevice ) {
+            eglDevice = (EGLGraphicsDevice) absDevice;
+            if (eglDevice.getHandle() == EGL.EGL_NO_DISPLAY) {
+                throw new GLException("Invalid EGL display: "+eglDevice);
             }
             ownEGLDisplay = false;
+        } else {
+            eglDevice = EGLDisplayUtil.eglCreateEGLGraphicsDevice(absDevice.getHandle(), absDevice.getConnection(), absDevice.getUnitID());
+            ownEGLDisplay = true;
         }
 
-        EGLDrawableFactory factory = (EGLDrawableFactory) GLDrawableFactory.getEGLFactory();
-        capsChosen = GLGraphicsConfigurationUtil.fixGLCapabilities( capsChosen, factory.canCreateGLPbuffer(absDevice) );
-
-        GLProfile glp = capsChosen.getGLProfile();
-        GLCapabilities fixedCaps;
+        final GLProfile glp = capsChosen.getGLProfile();
+        final EGLDrawableFactory factory = (EGLDrawableFactory) GLDrawableFactory.getEGLFactory();
+        capsChosen = GLGraphicsConfigurationUtil.fixGLCapabilities( capsChosen, GLContext.isFBOAvailable(absDevice, glp), factory.canCreateGLPbuffer(absDevice) );
 
-        EGLGraphicsConfiguration res = eglChooseConfig(eglDisplay, capsChosen, capsReq, chooser, absScreen, nativeVisualID, forceTransparentFlag);
+        EGLGraphicsConfiguration res = eglChooseConfig(eglDevice.getHandle(), capsChosen, capsReq, chooser, absScreen, nativeVisualID, forceTransparentFlag);
         if(null==res) {
             if(DEBUG) {
                 System.err.println("eglChooseConfig failed with given capabilities "+capsChosen);
@@ -257,52 +252,67 @@ public class EGLGraphicsConfigurationFactory extends GLGraphicsConfigurationFact
             // Last try .. add a fixed embedded profile [ATI, Nokia, Intel, ..]
             //
             // rgb888 - d16, s4
-            fixedCaps = new GLCapabilities(glp);
+            final GLCapabilities fixedCaps = new GLCapabilities(glp);
+            fixedCaps.setSampleBuffers(true);
+            fixedCaps.setNumSamples(4);
             fixedCaps.setRedBits(8);
             fixedCaps.setGreenBits(8);
             fixedCaps.setBlueBits(8);
             fixedCaps.setDepthBits(16);
-            fixedCaps.setSampleBuffers(true);
-            fixedCaps.setNumSamples(4);
+            if( !capsChosen.isOnscreen() ) {
+                fixedCaps.setOnscreen(false);
+                fixedCaps.setPBuffer(capsChosen.isPBuffer());
+                fixedCaps.setFBO(capsChosen.isFBO());
+            }            
             if(DEBUG) {
                 System.err.println("trying fixed caps (1): "+fixedCaps);
             }
-            res = eglChooseConfig(eglDisplay, fixedCaps, capsReq, chooser, absScreen, nativeVisualID, false);
+            res = eglChooseConfig(eglDevice.getHandle(), fixedCaps, capsReq, chooser, absScreen, nativeVisualID, false);
         }
         if(null==res) {
             //
             // rgb565 - d16, s0
-            fixedCaps = new GLCapabilities(glp);
+            final GLCapabilities fixedCaps = new GLCapabilities(glp);
             fixedCaps.setRedBits(5);
             fixedCaps.setGreenBits(6);
             fixedCaps.setBlueBits(5);
             fixedCaps.setDepthBits(16);
+            if( !capsChosen.isOnscreen() ) {
+                fixedCaps.setOnscreen(false);
+                fixedCaps.setPBuffer(capsChosen.isPBuffer());
+                fixedCaps.setFBO(capsChosen.isFBO());
+            }            
             if(DEBUG) {
                 System.err.println("trying fixed caps (2): "+fixedCaps);
             }
-            res = eglChooseConfig(eglDisplay, fixedCaps, capsReq, chooser, absScreen, nativeVisualID, false);
+            res = eglChooseConfig(eglDevice.getHandle(), fixedCaps, capsReq, chooser, absScreen, nativeVisualID, false);
         }
         if(null==res) {
             //
             // rgb565 - d16, s4
-            fixedCaps = new GLCapabilities(glp);
+            final GLCapabilities fixedCaps = new GLCapabilities(glp);
+            fixedCaps.setSampleBuffers(true);
+            fixedCaps.setNumSamples(4);
             fixedCaps.setRedBits(5);
             fixedCaps.setGreenBits(6);
             fixedCaps.setBlueBits(5);
             fixedCaps.setDepthBits(16);
-            fixedCaps.setSampleBuffers(true);
-            fixedCaps.setNumSamples(4);
+            if( !capsChosen.isOnscreen() ) {
+                fixedCaps.setOnscreen(false);
+                fixedCaps.setPBuffer(capsChosen.isPBuffer());
+                fixedCaps.setFBO(capsChosen.isFBO());
+            }            
             if(DEBUG) {
                 System.err.println("trying fixed caps (3): "+fixedCaps);
             }
-            res = eglChooseConfig(eglDisplay, fixedCaps, capsReq, chooser, absScreen, nativeVisualID, false);
+            res = eglChooseConfig(eglDevice.getHandle(), fixedCaps, capsReq, chooser, absScreen, nativeVisualID, false);
         }
         if(null==res) {
             throw new GLException("Graphics configuration failed [direct caps, eglGetConfig/chooser and fixed-caps(1-3)]");
         }
         if(ownEGLDisplay) {
-            ((EGLGLCapabilities) res.getChosenCapabilities()).setEGLConfig(0); // eglDisplay: EOL 
-            EGLDisplayUtil.eglTerminate(eglDisplay);
+            ((EGLGLCapabilities) res.getChosenCapabilities()).setEGLConfig(0); // eglDisplay: EOL
+            eglDevice.close();
         }
         return res;
     }
@@ -315,8 +325,8 @@ public class EGLGraphicsConfigurationFactory extends GLGraphicsConfigurationFact
         final GLProfile glp = capsChosen.getGLProfile();
         final boolean onscreen = capsChosen.isOnscreen();
         final boolean usePBuffer = capsChosen.isPBuffer();
-        final int winattrmask = GLGraphicsConfigurationUtil.getWinAttributeBits(onscreen, usePBuffer);
-        List/*<EGLGLCapabilities>*/ availableCaps = null;
+        final int winattrmask = GLGraphicsConfigurationUtil.getWinAttributeBits(onscreen, usePBuffer, false);
+        List<GLCapabilitiesImmutable> availableCaps = null;
         int recommendedIndex = -1;
         long recommendedEGLConfig = -1;
         IntBuffer numConfigs = Buffers.newDirectIntBuffer(1);
@@ -328,8 +338,7 @@ public class EGLGraphicsConfigurationFactory extends GLGraphicsConfigurationFact
             throw new GLException("EGLGraphicsConfiguration.eglChooseConfig: Get maxConfigs (eglGetConfigs) no configs");
         }
         if (DEBUG) {
-            System.err.println("EGLGraphicsConfiguration.eglChooseConfig: eglChooseConfig maxConfigs: "+numConfigs.get(0));
-            System.err.println("EGLGraphicsConfiguration.eglChooseConfig: eglDisplay "+toHexString(eglDisplay)+", "+capsChosen+", nativeVisualID "+toHexString(nativeVisualID));
+            System.err.println("EGLGraphicsConfiguration.eglChooseConfig: eglChooseConfig eglDisplay "+toHexString(eglDisplay)+", nativeVisualID "+toHexString(nativeVisualID)+", onscreen "+onscreen+", usePBuffer "+usePBuffer+", "+capsChosen+", numConfigs "+numConfigs.get(0));
         }
 
         final IntBuffer attrs = Buffers.newDirectIntBuffer(EGLGraphicsConfiguration.GLCapabilities2AttribList(capsChosen));
@@ -368,7 +377,7 @@ public class EGLGraphicsConfigurationFactory extends GLGraphicsConfigurationFact
                 throw new GLException("EGLGraphicsConfiguration.eglChooseConfig: #2 Get all configs (eglGetConfigs) call failed, error "+toHexString(EGL.eglGetError()));
             }
             if (numConfigs.get(0) > 0) {
-                availableCaps = eglConfigs2GLCaps(glp, eglDisplay, configs, numConfigs.get(0), winattrmask, forceTransparentFlag);
+                availableCaps = eglConfigs2GLCaps(glp, eglDisplay, configs, numConfigs.get(0), winattrmask, forceTransparentFlag);                
             }
         }
 
@@ -376,6 +385,8 @@ public class EGLGraphicsConfigurationFactory extends GLGraphicsConfigurationFact
             if(DEBUG) {
                 // FIXME: this happens on a ATI PC Emulation ..
                 System.err.println("EGLGraphicsConfiguration.eglChooseConfig: #2 Graphics configuration 1st choice and 2nd choice failed - no configs");
+                availableCaps = eglConfigs2GLCaps(glp, eglDisplay, configs, numConfigs.get(0), GLGraphicsConfigurationUtil.ALL_BITS, forceTransparentFlag);
+                printCaps("AllCaps", availableCaps, System.err);
             }
             return null;
         }
@@ -388,7 +399,7 @@ public class EGLGraphicsConfigurationFactory extends GLGraphicsConfigurationFact
         }
 
         if( VisualIDHolder.VID_UNDEFINED != nativeVisualID ) {
-            List/*<EGLGLCapabilities>*/ removedCaps = new ArrayList();
+            List<GLCapabilitiesImmutable> removedCaps = new ArrayList<GLCapabilitiesImmutable>();
             for(int i=0; i<availableCaps.size(); ) {
                 VisualIDHolder vidh = (VisualIDHolder) availableCaps.get(i);
                 if(vidh.getVisualID(VIDType.NATIVE) != nativeVisualID) {
@@ -421,40 +432,18 @@ public class EGLGraphicsConfigurationFactory extends GLGraphicsConfigurationFact
         return new EGLGraphicsConfiguration(absScreen, chosenCaps, capsRequested, chooser);
     }
 
-    static List/*<GLCapabilitiesImmutable>*/ eglConfigs2GLCaps(GLProfile glp, long eglDisplay, PointerBuffer configs, int num, int winattrmask, boolean forceTransparentFlag) {
-        ArrayList caps = new ArrayList(num);
+    static List<GLCapabilitiesImmutable> eglConfigs2GLCaps(GLProfile glp, long eglDisplay, PointerBuffer configs, int num, int winattrmask, boolean forceTransparentFlag) {
+        List<GLCapabilitiesImmutable> caps = new ArrayList<GLCapabilitiesImmutable>(num);
         for(int i=0; i<num; i++) {
             EGLGraphicsConfiguration.EGLConfig2Capabilities(caps, glp, eglDisplay, configs.get(i), winattrmask, forceTransparentFlag);
         }
         return caps;
     }
 
-    static void printCaps(String prefix, List/*GLCapabilitiesImmutable*/ caps, PrintStream out) {
+    static void printCaps(String prefix, List<GLCapabilitiesImmutable> caps, PrintStream out) {
         for(int i=0; i<caps.size(); i++) {
             out.println(prefix+"["+i+"] "+caps.get(i));
         }
     }
-
-    static EGLGraphicsConfiguration createOffscreenGraphicsConfiguration(AbstractGraphicsDevice device, GLCapabilitiesImmutable capsChosen, GLCapabilitiesImmutable capsReq, GLCapabilitiesChooser chooser) {
-        if(capsChosen.isOnscreen()) {
-            throw new GLException("Error: Onscreen set: "+capsChosen);
-        }
-
-        if(capsChosen.getDoubleBuffered()) {
-            // OFFSCREEN !DOUBLE_BUFFER // FIXME DBLBUFOFFSCRN
-            GLCapabilities caps2 = (GLCapabilities) capsChosen.cloneMutable();
-            caps2.setDoubleBuffered(false);
-            capsChosen = caps2;
-        }
-
-        DefaultGraphicsScreen screen = new DefaultGraphicsScreen(device, 0);
-        EGLGraphicsConfiguration eglConfig = chooseGraphicsConfigurationStatic(capsChosen, capsReq, chooser, screen, VisualIDHolder.VID_UNDEFINED, false);
-        if (null == eglConfig) {
-            throw new GLException("Couldn't create EGLGraphicsConfiguration from "+screen);
-        } else if(DEBUG) {
-            System.err.println("Chosen eglConfig: "+eglConfig);
-        }
-        return eglConfig;
-    }
 }
 
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLOnscreenContext.java b/src/jogl/classes/jogamp/opengl/egl/EGLOnscreenContext.java
index dd0a3db..eae47fa 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLOnscreenContext.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLOnscreenContext.java
@@ -1,21 +1,21 @@
 /*
  * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- * 
+ *
  * - Redistribution of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
- * 
+ *
  * - Redistribution in binary form must reproduce the above copyright
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the distribution.
- * 
+ *
  * Neither the name of Sun Microsystems, Inc. or the names of
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * This software is provided "AS IS," without a warranty of any kind. ALL
  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -28,29 +28,26 @@
  * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
  * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
  * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
+ *
  * Sun gratefully acknowledges that this software was originally authored
  * and developed by Kenneth Bradley Russell and Christopher John Kline.
  */
 
 package jogamp.opengl.egl;
 
-import javax.media.nativewindow.*;
 import javax.media.opengl.*;
-import jogamp.opengl.*;
-import com.jogamp.gluegen.runtime.ProcAddressTable;
-import java.nio.*;
-import java.util.*;
 
 public class EGLOnscreenContext extends EGLContext {
     public EGLOnscreenContext(EGLOnscreenDrawable drawable, GLContext shareWith) {
         super(drawable, shareWith);
     }
 
+    @Override
     public void bindPbufferToTexture() {
         throw new GLException("Should not call this");
     }
 
+    @Override
     public void releasePbufferFromTexture() {
         throw new GLException("Should not call this");
     }
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLOnscreenDrawable.java b/src/jogl/classes/jogamp/opengl/egl/EGLOnscreenDrawable.java
index 42f067b..d540577 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLOnscreenDrawable.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLOnscreenDrawable.java
@@ -1,22 +1,22 @@
 /*
  * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
  * Copyright (c) 2010 JogAmp Community. All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- * 
+ *
  * - Redistribution of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
- * 
+ *
  * - Redistribution in binary form must reproduce the above copyright
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the distribution.
- * 
+ *
  * Neither the name of Sun Microsystems, Inc. or the names of
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * This software is provided "AS IS," without a warranty of any kind. ALL
  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -29,11 +29,11 @@
  * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
  * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
  * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
+ *
  * You acknowledge that this software is not designed or intended for use
  * in the design, construction, operation or maintenance of any nuclear
  * facility.
- * 
+ *
  * Sun gratefully acknowledges that this software was originally authored
  * and developed by Kenneth Bradley Russell and Christopher John Kline.
  */
@@ -48,12 +48,14 @@ public class EGLOnscreenDrawable extends EGLDrawable {
         super(factory, component);
     }
 
+    @Override
     public GLContext createContext(GLContext shareWith) {
         return new EGLOnscreenContext(this, shareWith);
     }
 
-    protected long createSurface(long eglDpy, long eglNativeCfg, long surfaceHandle) {
-        return EGL.eglCreateWindowSurface(eglDpy, eglNativeCfg, surfaceHandle, null);
+    @Override
+    protected long createSurface(EGLGraphicsConfiguration config, long nativeSurfaceHandle) {
+        return EGL.eglCreateWindowSurface(config.getScreen().getDevice().getHandle(), config.getNativeConfig(), nativeSurfaceHandle, null);
     }
 }
 
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLPbufferContext.java b/src/jogl/classes/jogamp/opengl/egl/EGLPbufferContext.java
index 2cad7da..7175d51 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLPbufferContext.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLPbufferContext.java
@@ -1,21 +1,21 @@
 /*
  * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- * 
+ *
  * - Redistribution of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
- * 
+ *
  * - Redistribution in binary form must reproduce the above copyright
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the distribution.
- * 
+ *
  * Neither the name of Sun Microsystems, Inc. or the names of
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * This software is provided "AS IS," without a warranty of any kind. ALL
  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -28,33 +28,31 @@
  * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
  * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
  * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
+ *
  * Sun gratefully acknowledges that this software was originally authored
  * and developed by Kenneth Bradley Russell and Christopher John Kline.
  */
 
 package jogamp.opengl.egl;
 
-import javax.media.nativewindow.*;
 import javax.media.opengl.*;
-import jogamp.opengl.*;
-import com.jogamp.gluegen.runtime.ProcAddressTable;
-import java.nio.*;
-import java.util.*;
 
 public class EGLPbufferContext extends EGLContext {
     public EGLPbufferContext(EGLPbufferDrawable drawable, GLContext shareWith) {
         super(drawable, shareWith);
     }
 
+    @Override
     public int getFloatingPointMode() {
         return 0; // FIXME ??
     }
 
+    @Override
     public void bindPbufferToTexture() {
         throw new GLException("Not yet implemented");
     }
 
+    @Override
     public void releasePbufferFromTexture() {
         throw new GLException("Not yet implemented");
     }
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLPbufferDrawable.java b/src/jogl/classes/jogamp/opengl/egl/EGLPbufferDrawable.java
index 28a23d2..4a36625 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLPbufferDrawable.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLPbufferDrawable.java
@@ -1,22 +1,22 @@
 /*
  * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
  * Copyright (c) 2010 JogAmp Community. All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- * 
+ *
  * - Redistribution of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
- * 
+ *
  * - Redistribution in binary form must reproduce the above copyright
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the distribution.
- * 
+ *
  * Neither the name of Sun Microsystems, Inc. or the names of
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * This software is provided "AS IS," without a warranty of any kind. ALL
  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -29,62 +29,38 @@
  * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
  * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
  * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
+ *
  * You acknowledge that this software is not designed or intended for use
  * in the design, construction, operation or maintenance of any nuclear
  * facility.
- * 
+ *
  * Sun gratefully acknowledges that this software was originally authored
  * and developed by Kenneth Bradley Russell and Christopher John Kline.
  */
 
 package jogamp.opengl.egl;
 
-import javax.media.nativewindow.AbstractGraphicsConfiguration;
 import javax.media.nativewindow.NativeSurface;
-import javax.media.nativewindow.SurfaceChangeable;
-import javax.media.opengl.GLCapabilitiesImmutable;
+import javax.media.nativewindow.MutableSurface;
 import javax.media.opengl.GLContext;
-import javax.media.opengl.GLException;
 
 public class EGLPbufferDrawable extends EGLDrawable {
-    private int texFormat;
     protected static final boolean useTexture = false; // No yet ..
 
     protected EGLPbufferDrawable(EGLDrawableFactory factory, NativeSurface target) {
         super(factory, target);
     }
 
-    protected void destroyImpl() {
-        setRealized(false);
-    }
-    
-    protected long createSurface(long eglDpy, long eglNativeCfg, long surfaceHandle) {
-        final AbstractGraphicsConfiguration config = getNativeSurface().getGraphicsConfiguration();
-        final GLCapabilitiesImmutable caps = (GLCapabilitiesImmutable) config.getChosenCapabilities();
-
-        if(useTexture) {
-            texFormat = caps.getAlphaBits() > 0 ? EGL.EGL_TEXTURE_RGBA : EGL.EGL_TEXTURE_RGB ;
-        } else {
-            texFormat = EGL.EGL_NO_TEXTURE;
-        }
-
-        if (DEBUG) {
-          System.out.println("Pbuffer config: " + config);
-        }
-
-        NativeSurface nw = getNativeSurface();
-        int[] attrs = EGLGraphicsConfiguration.CreatePBufferSurfaceAttribList(nw.getWidth(), nw.getHeight(), texFormat);
-        long surf = EGL.eglCreatePbufferSurface(eglDpy, eglNativeCfg, attrs, 0);
-        if (EGL.EGL_NO_SURFACE==surf) {
-            throw new GLException("Creation of window surface (eglCreatePbufferSurface) failed, dim "+nw.getWidth()+"x"+nw.getHeight()+", error 0x"+Integer.toHexString(EGL.eglGetError()));
-        } else if(DEBUG) {
-            System.err.println("PBuffer setSurface result: eglSurface 0x"+Long.toHexString(surf));
+    @Override
+    protected long createSurface(EGLGraphicsConfiguration config, long nativeSurfaceHandle) {
+        final MutableSurface ms = (MutableSurface)getNativeSurface();
+        if(config != ms.getGraphicsConfiguration()) {
+            throw new InternalError("Not same: "+config.hashCode()+", "+ms.getGraphicsConfiguration()+": "+config+", "+ms.getGraphicsConfiguration());
         }
-        ((SurfaceChangeable)nw).setSurfaceHandle(surf);
-        return surf;
+        return EGLDrawableFactory.createPBufferSurfaceImpl(ms, useTexture).getSurfaceHandle();
     }
 
+    @Override
     public GLContext createContext(GLContext shareWith) {
         return new EGLPbufferContext(this, shareWith);
     }
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLUpstreamSurfaceHook.java b/src/jogl/classes/jogamp/opengl/egl/EGLUpstreamSurfaceHook.java
new file mode 100644
index 0000000..42c6e10
--- /dev/null
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLUpstreamSurfaceHook.java
@@ -0,0 +1,56 @@
+package jogamp.opengl.egl;
+
+import javax.media.nativewindow.NativeSurface;
+import javax.media.nativewindow.ProxySurface;
+import javax.media.opengl.GLException;
+
+import com.jogamp.nativewindow.egl.EGLGraphicsDevice;
+
+public class EGLUpstreamSurfaceHook implements ProxySurface.UpstreamSurfaceHook {
+    private final NativeSurface upstreamSurface;
+    
+    public EGLUpstreamSurfaceHook(NativeSurface upstream) {
+        upstreamSurface = upstream;
+    }
+    
+    public final NativeSurface getUpstreamSurface() { return upstreamSurface; }
+    
+    @Override
+    public final void create(ProxySurface surface) {
+        if(upstreamSurface instanceof ProxySurface) {
+            ((ProxySurface)upstreamSurface).createNotify();
+            if(NativeSurface.LOCK_SURFACE_NOT_READY >= upstreamSurface.lockSurface()) {
+                throw new GLException("Could not lock: "+upstreamSurface);
+            }
+        }
+        final EGLGraphicsDevice eglDevice = (EGLGraphicsDevice) surface.getGraphicsConfiguration().getScreen().getDevice();
+        eglDevice.open();
+    }
+
+    @Override
+    public final void destroy(ProxySurface surface) {
+        final EGLGraphicsDevice eglDevice = (EGLGraphicsDevice) surface.getGraphicsConfiguration().getScreen().getDevice();
+        eglDevice.close();
+        if(upstreamSurface instanceof ProxySurface) {
+            upstreamSurface.unlockSurface();
+            ((ProxySurface)upstreamSurface).destroyNotify();
+        }
+    }
+
+    @Override
+    public final int getWidth(ProxySurface s) {
+        return upstreamSurface.getWidth();
+    }
+
+    @Override
+    public final int getHeight(ProxySurface s) {
+        return upstreamSurface.getHeight();
+    }
+    
+    @Override
+    public String toString() {
+        final String us_s = null != upstreamSurface ? ( upstreamSurface.getClass().getName() + ": " + upstreamSurface ) : "nil"; 
+        return "EGLUpstreamSurfaceHook[upstream: "+us_s+"]";
+    }
+
+}
diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java
index 3cd4b34..82525cf 100644
--- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java
+++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java
@@ -1,22 +1,22 @@
 /*
  * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
  * Copyright (c) 2010 JogAmp Community. All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- * 
+ *
  * - Redistribution of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
- * 
+ *
  * - Redistribution in binary form must reproduce the above copyright
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the distribution.
- * 
+ *
  * Neither the name of Sun Microsystems, Inc. or the names of
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * This software is provided "AS IS," without a warranty of any kind. ALL
  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -29,11 +29,11 @@
  * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
  * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
  * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
+ *
  * You acknowledge that this software is not designed or intended for use
  * in the design, construction, operation or maintenance of any nuclear
  * facility.
- * 
+ *
  * Sun gratefully acknowledges that this software was originally authored
  * and developed by Kenneth Bradley Russell and Christopher John Kline.
  */
@@ -48,11 +48,13 @@ import javax.media.nativewindow.AbstractGraphicsDevice;
 import javax.media.nativewindow.NativeSurface;
 import javax.media.nativewindow.NativeWindowFactory;
 import javax.media.nativewindow.OffscreenLayerSurface;
+import javax.media.nativewindow.ProxySurface;
 import javax.media.opengl.GLCapabilitiesImmutable;
 import javax.media.opengl.GLContext;
 import javax.media.opengl.GLException;
 import javax.media.opengl.GLProfile;
 
+import jogamp.nativewindow.macosx.OSXUtil;
 import jogamp.opengl.GLContextImpl;
 import jogamp.opengl.GLDrawableImpl;
 import jogamp.opengl.GLGraphicsConfigurationUtil;
@@ -63,9 +65,10 @@ import com.jogamp.common.os.Platform;
 import com.jogamp.common.util.VersionNumber;
 import com.jogamp.gluegen.runtime.ProcAddressTable;
 import com.jogamp.gluegen.runtime.opengl.GLProcAddressResolver;
+import com.jogamp.opengl.GLExtensions;
 
 public abstract class MacOSXCGLContext extends GLContextImpl
-{    
+{
   // Abstract interface for implementation of this context (either
   // NSOpenGL-based or CGL-based)
   protected interface GLBackendImpl {
@@ -78,7 +81,7 @@ public abstract class MacOSXCGLContext extends GLContextImpl
         boolean setSwapInterval(int interval);
         boolean swapBuffers();
   }
-      
+
   /* package */ static final boolean isTigerOrLater;
   /* package */ static final boolean isLionOrLater;
 
@@ -91,7 +94,7 @@ public abstract class MacOSXCGLContext extends GLContextImpl
   static boolean isGLProfileSupported(int ctp, int major, int minor) {
     boolean ctBwdCompat = 0 != ( CTX_PROFILE_COMPAT & ctp ) ;
     boolean ctCore      = 0 != ( CTX_PROFILE_CORE & ctp ) ;
-    
+
     // We exclude 3.0, since we would map it's core to GL2. Hence we force mapping 2.1 to GL2
     if(3==major && 1<=minor && minor<=2) {
         // [3.1..3.2] -> GL3*
@@ -119,26 +122,26 @@ public abstract class MacOSXCGLContext extends GLContextImpl
         return CGL.kCGLOGLPVersion_3_2_Core;
     } else {
         return CGL.kCGLOGLPVersion_Legacy;
-    }        
-  }  
+    }
+  }
 
   private boolean haveSetOpenGLMode = false;
   private GLBackendType openGLMode = GLBackendType.NSOPENGL;
-  
+
   // Implementation object (either NSOpenGL-based or CGL-based)
   protected GLBackendImpl impl;
-      
+
   private CGLExt _cglExt;
   // Table that holds the addresses of the native C-language entry points for
   // CGL extension functions.
   private CGLExtProcAddressTable cglExtProcAddressTable;
-  
+
   protected MacOSXCGLContext(GLDrawableImpl drawable,
                    GLContext shareWith) {
     super(drawable, shareWith);
     initOpenGLImpl(getOpenGLMode());
   }
-  
+
   @Override
   protected void resetStates() {
     // no inner state _cglExt = null;
@@ -146,12 +149,13 @@ public abstract class MacOSXCGLContext extends GLContextImpl
     super.resetStates();
   }
 
+  @Override
   public Object getPlatformGLExtensions() {
     return getCGLExt();
   }
 
-  protected boolean isNSContext() { 
-      return (null != impl) ? impl.isNSContext() : this.openGLMode == GLBackendType.NSOPENGL; 
+  protected boolean isNSContext() {
+      return (null != impl) ? impl.isNSContext() : this.openGLMode == GLBackendType.NSOPENGL;
   }
 
   public CGLExt getCGLExt() {
@@ -161,6 +165,7 @@ public abstract class MacOSXCGLContext extends GLContextImpl
     return _cglExt;
   }
 
+  @Override
   public final ProcAddressTable getPlatformExtProcAddressTable() {
     return getCGLExtProcAddressTable();
   }
@@ -169,10 +174,13 @@ public abstract class MacOSXCGLContext extends GLContextImpl
     return cglExtProcAddressTable;
   }
 
+  @Override
   protected Map<String, String> getFunctionNameMap() { return null; }
 
+  @Override
   protected Map<String, String> getExtensionNameMap() { return null; }
 
+  @Override
   protected long createContextARBImpl(long share, boolean direct, int ctp, int major, int minor) {
     if(!isGLProfileSupported(ctp, major, minor)) {
         if(DEBUG) {
@@ -200,11 +208,13 @@ public abstract class MacOSXCGLContext extends GLContextImpl
     return ctx;
   }
 
+  @Override
   protected void destroyContextARBImpl(long _context) {
       impl.release(_context);
       impl.destroy(_context);
   }
 
+  @Override
   public final boolean isGLReadDrawableAvailable() {
     return false;
   }
@@ -219,7 +229,7 @@ public abstract class MacOSXCGLContext extends GLContextImpl
         throw new GLException("GLContextShareSet returned a NULL OpenGL context");
       }
     }
-    
+
     MacOSXCGLGraphicsConfiguration config = (MacOSXCGLGraphicsConfiguration) drawable.getNativeSurface().getGraphicsConfiguration();
     GLCapabilitiesImmutable capabilitiesChosen = (GLCapabilitiesImmutable) config.getChosenCapabilities();
     if (capabilitiesChosen.getPbufferFloatingPointBuffers() && !isTigerOrLater) {
@@ -229,40 +239,47 @@ public abstract class MacOSXCGLContext extends GLContextImpl
     if(glp.isGLES1() || glp.isGLES2() || glp.isGL4() || glp.isGL3() && !isLionOrLater) {
         throw new GLException("OpenGL profile not supported on MacOSX "+Platform.getOSVersionNumber()+": "+glp);
     }
-    
+
     if (DEBUG) {
       System.err.println("Share context is " + toHexString(share) + " for " + this);
     }
-    return share;      
+    return share;
   }
-  
+
+  @Override
   protected boolean createImpl(GLContextImpl shareWith) throws GLException {
     long share = createImplPreset(shareWith);
     contextHandle = createContextARB(share, true);
     return 0 != contextHandle;
   }
-  
+
+  @Override
   protected void makeCurrentImpl() throws GLException {
+    /** FIXME: won't work w/ special drawables (like FBO) - check for CGL mode regressions!
+     *  
     if (getOpenGLMode() != ((MacOSXCGLDrawable)drawable).getOpenGLMode()) {
       setOpenGLMode(((MacOSXCGLDrawable)drawable).getOpenGLMode());
-    }
+    } */
     if (!impl.makeCurrent(contextHandle)) {
       throw new GLException("Error making Context current: "+this);
-    }      
+    }
   }
-    
+
+  @Override
   protected void releaseImpl() throws GLException {
     if (!impl.release(contextHandle)) {
       throw new GLException("Error releasing OpenGL Context: "+this);
     }
   }
 
+  @Override
   protected void destroyImpl() throws GLException {
     if(!impl.destroy(contextHandle)) {
         throw new GLException("Error destroying OpenGL Context: "+this);
     }
   }
 
+  @Override
   protected void copyImpl(GLContext source, int mask) throws GLException {
     if( isNSContext() != ((MacOSXCGLContext)source).isNSContext() ) {
         throw new GLException("Source/Destination OpenGL Context tyoe mismatch: source "+source+", dest: "+this);
@@ -275,7 +292,7 @@ public abstract class MacOSXCGLContext extends GLContextImpl
   protected void swapBuffers() {
     // single-buffer is already filtered out @ GLDrawableImpl#swapBuffers()
     if(!impl.swapBuffers()) {
-        throw new GLException("Error swapping buffers: "+this);        
+        throw new GLException("Error swapping buffers: "+this);
     }
   }
 
@@ -284,11 +301,13 @@ public abstract class MacOSXCGLContext extends GLContextImpl
     return impl.setSwapInterval(interval);
   }
 
+  @Override
   public ByteBuffer glAllocateMemoryNV(int arg0, float arg1, float arg2, float arg3) {
     // FIXME: apparently the Apple extension doesn't require a custom memory allocator
     throw new GLException("Not yet implemented");
   }
 
+  @Override
   protected final void updateGLXProcAddressTable() {
     final AbstractGraphicsConfiguration aconfig = drawable.getNativeSurface().getGraphicsConfiguration();
     final AbstractGraphicsDevice adevice = aconfig.getScreen().getDevice();
@@ -316,19 +335,22 @@ public abstract class MacOSXCGLContext extends GLContextImpl
         }
     }
   }
-    
+
+  @Override
   protected final StringBuilder getPlatformExtensionsStringImpl() {
     return new StringBuilder();
   }
-    
+
+  @Override
   public boolean isExtensionAvailable(String glExtensionName) {
-    if (glExtensionName.equals("GL_ARB_pbuffer") ||
-        glExtensionName.equals("GL_ARB_pixel_format")) {
+    if (glExtensionName.equals(GLExtensions.ARB_pbuffer) ||
+        glExtensionName.equals(GLExtensions.ARB_pixel_format)) {
       return true;
     }
     return super.isExtensionAvailable(glExtensionName);
   }
-  
+
+  @Override
   public int getOffscreenContextPixelDataType() {
     throw new GLException("Should not call this");
   }
@@ -337,18 +359,21 @@ public abstract class MacOSXCGLContext extends GLContextImpl
     throw new GLException("Should not call this");
   }
 
+  @Override
   public boolean offscreenImageNeedsVerticalFlip() {
     throw new GLException("Should not call this");
   }
 
+  @Override
   public void bindPbufferToTexture() {
     throw new GLException("Should not call this");
   }
-    
+
+  @Override
   public void releasePbufferFromTexture() {
     throw new GLException("Should not call this");
   }
-    
+
   // Support for "mode switching" as described in MacOSXCGLDrawable
   public void setOpenGLMode(GLBackendType mode) {
       if (mode == openGLMode) {
@@ -364,10 +389,10 @@ public abstract class MacOSXCGLContext extends GLContextImpl
       }
       initOpenGLImpl(mode);
       openGLMode = mode;
-      haveSetOpenGLMode = true;      
+      haveSetOpenGLMode = true;
   }
   public final GLBackendType getOpenGLMode() { return openGLMode; }
-  
+
   protected void initOpenGLImpl(GLBackendType backend) {
     switch (backend) {
       case NSOPENGL:
@@ -379,8 +404,9 @@ public abstract class MacOSXCGLContext extends GLContextImpl
       default:
         throw new InternalError("Illegal implementation mode " + backend);
     }
-  }  
-  
+  }
+
+  @Override
   public String toString() {
     StringBuilder sb = new StringBuilder();
     sb.append(getClass().getSimpleName());
@@ -391,22 +417,41 @@ public abstract class MacOSXCGLContext extends GLContextImpl
     sb.append("] ");
     return sb.toString();
   }
-  
+
   // NSOpenGLContext-based implementation
   class NSOpenGLImpl implements GLBackendImpl {
     long nsOpenGLLayer = 0;
     long nsOpenGLLayerPFmt = 0;
     float screenVSyncTimeout; // microSec
     int vsyncTimeout;    // microSec - for nsOpenGLLayer mode
-    
+
+    @Override
     public boolean isNSContext() { return true; }
 
-    public long create(long share, int ctp, int major, int minor) {        
+    @Override
+    public long create(long share, int ctp, int major, int minor) {
         long ctx = 0;
-        final MacOSXCGLDrawable drawable = (MacOSXCGLDrawable) MacOSXCGLContext.this.drawable;
-        final NativeSurface surface = drawable.getNativeSurface();
+        final long nsViewHandle;
+        if(drawable instanceof MacOSXCGLDrawable) {
+            // we allow null here! (special pbuffer case)
+            nsViewHandle = ((MacOSXCGLDrawable)MacOSXCGLContext.this.drawable).getNSViewHandle();
+        } else {
+            // we only allow a valid NSView here
+            final long aHandle = drawable.getHandle();
+            if( OSXUtil.isNSView(aHandle) ) {
+                nsViewHandle = aHandle;
+            } else {
+                throw new RuntimeException("Anonymous drawable instance's handle not of type NSView: "+drawable.getClass().getName()+", "+drawable);
+            }
+        }
+        final NativeSurface surface = drawable.getNativeSurface();        
         final MacOSXCGLGraphicsConfiguration config = (MacOSXCGLGraphicsConfiguration) surface.getGraphicsConfiguration();
-        final OffscreenLayerSurface backingLayerHost = NativeWindowFactory.getOffscreenLayerSurface(surface, true);        
+        final OffscreenLayerSurface backingLayerHost = NativeWindowFactory.getOffscreenLayerSurface(surface, true);
+        
+        boolean allowIncompleteView = null != backingLayerHost;
+        if( !allowIncompleteView && surface instanceof ProxySurface ) {
+            allowIncompleteView = 0 != ( ProxySurface.INVISIBLE_WINDOW & ((ProxySurface)surface).getImplBitfield() ) ;
+        }
         final GLCapabilitiesImmutable chosenCaps = (GLCapabilitiesImmutable) config.getChosenCapabilities();
         long pixelFormat = MacOSXCGLGraphicsConfiguration.GLCapabilities2NSPixelFormat(chosenCaps, ctp, major, minor);
         if (pixelFormat == 0) {
@@ -417,16 +462,16 @@ public abstract class MacOSXCGLContext extends GLContextImpl
         }
         config.setChosenPixelFormat(pixelFormat);
         int sRefreshRate = CGL.getScreenRefreshRate(drawable.getNativeSurface().getGraphicsConfiguration().getScreen().getIndex());
-        screenVSyncTimeout = 1000000f / (float)sRefreshRate;
+        screenVSyncTimeout = 1000000f / sRefreshRate;
         if(DEBUG) {
             System.err.println("NS create OSX>=lion "+isLionOrLater);
-            System.err.println("NS create backendType: "+drawable.getOpenGLMode());
+            System.err.println("NS create allowIncompleteView: "+allowIncompleteView);
             System.err.println("NS create backingLayerHost: "+backingLayerHost);
             System.err.println("NS create share: "+share);
             System.err.println("NS create chosenCaps: "+chosenCaps);
             System.err.println("NS create pixelFormat: "+toHexString(pixelFormat));
             System.err.println("NS create drawable native-handle: "+toHexString(drawable.getHandle()));
-            System.err.println("NS create drawable NSView-handle: "+toHexString(drawable.getNSViewHandle()));
+            System.err.println("NS create drawable NSView-handle: "+toHexString(nsViewHandle));
             System.err.println("NS create screen refresh-rate: "+sRefreshRate+" hz, "+screenVSyncTimeout+" micros");
             // Thread.dumpStack();
         }
@@ -434,7 +479,7 @@ public abstract class MacOSXCGLContext extends GLContextImpl
           int[] viewNotReady = new int[1];
           // Try to allocate a context with this
           ctx = CGL.createContext(share,
-                                  drawable.getNSViewHandle(), null!=backingLayerHost,
+                                  nsViewHandle, allowIncompleteView,
                                   pixelFormat,
                                   chosenCaps.isBackgroundOpaque(),
                                   viewNotReady, 0);
@@ -444,19 +489,15 @@ public abstract class MacOSXCGLContext extends GLContextImpl
             }
             return 0;
           }
-    
+
           if (!chosenCaps.isPBuffer() && !chosenCaps.isBackgroundOpaque()) {
               // Set the context opacity
               CGL.setContextOpacity(ctx, 0);
           }
 
-          if(DEBUG) {
-              GLCapabilitiesImmutable caps0 = MacOSXCGLGraphicsConfiguration.NSPixelFormat2GLCapabilities(null, pixelFormat);
-              System.err.println("NS create pixelformat2GLCaps: "+caps0);
-          }
           GLCapabilitiesImmutable fixedCaps = MacOSXCGLGraphicsConfiguration.NSPixelFormat2GLCapabilities(chosenCaps.getGLProfile(), pixelFormat);
           fixedCaps = GLGraphicsConfigurationUtil.fixOpaqueGLCapabilities(fixedCaps, chosenCaps.isBackgroundOpaque());
-          config.setChosenCapabilities(fixedCaps);          
+          config.setChosenCapabilities(fixedCaps);
           if(DEBUG) {
               System.err.println("NS create fixedCaps: "+fixedCaps);
           }
@@ -466,7 +507,7 @@ public abstract class MacOSXCGLContext extends GLContextImpl
           }
           //
           // handled layered surface
-          // 
+          //
           if(null != backingLayerHost) {
               nsOpenGLLayerPFmt = pixelFormat;
               pixelFormat = 0;
@@ -477,12 +518,12 @@ public abstract class MacOSXCGLContext extends GLContextImpl
                   texHeight = osxPDrawable.getTextureHeight();
               } else {
                   texWidth = drawable.getWidth();
-                  texHeight = drawable.getHeight();                  
-              }              
-              nsOpenGLLayer = CGL.createNSOpenGLLayer(ctx, nsOpenGLLayerPFmt, drawable.getHandle(), fixedCaps.isBackgroundOpaque(), texWidth, texHeight);
+                  texHeight = drawable.getHeight();
+              }
               if(0>=texWidth || 0>=texHeight || !drawable.isRealized()) {
                   throw new GLException("Drawable not realized yet or invalid texture size, texSize "+texWidth+"x"+texHeight+", "+drawable);
               }
+              nsOpenGLLayer = CGL.createNSOpenGLLayer(ctx, nsOpenGLLayerPFmt, drawable.getHandle(), fixedCaps.isBackgroundOpaque(), texWidth, texHeight);
               if (DEBUG) {
                   System.err.println("NS create nsOpenGLLayer "+toHexString(nsOpenGLLayer)+", texSize "+texWidth+"x"+texHeight+", "+drawable);
               }
@@ -494,9 +535,10 @@ public abstract class MacOSXCGLContext extends GLContextImpl
               CGL.deletePixelFormat(pixelFormat);
           }
         }
-        return ctx;        
+        return ctx;
     }
-    
+
+    @Override
     public boolean destroy(long ctx) {
       if(0 != nsOpenGLLayer) {
           final NativeSurface surface = drawable.getNativeSurface();
@@ -504,11 +546,11 @@ public abstract class MacOSXCGLContext extends GLContextImpl
               System.err.println("NS destroy nsOpenGLLayer "+toHexString(nsOpenGLLayer));
           }
           final OffscreenLayerSurface ols = NativeWindowFactory.getOffscreenLayerSurface(surface, true);
-          if(null == ols) {
-              throw new InternalError("XXX: "+ols);
+          if(null != ols && ols.isSurfaceLayerAttached()) {
+              // still having a valid OLS attached to surface (parent OLS could have been removed)
+              ols.detachSurfaceLayer();
           }
-          CGL.releaseNSOpenGLLayer(nsOpenGLLayer);
-          ols.detachSurfaceLayer(nsOpenGLLayer);
+          CGL.releaseNSOpenGLLayer(nsOpenGLLayer); 
           CGL.deletePixelFormat(nsOpenGLLayerPFmt);
           nsOpenGLLayerPFmt = 0;
           nsOpenGLLayer = 0;
@@ -516,11 +558,13 @@ public abstract class MacOSXCGLContext extends GLContextImpl
       return CGL.deleteContext(ctx, true);
     }
 
+    @Override
     public boolean copyImpl(long src, int mask) {
         CGL.copyContext(contextHandle, src, mask);
         return true;
     }
-    
+
+    @Override
     public boolean makeCurrent(long ctx) {
       final long cglCtx = CGL.getCGLContext(ctx);
       if(0 == cglCtx) {
@@ -535,13 +579,14 @@ public abstract class MacOSXCGLContext extends GLContextImpl
       return false;
     }
 
+    @Override
     public boolean release(long ctx) {
       try {
           gl.glFlush(); // w/o glFlush()/glFinish() OSX < 10.7 (NVidia driver) may freeze
       } catch (GLException gle) {
           if(DEBUG) {
             System.err.println("MacOSXCGLContext.NSOpenGLImpl.release: INFO: glFlush() catched exception:");
-            gle.printStackTrace();              
+            gle.printStackTrace();
           }
       }
       final boolean res = CGL.clearCurrentContext(ctx);
@@ -552,10 +597,11 @@ public abstract class MacOSXCGLContext extends GLContextImpl
       final int err = CGL.CGLUnlockContext(cglCtx);
       if(DEBUG && CGL.kCGLNoError != err) {
           System.err.println("CGL: Could not unlock context: err 0x"+Integer.toHexString(err)+": "+this);
-      }      
+      }
       return res && CGL.kCGLNoError == err;
     }
 
+    @Override
     public boolean setSwapInterval(int interval) {
       if(0 != nsOpenGLLayer) {
         CGL.setNSOpenGLLayerSwapInterval(nsOpenGLLayer, interval);
@@ -565,11 +611,12 @@ public abstract class MacOSXCGLContext extends GLContextImpl
       CGL.setSwapInterval(contextHandle, interval);
       return true;
     }
-    
+
+    @Override
     public boolean swapBuffers() {
       if( 0 != nsOpenGLLayer ) {
-        // If v-sync is disabled, frames will be drawn as quickly as possible 
-        // w/o delay but in sync w/ CALayer. Otherwise wait until next swap interval (v-sync).        
+        // If v-sync is disabled, frames will be drawn as quickly as possible
+        // w/o delay but in sync w/ CALayer. Otherwise wait until next swap interval (v-sync).
         CGL.waitUntilNSOpenGLLayerIsReady(nsOpenGLLayer, vsyncTimeout);
       }
       if(CGL.flushBuffer(contextHandle)) {
@@ -584,8 +631,10 @@ public abstract class MacOSXCGLContext extends GLContextImpl
   }
 
   class CGLImpl implements GLBackendImpl {
+    @Override
     public boolean isNSContext() { return false; }
-    
+
+    @Override
     public long create(long share, int ctp, int major, int minor) {
       long ctx = 0;
       MacOSXCGLGraphicsConfiguration config = (MacOSXCGLGraphicsConfiguration) drawable.getNativeSurface().getGraphicsConfiguration();
@@ -595,7 +644,7 @@ public abstract class MacOSXCGLContext extends GLContextImpl
         throw new GLException("Unable to allocate pixel format with requested GLCapabilities");
       }
       config.setChosenPixelFormat(pixelFormat);
-      try {      
+      try {
           // Create new context
           PointerBuffer ctxPB = PointerBuffer.allocateDirect(1);
           if (DEBUG) {
@@ -617,23 +666,26 @@ public abstract class MacOSXCGLContext extends GLContextImpl
               if(DEBUG) {
                   GLCapabilitiesImmutable caps0 = MacOSXCGLGraphicsConfiguration.CGLPixelFormat2GLCapabilities(pixelFormat);
                   System.err.println("NS created: "+caps0);
-              }              
+              }
           }
       } finally {
-          CGL.CGLDestroyPixelFormat(pixelFormat);          
+          CGL.CGLDestroyPixelFormat(pixelFormat);
       }
       return ctx;
     }
-    
+
+    @Override
     public boolean destroy(long ctx) {
       return CGL.CGLDestroyContext(ctx) == CGL.kCGLNoError;
     }
 
+    @Override
     public boolean copyImpl(long src, int mask) {
         CGL.CGLCopyContext(src, contextHandle, mask);
         return true;
     }
-    
+
+    @Override
     public boolean makeCurrent(long ctx) {
       int err = CGL.CGLLockContext(ctx);
       if(CGL.kCGLNoError == err) {
@@ -649,13 +701,14 @@ public abstract class MacOSXCGLContext extends GLContextImpl
       return false;
     }
 
+    @Override
     public boolean release(long ctx) {
       try {
           gl.glFlush(); // w/o glFlush()/glFinish() OSX < 10.7 (NVidia driver) may freeze
       } catch (GLException gle) {
           if(DEBUG) {
             System.err.println("MacOSXCGLContext.CGLImpl.release: INFO: glFlush() catched exception:");
-            gle.printStackTrace();              
+            gle.printStackTrace();
           }
       }
       int err = CGL.CGLSetCurrentContext(0);
@@ -668,14 +721,16 @@ public abstract class MacOSXCGLContext extends GLContextImpl
       }
       return CGL.kCGLNoError == err && CGL.kCGLNoError == err2;
     }
-    
+
+    @Override
     public boolean setSwapInterval(int interval) {
         int[] lval = new int[] { interval } ;
         CGL.CGLSetParameter(contextHandle, CGL.kCGLCPSwapInterval, lval, 0);
         return true;
-    }    
+    }
+    @Override
     public boolean swapBuffers() {
         return CGL.kCGLNoError == CGL.CGLFlushDrawable(contextHandle);
-    }    
-  }  
+    }
+  }
 }
diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawable.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawable.java
index 7b5efc3..af767f0 100644
--- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawable.java
+++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawable.java
@@ -1,22 +1,22 @@
 /*
  * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
  * Copyright (c) 2010 JogAmp Community. All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- * 
+ *
  * - Redistribution of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
- * 
+ *
  * - Redistribution in binary form must reproduce the above copyright
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the distribution.
- * 
+ *
  * Neither the name of Sun Microsystems, Inc. or the names of
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * This software is provided "AS IS," without a warranty of any kind. ALL
  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -29,11 +29,11 @@
  * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
  * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
  * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
+ *
  * You acknowledge that this software is not designed or intended for use
  * in the design, construction, operation or maintenance of any nuclear
  * facility.
- * 
+ *
  * Sun gratefully acknowledges that this software was originally authored
  * and developed by Kenneth Bradley Russell and Christopher John Kline.
  */
@@ -82,10 +82,10 @@ public abstract class MacOSXCGLDrawable extends GLDrawableImpl {
   // lifetime of a given GLPbuffer. This is not a fully general
   // solution (for example, you can't share textures among a
   // GLPbuffer, a GLJPanel and a GLCanvas simultaneously) but should
-  // be enough to get things off the ground.  
+  // be enough to get things off the ground.
   public enum GLBackendType {
-    NSOPENGL(0), CGL(1); 
-    
+    NSOPENGL(0), CGL(1);
+
     public final int id;
 
     GLBackendType(int id){
@@ -93,22 +93,23 @@ public abstract class MacOSXCGLDrawable extends GLDrawableImpl {
     }
   }
   private List<WeakReference<MacOSXCGLContext>> createdContexts = new ArrayList<WeakReference<MacOSXCGLContext>>();
-  
+
   private boolean haveSetOpenGLMode = false;
   private GLBackendType openGLMode = GLBackendType.NSOPENGL;
-  
+
   public MacOSXCGLDrawable(GLDrawableFactory factory, NativeSurface comp, boolean realized) {
     super(factory, comp, realized);
     initOpenGLImpl(getOpenGLMode());
   }
-  
+
+  @Override
   protected void setRealizedImpl() {
   }
-
+  
   protected long getNSViewHandle() {
       return GLBackendType.NSOPENGL == openGLMode ? getHandle() : 0;
   }
-  
+
   protected void registerContext(MacOSXCGLContext ctx) {
     // NOTE: we need to keep track of the created contexts in order to
     // implement swapBuffers() because of how Mac OS X implements its
@@ -117,6 +118,7 @@ public abstract class MacOSXCGLDrawable extends GLDrawableImpl {
       createdContexts.add(new WeakReference<MacOSXCGLContext>(ctx));
     }
   }
+  @Override
   protected final void swapBuffersImpl() {
     // single-buffer is already filtered out @ GLDrawableImpl#swapBuffers()
     synchronized (createdContexts) {
@@ -130,8 +132,9 @@ public abstract class MacOSXCGLDrawable extends GLDrawableImpl {
           }
         }
     }
-  }  
-    
+  }
+
+  @Override
   public GLDynamicLookupHelper getGLDynamicLookupHelper() {
     return getFactoryImpl().getGLDynamicLookupHelper(0);
   }
@@ -148,17 +151,16 @@ public abstract class MacOSXCGLDrawable extends GLDrawableImpl {
       if (haveSetOpenGLMode) {
         throw new GLException("Can't switch between using NSOpenGLPixelBuffer and CGLPBufferObj more than once");
       }
-    
-      destroyImpl();
+      setRealized(false);
       if (DEBUG) {
         System.err.println("MacOSXCGLDrawable: Switching context mode " + openGLMode + " -> " + mode);
       }
       initOpenGLImpl(mode);
       openGLMode = mode;
-      haveSetOpenGLMode = true;      
+      haveSetOpenGLMode = true;
   }
   public final GLBackendType getOpenGLMode() { return openGLMode; }
 
   protected void initOpenGLImpl(GLBackendType backend) { /* nop */ }
-  
+
 }
diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawableFactory.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawableFactory.java
index 71c0d55..9689d9f 100644
--- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawableFactory.java
+++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawableFactory.java
@@ -1,22 +1,22 @@
 /*
  * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
  * Copyright (c) 2010 JogAmp Community. All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- * 
+ *
  * - Redistribution of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
- * 
+ *
  * - Redistribution in binary form must reproduce the above copyright
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the distribution.
- * 
+ *
  * Neither the name of Sun Microsystems, Inc. or the names of
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * This software is provided "AS IS," without a warranty of any kind. ALL
  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -29,11 +29,11 @@
  * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
  * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
  * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
+ *
  * You acknowledge that this software is not designed or intended for use
  * in the design, construction, operation or maintenance of any nuclear
  * facility.
- * 
+ *
  * Sun gratefully acknowledges that this software was originally authored
  * and developed by Kenneth Bradley Russell and Christopher John Kline.
  */
@@ -50,8 +50,8 @@ import javax.media.nativewindow.AbstractGraphicsDevice;
 import javax.media.nativewindow.AbstractGraphicsScreen;
 import javax.media.nativewindow.DefaultGraphicsScreen;
 import javax.media.nativewindow.NativeSurface;
-import javax.media.nativewindow.NativeWindowFactory;
 import javax.media.nativewindow.ProxySurface;
+import javax.media.nativewindow.ProxySurface.UpstreamSurfaceHook;
 import javax.media.opengl.GL;
 import javax.media.opengl.GLCapabilities;
 import javax.media.opengl.GLCapabilitiesChooser;
@@ -62,19 +62,23 @@ import javax.media.opengl.GLException;
 import javax.media.opengl.GLProfile;
 import javax.media.opengl.GLProfile.ShutdownType;
 
+import jogamp.nativewindow.macosx.OSXUtil;
 import jogamp.opengl.DesktopGLDynamicLookupHelper;
+import jogamp.opengl.GLContextImpl;
 import jogamp.opengl.GLDrawableFactoryImpl;
 import jogamp.opengl.GLDrawableImpl;
 import jogamp.opengl.GLDynamicLookupHelper;
+import jogamp.opengl.GLGraphicsConfigurationUtil;
 
 import com.jogamp.common.JogampRuntimeException;
 import com.jogamp.common.util.ReflectionUtil;
 import com.jogamp.nativewindow.WrappedSurface;
 import com.jogamp.nativewindow.macosx.MacOSXGraphicsDevice;
+import com.jogamp.opengl.GLExtensions;
 
 public class MacOSXCGLDrawableFactory extends GLDrawableFactoryImpl {
   private static DesktopGLDynamicLookupHelper macOSXCGLDynamicLookupHelper = null;
-  
+
   public MacOSXCGLDrawableFactory() {
     super();
 
@@ -90,30 +94,31 @@ public class MacOSXCGLDrawableFactory extends GLDrawableFactoryImpl {
             }
             if(null!=tmp && tmp.isLibComplete()) {
                 macOSXCGLDynamicLookupHelper = tmp;
-                /** FIXME ?? 
+                /** FIXME ??
                 CGL.getCGLProcAddressTable().reset(macOSXCGLDynamicLookupHelper);
                 */
             }
         }
     }
-    
+
     defaultDevice = new MacOSXGraphicsDevice(AbstractGraphicsDevice.DEFAULT_UNIT);
-    
+
     if(null!=macOSXCGLDynamicLookupHelper) {
         // Register our GraphicsConfigurationFactory implementations
         // The act of constructing them causes them to be registered
         MacOSXCGLGraphicsConfigurationFactory.registerFactory();
         if(GLProfile.isAWTAvailable()) {
             try {
-              ReflectionUtil.callStaticMethod("jogamp.opengl.macosx.cgl.awt.MacOSXAWTCGLGraphicsConfigurationFactory", 
-                                              "registerFactory", null, null, getClass().getClassLoader());                
+              ReflectionUtil.callStaticMethod("jogamp.opengl.macosx.cgl.awt.MacOSXAWTCGLGraphicsConfigurationFactory",
+                                              "registerFactory", null, null, getClass().getClassLoader());
             } catch (JogampRuntimeException jre) { /* n/a .. */ }
         }
-    
+
         sharedMap = new HashMap<String, SharedResource>();
-    }     
+    }
   }
 
+  @Override
   protected final void destroy(ShutdownType shutdownType) {
     if(null != sharedMap) {
         sharedMap.clear();
@@ -122,13 +127,14 @@ public class MacOSXCGLDrawableFactory extends GLDrawableFactoryImpl {
     defaultDevice = null;
     /**
      * Pulling away the native library may cause havoc ..
-     * 
+     *
     if(ShutdownType.COMPLETE == shutdownType && null != macOSXCGLDynamicLookupHelper) {
         macOSXCGLDynamicLookupHelper.destroy();
         macOSXCGLDynamicLookupHelper = null;
     } */
   }
 
+  @Override
   public GLDynamicLookupHelper getGLDynamicLookupHelper(int profile) {
       return macOSXCGLDynamicLookupHelper;
   }
@@ -145,7 +151,7 @@ public class MacOSXCGLDrawableFactory extends GLDrawableFactoryImpl {
       boolean hasRECTTextures;
       boolean hasAppleFloatPixels;
 
-      SharedResource(MacOSXGraphicsDevice device, boolean wasContextCreated, 
+      SharedResource(MacOSXGraphicsDevice device, boolean wasContextCreated,
                      boolean hasNPOTTextures, boolean hasRECTTextures, boolean hasAppletFloatPixels
                      /* MacOSXCGLDrawable draw, MacOSXCGLContext ctx */) {
           // drawable = draw;
@@ -163,10 +169,12 @@ public class MacOSXCGLDrawableFactory extends GLDrawableFactoryImpl {
       final boolean isAppleFloatPixelsAvailable() { return hasAppleFloatPixels; }
   }
 
+  @Override
   public final AbstractGraphicsDevice getDefaultDevice() {
       return defaultDevice;
   }
 
+  @Override
   public final boolean getIsDeviceCompatible(AbstractGraphicsDevice device) {
       if(null!=macOSXCGLDynamicLookupHelper && device instanceof MacOSXGraphicsDevice) {
           return true;
@@ -191,7 +199,7 @@ public class MacOSXCGLDrawableFactory extends GLDrawableFactoryImpl {
           devicesTried.remove(connection);
       }
   }
-  
+
   /* package */ SharedResource getOrCreateOSXSharedResource(AbstractGraphicsDevice adevice) {
     final String connection = adevice.getConnection();
     SharedResource sr;
@@ -209,45 +217,40 @@ public class MacOSXCGLDrawableFactory extends GLDrawableFactoryImpl {
             GLProfile glp = GLProfile.get(sharedDevice, GLProfile.GL_PROFILE_LIST_MIN_DESKTOP, false);
             if (null == glp) {
                 throw new GLException("Couldn't get default GLProfile for device: "+sharedDevice);
-            }    
-            final GLCapabilities caps = new GLCapabilities(glp);
-            caps.setRedBits(5); caps.setGreenBits(5); caps.setBlueBits(5); caps.setAlphaBits(0);
-            caps.setDepthBits(5);
-            caps.setDoubleBuffered(false);
-            caps.setOnscreen(false);
-            caps.setPBuffer(true);
-            final MacOSXCGLDrawable drawable = (MacOSXCGLDrawable) createGLDrawable( createOffscreenSurfaceImpl(sharedDevice, caps, caps, null, 64, 64) );        
-            if(null!=drawable) {
-                drawable.setRealized(true);
-                final GLContext context = drawable.createContext(null);
-                if (null != context) {
-                    try {
-                        context.makeCurrent(); // could cause exception
-                        madeCurrent = context.isCurrent();
-                        if(madeCurrent) {
-                            GL gl = context.getGL();
-                            hasNPOTTextures = gl.isNPOTTextureAvailable();
-                            hasRECTTextures = gl.isExtensionAvailable("GL_EXT_texture_rectangle");
-                            hasAppleFloatPixels = gl.isExtensionAvailable("GL_APPLE_float_pixels");
-                        }
-                    } catch (GLException gle) {
-                        if (DEBUG) {
-                            System.err.println("MacOSXCGLDrawableFactory.createShared: INFO: makeCurrent catched exception:");
-                            gle.printStackTrace();
-                        }
-                    } finally {
-                        try {
-                            context.destroy();
-                        } catch (GLException gle) {
-                            if (DEBUG) {
-                                System.err.println("MacOSXCGLDrawableFactory.createShared: INFO: destroy catched exception:");
-                                gle.printStackTrace();
-                            }                            
-                        }
+            }
+            final GLDrawableImpl sharedDrawable = createOnscreenDrawableImpl(createDummySurfaceImpl(sharedDevice, false, new GLCapabilities(glp), null, 64, 64));
+            sharedDrawable.setRealized(true);
+            
+            final GLContextImpl sharedContext  = (GLContextImpl) sharedDrawable.createContext(null);
+            if (null == sharedContext) {
+                throw new GLException("Couldn't create shared context for drawable: "+sharedDrawable);
+            }
+            
+            try {
+                sharedContext.makeCurrent(); // could cause exception
+                madeCurrent = sharedContext.isCurrent();
+                if(madeCurrent) {
+                    GL gl = sharedContext.getGL();
+                    hasNPOTTextures = gl.isNPOTTextureAvailable();
+                    hasRECTTextures = gl.isExtensionAvailable(GLExtensions.EXT_texture_rectangle);
+                    hasAppleFloatPixels = gl.isExtensionAvailable(GLExtensions.APPLE_float_pixels);
+                }
+            } catch (GLException gle) {
+                if (DEBUG) {
+                    System.err.println("MacOSXCGLDrawableFactory.createShared: INFO: makeCurrent catched exception:");
+                    gle.printStackTrace();
+                }
+            } finally {
+                try {
+                    sharedContext.destroy();
+                } catch (GLException gle) {
+                    if (DEBUG) {
+                        System.err.println("MacOSXCGLDrawableFactory.createShared: INFO: destroy catched exception:");
+                        gle.printStackTrace();
                     }
                 }
-                drawable.destroy();
             }
+            sharedDrawable.setRealized(false);
         }
         sr = new SharedResource(sharedDevice, madeCurrent, hasNPOTTextures, hasRECTTextures, hasAppleFloatPixels);
         synchronized(sharedMap) {
@@ -258,15 +261,17 @@ public class MacOSXCGLDrawableFactory extends GLDrawableFactoryImpl {
             System.err.println("MacOSXCGLDrawableFactory.createShared: device:  " + sharedDevice);
             System.err.println("MacOSXCGLDrawableFactory.createShared: context: madeCurrent " + madeCurrent + ", NPOT "+hasNPOTTextures+
                                ", RECT "+hasRECTTextures+", FloatPixels "+hasAppleFloatPixels);
-        }                        
+        }
     }
     return sr;
   }
-   
+
+  @Override
   protected final Thread getSharedResourceThread() {
     return null;
   }
-  
+
+  @Override
   protected final boolean createSharedResource(AbstractGraphicsDevice device) {
     try {
         SharedResource sr = getOrCreateOSXSharedResource(device);
@@ -279,14 +284,16 @@ public class MacOSXCGLDrawableFactory extends GLDrawableFactoryImpl {
             gle.printStackTrace();
         }
     }
-    return false;        
+    return false;
   }
-  
+
+  @Override
   protected final GLContext getOrCreateSharedContextImpl(AbstractGraphicsDevice device) {
       // FIXME: not implemented .. needs a dummy OSX surface
       return null;
   }
 
+  @Override
   protected AbstractGraphicsDevice getOrCreateSharedDeviceImpl(AbstractGraphicsDevice device) {
       SharedResource sr = getOrCreateOSXSharedResource(device);
       if(null!=sr) {
@@ -295,10 +302,12 @@ public class MacOSXCGLDrawableFactory extends GLDrawableFactoryImpl {
       return null;
   }
 
+  @Override
   protected List<GLCapabilitiesImmutable> getAvailableCapabilitiesImpl(AbstractGraphicsDevice device) {
       return MacOSXCGLGraphicsConfiguration.getAvailableCapabilities(this, device);
   }
 
+  @Override
   protected GLDrawableImpl createOnscreenDrawableImpl(NativeSurface target) {
     if (target == null) {
       throw new IllegalArgumentException("Null target");
@@ -306,6 +315,7 @@ public class MacOSXCGLDrawableFactory extends GLDrawableFactoryImpl {
     return new MacOSXOnscreenCGLDrawable(this, target);
   }
 
+  @Override
   protected GLDrawableImpl createOffscreenDrawableImpl(NativeSurface target) {
     AbstractGraphicsConfiguration config = target.getGraphicsConfiguration();
     GLCapabilitiesImmutable caps = (GLCapabilitiesImmutable) config.getChosenCapabilities();
@@ -315,45 +325,117 @@ public class MacOSXCGLDrawableFactory extends GLDrawableFactoryImpl {
     return new MacOSXPbufferCGLDrawable(this, target);
   }
 
+  @Override
   public boolean canCreateGLPbuffer(AbstractGraphicsDevice device) {
     return true;
   }
 
-  protected NativeSurface createOffscreenSurfaceImpl(AbstractGraphicsDevice device,GLCapabilitiesImmutable capsChosen, GLCapabilitiesImmutable capsRequested, GLCapabilitiesChooser chooser, int width, int height) {
-    AbstractGraphicsScreen screen = DefaultGraphicsScreen.createDefault(NativeWindowFactory.TYPE_MACOSX);
-    WrappedSurface ns = new WrappedSurface(MacOSXCGLGraphicsConfigurationFactory.chooseGraphicsConfigurationStatic(capsChosen, capsRequested, chooser, screen, true));
-    ns.surfaceSizeChanged(width, height);
-    return ns;
+  @Override
+  protected ProxySurface createMutableSurfaceImpl(AbstractGraphicsDevice deviceReq, boolean createNewDevice, 
+                                                  GLCapabilitiesImmutable capsChosen, GLCapabilitiesImmutable capsRequested, 
+                                                  GLCapabilitiesChooser chooser, int width, int height, UpstreamSurfaceHook lifecycleHook) {
+    final MacOSXGraphicsDevice device;
+    if(createNewDevice) {
+        device = new MacOSXGraphicsDevice(deviceReq.getUnitID());
+    } else {
+        device = (MacOSXGraphicsDevice)deviceReq;
+    }
+    final AbstractGraphicsScreen screen = new DefaultGraphicsScreen(device, 0);
+    final MacOSXCGLGraphicsConfiguration config = MacOSXCGLGraphicsConfigurationFactory.chooseGraphicsConfigurationStatic(capsChosen, capsRequested, chooser, screen, true);
+    if(null == config) {
+        throw new GLException("Choosing GraphicsConfiguration failed w/ "+capsChosen+" on "+screen); 
+    }    
+    return new WrappedSurface(config, 0, width, height, lifecycleHook);
   }
 
-  protected ProxySurface createProxySurfaceImpl(AbstractGraphicsDevice device, long windowHandle, GLCapabilitiesImmutable capsRequested, GLCapabilitiesChooser chooser) {
-    AbstractGraphicsScreen screen = new DefaultGraphicsScreen(device, 0);    
-    WrappedSurface ns = new WrappedSurface(MacOSXCGLGraphicsConfigurationFactory.chooseGraphicsConfigurationStatic(capsRequested, capsRequested, chooser, screen, true), windowHandle);
-    return ns;    
+  @Override
+  public final ProxySurface createDummySurfaceImpl(AbstractGraphicsDevice deviceReq, boolean createNewDevice, 
+                                                   GLCapabilitiesImmutable requestedCaps, GLCapabilitiesChooser chooser, int width, int height) {
+    final GLCapabilitiesImmutable chosenCaps = GLGraphicsConfigurationUtil.fixOnscreenGLCapabilities(requestedCaps);
+    return createMutableSurfaceImpl(deviceReq, createNewDevice, chosenCaps, requestedCaps, chooser, width, height, dummySurfaceLifecycleHook); 
   }  
+  private static final ProxySurface.UpstreamSurfaceHook dummySurfaceLifecycleHook = new ProxySurface.UpstreamSurfaceHook() {
+    long nsWindow = 0;
+    @Override
+    public final void create(ProxySurface s) {
+        if(0 == nsWindow && 0 == s.getSurfaceHandle()) {
+            nsWindow = OSXUtil.CreateNSWindow(0, 0, s.getWidth(), s.getHeight());
+            if(0 == nsWindow) {
+                throw new GLException("Error NS window 0");
+            }
+            long nsView = OSXUtil.GetNSView(nsWindow);
+            if(0 == nsView) {
+                throw new GLException("Error NS view 0");
+            }
+            s.setSurfaceHandle(nsView);
+            s.setImplBitfield(ProxySurface.INVISIBLE_WINDOW);
+            if(DEBUG) {
+                System.err.println("MacOSXCGLDrawableFactory.dummySurfaceLifecycleHook.create: "+s);
+            }
+        }
+    }
+    @Override
+    public final void destroy(ProxySurface s) {
+        if(0 != nsWindow && 0 != s.getSurfaceHandle()) {
+            OSXUtil.DestroyNSWindow(nsWindow);
+            nsWindow = 0;
+            s.setSurfaceHandle(0);
+            if(DEBUG) {
+                System.err.println("MacOSXCGLDrawableFactory.dummySurfaceLifecycleHook.destroy: "+s);
+            }
+        }
+    }
+    @Override
+    public final int getWidth(ProxySurface s) {
+        return s.initialWidth;
+    }
+    @Override
+    public final int getHeight(ProxySurface s) {
+        return s.initialHeight;
+    }
+    
+    @Override
+    public String toString() {
+       return "MacOSXLSurfaceLifecycleHook[]";
+    }
+    
+  };
   
+  @Override
+  protected ProxySurface createProxySurfaceImpl(AbstractGraphicsDevice deviceReq, int screenIdx, long windowHandle, GLCapabilitiesImmutable capsRequested, GLCapabilitiesChooser chooser, UpstreamSurfaceHook upstream) {
+    final MacOSXGraphicsDevice device = new MacOSXGraphicsDevice(deviceReq.getUnitID());
+    final AbstractGraphicsScreen screen = new DefaultGraphicsScreen(device, screenIdx);
+    final MacOSXCGLGraphicsConfiguration config = MacOSXCGLGraphicsConfigurationFactory.chooseGraphicsConfigurationStatic(capsRequested, capsRequested, chooser, screen, true); 
+    return new WrappedSurface(config, windowHandle, 0, 0, upstream);
+  }
+
+  @Override
   protected GLContext createExternalGLContextImpl() {
     return MacOSXExternalCGLContext.create(this);
   }
 
+  @Override
   public boolean canCreateExternalGLDrawable(AbstractGraphicsDevice device) {
     return false;
   }
 
+  @Override
   protected GLDrawable createExternalGLDrawableImpl() {
     // FIXME
     throw new GLException("Not yet implemented");
   }
 
+  @Override
   public boolean canCreateContextOnJava2DSurface(AbstractGraphicsDevice device) {
     return false;
   }
 
+  @Override
   public GLContext createContextOnJava2DSurface(Object graphics, GLContext shareWith)
     throws GLException {
     throw new GLException("not supported in non AWT enviroment");
   }
-  
+
   //------------------------------------------------------
   // Gamma-related functionality
   //
@@ -362,10 +444,12 @@ public class MacOSXCGLDrawableFactory extends GLDrawableFactoryImpl {
 
   /** Returns the length of the computed gamma ramp for this OS and
       hardware. Returns 0 if gamma changes are not supported. */
+  @Override
   protected int getGammaRampLength() {
     return GAMMA_RAMP_LENGTH;
   }
 
+  @Override
   protected boolean setGammaRamp(float[] ramp) {
     return CGL.setGammaRamp(ramp.length,
                             ramp, 0,
@@ -373,10 +457,12 @@ public class MacOSXCGLDrawableFactory extends GLDrawableFactoryImpl {
                             ramp, 0);
   }
 
+  @Override
   protected Buffer getGammaRamp() {
     return null;
   }
 
+  @Override
   protected void resetGammaRamp(Buffer originalGammaRamp) {
     CGL.resetGammaRamp();
   }
diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLGraphicsConfiguration.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLGraphicsConfiguration.java
index 8393a68..202644b 100644
--- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLGraphicsConfiguration.java
+++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLGraphicsConfiguration.java
@@ -154,7 +154,7 @@ public class MacOSXCGLGraphicsConfiguration extends MutableGraphicsConfiguration
                 break;
 
               case CGL.NSOpenGLPFASamples:
-                ivalues[idx] = caps.getSampleBuffers() ? ivalues[idx] = caps.getNumSamples() : 0;
+                ivalues[idx] = caps.getNumSamples() ;
                 break;
 
               default:
@@ -233,7 +233,7 @@ public class MacOSXCGLGraphicsConfiguration extends MutableGraphicsConfiguration
       return fmt.get(0);
     }
     
-    static GLCapabilitiesImmutable CGLPixelFormat2GLCapabilities(long pixelFormat) {
+    static GLCapabilitiesImmutable CGLPixelFormat2GLCapabilities(long pixelFormat) {        
         return PixelFormat2GLCapabilities(null, pixelFormat, false);
     }
 
@@ -281,6 +281,7 @@ public class MacOSXCGLGraphicsConfiguration extends MutableGraphicsConfiguration
             glp = GLProfile.get(GLProfile.GL2);
         }
         GLCapabilities caps = new GLCapabilities(glp);
+        int alphaBits = 0;
         for (int i = 0; i < len; i++) {
           int attr = cglInternalAttributeToken[i+off];
           switch (attr) {
@@ -317,7 +318,8 @@ public class MacOSXCGLGraphicsConfiguration extends MutableGraphicsConfiguration
                 break;
 
               case CGL.NSOpenGLPFAAlphaSize:
-                caps.setAlphaBits(ivalues[i]);
+                // ALPHA shall be set at last - due to it's auto setting by !opaque / samples
+                alphaBits = ivalues[i];
                 break;
 
               case CGL.NSOpenGLPFADepthSize:
@@ -350,6 +352,7 @@ public class MacOSXCGLGraphicsConfiguration extends MutableGraphicsConfiguration
                 break;
           }
         }
+        caps.setAlphaBits(alphaBits);
 
         return caps;
       }
diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLGraphicsConfigurationFactory.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLGraphicsConfigurationFactory.java
index 1a9070a..f138e75 100644
--- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLGraphicsConfigurationFactory.java
+++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLGraphicsConfigurationFactory.java
@@ -50,14 +50,14 @@ import javax.media.opengl.GLCapabilitiesImmutable;
 
 public class MacOSXCGLGraphicsConfigurationFactory extends GLGraphicsConfigurationFactory {
     static void registerFactory() {
-        GraphicsConfigurationFactory.registerFactory(com.jogamp.nativewindow.macosx.MacOSXGraphicsDevice.class, new MacOSXCGLGraphicsConfigurationFactory());
+        GraphicsConfigurationFactory.registerFactory(com.jogamp.nativewindow.macosx.MacOSXGraphicsDevice.class, GLCapabilitiesImmutable.class, new MacOSXCGLGraphicsConfigurationFactory());
     }
     private MacOSXCGLGraphicsConfigurationFactory() {        
     }
 
     protected AbstractGraphicsConfiguration chooseGraphicsConfigurationImpl(
             CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested,
-            CapabilitiesChooser chooser, AbstractGraphicsScreen absScreen) {
+            CapabilitiesChooser chooser, AbstractGraphicsScreen absScreen, int nativeVisualID) {
         return chooseGraphicsConfigurationStatic(capsChosen, capsRequested, chooser, absScreen, false);
     }
 
diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXExternalCGLContext.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXExternalCGLContext.java
index 58cea4a..6be9e38 100644
--- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXExternalCGLContext.java
+++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXExternalCGLContext.java
@@ -1,22 +1,22 @@
 /*
  * Copyright (c) 2005 Sun Microsystems, Inc. All Rights Reserved.
  * Copyright (c) 2010 JogAmp Community. All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- * 
+ *
  * - Redistribution of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
- * 
+ *
  * - Redistribution in binary form must reproduce the above copyright
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the distribution.
- * 
+ *
  * Neither the name of Sun Microsystems, Inc. or the names of
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * This software is provided "AS IS," without a warranty of any kind. ALL
  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -29,11 +29,11 @@
  * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
  * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
  * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
+ *
  * You acknowledge that this software is not designed or intended for use
  * in the design, construction, operation or maintenance of any nuclear
  * facility.
- * 
+ *
  * Sun gratefully acknowledges that this software was originally authored
  * and developed by Kenneth Bradley Russell and Christopher John Kline.
  */
@@ -112,17 +112,18 @@ public class MacOSXExternalCGLContext extends MacOSXCGLContext {
 
     if(0 == currentDrawable) {
         // set a fake marker stating a valid drawable
-        currentDrawable = 1; 
+        currentDrawable = 1;
     }
-    WrappedSurface ns = new WrappedSurface(cfg);
-    ns.setSurfaceHandle(currentDrawable);
+    WrappedSurface ns = new WrappedSurface(cfg, currentDrawable, 64, 64, null);
     return new MacOSXExternalCGLContext(new Drawable(factory, ns), isNSContext, contextHandle);
   }
 
+  @Override
   protected boolean createImpl(GLContextImpl shareWith) throws GLException {
       return true;
   }
 
+  @Override
   public int makeCurrent() throws GLException {
     // Save last context if necessary to allow external GLContexts to
     // talk to other GLContexts created by this library
@@ -132,20 +133,24 @@ public class MacOSXExternalCGLContext extends MacOSXCGLContext {
       setCurrent(null);
     }
     return super.makeCurrent();
-  }  
+  }
 
+  @Override
   public void release() throws GLException {
     super.release();
     setCurrent(lastContext);
     lastContext = null;
   }
 
+  @Override
   protected void makeCurrentImpl() throws GLException {
   }
 
+  @Override
   protected void releaseImpl() throws GLException {
   }
 
+  @Override
   protected void destroyImpl() throws GLException {
   }
 
@@ -155,14 +160,17 @@ public class MacOSXExternalCGLContext extends MacOSXCGLContext {
       super(factory, comp, true);
     }
 
+    @Override
     public GLContext createContext(GLContext shareWith) {
       throw new GLException("Should not call this");
     }
 
+    @Override
     public int getWidth() {
       throw new GLException("Should not call this");
     }
 
+    @Override
     public int getHeight() {
       throw new GLException("Should not call this");
     }
diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXOffscreenCGLContext.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXOffscreenCGLContext.java
index 949963f..7b13ce2 100644
--- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXOffscreenCGLContext.java
+++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXOffscreenCGLContext.java
@@ -1,21 +1,21 @@
 /*
  * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- * 
+ *
  * - Redistribution of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
- * 
+ *
  * - Redistribution in binary form must reproduce the above copyright
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the distribution.
- * 
+ *
  * Neither the name of Sun Microsystems, Inc. or the names of
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * This software is provided "AS IS," without a warranty of any kind. ALL
  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -28,11 +28,11 @@
  * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
  * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
  * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
+ *
  * You acknowledge that this software is not designed or intended for use
  * in the design, construction, operation or maintenance of any nuclear
  * facility.
- * 
+ *
  * Sun gratefully acknowledges that this software was originally authored
  * and developed by Kenneth Bradley Russell and Christopher John Kline.
  */
@@ -40,24 +40,26 @@
 package jogamp.opengl.macosx.cgl;
 
 import javax.media.opengl.*;
-import jogamp.opengl.*;
 
 public class MacOSXOffscreenCGLContext extends MacOSXPbufferCGLContext
-{  
+{
   public MacOSXOffscreenCGLContext(MacOSXPbufferCGLDrawable drawable,
                                   GLContext shareWith) {
     super(drawable, shareWith);
   }
-    
+
+  @Override
   public int getOffscreenContextPixelDataType() {
     GL gl = getGL();
     return gl.isGL2GL3()?GL2GL3.GL_UNSIGNED_INT_8_8_8_8_REV:GL.GL_UNSIGNED_SHORT_5_5_5_1;
   }
 
+  @Override
   public int getOffscreenContextReadBuffer() {
     return GL.GL_FRONT;
   }
 
+  @Override
   public boolean offscreenImageNeedsVerticalFlip() {
     return true;
   }
diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXOffscreenCGLDrawable.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXOffscreenCGLDrawable.java
index f81cd72..4f90055 100644
--- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXOffscreenCGLDrawable.java
+++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXOffscreenCGLDrawable.java
@@ -1,22 +1,22 @@
 /*
  * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
  * Copyright (c) 2010 JogAmp Community. All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- * 
+ *
  * - Redistribution of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
- * 
+ *
  * - Redistribution in binary form must reproduce the above copyright
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the distribution.
- * 
+ *
  * Neither the name of Sun Microsystems, Inc. or the names of
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * This software is provided "AS IS," without a warranty of any kind. ALL
  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -29,11 +29,11 @@
  * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
  * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
  * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
+ *
  * You acknowledge that this software is not designed or intended for use
  * in the design, construction, operation or maintenance of any nuclear
  * facility.
- * 
+ *
  * Sun gratefully acknowledges that this software was originally authored
  * and developed by Kenneth Bradley Russell and Christopher John Kline.
  */
@@ -51,6 +51,7 @@ public class MacOSXOffscreenCGLDrawable extends MacOSXPbufferCGLDrawable {
     super(factory, target);
   }
 
+  @Override
   public GLContext createContext(GLContext shareWith) {
     return new MacOSXOffscreenCGLContext(this, shareWith);
   }
diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXOnscreenCGLContext.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXOnscreenCGLContext.java
index 9e05131..e344fd4 100644
--- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXOnscreenCGLContext.java
+++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXOnscreenCGLContext.java
@@ -1,21 +1,21 @@
 /*
  * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- * 
+ *
  * - Redistribution of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
- * 
+ *
  * - Redistribution in binary form must reproduce the above copyright
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the distribution.
- * 
+ *
  * Neither the name of Sun Microsystems, Inc. or the names of
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * This software is provided "AS IS," without a warranty of any kind. ALL
  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -28,11 +28,11 @@
  * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
  * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
  * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
+ *
  * You acknowledge that this software is not designed or intended for use
  * in the design, construction, operation or maintenance of any nuclear
  * facility.
- * 
+ *
  * Sun gratefully acknowledges that this software was originally authored
  * and developed by Kenneth Bradley Russell and Christopher John Kline.
  */
@@ -54,9 +54,9 @@ public class MacOSXOnscreenCGLContext extends MacOSXCGLContext {
   @Override
   protected void makeCurrentImpl() throws GLException {
       super.makeCurrentImpl();
-      drawableUpdatedNotify();  
+      drawableUpdatedNotify();
   }
-    
+
   @Override
   protected void drawableUpdatedNotify() throws GLException {
     final int w = drawable.getWidth();
@@ -72,12 +72,12 @@ public class MacOSXOnscreenCGLContext extends MacOSXCGLContext {
         CGL.updateContext(contextHandle);
     }
   }
-  
+
   @Override
   protected boolean createImpl(GLContextImpl sharedWith) {
     boolean res = super.createImpl(sharedWith);
-    lastWidth = -1; 
-    lastHeight = -1;    
+    lastWidth = -1;
+    lastHeight = -1;
     if(res && isNSContext()) {
         if(0 != updateHandle) {
             throw new InternalError("XXX1");
@@ -96,9 +96,9 @@ public class MacOSXOnscreenCGLContext extends MacOSXCGLContext {
         CGL.updateContextUnregister(updateHandle);
         updateHandle = 0;
     }
-    super.destroyImpl();    
+    super.destroyImpl();
   }
-  
+
   private long updateHandle = 0;
   private int lastWidth, lastHeight;
 }
diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXOnscreenCGLDrawable.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXOnscreenCGLDrawable.java
index 80c5404..b1e283e 100644
--- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXOnscreenCGLDrawable.java
+++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXOnscreenCGLDrawable.java
@@ -1,22 +1,22 @@
 /*
  * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
  * Copyright (c) 2010 JogAmp Community. All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- * 
+ *
  * - Redistribution of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
- * 
+ *
  * - Redistribution in binary form must reproduce the above copyright
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the distribution.
- * 
+ *
  * Neither the name of Sun Microsystems, Inc. or the names of
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * This software is provided "AS IS," without a warranty of any kind. ALL
  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -29,11 +29,11 @@
  * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
  * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
  * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
+ *
  * You acknowledge that this software is not designed or intended for use
  * in the design, construction, operation or maintenance of any nuclear
  * facility.
- * 
+ *
  * Sun gratefully acknowledges that this software was originally authored
  * and developed by Kenneth Bradley Russell and Christopher John Kline.
  */
@@ -45,11 +45,12 @@ import javax.media.opengl.GLContext;
 import javax.media.opengl.GLDrawableFactory;
 
 public class MacOSXOnscreenCGLDrawable extends MacOSXCGLDrawable {
-  
+
   protected MacOSXOnscreenCGLDrawable(GLDrawableFactory factory, NativeSurface component) {
     super(factory, component, false);
   }
 
+  @Override
   public GLContext createContext(GLContext shareWith) {
     final MacOSXOnscreenCGLContext ctx= new MacOSXOnscreenCGLContext(this, shareWith);
     registerContext(ctx);
diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXPbufferCGLContext.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXPbufferCGLContext.java
index 7ba7d2d..88886dd 100644
--- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXPbufferCGLContext.java
+++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXPbufferCGLContext.java
@@ -1,22 +1,22 @@
 /*
  * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
  * Copyright (c) 2010 JogAmp Community. All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- * 
+ *
  * - Redistribution of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
- * 
+ *
  * - Redistribution in binary form must reproduce the above copyright
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the distribution.
- * 
+ *
  * Neither the name of Sun Microsystems, Inc. or the names of
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * This software is provided "AS IS," without a warranty of any kind. ALL
  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -35,7 +35,6 @@ package jogamp.opengl.macosx.cgl;
 
 import javax.media.opengl.GL;
 import javax.media.opengl.GLContext;
-import javax.media.opengl.GLException;
 import javax.media.opengl.GLPbuffer;
 
 import jogamp.opengl.GLContextImpl;
@@ -50,6 +49,7 @@ public class MacOSXPbufferCGLContext extends MacOSXCGLContext {
     super(drawable, shareWith);
   }
 
+  @Override
   public void bindPbufferToTexture() {
     GL gl = getGL();
     gl.glBindTexture(((MacOSXPbufferCGLDrawable)drawable).getTextureTarget(), texture);
@@ -59,17 +59,19 @@ public class MacOSXPbufferCGLContext extends MacOSXCGLContext {
     CGL.setContextTextureImageToPBuffer(contextHandle, drawable.getHandle(), GL.GL_FRONT);
   }
 
+  @Override
   public void releasePbufferFromTexture() {
   }
 
+  @Override
   protected boolean createImpl(GLContextImpl shareWith) {
     boolean res = super.createImpl(shareWith);
-    if(res) {  
+    if(res) {
       // Initialize render-to-texture support if requested
       final GL gl = getGL();
       final MacOSXPbufferCGLDrawable osxPDrawable = (MacOSXPbufferCGLDrawable)drawable;
       final int textureTarget = osxPDrawable.getTextureTarget();
-  
+
       int[] tmp = new int[1];
       gl.glGenTextures(1, tmp, 0);
       texture = tmp[0];
@@ -78,13 +80,14 @@ public class MacOSXPbufferCGLContext extends MacOSXCGLContext {
       gl.glTexParameteri(textureTarget, GL.GL_TEXTURE_MAG_FILTER, GL.GL_NEAREST);
       gl.glTexParameteri(textureTarget, GL.GL_TEXTURE_WRAP_S, GL.GL_CLAMP_TO_EDGE);
       gl.glTexParameteri(textureTarget, GL.GL_TEXTURE_WRAP_T, GL.GL_CLAMP_TO_EDGE);
-      gl.glTexImage2D(textureTarget, 0, GL.GL_RGB, osxPDrawable.getTextureWidth(), osxPDrawable.getTextureHeight(), 
+      gl.glTexImage2D(textureTarget, 0, GL.GL_RGB, osxPDrawable.getTextureWidth(), osxPDrawable.getTextureHeight(),
                       0, GL.GL_RGB, GL.GL_UNSIGNED_BYTE, null);
       gl.glCopyTexSubImage2D(textureTarget, 0, 0, 0, 0, 0, drawable.getWidth(), drawable.getHeight());
     }
     return res;
   }
 
+  @Override
   public int getFloatingPointMode() {
     return GLPbuffer.APPLE_FLOAT;
   }
diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXPbufferCGLDrawable.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXPbufferCGLDrawable.java
index 1e49d1f..8f2f386 100644
--- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXPbufferCGLDrawable.java
+++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXPbufferCGLDrawable.java
@@ -1,22 +1,22 @@
 /*
  * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
  * Copyright (c) 2010 JogAmp Community. All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- * 
+ *
  * - Redistribution of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
- * 
+ *
  * - Redistribution in binary form must reproduce the above copyright
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the distribution.
- * 
+ *
  * Neither the name of Sun Microsystems, Inc. or the names of
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * This software is provided "AS IS," without a warranty of any kind. ALL
  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -29,11 +29,11 @@
  * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
  * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
  * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
+ *
  * You acknowledge that this software is not designed or intended for use
  * in the design, construction, operation or maintenance of any nuclear
  * facility.
- * 
+ *
  * Sun gratefully acknowledges that this software was originally authored
  * and developed by Kenneth Bradley Russell and Christopher John Kline.
  */
@@ -42,9 +42,10 @@ package jogamp.opengl.macosx.cgl;
 
 import javax.media.nativewindow.DefaultGraphicsConfiguration;
 import javax.media.nativewindow.NativeSurface;
-import javax.media.nativewindow.SurfaceChangeable;
+import javax.media.nativewindow.MutableSurface;
 import javax.media.opengl.GL;
 import javax.media.opengl.GL2;
+import javax.media.opengl.GL2GL3;
 import javax.media.opengl.GLCapabilitiesImmutable;
 import javax.media.opengl.GLContext;
 import javax.media.opengl.GLDrawableFactory;
@@ -54,7 +55,7 @@ import javax.media.opengl.GLProfile;
 import com.jogamp.common.nio.PointerBuffer;
 import com.jogamp.opengl.util.GLBuffers;
 
-public class MacOSXPbufferCGLDrawable extends MacOSXCGLDrawable {  
+public class MacOSXPbufferCGLDrawable extends MacOSXCGLDrawable {
   // Abstract interface for implementation of this drawable (either
   // NSOpenGL-based or CGL-based)
   interface GLBackendImpl {
@@ -64,7 +65,7 @@ public class MacOSXPbufferCGLDrawable extends MacOSXCGLDrawable {
 
   // Implementation object (either NSOpenGL-based or CGL-based)
   protected GLBackendImpl impl;
-  
+
   // State for render-to-texture and render-to-texture-rectangle support
   // private int textureTarget; // e.g. GL_TEXTURE_2D, GL_TEXTURE_RECTANGLE_NV
   // private int texture;       // actual texture object
@@ -78,10 +79,7 @@ public class MacOSXPbufferCGLDrawable extends MacOSXCGLDrawable {
     super(factory, target, false);
   }
 
-  protected void destroyImpl() {
-    setRealized(false);  
-  }
-  
+  @Override
   protected void setRealizedImpl() {
     if(realized) {
         createPbuffer();
@@ -90,33 +88,34 @@ public class MacOSXPbufferCGLDrawable extends MacOSXCGLDrawable {
     }
   }
 
+  @Override
   public GLContext createContext(GLContext shareWith) {
     final MacOSXPbufferCGLContext ctx = new MacOSXPbufferCGLContext(this, shareWith);
     registerContext(ctx);
     return ctx;
   }
-
+  
   @Override
   protected long getNSViewHandle() {
-      // pbuffer handle is NSOpenGLPixelBuffer
-      return 0;
+    // pbuffer handle is NSOpenGLPixelBuffer
+    return 0;
   }
-  
+
   @Override
   public long getHandle() {
     return pBuffer;
   }
-  
+
   protected int getTextureTarget() { return pBufferTexTarget;  }
   protected int getTextureWidth() { return pBufferTexWidth; }
   protected int getTextureHeight() { return pBufferTexHeight; }
-    
+
   protected void destroyPbuffer() {
     if (this.pBuffer != 0) {
       NativeSurface ns = getNativeSurface();
       impl.destroy(pBuffer);
       this.pBuffer = 0;
-      ((SurfaceChangeable)ns).setSurfaceHandle(0);
+      ((MutableSurface)ns).setSurfaceHandle(0);
     }
   }
 
@@ -126,7 +125,7 @@ public class MacOSXPbufferCGLDrawable extends MacOSXCGLDrawable {
     final GLCapabilitiesImmutable capabilities = (GLCapabilitiesImmutable)config.getChosenCapabilities();
     final GLProfile glProfile = capabilities.getGLProfile();
     MacOSXCGLDrawableFactory.SharedResource sr = ((MacOSXCGLDrawableFactory)factory).getOrCreateOSXSharedResource(config.getScreen().getDevice());
-    
+
     if (DEBUG) {
         System.out.println("Pbuffer config: " + config);
         if(null != sr) {
@@ -138,11 +137,11 @@ public class MacOSXPbufferCGLDrawable extends MacOSXCGLDrawable {
     }
 
     if ( capabilities.getPbufferRenderToTextureRectangle() && null!=sr && sr.isRECTTextureAvailable() ) {
-      pBufferTexTarget = GL2.GL_TEXTURE_RECTANGLE;
+      pBufferTexTarget = GL2GL3.GL_TEXTURE_RECTANGLE;
     } else {
       pBufferTexTarget = GL.GL_TEXTURE_2D;
     }
-    if ( GL2.GL_TEXTURE_RECTANGLE == pBufferTexTarget || ( null!=sr && sr.isNPOTTextureAvailable() ) ) { 
+    if ( GL2GL3.GL_TEXTURE_RECTANGLE == pBufferTexTarget || ( null!=sr && sr.isNPOTTextureAvailable() ) ) {
       pBufferTexWidth = getWidth();
       pBufferTexHeight = getHeight();
     } else {
@@ -161,7 +160,7 @@ public class MacOSXPbufferCGLDrawable extends MacOSXCGLDrawable {
         default: throw new GLException("Invalid floating-point bit depth (only 16 and 32 supported)");
       }
     }
-    
+
     pBuffer = impl.create(pBufferTexTarget, internalFormat, getWidth(), getHeight());
     if(DEBUG) {
         System.err.println("MacOSXPbufferCGLDrawable tex: target "+toHexString(pBufferTexTarget)+
@@ -175,14 +174,16 @@ public class MacOSXPbufferCGLDrawable extends MacOSXCGLDrawable {
       throw new GLException("pbuffer creation error: CGL.createPBuffer() failed");
     }
 
-    ((SurfaceChangeable)ns).setSurfaceHandle(pBuffer);
+    ((MutableSurface)ns).setSurfaceHandle(pBuffer);
   }
 
+  @Override
   public void setOpenGLMode(GLBackendType mode) {
     super.setOpenGLMode(mode);
     createPbuffer(); // recreate
   }
 
+  @Override
   protected void initOpenGLImpl(GLBackendType backend) {
     switch (backend) {
       case NSOPENGL:
@@ -194,14 +195,16 @@ public class MacOSXPbufferCGLDrawable extends MacOSXCGLDrawable {
       default:
         throw new InternalError("Illegal implementation mode " + backend);
     }
-  }  
-  
+  }
+
   // NSOpenGLPixelBuffer implementation
   class NSOpenGLImpl implements GLBackendImpl {
+    @Override
     public long create(int renderTarget, int internalFormat, int width, int height) {
       return CGL.createPBuffer(renderTarget, internalFormat, width, height);
     }
 
+    @Override
     public void destroy(long pbuffer) {
       CGL.destroyPBuffer(pbuffer);
     }
@@ -209,6 +212,7 @@ public class MacOSXPbufferCGLDrawable extends MacOSXCGLDrawable {
 
   // CGL implementation
   class CGLImpl implements GLBackendImpl {
+    @Override
     public long create(int renderTarget, int internalFormat, int width, int height) {
       PointerBuffer pbuffer = PointerBuffer.allocateDirect(1);
       int res = CGL.CGLCreatePBuffer(width, height, renderTarget, internalFormat, 0, pbuffer);
@@ -218,12 +222,13 @@ public class MacOSXPbufferCGLDrawable extends MacOSXCGLDrawable {
       return pbuffer.get(0);
     }
 
+    @Override
     public void destroy(long pbuffer) {
       int res = CGL.CGLDestroyPBuffer(pbuffer);
       if (res != CGL.kCGLNoError) {
         throw new GLException("Error destroying CGL-based pbuffer: error code " + res);
       }
     }
-  }  
-  
+  }
+
 }
diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/awt/MacOSXAWTCGLGraphicsConfigurationFactory.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/awt/MacOSXAWTCGLGraphicsConfigurationFactory.java
index a6fa01b..edf9b7c 100644
--- a/src/jogl/classes/jogamp/opengl/macosx/cgl/awt/MacOSXAWTCGLGraphicsConfigurationFactory.java
+++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/awt/MacOSXAWTCGLGraphicsConfigurationFactory.java
@@ -58,14 +58,14 @@ import jogamp.opengl.macosx.cgl.MacOSXCGLGraphicsConfiguration;
 
 public class MacOSXAWTCGLGraphicsConfigurationFactory extends GLGraphicsConfigurationFactory {
     public static void registerFactory() {
-        GraphicsConfigurationFactory.registerFactory(com.jogamp.nativewindow.awt.AWTGraphicsDevice.class, new MacOSXAWTCGLGraphicsConfigurationFactory());
+        GraphicsConfigurationFactory.registerFactory(com.jogamp.nativewindow.awt.AWTGraphicsDevice.class, GLCapabilitiesImmutable.class, new MacOSXAWTCGLGraphicsConfigurationFactory());
     }    
     private MacOSXAWTCGLGraphicsConfigurationFactory() {
     }
 
     protected AbstractGraphicsConfiguration chooseGraphicsConfigurationImpl(
             CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested,
-            CapabilitiesChooser chooser, AbstractGraphicsScreen absScreen) {
+            CapabilitiesChooser chooser, AbstractGraphicsScreen absScreen, int nativeVisualID) {
         GraphicsDevice device = null;
         if (absScreen != null &&
             !(absScreen instanceof AWTGraphicsScreen)) {
@@ -103,9 +103,9 @@ public class MacOSXAWTCGLGraphicsConfigurationFactory extends GLGraphicsConfigur
 
         GraphicsConfiguration gc = device.getDefaultConfiguration();
         MacOSXCGLGraphicsConfiguration macConfig = (MacOSXCGLGraphicsConfiguration)
-            GraphicsConfigurationFactory.getFactory(macDevice).chooseGraphicsConfiguration(capsChosen,
+            GraphicsConfigurationFactory.getFactory(macDevice, capsChosen).chooseGraphicsConfiguration(capsChosen,
                                                                                            capsRequested,
-                                                                                           chooser, macScreen);
+                                                                                           chooser, macScreen, nativeVisualID);
 
         if (macConfig == null) {
             throw new GLException("Unable to choose a GraphicsConfiguration: "+capsChosen+",\n\t"+chooser+"\n\t"+macScreen);
diff --git a/src/jogl/classes/jogamp/opengl/util/av/EGLMediaPlayerImpl.java b/src/jogl/classes/jogamp/opengl/util/av/EGLMediaPlayerImpl.java
index 31f1329..6bf8839 100644
--- a/src/jogl/classes/jogamp/opengl/util/av/EGLMediaPlayerImpl.java
+++ b/src/jogl/classes/jogamp/opengl/util/av/EGLMediaPlayerImpl.java
@@ -113,7 +113,7 @@ public abstract class EGLMediaPlayerImpl extends GLMediaPlayerImpl {
             // create EGLImage from texture
             clientBuffer = null; // FIXME
             nioTmp.put(0, EGL.EGL_NONE);
-            image =  eglExt.eglCreateImageKHR( eglDrawable.getDisplay(), eglCtx.getHandle(),
+            image =  eglExt.eglCreateImageKHR( eglDrawable.getNativeSurface().getDisplayHandle(), eglCtx.getHandle(),
                                                EGLExt.EGL_GL_TEXTURE_2D_KHR,
                                                clientBuffer, nioTmp);
             if (0==image) {
@@ -130,7 +130,7 @@ public abstract class EGLMediaPlayerImpl extends GLMediaPlayerImpl {
             // rendering the EGLImage texture before we tell OpenMAX to fill
             // it with a new frame.
             tmp[0] = EGL.EGL_NONE;
-            sync = eglExt.eglCreateSyncKHR(eglDrawable.getDisplay(), EGLExt.EGL_SYNC_FENCE_KHR, tmp, 0);
+            sync = eglExt.eglCreateSyncKHR(eglDrawable.getNativeSurface().getDisplayHandle(), EGLExt.EGL_SYNC_FENCE_KHR, tmp, 0);
             if (0==sync) {
                 throw new RuntimeException("EGLSync creation failed: "+EGL.eglGetError()+", ctx "+eglCtx+", err "+toHexString(EGL.eglGetError()));
             }
@@ -159,10 +159,10 @@ public abstract class EGLMediaPlayerImpl extends GLMediaPlayerImpl {
         final EGLTextureFrame eglTex = (EGLTextureFrame) imgTex;
         
         if(0!=eglTex.getImage()) {
-            eglExt.eglDestroyImageKHR(eglDrawable.getDisplay(), eglTex.getImage());
+            eglExt.eglDestroyImageKHR(eglDrawable.getNativeSurface().getDisplayHandle(), eglTex.getImage());
         }
         if(0!=eglTex.getSync()) {
-            eglExt.eglDestroySyncKHR(eglDrawable.getDisplay(), eglTex.getSync());
+            eglExt.eglDestroySyncKHR(eglDrawable.getNativeSurface().getDisplayHandle(), eglTex.getSync());
         }
         super.destroyTexImage(gl, imgTex);
     }
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WGLGLCapabilities.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WGLGLCapabilities.java
index 5ff63d9..6a4ce5a 100644
--- a/src/jogl/classes/jogamp/opengl/windows/wgl/WGLGLCapabilities.java
+++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WGLGLCapabilities.java
@@ -52,10 +52,11 @@ public class WGLGLCapabilities extends GLCapabilities {
   public boolean setValuesByGDI() {
       arb_pixelformat = -1;
 
+      // ALPHA shall be set at last - due to it's auto setting by !opaque / samples
       setRedBits(pfd.getCRedBits());
       setGreenBits(pfd.getCGreenBits());
       setBlueBits(pfd.getCBlueBits());
-      setAlphaBits(pfd.getCAlphaBits());
+      setAlphaBits(pfd.getCAlphaBits()); 
       setAccumRedBits(pfd.getCAccumRedBits());
       setAccumGreenBits(pfd.getCAccumGreenBits());
       setAccumBlueBits(pfd.getCAccumBlueBits());
@@ -77,6 +78,7 @@ public class WGLGLCapabilities extends GLCapabilities {
   public boolean setValuesByARB(final int[] iattribs, final int niattribs, final int[] iresults) {
       arb_pixelformat = 1;
 
+      int alphaBits = 0;
       for (int i = 0; i < niattribs; i++) {
           int attr = iattribs[i];
           switch (attr) {
@@ -119,7 +121,7 @@ public class WGLGLCapabilities extends GLCapabilities {
                   if (iresults[i] == WGLExt.WGL_TYPE_RGBA_FLOAT_ARB) {
                       setPbufferFloatingPointBuffers(true);
                   }
-                  
+
                   // normal RGBA FB: WGLExt.WGL_TYPE_RGBA_ARB
                   // ignore unknown results here
                   break;
@@ -143,7 +145,8 @@ public class WGLGLCapabilities extends GLCapabilities {
                   break;
 
               case WGLExt.WGL_ALPHA_BITS_ARB:
-                  setAlphaBits(iresults[i]);
+                  // ALPHA shall be set at last - due to it's auto setting by !opaque / samples
+                  alphaBits = iresults[i];
                   break;
 
               case WGLExt.WGL_ACCUM_RED_BITS_ARB:
@@ -174,13 +177,16 @@ public class WGLGLCapabilities extends GLCapabilities {
                   throw new GLException("Unknown pixel format attribute " + iattribs[i]);
           }
       }
+      setAlphaBits(alphaBits);
       return true;
   }
 
+  @Override
   public Object cloneMutable() {
     return clone();
   }
 
+  @Override
   public Object clone() {
     try {
       return super.clone();
@@ -191,11 +197,11 @@ public class WGLGLCapabilities extends GLCapabilities {
 
   final public PIXELFORMATDESCRIPTOR getPFD() { return pfd; }
   final public int getPFDID() { return pfdID; }
-  
+
   final public boolean isSetByARB() { return 0 < arb_pixelformat; }
   final public boolean isSetByGDI() { return 0 > arb_pixelformat; }
   final public boolean isSet()      { return 0 != arb_pixelformat; }
-  
+
   @Override
   final public int getVisualID(VIDType type) throws NativeWindowException {
       switch(type) {
@@ -205,16 +211,17 @@ public class WGLGLCapabilities extends GLCapabilities {
               return getPFDID();
           default:
               throw new NativeWindowException("Invalid type <"+type+">");
-      }      
+      }
   }
-  
+
+  @Override
   public StringBuilder toString(StringBuilder sink) {
     if(null == sink) {
         sink = new StringBuilder();
     }
     sink.append("wgl vid 0x").append(Integer.toHexString(pfdID)).append(" ");
     switch (arb_pixelformat) {
-        case -1: 
+        case -1:
             sink.append("gdi");
             break;
         case  0:
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsBitmapWGLContext.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsBitmapWGLContext.java
index 68b26b3..51341a0 100644
--- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsBitmapWGLContext.java
+++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsBitmapWGLContext.java
@@ -1,22 +1,22 @@
 /*
  * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
  * Copyright (c) 2010 JogAmp Community. All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- * 
+ *
  * - Redistribution of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
- * 
+ *
  * - Redistribution in binary form must reproduce the above copyright
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the distribution.
- * 
+ *
  * Neither the name of Sun Microsystems, Inc. or the names of
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * This software is provided "AS IS," without a warranty of any kind. ALL
  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -29,11 +29,11 @@
  * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
  * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
  * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
+ *
  * You acknowledge that this software is not designed or intended for use
  * in the design, construction, operation or maintenance of any nuclear
  * facility.
- * 
+ *
  * Sun gratefully acknowledges that this software was originally authored
  * and developed by Kenneth Bradley Russell and Christopher John Kline.
  */
@@ -48,15 +48,18 @@ public class WindowsBitmapWGLContext extends WindowsWGLContext {
     super(drawable, shareWith);
   }
 
+  @Override
   public int getOffscreenContextPixelDataType() {
       return GL.GL_UNSIGNED_BYTE;
   }
-  
+
+  @Override
   public int getOffscreenContextReadBuffer() {
     // On Windows these contexts are always single-buffered
     return GL.GL_FRONT;
   }
 
+  @Override
   public boolean offscreenImageNeedsVerticalFlip() {
     // We can take care of this in the DIB creation (see below)
     return false;
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsBitmapWGLDrawable.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsBitmapWGLDrawable.java
index 5742265..cf6f43b 100644
--- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsBitmapWGLDrawable.java
+++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsBitmapWGLDrawable.java
@@ -1,22 +1,22 @@
 /*
  * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
  * Copyright (c) 2010 JogAmp Community. All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- * 
+ *
  * - Redistribution of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
- * 
+ *
  * - Redistribution in binary form must reproduce the above copyright
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the distribution.
- * 
+ *
  * Neither the name of Sun Microsystems, Inc. or the names of
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * This software is provided "AS IS," without a warranty of any kind. ALL
  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -29,20 +29,20 @@
  * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
  * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
  * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
+ *
  * You acknowledge that this software is not designed or intended for use
  * in the design, construction, operation or maintenance of any nuclear
  * facility.
- * 
+ *
  * Sun gratefully acknowledges that this software was originally authored
  * and developed by Kenneth Bradley Russell and Christopher John Kline.
  */
 
 package jogamp.opengl.windows.wgl;
 
-import com.jogamp.common.nio.PointerBuffer;
 import javax.media.nativewindow.NativeSurface;
-import javax.media.nativewindow.SurfaceChangeable;
+import javax.media.nativewindow.MutableSurface;
+import javax.media.opengl.GLCapabilitiesImmutable;
 import javax.media.opengl.GLContext;
 import javax.media.opengl.GLDrawableFactory;
 import javax.media.opengl.GLException;
@@ -50,7 +50,8 @@ import javax.media.opengl.GLException;
 import jogamp.nativewindow.windows.BITMAPINFO;
 import jogamp.nativewindow.windows.BITMAPINFOHEADER;
 import jogamp.nativewindow.windows.GDI;
-import javax.media.opengl.GLCapabilitiesImmutable;
+
+import com.jogamp.common.nio.PointerBuffer;
 
 public class WindowsBitmapWGLDrawable extends WindowsWGLDrawable {
   private long origbitmap;
@@ -60,10 +61,7 @@ public class WindowsBitmapWGLDrawable extends WindowsWGLDrawable {
     super(factory, target, false);
   }
 
-  protected void destroyImpl() {
-      setRealized(false);
-  }
-  
+  @Override
   protected void setRealizedImpl() {
     if(realized) {
         createBitmap();
@@ -72,6 +70,7 @@ public class WindowsBitmapWGLDrawable extends WindowsWGLDrawable {
     }
   }
 
+  @Override
   public GLContext createContext(GLContext shareWith) {
     return new WindowsBitmapWGLContext(this, shareWith);
   }
@@ -140,7 +139,7 @@ public class WindowsBitmapWGLDrawable extends WindowsWGLDrawable {
         hbitmap = 0;
       throw new GLException("Error creating device context for offscreen OpenGL context, werr "+werr);
     }
-    ((SurfaceChangeable)ns).setSurfaceHandle(hdc);
+    ((MutableSurface)ns).setSurfaceHandle(hdc);
     if(DEBUG) {
         System.err.println("WindowsBitmapWGLDrawable (2): "+ns);
     }
@@ -152,10 +151,10 @@ public class WindowsBitmapWGLDrawable extends WindowsWGLDrawable {
       hdc = 0;
       throw new GLException("Error selecting bitmap into new device context");
     }
-    
+
     config.updateGraphicsConfiguration(getFactory(), ns, null);
   }
-  
+
   protected void destroyBitmap() {
     NativeSurface ns = getNativeSurface();
     if (ns.getSurfaceHandle() != 0) {
@@ -165,7 +164,7 @@ public class WindowsBitmapWGLDrawable extends WindowsWGLDrawable {
       GDI.DeleteDC(ns.getSurfaceHandle());
       origbitmap = 0;
       hbitmap = 0;
-      ((SurfaceChangeable)ns).setSurfaceHandle(0);
+      ((MutableSurface)ns).setSurfaceHandle(0);
     }
   }
 }
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsDummyWGLDrawable.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsDummyWGLDrawable.java
deleted file mode 100644
index 3ba5508..0000000
--- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsDummyWGLDrawable.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
- * Copyright (c) 2010 JogAmp Community. All rights reserved.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- * 
- * - Redistribution of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * 
- * - Redistribution in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * 
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * 
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- * 
- * Sun gratefully acknowledges that this software was originally authored
- * and developed by Kenneth Bradley Russell and Christopher John Kline.
- */
-
-package jogamp.opengl.windows.wgl;
-
-import javax.media.opengl.GLContext;
-import javax.media.opengl.GLDrawableFactory;
-import javax.media.opengl.GLProfile;
-
-import javax.media.nativewindow.AbstractGraphicsScreen;
-import jogamp.nativewindow.windows.GDI;
-import jogamp.nativewindow.windows.GDIUtil;
-
-import javax.media.nativewindow.NativeSurface;
-import javax.media.opengl.GLCapabilities;
-import javax.media.opengl.GLException;
-import jogamp.nativewindow.windows.GDISurface;
-
-public class WindowsDummyWGLDrawable extends WindowsWGLDrawable {
-  private long hwnd;
-  private boolean handleHwndLifecycle;
-
-  private WindowsDummyWGLDrawable(GLDrawableFactory factory, GDISurface ns, boolean handleHwndLifecycle) {
-    super(factory, ns, true);
-    this.handleHwndLifecycle = handleHwndLifecycle;
-    
-    if(NativeSurface.LOCK_SURFACE_NOT_READY >= ns.lockSurface()) {
-        throw new GLException("WindowsDummyWGLDrawable: surface not ready (lockSurface)");
-    }
-    try {
-        WindowsWGLGraphicsConfiguration config = (WindowsWGLGraphicsConfiguration)ns.getGraphicsConfiguration();
-        config.updateGraphicsConfiguration(factory, ns, null);
-        if (DEBUG) {
-          System.err.println("WindowsDummyWGLDrawable: "+config);
-        }
-    } catch (Throwable t) {
-        destroyImpl();
-        throw new GLException(t);
-    } finally {
-        unlockSurface();
-    }
-  }
-
-  public static WindowsDummyWGLDrawable create(GLDrawableFactory factory, GLProfile glp, AbstractGraphicsScreen absScreen,
-                                               long windowHandle, int width, int height, boolean handleWindowLifecycle) {
-    if(0 == windowHandle) {
-        throw new GLException("Error windowHandle 0, werr: "+GDI.GetLastError());
-    }
-    GLCapabilities caps = new GLCapabilities(glp);
-    WindowsWGLGraphicsConfiguration cfg = WindowsWGLGraphicsConfigurationFactory.createDefaultGraphicsConfiguration(caps, absScreen);
-    GDISurface ns = new GDISurface(cfg, windowHandle);
-    ns.surfaceSizeChanged(width, height);
-    return new WindowsDummyWGLDrawable(factory, ns, handleWindowLifecycle);
-  }
-
-  public GLContext createContext(GLContext shareWith) {
-    // FIXME: figure out how to hook back in the Java 2D / JOGL bridge
-    return new WindowsWGLContext(this, shareWith);
-  }
-
-  protected void destroyImpl() {
-    if (handleHwndLifecycle && hwnd != 0) {
-      GDI.ShowWindow(hwnd, GDI.SW_HIDE);
-      GDIUtil.DestroyDummyWindow(hwnd);
-      hwnd = 0;
-    }
-  }
-}
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsExternalWGLContext.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsExternalWGLContext.java
index 7457820..96c1187 100644
--- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsExternalWGLContext.java
+++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsExternalWGLContext.java
@@ -1,22 +1,22 @@
 /*
  * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
  * Copyright (c) 2010 JogAmp Community. All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- * 
+ *
  * - Redistribution of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
- * 
+ *
  * - Redistribution in binary form must reproduce the above copyright
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the distribution.
- * 
+ *
  * Neither the name of Sun Microsystems, Inc. or the names of
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * This software is provided "AS IS," without a warranty of any kind. ALL
  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -29,11 +29,11 @@
  * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
  * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
  * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
+ *
  * You acknowledge that this software is not designed or intended for use
  * in the design, construction, operation or maintenance of any nuclear
  * facility.
- * 
+ *
  * Sun gratefully acknowledges that this software was originally authored
  * and developed by Kenneth Bradley Russell and Christopher John Kline.
  */
@@ -55,7 +55,6 @@ import com.jogamp.nativewindow.WrappedSurface;
 import jogamp.nativewindow.windows.GDI;
 import jogamp.opengl.GLContextShareSet;
 
-
 public class WindowsExternalWGLContext extends WindowsWGLContext {
   private GLContext lastContext;
 
@@ -103,9 +102,10 @@ public class WindowsExternalWGLContext extends WindowsWGLContext {
             System.err.println("WindowsExternalWGLContext valid hdc/pfd, retrieved cfg: " + cfg);
         }
     }
-    return new WindowsExternalWGLContext(new Drawable(factory, new WrappedSurface(cfg, hdc)), ctx, cfg);
+    return new WindowsExternalWGLContext(new Drawable(factory, new WrappedSurface(cfg, hdc, 64, 64, null)), ctx, cfg);
   }
 
+  @Override
   public int makeCurrent() throws GLException {
     // Save last context if necessary to allow external GLContexts to
     // talk to other GLContexts created by this library
@@ -115,20 +115,24 @@ public class WindowsExternalWGLContext extends WindowsWGLContext {
       setCurrent(null);
     }
     return super.makeCurrent();
-  }  
+  }
 
+  @Override
   public void release() throws GLException {
     super.release();
     setCurrent(lastContext);
     lastContext = null;
   }
 
+  @Override
   protected void makeCurrentImpl() throws GLException {
   }
 
+  @Override
   protected void releaseImpl() throws GLException {
   }
 
+  @Override
   protected void destroyImpl() throws GLException {
   }
 
@@ -138,14 +142,17 @@ public class WindowsExternalWGLContext extends WindowsWGLContext {
       super(factory, comp, true);
     }
 
+    @Override
     public GLContext createContext(GLContext shareWith) {
       throw new GLException("Should not call this");
     }
 
+    @Override
     public int getWidth() {
       throw new GLException("Should not call this");
     }
 
+    @Override
     public int getHeight() {
       throw new GLException("Should not call this");
     }
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsExternalWGLDrawable.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsExternalWGLDrawable.java
index ad2e91b..15bd005 100644
--- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsExternalWGLDrawable.java
+++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsExternalWGLDrawable.java
@@ -1,22 +1,22 @@
 /*
  * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
  * Copyright (c) 2010 JogAmp Community. All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- * 
+ *
  * - Redistribution of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
- * 
+ *
  * - Redistribution in binary form must reproduce the above copyright
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the distribution.
- * 
+ *
  * Neither the name of Sun Microsystems, Inc. or the names of
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * This software is provided "AS IS," without a warranty of any kind. ALL
  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -29,11 +29,11 @@
  * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
  * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
  * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
+ *
  * You acknowledge that this software is not designed or intended for use
  * in the design, construction, operation or maintenance of any nuclear
  * facility.
- * 
+ *
  * Sun gratefully acknowledges that this software was originally authored
  * and developed by Kenneth Bradley Russell and Christopher John Kline.
  */
@@ -49,9 +49,10 @@ import javax.media.opengl.GLDrawableFactory;
 import javax.media.opengl.GLException;
 import javax.media.opengl.GLProfile;
 
-import com.jogamp.nativewindow.WrappedSurface;
-
 import jogamp.nativewindow.windows.GDI;
+import jogamp.nativewindow.windows.GDIUtil;
+
+import com.jogamp.nativewindow.WrappedSurface;
 
 public class WindowsExternalWGLDrawable extends WindowsWGLDrawable {
 
@@ -69,25 +70,28 @@ public class WindowsExternalWGLDrawable extends WindowsWGLDrawable {
       throw new GLException("Error: attempted to make an external GLContext without a valid pixelformat, werr " + GDI.GetLastError());
     }
 
-    AbstractGraphicsScreen aScreen = DefaultGraphicsScreen.createDefault(NativeWindowFactory.TYPE_WINDOWS);
-    WindowsWGLGraphicsConfiguration cfg = WindowsWGLGraphicsConfiguration.createFromExternal(factory, hdc, pfdID, glp, aScreen, true);
-    return new WindowsExternalWGLDrawable(factory, new WrappedSurface(cfg, hdc));
+    final AbstractGraphicsScreen aScreen = DefaultGraphicsScreen.createDefault(NativeWindowFactory.TYPE_WINDOWS);
+    final WindowsWGLGraphicsConfiguration cfg = WindowsWGLGraphicsConfiguration.createFromExternal(factory, hdc, pfdID, glp, aScreen, true);
+    return new WindowsExternalWGLDrawable(factory, new WrappedSurface(cfg, hdc, 64, 64, null));
   }
 
 
+  @Override
   public GLContext createContext(GLContext shareWith) {
     return new WindowsWGLContext(this, shareWith);
   }
-  
+
   public void setSize(int newWidth, int newHeight) {
     throw new GLException("Should not call this");
   }
 
+  @Override
   public int getWidth() {
     throw new GLException("Should not call this");
-  }  
+  }
 
+  @Override
   public int getHeight() {
     throw new GLException("Should not call this");
-  }  
+  }
 }
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsOnscreenWGLContext.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsOnscreenWGLContext.java
index a06ab8f..aef55ef 100644
--- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsOnscreenWGLContext.java
+++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsOnscreenWGLContext.java
@@ -1,21 +1,21 @@
 /*
  * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- * 
+ *
  * - Redistribution of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
- * 
+ *
  * - Redistribution in binary form must reproduce the above copyright
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the distribution.
- * 
+ *
  * Neither the name of Sun Microsystems, Inc. or the names of
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * This software is provided "AS IS," without a warranty of any kind. ALL
  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -28,26 +28,22 @@
  * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
  * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
  * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
+ *
  * You acknowledge that this software is not designed or intended for use
  * in the design, construction, operation or maintenance of any nuclear
  * facility.
- * 
+ *
  * Sun gratefully acknowledges that this software was originally authored
  * and developed by Kenneth Bradley Russell and Christopher John Kline.
  */
 
 package jogamp.opengl.windows.wgl;
 
-import java.util.*;
-
-import javax.media.nativewindow.*;
 import javax.media.opengl.*;
-import jogamp.opengl.*;
 
 public class WindowsOnscreenWGLContext extends WindowsWGLContext {
   public WindowsOnscreenWGLContext(WindowsOnscreenWGLDrawable drawable,
                                   GLContext shareWith) {
     super(drawable, shareWith);
-  }    
+  }
 }
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsOnscreenWGLDrawable.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsOnscreenWGLDrawable.java
index 6ad330c..ddbb29d 100644
--- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsOnscreenWGLDrawable.java
+++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsOnscreenWGLDrawable.java
@@ -1,22 +1,22 @@
 /*
  * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
  * Copyright (c) 2010 JogAmp Community. All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- * 
+ *
  * - Redistribution of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
- * 
+ *
  * - Redistribution in binary form must reproduce the above copyright
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the distribution.
- * 
+ *
  * Neither the name of Sun Microsystems, Inc. or the names of
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * This software is provided "AS IS," without a warranty of any kind. ALL
  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -29,25 +29,27 @@
  * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
  * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
  * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
+ *
  * You acknowledge that this software is not designed or intended for use
  * in the design, construction, operation or maintenance of any nuclear
  * facility.
- * 
+ *
  * Sun gratefully acknowledges that this software was originally authored
  * and developed by Kenneth Bradley Russell and Christopher John Kline.
  */
 
 package jogamp.opengl.windows.wgl;
 
-import javax.media.nativewindow.*;
-import javax.media.opengl.*;
+import javax.media.nativewindow.NativeSurface;
+import javax.media.opengl.GLContext;
+import javax.media.opengl.GLDrawableFactory;
 
 public class WindowsOnscreenWGLDrawable extends WindowsWGLDrawable {
   protected WindowsOnscreenWGLDrawable(GLDrawableFactory factory, NativeSurface component) {
     super(factory, component, false);
   }
 
+  @Override
   public GLContext createContext(GLContext shareWith) {
     return new WindowsOnscreenWGLContext(this, shareWith);
   }
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsPbufferWGLContext.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsPbufferWGLContext.java
index 0f61049..7dda6a1 100644
--- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsPbufferWGLContext.java
+++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsPbufferWGLContext.java
@@ -1,22 +1,22 @@
 /*
  * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
  * Copyright (c) 2010 JogAmp Community. All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- * 
+ *
  * - Redistribution of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
- * 
+ *
  * - Redistribution in binary form must reproduce the above copyright
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the distribution.
- * 
+ *
  * Neither the name of Sun Microsystems, Inc. or the names of
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * This software is provided "AS IS," without a warranty of any kind. ALL
  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -29,11 +29,11 @@
  * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
  * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
  * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
+ *
  * You acknowledge that this software is not designed or intended for use
  * in the design, construction, operation or maintenance of any nuclear
  * facility.
- * 
+ *
  * Sun gratefully acknowledges that this software was originally authored
  * and developed by Kenneth Bradley Russell and Christopher John Kline.
  */
@@ -42,6 +42,8 @@ package jogamp.opengl.windows.wgl;
 
 import javax.media.opengl.*;
 
+import com.jogamp.opengl.GLExtensions;
+
 import jogamp.opengl.GLContextImpl;
 
 public class WindowsPbufferWGLContext extends WindowsWGLContext {
@@ -57,6 +59,7 @@ public class WindowsPbufferWGLContext extends WindowsWGLContext {
     super(drawable, shareWith);
   }
 
+  @Override
   public void bindPbufferToTexture() {
     if (!rtt) {
       throw new GLException("Shouldn't try to bind a pbuffer to a texture if render-to-texture hasn't been " +
@@ -75,6 +78,7 @@ public class WindowsPbufferWGLContext extends WindowsWGLContext {
     // we perform a glCopyTexImage2D in swapBuffers().
   }
 
+  @Override
   public void releasePbufferFromTexture() {
     if (!rtt) {
       throw new GLException("Shouldn't try to bind a pbuffer to a texture if render-to-texture hasn't been " +
@@ -88,6 +92,7 @@ public class WindowsPbufferWGLContext extends WindowsWGLContext {
     }
   }
 
+  @Override
   protected boolean createImpl(GLContextImpl shareWith) {
     boolean res = super.createImpl(shareWith);
     if(res) {
@@ -109,7 +114,7 @@ public class WindowsPbufferWGLContext extends WindowsWGLContext {
         } else {
           hasRTT = true;
 
-          if (rect && !gl.isExtensionAvailable("GL_NV_texture_rectangle")) {
+          if (rect && !gl.isExtensionAvailable(GLExtensions.NV_texture_rectangle)) {
             System.err.println("WindowsPbufferWGLContext: WARNING: GL_NV_texture_rectangle extension not " +
                                "supported; skipping requested render_to_texture_rectangle support for pbuffer");
             rect = false;
@@ -118,7 +123,7 @@ public class WindowsPbufferWGLContext extends WindowsWGLContext {
             if (DEBUG) {
               System.err.println("  Using render-to-texture-rectangle");
             }
-            textureTarget = GL2.GL_TEXTURE_RECTANGLE_ARB;
+            textureTarget = GL2GL3.GL_TEXTURE_RECTANGLE_ARB;
           } else {
             if (DEBUG) {
               System.err.println("  Using vanilla render-to-texture");
@@ -140,6 +145,7 @@ public class WindowsPbufferWGLContext extends WindowsWGLContext {
     return res;
   }
 
+  @Override
   public int getFloatingPointMode() {
     return ((WindowsPbufferWGLDrawable)drawable).getFloatingPointMode();
   }
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsPbufferWGLDrawable.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsPbufferWGLDrawable.java
index 0988f3e..1756223 100644
--- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsPbufferWGLDrawable.java
+++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsPbufferWGLDrawable.java
@@ -1,22 +1,22 @@
 /*
  * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
  * Copyright (c) 2010 JogAmp Community. All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- * 
+ *
  * - Redistribution of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
- * 
+ *
  * - Redistribution in binary form must reproduce the above copyright
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the distribution.
- * 
+ *
  * Neither the name of Sun Microsystems, Inc. or the names of
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * This software is provided "AS IS," without a warranty of any kind. ALL
  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -29,11 +29,11 @@
  * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
  * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
  * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
+ *
  * You acknowledge that this software is not designed or intended for use
  * in the design, construction, operation or maintenance of any nuclear
  * facility.
- * 
+ *
  * Sun gratefully acknowledges that this software was originally authored
  * and developed by Kenneth Bradley Russell and Christopher John Kline.
  */
@@ -42,19 +42,18 @@ package jogamp.opengl.windows.wgl;
 
 import javax.media.nativewindow.NativeSurface;
 import javax.media.nativewindow.NativeWindowException;
-import javax.media.nativewindow.SurfaceChangeable;
+import javax.media.nativewindow.MutableSurface;
 import javax.media.opengl.GL;
+import javax.media.opengl.GLCapabilitiesImmutable;
 import javax.media.opengl.GLContext;
 import javax.media.opengl.GLDrawableFactory;
 import javax.media.opengl.GLException;
-// import javax.media.opengl.GLPbuffer;
 import javax.media.opengl.GLProfile;
 
 import jogamp.nativewindow.windows.GDI;
 import jogamp.opengl.GLDrawableImpl;
 import jogamp.opengl.windows.wgl.WindowsWGLDrawableFactory.SharedResource;
-
-import javax.media.opengl.GLCapabilitiesImmutable;
+// import javax.media.opengl.GLPbuffer;
 
 public class WindowsPbufferWGLDrawable extends WindowsWGLDrawable {
   private WGLExt cachedWGLExt; // cached WGLExt instance from parent GLCanvas,
@@ -62,15 +61,12 @@ public class WindowsPbufferWGLDrawable extends WindowsWGLDrawable {
   private long buffer; // pbuffer handle
 
   private int floatMode;
-  
+
   protected WindowsPbufferWGLDrawable(GLDrawableFactory factory, NativeSurface target) {
     super(factory, target, false);
   }
 
-  protected void destroyImpl() {
-      setRealized(false);
-  }
-  
+  @Override
   protected void setRealizedImpl() {
     if(realized) {
         createPbuffer();
@@ -79,6 +75,7 @@ public class WindowsPbufferWGLDrawable extends WindowsWGLDrawable {
     }
   }
 
+  @Override
   public GLContext createContext(GLContext shareWith) {
     return new WindowsPbufferWGLContext(this, shareWith);
   }
@@ -95,7 +92,7 @@ public class WindowsPbufferWGLDrawable extends WindowsWGLDrawable {
           if (wglExt.wglReleasePbufferDCARB(buffer, ns.getSurfaceHandle()) == 0) {
             throw new GLException("Error releasing pbuffer device context: error code " + GDI.GetLastError());
           }
-          ((SurfaceChangeable)ns).setSurfaceHandle(0);
+          ((MutableSurface)ns).setSurfaceHandle(0);
         }
         if (!wglExt.wglDestroyPbufferARB(buffer)) {
             throw new GLException("Error destroying pbuffer: error code " + GDI.GetLastError());
@@ -124,42 +121,41 @@ public class WindowsPbufferWGLDrawable extends WindowsWGLDrawable {
     }
     try {
         long sharedHdc = sharedSurface.getSurfaceHandle();
-        WGLExt wglExt = sharedResource.getContext().getWGLExt();
-        
+        WGLExt wglExt = ((WindowsWGLContext)sharedResource.getContext()).getWGLExt();
+
         if (DEBUG) {
             System.out.println("Pbuffer config: " + config);
         }
-    
+
         int[]   iattributes = new int  [2*WindowsWGLGraphicsConfiguration.MAX_ATTRIBS];
         float[] fattributes = new float[1];
         int[]   floatModeTmp = new int[1];
         int     niattribs   = 0;
-        int     width, height;
-    
+
         GLCapabilitiesImmutable chosenCaps = (GLCapabilitiesImmutable)config.getChosenCapabilities();
         GLProfile glProfile = chosenCaps.getGLProfile();
-    
+
         if (DEBUG) {
           System.out.println("Pbuffer parentHdc = " + toHexString(sharedHdc));
           System.out.println("Pbuffer chosenCaps: " + chosenCaps);
         }
-    
+
         if(!WindowsWGLGraphicsConfiguration.GLCapabilities2AttribList(chosenCaps,
                                         iattributes, sharedResource, -1, floatModeTmp)){
           throw new GLException("Pbuffer-related extensions not supported");
         }
-    
+
         floatMode = floatModeTmp[0];
         boolean rtt      = chosenCaps.getPbufferRenderToTexture();
         boolean rect     = chosenCaps.getPbufferRenderToTextureRectangle();
         boolean useFloat = chosenCaps.getPbufferFloatingPointBuffers();
         // boolean ati      = false;
-    
+
         /**
         if (useFloat) {
           ati = (floatMode == GLPbuffer.ATI_FLOAT);
         } */
-    
+
         int[] pformats = new int[WindowsWGLGraphicsConfiguration.MAX_PFORMATS];
         int   nformats;
         int[] nformatsTmp = new int[1];
@@ -175,7 +171,7 @@ public class WindowsPbufferWGLDrawable extends WindowsWGLDrawable {
         if (nformats <= 0) {
           throw new GLException("pbuffer creation error: Couldn't find a suitable pixel format");
         }
-    
+
         if (DEBUG) {
           System.err.println("" + nformats + " suitable pixel formats found");
           for (int i = 0; i < nformats; i++) {
@@ -183,7 +179,7 @@ public class WindowsPbufferWGLDrawable extends WindowsWGLDrawable {
             System.err.println("pixel format " + pformats[i] + " (index " + i + "): " + dbgCaps);
           }
         }
-    
+
         int pfdid = 0;
         long tmpBuffer = 0;
         {
@@ -191,10 +187,10 @@ public class WindowsPbufferWGLDrawable extends WindowsWGLDrawable {
             // Loop is a workaround for bugs in NVidia's recent drivers
             for (whichFormat = 0; whichFormat < nformats; whichFormat++) {
               int format = pformats[whichFormat];
-    
+
               // Create the p-buffer.
               niattribs = 0;
-    
+
               if (rtt) {
                 iattributes[niattribs++]   = WGLExt.WGL_TEXTURE_FORMAT_ARB;
                 if (useFloat) {
@@ -202,45 +198,45 @@ public class WindowsPbufferWGLDrawable extends WindowsWGLDrawable {
                 } else {
                   iattributes[niattribs++] = WGLExt.WGL_TEXTURE_RGBA_ARB;
                 }
-    
+
                 iattributes[niattribs++] = WGLExt.WGL_TEXTURE_TARGET_ARB;
                 iattributes[niattribs++] = rect ? WGLExt.WGL_TEXTURE_RECTANGLE_NV : WGLExt.WGL_TEXTURE_2D_ARB;
-    
+
                 iattributes[niattribs++] = WGLExt.WGL_MIPMAP_TEXTURE_ARB;
                 iattributes[niattribs++] = GL.GL_FALSE;
-    
-                iattributes[niattribs++] = WGLExt.WGL_PBUFFER_LARGEST_ARB;
+
+                iattributes[niattribs++] = WGLExt.WGL_PBUFFER_LARGEST_ARB; // exact
                 iattributes[niattribs++] = GL.GL_FALSE;
               }
-    
+
               iattributes[niattribs++] = 0;
-    
+
               tmpBuffer = wglExt.wglCreatePbufferARB(sharedHdc, format, getWidth(), getHeight(), iattributes, 0);
               if (tmpBuffer != 0) {
                 // Done
                 break;
               }
             }
-    
+
             if (0 == tmpBuffer) {
               throw new GLException("pbuffer creation error: wglCreatePbuffer() failed: tried " + nformats +
                                     " pixel formats, last error was: " + wglGetLastError());
             }
             pfdid = pformats[whichFormat];
         }
-    
+
         // Get the device context.
         long tmpHdc = wglExt.wglGetPbufferDCARB(tmpBuffer);
         if (tmpHdc == 0) {
           throw new GLException("pbuffer creation error: wglGetPbufferDC() failed");
         }
-    
+
         NativeSurface ns = getNativeSurface();
         // Set up instance variables
         buffer = tmpBuffer;
-        ((SurfaceChangeable)ns).setSurfaceHandle(tmpHdc);
-        cachedWGLExt = wglExt;   
-    
+        ((MutableSurface)ns).setSurfaceHandle(tmpHdc);
+        cachedWGLExt = wglExt;
+
         // Re-query chosen pixel format
         {
           WGLGLCapabilities newCaps = WindowsWGLGraphicsConfiguration.wglARBPFID2GLCapabilities(sharedResource, sharedHdc, pfdid, glProfile, false, true);
@@ -252,14 +248,6 @@ public class WindowsPbufferWGLDrawable extends WindowsWGLDrawable {
           }
           config.setCapsPFD(newCaps);
         }
-    
-        // Determine the actual width and height we were able to create.
-        int[] tmp = new int[1];
-        wglExt.wglQueryPbufferARB( buffer, WGLExt.WGL_PBUFFER_WIDTH_ARB,  tmp, 0 );
-        width = tmp[0];
-        wglExt.wglQueryPbufferARB( buffer, WGLExt.WGL_PBUFFER_HEIGHT_ARB, tmp, 0 );
-        height = tmp[0];
-        ((SurfaceChangeable)ns).surfaceSizeChanged(width, height);
     } finally {
         sharedSurface.unlockSurface();
     }
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLContext.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLContext.java
index 217d88f..8825bad 100644
--- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLContext.java
+++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLContext.java
@@ -1,22 +1,22 @@
 /*
  * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
  * Copyright (c) 2010 JogAmp Community. All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- * 
+ *
  * - Redistribution of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
- * 
+ *
  * - Redistribution in binary form must reproduce the above copyright
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the distribution.
- * 
+ *
  * Neither the name of Sun Microsystems, Inc. or the names of
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * This software is provided "AS IS," without a warranty of any kind. ALL
  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -29,11 +29,11 @@
  * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
  * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
  * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
+ *
  * You acknowledge that this software is not designed or intended for use
  * in the design, construction, operation or maintenance of any nuclear
  * facility.
- * 
+ *
  * Sun gratefully acknowledges that this software was originally authored
  * and developed by Kenneth Bradley Russell and Christopher John Kline.
  */
@@ -53,6 +53,8 @@ import javax.media.opengl.GLCapabilitiesImmutable;
 
 import com.jogamp.gluegen.runtime.ProcAddressTable;
 import com.jogamp.gluegen.runtime.opengl.GLProcAddressResolver;
+import com.jogamp.opengl.GLExtensions;
+
 import jogamp.nativewindow.windows.GDI;
 import jogamp.opengl.GLContextImpl;
 import jogamp.opengl.GLDrawableImpl;
@@ -77,8 +79,8 @@ public class WindowsWGLContext extends GLContextImpl {
     functionNameMap.put("glFreeMemoryNV", "wglFreeMemoryNV");
 
     extensionNameMap = new HashMap<String, String>();
-    extensionNameMap.put("GL_ARB_pbuffer", "WGL_ARB_pbuffer");
-    extensionNameMap.put("GL_ARB_pixel_format", "WGL_ARB_pixel_format");
+    extensionNameMap.put(GLExtensions.ARB_pbuffer, WindowsWGLDrawableFactory.WGL_ARB_pbuffer);
+    extensionNameMap.put(GLExtensions.ARB_pixel_format, WindowsWGLDrawableFactory.WGL_ARB_pixel_format);
   }
 
   // FIXME: figure out how to hook back in the Java 2D / JOGL bridge
@@ -96,10 +98,11 @@ public class WindowsWGLContext extends GLContextImpl {
     // no inner state _wglExt=null;
     wglExtProcAddressTable=null;
     hasSwapIntervalSGI = 0;
-    hasSwapGroupNV = 0;    
-    super.resetStates();    
+    hasSwapGroupNV = 0;
+    super.resetStates();
   }
-  
+
+  @Override
   public Object getPlatformGLExtensions() {
     return getWGLExt();
   }
@@ -114,6 +117,7 @@ public class WindowsWGLContext extends GLContextImpl {
     return _wglExt;
   }
 
+  @Override
   public final boolean isGLReadDrawableAvailable() {
     if(!wglGLReadDrawableAvailableSet && null != getWGLExtProcAddressTable()) {
         WindowsWGLDrawableFactory factory = (WindowsWGLDrawableFactory)drawable.getFactoryImpl();
@@ -159,6 +163,7 @@ public class WindowsWGLContext extends GLContextImpl {
     return ok;
   }
 
+  @Override
   public final ProcAddressTable getPlatformExtProcAddressTable() {
     return getWGLExtProcAddressTable();
   }
@@ -167,15 +172,19 @@ public class WindowsWGLContext extends GLContextImpl {
     return wglExtProcAddressTable;
   }
 
+  @Override
   protected Map<String, String> getFunctionNameMap() { return functionNameMap; }
 
+  @Override
   protected Map<String, String> getExtensionNameMap() { return extensionNameMap; }
 
+  @Override
   protected void destroyContextARBImpl(long context) {
     WGL.wglMakeCurrent(0, 0);
     WGL.wglDeleteContext(context);
   }
 
+  @Override
   protected long createContextARBImpl(long share, boolean direct, int ctp, int major, int minor) {
     if( null == getWGLExtProcAddressTable()) {
         updateGLXProcAddressTable();
@@ -213,8 +222,8 @@ public class WindowsWGLContext extends GLContextImpl {
             attribs[idx_profile+1]  = WGLExt.WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB;
         } else {
             attribs[idx_profile+1]  = WGLExt.WGL_CONTEXT_CORE_PROFILE_BIT_ARB;
-        } 
-    } 
+        }
+    }
 
     if ( major >= 3 ) {
         if( !ctBwdCompat && ctFwdCompat ) {
@@ -255,6 +264,7 @@ public class WindowsWGLContext extends GLContextImpl {
    * Creates and initializes an appropriate OpenGL context. Should only be
    * called by {@link #makeCurrentImpl()}.
    */
+  @Override
   protected boolean createImpl(GLContextImpl shareWith) {
     AbstractGraphicsConfiguration config = drawable.getNativeSurface().getGraphicsConfiguration();
     AbstractGraphicsDevice device = config.getScreen().getDevice();
@@ -315,11 +325,11 @@ public class WindowsWGLContext extends GLContextImpl {
                 }
             } else if (DEBUG) {
                 System.err.println(getThreadName() + ": createContextImpl: NOT OK (ARB, initial) - extension not available - share "+share+
-                                   ", isProcCreateContextAttribsARBAvailable "+isProcCreateContextAttribsARBAvailable+", isExtGLXARBCreateContextAvailable "+isExtARBCreateContextAvailable);            
+                                   ", isProcCreateContextAttribsARBAvailable "+isProcCreateContextAttribsARBAvailable+", isExtGLXARBCreateContextAvailable "+isExtARBCreateContextAvailable);
             }
         }
     }
-    
+
     if(0!=contextHandle) {
         share = 0; // mark as shared thx to the ARB create method
         if(0!=temp_ctx) {
@@ -347,7 +357,7 @@ public class WindowsWGLContext extends GLContextImpl {
             throw new GLException("Error making old context current: 0x" + toHexString(contextHandle) + ", werr: " + GDI.GetLastError());
         }
         if(0!=share) {
-            // Only utilize the classic GDI 'wglShareLists' shared context method 
+            // Only utilize the classic GDI 'wglShareLists' shared context method
             // for traditional non ARB context.
             if (!WGL.wglShareLists(share, contextHandle)) {
                 throw new GLException("wglShareLists(" + toHexString(share) +
@@ -361,7 +371,8 @@ public class WindowsWGLContext extends GLContextImpl {
 
     return true;
   }
-  
+
+  @Override
   protected void  makeCurrentImpl() throws GLException {
     if (WGL.wglGetCurrentContext() != contextHandle) {
       if (!wglMakeContextCurrent(drawable.getHandle(), drawableRead.getHandle(), contextHandle)) {
@@ -370,12 +381,14 @@ public class WindowsWGLContext extends GLContextImpl {
     }
   }
 
+  @Override
   protected void releaseImpl() throws GLException {
     if (!wglMakeContextCurrent(0, 0, 0)) {
         throw new GLException("Error freeing OpenGL context, werr: " + GDI.GetLastError());
     }
   }
 
+  @Override
   protected void destroyImpl() throws GLException {
       WGL.wglMakeCurrent(0, 0);
       if (!WGL.wglDeleteContext(contextHandle)) {
@@ -383,12 +396,14 @@ public class WindowsWGLContext extends GLContextImpl {
       }
   }
 
+  @Override
   protected void copyImpl(GLContext source, int mask) throws GLException {
     if (!WGL.wglCopyContext(source.getHandle(), getHandle(), mask)) {
       throw new GLException("wglCopyContext failed");
     }
   }
 
+  @Override
   protected final void updateGLXProcAddressTable() {
     final AbstractGraphicsConfiguration aconfig = drawable.getNativeSurface().getGraphicsConfiguration();
     final AbstractGraphicsDevice adevice = aconfig.getScreen().getDevice();
@@ -421,10 +436,11 @@ public class WindowsWGLContext extends GLContextImpl {
         }
     }
   }
-  
+
+  @Override
   protected final StringBuilder getPlatformExtensionsStringImpl() {
     StringBuilder sb = new StringBuilder();
-    
+
     if (!wglGetExtensionsStringEXTInitialized) {
       wglGetExtensionsStringEXTAvailable = (WGL.wglGetProcAddress("wglGetExtensionsStringEXT") != 0);
       wglGetExtensionsStringEXTInitialized = true;
@@ -434,7 +450,7 @@ public class WindowsWGLContext extends GLContextImpl {
     }
     return sb;
   }
-  
+
   @Override
   protected boolean setSwapIntervalImpl(int interval) {
     WGLExt wglExt = getWGLExt();
@@ -450,7 +466,7 @@ public class WindowsWGLContext extends GLContextImpl {
     }
     return false;
   }
-  
+
   private final int initSwapGroupImpl(WGLExt wglExt) {
       if(0==hasSwapGroupNV) {
         try {
@@ -462,7 +478,7 @@ public class WindowsWGLContext extends GLContextImpl {
       }
       return hasSwapGroupNV;
   }
-  
+
   @Override
   protected final boolean queryMaxSwapGroupsImpl(int[] maxGroups, int maxGroups_offset,
                                                  int[] maxBarriers, int maxBarriers_offset) {
@@ -471,7 +487,7 @@ public class WindowsWGLContext extends GLContextImpl {
       if (initSwapGroupImpl(wglExt)>0) {
         final NativeSurface ns = drawable.getNativeSurface();
         try {
-            if( wglExt.wglQueryMaxSwapGroupsNV(ns.getDisplayHandle(), 
+            if( wglExt.wglQueryMaxSwapGroupsNV(ns.getDisplayHandle(),
                                                maxGroups, maxGroups_offset,
                                                maxBarriers, maxBarriers_offset) ) {
                 res = true;
@@ -480,7 +496,7 @@ public class WindowsWGLContext extends GLContextImpl {
       }
       return res;
   }
-  
+
   @Override
   protected final boolean joinSwapGroupImpl(int group) {
       boolean res = false;
@@ -495,7 +511,7 @@ public class WindowsWGLContext extends GLContextImpl {
       }
       return res;
   }
-  
+
   @Override
   protected final boolean bindSwapBarrierImpl(int group, int barrier) {
       boolean res = false;
@@ -507,13 +523,15 @@ public class WindowsWGLContext extends GLContextImpl {
             }
         } catch (Throwable t) { hasSwapGroupNV=-1; }
       }
-      return res;  
+      return res;
   }
-  
+
+  @Override
   public ByteBuffer glAllocateMemoryNV(int arg0, float arg1, float arg2, float arg3) {
     return getWGLExt().wglAllocateMemoryNV(arg0, arg1, arg2, arg3);
   }
 
+  @Override
   public int getOffscreenContextPixelDataType() {
     throw new GLException("Should not call this");
   }
@@ -522,14 +540,17 @@ public class WindowsWGLContext extends GLContextImpl {
     throw new GLException("Should not call this");
   }
 
+  @Override
   public boolean offscreenImageNeedsVerticalFlip() {
     throw new GLException("Should not call this");
   }
 
+  @Override
   public void bindPbufferToTexture() {
     throw new GLException("Should not call this");
   }
 
+  @Override
   public void releasePbufferFromTexture() {
     throw new GLException("Should not call this");
   }
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawable.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawable.java
index 579b119..ca7886e 100644
--- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawable.java
+++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawable.java
@@ -1,22 +1,22 @@
 /*
  * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
  * Copyright (c) 2010 JogAmp Community. All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- * 
+ *
  * - Redistribution of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
- * 
+ *
  * - Redistribution in binary form must reproduce the above copyright
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the distribution.
- * 
+ *
  * Neither the name of Sun Microsystems, Inc. or the names of
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * This software is provided "AS IS," without a warranty of any kind. ALL
  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -29,11 +29,11 @@
  * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
  * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
  * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
+ *
  * You acknowledge that this software is not designed or intended for use
  * in the design, construction, operation or maintenance of any nuclear
  * facility.
- * 
+ *
  * Sun gratefully acknowledges that this software was originally authored
  * and developed by Kenneth Bradley Russell and Christopher John Kline.
  */
@@ -60,21 +60,21 @@ public abstract class WindowsWGLDrawable extends GLDrawableImpl {
     super(factory, comp, realized);
   }
 
+  @Override
   protected void setRealizedImpl() {
-    if(!realized) {
-        return; // nothing todo ..
-    }
-
-    NativeSurface ns = getNativeSurface();
-    WindowsWGLGraphicsConfiguration config = (WindowsWGLGraphicsConfiguration)ns.getGraphicsConfiguration();
-    config.updateGraphicsConfiguration(getFactory(), ns, null);
-    if (DEBUG) {
-      System.err.println("WindowsWGLDrawable.setRealized(true): "+config);
+    if(realized) {
+        NativeSurface ns = getNativeSurface();
+        WindowsWGLGraphicsConfiguration config = (WindowsWGLGraphicsConfiguration)ns.getGraphicsConfiguration();
+        config.updateGraphicsConfiguration(getFactory(), ns, null);
+        if (DEBUG) {
+          System.err.println("WindowsWGLDrawable.setRealized(true): "+config);
+        }
     }
   }
 
+  @Override
   protected final void swapBuffersImpl() {
-    // single-buffer is already filtered out @ GLDrawableImpl#swapBuffers()        
+    // single-buffer is already filtered out @ GLDrawableImpl#swapBuffers()
     final long t0;
     if (PROFILING) {
       t0 = System.currentTimeMillis();
@@ -97,6 +97,7 @@ public abstract class WindowsWGLDrawable extends GLDrawableImpl {
     }
   }
 
+  @Override
   public GLDynamicLookupHelper getGLDynamicLookupHelper() {
     return getFactoryImpl().getGLDynamicLookupHelper(0);
   }
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java
index 494bb30..09e97ff 100644
--- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java
+++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java
@@ -1,22 +1,22 @@
 /*
  * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
  * Copyright (c) 2010 JogAmp Community. All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- * 
+ *
  * - Redistribution of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
- * 
+ *
  * - Redistribution in binary form must reproduce the above copyright
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the distribution.
- * 
+ *
  * Neither the name of Sun Microsystems, Inc. or the names of
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * This software is provided "AS IS," without a warranty of any kind. ALL
  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -29,11 +29,11 @@
  * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
  * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
  * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
+ *
  * You acknowledge that this software is not designed or intended for use
  * in the design, construction, operation or maintenance of any nuclear
  * facility.
- * 
+ *
  * Sun gratefully acknowledges that this software was originally authored
  * and developed by Kenneth Bradley Russell and Christopher John Kline.
  */
@@ -46,43 +46,47 @@ import java.util.Collection;
 import java.util.HashMap;
 import java.util.List;
 
+import javax.media.nativewindow.AbstractGraphicsConfiguration;
 import javax.media.nativewindow.AbstractGraphicsDevice;
 import javax.media.nativewindow.AbstractGraphicsScreen;
 import javax.media.nativewindow.DefaultGraphicsScreen;
 import javax.media.nativewindow.NativeSurface;
-import javax.media.nativewindow.NativeWindowFactory;
-import javax.media.nativewindow.AbstractGraphicsConfiguration;
 import javax.media.nativewindow.ProxySurface;
+import javax.media.nativewindow.ProxySurface.UpstreamSurfaceHook;
 import javax.media.opengl.GL;
-import javax.media.opengl.GLCapabilitiesImmutable;
+import javax.media.opengl.GLCapabilities;
 import javax.media.opengl.GLCapabilitiesChooser;
+import javax.media.opengl.GLCapabilitiesImmutable;
 import javax.media.opengl.GLContext;
 import javax.media.opengl.GLDrawable;
 import javax.media.opengl.GLException;
 import javax.media.opengl.GLProfile;
 import javax.media.opengl.GLProfile.ShutdownType;
 
-import com.jogamp.common.JogampRuntimeException;
-import com.jogamp.common.nio.PointerBuffer;
-import com.jogamp.common.os.Platform;
-import com.jogamp.common.util.ReflectionUtil;
-import com.jogamp.common.util.VersionNumber;
-import com.jogamp.nativewindow.WrappedSurface;
-import com.jogamp.nativewindow.windows.WindowsGraphicsDevice;
-
 import jogamp.nativewindow.windows.GDI;
-import jogamp.nativewindow.windows.GDIUtil;
 import jogamp.nativewindow.windows.GDISurface;
+import jogamp.nativewindow.windows.GDIUtil;
 import jogamp.nativewindow.windows.RegisteredClassFactory;
 import jogamp.opengl.DesktopGLDynamicLookupHelper;
+import jogamp.opengl.GLContextImpl;
 import jogamp.opengl.GLDrawableFactoryImpl;
 import jogamp.opengl.GLDrawableImpl;
 import jogamp.opengl.GLDynamicLookupHelper;
+import jogamp.opengl.GLGraphicsConfigurationUtil;
 import jogamp.opengl.SharedResourceRunner;
 
+import com.jogamp.common.JogampRuntimeException;
+import com.jogamp.common.nio.PointerBuffer;
+import com.jogamp.common.os.Platform;
+import com.jogamp.common.util.ReflectionUtil;
+import com.jogamp.common.util.VersionNumber;
+import com.jogamp.nativewindow.WrappedSurface;
+import com.jogamp.nativewindow.windows.WindowsGraphicsDevice;
+import com.jogamp.opengl.GLExtensions;
+
 public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl {
   private static DesktopGLDynamicLookupHelper windowsWGLDynamicLookupHelper = null;
-  
+
   public WindowsWGLDrawableFactory() {
     super();
 
@@ -95,29 +99,29 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl {
                 if(DEBUG) {
                     gle.printStackTrace();
                 }
-            }            
+            }
             if(null!=tmp && tmp.isLibComplete()) {
                 windowsWGLDynamicLookupHelper = tmp;
                 WGL.getWGLProcAddressTable().reset(windowsWGLDynamicLookupHelper);
-            }               
+            }
         }
     }
-    
+
     defaultDevice = new WindowsGraphicsDevice(AbstractGraphicsDevice.DEFAULT_UNIT);
-    
+
     if(null!=windowsWGLDynamicLookupHelper) {
         // Register our GraphicsConfigurationFactory implementations
         // The act of constructing them causes them to be registered
         WindowsWGLGraphicsConfigurationFactory.registerFactory();
         if(GLProfile.isAWTAvailable()) {
             try {
-              ReflectionUtil.callStaticMethod("jogamp.opengl.windows.wgl.awt.WindowsAWTWGLGraphicsConfigurationFactory", 
-                                              "registerFactory", null, null, getClass().getClassLoader());                
+              ReflectionUtil.callStaticMethod("jogamp.opengl.windows.wgl.awt.WindowsAWTWGLGraphicsConfigurationFactory",
+                                              "registerFactory", null, null, getClass().getClassLoader());
             } catch (JogampRuntimeException jre) { /* n/a .. */ }
         }
-    
+
         sharedMap = new HashMap<String, SharedResourceRunner.Resource>();
-    
+
         // Init shared resources off thread
         // Will be released via ShutdownHook
         sharedResourceRunner = new SharedResourceRunner(new SharedResourceImplementation());
@@ -125,6 +129,7 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl {
     }
   }
 
+  @Override
   protected final void destroy(ShutdownType shutdownType) {
     if(null != sharedResourceRunner) {
         sharedResourceRunner.stop();
@@ -137,15 +142,16 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl {
     defaultDevice = null;
     /**
      * Pulling away the native library may cause havoc ..
-     * 
+     *
     if(ShutdownType.COMPLETE == shutdownType && null != windowsWGLDynamicLookupHelper) {
         windowsWGLDynamicLookupHelper.destroy();
         windowsWGLDynamicLookupHelper = null;
     } */
-    
+
     RegisteredClassFactory.shutdownSharedClasses();
   }
 
+  @Override
   public GLDynamicLookupHelper getGLDynamicLookupHelper(int profile) {
       return windowsWGLDynamicLookupHelper;
   }
@@ -158,6 +164,7 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl {
   private PointerBuffer procMask = PointerBuffer.allocateDirect(1);
   private PointerBuffer sysMask = PointerBuffer.allocateDirect(1);
 
+  @Override
   protected void enterThreadCriticalZone() {
     synchronized (sysMask) {
         if( 0 == processAffinityChanges) {
@@ -174,6 +181,7 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl {
     }
   }
 
+  @Override
   protected void leaveThreadCriticalZone() {
     synchronized (sysMask) {
         if( 0 != processAffinityChanges) {
@@ -194,13 +202,13 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl {
    * http://msdn.microsoft.com/en-us/library/ms724832%28v=vs.85%29.aspx
    * Windows XP    5.1
    */
-  static final VersionNumber winXPVersionNumber = new VersionNumber ( 5, 1, 0); 
-    
+  static final VersionNumber winXPVersionNumber = new VersionNumber ( 5, 1, 0);
+
   static class SharedResource implements SharedResourceRunner.Resource {
       private WindowsGraphicsDevice device;
       private AbstractGraphicsScreen screen;
-      private WindowsDummyWGLDrawable drawable;
-      private WindowsWGLContext context;
+      private GLDrawableImpl drawable;
+      private GLContextImpl context;
       private boolean hasARBPixelFormat;
       private boolean hasARBMultisample;
       private boolean hasARBPBuffer;
@@ -210,7 +218,7 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl {
       private boolean isVendorNVIDIA;
       private boolean needsCurrenContext4ARBPFDQueries;
 
-      SharedResource(WindowsGraphicsDevice dev, AbstractGraphicsScreen scrn, WindowsDummyWGLDrawable draw, WindowsWGLContext ctx,
+      SharedResource(WindowsGraphicsDevice dev, AbstractGraphicsScreen scrn, GLDrawableImpl draw, GLContextImpl ctx,
                      boolean arbPixelFormat, boolean arbMultisample, boolean arbPBuffer, boolean arbReadDrawable, String glVendor) {
           device = dev;
           screen = scrn;
@@ -225,7 +233,7 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl {
               isVendorNVIDIA = vendor.startsWith("NVIDIA") ;
               isVendorATI = vendor.startsWith("ATI") ;
           }
-          
+
             if ( isVendorATI() ) {
               final VersionNumber winVersion = Platform.getOSVersionNumber();
               final boolean isWinXPOrLess = winVersion.compareTo(winXPVersionNumber) <= 0;
@@ -233,77 +241,83 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl {
                   System.err.println("needsCurrenContext4ARBPFDQueries: "+winVersion+" <= "+winXPVersionNumber+" = "+isWinXPOrLess+" - "+Platform.getOSVersion());
               }
               needsCurrenContext4ARBPFDQueries = isWinXPOrLess;
-            } else { 
+            } else {
             if(DEBUG) {
                   System.err.println("needsCurrenContext4ARBPFDQueries: false");
               }
               needsCurrenContext4ARBPFDQueries = false;
-          }                   
+          }
       }
-      
+
+      @Override
       final public AbstractGraphicsDevice getDevice() { return device; }
+      @Override
       final public AbstractGraphicsScreen getScreen() { return screen; }
-      final public WindowsWGLDrawable getDrawable() { return drawable; }
-      final public WindowsWGLContext getContext() { return context; }
+      @Override
+      final public GLDrawableImpl getDrawable() { return drawable; }
+      @Override
+      final public GLContextImpl getContext() { return context; }
 
       final boolean hasARBPixelFormat() { return hasARBPixelFormat; }
       final boolean hasARBMultisample() { return hasARBMultisample; }
       final boolean hasARBPBuffer() { return hasARBPBuffer; }
       final boolean hasReadDrawable() { return hasARBReadDrawable; }
-      
+
       final String vendor() { return vendor; }
       final boolean isVendorATI() { return isVendorATI; }
       final boolean isVendorNVIDIA() { return isVendorNVIDIA; }
-      
+
       /**
        * Solves bug #480
-       * 
+       *
        * TODO: Validate if bug is actually relates to the 'old' ATI Windows driver for old GPU's like X300 etc
        * and unrelated to the actual Windows version !
-       * 
-       * @return true if GL_VENDOR is ATI _and_ platform is Windows version XP or less! 
+       *
+       * @return true if GL_VENDOR is ATI _and_ platform is Windows version XP or less!
        */
-      final boolean needsCurrentContext4ARBPFDQueries() { return needsCurrenContext4ARBPFDQueries; }      
+      final boolean needsCurrentContext4ARBPFDQueries() { return needsCurrenContext4ARBPFDQueries; }
   }
 
   class SharedResourceImplementation implements SharedResourceRunner.Implementation {
+        @Override
         public void clear() {
             synchronized(sharedMap) {
                 sharedMap.clear();
             }
         }
+        @Override
         public SharedResourceRunner.Resource mapPut(String connection, SharedResourceRunner.Resource resource) {
             synchronized(sharedMap) {
                 return sharedMap.put(connection, resource);
             }
         }
+        @Override
         public SharedResourceRunner.Resource mapGet(String connection) {
             synchronized(sharedMap) {
                 return sharedMap.get(connection);
             }
         }
+        @Override
         public Collection<SharedResourceRunner.Resource> mapValues() {
             synchronized(sharedMap) {
                 return sharedMap.values();
             }
         }
 
+        @Override
         public SharedResourceRunner.Resource createSharedResource(String connection) {
-            WindowsGraphicsDevice sharedDevice = new WindowsGraphicsDevice(connection, AbstractGraphicsDevice.DEFAULT_UNIT);
+            final WindowsGraphicsDevice sharedDevice = new WindowsGraphicsDevice(connection, AbstractGraphicsDevice.DEFAULT_UNIT);
             sharedDevice.lock();
             try {
-                AbstractGraphicsScreen absScreen = new DefaultGraphicsScreen(sharedDevice, 0);
-                GLProfile glp = GLProfile.get(sharedDevice, GLProfile.GL_PROFILE_LIST_MIN_DESKTOP, false);
+                final AbstractGraphicsScreen absScreen = new DefaultGraphicsScreen(sharedDevice, 0);
+                final GLProfile glp = GLProfile.get(sharedDevice, GLProfile.GL_PROFILE_LIST_MIN_DESKTOP, false);
                 if (null == glp) {
                     throw new GLException("Couldn't get default GLProfile for device: "+sharedDevice);
                 }
-                final int f_dim = 64;
-                long hwnd = GDIUtil.CreateDummyWindow(0, 0, f_dim, f_dim);
-                WindowsDummyWGLDrawable sharedDrawable = WindowsDummyWGLDrawable.create(WindowsWGLDrawableFactory.this, glp, absScreen, hwnd, f_dim, f_dim, true);
-                if (null == sharedDrawable) {
-                    throw new GLException("Couldn't create shared drawable for screen: "+absScreen+", "+glp);
-                }
-                WindowsWGLContext sharedContext  = (WindowsWGLContext) sharedDrawable.createContext(null);
+                final GLDrawableImpl sharedDrawable = createOnscreenDrawableImpl(createDummySurfaceImpl(sharedDevice, false, new GLCapabilities(glp), null, 64, 64));
+                sharedDrawable.setRealized(true);
+                                
+                final GLContextImpl sharedContext  = (GLContextImpl) sharedDrawable.createContext(null);
                 if (null == sharedContext) {
                     throw new GLException("Couldn't create shared context for drawable: "+sharedDrawable);
                 }
@@ -316,7 +330,7 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl {
                 try {
                     hasARBPixelFormat = sharedContext.isExtensionAvailable(WGL_ARB_pixel_format);
                     hasARBMultisample = sharedContext.isExtensionAvailable(WGL_ARB_multisample);
-                    hasARBPBuffer = sharedContext.isExtensionAvailable(GL_ARB_pbuffer);
+                    hasARBPBuffer = sharedContext.isExtensionAvailable(GLExtensions.ARB_pbuffer);
                     hasARBReadDrawableAvailable = sharedContext.isExtensionAvailable(WGL_ARB_make_current_read) &&
                                             sharedContext.isFunctionAvailable(wglMakeContextCurrent);
                     vendor = sharedContext.getGL().glGetString(GL.GL_VENDOR);
@@ -333,7 +347,7 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl {
                     System.err.println("readDrawable:  " + hasARBReadDrawableAvailable);
                     System.err.println("vendor:        " + vendor);
                 }
-                return new SharedResource(sharedDevice, absScreen, sharedDrawable, sharedContext, 
+                return new SharedResource(sharedDevice, absScreen, sharedDrawable, sharedContext,
                                           hasARBPixelFormat, hasARBMultisample,
                                           hasARBPBuffer, hasARBReadDrawableAvailable, vendor);
             } catch (Throwable t) {
@@ -343,6 +357,7 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl {
             }
         }
 
+        @Override
         public void releaseSharedResource(SharedResourceRunner.Resource shared) {
             SharedResource sr = (SharedResource) shared;
             if (DEBUG) {
@@ -359,7 +374,7 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl {
             }
 
             if (null != sr.drawable) {
-                sr.drawable.destroy();
+                sr.drawable.setRealized(false);
                 sr.drawable = null;
             }
 
@@ -374,10 +389,12 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl {
         }
   }
 
+  @Override
   public final AbstractGraphicsDevice getDefaultDevice() {
       return defaultDevice;
   }
 
+  @Override
   public final boolean getIsDeviceCompatible(AbstractGraphicsDevice device) {
       if(null!=windowsWGLDynamicLookupHelper && device instanceof WindowsGraphicsDevice) {
           return true;
@@ -385,17 +402,19 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl {
       return false;
   }
 
-  final static String GL_ARB_pbuffer = "GL_ARB_pbuffer";
+  final static String WGL_ARB_pbuffer      = "WGL_ARB_pbuffer";
   final static String WGL_ARB_pixel_format = "WGL_ARB_pixel_format";
   final static String WGL_ARB_multisample = "WGL_ARB_multisample";
   final static String WGL_NV_float_buffer = "WGL_NV_float_buffer";
   final static String WGL_ARB_make_current_read = "WGL_ARB_make_current_read";
   final static String wglMakeContextCurrent = "wglMakeContextCurrent";
 
+  @Override
   protected final Thread getSharedResourceThread() {
     return sharedResourceRunner.start();
   }
-  
+
+  @Override
   protected final boolean createSharedResource(AbstractGraphicsDevice device) {
     try {
         SharedResourceRunner.Resource sr = sharedResourceRunner.getOrCreateShared(device);
@@ -410,7 +429,8 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl {
     }
     return false;
   }
-  
+
+  @Override
   protected final GLContext getOrCreateSharedContextImpl(AbstractGraphicsDevice device) {
     SharedResourceRunner.Resource sr = sharedResourceRunner.getOrCreateShared(device);
     if(null!=sr) {
@@ -419,6 +439,7 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl {
     return null;
   }
 
+  @Override
   protected AbstractGraphicsDevice getOrCreateSharedDeviceImpl(AbstractGraphicsDevice device) {
     SharedResourceRunner.Resource sr = sharedResourceRunner.getOrCreateShared(device);
     if(null!=sr) {
@@ -439,10 +460,12 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl {
     return (SharedResource) sharedResourceRunner.getOrCreateShared(device);
   }
 
+  @Override
   protected List<GLCapabilitiesImmutable> getAvailableCapabilitiesImpl(AbstractGraphicsDevice device) {
     return WindowsWGLGraphicsConfigurationFactory.getAvailableCapabilities(this, device);
   }
 
+  @Override
   protected final GLDrawableImpl createOnscreenDrawableImpl(NativeSurface target) {
     if (target == null) {
       throw new IllegalArgumentException("Null target");
@@ -450,6 +473,7 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl {
     return new WindowsOnscreenWGLDrawable(this, target);
   }
 
+  @Override
   protected final GLDrawableImpl createOffscreenDrawableImpl(final NativeSurface target) {
     if (target == null) {
       throw new IllegalArgumentException("Null target");
@@ -501,6 +525,7 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl {
     return -1; // undefined
   }
 
+  @Override
   public final boolean canCreateGLPbuffer(AbstractGraphicsDevice device) {
     SharedResource sr = (SharedResource) sharedResourceRunner.getOrCreateShared((null!=device)?device:defaultDevice);
     if(null!=sr) {
@@ -509,31 +534,103 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl {
     return false;
   }
 
-  protected final NativeSurface createOffscreenSurfaceImpl(AbstractGraphicsDevice device, GLCapabilitiesImmutable capsChosen, GLCapabilitiesImmutable capsRequested, GLCapabilitiesChooser chooser, int width, int height) {
-    AbstractGraphicsScreen screen = DefaultGraphicsScreen.createDefault(NativeWindowFactory.TYPE_WINDOWS);
-    WrappedSurface ns = new WrappedSurface(WindowsWGLGraphicsConfigurationFactory.chooseGraphicsConfigurationStatic(
-                                     capsChosen, capsRequested, chooser, screen) );
-    ns.surfaceSizeChanged(width, height);
-    return ns;
-  }
- 
-  protected final ProxySurface createProxySurfaceImpl(AbstractGraphicsDevice adevice, long windowHandle, GLCapabilitiesImmutable capsRequested, GLCapabilitiesChooser chooser) {
-    // FIXME device/windowHandle -> screen ?!
-    WindowsGraphicsDevice device = (WindowsGraphicsDevice) adevice;
-    AbstractGraphicsScreen screen = new DefaultGraphicsScreen(device, 0);
-    WindowsWGLGraphicsConfiguration cfg = WindowsWGLGraphicsConfigurationFactory.chooseGraphicsConfigurationStatic(capsRequested, capsRequested, chooser, screen);    
-    GDISurface ns = new GDISurface(cfg, windowHandle);
-    return ns;
+  @Override
+  protected final ProxySurface createMutableSurfaceImpl(AbstractGraphicsDevice deviceReq, boolean createNewDevice, 
+                                                        GLCapabilitiesImmutable capsChosen, GLCapabilitiesImmutable capsRequested, 
+                                                        GLCapabilitiesChooser chooser, int width, int height, UpstreamSurfaceHook lifecycleHook) {
+    final WindowsGraphicsDevice device;
+    if(createNewDevice) {
+        device = new WindowsGraphicsDevice(deviceReq.getConnection(), deviceReq.getUnitID());
+    } else {
+        device = (WindowsGraphicsDevice)deviceReq;
+    }
+    final AbstractGraphicsScreen screen = new DefaultGraphicsScreen(device, 0);
+    final WindowsWGLGraphicsConfiguration config = WindowsWGLGraphicsConfigurationFactory.chooseGraphicsConfigurationStatic(capsChosen, capsRequested, chooser, screen);
+    if(null == config) {
+        throw new GLException("Choosing GraphicsConfiguration failed w/ "+capsChosen+" on "+screen); 
+    }    
+    return new WrappedSurface(config, 0, width, height, lifecycleHook);
+  }
+
+  @Override
+  public final ProxySurface createDummySurfaceImpl(AbstractGraphicsDevice deviceReq, boolean createNewDevice, 
+                                                   GLCapabilitiesImmutable requestedCaps, GLCapabilitiesChooser chooser, int width, int height) {
+    final WindowsGraphicsDevice device;
+    if(createNewDevice) {
+        device = new WindowsGraphicsDevice(deviceReq.getConnection(), deviceReq.getUnitID());
+    } else {
+        device = (WindowsGraphicsDevice)deviceReq;
+    }
+    final AbstractGraphicsScreen screen = new DefaultGraphicsScreen(device, 0);
+    final GLCapabilitiesImmutable chosenCaps = GLGraphicsConfigurationUtil.fixOnscreenGLCapabilities(requestedCaps);
+    final WindowsWGLGraphicsConfiguration config = WindowsWGLGraphicsConfigurationFactory.chooseGraphicsConfigurationStatic(chosenCaps, requestedCaps, chooser, screen);
+    if(null == config) { 
+        throw new GLException("Choosing GraphicsConfiguration failed w/ "+requestedCaps+" on "+screen);
+    }    
+    return new GDISurface(config, 0, width, height, dummySurfaceLifecycleHook);
+  }  
+  private static final ProxySurface.UpstreamSurfaceHook dummySurfaceLifecycleHook = new ProxySurface.UpstreamSurfaceHook() {
+    @Override
+    public final void create(ProxySurface s) {
+        final GDISurface ms = (GDISurface)s;
+        if(0 == ms.getWindowHandle()) {            
+            final long windowHandle = GDIUtil.CreateDummyWindow(0, 0, s.getWidth(), s.getHeight());
+            if(0 == windowHandle) {
+                throw new GLException("Error windowHandle 0, werr: "+GDI.GetLastError());
+            }    
+            ms.setWindowHandle(windowHandle);
+            if(DEBUG) {
+                System.err.println("WindowsWGLDrawableFactory.dummySurfaceLifecycleHook.create: "+ms);
+            }
+        }
+    }
+    @Override
+    public final void destroy(ProxySurface s) {
+        final GDISurface ms = (GDISurface)s;
+        if(0 != ms.getWindowHandle()) {
+            GDI.ShowWindow(ms.getWindowHandle(), GDI.SW_HIDE);
+            GDIUtil.DestroyDummyWindow(ms.getWindowHandle());
+            ms.setWindowHandle(0);
+            if(DEBUG) {
+                System.err.println("WindowsWGLDrawableFactory.dummySurfaceLifecycleHook.destroy: "+ms);
+            }
+        }
+    }
+    @Override
+    public final int getWidth(ProxySurface s) {
+        return s.initialWidth;
+    }
+    @Override
+    public final int getHeight(ProxySurface s) {
+        return s.initialHeight;
+    }
+    
+    @Override
+    public String toString() {
+       return "GDISurfaceLifecycleHook[]";
+    }
+  };
+  
+  
+  @Override
+  protected final ProxySurface createProxySurfaceImpl(AbstractGraphicsDevice deviceReq, int screenIdx, long windowHandle, GLCapabilitiesImmutable capsRequested, GLCapabilitiesChooser chooser, UpstreamSurfaceHook upstream) {
+    final WindowsGraphicsDevice device = new WindowsGraphicsDevice(deviceReq.getConnection(), deviceReq.getUnitID());
+    final AbstractGraphicsScreen screen = new DefaultGraphicsScreen(device, screenIdx);
+    final WindowsWGLGraphicsConfiguration cfg = WindowsWGLGraphicsConfigurationFactory.chooseGraphicsConfigurationStatic(capsRequested, capsRequested, chooser, screen);
+    return new GDISurface(cfg, windowHandle, 0, 0, upstream);
   }
- 
+
+  @Override
   protected final GLContext createExternalGLContextImpl() {
     return WindowsExternalWGLContext.create(this, null);
   }
 
+  @Override
   public final boolean canCreateExternalGLDrawable(AbstractGraphicsDevice device) {
     return true;
   }
 
+  @Override
   protected final GLDrawable createExternalGLDrawableImpl() {
     return WindowsExternalWGLDrawable.create(this, null);
   }
@@ -553,10 +650,12 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl {
     return detail;
   }
 
+  @Override
   public final boolean canCreateContextOnJava2DSurface(AbstractGraphicsDevice device) {
     return false;
   }
 
+  @Override
   public final GLContext createContextOnJava2DSurface(Object graphics, GLContext shareWith)
     throws GLException {
     throw new GLException("Unimplemented on this platform");
@@ -568,10 +667,12 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl {
 
   private static final int GAMMA_RAMP_LENGTH = 256;
 
+  @Override
   protected final int getGammaRampLength() {
     return GAMMA_RAMP_LENGTH;
   }
 
+  @Override
   protected final boolean setGammaRamp(float[] ramp) {
     short[] rampData = new short[3 * GAMMA_RAMP_LENGTH];
     for (int i = 0; i < GAMMA_RAMP_LENGTH; i++) {
@@ -587,6 +688,7 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl {
     return res;
   }
 
+  @Override
   protected final Buffer getGammaRamp() {
     ShortBuffer rampData = ShortBuffer.wrap(new short[3 * GAMMA_RAMP_LENGTH]);
     long screenDC = GDI.GetDC(0);
@@ -598,6 +700,7 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl {
     return rampData;
   }
 
+  @Override
   protected final void resetGammaRamp(Buffer originalGammaRamp) {
     if (originalGammaRamp == null) {
       // getGammaRamp failed earlier
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration.java
index 5682b35..209589b 100644
--- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration.java
+++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration.java
@@ -48,11 +48,13 @@ import javax.media.opengl.GLPbuffer;
 import javax.media.opengl.GLProfile;
 
 import com.jogamp.nativewindow.MutableGraphicsConfiguration;
+import com.jogamp.opengl.GLExtensions;
 
 import jogamp.nativewindow.windows.DWM_BLURBEHIND;
 import jogamp.nativewindow.windows.GDI;
 import jogamp.nativewindow.windows.MARGINS;
 import jogamp.nativewindow.windows.PIXELFORMATDESCRIPTOR;
+import jogamp.opengl.GLContextImpl;
 import jogamp.opengl.GLGraphicsConfigurationUtil;
 
 public class WindowsWGLGraphicsConfiguration extends MutableGraphicsConfiguration implements Cloneable {    
@@ -160,7 +162,7 @@ public class WindowsWGLGraphicsConfiguration extends MutableGraphicsConfiguratio
         }
     
         if (!WGLUtil.SetPixelFormat(hdc, caps.getPFDID(), caps.getPFD())) {
-            throw new GLException("Unable to set pixel format " + caps +
+            throw new GLException("Unable to set pixel format " + caps.getPFDID() + " of " + caps +
                                   " for device context " + toHexString(hdc) +
                                   ": error code " + GDI.GetLastError());
         }
@@ -250,7 +252,7 @@ public class WindowsWGLGraphicsConfiguration extends MutableGraphicsConfiguratio
         }
             
         if(sharedResource.hasARBPBuffer()) {
-            WindowsWGLContext sharedCtx = sharedResource.getContext();
+            GLContextImpl sharedCtx = sharedResource.getContext();
             if(null != sharedCtx && sharedCtx.isExtensionAvailable(WindowsWGLDrawableFactory.WGL_NV_float_buffer)) {
                 // pbo float buffer
                 iattributes[niattribs++] = WGLExt.WGL_FLOAT_COMPONENTS_NV; // nvidia
@@ -313,14 +315,14 @@ public class WindowsWGLGraphicsConfiguration extends MutableGraphicsConfiguratio
 
         int niattribs = fillAttribsForGeneralWGLARBQuery(sharedResource, iattributes);
 
-        if (!sharedResource.getContext().getWGLExt().wglGetPixelFormatAttribivARB(hdc, pfdID, 0, niattribs, iattributes, 0, iresults, 0)) {
+        if (!((WindowsWGLContext)sharedResource.getContext()).getWGLExt().wglGetPixelFormatAttribivARB(hdc, pfdID, 0, niattribs, iattributes, 0, iresults, 0)) {
             throw new GLException("wglARBPFID2GLCapabilities: Error getting pixel format attributes for pixel format " + pfdID + 
                                   " of device context " + toHexString(hdc) + ", werr " + GDI.GetLastError());
         }
-        ArrayList<WGLGLCapabilities> bucket = new ArrayList<WGLGLCapabilities>(1);
-        final int winattrbits = GLGraphicsConfigurationUtil.getWinAttributeBits(onscreen, usePBuffer);
+        List<GLCapabilitiesImmutable> bucket = new ArrayList<GLCapabilitiesImmutable>(1);
+        final int winattrbits = GLGraphicsConfigurationUtil.getWinAttributeBits(onscreen, usePBuffer, false);
         if(AttribList2GLCapabilities(bucket, glp, hdc, pfdID, iattributes, niattribs, iresults, winattrbits)) {
-            return bucket.get(0);
+            return (WGLGLCapabilities) bucket.get(0);
         }
         return null;
     }
@@ -342,7 +344,7 @@ public class WindowsWGLGraphicsConfiguration extends MutableGraphicsConfiguratio
 
         int[] pformatsTmp = new int[WindowsWGLGraphicsConfiguration.MAX_PFORMATS];
         int[] numFormatsTmp = new int[1];
-        if ( !sharedResource.getContext().getWGLExt().wglChoosePixelFormatARB(hdc, iattributes, 0,
+        if ( !((WindowsWGLContext)sharedResource.getContext()).getWGLExt().wglChoosePixelFormatARB(hdc, iattributes, 0,
                                                                 fattributes, 0,
                                                                 WindowsWGLGraphicsConfiguration.MAX_PFORMATS,
                                                                 pformatsTmp, 0, numFormatsTmp, 0))
@@ -372,19 +374,19 @@ public class WindowsWGLGraphicsConfiguration extends MutableGraphicsConfiguratio
         return pformats;
     }
 
-    static List /*<GLCapabilitiesImmutable>*/ wglARBPFIDs2GLCapabilities(WindowsWGLDrawableFactory.SharedResource sharedResource,
-                                                                         long hdc, int[] pfdIDs, GLProfile glp, boolean onscreen, boolean usePBuffer) {
-        final int winattrbits = GLGraphicsConfigurationUtil.getWinAttributeBits(onscreen, usePBuffer);
+    static List<GLCapabilitiesImmutable> wglARBPFIDs2GLCapabilities(WindowsWGLDrawableFactory.SharedResource sharedResource,
+                                                                    long hdc, int[] pfdIDs, GLProfile glp, boolean onscreen, boolean usePBuffer) {
+        final int winattrbits = GLGraphicsConfigurationUtil.getWinAttributeBits(onscreen, usePBuffer, false);
         return wglARBPFIDs2GLCapabilitiesImpl(sharedResource, hdc, pfdIDs, glp, winattrbits);
     }
 
-    static List /*<GLCapabilitiesImmutable>*/ wglARBPFIDs2AllGLCapabilities(WindowsWGLDrawableFactory.SharedResource sharedResource,
-                                                                            long hdc, int[] pfdIDs, GLProfile glp) {
+    static List <GLCapabilitiesImmutable> wglARBPFIDs2AllGLCapabilities(WindowsWGLDrawableFactory.SharedResource sharedResource,
+                                                                                  long hdc, int[] pfdIDs, GLProfile glp) {
         return wglARBPFIDs2GLCapabilitiesImpl(sharedResource, hdc, pfdIDs, glp, GLGraphicsConfigurationUtil.ALL_BITS);
     }
     
-    private static List /*<GLCapabilitiesImmutable>*/ wglARBPFIDs2GLCapabilitiesImpl(WindowsWGLDrawableFactory.SharedResource sharedResource,
-                                                                                     long hdc, int[] pfdIDs, GLProfile glp, int winattrbits) {
+    private static List <GLCapabilitiesImmutable> wglARBPFIDs2GLCapabilitiesImpl(WindowsWGLDrawableFactory.SharedResource sharedResource,
+                                                                                 long hdc, int[] pfdIDs, GLProfile glp, int winattrbits) {
         if (!sharedResource.hasARBPixelFormat()) {
             return null;
         }
@@ -398,7 +400,7 @@ public class WindowsWGLGraphicsConfiguration extends MutableGraphicsConfiguratio
 
         for(int i = 0; i<numFormats; i++) {
             if ( pfdIDs[i] >= 1 &&
-                 sharedResource.getContext().getWGLExt().wglGetPixelFormatAttribivARB(hdc, pfdIDs[i], 0, niattribs, iattributes, 0, iresults, 0) ) {
+                 ((WindowsWGLContext)sharedResource.getContext()).getWGLExt().wglGetPixelFormatAttribivARB(hdc, pfdIDs[i], 0, niattribs, iattributes, 0, iresults, 0) ) {
                 AttribList2GLCapabilities(bucket, glp, hdc, pfdIDs[i], iattributes, niattribs, iresults, winattrbits);
             } else if (DEBUG) {
                 System.err.println("wglARBPFIDs2GLCapabilities: Cannot get pixel format attributes for pixel format " +
@@ -507,9 +509,9 @@ public class WindowsWGLGraphicsConfiguration extends MutableGraphicsConfiguratio
             throw new GLException("Render-to-texture-rectangle requires render-to-texture to be specified");
           }
 
-          WindowsWGLContext sharedCtx = sharedResource.getContext();
+          GLContextImpl sharedCtx = sharedResource.getContext();
           if (rect) {
-            if (!sharedCtx.isExtensionAvailable("GL_NV_texture_rectangle")) {
+            if (!sharedCtx.isExtensionAvailable(GLExtensions.NV_texture_rectangle)) {
               throw new GLException("Render-to-texture-rectangle requires GL_NV_texture_rectangle extension");
             }
           }
@@ -600,7 +602,7 @@ public class WindowsWGLGraphicsConfiguration extends MutableGraphicsConfiguratio
         return val;
     }
 
-    static boolean AttribList2GLCapabilities( ArrayList<? extends GLCapabilitiesImmutable> capsBucket,
+    static boolean AttribList2GLCapabilities( List<GLCapabilitiesImmutable> capsBucket,
                                               final GLProfile glp, final long hdc, final int pfdID, final int[] iattribs,
                                               final int niattribs,
                                               final int[] iresults, final int winattrmask) {
@@ -658,15 +660,15 @@ public class WindowsWGLGraphicsConfiguration extends MutableGraphicsConfiguratio
     }
 
     static WGLGLCapabilities PFD2GLCapabilities(GLProfile glp, long hdc, int pfdID, boolean onscreen) {
-        final int winattrmask = GLGraphicsConfigurationUtil.getWinAttributeBits(onscreen, false);
-        ArrayList<WGLGLCapabilities> capsBucket = new ArrayList<WGLGLCapabilities>(1);
+        final int winattrmask = GLGraphicsConfigurationUtil.getWinAttributeBits(onscreen, false, false);
+        List<GLCapabilitiesImmutable> capsBucket = new ArrayList<GLCapabilitiesImmutable>(1);
         if( PFD2GLCapabilities(capsBucket, glp, hdc, pfdID, winattrmask) ) {
-            return capsBucket.get(0);
+            return (WGLGLCapabilities) capsBucket.get(0);
         }
         return null;
     }
 
-    static boolean  PFD2GLCapabilities(ArrayList<? extends GLCapabilitiesImmutable> capsBucket, final GLProfile glp, final long hdc, final int pfdID, final int winattrmask) {
+    static boolean  PFD2GLCapabilities(List<GLCapabilitiesImmutable> capsBucket, final GLProfile glp, final long hdc, final int pfdID, final int winattrmask) {
         PIXELFORMATDESCRIPTOR pfd = createPixelFormatDescriptor(hdc, pfdID);
         if(null == pfd) {
             return false;
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java
index 2c8c031..00ed91b 100644
--- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java
+++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java
@@ -52,6 +52,7 @@ import javax.media.opengl.GLProfile;
 
 import jogamp.nativewindow.windows.GDI;
 import jogamp.nativewindow.windows.PIXELFORMATDESCRIPTOR;
+import jogamp.opengl.GLDrawableImpl;
 import jogamp.opengl.GLGraphicsConfigurationFactory;
 import jogamp.opengl.GLGraphicsConfigurationUtil;
 
@@ -68,13 +69,13 @@ public class WindowsWGLGraphicsConfigurationFactory extends GLGraphicsConfigurat
     static VisualIDHolder.VIDComparator PfdIDComparator = new VisualIDHolder.VIDComparator(VisualIDHolder.VIDType.WIN32_PFD);
 
     static void registerFactory() {
-        GraphicsConfigurationFactory.registerFactory(com.jogamp.nativewindow.windows.WindowsGraphicsDevice.class, new WindowsWGLGraphicsConfigurationFactory());
+        GraphicsConfigurationFactory.registerFactory(com.jogamp.nativewindow.windows.WindowsGraphicsDevice.class, GLCapabilitiesImmutable.class, new WindowsWGLGraphicsConfigurationFactory());
     }
     private WindowsWGLGraphicsConfigurationFactory() {
     }
 
     protected AbstractGraphicsConfiguration chooseGraphicsConfigurationImpl(
-            CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested, CapabilitiesChooser chooser, AbstractGraphicsScreen absScreen) {
+            CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested, CapabilitiesChooser chooser, AbstractGraphicsScreen absScreen, int nativeVisualID) {
 
         if (! (capsChosen instanceof GLCapabilitiesImmutable) ) {
             throw new IllegalArgumentException("This NativeWindowFactory accepts only GLCapabilities objects - chosen");
@@ -99,10 +100,10 @@ public class WindowsWGLGraphicsConfigurationFactory extends GLGraphicsConfigurat
         if(null==absScreen) {
             absScreen = DefaultGraphicsScreen.createDefault(NativeWindowFactory.TYPE_WINDOWS);
         }
-        AbstractGraphicsDevice absDevice = absScreen.getDevice();
-
+        final AbstractGraphicsDevice absDevice = absScreen.getDevice();
+        final GLDrawableFactory factory = GLDrawableFactory.getDesktopFactory();
         capsChosen = GLGraphicsConfigurationUtil.fixGLCapabilities(
-                capsChosen, GLDrawableFactory.getDesktopFactory().canCreateGLPbuffer(absDevice) );
+                capsChosen, GLContext.isFBOAvailable(absDevice, capsChosen.getGLProfile()), factory.canCreateGLPbuffer(absDevice) );
 
         return new WindowsWGLGraphicsConfiguration( absScreen, capsChosen, capsReq, (GLCapabilitiesChooser)chooser );
     }
@@ -112,10 +113,10 @@ public class WindowsWGLGraphicsConfigurationFactory extends GLGraphicsConfigurat
         if(null == sharedResource) {
             throw new GLException("Shared resource for device n/a: "+device);
         }
-        WindowsWGLDrawable sharedDrawable = sharedResource.getDrawable();
+        GLDrawableImpl sharedDrawable = sharedResource.getDrawable();
         GLCapabilitiesImmutable capsChosen = sharedDrawable.getChosenGLCapabilities();
-        WindowsWGLContext sharedContext = sharedResource.getContext();
-        List/*<GLCapabilitiesImmutable>*/ availableCaps = null;
+        GLContext sharedContext = sharedResource.getContext();
+        List<GLCapabilitiesImmutable> availableCaps = null;
         
         if ( sharedResource.needsCurrentContext4ARBPFDQueries() ) {
             if(GLContext.CONTEXT_NOT_CURRENT == sharedContext.makeCurrent()) {
@@ -149,15 +150,15 @@ public class WindowsWGLGraphicsConfigurationFactory extends GLGraphicsConfigurat
         return availableCaps;
     }
 
-    static List/*<GLCapabilitiesImmutable>*/ getAvailableGLCapabilitiesARB(long hdc, WindowsWGLDrawableFactory.SharedResource sharedResource, GLProfile glProfile) {
-        int[] pformats = WindowsWGLGraphicsConfiguration.wglAllARBPFIDs(sharedResource.getContext(), hdc);
+    static List<GLCapabilitiesImmutable> getAvailableGLCapabilitiesARB(long hdc, WindowsWGLDrawableFactory.SharedResource sharedResource, GLProfile glProfile) {
+        int[] pformats = WindowsWGLGraphicsConfiguration.wglAllARBPFIDs((WindowsWGLContext)sharedResource.getContext(), hdc);
         return WindowsWGLGraphicsConfiguration.wglARBPFIDs2AllGLCapabilities(sharedResource, hdc, pformats, glProfile);
     }
 
-    static List/*<GLCapabilitiesImmutable>*/ getAvailableGLCapabilitiesGDI(long hdc, GLProfile glProfile) {
+    static List<GLCapabilitiesImmutable> getAvailableGLCapabilitiesGDI(long hdc, GLProfile glProfile) {
         int[] pformats = WindowsWGLGraphicsConfiguration.wglAllGDIPFIDs(hdc);
         int numFormats = pformats.length;
-        ArrayList<GLCapabilitiesImmutable> bucket = new ArrayList<GLCapabilitiesImmutable>(numFormats);
+        List<GLCapabilitiesImmutable> bucket = new ArrayList<GLCapabilitiesImmutable>(numFormats);
         for (int i = 0; i < numFormats; i++) {
             WindowsWGLGraphicsConfiguration.PFD2GLCapabilities(bucket, glProfile, hdc, pformats[i], GLGraphicsConfigurationUtil.ALL_BITS);
         }
@@ -265,7 +266,7 @@ public class WindowsWGLGraphicsConfigurationFactory extends GLGraphicsConfigurat
         }
         AbstractGraphicsDevice device = config.getScreen().getDevice();
         WindowsWGLDrawableFactory.SharedResource sharedResource = ((WindowsWGLDrawableFactory)factory).getOrCreateSharedResource(device);
-        WindowsWGLContext sharedContext = null;
+        GLContext sharedContext = null;
         if (null != sharedResource && sharedResource.needsCurrentContext4ARBPFDQueries()) {
             sharedContext = sharedResource.getContext();
             if(GLContext.CONTEXT_NOT_CURRENT == sharedContext.makeCurrent()) {
@@ -355,7 +356,7 @@ public class WindowsWGLGraphicsConfigurationFactory extends GLGraphicsConfigurat
                         System.err.println("updateGraphicsConfigurationARB: wglChoosePixelFormatARB failed with: "+capsChosen);
                     }
                     // 2nd choice: get all GLCapabilities available, no preferred recommendedIndex available
-                    pformats = WindowsWGLGraphicsConfiguration.wglAllARBPFIDs(sharedResource.getContext(), hdc);
+                    pformats = WindowsWGLGraphicsConfiguration.wglAllARBPFIDs((WindowsWGLContext)sharedResource.getContext(), hdc);
                     if (DEBUG) {
                         final int len = ( null != pformats ) ? pformats.length : 0;
                         System.err.println("updateGraphicsConfigurationARB: NumFormats (wglAllARBPFIDs) " + len);
@@ -370,7 +371,7 @@ public class WindowsWGLGraphicsConfigurationFactory extends GLGraphicsConfigurat
                 }
             }
 
-            List /*<WGLGLCapabilities>*/ availableCaps =
+            List<GLCapabilitiesImmutable> availableCaps =
                 WindowsWGLGraphicsConfiguration.wglARBPFIDs2GLCapabilities(sharedResource, hdc, pformats,
                                                                            glProfile, onscreen, usePBuffer);
             if( null == availableCaps || 0 == availableCaps.size() ) {
@@ -431,7 +432,7 @@ public class WindowsWGLGraphicsConfigurationFactory extends GLGraphicsConfigurat
         boolean onscreen = capsChosen.isOnscreen();
         GLProfile glProfile = capsChosen.getGLProfile();
 
-        ArrayList<WGLGLCapabilities> availableCaps = new ArrayList<WGLGLCapabilities>();
+        List<GLCapabilitiesImmutable> availableCaps = new ArrayList<GLCapabilitiesImmutable>();
         int pfdID; // chosen or preset PFD ID
         WGLGLCapabilities pixelFormatCaps = null; // chosen or preset PFD ID's caps
         boolean pixelFormatSet = false; // indicates a preset PFD ID [caps]
@@ -451,7 +452,7 @@ public class WindowsWGLGraphicsConfigurationFactory extends GLGraphicsConfigurat
             if(null == pformats) {
                 pformats = WindowsWGLGraphicsConfiguration.wglAllGDIPFIDs(hdc);
             }
-            final int winattrmask = GLGraphicsConfigurationUtil.getWinAttributeBits(onscreen, false);
+            final int winattrmask = GLGraphicsConfigurationUtil.getWinAttributeBits(onscreen, false, false);
 
             for (int i = 0; i < pformats.length; i++) {
                 WindowsWGLGraphicsConfiguration.PFD2GLCapabilities(availableCaps, glProfile, hdc, pformats[i], winattrmask);
@@ -481,7 +482,7 @@ public class WindowsWGLGraphicsConfigurationFactory extends GLGraphicsConfigurat
                 }
                 return false;
             }
-            pixelFormatCaps = availableCaps.get(chosenIndex);
+            pixelFormatCaps = (WGLGLCapabilities) availableCaps.get(chosenIndex);
             if (DEBUG) {
                 System.err.println("chosen pfdID (GDI): native recommended "+ (recommendedIndex+1) +
                                    ", caps " + pixelFormatCaps);
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/awt/WindowsAWTWGLGraphicsConfigurationFactory.java b/src/jogl/classes/jogamp/opengl/windows/wgl/awt/WindowsAWTWGLGraphicsConfigurationFactory.java
index bd64b58..3b2ff13 100644
--- a/src/jogl/classes/jogamp/opengl/windows/wgl/awt/WindowsAWTWGLGraphicsConfigurationFactory.java
+++ b/src/jogl/classes/jogamp/opengl/windows/wgl/awt/WindowsAWTWGLGraphicsConfigurationFactory.java
@@ -63,14 +63,14 @@ import javax.media.opengl.GLDrawableFactory;
 
 public class WindowsAWTWGLGraphicsConfigurationFactory extends GLGraphicsConfigurationFactory {
     public static void registerFactory() {
-        GraphicsConfigurationFactory.registerFactory(com.jogamp.nativewindow.awt.AWTGraphicsDevice.class, new WindowsAWTWGLGraphicsConfigurationFactory());
+        GraphicsConfigurationFactory.registerFactory(com.jogamp.nativewindow.awt.AWTGraphicsDevice.class, GLCapabilitiesImmutable.class, new WindowsAWTWGLGraphicsConfigurationFactory());
     }
     private WindowsAWTWGLGraphicsConfigurationFactory() {        
     }
 
     protected AbstractGraphicsConfiguration chooseGraphicsConfigurationImpl(
             CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested,
-            CapabilitiesChooser chooser, AbstractGraphicsScreen absScreen) {
+            CapabilitiesChooser chooser, AbstractGraphicsScreen absScreen, int nativeVisualID) {
         GraphicsDevice device = null;
         if (absScreen != null &&
             !(absScreen instanceof AWTGraphicsScreen)) {
@@ -105,11 +105,11 @@ public class WindowsAWTWGLGraphicsConfigurationFactory extends GLGraphicsConfigu
 
         WindowsGraphicsDevice winDevice = new WindowsGraphicsDevice(AbstractGraphicsDevice.DEFAULT_UNIT);
         DefaultGraphicsScreen winScreen = new DefaultGraphicsScreen(winDevice, awtScreen.getIndex());
-        GraphicsConfigurationFactory configFactory = GraphicsConfigurationFactory.getFactory(winDevice);
+        GraphicsConfigurationFactory configFactory = GraphicsConfigurationFactory.getFactory(winDevice, capsChosen);
         WindowsWGLGraphicsConfiguration winConfig = (WindowsWGLGraphicsConfiguration)
                                                        configFactory.chooseGraphicsConfiguration(capsChosen,
                                                                                                  capsRequested,
-                                                                                                 chooser, winScreen);
+                                                                                                 chooser, winScreen, nativeVisualID);
         if (winConfig == null) {
             throw new GLException("Unable to choose a GraphicsConfiguration: "+capsChosen+",\n\t"+chooser+"\n\t"+winScreen);
         }
diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11DummyGLXDrawable.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11DummyGLXDrawable.java
deleted file mode 100644
index a1039e5..0000000
--- a/src/jogl/classes/jogamp/opengl/x11/glx/X11DummyGLXDrawable.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/**
- * Copyright 2010 JogAmp Community. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are
- * permitted provided that the following conditions are met:
- * 
- *    1. Redistributions of source code must retain the above copyright notice, this list of
- *       conditions and the following disclaimer.
- * 
- *    2. Redistributions in binary form must reproduce the above copyright notice, this list
- *       of conditions and the following disclaimer in the documentation and/or other materials
- *       provided with the distribution.
- * 
- * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- * 
- * The views and conclusions contained in the software and documentation are those of the
- * authors and should not be interpreted as representing official policies, either expressed
- * or implied, of JogAmp Community.
- */
- 
-package jogamp.opengl.x11.glx;
-
-import javax.media.opengl.*;
-
-import com.jogamp.nativewindow.WrappedSurface;
-import com.jogamp.nativewindow.x11.X11GraphicsDevice;
-import com.jogamp.nativewindow.x11.X11GraphicsScreen;
-
-import jogamp.nativewindow.*;
-import jogamp.nativewindow.x11.*;
-
-public class X11DummyGLXDrawable extends X11OnscreenGLXDrawable {
-  private static final int f_dim = 64;
-  private long dummyWindow = 0;
-
-  /** 
-   * Due to the ATI Bug https://bugzilla.mozilla.org/show_bug.cgi?id=486277,
-   * we cannot switch the Display as we please, 
-   * hence we reuse the target's screen configuration. 
-   */
-  public X11DummyGLXDrawable(X11GraphicsScreen screen, GLDrawableFactory factory, GLCapabilitiesImmutable caps) {
-    super(factory, 
-          new WrappedSurface(X11GLXGraphicsConfigurationFactory.chooseGraphicsConfigurationStatic(
-            caps, caps, null, screen)));
-    this.realized = true;
-
-    WrappedSurface ns = (WrappedSurface) getNativeSurface();
-    X11GLXGraphicsConfiguration config = (X11GLXGraphicsConfiguration)ns.getGraphicsConfiguration();
-
-    X11GraphicsDevice device = (X11GraphicsDevice) screen.getDevice();
-    long dpy = device.getHandle();
-    int scrn = screen.getIndex();
-    int visualID = config.getXVisualID();
-
-    dummyWindow = X11Lib.CreateDummyWindow(dpy, scrn, visualID, f_dim, f_dim);
-    ns.setSurfaceHandle( dummyWindow );
-    ns.surfaceSizeChanged(f_dim, f_dim);
-
-    updateHandle();
-  }
-
-  public static X11DummyGLXDrawable create(X11GraphicsScreen screen, GLDrawableFactory factory, GLProfile glp) {
-      GLCapabilities caps = new GLCapabilities(glp);
-      return new X11DummyGLXDrawable(screen, factory, caps);
-  }
-
-  public void setSize(int width, int height) {
-  }
-
-  public int getWidth() {
-    return 1;
-  }
-
-  public int getHeight() {
-    return 1;
-  }
-
-  protected void destroyImpl() {
-    if(0!=dummyWindow) {
-        destroyHandle();
-        X11GLXGraphicsConfiguration config = (X11GLXGraphicsConfiguration)getNativeSurface().getGraphicsConfiguration();
-        X11Lib.DestroyDummyWindow(config.getScreen().getDevice().getHandle(), dummyWindow);
-    }
-  }
-}
diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11ExternalGLXContext.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11ExternalGLXContext.java
index 700b256..1f3edbd 100644
--- a/src/jogl/classes/jogamp/opengl/x11/glx/X11ExternalGLXContext.java
+++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11ExternalGLXContext.java
@@ -1,22 +1,22 @@
 /*
  * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
  * Copyright (c) 2010 JogAmp Community. All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- * 
+ *
  * - Redistribution of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
- * 
+ *
  * - Redistribution in binary form must reproduce the above copyright
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the distribution.
- * 
+ *
  * Neither the name of Sun Microsystems, Inc. or the names of
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * This software is provided "AS IS," without a warranty of any kind. ALL
  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -29,11 +29,11 @@
  * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
  * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
  * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
+ *
  * You acknowledge that this software is not designed or intended for use
  * in the design, construction, operation or maintenance of any nuclear
  * facility.
- * 
+ *
  * Sun gratefully acknowledges that this software was originally authored
  * and developed by Kenneth Bradley Russell and Christopher John Kline.
  */
@@ -41,6 +41,7 @@
 package jogamp.opengl.x11.glx;
 
 import javax.media.nativewindow.NativeSurface;
+import javax.media.nativewindow.VisualIDHolder;
 import javax.media.opengl.GLCapabilities;
 import javax.media.opengl.GLContext;
 import javax.media.opengl.GLDrawableFactory;
@@ -76,8 +77,15 @@ public class X11ExternalGLXContext extends X11GLXContext {
     long drawable = GLX.glXGetCurrentDrawable();
     if (drawable == 0) {
       throw new GLException("Error: attempted to make an external GLDrawable without a drawable/context current");
-    }
+    }    
     int[] val = new int[1];
+    
+    int w, h;
+    GLX.glXQueryDrawable(display, drawable, GLX.GLX_WIDTH, val, 0);
+    w=val[0];
+    GLX.glXQueryDrawable(display, drawable, GLX.GLX_HEIGHT, val, 0);
+    h=val[0];
+    
     GLX.glXQueryContext(display, ctx, GLX.GLX_SCREEN, val, 0);
     X11GraphicsScreen x11Screen = (X11GraphicsScreen) X11GraphicsScreen.createScreenDevice(display, val[0], false);
 
@@ -87,9 +95,9 @@ public class X11ExternalGLXContext extends X11GLXContext {
     // of 0, which doesn't work in a subsequent call to glXChooseFBConfig; if this happens,
     // create and use a default config (this has been observed when running on CentOS 5.5 inside
     // of VMWare Server 2.0 with the Mesa 6.5.1 drivers)
-    if( X11GLXGraphicsConfiguration.GLXFBConfigIDValid(display, x11Screen.getIndex(), val[0]) ) {
+    if( VisualIDHolder.VID_UNDEFINED == val[0] || !X11GLXGraphicsConfiguration.GLXFBConfigIDValid(display, x11Screen.getIndex(), val[0]) ) {
         GLCapabilities glcapsDefault = new GLCapabilities(GLProfile.getDefault());
-        cfg = X11GLXGraphicsConfigurationFactory.chooseGraphicsConfigurationStatic(glcapsDefault, glcapsDefault, null, x11Screen);
+        cfg = X11GLXGraphicsConfigurationFactory.chooseGraphicsConfigurationStatic(glcapsDefault, glcapsDefault, null, x11Screen, VisualIDHolder.VID_UNDEFINED);
         if(DEBUG) {
             System.err.println("X11ExternalGLXContext invalid FBCONFIG_ID "+val[0]+", using default cfg: " + cfg);
         }
@@ -97,15 +105,16 @@ public class X11ExternalGLXContext extends X11GLXContext {
         cfg = X11GLXGraphicsConfiguration.create(glp, x11Screen, val[0]);
     }
 
-    WrappedSurface ns = new WrappedSurface(cfg);
-    ns.setSurfaceHandle(drawable);
+    final WrappedSurface ns = new WrappedSurface(cfg, drawable, w, h, null);
     return new X11ExternalGLXContext(new Drawable(factory, ns), ctx);
   }
 
+  @Override
   protected boolean createImpl(GLContextImpl shareWith) {
       return true;
   }
 
+  @Override
   public int makeCurrent() throws GLException {
     // Save last context if necessary to allow external GLContexts to
     // talk to other GLContexts created by this library
@@ -115,20 +124,24 @@ public class X11ExternalGLXContext extends X11GLXContext {
       setCurrent(null);
     }
     return super.makeCurrent();
-  }  
+  }
 
+  @Override
   public void release() throws GLException {
     super.release();
     setCurrent(lastContext);
     lastContext = null;
   }
 
+  @Override
   protected void makeCurrentImpl() throws GLException {
   }
 
+  @Override
   protected void releaseImpl() throws GLException {
   }
 
+  @Override
   protected void destroyImpl() throws GLException {
   }
 
@@ -138,14 +151,17 @@ public class X11ExternalGLXContext extends X11GLXContext {
       super(factory, comp, true);
     }
 
+    @Override
     public GLContext createContext(GLContext shareWith) {
       throw new GLException("Should not call this");
     }
 
+    @Override
     public int getWidth() {
       throw new GLException("Should not call this");
     }
 
+    @Override
     public int getHeight() {
       throw new GLException("Should not call this");
     }
diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11ExternalGLXDrawable.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11ExternalGLXDrawable.java
index 4d02761..8652e2d 100644
--- a/src/jogl/classes/jogamp/opengl/x11/glx/X11ExternalGLXDrawable.java
+++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11ExternalGLXDrawable.java
@@ -1,21 +1,21 @@
 /*
  * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- * 
+ *
  * - Redistribution of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
- * 
+ *
  * - Redistribution in binary form must reproduce the above copyright
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the distribution.
- * 
+ *
  * Neither the name of Sun Microsystems, Inc. or the names of
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * This software is provided "AS IS," without a warranty of any kind. ALL
  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -28,11 +28,11 @@
  * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
  * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
  * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
+ *
  * You acknowledge that this software is not designed or intended for use
  * in the design, construction, operation or maintenance of any nuclear
  * facility.
- * 
+ *
  * Sun gratefully acknowledges that this software was originally authored
  * and developed by Kenneth Bradley Russell and Christopher John Kline.
  */
@@ -45,7 +45,6 @@ import javax.media.opengl.GLDrawableFactory;
 import javax.media.opengl.GLException;
 import javax.media.opengl.GLProfile;
 
-
 import com.jogamp.nativewindow.WrappedSurface;
 import com.jogamp.nativewindow.x11.X11GraphicsScreen;
 
@@ -88,12 +87,10 @@ public class X11ExternalGLXDrawable extends X11GLXDrawable {
         System.err.println("X11ExternalGLXDrawable: WARNING: forcing GLX_RGBA_TYPE for newly created contexts (current 0x"+Integer.toHexString(val[0])+")");
       }
     }
-    WrappedSurface ns = new WrappedSurface(cfg);
-    ns.setSurfaceHandle(drawable);
-    ns.surfaceSizeChanged(w, h);
-    return new X11ExternalGLXDrawable(factory, ns);
+    return new X11ExternalGLXDrawable(factory, new WrappedSurface(cfg, drawable, w, h, null));
   }
 
+  @Override
   public GLContext createContext(GLContext shareWith) {
     return new Context(this, shareWith);
   }
diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLCapabilities.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLCapabilities.java
index 96d4c77..e0b69ff 100644
--- a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLCapabilities.java
+++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLCapabilities.java
@@ -55,10 +55,12 @@ public class X11GLCapabilities extends GLCapabilities {
       this.fbcfgid = VisualIDHolder.VID_UNDEFINED;
   }
 
+  @Override
   public Object cloneMutable() {
     return clone();
   }
 
+  @Override
   public Object clone() {
     try {
       return super.clone();
@@ -86,9 +88,10 @@ public class X11GLCapabilities extends GLCapabilities {
               return getFBConfigID();
           default:
               throw new NativeWindowException("Invalid type <"+type+">");
-      }      
+      }
   }
-  
+
+  @Override
   public StringBuilder toString(StringBuilder sink) {
     if(null == sink) {
         sink = new StringBuilder();
diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java
index 2fd8cbc..e1e25be 100644
--- a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java
+++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java
@@ -1,22 +1,22 @@
 /*
  * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
  * Copyright (c) 2010 JogAmp Community. All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- * 
+ *
  * - Redistribution of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
- * 
+ *
  * - Redistribution in binary form must reproduce the above copyright
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the distribution.
- * 
+ *
  * Neither the name of Sun Microsystems, Inc. or the names of
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * This software is provided "AS IS," without a warranty of any kind. ALL
  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -29,11 +29,11 @@
  * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
  * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
  * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
+ *
  * You acknowledge that this software is not designed or intended for use
  * in the design, construction, operation or maintenance of any nuclear
  * facility.
- * 
+ *
  * Sun gratefully acknowledges that this software was originally authored
  * and developed by Kenneth Bradley Russell and Christopher John Kline.
  */
@@ -61,6 +61,7 @@ import jogamp.opengl.GLDrawableImpl;
 import com.jogamp.common.nio.Buffers;
 import com.jogamp.gluegen.runtime.ProcAddressTable;
 import com.jogamp.gluegen.runtime.opengl.GLProcAddressResolver;
+import com.jogamp.opengl.GLExtensions;
 
 public abstract class X11GLXContext extends GLContextImpl {
   private static final Map<String, String> functionNameMap;
@@ -83,15 +84,15 @@ public abstract class X11GLXContext extends GLContextImpl {
     functionNameMap.put("glFreeMemoryNV", "glXFreeMemoryNV");
 
     extensionNameMap = new HashMap<String, String>();
-    extensionNameMap.put("GL_ARB_pbuffer",      "GLX_SGIX_pbuffer");
-    extensionNameMap.put("GL_ARB_pixel_format", "GLX_SGIX_pbuffer"); // good enough
+    extensionNameMap.put(GLExtensions.ARB_pbuffer,      X11GLXDrawableFactory.GLX_SGIX_pbuffer);
+    extensionNameMap.put(GLExtensions.ARB_pixel_format, X11GLXDrawableFactory.GLX_SGIX_pbuffer); // good enough
   }
 
   X11GLXContext(GLDrawableImpl drawable,
                 GLContext shareWith) {
     super(drawable, shareWith);
   }
-  
+
   @Override
   protected void resetStates() {
     // no inner state _glXExt=null;
@@ -102,6 +103,7 @@ public abstract class X11GLXContext extends GLContextImpl {
     super.resetStates();
   }
 
+  @Override
   public final ProcAddressTable getPlatformExtProcAddressTable() {
     return getGLXExtProcAddressTable();
   }
@@ -110,6 +112,7 @@ public abstract class X11GLXContext extends GLContextImpl {
     return glXExtProcAddressTable;
   }
 
+  @Override
   public Object getPlatformGLExtensions() {
     return getGLXExt();
   }
@@ -121,14 +124,17 @@ public abstract class X11GLXContext extends GLContextImpl {
     return _glXExt;
   }
 
+  @Override
   protected Map<String, String> getFunctionNameMap() { return functionNameMap; }
 
+  @Override
   protected Map<String, String> getExtensionNameMap() { return extensionNameMap; }
 
   protected final boolean isGLXVersionGreaterEqualOneThree() {
-    return ((X11GLXDrawableFactory)drawable.getFactoryImpl()).isGLXVersionGreaterEqualOneThree(drawable.getNativeSurface().getGraphicsConfiguration().getScreen().getDevice());      
+    return ((X11GLXDrawableFactory)drawable.getFactoryImpl()).isGLXVersionGreaterEqualOneThree(drawable.getNativeSurface().getGraphicsConfiguration().getScreen().getDevice());
   }
-  
+
+  @Override
   public final boolean isGLReadDrawableAvailable() {
     return isGLXVersionGreaterEqualOneThree();
   }
@@ -146,7 +152,7 @@ public abstract class X11GLXContext extends GLContextImpl {
             throw new InternalError("Given readDrawable but no driver support");
         }
     } catch (RuntimeException re) {
-        if(TRACE_SWITCH) {
+        if(DEBUG || TRACE_SWITCH) {
           System.err.println(getThreadName()+": Warning: X11GLXContext.glXMakeContextCurrent failed: "+re+", with "+
             "dpy "+toHexString(dpy)+
             ", write "+toHexString(writeDrawable)+
@@ -158,6 +164,7 @@ public abstract class X11GLXContext extends GLContextImpl {
     return res;
   }
 
+  @Override
   protected void destroyContextARBImpl(long ctx) {
     X11GLXGraphicsConfiguration config = (X11GLXGraphicsConfiguration)drawable.getNativeSurface().getGraphicsConfiguration();
     long display = config.getScreen().getDevice().getHandle();
@@ -178,7 +185,8 @@ public abstract class X11GLXContext extends GLContextImpl {
         /*  8 */ 0,                                 0,
         /* 10 */ 0
     };
-    
+
+  @Override
   protected long createContextARBImpl(long share, boolean direct, int ctp, int major, int minor) {
     updateGLXProcAddressTable();
     GLXExt _glXExt = getGLXExt();
@@ -197,15 +205,15 @@ public abstract class X11GLXContext extends GLContextImpl {
     IntBuffer attribs = Buffers.newDirectIntBuffer(ctx_arb_attribs_rom);
     attribs.put(ctx_arb_attribs_idx_major + 1, major);
     attribs.put(ctx_arb_attribs_idx_minor + 1, minor);
-    
+
     if ( major > 3 || major == 3 && minor >= 2  ) {
         attribs.put(ctx_arb_attribs_idx_profile + 0, GLX.GLX_CONTEXT_PROFILE_MASK_ARB);
         if( ctBwdCompat ) {
             attribs.put(ctx_arb_attribs_idx_profile + 1, GLX.GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB);
         } else {
             attribs.put(ctx_arb_attribs_idx_profile + 1, GLX.GLX_CONTEXT_CORE_PROFILE_BIT_ARB);
-        } 
-    } 
+        }
+    }
 
     if ( major >= 3 ) {
         int flags = attribs.get(ctx_arb_attribs_idx_flags + 1);
@@ -253,6 +261,7 @@ public abstract class X11GLXContext extends GLContextImpl {
     return ctx;
   }
 
+  @Override
   protected boolean createImpl(GLContextImpl shareWith) {
       // covers the whole context creation loop incl createContextARBImpl and destroyContextARBImpl
       X11Util.setX11ErrorHandler(true, DEBUG ? false : true);
@@ -267,10 +276,10 @@ public abstract class X11GLXContext extends GLContextImpl {
     boolean direct = true; // try direct always
     isDirect = false; // fall back
 
-    X11GLXDrawableFactory factory = (X11GLXDrawableFactory)drawable.getFactoryImpl();
-    X11GLXGraphicsConfiguration config = (X11GLXGraphicsConfiguration)drawable.getNativeSurface().getGraphicsConfiguration();
-    AbstractGraphicsDevice device = config.getScreen().getDevice();
-    X11GLXContext sharedContext = (X11GLXContext) factory.getOrCreateSharedContextImpl(device);
+    final X11GLXDrawableFactory factory = (X11GLXDrawableFactory)drawable.getFactoryImpl();
+    final X11GLXGraphicsConfiguration config = (X11GLXGraphicsConfiguration)drawable.getNativeSurface().getGraphicsConfiguration();
+    final AbstractGraphicsDevice device = config.getScreen().getDevice();
+    final X11GLXContext sharedContext = (X11GLXContext) factory.getOrCreateSharedContextImpl(device);
     long display = device.getHandle();
 
     long share = 0;
@@ -329,7 +338,6 @@ public abstract class X11GLXContext extends GLContextImpl {
         }
         setGLFunctionAvailability(true, 0, 0, CTX_PROFILE_COMPAT); // use GL_VERSION
         glXMakeContextCurrent(display, 0, 0, 0); // release temp context
-
         if( !createContextARBTried ) {
             // is*Available calls are valid since setGLFunctionAvailability(..) was called
             final boolean isProcCreateContextAttribsARBAvailable = isFunctionAvailable("glXCreateContextAttribsARB");
@@ -340,7 +348,7 @@ public abstract class X11GLXContext extends GLContextImpl {
                 createContextARBTried=true;
                 if (DEBUG) {
                     if(0!=contextHandle) {
-                        System.err.println(getThreadName() + ": createContextImpl: OK (ARB, initial) share "+share);                        
+                        System.err.println(getThreadName() + ": createContextImpl: OK (ARB, initial) share "+share);
                     } else {
                         System.err.println(getThreadName() + ": createContextImpl: NOT OK (ARB, initial) - creation failed - share "+share);
                     }
@@ -385,9 +393,11 @@ public abstract class X11GLXContext extends GLContextImpl {
     if (DEBUG) {
         System.err.println(getThreadName() + ": createContextImpl: OK direct "+isDirect+"/"+direct);
     }
+
     return true;
   }
 
+  @Override
   protected void makeCurrentImpl() throws GLException {
     long dpy = drawable.getNativeSurface().getDisplayHandle();
 
@@ -403,6 +413,7 @@ public abstract class X11GLXContext extends GLContextImpl {
     }
   }
 
+  @Override
   protected void releaseImpl() throws GLException {
     long display = drawable.getNativeSurface().getDisplayHandle();
     X11Util.setX11ErrorHandler(true, DEBUG ? false : true);
@@ -415,10 +426,12 @@ public abstract class X11GLXContext extends GLContextImpl {
     }
   }
 
+  @Override
   protected void destroyImpl() throws GLException {
     GLX.glXDestroyContext(drawable.getNativeSurface().getDisplayHandle(), contextHandle);
   }
 
+  @Override
   protected void copyImpl(GLContext source, int mask) throws GLException {
     long dst = getHandle();
     long src = source.getHandle();
@@ -430,6 +443,7 @@ public abstract class X11GLXContext extends GLContextImpl {
     // Should check for X errors and raise GLException
   }
 
+  @Override
   protected final void updateGLXProcAddressTable() {
     final AbstractGraphicsConfiguration aconfig = drawable.getNativeSurface().getGraphicsConfiguration();
     final AbstractGraphicsDevice adevice = aconfig.getScreen().getDevice();
@@ -458,11 +472,12 @@ public abstract class X11GLXContext extends GLContextImpl {
     }
   }
 
+  @Override
   protected final StringBuilder getPlatformExtensionsStringImpl() {
     StringBuilder sb = new StringBuilder();
     if (DEBUG) {
       System.err.println("GLX Version client version "+ GLXUtil.getClientVersionNumber()+
-                         ", server: "+         
+                         ", server: "+
         ((X11GLXDrawableFactory)drawable.getFactoryImpl()).getGLXVersionNumber(drawable.getNativeSurface().getGraphicsConfiguration().getScreen().getDevice()));
     }
     final NativeSurface ns = drawable.getNativeSurface();
@@ -492,9 +507,10 @@ public abstract class X11GLXContext extends GLContextImpl {
     return sb;
   }
 
+  @Override
   public boolean isExtensionAvailable(String glExtensionName) {
-    if (glExtensionName.equals("GL_ARB_pbuffer") ||
-        glExtensionName.equals("GL_ARB_pixel_format")) {
+    if (glExtensionName.equals(GLExtensions.ARB_pbuffer) ||
+        glExtensionName.equals(GLExtensions.ARB_pixel_format)) {
       return getGLDrawable().getFactory().canCreateGLPbuffer(
           drawable.getNativeSurface().getGraphicsConfiguration().getScreen().getDevice() );
     }
@@ -532,7 +548,7 @@ public abstract class X11GLXContext extends GLContextImpl {
       }
       return hasSwapGroupNV;
   }
-  
+
   @Override
   protected final boolean queryMaxSwapGroupsImpl(int[] maxGroups, int maxGroups_offset,
                                                  int[] maxBarriers, int maxBarriers_offset) {
@@ -541,7 +557,7 @@ public abstract class X11GLXContext extends GLContextImpl {
       if (initSwapGroupImpl(glXExt)>0) {
         final NativeSurface ns = drawable.getNativeSurface();
         try {
-            if( glXExt.glXQueryMaxSwapGroupsNV(ns.getDisplayHandle(), ns.getScreenIndex(), 
+            if( glXExt.glXQueryMaxSwapGroupsNV(ns.getDisplayHandle(), ns.getScreenIndex(),
                                                maxGroups, maxGroups_offset,
                                                maxBarriers, maxBarriers_offset) ) {
                 res = true;
@@ -550,7 +566,7 @@ public abstract class X11GLXContext extends GLContextImpl {
       }
       return res;
   }
-  
+
   @Override
   protected final boolean joinSwapGroupImpl(int group) {
       boolean res = false;
@@ -565,7 +581,7 @@ public abstract class X11GLXContext extends GLContextImpl {
       }
       return res;
   }
-  
+
   @Override
   protected final boolean bindSwapBarrierImpl(int group, int barrier) {
       boolean res = false;
@@ -577,7 +593,7 @@ public abstract class X11GLXContext extends GLContextImpl {
             }
         } catch (Throwable t) { hasSwapGroupNV=-1; }
       }
-      return res;  
+      return res;
   }
 
   @Override
@@ -585,6 +601,7 @@ public abstract class X11GLXContext extends GLContextImpl {
     return getGLXExt().glXAllocateMemoryNV(arg0, arg1, arg2, arg3);
   }
 
+  @Override
   public int getOffscreenContextPixelDataType() {
     throw new GLException("Should not call this");
   }
@@ -593,18 +610,22 @@ public abstract class X11GLXContext extends GLContextImpl {
     throw new GLException("Should not call this");
   }
 
+  @Override
   public boolean offscreenImageNeedsVerticalFlip() {
     throw new GLException("Should not call this");
   }
 
+  @Override
   public void bindPbufferToTexture() {
     throw new GLException("Should not call this");
   }
 
+  @Override
   public void releasePbufferFromTexture() {
     throw new GLException("Should not call this");
   }
 
+  @Override
   public String toString() {
     StringBuilder sb = new StringBuilder();
     sb.append(getClass().getSimpleName());
diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawable.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawable.java
index 61f2ef9..e9912ce 100644
--- a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawable.java
+++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawable.java
@@ -1,22 +1,22 @@
 /*
  * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
  * Copyright (c) 2010 JogAmp Community. All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- * 
+ *
  * - Redistribution of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
- * 
+ *
  * - Redistribution in binary form must reproduce the above copyright
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the distribution.
- * 
+ *
  * Neither the name of Sun Microsystems, Inc. or the names of
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * This software is provided "AS IS," without a warranty of any kind. ALL
  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -29,31 +29,34 @@
  * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
  * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
  * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
+ *
  * You acknowledge that this software is not designed or intended for use
  * in the design, construction, operation or maintenance of any nuclear
  * facility.
- * 
+ *
  * Sun gratefully acknowledges that this software was originally authored
  * and developed by Kenneth Bradley Russell and Christopher John Kline.
  */
 
 package jogamp.opengl.x11.glx;
 
-import javax.media.nativewindow.*;
-import javax.media.opengl.*;
+import javax.media.nativewindow.NativeSurface;
+import javax.media.opengl.GLDrawableFactory;
 
-import jogamp.opengl.*;
+import jogamp.opengl.GLDrawableImpl;
+import jogamp.opengl.GLDynamicLookupHelper;
 
 public abstract class X11GLXDrawable extends GLDrawableImpl {
   protected X11GLXDrawable(GLDrawableFactory factory, NativeSurface comp, boolean realized) {
     super(factory, comp, realized);
   }
 
+  @Override
   public GLDynamicLookupHelper getGLDynamicLookupHelper() {
     return getFactoryImpl().getGLDynamicLookupHelper(0);
   }
 
+  @Override
   protected void setRealizedImpl() {
     if(realized) {
         X11GLXGraphicsConfiguration config = (X11GLXGraphicsConfiguration)getNativeSurface().getGraphicsConfiguration();
@@ -65,6 +68,7 @@ public abstract class X11GLXDrawable extends GLDrawableImpl {
     }
   }
 
+  @Override
   protected final void swapBuffersImpl() {
     // single-buffer is already filtered out @ GLDrawableImpl#swapBuffers()
     GLX.glXSwapBuffers(getNativeSurface().getDisplayHandle(), getHandle());
diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java
index 092d343..b2e74f9 100644
--- a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java
+++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java
@@ -1,22 +1,22 @@
 /*
  * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
  * Copyright (c) 2010 JogAmp Community. All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- * 
+ *
  * - Redistribution of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
- * 
+ *
  * - Redistribution in binary form must reproduce the above copyright
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the distribution.
- * 
+ *
  * Neither the name of Sun Microsystems, Inc. or the names of
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * This software is provided "AS IS," without a warranty of any kind. ALL
  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -29,7 +29,7 @@
  * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
  * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
  * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
+ *
  * You acknowledge that this software is not designed or intended for use
  * in the design, construction, operation or maintenance of any nuclear
  * facility.
@@ -49,6 +49,9 @@ import javax.media.nativewindow.AbstractGraphicsScreen;
 import javax.media.nativewindow.NativeSurface;
 import javax.media.nativewindow.NativeWindowFactory;
 import javax.media.nativewindow.ProxySurface;
+import javax.media.nativewindow.ProxySurface.UpstreamSurfaceHook;
+import javax.media.nativewindow.VisualIDHolder;
+import javax.media.opengl.GLCapabilities;
 import javax.media.opengl.GLCapabilitiesChooser;
 import javax.media.opengl.GLCapabilitiesImmutable;
 import javax.media.opengl.GLContext;
@@ -64,6 +67,7 @@ import jogamp.opengl.GLContextImpl;
 import jogamp.opengl.GLDrawableFactoryImpl;
 import jogamp.opengl.GLDrawableImpl;
 import jogamp.opengl.GLDynamicLookupHelper;
+import jogamp.opengl.GLGraphicsConfigurationUtil;
 import jogamp.opengl.SharedResourceRunner;
 
 import com.jogamp.common.util.VersionNumber;
@@ -72,15 +76,17 @@ import com.jogamp.nativewindow.x11.X11GraphicsDevice;
 import com.jogamp.nativewindow.x11.X11GraphicsScreen;
 
 public class X11GLXDrawableFactory extends GLDrawableFactoryImpl {
-  
+
   public static final VersionNumber versionOneZero = new VersionNumber(1, 0, 0);
   public static final VersionNumber versionOneOne = new VersionNumber(1, 1, 0);
   public static final VersionNumber versionOneTwo = new VersionNumber(1, 2, 0);
   public static final VersionNumber versionOneThree = new VersionNumber(1, 3, 0);
   public static final VersionNumber versionOneFour = new VersionNumber(1, 4, 0);
 
-  private static DesktopGLDynamicLookupHelper x11GLXDynamicLookupHelper = null;
+  static final String GLX_SGIX_pbuffer = "GLX_SGIX_pbuffer";
   
+  private static DesktopGLDynamicLookupHelper x11GLXDynamicLookupHelper = null;
+
   public X11GLXDrawableFactory() {
     super();
 
@@ -93,30 +99,31 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl {
                 if(DEBUG) {
                     gle.printStackTrace();
                 }
-            }            
+            }
             if(null!=tmp && tmp.isLibComplete()) {
                 x11GLXDynamicLookupHelper = tmp;
                 GLX.getGLXProcAddressTable().reset(x11GLXDynamicLookupHelper);
             }
         }
     }
-    
+
     defaultDevice = new X11GraphicsDevice(X11Util.getNullDisplayName(), AbstractGraphicsDevice.DEFAULT_UNIT);
-    
+
     if(null!=x11GLXDynamicLookupHelper) {
         // Register our GraphicsConfigurationFactory implementations
         // The act of constructing them causes them to be registered
         X11GLXGraphicsConfigurationFactory.registerFactory();
-        
+
         sharedMap = new HashMap<String, SharedResourceRunner.Resource>();
-        
+
         // Init shared resources off thread
         // Will be released via ShutdownHook
         sharedResourceRunner = new SharedResourceRunner(new SharedResourceImplementation());
         sharedResourceRunner.start();
-    }    
+    }
   }
 
+  @Override
   protected final void destroy(ShutdownType shutdownType) {
     if(null != sharedResourceRunner) {
         sharedResourceRunner.stop();
@@ -129,7 +136,7 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl {
     defaultDevice = null;
     /**
      * Pulling away the native library may cause havoc ..
-     * 
+     *
     if(ShutdownType.COMPLETE == shutdownType && null != x11GLXDynamicLookupHelper) {
         x11GLXDynamicLookupHelper.destroy();
         x11GLXDynamicLookupHelper = null;
@@ -140,19 +147,20 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl {
     X11Util.shutdown( false, DEBUG );
   }
 
+  @Override
   public final GLDynamicLookupHelper getGLDynamicLookupHelper(int profile) {
       return x11GLXDynamicLookupHelper;
   }
 
   private X11GraphicsDevice defaultDevice;
   private SharedResourceRunner sharedResourceRunner;
-  private HashMap<String /* connection */, SharedResourceRunner.Resource> sharedMap;  
+  private HashMap<String /* connection */, SharedResourceRunner.Resource> sharedMap;
 
   static class SharedResource implements SharedResourceRunner.Resource {
       X11GraphicsDevice device;
       X11GraphicsScreen screen;
-      X11DummyGLXDrawable drawable;
-      X11GLXContext context;
+      GLDrawableImpl drawable;
+      GLContextImpl context;
       String glXServerVendorName;
       boolean isGLXServerVendorATI;
       boolean isGLXServerVendorNVIDIA;
@@ -162,23 +170,27 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl {
       boolean glXMultisampleAvailable;
 
       SharedResource(X11GraphicsDevice dev, X11GraphicsScreen scrn,
-                     X11DummyGLXDrawable draw, X11GLXContext ctx,
+                     GLDrawableImpl draw, GLContextImpl ctx,
                      VersionNumber glXServerVer, String glXServerVendor, boolean glXServerMultisampleAvail) {
           device = dev;
           screen = scrn;
           drawable = draw;
           context = ctx;
           glXServerVersion = glXServerVer;
-          glXServerVersionOneOneCapable = glXServerVersion.compareTo(versionOneOne) >= 0 ;        
-          glXServerVersionOneThreeCapable = glXServerVersion.compareTo(versionOneThree) >= 0 ;        
+          glXServerVersionOneOneCapable = glXServerVersion.compareTo(versionOneOne) >= 0 ;
+          glXServerVersionOneThreeCapable = glXServerVersion.compareTo(versionOneThree) >= 0 ;
           glXServerVendorName = glXServerVendor;
           isGLXServerVendorATI = GLXUtil.isVendorATI(glXServerVendorName);
           isGLXServerVendorNVIDIA = GLXUtil.isVendorNVIDIA(glXServerVendorName);
           glXMultisampleAvailable = glXServerMultisampleAvail;
       }
+      @Override
       final public AbstractGraphicsDevice getDevice() { return device; }
+      @Override
       final public AbstractGraphicsScreen getScreen() { return screen; }
+      @Override
       final public GLDrawableImpl getDrawable() { return drawable; }
+      @Override
       final public GLContextImpl getContext() { return context; }
 
       final String getGLXVendorName() { return glXServerVendorName; }
@@ -191,60 +203,67 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl {
   }
 
   class SharedResourceImplementation implements SharedResourceRunner.Implementation {
+        @Override
         public void clear() {
             synchronized(sharedMap) {
                 sharedMap.clear();
             }
         }
+        @Override
         public SharedResourceRunner.Resource mapPut(String connection, SharedResourceRunner.Resource resource) {
             synchronized(sharedMap) {
                 return sharedMap.put(connection, resource);
             }
         }
+        @Override
         public SharedResourceRunner.Resource mapGet(String connection) {
             synchronized(sharedMap) {
                 return sharedMap.get(connection);
             }
         }
+        @Override
         public Collection<SharedResourceRunner.Resource> mapValues() {
             synchronized(sharedMap) {
                 return sharedMap.values();
             }
         }
 
+        @Override
         public SharedResourceRunner.Resource createSharedResource(String connection) {
-            X11GraphicsDevice sharedDevice = 
-                    new X11GraphicsDevice(X11Util.openDisplay(connection), AbstractGraphicsDevice.DEFAULT_UNIT, 
-                                          true); // own non-shared display connection, no locking
-                    // new X11GraphicsDevice(X11Util.openDisplay(connection), AbstractGraphicsDevice.DEFAULT_UNIT, 
-                    //                       NativeWindowFactory.getNullToolkitLock(), true); // own non-shared display connection, no locking
+            final X11GraphicsDevice sharedDevice =
+                    new X11GraphicsDevice(X11Util.openDisplay(connection), AbstractGraphicsDevice.DEFAULT_UNIT,
+                                          true); // own non-shared display connection, w/ locking
+                    // new X11GraphicsDevice(X11Util.openDisplay(connection), AbstractGraphicsDevice.DEFAULT_UNIT,
+                    //                       NativeWindowFactory.getNullToolkitLock(), true); // own non-shared display connection, w/o locking
             sharedDevice.lock();
             try {
+                final X11GraphicsScreen sharedScreen = new X11GraphicsScreen(sharedDevice, 0);
+                
                 if(!GLXUtil.isGLXAvailableOnServer(sharedDevice)) {
                     throw new GLException("GLX not available on device/server: "+sharedDevice);
                 }
-                GLXUtil.initGLXClientDataSingleton(sharedDevice);                
+                GLXUtil.initGLXClientDataSingleton(sharedDevice);
                 final String glXServerVendorName = GLX.glXQueryServerString(sharedDevice.getHandle(), 0, GLX.GLX_VENDOR);
                 final VersionNumber glXServerVersion = GLXUtil.getGLXServerVersionNumber(sharedDevice.getHandle());
-                final boolean glXServerMultisampleAvailable = GLXUtil.isMultisampleAvailable(GLX.glXQueryServerString(sharedDevice.getHandle(), 0, GLX.GLX_EXTENSIONS));                
+                final boolean glXServerMultisampleAvailable = GLXUtil.isMultisampleAvailable(GLX.glXQueryServerString(sharedDevice.getHandle(), 0, GLX.GLX_EXTENSIONS));
                 if(X11Util.ATI_HAS_XCLOSEDISPLAY_BUG && GLXUtil.isVendorATI(glXServerVendorName)) {
                     X11Util.setMarkAllDisplaysUnclosable(true);
                     X11Util.markDisplayUncloseable(sharedDevice.getHandle());
                 }
-                X11GraphicsScreen sharedScreen = new X11GraphicsScreen(sharedDevice, 0);
-
-                GLProfile glp = GLProfile.get(sharedDevice, GLProfile.GL_PROFILE_LIST_MIN_DESKTOP, false);
+                
+                final GLProfile glp = GLProfile.get(sharedDevice, GLProfile.GL_PROFILE_LIST_MIN_DESKTOP, false);
                 if (null == glp) {
                     throw new GLException("Couldn't get default GLProfile for device: "+sharedDevice);
                 }
-                X11DummyGLXDrawable sharedDrawable = X11DummyGLXDrawable.create(sharedScreen, X11GLXDrawableFactory.this, glp);
-                if (null == sharedDrawable) {
-                    throw new GLException("Couldn't create shared drawable for screen: "+sharedScreen+", "+glp);
-                }
-                X11GLXContext sharedContext = (X11GLXContext) sharedDrawable.createContext(null);
+                
+                final GLDrawableImpl sharedDrawable = createOnscreenDrawableImpl(createDummySurfaceImpl(sharedDevice, false, new GLCapabilities(glp), null, 64, 64));
+                sharedDrawable.setRealized(true);
+                
+                final GLContextImpl sharedContext = (GLContextImpl) sharedDrawable.createContext(null);
                 if (null == sharedContext) {
                     throw new GLException("Couldn't create shared context for drawable: "+sharedDrawable);
                 }
+                
                 boolean madeCurrent = false;
                 sharedContext.makeCurrent();
                 try {
@@ -263,8 +282,8 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl {
                     System.err.println("GLX Client Version:     " + GLXUtil.getClientVersionNumber());
                     System.err.println("GLX Client Multisample: " + GLXUtil.isClientMultisampleAvailable());
                 }
-                return new SharedResource(sharedDevice, sharedScreen, sharedDrawable, sharedContext, 
-                                          glXServerVersion, glXServerVendorName, 
+                return new SharedResource(sharedDevice, sharedScreen, sharedDrawable, sharedContext,
+                                          glXServerVersion, glXServerVendorName,
                                           glXServerMultisampleAvailable && GLXUtil.isClientMultisampleAvailable());
             } catch (Throwable t) {
                 throw new GLException("X11GLXDrawableFactory - Could not initialize shared resources for "+connection, t);
@@ -273,6 +292,7 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl {
             }
         }
 
+        @Override
         public void releaseSharedResource(SharedResourceRunner.Resource shared) {
             SharedResource sr = (SharedResource) shared;
             if (DEBUG) {
@@ -286,13 +306,13 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl {
 
             if (null != sr.context) {
                 // may cause JVM SIGSEGV:
-                sr.context.destroy();
+                sr.context.destroy(); // will also pull the dummy MutuableSurface
                 sr.context = null;
             }
 
             if (null != sr.drawable) {
                 // may cause JVM SIGSEGV:
-                sr.drawable.destroy();
+                sr.drawable.setRealized(false);
                 sr.drawable = null;
             }
 
@@ -308,10 +328,12 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl {
         }
   }
 
+  @Override
   public final AbstractGraphicsDevice getDefaultDevice() {
       return defaultDevice;
   }
 
+  @Override
   public final boolean getIsDeviceCompatible(AbstractGraphicsDevice device) {
       if(null != x11GLXDynamicLookupHelper && device instanceof X11GraphicsDevice) {
           return true;
@@ -319,10 +341,12 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl {
       return false;
   }
 
+  @Override
   protected final Thread getSharedResourceThread() {
     return sharedResourceRunner.start();
   }
-    
+
+  @Override
   protected final boolean createSharedResource(AbstractGraphicsDevice device) {
     try {
         SharedResourceRunner.Resource sr = sharedResourceRunner.getOrCreateShared(device);
@@ -337,7 +361,8 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl {
     }
     return false;
   }
-  
+
+  @Override
   protected final GLContext getOrCreateSharedContextImpl(AbstractGraphicsDevice device) {
     SharedResourceRunner.Resource sr = sharedResourceRunner.getOrCreateShared(device);
     if(null!=sr) {
@@ -346,6 +371,7 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl {
     return null;
   }
 
+  @Override
   protected AbstractGraphicsDevice getOrCreateSharedDeviceImpl(AbstractGraphicsDevice device) {
     SharedResourceRunner.Resource sr = sharedResourceRunner.getOrCreateShared(device);
     if(null!=sr) {
@@ -366,17 +392,20 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl {
     return (SharedResource) sharedResourceRunner.getOrCreateShared(device);
   }
 
+  @Override
   protected List<GLCapabilitiesImmutable> getAvailableCapabilitiesImpl(AbstractGraphicsDevice device) {
     return X11GLXGraphicsConfigurationFactory.getAvailableCapabilities(this, device);
   }
 
+  @Override
   protected final GLDrawableImpl createOnscreenDrawableImpl(NativeSurface target) {
     if (target == null) {
       throw new IllegalArgumentException("Null target");
     }
-    return new X11OnscreenGLXDrawable(this, target);
+    return new X11OnscreenGLXDrawable(this, target, false);
   }
 
+  @Override
   protected final GLDrawableImpl createOffscreenDrawableImpl(NativeSurface target) {
     if (target == null) {
       throw new IllegalArgumentException("Null target");
@@ -412,7 +441,7 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl {
   }
 
   public final boolean isGLXMultisampleAvailable(AbstractGraphicsDevice device) {
-    if(null != device) {  
+    if(null != device) {
         SharedResource sr = (SharedResource) sharedResourceRunner.getOrCreateShared(device);
         if(null!=sr) {
           return sr.isGLXMultisampleAvailable();
@@ -422,7 +451,7 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl {
   }
 
   public final VersionNumber getGLXVersionNumber(AbstractGraphicsDevice device) {
-    if(null != device) {  
+    if(null != device) {
         SharedResource sr = (SharedResource) sharedResourceRunner.getOrCreateShared(device);
         if(null!=sr) {
           return sr.getGLXVersion();
@@ -433,9 +462,9 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl {
     }
     return null;
   }
-  
+
   public final boolean isGLXVersionGreaterEqualOneOne(AbstractGraphicsDevice device) {
-    if(null != device) {  
+    if(null != device) {
         SharedResource sr = (SharedResource) sharedResourceRunner.getOrCreateShared(device);
         if(null!=sr) {
           return sr.isGLXVersionGreaterEqualOneOne();
@@ -447,9 +476,9 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl {
     }
     return false;
   }
-  
+
   public final boolean isGLXVersionGreaterEqualOneThree(AbstractGraphicsDevice device) {
-    if(null != device) {  
+    if(null != device) {
         SharedResource sr = (SharedResource) sharedResourceRunner.getOrCreateShared(device);
         if(null!=sr) {
           return sr.isGLXVersionGreaterEqualOneThree();
@@ -462,6 +491,7 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl {
     return false;
   }
 
+  @Override
   public final boolean canCreateGLPbuffer(AbstractGraphicsDevice device) {
       if(null == device) {
         SharedResourceRunner.Resource sr = sharedResourceRunner.getOrCreateShared(defaultDevice);
@@ -472,57 +502,122 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl {
       return isGLXVersionGreaterEqualOneThree(device);
   }
 
-  protected final NativeSurface createOffscreenSurfaceImpl(AbstractGraphicsDevice deviceReq,
-                                                           GLCapabilitiesImmutable capsChosen, GLCapabilitiesImmutable capsRequested,
-                                                           GLCapabilitiesChooser chooser,
-                                                           int width, int height) {
-    if(null == deviceReq) {
-        throw new InternalError("deviceReq is null");
+  @Override
+  protected final ProxySurface createMutableSurfaceImpl(AbstractGraphicsDevice deviceReq, boolean createNewDevice, 
+                                                        GLCapabilitiesImmutable capsChosen,
+                                                        GLCapabilitiesImmutable capsRequested,
+                                                        GLCapabilitiesChooser chooser, int width, int height, UpstreamSurfaceHook lifecycleHook) {
+    final X11GraphicsDevice device;
+    if(createNewDevice) {
+        // Null X11 locking, due to private non-shared Display handle
+        device = new X11GraphicsDevice(X11Util.openDisplay(deviceReq.getConnection()), deviceReq.getUnitID(), NativeWindowFactory.getNullToolkitLock(), true);
+    } else {
+        device = (X11GraphicsDevice)deviceReq;
     }
-    final SharedResourceRunner.Resource sr = sharedResourceRunner.getOrCreateShared(deviceReq);
-    if(null==sr) {
-        throw new InternalError("No SharedResource for: "+deviceReq);
+    final X11GraphicsScreen screen = new X11GraphicsScreen(device, 0);
+    final X11GLXGraphicsConfiguration config = X11GLXGraphicsConfigurationFactory.chooseGraphicsConfigurationStatic(capsChosen, capsRequested, chooser, screen, VisualIDHolder.VID_UNDEFINED);
+    if(null == config) {
+        throw new GLException("Choosing GraphicsConfiguration failed w/ "+capsChosen+" on "+screen); 
     }
-    final X11GraphicsScreen sharedScreen = (X11GraphicsScreen) sr.getScreen();
-    final AbstractGraphicsDevice sharedDevice = sharedScreen.getDevice(); // should be same ..
-
-    // create screen/device pair - Null X11 locking, due to private non-shared Display handle
-    final X11GraphicsDevice device = new X11GraphicsDevice(X11Util.openDisplay(sharedDevice.getConnection()), AbstractGraphicsDevice.DEFAULT_UNIT, NativeWindowFactory.getNullToolkitLock(), true);
-    final X11GraphicsScreen screen = new X11GraphicsScreen(device, sharedScreen.getIndex()); 
-    
-    WrappedSurface ns = new WrappedSurface(
-               X11GLXGraphicsConfigurationFactory.chooseGraphicsConfigurationStatic(capsChosen, capsRequested, chooser, screen) );
-    if(ns != null) {
-        ns.surfaceSizeChanged(width, height);
+    return new WrappedSurface( config, 0, width, height, lifecycleHook);
+  }
+
+  @Override
+  public final ProxySurface createDummySurfaceImpl(AbstractGraphicsDevice deviceReq, boolean createNewDevice, 
+                                                   GLCapabilitiesImmutable requestedCaps, GLCapabilitiesChooser chooser, int width, int height) {
+    final GLCapabilitiesImmutable chosenCaps = GLGraphicsConfigurationUtil.fixOnscreenGLCapabilities(requestedCaps);
+    return createMutableSurfaceImpl(deviceReq, createNewDevice, chosenCaps, requestedCaps, chooser, width, height, dummySurfaceLifecycleHook); 
+  }  
+  private static final ProxySurface.UpstreamSurfaceHook dummySurfaceLifecycleHook = new ProxySurface.UpstreamSurfaceHook() {
+    @Override
+    public final void create(ProxySurface s) {
+        if( 0 == s.getSurfaceHandle() ) {
+            final X11GLXGraphicsConfiguration cfg = (X11GLXGraphicsConfiguration) s.getGraphicsConfiguration();
+            final X11GraphicsScreen screen = (X11GraphicsScreen) cfg.getScreen();
+            final X11GraphicsDevice device = (X11GraphicsDevice) screen.getDevice();
+            if(0 == device.getHandle()) {
+                device.open();
+                s.setImplBitfield(ProxySurface.OWN_DEVICE);
+            }
+            final long windowHandle = X11Lib.CreateDummyWindow(device.getHandle(), screen.getIndex(), cfg.getXVisualID(), s.getWidth(), s.getHeight());
+            if(0 == windowHandle) {
+                throw new GLException("Creating dummy window failed w/ "+cfg+", "+s.getWidth()+"x"+s.getHeight());
+            }
+            s.setSurfaceHandle(windowHandle);
+            if(DEBUG) {
+                System.err.println("X11GLXDrawableFactory.dummySurfaceLifecycleHook.create: "+s);
+            }
+        }
+    }
+    @Override
+    public final void destroy(ProxySurface s) {
+        if(0 != s.getSurfaceHandle()) {
+            final X11GLXGraphicsConfiguration config = (X11GLXGraphicsConfiguration) s.getGraphicsConfiguration();
+            final X11GraphicsDevice device = (X11GraphicsDevice) config.getScreen().getDevice();
+            X11Lib.DestroyDummyWindow(device.getHandle(), s.getSurfaceHandle());            
+            s.setSurfaceHandle(0);
+            if( 0 != ( ProxySurface.OWN_DEVICE & s.getImplBitfield() ) ) {
+                device.close();
+            }
+            if(DEBUG) {
+                System.err.println("X11GLXDrawableFactory.dummySurfaceLifecycleHook.destroy: "+s);
+            }
+        }
     }
-    return ns;
+    @Override
+    public final int getWidth(ProxySurface s) {
+        return s.initialWidth;
+    }
+    @Override
+    public final int getHeight(ProxySurface s) {
+        return s.initialHeight;
+    }
+    @Override
+    public String toString() {
+       return "X11SurfaceLifecycleHook[]";
+    }
+  };
+  
+  
+  @Override
+  protected final ProxySurface createProxySurfaceImpl(AbstractGraphicsDevice deviceReq, int screenIdx, long windowHandle, GLCapabilitiesImmutable capsRequested, GLCapabilitiesChooser chooser, UpstreamSurfaceHook upstream) {
+    final X11GraphicsDevice device = new X11GraphicsDevice(X11Util.openDisplay(deviceReq.getConnection()), deviceReq.getUnitID(), NativeWindowFactory.getNullToolkitLock(), true);
+    final X11GraphicsScreen screen = new X11GraphicsScreen(device, screenIdx);
+    final int xvisualID = X11Lib.GetVisualIDFromWindow(device.getHandle(), windowHandle);
+    if(VisualIDHolder.VID_UNDEFINED == xvisualID) {
+        throw new GLException("Undefined VisualID of window 0x"+Long.toHexString(windowHandle)+", window probably invalid");
+    }
+    if(DEBUG) {
+        System.err.println("X11GLXDrawableFactory.createProxySurfaceImpl 0x"+Long.toHexString(windowHandle)+": visualID 0x"+Integer.toHexString(xvisualID));
+    }
+    final X11GLXGraphicsConfiguration cfg = X11GLXGraphicsConfigurationFactory.chooseGraphicsConfigurationStatic(capsRequested, capsRequested, chooser, screen, xvisualID);
+    if(DEBUG) {
+        System.err.println("X11GLXDrawableFactory.createProxySurfaceImpl 0x"+Long.toHexString(windowHandle)+": "+cfg);
+    }
+    return new WrappedSurface(cfg, windowHandle, 0, 0, upstream);
   }
 
-  protected final ProxySurface createProxySurfaceImpl(AbstractGraphicsDevice adevice, long windowHandle, GLCapabilitiesImmutable capsRequested, GLCapabilitiesChooser chooser) {
-    // FIXME device/windowHandle -> screen ?!
-    X11GraphicsDevice device = (X11GraphicsDevice) adevice;
-    X11GraphicsScreen screen = new X11GraphicsScreen(device, 0);
-    X11GLXGraphicsConfiguration cfg = X11GLXGraphicsConfigurationFactory.chooseGraphicsConfigurationStatic(capsRequested, capsRequested, chooser, screen);
-    WrappedSurface ns = new WrappedSurface(cfg, windowHandle);
-    return ns;
-  }
- 
+  @Override
   protected final GLContext createExternalGLContextImpl() {
     return X11ExternalGLXContext.create(this, null);
   }
 
+  @Override
   public final boolean canCreateExternalGLDrawable(AbstractGraphicsDevice device) {
     return canCreateGLPbuffer(device);
   }
 
+  @Override
   protected final GLDrawable createExternalGLDrawableImpl() {
     return X11ExternalGLXDrawable.create(this, null);
   }
 
+  @Override
   public final boolean canCreateContextOnJava2DSurface(AbstractGraphicsDevice device) {
     return false;
   }
 
+  @Override
   public final GLContext createContextOnJava2DSurface(Object graphics, GLContext shareWith)
     throws GLException {
     throw new GLException("Unimplemented on this platform");
@@ -534,6 +629,7 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl {
 
   private boolean gotGammaRampLength;
   private int gammaRampLength;
+  @Override
   protected final synchronized int getGammaRampLength() {
     if (gotGammaRampLength) {
       return gammaRampLength;
@@ -556,6 +652,7 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl {
     return gammaRampLength;
   }
 
+  @Override
   protected final boolean setGammaRamp(float[] ramp) {
     long display = getOrCreateSharedDpy(defaultDevice);
     if(0 == display) {
@@ -577,6 +674,7 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl {
     return res;
   }
 
+  @Override
   protected final Buffer getGammaRamp() {
     long display = getOrCreateSharedDpy(defaultDevice);
     if(0 == display) {
@@ -607,6 +705,7 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl {
     return rampData;
   }
 
+  @Override
   protected final void resetGammaRamp(Buffer originalGammaRamp) {
     if (originalGammaRamp == null) {
         return; // getGammaRamp failed originally
diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfiguration.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfiguration.java
index 0af6239..b458fff 100644
--- a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfiguration.java
+++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfiguration.java
@@ -34,13 +34,18 @@
 package jogamp.opengl.x11.glx;
 
 import java.util.ArrayList;
+import java.util.List;
 
+import javax.media.nativewindow.AbstractGraphicsDevice;
+import javax.media.nativewindow.CapabilitiesImmutable;
 import javax.media.nativewindow.GraphicsConfigurationFactory;
+import javax.media.nativewindow.VisualIDHolder;
 import javax.media.opengl.DefaultGLCapabilitiesChooser;
 import javax.media.opengl.GL;
 import javax.media.opengl.GLCapabilities;
 import javax.media.opengl.GLCapabilitiesChooser;
 import javax.media.opengl.GLCapabilitiesImmutable;
+import javax.media.opengl.GLContext;
 import javax.media.opengl.GLDrawableFactory;
 import javax.media.opengl.GLException;
 import javax.media.opengl.GLProfile;
@@ -66,7 +71,8 @@ public class X11GLXGraphicsConfiguration extends X11GraphicsConfiguration implem
     }
 
     static X11GLXGraphicsConfiguration create(GLProfile glp, X11GraphicsScreen x11Screen, int fbcfgID) {
-      final long display = x11Screen.getDevice().getHandle();
+      final AbstractGraphicsDevice device = x11Screen.getDevice();
+      final long display = device.getHandle();
       if(0==display) {
           throw new GLException("Display null of "+x11Screen);
       }
@@ -79,7 +85,7 @@ public class X11GLXGraphicsConfiguration extends X11GraphicsConfiguration implem
         glp = GLProfile.getDefault(x11Screen.getDevice());
       }
       final X11GLXDrawableFactory factory = (X11GLXDrawableFactory) GLDrawableFactory.getDesktopFactory();
-      final X11GLCapabilities caps = GLXFBConfig2GLCapabilities(glp, display, fbcfg, true, true, true, factory.isGLXMultisampleAvailable(x11Screen.getDevice()));
+      final X11GLCapabilities caps = GLXFBConfig2GLCapabilities(glp, device, fbcfg, true, true, true, factory.isGLXMultisampleAvailable(device));
       if(null==caps) {
           throw new GLException("GLCapabilities null of "+toHexString(fbcfg));
       }
@@ -98,16 +104,25 @@ public class X11GLXGraphicsConfiguration extends X11GraphicsConfiguration implem
     }
 
     void updateGraphicsConfiguration() {
-        X11GLXGraphicsConfiguration newConfig = (X11GLXGraphicsConfiguration)
-            GraphicsConfigurationFactory.getFactory(getScreen().getDevice()).chooseGraphicsConfiguration(
-                getChosenCapabilities(), getRequestedCapabilities(), chooser, getScreen());
-        if(null!=newConfig) {
-            // FIXME: setScreen( ... );
-            setXVisualInfo(newConfig.getXVisualInfo());
-            setChosenCapabilities(newConfig.getChosenCapabilities());
-            if(DEBUG) {
-                System.err.println("updateGraphicsConfiguration: "+this);
+        final CapabilitiesImmutable aChosenCaps = getChosenCapabilities();
+        if( !(aChosenCaps instanceof X11GLCapabilities) || VisualIDHolder.VID_UNDEFINED == aChosenCaps.getVisualID(VIDType.X11_XVISUAL) ) {
+            // This case is actually quite impossible, since on X11 the visualID and hence GraphicsConfiguration 
+            // must be determined _before_ window creation! 
+            final X11GLXGraphicsConfiguration newConfig = (X11GLXGraphicsConfiguration)
+                GraphicsConfigurationFactory.getFactory(getScreen().getDevice(), aChosenCaps).chooseGraphicsConfiguration(
+                    aChosenCaps, getRequestedCapabilities(), chooser, getScreen(), VisualIDHolder.VID_UNDEFINED);
+            if(null!=newConfig) {
+                // FIXME: setScreen( ... );
+                setXVisualInfo(newConfig.getXVisualInfo());
+                setChosenCapabilities(newConfig.getChosenCapabilities());
+                if(DEBUG) {
+                    System.err.println("X11GLXGraphicsConfiguration.updateGraphicsConfiguration updated:"+this);
+                }
+            } else {
+                throw new GLException("No native VisualID pre-chosen and update failed: "+this);
             }
+        } else if (DEBUG) {
+            System.err.println("X11GLXGraphicsConfiguration.updateGraphicsConfiguration kept:"+this);
         }
     }
 
@@ -232,11 +247,11 @@ public class X11GLXGraphicsConfiguration extends X11GraphicsConfiguration implem
     return true;
   }
 
-  static int FBCfgDrawableTypeBits(final long display, final long fbcfg) {
+  static int FBCfgDrawableTypeBits(final AbstractGraphicsDevice device, GLProfile glp, final long fbcfg) {
     int val = 0;
 
     int[] tmp = new int[1];
-    int fbtype = glXGetFBConfig(display, fbcfg, GLX.GLX_DRAWABLE_TYPE, tmp, 0);
+    int fbtype = glXGetFBConfig(device.getHandle(), fbcfg, GLX.GLX_DRAWABLE_TYPE, tmp, 0);
 
     if ( 0 != ( fbtype & GLX.GLX_WINDOW_BIT ) ) {
         val |= GLGraphicsConfigurationUtil.WINDOW_BIT;
@@ -247,17 +262,20 @@ public class X11GLXGraphicsConfiguration extends X11GraphicsConfiguration implem
     if ( 0 != ( fbtype & GLX.GLX_PBUFFER_BIT ) ) {
         val |= GLGraphicsConfigurationUtil.PBUFFER_BIT;
     }
+    if ( GLContext.isFBOAvailable(device, glp) ) {
+        val |= GLGraphicsConfigurationUtil.FBO_BIT;
+    }
     return val;
   }
 
-  static X11GLCapabilities GLXFBConfig2GLCapabilities(GLProfile glp, long display, long fbcfg,
+  static X11GLCapabilities GLXFBConfig2GLCapabilities(GLProfile glp, AbstractGraphicsDevice device, long fbcfg,
                                                             boolean relaxed, boolean onscreen, boolean usePBuffer,
                                                             boolean isMultisampleAvailable) {
-    ArrayList bucket = new ArrayList();
-    final int winattrmask = GLGraphicsConfigurationUtil.getWinAttributeBits(onscreen, usePBuffer);
-    if( GLXFBConfig2GLCapabilities(bucket, glp, display, fbcfg, winattrmask, isMultisampleAvailable) ) {
+    ArrayList<GLCapabilitiesImmutable> bucket = new ArrayList<GLCapabilitiesImmutable>();
+    final int winattrmask = GLGraphicsConfigurationUtil.getWinAttributeBits(onscreen, usePBuffer, false);
+    if( GLXFBConfig2GLCapabilities(bucket, glp, device, fbcfg, winattrmask, isMultisampleAvailable) ) {
         return (X11GLCapabilities) bucket.get(0);
-    } else if ( relaxed && GLXFBConfig2GLCapabilities(bucket, glp, display, fbcfg, GLGraphicsConfigurationUtil.ALL_BITS, isMultisampleAvailable) ) {
+    } else if ( relaxed && GLXFBConfig2GLCapabilities(bucket, glp, device, fbcfg, GLGraphicsConfigurationUtil.ALL_BITS, isMultisampleAvailable) ) {
         return (X11GLCapabilities) bucket.get(0);
     }
     return null;
@@ -271,12 +289,13 @@ public class X11GLXGraphicsConfiguration extends X11GraphicsConfiguration implem
     return renderPictFmt.getDirect();
   }
 
-  static boolean GLXFBConfig2GLCapabilities(ArrayList capsBucket,
-                                            GLProfile glp, long display, long fbcfg,
+  static boolean GLXFBConfig2GLCapabilities(List<GLCapabilitiesImmutable> capsBucket,
+                                            GLProfile glp, AbstractGraphicsDevice device, long fbcfg,
                                             int winattrmask, boolean isMultisampleAvailable) {
-    final int allDrawableTypeBits = FBCfgDrawableTypeBits(display, fbcfg);
+    final int allDrawableTypeBits = FBCfgDrawableTypeBits(device, glp,  fbcfg);
     int drawableTypeBits = winattrmask & allDrawableTypeBits;
-
+    
+    final long display = device.getHandle(); 
     int fbcfgid = X11GLXGraphicsConfiguration.glXFBConfig2FBConfigID(display, fbcfg);
     XVisualInfo visualInfo = GLX.glXGetVisualFromFBConfig(display, fbcfg);
     if(null == visualInfo) {
@@ -300,19 +319,6 @@ public class X11GLXGraphicsConfiguration extends X11GraphicsConfiguration implem
     }
 
     GLCapabilities res = new X11GLCapabilities(visualInfo, fbcfg, fbcfgid, glp);
-    res.setDoubleBuffered(glXGetFBConfig(display, fbcfg, GLX.GLX_DOUBLEBUFFER,     tmp, 0) != 0);
-    res.setStereo        (glXGetFBConfig(display, fbcfg, GLX.GLX_STEREO,           tmp, 0) != 0);
-    res.setHardwareAccelerated(glXGetFBConfig(display, fbcfg, GLX.GLX_CONFIG_CAVEAT, tmp, 0) != GLX.GLX_SLOW_CONFIG);
-    res.setDepthBits     (glXGetFBConfig(display, fbcfg, GLX.GLX_DEPTH_SIZE,       tmp, 0));
-    res.setStencilBits   (glXGetFBConfig(display, fbcfg, GLX.GLX_STENCIL_SIZE,     tmp, 0));
-    res.setRedBits       (glXGetFBConfig(display, fbcfg, GLX.GLX_RED_SIZE,         tmp, 0));
-    res.setGreenBits     (glXGetFBConfig(display, fbcfg, GLX.GLX_GREEN_SIZE,       tmp, 0));
-    res.setBlueBits      (glXGetFBConfig(display, fbcfg, GLX.GLX_BLUE_SIZE,        tmp, 0));
-    res.setAlphaBits     (glXGetFBConfig(display, fbcfg, GLX.GLX_ALPHA_SIZE,       tmp, 0));
-    res.setAccumRedBits  (glXGetFBConfig(display, fbcfg, GLX.GLX_ACCUM_RED_SIZE,   tmp, 0));
-    res.setAccumGreenBits(glXGetFBConfig(display, fbcfg, GLX.GLX_ACCUM_GREEN_SIZE, tmp, 0));
-    res.setAccumBlueBits (glXGetFBConfig(display, fbcfg, GLX.GLX_ACCUM_BLUE_SIZE,  tmp, 0));
-    res.setAccumAlphaBits(glXGetFBConfig(display, fbcfg, GLX.GLX_ACCUM_ALPHA_SIZE, tmp, 0));
     if (isMultisampleAvailable) {
       res.setSampleBuffers(glXGetFBConfig(display, fbcfg, GLX.GLX_SAMPLE_BUFFERS, tmp, 0) != 0);
       res.setNumSamples   (glXGetFBConfig(display, fbcfg, GLX.GLX_SAMPLES,        tmp, 0));
@@ -328,6 +334,20 @@ public class X11GLXGraphicsConfiguration extends X11GraphicsConfiguration implem
         res.setTransparentBlueValue(xrmask.getBlueMask());
         res.setTransparentAlphaValue(alphaMask);
     }
+    // ALPHA shall be set at last - due to it's auto setting by the above (!opaque / samples)    
+    res.setDoubleBuffered(glXGetFBConfig(display, fbcfg, GLX.GLX_DOUBLEBUFFER,     tmp, 0) != 0);
+    res.setStereo        (glXGetFBConfig(display, fbcfg, GLX.GLX_STEREO,           tmp, 0) != 0);
+    res.setHardwareAccelerated(glXGetFBConfig(display, fbcfg, GLX.GLX_CONFIG_CAVEAT, tmp, 0) != GLX.GLX_SLOW_CONFIG);
+    res.setRedBits       (glXGetFBConfig(display, fbcfg, GLX.GLX_RED_SIZE,         tmp, 0));
+    res.setGreenBits     (glXGetFBConfig(display, fbcfg, GLX.GLX_GREEN_SIZE,       tmp, 0));
+    res.setBlueBits      (glXGetFBConfig(display, fbcfg, GLX.GLX_BLUE_SIZE,        tmp, 0));
+    res.setAlphaBits     (glXGetFBConfig(display, fbcfg, GLX.GLX_ALPHA_SIZE,       tmp, 0));
+    res.setAccumRedBits  (glXGetFBConfig(display, fbcfg, GLX.GLX_ACCUM_RED_SIZE,   tmp, 0));
+    res.setAccumGreenBits(glXGetFBConfig(display, fbcfg, GLX.GLX_ACCUM_GREEN_SIZE, tmp, 0));
+    res.setAccumBlueBits (glXGetFBConfig(display, fbcfg, GLX.GLX_ACCUM_BLUE_SIZE,  tmp, 0));
+    res.setAccumAlphaBits(glXGetFBConfig(display, fbcfg, GLX.GLX_ACCUM_ALPHA_SIZE, tmp, 0));
+    res.setDepthBits     (glXGetFBConfig(display, fbcfg, GLX.GLX_DEPTH_SIZE,       tmp, 0));
+    res.setStencilBits   (glXGetFBConfig(display, fbcfg, GLX.GLX_STENCIL_SIZE,     tmp, 0));
     
     try { 
         res.setPbufferFloatingPointBuffers(glXGetFBConfig(display, fbcfg, GLXExt.GLX_FLOAT_COMPONENTS_NV, tmp, 0) != GL.GL_FALSE);
@@ -388,7 +408,7 @@ public class X11GLXGraphicsConfiguration extends X11GraphicsConfiguration implem
       return res;
   }
 
-  static boolean XVisualInfo2GLCapabilities(ArrayList capsBucket,
+  static boolean XVisualInfo2GLCapabilities(List<GLCapabilitiesImmutable> capsBucket,
                                             GLProfile glp, long display, XVisualInfo info,
                                             final int winattrmask, boolean isMultisampleEnabled) {
     final int allDrawableTypeBits = GLGraphicsConfigurationUtil.WINDOW_BIT | GLGraphicsConfigurationUtil.BITMAP_BIT ;
@@ -421,18 +441,7 @@ public class X11GLXGraphicsConfiguration extends X11GraphicsConfiguration implem
     // Note: use of hardware acceleration is determined by
     // glXCreateContext, not by the XVisualInfo. Optimistically claim
     // that all GLCapabilities have the capability to be hardware
-    // accelerated.
-    res.setHardwareAccelerated(true);
-    res.setDepthBits     (glXGetConfig(display, info, GLX.GLX_DEPTH_SIZE,       tmp, 0));
-    res.setStencilBits   (glXGetConfig(display, info, GLX.GLX_STENCIL_SIZE,     tmp, 0));
-    res.setRedBits       (glXGetConfig(display, info, GLX.GLX_RED_SIZE,         tmp, 0));
-    res.setGreenBits     (glXGetConfig(display, info, GLX.GLX_GREEN_SIZE,       tmp, 0));
-    res.setBlueBits      (glXGetConfig(display, info, GLX.GLX_BLUE_SIZE,        tmp, 0));
-    res.setAlphaBits     (glXGetConfig(display, info, GLX.GLX_ALPHA_SIZE,       tmp, 0));
-    res.setAccumRedBits  (glXGetConfig(display, info, GLX.GLX_ACCUM_RED_SIZE,   tmp, 0));
-    res.setAccumGreenBits(glXGetConfig(display, info, GLX.GLX_ACCUM_GREEN_SIZE, tmp, 0));
-    res.setAccumBlueBits (glXGetConfig(display, info, GLX.GLX_ACCUM_BLUE_SIZE,  tmp, 0));
-    res.setAccumAlphaBits(glXGetConfig(display, info, GLX.GLX_ACCUM_ALPHA_SIZE, tmp, 0));
+    // accelerated.    
     if (isMultisampleEnabled) {
       res.setSampleBuffers(glXGetConfig(display, info, GLX.GLX_SAMPLE_BUFFERS, tmp, 0) != 0);
       res.setNumSamples   (glXGetConfig(display, info, GLX.GLX_SAMPLES,        tmp, 0));
@@ -448,6 +457,18 @@ public class X11GLXGraphicsConfiguration extends X11GraphicsConfiguration implem
         res.setTransparentBlueValue(xrmask.getBlueMask());
         res.setTransparentAlphaValue(alphaMask);
     }
+    // ALPHA shall be set at last - due to it's auto setting by the above (!opaque / samples)
+    res.setHardwareAccelerated(true);
+    res.setDepthBits     (glXGetConfig(display, info, GLX.GLX_DEPTH_SIZE,       tmp, 0));
+    res.setStencilBits   (glXGetConfig(display, info, GLX.GLX_STENCIL_SIZE,     tmp, 0));
+    res.setRedBits       (glXGetConfig(display, info, GLX.GLX_RED_SIZE,         tmp, 0));
+    res.setGreenBits     (glXGetConfig(display, info, GLX.GLX_GREEN_SIZE,       tmp, 0));
+    res.setBlueBits      (glXGetConfig(display, info, GLX.GLX_BLUE_SIZE,        tmp, 0));
+    res.setAlphaBits     (glXGetConfig(display, info, GLX.GLX_ALPHA_SIZE,       tmp, 0));
+    res.setAccumRedBits  (glXGetConfig(display, info, GLX.GLX_ACCUM_RED_SIZE,   tmp, 0));
+    res.setAccumGreenBits(glXGetConfig(display, info, GLX.GLX_ACCUM_GREEN_SIZE, tmp, 0));
+    res.setAccumBlueBits (glXGetConfig(display, info, GLX.GLX_ACCUM_BLUE_SIZE,  tmp, 0));
+    res.setAccumAlphaBits(glXGetConfig(display, info, GLX.GLX_ACCUM_ALPHA_SIZE, tmp, 0));
 
     return GLGraphicsConfigurationUtil.addGLCapabilitiesPermutations(capsBucket, res, drawableTypeBits);
   }
diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfigurationFactory.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfigurationFactory.java
index 0ec2f23..234b06b 100644
--- a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfigurationFactory.java
+++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfigurationFactory.java
@@ -40,10 +40,12 @@ import javax.media.nativewindow.CapabilitiesChooser;
 import javax.media.nativewindow.CapabilitiesImmutable;
 import javax.media.nativewindow.GraphicsConfigurationFactory;
 import javax.media.nativewindow.VisualIDHolder;
+import javax.media.nativewindow.VisualIDHolder.VIDType;
 import javax.media.opengl.DefaultGLCapabilitiesChooser;
 import javax.media.opengl.GLCapabilities;
 import javax.media.opengl.GLCapabilitiesChooser;
 import javax.media.opengl.GLCapabilitiesImmutable;
+import javax.media.opengl.GLContext;
 import javax.media.opengl.GLDrawableFactory;
 import javax.media.opengl.GLException;
 import javax.media.opengl.GLProfile;
@@ -73,20 +75,24 @@ public class X11GLXGraphicsConfigurationFactory extends GLGraphicsConfigurationF
     static GraphicsConfigurationFactory fallbackX11GraphicsConfigurationFactory = null;
     static void registerFactory() {
         final GraphicsConfigurationFactory newFactory = new X11GLXGraphicsConfigurationFactory();
-        final GraphicsConfigurationFactory oldFactory = GraphicsConfigurationFactory.registerFactory(com.jogamp.nativewindow.x11.X11GraphicsDevice.class, newFactory);
+        final GraphicsConfigurationFactory oldFactory = GraphicsConfigurationFactory.registerFactory(com.jogamp.nativewindow.x11.X11GraphicsDevice.class, GLCapabilitiesImmutable.class, newFactory);
         if(oldFactory == newFactory) {
             throw new InternalError("GraphicsConfigurationFactory lifecycle impl. error");
         }
-        if(null == oldFactory) {
-            throw new InternalError("Missing fallback GraphicsConfigurationFactory");
+        if(null != oldFactory) {
+            fallbackX11GraphicsConfigurationFactory = oldFactory;
+        } else {
+            fallbackX11GraphicsConfigurationFactory = GraphicsConfigurationFactory.getFactory(com.jogamp.nativewindow.x11.X11GraphicsDevice.class, CapabilitiesImmutable.class);
+            if( null == fallbackX11GraphicsConfigurationFactory ) {
+                throw new InternalError("Missing fallback GraphicsConfigurationFactory");
+            }
         }
-        fallbackX11GraphicsConfigurationFactory = oldFactory;
     }
     private X11GLXGraphicsConfigurationFactory() {
     }
 
     protected AbstractGraphicsConfiguration chooseGraphicsConfigurationImpl(
-            CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested, CapabilitiesChooser chooser, AbstractGraphicsScreen absScreen) {
+            CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested, CapabilitiesChooser chooser, AbstractGraphicsScreen absScreen, int nativeVisualID) {
         if (!(absScreen instanceof X11GraphicsScreen)) {
             throw new IllegalArgumentException("Only X11GraphicsScreen are allowed here");
         }
@@ -108,12 +114,12 @@ public class X11GLXGraphicsConfigurationFactory extends GLGraphicsConfigurationF
                 if(DEBUG) {
                     System.err.println("No GLX available, fallback to "+fallbackX11GraphicsConfigurationFactory.getClass().getSimpleName()+" for: "+absScreen);
                 }
-                return fallbackX11GraphicsConfigurationFactory.chooseGraphicsConfiguration(capsChosen, capsRequested, chooser, absScreen);
+                return fallbackX11GraphicsConfigurationFactory.chooseGraphicsConfiguration(capsChosen, capsRequested, chooser, absScreen, VisualIDHolder.VID_UNDEFINED);
             }
             throw new InternalError("No GLX and no fallback GraphicsConfigurationFactory available for: "+absScreen);
         }        
         return chooseGraphicsConfigurationStatic((GLCapabilitiesImmutable)capsChosen, (GLCapabilitiesImmutable)capsRequested,
-                                                 (GLCapabilitiesChooser)chooser, (X11GraphicsScreen)absScreen);
+                                                 (GLCapabilitiesChooser)chooser, (X11GraphicsScreen)absScreen, nativeVisualID);
     }
 
     protected static List<GLCapabilitiesImmutable> getAvailableCapabilities(X11GLXDrawableFactory factory, AbstractGraphicsDevice device) {
@@ -161,7 +167,7 @@ public class X11GLXGraphicsConfigurationFactory extends GLGraphicsConfigurationF
             return null;
         }
         for (int i = 0; i < fbcfgsL.limit(); i++) {
-            if( !X11GLXGraphicsConfiguration.GLXFBConfig2GLCapabilities(availableCaps, glProfile, display, fbcfgsL.get(i), GLGraphicsConfigurationUtil.ALL_BITS, isMultisampleAvailable) ) {
+            if( !X11GLXGraphicsConfiguration.GLXFBConfig2GLCapabilities(availableCaps, glProfile, absDevice, fbcfgsL.get(i), GLGraphicsConfigurationUtil.ALL_BITS, isMultisampleAvailable) ) {
                 if(DEBUG) {
                     System.err.println("X11GLXGraphicsConfiguration.getAvailableGLCapabilitiesFBConfig: FBConfig invalid (2): ("+x11Screen+"): fbcfg: "+toHexString(fbcfgsL.get(i)));
                 }
@@ -198,7 +204,7 @@ public class X11GLXGraphicsConfigurationFactory extends GLGraphicsConfigurationF
     static X11GLXGraphicsConfiguration chooseGraphicsConfigurationStatic(GLCapabilitiesImmutable capsChosen,
                                                                          GLCapabilitiesImmutable capsReq,
                                                                          GLCapabilitiesChooser chooser,
-                                                                         X11GraphicsScreen x11Screen) {
+                                                                         X11GraphicsScreen x11Screen, int xvisualID) {
         if (x11Screen == null) {
             throw new IllegalArgumentException("AbstractGraphicsScreen is null");
         }
@@ -209,24 +215,24 @@ public class X11GLXGraphicsConfigurationFactory extends GLGraphicsConfigurationF
         X11GraphicsDevice x11Device = (X11GraphicsDevice) x11Screen.getDevice();        
         X11GLXDrawableFactory factory = (X11GLXDrawableFactory) GLDrawableFactory.getDesktopFactory();
 
-        capsChosen = GLGraphicsConfigurationUtil.fixGLCapabilities( capsChosen, factory.canCreateGLPbuffer(x11Device) );
+        capsChosen = GLGraphicsConfigurationUtil.fixGLCapabilities( capsChosen, GLContext.isFBOAvailable(x11Device, capsChosen.getGLProfile()), factory.canCreateGLPbuffer(x11Device) );
         boolean usePBuffer = capsChosen.isPBuffer();
     
         X11GLXGraphicsConfiguration res = null;
         if( factory.isGLXVersionGreaterEqualOneThree(x11Device) ) {
-            res = chooseGraphicsConfigurationFBConfig(capsChosen, capsReq, chooser, x11Screen);
+            res = chooseGraphicsConfigurationFBConfig(capsChosen, capsReq, chooser, x11Screen, xvisualID);
         }
         if(null==res) {
             if(usePBuffer) {
-                throw new GLException("Error: Couldn't create X11GLXGraphicsConfiguration based on FBConfig for "+capsChosen);
+                throw new GLException("Error: Couldn't create X11GLXGraphicsConfiguration based on FBConfig for visualID "+toHexString(xvisualID)+", "+capsChosen);
             }
-            res = chooseGraphicsConfigurationXVisual(capsChosen, capsReq, chooser, x11Screen);
+            res = chooseGraphicsConfigurationXVisual(capsChosen, capsReq, chooser, x11Screen, xvisualID);
         }
         if(null==res) {
-            throw new GLException("Error: Couldn't create X11GLXGraphicsConfiguration based on FBConfig and XVisual for "+capsChosen);
+            throw new GLException("Error: Couldn't create X11GLXGraphicsConfiguration based on FBConfig and XVisual for visualID "+toHexString(xvisualID)+", "+x11Screen+", "+capsChosen);
         }
         if(DEBUG) {
-            System.err.println("X11GLXGraphicsConfiguration.chooseGraphicsConfigurationStatic("+x11Screen+","+capsChosen+"): "+res);
+            System.err.println("X11GLXGraphicsConfiguration.chooseGraphicsConfigurationStatic(visualID "+toHexString(xvisualID)+", "+x11Screen+","+capsChosen+"): "+res);
         }
         return res;
     }
@@ -245,19 +251,20 @@ public class X11GLXGraphicsConfigurationFactory extends GLGraphicsConfigurationF
         }
         final X11GLXDrawableFactory factory = (X11GLXDrawableFactory) GLDrawableFactory.getDesktopFactory();
                
-        final X11GLCapabilities caps = X11GLXGraphicsConfiguration.GLXFBConfig2GLCapabilities(glp, display, fbcfg, true, true, true, factory.isGLXMultisampleAvailable(absDevice));
+        final X11GLCapabilities caps = X11GLXGraphicsConfiguration.GLXFBConfig2GLCapabilities(glp, absDevice, fbcfg, true, true, true, factory.isGLXMultisampleAvailable(absDevice));
         return new X11GLXGraphicsConfiguration(x11Screen, caps, caps, new DefaultGLCapabilitiesChooser());
     }
 
     private static X11GLXGraphicsConfiguration chooseGraphicsConfigurationFBConfig(GLCapabilitiesImmutable capsChosen,
                                                                                    GLCapabilitiesImmutable capsReq,
                                                                                    GLCapabilitiesChooser chooser,
-                                                                                   X11GraphicsScreen x11Screen) {
+                                                                                   X11GraphicsScreen x11Screen, int xvisualID) {
         int recommendedIndex = -1;
         PointerBuffer fbcfgsL = null;
         GLProfile glProfile = capsChosen.getGLProfile();
         boolean onscreen = capsChosen.isOnscreen();
         boolean usePBuffer = capsChosen.isPBuffer();
+        boolean useFBO = capsChosen.isFBO();
 
         // Utilizing FBConfig
         //
@@ -269,14 +276,16 @@ public class X11GLXGraphicsConfigurationFactory extends GLGraphicsConfigurationF
         final boolean isMultisampleAvailable = factory.isGLXMultisampleAvailable(absDevice);
         int[] attribs = X11GLXGraphicsConfiguration.GLCapabilities2AttribList(capsChosen, true, isMultisampleAvailable, display, screen);
         int[] count = { -1 };
-        ArrayList/*<X11GLCapabilities>*/ availableCaps = new ArrayList();
-        final int winattrmask = GLGraphicsConfigurationUtil.getWinAttributeBits(onscreen, usePBuffer);
-
-        // 1st choice: get GLCapabilities based on users GLCapabilities setting recommendedIndex as preferred choice
-        fbcfgsL = GLX.glXChooseFBConfig(display, screen, attribs, 0, count, 0);
+        List<GLCapabilitiesImmutable> availableCaps = new ArrayList<GLCapabilitiesImmutable>();
+        final int winattrmask = GLGraphicsConfigurationUtil.getWinAttributeBits(onscreen, usePBuffer, useFBO);
+        // 1st choice: get GLCapabilities based on users GLCapabilities setting recommendedIndex as preferred choice,
+        // skipped if xvisualID is given
+        if( VisualIDHolder.VID_UNDEFINED == xvisualID ) {
+            fbcfgsL = GLX.glXChooseFBConfig(display, screen, attribs, 0, count, 0);
+        }
         if (fbcfgsL != null && fbcfgsL.limit()>0) {
             for (int i = 0; i < fbcfgsL.limit(); i++) {
-                if( !X11GLXGraphicsConfiguration.GLXFBConfig2GLCapabilities(availableCaps, glProfile, display, fbcfgsL.get(i), winattrmask, isMultisampleAvailable) ) {
+                if( !X11GLXGraphicsConfiguration.GLXFBConfig2GLCapabilities(availableCaps, glProfile, absDevice, fbcfgsL.get(i), winattrmask, isMultisampleAvailable) ) {
                     if(DEBUG) {
                         System.err.println("X11GLXGraphicsConfiguration.chooseGraphicsConfigurationFBConfig: FBConfig invalid (1): ("+x11Screen+","+capsChosen+"): fbcfg: "+toHexString(fbcfgsL.get(i)));
                     }
@@ -309,13 +318,40 @@ public class X11GLXGraphicsConfigurationFactory extends GLGraphicsConfigurationF
             }
 
             for (int i = 0; i < fbcfgsL.limit(); i++) {
-                if( !X11GLXGraphicsConfiguration.GLXFBConfig2GLCapabilities(availableCaps, glProfile, display, fbcfgsL.get(i), winattrmask, isMultisampleAvailable) ) {
+                if( !X11GLXGraphicsConfiguration.GLXFBConfig2GLCapabilities(availableCaps, glProfile, absDevice, fbcfgsL.get(i), winattrmask, isMultisampleAvailable) ) {
                     if(DEBUG) {
                         System.err.println("X11GLXGraphicsConfiguration.chooseGraphicsConfigurationFBConfig: FBConfig invalid (2): ("+x11Screen+"): fbcfg: "+toHexString(fbcfgsL.get(i)));
                     }
                 }
             }
         }
+        
+        if(DEBUG) {
+            System.err.println("X11GLXGraphicsConfiguration.chooseGraphicsConfigurationFBConfig: got configs: "+availableCaps.size());
+            for(int i=0; i<availableCaps.size(); i++) {
+                System.err.println(i+": "+availableCaps.get(i));
+            }
+        }
+        
+        if( VisualIDHolder.VID_UNDEFINED != xvisualID ) {
+            for(int i=0; i<availableCaps.size(); ) {
+                VisualIDHolder vidh = (VisualIDHolder) availableCaps.get(i);
+                if(vidh.getVisualID(VIDType.X11_XVISUAL) != xvisualID ) {
+                    availableCaps.remove(i);
+                } else {
+                    i++;
+                }
+            }
+            if(0==availableCaps.size()) {
+                if(DEBUG) {
+                    System.err.println("X11GLXGraphicsConfiguration.chooseGraphicsConfigurationFBConfig: post filter visualID "+toHexString(xvisualID )+" no config found, failed - return null");
+                }
+                return null;
+            } else if(DEBUG) {
+                System.err.println("X11GLXGraphicsConfiguration.chooseGraphicsConfigurationFBConfig: post filter visualID "+toHexString(xvisualID)+" got configs: "+availableCaps.size());
+            }
+        }
+        
         int chosenIndex = chooseCapabilities(chooser, capsChosen, availableCaps, recommendedIndex);
         if ( 0 > chosenIndex ) {
             if (DEBUG) {
@@ -332,14 +368,14 @@ public class X11GLXGraphicsConfigurationFactory extends GLGraphicsConfigurationF
     private static X11GLXGraphicsConfiguration chooseGraphicsConfigurationXVisual(GLCapabilitiesImmutable capsChosen,
                                                                                   GLCapabilitiesImmutable capsReq,
                                                                                   GLCapabilitiesChooser chooser,
-                                                                                  X11GraphicsScreen x11Screen) {
+                                                                                  X11GraphicsScreen x11Screen, int xvisualID) {
         if (chooser == null) {
             chooser = new DefaultGLCapabilitiesChooser();
         }
 
         GLProfile glProfile = capsChosen.getGLProfile();
-        final int winattrmask = GLGraphicsConfigurationUtil.getWinAttributeBits(capsChosen.isOnscreen(), false /* pbuffer */);
-        ArrayList availableCaps = new ArrayList();
+        final int winattrmask = GLGraphicsConfigurationUtil.getWinAttributeBits(capsChosen.isOnscreen(), false /* pbuffer */, false);
+        List<GLCapabilitiesImmutable> availableCaps = new ArrayList<GLCapabilitiesImmutable>();
         int recommendedIndex = -1;
 
         AbstractGraphicsDevice absDevice = x11Screen.getDevice();
@@ -350,14 +386,18 @@ public class X11GLXGraphicsConfigurationFactory extends GLGraphicsConfigurationF
         final boolean isMultisampleAvailable = factory.isGLXMultisampleAvailable(absDevice);        
         int[] attribs = X11GLXGraphicsConfiguration.GLCapabilities2AttribList(capsChosen, false, isMultisampleAvailable, display, screen);
 
+        XVisualInfo recommendedVis = null;
         // 1st choice: get GLCapabilities based on users GLCapabilities setting recommendedIndex as preferred choice
-        XVisualInfo recommendedVis = GLX.glXChooseVisual(display, screen, attribs, 0);
-        if (DEBUG) {
-            System.err.print("glXChooseVisual recommended ");
-            if (recommendedVis == null) {
-                System.err.println("null visual");
-            } else {
-                System.err.println("visual id " + toHexString(recommendedVis.getVisualid()));
+        // skipped if xvisualID is given
+        if( VisualIDHolder.VID_UNDEFINED == xvisualID ) {  
+            recommendedVis = GLX.glXChooseVisual(display, screen, attribs, 0);
+            if (DEBUG) {
+                System.err.print("glXChooseVisual recommended ");
+                if (recommendedVis == null) {
+                    System.err.println("null visual");
+                } else {
+                    System.err.println("visual id " + toHexString(recommendedVis.getVisualid()));
+                }
             }
         }
 
@@ -383,6 +423,32 @@ public class X11GLXGraphicsConfigurationFactory extends GLGraphicsConfigurationF
             }
         }
 
+        if(DEBUG) {
+            System.err.println("X11GLXGraphicsConfiguration.chooseGraphicsConfigurationXVisual: got configs: "+availableCaps.size());
+            for(int i=0; i<availableCaps.size(); i++) {
+                System.err.println(i+": "+availableCaps.get(i));
+            }
+        }
+        
+        if( VisualIDHolder.VID_UNDEFINED != xvisualID ) {
+            for(int i=0; i<availableCaps.size(); ) {
+                VisualIDHolder vidh = (VisualIDHolder) availableCaps.get(i);
+                if(vidh.getVisualID(VIDType.X11_XVISUAL) != xvisualID ) {
+                    availableCaps.remove(i);
+                } else {
+                    i++;
+                }
+            }
+            if(0==availableCaps.size()) {
+                if(DEBUG) {
+                    System.err.println("X11GLXGraphicsConfiguration.chooseGraphicsConfigurationXVisual: post filter visualID "+toHexString(xvisualID )+" no config found, failed - return null");                    
+                }
+                return null;
+            } else if(DEBUG) {
+                System.err.println("X11GLXGraphicsConfiguration.chooseGraphicsConfigurationXVisual: post filter visualID "+toHexString(xvisualID)+" got configs: "+availableCaps.size());
+            }
+        }
+        
         int chosenIndex = chooseCapabilities(chooser, capsChosen, availableCaps, recommendedIndex);
         if ( 0 > chosenIndex ) {
             if (DEBUG) {
diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11OnscreenGLXContext.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11OnscreenGLXContext.java
index ce5d466..460dc10 100644
--- a/src/jogl/classes/jogamp/opengl/x11/glx/X11OnscreenGLXContext.java
+++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11OnscreenGLXContext.java
@@ -1,21 +1,21 @@
 /*
  * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- * 
+ *
  * - Redistribution of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
- * 
+ *
  * - Redistribution in binary form must reproduce the above copyright
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the distribution.
- * 
+ *
  * Neither the name of Sun Microsystems, Inc. or the names of
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * This software is provided "AS IS," without a warranty of any kind. ALL
  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -28,11 +28,11 @@
  * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
  * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
  * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
+ *
  * You acknowledge that this software is not designed or intended for use
  * in the design, construction, operation or maintenance of any nuclear
  * facility.
- * 
+ *
  * Sun gratefully acknowledges that this software was originally authored
  * and developed by Kenneth Bradley Russell and Christopher John Kline.
  */
diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11OnscreenGLXDrawable.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11OnscreenGLXDrawable.java
index b2a8326..3632993 100644
--- a/src/jogl/classes/jogamp/opengl/x11/glx/X11OnscreenGLXDrawable.java
+++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11OnscreenGLXDrawable.java
@@ -1,22 +1,22 @@
 /*
  * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
  * Copyright (c) 2010 JogAmp Community. All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- * 
+ *
  * - Redistribution of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
- * 
+ *
  * - Redistribution in binary form must reproduce the above copyright
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the distribution.
- * 
+ *
  * Neither the name of Sun Microsystems, Inc. or the names of
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * This software is provided "AS IS," without a warranty of any kind. ALL
  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -29,19 +29,21 @@
  * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
  * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
  * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
+ *
  * You acknowledge that this software is not designed or intended for use
  * in the design, construction, operation or maintenance of any nuclear
  * facility.
- * 
+ *
  * Sun gratefully acknowledges that this software was originally authored
  * and developed by Kenneth Bradley Russell and Christopher John Kline.
  */
 
 package jogamp.opengl.x11.glx;
 
-import javax.media.nativewindow.*;
-import javax.media.opengl.*;
+import javax.media.nativewindow.NativeSurface;
+import javax.media.opengl.GLContext;
+import javax.media.opengl.GLDrawableFactory;
+import javax.media.opengl.GLException;
 
 public class X11OnscreenGLXDrawable extends X11GLXDrawable {
   /** GLXWindow can't be made current on AWT with NVidia driver, hence disabled for now */
@@ -49,28 +51,33 @@ public class X11OnscreenGLXDrawable extends X11GLXDrawable {
   long glXWindow; // GLXWindow, a GLXDrawable representation
   boolean useGLXWindow;
 
-  protected X11OnscreenGLXDrawable(GLDrawableFactory factory, NativeSurface component) {
-    super(factory, component, false);
+  protected X11OnscreenGLXDrawable(GLDrawableFactory factory, NativeSurface component, boolean realized) {
+    super(factory, component, realized);
     glXWindow=0;
     useGLXWindow=false;
+    if(realized) {
+        updateHandle();
+    }
   }
 
-  @SuppressWarnings("unused")
   @Override
   public long getHandle() {
-    if(USE_GLXWINDOW && useGLXWindow) {
-        return glXWindow; 
-    } 
+    if(USE_GLXWINDOW) {
+        if(useGLXWindow) {
+            return glXWindow;
+        }
+    }
     return super.getHandle();
   }
 
-  @SuppressWarnings("unused")
   @Override
   protected void destroyHandle() {
-    if(USE_GLXWINDOW && 0!=glXWindow) {
-        GLX.glXDestroyWindow(getNativeSurface().getDisplayHandle(), glXWindow);
-        glXWindow = 0;
-        useGLXWindow=false;
+    if(USE_GLXWINDOW) {
+        if(0!=glXWindow) {
+            GLX.glXDestroyWindow(getNativeSurface().getDisplayHandle(), glXWindow);
+            glXWindow = 0;
+            useGLXWindow=false;
+        }
     }
   }
 
@@ -95,6 +102,7 @@ public class X11OnscreenGLXDrawable extends X11GLXDrawable {
     }
   }
 
+  @Override
   public GLContext createContext(GLContext shareWith) {
     return new X11OnscreenGLXContext(this, shareWith);
   }
diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11PbufferGLXContext.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11PbufferGLXContext.java
index 765a820..a34e050 100644
--- a/src/jogl/classes/jogamp/opengl/x11/glx/X11PbufferGLXContext.java
+++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11PbufferGLXContext.java
@@ -1,21 +1,21 @@
 /*
  * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- * 
+ *
  * - Redistribution of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
- * 
+ *
  * - Redistribution in binary form must reproduce the above copyright
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the distribution.
- * 
+ *
  * Neither the name of Sun Microsystems, Inc. or the names of
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * This software is provided "AS IS," without a warranty of any kind. ALL
  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -28,11 +28,11 @@
  * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
  * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
  * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
+ *
  * You acknowledge that this software is not designed or intended for use
  * in the design, construction, operation or maintenance of any nuclear
  * facility.
- * 
+ *
  * Sun gratefully acknowledges that this software was originally authored
  * and developed by Kenneth Bradley Russell and Christopher John Kline.
  */
@@ -47,17 +47,20 @@ public class X11PbufferGLXContext extends X11GLXContext {
     super(drawable, shareWith);
   }
 
+  @Override
   public void bindPbufferToTexture() {
     // FIXME: figure out how to implement this
     throw new GLException("Not yet implemented");
   }
 
+  @Override
   public void releasePbufferFromTexture() {
     // FIXME: figure out how to implement this
     throw new GLException("Not yet implemented");
   }
 
 
+  @Override
   public int getFloatingPointMode() {
     return ((X11PbufferGLXDrawable)drawable).getFloatingPointMode();
   }
diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11PbufferGLXDrawable.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11PbufferGLXDrawable.java
index da7b535..e1fe2f2 100644
--- a/src/jogl/classes/jogamp/opengl/x11/glx/X11PbufferGLXDrawable.java
+++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11PbufferGLXDrawable.java
@@ -1,22 +1,22 @@
 /*
  * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
  * Copyright (c) 2010 JogAmp Community. All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- * 
+ *
  * - Redistribution of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
- * 
+ *
  * - Redistribution in binary form must reproduce the above copyright
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the distribution.
- * 
+ *
  * Neither the name of Sun Microsystems, Inc. or the names of
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * This software is provided "AS IS," without a warranty of any kind. ALL
  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -29,32 +29,36 @@
  * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
  * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
  * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
+ *
  * You acknowledge that this software is not designed or intended for use
  * in the design, construction, operation or maintenance of any nuclear
  * facility.
- * 
+ *
  * Sun gratefully acknowledges that this software was originally authored
  * and developed by Kenneth Bradley Russell and Christopher John Kline.
  */
 
 package jogamp.opengl.x11.glx;
 
-import javax.media.opengl.*;
-import javax.media.nativewindow.*;
+import javax.media.nativewindow.AbstractGraphicsDevice;
+import javax.media.nativewindow.AbstractGraphicsScreen;
+import javax.media.nativewindow.NativeSurface;
+import javax.media.nativewindow.MutableSurface;
+import javax.media.opengl.GLCapabilitiesImmutable;
+import javax.media.opengl.GLContext;
+import javax.media.opengl.GLDrawableFactory;
+import javax.media.opengl.GLException;
+import javax.media.opengl.GLPbuffer;
 
 public class X11PbufferGLXDrawable extends X11GLXDrawable {
   protected X11PbufferGLXDrawable(GLDrawableFactory factory, NativeSurface target) {
-                                  /* GLCapabilities caps, 
+                                  /* GLCapabilities caps,
                                   GLCapabilitiesChooser chooser,
                                   int width, int height */
     super(factory, target, false);
   }
 
-  protected void destroyImpl() {
-    setRealized(false);
-  }
-  
+  @Override
   protected void setRealizedImpl() {
     if(realized) {
         createPbuffer();
@@ -63,6 +67,7 @@ public class X11PbufferGLXDrawable extends X11GLXDrawable {
     }
   }
 
+  @Override
   public GLContext createContext(GLContext shareWith) {
     return new X11PbufferGLXContext(this, shareWith);
   }
@@ -72,7 +77,7 @@ public class X11PbufferGLXDrawable extends X11GLXDrawable {
     if (ns.getSurfaceHandle() != 0) {
       GLX.glXDestroyPbuffer(ns.getDisplayHandle(), ns.getSurfaceHandle());
     }
-    ((SurfaceChangeable)ns).setSurfaceHandle(0);
+    ((MutableSurface)ns).setSurfaceHandle(0);
   }
 
   private void createPbuffer() {
@@ -90,7 +95,7 @@ public class X11PbufferGLXDrawable extends X11GLXDrawable {
       }
 
       NativeSurface ns = getNativeSurface();
-    
+
       GLCapabilitiesImmutable chosenCaps = (GLCapabilitiesImmutable)config.getChosenCapabilities();
 
       if (chosenCaps.getPbufferRenderToTexture()) {
@@ -103,12 +108,14 @@ public class X11PbufferGLXDrawable extends X11GLXDrawable {
 
       // Create the p-buffer.
       int niattribs = 0;
-      int[] iattributes = new int[5];
+      int[] iattributes = new int[7];
 
       iattributes[niattribs++] = GLX.GLX_PBUFFER_WIDTH;
       iattributes[niattribs++] = ns.getWidth();
       iattributes[niattribs++] = GLX.GLX_PBUFFER_HEIGHT;
       iattributes[niattribs++] = ns.getHeight();
+      iattributes[niattribs++] = GLX.GLX_LARGEST_PBUFFER; // exact
+      iattributes[niattribs++] = 0;
       iattributes[niattribs++] = 0;
 
       long pbuffer = GLX.glXCreatePbuffer(display, config.getFBConfig(), iattributes, 0);
@@ -118,16 +125,8 @@ public class X11PbufferGLXDrawable extends X11GLXDrawable {
       }
 
       // Set up instance variables
-      ((SurfaceChangeable)ns).setSurfaceHandle(pbuffer);
-      
-      // Determine the actual width and height we were able to create.
-      int[] tmp = new int[1];
-      GLX.glXQueryDrawable(display, pbuffer, GLX.GLX_WIDTH, tmp, 0);
-      int width = tmp[0];
-      GLX.glXQueryDrawable(display, pbuffer, GLX.GLX_HEIGHT, tmp, 0);
-      int height = tmp[0];
-      ((SurfaceChangeable)ns).surfaceSizeChanged(width, height);
-      
+      ((MutableSurface)ns).setSurfaceHandle(pbuffer);
+
       if (DEBUG) {
         System.err.println("Created pbuffer " + this);
       }
diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11PixmapGLXContext.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11PixmapGLXContext.java
index e19dfd1..96d0f18 100644
--- a/src/jogl/classes/jogamp/opengl/x11/glx/X11PixmapGLXContext.java
+++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11PixmapGLXContext.java
@@ -1,22 +1,22 @@
 /*
  * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
  * Copyright (c) 2010 JogAmp Community. All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- * 
+ *
  * - Redistribution of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
- * 
+ *
  * - Redistribution in binary form must reproduce the above copyright
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the distribution.
- * 
+ *
  * Neither the name of Sun Microsystems, Inc. or the names of
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * This software is provided "AS IS," without a warranty of any kind. ALL
  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -29,11 +29,11 @@
  * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
  * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
  * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
+ *
  * You acknowledge that this software is not designed or intended for use
  * in the design, construction, operation or maintenance of any nuclear
  * facility.
- * 
+ *
  * Sun gratefully acknowledges that this software was originally authored
  * and developed by Kenneth Bradley Russell and Christopher John Kline.
  */
@@ -49,11 +49,13 @@ public class X11PixmapGLXContext extends X11GLXContext {
     super(drawable, shareWith);
   }
 
+  @Override
   public int getOffscreenContextPixelDataType() {
     GL gl = getGL();
     return gl.isGL2GL3()?GL2GL3.GL_UNSIGNED_INT_8_8_8_8_REV:GL.GL_UNSIGNED_SHORT_5_5_5_1;
   }
-  
+
+  @Override
   public int getOffscreenContextReadBuffer() {
     GLCapabilitiesImmutable caps = (GLCapabilitiesImmutable)drawable.getNativeSurface().getGraphicsConfiguration().getChosenCapabilities();
     if (caps.getDoubleBuffered()) {
@@ -62,6 +64,7 @@ public class X11PixmapGLXContext extends X11GLXContext {
     return GL.GL_FRONT;
   }
 
+  @Override
   public boolean offscreenImageNeedsVerticalFlip() {
     // There doesn't seem to be a way to do this in the construction
     // of the Pixmap or GLXPixmap
diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11PixmapGLXDrawable.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11PixmapGLXDrawable.java
index 7dae20f..0462772 100644
--- a/src/jogl/classes/jogamp/opengl/x11/glx/X11PixmapGLXDrawable.java
+++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11PixmapGLXDrawable.java
@@ -1,22 +1,22 @@
 /*
  * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
  * Copyright (c) 2010 JogAmp Community. All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- * 
+ *
  * - Redistribution of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
- * 
+ *
  * - Redistribution in binary form must reproduce the above copyright
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the distribution.
- * 
+ *
  * Neither the name of Sun Microsystems, Inc. or the names of
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * This software is provided "AS IS," without a warranty of any kind. ALL
  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -29,20 +29,27 @@
  * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
  * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
  * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
+ *
  * You acknowledge that this software is not designed or intended for use
  * in the design, construction, operation or maintenance of any nuclear
  * facility.
- * 
+ *
  * Sun gratefully acknowledges that this software was originally authored
  * and developed by Kenneth Bradley Russell and Christopher John Kline.
  */
 
 package jogamp.opengl.x11.glx;
 
-import javax.media.nativewindow.*;
-import javax.media.opengl.*;
-import jogamp.nativewindow.x11.*;
+import javax.media.nativewindow.AbstractGraphicsDevice;
+import javax.media.nativewindow.AbstractGraphicsScreen;
+import javax.media.nativewindow.NativeSurface;
+import javax.media.nativewindow.MutableSurface;
+import javax.media.opengl.GLContext;
+import javax.media.opengl.GLDrawableFactory;
+import javax.media.opengl.GLException;
+
+import jogamp.nativewindow.x11.X11Lib;
+import jogamp.nativewindow.x11.XVisualInfo;
 
 public class X11PixmapGLXDrawable extends X11GLXDrawable {
   private long pixmap;
@@ -51,10 +58,7 @@ public class X11PixmapGLXDrawable extends X11GLXDrawable {
     super(factory, target, false);
   }
 
-  protected void destroyImpl() {
-    setRealized(false);
-  }
-  
+  @Override
   protected void setRealizedImpl() {
     if(realized) {
         createPixmap();
@@ -63,10 +67,11 @@ public class X11PixmapGLXDrawable extends X11GLXDrawable {
     }
   }
 
+  @Override
   public GLContext createContext(GLContext shareWith) {
     return new X11PixmapGLXContext(this, shareWith);
   }
-  
+
   private void createPixmap() {
     NativeSurface ns = getNativeSurface();
     X11GLXGraphicsConfiguration config = (X11GLXGraphicsConfiguration) ns.getGraphicsConfiguration();
@@ -88,7 +93,7 @@ public class X11PixmapGLXDrawable extends X11GLXDrawable {
         pixmap = 0;
         throw new GLException("glXCreateGLXPixmap failed");
     }
-    ((SurfaceChangeable)ns).setSurfaceHandle(drawable);
+    ((MutableSurface)ns).setSurfaceHandle(drawable);
     if (DEBUG) {
         System.err.println("Created pixmap " + toHexString(pixmap) +
                            ", GLXPixmap " + toHexString(drawable) +
@@ -128,7 +133,7 @@ public class X11PixmapGLXDrawable extends X11GLXDrawable {
     X11Lib.XFreePixmap(display, pixmap);
     drawable = 0;
     pixmap = 0;
-    ((SurfaceChangeable)ns).setSurfaceHandle(0);
+    ((MutableSurface)ns).setSurfaceHandle(0);
     display = 0;
   }
 }
diff --git a/src/jogl/native/libav/jogamp_opengl_util_av_impl_FFMPEGMediaPlayer.c b/src/jogl/native/libav/jogamp_opengl_util_av_impl_FFMPEGMediaPlayer.c
index 647de15..7fb64da 100644
--- a/src/jogl/native/libav/jogamp_opengl_util_av_impl_FFMPEGMediaPlayer.c
+++ b/src/jogl/native/libav/jogamp_opengl_util_av_impl_FFMPEGMediaPlayer.c
@@ -572,7 +572,7 @@ JNIEXPORT jint JNICALL Java_jogamp_opengl_util_av_impl_FFMPEGMediaPlayer_readNex
   (JNIEnv *env, jobject instance, jlong ptr, jlong jProcAddrGLTexSubImage2D, jint texTarget, jint texFmt, jint texType)
 {
     FFMPEGToolBasicAV_t *pAV = (FFMPEGToolBasicAV_t *)((void *)((intptr_t)ptr));
-    PFNGLTEXSUBIMAGE2DPROC procAddrGLTexSubImage2D = (PFNGLTEXSUBIMAGE2DPROC) jProcAddrGLTexSubImage2D;
+    PFNGLTEXSUBIMAGE2DPROC procAddrGLTexSubImage2D = (PFNGLTEXSUBIMAGE2DPROC) (intptr_t)jProcAddrGLTexSubImage2D;
 
     jint res = 0; // 1 - audio, 2 - video
     AVPacket packet;
@@ -694,10 +694,10 @@ JNIEXPORT jint JNICALL Java_jogamp_opengl_util_av_impl_FFMPEGMediaPlayer_seek0
     if(pos1 < pos0) {
         flags |= AVSEEK_FLAG_BACKWARD;
     }
-    fprintf(stderr, "SEEK: pre  : u %d, p %d -> u %d, p %d\n", pos0, pts0, pos1, pts1);
+    fprintf(stderr, "SEEK: pre  : u %ld, p %ld -> u %ld, p %ld\n", pos0, pts0, pos1, pts1);
     sp_av_seek_frame(pAV->pFormatCtx, pAV->vid, pts1, flags);
     pAV->vPTS = pAV->pVFrame->pkt_pts * my_av_q2i32(1000, pAV->pVStream->time_base);
-    fprintf(stderr, "SEEK: post : u %d, p %d\n", pAV->vPTS, pAV->pVFrame->pkt_pts);
+    fprintf(stderr, "SEEK: post : u %ld, p %ld\n", pAV->vPTS, pAV->pVFrame->pkt_pts);
     return pAV->vPTS;
 }
 
diff --git a/src/jogl/native/macosx/MacOSXWindowSystemInterface-pbuffer.m b/src/jogl/native/macosx/MacOSXWindowSystemInterface-pbuffer.m
index 66bd10f..b81b43e 100644
--- a/src/jogl/native/macosx/MacOSXWindowSystemInterface-pbuffer.m
+++ b/src/jogl/native/macosx/MacOSXWindowSystemInterface-pbuffer.m
@@ -32,9 +32,6 @@
     int texWidth;
     int texHeight;
     GLuint textureID;
-    GLint swapInterval;
-    GLint swapIntervalCounter;
-    struct timespec lastWaitTime;
 #ifdef HAS_CADisplayLink
     CADisplayLink* displayLink;
 #else
@@ -43,6 +40,9 @@
     int tc;
     struct timespec t0;
 @public
+    struct timespec lastWaitTime;
+    GLint swapInterval;
+    GLint swapIntervalCounter;
     pthread_mutex_t renderLock;
     pthread_cond_t renderSignal;
     BOOL shallDraw;
@@ -171,7 +171,7 @@ static CVReturn renderMyNSOpenGLLayer(CVDisplayLinkRef displayLink,
 #endif
     [self setAsynchronous: YES];
 
-    [self setNeedsDisplayOnBoundsChange: YES]; // FIXME: learn how to recreate on size change!
+    [self setNeedsDisplayOnBoundsChange: YES];
 
     [self setOpaque: opaque ? YES : NO];
 
@@ -192,10 +192,8 @@ static CVReturn renderMyNSOpenGLLayer(CVDisplayLinkRef displayLink,
         [displayLink setPaused: YES];
         [displayLink release];
 #else
-        if(NULL!=displayLink) {
-            CVDisplayLinkStop(displayLink);
-            CVDisplayLinkRelease(displayLink);
-        }
+        CVDisplayLinkStop(displayLink);
+        CVDisplayLinkRelease(displayLink);
 #endif
         displayLink = NULL;
     }
@@ -267,36 +265,23 @@ static CVReturn renderMyNSOpenGLLayer(CVDisplayLinkRef displayLink,
 {
     [context makeCurrentContext];
    
-    /**
-     * v-sync doesn't works w/ NSOpenGLLayer's context .. well :(
-     * Using CVDisplayLink .. see setSwapInterval() below.
-     *
-    if(0 <= swapInterval) {
-        GLint si;
-        [context getValues: &si forParameter: NSOpenGLCPSwapInterval];
-        if(si != swapInterval) {
-            DBG_PRINT("MyNSOpenGLLayer::drawInOpenGLContext %p setSwapInterval: %d -> %d\n", self, si, swapInterval);
-            [context setValues: &swapInterval forParameter: NSOpenGLCPSwapInterval];
-        }
-    } */
     GLenum textureTarget = [pbuffer textureTarget];
-    GLfloat tWidth, tHeight;
+    GLfloat texCoordWidth, texCoordHeight;
     {
         GLsizei pwidth = [pbuffer pixelsWide];
         GLsizei pheight = [pbuffer pixelsHigh];
-        tWidth  = textureTarget == GL_TEXTURE_2D ? (GLfloat)pwidth /(GLfloat)texWidth  : pwidth;
-        tHeight = textureTarget == GL_TEXTURE_2D ? (GLfloat)pheight/(GLfloat)texHeight : pheight;
+        texCoordWidth  = textureTarget == GL_TEXTURE_2D ? (GLfloat)pwidth /(GLfloat)texWidth  : pwidth;
+        texCoordHeight = textureTarget == GL_TEXTURE_2D ? (GLfloat)pheight/(GLfloat)texHeight : pheight;
     }
     Bool texCreated = 0 == textureID;
    
     if(texCreated) {
         glGenTextures(1, &textureID);
-        DBG_PRINT("MyNSOpenGLLayer::drawInOpenGLContext %p, ctx %p, pfmt %p tex %dx%d -> %fx%f 0x%X: creating texID 0x%X\n", 
-            self, context, pixelFormat, texWidth, texHeight, tWidth, tHeight, textureTarget, textureID);
 
         CGRect lRect = [self frame];
-        DBG_PRINT("MyNSOpenGLLayer::drawInOpenGLContext %p frame0: %lf/%lf %lfx%lf\n", 
-            self, lRect.origin.x, lRect.origin.y, lRect.size.width, lRect.size.height);
+        DBG_PRINT("MyNSOpenGLLayer::drawInOpenGLContext %p, pbuffer %p %dx%d -> tex %dx%d [%fx%f] id 0x%X target 0x%X, frame: %lf/%lf %lfx%lf (refcnt %d)\n", 
+            self, pbuffer, [pbuffer pixelsWide], [pbuffer pixelsHigh], texWidth, texHeight, texCoordWidth, texCoordHeight, textureID, textureTarget,
+            lRect.origin.x, lRect.origin.y, lRect.size.width, lRect.size.height, (int)[self retainCount]);
     }
 
     glBindTexture(textureTarget, textureID);
@@ -324,10 +309,10 @@ static CVReturn renderMyNSOpenGLLayer(CVDisplayLinkRef displayLink,
     };
    
     GLfloat tex[] = {
-     0.0,    0.0,
-     0.0,    tHeight,
-     tWidth, tHeight,
-     tWidth, 0.0
+     0.0,           0.0,
+     0.0,           texCoordHeight,
+     texCoordWidth, texCoordHeight,
+     texCoordWidth, 0.0
     };
    
     glEnableClientState(GL_VERTEX_ARRAY);
@@ -360,33 +345,50 @@ static CVReturn renderMyNSOpenGLLayer(CVDisplayLinkRef displayLink,
 
 - (void)setSwapInterval:(int)interval
 {
-    DBG_PRINT("MyNSOpenGLLayer::setSwapInterval: %d\n", interval);
+    /**
+     * v-sync doesn't works w/ NSOpenGLLayer's context .. well :(
+     * Using CVDisplayLink .. see setSwapInterval() below.
+     *
+        GLint si;
+        [context getValues: &si forParameter: NSOpenGLCPSwapInterval];
+        if(si != swapInterval) {
+            DBG_PRINT("MyNSOpenGLLayer::drawInOpenGLContext %p setSwapInterval: %d -> %d\n", self, si, swapInterval);
+            [context setValues: &swapInterval forParameter: NSOpenGLCPSwapInterval];
+        }
+    } */
+
+    pthread_mutex_lock(&renderLock);
+    DBG_PRINT("MyNSOpenGLLayer::setSwapInterval.0: %d - displayLink %p\n", interval, displayLink);
     swapInterval = interval;
     swapIntervalCounter = 0;
-    if(0 < swapInterval) {
-        tc = 0;
-        timespec_now(&t0);
-
-        [self setAsynchronous: NO];
-        #ifdef HAS_CADisplayLink
-            [displayLink setPaused: NO];
-            [displayLink setFrameInterval: interval];
-        #else
-            if(NULL!=displayLink) {
+    pthread_mutex_unlock(&renderLock);
+
+    if(NULL!=displayLink) {
+        if(0 < swapInterval) {
+            tc = 0;
+            timespec_now(&t0);
+
+            [self setAsynchronous: NO];
+            #ifdef HAS_CADisplayLink
+                [displayLink setPaused: NO];
+                [displayLink setFrameInterval: interval];
+            #else
+                DBG_PRINT("MyNSOpenGLLayer::setSwapInterval.1.b.1\n");
                 CVDisplayLinkStart(displayLink);
-                // FIXME: doesn't support interval ..
-            }
-        #endif
-    } else {
-        #ifdef HAS_CADisplayLink
-            [displayLink setPaused: YES];
-        #else
-            if(NULL!=displayLink) {
+                DBG_PRINT("MyNSOpenGLLayer::setSwapInterval.1.b.X\n");
+            #endif
+        } else {
+            #ifdef HAS_CADisplayLink
+                [displayLink setPaused: YES];
+            #else
+                DBG_PRINT("MyNSOpenGLLayer::setSwapInterval.0.b.1\n");
                 CVDisplayLinkStop(displayLink);
-            }
-        #endif
-        [self setAsynchronous: YES];
+                DBG_PRINT("MyNSOpenGLLayer::setSwapInterval.0.b.X\n");
+            #endif
+            [self setAsynchronous: YES];
+        }
     }
+    DBG_PRINT("MyNSOpenGLLayer::setSwapInterval.X: %d\n", interval);
 }
 
 -(void)tick
@@ -415,9 +417,7 @@ NSOpenGLLayer* createNSOpenGLLayer(NSOpenGLContext* ctx, NSOpenGLPixelFormat* fm
 
 void setNSOpenGLLayerSwapInterval(NSOpenGLLayer* layer, int interval) {
   MyNSOpenGLLayer* l = (MyNSOpenGLLayer*) layer;
-  pthread_mutex_lock(&l->renderLock);
   [l setSwapInterval: interval];
-  pthread_mutex_unlock(&l->renderLock);
 }
 
 void waitUntilNSOpenGLLayerIsReady(NSOpenGLLayer* layer, long to_micros) {
diff --git a/src/jogl/native/macosx/MacOSXWindowSystemInterface.m b/src/jogl/native/macosx/MacOSXWindowSystemInterface.m
index 8ac9f47..f774f8f 100644
--- a/src/jogl/native/macosx/MacOSXWindowSystemInterface.m
+++ b/src/jogl/native/macosx/MacOSXWindowSystemInterface.m
@@ -503,7 +503,7 @@ NSView* getNSView(NSOpenGLContext* ctx) {
 
 NSOpenGLContext* createContext(NSOpenGLContext* share,
                     NSView* view,
-                    Bool isBackingLayerView,
+                    Bool allowIncompleteView,
                     NSOpenGLPixelFormat* fmt,
                     Bool opaque,
                     int* viewNotReady)
@@ -512,13 +512,13 @@ NSOpenGLContext* createContext(NSOpenGLContext* share,
 
     getRendererInfo();
     
-    DBG_PRINT("createContext.0: share %p, view %p, isBackingLayer %d, pixfmt %p, opaque %d\n",
-        share, view, (int)isBackingLayerView, fmt, opaque);
+    DBG_PRINT("createContext.0: share %p, view %p, allowIncompleteView %d, pixfmt %p, opaque %d\n",
+        share, view, (int)allowIncompleteView, fmt, opaque);
 
-    if (view != NULL) {
+    if (view != nil) {
         Bool viewReady = true;
 
-        if(!isBackingLayerView) {
+        if(!allowIncompleteView) {
             if ([view lockFocusIfCanDraw] == NO) {
                 DBG_PRINT("createContext.1 [view lockFocusIfCanDraw] failed\n");
                 viewReady = false;
@@ -527,7 +527,7 @@ NSOpenGLContext* createContext(NSOpenGLContext* share,
         if(viewReady) {
             NSRect frame = [view frame];
             if ((frame.size.width == 0) || (frame.size.height == 0)) {
-                if(!isBackingLayerView) {
+                if(!allowIncompleteView) {
                     [view unlockFocus];
                 }
                 DBG_PRINT("createContext.2 view.frame size %dx%d\n", (int)frame.size.width, (int)frame.size.height);
@@ -558,7 +558,7 @@ NSOpenGLContext* createContext(NSOpenGLContext* share,
             [ctx setValues:&zeroOpacity forParameter:NSOpenGLCPSurfaceOpacity];
         }
         [ctx setView:view];
-        if(!isBackingLayerView) {
+        if(!allowIncompleteView) {
             [view unlockFocus];        
         }
       }
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/WrappedSurface.java b/src/nativewindow/classes/com/jogamp/nativewindow/WrappedSurface.java
index f2993ab..b7f6ba4 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/WrappedSurface.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/WrappedSurface.java
@@ -30,45 +30,49 @@ package com.jogamp.nativewindow;
 
 import javax.media.nativewindow.AbstractGraphicsConfiguration;
 import javax.media.nativewindow.ProxySurface;
-import javax.media.nativewindow.SurfaceChangeable;
 
+public class WrappedSurface extends ProxySurface {
+  protected long surfaceHandle;  
 
-public class WrappedSurface extends ProxySurface implements SurfaceChangeable {
-  protected long surfaceHandle;
-
-  public WrappedSurface(AbstractGraphicsConfiguration cfg) {
-      this(cfg, 0);
-  }
-
-  public WrappedSurface(AbstractGraphicsConfiguration cfg, long handle) {
-    super(cfg);
+  public WrappedSurface(AbstractGraphicsConfiguration cfg, long handle, int initialWidth, int initialHeight, UpstreamSurfaceHook upstream) {
+    super(cfg, initialWidth, initialHeight, upstream);
     surfaceHandle=handle;
   }
-  
-  protected final void invalidateImpl() {
+
+  @Override
+  protected void invalidateImpl() {    
     surfaceHandle = 0;
   }
 
-  final public long getSurfaceHandle() {
+  @Override
+  public final long getSurfaceHandle() {
     return surfaceHandle;
   }
 
-  final public void setSurfaceHandle(long surfaceHandle) {
+  @Override
+  public final void setSurfaceHandle(long surfaceHandle) {
     this.surfaceHandle=surfaceHandle;
   }
-
-  final protected int lockSurfaceImpl() {
-      return LOCK_SUCCESS;
+  
+  @Override
+  protected final int lockSurfaceImpl() {
+    return LOCK_SUCCESS;
   }
 
-  final protected void unlockSurfaceImpl() {
+  @Override
+  protected final void unlockSurfaceImpl() {
   }
 
+  @Override
   public String toString() {
-    return "WrappedSurface[config " + getPrivateGraphicsConfiguration()+ 
-           ", displayHandle 0x" + Long.toHexString(getDisplayHandle()) + 
-           ", surfaceHandle 0x" + Long.toHexString(getSurfaceHandle()) + 
+    final UpstreamSurfaceHook ush = getUpstreamSurfaceHook();
+    final String ush_s = null != ush ? ( ush.getClass().getName() + ": " + ush ) : "nil"; 
+    
+    return "WrappedSurface[config " + getPrivateGraphicsConfiguration()+
+           ", displayHandle 0x" + Long.toHexString(getDisplayHandle()) +
+           ", surfaceHandle 0x" + Long.toHexString(getSurfaceHandle()) +
            ", size " + getWidth() + "x" + getHeight() +
-           ", surfaceLock "+surfaceLock+"]";
+           ", surfaceLock "+surfaceLock+
+           ", upstreamSurfaceHook "+ush_s+"]";
   }
 }
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTGraphicsConfiguration.java b/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTGraphicsConfiguration.java
index 61d5e5c..2a152ff 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTGraphicsConfiguration.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTGraphicsConfiguration.java
@@ -95,8 +95,8 @@ public class AWTGraphicsConfiguration extends DefaultGraphicsConfiguration imple
           GraphicsConfiguration gc = awtGraphicsDevice.getDefaultConfiguration();
           capsChosen = AWTGraphicsConfiguration.setupCapabilitiesRGBABits(capsRequested, gc);
       }
-      final GraphicsConfigurationFactory factory = GraphicsConfigurationFactory.getFactory(awtDevice);
-      final AbstractGraphicsConfiguration config = factory.chooseGraphicsConfiguration(capsChosen, capsRequested, null, awtScreen);
+      final GraphicsConfigurationFactory factory = GraphicsConfigurationFactory.getFactory(awtDevice, capsChosen);
+      final AbstractGraphicsConfiguration config = factory.chooseGraphicsConfiguration(capsChosen, capsRequested, null, awtScreen, VisualIDHolder.VID_UNDEFINED);
       if(config instanceof AWTGraphicsConfiguration) {
           return (AWTGraphicsConfiguration) config;
       }
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java b/src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java
index 02dd746..d4b927c 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java
@@ -1,22 +1,22 @@
 /*
  * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
  * Copyright (c) 2010 JogAmp Community. All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- * 
+ *
  * - Redistribution of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
- * 
+ *
  * - Redistribution in binary form must reproduce the above copyright
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the distribution.
- * 
+ *
  * Neither the name of Sun Microsystems, Inc. or the names of
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * This software is provided "AS IS," without a warranty of any kind. ALL
  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -29,7 +29,7 @@
  * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
  * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
  * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
+ *
  * You acknowledge that this software is not designed or intended for use
  * in the design, construction, operation or maintenance of any nuclear
  * facility.
@@ -67,7 +67,7 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
 
   // user properties
   protected boolean shallUseOffscreenLayer = false;
-  
+
   // lifetime: forever
   protected Component component;
   private AWTGraphicsConfiguration config; // control access due to delegation
@@ -81,13 +81,14 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
   protected long drawable;
   protected Rectangle bounds;
   protected Insets insets;
-  
+  private long offscreenSurfaceLayer;
+
   private long drawable_old;
-  
+
   /**
    * Constructed by {@link jogamp.nativewindow.NativeWindowFactoryImpl#getNativeWindow(Object, AbstractGraphicsConfiguration)}
    * via this platform's specialization (X11, OSX, Windows, ..).
-   * 
+   *
    * @param comp
    * @param config
    */
@@ -106,20 +107,24 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
     invalidate();
     this.component = windowObject;
     this.isApplet = false;
+    this.offscreenSurfaceLayer = 0;
   }
-  
+
+  @Override
   public void setShallUseOffscreenLayer(boolean v) {
       shallUseOffscreenLayer = v;
   }
-  
+
+  @Override
   public final boolean getShallUseOffscreenLayer() {
       return shallUseOffscreenLayer;
   }
-  
-  public final boolean isOffscreenLayerSurfaceEnabled() { 
+
+  @Override
+  public final boolean isOffscreenLayerSurfaceEnabled() {
       return isOffscreenLayerSurface;
   }
-  
+
   protected synchronized void invalidate() {
     invalidateNative();
     jawt = null;
@@ -132,11 +137,18 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
   protected abstract void invalidateNative();
 
   protected final void updateBounds(JAWT_Rectangle jawtBounds) {
+    if(DEBUG) {
+        final Rectangle jb = new Rectangle(jawtBounds.getX(), jawtBounds.getY(), jawtBounds.getWidth(), jawtBounds.getHeight());
+        if(!bounds.equals(jb)) {
+            System.err.println("JAWTWindow.updateBounds: "+bounds+" -> "+jb);
+            Thread.dumpStack();
+        }
+    }
     bounds.setX(jawtBounds.getX());
     bounds.setY(jawtBounds.getY());
     bounds.setWidth(jawtBounds.getWidth());
     bounds.setHeight(jawtBounds.getHeight());
-    
+
     if(component instanceof Container) {
         java.awt.Insets contInsets = ((Container)component).getInsets();
         insets.setLeftWidth(contInsets.left);
@@ -148,16 +160,17 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
 
   /** @return the JAWT_DrawingSurfaceInfo's (JAWT_Rectangle) bounds, updated with lock */
   public final RectangleImmutable getBounds() { return bounds; }
-  
+
+  @Override
   public final InsetsImmutable getInsets() { return insets; }
 
   public final Component getAWTComponent() {
     return component;
   }
-  
-  /** 
-   * Returns true if the AWT component is parented to an {@link java.applet.Applet}, 
-   * otherwise false. This information is valid only after {@link #lockSurface()}. 
+
+  /**
+   * Returns true if the AWT component is parented to an {@link java.applet.Applet},
+   * otherwise false. This information is valid only after {@link #lockSurface()}.
    */
   public final boolean isApplet() {
       return isApplet;
@@ -168,10 +181,11 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
       return jawt;
   }
 
-  /** 
+  /**
    * {@inheritDoc}
    */
-  public final void attachSurfaceLayer(final long layerHandle) throws NativeWindowException {  
+  @Override
+  public final void attachSurfaceLayer(final long layerHandle) throws NativeWindowException {
       if( !isOffscreenLayerSurfaceEnabled() ) {
           throw new NativeWindowException("Not an offscreen layer surface");
       }
@@ -181,57 +195,72 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
       }
       try {
           if(DEBUG) {
-            System.err.println("JAWTWindow.attachSurfaceHandle(): 0x"+Long.toHexString(layerHandle));
+            System.err.println("JAWTWindow.attachSurfaceHandle(): 0x"+Long.toHexString(layerHandle) + ", bounds "+bounds);
           }
           attachSurfaceLayerImpl(layerHandle);
+          offscreenSurfaceLayer = layerHandle;
       } finally {
           unlockSurface();
       }
-  }  
+  }
   protected abstract void attachSurfaceLayerImpl(final long layerHandle);
-  
-  /** 
+
+  /**
    * {@inheritDoc}
    */
-  public final void detachSurfaceLayer(final long layerHandle) throws NativeWindowException {  
+  @Override
+  public final void detachSurfaceLayer() throws NativeWindowException {
       if( !isOffscreenLayerSurfaceEnabled() ) {
           throw new java.lang.UnsupportedOperationException("Not an offscreen layer surface");
       }
+      if( 0 == offscreenSurfaceLayer) {
+          throw new NativeWindowException("No offscreen layer attached: "+this);
+      }
       int lockRes = lockSurface();
       if (NativeSurface.LOCK_SURFACE_NOT_READY >= lockRes) {
           throw new NativeWindowException("Could not lock (offscreen layer): "+this);
       }
       try {
           if(DEBUG) {
-            System.err.println("JAWTWindow.detachSurfaceHandle(): 0x"+Long.toHexString(layerHandle));
+            System.err.println("JAWTWindow.detachSurfaceHandle(): 0x"+Long.toHexString(offscreenSurfaceLayer));
           }
-          detachSurfaceLayerImpl(layerHandle);
+          detachSurfaceLayerImpl(offscreenSurfaceLayer);
+          offscreenSurfaceLayer = 0;
       } finally {
           unlockSurface();
       }
-  }  
+  }
   protected abstract void detachSurfaceLayerImpl(final long layerHandle);
+
+  @Override
+  public final boolean isSurfaceLayerAttached() {
+      return 0 != offscreenSurfaceLayer;
+  }
   
   //
   // SurfaceUpdateListener
   //
 
+  @Override
   public void addSurfaceUpdatedListener(SurfaceUpdatedListener l) {
       surfaceUpdatedHelper.addSurfaceUpdatedListener(l);
   }
 
+  @Override
   public void addSurfaceUpdatedListener(int index, SurfaceUpdatedListener l) throws IndexOutOfBoundsException {
       surfaceUpdatedHelper.addSurfaceUpdatedListener(index, l);
   }
 
+  @Override
   public void removeSurfaceUpdatedListener(SurfaceUpdatedListener l) {
       surfaceUpdatedHelper.removeSurfaceUpdatedListener(l);
   }
 
+  @Override
   public void surfaceUpdated(Object updater, NativeSurface ns, long when) {
       surfaceUpdatedHelper.surfaceUpdated(updater, ns, when);
-  }    
-  
+  }
+
   //
   // NativeSurface
   //
@@ -243,14 +272,14 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
         c = c.getParent();
     }
   }
-  
+
   /**
-   * If JAWT offscreen layer is supported, 
+   * If JAWT offscreen layer is supported,
    * implementation shall respect {@link #getShallUseOffscreenLayer()}
    * and may respect {@link #isApplet()}.
-   * 
+   *
    * @return The JAWT instance reflecting offscreen layer support, etc.
-   * 
+   *
    * @throws NativeWindowException
    */
   protected abstract JAWT fetchJAWTImpl() throws NativeWindowException;
@@ -266,8 +295,9 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
       }
       // Thread.dumpStack();
   }
-    
-  public final int lockSurface() throws NativeWindowException {
+
+  @Override
+  public final int lockSurface() throws NativeWindowException, RuntimeException  {
     surfaceLock.lock();
     int res = surfaceLock.getHoldCount() == 1 ? LOCK_SURFACE_NOT_READY : LOCK_SUCCESS; // new lock ?
 
@@ -277,12 +307,14 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
             final AbstractGraphicsDevice adevice = getGraphicsConfiguration().getScreen().getDevice();
             adevice.lock();
             try {
-                jawt = fetchJAWTImpl();
-                isOffscreenLayerSurface = JAWTUtil.isJAWTUsingOffscreenLayer(jawt);
+                if(null == jawt) { // no need to re-fetch for each frame
+                    jawt = fetchJAWTImpl();
+                    isOffscreenLayerSurface = JAWTUtil.isJAWTUsingOffscreenLayer(jawt);
+                }
                 res = lockSurfaceImpl();
                 if(LOCK_SUCCESS == res && drawable_old != drawable) {
                     res = LOCK_SURFACE_CHANGED;
-                    if(DEBUG) {            
+                    if(DEBUG) {
                         System.err.println("JAWTWindow: surface change 0x"+Long.toHexString(drawable_old)+" -> 0x"+Long.toHexString(drawable));
                         // Thread.dumpStack();
                     }
@@ -303,6 +335,7 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
 
   protected abstract void unlockSurfaceImpl() throws NativeWindowException;
 
+  @Override
   public final void unlockSurface() {
     surfaceLock.validateLocked();
     drawable_old = drawable;
@@ -310,7 +343,9 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
     if (surfaceLock.getHoldCount() == 1) {
         final AbstractGraphicsDevice adevice = getGraphicsConfiguration().getScreen().getDevice();
         try {
-            unlockSurfaceImpl();
+            if(null != jawt) {
+                unlockSurfaceImpl();
+            }
         } finally {
             adevice.unlock();
         }
@@ -318,46 +353,51 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
     surfaceLock.unlock();
   }
 
+  @Override
   public final boolean isSurfaceLockedByOtherThread() {
     return surfaceLock.isLockedByOtherThread();
   }
 
-  public final boolean isSurfaceLocked() {
-    return surfaceLock.isLocked();
-  }
-
+  @Override
   public final Thread getSurfaceLockOwner() {
     return surfaceLock.getOwner();
   }
 
+  @Override
   public boolean surfaceSwap() {
     return false;
   }
 
+  @Override
   public long getSurfaceHandle() {
     return drawable;
   }
-  
+
   public final AWTGraphicsConfiguration getPrivateGraphicsConfiguration() {
     return config;
   }
-  
+
+  @Override
   public final AbstractGraphicsConfiguration getGraphicsConfiguration() {
     return config.getNativeGraphicsConfiguration();
   }
 
+  @Override
   public final long getDisplayHandle() {
     return getGraphicsConfiguration().getScreen().getDevice().getHandle();
   }
 
+  @Override
   public final int getScreenIndex() {
     return getGraphicsConfiguration().getScreen().getIndex();
   }
 
+  @Override
   public int getWidth() {
     return component.getWidth();
   }
 
+  @Override
   public int getHeight() {
     return component.getHeight();
   }
@@ -366,41 +406,52 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
   // NativeWindow
   //
 
-  public synchronized void destroy() {
-    invalidate();    
-    component = null; // don't dispose the AWT component, since we are merely an immutable uplink 
+  @Override
+  public void destroy() {
+    surfaceLock.lock();
+    try {
+        invalidate();
+        component = null; // don't dispose the AWT component, since we are merely an immutable uplink
+    } finally {
+        surfaceLock.unlock();
+    }
   }
 
+  @Override
   public final NativeWindow getParent() {
       return null;
   }
 
+  @Override
   public long getWindowHandle() {
     return drawable;
   }
-  
+
+  @Override
   public final int getX() {
       return component.getX();
   }
 
+  @Override
   public final int getY() {
       return component.getY();
   }
-  
+
   /**
    * {@inheritDoc}
-   * 
+   *
    * <p>
-   * This JAWT default implementation is currently still using 
+   * This JAWT default implementation is currently still using
    * a blocking implementation. It first attempts to retrieve the location
    * via a native implementation. If this fails, it tries the blocking AWT implementation.
-   * If the latter fails due to an external AWT tree-lock, the non block 
+   * If the latter fails due to an external AWT tree-lock, the non block
    * implementation {@link #getLocationOnScreenNonBlocking(Point, Component)} is being used.
    * The latter simply traverse up to the AWT component tree and sums the rel. position.
    * We have to determine whether the latter is good enough for all cases,
    * currently only OS X utilizes the non blocking method per default.
-   * </p>   
+   * </p>
    */
+  @Override
   public Point getLocationOnScreen(Point storage) {
       Point los = getLocationOnScreenNative(storage);
       if(null == los) {
@@ -421,7 +472,7 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
       }
       return los;
   }
-  
+
   protected Point getLocationOnScreenNative(Point storage) {
       int lockRes = lockSurface();
       if(LOCK_SURFACE_NOT_READY == lockRes) {
@@ -442,12 +493,12 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
           return d;
       } finally {
           unlockSurface();
-      }      
+      }
   }
   protected abstract Point getLocationOnScreenNativeImpl(int x, int y);
 
-  protected static Point getLocationOnScreenNonBlocking(Point storage, Component comp) {     
-      int x = 0; 
+  protected static Point getLocationOnScreenNonBlocking(Point storage, Component comp) {
+      int x = 0;
       int y = 0;
       while(null != comp) {
           x += comp.getX();
@@ -460,11 +511,12 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
       }
       return new Point(x, y);
   }
-  
+
+  @Override
   public boolean hasFocus() {
       return component.hasFocus();
   }
-  
+
   @Override
   public String toString() {
     StringBuilder sb = new StringBuilder();
@@ -487,5 +539,4 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
 
     return sb.toString();
   }
-
 }
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/egl/EGLGraphicsDevice.java b/src/nativewindow/classes/com/jogamp/nativewindow/egl/EGLGraphicsDevice.java
index 4ee3361..389949e 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/egl/EGLGraphicsDevice.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/egl/EGLGraphicsDevice.java
@@ -36,25 +36,84 @@ import javax.media.nativewindow.*;
 
 /** Encapsulates a graphics device on EGL platforms.
  */
-
 public class EGLGraphicsDevice extends DefaultGraphicsDevice implements Cloneable {
-    boolean closeDisplay = false;
+    final long nativeDisplayID;
+    final EGLDisplayLifecycleCallback eglLifecycleCallback;
 
     /**
+     * Hack to allow inject a EGL termination call.
+     * <p>
+     * FIXME: This shall be removed when relocated EGL to the nativewindow package,
+     * since then it can be utilized directly.
+     * </p> 
+     */
+    public interface EGLDisplayLifecycleCallback {
+        /**
+         * Implementation should issue an <code>EGL.eglGetDisplay(nativeDisplayID)</code>
+         * inclusive <code>EGL.eglInitialize(eglDisplayHandle, ..)</code> call.
+         * @param eglDisplayHandle
+         */
+        public long eglGetAndInitDisplay(long nativeDisplayID);
+        
+        /**
+         * Implementation should issue an <code>EGL.eglTerminate(eglDisplayHandle)</code> call.
+         * @param eglDisplayHandle
+         */
+        void eglTerminate(long eglDisplayHandle);
+    }
+    
+    /**
      * Note that this is not an open connection, ie no native display handle exist.
      * This constructor exist to setup a default device connection/unit.<br>
      */
     public EGLGraphicsDevice(String connection, int unitID) {
         super(NativeWindowFactory.TYPE_EGL, connection, unitID);
+        this.nativeDisplayID = 0 ; // EGL.EGL_DEFAULT_DISPLAY
+        this.eglLifecycleCallback = null;
     }
 
-    /** Constructs a new EGLGraphicsDevice corresponding to the given EGL display handle. */
-    public EGLGraphicsDevice(long eglDisplay, String connection, int unitID) {
+    public EGLGraphicsDevice(long nativeDisplayID, long eglDisplay, String connection, int unitID, EGLDisplayLifecycleCallback eglLifecycleCallback) {
         super(NativeWindowFactory.TYPE_EGL, connection, unitID, eglDisplay);
+        this.nativeDisplayID = nativeDisplayID;
+        this.eglLifecycleCallback = eglLifecycleCallback;
     }
     
+    public long getNativeDisplayID() { return nativeDisplayID; }
+    
+    @Override
     public Object clone() {
       return super.clone();
     }
+
+    @Override
+    public boolean open() {
+        if(null != eglLifecycleCallback && 0 == handle) {
+            if(DEBUG) {
+                System.err.println(Thread.currentThread().getName() + " - EGLGraphicsDevice.open(): "+this);
+            }
+            handle = eglLifecycleCallback.eglGetAndInitDisplay(nativeDisplayID);
+            if(0 == handle) {
+                throw new NativeWindowException("EGLGraphicsDevice.open() failed: "+this);
+            }
+            return true;
+        }
+        return false;
+    }
+    
+    @Override
+    public boolean close() {
+        if(null != eglLifecycleCallback && 0 != handle) {
+            if(DEBUG) {
+                System.err.println(Thread.currentThread().getName() + " - EGLGraphicsDevice.close(): "+this);
+            }
+            eglLifecycleCallback.eglTerminate(handle);
+        }
+        return super.close();
+    }
+    
+    @Override
+    public String toString() {
+        return "EGLGraphicsDevice[type EGL, connection "+getConnection()+", unitID "+getUnitID()+", handle 0x"+Long.toHexString(getHandle())+", nativeDisplayID 0x"+Long.toHexString(nativeDisplayID)+"]";
+    }
 }
 
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/swt/SWTAccessor.java b/src/nativewindow/classes/com/jogamp/nativewindow/swt/SWTAccessor.java
index f430961..ba07d97 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/swt/SWTAccessor.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/swt/SWTAccessor.java
@@ -34,15 +34,21 @@ import java.lang.reflect.Method;
 import org.eclipse.swt.graphics.GCData;
 import org.eclipse.swt.widgets.Control;
 
+import javax.media.nativewindow.AbstractGraphicsScreen;
+import javax.media.nativewindow.DefaultGraphicsScreen;
 import javax.media.nativewindow.NativeWindowException;
 import javax.media.nativewindow.AbstractGraphicsDevice;
 import javax.media.nativewindow.NativeWindowFactory;
+import javax.media.nativewindow.VisualIDHolder;
+
 import com.jogamp.common.util.ReflectionUtil;
 import com.jogamp.nativewindow.macosx.MacOSXGraphicsDevice;
 import com.jogamp.nativewindow.windows.WindowsGraphicsDevice;
 import com.jogamp.nativewindow.x11.X11GraphicsDevice;
+import com.jogamp.nativewindow.x11.X11GraphicsScreen;
 
 import jogamp.nativewindow.macosx.OSXUtil;
+import jogamp.nativewindow.x11.X11Lib;
 
 public class SWTAccessor {
     static final Field swt_control_handle;
@@ -202,8 +208,6 @@ public class SWTAccessor {
         if( null != OS_gtk_class ) {
             long widgedHandle = callStaticMethodL2L(OS_GTK_WIDGET_WINDOW, handle);
             long displayHandle = callStaticMethodL2L(OS_gdk_x11_drawable_get_xdisplay, widgedHandle);
-            // FIXME: May think about creating a private non-shared X11 Display handle, like we use to for AWT
-            //        to avoid locking problems !
             return new X11GraphicsDevice(displayHandle, AbstractGraphicsDevice.DEFAULT_UNIT, false);
         }
         if( NativeWindowFactory.TYPE_WINDOWS == NativeWindowFactory.getNativeWindowType(false) ) {
@@ -214,6 +218,26 @@ public class SWTAccessor {
         }
         throw new UnsupportedOperationException("n/a for this windowing system: "+NativeWindowFactory.getNativeWindowType(false));
     }
+    public static AbstractGraphicsScreen getScreen(AbstractGraphicsDevice device, int screen) {
+        if( null != OS_gtk_class ) {
+            return new X11GraphicsScreen((X11GraphicsDevice)device, screen);
+        } 
+        if( NativeWindowFactory.TYPE_WINDOWS == NativeWindowFactory.getNativeWindowType(false) ||
+            NativeWindowFactory.TYPE_MACOSX == NativeWindowFactory.getNativeWindowType(false) ) {
+            return new DefaultGraphicsScreen(device, screen);
+        }
+        throw new UnsupportedOperationException("n/a for this windowing system: "+NativeWindowFactory.getNativeWindowType(false));        
+    }
+    public static int getNativeVisualID(AbstractGraphicsDevice device, long windowHandle) {
+        if( null != OS_gtk_class ) {
+            return X11Lib.GetVisualIDFromWindow(device.getHandle(), windowHandle);
+        }
+        if( NativeWindowFactory.TYPE_WINDOWS == NativeWindowFactory.getNativeWindowType(false) ||
+            NativeWindowFactory.TYPE_MACOSX == NativeWindowFactory.getNativeWindowType(false) ) {
+            return VisualIDHolder.VID_UNDEFINED;
+        }
+        throw new UnsupportedOperationException("n/a for this windowing system: "+NativeWindowFactory.getNativeWindowType(false));        
+    }
     
     public static long getWindowHandle(Control swtControl) {
         long handle = getHandle(swtControl);        
@@ -254,8 +278,25 @@ public class SWTAccessor {
         });
     }
     
+   /**
+    * Runs the specified action in an SWT compatible thread, which is:
+    * <ul>
+    *   <li>Mac OSX
+    *   <ul>
+    *     <!--li>AWT EDT: In case AWT is available, the AWT EDT is the OSX UI main thread</li-->
+    *     <li><i>Main Thread</i>: Run on OSX UI main thread.</li>
+    *   </ul></li>
+    *   <li>Linux, Windows, ..
+    *   <ul>
+    *     <li>Current thread.</li>
+    *   </ul></li>  
+    * </ul>
+    * @see Platform#AWT_AVAILABLE
+    * @see Platform#getOSType()
+    */
     public static void invoke(boolean wait, Runnable runnable) {
-        if(Platform.OS_TYPE == Platform.OSType.MACOS) {
+        if( Platform.OS_TYPE == Platform.OSType.MACOS ) {
+            // Use SWT main thread! Only reliable config w/ -XStartOnMainThread !?
             OSXUtil.RunOnMainThread(wait, runnable);
         } else {
             runnable.run();
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/x11/X11GraphicsDevice.java b/src/nativewindow/classes/com/jogamp/nativewindow/x11/X11GraphicsDevice.java
index 308756b..5e4d6f4 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/x11/X11GraphicsDevice.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/x11/X11GraphicsDevice.java
@@ -33,7 +33,6 @@
 
 package com.jogamp.nativewindow.x11;
 
-import jogamp.nativewindow.Debug;
 import jogamp.nativewindow.x11.X11Lib;
 import jogamp.nativewindow.x11.X11Util;
 
@@ -46,8 +45,7 @@ import javax.media.nativewindow.ToolkitLock;
  */
 
 public class X11GraphicsDevice extends DefaultGraphicsDevice implements Cloneable {
-    public static final boolean DEBUG = Debug.debug("GraphicsDevice");
-    final boolean closeDisplay;
+    final boolean handleOwner;
 
     /** Constructs a new X11GraphicsDevice corresponding to the given connection and default
      *  {@link javax.media.nativewindow.ToolkitLock} via {@link NativeWindowFactory#getDefaultToolkitLock(String)}.<br>
@@ -57,7 +55,7 @@ public class X11GraphicsDevice extends DefaultGraphicsDevice implements Cloneabl
      */
     public X11GraphicsDevice(String connection, int unitID) {
         super(NativeWindowFactory.TYPE_X11, connection, unitID);
-        closeDisplay = false;
+        handleOwner = false;
     }
 
     /** Constructs a new X11GraphicsDevice corresponding to the given native display handle and default
@@ -70,7 +68,7 @@ public class X11GraphicsDevice extends DefaultGraphicsDevice implements Cloneabl
         if(0==display) {
             throw new NativeWindowException("null display");
         }
-        closeDisplay = owner;
+        handleOwner = owner;
     }
 
     /**
@@ -83,16 +81,39 @@ public class X11GraphicsDevice extends DefaultGraphicsDevice implements Cloneabl
         if(0==display) {
             throw new NativeWindowException("null display");
         }
-        closeDisplay = owner;
+        handleOwner = owner;
     }
 
+    public int getDefaultVisualID() {
+        // It still could be an AWT hold handle ..
+        final long display = getHandle();
+        final int scrnIdx = X11Lib.DefaultScreen(display);
+        return X11Lib.DefaultVisualID(display, scrnIdx);
+    }
+    
+    @Override
     public Object clone() {
       return super.clone();
     }
 
+    @Override
+    public boolean open() {
+        if(handleOwner && 0 == handle) {
+            if(DEBUG) {
+                System.err.println(Thread.currentThread().getName() + " - X11GraphicsDevice.open(): "+this);
+            }
+            handle = X11Util.openDisplay(connection);
+            if(0 == handle) {
+                throw new NativeWindowException("X11GraphicsDevice.open() failed: "+this);
+            }
+            return true;
+        }
+        return false;
+    }
+        
+    @Override
     public boolean close() {
-        // FIXME: shall we respect the unitID ?
-        if(closeDisplay && 0 != handle) {
+        if(handleOwner && 0 != handle) {
             if(DEBUG) {
                 System.err.println(Thread.currentThread().getName() + " - X11GraphicsDevice.close(): "+this);
             }
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/x11/X11GraphicsScreen.java b/src/nativewindow/classes/com/jogamp/nativewindow/x11/X11GraphicsScreen.java
index 94013ec..5f3c220 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/x11/X11GraphicsScreen.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/x11/X11GraphicsScreen.java
@@ -56,13 +56,11 @@ public class X11GraphicsScreen extends DefaultGraphicsScreen implements Cloneabl
         return new X11GraphicsScreen(new X11GraphicsDevice(display, AbstractGraphicsDevice.DEFAULT_UNIT, owner), screenIdx);
     }
 
-    public long getDefaultVisualID() {
+    public int getVisualID() {
         // It still could be an AWT hold handle ..
-        long display = getDevice().getHandle();
-        int scrnIdx = X11Lib.DefaultScreen(display);
-        return X11Lib.DefaultVisualID(display, scrnIdx);
+        return X11Lib.DefaultVisualID(getDevice().getHandle(), getIndex());
     }
-
+    
     private static int fetchScreen(X11GraphicsDevice device, int screen) {
         // It still could be an AWT hold handle ..
         if(X11Util.XineramaIsEnabled(device.getHandle())) {
diff --git a/src/nativewindow/classes/javax/media/nativewindow/AbstractGraphicsDevice.java b/src/nativewindow/classes/javax/media/nativewindow/AbstractGraphicsDevice.java
index 1dd01a2..756e445 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/AbstractGraphicsDevice.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/AbstractGraphicsDevice.java
@@ -40,11 +40,15 @@
 
 package javax.media.nativewindow;
 
+import jogamp.nativewindow.Debug;
+
 /** A interface describing a graphics device in a
     toolkit-independent manner.
  */
 
 public interface AbstractGraphicsDevice extends Cloneable {
+    public static final boolean DEBUG = Debug.debug("GraphicsDevice");
+    
     /** Dummy connection value for a default connection where no native support for multiple devices is available */
     public static String DEFAULT_CONNECTION = "decon";
 
@@ -109,16 +113,33 @@ public interface AbstractGraphicsDevice extends Cloneable {
      */
     public void unlock();
 
+    /** 
+     * Optionally [re]opening the device if handle is <code>null</code>.
+     * <p>
+     * The default implementation is a <code>NOP</code>.
+     * </p>
+     * <p>
+     * Example implementations like {@link com.jogamp.nativewindow.x11.X11GraphicsDevice} 
+     * or {@link com.jogamp.nativewindow.egl.EGLGraphicsDevice} 
+     * issue the native open operation in case handle is <code>null</code>.
+     * </p> 
+     *
+     * @return true if the handle was <code>null</code> and opening was successful, otherwise false.
+     */
+    public boolean open();
+
     /**
-     * Optionally closing the device.
+     * Optionally closing the device if handle is not <code>null</code>.
      * <p>
      * The default implementation is a <code>NOP</code>, just setting the handle to <code>null</code>.
      * </p>
-     * The specific implementing, ie {@link com.jogamp.nativewindow.x11.X11GraphicsDevice},
-     * shall have a enable/disable like {@link com.jogamp.nativewindow.x11.X11GraphicsDevice#setCloseDisplay(boolean, boolean)},<br>
-     * which shall be invoked at creation time to determine ownership/role of freeing the resource.<br>
+     * <p>
+     * Example implementations like {@link com.jogamp.nativewindow.x11.X11GraphicsDevice} 
+     * or {@link com.jogamp.nativewindow.egl.EGLGraphicsDevice} 
+     * issue the native close operation or skip it depending on the handles's ownership.
+     * </p> 
      *
-     * @return true if the handle was not <code>null</code>, otherwise false.
+     * @return true if the handle was not <code>null</code> and closing was successful, otherwise false.
      */
     public boolean close();
 }
diff --git a/src/nativewindow/classes/javax/media/nativewindow/Capabilities.java b/src/nativewindow/classes/javax/media/nativewindow/Capabilities.java
index b422f50..cb33aec 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/Capabilities.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/Capabilities.java
@@ -1,22 +1,22 @@
 /*
  * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
  * Copyright (c) 2010 JogAmp Community. All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- * 
+ *
  * - Redistribution of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
- * 
+ *
  * - Redistribution in binary form must reproduce the above copyright
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the distribution.
- * 
+ *
  * Neither the name of Sun Microsystems, Inc. or the names of
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * This software is provided "AS IS," without a warranty of any kind. ALL
  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -29,11 +29,11 @@
  * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
  * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
  * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
+ *
  * You acknowledge that this software is not designed or intended for use
  * in the design, construction, operation or maintenance of any nuclear
  * facility.
- * 
+ *
  * Sun gratefully acknowledges that this software was originally authored
  * and developed by Kenneth Bradley Russell and Christopher John Kline.
  */
@@ -44,7 +44,7 @@ package javax.media.nativewindow;
     must support, such as color depth per channel. It currently
     contains the minimal number of routines which allow configuration
     on all supported window systems. */
-public class Capabilities implements CapabilitiesImmutable, Cloneable, Comparable {
+public class Capabilities implements CapabilitiesImmutable, Cloneable {
   protected final static String na_str = "----" ;
 
   private int     redBits        = 8;
@@ -67,10 +67,12 @@ public class Capabilities implements CapabilitiesImmutable, Cloneable, Comparabl
     */
   public Capabilities() {}
 
+  @Override
   public Object cloneMutable() {
     return clone();
   }
-  
+
+  @Override
   public Object clone() {
     try {
       return super.clone();
@@ -79,6 +81,7 @@ public class Capabilities implements CapabilitiesImmutable, Cloneable, Comparabl
     }
   }
 
+  @Override
   public int hashCode() {
     // 31 * x == (x << 5) - x
     int hash = 31 + this.redBits;
@@ -94,6 +97,7 @@ public class Capabilities implements CapabilitiesImmutable, Cloneable, Comparabl
     return hash;
   }
 
+  @Override
   public boolean equals(Object obj) {
     if(this == obj)  { return true; }
     if(!(obj instanceof CapabilitiesImmutable)) {
@@ -116,20 +120,23 @@ public class Capabilities implements CapabilitiesImmutable, Cloneable, Comparabl
     return res;
   }
 
-  /** comparing RGBA values only */
-  public int compareTo(Object o) {
-    if ( ! ( o instanceof Capabilities ) ) {
+  /**
+   * Comparing RGBA values only
+   **/
+  @Override
+  public int compareTo(final CapabilitiesImmutable caps) {
+    /** 
+    if ( ! ( o instanceof CapabilitiesImmutable ) ) {
         Class<?> c = (null != o) ? o.getClass() : null ;
-        throw new ClassCastException("Not a Capabilities object: " + c);
+        throw new ClassCastException("Not a CapabilitiesImmutable object, but " + c);
     }
-
-    final Capabilities caps = (Capabilities) o;
-
+    final CapabilitiesImmutable caps = (CapabilitiesImmutable) o; */
+        
     final int a = ( alphaBits > 0 ) ? alphaBits : 1;
     final int rgba = redBits * greenBits * blueBits * a;
 
-    final int xa = ( caps.alphaBits ) > 0 ? caps.alphaBits : 1;
-    final int xrgba = caps.redBits * caps.greenBits * caps.blueBits * xa;
+    final int xa = ( caps.getAlphaBits() ) > 0 ? caps.getAlphaBits() : 1;
+    final int xrgba = caps.getRedBits() * caps.getGreenBits() * caps.getBlueBits() * xa;
 
     if(rgba > xrgba) {
         return 1;
@@ -148,13 +155,14 @@ public class Capabilities implements CapabilitiesImmutable, Cloneable, Comparabl
               return VisualIDHolder.VID_UNDEFINED;
           default:
               throw new NativeWindowException("Invalid type <"+type+">");
-      }      
+      }
   }
-    
+
   /** Returns the number of bits requested for the color buffer's red
       component. On some systems only the color depth, which is the
       sum of the red, green, and blue bits, is considered. */
-  public int getRedBits() {
+  @Override
+  public final int getRedBits() {
     return redBits;
   }
 
@@ -168,7 +176,8 @@ public class Capabilities implements CapabilitiesImmutable, Cloneable, Comparabl
   /** Returns the number of bits requested for the color buffer's
       green component. On some systems only the color depth, which is
       the sum of the red, green, and blue bits, is considered. */
-  public int getGreenBits() {
+  @Override
+  public final int getGreenBits() {
     return greenBits;
   }
 
@@ -182,7 +191,8 @@ public class Capabilities implements CapabilitiesImmutable, Cloneable, Comparabl
   /** Returns the number of bits requested for the color buffer's blue
       component. On some systems only the color depth, which is the
       sum of the red, green, and blue bits, is considered. */
-  public int getBlueBits() {
+  @Override
+  public final int getBlueBits() {
     return blueBits;
   }
 
@@ -192,51 +202,61 @@ public class Capabilities implements CapabilitiesImmutable, Cloneable, Comparabl
   public void setBlueBits(int blueBits) {
     this.blueBits = blueBits;
   }
-  
+
   /** Returns the number of bits requested for the color buffer's
       alpha component. On some systems only the color depth, which is
       the sum of the red, green, and blue bits, is considered. */
-  public int getAlphaBits() {
+  @Override
+  public final int getAlphaBits() {
     return alphaBits;
   }
 
-  /** Sets the number of bits requested for the color buffer's alpha
-      component. On some systems only the color depth, which is the
-      sum of the red, green, and blue bits, is considered. */
+  /** 
+   * Sets the number of bits requested for the color buffer's alpha
+   * component. On some systems only the color depth, which is the
+   * sum of the red, green, and blue bits, is considered.
+   * <p>
+   * <b>Note:</b> If alpha bits are <code>zero</code>, they are set to <code>one</code> 
+   * by {@link #setBackgroundOpaque(boolean)} and it's OpenGL specialization <code>GLCapabilities::setSampleBuffers(boolean)</code>.<br/>
+   * Ensure to call this method after the above to ensure a <code>zero</code> value.</br>
+   * The above automated settings takes into account, that the user calls this method to <i>request</i> alpha bits,
+   * not to <i>reflect</i> a current state. Nevertheless if this is the case - call it at last.
+   * </p>  
+   */
   public void setAlphaBits(int alphaBits) {
     this.alphaBits = alphaBits;
   }
 
-    /**
-     * Defaults to true, ie. opaque surface.
-     * <p>
-     * On supported platforms, setting opaque to false may result in a translucent surface. </p>
-     * 
-     * <p>
-     * Platform implementations may need an alpha component in the surface (eg. Windows), 
-     * or expect pre-multiplied alpha values (eg. X11/XRender).<br>
-     * To unify the experience, this method also invokes {@link #setAlphaBits(int) setAlphaBits(1)}
-     * if {@link #getAlphaBits()} == 0.<br>
-     * Please note that in case alpha is required on the platform the 
-     * clear color shall have an alpha lower than 1.0 to allow anything shining through.
-     * </p>
-     *   
-     * <p>
-     * Mind that translucency may cause a performance penalty
-     * due to the composite work required by the window manager.</p>
-     *
-     * <p>
-     * The platform implementation may utilize the transparency RGBA values.<br>
-     * This is true for the original GLX transparency specification, which is no more used today.<br>
-     * Actually these values are currently not used by any implementation, 
-     * so we may mark them deprecated soon, if this doesn't change.<br>
-     * </p>
-     */
+  /**
+   * Defaults to true, ie. opaque surface.
+   * <p>
+   * On supported platforms, setting opaque to false may result in a translucent surface. </p>
+   *
+   * <p>
+   * Platform implementations may need an alpha component in the surface (eg. Windows),
+   * or expect pre-multiplied alpha values (eg. X11/XRender).<br>
+   * To unify the experience, this method also invokes {@link #setAlphaBits(int) setAlphaBits(1)}
+   * if {@link #getAlphaBits()} == 0.<br>
+   * Please note that in case alpha is required on the platform the
+   * clear color shall have an alpha lower than 1.0 to allow anything shining through.
+   * </p>
+   *
+   * <p>
+   * Mind that translucency may cause a performance penalty
+   * due to the composite work required by the window manager.</p>
+   *
+   * <p>
+   * The platform implementation may utilize the transparency RGBA values.<br>
+   * This is true for the original GLX transparency specification, which is no more used today.<br>
+   * Actually these values are currently not used by any implementation,
+   * so we may mark them deprecated soon, if this doesn't change.<br>
+   * </p>
+   */
   public void setBackgroundOpaque(boolean opaque) {
-    backgroundOpaque = opaque;
-    if(!opaque && getAlphaBits()==0) {
-        setAlphaBits(1);
-    }
+      backgroundOpaque = opaque;
+      if(!opaque && getAlphaBits()==0) {
+          setAlphaBits(1);
+      }
   }
 
   /** Indicates whether the background of this OpenGL context should
@@ -244,7 +264,8 @@ public class Capabilities implements CapabilitiesImmutable, Cloneable, Comparabl
 
       @see #setBackgroundOpaque
   */
-  public boolean isBackgroundOpaque() {
+  @Override
+  public final boolean isBackgroundOpaque() {
     return backgroundOpaque;
   }
 
@@ -258,7 +279,8 @@ public class Capabilities implements CapabilitiesImmutable, Cloneable, Comparabl
   /** Indicates whether the drawable surface is onscreen.
       Defaults to true.
   */
-  public boolean isOnscreen() {
+  @Override
+  public final boolean isOnscreen() {
     return onscreen;
   }
 
@@ -266,25 +288,29 @@ public class Capabilities implements CapabilitiesImmutable, Cloneable, Comparabl
     * This value is undefined if {@link #isBackgroundOpaque()} equals true.
     * @see #setTransparentRedValue
     */
-  public int getTransparentRedValue() { return transparentValueRed; }
+  @Override
+  public final int getTransparentRedValue() { return transparentValueRed; }
 
   /** Gets the transparent green value for the frame buffer configuration.
     * This value is undefined if {@link #isBackgroundOpaque()} equals true.
     * @see #setTransparentGreenValue
     */
-  public int getTransparentGreenValue() { return transparentValueGreen; }
+  @Override
+  public final int getTransparentGreenValue() { return transparentValueGreen; }
 
   /** Gets the transparent blue value for the frame buffer configuration.
     * This value is undefined if {@link #isBackgroundOpaque()} equals true.
     * @see #setTransparentBlueValue
     */
-  public int getTransparentBlueValue() { return transparentValueBlue; }
+  @Override
+  public final int getTransparentBlueValue() { return transparentValueBlue; }
 
   /** Gets the transparent alpha value for the frame buffer configuration.
     * This value is undefined if {@link #isBackgroundOpaque()} equals true.
     * @see #setTransparentAlphaValue
     */
-  public int getTransparentAlphaValue() { return transparentValueAlpha; }
+  @Override
+  public final int getTransparentAlphaValue() { return transparentValueAlpha; }
 
   /** Sets the transparent red value for the frame buffer configuration,
       ranging from 0 to the maximum frame buffer value for red.
@@ -314,6 +340,7 @@ public class Capabilities implements CapabilitiesImmutable, Cloneable, Comparabl
       A value of -1 is interpreted as any value. */
   public void setTransparentAlphaValue(int transValueAlpha) { transparentValueAlpha=transValueAlpha; }
 
+  @Override
   public StringBuilder toString(StringBuilder sink) {
     if(null == sink) {
         sink = new StringBuilder();
@@ -334,7 +361,8 @@ public class Capabilities implements CapabilitiesImmutable, Cloneable, Comparabl
   protected final String toHexString(int val) { return Integer.toHexString(val); }
 
   /** Returns a textual representation of this Capabilities
-      object. */ 
+      object. */
+  @Override
   public String toString() {
     StringBuilder msg = new StringBuilder();
     msg.append("Caps[");
@@ -342,5 +370,4 @@ public class Capabilities implements CapabilitiesImmutable, Cloneable, Comparabl
     msg.append("]");
     return msg.toString();
   }
-
 }
diff --git a/src/nativewindow/classes/javax/media/nativewindow/CapabilitiesChooser.java b/src/nativewindow/classes/javax/media/nativewindow/CapabilitiesChooser.java
index a306363..e1fdf49 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/CapabilitiesChooser.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/CapabilitiesChooser.java
@@ -65,6 +65,6 @@ public interface CapabilitiesChooser {
       choice to some other CapabilitiesChooser object.
   */
   public int chooseCapabilities(CapabilitiesImmutable desired,
-                                List /*<CapabilitiesImmutable>*/ available,
+                                List<? extends CapabilitiesImmutable> available,
                                 int windowSystemRecommendedChoice);
 }
diff --git a/src/nativewindow/classes/javax/media/nativewindow/CapabilitiesImmutable.java b/src/nativewindow/classes/javax/media/nativewindow/CapabilitiesImmutable.java
index 3d7362c..b984a46 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/CapabilitiesImmutable.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/CapabilitiesImmutable.java
@@ -33,10 +33,10 @@ import com.jogamp.common.type.WriteCloneable;
 /**
  * Specifies an immutable set of capabilities that a window's rendering context
  * must support, such as color depth per channel.
- * 
+ *
  * @see javax.media.nativewindow.Capabilities
  */
-public interface CapabilitiesImmutable extends VisualIDHolder, WriteCloneable {
+public interface CapabilitiesImmutable extends VisualIDHolder, WriteCloneable, Comparable<CapabilitiesImmutable> {
 
     /**
      * Returns the number of bits requested for the color buffer's red
diff --git a/src/nativewindow/classes/javax/media/nativewindow/DefaultCapabilitiesChooser.java b/src/nativewindow/classes/javax/media/nativewindow/DefaultCapabilitiesChooser.java
index 48c4d31..9d4b112 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/DefaultCapabilitiesChooser.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/DefaultCapabilitiesChooser.java
@@ -69,7 +69,7 @@ public class DefaultCapabilitiesChooser implements CapabilitiesChooser {
   private static final boolean DEBUG = Debug.isPropertyDefined("nativewindow.debug.CapabilitiesChooser", true); 
 
   public int chooseCapabilities(final CapabilitiesImmutable desired,
-                                final List /*<CapabilitiesImmutable>*/ available,
+                                final List<? extends CapabilitiesImmutable> available,
                                 final int windowSystemRecommendedChoice) {
     if (DEBUG) {
       System.err.println("Desired: " + desired);
@@ -99,7 +99,7 @@ public class DefaultCapabilitiesChooser implements CapabilitiesChooser {
     }
     // Compute score for each
     for (int i = 0; i < availnum; i++) {
-      CapabilitiesImmutable cur = (CapabilitiesImmutable) available.get(i);
+      final CapabilitiesImmutable cur = available.get(i);
       if (cur == null) {
         continue;
       }
diff --git a/src/nativewindow/classes/javax/media/nativewindow/DefaultGraphicsDevice.java b/src/nativewindow/classes/javax/media/nativewindow/DefaultGraphicsDevice.java
index 187959a..583fde0 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/DefaultGraphicsDevice.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/DefaultGraphicsDevice.java
@@ -97,22 +97,27 @@ public class DefaultGraphicsDevice implements Cloneable, AbstractGraphicsDevice
         }
     }
 
+    @Override
     public final String getType() {
         return type;
     }
 
+    @Override
     public final String getConnection() {
         return connection;
     }
 
+    @Override
     public final int getUnitID() {
         return unitID;
     }
 
+    @Override
     public final String getUniqueID() {
       return uniqueID;
     }
 
+    @Override
     public final long getHandle() {
         return handle;
     }
@@ -124,6 +129,7 @@ public class DefaultGraphicsDevice implements Cloneable, AbstractGraphicsDevice
      * @see DefaultGraphicsDevice#DefaultGraphicsDevice(java.lang.String, long)
      * @see DefaultGraphicsDevice#DefaultGraphicsDevice(java.lang.String, long, javax.media.nativewindow.ToolkitLock)
      */
+    @Override
     public final void lock() {
         toolkitLock.lock();
     }
@@ -135,10 +141,17 @@ public class DefaultGraphicsDevice implements Cloneable, AbstractGraphicsDevice
      * @see DefaultGraphicsDevice#DefaultGraphicsDevice(java.lang.String, long)
      * @see DefaultGraphicsDevice#DefaultGraphicsDevice(java.lang.String, long, javax.media.nativewindow.ToolkitLock)
      */
+    @Override
     public final void unlock() {
         toolkitLock.unlock();
     }
+    
+    @Override
+    public boolean open() {
+        return false;
+    }
 
+    @Override
     public boolean close() {
         if(0 != handle) {
             handle = 0;
diff --git a/src/nativewindow/classes/javax/media/nativewindow/GraphicsConfigurationFactory.java b/src/nativewindow/classes/javax/media/nativewindow/GraphicsConfigurationFactory.java
index 2610f2c..c3fdc67 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/GraphicsConfigurationFactory.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/GraphicsConfigurationFactory.java
@@ -36,9 +36,15 @@ package javax.media.nativewindow;
 import com.jogamp.common.util.ReflectionUtil;
 import jogamp.nativewindow.Debug;
 import jogamp.nativewindow.DefaultGraphicsConfigurationFactoryImpl;
+
+import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Collections;
 import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
 import java.util.Map;
+import java.util.Set;
 
 /**
  * Provides the mechanism by which the graphics configuration for a
@@ -59,8 +65,43 @@ import java.util.Map;
 public abstract class GraphicsConfigurationFactory {
     protected static final boolean DEBUG;
 
-    private static Map<Class<?>, GraphicsConfigurationFactory> registeredFactories;
-    private static Class<?> abstractGraphicsDeviceClass;
+    private static class DeviceCapsType {
+        public final Class<?> deviceType;
+        public final Class<?> capsType;
+        private final int hash32;
+        
+        public DeviceCapsType(Class<?> deviceType, Class<?> capsType) {
+            this.deviceType = deviceType;
+            this.capsType = capsType;
+            
+            // 31 * x == (x << 5) - x
+            int hash32 = 31 + deviceType.hashCode();
+            hash32 = ((hash32 << 5) - hash32) + capsType.hashCode();
+            this.hash32 = hash32;
+        }
+        
+        public final int hashCode() {
+            return hash32;
+        }
+        
+        public final boolean equals(Object obj) {
+            if(this == obj)  { return true; }
+            if (obj instanceof DeviceCapsType) {
+                DeviceCapsType dct = (DeviceCapsType)obj;
+                return deviceType == dct.deviceType && capsType == dct.capsType;
+            }
+            return false;
+        }
+        
+        @Override
+        public final String toString() {
+            return "DeviceCapsType["+deviceType.getName()+", "+capsType.getName()+"]";
+        }
+        
+    }
+    
+    private static final Map<DeviceCapsType, GraphicsConfigurationFactory> registeredFactories;
+    private static final DeviceCapsType defaultDeviceCapsType; 
     static boolean initialized = false;
     
     static {
@@ -69,7 +110,8 @@ public abstract class GraphicsConfigurationFactory {
             System.err.println(Thread.currentThread().getName()+" - Info: GraphicsConfigurationFactory.<init>");
             // Thread.dumpStack();
         }
-        abstractGraphicsDeviceClass = javax.media.nativewindow.AbstractGraphicsDevice.class;        
+        registeredFactories = Collections.synchronizedMap(new HashMap<DeviceCapsType, GraphicsConfigurationFactory>());
+        defaultDeviceCapsType = new DeviceCapsType(AbstractGraphicsDevice.class, CapabilitiesImmutable.class);
     }
         
     public static synchronized void initSingleton() {
@@ -79,14 +121,13 @@ public abstract class GraphicsConfigurationFactory {
             if(DEBUG) {
                 System.err.println(Thread.currentThread().getName()+" - GraphicsConfigurationFactory.initSingleton()");
             }
-            registeredFactories = Collections.synchronizedMap(new HashMap<Class<?>, GraphicsConfigurationFactory>());
             
             // Register the default no-op factory for arbitrary
             // AbstractGraphicsDevice implementations, including
             // AWTGraphicsDevice instances -- the OpenGL binding will take
             // care of handling AWTGraphicsDevices on X11 platforms (as
             // well as X11GraphicsDevices in non-AWT situations)
-            registerFactory(abstractGraphicsDeviceClass, new DefaultGraphicsConfigurationFactoryImpl());
+            registerFactory(defaultDeviceCapsType.deviceType, defaultDeviceCapsType.capsType, new DefaultGraphicsConfigurationFactoryImpl());
             
             if (NativeWindowFactory.TYPE_X11.equals(NativeWindowFactory.getNativeWindowType(true))) {
                 try {
@@ -112,7 +153,6 @@ public abstract class GraphicsConfigurationFactory {
                 System.err.println(Thread.currentThread().getName()+" - GraphicsConfigurationFactory.shutdown()");
             }
             registeredFactories.clear();
-            registeredFactories = null;
         }
     }
     
@@ -133,74 +173,175 @@ public abstract class GraphicsConfigurationFactory {
     protected GraphicsConfigurationFactory() {
     }
 
-    /** Returns the factory for use with the given type of
-        AbstractGraphicsDevice. */
-    public static GraphicsConfigurationFactory getFactory(AbstractGraphicsDevice device) {
+    /**
+     * Returns the graphics configuration factory for use with the
+     * given device and capability.
+     * 
+     * @see #getFactory(Class, Class)
+     */
+    public static GraphicsConfigurationFactory getFactory(AbstractGraphicsDevice device, CapabilitiesImmutable caps) {        
         if (device == null) {
-            return getFactory(AbstractGraphicsDevice.class);
+            throw new IllegalArgumentException("null device");
+        }
+        if (caps == null) {
+            throw new IllegalArgumentException("null caps");
         }
-        return getFactory(device.getClass());
+        return getFactory(device.getClass(), caps.getClass());
     }
 
     /**
      * Returns the graphics configuration factory for use with the
-     * given class, which must implement the {@link
-     * AbstractGraphicsDevice} interface.
+     * given device and capability class.
+     * <p>
+     * Note: Registered device types maybe classes or interfaces, where capabilities types are interfaces only.
+     * </p>
+     *  
+     * <p>
+     * Pseudo code for finding a suitable factory is:
+     * <pre>
+        For-All devT := getTopDownDeviceTypes(deviceType)
+            For-All capsT := getTopDownCapabilitiesTypes(capabilitiesType)
+               f = factory.get(devT, capsT);
+               if(f) { return f; }
+            end
+        end
+     * </pre>
+     * </p>
      *
-     * @throws IllegalArgumentException if the given class does not implement AbstractGraphicsDevice
+     * @param deviceType the minimum capabilities class type accepted, must implement or extend {@link AbstractGraphicsDevice}
+     * @param capabilitiesType the minimum capabilities class type accepted, must implement or extend {@link CapabilitiesImmutable}
+     *
+     * @throws IllegalArgumentException if the deviceType does not implement {@link AbstractGraphicsDevice} or 
+     *                                  capabilitiesType does not implement {@link CapabilitiesImmutable}
      */
-    public static GraphicsConfigurationFactory getFactory(Class<?> abstractGraphicsDeviceImplementor)
+    public static GraphicsConfigurationFactory getFactory(Class<?> deviceType, Class<?> capabilitiesType)
         throws IllegalArgumentException, NativeWindowException
     {
-        if (!(abstractGraphicsDeviceClass.isAssignableFrom(abstractGraphicsDeviceImplementor))) {
+        if (!(defaultDeviceCapsType.deviceType.isAssignableFrom(deviceType))) {
             throw new IllegalArgumentException("Given class must implement AbstractGraphicsDevice");
         }
-
-        GraphicsConfigurationFactory factory = null;
-        Class<?> clazz = abstractGraphicsDeviceImplementor;
-        while (clazz != null) {
-            factory = registeredFactories.get(clazz);
-            if (factory != null) {
-                if(DEBUG) {
-                    System.err.println("GraphicsConfigurationFactory.getFactory() "+abstractGraphicsDeviceImplementor+" -> "+factory);
+        if (!(defaultDeviceCapsType.capsType.isAssignableFrom(capabilitiesType))) {
+            throw new IllegalArgumentException("Given capabilities class must implement CapabilitiesImmutable");
+        }
+        if(DEBUG) {
+            Thread.dumpStack();
+            System.err.println("GraphicsConfigurationFactory.getFactory: "+deviceType.getName()+", "+capabilitiesType.getName());
+            dumpFactories();
+        }
+        
+        final List<Class<?>> deviceTypes = getAllAssignableClassesFrom(defaultDeviceCapsType.deviceType, deviceType, false);        
+        if(DEBUG) {
+            System.err.println("GraphicsConfigurationFactory.getFactory() deviceTypes: " + deviceTypes);
+        }
+        final List<Class<?>> capabilitiesTypes = getAllAssignableClassesFrom(defaultDeviceCapsType.capsType, capabilitiesType, true);        
+        if(DEBUG) {
+            System.err.println("GraphicsConfigurationFactory.getFactory() capabilitiesTypes: " + capabilitiesTypes);
+        }
+        for(int j=0; j<deviceTypes.size(); j++) {
+            final Class<?> interfaceDevice = deviceTypes.get(j);
+            for(int i=0; i<capabilitiesTypes.size(); i++) {
+                Class<?> interfaceCaps = capabilitiesTypes.get(i);
+                final DeviceCapsType dct = new DeviceCapsType(interfaceDevice, interfaceCaps);
+                final GraphicsConfigurationFactory factory = registeredFactories.get(dct);
+                if (factory != null) {
+                    if(DEBUG) {
+                        System.err.println("GraphicsConfigurationFactory.getFactory() found "+dct+" -> "+factory);
+                    }
+                    return factory;
                 }
-                return factory;
             }
-            clazz = clazz.getSuperclass();
         }
         // Return the default
-        factory = registeredFactories.get(abstractGraphicsDeviceClass);
+        final GraphicsConfigurationFactory factory = registeredFactories.get(defaultDeviceCapsType);
         if(DEBUG) {
-            System.err.println("GraphicsConfigurationFactory.getFactory() DEFAULT "+abstractGraphicsDeviceClass+" -> "+factory);
+            System.err.println("GraphicsConfigurationFactory.getFactory() DEFAULT "+defaultDeviceCapsType+" -> "+factory);
         }
         return factory;
     }
+    private static ArrayList<Class<?>> getAllAssignableClassesFrom(Class<?> superClassOrInterface, Class<?> fromClass, boolean interfacesOnly) {
+        // Using a todo list avoiding a recursive loop! 
+        final ArrayList<Class<?>> inspectClasses  = new ArrayList<Class<?>>();
+        final ArrayList<Class<?>> resolvedInterfaces = new ArrayList<Class<?>>();
+        inspectClasses.add(fromClass);
+        for(int j=0; j<inspectClasses.size(); j++) {
+            final Class<?> clazz = inspectClasses.get(j);
+            getAllAssignableClassesFrom(superClassOrInterface, clazz, interfacesOnly, resolvedInterfaces, inspectClasses);
+        }
+        return resolvedInterfaces;
+    }
+    private static void getAllAssignableClassesFrom(Class<?> superClassOrInterface, Class<?> fromClass, boolean interfacesOnly, List<Class<?>> resolvedInterfaces, List<Class<?>> inspectClasses) {
+        final ArrayList<Class<?>> types = new ArrayList<Class<?>>();
+        if( superClassOrInterface.isAssignableFrom(fromClass) && !resolvedInterfaces.contains(fromClass)) {
+            if( !interfacesOnly || fromClass.isInterface() ) {
+                types.add(fromClass);
+            }
+        }
+        types.addAll(Arrays.asList(fromClass.getInterfaces()));
+                
+        for(int i=0; i<types.size(); i++) {
+            final Class<?> iface = types.get(i);
+            if( superClassOrInterface.isAssignableFrom(iface) && !resolvedInterfaces.contains(iface) ) {
+                resolvedInterfaces.add(iface);
+                if( !superClassOrInterface.equals(iface) && !inspectClasses.contains(iface) ) {
+                    inspectClasses.add(iface); // safe add to todo list, avoiding a recursive nature
+                }
+            }
+        }
+        final Class<?> parentClass = fromClass.getSuperclass();
+        if( null != parentClass && superClassOrInterface.isAssignableFrom(parentClass) && !inspectClasses.contains(parentClass) ) {
+            inspectClasses.add(parentClass); // safe add to todo list, avoiding a recursive nature
+        }
+    }
+    private static void dumpFactories() {
+        Set<DeviceCapsType> dcts = registeredFactories.keySet();
+        int i=0;
+        for(Iterator<DeviceCapsType> iter = dcts.iterator(); iter.hasNext(); ) {
+            DeviceCapsType dct = iter.next();
+            System.err.println("Factory #"+i+": "+dct+" -> "+registeredFactories.get(dct));
+            i++;
+        }
+    }
 
-    /** Registers a GraphicsConfigurationFactory handling graphics
-     * device objects of the given class. This does not need to be
-     * called by end users, only implementors of new
+    /** 
+     * Registers a GraphicsConfigurationFactory handling
+     * the given graphics device and capability class.
+     * <p>
+     * This does not need to be called by end users, only implementors of new
      * GraphicsConfigurationFactory subclasses.
-     *
+     * </p>
+     * 
+     * <p>
+     * Note: Registered device types maybe classes or interfaces, where capabilities types are interfaces only.
+     * </p> 
+     * 
+     * <p>See {@link #getFactory(Class, Class)} for a description of the find algorithm.</p>
+     * 
+     * @param deviceType the minimum capabilities class type accepted, must implement or extend interface {@link AbstractGraphicsDevice}
+     * @param capabilitiesType the minimum capabilities class type accepted, must extend interface {@link CapabilitiesImmutable}
      * @return the previous registered factory, or null if none
      * @throws IllegalArgumentException if the given class does not implement AbstractGraphicsDevice
      */
-    protected static GraphicsConfigurationFactory registerFactory(Class<?> abstractGraphicsDeviceImplementor, GraphicsConfigurationFactory factory)
+    protected static GraphicsConfigurationFactory registerFactory(Class<?> abstractGraphicsDeviceImplementor, Class<?> capabilitiesType, GraphicsConfigurationFactory factory)
         throws IllegalArgumentException
     {
-        if (!(abstractGraphicsDeviceClass.isAssignableFrom(abstractGraphicsDeviceImplementor))) {
-            throw new IllegalArgumentException("Given class must implement AbstractGraphicsDevice");
+        if (!(defaultDeviceCapsType.deviceType.isAssignableFrom(abstractGraphicsDeviceImplementor))) {
+            throw new IllegalArgumentException("Given device class must implement AbstractGraphicsDevice");
         }
+        if (!(defaultDeviceCapsType.capsType.isAssignableFrom(capabilitiesType))) {
+            throw new IllegalArgumentException("Given capabilities class must implement CapabilitiesImmutable");
+        }        
+        final DeviceCapsType dct = new DeviceCapsType(abstractGraphicsDeviceImplementor, capabilitiesType);
         final GraphicsConfigurationFactory prevFactory;
         if(null == factory) {
-            prevFactory = registeredFactories.remove(abstractGraphicsDeviceImplementor);
+            prevFactory = registeredFactories.remove(dct);
             if(DEBUG) {
-                System.err.println("GraphicsConfigurationFactory.registerFactory() remove "+abstractGraphicsDeviceImplementor+
+                System.err.println("GraphicsConfigurationFactory.registerFactory() remove "+dct+
                                    ", deleting: "+prevFactory);
             }
         } else {
-            prevFactory = registeredFactories.put(abstractGraphicsDeviceImplementor, factory);
+            prevFactory = registeredFactories.put(dct, factory);
             if(DEBUG) {
-                System.err.println("GraphicsConfigurationFactory.registerFactory() put "+abstractGraphicsDeviceImplementor+" -> "+factory+
+                System.err.println("GraphicsConfigurationFactory.registerFactory() put "+dct+" -> "+factory+
                                    ", overridding: "+prevFactory);
             }
         }
@@ -244,6 +385,7 @@ public abstract class GraphicsConfigurationFactory {
      * @param capsRequested  the original requested capabilities
      * @param chooser        the choosing implementation
      * @param screen         the referring Screen
+     * @param nativeVisualID if not {@link VisualIDHolder#VID_UNDEFINED} it reflects a pre-chosen visualID of the native platform's windowing system. 
      * @return               the complete GraphicsConfiguration
      *
      * @throws IllegalArgumentException if the data type of the passed
@@ -258,7 +400,7 @@ public abstract class GraphicsConfigurationFactory {
     public final AbstractGraphicsConfiguration
         chooseGraphicsConfiguration(CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested,
                                     CapabilitiesChooser chooser,
-                                    AbstractGraphicsScreen screen)
+                                    AbstractGraphicsScreen screen, int nativeVisualID)
         throws IllegalArgumentException, NativeWindowException {
         if(null==capsChosen) {
             throw new NativeWindowException("Chosen Capabilities are null");
@@ -275,7 +417,7 @@ public abstract class GraphicsConfigurationFactory {
         }
         device.lock();
         try {
-            return chooseGraphicsConfigurationImpl(capsChosen, capsRequested, chooser, screen);
+            return chooseGraphicsConfigurationImpl(capsChosen, capsRequested, chooser, screen, nativeVisualID);
         } finally {
             device.unlock();
         }
@@ -283,7 +425,7 @@ public abstract class GraphicsConfigurationFactory {
 
     protected abstract AbstractGraphicsConfiguration
         chooseGraphicsConfigurationImpl(CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested,
-                                        CapabilitiesChooser chooser, AbstractGraphicsScreen screen)
+                                        CapabilitiesChooser chooser, AbstractGraphicsScreen screen, int nativeVisualID)
         throws IllegalArgumentException, NativeWindowException;
 
 }
diff --git a/src/newt/classes/jogamp/newt/event/NEWTEventTask.java b/src/nativewindow/classes/javax/media/nativewindow/MutableSurface.java
similarity index 66%
copy from src/newt/classes/jogamp/newt/event/NEWTEventTask.java
copy to src/nativewindow/classes/javax/media/nativewindow/MutableSurface.java
index fae6560..ff53c81 100644
--- a/src/newt/classes/jogamp/newt/event/NEWTEventTask.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/MutableSurface.java
@@ -1,16 +1,16 @@
 /**
- * Copyright 2010 JogAmp Community. All rights reserved.
+ * Copyright 2012 JogAmp Community. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without modification, are
  * permitted provided that the following conditions are met:
- * 
+ *
  *    1. Redistributions of source code must retain the above copyright notice, this list of
  *       conditions and the following disclaimer.
- * 
+ *
  *    2. Redistributions in binary form must reproduce the above copyright notice, this list
  *       of conditions and the following disclaimer in the documentation and/or other materials
  *       provided with the distribution.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
@@ -20,37 +20,25 @@
  * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- * 
+ *
  * The views and conclusions contained in the software and documentation are those of the
  * authors and should not be interpreted as representing official policies, either expressed
  * or implied, of JogAmp Community.
  */
- 
-package jogamp.newt.event;
 
-import com.jogamp.newt.event.NEWTEvent;
+package javax.media.nativewindow;
 
 /**
- * Helper class to provide a NEWTEvent queue implementation with a NEWTEvent wrapper
- * which notifies after sending the event for the <code>invokeAndWait()</code> semantics.
+ * Provides a {@link NativeSurface} with a mutable <code>surfaceHandle</code>
+ * via {@link #setSurfaceHandle(long)}.
+ * 
+ * @see NativeSurface
  */
-public class NEWTEventTask {
-    NEWTEvent event;
-    Object notifyObject;
-
-    public NEWTEventTask(NEWTEvent event, Object notifyObject) {
-        this.event = event ;
-        this.notifyObject = notifyObject ;
-    }
-
-    public NEWTEvent get() { return event; }
+public interface MutableSurface extends NativeSurface {
 
-    public void notifyIssuer() {
-        if(null != notifyObject) {
-            synchronized (notifyObject) {
-                notifyObject.notifyAll();
-            }
-        }
-    }
+    /** 
+     * Sets the surface handle which is created outside of this implementation.
+     */
+    public void setSurfaceHandle(long surfaceHandle);
 }
 
diff --git a/src/nativewindow/classes/javax/media/nativewindow/NativeSurface.java b/src/nativewindow/classes/javax/media/nativewindow/NativeSurface.java
index b7829cb..cec7d4e 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/NativeSurface.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/NativeSurface.java
@@ -83,10 +83,11 @@ public interface NativeSurface extends SurfaceUpdatedListener {
    * @return {@link #LOCK_SUCCESS}, {@link #LOCK_SURFACE_CHANGED} or {@link #LOCK_SURFACE_NOT_READY}.
    *
    * @throws RuntimeException after timeout when waiting for the surface lock
+   * @throws NativeWindowException if native locking failed, maybe platform related
    *
    * @see com.jogamp.common.util.locks.RecursiveLock
    */
-  public int lockSurface();
+  public int lockSurface() throws NativeWindowException, RuntimeException;
 
   /**
    * Unlock the surface of this native window
@@ -96,23 +97,25 @@ public interface NativeSurface extends SurfaceUpdatedListener {
    * The implementation shall also invoke {@link AbstractGraphicsDevice#unlock()}
    * for the final unlock (recursive count zero).<P>
    *
-   * @throws RuntimeException if surface is not locked
+   * The implementation shall be fail safe, i.e. tolerant in case the native resources
+   * are already released / unlocked. In this case the implementation shall simply ignore the call.
    *
    * @see #lockSurface
    * @see com.jogamp.common.util.locks.RecursiveLock
    */
-  public void unlockSurface() throws NativeWindowException ;
+  public void unlockSurface();
 
   /**
-   * Return if surface is locked by another thread, ie not the current one
+   * Query if surface is locked by another thread, i.e. not the current one.
+   * <br>
+   * Convenient shortcut for:
+   * <pre>
+   *   final Thread o = getSurfaceLockOwner();
+   *   if( null != o && Thread.currentThread() != o ) { .. }
+   * </pre>
    */
   public boolean isSurfaceLockedByOtherThread();
-
-  /**
-   * Return if surface is locked
-   */
-  public boolean isSurfaceLocked();
-
+  
   /**
    * Return the locking owner's Thread, or null if not locked.
    */
diff --git a/src/nativewindow/classes/javax/media/nativewindow/NativeWindow.java b/src/nativewindow/classes/javax/media/nativewindow/NativeWindow.java
index 2bc3521..12e2029 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/NativeWindow.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/NativeWindow.java
@@ -1,22 +1,22 @@
 /*
  * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
  * Copyright (c) 2010 JogAmp Community. All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- * 
+ *
  * - Redistribution of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
- * 
+ *
  * - Redistribution in binary form must reproduce the above copyright
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the distribution.
- * 
+ *
  * Neither the name of Sun Microsystems, Inc. or the names of
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * This software is provided "AS IS," without a warranty of any kind. ALL
  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -29,11 +29,11 @@
  * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
  * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
  * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
+ *
  * You acknowledge that this software is not designed or intended for use
  * in the design, construction, operation or maintenance of any nuclear
  * facility.
- * 
+ *
  * Sun gratefully acknowledges that this software was originally authored
  * and developed by Kenneth Bradley Russell and Christopher John Kline.
  */
@@ -52,8 +52,8 @@ import javax.media.nativewindow.util.Point;
     which can create NativeWindow objects for its components. <P>
 */
 public interface NativeWindow extends NativeSurface {
- 
-  /** 
+
+  /**
    * destroys the window and releases
    * windowing related resources.
    */
@@ -67,63 +67,63 @@ public interface NativeWindow extends NativeSurface {
   /**
    * Returns the window handle for this NativeWindow. <P>
    *
-   * The window handle shall reflect the platform one 
+   * The window handle shall reflect the platform one
    * for all window related operations, e.g. open, close, resize. <P>
    *
    * On X11 this returns an entity of type Window. <BR>
-   * On Microsoft Windows this returns an entity of type HWND. 
+   * On Microsoft Windows this returns an entity of type HWND.
    */
   public long getWindowHandle();
 
-  /** 
+  /**
    * Returns the insets defined as the width and height of the window decoration
    * on the left, right, top and bottom.<br>
    * Insets are zero if the window is undecorated, including child windows.
-   * 
+   *
    * <p>
    * Insets are available only after the native window has been created,
    * ie. the native window has been made visible.<br>
-   *   
+   *
    * The top-level window area's top-left corner is located at
    * <pre>
    *   getX() - getInsets().{@link InsetsImmutable#getLeftWidth() getLeftWidth()}
    *   getY() - getInsets().{@link InsetsImmutable#getTopHeight() getTopHeight()}
-   * </pre> 
-   * 
+   * </pre>
+   *
    * The top-level window size is
    * <pre>
-   *   getWidth()  + getInsets().{@link InsetsImmutable#getTotalWidth() getTotalWidth()} 
+   *   getWidth()  + getInsets().{@link InsetsImmutable#getTotalWidth() getTotalWidth()}
    *   getHeight() + getInsets().{@link InsetsImmutable#getTotalHeight() getTotalHeight()}
-   * </pre> 
-   * 
+   * </pre>
+   *
    * @return insets
    */
   public InsetsImmutable getInsets();
-  
+
   /** Returns the current x position of this window, relative to it's parent. */
-  
-  /** 
+
+  /**
    * @return the current x position of the top-left corner
-   *         of the client area relative to it's parent. 
+   *         of the client area relative to it's parent.
    *         Since the position reflects the client area, it does not include the insets.
    * @see #getInsets()
    */
   public int getX();
 
-  /** 
+  /**
    * @return the current y position of the top-left corner
-   *         of the client area relative to it's parent. 
+   *         of the client area relative to it's parent.
    *         Since the position reflects the client area, it does not include the insets.
    * @see #getInsets()
    */
   public int getY();
 
-  /** 
-   * Returns the current position of the top-left corner 
+  /**
+   * Returns the current position of the top-left corner
    * of the client area in screen coordinates.
    * <p>
    * Since the position reflects the client area, it does not include the insets.
-   * </p> 
+   * </p>
    * @param point if not null,
    *        {@link javax.media.nativewindow.util.Point#translate(javax.media.nativewindow.util.Point)}
    *        the passed {@link javax.media.nativewindow.util.Point} by this location on the screen and return it.
@@ -131,8 +131,8 @@ public interface NativeWindow extends NativeSurface {
    *         or a new instance with the screen location of this NativeWindow.
    */
   public Point getLocationOnScreen(Point point);
-  
+
   /** Returns true if this native window owns the focus, otherwise false. */
   boolean hasFocus();
-  
+
 }
diff --git a/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java b/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java
index b85ad47..6faa989 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java
@@ -561,4 +561,21 @@ public abstract class NativeWindowFactory {
         }
         return null;            
     }
+    
+    /**
+     * Returns true if the given visualID is valid for further processing, i.e. OpenGL usage,
+     * otherwise return false.
+     * <p>
+     * On certain platforms, i.e. X11, a valid visualID is required at window creation.
+     * Other platforms may determine it later on, e.g. OSX and Windows. </p>
+     * <p>
+     * If the visualID is {@link VisualIDHolder#VID_UNDEFINED} and the platform requires it
+     * at creation time (see above), it is not valid for further processing.
+     * </p>
+     */
+    public static boolean isNativeVisualIDValidForProcessing(int visualID) {
+        return NativeWindowFactory.TYPE_X11 != NativeWindowFactory.getNativeWindowType(false) || 
+               VisualIDHolder.VID_UNDEFINED != visualID ;
+    }
+        
 }
diff --git a/src/nativewindow/classes/javax/media/nativewindow/OffscreenLayerSurface.java b/src/nativewindow/classes/javax/media/nativewindow/OffscreenLayerSurface.java
index dd36509..f7dbc6c 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/OffscreenLayerSurface.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/OffscreenLayerSurface.java
@@ -42,7 +42,12 @@ public interface OffscreenLayerSurface {
    * Detaches a previously attached offscreen layer from this offscreen layer surface.
    * @see #attachSurfaceLayer(long)
    * @see #isOffscreenLayerSurfaceEnabled()
-   * @throws NativeWindowException if {@link #isOffscreenLayerSurfaceEnabled()} == false
+   * @throws NativeWindowException if {@link #isOffscreenLayerSurfaceEnabled()} == false 
+   *                               or no surface layer is attached.
    */
-  public void detachSurfaceLayer(final long layerHandle) throws NativeWindowException;
+  public void detachSurfaceLayer() throws NativeWindowException;
+  
+  /** Returns true if a surface layer is attached, otherwise false. */
+  public boolean isSurfaceLayerAttached();
+  
 }
diff --git a/src/nativewindow/classes/javax/media/nativewindow/ProxySurface.java b/src/nativewindow/classes/javax/media/nativewindow/ProxySurface.java
index 6a36bb1..7fc9789 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/ProxySurface.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/ProxySurface.java
@@ -28,38 +28,109 @@
 
 package javax.media.nativewindow;
 
-
 import jogamp.nativewindow.Debug;
 import jogamp.nativewindow.SurfaceUpdatedHelper;
 
 import com.jogamp.common.util.locks.LockFactory;
 import com.jogamp.common.util.locks.RecursiveLock;
 
-public abstract class ProxySurface implements NativeSurface {
+public abstract class ProxySurface implements NativeSurface, MutableSurface {
     public static final boolean DEBUG = Debug.debug("ProxySurface");
     
-    private SurfaceUpdatedHelper surfaceUpdatedHelper = new SurfaceUpdatedHelper();
-    private AbstractGraphicsConfiguration config; // control access due to delegation
-    protected RecursiveLock surfaceLock = LockFactory.createRecursiveLock();
+    /** 
+     * Implementation specific bitvalue stating the upstream's {@link AbstractGraphicsDevice} is owned by this {@link ProxySurface}.
+     * @see #setImplBitfield(int)
+     * @see #getImplBitfield()
+     */ 
+    public static final int OWN_DEVICE = 1 << 7;
+    
+    /** 
+     * Implementation specific bitvalue stating the upstream's {@link NativeSurface} is an invisible window, i.e. maybe incomplete.
+     * @see #setImplBitfield(int)
+     * @see #getImplBitfield()
+     */ 
+    public static final int INVISIBLE_WINDOW = 1 << 8;
+
+    /** Interface allowing upstream caller to pass lifecycle actions and size info to a {@link ProxySurface} instance. */ 
+    public interface UpstreamSurfaceHook {
+        /** called within {@link ProxySurface#createNotify()} within lock, before using surface. */
+        public void create(ProxySurface s);
+        /** called within {@link ProxySurface#destroyNotify()} within lock, before clearing fields. */
+        public void destroy(ProxySurface s);
+
+        /** Returns the width of the upstream surface */ 
+        public int getWidth(ProxySurface s);
+        /** Returns the height of the upstream surface */ 
+        public int getHeight(ProxySurface s);
+    }
+    
+    private final SurfaceUpdatedHelper surfaceUpdatedHelper = new SurfaceUpdatedHelper();
+    private final AbstractGraphicsConfiguration config; // control access due to delegation
+    private final UpstreamSurfaceHook upstream;
+    public final int initialWidth;
+    public final int initialHeight;
     private long surfaceHandle_old;
+    protected RecursiveLock surfaceLock = LockFactory.createRecursiveLock();
     protected long displayHandle;
-    protected int height;
     protected int scrnIndex;
-    protected int width;
+    protected int implBitfield;
 
-    public ProxySurface(AbstractGraphicsConfiguration cfg) {
-        invalidate();
-        config = cfg;
-        displayHandle=cfg.getNativeGraphicsConfiguration().getScreen().getDevice().getHandle();
-        surfaceHandle_old = 0;
+    /**
+     * @param cfg the {@link AbstractGraphicsConfiguration} to be used
+     * @param initialWidth the initial width
+     * @param initialHeight the initial height
+     */
+    protected ProxySurface(AbstractGraphicsConfiguration cfg, int initialWidth, int initialHeight, UpstreamSurfaceHook upstream) {
+        if(null == cfg) {
+            throw new IllegalArgumentException("null config");
+        }
+        this.config = cfg;
+        this.upstream = upstream;
+        this.initialWidth = initialWidth;
+        this.initialHeight = initialHeight;
+        this.displayHandle=config.getNativeGraphicsConfiguration().getScreen().getDevice().getHandle();
+        this.surfaceHandle_old = 0;
+        this.implBitfield = 0;
     }
 
-    void invalidate() {
-        displayHandle = 0;
-        invalidateImpl();
+    public final UpstreamSurfaceHook getUpstreamSurfaceHook() { return upstream; }
+    
+    /** 
+     * If a valid {@link UpstreamSurfaceHook} instance is passed in the 
+     * {@link ProxySurface#ProxySurface(AbstractGraphicsConfiguration, int, int, UpstreamSurfaceHook) constructor}, 
+     * {@link UpstreamSurfaceHook#create(ProxySurface)} is being issued and the proxy surface/window handles shall be set.
+     */ 
+    public void createNotify() {
+        if(null != upstream) {
+            upstream.create(this);
+        }
+        this.displayHandle=config.getNativeGraphicsConfiguration().getScreen().getDevice().getHandle();
+        this.surfaceHandle_old = 0;
     }
-    protected abstract void invalidateImpl();
-
+    
+    /** 
+     * If a valid {@link UpstreamSurfaceHook} instance is passed in the 
+     * {@link ProxySurface#ProxySurface(AbstractGraphicsConfiguration, int, int, UpstreamSurfaceHook) constructor}, 
+     * {@link UpstreamSurfaceHook#destroy(ProxySurface)} is being issued and all fields are cleared.
+     */ 
+    public void destroyNotify() {
+        if(null != upstream) {
+            upstream.destroy(this);
+            invalidateImpl();
+        }
+        this.displayHandle = 0;
+        this.surfaceHandle_old = 0;
+    }
+    
+    /** 
+     * Must be overridden by implementations allowing having a {@link UpstreamSurfaceHook} being passed.
+     * @see #destroyNotify() 
+     */
+    protected void invalidateImpl() {
+        throw new InternalError("UpstreamSurfaceHook given, but required method not implemented.");        
+    }
+    
+    @Override
     public final long getDisplayHandle() {
         return displayHandle;
     }
@@ -67,51 +138,66 @@ public abstract class ProxySurface implements NativeSurface {
     protected final AbstractGraphicsConfiguration getPrivateGraphicsConfiguration() {
         return config;
     }
-    
+
+    @Override
     public final AbstractGraphicsConfiguration getGraphicsConfiguration() {
         return config.getNativeGraphicsConfiguration();
     }
 
+    @Override
     public final int getScreenIndex() {
         return getGraphicsConfiguration().getScreen().getIndex();
     }
 
+    @Override
     public abstract long getSurfaceHandle();
 
+    @Override
+    public abstract void setSurfaceHandle(long surfaceHandle);
+    
+    @Override
     public final int getWidth() {
-        return width;
+        if(null != upstream) {
+            return upstream.getWidth(this);
+        }
+        return initialWidth;
     }
 
+    @Override
     public final int getHeight() {
-        return height;
-    }
-
-    public void surfaceSizeChanged(int width, int height) {
-        this.width = width;
-        this.height = height;
+        if(null != upstream) {
+            return upstream.getHeight(this);
+        }
+        return initialHeight;
     }
 
+    @Override
     public boolean surfaceSwap() {
         return false;
     }
 
+    @Override
     public void addSurfaceUpdatedListener(SurfaceUpdatedListener l) {
         surfaceUpdatedHelper.addSurfaceUpdatedListener(l);
     }
 
+    @Override
     public void addSurfaceUpdatedListener(int index, SurfaceUpdatedListener l) throws IndexOutOfBoundsException {
         surfaceUpdatedHelper.addSurfaceUpdatedListener(index, l);
     }
 
+    @Override
     public void removeSurfaceUpdatedListener(SurfaceUpdatedListener l) {
         surfaceUpdatedHelper.removeSurfaceUpdatedListener(l);
     }
 
+    @Override
     public void surfaceUpdated(Object updater, NativeSurface ns, long when) {
         surfaceUpdatedHelper.surfaceUpdated(updater, ns, when);
-    }    
-    
-    public int lockSurface() throws NativeWindowException {
+    }
+
+    @Override
+    public int lockSurface() throws NativeWindowException, RuntimeException  {
         surfaceLock.lock();
         int res = surfaceLock.getHoldCount() == 1 ? LOCK_SURFACE_NOT_READY : LOCK_SUCCESS; // new lock ?
 
@@ -123,11 +209,11 @@ public abstract class ProxySurface implements NativeSurface {
                     res = lockSurfaceImpl();
                     if(LOCK_SUCCESS == res && surfaceHandle_old != getSurfaceHandle()) {
                         res = LOCK_SURFACE_CHANGED;
-                        if(DEBUG) {            
+                        if(DEBUG) {
                             System.err.println("ProxySurface: surface change 0x"+Long.toHexString(surfaceHandle_old)+" -> 0x"+Long.toHexString(getSurfaceHandle()));
                             // Thread.dumpStack();
                         }
-                    }                    
+                    }
                 } finally {
                     if (LOCK_SURFACE_NOT_READY >= res) {
                         adevice.unlock();
@@ -142,6 +228,7 @@ public abstract class ProxySurface implements NativeSurface {
         return res;
     }
 
+    @Override
     public final void unlockSurface() {
         surfaceLock.validateLocked();
         surfaceHandle_old = getSurfaceHandle();
@@ -165,17 +252,19 @@ public abstract class ProxySurface implements NativeSurface {
         surfaceLock.validateLocked();
     }
 
-    public final boolean isSurfaceLocked() {
-        return surfaceLock.isLocked();
-    }
-
+    @Override
     public final boolean isSurfaceLockedByOtherThread() {
         return surfaceLock.isLockedByOtherThread();
     }
 
+    @Override
     public final Thread getSurfaceLockOwner() {
         return surfaceLock.getOwner();
     }
-
-    public abstract String toString();    
+    
+    @Override
+    public abstract String toString();
+    
+    public int getImplBitfield() { return implBitfield; }    
+    public void setImplBitfield(int v) { implBitfield=v; }
 }
diff --git a/src/nativewindow/classes/javax/media/nativewindow/SurfaceChangeable.java b/src/nativewindow/classes/javax/media/nativewindow/SurfaceChangeable.java
deleted file mode 100644
index 956e68e..0000000
--- a/src/nativewindow/classes/javax/media/nativewindow/SurfaceChangeable.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- * 
- * - Redistribution of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * 
- * - Redistribution in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * 
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * 
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
- * You acknowledge that this software is not designed or intended for use
- * in the design, construction, operation or maintenance of any nuclear
- * facility.
- * 
- * Sun gratefully acknowledges that this software was originally authored
- * and developed by Kenneth Bradley Russell and Christopher John Kline.
- */
-
-package javax.media.nativewindow;
-
-public interface SurfaceChangeable {
-
-  /** Sets the surface handle which is created outside of this implementation */
-  public void setSurfaceHandle(long surfaceHandle);
-  
-  /** 
-   * The surface's size has been determined or changed. 
-   * Implementation shall update the stored surface size with the given ones. 
-   */  
-  public void surfaceSizeChanged(int width, int height);
-
-}
-
diff --git a/src/nativewindow/classes/jogamp/nativewindow/DefaultGraphicsConfigurationFactoryImpl.java b/src/nativewindow/classes/jogamp/nativewindow/DefaultGraphicsConfigurationFactoryImpl.java
index f34b740..52e9c83 100644
--- a/src/nativewindow/classes/jogamp/nativewindow/DefaultGraphicsConfigurationFactoryImpl.java
+++ b/src/nativewindow/classes/jogamp/nativewindow/DefaultGraphicsConfigurationFactoryImpl.java
@@ -37,7 +37,7 @@ import javax.media.nativewindow.*;
 
 public class DefaultGraphicsConfigurationFactoryImpl extends GraphicsConfigurationFactory {
     protected AbstractGraphicsConfiguration chooseGraphicsConfigurationImpl(
-            CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested, CapabilitiesChooser chooser, AbstractGraphicsScreen screen) {
+            CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested, CapabilitiesChooser chooser, AbstractGraphicsScreen screen, int nativeVisualID) {
         return new DefaultGraphicsConfiguration(screen, capsChosen, capsRequested);
     }
 }
diff --git a/src/nativewindow/classes/jogamp/nativewindow/NWJNILibLoader.java b/src/nativewindow/classes/jogamp/nativewindow/NWJNILibLoader.java
index 99bc71c..6c15f9a 100644
--- a/src/nativewindow/classes/jogamp/nativewindow/NWJNILibLoader.java
+++ b/src/nativewindow/classes/jogamp/nativewindow/NWJNILibLoader.java
@@ -44,7 +44,9 @@ public class NWJNILibLoader extends JNILibLoaderBase {
         Platform.initSingleton();
         final String libName = "nativewindow_"+ossuffix ;
         if(TempJarCache.isInitialized() && null == TempJarCache.findLibrary(libName)) {
-            addNativeJarLibs(NWJNILibLoader.class, "jogl-all", new String[] { "nativewindow" } );
+            // either: [jogl-all.jar, jogl-all-noawt.jar, jogl-all-mobile.jar] -> jogl-all-natives-<os.and.arch>.jar
+            // or:     nativewindow-core.jar                                   -> nativewindow-natives-<os.and.arch>.jar
+            addNativeJarLibs(new Class<?>[] { NWJNILibLoader.class }, "-all", new String[] { "-noawt", "-mobile", "-core" } );
         }
         return new Boolean(loadLibrary(libName, false, NWJNILibLoader.class.getClassLoader()));
       }
diff --git a/src/nativewindow/classes/jogamp/nativewindow/SurfaceUpdatedHelper.java b/src/nativewindow/classes/jogamp/nativewindow/SurfaceUpdatedHelper.java
index 4877d5c..4f68c69 100644
--- a/src/nativewindow/classes/jogamp/nativewindow/SurfaceUpdatedHelper.java
+++ b/src/nativewindow/classes/jogamp/nativewindow/SurfaceUpdatedHelper.java
@@ -34,8 +34,8 @@ import javax.media.nativewindow.NativeSurface;
 import javax.media.nativewindow.SurfaceUpdatedListener;
 
 public class SurfaceUpdatedHelper implements SurfaceUpdatedListener {
-    private Object surfaceUpdatedListenersLock = new Object();
-    private ArrayList<SurfaceUpdatedListener> surfaceUpdatedListeners = new ArrayList<SurfaceUpdatedListener>();
+    private final Object surfaceUpdatedListenersLock = new Object();
+    private final ArrayList<SurfaceUpdatedListener> surfaceUpdatedListeners = new ArrayList<SurfaceUpdatedListener>();
 
     //
     // Management Utils
diff --git a/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTUtil.java b/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTUtil.java
index 8098bdb..36d7c37 100644
--- a/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTUtil.java
+++ b/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTUtil.java
@@ -115,8 +115,8 @@ public class JAWTUtil {
     JAWT jawt = JAWT.create();
     
     // default queries
-    boolean tryOffscreenLayer = false;
-    boolean tryOnscreenLayer = true;
+    boolean tryOffscreenLayer;
+    boolean tryOnscreen;
     int jawt_version_flags_offscreen = jawt_version_flags;
     
     if(isOffscreenLayerRequired()) {
@@ -124,7 +124,7 @@ public class JAWTUtil {
             if(Platform.OS_VERSION_NUMBER.compareTo(JAWTUtil.JAWT_MacOSXCALayerMinVersion) >= 0) {
                 jawt_version_flags_offscreen |= JAWTUtil.JAWT_MACOSX_USE_CALAYER;
                 tryOffscreenLayer = true;
-                tryOnscreenLayer = false;            
+                tryOnscreen = false;
             } else {
                 throw new RuntimeException("OSX: Invalid version of Java ("+Platform.JAVA_VERSION_NUMBER+") / OS X ("+Platform.OS_VERSION_NUMBER+")");
             }
@@ -135,9 +135,16 @@ public class JAWTUtil {
         if(Platform.OS_TYPE == Platform.OSType.MACOS) {
             jawt_version_flags_offscreen |= JAWTUtil.JAWT_MACOSX_USE_CALAYER;
             tryOffscreenLayer = true;
+            tryOnscreen = true;
         } else {
             throw new InternalError("offscreen requested and supported, but n/a for: "+Platform.OS_TYPE);
         }
+    } else {
+        tryOffscreenLayer = false;
+        tryOnscreen = true;
+    }    
+    if(DEBUG) {
+        System.err.println("JAWTUtil.getJAWT(tryOffscreenLayer "+tryOffscreenLayer+", tryOnscreen "+tryOnscreen+")");
     }
     
     StringBuilder errsb = new StringBuilder();
@@ -147,7 +154,7 @@ public class JAWTUtil {
             return jawt;
         }
     }
-    if(tryOnscreenLayer) {
+    if(tryOnscreen) {
         if(tryOffscreenLayer) {
             errsb.append(", ");
         }
@@ -260,6 +267,7 @@ public class JAWTUtil {
         System.err.println("JAWTUtil: Is headless " + headlessMode);
         int hints = ( null != desktophints ) ? desktophints.size() : 0 ;
         System.err.println("JAWTUtil: AWT Desktop hints " + hints);
+        System.err.println("JAWTUtil: OffscreenLayer Supported: "+isOffscreenLayerSupported()+" - Required "+isOffscreenLayerRequired());
     }
   }
 
diff --git a/src/nativewindow/classes/jogamp/nativewindow/jawt/macosx/MacOSXJAWTWindow.java b/src/nativewindow/classes/jogamp/nativewindow/jawt/macosx/MacOSXJAWTWindow.java
index 0ca5cd2..e81d61e 100644
--- a/src/nativewindow/classes/jogamp/nativewindow/jawt/macosx/MacOSXJAWTWindow.java
+++ b/src/nativewindow/classes/jogamp/nativewindow/jawt/macosx/MacOSXJAWTWindow.java
@@ -48,7 +48,7 @@ import javax.media.nativewindow.AbstractGraphicsConfiguration;
 import javax.media.nativewindow.Capabilities;
 import javax.media.nativewindow.NativeWindow;
 import javax.media.nativewindow.NativeWindowException;
-import javax.media.nativewindow.SurfaceChangeable;
+import javax.media.nativewindow.MutableSurface;
 import javax.media.nativewindow.util.Point;
 
 import com.jogamp.nativewindow.MutableGraphicsConfiguration;
@@ -62,7 +62,7 @@ import jogamp.nativewindow.jawt.JAWT_DrawingSurfaceInfo;
 import jogamp.nativewindow.jawt.macosx.JAWT_MacOSXDrawingSurfaceInfo;
 import jogamp.nativewindow.macosx.OSXUtil;
 
-public class MacOSXJAWTWindow extends JAWTWindow implements SurfaceChangeable {
+public class MacOSXJAWTWindow extends JAWTWindow implements MutableSurface {
   public MacOSXJAWTWindow(Object comp, AbstractGraphicsConfiguration config) {
     super(comp, config);
     if(DEBUG) {
@@ -103,24 +103,9 @@ public class MacOSXJAWTWindow extends JAWTWindow implements SurfaceChangeable {
       if(DEBUG) {
         System.err.println("MacOSXJAWTWindow.setSurfaceHandle(): 0x"+Long.toHexString(surfaceHandle));
       }
-      sscSet &= 0 != surfaceHandle; // reset ssc flag if NULL surfaceHandle, ie. back to JAWT
       this.surfaceHandle = surfaceHandle;
   }
 
-  public void surfaceSizeChanged(int width, int height) {
-      sscSet = true;
-      sscWidth = width;
-      sscHeight = height;
-  }
-
-  public int getWidth() {
-    return sscSet ? sscWidth : super.getWidth();
-  }
-
-  public int getHeight() {
-    return sscSet ? sscHeight: super.getHeight();
-  }
-
   protected JAWT fetchJAWTImpl() throws NativeWindowException {
        // use offscreen if supported and [ applet or requested ]
       return JAWTUtil.getJAWT(getShallUseOffscreenLayer() || isApplet());
@@ -207,20 +192,20 @@ public class MacOSXJAWTWindow extends JAWTWindow implements SurfaceChangeable {
             ((MutableGraphicsConfiguration)getGraphicsConfiguration()).setChosenCapabilities(caps);
         }
         if(0 == rootSurfaceLayerHandle) {
-            rootSurfaceLayerHandle = OSXUtil.CreateCALayer();
+            rootSurfaceLayerHandle = OSXUtil.CreateCALayer(bounds.getX(), bounds.getY(), bounds.getWidth(), bounds.getHeight());
             if(0 == rootSurfaceLayerHandle) {
               OSXUtil.DestroyNSWindow(drawable);
               drawable = 0;
               unlockSurfaceImpl();
               throw new NativeWindowException("Could not create root CALayer: "+this);                
             }
-            if(!AttachJAWTSurfaceLayer0(dsi.getBuffer(), rootSurfaceLayerHandle)) {
+            if(!SetJAWTRootSurfaceLayer0(dsi.getBuffer(), rootSurfaceLayerHandle)) {
               OSXUtil.DestroyCALayer(rootSurfaceLayerHandle);
               rootSurfaceLayerHandle = 0;
               OSXUtil.DestroyNSWindow(drawable);
               drawable = 0;
               unlockSurfaceImpl();
-              throw new NativeWindowException("Could not attach JAWT surfaceLayerHandle: "+this);
+              throw new NativeWindowException("Could not set JAWT rootSurfaceLayerHandle: "+this);
             }
         }
         ret = NativeWindow.LOCK_SUCCESS;
@@ -267,8 +252,8 @@ public class MacOSXJAWTWindow extends JAWTWindow implements SurfaceChangeable {
   }  
   protected Point getLocationOnScreenNativeImpl(final int x0, final int y0) { return null; }
 
-  private static native boolean AttachJAWTSurfaceLayer0(Buffer jawtDrawingSurfaceInfoBuffer, long caLayer);
-  // private static native boolean DetachJAWTSurfaceLayer0(Buffer jawtDrawingSurfaceInfoBuffer, long caLayer);
+  private static native boolean SetJAWTRootSurfaceLayer0(Buffer jawtDrawingSurfaceInfoBuffer, long caLayer);
+  // private static native boolean UnsetJAWTRootSurfaceLayer0(Buffer jawtDrawingSurfaceInfoBuffer, long caLayer);
   
   // Variables for lockSurface/unlockSurface
   private JAWT_DrawingSurface ds;
@@ -280,8 +265,6 @@ public class MacOSXJAWTWindow extends JAWTWindow implements SurfaceChangeable {
   private long rootSurfaceLayerHandle = 0; // attached to the JAWT_SurfaceLayer
   
   private long surfaceHandle = 0;
-  private int sscWidth, sscHeight;
-  private boolean sscSet = false;
    
   // Workaround for instance of 4796548
   private boolean firstLock = true;
diff --git a/src/nativewindow/classes/jogamp/nativewindow/macosx/OSXUtil.java b/src/nativewindow/classes/jogamp/nativewindow/macosx/OSXUtil.java
index 3ca76a8..894084f 100644
--- a/src/nativewindow/classes/jogamp/nativewindow/macosx/OSXUtil.java
+++ b/src/nativewindow/classes/jogamp/nativewindow/macosx/OSXUtil.java
@@ -28,6 +28,7 @@
 package jogamp.nativewindow.macosx;
 
 import javax.media.nativewindow.NativeWindowException;
+import javax.media.nativewindow.util.Insets;
 import javax.media.nativewindow.util.Point;
 
 import jogamp.nativewindow.Debug;
@@ -59,26 +60,55 @@ public class OSXUtil {
         return false;
     }
     
-    public static Point GetLocationOnScreen(long windowOrView, int src_x, int src_y) {
-      return (Point) GetLocationOnScreen0(windowOrView, src_x, src_y);
+    public static boolean isNSView(long object) {
+        return isNSView0(object);
     }
     
-    public static long CreateNSView(int x, int y, int width, int height) {
-      return CreateNSView0(x, y, width, height);
+    /**
+     * In case the <code>windowOrView</code> is top-level,
+     * you shall set <code>topLevel</code> to true where
+     * insets gets into account to compute the client position as follows:
+     * <pre>
+      if(topLevel) {
+          // top-level position -> client window position
+          final Insets insets = GetInsets(windowOrView);
+          los.setX(los.getX() + insets.getLeftWidth());
+          los.setY(los.getY() + insets.getTopHeight());
+      }
+     * </pre>
+     * @param windowOrView
+     * @param topLevel
+     * @param src_x
+     * @param src_y
+     * @return the client position
+     */
+    public static Point GetLocationOnScreen(long windowOrView, boolean topLevel, int src_x, int src_y) {      
+      final Point los = (Point) GetLocationOnScreen0(windowOrView, src_x, src_y);
+      if(topLevel) {
+          // top-level position -> client window position
+          final Insets insets = GetInsets(windowOrView);
+          los.setX(los.getX() + insets.getLeftWidth());
+          los.setY(los.getY() + insets.getTopHeight());
+      }
+      return los;
     }
-    public static void DestroyNSView(long nsView) {
-        DestroyNSView0(nsView);
+    
+    public static Insets GetInsets(long windowOrView) {
+      return (Insets) GetInsets0(windowOrView);
     }
-
+    
     public static long CreateNSWindow(int x, int y, int width, int height) {
       return CreateNSWindow0(x, y, width, height);
     }
     public static void DestroyNSWindow(long nsWindow) {
         DestroyNSWindow0(nsWindow);
     }
+    public static long GetNSView(long nsWindow) {
+      return GetNSView0(nsWindow);
+    }
     
-    public static long CreateCALayer() {
-        return CreateCALayer0();
+    public static long CreateCALayer(int x, int y, int width, int height) {
+        return CreateCALayer0(x, y, width, height);
     }
     public static void AddCASublayer(long rootCALayer, long subCALayer) {
         if(0==rootCALayer || 0==subCALayer) {
@@ -111,13 +141,35 @@ public class OSXUtil {
         return IsMainThread0();
     }
     
+    /***
+    private static boolean  isAWTEDTMainThreadInit = false;
+    private static boolean  isAWTEDTMainThread;
+    
+    public synchronized static boolean isAWTEDTMainThread() {
+        if(!isAWTEDTMainThreadInit) {
+            isAWTEDTMainThreadInit = true;
+            if(Platform.AWT_AVAILABLE) {
+                AWTEDTExecutor.singleton.invoke(true, new Runnable() {
+                   public void run() {
+                       isAWTEDTMainThread = IsMainThread();
+                       System.err.println("XXX: "+Thread.currentThread().getName()+" - isAWTEDTMainThread "+isAWTEDTMainThread);
+                   }
+                });
+            } else {
+                isAWTEDTMainThread = false;
+            }
+        }        
+        return isAWTEDTMainThread;
+    } */
+    
     private static native boolean initIDs0();
+    private static native boolean isNSView0(long object);
     private static native Object GetLocationOnScreen0(long windowOrView, int src_x, int src_y);
-    private static native long CreateNSView0(int x, int y, int width, int height);
-    private static native void DestroyNSView0(long nsView);
+    private static native Object GetInsets0(long windowOrView);
     private static native long CreateNSWindow0(int x, int y, int width, int height);
     private static native void DestroyNSWindow0(long nsWindow);
-    private static native long CreateCALayer0();
+    private static native long GetNSView0(long nsWindow);
+    private static native long CreateCALayer0(int x, int y, int width, int height);
     private static native void AddCASublayer0(long rootCALayer, long subCALayer);
     private static native void RemoveCASublayer0(long rootCALayer, long subCALayer);
     private static native void DestroyCALayer0(long caLayer);
diff --git a/src/nativewindow/classes/jogamp/nativewindow/windows/GDISurface.java b/src/nativewindow/classes/jogamp/nativewindow/windows/GDISurface.java
index bc02ac5..e368aa6 100644
--- a/src/nativewindow/classes/jogamp/nativewindow/windows/GDISurface.java
+++ b/src/nativewindow/classes/jogamp/nativewindow/windows/GDISurface.java
@@ -31,6 +31,7 @@ package jogamp.nativewindow.windows;
 import javax.media.nativewindow.AbstractGraphicsConfiguration;
 import javax.media.nativewindow.NativeWindowException;
 import javax.media.nativewindow.ProxySurface;
+import javax.media.nativewindow.ProxySurface.UpstreamSurfaceHook;
 
 
 /**
@@ -43,20 +44,49 @@ public class GDISurface extends ProxySurface {
   protected long windowHandle;
   protected long surfaceHandle;
 
-  public GDISurface(AbstractGraphicsConfiguration cfg, long windowHandle) {
-    super(cfg);
-    if(0 == windowHandle) {
-        throw new NativeWindowException("Error hwnd 0, werr: "+GDI.GetLastError());
-    }
+  public GDISurface(AbstractGraphicsConfiguration cfg, long windowHandle, int initialWidth, int initialHeight, UpstreamSurfaceHook upstream) {
+    super(cfg, initialWidth, initialHeight, upstream);
     this.windowHandle=windowHandle;
+    this.surfaceHandle=0;
+  }
+
+  @Override
+  protected void invalidateImpl() {    
+    if(0 != surfaceHandle) {
+        throw new NativeWindowException("didn't release surface Handle: "+this);
+    }
+    windowHandle = 0;
+    // surfaceHandle = 0;
+  }
+  
+  /**
+   * {@inheritDoc}
+   * <p>
+   * Actually the window handle (HWND), since the surfaceHandle (HDC) is derived 
+   * from it at {@link #lockSurface()}.
+   * </p> 
+   */
+  @Override
+  public final void setSurfaceHandle(long surfaceHandle) {
+      this.windowHandle = surfaceHandle;
   }
 
-  protected final void invalidateImpl() {
-    windowHandle=0;
-    surfaceHandle=0;
+  /**
+   * Sets the window handle (HWND). 
+   */
+  public final void setWindowHandle(long windowHandle) {
+      this.windowHandle = windowHandle;
   }
 
+  public final long getWindowHandle() {
+      return windowHandle;
+  }
+
+  @Override
   final protected int lockSurfaceImpl() {
+    if (0 == windowHandle) {
+        throw new NativeWindowException("null window handle: "+this);
+    }
     if (0 != surfaceHandle) {
         throw new InternalError("surface not released");
     }
@@ -70,27 +100,32 @@ public class GDISurface extends ProxySurface {
     return (0 != surfaceHandle) ? LOCK_SUCCESS : LOCK_SURFACE_NOT_READY;
   }
 
+  @Override
   final protected void unlockSurfaceImpl() {
-    if (0 == surfaceHandle) {
-        throw new InternalError("surface not acquired: "+this+", thread: "+Thread.currentThread().getName());
-    }
-    if(0 == GDI.ReleaseDC(windowHandle, surfaceHandle)) {
-        throw new NativeWindowException("DC not released: "+this+", isWindow "+GDI.IsWindow(windowHandle)+", werr "+GDI.GetLastError()+", thread: "+Thread.currentThread().getName());        
+    if (0 != surfaceHandle) {
+        if(0 == GDI.ReleaseDC(windowHandle, surfaceHandle)) {
+            throw new NativeWindowException("DC not released: "+this+", isWindow "+GDI.IsWindow(windowHandle)+", werr "+GDI.GetLastError()+", thread: "+Thread.currentThread().getName());        
+        }
+        surfaceHandle=0;
     }
-    surfaceHandle=0;
   }
 
+  @Override
   final public long getSurfaceHandle() {
     return surfaceHandle;
   }
 
+  @Override
   final public String toString() {
-    return "GDISurface[config "+getPrivateGraphicsConfiguration()+
+    final UpstreamSurfaceHook ush = getUpstreamSurfaceHook();
+    final String ush_s = null != ush ? ( ush.getClass().getName() + ": " + ush ) : "nil";       
+    return getClass().getSimpleName()+"[config "+getPrivateGraphicsConfiguration()+
                 ", displayHandle 0x"+Long.toHexString(getDisplayHandle())+
                 ", windowHandle 0x"+Long.toHexString(windowHandle)+
                 ", surfaceHandle 0x"+Long.toHexString(getSurfaceHandle())+
                 ", size "+getWidth()+"x"+getHeight()+
-                ", surfaceLock "+surfaceLock+"]";
+                ", surfaceLock "+surfaceLock+
+                ", upstreamSurfaceHook "+ush_s+"]";
   }
 
 }
diff --git a/src/nativewindow/classes/jogamp/nativewindow/x11/X11Capabilities.java b/src/nativewindow/classes/jogamp/nativewindow/x11/X11Capabilities.java
index 0e69c73..4f8cff8 100644
--- a/src/nativewindow/classes/jogamp/nativewindow/x11/X11Capabilities.java
+++ b/src/nativewindow/classes/jogamp/nativewindow/x11/X11Capabilities.java
@@ -40,10 +40,12 @@ public class X11Capabilities extends Capabilities {
       this.xVisualInfo = xVisualInfo;
   }
 
+  @Override
   public Object cloneMutable() {
     return clone();
   }
 
+  @Override
   public Object clone() {
     try {
       return super.clone();
@@ -68,9 +70,10 @@ public class X11Capabilities extends Capabilities {
               return VisualIDHolder.VID_UNDEFINED;
           default:
               throw new NativeWindowException("Invalid type <"+type+">");
-      }      
+      }
   }
-  
+
+  @Override
   public StringBuilder toString(StringBuilder sink) {
     if(null == sink) {
         sink = new StringBuilder();
diff --git a/src/nativewindow/classes/jogamp/nativewindow/x11/X11GraphicsConfigurationFactory.java b/src/nativewindow/classes/jogamp/nativewindow/x11/X11GraphicsConfigurationFactory.java
index 070f872..b11dd1d 100644
--- a/src/nativewindow/classes/jogamp/nativewindow/x11/X11GraphicsConfigurationFactory.java
+++ b/src/nativewindow/classes/jogamp/nativewindow/x11/X11GraphicsConfigurationFactory.java
@@ -39,33 +39,39 @@ import javax.media.nativewindow.CapabilitiesChooser;
 import javax.media.nativewindow.CapabilitiesImmutable;
 import javax.media.nativewindow.GraphicsConfigurationFactory;
 import javax.media.nativewindow.NativeWindowException;
+import javax.media.nativewindow.VisualIDHolder;
 
 import com.jogamp.nativewindow.x11.X11GraphicsConfiguration;
 import com.jogamp.nativewindow.x11.X11GraphicsScreen;
 
 public class X11GraphicsConfigurationFactory extends GraphicsConfigurationFactory {
     public static void registerFactory() {
-        GraphicsConfigurationFactory.registerFactory(com.jogamp.nativewindow.x11.X11GraphicsDevice.class, new X11GraphicsConfigurationFactory());
+        GraphicsConfigurationFactory.registerFactory(com.jogamp.nativewindow.x11.X11GraphicsDevice.class, CapabilitiesImmutable.class, new X11GraphicsConfigurationFactory());
     }    
     private X11GraphicsConfigurationFactory() {
     }
     
     protected AbstractGraphicsConfiguration chooseGraphicsConfigurationImpl(
-        CapabilitiesImmutable  capsChosen, CapabilitiesImmutable capsRequested, CapabilitiesChooser chooser, AbstractGraphicsScreen screen)
+        CapabilitiesImmutable  capsChosen, CapabilitiesImmutable capsRequested, CapabilitiesChooser chooser, AbstractGraphicsScreen screen, int nativeVisualID)
         throws IllegalArgumentException, NativeWindowException {
 
         if(!(screen instanceof X11GraphicsScreen)) {
             throw new NativeWindowException("Only valid X11GraphicsScreen are allowed");
         }
-        final X11Capabilities x11CapsChosen = new X11Capabilities(getXVisualInfo(screen, capsChosen)); 
-        AbstractGraphicsConfiguration res = new X11GraphicsConfiguration((X11GraphicsScreen)screen,  x11CapsChosen, capsRequested, x11CapsChosen.getXVisualInfo());
+        final X11Capabilities x11CapsChosen;
+        if(VisualIDHolder.VID_UNDEFINED == nativeVisualID) {
+            x11CapsChosen = new X11Capabilities(getXVisualInfo(screen, capsChosen));
+        } else {
+            x11CapsChosen = new X11Capabilities(getXVisualInfo(screen, nativeVisualID));
+        }
+        final AbstractGraphicsConfiguration res = new X11GraphicsConfiguration((X11GraphicsScreen)screen,  x11CapsChosen, capsRequested, x11CapsChosen.getXVisualInfo());
         if(DEBUG) {
-            System.err.println("X11GraphicsConfigurationFactory.chooseGraphicsConfigurationImpl("+screen+","+capsChosen+"): "+res);
+            System.err.println("X11GraphicsConfigurationFactory.chooseGraphicsConfigurationImpl(visualID 0x"+Integer.toHexString(nativeVisualID)+", "+screen+","+capsChosen+"): "+res);
         }
         return res;
     }
 
-    public static XVisualInfo getXVisualInfo(AbstractGraphicsScreen screen, long visualID)
+    public static XVisualInfo getXVisualInfo(AbstractGraphicsScreen screen, int visualID)
     {
         XVisualInfo xvi_temp = XVisualInfo.create();
         xvi_temp.setVisualid(visualID);
diff --git a/src/nativewindow/classes/jogamp/nativewindow/x11/X11Util.java b/src/nativewindow/classes/jogamp/nativewindow/x11/X11Util.java
index c42bcf8..7b46a1d 100644
--- a/src/nativewindow/classes/jogamp/nativewindow/x11/X11Util.java
+++ b/src/nativewindow/classes/jogamp/nativewindow/x11/X11Util.java
@@ -81,9 +81,10 @@ public class X11Util {
     /** Value is <code>true</code>, best 'stable' results if not using XLockDisplay/XUnlockDisplay at all. */
     public static final boolean HAS_XLOCKDISPLAY_BUG = true;
     
-    private static final boolean DEBUG = Debug.debug("X11Util");
-    private static final boolean TRACE_DISPLAY_LIFECYCLE = Debug.getBooleanProperty("nativewindow.debug.X11Util.TraceDisplayLifecycle", true);
-
+    public static final boolean DEBUG = Debug.debug("X11Util");
+    public static final boolean XSYNC_ENABLED = Debug.isPropertyDefined("nativewindow.debug.X11Util.XSync", true);
+    public static final boolean XERROR_STACKDUMP = DEBUG || Debug.isPropertyDefined("nativewindow.debug.X11Util.XErrorStackDump", true);
+    private static final boolean TRACE_DISPLAY_LIFECYCLE = Debug.isPropertyDefined("nativewindow.debug.X11Util.TraceDisplayLifecycle", true);
     private static String nullDisplayName = null;
     private static boolean isX11LockAvailable = false;
     private static boolean requiresX11Lock = true;
@@ -105,14 +106,21 @@ public class X11Util {
                     }
         
                     final boolean callXInitThreads = XINITTHREADS_ALWAYS_ENABLED || firstX11ActionOnProcess;
-                    final boolean isXInitThreadsOK = initialize0( XINITTHREADS_ALWAYS_ENABLED || firstX11ActionOnProcess );
+                    final boolean isXInitThreadsOK = initialize0( XINITTHREADS_ALWAYS_ENABLED || firstX11ActionOnProcess, XERROR_STACKDUMP);
                     isX11LockAvailable = isXInitThreadsOK && !HAS_XLOCKDISPLAY_BUG ;
         
                     final long dpy = X11Lib.XOpenDisplay(null);
-                    try {
-                        nullDisplayName = X11Lib.XDisplayString(dpy);
-                    } finally {
-                        X11Lib.XCloseDisplay(dpy);
+                    if(0 != dpy) {
+                        if(XSYNC_ENABLED) {
+                            X11Lib.XSynchronize(dpy, true);
+                        }                    
+                        try {
+                            nullDisplayName = X11Lib.XDisplayString(dpy);
+                        } finally {
+                            X11Lib.XCloseDisplay(dpy);
+                        }
+                    } else {
+                        nullDisplayName = "nil";
                     }
                     
                     if(DEBUG) {
@@ -120,7 +128,8 @@ public class X11Util {
                                            ", requiresX11Lock "+requiresX11Lock+
                                            ", XInitThreads [called "+callXInitThreads+", OK "+isXInitThreadsOK+"]"+
                                            ", isX11LockAvailable "+isX11LockAvailable+
-                                           ", X11 Display(NULL) <"+nullDisplayName+">");
+                                           ", X11 Display(NULL) <"+nullDisplayName+">"+
+                                           ", XSynchronize Enabled: "+XSYNC_ENABLED);
                         // Thread.dumpStack();
                     }
                 }
@@ -246,7 +255,7 @@ public class X11Util {
      */
     public static int shutdown(boolean realXCloseOpenAndPendingDisplays, boolean verbose) {
         int num=0;
-        if(DEBUG||verbose||pendingDisplayList.size() > 0) {
+        if(DEBUG || verbose || openDisplayMap.size() > 0 || pendingDisplayList.size() > 0) {
             System.err.println("X11Util.Display: Shutdown (close open / pending Displays: "+realXCloseOpenAndPendingDisplays+
                                ", open (no close attempt): "+openDisplayMap.size()+"/"+openDisplayList.size()+
                                ", pending (not closed, marked uncloseable): "+pendingDisplayList.size()+")");
@@ -451,6 +460,9 @@ public class X11Util {
         NativeWindowFactory.getDefaultToolkitLock().lock();
         try {
             long handle = X11Lib.XOpenDisplay(arg0);
+            if(XSYNC_ENABLED && 0 != handle) {
+                X11Lib.XSynchronize(handle, true);
+            }                    
             if(TRACE_DISPLAY_LIFECYCLE) {
                 System.err.println(Thread.currentThread()+" - X11Util.XOpenDisplay("+arg0+") 0x"+Long.toHexString(handle));
                 // Thread.dumpStack();
@@ -516,7 +528,10 @@ public class X11Util {
         return false;
     }
     
-    private static native boolean initialize0(boolean firstUIActionOnProcess);
+    private static final String getCurrentThreadName() { return Thread.currentThread().getName(); } // Callback for JNI
+    private static final void dumpStack() { Thread.dumpStack(); } // Callback for JNI
+    
+    private static native boolean initialize0(boolean firstUIActionOnProcess, boolean debug);
     private static native void shutdown0();
     private static native void setX11ErrorHandler0(boolean onoff, boolean quiet);
 }
diff --git a/src/nativewindow/classes/jogamp/nativewindow/x11/awt/X11AWTGraphicsConfigurationFactory.java b/src/nativewindow/classes/jogamp/nativewindow/x11/awt/X11AWTGraphicsConfigurationFactory.java
index b6bf63d..1de03e8 100644
--- a/src/nativewindow/classes/jogamp/nativewindow/x11/awt/X11AWTGraphicsConfigurationFactory.java
+++ b/src/nativewindow/classes/jogamp/nativewindow/x11/awt/X11AWTGraphicsConfigurationFactory.java
@@ -61,14 +61,14 @@ import jogamp.nativewindow.x11.X11Util;
 public class X11AWTGraphicsConfigurationFactory extends GraphicsConfigurationFactory {
     
     public static void registerFactory() {
-        GraphicsConfigurationFactory.registerFactory(com.jogamp.nativewindow.awt.AWTGraphicsDevice.class, new X11AWTGraphicsConfigurationFactory());
+        GraphicsConfigurationFactory.registerFactory(com.jogamp.nativewindow.awt.AWTGraphicsDevice.class, CapabilitiesImmutable.class, new X11AWTGraphicsConfigurationFactory());
     }    
     private X11AWTGraphicsConfigurationFactory() {
     }
 
     protected AbstractGraphicsConfiguration chooseGraphicsConfigurationImpl(
             CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested,
-            CapabilitiesChooser chooser, AbstractGraphicsScreen absScreen) {    
+            CapabilitiesChooser chooser, AbstractGraphicsScreen absScreen, int nativeVisualID) {    
         if (absScreen != null &&
             !(absScreen instanceof AWTGraphicsScreen)) {
             throw new IllegalArgumentException("This GraphicsConfigurationFactory accepts only AWTGraphicsScreen objects");
@@ -77,18 +77,18 @@ public class X11AWTGraphicsConfigurationFactory extends GraphicsConfigurationFac
             absScreen = AWTGraphicsScreen.createDefault();
         }
 
-        return chooseGraphicsConfigurationStatic(capsChosen, capsRequested, chooser, (AWTGraphicsScreen)absScreen);
+        return chooseGraphicsConfigurationStatic(capsChosen, capsRequested, chooser, (AWTGraphicsScreen)absScreen, nativeVisualID);
     }
     
     public static AWTGraphicsConfiguration chooseGraphicsConfigurationStatic(
             CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested,
-            CapabilitiesChooser chooser, AWTGraphicsScreen awtScreen) {
+            CapabilitiesChooser chooser, AWTGraphicsScreen awtScreen, int nativeVisualID) {
         if(DEBUG) {
             System.err.println("X11AWTGraphicsConfigurationFactory: got "+awtScreen);
         }
         
         final GraphicsDevice device = ((AWTGraphicsDevice)awtScreen.getDevice()).getGraphicsDevice();
-
+        
         final long displayHandleAWT = X11SunJDKReflection.graphicsDeviceGetDisplay(device);
         final long displayHandle;
         boolean owner = false;
@@ -121,8 +121,8 @@ public class X11AWTGraphicsConfigurationFactory extends GraphicsConfigurationFac
             System.err.println("X11AWTGraphicsConfigurationFactory: made "+x11Screen);
         }
         
-        final GraphicsConfigurationFactory factory = GraphicsConfigurationFactory.getFactory(x11Device);
-        AbstractGraphicsConfiguration aConfig = factory.chooseGraphicsConfiguration(capsChosen, capsRequested, chooser, x11Screen);
+        final GraphicsConfigurationFactory factory = GraphicsConfigurationFactory.getFactory(x11Device, capsChosen);
+        AbstractGraphicsConfiguration aConfig = factory.chooseGraphicsConfiguration(capsChosen, capsRequested, chooser, x11Screen, nativeVisualID);
         if (aConfig == null) {
             throw new NativeWindowException("Unable to choose a GraphicsConfiguration (1): "+capsChosen+",\n\t"+chooser+"\n\t"+x11Screen);
         }
@@ -160,7 +160,7 @@ public class X11AWTGraphicsConfigurationFactory extends GraphicsConfigurationFac
         // try again using an AWT Colormodel compatible configuration
         GraphicsConfiguration gc = device.getDefaultConfiguration();
         capsChosen = AWTGraphicsConfiguration.setupCapabilitiesRGBABits(capsChosen, gc);
-        aConfig = factory.chooseGraphicsConfiguration(capsChosen, capsRequested, chooser, x11Screen);
+        aConfig = factory.chooseGraphicsConfiguration(capsChosen, capsRequested, chooser, x11Screen, nativeVisualID);
         if (aConfig == null) {
             throw new NativeWindowException("Unable to choose a GraphicsConfiguration (2): "+capsChosen+",\n\t"+chooser+"\n\t"+x11Screen);
         }
diff --git a/src/nativewindow/native/NativewindowCommon.c b/src/nativewindow/native/NativewindowCommon.c
index b866646..d2fdd5d 100644
--- a/src/nativewindow/native/NativewindowCommon.c
+++ b/src/nativewindow/native/NativewindowCommon.c
@@ -1,5 +1,6 @@
 
 #include "NativewindowCommon.h"
+#include <string.h>
 
 static const char * const ClazzNameRuntimeException = "java/lang/RuntimeException";
 static jclass    runtimeExceptionClz=NULL;
@@ -45,6 +46,24 @@ int NativewindowCommon_init(JNIEnv *env) {
     return 0;
 }
 
+const char * NativewindowCommon_GetStaticStringMethod(JNIEnv *jniEnv, jclass clazz, jmethodID jGetStrID, char *dest, int destSize, const char *altText) {
+    if(NULL != jniEnv && NULL != clazz && NULL != jGetStrID) {
+        jstring jstr = (jstring) (*jniEnv)->CallStaticObjectMethod(jniEnv, clazz, jGetStrID);
+        if(NULL != jstr) {
+            const char * str = (*jniEnv)->GetStringUTFChars(jniEnv, jstr, NULL);
+            if( NULL != str) {
+                strncpy(dest, str, destSize-1);
+                dest[destSize-1] = 0; // EOS
+                (*jniEnv)->ReleaseStringUTFChars(jniEnv, jstr, str);
+                return dest;
+            }
+        }
+    }
+    strncpy(dest, altText, destSize-1);
+    dest[destSize-1] = 0; // EOS
+    return dest;
+}
+
 jchar* NativewindowCommon_GetNullTerminatedStringChars(JNIEnv* env, jstring str)
 {
     jchar* strChars = NULL;
diff --git a/src/nativewindow/native/NativewindowCommon.h b/src/nativewindow/native/NativewindowCommon.h
index 41c4bd0..73b890c 100644
--- a/src/nativewindow/native/NativewindowCommon.h
+++ b/src/nativewindow/native/NativewindowCommon.h
@@ -7,6 +7,7 @@
 
 int NativewindowCommon_init(JNIEnv *env);
 
+const char * NativewindowCommon_GetStaticStringMethod(JNIEnv *jniEnv, jclass clazz, jmethodID jGetStrID, char *dest, int destSize, const char *altText);
 jchar* NativewindowCommon_GetNullTerminatedStringChars(JNIEnv* env, jstring str);
 
 void NativewindowCommon_FatalError(JNIEnv *env, const char* msg, ...);
diff --git a/src/nativewindow/native/macosx/OSXmisc.m b/src/nativewindow/native/macosx/OSXmisc.m
index 38ffde9..2c853a4 100644
--- a/src/nativewindow/native/macosx/OSXmisc.m
+++ b/src/nativewindow/native/macosx/OSXmisc.m
@@ -52,12 +52,18 @@
 static const char * const ClazzNameRunnable = "java/lang/Runnable";
 static jmethodID runnableRunID = NULL;
 
-static const char * const ClazzNamePoint = "javax/media/nativewindow/util/Point";
 static const char * const ClazzAnyCstrName = "<init>";
+
+static const char * const ClazzNamePoint = "javax/media/nativewindow/util/Point";
 static const char * const ClazzNamePointCstrSignature = "(II)V";
 static jclass pointClz = NULL;
 static jmethodID pointCstr = NULL;
 
+static const char * const ClazzNameInsets = "javax/media/nativewindow/util/Insets";
+static const char * const ClazzNameInsetsCstrSignature = "(IIII)V";
+static jclass insetsClz = NULL;
+static jmethodID insetsCstr = NULL;
+
 static int _initialized=0;
 
 JNIEXPORT jboolean JNICALL 
@@ -79,6 +85,21 @@ Java_jogamp_nativewindow_macosx_OSXUtil_initIDs0(JNIEnv *env, jclass _unused) {
                 ClazzNamePoint, ClazzAnyCstrName, ClazzNamePointCstrSignature);
         }
 
+        c = (*env)->FindClass(env, ClazzNameInsets);
+        if(NULL==c) {
+            NativewindowCommon_FatalError(env, "FatalError Java_jogamp_newt_driver_macosx_MacWindow_initIDs0: can't find %s", ClazzNameInsets);
+        }
+        insetsClz = (jclass)(*env)->NewGlobalRef(env, c);
+        (*env)->DeleteLocalRef(env, c);
+        if(NULL==insetsClz) {
+            NativewindowCommon_FatalError(env, "FatalError Java_jogamp_newt_driver_macosx_MacWindow_initIDs0: can't use %s", ClazzNameInsets);
+        }
+        insetsCstr = (*env)->GetMethodID(env, insetsClz, ClazzAnyCstrName, ClazzNameInsetsCstrSignature);
+        if(NULL==insetsCstr) {
+            NativewindowCommon_FatalError(env, "FatalError Java_jogamp_newt_driver_macosx_MacWindow_initIDs0: can't fetch %s.%s %s",
+                ClazzNameInsets, ClazzAnyCstrName, ClazzNameInsetsCstrSignature);
+        }
+
         c = (*env)->FindClass(env, ClazzNameRunnable);
         if(NULL==c) {
             NativewindowCommon_FatalError(env, "FatalError Java_jogamp_newt_driver_macosx_MacWindow_initIDs0: can't find %s", ClazzNameRunnable);
@@ -92,6 +113,12 @@ Java_jogamp_nativewindow_macosx_OSXUtil_initIDs0(JNIEnv *env, jclass _unused) {
     return JNI_TRUE;
 }
 
+JNIEXPORT jboolean JNICALL 
+Java_jogamp_nativewindow_macosx_OSXUtil_isNSView0(JNIEnv *env, jclass _unused, jlong object) {
+    NSObject *nsObj = (NSObject*) (intptr_t) object;
+    return [nsObj isMemberOfClass:[NSView class]];
+}
+
 /*
  * Class:     Java_jogamp_nativewindow_macosx_OSXUtil
  * Method:    getLocationOnScreen0
@@ -150,33 +177,45 @@ JNIEXPORT jobject JNICALL Java_jogamp_nativewindow_macosx_OSXUtil_GetLocationOnS
 
 /*
  * Class:     Java_jogamp_nativewindow_macosx_OSXUtil
- * Method:    CreateNSView0
- * Signature: (IIIIZ)J
+ * Method:    getInsets0
+ * Signature: (J)Ljavax/media/nativewindow/util/Insets;
  */
-JNIEXPORT jlong JNICALL Java_jogamp_nativewindow_macosx_OSXUtil_CreateNSView0
-  (JNIEnv *env, jclass unused, jint x, jint y, jint width, jint height)
+JNIEXPORT jobject JNICALL Java_jogamp_nativewindow_macosx_OSXUtil_GetInsets0
+  (JNIEnv *env, jclass unused, jlong winOrView)
 {
     NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
-    NSRect rect = NSMakeRect(x, y, width, height);
-    NSView * view = [[NSView alloc] initWithFrame: rect] ;
-    [view setCanDrawConcurrently: YES];
-    [pool release];
 
-    return (jlong) (intptr_t) view;
-}
+    NSObject *nsObj = (NSObject*) (intptr_t) winOrView;
+    NSWindow* win = NULL;
+    NSView* view = NULL;
+    jint il,ir,it,ib;
+
+    if( [nsObj isKindOfClass:[NSWindow class]] ) {
+        win = (NSWindow*) nsObj;
+        view = [win contentView];
+    } else if( nsObj != NULL && [nsObj isKindOfClass:[NSView class]] ) {
+        view = (NSView*) nsObj;
+        win = [view window];
+    } else {
+        NativewindowCommon_throwNewRuntimeException(env, "neither win not view %p\n", nsObj);
+    }
+
+    NSRect frameRect = [win frame];
+    NSRect contentRect = [win contentRectForFrameRect: frameRect];
+
+    // note: this is a simplistic implementation which doesn't take
+    // into account DPI and scaling factor
+    CGFloat l = contentRect.origin.x - frameRect.origin.x;
+    il = (jint)l;                                                     // l
+    ir = (jint)(frameRect.size.width - (contentRect.size.width + l)); // r
+    it = (jint)(frameRect.size.height - contentRect.size.height);     // t
+    ib = (jint)(contentRect.origin.y - frameRect.origin.y);           // b
+
+    jobject res = (*env)->NewObject(env, insetsClz, insetsCstr, il, ir, it, ib);
 
-/*
- * Class:     Java_jogamp_nativewindow_macosx_OSXUtil
- * Method:    DestroyNSView0
- * Signature: (J)V
- */
-JNIEXPORT void JNICALL Java_jogamp_nativewindow_macosx_OSXUtil_DestroyNSView0
-  (JNIEnv *env, jclass unused, jlong nsView)
-{
-    NSView* view = (NSView*) (intptr_t) nsView;
-    NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
-    [view release];
     [pool release];
+
+    return res;
 }
 
 /*
@@ -197,6 +236,12 @@ JNIEXPORT jlong JNICALL Java_jogamp_nativewindow_macosx_OSXUtil_CreateNSWindow0
                                            defer: YES];
     [myWindow setReleasedWhenClosed: YES]; // default
     [myWindow setPreservesContentDuringLiveResize: YES];
+    // Remove animations
+NS_DURING
+        // Available >= 10.7 - Removes default animations
+        [myWindow setAnimationBehavior: NSWindowAnimationBehaviorNone];
+NS_HANDLER
+NS_ENDHANDLER
 
     // invisible ..
     [myWindow setOpaque: NO];
@@ -224,23 +269,47 @@ JNIEXPORT void JNICALL Java_jogamp_nativewindow_macosx_OSXUtil_DestroyNSWindow0
 
 /*
  * Class:     Java_jogamp_nativewindow_macosx_OSXUtil
+ * Method:    GetNSView0
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_jogamp_nativewindow_macosx_OSXUtil_GetNSView0
+  (JNIEnv *env, jclass unused, jlong window)
+{
+    NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
+    NSWindow* win = (NSWindow*) ((intptr_t) window);
+
+    DBG_PRINT( "contentView0 - window: %p (START)\n", win);
+
+    jlong res = (jlong) ((intptr_t) [win contentView]);
+
+    DBG_PRINT( "contentView0 - window: %p (END)\n", win);
+
+    [pool release];
+    return res;
+}
+
+/*
+ * Class:     Java_jogamp_nativewindow_macosx_OSXUtil
  * Method:    CreateCALayer0
- * Signature: (V)J
+ * Signature: (IIII)J
  */
 JNIEXPORT jlong JNICALL Java_jogamp_nativewindow_macosx_OSXUtil_CreateCALayer0
-  (JNIEnv *env, jclass unused)
+  (JNIEnv *env, jclass unused, jint x, jint y, jint width, jint height)
 {
     NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
 
     CALayer* layer = [[CALayer alloc] init];
-    DBG_PRINT("CALayer::CreateCALayer.0: %p (refcnt %d)\n", layer, (int)[layer retainCount]);
+    DBG_PRINT("CALayer::CreateCALayer.0: %p %d/%d %dx%d (refcnt %d)\n", layer, (int)x, (int)y, (int)width, (int)height, (int)[layer retainCount]);
+    // avoid zero size
+    if(0 == width) { width = 32; }
+    if(0 == height) { height = 32; }
 
     // initial dummy size !
     CGRect lRect = [layer frame];
-    lRect.origin.x = 0;
-    lRect.origin.y = 0;
-    lRect.size.width = 32;
-    lRect.size.height = 32;
+    lRect.origin.x = x;
+    lRect.origin.y = y;
+    lRect.size.width = width;
+    lRect.size.height = height;
     [layer setFrame: lRect];
     // no animations for add/remove/swap sublayers etc 
     // doesn't work: [layer removeAnimationForKey: kCAOnOrderIn, kCAOnOrderOut, kCATransition]
@@ -422,10 +491,10 @@ JNIEXPORT jboolean JNICALL Java_jogamp_nativewindow_macosx_OSXUtil_IsMainThread0
 
 /*
  * Class:     Java_jogamp_nativewindow_jawt_macosx_MacOSXJAWTWindow
- * Method:    AttachJAWTSurfaceLayer
+ * Method:    SetJAWTRootSurfaceLayer0
  * Signature: (JJ)Z
  */
-JNIEXPORT jboolean JNICALL Java_jogamp_nativewindow_jawt_macosx_MacOSXJAWTWindow_AttachJAWTSurfaceLayer0
+JNIEXPORT jboolean JNICALL Java_jogamp_nativewindow_jawt_macosx_MacOSXJAWTWindow_SetJAWTRootSurfaceLayer0
   (JNIEnv *env, jclass unused, jobject jawtDrawingSurfaceInfoBuffer, jlong caLayer)
 {
     JNF_COCOA_ENTER(env);
@@ -437,9 +506,9 @@ JNIEXPORT jboolean JNICALL Java_jogamp_nativewindow_jawt_macosx_MacOSXJAWTWindow
     CALayer* layer = (CALayer*) (intptr_t) caLayer;
     [JNFRunLoop performOnMainThreadWaiting:YES withBlock:^(){
         id <JAWT_SurfaceLayers> surfaceLayers = (id <JAWT_SurfaceLayers>)dsi->platformInfo;
-        DBG_PRINT("CALayer::attachJAWTSurfaceLayer: %p -> %p (refcnt %d)\n", surfaceLayers.layer, layer, (int)[layer retainCount]);
+        DBG_PRINT("CALayer::SetJAWTRootSurfaceLayer.0: %p -> %p (refcnt %d)\n", surfaceLayers.layer, layer, (int)[layer retainCount]);
         surfaceLayers.layer = layer; // already incr. retain count
-        DBG_PRINT("CALayer::attachJAWTSurfaceLayer.X: %p (refcnt %d)\n", layer, (int)[layer retainCount]);
+        DBG_PRINT("CALayer::SetJAWTRootSurfaceLayer.X: %p (refcnt %d)\n", layer, (int)[layer retainCount]);
     }];
     JNF_COCOA_EXIT(env);
     return JNI_TRUE;
@@ -447,9 +516,9 @@ JNIEXPORT jboolean JNICALL Java_jogamp_nativewindow_jawt_macosx_MacOSXJAWTWindow
 
 /*
  * Class:     Java_jogamp_nativewindow_jawt_macosx_MacOSXJAWTWindow
- * Method:    DetachJAWTSurfaceLayer
+ * Method:    UnsetJAWTRootSurfaceLayer0
  * Signature: (JJ)Z
-JNIEXPORT jboolean JNICALL Java_jogamp_nativewindow_jawt_macosx_MacOSXJAWTWindow_DetachJAWTSurfaceLayer0
+JNIEXPORT jboolean JNICALL Java_jogamp_nativewindow_jawt_macosx_MacOSXJAWTWindow_UnsetJAWTRootSurfaceLayer0
   (JNIEnv *env, jclass unused, jobject jawtDrawingSurfaceInfoBuffer, jlong caLayer)
 {
     JNF_COCOA_ENTER(env);
diff --git a/src/nativewindow/native/x11/Xmisc.c b/src/nativewindow/native/x11/Xmisc.c
index 439d9b3..fcba858 100644
--- a/src/nativewindow/native/x11/Xmisc.c
+++ b/src/nativewindow/native/x11/Xmisc.c
@@ -26,15 +26,19 @@
  * or implied, of JogAmp Community.
  */
  
+#include "NativewindowCommon.h"
+#include "Xmisc.h"
+#include "jogamp_nativewindow_x11_X11Lib.h"
+
+// #define VERBOSE_ON 1
+
+#ifdef VERBOSE_ON
+    #define DBG_PRINT(args...) fprintf(stderr, args);
+#else
+    #define DBG_PRINT(args...)
+#endif
+
 
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <unistd.h>
-#include <errno.h>
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
 /* Linux headers don't work properly */
 #define __USE_GNU
 #include <dlfcn.h>
@@ -80,17 +84,6 @@ Bool XF86VidModeSetGammaRamp(
 #define RTLD_DEFAULT NULL
 #endif
 
-#include "NativewindowCommon.h"
-#include "jogamp_nativewindow_x11_X11Lib.h"
-
-// #define VERBOSE_ON 1
-
-#ifdef VERBOSE_ON
-    #define DBG_PRINT(args...) fprintf(stderr, args);
-#else
-    #define DBG_PRINT(args...)
-#endif
-
 static const char * const ClazzNameBuffers = "com/jogamp/common/nio/Buffers";
 static const char * const ClazzNameBuffersStaticCstrName = "copyByteBuffer";
 static const char * const ClazzNameBuffersStaticCstrSignature = "(Ljava/nio/ByteBuffer;)Ljava/nio/ByteBuffer;";
@@ -98,6 +91,9 @@ static const char * const ClazzNameByteBuffer = "java/nio/ByteBuffer";
 static const char * const ClazzNamePoint = "javax/media/nativewindow/util/Point";
 static const char * const ClazzAnyCstrName = "<init>";
 static const char * const ClazzNamePointCstrSignature = "(II)V";
+static jclass X11UtilClazz = NULL;
+static jmethodID getCurrentThreadNameID = NULL;
+static jmethodID dumpStackID = NULL;
 static jclass clazzBuffers = NULL;
 static jmethodID cstrBuffers = NULL;
 static jclass clazzByteBuffer = NULL;
@@ -109,6 +105,15 @@ static void _initClazzAccess(JNIEnv *env) {
 
     if(!NativewindowCommon_init(env)) return;
 
+    getCurrentThreadNameID = (*env)->GetStaticMethodID(env, X11UtilClazz, "getCurrentThreadName", "()Ljava/lang/String;");
+    if(NULL==getCurrentThreadNameID) {
+        NativewindowCommon_FatalError(env, "FatalError Java_jogamp_nativewindow_x11_X11Lib: can't get method getCurrentThreadName");
+    }
+    dumpStackID = (*env)->GetStaticMethodID(env, X11UtilClazz, "dumpStack", "()V");
+    if(NULL==dumpStackID) {
+        NativewindowCommon_FatalError(env, "FatalError Java_jogamp_nativewindow_x11_X11Lib: can't get method dumpStack");
+    }
+
     c = (*env)->FindClass(env, ClazzNameBuffers);
     if(NULL==c) {
         NativewindowCommon_FatalError(env, "FatalError Java_jogamp_nativewindow_x11_X11Lib: can't find %s", ClazzNameBuffers);
@@ -162,66 +167,71 @@ static void setupJVMVars(JNIEnv * env) {
 }
 
 static XErrorHandler origErrorHandler = NULL ;
-static int errorHandlerBlocked = 0 ;
 static int errorHandlerQuiet = 0 ;
+static int errorHandlerDebug = 0 ;
+static int errorHandlerThrowException = 0;
 
 static int x11ErrorHandler(Display *dpy, XErrorEvent *e)
 {
     if(!errorHandlerQuiet) {
-        JNIEnv *curEnv = NULL;
-        JNIEnv *newEnv = NULL;
-        int envRes ;
-        const char * errStr = strerror(errno);
+        const char * errnoStr = strerror(errno);
+        char threadName[80];
+        char errCodeStr[80];
+        char reqCodeStr[80];
 
-        fprintf(stderr, "Info: Nativewindow X11 Error: Display %p, Code 0x%X, errno %s\n", dpy, e->error_code, errStr);
-        fflush(stderr);
+        int shallBeDetached = 0;
+        JNIEnv *jniEnv = NativewindowCommon_GetJNIEnv(jvmHandle, jvmVersion, &shallBeDetached);
 
-        // retrieve this thread's JNIEnv curEnv - or detect it's detached
-        envRes = (*jvmHandle)->GetEnv(jvmHandle, (void **) &curEnv, jvmVersion) ;
-        if( JNI_EDETACHED == envRes ) {
-            // detached thread - attach to JVM
-            if( JNI_OK != ( envRes = (*jvmHandle)->AttachCurrentThread(jvmHandle, (void**) &newEnv, NULL) ) ) {
-                fprintf(stderr, "Nativewindow X11 Error: can't attach thread: %d\n", envRes);
-                return 0;
+        (void) NativewindowCommon_GetStaticStringMethod(jniEnv, X11UtilClazz, getCurrentThreadNameID, threadName, sizeof(threadName), "n/a");
+        snprintf(errCodeStr, sizeof(errCodeStr), "%d", e->request_code);
+        XGetErrorDatabaseText(dpy, "XRequest", errCodeStr, "Unknown", reqCodeStr, sizeof(reqCodeStr));
+        XGetErrorText(dpy, e->error_code, errCodeStr, sizeof(errCodeStr));
+
+        fprintf(stderr, "Info: Nativewindow X11 Error (Thread: %s): %d - %s, dpy %p, id %x, # %d: %d:%d %s\n",
+            threadName, e->error_code, errCodeStr, e->display, (int)e->resourceid, (int)e->serial,
+            (int)e->request_code, (int)e->minor_code, reqCodeStr);
+
+        if( errorHandlerDebug ) {
+            (*jniEnv)->CallStaticVoidMethod(jniEnv, X11UtilClazz, dumpStackID);
+        }
+
+        if(errorHandlerThrowException) {
+            if(NULL != jniEnv) {
+                NativewindowCommon_throwNewRuntimeException(jniEnv, "Nativewindow X11 Error (Thread: %s): %d - %s, dpy %p, id %x, # %d: %d:%d %s\n",
+                                                            threadName, e->error_code, errCodeStr, e->display, (int)e->resourceid, (int)e->serial,
+                                                            (int)e->request_code, (int)e->minor_code, reqCodeStr);
+            } else {
+                fprintf(stderr, "Nativewindow X11 Error: null JNIEnv");
+                #if 0
+                    if(NULL!=origErrorHandler) {
+                        origErrorHandler(dpy, e);
+                    }
+                #endif
             }
-            curEnv = newEnv;
-        } else if( JNI_OK != envRes ) {
-            // oops ..
-            fprintf(stderr, "Nativewindow X11 Error: can't GetEnv: %d\n", envRes);
-            return 0;
         }
-        NativewindowCommon_throwNewRuntimeException(curEnv, "Info: Nativewindow X11 Error: Display %p, Code 0x%X, errno %s", 
-                                                    dpy, e->error_code, errStr);
+        fflush(stderr);
 
-        if( NULL != newEnv ) {
-            // detached attached thread
+        if (NULL != jniEnv && shallBeDetached) {
             (*jvmHandle)->DetachCurrentThread(jvmHandle);
         }
     }
 
-#if 0
-    if(NULL!=origErrorHandler) {
-        origErrorHandler(dpy, e);
-    }
-#endif
-
     return 0;
 }
 
-static void x11ErrorHandlerEnable(Display *dpy, int onoff, JNIEnv * env) {
-    if(errorHandlerBlocked) return;
-
+void NativewindowCommon_x11ErrorHandlerEnable(JNIEnv * env, Display *dpy, int onoff, int quiet, int sync) {
+    errorHandlerQuiet = quiet;
     if(onoff) {
         if(NULL==origErrorHandler) {
             setupJVMVars(env);
-            if(NULL!=dpy) {
+            origErrorHandler = XSetErrorHandler(x11ErrorHandler);
+            if(sync && NULL!=dpy) {
                 XSync(dpy, False);
             }
-            origErrorHandler = XSetErrorHandler(x11ErrorHandler);
         }
     } else {
         if(NULL!=origErrorHandler) {
-            if(NULL!=dpy) {
+            if(sync && NULL!=dpy) {
                 XSync(dpy, False);
             }
             XSetErrorHandler(origErrorHandler);
@@ -230,46 +240,27 @@ static void x11ErrorHandlerEnable(Display *dpy, int onoff, JNIEnv * env) {
     }
 }
 
-static void x11ErrorHandlerEnableBlocking(JNIEnv * env, int onoff, int quiet) {
-    errorHandlerBlocked = 0 ;
-    x11ErrorHandlerEnable(NULL, onoff, env);
-    errorHandlerBlocked = onoff ;
-    errorHandlerQuiet = quiet;
-}
-
-
 static XIOErrorHandler origIOErrorHandler = NULL;
 
 static int x11IOErrorHandler(Display *dpy)
 {
-    JNIEnv *curEnv = NULL;
-    JNIEnv *newEnv = NULL;
-    int envRes ;
     const char * dpyName = XDisplayName(NULL);
-    const char * errStr = strerror(errno);
+    const char * errnoStr = strerror(errno);
+    char threadName[80];
+    int shallBeDetached = 0;
+    JNIEnv *jniEnv = NativewindowCommon_GetJNIEnv(jvmHandle, jvmVersion, &shallBeDetached);
 
-    fprintf(stderr, "Nativewindow X11 IOError: Display %p (%s): %s\n", dpy, dpyName, errStr);
+    (void) NativewindowCommon_GetStaticStringMethod(jniEnv, X11UtilClazz, getCurrentThreadNameID, threadName, sizeof(threadName), "n/a");
 
-    // retrieve this thread's JNIEnv curEnv - or detect it's detached
-    envRes = (*jvmHandle)->GetEnv(jvmHandle, (void **) &curEnv, jvmVersion) ;
-    if( JNI_EDETACHED == envRes ) {
-        // detached thread - attach to JVM
-        if( JNI_OK != ( envRes = (*jvmHandle)->AttachCurrentThread(jvmHandle, (void**) &newEnv, NULL) ) ) {
-            fprintf(stderr, "Nativewindow X11 IOError: can't attach thread: %d\n", envRes);
-            return;
-        }
-        curEnv = newEnv;
-    } else if( JNI_OK != envRes ) {
-        // oops ..
-        fprintf(stderr, "Nativewindow X11 IOError: can't GetEnv: %d\n", envRes);
-        return;
-    }
+    fprintf(stderr, "Nativewindow X11 IOError (Thread %s): Display %p (%s): %s\n", threadName, dpy, dpyName, errnoStr);
+    (*jniEnv)->CallStaticVoidMethod(jniEnv, X11UtilClazz, dumpStackID);
 
-    NativewindowCommon_FatalError(curEnv, "Nativewindow X11 IOError: Display %p (%s): %s", dpy, dpyName, errStr);
+    if (NULL != jniEnv) {
+        NativewindowCommon_FatalError(jniEnv, "Nativewindow X11 IOError (Thread %s): Display %p (%s): %s", threadName, dpy, dpyName, errnoStr);
 
-    if( NULL != newEnv ) {
-        // detached attached thread
-        (*jvmHandle)->DetachCurrentThread(jvmHandle);
+        if (shallBeDetached) {
+            (*jvmHandle)->DetachCurrentThread(jvmHandle);
+        }
     }
     if(NULL!=origIOErrorHandler) {
         origIOErrorHandler(dpy);
@@ -293,22 +284,31 @@ static int _initialized=0;
 static jboolean _xinitThreadsOK=JNI_FALSE;
 
 JNIEXPORT jboolean JNICALL 
-Java_jogamp_nativewindow_x11_X11Util_initialize0(JNIEnv *env, jclass _unused, jboolean firstUIActionOnProcess) {
+Java_jogamp_nativewindow_x11_X11Util_initialize0(JNIEnv *env, jclass clazz, jboolean firstUIActionOnProcess, jboolean debug) {
     if(0==_initialized) {
+        if(debug) {
+            errorHandlerDebug = 1;
+        }
+        X11UtilClazz = (jclass)(*env)->NewGlobalRef(env, clazz);
         if( JNI_TRUE == firstUIActionOnProcess ) {
             if( 0 == XInitThreads() ) {
                 fprintf(stderr, "Warning: XInitThreads() failed\n");
             } else {
                 _xinitThreadsOK=JNI_TRUE;
-                DBG_PRINT( "X11: XInitThreads() called for concurrent Thread support\n");
+                if(debug) {
+                    fprintf(stderr, "X11: XInitThreads() called for concurrent Thread support\n");
+                }
             }
-        } else {
-            DBG_PRINT( "X11: XInitThreads() _not_ called for concurrent Thread support\n");
+        } else if(debug) {
+            fprintf(stderr, "X11: XInitThreads() _not_ called for concurrent Thread support\n");
         }
 
         _initClazzAccess(env);
         x11IOErrorHandlerEnable(1, env);
         _initialized=1;
+        if(JNI_TRUE == debug) {
+            fprintf(stderr, "Info: NativeWindow native init passed\n");
+        }
     }
     return _xinitThreadsOK;
 }
@@ -320,7 +320,7 @@ Java_jogamp_nativewindow_x11_X11Util_shutdown0(JNIEnv *env, jclass _unused) {
 
 JNIEXPORT void JNICALL 
 Java_jogamp_nativewindow_x11_X11Util_setX11ErrorHandler0(JNIEnv *env, jclass _unused, jboolean onoff, jboolean quiet) {
-  x11ErrorHandlerEnableBlocking(env, ( JNI_TRUE == onoff ) ? 1 : 0, ( JNI_TRUE == quiet ) ? 1 : 0);
+    NativewindowCommon_x11ErrorHandlerEnable(env, NULL, onoff ? 1 : 0, quiet ? 1 : 0, 0 /* no dpy, no sync */);
 }
 
 /*   Java->C glue code:
@@ -345,9 +345,9 @@ Java_jogamp_nativewindow_x11_X11Lib_XGetVisualInfo1__JJLjava_nio_ByteBuffer_2Lja
   if (arg3 != NULL) {
     _ptr3 = (int *) (((char*) (*env)->GetPrimitiveArrayCritical(env, arg3, NULL)) + arg3_byte_offset);
   }
-  x11ErrorHandlerEnable((Display *) (intptr_t) arg0, 1, env);
+  NativewindowCommon_x11ErrorHandlerEnable(env, (Display *) (intptr_t) arg0, 1, 0, 0);
   _res = XGetVisualInfo((Display *) (intptr_t) arg0, (long) arg1, (XVisualInfo *) _ptr2, (int *) _ptr3);
-  x11ErrorHandlerEnable((Display *) (intptr_t) arg0, 0, env);
+  NativewindowCommon_x11ErrorHandlerEnable(env, (Display *) (intptr_t) arg0, 0, 0, 0);
   count = _ptr3[0];
   if (arg3 != NULL) {
     (*env)->ReleasePrimitiveArrayCritical(env, arg3, _ptr3, 0);
@@ -362,15 +362,41 @@ Java_jogamp_nativewindow_x11_X11Lib_XGetVisualInfo1__JJLjava_nio_ByteBuffer_2Lja
   return jbyteCopy;
 }
 
-JNIEXPORT jlong JNICALL 
+JNIEXPORT jint JNICALL 
+Java_jogamp_nativewindow_x11_X11Lib_GetVisualIDFromWindow(JNIEnv *env, jclass _unused, jlong display, jlong window) {
+    Display * dpy = (Display *)(intptr_t)display;
+    Window      w = (Window) window;
+    XWindowAttributes xwa;
+    jlong r = 0; // undefinded
+
+    if(NULL==dpy) {
+        NativewindowCommon_throwNewRuntimeException(env, "invalid display connection..");
+        return;
+    }
+
+    NativewindowCommon_x11ErrorHandlerEnable(env, dpy, 1, 0, 1);
+    memset(&xwa, 0, sizeof(XWindowAttributes));
+    XGetWindowAttributes(dpy, w, &xwa);
+    if(NULL != xwa.visual) {
+        r = (jint) XVisualIDFromVisual( xwa.visual );
+    } else {
+        r = 0;
+    }
+    NativewindowCommon_x11ErrorHandlerEnable(env, dpy, 0, 0, 1);
+
+    return r;
+}
+
+
+JNIEXPORT jint JNICALL 
 Java_jogamp_nativewindow_x11_X11Lib_DefaultVisualID(JNIEnv *env, jclass _unused, jlong display, jint screen) {
   jlong r;
     if(0==display) {
         NativewindowCommon_FatalError(env, "invalid display connection..");
     }
-  x11ErrorHandlerEnable((Display *) (intptr_t) display, 1, env);
-  r = (jlong) XVisualIDFromVisual( DefaultVisual( (Display*) (intptr_t) display, screen ) );
-  x11ErrorHandlerEnable((Display *) (intptr_t) display, 0, env);
+  NativewindowCommon_x11ErrorHandlerEnable(env, (Display *) (intptr_t) display, 1, 0, 0);
+  r = (jint) XVisualIDFromVisual( DefaultVisual( (Display*) (intptr_t) display, screen ) );
+  NativewindowCommon_x11ErrorHandlerEnable(env, (Display *) (intptr_t) display, 0, 0, 0);
   return r;
 }
 
@@ -411,9 +437,9 @@ Java_jogamp_nativewindow_x11_X11Lib_XCloseDisplay__J(JNIEnv *env, jclass _unused
   if(0==display) {
       NativewindowCommon_FatalError(env, "invalid display connection..");
   }
-  x11ErrorHandlerEnable((Display *) (intptr_t) display, 1, env);
+  NativewindowCommon_x11ErrorHandlerEnable(env, NULL, 1, 0, 0);
   _res = XCloseDisplay((Display *) (intptr_t) display);
-  x11ErrorHandlerEnable(NULL, 0, env);
+  NativewindowCommon_x11ErrorHandlerEnable(env, NULL, 0, 0, 0);
   return _res;
 }
 
@@ -451,7 +477,7 @@ JNIEXPORT jlong JNICALL Java_jogamp_nativewindow_x11_X11Lib_CreateDummyWindow
         return 0;
     }
 
-    x11ErrorHandlerEnable(dpy, 1, env);
+    NativewindowCommon_x11ErrorHandlerEnable(env, dpy, 1, 0, 0);
 
     scrn = ScreenOfDisplay(dpy, scrn_idx);
 
@@ -471,7 +497,7 @@ JNIEXPORT jlong JNICALL Java_jogamp_nativewindow_x11_X11Lib_CreateDummyWindow
 
     if (visual==NULL)
     { 
-        x11ErrorHandlerEnable(dpy, 0, env);
+        NativewindowCommon_x11ErrorHandlerEnable(env, dpy, 0, 0, 1);
         NativewindowCommon_throwNewRuntimeException(env, "could not query Visual by given VisualID, bail out!");
         return 0;
     } 
@@ -511,13 +537,11 @@ JNIEXPORT jlong JNICALL Java_jogamp_nativewindow_x11_X11Lib_CreateDummyWindow
                            visual,
                            attrMask,
                            &xswa);
-
     XSync(dpy, False);
 
     XSelectInput(dpy, window, 0); // no events
-    XSync(dpy, False);
 
-    x11ErrorHandlerEnable(dpy, 0, env);
+    NativewindowCommon_x11ErrorHandlerEnable(env, dpy, 0, 0, 1);
 
     DBG_PRINT( "X11: [CreateWindow] created window %p on display %p\n", window, dpy);
 
@@ -541,11 +565,11 @@ JNIEXPORT void JNICALL Java_jogamp_nativewindow_x11_X11Lib_DestroyDummyWindow
         return;
     }
 
-    x11ErrorHandlerEnable(dpy, 1, env);
+    NativewindowCommon_x11ErrorHandlerEnable(env, dpy, 1, 0, 0);
     XUnmapWindow(dpy, w);
     XSync(dpy, False);
     XDestroyWindow(dpy, w);
-    x11ErrorHandlerEnable(dpy, 0, env);
+    NativewindowCommon_x11ErrorHandlerEnable(env, dpy, 0, 0, 1);
 }
 
 /*
@@ -569,11 +593,11 @@ JNIEXPORT jobject JNICALL Java_jogamp_nativewindow_x11_X11Lib_GetRelativeLocatio
     if( 0 == jdest_win ) { dest_win = root; }
     if( 0 == jsrc_win ) { src_win = root; }
 
-    x11ErrorHandlerEnable(dpy, 1, env);
+    NativewindowCommon_x11ErrorHandlerEnable(env, dpy, 1, 0, 0);
 
     res = XTranslateCoordinates(dpy, src_win, dest_win, src_x, src_y, &dest_x, &dest_y, &child);
 
-    x11ErrorHandlerEnable(dpy, 0, env);
+    NativewindowCommon_x11ErrorHandlerEnable(env, dpy, 0, 0, 0);
 
     DBG_PRINT( "X11: GetRelativeLocation0: %p %d/%d -> %p %d/%d - ok: %d\n",
         (void*)src_win, src_x, src_y, (void*)dest_win, dest_x, dest_y, (int)res);
diff --git a/src/newt/classes/jogamp/newt/event/NEWTEventTask.java b/src/nativewindow/native/x11/Xmisc.h
similarity index 69%
copy from src/newt/classes/jogamp/newt/event/NEWTEventTask.java
copy to src/nativewindow/native/x11/Xmisc.h
index fae6560..a44da95 100644
--- a/src/newt/classes/jogamp/newt/event/NEWTEventTask.java
+++ b/src/nativewindow/native/x11/Xmisc.h
@@ -25,32 +25,20 @@
  * authors and should not be interpreted as representing official policies, either expressed
  * or implied, of JogAmp Community.
  */
- 
-package jogamp.newt.event;
 
-import com.jogamp.newt.event.NEWTEvent;
+#ifndef Xmisc_h
+#define Xmisc_h
 
-/**
- * Helper class to provide a NEWTEvent queue implementation with a NEWTEvent wrapper
- * which notifies after sending the event for the <code>invokeAndWait()</code> semantics.
- */
-public class NEWTEventTask {
-    NEWTEvent event;
-    Object notifyObject;
-
-    public NEWTEventTask(NEWTEvent event, Object notifyObject) {
-        this.event = event ;
-        this.notifyObject = notifyObject ;
-    }
-
-    public NEWTEvent get() { return event; }
+#include <jni.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdarg.h>
+#include <unistd.h>
+#include <errno.h>
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
 
-    public void notifyIssuer() {
-        if(null != notifyObject) {
-            synchronized (notifyObject) {
-                notifyObject.notifyAll();
-            }
-        }
-    }
-}
+void NativewindowCommon_x11ErrorHandlerEnable(JNIEnv * env, Display *dpy, int onoff, int quiet, int sync);
 
+#endif /* Xmisc_h */
diff --git a/src/newt/classes/com/jogamp/newt/Display.java b/src/newt/classes/com/jogamp/newt/Display.java
index 7b6849a..1e9a0e9 100644
--- a/src/newt/classes/com/jogamp/newt/Display.java
+++ b/src/newt/classes/com/jogamp/newt/Display.java
@@ -141,6 +141,23 @@ public abstract class Display {
      */
     public abstract String getType();
 
+    /**
+     * Sets a new {@link EDTUtil} and returns the previous one.
+     * <p>
+     * If <code>newEDTUtil</code> is <code>null</code>, 
+     * the device's default EDTUtil is created and used.
+     * </p>
+     * <p>
+     * If a previous one exists and it differs from the new one, 
+     * it's being stopped, wait-until-idle and reset to allow restart.
+     * </p>
+     * <p>
+     * If <code>newEDTUtil</code> is not null and equals the previous one,
+     * <code>null</code> is returned and no change is being made.
+     * </p>
+     */
+    public abstract EDTUtil setEDTUtil(EDTUtil newEDTUtil);
+    
     public abstract EDTUtil getEDTUtil();
 
     public abstract boolean isEDTRunning();
diff --git a/src/newt/classes/com/jogamp/newt/Window.java b/src/newt/classes/com/jogamp/newt/Window.java
index 3c5441b..e8537fe 100644
--- a/src/newt/classes/com/jogamp/newt/Window.java
+++ b/src/newt/classes/com/jogamp/newt/Window.java
@@ -40,8 +40,20 @@ import javax.media.nativewindow.NativeWindow;
 import javax.media.nativewindow.WindowClosingProtocol;
 
 /**
- * Specifying the public Window functionality for the
- * using a Window and for shadowing one like {@link com.jogamp.newt.opengl.GLWindow}.
+ * Specifying NEWT's Window functionality:
+ * <ul>
+ *   <li>On- and offscreen windows</li>
+ *   <li>Keyboard and multi-pointer input</li>
+ *   <li>Native reparenting</li>
+ *   <li>Toggable fullscreen and decoration mode</li>
+ *   <li>Transparency</li>
+ *   <li>... and more</li>
+ * </ul>
+ * <p>
+ * One use case is {@link com.jogamp.newt.opengl.GLWindow}, which delegates 
+ * window operation to an instance of this interface while providing OpenGL 
+ * functionality.
+ * </p>
  */
 public interface Window extends NativeWindow, WindowClosingProtocol {
     public static final boolean DEBUG_MOUSE_EVENT = Debug.debug("Window.MouseEvent");
@@ -71,7 +83,7 @@ public interface Window extends NativeWindow, WindowClosingProtocol {
 
     /**
      * Set the CapabilitiesChooser to help determine the native visual type.
-     * 
+     *
      * @param chooser the new CapabilitiesChooser
      * @return the previous CapabilitiesChooser
      */
@@ -86,7 +98,7 @@ public interface Window extends NativeWindow, WindowClosingProtocol {
 
     /**
      * Gets an immutable set of chosen capabilities.
-     * 
+     *
      * @return the chosen capabilities
      */
     CapabilitiesImmutable getChosenCapabilities();
@@ -103,14 +115,15 @@ public interface Window extends NativeWindow, WindowClosingProtocol {
      * @see #destroy()
      * @see #setVisible(boolean)
      */
+    @Override
     void destroy();
 
     /**
-     * <p>
      * <code>setVisible</code> makes the window and children visible if <code>visible</code> is true,
-     * otherwise the window and children becomes invisible.<br></p>
+     * otherwise the window and children becomes invisible.
      * <p>
-     * The <code>setVisible(true)</code> is responsible to actual create the native window.<br></p>
+     * The <code>setVisible(true)</code> is responsible to actual create the native window.
+     * </p>
      * <p>
      * Zero size semantics are respected, see {@link #setSize(int,int)}:<br>
      * <pre>
@@ -125,23 +138,24 @@ public interface Window extends NativeWindow, WindowClosingProtocol {
      * }
      * </pre></p>
      * <p>
-     * In case this window is a child window and a parent {@link javax.media.nativewindow.NativeWindow} is being used,<br>
-     * the parent's {@link javax.media.nativewindow.NativeWindow} handle is retrieved via {@link javax.media.nativewindow.NativeWindow#getWindowHandle()}.<br>
-     * If this action fails, ie if the parent {@link javax.media.nativewindow.NativeWindow} is not valid yet,<br>
-     * no native window is created yet and <code>setVisible(true)</code> shall be repeated when it is.<br></p>
+     * In case this window is a child window and has a {@link javax.media.nativewindow.NativeWindow} parent,<br>
+     * <code>setVisible(true)</code> has no effect as long the parent's is not valid yet,
+     * i.e. {@link javax.media.nativewindow.NativeWindow#getWindowHandle()} returns <code>null</code>.<br>
+     * <code>setVisible(true)</code> shall be repeated when the parent becomes valid.
+     * </p>
      */
     void setVisible(boolean visible);
 
     boolean isVisible();
 
-    /** 
-     * If the implementation uses delegation, return the delegated {@link Window} instance, 
+    /**
+     * If the implementation uses delegation, return the delegated {@link Window} instance,
      * otherwise return <code>this</code> instance. */
     Window getDelegatedWindow();
-    
+
     //
     // Child Window Management
-    // 
+    //
 
     boolean addChild(NativeWindow win);
 
@@ -153,7 +167,7 @@ public interface Window extends NativeWindow, WindowClosingProtocol {
 
     /**
      * Sets the size of the window's client area, excluding decorations.
-     * 
+     *
      * <p>
      * Zero size semantics are respected, see {@link #setVisible(boolean)}:<br>
      * <pre>
@@ -170,72 +184,72 @@ public interface Window extends NativeWindow, WindowClosingProtocol {
      *
      * @param width of the window's client area
      * @param height of the window's client area
-     * 
+     *
      * @see #getInsets()
      */
     void setSize(int width, int height);
 
     /**
      * Sets the size of the top-level window including insets (window decorations).
-     * 
+     *
      * <p>
      * Note: Insets (if supported) are available only after the window is set visible and hence has been created.
      * </p>
      *
      * @param width of the top-level window area
      * @param height of the top-level window area
-     * 
+     *
      * @see #setSize(int, int)
      * @see #getInsets()
      */
     void setTopLevelSize(int width, int height);
-    
+
     /**
      * Sets the location of the window's client area, excluding insets (window decorations).<br>
-     * 
+     *
      * This call is ignored if in fullscreen mode.<br>
      *
      * @param x coord of the client-area's top left corner
      * @param y coord of the client-area's top left corner
-     * 
+     *
      * @see #getInsets()
      */
     void setPosition(int x, int y);
-    
+
     /**
      * Sets the location of the top-level window inclusive insets (window decorations).<br>
-     * 
+     *
      * <p>
      * Note: Insets (if supported) are available only after the window is set visible and hence has been created.
      * </p>
-     * 
+     *
      * This call is ignored if in fullscreen mode.<br>
      *
      * @param x coord of the top-level left corner
      * @param y coord of the top-level left corner
-     * 
+     *
      * @see #setPosition(int, int)
      * @see #getInsets()
      */
     void setTopLevelPosition(int x, int y);
 
     void setUndecorated(boolean value);
-    
+
     boolean isUndecorated();
-    
+
     void setAlwaysOnTop(boolean value);
-    
+
     boolean isAlwaysOnTop();
-    
+
     void setTitle(String title);
 
     String getTitle();
 
     boolean isPointerVisible();
-    
+
     /**
      * Makes the pointer visible or invisible.
-     * 
+     *
      * @param pointerVisible defaults to <code>true</code> for platforms w/ visible pointer,
      *                       otherwise defaults to <code>true</code>, eg. Android.
      * @see #confinePointer(boolean)
@@ -243,32 +257,32 @@ public interface Window extends NativeWindow, WindowClosingProtocol {
     void setPointerVisible(boolean pointerVisible);
 
     boolean isPointerConfined();
-    
+
     /**
      * Confine the pointer to this window, ie. pointer jail.
      * <p>
-     * Before jailing the mouse pointer, 
+     * Before jailing the mouse pointer,
      * the window request the focus and the pointer is centered in the window.
      * </p>
      * <p>
-     * In combination w/ {@link #warpPointer(int, int)} 
+     * In combination w/ {@link #warpPointer(int, int)}
      * and maybe {@link #setPointerVisible(boolean)} a simple mouse
      * navigation can be realized.</p>
-     *  
+     *
      * @param confine defaults to <code>false</code>.
      */
     void confinePointer(boolean confine);
-    
+
     /**
      * Moves the pointer to x/y relative to this window's origin.
-     * 
+     *
      * @param x relative pointer x position within this window
      * @param y relative pointer y position within this window
-     * 
+     *
      * @see #confinePointer(boolean)
      */
     void warpPointer(int x, int y);
-    
+
     /** Reparenting operation types */
     public enum ReparentOperation {
         /** No native reparenting valid */
@@ -284,7 +298,7 @@ public interface Window extends NativeWindow, WindowClosingProtocol {
         ACTION_NATIVE_CREATION,
 
         /** Change Window tree only, native creation is pending */
-        ACTION_NATIVE_CREATION_PENDING;        
+        ACTION_NATIVE_CREATION_PENDING;
     }
 
     /**
@@ -304,7 +318,7 @@ public interface Window extends NativeWindow, WindowClosingProtocol {
     ReparentOperation reparentWindow(NativeWindow newParent, boolean forceDestroyCreate);
 
     boolean setFullscreen(boolean fullscreen);
-    
+
     boolean isFullscreen();
 
     static interface FocusRunnable {
@@ -316,7 +330,7 @@ public interface Window extends NativeWindow, WindowClosingProtocol {
     }
 
     /**
-     * Sets a {@link FocusRunnable}, 
+     * Sets a {@link FocusRunnable},
      * which {@link FocusRunnable#run()} method is executed before the native focus is requested.
      * <p>
      * This allows notifying a covered window toolkit like AWT that the focus is requested,
@@ -324,7 +338,7 @@ public interface Window extends NativeWindow, WindowClosingProtocol {
      * </p>
      */
     void setFocusAction(FocusRunnable focusAction);
-    
+
     /**
      * Sets a {@link KeyListener} allowing focus traversal with a covered window toolkit like AWT.
      * <p>
@@ -335,27 +349,27 @@ public interface Window extends NativeWindow, WindowClosingProtocol {
      */
     void setKeyboardFocusHandler(KeyListener l);
 
-    /** 
+    /**
      * Request focus for this native window
      * <p>
      * The request is handled on this Window EDT and blocked until finished.
      * </p>
-     * 
+     *
      * @see #requestFocus(boolean)
      */
     void requestFocus();
 
-    /** 
+    /**
      * Request focus for this native window
      * <p>
-     * The request is handled on this Window EDT. 
+     * The request is handled on this Window EDT.
      * </p>
-     * 
+     *
      * @param wait true if waiting until the request is executed, otherwise false
      * @see #requestFocus()
      */
     void requestFocus(boolean wait);
-    
+
     void windowRepaint(int x, int y, int width, int height);
 
     void enqueueEvent(boolean wait, com.jogamp.newt.event.NEWTEvent event);
@@ -399,6 +413,26 @@ public interface Window extends NativeWindow, WindowClosingProtocol {
     // KeyListener
     //
 
+    /**
+     * In case the platform supports or even requires a virtual on-screen keyboard,
+     * this method shows or hide it depending on whether <code>visible</code> is <code>true</code>
+     * or <code>false</code>.
+     * <p>
+     * One known platform where NEWT supports this feature is <code>Android</code>.
+     * </p>
+     */
+    void setKeyboardVisible(boolean visible);
+
+    /**
+     * Return <code>true</code> if the virtual on-screen keyboard is visible, otherwise <code>false</code>.
+     * <p>
+     * Currently on <code>Android</code>, the only supported platform right now,
+     * there is no way to reliably be notified of the current keyboard state.<br>
+     * It would be best, if your code does not rely on this information.
+     * </p>
+     * @see #setKeyboardVisible(boolean)
+     */
+    boolean isKeyboardVisible();
 
     /**
      *
diff --git a/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java b/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java
index 9af4a02..6f0028a 100644
--- a/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java
+++ b/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java
@@ -42,7 +42,9 @@ import java.security.PrivilegedAction;
 import java.util.Set;
 
 import javax.media.nativewindow.NativeWindow;
+import javax.media.nativewindow.NativeWindowFactory;
 import javax.media.nativewindow.OffscreenLayerOption;
+import javax.media.nativewindow.OffscreenLayerSurface;
 import javax.media.nativewindow.WindowClosingProtocol;
 import javax.swing.MenuSelectionManager;
 
@@ -261,17 +263,35 @@ public class NewtCanvasAWT extends java.awt.Canvas implements WindowClosingProto
     private final FocusPropertyChangeListener focusPropertyChangeListener = new FocusPropertyChangeListener();
     private volatile KeyboardFocusManager keyboardFocusManager = null;
 
-    /** sets a new NEWT child, provoking reparenting. */
-    private NewtCanvasAWT setNEWTChild(Window child) {
-        if(newtChild!=child) {
-            newtChild = child;
-            if(isDisplayable()) {
-                // reparent right away, addNotify has been called already
-                final java.awt.Container cont = AWTMisc.getContainer(this);
-                reparentWindow( (null!=child) ? true : false, cont );
-            }
+    /** 
+     * Sets a new NEWT child, provoking reparenting.
+     * <p>
+     * A previously detached <code>newChild</code> will be released to top-level status
+     * and made invisible. 
+     * </p>
+     * <p>
+     * Note: When switching NEWT child's, detaching the previous first via <code>setNEWTChild(null)</code> 
+     * produced much cleaner visual results. 
+     * </p>
+     * @return the previous attached newt child.  
+     */
+    public Window setNEWTChild(Window newChild) {
+        final Window prevChild = newtChild;
+        if(DEBUG) {
+            System.err.println("NewtCanvasAWT.setNEWTChild.0: win "+newtWinHandleToHexString(prevChild)+" -> "+newtWinHandleToHexString(newChild));
+        }
+        final java.awt.Container cont = AWTMisc.getContainer(this);
+        // remove old one
+        if(null != newtChild) {
+            reparentWindow( false, cont );
+            newtChild = null;
         }
-        return this;
+        // add new one, reparent only if ready
+        newtChild = newChild;
+        if( isDisplayable() && null != newChild) {
+            reparentWindow( true, cont );
+        }
+        return prevChild;
     }
 
     /** @return the current NEWT child */
@@ -304,13 +324,13 @@ public class NewtCanvasAWT extends java.awt.Canvas implements WindowClosingProto
             awtKeyAdapter.removeFrom(this);
             awtKeyAdapter = null;
         }
-        newtChild.setKeyboardFocusHandler(null);
         if(null != keyboardFocusManager) {
             keyboardFocusManager.removePropertyChangeListener("focusOwner", focusPropertyChangeListener);
             keyboardFocusManager = null;
         }
         
         if( null != newtChild ) {
+            newtChild.setKeyboardFocusHandler(null);
             if(attach) {
                 if(null == jawtWindow.getGraphicsConfiguration()) {
                     throw new InternalError("XXX");
@@ -358,7 +378,7 @@ public class NewtCanvasAWT extends java.awt.Canvas implements WindowClosingProto
             // if ( isShowing() == true  ) -> Container is already visible.
             System.err.println("NewtCanvasAWT.addNotify: "+newtChild+", "+this+", visible "+isVisible()+", showing "+isShowing()+
                                ", displayable "+isDisplayable()+" -> "+cont);
-        }  
+        }
         reparentWindow(true, cont);
     }
 
@@ -368,7 +388,17 @@ public class NewtCanvasAWT extends java.awt.Canvas implements WindowClosingProto
         if(DEBUG) {
             System.err.println("NewtCanvasAWT.removeNotify: "+newtChild+", from "+cont);
         }
+        final OffscreenLayerSurface ols = NativeWindowFactory.getOffscreenLayerSurface(newtChild, true);
+        if(null != ols && ols.isSurfaceLayerAttached()) {
+            ols.detachSurfaceLayer();
+        }      
         reparentWindow(false, cont);
+        
+        if(null != jawtWindow) {
+            NewtFactoryAWT.destroyNativeWindow(jawtWindow);
+            jawtWindow=null;
+        }
+        
         super.removeNotify();
     }
 
@@ -376,14 +406,19 @@ public class NewtCanvasAWT extends java.awt.Canvas implements WindowClosingProto
       if(null==newtChild) {
         return; // nop
       }
+      if(DEBUG) {
+          System.err.println("NewtCanvasAWT.reparentWindow.0: add="+add+", win "+newtWinHandleToHexString(newtChild)+", EDTUtil: cur "+newtChild.getScreen().getDisplay().getEDTUtil());
+      }
 
       newtChild.setFocusAction(null); // no AWT focus traversal ..
       if(add) {
-          jawtWindow = NewtFactoryAWT.getNativeWindow(this, newtChild.getRequestedCapabilities());          
-          jawtWindow.setShallUseOffscreenLayer(shallUseOffscreenLayer);
           if(DEBUG) {
             System.err.println("NewtCanvasAWT.reparentWindow: newtChild: "+newtChild);
           }
+          if(null == jawtWindow) {
+              jawtWindow = NewtFactoryAWT.getNativeWindow(this, newtChild.getRequestedCapabilities());          
+              jawtWindow.setShallUseOffscreenLayer(shallUseOffscreenLayer);
+          }            
           final int w;
           final int h;
           if(isPreferredSizeSet()) {
@@ -407,19 +442,17 @@ public class NewtCanvasAWT extends java.awt.Canvas implements WindowClosingProto
           newtChild.setVisible(true);
           configureNewtChild(true);
           newtChild.sendWindowEvent(WindowEvent.EVENT_WINDOW_RESIZED); // trigger a resize/relayout to listener
-          newtChild.windowRepaint(0, 0, w, h);
           
           // force this AWT Canvas to be focus-able, 
           // since this it is completely covered by the newtChild (z-order).
           setFocusable(true);        
       } else {
-          configureNewtChild(false);          
+          configureNewtChild(false);
           newtChild.setVisible(false);
           newtChild.reparentWindow(null);
-          if(null != jawtWindow) {
-              NewtFactoryAWT.destroyNativeWindow(jawtWindow);
-              jawtWindow=null;
-          }
+      }
+      if(DEBUG) {
+          System.err.println("NewtCanvasAWT.reparentWindow.X: add="+add+", win "+newtWinHandleToHexString(newtChild)+", EDTUtil: cur "+newtChild.getScreen().getDisplay().getEDTUtil());
       }
     }
 
@@ -563,5 +596,12 @@ public class NewtCanvasAWT extends java.awt.Canvas implements WindowClosingProto
       }
     }
   }
+  
+  static String newtWinHandleToHexString(Window w) {
+      return null != w ? toHexString(w.getWindowHandle()) : "nil";
+  }
+  static String toHexString(long l) {
+      return "0x"+Long.toHexString(l);
+  }
 }
 
diff --git a/src/newt/classes/com/jogamp/newt/event/KeyEvent.java b/src/newt/classes/com/jogamp/newt/event/KeyEvent.java
index 44fcea4..4db661e 100644
--- a/src/newt/classes/com/jogamp/newt/event/KeyEvent.java
+++ b/src/newt/classes/com/jogamp/newt/event/KeyEvent.java
@@ -43,7 +43,7 @@ public class KeyEvent extends InputEvent
      this.keyChar=keyChar;
  }
 
- /** Only valid if delivered via {@link KeyListener#keyPressed(KeyEvent)} */
+ /** Only valid on all platforms at {@link KeyListener#keyTyped(KeyEvent)} */
  public char getKeyChar() {
     return keyChar;
  }
diff --git a/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java b/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java
index f891937..0fc1b4e 100644
--- a/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java
+++ b/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java
@@ -1,22 +1,22 @@
 /*
  * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.
  * Copyright (c) 2010 JogAmp Community. All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * met:
- * 
+ *
  * - Redistribution of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
- * 
+ *
  * - Redistribution in binary form must reproduce the above copyright
  *   notice, this list of conditions and the following disclaimer in the
  *   documentation and/or other materials provided with the distribution.
- * 
+ *
  * Neither the name of Sun Microsystems, Inc. or the names of
  * contributors may be used to endorse or promote products derived from
  * this software without specific prior written permission.
- * 
+ *
  * This software is provided "AS IS," without a warranty of any kind. ALL
  * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
  * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
@@ -29,29 +29,53 @@
  * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
  * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
  * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * 
+ *
  */
 
 package com.jogamp.newt.opengl;
 
-import java.io.PrintStream;
-
-import com.jogamp.common.GlueGenVersion;
-import com.jogamp.common.util.VersionUtil;
-import com.jogamp.newt.*;
-import com.jogamp.newt.event.*;
-
-import jogamp.newt.WindowImpl;
-
-import javax.media.nativewindow.*;
+import javax.media.nativewindow.AbstractGraphicsConfiguration;
+import javax.media.nativewindow.CapabilitiesChooser;
+import javax.media.nativewindow.CapabilitiesImmutable;
+import javax.media.nativewindow.NativeSurface;
+import javax.media.nativewindow.NativeWindow;
+import javax.media.nativewindow.NativeWindowException;
+import javax.media.nativewindow.NativeWindowFactory;
+import javax.media.nativewindow.SurfaceUpdatedListener;
 import javax.media.nativewindow.util.InsetsImmutable;
 import javax.media.nativewindow.util.Point;
-import javax.media.opengl.*;
+import javax.media.opengl.FPSCounter;
+import javax.media.opengl.GL;
+import javax.media.opengl.GLAnimatorControl;
+import javax.media.opengl.GLAutoDrawable;
+import javax.media.opengl.GLCapabilities;
+import javax.media.opengl.GLCapabilitiesImmutable;
+import javax.media.opengl.GLContext;
+import javax.media.opengl.GLDrawableFactory;
+import javax.media.opengl.GLEventListener;
+import javax.media.opengl.GLException;
+import javax.media.opengl.GLProfile;
+
+import jogamp.newt.WindowImpl;
+import jogamp.opengl.GLAutoDrawableBase;
+import jogamp.opengl.GLContextImpl;
+import jogamp.opengl.GLDrawableImpl;
 
-import jogamp.opengl.FPSCounterImpl;
-import jogamp.opengl.GLDrawableHelper;
+import com.jogamp.common.GlueGenVersion;
+import com.jogamp.common.util.VersionUtil;
+import com.jogamp.common.util.locks.RecursiveLock;
+import com.jogamp.newt.NewtFactory;
+import com.jogamp.newt.Screen;
+import com.jogamp.newt.Window;
+import com.jogamp.newt.event.KeyListener;
+import com.jogamp.newt.event.MouseListener;
+import com.jogamp.newt.event.NEWTEvent;
+import com.jogamp.newt.event.NEWTEventConsumer;
+import com.jogamp.newt.event.WindowAdapter;
+import com.jogamp.newt.event.WindowEvent;
+import com.jogamp.newt.event.WindowListener;
+import com.jogamp.newt.event.WindowUpdateEvent;
 import com.jogamp.opengl.JoglVersion;
-import com.jogamp.opengl.util.Animator;
 
 /**
  * An implementation of {@link GLAutoDrawable} and {@link Window} interface,
@@ -64,70 +88,50 @@ import com.jogamp.opengl.util.Animator;
  * To be able to use OpenGL commands from within such input {@link com.jogamp.newt.event.NEWTEventListener},<br>
  * you can inject {@link javax.media.opengl.GLRunnable} objects
  * via {@link #invoke(boolean, javax.media.opengl.GLRunnable)} to the OpenGL command stream.<br>
- * <p>
+ * </p>
  */
-public class GLWindow implements GLAutoDrawable, Window, NEWTEventConsumer, FPSCounter {
+public class GLWindow extends GLAutoDrawableBase implements GLAutoDrawable, Window, NEWTEventConsumer, FPSCounter {
     private final WindowImpl window;
 
     /**
      * Constructor. Do not call this directly -- use {@link #create()} instead.
      */
     protected GLWindow(Window window) {
-        resetFPSCounter();
+        super(null, null, false);
         this.window = (WindowImpl) window;
-        ((WindowImpl)this.window).setHandleDestroyNotify(false);
+        this.window.setHandleDestroyNotify(false);
         window.addWindowListener(new WindowAdapter() {
                 @Override
                 public void windowRepaint(WindowUpdateEvent e) {
-                    if( !GLWindow.this.window.isWindowLockedByOtherThread() && !GLWindow.this.helper.isAnimatorAnimating() ) {
-                        display();
-                    }
+                    defaultWindowRepaintOp();
                 }
 
                 @Override
                 public void windowResized(WindowEvent e) {
-                    sendReshape = true;
-                    if( !GLWindow.this.window.isWindowLockedByOtherThread() && !GLWindow.this.helper.isAnimatorAnimating() ) {
-                        display();
-                    }
+                    defaultWindowResizedOp();
                 }
 
                 @Override
                 public void windowDestroyNotify(WindowEvent e) {
-                    if( WindowClosingMode.DISPOSE_ON_CLOSE == GLWindow.this.getDefaultCloseOperation() ) {
-                        // Is an animator thread perform rendering?
-                        if (GLWindow.this.helper.isExternalAnimatorRunning()) {
-                            // Pause animations before initiating safe destroy.
-                            GLAnimatorControl ctrl = GLWindow.this.helper.getAnimator();
-                            boolean isPaused = ctrl.pause();
-                            destroy();
-                            if(isPaused) {
-                                ctrl.resume();
-                            }
-                        } else if (GLWindow.this.window.isWindowLockedByOtherThread()) {
-                            // Window is locked by another thread
-                            // Flag that destroy should be performed on the next
-                            // attempt to display.
-                            sendDestroy = true;
-                        } else {
-                            // Without an external thread animating or locking the
-                            // surface, we are safe.
-                            destroy ();
-                        }
-                    }
+                    defaultWindowDestroyNotifyOp();
                 }
             });
         this.window.setLifecycleHook(new GLLifecycleHook());
     }
 
+    @Override
+    public final Object getUpstreamWidget() {
+        return window;
+    }
+    
     /**
-     * Creates a new GLWindow attaching a new Window referencing a 
+     * Creates a new GLWindow attaching a new Window referencing a
      * new default Screen and default Display with the given GLCapabilities.
      * <p>
      * The lifecycle of this Window's Screen and Display is handled via {@link Screen#addReference()}
      * and {@link Screen#removeReference()}.
      * </p>
-     * The default Display will be reused if already instantiated.  
+     * The default Display will be reused if already instantiated.
      */
     public static GLWindow create(GLCapabilitiesImmutable caps) {
         return new GLWindow(NewtFactory.createWindow(caps));
@@ -145,7 +149,7 @@ public class GLWindow implements GLAutoDrawable, Window, NEWTEventConsumer, FPSC
         return new GLWindow(NewtFactory.createWindow(screen, caps));
     }
 
-    /** 
+    /**
      * Creates a new GLWindow attaching the given window.
      * <p>
      * The lifecycle of this Window's Screen and Display is handled via {@link Screen#addReference()}
@@ -156,13 +160,13 @@ public class GLWindow implements GLAutoDrawable, Window, NEWTEventConsumer, FPSC
         return new GLWindow(window);
     }
 
-    /** 
-     * Creates a new GLWindow attaching a new child Window 
+    /**
+     * Creates a new GLWindow attaching a new child Window
      * of the given <code>parentNativeWindow</code> with the given GLCapabilities.
      * <p>
      * The Display/Screen will be compatible with the <code>parentNativeWindow</code>,
      * or even identical in case it's a Newt Window.
-     * An already instantiated compatible Display will be reused.  
+     * An already instantiated compatible Display will be reused.
      * </p>
      * <p>
      * The lifecycle of this Window's Screen and Display is handled via {@link Screen#addReference()}
@@ -176,10 +180,12 @@ public class GLWindow implements GLAutoDrawable, Window, NEWTEventConsumer, FPSC
     //----------------------------------------------------------------------
     // WindowClosingProtocol implementation
     //
+    @Override
     public WindowClosingMode getDefaultCloseOperation() {
         return window.getDefaultCloseOperation();
     }
 
+    @Override
     public WindowClosingMode setDefaultCloseOperation(WindowClosingMode op) {
         return window.setDefaultCloseOperation(op);
     }
@@ -188,10 +194,12 @@ public class GLWindow implements GLAutoDrawable, Window, NEWTEventConsumer, FPSC
     // Window Access
     //
 
+    @Override
     public CapabilitiesChooser setCapabilitiesChooser(CapabilitiesChooser chooser) {
         return window.setCapabilitiesChooser(chooser);
     }
 
+    @Override
     public final CapabilitiesImmutable getChosenCapabilities() {
         if (drawable == null) {
             return window.getChosenCapabilities();
@@ -200,153 +208,209 @@ public class GLWindow implements GLAutoDrawable, Window, NEWTEventConsumer, FPSC
         return drawable.getChosenGLCapabilities();
     }
 
+    @Override
     public final CapabilitiesImmutable getRequestedCapabilities() {
         return window.getRequestedCapabilities();
     }
 
+    @Override
     public final Window getDelegatedWindow() {
         return window.getDelegatedWindow();
     }
 
+    @Override
     public final NativeWindow getParent() {
         return window.getParent();
     }
 
+    @Override
     public final Screen getScreen() {
         return window.getScreen();
     }
 
+    @Override
     public final void setTitle(String title) {
         window.setTitle(title);
     }
 
+    @Override
     public final String getTitle() {
         return window.getTitle();
     }
 
+    @Override
     public final boolean isPointerVisible() {
         return window.isPointerVisible();
     }
-    
+
+    @Override
     public final void setPointerVisible(boolean mouseVisible) {
-        window.setPointerVisible(mouseVisible);        
+        window.setPointerVisible(mouseVisible);
     }
-    
+
+    @Override
     public final boolean isPointerConfined() {
         return window.isPointerConfined();
     }
-    
+
+    @Override
     public final void confinePointer(boolean grab) {
         window.confinePointer(grab);
     }
-    
+
+    @Override
     public final void setUndecorated(boolean value) {
         window.setUndecorated(value);
     }
 
+    @Override
     public final void warpPointer(int x, int y) {
         window.warpPointer(x, y);
     }
+    @Override
     public final boolean isUndecorated() {
         return window.isUndecorated();
     }
 
+    @Override
     public final void setAlwaysOnTop(boolean value) {
         window.setAlwaysOnTop(value);
     }
-    
+
+    @Override
     public final boolean isAlwaysOnTop() {
         return window.isAlwaysOnTop();
     }
-    
+
+    @Override
     public final void setFocusAction(FocusRunnable focusAction) {
         window.setFocusAction(focusAction);
     }
-    
+
+    @Override
     public void setKeyboardFocusHandler(KeyListener l) {
         window.setKeyboardFocusHandler(l);
     }
-    
+
+    @Override
     public final void requestFocus() {
         window.requestFocus();
     }
 
+    @Override
     public final void requestFocus(boolean wait) {
-        window.requestFocus(wait);        
+        window.requestFocus(wait);
     }
-    
+
+    @Override
     public boolean hasFocus() {
         return window.hasFocus();
     }
 
-    public final InsetsImmutable getInsets() {    
+    @Override
+    public final InsetsImmutable getInsets() {
         return window.getInsets();
     }
+
+    @Override
+    public final int getX() {
+        return window.getX();
+    }
+
+    @Override
+    public final int getY() {
+        return window.getY();
+    }
     
+    @Override
+    public final int getWidth() {
+        return window.getWidth();
+    }
+
+    @Override
+    public final int getHeight() {
+        return window.getHeight();
+    }
+    
+    @Override
     public final void setPosition(int x, int y) {
         window.setPosition(x, y);
     }
-    public void setTopLevelPosition(int x, int y) {        
+    @Override
+    public void setTopLevelPosition(int x, int y) {
         window.setTopLevelPosition(x, y);
     }
 
+    @Override
     public final boolean setFullscreen(boolean fullscreen) {
         return window.setFullscreen(fullscreen);
     }
 
+    @Override
     public final boolean isFullscreen() {
         return window.isFullscreen();
     }
 
+    @Override
     public final boolean isVisible() {
         return window.isVisible();
     }
 
     @Override
     public final String toString() {
-        return "NEWT-GLWindow[ \n\tHelper: " + helper + ", \n\tDrawable: " + drawable + 
+        return "NEWT-GLWindow[ \n\tHelper: " + helper + ", \n\tDrawable: " + drawable +
                ", \n\tContext: " + context + ", \n\tWindow: "+window+ /** ", \n\tFactory: "+factory+ */ "]";
     }
 
+    @Override
     public final ReparentOperation reparentWindow(NativeWindow newParent) {
         return window.reparentWindow(newParent);
     }
 
+    @Override
     public final ReparentOperation reparentWindow(NativeWindow newParent, boolean forceDestroyCreate) {
         return window.reparentWindow(newParent, forceDestroyCreate);
     }
 
+    @Override
     public final boolean removeChild(NativeWindow win) {
         return window.removeChild(win);
     }
 
+    @Override
     public final boolean addChild(NativeWindow win) {
         return window.addChild(win);
     }
-    
+
     //----------------------------------------------------------------------
     // Window.LifecycleHook Implementation
     //
 
+    @Override
     public final void destroy() {
         window.destroy();
     }
 
+    @Override
     public final void setVisible(boolean visible) {
         window.setVisible(visible);
     }
 
+    @Override
     public final void setSize(int width, int height) {
         window.setSize(width, height);
     }
+    @Override
     public void setTopLevelSize(int width, int height) {
-        window.setTopLevelSize(width, height);        
+        window.setTopLevelSize(width, height);
     }
-    
+
+    @Override
     public final boolean isNativeValid() {
         return window.isNativeValid();
     }
 
+    @Override
     public Point getLocationOnScreen(Point storage) {
         return window.getLocationOnScreen(storage);
     }
@@ -354,50 +418,41 @@ public class GLWindow implements GLAutoDrawable, Window, NEWTEventConsumer, FPSC
     // Hide methods here ..
     protected class GLLifecycleHook implements WindowImpl.LifecycleHook {
 
+        @Override
         public synchronized void destroyActionPreLock() {
             // nop
         }
 
+        @Override
         public synchronized void destroyActionInLock() {
             if(Window.DEBUG_IMPLEMENTATION) {
-                String msg = "GLWindow.destroy() "+Thread.currentThread()+", start";
+                String msg = "GLWindow.destroy() "+WindowImpl.getThreadName()+", start";
                 System.err.println(msg);
                 //Exception e1 = new Exception(msg);
                 //e1.printStackTrace();
             }
 
-            if( window.isNativeValid() && null != drawable && drawable.isRealized() ) {
-                if( null != context && context.isCreated() ) {
-                    // Catch dispose GLExceptions by GLEventListener, just 'print' them
-                    // so we can continue with the destruction.
-                    try {
-                        helper.disposeGL(GLWindow.this, drawable, context, null);
-                    } catch (GLException gle) {
-                        gle.printStackTrace();
-                    }
-                }
-                drawable.setRealized(false);
-            }
-            context = null;
-            drawable = null;
-            
+            destroyImplInLock();
+
             if(Window.DEBUG_IMPLEMENTATION) {
-                System.err.println("GLWindow.destroy() "+Thread.currentThread()+", fin");
+                System.err.println("GLWindow.destroy() "+WindowImpl.getThreadName()+", fin");
             }
         }
 
+        @Override
         public synchronized void resetCounter() {
             if(Window.DEBUG_IMPLEMENTATION) {
-                System.err.println("GLWindow.resetCounter() "+Thread.currentThread());
+                System.err.println("GLWindow.resetCounter() "+WindowImpl.getThreadName());
             }
             GLWindow.this.resetFPSCounter();
         }
 
+        @Override
         public synchronized void setVisibleActionPost(boolean visible, boolean nativeWindowCreated) {
             long t0;
             if(Window.DEBUG_IMPLEMENTATION) {
                 t0 = System.nanoTime();
-                System.err.println("GLWindow.setVisibleActionPost("+visible+", "+nativeWindowCreated+") "+Thread.currentThread()+", start");
+                System.err.println("GLWindow.setVisibleActionPost("+visible+", "+nativeWindowCreated+") "+WindowImpl.getThreadName()+", start");
             } else {
                 t0 = 0;
             }
@@ -417,19 +472,20 @@ public class GLWindow implements GLAutoDrawable, Window, NEWTEventConsumer, FPSC
                     factory = GLDrawableFactory.getFactory(glCaps.getGLProfile());
                 }
                 if(null==drawable) {
-                    drawable = factory.createGLDrawable(nw);
+                    drawable = (GLDrawableImpl) factory.createGLDrawable(nw);
                 }
                 drawable.setRealized(true);
-                context = drawable.createContext(sharedContext);
-                context.setContextCreationFlags(additionalCtxCreationFlags);                
+                context = (GLContextImpl) drawable.createContext(sharedContext);
+                context.setContextCreationFlags(additionalCtxCreationFlags);
             }
             if(Window.DEBUG_IMPLEMENTATION) {
-                System.err.println("GLWindow.setVisibleActionPost("+visible+", "+nativeWindowCreated+") "+Thread.currentThread()+", fin: dt "+ (System.nanoTime()-t0)/1e6 +"ms");
+                System.err.println("GLWindow.setVisibleActionPost("+visible+", "+nativeWindowCreated+") "+WindowImpl.getThreadName()+", fin: dt "+ (System.nanoTime()-t0)/1e6 +"ms");
             }
         }
-        
+
         private GLAnimatorControl savedAnimator = null;
-        
+
+        @Override
         public synchronized boolean pauseRenderingAction() {
             boolean animatorPaused = false;
             savedAnimator = GLWindow.this.getAnimator();
@@ -439,6 +495,7 @@ public class GLWindow implements GLAutoDrawable, Window, NEWTEventConsumer, FPSC
             return animatorPaused;
         }
 
+        @Override
         public synchronized void resumeRenderingAction() {
             if ( null != savedAnimator && savedAnimator.isPaused() ) {
                 savedAnimator.resume();
@@ -451,20 +508,12 @@ public class GLWindow implements GLAutoDrawable, Window, NEWTEventConsumer, FPSC
     //
 
     private GLContext sharedContext = null;
-    private int additionalCtxCreationFlags = 0;
-    private GLDrawableFactory factory;
-    private GLDrawable drawable;
-    private GLContext context;
-    private GLDrawableHelper helper = new GLDrawableHelper();
-    // To make reshape events be sent immediately before a display event
-    private boolean sendReshape=false;
-    private boolean sendDestroy=false;
-    private FPSCounterImpl fpsCounter = new FPSCounterImpl();    
-
-    public GLDrawableFactory getFactory() {
-        return factory;
-    }
 
+    @Override
+    protected final RecursiveLock getLock() {
+        return window.getLock();
+    }
+    
     /**
      * Specifies an {@link javax.media.opengl.GLContext OpenGL context} to share with.<br>
      * At native creation, {@link #setVisible(boolean) setVisible(true)},
@@ -477,264 +526,54 @@ public class GLWindow implements GLAutoDrawable, Window, NEWTEventConsumer, FPSC
         this.sharedContext = sharedContext;
     }
 
-    public void setContext(GLContext newCtx) {
-        context = newCtx;
-        if(null != context) {
-            context.setContextCreationFlags(additionalCtxCreationFlags);
-        }        
-    }
-
-    public GLContext getContext() {
-        return context;
-    }
-
-    public GL getGL() {
-        if (context == null) {
-            return null;
-        }
-        return context.getGL();
-    }
-
-    public GL setGL(GL gl) {
-        if (context != null) {
-            context.setGL(gl);
-            return gl;
-        }
-        return null;
-    }
-
-    public void addGLEventListener(GLEventListener listener) {
-        if(null!=helper) {
-            helper.addGLEventListener(listener);
-        }
-    }
-
-    public void addGLEventListener(int index, GLEventListener listener) {
-        if(null!=helper) {
-            helper.addGLEventListener(index, listener);
-        }
-    }
-
-    public void removeGLEventListener(GLEventListener listener) {
-        if(null!=helper) {
-            helper.removeGLEventListener(listener);
-        }
-    }
-
-    public void setAnimator(GLAnimatorControl animatorControl) {
-        if(null!=helper) {
-            helper.setAnimator(animatorControl);
-        }
-    }
-
-    public GLAnimatorControl getAnimator() {
-        if(null!=helper) {
-            return helper.getAnimator();
-        }
-        return null;
-    }
-
-    public void invoke(boolean wait, GLRunnable glRunnable) {
-        if(null!=helper) {
-            helper.invoke(this, wait, glRunnable);
-        }
-    }
-
+    @Override
     public void display() {
         if( !isNativeValid() || !isVisible() ) { return; }
-        
+
         if(sendDestroy || ( window.hasDeviceChanged() && GLAutoDrawable.SCREEN_CHANGE_ACTION_ENABLED ) ) {
             sendDestroy=false;
             destroy();
             return;
         }
-        
-        if( null == context && 0<getWidth()*getHeight() ) { // TODO: Check memory sync
-            // retry drawable and context creation 
-            setVisible(true);
-        }
-
-        if( null != context ) { // TODO: Check memory sync
-            // surface is locked/unlocked implicit by context's makeCurrent/release 
-            helper.invokeGL(drawable, context, displayAction, initAction);
-        }
-    }
-    
-    public void setAutoSwapBufferMode(boolean enable) {
-        if(null!=helper) {
-            helper.setAutoSwapBufferMode(enable);
-        }
-    }
-
-    public boolean getAutoSwapBufferMode() {
-        if(null!=helper) {
-            return helper.getAutoSwapBufferMode();
-        }
-        return false;
-    }
-    
-    /**
-     * @param t the thread for which context release shall be skipped, usually the animation thread,
-     *          ie. {@link Animator#getThread()}.
-     * @deprecated this is an experimental feature, 
-     *             intended for measuring performance in regards to GL context switch
-     */
-    public void setSkipContextReleaseThread(Thread t) {
-        if(null!=helper) {
-            helper.setSkipContextReleaseThread(t);
-        }
-    }
-
-    /**
-     * @deprecated see {@link #setSkipContextReleaseThread(Thread)} 
-     */
-    public Thread getSkipContextReleaseThread() {
-        if(null!=helper) {
-            return helper.getSkipContextReleaseThread();
-        }
-        return null;
-    }
-    
-    public void swapBuffers() {
-        if(drawable!=null && context != null) {
-            drawable.swapBuffers();
-        }
-    }
 
-    public void setContextCreationFlags(int flags) {
-        additionalCtxCreationFlags = flags;
-    }
-      
-    public int getContextCreationFlags() {
-        return additionalCtxCreationFlags;                
-    }
-        
-    private class InitAction implements Runnable {
-        public final void run() {
-            // Lock: Locked Surface/Window by MakeCurrent/Release
-            helper.init(GLWindow.this);
-            resetFPSCounter();
-        }
-    }
-    private InitAction initAction = new InitAction();
-
-    private class DisplayAction implements Runnable {
-        public final void run() {
-            // Lock: Locked Surface/Window by display _and_ MakeCurrent/Release
-            if (sendReshape) {
-                helper.reshape(GLWindow.this, 0, 0, getWidth(), getHeight());
-                sendReshape = false;
+        final RecursiveLock lock = window.getLock();
+        lock.lock(); // sync: context/drawable could have been recreated/destroyed while animating
+        try {
+            if( null != context ) {
+                // surface is locked/unlocked implicit by context's makeCurrent/release
+                helper.invokeGL(drawable, context, defaultDisplayAction, defaultInitAction);
+            } else if( 0<getWidth()*getHeight() ) {
+                // retry drawable and context creation, will itself issue resize -> display
+                setVisible(true);
             }
-
-            helper.display(GLWindow.this);
-
-            fpsCounter.tickFPS();
+        } finally {
+            lock.unlock();
         }
     }
-    private DisplayAction displayAction = new DisplayAction();
-
-    public final void setUpdateFPSFrames(int frames, PrintStream out) {
-        fpsCounter.setUpdateFPSFrames(frames, out);
-    }
-    
-    public final void resetFPSCounter() {
-        fpsCounter.resetFPSCounter();
-    }
-
-    public final int getUpdateFPSFrames() {
-        return fpsCounter.getUpdateFPSFrames();
-    }
-    
-    public final long getFPSStartTime()   {
-        return fpsCounter.getFPSStartTime();
-    }
-
-    public final long getLastFPSUpdateTime() {
-        return fpsCounter.getLastFPSUpdateTime();
-    }
-
-    public final long getLastFPSPeriod() {
-        return fpsCounter.getLastFPSPeriod();
-    }
-    
-    public final float getLastFPS() {
-        return fpsCounter.getLastFPS();
-    }
-    
-    public final int getTotalFPSFrames() {
-        return fpsCounter.getTotalFPSFrames();
-    }
-
-    public final long getTotalFPSDuration() {
-        return fpsCounter.getTotalFPSDuration();
-    }
-    
-    public final float getTotalFPS() {
-        return fpsCounter.getTotalFPS();
-    }        
 
     //----------------------------------------------------------------------
     // GLDrawable methods
     //
+    private GLDrawableFactory factory;
 
-    public final NativeSurface getNativeSurface() {
-        return null!=drawable ? drawable.getNativeSurface() : null;
-    }
-
-    public final long getHandle() {
-        return null!=drawable ? drawable.getHandle() : 0;
-    }
-
-    public final int getX() {
-        return window.getX();
-    }
-
-    public final int getY() {
-        return window.getY();
-    }
-
-    public final int getWidth() {
-        return window.getWidth();
-    }
-
-    public final int getHeight() {
-        return window.getHeight();
-    }
-
-    //----------------------------------------------------------------------
-    // GLDrawable methods that are not really needed
-    //
-
-    public final GLContext createContext(GLContext shareWith) {
-        return drawable.createContext(shareWith);
+    @Override
+    public final GLDrawableFactory getFactory() {
+        return factory;
     }
 
+    @Override
     public final void setRealized(boolean realized) {
     }
 
-    public final boolean isRealized() {
-        return ( null != drawable ) ? drawable.isRealized() : false;
-    }
-
-    public final GLCapabilitiesImmutable getChosenGLCapabilities() {
-        if (drawable == null) {
-            throw new GLException("No drawable yet");
-        }
-
-        return drawable.getChosenGLCapabilities();
-    }
-
-    public final GLProfile getGLProfile() {
-        if (drawable == null) {
-            throw new GLException("No drawable yet");
-        }
-
-        return drawable.getGLProfile();
+    @Override
+    public final void swapBuffers() throws GLException {
+         defaultSwapBuffers();
     }
-
+    
     //----------------------------------------------------------------------
-    // NEWTEventConsumer 
+    // NEWTEventConsumer
     //
+    @Override
     public boolean consumeEvent(NEWTEvent event) {
         return window.consumeEvent(event);
     }
@@ -742,90 +581,122 @@ public class GLWindow implements GLAutoDrawable, Window, NEWTEventConsumer, FPSC
     //----------------------------------------------------------------------
     // Window completion
     //
+    @Override
     public final void windowRepaint(int x, int y, int width, int height) {
         window.windowRepaint(x, y, width, height);
     }
 
+    @Override
     public final void enqueueEvent(boolean wait, com.jogamp.newt.event.NEWTEvent event) {
         window.enqueueEvent(wait, event);
     }
 
+    @Override
     public final void runOnEDTIfAvail(boolean wait, final Runnable task) {
         window.runOnEDTIfAvail(wait, task);
     }
 
+    @Override
     public final void removeSurfaceUpdatedListener(SurfaceUpdatedListener l) {
         window.removeSurfaceUpdatedListener(l);
     }
 
+    @Override
     public final void addSurfaceUpdatedListener(SurfaceUpdatedListener l) {
         window.addSurfaceUpdatedListener(l);
     }
 
+    @Override
     public final void addSurfaceUpdatedListener(int index, SurfaceUpdatedListener l) throws IndexOutOfBoundsException {
         window.addSurfaceUpdatedListener(index, l);
     }
 
+    @Override
     public void sendWindowEvent(int eventType) {
         window.sendWindowEvent(eventType);
     }
 
+    @Override
     public final WindowListener getWindowListener(int index) {
         return window.getWindowListener(index);
     }
 
+    @Override
     public final WindowListener[] getWindowListeners() {
         return window.getWindowListeners();
     }
 
+    @Override
     public final void removeWindowListener(WindowListener l) {
         window.removeWindowListener(l);
     }
 
+    @Override
     public final void addWindowListener(WindowListener l) {
         window.addWindowListener(l);
     }
 
+    @Override
     public final void addWindowListener(int index, WindowListener l) throws IndexOutOfBoundsException {
         window.addWindowListener(index, l);
     }
 
+    @Override
+    public final void setKeyboardVisible(boolean visible) {
+        window.setKeyboardVisible(visible);
+    }
+
+    @Override
+    public final boolean isKeyboardVisible() {
+        return window.isKeyboardVisible();
+    }
+
+    @Override
     public final void addKeyListener(KeyListener l) {
         window.addKeyListener(l);
     }
 
+    @Override
     public final void addKeyListener(int index, KeyListener l) {
         window.addKeyListener(index, l);
     }
 
+    @Override
     public final void removeKeyListener(KeyListener l) {
         window.removeKeyListener(l);
     }
 
+    @Override
     public final KeyListener getKeyListener(int index) {
         return window.getKeyListener(index);
     }
 
+    @Override
     public final KeyListener[] getKeyListeners() {
         return window.getKeyListeners();
     }
 
+    @Override
     public final void addMouseListener(MouseListener l) {
         window.addMouseListener(l);
     }
 
+    @Override
     public final void addMouseListener(int index, MouseListener l) {
         window.addMouseListener(index, l);
     }
 
+    @Override
     public final void removeMouseListener(MouseListener l) {
         window.removeMouseListener(l);
     }
 
+    @Override
     public final MouseListener getMouseListener(int index) {
         return window.getMouseListener(index);
     }
 
+    @Override
     public final MouseListener[] getMouseListeners() {
         return window.getMouseListeners();
     }
@@ -834,53 +705,60 @@ public class GLWindow implements GLAutoDrawable, Window, NEWTEventConsumer, FPSC
     // NativeWindow completion
     //
 
-    public final int lockSurface() {
+    @Override
+    public final int lockSurface() throws NativeWindowException, RuntimeException {
         return window.lockSurface();
     }
 
-    public final void unlockSurface() throws NativeWindowException {
+    @Override
+    public final void unlockSurface() {
         window.unlockSurface();
     }
 
+    @Override
     public final boolean isSurfaceLockedByOtherThread() {
         return window.isSurfaceLockedByOtherThread();
     }
 
-    public final boolean isSurfaceLocked() {
-        return window.isSurfaceLocked();
-    }
-
+    @Override
     public final Thread getSurfaceLockOwner() {
         return window.getSurfaceLockOwner();
 
     }
 
+    @Override
     public final boolean surfaceSwap() {
         return window.surfaceSwap();
     }
 
+    @Override
     public final long getWindowHandle() {
         return window.getWindowHandle();
 
     }
 
+    @Override
     public final long getSurfaceHandle() {
         return window.getSurfaceHandle();
 
     }
 
+    @Override
     public final AbstractGraphicsConfiguration getGraphicsConfiguration() {
         return window.getGraphicsConfiguration();
     }
 
+    @Override
     public final long getDisplayHandle() {
         return window.getDisplayHandle();
     }
 
+    @Override
     public final int  getScreenIndex() {
         return window.getScreenIndex();
     }
 
+    @Override
     public final void surfaceUpdated(Object updater, NativeSurface ns, long when) {
         window.surfaceUpdated(updater, ns, when);
     }
@@ -893,7 +771,7 @@ public class GLWindow implements GLAutoDrawable, Window, NEWTEventConsumer, FPSC
         System.err.println(GlueGenVersion.getInstance());
         System.err.println(JoglVersion.getInstance());
 
-        System.err.println(JoglVersion.getDefaultOpenGLInfo(null).toString());
+        System.err.println(JoglVersion.getDefaultOpenGLInfo(null, null, true).toString());
 
         final GLProfile glp = GLProfile.getDefault();
         final GLCapabilitiesImmutable caps = new GLCapabilities( glp );
@@ -902,6 +780,7 @@ public class GLWindow implements GLAutoDrawable, Window, NEWTEventConsumer, FPSC
         glWindow.setSize(128, 128);
 
         glWindow.addGLEventListener(new GLEventListener() {
+            @Override
             public void init(GLAutoDrawable drawable) {
                 GL gl = drawable.getGL();
                 System.err.println(JoglVersion.getGLInfo(gl, null));
@@ -909,12 +788,15 @@ public class GLWindow implements GLAutoDrawable, Window, NEWTEventConsumer, FPSC
                 System.err.println("Chosen   : "+drawable.getChosenGLCapabilities());
             }
 
+            @Override
             public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
             }
 
+            @Override
             public void display(GLAutoDrawable drawable) {
             }
 
+            @Override
             public void dispose(GLAutoDrawable drawable) {
             }
         });
diff --git a/src/newt/classes/com/jogamp/newt/swt/NewtCanvasSWT.java b/src/newt/classes/com/jogamp/newt/swt/NewtCanvasSWT.java
new file mode 100644
index 0000000..f45b864
--- /dev/null
+++ b/src/newt/classes/com/jogamp/newt/swt/NewtCanvasSWT.java
@@ -0,0 +1,508 @@
+/**
+ * Copyright 2012 JogAmp Community. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ * 
+ *    1. Redistributions of source code must retain the above copyright notice, this list of
+ *       conditions and the following disclaimer.
+ * 
+ *    2. Redistributions in binary form must reproduce the above copyright notice, this list
+ *       of conditions and the following disclaimer in the documentation and/or other materials
+ *       provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * 
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of JogAmp Community.
+ */
+
+
+package com.jogamp.newt.swt;
+
+import javax.media.nativewindow.AbstractGraphicsConfiguration;
+import javax.media.nativewindow.AbstractGraphicsDevice;
+import javax.media.nativewindow.AbstractGraphicsScreen;
+import javax.media.nativewindow.Capabilities;
+import javax.media.nativewindow.CapabilitiesImmutable;
+import javax.media.nativewindow.GraphicsConfigurationFactory;
+import javax.media.nativewindow.NativeSurface;
+import javax.media.nativewindow.NativeWindow;
+import javax.media.nativewindow.NativeWindowException;
+import javax.media.nativewindow.NativeWindowFactory;
+import javax.media.nativewindow.SurfaceUpdatedListener;
+import javax.media.nativewindow.WindowClosingProtocol;
+import javax.media.nativewindow.util.Insets;
+import javax.media.nativewindow.util.InsetsImmutable;
+import javax.media.nativewindow.util.Point;
+
+import jogamp.nativewindow.macosx.OSXUtil;
+import jogamp.newt.Debug;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ControlAdapter;
+import org.eclipse.swt.events.ControlEvent;
+import org.eclipse.swt.events.PaintEvent;
+import org.eclipse.swt.events.PaintListener;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.widgets.Canvas;
+import org.eclipse.swt.widgets.Composite;
+
+import com.jogamp.nativewindow.swt.SWTAccessor;
+import com.jogamp.newt.Display;
+import com.jogamp.newt.Window;
+import com.jogamp.newt.event.WindowEvent;
+import com.jogamp.newt.util.EDTUtil;
+
+public class NewtCanvasSWT extends Canvas implements WindowClosingProtocol {
+    private static final boolean DEBUG = Debug.debug("Window");
+    private static final boolean isOSX = NativeWindowFactory.TYPE_MACOSX == NativeWindowFactory.getNativeWindowType(false);
+    
+    /** SWT EDTUtil associated w/ parent's SWT Display */
+    private final EDTUtil swtEDTUtil;
+    
+    private final AbstractGraphicsScreen screen;     
+    
+    private WindowClosingMode newtChildCloseOp = WindowClosingMode.DISPOSE_ON_CLOSE;
+    private volatile Rectangle clientArea;
+
+    private volatile SWTNativeWindow nativeWindow;
+    private volatile Window newtChild = null;
+
+    /** 
+     * Creates an instance using {@link #NewtCanvasSWT(Composite, int, Window)} 
+     * on the SWT thread.
+     * 
+     * <p>
+     * Note: The NEWT child {@link Display}'s {@link EDTUtil} is being set to an SWT conform implementation
+     *       via {@link Display#setEDTUtil(EDTUtil)}. 
+     * </p>
+     * 
+     * @param parent the SWT composite
+     * @param style additional styles to SWT#NO_BACKGROUND 
+     * @param child optional preassigned {@link #Window}, maybe null 
+     * @return a new instance
+     */
+    public static NewtCanvasSWT create(final Composite parent, final int style, final Window child) {
+        final NewtCanvasSWT[] res = new NewtCanvasSWT[] { null }; 
+        parent.getDisplay().syncExec( new Runnable() {
+           public void run() {
+               res[0] = new NewtCanvasSWT( parent, style, child);
+           }
+        });
+        return res[0];
+    }
+    
+    /**
+     * Instantiates a NewtCanvas with a NEWT child.
+     * 
+     * <p>
+     * Note: The NEWT child {@link Display}'s {@link EDTUtil} is being set to an SWT conform implementation
+     *       via {@link Display#setEDTUtil(EDTUtil)}. 
+     * </p>
+     * 
+     * @param parent the SWT composite
+     * @param style additional styles to SWT#NO_BACKGROUND 
+     * @param child optional preassigned {@link #Window}, maybe null 
+     */
+    public NewtCanvasSWT(final Composite parent, final int style, Window child) {
+        super(parent, style | SWT.NO_BACKGROUND);
+        
+        swtEDTUtil = new SWTEDTUtil(parent.getDisplay());
+
+        SWTAccessor.setRealized(this, true);
+
+        clientArea = getClientArea();
+
+        final AbstractGraphicsDevice device = SWTAccessor.getDevice(this);
+        screen = SWTAccessor.getScreen(device, 0);
+        nativeWindow = null;
+        
+        if(null != child) {
+            setNEWTChild(child);
+        }
+        
+        /* Register SWT listeners (e.g. PaintListener) to render/resize GL surface. */
+        /* TODO: verify that these do not need to be manually de-registered when destroying the SWT component */
+        addPaintListener(new PaintListener() {
+            @Override
+            public void paintControl(final PaintEvent arg0) {
+                if( null != nativeWindow || validateNative() ) {
+                    if( null !=newtChild ) {
+                        newtChild.windowRepaint(0, 0, clientArea.width, clientArea.height);
+                    }
+                }
+            }
+        });
+
+        addControlListener(new ControlAdapter() {
+            @Override
+            public void controlResized(final ControlEvent arg0) {
+                updateSizeCheck();
+            }
+        });
+    }
+    
+    /** assumes nativeWindow == null ! */
+    protected final boolean validateNative() {
+        if( isDisposed() ) {
+            return false;
+        }
+        updateSizeCheck();
+        final Rectangle nClientArea = clientArea;
+        if(0 == nClientArea.width * nClientArea.height) {
+            return false;
+        }
+        
+        /* Native handle for the control, used to associate with GLContext */
+        final long nativeWindowHandle = SWTAccessor.getWindowHandle(this);
+        final int visualID = SWTAccessor.getNativeVisualID(screen.getDevice(), nativeWindowHandle);
+        final boolean visualIDValid = NativeWindowFactory.isNativeVisualIDValidForProcessing(visualID);
+        if(DEBUG) {
+            System.err.println("NewtCanvasSWT.validateNative() windowHandle 0x"+Long.toHexString(nativeWindowHandle)+", visualID 0x"+Integer.toHexString(visualID)+", valid "+visualIDValid);
+        }        
+        if( visualIDValid ) {
+            /* Get the nativewindow-Graphics Device associated with this control (which is determined by the parent Composite). 
+             * Note: SWT is owner of the native handle, hence no closing operation will be a NOP. */
+            final CapabilitiesImmutable caps = new Capabilities();
+            final GraphicsConfigurationFactory factory = GraphicsConfigurationFactory.getFactory(screen.getDevice(), caps);
+            final AbstractGraphicsConfiguration config = factory.chooseGraphicsConfiguration( caps, caps, null, screen, visualID );
+            if(DEBUG) {
+                System.err.println("NewtCanvasSWT.validateNative() factory: "+factory+", windowHandle 0x"+Long.toHexString(nativeWindowHandle)+", visualID 0x"+Integer.toHexString(visualID)+", chosen config: "+config);
+                // Thread.dumpStack();
+            }        
+            if (null == config) {
+                throw new NativeWindowException("Error choosing GraphicsConfiguration creating window: "+this);
+            }
+
+            nativeWindow = new SWTNativeWindow(config, nativeWindowHandle);
+            reparentWindow( true );
+        }
+
+        return null != nativeWindow;
+    }
+    
+    protected final void updateSizeCheck() {
+        final Rectangle oClientArea = clientArea;
+        final Rectangle nClientArea = getClientArea();
+        if ( nClientArea != null && 
+             ( nClientArea.width != oClientArea.width || nClientArea.height != oClientArea.height )
+           ) {
+            clientArea = nClientArea; // write back new value
+            if( null != newtChild ) {
+                newtChild.setSize(clientArea.width, clientArea.height);
+            }
+        }
+    }
+
+    @Override
+    public void update() {
+        // don't paint background etc .. nop avoids flickering
+    }
+    
+    /**
+     * Destroys this resource:
+     * <ul>
+     *   <li> Make the NEWT Child invisible </li>
+     *   <li> Disconnects the NEWT Child from this Canvas NativeWindow, reparent to NULL </li>
+     *   <li> Issues <code>destroy()</code> on the NEWT Child</li>
+     *   <li> Remove reference to the NEWT Child</li>
+     * </ul>
+     * @see Window#destroy()
+     */
+    @Override
+    public void dispose() {
+        if( null != newtChild ) {
+            if(DEBUG) {
+                System.err.println("NewtCanvasSWT.dispose.0: EDTUtil cur "+newtChild.getScreen().getDisplay().getEDTUtil()+
+                                   ",\n\t"+newtChild);
+            }
+            configureNewtChild(false);
+            newtChild.setVisible(false);
+            newtChild.reparentWindow(null);
+            newtChild.destroy();
+            newtChild = null;
+        }
+        nativeWindow = null;
+        super.dispose();            
+    }
+    
+    /** @return this SWT Canvas NativeWindow representation, may be null in case it has not been realized. */
+    public NativeWindow getNativeWindow() { return nativeWindow; }
+    
+    public WindowClosingMode getDefaultCloseOperation() {
+        return newtChildCloseOp; // FIXME
+    }
+
+    public WindowClosingMode setDefaultCloseOperation(WindowClosingMode op) {
+        return newtChildCloseOp = op; // FIXME
+    }
+
+
+    boolean isParent() {
+        return null!=newtChild ;        
+    }
+
+    boolean isFullscreen() {
+        return null != newtChild && newtChild.isFullscreen();
+    }
+
+    /** 
+     * Sets a new NEWT child, provoking reparenting.
+     * <p>
+     * A previously detached <code>newChild</code> will be released to top-level status
+     * and made invisible. 
+     * </p>
+     * <p>
+     * Note: When switching NEWT child's, detaching the previous first via <code>setNEWTChild(null)</code> 
+     * produced much cleaner visual results. 
+     * </p>
+     * <p>
+     * Note: The NEWT child {@link Display}'s {@link EDTUtil} is being set to an SWT conform implementation
+     *       via {@link Display#setEDTUtil(EDTUtil)}. 
+     * </p>
+     * @return the previous attached newt child.  
+     */
+    public Window setNEWTChild(final Window newChild) {
+        final Window prevChild = newtChild;
+        if(DEBUG) {
+            System.err.println("NewtCanvasSWT.setNEWTChild.0: win "+newtWinHandleToHexString(prevChild)+" -> "+newtWinHandleToHexString(newChild));
+        }
+        // remove old one
+        if(null != newtChild) {
+            reparentWindow( false );
+            newtChild = null;
+        }
+        // add new one, reparent only if ready
+        newtChild = newChild;
+        if(null != nativeWindow && null != newChild) {
+            reparentWindow( true );
+        }
+        return prevChild;        
+    }
+    
+    /** @return the current NEWT child */
+    public Window getNEWTChild() {
+        return newtChild;
+    }
+    
+    @Override
+    public boolean setParent(Composite parent) {
+        return super.setParent(parent);
+    }
+
+    /* package */ void configureNewtChild(boolean attach) {
+
+        if( null != newtChild ) {
+            newtChild.setKeyboardFocusHandler(null);
+            if(attach) {            
+                newtChildCloseOp = newtChild.setDefaultCloseOperation(WindowClosingMode.DO_NOTHING_ON_CLOSE);                
+            } else {
+                newtChild.setFocusAction(null);
+                newtChild.setDefaultCloseOperation(newtChildCloseOp);                
+            }
+        }
+    }
+
+    void reparentWindow(boolean add) {
+        if( null == newtChild ) {
+            return; // nop
+        }
+        if(DEBUG) {
+            System.err.println("NewtCanvasSWT.reparentWindow.0: add="+add+", win "+newtWinHandleToHexString(newtChild)+", EDTUtil: cur "+newtChild.getScreen().getDisplay().getEDTUtil());
+        }
+        
+        newtChild.setFocusAction(null); // no AWT focus traversal ..
+        if(add) {
+            updateSizeCheck();
+            final int w = clientArea.width;
+            final int h = clientArea.height;
+            
+            newtChild.getScreen().getDisplay().setEDTUtil(swtEDTUtil);
+            
+            newtChild.setSize(w, h);
+            newtChild.reparentWindow(nativeWindow);
+            newtChild.setVisible(true);
+            configureNewtChild(true);
+            newtChild.sendWindowEvent(WindowEvent.EVENT_WINDOW_RESIZED); // trigger a resize/relayout to listener
+
+            // force this SWT Canvas to be focus-able, 
+            // since this it is completely covered by the newtChild (z-order).
+            setEnabled(true);
+        } else {
+            configureNewtChild(false);
+            newtChild.setVisible(false);
+            newtChild.reparentWindow(null);
+        }
+        if(DEBUG) {
+            System.err.println("NewtCanvasSWT.reparentWindow.X: add="+add+", win "+newtWinHandleToHexString(newtChild)+", EDTUtil: cur "+newtChild.getScreen().getDisplay().getEDTUtil());
+        }
+    }
+
+    private final void requestFocusNEWTChild() {
+        if( null != newtChild ) {
+            newtChild.setFocusAction(null);
+            newtChild.requestFocus();
+        }
+    }
+    
+    @Override
+    public boolean forceFocus() {
+        final boolean res = NewtCanvasSWT.super.forceFocus();
+        requestFocusNEWTChild();
+        return res;        
+    }
+        
+    private class SWTNativeWindow implements NativeWindow {
+        private final AbstractGraphicsConfiguration config;
+        private final long nativeWindowHandle;
+        private final InsetsImmutable insets; // only required to allow proper client position calculation on OSX
+        
+        public SWTNativeWindow(AbstractGraphicsConfiguration config, long nativeWindowHandle) {
+            this.config = config;
+            this.nativeWindowHandle = nativeWindowHandle;
+            if(isOSX) {
+                this.insets = OSXUtil.GetInsets(nativeWindowHandle);
+            } else {
+                this.insets = new Insets(0, 0, 0, 0);
+            }
+        }
+        
+        @Override
+        public int lockSurface() throws NativeWindowException, RuntimeException {
+            return NativeSurface.LOCK_SUCCESS;
+        }
+
+        @Override
+        public void unlockSurface() { }
+
+        @Override
+        public boolean isSurfaceLockedByOtherThread() {
+            return false;
+        }
+
+        @Override
+        public Thread getSurfaceLockOwner() {
+            return null;
+        }
+
+        @Override
+        public boolean surfaceSwap() {
+            return false;
+        }
+
+        @Override
+        public void addSurfaceUpdatedListener(SurfaceUpdatedListener l) { }
+
+        @Override
+        public void addSurfaceUpdatedListener(int index, SurfaceUpdatedListener l) throws IndexOutOfBoundsException {
+        }
+
+        @Override
+        public void removeSurfaceUpdatedListener(SurfaceUpdatedListener l) { }
+
+        @Override
+        public long getSurfaceHandle() {            
+            return 0;
+        }
+
+        @Override
+        public int getWidth() {
+            return clientArea.width;
+        }
+
+        @Override
+        public int getHeight() {
+            return clientArea.height;
+        }
+
+        @Override
+        public AbstractGraphicsConfiguration getGraphicsConfiguration() {
+            return config;
+        }
+
+        @Override
+        public long getDisplayHandle() {
+            return config.getScreen().getDevice().getHandle();
+        }
+
+        @Override
+        public int getScreenIndex() {
+            return config.getScreen().getIndex();
+        }
+
+        @Override
+        public void surfaceUpdated(Object updater, NativeSurface ns, long when) { }            
+
+        @Override
+        public void destroy() { }
+
+        @Override
+        public NativeWindow getParent() {
+            return null;
+        }
+
+        @Override
+        public long getWindowHandle() {
+            return nativeWindowHandle;
+        }
+
+        @Override
+        public InsetsImmutable getInsets() {
+            return insets;
+        }
+
+        @Override
+        public int getX() {
+            return 0;
+        }
+
+        @Override
+        public int getY() {
+            return 0;
+        }
+
+        @Override
+        public Point getLocationOnScreen(Point point) {
+            if( isOSX ) {
+                final Point los = OSXUtil.GetLocationOnScreen(nativeWindowHandle, false, 0, 0);
+                // top-level position -> client window position
+                los.setX(los.getX() + insets.getLeftWidth());
+                los.setY(los.getY() + insets.getTopHeight());                
+                if(null!=point) {
+                  return point.translate(los);
+                } else {
+                  return los;
+                }
+            } else {
+                // client position on 'normal' windowing systems is 0/0
+                if(null == point) {
+                    point = new Point(0, 0);                    
+                }
+                return point;
+            }
+        }
+
+        @Override
+        public boolean hasFocus() {
+            return isFocusControl();
+        }        
+    };
+
+    static String newtWinHandleToHexString(Window w) {
+        return null != w ? toHexString(w.getWindowHandle()) : "nil";
+    }
+    static String toHexString(long l) {
+        return "0x"+Long.toHexString(l);
+    }
+}
+
diff --git a/src/newt/native/NewtCommon.h b/src/newt/classes/com/jogamp/newt/swt/SWTEDTUtil.java
similarity index 52%
copy from src/newt/native/NewtCommon.h
copy to src/newt/classes/com/jogamp/newt/swt/SWTEDTUtil.java
index f5ca73b..3538caa 100644
--- a/src/newt/native/NewtCommon.h
+++ b/src/newt/classes/com/jogamp/newt/swt/SWTEDTUtil.java
@@ -1,16 +1,16 @@
 /**
- * Copyright 2011 JogAmp Community. All rights reserved.
+ * Copyright 2012 JogAmp Community. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without modification, are
  * permitted provided that the following conditions are met:
- * 
+ *
  *    1. Redistributions of source code must retain the above copyright notice, this list of
  *       conditions and the following disclaimer.
- * 
+ *
  *    2. Redistributions in binary form must reproduce the above copyright notice, this list
  *       of conditions and the following disclaimer in the documentation and/or other materials
  *       provided with the distribution.
- * 
+ *
  * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
@@ -20,61 +20,80 @@
  * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- * 
+ *
  * The views and conclusions contained in the software and documentation are those of the
  * authors and should not be interpreted as representing official policies, either expressed
  * or implied, of JogAmp Community.
  */
+package com.jogamp.newt.swt;
 
-#ifndef NEWT_COMMON_H
-#define NEWT_COMMON_H 1
+import org.eclipse.swt.widgets.Display;
 
-#include <jni.h>
-#include <stdlib.h>
+import com.jogamp.newt.util.EDTUtil;
 
-void NewtCommon_init(JNIEnv *env);
+/**
+ * Simple {@link EDTUtil} implementation utilizing the SWT UI thread
+ * of the given {@link Display}.
+ */
+public class SWTEDTUtil implements EDTUtil {
+    private final Display swtDisplay;
+    
+    public SWTEDTUtil(Display swtDisplay) {
+        this.swtDisplay = swtDisplay;
+    }
+    
+    public final Display getDisplay() {
+        return swtDisplay;
+    }
+    
+    @Override
+    public long getPollPeriod() {
+        return 0;
+    }
 
-jchar* NewtCommon_GetNullTerminatedStringChars(JNIEnv* env, jstring str);
+    @Override
+    public void setPollPeriod(long ms) {
+    }
 
-void NewtCommon_FatalError(JNIEnv *env, const char* msg, ...);
-void NewtCommon_throwNewRuntimeException(JNIEnv *env, const char* msg, ...);
+    @Override
+    public void reset() {
+    }
 
-/**
- *
- * 1) Store jvmHandle and jvmVersion
+    @Override
+    public void start() {
+    }
 
-    JavaVM *jvmHandle = NULL;
-    int jvmVersion = 0;
+    @Override
+    public boolean isCurrentThreadEDT() {
+        return swtDisplay.getThread() == Thread.currentThread();
+    }
 
-    if(0 != (*env)->GetJavaVM(env, &jvmHandle)) {
-        jvmHandle = NULL;
-    } else {
-        jvmVersion = (*env)->GetVersion(env);
+    @Override
+    public boolean isRunning() {
+        return true;
     }
 
- *
- * 2) Use current thread JNIEnv or attach current thread to JVM, generating new JNIEnv
- *
+    @Override
+    public void invokeStop(Runnable finalTask) {
+        swtDisplay.syncExec(finalTask);
+    }
 
-    int shallBeDetached = 0;
-    JNIEnv* env = NewtCommon_GetJNIEnv(jvmHandle, jvmVersion, &shallBeDetached);
-    if(NULL==env) {
-        DBG_PRINT("drawRect: null JNIEnv\n");
-        return;
+    @Override
+    public void invoke(boolean wait, Runnable task) {
+        if(wait) {
+            swtDisplay.syncExec(task);
+        } else {
+            swtDisplay.asyncExec(task);
+        }
     }
-    
- *
- * 3) Use JNIEnv ..
- *
-    .. your JNIEnv code here ..
 
- *
- * 4) Detach thread from JVM, if required
- *
-    if (shallBeDetached) {
-        (*jvmHandle)->DetachCurrentThread(jvmHandle);
+    @Override
+    public void waitUntilIdle() {
+        // all sync ..
     }
- */
-JNIEnv* NewtCommon_GetJNIEnv (JavaVM * jvmHandle, int jvmVersion, int * shallBeDetached);
 
-#endif
+    @Override
+    public void waitUntilStopped() {
+        // all sync ..
+    }
+}
diff --git a/src/newt/classes/jogamp/newt/DefaultEDTUtil.java b/src/newt/classes/jogamp/newt/DefaultEDTUtil.java
index fd757fb..bdbe960 100644
--- a/src/newt/classes/jogamp/newt/DefaultEDTUtil.java
+++ b/src/newt/classes/jogamp/newt/DefaultEDTUtil.java
@@ -340,7 +340,7 @@ public class DefaultEDTUtil implements EDTUtil {
                     }
                 }
                 if(DEBUG) {
-                    System.err.println(getName()+": EDT run() EXIT "+ getName()+", "+error);
+                    System.err.println(getName()+": EDT run() EXIT "+ getName()+", exception: "+error);
                 }
                 if(null!=error) {
                     throw error;
diff --git a/src/newt/classes/jogamp/newt/DisplayImpl.java b/src/newt/classes/jogamp/newt/DisplayImpl.java
index a0bbcc2..b178bb5 100644
--- a/src/newt/classes/jogamp/newt/DisplayImpl.java
+++ b/src/newt/classes/jogamp/newt/DisplayImpl.java
@@ -101,7 +101,9 @@ public abstract class DisplayImpl extends Display {
                 display.hashCode = display.fqname.hashCode();
                 displayList.add(display);
             }
-            display.createEDTUtil();
+            if(null == display.edtUtil) {
+                display.setEDTUtil(null); // device's default if EDT is used, or null        
+            }
             if(DEBUG) {
                 System.err.println("Display.create() NEW: "+display+" "+getThreadName());
             }
@@ -168,15 +170,45 @@ public abstract class DisplayImpl extends Display {
         return true; 
     }
 
-    protected void createEDTUtil() {
+    protected EDTUtil createEDTUtil() {
+        final EDTUtil def;
         if(NewtFactory.useEDT()) {
-            edtUtil = new DefaultEDTUtil(Thread.currentThread().getThreadGroup(), "Display-"+getFQName(), dispatchMessagesRunnable);            
+            def = new DefaultEDTUtil(Thread.currentThread().getThreadGroup(), "Display-"+getFQName(), dispatchMessagesRunnable);            
             if(DEBUG) {
-                System.err.println("Display.createNative("+getFQName()+") Create EDTUtil: "+edtUtil.getClass().getName());
+                System.err.println("Display.createNative("+getFQName()+") Create EDTUtil: "+def.getClass().getName());
             }
+        } else {
+            def = null;
         }
+        return def;
     }
 
+    @Override
+    public EDTUtil setEDTUtil(EDTUtil newEDTUtil) {        
+        if(null == newEDTUtil) {
+            newEDTUtil = createEDTUtil();
+        }
+        if( newEDTUtil == edtUtil ) {
+            if(DEBUG) {
+                System.err.println("Display.setEDTUtil: "+newEDTUtil+" - keep!");
+            }
+            return null; // no change
+        }
+        final EDTUtil oldEDTUtil = edtUtil;
+        if(DEBUG) {
+            System.err.println("Display.setEDTUtil: "+oldEDTUtil+" -> "+newEDTUtil);
+        }
+        if(null != oldEDTUtil) {
+            stopEDT( new Runnable() { public void run() {} } );
+            // ready for restart ..
+            oldEDTUtil.waitUntilStopped();
+            oldEDTUtil.reset();
+        }
+        edtUtil = newEDTUtil;
+        return oldEDTUtil;
+    }
+
+    @Override
     public final EDTUtil getEDTUtil() {
         return edtUtil;
     }
@@ -355,24 +387,39 @@ public abstract class DisplayImpl extends Display {
     DispatchMessagesRunnable dispatchMessagesRunnable = new DispatchMessagesRunnable();
 
     final void dispatchMessage(final NEWTEventTask eventTask) {
-        NEWTEvent event = eventTask.get();
-        if(null == event) {
-            // Ooops ?
-            System.err.println("Warning: event of eventTask is NULL");
-            Thread.dumpStack();
-            return;
-        }
-        Object source = event.getSource();
-        if(source instanceof NEWTEventConsumer) {
-            NEWTEventConsumer consumer = (NEWTEventConsumer) source ;
-            if(!consumer.consumeEvent(event)) {
-                // enqueue for later execution
-                enqueueEvent(false, event);
+        final NEWTEvent event = eventTask.get();
+        try { 
+            if(null == event) {
+                // Ooops ?
+                System.err.println("Warning: event of eventTask is NULL");
+                Thread.dumpStack();
+                return;
+            }
+            final Object source = event.getSource();        
+            if(source instanceof NEWTEventConsumer) {
+                final NEWTEventConsumer consumer = (NEWTEventConsumer) source ;
+                if(!consumer.consumeEvent(event)) {
+                    // enqueue for later execution
+                    enqueueEvent(false, event);
+                }
+            } else {
+                throw new RuntimeException("Event source not NEWT: "+source.getClass().getName()+", "+source);
+            }
+        } catch (Throwable t) {
+            final RuntimeException re;
+            if(t instanceof RuntimeException) {
+                re = (RuntimeException) t;
+            } else {
+                re = new RuntimeException(t);
+            }
+            if( eventTask.isCallerWaiting() ) {
+                // propagate exception to caller
+                eventTask.setException(re);
+            } else {
+                throw re;
             }
-        } else {
-            throw new RuntimeException("Event source not NEWT: "+source.getClass().getName()+", "+source);
         }
-        eventTask.notifyIssuer();        
+        eventTask.notifyCaller();        
     }
     
     public void dispatchMessages() {
@@ -423,8 +470,8 @@ public abstract class DisplayImpl extends Display {
             return;
         }
         
-        Object lock = new Object();
-        NEWTEventTask eTask = new NEWTEventTask(e, wait?lock:null);
+        final Object lock = new Object();
+        final NEWTEventTask eTask = new NEWTEventTask(e, wait?lock:null);
         synchronized(lock) {
             synchronized(eventsLock) {
                 events.add(eTask);
@@ -437,7 +484,10 @@ public abstract class DisplayImpl extends Display {
                 } catch (InterruptedException ie) {
                     throw new RuntimeException(ie);
                 }
-            }
+                if( null != eTask.getException() ) {
+                    throw eTask.getException();
+                }
+            }            
         }
     }
 
diff --git a/src/newt/classes/jogamp/newt/NEWTJNILibLoader.java b/src/newt/classes/jogamp/newt/NEWTJNILibLoader.java
index 2db9d8d..bc0eb75 100644
--- a/src/newt/classes/jogamp/newt/NEWTJNILibLoader.java
+++ b/src/newt/classes/jogamp/newt/NEWTJNILibLoader.java
@@ -42,6 +42,8 @@ package jogamp.newt;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 
+import jogamp.nativewindow.NWJNILibLoader;
+
 import com.jogamp.common.jvm.JNILibLoaderBase;
 import com.jogamp.common.os.Platform;
 import com.jogamp.common.util.cache.TempJarCache;
@@ -54,7 +56,10 @@ public class NEWTJNILibLoader extends JNILibLoaderBase {
         Platform.initSingleton();
         final String libName = "newt";
         if(TempJarCache.isInitialized() && null == TempJarCache.findLibrary(libName)) {
-            addNativeJarLibs(NEWTJNILibLoader.class, "jogl-all", new String[] { "nativewindow", "newt" } );
+           // either: [jogl-all.jar, jogl-all-noawt.jar, jogl-all-mobile.jar] -> jogl-all-natives-<os.and.arch>.jar
+           // or:     nativewindow-core.jar                                   -> nativewindow-natives-<os.and.arch>.jar,
+           //         newt-core.jar                                           -> newt-natives-<os.and.arch>.jar
+           JNILibLoaderBase.addNativeJarLibs(new Class<?>[] { NWJNILibLoader.class, NEWTJNILibLoader.class }, "-all", new String[] { "-noawt", "-mobile", "-core" } );
         }
         loadLibrary(libName, false, NEWTJNILibLoader.class.getClassLoader());
         return null;
diff --git a/src/newt/classes/jogamp/newt/OffscreenWindow.java b/src/newt/classes/jogamp/newt/OffscreenWindow.java
index 050e24b..ba98ca3 100644
--- a/src/newt/classes/jogamp/newt/OffscreenWindow.java
+++ b/src/newt/classes/jogamp/newt/OffscreenWindow.java
@@ -34,15 +34,25 @@
 
 package jogamp.newt;
 
-import javax.media.nativewindow.*;
+import javax.media.nativewindow.AbstractGraphicsConfiguration;
+import javax.media.nativewindow.AbstractGraphicsScreen;
+import javax.media.nativewindow.GraphicsConfigurationFactory;
+import javax.media.nativewindow.MutableSurface;
+import javax.media.nativewindow.NativeWindowException;
+import javax.media.nativewindow.ProxySurface;
+import javax.media.nativewindow.VisualIDHolder;
 import javax.media.nativewindow.util.Insets;
 import javax.media.nativewindow.util.Point;
 
-public class OffscreenWindow extends WindowImpl implements SurfaceChangeable {
+public class OffscreenWindow extends WindowImpl implements MutableSurface {
 
     long surfaceHandle = 0;
-
+    ProxySurface.UpstreamSurfaceHook upstreamHook;
+    ProxySurface dummySurface;
+    
     public OffscreenWindow() {
+        upstreamHook = null;
+        dummySurface = null;
     }
 
     static long nextWindowHandle = 0x100; // start here - a marker
@@ -52,8 +62,19 @@ public class OffscreenWindow extends WindowImpl implements SurfaceChangeable {
             throw new NativeWindowException("Capabilities is onscreen");
         }
         final AbstractGraphicsScreen aScreen = getScreen().getGraphicsScreen();
-        final AbstractGraphicsConfiguration cfg = GraphicsConfigurationFactory.getFactory(aScreen.getDevice()).chooseGraphicsConfiguration(
-                                                         capsRequested, capsRequested, capabilitiesChooser, aScreen);
+        /** Cannot use OpenGL here ..
+        if(capsRequested instanceof GLCapabilitiesImmutable) {
+            final GLCapabilitiesImmutable caps = (GLCapabilitiesImmutable) capsRequested;
+            if(caps.isFBO() && GLContext.isFBOAvailable(aScreen.getDevice(), caps.getGLProfile()) ) {
+                final GLDrawableFactoryImpl factory = (GLDrawableFactoryImpl) GLDrawableFactory.getFactory(caps.getGLProfile());
+                final GLCapabilitiesImmutable dummyCaps = GLGraphicsConfigurationUtil.fixOnscreenGLCapabilities(caps);
+                final ProxySurface dummySurface = factory.createDummySurfaceImpl(aScreen.getDevice(), false, dummyCaps, null, 64, 64);
+                upstreamHook = dummySurface.getUpstreamSurfaceHook();
+                dummySurface.createNotify();
+            }
+        } */
+        final AbstractGraphicsConfiguration cfg = GraphicsConfigurationFactory.getFactory(aScreen.getDevice(), capsRequested).chooseGraphicsConfiguration(
+                                                         capsRequested, capsRequested, capabilitiesChooser, aScreen, VisualIDHolder.VID_UNDEFINED);
         if (null == cfg) {
             throw new NativeWindowException("Error choosing GraphicsConfiguration creating window: "+this);
         }
@@ -68,13 +89,14 @@ public class OffscreenWindow extends WindowImpl implements SurfaceChangeable {
         // nop
     }
 
-    public void surfaceSizeChanged(int width, int height) {
-         sizeChanged(false, width, height, false);
-    }
-    
     @Override
     public synchronized void destroy() {
         super.destroy();
+        if(null != dummySurface) {
+            dummySurface.destroyNotify();
+            dummySurface = null;
+            upstreamHook = null;
+        }
         surfaceHandle = 0;
     }
 
@@ -84,8 +106,12 @@ public class OffscreenWindow extends WindowImpl implements SurfaceChangeable {
 
     @Override
     public long getSurfaceHandle() {
+        if(null != dummySurface) {
+            return dummySurface.getSurfaceHandle();
+            // return upstreamHook.getWidth();
+        }
         return surfaceHandle;
-    }
+    }        
 
     protected void requestFocusImpl(boolean reparented) {
     }
diff --git a/src/newt/classes/jogamp/newt/WindowImpl.java b/src/newt/classes/jogamp/newt/WindowImpl.java
index 074f635..606101a 100644
--- a/src/newt/classes/jogamp/newt/WindowImpl.java
+++ b/src/newt/classes/jogamp/newt/WindowImpl.java
@@ -303,6 +303,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
                     setTitleImpl(title);
                     setPointerVisibleImpl(pointerVisible);
                     confinePointerImpl(pointerConfined);
+                    setKeyboardVisible(keyboardVisible);
                     if(waitForVisible(true, false)) {
                         if(isFullscreen()) {
                             synchronized(fullScreenAction) {
@@ -444,9 +445,14 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
     protected abstract void closeNativeImpl();
 
     /** 
-     * The native implementation must invoke {@link #focusChanged(boolean, boolean)}
-     * to change the focus state, if <code>force == false</code>. 
-     * This may happen asynchronous within {@link #TIMEOUT_NATIVEWINDOW}.
+     * Async request which shall be performed within {@link #TIMEOUT_NATIVEWINDOW}.
+     * <p>
+     * If if <code>force == false</code> the native implementation 
+     * may only request focus if not yet owner.</p>
+     * <p>
+     * {@link #focusChanged(boolean, boolean)} should be called
+     * to notify about the focus traversal. 
+     * </p> 
      * 
      * @param force if true, bypass {@link #focusChanged(boolean, boolean)} and force focus request
      */
@@ -561,10 +567,13 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
     // NativeSurface
     //
 
-    public final int lockSurface() {
-        windowLock.lock();
-        surfaceLock.lock();
-        int res = surfaceLock.getHoldCount() == 1 ? LOCK_SURFACE_NOT_READY : LOCK_SUCCESS; // new lock ?
+    @Override
+    public final int lockSurface() throws NativeWindowException, RuntimeException {
+        final RecursiveLock _wlock = windowLock;
+        final RecursiveLock _slock = surfaceLock;
+        _wlock.lock();
+        _slock.lock();
+        int res = _slock.getHoldCount() == 1 ? LOCK_SURFACE_NOT_READY : LOCK_SUCCESS; // new lock ?
 
         if ( LOCK_SURFACE_NOT_READY == res ) {
             try {
@@ -581,19 +590,22 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
                 }
             } finally {
                 if (LOCK_SURFACE_NOT_READY >= res) {
-                    surfaceLock.unlock();
-                    windowLock.unlock();
+                    _slock.unlock();
+                    _wlock.unlock();
                 }
             }
         }
         return res;
     }
 
+    @Override
     public final void unlockSurface() {
-        surfaceLock.validateLocked();
-        windowLock.validateLocked();
+        final RecursiveLock _slock = surfaceLock;
+        final RecursiveLock _wlock = windowLock;
+        _slock.validateLocked();
+        _wlock.validateLocked();
 
-        if (surfaceLock.getHoldCount() == 1) {
+        if (_slock.getHoldCount() == 1) {
             final AbstractGraphicsDevice adevice = getGraphicsConfiguration().getScreen().getDevice();
             try {
                 unlockSurfaceImpl();
@@ -601,34 +613,24 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
                 adevice.unlock();
             }
         }
-        surfaceLock.unlock();
-        windowLock.unlock();
-    }
-
-    public final boolean isWindowLockedByOtherThread() {
-        return windowLock.isLockedByOtherThread();
-    }
-
-    public final boolean isWindowLocked() {
-        return windowLock.isLocked();
-    }
-
-    public final Thread getWindowLockOwner() {
-        return windowLock.getOwner();
+        _slock.unlock();
+        _wlock.unlock();
     }
 
+    @Override
     public final boolean isSurfaceLockedByOtherThread() {
         return surfaceLock.isLockedByOtherThread();
     }
 
-    public final boolean isSurfaceLocked() {
-        return surfaceLock.isLocked();
-    }
-
+    @Override
     public final Thread getSurfaceLockOwner() {
         return surfaceLock.getOwner();
     }
 
+    public final RecursiveLock getLock() {
+        return windowLock;
+    }
+    
     public long getSurfaceHandle() {
         return windowHandle; // default: return window handle
     }
@@ -666,11 +668,12 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
     public Point getLocationOnScreen(Point storage) {
         if(isNativeValid()) {
             Point d;
-            windowLock.lock();
+            final RecursiveLock _lock = windowLock;
+            _lock.lock();
             try {
                 d = getLocationOnScreenImpl(0, 0);
             } finally {
-                windowLock.unlock();
+                _lock.unlock();
             }
             if(null!=d) {
                 if(null!=storage) {
@@ -713,7 +716,8 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
         boolean nativeWindowCreated = false;
         boolean madeVisible = false;
         
-        windowLock.lock();
+        final RecursiveLock _lock = windowLock;
+        _lock.lock();
         try {
             if(null!=lifecycleHook) {
                 lifecycleHook.resetCounter();
@@ -735,7 +739,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
                     madeVisible = nativeWindowCreated;
                 }
                 // always flag visible, allowing a retry ..
-                WindowImpl.this.visible = true;                
+                WindowImpl.this.visible = true;      
             } else if(WindowImpl.this.visible != visible) {
                 if(isNativeValid()) {
                     setVisibleImpl(visible, getX(), getY(), getWidth(), getHeight());
@@ -762,7 +766,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
                 System.err.println("Window setVisible: END ("+getThreadName()+") "+getX()+"/"+getY()+" "+getWidth()+"x"+getHeight()+", fs "+fullscreen+", windowHandle "+toHexString(windowHandle)+", visible: "+WindowImpl.this.visible+", nativeWindowCreated: "+nativeWindowCreated+", madeVisible: "+madeVisible);
             }
         } finally {
-            windowLock.unlock();
+            _lock.unlock();
         }
         if( nativeWindowCreated || madeVisible ) {
             sendWindowEvent(WindowEvent.EVENT_WINDOW_RESIZED); // trigger a resize/relayout and repaint to listener
@@ -797,7 +801,8 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
 
         public final void run() {
             boolean recreate = false;
-            windowLock.lock();
+            final RecursiveLock _lock = windowLock;
+            _lock.lock();
             try {
                 if ( !isFullscreen() && ( getWidth() != width || getHeight() != height ) ) {
                     recreate = isNativeValid() && !getGraphicsConfiguration().getChosenCapabilities().isOnscreen();
@@ -838,7 +843,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
                 if(recreate) {
                     screen.removeReference(); // bring back ref-count
                 }
-                windowLock.unlock();
+                _lock.unlock();
             }
         }
     }
@@ -859,7 +864,8 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
             if(null!=lifecycleHook) {
                 lifecycleHook.destroyActionPreLock();
             }
-            windowLock.lock();
+            final RecursiveLock _lock = windowLock;
+            _lock.lock();
             try {
                 if(DEBUG_IMPLEMENTATION) {
                     System.err.println("Window DestroyAction() "+getThreadName());
@@ -913,7 +919,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
                 hasFocus = false;
                 parentWindowHandle = 0;
 
-                windowLock.unlock();
+                _lock.unlock();
             }
             if(animatorPaused) {
                 lifecycleHook.resumeRenderingAction();
@@ -998,8 +1004,9 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
             int width = getWidth();
             int height = getHeight();
             boolean wasVisible;
-
-            windowLock.lock();
+            
+            final RecursiveLock _lock = windowLock;
+            _lock.lock();
             try {
                 if(isNativeValid()) {
                     // force recreation if offscreen, since it may become onscreen
@@ -1216,7 +1223,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
                     System.err.println("Window.reparentWindow: END-1 ("+getThreadName()+") windowHandle "+toHexString(windowHandle)+", visible: "+visible+", parentWindowHandle "+toHexString(parentWindowHandle)+", parentWindow "+ Display.hashCodeNullSafe(parentWindow)+" "+x+"/"+y+" "+width+"x"+height);
                 }
             } finally {
-                windowLock.unlock();
+                _lock.unlock();
             }
             if(wasVisible) {
                 switch (operation) {
@@ -1229,6 +1236,8 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
                         // This may run on the new Display/Screen connection, hence a new EDT task
                         runOnEDTIfAvail(true, reparentActionRecreate);
                         break;
+                        
+                    default:
                 }
             }
             if(DEBUG_IMPLEMENTATION) {
@@ -1239,7 +1248,8 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
 
     private class ReparentActionRecreate implements Runnable {
         public final void run() {
-            windowLock.lock();
+            final RecursiveLock _lock = windowLock;
+            _lock.lock();
             try {
                 visible = true;
                 if(DEBUG_IMPLEMENTATION) {
@@ -1247,7 +1257,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
                 }
                 setVisible(true); // native creation
             } finally {
-                windowLock.unlock();
+                _lock.unlock();
             }
         }
     }
@@ -1285,7 +1295,8 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
         }
 
         public final void run() {
-            windowLock.lock();
+            final RecursiveLock _lock = windowLock;
+            _lock.lock();
             try {
                 if(WindowImpl.this.undecorated != undecorated) {
                     // set current state
@@ -1305,7 +1316,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
                     }
                 }
             } finally {
-                windowLock.unlock();
+                _lock.unlock();
             }
             sendWindowEvent(WindowEvent.EVENT_WINDOW_RESIZED); // trigger a resize/relayout and repaint to listener
         }
@@ -1327,7 +1338,8 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
         }
 
         public final void run() {
-            windowLock.lock();
+            final RecursiveLock _lock = windowLock;
+            _lock.lock();
             try {
                 if(WindowImpl.this.alwaysOnTop != alwaysOnTop) {
                     // set current state
@@ -1347,7 +1359,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
                     }
                 }
             } finally {
-                windowLock.unlock();
+                _lock.unlock();
             }
             sendWindowEvent(WindowEvent.EVENT_WINDOW_RESIZED); // trigger a resize/relayout and repaint to listener
         }
@@ -1539,7 +1551,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
                     "\n, ParentWindow "+parentWindow+
                     "\n, ParentWindowHandle "+toHexString(parentWindowHandle)+" ("+(0!=getParentWindowHandle())+")"+
                     "\n, WindowHandle "+toHexString(getWindowHandle())+
-                    "\n, SurfaceHandle "+toHexString(getSurfaceHandle())+ " (lockedExt window "+isWindowLockedByOtherThread()+", surface "+isSurfaceLockedByOtherThread()+")"+
+                    "\n, SurfaceHandle "+toHexString(getSurfaceHandle())+ " (lockedExt window "+windowLock.isLockedByOtherThread()+", surface "+isSurfaceLockedByOtherThread()+")"+
                     "\n, Pos "+getX()+"/"+getY()+" (auto "+autoPosition()+"), size "+getWidth()+"x"+getHeight()+
                     "\n, Visible "+isVisible()+", focus "+hasFocus()+
                     "\n, Undecorated "+undecorated+" ("+isUndecorated()+")"+
@@ -1573,12 +1585,16 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
     }
 
     public void runOnEDTIfAvail(boolean wait, final Runnable task) {
-        Screen scrn = getScreen();
-        if(null==scrn) {
-            throw new RuntimeException("Null screen of inner class: "+this);
+        if(windowLock.isOwner(Thread.currentThread())) {
+            task.run();
+        } else {
+            Screen scrn = getScreen();
+            if(null==scrn) {
+                throw new RuntimeException("Null screen of inner class: "+this);
+            }
+            DisplayImpl d = (DisplayImpl) scrn.getDisplay();
+            d.runOnEDTIfAvail(wait, task);
         }
-        DisplayImpl d = (DisplayImpl) scrn.getDisplay();
-        d.runOnEDTIfAvail(wait, task);
     }
 
     private final Runnable requestFocusAction = new Runnable() {
@@ -1665,7 +1681,8 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
         }
 
         public final void run() {
-            windowLock.lock();
+            final RecursiveLock _lock = windowLock;
+            _lock.lock();
             try {
                 if(DEBUG_IMPLEMENTATION) {
                     System.err.println("Window setPosition: "+getX()+"/"+getY()+" -> "+x+"/"+y+", fs "+fullscreen+", windowHandle "+toHexString(windowHandle));
@@ -1679,7 +1696,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
                     }
                 }
             } finally {
-                windowLock.unlock();
+                _lock.unlock();
             }
         }
     }
@@ -1708,7 +1725,8 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
         public boolean fsOn() { return fullscreen; }
 
         public final void run() {
-            windowLock.lock();
+            final RecursiveLock _lock = windowLock;
+            _lock.lock();
             try {
                 // set current state
                 WindowImpl.this.fullscreen = fullscreen;
@@ -1785,7 +1803,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
                     }
                 }
             } finally {
-                windowLock.unlock();
+                _lock.unlock();
             }
             sendWindowEvent(WindowEvent.EVENT_WINDOW_RESIZED); // trigger a resize/relayout and repaint to listener
         }
@@ -1795,8 +1813,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
     public boolean setFullscreen(boolean fullscreen) {
         synchronized(fullScreenAction) {
             if( fullScreenAction.init(fullscreen) ) {               
-                if(fullScreenAction.fsOn() && 
-                   isOffscreenInstance(WindowImpl.this, parentWindow)) { 
+                if(fullScreenAction.fsOn() && isOffscreenInstance(WindowImpl.this, parentWindow)) { 
                     // enable fullscreen on offscreen instance
                     if(null != parentWindow) {
                         nfs_parent = parentWindow;
@@ -1908,7 +1925,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
             // special repaint treatment
             case WindowEvent.EVENT_WINDOW_REPAINT:
                 // queue repaint event in case window is locked, ie in operation
-                if( isWindowLocked() ) {
+                if( null != windowLock.getOwner() ) {
                     // make sure only one repaint event is queued
                     if(!repaintQueued) {
                         repaintQueued=true;
@@ -1927,7 +1944,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
             // common treatment
             case WindowEvent.EVENT_WINDOW_RESIZED:
                 // queue event in case window is locked, ie in operation
-                if( isWindowLocked() ) {
+                if( null != windowLock.getOwner() ) {
                     final boolean discardTO = QUEUED_EVENT_TO <= System.currentTimeMillis()-e.getWhen();
                     if(DEBUG_IMPLEMENTATION) {
                         System.err.println("Window.consumeEvent: "+Thread.currentThread().getName()+" - queued "+e+", discard-to "+discardTO);
@@ -2182,6 +2199,36 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
         addKeyListener(-1, l);
     }
 
+    public final void setKeyboardVisible(boolean visible) {
+        if(isNativeValid()) {
+            // We don't skip the impl. if it seems that there is no state change,
+            // since we cannot assume the impl. reliably gives us it's current state. 
+            final boolean n = setKeyboardVisibleImpl(visible);
+            if(DEBUG_IMPLEMENTATION || DEBUG_KEY_EVENT) {
+                System.err.println("setKeyboardVisible(native): visible "+keyboardVisible+" -> "+visible +" -> "+n);
+            }
+            keyboardVisible = n;
+        } else {
+            keyboardVisible = visible; // earmark for creation
+        }
+    }
+    public final boolean isKeyboardVisible() {
+        return keyboardVisible;
+    }    
+    protected boolean setKeyboardVisibleImpl(boolean visible) {
+        return false; // nop
+    }
+    /** Triggered by implementation's WM events to update the virtual on-screen keyboard's visibility state. */
+    protected void keyboardVisibilityChanged(boolean visible) {
+        if(keyboardVisible != visible) {
+            if(DEBUG_IMPLEMENTATION || DEBUG_KEY_EVENT) {
+                System.err.println("keyboardVisibilityChanged: "+keyboardVisible+" -> "+visible);
+            }
+            keyboardVisible = visible;
+        }
+    }
+    protected boolean keyboardVisible = false;
+    
     public void addKeyListener(int index, KeyListener l) {
         if(l == null) {
             return;
@@ -2356,8 +2403,8 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
                 enqueueWindowEvent(false, evt);
             }
         }
-    }    
-
+    }
+    
     /** Triggered by implementation's WM events to update the visibility state. */
     protected void visibleChanged(boolean defer, boolean visible) {
         if(this.visible != visible) {
diff --git a/src/newt/classes/jogamp/newt/awt/event/AWTParentWindowAdapter.java b/src/newt/classes/jogamp/newt/awt/event/AWTParentWindowAdapter.java
index ce8ed7c..747e236 100644
--- a/src/newt/classes/jogamp/newt/awt/event/AWTParentWindowAdapter.java
+++ b/src/newt/classes/jogamp/newt/awt/event/AWTParentWindowAdapter.java
@@ -34,6 +34,7 @@ import javax.media.nativewindow.NativeWindow;
 
 import jogamp.newt.driver.DriverUpdatePosition;
 
+import com.jogamp.newt.Window;
 import com.jogamp.newt.event.awt.AWTAdapter;
 import com.jogamp.newt.event.awt.AWTWindowAdapter;
 
@@ -92,19 +93,20 @@ public class AWTParentWindowAdapter
         if(DEBUG_IMPLEMENTATION) {
             System.err.println("AWT: componentResized: "+comp);
         }
-        getNewtWindow().runOnEDTIfAvail(false, new Runnable() {
+        final Window newtWindow = getNewtWindow();
+        newtWindow.runOnEDTIfAvail(false, new Runnable() {
             public void run() {
                 int cw = comp.getWidth();
                 int ch = comp.getHeight();
                 if( 0 < cw * ch ) {
-                    if( getNewtWindow().getWidth() != cw || getNewtWindow().getHeight() != ch ) {
-                        getNewtWindow().setSize(cw, ch);
-                        if(comp.isVisible() != getNewtWindow().isVisible()) {
-                            getNewtWindow().setVisible(comp.isVisible());
+                    if( newtWindow.getWidth() != cw || newtWindow.getHeight() != ch ) {
+                        newtWindow.setSize(cw, ch);
+                        if(comp.isVisible() != newtWindow.isVisible()) {
+                            newtWindow.setVisible(comp.isVisible());
                         }
                     }
-                } else if(getNewtWindow().isVisible()) {
-                    getNewtWindow().setVisible(false);
+                } else if(newtWindow.isVisible()) {
+                    newtWindow.setVisible(false);
                 }
             }});
     }
@@ -113,8 +115,9 @@ public class AWTParentWindowAdapter
         if(DEBUG_IMPLEMENTATION) {
             System.err.println("AWT: componentMoved: "+e);            
         }
-        if(getNewtWindow().getDelegatedWindow() instanceof DriverUpdatePosition) {
-            ((DriverUpdatePosition)getNewtWindow().getDelegatedWindow()).updatePosition();
+        final Window newtWindow = getNewtWindow();
+        if(newtWindow.getDelegatedWindow() instanceof DriverUpdatePosition) {
+            ((DriverUpdatePosition)newtWindow.getDelegatedWindow()).updatePosition();
         }            
     }
 
diff --git a/src/newt/classes/jogamp/newt/driver/android/AndroidDisplay.java b/src/newt/classes/jogamp/newt/driver/android/AndroidDisplay.java
index 3f360f2..0a43c9b 100644
--- a/src/newt/classes/jogamp/newt/driver/android/AndroidDisplay.java
+++ b/src/newt/classes/jogamp/newt/driver/android/AndroidDisplay.java
@@ -32,9 +32,6 @@ import jogamp.newt.*;
 import jogamp.opengl.egl.*;
 
 import javax.media.nativewindow.*;
-import javax.media.opengl.GLException;
-
-import com.jogamp.nativewindow.egl.*;
 
 public class AndroidDisplay extends jogamp.newt.DisplayImpl {
     static {
@@ -55,20 +52,11 @@ public class AndroidDisplay extends jogamp.newt.DisplayImpl {
 
     protected void createNativeImpl() {
         // EGL Device
-        final long eglDisplay = EGLDisplayUtil.eglGetDisplay(EGL.EGL_DEFAULT_DISPLAY);
-        if (eglDisplay == EGL.EGL_NO_DISPLAY) {
-            throw new GLException("Failed to created EGL default display: error 0x"+Integer.toHexString(EGL.eglGetError()));
-        }
-        if (!EGLDisplayUtil.eglInitialize(eglDisplay, null, null)) {
-            throw new GLException("eglInitialize failed eglDisplay 0x"+Long.toHexString(eglDisplay)+", error 0x"+Integer.toHexString(EGL.eglGetError()));
-        }
-        aDevice = new EGLGraphicsDevice(eglDisplay, AbstractGraphicsDevice.DEFAULT_CONNECTION, AbstractGraphicsDevice.DEFAULT_UNIT);        
+        aDevice = EGLDisplayUtil.eglCreateEGLGraphicsDevice(EGL.EGL_DEFAULT_DISPLAY, AbstractGraphicsDevice.DEFAULT_CONNECTION, AbstractGraphicsDevice.DEFAULT_UNIT);
     }
 
     protected void closeNativeImpl() {
-        if (aDevice.getHandle() != EGL.EGL_NO_DISPLAY) {
-            EGLDisplayUtil.eglTerminate(aDevice.getHandle());
-        }
+        aDevice.close();
     }
 
     protected void dispatchMessagesNative() {
diff --git a/src/newt/classes/jogamp/newt/driver/android/AndroidWindow.java b/src/newt/classes/jogamp/newt/driver/android/AndroidWindow.java
index 63d5f70..73192a0 100644
--- a/src/newt/classes/jogamp/newt/driver/android/AndroidWindow.java
+++ b/src/newt/classes/jogamp/newt/driver/android/AndroidWindow.java
@@ -48,10 +48,14 @@ import jogamp.opengl.egl.EGLGraphicsConfigurationFactory;
 
 import android.content.Context;
 import android.graphics.PixelFormat;
+import android.os.Bundle;
+import android.os.IBinder;
+import android.os.ResultReceiver;
 import android.util.Log;
 import android.view.Surface;
 import android.view.SurfaceHolder;
 import android.view.SurfaceHolder.Callback2;
+import android.view.inputmethod.InputMethodManager;
 import android.view.SurfaceView;
 import android.view.View;
 
@@ -317,6 +321,52 @@ public class AndroidWindow extends jogamp.newt.WindowImpl implements Callback2 {
     }
     
     //----------------------------------------------------------------------
+    // Virtual On-Screen Keyboard / SoftInput 
+    //
+    
+    private class KeyboardVisibleReceiver extends ResultReceiver {
+        public KeyboardVisibleReceiver() {
+            super(null);
+        }
+        
+        @Override 
+        public void onReceiveResult(int r, Bundle data) {
+            boolean v = false;
+        
+            switch(r) {
+                case InputMethodManager.RESULT_UNCHANGED_SHOWN:
+                case InputMethodManager.RESULT_SHOWN:
+                    v = true;
+                    break;
+                case InputMethodManager.RESULT_HIDDEN:
+                case InputMethodManager.RESULT_UNCHANGED_HIDDEN:
+                    v = false;
+                    break;            
+            }
+            Log.d(MD.TAG, "keyboardVisible: "+v);
+            keyboardVisibilityChanged(v);
+        }
+    }
+    private KeyboardVisibleReceiver keyboardVisibleReceiver = new KeyboardVisibleReceiver();
+    
+    protected final boolean setKeyboardVisibleImpl(boolean visible) {
+        if(null != androidView) {
+            final InputMethodManager imm = (InputMethodManager) getAndroidView().getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
+            final IBinder winid = getAndroidView().getWindowToken();
+            if(visible) {
+                // Show soft-keyboard:
+                imm.showSoftInput(androidView, 0, keyboardVisibleReceiver);
+            } else {
+                // hide keyboard :
+                imm.hideSoftInputFromWindow(winid, 0, keyboardVisibleReceiver);
+            }
+            return visible;
+        } else {
+            return false; // nop
+        }
+    }
+    
+    //----------------------------------------------------------------------
     // Surface Callbacks 
     //
     
diff --git a/src/newt/classes/jogamp/newt/driver/android/MD.java b/src/newt/classes/jogamp/newt/driver/android/MD.java
index 150dea9..f2f3093 100644
--- a/src/newt/classes/jogamp/newt/driver/android/MD.java
+++ b/src/newt/classes/jogamp/newt/driver/android/MD.java
@@ -43,7 +43,7 @@ public class MD {
               .append(JoglVersion.getInstance()).append(Platform.NEWLINE)
               .append(Platform.NEWLINE);
               
-        JoglVersion.getDefaultOpenGLInfo(sb);
+        JoglVersion.getDefaultOpenGLInfo(null, sb, true);
 
         return sb.toString();       
    }
diff --git a/src/newt/classes/jogamp/newt/driver/awt/AWTCanvas.java b/src/newt/classes/jogamp/newt/driver/awt/AWTCanvas.java
index 5a49dd5..a795004 100644
--- a/src/newt/classes/jogamp/newt/driver/awt/AWTCanvas.java
+++ b/src/newt/classes/jogamp/newt/driver/awt/AWTCanvas.java
@@ -46,6 +46,7 @@ import javax.media.nativewindow.CapabilitiesChooser;
 import javax.media.nativewindow.CapabilitiesImmutable;
 import javax.media.nativewindow.GraphicsConfigurationFactory;
 import javax.media.nativewindow.NativeWindowException;
+import javax.media.nativewindow.VisualIDHolder;
 
 
 import com.jogamp.nativewindow.awt.AWTGraphicsConfiguration;
@@ -53,6 +54,7 @@ import com.jogamp.nativewindow.awt.AWTGraphicsDevice;
 import com.jogamp.nativewindow.awt.AWTGraphicsScreen;
 import com.jogamp.newt.Window;
 
+ at SuppressWarnings("serial")
 public class AWTCanvas extends Canvas {
   private GraphicsDevice device;
   private GraphicsConfiguration chosen;
@@ -252,9 +254,9 @@ public class AWTCanvas extends Canvas {
             AWTGraphicsScreen.createScreenDevice(device, AbstractGraphicsDevice.DEFAULT_UNIT):
             AWTGraphicsScreen.createDefault();
     AWTGraphicsConfiguration config = (AWTGraphicsConfiguration)
-      GraphicsConfigurationFactory.getFactory(AWTGraphicsDevice.class).chooseGraphicsConfiguration(capsChosen,
+      GraphicsConfigurationFactory.getFactory(AWTGraphicsDevice.class, capsChosen.getClass()).chooseGraphicsConfiguration(capsChosen,
                                                                                                    capsRequested,
-                                                                                                   chooser, aScreen);
+                                                                                                   chooser, aScreen, VisualIDHolder.VID_UNDEFINED);
     if (config == null) {
       throw new NativeWindowException("Error: Couldn't fetch AWTGraphicsConfiguration");
     }
diff --git a/src/newt/classes/jogamp/newt/driver/awt/AWTDisplay.java b/src/newt/classes/jogamp/newt/driver/awt/AWTDisplay.java
index 166da5c..65f8b47 100644
--- a/src/newt/classes/jogamp/newt/driver/awt/AWTDisplay.java
+++ b/src/newt/classes/jogamp/newt/driver/awt/AWTDisplay.java
@@ -36,6 +36,7 @@ package jogamp.newt.driver.awt;
 
 import com.jogamp.nativewindow.awt.AWTGraphicsDevice;
 import com.jogamp.newt.NewtFactory;
+import com.jogamp.newt.util.EDTUtil;
 
 import jogamp.newt.DisplayImpl;
 
@@ -54,13 +55,17 @@ public class AWTDisplay extends DisplayImpl {
     protected void closeNativeImpl() { }
 
     @Override
-    protected void createEDTUtil() {
+    protected EDTUtil createEDTUtil() {
+        final EDTUtil def;
         if(NewtFactory.useEDT()) {
-            edtUtil = AWTEDTUtil.getSingleton();
+            def = AWTEDTUtil.getSingleton();
             if(DEBUG) {
-                System.err.println("AWTDisplay.createNative("+getFQName()+") Create EDTUtil: "+edtUtil.getClass().getName());
+                System.err.println("AWTDisplay.createNative("+getFQName()+") Create EDTUtil: "+def.getClass().getName());
             }
+        } else {
+            def = null;
         }
+        return def;
     }
 
     protected void dispatchMessagesNative() { /* nop */ }
diff --git a/src/newt/classes/jogamp/newt/driver/broadcom/egl/Display.java b/src/newt/classes/jogamp/newt/driver/broadcom/egl/Display.java
index f90c62f..e3f50b7 100644
--- a/src/newt/classes/jogamp/newt/driver/broadcom/egl/Display.java
+++ b/src/newt/classes/jogamp/newt/driver/broadcom/egl/Display.java
@@ -61,11 +61,11 @@ public class Display extends jogamp.newt.DisplayImpl {
     }
 
     protected void createNativeImpl() {
-        long handle = CreateDisplay(Screen.fixedWidth, Screen.fixedHeight);
+        final long handle = CreateDisplay(Screen.fixedWidth, Screen.fixedHeight);
         if (handle == EGL.EGL_NO_DISPLAY) {
             throw new NativeWindowException("BC EGL CreateDisplay failed");
         }
-        aDevice = new EGLGraphicsDevice(handle, AbstractGraphicsDevice.DEFAULT_CONNECTION, AbstractGraphicsDevice.DEFAULT_UNIT);
+        aDevice = new EGLGraphicsDevice(EGL.EGL_DEFAULT_DISPLAY, handle, AbstractGraphicsDevice.DEFAULT_CONNECTION, AbstractGraphicsDevice.DEFAULT_UNIT, null);
     }
 
     protected void closeNativeImpl() {
diff --git a/src/newt/classes/jogamp/newt/driver/broadcom/egl/Window.java b/src/newt/classes/jogamp/newt/driver/broadcom/egl/Window.java
index ed1d051..223ad64 100644
--- a/src/newt/classes/jogamp/newt/driver/broadcom/egl/Window.java
+++ b/src/newt/classes/jogamp/newt/driver/broadcom/egl/Window.java
@@ -37,6 +37,7 @@ package jogamp.newt.driver.broadcom.egl;
 import javax.media.nativewindow.AbstractGraphicsConfiguration;
 import javax.media.nativewindow.GraphicsConfigurationFactory;
 import javax.media.nativewindow.NativeWindowException;
+import javax.media.nativewindow.VisualIDHolder;
 import javax.media.nativewindow.util.Insets;
 import javax.media.nativewindow.util.Point;
 import javax.media.opengl.GLCapabilitiesImmutable;
@@ -57,8 +58,8 @@ public class Window extends jogamp.newt.WindowImpl {
         }
         // query a good configuration, however chose the final one by the native queried egl-cfg-id  
         // after creation at {@link #windowCreated(int, int, int)}.
-        final AbstractGraphicsConfiguration cfg = GraphicsConfigurationFactory.getFactory(getScreen().getDisplay().getGraphicsDevice()).chooseGraphicsConfiguration(
-                capsRequested, capsRequested, capabilitiesChooser, getScreen().getGraphicsScreen());
+        final AbstractGraphicsConfiguration cfg = GraphicsConfigurationFactory.getFactory(getScreen().getDisplay().getGraphicsDevice(), capsRequested).chooseGraphicsConfiguration(
+                capsRequested, capsRequested, capabilitiesChooser, getScreen().getGraphicsScreen(), VisualIDHolder.VID_UNDEFINED);
         if (null == cfg) {
             throw new NativeWindowException("Error choosing GraphicsConfiguration creating window: "+this);
         }
diff --git a/src/newt/classes/jogamp/newt/driver/intel/gdl/Window.java b/src/newt/classes/jogamp/newt/driver/intel/gdl/Window.java
index 09e0e30..d5c75ab 100644
--- a/src/newt/classes/jogamp/newt/driver/intel/gdl/Window.java
+++ b/src/newt/classes/jogamp/newt/driver/intel/gdl/Window.java
@@ -54,8 +54,8 @@ public class Window extends jogamp.newt.WindowImpl {
         final AbstractGraphicsScreen aScreen = getScreen().getGraphicsScreen();
         final AbstractGraphicsDevice aDevice = getScreen().getDisplay().getGraphicsDevice();
 
-        final AbstractGraphicsConfiguration cfg = GraphicsConfigurationFactory.getFactory(aDevice).chooseGraphicsConfiguration(
-                capsRequested, capsRequested, capabilitiesChooser, aScreen);
+        final AbstractGraphicsConfiguration cfg = GraphicsConfigurationFactory.getFactory(aDevice, capsRequested).chooseGraphicsConfiguration(
+                capsRequested, capsRequested, capabilitiesChooser, aScreen, VisualIDHolder.VID_UNDEFINED);
         if (null == cfg) {
             throw new NativeWindowException("Error choosing GraphicsConfiguration creating window: "+this);
         }
diff --git a/src/newt/classes/jogamp/newt/driver/kd/KDDisplay.java b/src/newt/classes/jogamp/newt/driver/kd/KDDisplay.java
index 73bbe0b..07b0318 100644
--- a/src/newt/classes/jogamp/newt/driver/kd/KDDisplay.java
+++ b/src/newt/classes/jogamp/newt/driver/kd/KDDisplay.java
@@ -42,8 +42,6 @@ import jogamp.newt.NEWTJNILibLoader;
 import jogamp.opengl.egl.EGL;
 import jogamp.opengl.egl.EGLDisplayUtil;
 
-import com.jogamp.nativewindow.egl.EGLGraphicsDevice;
-
 public class KDDisplay extends DisplayImpl {
 
     static {
@@ -64,20 +62,11 @@ public class KDDisplay extends DisplayImpl {
 
     protected void createNativeImpl() {
         // FIXME: map name to EGL_*_DISPLAY
-        long handle = EGLDisplayUtil.eglGetDisplay(EGL.EGL_DEFAULT_DISPLAY);
-        if (handle == EGL.EGL_NO_DISPLAY) {
-            throw new NativeWindowException("eglGetDisplay failed");
-        }
-        if (!EGLDisplayUtil.eglInitialize(handle, null, null)) {
-            throw new NativeWindowException("eglInitialize failed");
-        }
-        aDevice = new EGLGraphicsDevice(handle, AbstractGraphicsDevice.DEFAULT_CONNECTION, AbstractGraphicsDevice.DEFAULT_UNIT);
+        aDevice = EGLDisplayUtil.eglCreateEGLGraphicsDevice(EGL.EGL_DEFAULT_DISPLAY, AbstractGraphicsDevice.DEFAULT_CONNECTION, AbstractGraphicsDevice.DEFAULT_UNIT);
     }
 
     protected void closeNativeImpl() {
-        if (aDevice.getHandle() != EGL.EGL_NO_DISPLAY) {
-            EGLDisplayUtil.eglTerminate(aDevice.getHandle());
-        }
+        aDevice.close();
     }
 
     protected void dispatchMessagesNative() {
diff --git a/src/newt/classes/jogamp/newt/driver/kd/KDWindow.java b/src/newt/classes/jogamp/newt/driver/kd/KDWindow.java
index d34ffd5..9f9d694 100644
--- a/src/newt/classes/jogamp/newt/driver/kd/KDWindow.java
+++ b/src/newt/classes/jogamp/newt/driver/kd/KDWindow.java
@@ -37,6 +37,8 @@ package jogamp.newt.driver.kd;
 import javax.media.nativewindow.AbstractGraphicsConfiguration;
 import javax.media.nativewindow.GraphicsConfigurationFactory;
 import javax.media.nativewindow.NativeWindowException;
+import javax.media.nativewindow.VisualIDHolder;
+import javax.media.nativewindow.VisualIDHolder.VIDType;
 import javax.media.nativewindow.util.Insets;
 import javax.media.nativewindow.util.Point;
 import javax.media.opengl.GLCapabilitiesImmutable;
@@ -58,19 +60,20 @@ public class KDWindow extends WindowImpl {
         if(0!=getParentWindowHandle()) {
             throw new RuntimeException("Window parenting not supported (yet)");
         }
-        final AbstractGraphicsConfiguration cfg = GraphicsConfigurationFactory.getFactory(getScreen().getDisplay().getGraphicsDevice()).chooseGraphicsConfiguration(
-                capsRequested, capsRequested, capabilitiesChooser, getScreen().getGraphicsScreen());
+        final AbstractGraphicsConfiguration cfg = GraphicsConfigurationFactory.getFactory(getScreen().getDisplay().getGraphicsDevice(), capsRequested).chooseGraphicsConfiguration(
+                capsRequested, capsRequested, capabilitiesChooser, getScreen().getGraphicsScreen(), VisualIDHolder.VID_UNDEFINED);
         if (null == cfg) {
             throw new NativeWindowException("Error choosing GraphicsConfiguration creating window: "+this);
         }
         setGraphicsConfiguration(cfg);
 
         GLCapabilitiesImmutable eglCaps = (GLCapabilitiesImmutable) cfg.getChosenCapabilities();
-        int[] eglAttribs = EGLGraphicsConfiguration.GLCapabilities2AttribList(eglCaps);
+        int eglConfigID = eglCaps.getVisualID(VIDType.EGL_CONFIG);
+        long eglConfig = EGLGraphicsConfiguration.EGLConfigId2EGLConfig(getDisplayHandle(), eglConfigID);
 
-        eglWindowHandle = CreateWindow(getDisplayHandle(), eglAttribs);
+        eglWindowHandle = CreateWindow(getDisplayHandle(), eglConfig);
         if (eglWindowHandle == 0) {
-            throw new NativeWindowException("Error creating egl window: "+cfg);
+            throw new NativeWindowException("Error creating egl window: "+cfg+", eglConfigID "+eglConfigID+", eglConfig 0x"+Long.toHexString(eglConfig));
         }
         setVisible0(eglWindowHandle, false);
         setWindowHandle(RealizeWindow(eglWindowHandle));
@@ -135,7 +138,7 @@ public class KDWindow extends WindowImpl {
     //
 
     protected static native boolean initIDs();
-    private        native long CreateWindow(long displayHandle, int[] attributes);
+    private        native long CreateWindow(long displayHandle, long eglConfig);
     private        native long RealizeWindow(long eglWindowHandle);
     private        native int  CloseWindow(long eglWindowHandle, long userData);
     private        native void setVisible0(long eglWindowHandle, boolean visible);
diff --git a/src/newt/classes/jogamp/newt/driver/macosx/MacWindow.java b/src/newt/classes/jogamp/newt/driver/macosx/MacWindow.java
index b45c60e..27d7a16 100644
--- a/src/newt/classes/jogamp/newt/driver/macosx/MacWindow.java
+++ b/src/newt/classes/jogamp/newt/driver/macosx/MacWindow.java
@@ -38,7 +38,8 @@ import javax.media.nativewindow.AbstractGraphicsConfiguration;
 import javax.media.nativewindow.GraphicsConfigurationFactory;
 import javax.media.nativewindow.NativeWindow;
 import javax.media.nativewindow.NativeWindowException;
-import javax.media.nativewindow.SurfaceChangeable;
+import javax.media.nativewindow.MutableSurface;
+import javax.media.nativewindow.VisualIDHolder;
 import javax.media.nativewindow.util.Insets;
 import javax.media.nativewindow.util.InsetsImmutable;
 import javax.media.nativewindow.util.Point;
@@ -50,7 +51,7 @@ import jogamp.newt.driver.DriverUpdatePosition;
 
 import com.jogamp.newt.event.KeyEvent;
 
-public class MacWindow extends WindowImpl implements SurfaceChangeable, DriverClearFocus, DriverUpdatePosition {
+public class MacWindow extends WindowImpl implements MutableSurface, DriverClearFocus, DriverUpdatePosition {
     
     static {
         MacDisplay.initSingleton();
@@ -61,8 +62,8 @@ public class MacWindow extends WindowImpl implements SurfaceChangeable, DriverCl
     
     @Override
     protected void createNativeImpl() {
-        final AbstractGraphicsConfiguration cfg = GraphicsConfigurationFactory.getFactory(getScreen().getDisplay().getGraphicsDevice()).chooseGraphicsConfiguration(
-                capsRequested, capsRequested, capabilitiesChooser, getScreen().getGraphicsScreen());
+        final AbstractGraphicsConfiguration cfg = GraphicsConfigurationFactory.getFactory(getScreen().getDisplay().getGraphicsDevice(), capsRequested).chooseGraphicsConfiguration(
+                capsRequested, capsRequested, capabilitiesChooser, getScreen().getGraphicsScreen(), VisualIDHolder.VID_UNDEFINED);
         if (null == cfg) {
             throw new NativeWindowException("Error choosing GraphicsConfiguration creating window: "+this);
         }
@@ -104,7 +105,10 @@ public class MacWindow extends WindowImpl implements SurfaceChangeable, DriverCl
     @Override
     protected void unlockSurfaceImpl() {
         if(!isOffscreenInstance) {
-            unlockSurface0(getWindowHandle());
+            final long h = getWindowHandle();
+            if(0 != h) {
+                unlockSurface0(h);
+            }
         }
     }
     
@@ -128,10 +132,6 @@ public class MacWindow extends WindowImpl implements SurfaceChangeable, DriverCl
         }        
     }
 
-    public void surfaceSizeChanged(int width, int height) {
-        sizeChanged(false, width, height, false);
-    }
-    
     @Override
     protected void setTitleImpl(final String title) {
         setTitle0(getWindowHandle(), title);
@@ -150,7 +150,7 @@ public class MacWindow extends WindowImpl implements SurfaceChangeable, DriverCl
             System.err.println("MacWindow: clearFocus() - requestFocusParent, isOffscreenInstance "+isOffscreenInstance);
         }
         if(!isOffscreenInstance) {
-            requestFocusParent0(getWindowHandle());
+            resignFocus0(getWindowHandle());
         } else {
             focusChanged(false, false);
         }
@@ -360,7 +360,6 @@ public class MacWindow extends WindowImpl implements SurfaceChangeable, DriverCl
                 if(recreate && 0==surfaceHandle) {
                     throw new NativeWindowException("Internal Error - recreate, window but no view");
                 }
-                orderOut0(getWindowHandle());
                 close0(getWindowHandle());
                 setWindowHandle(0);
             } else {
@@ -397,7 +396,7 @@ public class MacWindow extends WindowImpl implements SurfaceChangeable, DriverCl
     private native boolean lockSurface0(long window);
     private native void unlockSurface0(long window);
     private native void requestFocus0(long window, boolean force);
-    private native void requestFocusParent0(long window);
+    private native void resignFocus0(long window);
     /** in case of a child window, it actually only issues orderBack(..) */
     private native void orderOut0(long window);
     private native void orderFront0(long window);
diff --git a/src/newt/classes/jogamp/newt/driver/windows/WindowsWindow.java b/src/newt/classes/jogamp/newt/driver/windows/WindowsWindow.java
index a30aa13..6a8c81f 100644
--- a/src/newt/classes/jogamp/newt/driver/windows/WindowsWindow.java
+++ b/src/newt/classes/jogamp/newt/driver/windows/WindowsWindow.java
@@ -41,6 +41,7 @@ import jogamp.newt.WindowImpl;
 import javax.media.nativewindow.AbstractGraphicsConfiguration;
 import javax.media.nativewindow.GraphicsConfigurationFactory;
 import javax.media.nativewindow.NativeWindowException;
+import javax.media.nativewindow.VisualIDHolder;
 import javax.media.nativewindow.util.Insets;
 import javax.media.nativewindow.util.InsetsImmutable;
 import javax.media.nativewindow.util.Point;
@@ -87,12 +88,11 @@ public class WindowsWindow extends WindowImpl {
 
     @Override
     protected void unlockSurfaceImpl() {
-        if (0 == hdc) {
-            throw new InternalError("surface not acquired");
+        if (0 != hdc) {
+            GDI.ReleaseDC(getWindowHandle(), hdc);
+            hdc_old = hdc;
+            hdc=0;
         }
-        GDI.ReleaseDC(getWindowHandle(), hdc);
-        hdc_old = hdc;
-        hdc=0;
     }
 
     @Override
@@ -120,8 +120,8 @@ public class WindowsWindow extends WindowImpl {
     protected void createNativeImpl() {
         final WindowsScreen  screen = (WindowsScreen) getScreen();
         final WindowsDisplay display = (WindowsDisplay) screen.getDisplay();
-        final AbstractGraphicsConfiguration cfg = GraphicsConfigurationFactory.getFactory(display.getGraphicsDevice()).chooseGraphicsConfiguration(
-                capsRequested, capsRequested, capabilitiesChooser, screen.getGraphicsScreen());
+        final AbstractGraphicsConfiguration cfg = GraphicsConfigurationFactory.getFactory(display.getGraphicsDevice(), capsRequested).chooseGraphicsConfiguration(
+                capsRequested, capsRequested, capabilitiesChooser, screen.getGraphicsScreen(), VisualIDHolder.VID_UNDEFINED);
         if (null == cfg) {
             throw new NativeWindowException("Error choosing GraphicsConfiguration creating window: "+this);
         }
@@ -151,8 +151,8 @@ public class WindowsWindow extends WindowImpl {
     }
 
     protected void closeNativeImpl() {
-        if (hdc != 0) {
-            if(windowHandleClose != 0) {
+        if(windowHandleClose != 0) {
+            if (hdc != 0) {
                 try {
                     GDI.ReleaseDC(windowHandleClose, hdc);
                 } catch (Throwable t) {
@@ -162,11 +162,8 @@ public class WindowsWindow extends WindowImpl {
                     }
                 }
             }
-            hdc = 0;
-            hdc_old = 0;
-        }
-        if(windowHandleClose != 0) {
             try {
+                GDI.SetParent(windowHandleClose, 0); // detach first, experience hang w/ SWT parent
                 GDI.DestroyWindow(windowHandleClose);
             } catch (Throwable t) {
                 if(DEBUG_IMPLEMENTATION) {
@@ -177,6 +174,8 @@ public class WindowsWindow extends WindowImpl {
                 windowHandleClose = 0;
             }
         }
+        hdc = 0;
+        hdc_old = 0;
     }
 
     protected boolean reconfigureWindowImpl(int x, int y, int width, int height, int flags) {
diff --git a/src/newt/classes/jogamp/newt/driver/x11/X11Display.java b/src/newt/classes/jogamp/newt/driver/x11/X11Display.java
index 9464b97..8243fcf 100644
--- a/src/newt/classes/jogamp/newt/driver/x11/X11Display.java
+++ b/src/newt/classes/jogamp/newt/driver/x11/X11Display.java
@@ -49,7 +49,7 @@ public class X11Display extends DisplayImpl {
     static {
         NEWTJNILibLoader.loadNEWT();
 
-        if ( !initIDs0() ) {
+        if ( !initIDs0(X11Util.XERROR_STACKDUMP) ) {
             throw new NativeWindowException("Failed to initialize X11Display jmethodIDs");
         }
 
@@ -139,7 +139,7 @@ public class X11Display extends DisplayImpl {
     //----------------------------------------------------------------------
     // Internals only
     //
-    private static native boolean initIDs0();
+    private static native boolean initIDs0(boolean debug);
 
     private native void CompleteDisplay0(long handle);
 
diff --git a/src/newt/classes/jogamp/newt/driver/x11/X11Window.java b/src/newt/classes/jogamp/newt/driver/x11/X11Window.java
index 143b94a..5501f5a 100644
--- a/src/newt/classes/jogamp/newt/driver/x11/X11Window.java
+++ b/src/newt/classes/jogamp/newt/driver/x11/X11Window.java
@@ -63,9 +63,9 @@ public class X11Window extends WindowImpl {
     protected void createNativeImpl() {
         final X11Screen screen = (X11Screen) getScreen();
         final X11Display display = (X11Display) screen.getDisplay();
-        final GraphicsConfigurationFactory factory = GraphicsConfigurationFactory.getFactory(display.getGraphicsDevice());
+        final GraphicsConfigurationFactory factory = GraphicsConfigurationFactory.getFactory(display.getGraphicsDevice(), capsRequested);
         final AbstractGraphicsConfiguration cfg = factory.chooseGraphicsConfiguration(
-                capsRequested, capsRequested, capabilitiesChooser, screen.getGraphicsScreen());
+                capsRequested, capsRequested, capabilitiesChooser, screen.getGraphicsScreen(), VisualIDHolder.VID_UNDEFINED);
         if(DEBUG_IMPLEMENTATION) {
             System.err.println("X11Window.createNativeImpl() factory: "+factory+", chosen config: "+cfg);
         }        
@@ -230,6 +230,9 @@ public class X11Window extends WindowImpl {
     // Internals only
     //
     
+    private static final String getCurrentThreadName() { return Thread.currentThread().getName(); } // Callback for JNI
+    private static final void dumpStack() { Thread.dumpStack(); } // Callback for JNI
+    
     private final long getDisplayEDTHandle() {
         return ((X11Display) getScreen().getDisplay()).getEDTHandle();
     }
diff --git a/src/newt/classes/jogamp/newt/event/NEWTEventTask.java b/src/newt/classes/jogamp/newt/event/NEWTEventTask.java
index fae6560..93d5e2f 100644
--- a/src/newt/classes/jogamp/newt/event/NEWTEventTask.java
+++ b/src/newt/classes/jogamp/newt/event/NEWTEventTask.java
@@ -35,17 +35,22 @@ import com.jogamp.newt.event.NEWTEvent;
  * which notifies after sending the event for the <code>invokeAndWait()</code> semantics.
  */
 public class NEWTEventTask {
-    NEWTEvent event;
-    Object notifyObject;
+    private NEWTEvent event;
+    private Object notifyObject;
+    private RuntimeException exception;
 
     public NEWTEventTask(NEWTEvent event, Object notifyObject) {
         this.event = event ;
         this.notifyObject = notifyObject ;
+        this.exception = null;
     }
 
-    public NEWTEvent get() { return event; }
+    public final NEWTEvent get() { return event; }
+    public final void setException(RuntimeException e) { exception = e; }
+    public final RuntimeException getException() { return exception; }
+    public final boolean isCallerWaiting() { return null != notifyObject; }
 
-    public void notifyIssuer() {
+    public void notifyCaller() {
         if(null != notifyObject) {
             synchronized (notifyObject) {
                 notifyObject.notifyAll();
diff --git a/src/newt/native/KDWindow.c b/src/newt/native/KDWindow.c
index dc99913..5afe6fc 100644
--- a/src/newt/native/KDWindow.c
+++ b/src/newt/native/KDWindow.c
@@ -42,6 +42,7 @@
 #include <gluegen_stdint.h>
 
 #include <KD/kd.h>
+#include <EGL/egl.h>
 
 #include "jogamp_newt_driver_kd_KDWindow.h"
 
@@ -208,11 +209,10 @@ JNIEXPORT jboolean JNICALL Java_jogamp_newt_driver_kd_KDWindow_initIDs
 }
 
 JNIEXPORT jlong JNICALL Java_jogamp_newt_driver_kd_KDWindow_CreateWindow
-  (JNIEnv *env, jobject obj, jlong display, jintArray jAttrs)
+  (JNIEnv *env, jobject obj, jlong display, jlong jeglConfig)
 {
-    jint * attrs = NULL;
-    jsize attrsLen;
     EGLDisplay dpy  = (EGLDisplay)(intptr_t)display;
+    EGLConfig eglConfig = (EGLConfig)(intptr_t)jeglConfig;
     KDWindow *window = 0;
 
     if(dpy==NULL) {
@@ -220,22 +220,9 @@ JNIEXPORT jlong JNICALL Java_jogamp_newt_driver_kd_KDWindow_CreateWindow
         return 0;
     }
 
-    attrsLen = (*env)->GetArrayLength(env, jAttrs);
-    if(0==attrsLen) {
-        fprintf(stderr, "[CreateWindow] attribute array size 0..\n");
-        return 0;
-    }
-    attrs = (*env)->GetIntArrayElements(env, jAttrs, 0);
-    if(NULL==attrs) {
-        fprintf(stderr, "[CreateWindow] attribute array NULL..\n");
-        return 0;
-    }
-
     JOGLKDUserdata * userData = kdMalloc(sizeof(JOGLKDUserdata));
     userData->magic = JOGL_KD_USERDATA_MAGIC;
-    window = kdCreateWindow(dpy, attrs, (void *)userData);
-
-    (*env)->ReleaseIntArrayElements(env, jAttrs, attrs, 0);
+    window = kdCreateWindow(dpy, eglConfig, (void *)userData);
 
     if(NULL==window) {
         kdFree(userData);
diff --git a/src/newt/native/MacWindow.m b/src/newt/native/MacWindow.m
index 01cbd80..bbadc9d 100644
--- a/src/newt/native/MacWindow.m
+++ b/src/newt/native/MacWindow.m
@@ -599,6 +599,15 @@ JNIEXPORT jlong JNICALL Java_jogamp_newt_driver_macosx_MacWindow_createWindow0
     }
     DBG_PRINT( "createWindow0 - is visible.1: %d\n", [myWindow isVisible]);
 
+    // Remove animations for child windows
+    if(NULL != parentWindow) {
+NS_DURING
+        // Available >= 10.7 - Removes default animations
+        [myWindow setAnimationBehavior: NSWindowAnimationBehaviorNone];
+NS_HANDLER
+NS_ENDHANDLER
+    }
+
 #ifdef VERBOSE_ON
     int dbgIdx = 1;
 #endif
@@ -734,7 +743,7 @@ NS_ENDHANDLER
     if(NULL!=pWin) {
         [mWin detachFromParent: pWin];
     }
-    [mWin orderOut: mWin];
+    [mWin performSelectorOnMainThread:@selector(orderOut:) withObject:mWin waitUntilDone:NO];
 
     DBG_PRINT( "windowClose.1 - %p,%d view %p,%d, parent %p\n", 
         mWin, getRetainCount(mWin), mView, getRetainCount(mView), pWin);
@@ -742,11 +751,6 @@ NS_ENDHANDLER
     // Only release window, if release is not yet in process.
     // E.g. destroyNotifySent:=true set by NewtMacWindow::windowWillClose(), i.e. window-close was clicked.
     if(!destroyNotifySent) { 
-        // '[mWin close]' causes a crash at exit.
-        // This probably happens b/c it sends events to the main loop
-        // but our resources are gone ?!
-        // However, issuing a simple release seems to work quite well.
-        // [mWin release];
         [mWin performSelectorOnMainThread:@selector(release) withObject:nil waitUntilDone:NO];
     }
 
@@ -806,11 +810,8 @@ JNIEXPORT void JNICALL Java_jogamp_newt_driver_macosx_MacWindow_requestFocus0
     DBG_PRINT( "requestFocus - window: %p, force %d, hasFocus %d (START)\n", mWin, force, hasFocus);
 
     [mWin makeFirstResponder: nil];
-    [mWin performSelectorOnMainThread:@selector(orderFrontRegardless) withObject:nil waitUntilDone:YES];
-    [mWin performSelectorOnMainThread:@selector(makeKeyWindow) withObject:nil waitUntilDone:YES];
-    // This will occasionally cause a free of non allocated object crash:
-    // [mWin orderFrontRegardless];
-    // [mWin makeKeyWindow];
+    [mWin performSelectorOnMainThread:@selector(orderFrontRegardless) withObject:nil waitUntilDone:NO];
+    [mWin performSelectorOnMainThread:@selector(makeKeyWindow) withObject:nil waitUntilDone:NO];
 
     DBG_PRINT( "requestFocus - window: %p, force %d (END)\n", mWin, force);
 
@@ -819,26 +820,27 @@ JNIEXPORT void JNICALL Java_jogamp_newt_driver_macosx_MacWindow_requestFocus0
 
 /*
  * Class:     jogamp_newt_driver_macosx_MacWindow
- * Method:    requestFocusParent0
+ * Method:    resignFocus0
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_jogamp_newt_driver_macosx_MacWindow_requestFocusParent0
+JNIEXPORT void JNICALL Java_jogamp_newt_driver_macosx_MacWindow_resignFocus0
   (JNIEnv *env, jobject window, jlong w)
 {
     NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
     NSWindow* mWin = (NSWindow*) ((intptr_t) w);
     NSWindow* pWin = [mWin parentWindow];
-#ifdef VERBOSE_ON
     BOOL hasFocus = [mWin isKeyWindow];
-#endif
 
-    DBG_PRINT( "requestFocusParent0 - window: %p, parent: %p, hasFocus %d (START)\n", mWin, pWin, hasFocus );
-    if(NULL != pWin) {
-        [pWin performSelectorOnMainThread:@selector(makeKeyWindow) withObject:nil waitUntilDone:YES];
-        // This will occasionally cause a free of non allocated object crash:
-        // [pWin makeKeyWindow];
+    DBG_PRINT( "requestFocusParent0 - window: %p, parent %p, hasFocus %d (START)\n", mWin, pWin, hasFocus );
+    if( hasFocus ) {
+        if(NULL != pWin) {
+            // [mWin performSelectorOnMainThread:@selector(makeFirstResponder:) withObject:pWin waitUntilDone:NO];
+            [pWin performSelectorOnMainThread:@selector(makeKeyWindow) withObject:nil waitUntilDone:NO];
+        } else {
+            [mWin performSelectorOnMainThread:@selector(resignKeyWindow) withObject:nil waitUntilDone:NO];
+        }
     }
-    DBG_PRINT( "requestFocusParent0 - window: %p, parent: %p (END)\n", mWin, pWin);
+    DBG_PRINT( "requestFocusParent0 - window: %p (END)\n", mWin);
 
     [pool release];
 }
@@ -856,9 +858,7 @@ JNIEXPORT void JNICALL Java_jogamp_newt_driver_macosx_MacWindow_orderFront0
 
     DBG_PRINT( "orderFront0 - window: %p (START)\n", win);
 
-    [win performSelectorOnMainThread:@selector(orderFrontRegardless) withObject:nil waitUntilDone:YES];
-    // This will occasionally cause a free of non allocated object crash:
-    // [win orderFrontRegardless];
+    [win performSelectorOnMainThread:@selector(orderFrontRegardless) withObject:nil waitUntilDone:NO];
 
     DBG_PRINT( "orderFront0 - window: %p (END)\n", win);
 
@@ -880,13 +880,9 @@ JNIEXPORT void JNICALL Java_jogamp_newt_driver_macosx_MacWindow_orderOut0
     DBG_PRINT( "orderOut0 - window: (parent %p) %p (START)\n", pWin, mWin);
 
     if(NULL == pWin) {
-        [mWin performSelectorOnMainThread:@selector(orderOut:) withObject:mWin waitUntilDone:YES];
-        // This will occasionally cause a free of non allocated object crash:
-        // [mWin orderOut: mWin];
+        [mWin performSelectorOnMainThread:@selector(orderOut:) withObject:mWin waitUntilDone:NO];
     } else {
-        [mWin performSelectorOnMainThread:@selector(orderBack:) withObject:mWin waitUntilDone:YES];
-        // This will occasionally cause a free of non allocated object crash:
-        // [mWin orderBack: mWin];
+        [mWin performSelectorOnMainThread:@selector(orderBack:) withObject:mWin waitUntilDone:NO];
     }
 
     DBG_PRINT( "orderOut0 - window: (parent %p) %p (END)\n", pWin, mWin);
diff --git a/src/newt/native/NewtCommon.c b/src/newt/native/NewtCommon.c
index 3713cfd..7f070e7 100644
--- a/src/newt/native/NewtCommon.c
+++ b/src/newt/native/NewtCommon.c
@@ -1,5 +1,6 @@
 
 #include "NewtCommon.h"
+#include <string.h>
 
 static const char * const ClazzNameRuntimeException = "java/lang/RuntimeException";
 static jclass    runtimeExceptionClz=NULL;
@@ -43,6 +44,24 @@ void NewtCommon_init(JNIEnv *env) {
     }
 }
 
+const char * NewtCommon_GetStaticStringMethod(JNIEnv *jniEnv, jclass clazz, jmethodID jGetStrID, char *dest, int destSize, const char *altText) {
+    if(NULL != jniEnv && NULL != clazz && NULL != jGetStrID) {
+        jstring jstr = (jstring) (*jniEnv)->CallStaticObjectMethod(jniEnv, clazz, jGetStrID);
+        if(NULL != jstr) {
+            const char * str = (*jniEnv)->GetStringUTFChars(jniEnv, jstr, NULL);
+            if( NULL != str) {
+                strncpy(dest, str, destSize-1);
+                dest[destSize-1] = 0; // EOS
+                (*jniEnv)->ReleaseStringUTFChars(jniEnv, jstr, str);
+                return dest;
+            }
+        }
+    }
+    strncpy(dest, altText, destSize-1);
+    dest[destSize-1] = 0; // EOS
+    return dest;
+}
+
 jchar* NewtCommon_GetNullTerminatedStringChars(JNIEnv* env, jstring str)
 {
     jchar* strChars = NULL;
diff --git a/src/newt/native/NewtCommon.h b/src/newt/native/NewtCommon.h
index f5ca73b..9a4e5ac 100644
--- a/src/newt/native/NewtCommon.h
+++ b/src/newt/native/NewtCommon.h
@@ -34,6 +34,7 @@
 
 void NewtCommon_init(JNIEnv *env);
 
+const char * NewtCommon_GetStaticStringMethod(JNIEnv *jniEnv, jclass clazz, jmethodID jGetStrID, char *dest, int destSize, const char *altText);
 jchar* NewtCommon_GetNullTerminatedStringChars(JNIEnv* env, jstring str);
 
 void NewtCommon_FatalError(JNIEnv *env, const char* msg, ...);
diff --git a/src/newt/native/NewtMacWindow.m b/src/newt/native/NewtMacWindow.m
index f914467..b58b99e 100644
--- a/src/newt/native/NewtMacWindow.m
+++ b/src/newt/native/NewtMacWindow.m
@@ -972,7 +972,7 @@ static jint mods2JavaMods(NSUInteger mods)
 
     NSView* nsview = [self contentView];
     if( ! [nsview isMemberOfClass:[NewtView class]] ) {
-        return;
+        return NO;
     }
     NewtView* view = (NewtView *) nsview;
 
@@ -981,14 +981,14 @@ static jint mods2JavaMods(NSUInteger mods)
         DBG_PRINT( "*************** windowWillClose.0: %p\n", (void *)(intptr_t)javaWindowObject);
         if (javaWindowObject == NULL) {
             DBG_PRINT("windowWillClose: null javaWindowObject\n");
-            return;
+            return NO;
         }
         int shallBeDetached = 0;
         JavaVM *jvmHandle = [view getJVMHandle];
         JNIEnv* env = NewtCommon_GetJNIEnv(jvmHandle, [view getJVMVersion], &shallBeDetached);
         if(NULL==env) {
             DBG_PRINT("windowWillClose: null JNIEnv\n");
-            return;
+            return NO;
         }
 
         [view setDestroyNotifySent: true]; // earmark assumption of being closed
diff --git a/src/newt/native/X11Common.h b/src/newt/native/X11Common.h
index cefef69..982255b 100644
--- a/src/newt/native/X11Common.h
+++ b/src/newt/native/X11Common.h
@@ -70,9 +70,9 @@ extern jclass X11NewtWindowClazz;
 extern jmethodID insetsChangedID;
 extern jmethodID visibleChangedID;
 
+void NewtDisplay_x11ErrorHandlerEnable(JNIEnv * env, Display *dpy, int onoff, int quiet, int sync);
 jobject getJavaWindowProperty(JNIEnv *env, Display *dpy, Window window, jlong javaObjectAtom, Bool showWarning);
 
-void NewtDisplay_displayDispatchErrorHandlerEnable(int onoff, JNIEnv * env);
 Status NewtWindows_getRootAndParent (Display *dpy, Window w, Window * root_return, Window * parent_return);
 Status NewtWindows_updateInsets(JNIEnv *env, jobject jwindow, Display *dpy, Window window, int *left, int *right, int *top, int *bottom);
 
diff --git a/src/newt/native/X11Display.c b/src/newt/native/X11Display.c
index 88ac0df..ce7d9a0 100644
--- a/src/newt/native/X11Display.c
+++ b/src/newt/native/X11Display.c
@@ -38,6 +38,8 @@ static const char * const ClazzNameX11NewtWindow = "jogamp/newt/driver/x11/X11Wi
 
 static jmethodID displayCompletedID = NULL;
 
+static jmethodID getCurrentThreadNameID = NULL;
+static jmethodID dumpStackID = NULL;
 static jmethodID sizeChangedID = NULL;
 static jmethodID positionChangedID = NULL;
 static jmethodID focusChangedID = NULL;
@@ -61,32 +63,51 @@ static void setupJVMVars(JNIEnv * env) {
 }
 
 static XErrorHandler origErrorHandler = NULL ;
+static int errorHandlerQuiet = 0 ;
+static int errorHandlerDebug = 0 ;
+static int errorHandlerThrowException = 0;
 
-static int displayDispatchErrorHandler(Display *dpy, XErrorEvent *e)
+static int x11ErrorHandler(Display *dpy, XErrorEvent *e)
 {
-    fprintf(stderr, "Warning: NEWT X11 Error: DisplayDispatch %p, Code 0x%X, errno %s\n", dpy, e->error_code, strerror(errno));
-    
-    if (e->error_code == BadAtom) {
-        fprintf(stderr, "         BadAtom (%p): Atom probably already removed\n", (void*)e->resourceid);
-    } else if (e->error_code == BadWindow) {
-        fprintf(stderr, "         BadWindow (%p): Window probably already removed\n", (void*)e->resourceid);
-    } else {
+    if(!errorHandlerQuiet) {
+        const char * errnoStr = strerror(errno);
+        char threadName[80];
+        char errCodeStr[80];
+        char reqCodeStr[80];
+
         int shallBeDetached = 0;
-        JNIEnv *jniEnv = NULL;
-        const char * errStr = strerror(errno);
+        JNIEnv *jniEnv = NewtCommon_GetJNIEnv(jvmHandle, jvmVersion, &shallBeDetached);
 
-        fprintf(stderr, "Info: NEWT X11 Error: Display %p, Code 0x%X, errno %s\n", dpy, e->error_code, errStr);
+        (void) NewtCommon_GetStaticStringMethod(jniEnv, X11NewtWindowClazz, getCurrentThreadNameID, threadName, sizeof(threadName), "n/a");
+        snprintf(errCodeStr, sizeof(errCodeStr), "%d", e->request_code);
+        XGetErrorDatabaseText(dpy, "XRequest", errCodeStr, "Unknown", reqCodeStr, sizeof(reqCodeStr));
+        XGetErrorText(dpy, e->error_code, errCodeStr, sizeof(errCodeStr));
 
-        jniEnv = NewtCommon_GetJNIEnv(jvmHandle, jvmVersion, &shallBeDetached);
-        if(NULL==jniEnv) {
-            fprintf(stderr, "NEWT X11 Error: null JNIEnv");
-            return;
+        fprintf(stderr, "Info: Newt X11 Error (Thread: %s): %d - %s, dpy %p, id %x, # %d: %d:%d %s\n",
+            threadName, e->error_code, errCodeStr, e->display, (int)e->resourceid, (int)e->serial,
+            (int)e->request_code, (int)e->minor_code, reqCodeStr);
+
+        if( errorHandlerDebug ) {
+            (*jniEnv)->CallStaticVoidMethod(jniEnv, X11NewtWindowClazz, dumpStackID);
         }
 
-        NewtCommon_throwNewRuntimeException(jniEnv, "Info: NEWT X11 Error: Display %p, Code 0x%X, errno %s", 
-                                            dpy, e->error_code, errStr);
+        if(errorHandlerThrowException) {
+            if(NULL != jniEnv) {
+                NewtCommon_throwNewRuntimeException(jniEnv, "Newt X11 Error (Thread: %s): %d - %s, dpy %p, id %x, # %d: %d:%d %s\n",
+                                                    threadName, e->error_code, errCodeStr, e->display, (int)e->resourceid, (int)e->serial,
+                                                    (int)e->request_code, (int)e->minor_code, reqCodeStr);
+            } else {
+                fprintf(stderr, "Nativewindow X11 Error: null JNIEnv");
+                #if 0
+                    if(NULL!=origErrorHandler) {
+                        origErrorHandler(dpy, e);
+                    }
+                #endif
+            }
+        }
+        fflush(stderr);
 
-        if (shallBeDetached) {
+        if (NULL != jniEnv && shallBeDetached) {
             (*jvmHandle)->DetachCurrentThread(jvmHandle);
         }
     }
@@ -94,14 +115,21 @@ static int displayDispatchErrorHandler(Display *dpy, XErrorEvent *e)
     return 0;
 }
 
-void NewtDisplay_displayDispatchErrorHandlerEnable(int onoff, JNIEnv * env) {
+void NewtDisplay_x11ErrorHandlerEnable(JNIEnv * env, Display *dpy, int onoff, int quiet, int sync) {
+    errorHandlerQuiet = quiet;
     if(onoff) {
         if(NULL==origErrorHandler) {
             setupJVMVars(env);
-            origErrorHandler = XSetErrorHandler(displayDispatchErrorHandler);
+            origErrorHandler = XSetErrorHandler(x11ErrorHandler);
+            if(sync && NULL!=dpy) {
+                XSync(dpy, False);
+            }
         }
     } else {
         if(NULL!=origErrorHandler) {
+            if(sync && NULL!=dpy) {
+                XSync(dpy, False);
+            }
             XSetErrorHandler(origErrorHandler);
             origErrorHandler = NULL;
         }
@@ -241,10 +269,13 @@ static jint X11InputState2NewtModifiers(unsigned int xstate) {
  * Signature: (Z)Z
  */
 JNIEXPORT jboolean JNICALL Java_jogamp_newt_driver_x11_X11Display_initIDs0
-  (JNIEnv *env, jclass clazz)
+  (JNIEnv *env, jclass clazz, jboolean debug)
 {
     jclass c;
 
+    if(debug) {
+        errorHandlerDebug = 1 ;
+    }
     NewtCommon_init(env);
 
     if(NULL==X11NewtWindowClazz) {
@@ -260,6 +291,8 @@ JNIEXPORT jboolean JNICALL Java_jogamp_newt_driver_x11_X11Display_initIDs0
     }
 
     displayCompletedID = (*env)->GetMethodID(env, clazz, "displayCompleted", "(JJ)V");
+    getCurrentThreadNameID = (*env)->GetStaticMethodID(env, X11NewtWindowClazz, "getCurrentThreadName", "()Ljava/lang/String;");
+    dumpStackID = (*env)->GetStaticMethodID(env, X11NewtWindowClazz, "dumpStack", "()V");
     insetsChangedID = (*env)->GetMethodID(env, X11NewtWindowClazz, "insetsChanged", "(ZIIII)V");
     sizeChangedID = (*env)->GetMethodID(env, X11NewtWindowClazz, "sizeChanged", "(ZIIZ)V");
     positionChangedID = (*env)->GetMethodID(env, X11NewtWindowClazz, "positionChanged", "(ZII)V");
@@ -275,6 +308,8 @@ JNIEXPORT jboolean JNICALL Java_jogamp_newt_driver_x11_X11Display_initIDs0
     requestFocusID = (*env)->GetMethodID(env, X11NewtWindowClazz, "requestFocus", "(Z)V");
 
     if (displayCompletedID == NULL ||
+        getCurrentThreadNameID == NULL ||
+        dumpStackID == NULL ||
         insetsChangedID == NULL ||
         sizeChangedID == NULL ||
         positionChangedID == NULL ||
@@ -403,7 +438,7 @@ JNIEXPORT void JNICALL Java_jogamp_newt_driver_x11_X11Display_DispatchMessages0
 
         // DBG_PRINT( "X11: DispatchMessages dpy %p, win %p, Event %d\n", (void*)dpy, (void*)evt.xany.window, (int)evt.type);
 
-        NewtDisplay_displayDispatchErrorHandlerEnable(1, env);
+        NewtDisplay_x11ErrorHandlerEnable(env, dpy, 1, 0, 0);
 
         jwindow = getJavaWindowProperty(env, dpy, evt.xany.window, javaObjectAtom,
         #ifdef VERBOSE_ON
@@ -413,7 +448,7 @@ JNIEXPORT void JNICALL Java_jogamp_newt_driver_x11_X11Display_DispatchMessages0
         #endif
             );
 
-        NewtDisplay_displayDispatchErrorHandlerEnable(0, env);
+        NewtDisplay_x11ErrorHandlerEnable(env, dpy, 0, 0, 1);
 
         if(NULL==jwindow) {
             fprintf(stderr, "Warning: NEWT X11 DisplayDispatch %p, Couldn't handle event %d for X11 window %p\n", 
diff --git a/src/newt/native/X11Window.c b/src/newt/native/X11Window.c
index 0f93b3e..daf9f2b 100644
--- a/src/newt/native/X11Window.c
+++ b/src/newt/native/X11Window.c
@@ -683,12 +683,16 @@ JNIEXPORT void JNICALL Java_jogamp_newt_driver_x11_X11Window_CloseWindow0
 
     DBG_PRINT( "X11: CloseWindow START dpy %p, win %p\n", (void*)dpy, (void*)w);
 
+    NewtDisplay_x11ErrorHandlerEnable(env, dpy, 1, 0, 0);
+
     jwindow = getJavaWindowProperty(env, dpy, w, javaObjectAtom, True);
     if(NULL==jwindow) {
+        NewtDisplay_x11ErrorHandlerEnable(env, dpy, 0, 0, 1);
         NewtCommon_throwNewRuntimeException(env, "could not fetch Java Window object, bail out!");
         return;
     }
     if ( JNI_FALSE == (*env)->IsSameObject(env, jwindow, obj) ) {
+        NewtDisplay_x11ErrorHandlerEnable(env, dpy, 0, 0, 1);
         NewtCommon_throwNewRuntimeException(env, "Internal Error .. Window global ref not the same!");
         return;
     }
@@ -696,7 +700,7 @@ JNIEXPORT void JNICALL Java_jogamp_newt_driver_x11_X11Window_CloseWindow0
     XSync(dpy, False);
     XSelectInput(dpy, w, 0);
     XUnmapWindow(dpy, w);
-    XSync(dpy, False);
+    NewtDisplay_x11ErrorHandlerEnable(env, dpy, 0, 0, 1);
 
     // Drain all events related to this window ..
     Java_jogamp_newt_driver_x11_X11Display_DispatchMessages0(env, obj, display, javaObjectAtom, windowDeleteAtom);
@@ -757,7 +761,7 @@ JNIEXPORT void JNICALL Java_jogamp_newt_driver_x11_X11Window_reconfigureWindow0
         fsEWMHFlags |= _NET_WM_ABOVE;         // toggle above
     }
 
-    NewtDisplay_displayDispatchErrorHandlerEnable(1, env);
+    NewtDisplay_x11ErrorHandlerEnable(env, dpy, 1, 0, 0);
 
     DBG_PRINT( "X11: reconfigureWindow0 dpy %p, scrn %d, parent %p/%p, win %p, %d/%d %dx%d, parentChange %d, hasParent %d, decorationChange %d, undecorated %d, fullscreenChange %d, fullscreen %d, alwaysOnTopChange %d, alwaysOnTop %d, visibleChange %d, visible %d, tempInvisible %d, fsEWMHFlags %d\n",
         (void*)dpy, screen_index, (void*) jparent, (void*)parent, (void*)w,
@@ -775,7 +779,7 @@ JNIEXPORT void JNICALL Java_jogamp_newt_driver_x11_X11Window_reconfigureWindow0
         ( TST_FLAG_CHANGE_FULLSCREEN(flags) || TST_FLAG_CHANGE_ALWAYSONTOP(flags) ) ) {
         Bool enable = TST_FLAG_CHANGE_FULLSCREEN(flags) ? TST_FLAG_IS_FULLSCREEN(flags) : TST_FLAG_IS_ALWAYSONTOP(flags) ;
         if( NewtWindows_setFullscreenEWMH(dpy, root, w, fsEWMHFlags, isVisible, enable) ) {
-            NewtDisplay_displayDispatchErrorHandlerEnable(0, env);
+            NewtDisplay_x11ErrorHandlerEnable(env, dpy, 0, 0, 1);
             #ifdef FS_GRAB_KEYBOARD
             if(TST_FLAG_CHANGE_FULLSCREEN(flags)) {
                 if(TST_FLAG_IS_FULLSCREEN(flags)) {
@@ -859,7 +863,7 @@ JNIEXPORT void JNICALL Java_jogamp_newt_driver_x11_X11Window_reconfigureWindow0
         #endif
     }
 
-    NewtDisplay_displayDispatchErrorHandlerEnable(0, env);
+    NewtDisplay_x11ErrorHandlerEnable(env, dpy, 0, 0, 1);
 
     DBG_PRINT( "X11: reconfigureWindow0 X\n");
 }
diff --git a/src/test/com/jogamp/opengl/test/android/MovieCubeActivity0.java b/src/test/com/jogamp/opengl/test/android/MovieCubeActivity0.java
index 59e7893..a30262e 100644
--- a/src/test/com/jogamp/opengl/test/android/MovieCubeActivity0.java
+++ b/src/test/com/jogamp/opengl/test/android/MovieCubeActivity0.java
@@ -34,7 +34,6 @@ import java.util.Arrays;
 import javax.media.opengl.GLCapabilities;
 import javax.media.opengl.GLProfile;
 
-import jogamp.newt.driver.android.AndroidWindow;
 import jogamp.newt.driver.android.NewtBaseActivity;
 
 import com.jogamp.common.util.IOUtil;
@@ -46,10 +45,8 @@ import com.jogamp.newt.opengl.GLWindow;
 import com.jogamp.opengl.test.junit.jogl.demos.es2.av.MovieCube;
 import com.jogamp.opengl.util.Animator;
 
-import android.content.Context;
 import android.os.Bundle;
 import android.util.Log;
-import android.view.inputmethod.InputMethodManager;
 
 public class MovieCubeActivity0 extends NewtBaseActivity {
    static String TAG = "MovieCubeActivity0";
@@ -58,10 +55,7 @@ public class MovieCubeActivity0 extends NewtBaseActivity {
         @Override
         public void mousePressed(MouseEvent e) {
            if(e.getPressure()>2f) {
-               final AndroidWindow win = (AndroidWindow)e.getSource();           
-               InputMethodManager mgr = (InputMethodManager) win.getAndroidView().getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
-               mgr.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0); // shows keyboard ..
-               win.getAndroidView().requestFocus();
+               ((com.jogamp.newt.Window) e.getSource()).setKeyboardVisible(true);
            }
         }
    };
diff --git a/src/test/com/jogamp/opengl/test/android/NEWTGearsES2Activity.java b/src/test/com/jogamp/opengl/test/android/NEWTGearsES2Activity.java
index 592ecf5..4468868 100644
--- a/src/test/com/jogamp/opengl/test/android/NEWTGearsES2Activity.java
+++ b/src/test/com/jogamp/opengl/test/android/NEWTGearsES2Activity.java
@@ -30,7 +30,6 @@ package com.jogamp.opengl.test.android;
 import javax.media.opengl.GLCapabilities;
 import javax.media.opengl.GLProfile;
 
-import jogamp.newt.driver.android.AndroidWindow;
 import jogamp.newt.driver.android.NewtBaseActivity;
 
 import com.jogamp.newt.ScreenMode;
@@ -42,10 +41,8 @@ import com.jogamp.newt.opengl.GLWindow;
 import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
 import com.jogamp.opengl.util.Animator;
 
-import android.content.Context;
 import android.os.Bundle;
 import android.util.Log;
-import android.view.inputmethod.InputMethodManager;
 
 public class NEWTGearsES2Activity extends NewtBaseActivity {
    static String TAG = "NEWTGearsES2Activity";
@@ -65,10 +62,7 @@ public class NEWTGearsES2Activity extends NewtBaseActivity {
         @Override
         public void mousePressed(MouseEvent e) {
            if(e.getPressure()>2f) { // show Keyboard
-               final AndroidWindow win = (AndroidWindow)e.getSource();           
-               InputMethodManager mgr = (InputMethodManager) win.getAndroidView().getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
-               mgr.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0); // shows keyboard ..
-               win.getAndroidView().requestFocus();
+               ((com.jogamp.newt.Window) e.getSource()).setKeyboardVisible(true);
            }
         }
        });
diff --git a/src/test/com/jogamp/opengl/test/android/NEWTGearsES2ActivityLauncher.java b/src/test/com/jogamp/opengl/test/android/NEWTGearsES2ActivityLauncher.java
index 0454d54..907be50 100644
--- a/src/test/com/jogamp/opengl/test/android/NEWTGearsES2ActivityLauncher.java
+++ b/src/test/com/jogamp/opengl/test/android/NEWTGearsES2ActivityLauncher.java
@@ -59,7 +59,7 @@ public class NEWTGearsES2ActivityLauncher extends LauncherUtil.BaseActivityLaunc
        // properties.setProperty("newt.debug", "all");
        // props.setProperty("newt.debug.Window", "true");
        // props.setProperty("newt.debug.Window.MouseEvent", "true");
-       // props.setProperty("newt.debug.Window.KeyEvent", "true");
+       props.setProperty("newt.debug.Window.KeyEvent", "true");
     }
     
     @Override
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT00.java b/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT00.java
index a09cc76..b22be0a 100644
--- a/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT00.java
+++ b/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT00.java
@@ -194,7 +194,7 @@ public class TestTextRendererNEWT00 extends UITestCase {
             pw.printf("%s-%03dx%03d-T%04d", objName, drawable.getWidth(), drawable.getHeight(), texSize[0]);
             
             final String filename = dir + sw +".png";
-            if(screenshot.readPixels(drawable.getGL(), drawable, false)) {
+            if(screenshot.readPixels(drawable.getGL(), false)) {
                 screenshot.write(new File(filename));
             }
         }
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPURendererListenerBase01.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPURendererListenerBase01.java
index a3182a3..6378c1e 100644
--- a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPURendererListenerBase01.java
+++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPURendererListenerBase01.java
@@ -194,7 +194,7 @@ public abstract class GPURendererListenerBase01 implements GLEventListener {
         pw.printf("-%03dx%03d-Z%04d-T%04d-%s", drawable.getWidth(), drawable.getHeight(), (int)Math.abs(zoom), texSize[0], objName);
         
         final String filename = dir + tech + sw +".png";
-        if(screenshot.readPixels(drawable.getGL(), drawable, false)) {
+        if(screenshot.readPixels(drawable.getGL(), false)) {
             screenshot.write(new File(filename));
         }
     }
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/UIListenerBase01.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/UIListenerBase01.java
index d0093ad..15daf70 100644
--- a/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/UIListenerBase01.java
+++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/UIListenerBase01.java
@@ -180,7 +180,7 @@ public abstract class UIListenerBase01 implements GLEventListener {
         pw.printf("-%03dx%03d-Z%04d-T%04d-%s", drawable.getWidth(), drawable.getHeight(), (int)Math.abs(zoom), 0, objName);
         
         final String filename = dir + tech + sw +".png";
-        if(screenshot.readPixels(drawable.getGL(), drawable, false)) {
+        if(screenshot.readPixels(drawable.getGL(), false)) {
             screenshot.write(new File(filename));
         }
     }
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestFBODrawableNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestFBODrawableNEWT.java
new file mode 100644
index 0000000..7977347
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestFBODrawableNEWT.java
@@ -0,0 +1,272 @@
+/**
+ * Copyright 2012 JogAmp Community. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ * 
+ *    1. Redistributions of source code must retain the above copyright notice, this list of
+ *       conditions and the following disclaimer.
+ * 
+ *    2. Redistributions in binary form must reproduce the above copyright notice, this list
+ *       of conditions and the following disclaimer in the documentation and/or other materials
+ *       provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * 
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of JogAmp Community.
+ */
+ 
+package com.jogamp.opengl.test.junit.jogl.acore;
+
+import java.io.IOException;
+
+import javax.media.opengl.GL;
+import javax.media.opengl.GLAutoDrawable;
+import javax.media.opengl.GLCapabilities;
+import javax.media.opengl.GLContext;
+import javax.media.opengl.GLDrawable;
+import javax.media.opengl.GLDrawableFactory;
+import javax.media.opengl.GLEventListener;
+import javax.media.opengl.GLProfile;
+
+import jogamp.opengl.GLFBODrawableImpl;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import com.jogamp.opengl.FBObject;
+import com.jogamp.opengl.OffscreenAutoDrawable;
+import com.jogamp.opengl.test.junit.jogl.demos.es2.FBOMix2DemosES2;
+import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
+import com.jogamp.opengl.test.junit.jogl.demos.es2.MultisampleDemoES2;
+import com.jogamp.opengl.test.junit.util.UITestCase;
+import com.jogamp.opengl.util.GLReadBufferUtil;
+import com.jogamp.opengl.util.texture.TextureIO;
+
+public class TestFBODrawableNEWT extends UITestCase {
+    
+    static final int widthStep = 800/4;
+    static final int heightStep = 600/4;
+    volatile int szStep = 2;
+    
+    @Test
+    public void testGL2ES2_Demo1Normal() throws InterruptedException {    
+        final GLProfile glp = GLProfile.getGL2ES2();
+        final GLCapabilities caps = new GLCapabilities(glp);
+        testGLFBODrawableImpl(caps, new GearsES2(0));
+    }
+    
+    @Test
+    public void testGL2ES2_Demo1MSAA4() throws InterruptedException {    
+        final GLProfile glp = GLProfile.getGL2ES2();
+        final GLCapabilities caps = new GLCapabilities(glp);
+        caps.setSampleBuffers(true);
+        caps.setNumSamples(4);
+        testGLFBODrawableImpl(caps, new GearsES2(0));
+    }
+    
+    @Test
+    public void testGL2ES2_Demo2Normal() throws InterruptedException {    
+        final GLProfile glp = GLProfile.getGL2ES2();
+        final GLCapabilities caps = new GLCapabilities(glp);
+        testGLFBODrawableImpl(caps, new MultisampleDemoES2(false));
+    }
+    
+    @Test
+    public void testGL2ES2_Demo2MSAA4() throws InterruptedException {    
+        final GLProfile glp = GLProfile.getGL2ES2();
+        final GLCapabilities caps = new GLCapabilities(glp);
+        caps.setSampleBuffers(true);
+        caps.setNumSamples(4);
+        testGLFBODrawableImpl(caps, new MultisampleDemoES2(true));
+    }
+    
+    @Test
+    public void testGL2ES2_FBODemoNormal() throws InterruptedException {    
+        final GLProfile glp = GLProfile.getGL2ES2();
+        final FBOMix2DemosES2 demo = new FBOMix2DemosES2(0);
+        demo.setDoRotation(false);
+        final GLCapabilities caps = new GLCapabilities(glp);
+        testGLFBODrawableImpl(caps, demo);
+    }
+    
+    @Test
+    public void testGL2ES2_FBODemoMSAA4() throws InterruptedException {    
+        final GLProfile glp = GLProfile.getGL2ES2();
+        final FBOMix2DemosES2 demo = new FBOMix2DemosES2(0);
+        demo.setDoRotation(false);
+        final GLCapabilities caps = new GLCapabilities(glp);
+        caps.setSampleBuffers(true);
+        caps.setNumSamples(4);
+        testGLFBODrawableImpl(caps, demo);
+    }
+    
+    @Test
+    public void testEGLES2_Demo0Normal() throws InterruptedException {    
+        if( GLProfile.isAvailable(GLProfile.GLES2) )  {
+            final GLProfile glp = GLProfile.get(GLProfile.GLES2);
+            final GLCapabilities caps = new GLCapabilities(glp);
+            testGLFBODrawableImpl(caps, new GearsES2(0));
+        } else {
+            System.err.println("EGL ES2 n/a");
+        }
+    }
+    
+    @Test
+    public void testEGLES2_Demo0MSAA4() throws InterruptedException {    
+        if( GLProfile.isAvailable(GLProfile.GLES2) )  {
+            final GLProfile glp = GLProfile.get(GLProfile.GLES2);
+            final GLCapabilities caps = new GLCapabilities(glp);
+            caps.setSampleBuffers(true);
+            caps.setNumSamples(4);
+            testGLFBODrawableImpl(caps, new GearsES2(0));
+        } else {
+            System.err.println("EGL ES2 n/a");
+        }
+    }
+
+    boolean skipShot = false;
+    
+    void testGLFBODrawableImpl(GLCapabilities caps, GLEventListener demo) throws InterruptedException {
+        final GLReadBufferUtil screenshot = new GLReadBufferUtil(false, false);
+        caps.setFBO(true);
+        final GLDrawableFactory factory = GLDrawableFactory.getFactory(caps.getGLProfile());
+        final GLDrawable fboDrawable = factory.createOffscreenDrawable(null, caps, null, widthStep*szStep, heightStep*szStep);
+        Assert.assertNotNull(fboDrawable);
+        Assert.assertTrue("Not an FBO Drawable", fboDrawable instanceof GLFBODrawableImpl);
+        
+        fboDrawable.setRealized(true);
+        Assert.assertTrue(fboDrawable.isRealized());
+        
+        final FBObject fbo = ((GLFBODrawableImpl)fboDrawable).getFBObject();
+        
+        System.out.println("Realized: "+fboDrawable);
+        System.out.println("Realized: "+fboDrawable.getChosenGLCapabilities());
+        System.out.println("Realized: "+fbo);
+        
+        final GLContext context = fboDrawable.createContext(null);
+        Assert.assertNotNull(context);
+        
+        int res = context.makeCurrent();
+        Assert.assertTrue(GLContext.CONTEXT_CURRENT_NEW==res || GLContext.CONTEXT_CURRENT==res);
+        context.release();
+        
+        System.out.println("Post Create-Ctx: "+fbo);        
+        final FBObject.Colorbuffer colorA = fbo.getColorbuffer(0);
+        Assert.assertNotNull(colorA);
+        final FBObject.RenderAttachment depthA = fbo.getDepthAttachment();
+        Assert.assertNotNull(depthA);
+        
+        final OffscreenAutoDrawable glad = new OffscreenAutoDrawable(fboDrawable, context, true);
+
+        glad.addGLEventListener(demo);
+        glad.addGLEventListener(new GLEventListener() {
+            volatile int displayCount=0;
+            volatile int reshapeCount=0;
+            public void init(GLAutoDrawable drawable) {}
+            public void dispose(GLAutoDrawable drawable) {}
+            public void display(GLAutoDrawable drawable) {
+                final GL gl = drawable.getGL();
+                // System.err.println(Thread.currentThread().getName()+": ** display: "+displayCount+": step "+szStep+" "+drawable.getWidth()+"x"+drawable.getHeight());
+                // System.err.println(Thread.currentThread().getName()+": ** FBO-THIS: "+fbo);
+                // System.err.println(Thread.currentThread().getName()+": ** FBO-SINK: "+fbo.getSamplingSinkFBO());
+                // System.err.println(Thread.currentThread().getName()+": ** drawable-read: "+gl.getDefaultReadFramebuffer());
+                if(skipShot) {
+                    skipShot=false;
+                } else {
+                    snapshot(getSimpleTestName("."), displayCount, "msaa"+fbo.getNumSamples(), gl, screenshot, TextureIO.PNG, null);
+                }
+                Assert.assertEquals(drawable.getWidth(), widthStep*szStep);
+                Assert.assertEquals(drawable.getHeight(), heightStep*szStep); 
+                displayCount++;
+            }
+            public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
+                System.err.println(Thread.currentThread().getName()+": ** reshape: "+reshapeCount+": step "+szStep+" "+width+"x"+height+" - "+drawable.getWidth()+"x"+drawable.getHeight());
+                Assert.assertEquals(drawable.getWidth(), widthStep*szStep);
+                Assert.assertEquals(drawable.getHeight(), heightStep*szStep);                
+                reshapeCount++;
+            }
+        });
+
+        // 0 - szStep = 2
+        glad.display();
+        
+        // 1, 2 (resize + display)
+        szStep = 1;
+        skipShot=true;
+        glad.setSize(widthStep*szStep, heightStep*szStep);
+        glad.display();
+        Assert.assertEquals(glad.getWidth(), widthStep*szStep);
+        Assert.assertEquals(glad.getHeight(), heightStep*szStep);
+        {
+            // Check whether the attachment reference are still valid!
+            FBObject.Colorbuffer _colorA = fbo.getColorbuffer(0);
+            Assert.assertNotNull(_colorA);
+            Assert.assertTrue(colorA == _colorA);
+            Assert.assertTrue(colorA.equals(_colorA));
+            FBObject.RenderAttachment _depthA = fbo.getDepthAttachment();
+            Assert.assertNotNull(_depthA);
+            Assert.assertTrue(depthA == _depthA);
+            Assert.assertTrue(depthA.equals(_depthA));
+            
+            _colorA = fbo.getColorbuffer(colorA);
+            Assert.assertNotNull(_colorA);
+            Assert.assertTrue(colorA == _colorA);
+            Assert.assertTrue(colorA.equals(_colorA));
+        }
+        
+        // 3, 4 (resize + display)
+        szStep = 4;
+        skipShot=true;
+        glad.setSize(widthStep*szStep, heightStep*szStep);
+        glad.display();
+        Assert.assertEquals(glad.getWidth(), widthStep*szStep);
+        Assert.assertEquals(glad.getHeight(), heightStep*szStep);
+        {
+            // Check whether the attachment reference are still valid!
+            FBObject.Colorbuffer _colorA = fbo.getColorbuffer(0);
+            Assert.assertNotNull(_colorA);
+            Assert.assertTrue(colorA == _colorA);
+            final FBObject.RenderAttachment _depthA = fbo.getDepthAttachment();
+            Assert.assertNotNull(_depthA);
+            Assert.assertTrue(depthA == _depthA);
+            
+            _colorA = fbo.getColorbuffer(colorA);
+            Assert.assertNotNull(_colorA);
+            Assert.assertTrue(colorA == _colorA);
+        }
+        
+        // 5
+        glad.display();
+        Assert.assertEquals(glad.getWidth(), widthStep*szStep);
+        Assert.assertEquals(glad.getHeight(), heightStep*szStep);
+        
+        // 6, 7 (resize + display)
+        szStep = 3;
+        skipShot=true;
+        glad.setSize(widthStep*szStep, heightStep*szStep);
+        glad.display();
+        Assert.assertEquals(glad.getWidth(), widthStep*szStep);
+        Assert.assertEquals(glad.getHeight(), heightStep*szStep);
+        
+        glad.destroy();
+        System.out.println("Fin: "+fboDrawable);
+        
+        // final GLAutoDrawableDelegate glad = new GLAutoDrawableDelegate(fboDrawable, context);
+    }
+    
+    public static void main(String args[]) throws IOException {
+        org.junit.runner.JUnitCore.main(TestFBODrawableNEWT.class.getName());
+    }
+
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestFBOMRTNEWT01.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestFBOMRTNEWT01.java
similarity index 79%
rename from src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestFBOMRTNEWT01.java
rename to src/test/com/jogamp/opengl/test/junit/jogl/acore/TestFBOMRTNEWT01.java
index 1b33866..f7c83a0 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestFBOMRTNEWT01.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestFBOMRTNEWT01.java
@@ -25,14 +25,18 @@
  * authors and should not be interpreted as representing official policies, either expressed
  * or implied, of JogAmp Community.
  */
-package com.jogamp.opengl.test.junit.jogl.glsl;
+package com.jogamp.opengl.test.junit.jogl.acore;
 
-import com.jogamp.opengl.util.FBObject;
+import com.jogamp.opengl.FBObject;
+import com.jogamp.opengl.FBObject.TextureAttachment;
 import com.jogamp.opengl.util.GLArrayDataServer;
+import com.jogamp.opengl.util.GLReadBufferUtil;
 import com.jogamp.opengl.util.PMVMatrix;
 import com.jogamp.opengl.util.glsl.ShaderCode;
 import com.jogamp.opengl.util.glsl.ShaderProgram;
 import com.jogamp.opengl.util.glsl.ShaderState;
+import com.jogamp.opengl.util.texture.TextureIO;
+import com.jogamp.opengl.FBObject.Attachment.Type;
 import com.jogamp.opengl.test.junit.jogl.demos.es2.RedSquareES2;
 import com.jogamp.opengl.test.junit.util.MiscUtils;
 import com.jogamp.opengl.test.junit.util.NEWTGLContext;
@@ -40,6 +44,7 @@ import com.jogamp.opengl.test.junit.util.UITestCase;
 
 import java.io.IOException;
 
+import javax.media.nativewindow.NativeSurface;
 import javax.media.opengl.GL;
 import javax.media.opengl.GL2ES2;
 import javax.media.opengl.GL2GL3;
@@ -53,17 +58,20 @@ import org.junit.Assert;
 import org.junit.Test;
 
 public class TestFBOMRTNEWT01 extends UITestCase {
-    static long durationPerTest = 10; // ms
+    static long durationPerTest = 10*40*2; // ms
 
     @Test
     public void test01() throws InterruptedException {
+        final int step = 4;
+        final int width = 800;
+        final int height = 600;
         // preset ..
         if(!GLProfile.isAvailable(GLProfile.GL2GL3)) {
             System.err.println("Test requires GL2/GL3 profile.");
             return;
         }
         final NEWTGLContext.WindowContext winctx = NEWTGLContext.createOnscreenWindow(
-                new GLCapabilities(GLProfile.getGL2GL3()), 640, 480, true);        
+                new GLCapabilities(GLProfile.getGL2GL3()), width/step, height/step, true);        
         final GLDrawable drawable = winctx.context.getGLDrawable();
         GL2GL3 gl = winctx.context.getGL().getGL2GL3();
         gl = gl.getContext().setGL( GLPipelineFactory.create("javax.media.opengl.Debug", null, gl, null) ).getGL2GL3();
@@ -147,12 +155,15 @@ public class TestFBOMRTNEWT01 extends UITestCase {
         texCoords0.enableBuffer(gl, false);
         Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
 
+        final int texA0Point = 0; // attachment point for texA0
+        final int texA1Point = 1; // attachment point for texA1
+        
         // FBO w/ 2 texture2D color buffers
-        final FBObject fbo_mrt = new FBObject(drawable.getWidth(), drawable.getHeight());
-        fbo_mrt.init(gl);
-        Assert.assertTrue( 0 == fbo_mrt.attachTexture2D(gl, texUnit0.intValue(), GL.GL_NEAREST, GL.GL_NEAREST, GL2ES2.GL_CLAMP_TO_EDGE, GL2ES2.GL_CLAMP_TO_EDGE) );
-        Assert.assertTrue( 1 == fbo_mrt.attachTexture2D(gl, texUnit1.intValue(), GL.GL_NEAREST, GL.GL_NEAREST, GL2ES2.GL_CLAMP_TO_EDGE, GL2ES2.GL_CLAMP_TO_EDGE) );
-        Assert.assertTrue( fbo_mrt.attachDepthBuffer(gl, GL.GL_DEPTH_COMPONENT16) );
+        final FBObject fbo_mrt = new FBObject();
+        fbo_mrt.reset(gl, drawable.getWidth(), drawable.getHeight());
+        final TextureAttachment texA0 = fbo_mrt.attachTexture2D(gl, texA0Point, true, GL.GL_NEAREST, GL.GL_NEAREST, GL.GL_CLAMP_TO_EDGE, GL.GL_CLAMP_TO_EDGE);
+        final TextureAttachment texA1 = fbo_mrt.attachTexture2D(gl, texA1Point, true, GL.GL_NEAREST, GL.GL_NEAREST, GL.GL_CLAMP_TO_EDGE, GL.GL_CLAMP_TO_EDGE);
+        fbo_mrt.attachRenderbuffer(gl, Type.DEPTH, 24);
         Assert.assertTrue( fbo_mrt.isStatusValid() ) ;
         fbo_mrt.unbind(gl);
         
@@ -170,9 +181,13 @@ public class TestFBOMRTNEWT01 extends UITestCase {
         st.uniform(gl, pmvMatrixUniform);
         Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
         
-        final int[] two_buffers = new int[] { GL.GL_COLOR_ATTACHMENT0, GL.GL_COLOR_ATTACHMENT0+1 };
+        final int[] two_buffers = new int[] { GL.GL_COLOR_ATTACHMENT0+texA0Point, GL.GL_COLOR_ATTACHMENT0+texA1Point };
         final int[] bck_buffers = new int[] { GL2GL3.GL_BACK_LEFT };
         
+        final GLReadBufferUtil screenshot = new GLReadBufferUtil(true, false);
+        int step_i = 0;
+        int[] last_snap_size = new int[] { 0, 0 };
+        
         for(int i=0; i<durationPerTest; i+=50) {
             // pass 1 - MRT: Red -> buffer0, Green -> buffer1
             st.attachShaderProgram(gl, sp0, true);           
@@ -198,8 +213,11 @@ public class TestFBOMRTNEWT01 extends UITestCase {
             gl.glDrawBuffers(1, bck_buffers, 0);
             
             gl.glViewport(0, 0, drawable.getWidth(), drawable.getHeight());
-            fbo_mrt.use(gl, 0);
-            fbo_mrt.use(gl, 1);
+            
+            gl.glActiveTexture(GL.GL_TEXTURE0 + texUnit0.intValue());            
+            fbo_mrt.use(gl, texA0);
+            gl.glActiveTexture(GL.GL_TEXTURE0 + texUnit1.intValue());
+            fbo_mrt.use(gl, texA1);
             gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
             gl.glDrawArrays(GL.GL_TRIANGLE_STRIP, 0, 4);
             fbo_mrt.unuse(gl);
@@ -207,8 +225,27 @@ public class TestFBOMRTNEWT01 extends UITestCase {
             colors0.enableBuffer(gl, false);
             texCoords0.enableBuffer(gl, false);
             
+            {
+                final NativeSurface ns = gl.getContext().getGLReadDrawable().getNativeSurface();
+                if(last_snap_size[0] != ns.getWidth() && last_snap_size[1] != ns.getHeight()) {
+                    gl.glFinish(); // sync .. no swap buffers yet!
+                    snapshot(getSimpleTestName("."), step_i, null, gl, screenshot, TextureIO.PNG, null); // overwrite ok
+                    last_snap_size[0] = ns.getWidth();
+                    last_snap_size[1] = ns.getHeight();
+                }
+            }
+            
             drawable.swapBuffers();
             Thread.sleep(50);
+            int j = (int) ( (long)i / (durationPerTest/(long)step) ) + 1;
+            if(j>step_i) {
+                int w = width/step * j;
+                int h = height/step * j;
+                System.err.println("resize: "+step_i+" -> "+j+" - "+w+"x"+h);
+                fbo_mrt.reset(gl, w, h);
+                winctx.window.setSize(w, h);
+                step_i = j;
+            }
         }
         
         NEWTGLContext.destroyWindow(winctx);
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestFBOMix2DemosES2NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestFBOMix2DemosES2NEWT.java
new file mode 100644
index 0000000..b384c93
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestFBOMix2DemosES2NEWT.java
@@ -0,0 +1,258 @@
+/**
+ * Copyright 2012 JogAmp Community. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ * 
+ *    1. Redistributions of source code must retain the above copyright notice, this list of
+ *       conditions and the following disclaimer.
+ * 
+ *    2. Redistributions in binary form must reproduce the above copyright notice, this list
+ *       of conditions and the following disclaimer in the documentation and/or other materials
+ *       provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * 
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of JogAmp Community.
+ */
+ 
+package com.jogamp.opengl.test.junit.jogl.acore;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+
+import com.jogamp.newt.event.KeyAdapter;
+import com.jogamp.newt.event.KeyEvent;
+import com.jogamp.newt.event.WindowEvent;
+import com.jogamp.newt.event.WindowAdapter;
+import com.jogamp.newt.opengl.GLWindow;
+import com.jogamp.opengl.test.junit.util.AWTRobotUtil;
+import com.jogamp.opengl.test.junit.util.MiscUtils;
+import com.jogamp.opengl.test.junit.util.UITestCase;
+import com.jogamp.opengl.test.junit.util.QuitAdapter;
+
+import com.jogamp.opengl.util.Animator;
+import com.jogamp.opengl.util.GLReadBufferUtil;
+import com.jogamp.opengl.util.texture.TextureIO;
+
+import com.jogamp.opengl.test.junit.jogl.demos.es2.FBOMix2DemosES2;
+
+import javax.media.opengl.GLAutoDrawable;
+import javax.media.opengl.GLCapabilities;
+import javax.media.opengl.GLCapabilitiesImmutable;
+import javax.media.opengl.GLEventListener;
+import javax.media.opengl.GLProfile;
+
+import org.junit.Assert;
+import org.junit.AfterClass;
+import org.junit.Test;
+
+public class TestFBOMix2DemosES2NEWT extends UITestCase {    
+    static long duration = 500; // ms
+    static int swapInterval = 1;
+    static boolean showFPS = false;
+    static boolean forceES2 = false;
+    static boolean doRotate = true;
+    static boolean demo0Only = false;
+    static int globalNumSamples = 0;
+    static boolean mainRun = false;
+    
+    @AfterClass
+    public static void releaseClass() {
+    }
+
+    protected void runTestGL(GLCapabilitiesImmutable caps, int numSamples) throws InterruptedException {
+        final GLReadBufferUtil screenshot = new GLReadBufferUtil(true, false);
+        System.err.println("requested: vsync "+swapInterval+", "+caps);
+        final GLWindow glWindow = GLWindow.create(caps);
+        Assert.assertNotNull(glWindow);
+        glWindow.setTitle("Gears NEWT Test (translucent "+!caps.isBackgroundOpaque()+"), swapInterval "+swapInterval);
+        if(mainRun) {
+            glWindow.setSize(512, 512);            
+        } else {
+            glWindow.setSize(128, 128);
+        }
+
+        final FBOMix2DemosES2 demo = new FBOMix2DemosES2(swapInterval);
+        demo.setMSAA(numSamples);
+        demo.setDoRotation(doRotate);
+        demo.setDemo0Only(demo0Only);
+        glWindow.addGLEventListener(demo);
+        glWindow.addGLEventListener(new GLEventListener() {
+            int i=0, c=0;
+            int origS;
+            public void init(GLAutoDrawable drawable) {
+                origS = demo.getMSAA();
+            }
+            public void dispose(GLAutoDrawable drawable) {}
+            public void display(GLAutoDrawable drawable) {
+                if(mainRun) return;
+                
+                final int dw = drawable.getWidth();
+                final int dh = drawable.getHeight();
+                c++;
+                
+                if(dw<800) {
+                    System.err.println("XXX: "+dw+"x"+dh+", c "+c);
+                    if(0 == c%3) {
+                        snapshot(getSimpleTestName("."), i++, "msaa"+demo.getMSAA(), drawable.getGL(), screenshot, TextureIO.PNG, null);                        
+                    }
+                    if( 3 == c ) {
+                        new Thread() { 
+                            @Override
+                            public void run() {
+                                demo.setMSAA(4);
+                            } }.start();
+                    } else if( 6 == c ) {
+                        new Thread() { 
+                            @Override
+                            public void run() {
+                                demo.setMSAA(8);
+                            } }.start();
+                    } else if(9 == c) {
+                        c=0;
+                        new Thread() { 
+                            @Override
+                            public void run() {
+                                glWindow.setSize(dw+256, dh+256);
+                                demo.setMSAA(origS);
+                            } }.start();                            
+                    }
+                }
+            }
+            public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) { }
+        });
+        
+        Animator animator = new Animator(glWindow);
+        QuitAdapter quitAdapter = new QuitAdapter();
+
+        //glWindow.addKeyListener(new TraceKeyAdapter(quitAdapter));
+        //glWindow.addWindowListener(new TraceWindowAdapter(quitAdapter));
+        glWindow.addKeyListener(quitAdapter);
+        glWindow.addWindowListener(quitAdapter);
+
+        glWindow.addWindowListener(new WindowAdapter() {
+            public void windowResized(WindowEvent e) {
+                System.err.println("window resized: "+glWindow.getX()+"/"+glWindow.getY()+" "+glWindow.getWidth()+"x"+glWindow.getHeight());
+            }
+            public void windowMoved(WindowEvent e) {
+                System.err.println("window moved:   "+glWindow.getX()+"/"+glWindow.getY()+" "+glWindow.getWidth()+"x"+glWindow.getHeight());
+            }            
+        });
+        
+        glWindow.addKeyListener(new KeyAdapter() {
+            public void keyTyped(KeyEvent e) {
+                System.err.println("*** "+e);
+                if(e.getKeyChar()=='f') {
+                    new Thread() {
+                        public void run() {
+                            System.err.println("[set fullscreen  pre]: "+glWindow.getX()+"/"+glWindow.getY()+" "+glWindow.getWidth()+"x"+glWindow.getHeight()+", f "+glWindow.isFullscreen()+", a "+glWindow.isAlwaysOnTop()+", "+glWindow.getInsets());
+                            glWindow.setFullscreen(!glWindow.isFullscreen());
+                            System.err.println("[set fullscreen post]: "+glWindow.getX()+"/"+glWindow.getY()+" "+glWindow.getWidth()+"x"+glWindow.getHeight()+", f "+glWindow.isFullscreen()+", a "+glWindow.isAlwaysOnTop()+", "+glWindow.getInsets());
+                    } }.start();
+                } else if(e.getKeyChar()=='d') {
+                    demo.setDemo0Only(!demo.getDemo0Only());
+                } else {
+                    int num = e.getKeyChar() - '0';
+                    System.err.println("*** "+num);
+                    if(0 <= num && num <= 8) {
+                        System.err.println("MSAA: "+demo.getMSAA()+" -> "+num);
+                        demo.setMSAA(num);                        
+                    }
+                }
+            }
+        });
+
+        animator.start();
+        // glWindow.setSkipContextReleaseThread(animator.getThread());
+
+        glWindow.setVisible(true);
+        
+        System.err.println("NW chosen: "+glWindow.getDelegatedWindow().getChosenCapabilities());
+        System.err.println("GL chosen: "+glWindow.getChosenCapabilities());
+        System.err.println("window pos/siz: "+glWindow.getX()+"/"+glWindow.getY()+" "+glWindow.getWidth()+"x"+glWindow.getHeight()+", "+glWindow.getInsets());
+        
+        animator.setUpdateFPSFrames(60, showFPS ? System.err : null);
+        
+        while(!quitAdapter.shouldQuit() && animator.isAnimating() && animator.getTotalFPSDuration()<duration) {
+            Thread.sleep(100);
+        }
+
+        animator.stop();
+        Assert.assertFalse(animator.isAnimating());
+        Assert.assertFalse(animator.isStarted());
+        glWindow.destroy();
+        Assert.assertEquals(true,  AWTRobotUtil.waitForRealized(glWindow, false));
+    }
+
+    @Test
+    public void test01_Main() throws InterruptedException {
+        if( mainRun ) {
+            GLCapabilities caps = new GLCapabilities(forceES2 ? GLProfile.get(GLProfile.GLES2) : GLProfile.getGL2ES2());
+            caps.setAlphaBits(1);
+            runTestGL(caps, globalNumSamples);            
+        }
+    }
+    
+    @Test
+    public void test01() throws InterruptedException {
+        if( mainRun ) return ;
+        GLCapabilities caps = new GLCapabilities(forceES2 ? GLProfile.get(GLProfile.GLES2) : GLProfile.getGL2ES2());
+        caps.setAlphaBits(1);
+        runTestGL(caps, 0);
+    }
+
+    public static void main(String args[]) throws IOException {        
+        boolean waitForKey = false;
+        
+        mainRun = true;
+        
+        for(int i=0; i<args.length; i++) {
+            if(args[i].equals("-time")) {
+                i++;
+                duration = MiscUtils.atol(args[i], duration);
+            } else if(args[i].equals("-vsync")) {
+                i++;
+                swapInterval = MiscUtils.atoi(args[i], swapInterval);
+            } else if(args[i].equals("-es2")) {
+                forceES2 = true;
+            } else if(args[i].equals("-showFPS")) {
+                showFPS = true;
+            } else if(args[i].equals("-samples")) {
+                i++;
+                globalNumSamples = MiscUtils.atoi(args[i], globalNumSamples);
+            } else if(args[i].equals("-norotate")) {
+                doRotate = false;
+            } else if(args[i].equals("-demo0Only")) {
+                demo0Only = true;
+            } else if(args[i].equals("-wait")) {
+                waitForKey = true;
+            } else if(args[i].equals("-nomain")) {
+                mainRun = false;
+            }
+        }
+        
+        System.err.println("swapInterval "+swapInterval);
+        System.err.println("forceES2 "+forceES2);
+
+        if(waitForKey) {
+            BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
+            System.err.println("Press enter to continue");
+            try {
+                System.err.println(stdin.readLine());
+            } catch (IOException e) { }
+        }
+        org.junit.runner.JUnitCore.main(TestFBOMix2DemosES2NEWT.class.getName());
+    }
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableDelegateNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableDelegateNEWT.java
new file mode 100644
index 0000000..96d9b2e
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLAutoDrawableDelegateNEWT.java
@@ -0,0 +1,152 @@
+/**
+ * Copyright 2012 JogAmp Community. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ * 
+ *    1. Redistributions of source code must retain the above copyright notice, this list of
+ *       conditions and the following disclaimer.
+ * 
+ *    2. Redistributions in binary form must reproduce the above copyright notice, this list
+ *       of conditions and the following disclaimer in the documentation and/or other materials
+ *       provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * 
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of JogAmp Community.
+ */
+ 
+package com.jogamp.opengl.test.junit.jogl.acore;
+
+import java.io.IOException;
+
+import javax.media.opengl.GLAutoDrawable;
+import javax.media.opengl.GLAutoDrawableDelegate;
+import javax.media.opengl.GLCapabilities;
+import javax.media.opengl.GLContext;
+import javax.media.opengl.GLDrawable;
+import javax.media.opengl.GLDrawableFactory;
+import javax.media.opengl.GLException;
+import javax.media.opengl.GLProfile;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import com.jogamp.newt.NewtFactory;
+import com.jogamp.newt.Window;
+import com.jogamp.newt.event.WindowAdapter;
+import com.jogamp.newt.event.WindowEvent;
+import com.jogamp.newt.event.WindowListener;
+import com.jogamp.newt.event.WindowUpdateEvent;
+import com.jogamp.opengl.util.Animator;
+
+import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
+import com.jogamp.opengl.test.junit.util.AWTRobotUtil;
+import com.jogamp.opengl.test.junit.util.QuitAdapter;
+import com.jogamp.opengl.test.junit.util.UITestCase;
+
+/**
+ * Demonstrates a full featured custom GLAutoDrawable implementation
+ * utilizing {@link GLAutoDrawableDelegate}. 
+ */
+public class TestGLAutoDrawableDelegateNEWT extends UITestCase {
+
+    /** Note: Creates a full featured GLAutoDrawable w/ all window events connected. */
+    private GLAutoDrawable createGLAutoDrawable(GLCapabilities caps, int x, int y, int width, int height, WindowListener wl) throws InterruptedException {
+        final Window window = NewtFactory.createWindow(caps);
+        Assert.assertNotNull(window);
+        window.setPosition(x, y);
+        window.setSize(width, height);
+        window.setVisible(true);
+        Assert.assertTrue(AWTRobotUtil.waitForVisible(window, true));
+        Assert.assertTrue(AWTRobotUtil.waitForRealized(window, true));
+            
+        GLDrawableFactory factory = GLDrawableFactory.getFactory(caps.getGLProfile());
+        GLDrawable drawable = factory.createGLDrawable(window);
+        Assert.assertNotNull(drawable);
+        
+        drawable.setRealized(true);
+        Assert.assertTrue(drawable.isRealized());
+        
+        GLContext context = drawable.createContext(null);
+        Assert.assertNotNull(context);
+        
+        int res = context.makeCurrent();
+        Assert.assertTrue(GLContext.CONTEXT_CURRENT_NEW==res || GLContext.CONTEXT_CURRENT==res);
+        context.release();
+        
+        final GLAutoDrawableDelegate glad = new GLAutoDrawableDelegate(drawable, context, window, false) {
+            @Override
+            protected void destroyImplInLock() {
+                super.destroyImplInLock();  // destroys drawable/context
+                window.destroy(); // destroys the actual window
+            }            
+        };
+        
+        // add basic window interaction
+        window.addWindowListener(new WindowAdapter() {
+            @Override
+            public void windowRepaint(WindowUpdateEvent e) {
+                glad.windowRepaintOp();
+            }
+            @Override
+            public void windowResized(WindowEvent e) {
+                glad.windowResizedOp();
+            }
+            @Override
+            public void windowDestroyNotify(WindowEvent e) {
+                glad.windowDestroyNotifyOp();
+            }
+        });
+        window.addWindowListener(wl);
+        
+        return glad;
+    }
+    
+    @Test
+    public void test01() throws GLException, InterruptedException {
+        final QuitAdapter quitAdapter = new QuitAdapter();
+        GLAutoDrawable glad = createGLAutoDrawable(new GLCapabilities(GLProfile.getGL2ES2()), 0, 0, 640, 480, quitAdapter);        
+        glad.addGLEventListener(new GearsES2(1));
+
+        final Animator animator = new Animator(glad);
+        animator.setUpdateFPSFrames(60, null);
+        animator.start();
+        
+        while(!quitAdapter.shouldQuit() && animator.isAnimating() && animator.getTotalFPSDuration()<duration) {
+            Thread.sleep(100);
+        }
+
+        animator.stop();
+        
+        glad.destroy();
+    }
+
+    static long duration = 2000; // ms
+
+    public static void main(String args[]) throws IOException {
+        for(int i=0; i<args.length; i++) {
+            if(args[i].equals("-time")) {
+                i++;
+                try {
+                    duration = Integer.parseInt(args[i]);
+                } catch (Exception ex) { ex.printStackTrace(); }
+            }
+        }
+        /**
+        BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
+        System.err.println("Press enter to continue");
+        System.err.println(stdin.readLine()); */         
+        org.junit.runner.JUnitCore.main(TestGLAutoDrawableDelegateNEWT.class.getName());
+    }
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLContextDrawableSwitchNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLContextDrawableSwitchNEWT.java
new file mode 100644
index 0000000..cece4c6
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLContextDrawableSwitchNEWT.java
@@ -0,0 +1,322 @@
+/**
+ * Copyright 2010 JogAmp Community. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ * 
+ *    1. Redistributions of source code must retain the above copyright notice, this list of
+ *       conditions and the following disclaimer.
+ * 
+ *    2. Redistributions in binary form must reproduce the above copyright notice, this list
+ *       of conditions and the following disclaimer in the documentation and/or other materials
+ *       provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * 
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of JogAmp Community.
+ */
+ 
+package com.jogamp.opengl.test.junit.jogl.acore;
+
+import java.io.IOException;
+
+import com.jogamp.newt.NewtFactory;
+import com.jogamp.newt.Window;
+import com.jogamp.newt.event.WindowAdapter;
+import com.jogamp.newt.event.WindowEvent;
+import com.jogamp.newt.event.WindowListener;
+import com.jogamp.newt.event.WindowUpdateEvent;
+import com.jogamp.newt.opengl.GLWindow;
+
+import javax.media.opengl.GLAutoDrawable;
+import javax.media.opengl.GLAutoDrawableDelegate;
+import javax.media.opengl.GLCapabilities;
+import javax.media.opengl.GLContext;
+import javax.media.opengl.GLDrawable;
+import javax.media.opengl.GLDrawableFactory;
+import javax.media.opengl.GLEventListener;
+import javax.media.opengl.GLProfile;
+import com.jogamp.opengl.util.Animator;
+
+import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
+import com.jogamp.opengl.test.junit.jogl.demos.es2.RedSquareES2;
+import com.jogamp.opengl.test.junit.util.AWTRobotUtil;
+import com.jogamp.opengl.test.junit.util.QuitAdapter;
+import com.jogamp.opengl.test.junit.util.UITestCase;
+
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class TestGLContextDrawableSwitchNEWT extends UITestCase {
+    static GLProfile glp;
+    static GLCapabilities caps;
+    static int width, height;
+
+    @BeforeClass
+    public static void initClass() {
+        glp = GLProfile.getGL2ES2();
+        caps = new GLCapabilities(glp);
+        width  = 256;
+        height = 256;
+    }
+
+    /** Note: No GLContext is attached w/ this implementation ! */
+    private GLAutoDrawable createGLAutoDrawable(GLCapabilities caps, int x, int y, int width, int height, WindowListener wl) throws InterruptedException {
+        final Window window = NewtFactory.createWindow(caps);
+        Assert.assertNotNull(window);
+        window.setPosition(x, y);
+        window.setSize(width, height);
+        window.setVisible(true);
+        Assert.assertTrue(AWTRobotUtil.waitForVisible(window, true));
+        Assert.assertTrue(AWTRobotUtil.waitForRealized(window, true));
+            
+        GLDrawableFactory factory = GLDrawableFactory.getFactory(caps.getGLProfile());
+        GLDrawable drawable = factory.createGLDrawable(window);
+        Assert.assertNotNull(drawable);
+        
+        drawable.setRealized(true);
+        Assert.assertTrue(drawable.isRealized());
+        
+        final GLAutoDrawableDelegate glad = new GLAutoDrawableDelegate(drawable, null, window, false) {
+            @Override
+            protected void destroyImplInLock() {
+                super.destroyImplInLock();
+                window.destroy(); // destroys the actual window
+            }            
+        };
+        
+        // add basic window interaction
+        window.addWindowListener(new WindowAdapter() {
+            @Override
+            public void windowRepaint(WindowUpdateEvent e) {
+                glad.windowRepaintOp();
+            }
+            @Override
+            public void windowResized(WindowEvent e) {
+                glad.windowResizedOp();
+            }
+            @Override
+            public void windowDestroyNotify(WindowEvent e) {
+                glad.windowDestroyNotifyOp();
+            }
+        });
+        window.addWindowListener(wl);
+        
+        return glad;
+    }
+        
+    @Test(timeout=30000)
+    public void testSwitch2WindowSingleContext() throws InterruptedException {
+        final QuitAdapter quitAdapter = new QuitAdapter();
+        
+        GLAutoDrawable glad1 = createGLAutoDrawable(caps,         64, 64,     width,     height, quitAdapter); // no GLContext!
+        GLAutoDrawable glad2 = createGLAutoDrawable(caps, 2*64+width, 64, width+100, height+100, quitAdapter); // no GLContext!
+        
+        // create single context using glad1 and assign it to glad1 
+        {
+            GLContext singleCtx = glad1.createContext(null);
+            Assert.assertNotNull(singleCtx);        
+            int res = singleCtx.makeCurrent();
+            Assert.assertTrue(GLContext.CONTEXT_CURRENT_NEW==res || GLContext.CONTEXT_CURRENT==res);
+            singleCtx.release();
+            glad1.setContext(singleCtx);
+        }
+        
+        GearsES2 gears = new GearsES2(1);
+        glad1.addGLEventListener(gears);
+        
+        Animator animator = new Animator();
+        animator.add(glad1);
+        animator.add(glad2);
+        animator.start();
+        
+        int s = 0;
+        long t0 = System.currentTimeMillis();
+        long t1 = t0;
+        
+        while( !quitAdapter.shouldQuit() && ( t1 - t0 ) < duration ) {
+            if( ( t1 - t0 ) / period > s) {
+                s++;
+                System.err.println(s+" - switch - START "+ ( t1 - t0 ));
+                animator.pause();
+
+                if(0 == s%2) {
+                    glad1.addGLEventListener(0, glad2.removeGLEventListener(0));
+                    GLContext ctx1 = glad1.setContext(glad2.getContext());
+                    glad2.setContext(ctx1);
+                } else {
+                    glad2.addGLEventListener(0, glad1.removeGLEventListener(0));
+                    GLContext ctx2 = glad2.setContext(glad1.getContext());                    
+                    glad1.setContext(ctx2);
+                }
+                
+                System.err.println(s+" - switch - END "+ ( t1 - t0 ));
+                
+                animator.resume();
+            }
+            Thread.sleep(100);
+            t1 = System.currentTimeMillis();
+        }
+
+        animator.stop();
+        glad1.destroy();
+        glad2.destroy();        
+    }
+    
+    @Test(timeout=30000)
+    public void testSwitch2GLWindowOneDemo() throws InterruptedException {
+        GearsES2 gears = new GearsES2(1);
+        final QuitAdapter quitAdapter = new QuitAdapter();
+        
+        GLWindow glWindow1 = GLWindow.create(caps);        
+        glWindow1.setTitle("win1");
+        glWindow1.setSize(width, height);
+        glWindow1.setPosition(64, 64);
+        glWindow1.addGLEventListener(0, gears);
+        glWindow1.addWindowListener(quitAdapter);
+        
+        GLWindow glWindow2 = GLWindow.create(caps);                
+        glWindow2.setTitle("win2");        
+        glWindow2.setSize(width+100, height+100);
+        glWindow2.setPosition(2*64+width, 64);
+        glWindow2.addWindowListener(quitAdapter);
+
+        Animator animator = new Animator();
+        animator.add(glWindow1);
+        animator.add(glWindow2);
+        animator.start();
+        
+        glWindow1.setVisible(true);
+        glWindow2.setVisible(true);
+
+        int s = 0;
+        long t0 = System.currentTimeMillis();
+        long t1 = t0;
+        
+        while( !quitAdapter.shouldQuit() && ( t1 - t0 ) < duration ) {
+            if( ( t1 - t0 ) / period > s) {
+                s++;
+                System.err.println(s+" - switch - START "+ ( t1 - t0 ));
+                animator.pause();
+
+                if(0 == s%2) {
+                    glWindow1.addGLEventListener(0, glWindow2.removeGLEventListener(0));
+                    GLContext ctx1 = glWindow1.setContext(glWindow2.getContext());
+                    glWindow2.setContext(ctx1);
+                } else {
+                    glWindow2.addGLEventListener(0, glWindow1.removeGLEventListener(0));
+                    GLContext ctx2 = glWindow2.setContext(glWindow1.getContext());                    
+                    glWindow1.setContext(ctx2);
+                }
+                
+                System.err.println(s+" - switch - END "+ ( t1 - t0 ));
+                
+                animator.resume();
+            }
+            Thread.sleep(100);
+            t1 = System.currentTimeMillis();
+        }
+
+        animator.stop();
+        glWindow1.destroy();
+        glWindow2.destroy();
+        
+    }
+    
+    @Test(timeout=30000)
+    public void testSwitch2GLWindowEachWithOwnDemo() throws InterruptedException {
+        GearsES2 gears = new GearsES2(1);
+        RedSquareES2 rsquare = new RedSquareES2(1);
+        final QuitAdapter quitAdapter = new QuitAdapter();
+        
+        GLWindow glWindow1 = GLWindow.create(caps);        
+        glWindow1.setTitle("win1");
+        glWindow1.setSize(width, height);
+        glWindow1.setPosition(64, 64);
+        glWindow1.addGLEventListener(0, gears);
+        glWindow1.addWindowListener(quitAdapter);
+        
+        GLWindow glWindow2 = GLWindow.create(caps);                
+        glWindow2.setTitle("win2");        
+        glWindow2.setSize(width+100, height+100);
+        glWindow2.setPosition(2*64+width, 64);
+        glWindow2.addGLEventListener(0, rsquare);
+        glWindow2.addWindowListener(quitAdapter);
+
+        Animator animator = new Animator();
+        animator.add(glWindow1);
+        animator.add(glWindow2);
+        animator.start();
+        
+        glWindow1.setVisible(true);
+        glWindow2.setVisible(true);
+
+        int s = 0;
+        long t0 = System.currentTimeMillis();
+        long t1 = t0;
+        
+        while( !quitAdapter.shouldQuit() && ( t1 - t0 ) < duration ) {
+            if( ( t1 - t0 ) / period > s) {
+                s++;
+                System.err.println(s+" - switch - START "+ ( t1 - t0 ));
+                animator.pause();
+                
+                GLEventListener demo1 = glWindow1.removeGLEventListener(0);
+                GLEventListener demo2 = glWindow2.removeGLEventListener(0);
+                
+                GLContext ctx1 = glWindow1.setContext(glWindow2.getContext());
+                glWindow1.addGLEventListener(0, demo2);
+                
+                glWindow2.setContext(ctx1);
+                glWindow2.addGLEventListener(0, demo1);
+                
+                System.err.println(s+" - switch - END "+ ( t1 - t0 ));
+                
+                animator.resume();
+            }
+            Thread.sleep(100);
+            t1 = System.currentTimeMillis();
+        }
+
+        animator.stop();
+        glWindow1.destroy();
+        glWindow2.destroy();
+        
+    }
+
+    // default timing for 2 switches
+    static long duration = 2200; // ms
+    static long period = 1000; // ms
+
+    public static void main(String args[]) throws IOException {
+        for(int i=0; i<args.length; i++) {
+            if(args[i].equals("-time")) {
+                i++;
+                try {
+                    duration = Integer.parseInt(args[i]);
+                } catch (Exception ex) { ex.printStackTrace(); }
+            } else if(args[i].equals("-period")) {
+                i++;
+                try {
+                    period = Integer.parseInt(args[i]);
+                } catch (Exception ex) { ex.printStackTrace(); }
+            }
+        }
+        /**
+        BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
+        System.err.println("Press enter to continue");
+        System.err.println(stdin.readLine()); */         
+        org.junit.runner.JUnitCore.main(TestGLContextDrawableSwitchNEWT.class.getName());
+    }
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLContextSurfaceLockNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLContextSurfaceLockNEWT.java
index 78988c0..b3516d6 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLContextSurfaceLockNEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLContextSurfaceLockNEWT.java
@@ -33,9 +33,9 @@ import java.io.IOException;
 import javax.media.nativewindow.NativeSurface;
 import javax.media.opengl.GLAutoDrawable;
 import javax.media.opengl.GLCapabilities;
+import javax.media.opengl.GLEventListener;
 import javax.media.opengl.GLProfile;
 
-import org.junit.Assert;
 import org.junit.Test;
 
 import com.jogamp.newt.opengl.GLWindow;
@@ -69,7 +69,7 @@ public class TestGLContextSurfaceLockNEWT extends UITestCase {
         }
         
         public void run() {
-            System.err.println("Animatr "+id+": PRE: "+Thread.currentThread().getName());
+            System.err.println("Animatr "+id+", count "+frameCount+": PRE: "+Thread.currentThread().getName());
             
             for(int c=0; c<frameCount; c++) {
                 glad.display();
@@ -99,10 +99,10 @@ public class TestGLContextSurfaceLockNEWT extends UITestCase {
         }
         
         public void run() {
-            System.err.println("Resizer "+id+": PRE: "+Thread.currentThread().getName());
+            System.err.println("Resizer "+id+", count "+actionCount+": PRE: "+Thread.currentThread().getName());
             
             for(int c=0; c<actionCount; c++) {
-                win.runOnEDTIfAvail(false, new Runnable() {
+                win.runOnEDTIfAvail(true, new Runnable() {
                     public void run() {
                         // Normal resize, may trigger immediate display within lock
                         win.setSize(win.getWidth()+1, win.getHeight()+1);
@@ -148,41 +148,80 @@ public class TestGLContextSurfaceLockNEWT extends UITestCase {
         return true;
     }
     
+    protected class MyEventCounter implements GLEventListener {
+        volatile int reshapeCount = 0;
+        volatile int displayCount = 0;
+        
+        @Override
+        public void init(GLAutoDrawable drawable) {
+        }
+
+        @Override
+        public void dispose(GLAutoDrawable drawable) {
+            System.err.println("*** reshapes: "+reshapeCount+", displays "+displayCount);
+        }
+
+        @Override
+        public void display(GLAutoDrawable drawable) {
+            displayCount++;
+        }
+
+        @Override
+        public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
+            reshapeCount++;
+        }
+        
+        public void reset() {
+            reshapeCount = 0;
+            displayCount = 0;            
+        }
+    }
+    
     protected void runJOGLTasks(int animThreadCount, int frameCount, int reszThreadCount, int resizeCount) throws InterruptedException {
-        GLWindow glWindow = GLWindow.create(new GLCapabilities(GLProfile.getDefault()));
-        Assert.assertNotNull(glWindow);
+        final GLWindow glWindow = GLWindow.create(new GLCapabilities(GLProfile.getDefault()));
+        final MyEventCounter myEventCounter = new MyEventCounter();
         
         glWindow.addGLEventListener(new GearsES2(0));
+        glWindow.addGLEventListener(myEventCounter);
         glWindow.setSize(demoSize, demoSize);
         glWindow.setVisible(true);
         
         final String currentThreadName = Thread.currentThread().getName();
         final Object sync = new Object();
-        final MyRunnable[] tasks = new MyRunnable[animThreadCount+reszThreadCount];
-        final Thread[] threads = new Thread[animThreadCount+reszThreadCount];
-        int i=0;
+        final MyRunnable[] animTasks = new MyRunnable[animThreadCount];
+        final MyRunnable[] resizeTasks = new MyRunnable[animThreadCount];
+        final Thread[] animThreads = new Thread[reszThreadCount];
+        final Thread[] resizeThreads = new Thread[reszThreadCount];
         
         System.err.println("animThreadCount "+animThreadCount+", frameCount "+frameCount);
         System.err.println("reszThreadCount "+reszThreadCount+", resizeCount "+resizeCount);
-        System.err.println("tasks "+tasks.length+", threads "+threads.length);
+        System.err.println("tasks "+(animTasks.length+resizeTasks.length)+", threads "+(animThreads.length+resizeThreads.length));
 
-        for(; i<animThreadCount; i++) {
+        for(int i=0; i<animThreadCount; i++) {
             System.err.println("create anim task/thread "+i);
-            tasks[i] = new RudeAnimator(glWindow, frameCount, sync, i);                
-            threads[i] = new Thread(tasks[i], currentThreadName+"-anim"+i);
+            animTasks[i] = new RudeAnimator(glWindow, frameCount, sync, i);
+            animThreads[i] = new Thread(animTasks[i], currentThreadName+"-anim"+i);
         }
-        for(; i<animThreadCount+reszThreadCount; i++) {
+        for(int i=0; i<reszThreadCount; i++) {
             System.err.println("create resz task/thread "+i);
-            tasks[i] = new RudeResizer(glWindow, resizeCount, sync, i);
-            threads[i] = new Thread(tasks[i], currentThreadName+"-resz"+i);
+            resizeTasks[i] = new RudeResizer(glWindow, resizeCount, sync, i);
+            resizeThreads[i] = new Thread(resizeTasks[i], currentThreadName+"-resz"+i);
         }
 
-        for(i=0; i<animThreadCount+reszThreadCount; i++) {
-            System.err.println("start thread "+i);
-            threads[i].start();
+        myEventCounter.reset();
+        
+        int j=0, k=0;
+        for(int i=0; i<reszThreadCount+animThreadCount; i++) {
+            if(0==i%2) {
+                System.err.println("start resize thread "+j);
+                resizeThreads[j++].start();
+            } else {
+                System.err.println("start anim thread "+k);
+                animThreads[k++].start();
+            }
         }
         synchronized (sync) {
-            while(!done(tasks)) {
+            while(!done(resizeTasks) || !done(animTasks)) {
                 try {
                     sync.wait();
                 } catch (InterruptedException e) {
@@ -190,8 +229,8 @@ public class TestGLContextSurfaceLockNEWT extends UITestCase {
                 }
             }
         }
-        i=0;
-        while(i<30 && !isDead(threads)) {
+        int i=0;
+        while(i<30 && !isDead(animThreads) && !isDead(resizeThreads)) {
             Thread.sleep(100);
             i++;
         }
@@ -200,8 +239,13 @@ public class TestGLContextSurfaceLockNEWT extends UITestCase {
     }
     
     @Test
-    public void test01_1AThreads_600Frames() throws InterruptedException {
-        runJOGLTasks(1, 600, 1, 600);
+    public void test01_1A1RThreads_100Resizes() throws InterruptedException {
+        runJOGLTasks(1, 200, 1, 100);
+    }
+    
+    @Test
+    public void test01_3A3RThreads_50Resizes() throws InterruptedException {
+        runJOGLTasks(3, 100, 3, 50);
     }
     
     public static void main(String args[]) throws IOException {
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile01NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile01NEWT.java
index 2c89ec7..d942912 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile01NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile01NEWT.java
@@ -54,7 +54,7 @@ public class TestGLProfile01NEWT extends UITestCase {
         System.err.println(JoglVersion.getInstance());
         System.err.println(NewtVersion.getInstance());
 
-        System.err.println(JoglVersion.getDefaultOpenGLInfo(null).toString());        
+        System.err.println(JoglVersion.getDefaultOpenGLInfo(null, null, true).toString());        
     }
 
     @Test
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestInitConcurrentNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestInitConcurrentNEWT.java
index 8c0213e..7127b0a 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestInitConcurrentNEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestInitConcurrentNEWT.java
@@ -91,7 +91,7 @@ public class TestInitConcurrentNEWT extends UITestCase {
             glWindow.setTitle("Task "+id);
             glWindow.setPosition(x + insets.getLeftWidth(), y + insets.getTopHeight() );
     
-            glWindow.addGLEventListener(new GearsES2(1));
+            glWindow.addGLEventListener(new GearsES2(0));
     
             Animator animator = new Animator(glWindow);
     
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestNEWTCloseX11DisplayBug565.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestNEWTCloseX11DisplayBug565.java
index e14d5b8..33a9b77 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestNEWTCloseX11DisplayBug565.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestNEWTCloseX11DisplayBug565.java
@@ -43,10 +43,10 @@ public class TestNEWTCloseX11DisplayBug565 {
 
         if(NativeWindowFactory.TYPE_X11 == NativeWindowFactory.getNativeWindowType(false)) {
             final int openD = X11Util.getOpenDisplayConnectionNumber() - open0;
-            if(openD>1) {
+            if( openD > 0) {
                 X11Util.dumpOpenDisplayConnections();
                 X11Util.dumpPendingDisplayConnections();
-                Assert.assertTrue("More than 1 new open display connections", false);
+                Assert.assertEquals("New display connection didn't close", 0, openD);
             }
         }
       }
@@ -86,10 +86,10 @@ public class TestNEWTCloseX11DisplayBug565 {
 
         if(NativeWindowFactory.TYPE_X11 == NativeWindowFactory.getNativeWindowType(false)) {
             final int openD = X11Util.getOpenDisplayConnectionNumber() - open0;
-            if(openD>1) {
+            if(openD > 0) {
                 X11Util.dumpOpenDisplayConnections();
                 X11Util.dumpPendingDisplayConnections();
-                Assert.assertTrue("More than 1 new open display connections", false);
+                Assert.assertEquals("New display connection didn't close", 0, openD);
             }
         }
       }
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestShutdownCompleteNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestShutdownCompleteNEWT.java
index 4592841..b21ad5b 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestShutdownCompleteNEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestShutdownCompleteNEWT.java
@@ -39,6 +39,7 @@ import org.junit.Assert;
 import org.junit.Test;
 
 import com.jogamp.newt.opengl.GLWindow;
+import com.jogamp.opengl.JoglVersion;
 import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
 import com.jogamp.opengl.test.junit.util.UITestCase;
 import com.jogamp.opengl.util.Animator;
@@ -73,7 +74,7 @@ public class TestShutdownCompleteNEWT extends UITestCase {
         glWindow.destroy();
     }
 
-    protected void oneLife() throws InterruptedException {
+    protected void oneLife(boolean glInfo) throws InterruptedException {
         if(waitForEach) {
             waitForEnter();
         }
@@ -84,28 +85,32 @@ public class TestShutdownCompleteNEWT extends UITestCase {
             runTestGL();
         }
         long t2 = System.nanoTime();
+        if(glInfo) {
+            System.err.println(JoglVersion.getDefaultOpenGLInfo(null, null, false).toString());
+        }
+        long t3 = System.nanoTime();        
         GLProfile.shutdown(GLProfile.ShutdownType.COMPLETE);        
-        long t3 = System.nanoTime();
+        long t4 = System.nanoTime();
         System.err.println("Total:                          "+ (t3-t0)/1e6 +"ms"); 
         System.err.println("  GLProfile.initSingleton():    "+ (t1-t0)/1e6 +"ms"); 
         System.err.println("  Demo Code:                    "+ (t2-t1)/1e6 +"ms"); 
-        System.err.println("  GLProfile.shutdown(COMPLETE): "+ (t3-t2)/1e6 +"ms"); 
+        System.err.println("  GLProfile.shutdown(COMPLETE): "+ (t4-t3)/1e6 +"ms"); 
     }
     
     @Test
     public void test01OneLife() throws InterruptedException {
-        oneLife();
+        oneLife(true);
     }
 
     @Test
     public void test01AnotherLife() throws InterruptedException {
-        oneLife();
+        oneLife(false);
     }
     
     @Test
     public void test01TwoLifes() throws InterruptedException {
-        oneLife();
-        oneLife();
+        oneLife(false);
+        oneLife(false);
     }
     
     static boolean initOnly = false;
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestAWTCardLayoutAnimatorStartStopBug532.java b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestAWTCardLayoutAnimatorStartStopBug532.java
index 8384e5b..3f69355 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestAWTCardLayoutAnimatorStartStopBug532.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestAWTCardLayoutAnimatorStartStopBug532.java
@@ -9,11 +9,8 @@ import java.awt.event.WindowAdapter;
 import java.awt.event.WindowEvent;
 import java.lang.reflect.InvocationTargetException;
 
-import javax.media.nativewindow.NativeWindow;
 import javax.media.opengl.GLAnimatorControl;
-import javax.media.opengl.GLAutoDrawable;
 import javax.media.opengl.GLCapabilities;
-import javax.media.opengl.GLEventListener;
 import javax.media.opengl.GLProfile;
 import javax.media.opengl.awt.GLCanvas;
 import javax.swing.JComboBox;
@@ -21,11 +18,8 @@ import javax.swing.JFrame;
 import javax.swing.JLabel;
 import javax.swing.JPanel;
 
-import jogamp.nativewindow.windows.GDI;
-
 import org.junit.Test;
 
-import com.jogamp.common.os.Platform;
 import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
 import com.jogamp.opengl.test.junit.util.MiscUtils;
 import com.jogamp.opengl.test.junit.util.UITestCase;
@@ -83,7 +77,7 @@ public class TestAWTCardLayoutAnimatorStartStopBug532 extends UITestCase {
       canvas.setPreferredSize(new Dimension(640, 480));
       
       final GLAnimatorControl animatorCtrl = useFPSAnimator ? new FPSAnimator(canvas, 60) : new Animator(canvas);
-      animatorCtrl.setUpdateFPSFrames(60, System.err);
+      animatorCtrl.setUpdateFPSFrames(60, null);// System.err);
       switch (animCtrl) {
           case PauseResume:
               animatorCtrl.start();
@@ -92,6 +86,7 @@ public class TestAWTCardLayoutAnimatorStartStopBug532 extends UITestCase {
           case Continue:
               animatorCtrl.start();
               break;
+          default:
       }
 
       canvas.addGLEventListener(new GearsES2(1));
@@ -141,6 +136,7 @@ public class TestAWTCardLayoutAnimatorStartStopBug532 extends UITestCase {
                        case PauseResume:
                            animatorCtrl.resume();
                            break;
+                       default:
                     }
                     selected = CANVAS;
                 } else if(newSelection.equals(LABEL)) {
@@ -151,6 +147,7 @@ public class TestAWTCardLayoutAnimatorStartStopBug532 extends UITestCase {
                        case PauseResume:
                            animatorCtrl.pause();
                            break;
+                       default:
                     }
                     cl.show(cards, LABEL); 
                     selected = LABEL;
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/caps/MultisampleChooser01.java b/src/test/com/jogamp/opengl/test/junit/jogl/caps/MultisampleChooser01.java
index c2182b8..efdd2e1 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/caps/MultisampleChooser01.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/caps/MultisampleChooser01.java
@@ -40,12 +40,17 @@
 package com.jogamp.opengl.test.junit.jogl.caps;
 
 import java.util.List;
+
+import javax.media.nativewindow.CapabilitiesImmutable;
 import javax.media.opengl.DefaultGLCapabilitiesChooser;
 import javax.media.opengl.GLCapabilitiesImmutable;
 
 class MultisampleChooser01 extends DefaultGLCapabilitiesChooser {
 
-    public int chooseCapabilities(GLCapabilitiesImmutable desired, List/*<GLCapabilitiesImmutable>*/ available, int windowSystemRecommendedChoice) {
+    @Override
+    public int chooseCapabilities(final CapabilitiesImmutable desired, 
+                                  final List<? extends CapabilitiesImmutable> available, 
+                                  final int windowSystemRecommendedChoice) {
         boolean anyHaveSampleBuffers = false;
         for (int i = 0; i < available.size(); i++) {
             GLCapabilitiesImmutable caps = (GLCapabilitiesImmutable) available.get(i);
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/caps/TestMultisampleES1AWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/caps/TestMultisampleES1AWT.java
index 517d125..478bd45 100755
--- a/src/test/com/jogamp/opengl/test/junit/jogl/caps/TestMultisampleES1AWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/caps/TestMultisampleES1AWT.java
@@ -44,19 +44,24 @@ import java.lang.reflect.InvocationTargetException;
 import java.awt.BorderLayout;
 import java.awt.Frame;
 
+import javax.media.opengl.GLAutoDrawable;
 import javax.media.opengl.GLCapabilities;
 import javax.media.opengl.GLCapabilitiesChooser;
+import javax.media.opengl.GLEventListener;
 import javax.media.opengl.GLProfile;
 import javax.media.opengl.awt.GLCanvas;
 
+import com.jogamp.opengl.test.junit.jogl.demos.es1.MultisampleDemoES1;
 import com.jogamp.opengl.test.junit.util.MiscUtils;
 import com.jogamp.opengl.test.junit.util.UITestCase;
+import com.jogamp.opengl.util.GLReadBufferUtil;
+import com.jogamp.opengl.util.texture.TextureIO;
 
 import org.junit.Test;
 
 
 public class TestMultisampleES1AWT extends UITestCase {
-  static long durationPerTest = 250; // ms
+  static long durationPerTest = 60; // ms
   private GLCanvas canvas;
 
   public static void main(String[] args) {
@@ -71,32 +76,44 @@ public class TestMultisampleES1AWT extends UITestCase {
   }
 
   @Test
-  public void testMultiSampleAA4() throws InterruptedException, InvocationTargetException {
+  public void testOnscreenMultiSampleAA0() throws InterruptedException, InvocationTargetException {
+    testMultiSampleAAImpl(0);
+  }
+
+  @Test
+  public void testOnscreenMultiSampleAA4() throws InterruptedException, InvocationTargetException {
     testMultiSampleAAImpl(4);
   }
 
   @Test
-  public void testMultiSampleNone() throws InterruptedException, InvocationTargetException {
-    testMultiSampleAAImpl(0);
+  public void testOnscreenMultiSampleAA8() throws InterruptedException, InvocationTargetException {
+    testMultiSampleAAImpl(8);
   }
 
-  private void testMultiSampleAAImpl(int samples) throws InterruptedException, InvocationTargetException {
+  private void testMultiSampleAAImpl(int reqSamples) throws InterruptedException, InvocationTargetException {
+    final GLReadBufferUtil screenshot = new GLReadBufferUtil(true, false);
     GLProfile glp = GLProfile.getMaxFixedFunc(true);
     GLCapabilities caps = new GLCapabilities(glp);
     GLCapabilitiesChooser chooser = new MultisampleChooser01();
 
-    if(samples>0) {
+    if(reqSamples>0) {
         caps.setSampleBuffers(true);
-        caps.setNumSamples(samples);
-        // turns out we need to have alpha, 
-        // otherwise no AA will be visible.
-        caps.setAlphaBits(1); 
+        caps.setNumSamples(reqSamples);
     }
 
     canvas = new GLCanvas(caps, chooser, null, null);
-    canvas.addGLEventListener(new MultisampleDemoES1(samples>0?true:false));
+    canvas.addGLEventListener(new MultisampleDemoES1(reqSamples>0?true:false));
+    canvas.addGLEventListener(new GLEventListener() {
+        int displayCount = 0;
+        public void init(GLAutoDrawable drawable) {}
+        public void dispose(GLAutoDrawable drawable) {}
+        public void display(GLAutoDrawable drawable) {
+            snapshot(getSimpleTestName("."), displayCount++, null, drawable.getGL(), screenshot, TextureIO.PNG, null);
+        }
+        public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) { }
+    });
     
-    final Frame frame = new Frame("Multi Samples "+samples);
+    final Frame frame = new Frame("Multi Samples "+reqSamples);
     frame.setLayout(new BorderLayout());
     canvas.setSize(512, 512);
     frame.add(canvas, BorderLayout.CENTER);
@@ -105,7 +122,6 @@ public class TestMultisampleES1AWT extends UITestCase {
     javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
         public void run() {
             frame.setVisible(true);
-            frame.setLocation(0, 0);
             canvas.requestFocus();
             canvas.display();
         }});
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/caps/TestMultisampleES1NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/caps/TestMultisampleES1NEWT.java
index cdfeb2b..ed8e2bd 100755
--- a/src/test/com/jogamp/opengl/test/junit/jogl/caps/TestMultisampleES1NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/caps/TestMultisampleES1NEWT.java
@@ -40,17 +40,23 @@
 
 package com.jogamp.opengl.test.junit.jogl.caps;
 
+import javax.media.opengl.GLAutoDrawable;
 import javax.media.opengl.GLCapabilities;
 import javax.media.opengl.GLCapabilitiesChooser;
+import javax.media.opengl.GLEventListener;
 import javax.media.opengl.GLProfile;
 
 import org.junit.Test;
 
 import com.jogamp.newt.opengl.GLWindow;
+import com.jogamp.opengl.test.junit.jogl.demos.es1.MultisampleDemoES1;
 import com.jogamp.opengl.test.junit.util.MiscUtils;
+import com.jogamp.opengl.test.junit.util.UITestCase;
+import com.jogamp.opengl.util.GLReadBufferUtil;
+import com.jogamp.opengl.util.texture.TextureIO;
 
-public class TestMultisampleES1NEWT {
-  static long durationPerTest = 500; // ms
+public class TestMultisampleES1NEWT extends UITestCase {
+  static long durationPerTest = 60; // ms
   private GLWindow window;
 
   public static void main(String[] args) {
@@ -65,35 +71,74 @@ public class TestMultisampleES1NEWT {
   }
 
   @Test
-  public void testMultiSampleAA4() throws InterruptedException {
-    testMultiSampleAAImpl(4);
+  public void testOnscreenMultiSampleAA0() throws InterruptedException {
+    testMultiSampleAAImpl(true, 0);
   }
 
-  // @Test
-  public void testMultiSampleNone() throws InterruptedException {
-    testMultiSampleAAImpl(0);
+  @Test
+  public void testOnscreenMultiSampleAA2() throws InterruptedException {
+    testMultiSampleAAImpl(true, 2);
+  }
+
+  @Test
+  public void testOnscreenMultiSampleAA4() throws InterruptedException {
+    testMultiSampleAAImpl(true, 4);
   }
 
-  private void testMultiSampleAAImpl(int samples) throws InterruptedException {
+  @Test
+  public void testOnscreenMultiSampleAA8() throws InterruptedException {
+    testMultiSampleAAImpl(true, 8);
+  }
+
+  @Test
+  public void testOffscreenMultiSampleAA0() throws InterruptedException {
+    testMultiSampleAAImpl(false, 0);
+  }
+
+  @Test
+  public void testOffscreenMultiSampleAA2() throws InterruptedException {
+    testMultiSampleAAImpl(false, 2);
+  }
+
+  @Test
+  public void testOffscreenMultiSampleAA4() throws InterruptedException {
+    testMultiSampleAAImpl(false, 4);
+  }
+
+  @Test
+  public void testOffsreenMultiSampleAA8() throws InterruptedException {
+    testMultiSampleAAImpl(false, 8);
+  }
+
+  private void testMultiSampleAAImpl(boolean onscreen, int reqSamples) throws InterruptedException {
+    final GLReadBufferUtil screenshot = new GLReadBufferUtil(true, false);
     GLProfile glp = GLProfile.getMaxFixedFunc(true);
     GLCapabilities caps = new GLCapabilities(glp);
     GLCapabilitiesChooser chooser = new MultisampleChooser01();
 
-    if(samples>0) {
+    if(!onscreen) {
+        caps.setOnscreen(onscreen);
+        caps.setPBuffer(true);
+    }
+    if(reqSamples>0) {
         caps.setSampleBuffers(true);
-        caps.setNumSamples(4);
+        caps.setNumSamples(reqSamples);
     }
-    // turns out we need to have alpha, 
-    // otherwise no AA will be visible.
-    // This is done implicit now ..
-    // caps.setAlphaBits(1); 
 
     window = GLWindow.create(caps);
     window.setCapabilitiesChooser(chooser);
-    window.addGLEventListener(new MultisampleDemoES1(samples>0?true:false));
+    window.addGLEventListener(new MultisampleDemoES1(reqSamples>0?true:false));
+    window.addGLEventListener(new GLEventListener() {
+        int displayCount = 0;
+        public void init(GLAutoDrawable drawable) {}
+        public void dispose(GLAutoDrawable drawable) {}
+        public void display(GLAutoDrawable drawable) {
+            snapshot(getSimpleTestName("."), displayCount++, null, drawable.getGL(), screenshot, TextureIO.PNG, null);
+        }
+        public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) { }
+    });
     window.setSize(512, 512);
     window.setVisible(true);
-    window.setPosition(0, 0);
     window.requestFocus();
 
     Thread.sleep(durationPerTest);
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/caps/TestMultisampleES1NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/caps/TestMultisampleES2NEWT.java
old mode 100755
new mode 100644
similarity index 55%
copy from src/test/com/jogamp/opengl/test/junit/jogl/caps/TestMultisampleES1NEWT.java
copy to src/test/com/jogamp/opengl/test/junit/jogl/caps/TestMultisampleES2NEWT.java
index cdfeb2b..02fcae6
--- a/src/test/com/jogamp/opengl/test/junit/jogl/caps/TestMultisampleES1NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/caps/TestMultisampleES2NEWT.java
@@ -40,18 +40,23 @@
 
 package com.jogamp.opengl.test.junit.jogl.caps;
 
+import javax.media.opengl.GLAutoDrawable;
 import javax.media.opengl.GLCapabilities;
 import javax.media.opengl.GLCapabilitiesChooser;
+import javax.media.opengl.GLEventListener;
 import javax.media.opengl.GLProfile;
 
 import org.junit.Test;
 
 import com.jogamp.newt.opengl.GLWindow;
+import com.jogamp.opengl.test.junit.jogl.demos.es2.MultisampleDemoES2;
 import com.jogamp.opengl.test.junit.util.MiscUtils;
+import com.jogamp.opengl.test.junit.util.UITestCase;
+import com.jogamp.opengl.util.GLReadBufferUtil;
+import com.jogamp.opengl.util.texture.TextureIO;
 
-public class TestMultisampleES1NEWT {
-  static long durationPerTest = 500; // ms
-  private GLWindow window;
+public class TestMultisampleES2NEWT extends UITestCase {
+  static long durationPerTest = 60; // ms
 
   public static void main(String[] args) {
      for(int i=0; i<args.length; i++) {
@@ -60,40 +65,73 @@ public class TestMultisampleES1NEWT {
         }
      }
      System.out.println("durationPerTest: "+durationPerTest);
-     String tstname = TestMultisampleES1NEWT.class.getName();
+     String tstname = TestMultisampleES2NEWT.class.getName();
      org.junit.runner.JUnitCore.main(tstname);
   }
 
   @Test
-  public void testMultiSampleAA4() throws InterruptedException {
-    testMultiSampleAAImpl(4);
+  public void testOnscreenMultiSampleAA0() throws InterruptedException {
+    testMultiSampleAAImpl(false, false, 0);
   }
 
-  // @Test
-  public void testMultiSampleNone() throws InterruptedException {
-    testMultiSampleAAImpl(0);
+  @Test
+  public void testOnscreenMultiSampleAA8() throws InterruptedException {
+    testMultiSampleAAImpl(false, false, 8);
+  }
+
+  @Test
+  public void testOffscreenPBufferMultiSampleAA0() throws InterruptedException {
+    testMultiSampleAAImpl(false, true, 0);
+  }
+
+  @Test(timeout = 3000) // 3s timeout
+  public void testOffsreenPBufferMultiSampleAA8() throws InterruptedException {
+    testMultiSampleAAImpl(false, true, 8);
   }
 
-  private void testMultiSampleAAImpl(int samples) throws InterruptedException {
-    GLProfile glp = GLProfile.getMaxFixedFunc(true);
+  @Test(timeout = 3000) // 3s timeout
+  public void testOffscreenFBOMultiSampleAA0() throws InterruptedException {
+    testMultiSampleAAImpl(true, false, 0);
+  }
+
+  @Test(timeout = 3000) // 3s timeout
+  public void testOffsreenFBOMultiSampleAA8() throws InterruptedException {
+    testMultiSampleAAImpl(true, false, 8);
+  }
+
+  private void testMultiSampleAAImpl(boolean useFBO, boolean usePBuffer, int reqSamples) throws InterruptedException {
+    if(useFBO) {
+        System.err.println("NEWT offscreen FBO Window n/a yet");
+        return;
+    }
+    final GLReadBufferUtil screenshot = new GLReadBufferUtil(true, false);
+    GLProfile glp = GLProfile.getGL2ES2();
     GLCapabilities caps = new GLCapabilities(glp);
     GLCapabilitiesChooser chooser = new MultisampleChooser01();
 
-    if(samples>0) {
+    caps.setAlphaBits(1);
+    caps.setFBO(useFBO);
+    caps.setPBuffer(usePBuffer);
+    
+    if(reqSamples>0) {
         caps.setSampleBuffers(true);
-        caps.setNumSamples(4);
+        caps.setNumSamples(reqSamples);
     }
-    // turns out we need to have alpha, 
-    // otherwise no AA will be visible.
-    // This is done implicit now ..
-    // caps.setAlphaBits(1); 
 
-    window = GLWindow.create(caps);
+    final GLWindow window = GLWindow.create(caps);
     window.setCapabilitiesChooser(chooser);
-    window.addGLEventListener(new MultisampleDemoES1(samples>0?true:false));
+    window.addGLEventListener(new MultisampleDemoES2(reqSamples>0?true:false));
+    window.addGLEventListener(new GLEventListener() {
+        int displayCount = 0;
+        public void init(GLAutoDrawable drawable) {}
+        public void dispose(GLAutoDrawable drawable) {}
+        public void display(GLAutoDrawable drawable) {
+            snapshot(getSimpleTestName("."), displayCount++, null, drawable.getGL(), screenshot, TextureIO.PNG, null);
+        }
+        public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) { }
+    });
     window.setSize(512, 512);
     window.setVisible(true);
-    window.setPosition(0, 0);
     window.requestFocus();
 
     Thread.sleep(durationPerTest);
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/caps/TestTranslucencyAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/caps/TestTranslucencyAWT.java
index 8e72096..7cce5d1 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/caps/TestTranslucencyAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/caps/TestTranslucencyAWT.java
@@ -65,7 +65,6 @@ public class TestTranslucencyAWT extends UITestCase {
     public static void initClass() {
         size = new Dimension(400,200);
         glCaps = new GLCapabilities(null);
-        glCaps.setAlphaBits(8);
         glCaps.setBackgroundOpaque(false);
     }
 
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es1/GearsES1.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es1/GearsES1.java
index fb2c9c7..e81d1b4 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es1/GearsES1.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es1/GearsES1.java
@@ -48,6 +48,9 @@ public class GearsES1 implements GLEventListener {
   private GearsObject gear1=null, gear2=null, gear3=null;
   private float angle = 0.0f;
   private int swapInterval;
+  private MouseListener gearsMouse = new GearsMouseAdapter();    
+  private KeyListener gearsKeys = new GearsKeyAdapter();
+
 
   private int prevMouseX, prevMouseY;
 
@@ -126,16 +129,13 @@ public class GearsES1 implements GLEventListener {
             
     gl.glEnable(GL2ES1.GL_NORMALIZE);
                 
-    // MouseListener gearsMouse = new TraceMouseAdapter(new GearsMouseAdapter());
-    MouseListener gearsMouse = new GearsMouseAdapter();    
-    KeyListener gearsKeys = new GearsKeyAdapter();
-
-    if (drawable instanceof Window) {
-        Window window = (Window) drawable;
+    final Object upstreamWidget = drawable.getUpstreamWidget();
+    if (upstreamWidget instanceof Window) {            
+        final Window window = (Window) upstreamWidget;
         window.addMouseListener(gearsMouse);
         window.addKeyListener(gearsKeys);
-    } else if (GLProfile.isAWTAvailable() && drawable instanceof java.awt.Component) {
-        java.awt.Component comp = (java.awt.Component) drawable;
+    } else if (GLProfile.isAWTAvailable() && upstreamWidget instanceof java.awt.Component) {
+        final java.awt.Component comp = (java.awt.Component) upstreamWidget;
         new com.jogamp.newt.event.awt.AWTMouseAdapter(gearsMouse).addTo(comp);
         new com.jogamp.newt.event.awt.AWTKeyAdapter(gearsKeys).addTo(comp);
     }
@@ -166,6 +166,12 @@ public class GearsES1 implements GLEventListener {
 
   public void dispose(GLAutoDrawable drawable) {
     System.err.println(Thread.currentThread()+" GearsES1.dispose ... ");
+    final Object upstreamWidget = drawable.getUpstreamWidget();
+    if (upstreamWidget instanceof Window) {            
+        final Window window = (Window) upstreamWidget;
+        window.removeMouseListener(gearsMouse);
+        window.removeKeyListener(gearsKeys);
+    }
     GL gl = drawable.getGL();
     gear1.destroy(gl);
     gear1 = null;
@@ -184,8 +190,9 @@ public class GearsES1 implements GLEventListener {
     GL2ES1 gl = drawable.getGL().getGL2ES1();
 
     final boolean hasFocus;
-    if(drawable.getNativeSurface() instanceof NativeWindow) {
-      hasFocus = ((NativeWindow)drawable.getNativeSurface()).hasFocus();
+    final Object upstreamWidget = drawable.getUpstreamWidget();
+    if(upstreamWidget instanceof NativeWindow) {
+      hasFocus = ((NativeWindow)upstreamWidget).hasFocus();
     } else {
       hasFocus = true;
     }
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/caps/MultisampleDemoES1.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es1/MultisampleDemoES1.java
similarity index 73%
rename from src/test/com/jogamp/opengl/test/junit/jogl/caps/MultisampleDemoES1.java
rename to src/test/com/jogamp/opengl/test/junit/jogl/demos/es1/MultisampleDemoES1.java
index 0aaf4b0..aad5658 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/caps/MultisampleDemoES1.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es1/MultisampleDemoES1.java
@@ -38,24 +38,16 @@
  * and developed by Kenneth Bradley Russell and Christopher John Kline.
  */
 
-package com.jogamp.opengl.test.junit.jogl.caps;
+package com.jogamp.opengl.test.junit.jogl.demos.es1;
 
-import jogamp.opengl.x11.glx.GLX;
-import jogamp.opengl.x11.glx.X11GLXGraphicsConfiguration;
-import javax.media.nativewindow.AbstractGraphicsConfiguration;
-import javax.media.nativewindow.NativeWindowFactory;
 import javax.media.opengl.GL;
 import javax.media.opengl.GL2ES1;
 import javax.media.opengl.GLAutoDrawable;
 import javax.media.opengl.GLEventListener;
-import javax.media.opengl.GLPipelineFactory;
 
 import com.jogamp.opengl.util.ImmModeSink;
 
-class MultisampleDemoES1 implements GLEventListener {
-
-    static boolean glDebug = false;
-    static boolean glTrace = false;
+public class MultisampleDemoES1 implements GLEventListener {
 
     boolean multisample;
     ImmModeSink immModeSink;
@@ -70,30 +62,7 @@ class MultisampleDemoES1 implements GLEventListener {
         System.err.println();
         System.err.println("Chosen   : " + drawable.getChosenGLCapabilities());
         System.err.println();
-        if (!drawable.getGL().isGLES() && NativeWindowFactory.TYPE_X11.equals(NativeWindowFactory.getNativeWindowType(false))) {
-            AbstractGraphicsConfiguration config = drawable.getNativeSurface().getGraphicsConfiguration();
-            X11GLXGraphicsConfiguration x11config = (X11GLXGraphicsConfiguration) config;
-            long display = drawable.getNativeSurface().getDisplayHandle();
-            int[] foo = new int[1];
-            GLX.glXGetFBConfigAttrib(display, x11config.getFBConfig(), GLX.GLX_SAMPLES, foo, 0);
-            System.out.println("GLX_SAMPLES " + foo[0]);
-            GLX.glXGetFBConfigAttrib(display, x11config.getFBConfig(), GLX.GLX_SAMPLE_BUFFERS, foo, 0);
-            System.out.println("GLX_SAMPLE_BUFFERS " + foo[0]);
-        }
-        GL _gl = drawable.getGL();
-        if (glDebug) {
-            try {
-                // Debug ..
-                _gl = _gl.getContext().setGL(GLPipelineFactory.create("javax.media.opengl.Debug", GL2ES1.class, _gl, null));
-                if (glTrace) {
-                    // Trace ..
-                    _gl = _gl.getContext().setGL(GLPipelineFactory.create("javax.media.opengl.Trace", GL2ES1.class, _gl, new Object[]{System.err}));
-                }
-            } catch (Exception e) {
-                e.printStackTrace();
-            }
-        }
-        GL2ES1 gl = _gl.getGL2ES1();
+        GL2ES1 gl = drawable.getGL().getGL2ES1();
         if (multisample) {
             gl.glEnable(GL.GL_MULTISAMPLE);
         }
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es1/newt/TestGearsES1NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es1/newt/TestGearsES1NEWT.java
index dffe61f..ff168d9 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es1/newt/TestGearsES1NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es1/newt/TestGearsES1NEWT.java
@@ -51,8 +51,8 @@ public class TestGearsES1NEWT extends UITestCase {
 
     @BeforeClass
     public static void initClass() {
-        width  = 512;
-        height = 512;
+        width  = 640;
+        height = 480;
     }
 
     @AfterClass
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/FBOMix2DemosES2.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/FBOMix2DemosES2.java
new file mode 100644
index 0000000..3dfbb48
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/FBOMix2DemosES2.java
@@ -0,0 +1,309 @@
+/**
+ * Copyright (C) 2011 JogAmp Community. All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+package com.jogamp.opengl.test.junit.jogl.demos.es2;
+
+import java.nio.FloatBuffer;
+
+import javax.media.opengl.GL;
+import javax.media.opengl.GL2ES2;
+import javax.media.opengl.GLAutoDrawable;
+import javax.media.opengl.GLEventListener;
+import javax.media.opengl.GLUniformData;
+import javax.media.opengl.fixedfunc.GLMatrixFunc;
+
+import com.jogamp.opengl.FBObject;
+import com.jogamp.opengl.FBObject.TextureAttachment;
+import com.jogamp.opengl.FBObject.Attachment.Type;
+import com.jogamp.opengl.util.GLArrayDataServer;
+import com.jogamp.opengl.util.PMVMatrix;
+import com.jogamp.opengl.util.glsl.ShaderCode;
+import com.jogamp.opengl.util.glsl.ShaderProgram;
+import com.jogamp.opengl.util.glsl.ShaderState;
+
+public class FBOMix2DemosES2 implements GLEventListener {
+    private final GearsES2 demo0;
+    private final RedSquareES2 demo1;
+    private final int swapInterval;
+    private int numSamples;
+    private boolean demo0Only;
+    
+    
+    private final ShaderState st;
+    private final PMVMatrix pmvMatrix;
+    
+    private final FBObject fbo0;    
+    private final FBObject fbo1;
+    
+    private TextureAttachment fbo0Tex;
+    private TextureAttachment fbo1Tex;
+        
+    private ShaderProgram sp0;
+    private GLUniformData pmvMatrixUniform;
+    private GLArrayDataServer interleavedVBO;
+    private GLUniformData texUnit0;
+    private GLUniformData texUnit1;
+    
+    public FBOMix2DemosES2(int swapInterval) {
+        demo0 = new GearsES2(-1);
+        demo0.setIsFBOSlave(true);
+        demo1 = new RedSquareES2(-1);
+        demo1.setIsFBOSlave(true);
+        this.swapInterval = swapInterval;
+        
+        st = new ShaderState();
+        // st.setVerbose(true);        
+        pmvMatrix = new PMVMatrix();
+        
+        fbo0 = new FBObject();        
+        fbo1 = new FBObject();
+        
+        numSamples = 0;
+        demo0Only = false;
+    }
+    
+    public void setDemo0Only(boolean v) { 
+        this.demo0Only = v; 
+    }
+    public boolean getDemo0Only() { return demo0Only; }
+    
+    public void setMSAA(int numSamples) { 
+        this.numSamples=numSamples; 
+    }
+    public int getMSAA() { return numSamples; }
+    
+    public void setDoRotation(boolean rotate) { demo1.setDoRotation(rotate); }
+    
+    static final String[] es2_prelude = { "#version 100\n", "precision mediump float;\n" };
+    static final String gl2_prelude = "#version 110\n";
+    
+    @Override
+    public void init(GLAutoDrawable drawable) {
+        final GL2ES2 gl = drawable.getGL().getGL2ES2();
+        
+        demo0.init(drawable);
+        demo1.init(drawable);
+        
+        final ShaderCode vp0 = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, FBOMix2DemosES2.class, "shader",
+                "shader/bin", "texture01_xxx", true);
+        final ShaderCode fp0 = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, FBOMix2DemosES2.class, "shader",
+                "shader/bin", "texture02_xxx", true);
+        
+        // Prelude shader code w/ GLSL profile specifics [ 1. pre-proc, 2. other ]
+        int fp0Pos;
+        if(gl.isGLES2()) {
+            vp0.insertShaderSource(0, 0, es2_prelude[0]);
+            fp0Pos = fp0.insertShaderSource(0, 0, es2_prelude[0]);
+        } else {
+            vp0.insertShaderSource(0, 0, gl2_prelude);
+            fp0Pos = fp0.insertShaderSource(0, 0, gl2_prelude);
+        }
+        if(gl.isGLES2()) {
+            fp0Pos = fp0.insertShaderSource(0, fp0Pos, es2_prelude[1]);
+        }        
+        
+        sp0 = new ShaderProgram();
+        sp0.add(gl, vp0, System.err);
+        sp0.add(gl, fp0, System.err);       
+        st.attachShaderProgram(gl, sp0, true);
+        
+        pmvMatrixUniform = new GLUniformData("mgl_PMVMatrix", 4, 4, pmvMatrix.glGetPMvMatrixf());
+        st.ownUniform(pmvMatrixUniform);       
+        st.uniform(gl, pmvMatrixUniform);
+        
+        interleavedVBO = GLArrayDataServer.createGLSLInterleaved(3+4+2, GL.GL_FLOAT, false, 3*4, GL.GL_STATIC_DRAW);
+        {        
+            interleavedVBO.addGLSLSubArray("mgl_Vertex",        3, GL.GL_ARRAY_BUFFER);            
+            interleavedVBO.addGLSLSubArray("mgl_Color",         4, GL.GL_ARRAY_BUFFER);            
+            //interleavedVBO.addGLSLSubArray("mgl_Normal",        3, GL.GL_ARRAY_BUFFER);
+            interleavedVBO.addGLSLSubArray("mgl_MultiTexCoord", 2, GL.GL_ARRAY_BUFFER);
+
+            FloatBuffer ib = (FloatBuffer)interleavedVBO.getBuffer();
+            
+            for(int i=0; i<4; i++) {
+                ib.put(s_quadVertices,  i*3, 3);
+                ib.put(s_quadColors,    i*4, 4);  
+                //ib.put(s_cubeNormals,   i*3, 3);
+                ib.put(s_quadTexCoords, i*2, 2);
+            }                        
+        }
+        interleavedVBO.seal(gl, true);
+        interleavedVBO.enableBuffer(gl, false);
+        st.ownAttribute(interleavedVBO, true);
+                
+        texUnit0 = new GLUniformData("mgl_Texture0", 0);
+        st.ownUniform(texUnit0);       
+        st.uniform(gl, texUnit0);
+        texUnit1 = new GLUniformData("mgl_Texture1", 1);
+        st.ownUniform(texUnit1);       
+        st.uniform(gl, texUnit1);
+        
+        st.useProgram(gl, false);
+        
+        System.err.println("**** Init");
+        resetFBOs(gl, drawable);
+        
+        fbo0.attachRenderbuffer(gl, Type.DEPTH, 24);
+        fbo0.unbind(gl);
+        fbo1.attachRenderbuffer(gl, Type.DEPTH, 24);
+        fbo1.unbind(gl);
+        gl.glEnable(GL2ES2.GL_DEPTH_TEST);
+        
+        numSamples=fbo0.getNumSamples();
+    }
+    
+    /** Since we switch MSAA and non-MSAA we need to take extra care, i.e. sync msaa for both FBOs ..*/
+    private void resetFBOs(GL gl, GLAutoDrawable drawable) {
+        // remove all texture attachments, since MSAA uses just color-render-buffer
+        // and non-MSAA uses texture2d-buffer
+        fbo0.detachAllColorbuffer(gl);
+        fbo1.detachAllColorbuffer(gl);
+            
+        fbo0.reset(gl, drawable.getWidth(), drawable.getHeight(), numSamples);
+        fbo1.reset(gl, drawable.getWidth(), drawable.getHeight(), numSamples);
+        if(fbo0.getNumSamples() != fbo1.getNumSamples()) {
+            throw new InternalError("sample size mismatch: \n\t0: "+fbo0+"\n\t1: "+fbo1);
+        }        
+        numSamples = fbo0.getNumSamples();
+        
+        if(numSamples>0) {
+            fbo0.attachColorbuffer(gl, 0, true);
+            fbo1.attachColorbuffer(gl, 0, true);
+            fbo0Tex = fbo0.getSamplingSink();
+            fbo1Tex = fbo1.getSamplingSink();
+        } else {
+            fbo0Tex = fbo0.attachTexture2D(gl, 0, true);
+            fbo1Tex = fbo1.attachTexture2D(gl, 0, true);
+        }        
+    }
+
+    @Override
+    public void dispose(GLAutoDrawable drawable) {
+        final GL2ES2 gl = drawable.getGL().getGL2ES2();
+        demo0.dispose(drawable);
+        demo1.dispose(drawable);
+        fbo0.destroy(gl);
+        fbo1.destroy(gl);
+        st.destroy(gl);
+        
+        fbo0Tex = null;
+        fbo1Tex = null;
+        sp0 = null;
+        pmvMatrixUniform = null;
+        interleavedVBO = null;
+    }
+
+    @Override
+    public void display(GLAutoDrawable drawable) {
+        final GL2ES2 gl = drawable.getGL().getGL2ES2();
+
+        if( fbo0.getNumSamples() != numSamples ) {
+            System.err.println("**** NumSamples: "+fbo0.getNumSamples()+" -> "+numSamples);
+            resetFBOs(gl, drawable);
+        }
+        
+        if(0 < numSamples) {
+            gl.glEnable(GL.GL_MULTISAMPLE);
+        }
+        
+        fbo0.bind(gl);
+        demo0.display(drawable);
+        fbo0.unbind(gl);
+        
+        if(!demo0Only) {
+            fbo1.bind(gl);
+            demo1.display(drawable);
+            fbo1.unbind(gl);
+        }
+        
+        st.useProgram(gl, true);
+        gl.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
+        gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
+        
+        gl.glActiveTexture(GL.GL_TEXTURE0 + texUnit0.intValue());
+        fbo0.use(gl, fbo0Tex);
+        if(!demo0Only) {
+            gl.glActiveTexture(GL.GL_TEXTURE0 + texUnit1.intValue());
+            fbo1.use(gl, fbo1Tex);
+        }
+        interleavedVBO.enableBuffer(gl, true);
+        
+        gl.glDrawArrays(GL.GL_TRIANGLE_STRIP, 0, 4);
+        
+        interleavedVBO.enableBuffer(gl, false);
+        fbo0.unuse(gl);
+        if(!demo0Only) {
+            fbo1.unuse(gl);
+        }
+        
+        st.useProgram(gl, false);        
+    }
+
+    @Override
+    public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
+        final GL2ES2 gl = drawable.getGL().getGL2ES2();
+        
+        if(-1 != swapInterval) {        
+            gl.setSwapInterval(swapInterval); // in case switching the drawable (impl. may bound attribute there)
+        }
+        
+        // if(drawable.getWidth() == fbo0.getWidth() && drawable.getHeight() == fbo0.getHeight() ) {
+            System.err.println("**** Reshape: "+width+"x"+height);
+            resetFBOs(gl, drawable);            
+        //}        
+        
+        fbo0.bind(gl);
+        demo0.reshape(drawable, x, y, width, height);
+        fbo0.unbind(gl);
+        fbo1.bind(gl);
+        demo1.reshape(drawable, x, y, width, height);
+        fbo1.unbind(gl);
+        
+        pmvMatrix.glMatrixMode(GLMatrixFunc.GL_PROJECTION);
+        pmvMatrix.glLoadIdentity();
+        pmvMatrix.glOrthof(-1.0f, 1.0f, -1.0f, 1.0f, 0.0f, 10.0f);
+
+        pmvMatrix.glMatrixMode(GLMatrixFunc.GL_MODELVIEW);
+        pmvMatrix.glLoadIdentity();
+        
+        st.useProgram(gl, true);
+        st.uniform(gl, pmvMatrixUniform);
+        st.useProgram(gl, false);
+        
+    }
+
+    private static final float[] s_quadVertices = { 
+      -1f, -1f, 0f, // LB
+       1f, -1f, 0f, // RB
+      -1f,  1f, 0f, // LT
+       1f,  1f, 0f  // RT 
+    };
+    private static final float[] s_quadColors = { 
+      1f, 1f, 1f, 1f,
+      1f, 1f, 1f, 1f,
+      1f, 1f, 1f, 1f,
+      1f, 1f, 1f, 1f };
+    private static final float[] s_quadTexCoords = { 
+            0f, 0f, // LB
+            1f, 0f, // RB
+            0f, 1f, // LT   
+            1f, 1f  // RT
+    };
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/GearsES2.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/GearsES2.java
index 6246b3e..38e8a15 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/GearsES2.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/GearsES2.java
@@ -64,6 +64,8 @@ public class GearsES2 implements GLEventListener {
     private KeyListener gearsKeys = new GearsKeyAdapter();
 
     private int prevMouseX, prevMouseY;
+    private boolean isInitialized = false;
+    boolean isFBOSlave = false;
 
     public GearsES2(int swapInterval) {
         this.swapInterval = swapInterval;
@@ -73,6 +75,8 @@ public class GearsES2 implements GLEventListener {
         this.swapInterval = 1;
     }
 
+    public void setIsFBOSlave(boolean v) { isFBOSlave = v; }
+    
     public void setPMVUseBackingArray(boolean pmvUseBackingArray) {
         this.pmvUseBackingArray = pmvUseBackingArray;
     }
@@ -100,6 +104,11 @@ public class GearsES2 implements GLEventListener {
 
 
     public void init(GLAutoDrawable drawable) {
+        if(isInitialized) {
+            System.err.println(Thread.currentThread()+" GearsES2.init skipped!");
+            return; 
+        }
+        isInitialized = true;
         System.err.println(Thread.currentThread()+" GearsES2.init ...");
         GL2ES2 gl = drawable.getGL().getGL2ES2();
 
@@ -109,7 +118,6 @@ public class GearsES2 implements GLEventListener {
         System.err.println("GL_RENDERER: " + gl.glGetString(GL.GL_RENDERER));
         System.err.println("GL_VERSION: " + gl.glGetString(GL.GL_VERSION));
 
-        gl.glEnable(GL.GL_CULL_FACE);
         gl.glEnable(GL.GL_DEPTH_TEST);
         
         st = new ShaderState();
@@ -162,27 +170,30 @@ public class GearsES2 implements GLEventListener {
             gear3 = new GearsObjectES2(gear3, pmvMatrix, pmvMatrixUniform, colorU);
             System.err.println("gear3 reused: "+gear3);
         }                
-        
-        if (drawable instanceof Window) {
-            Window window = (Window) drawable;
+    
+        final Object upstreamWidget = drawable.getUpstreamWidget();
+        if (upstreamWidget instanceof Window) {
+            final Window window = (Window) upstreamWidget;
             window.addMouseListener(gearsMouse);
             window.addKeyListener(gearsKeys);
-        } else if (GLProfile.isAWTAvailable() && drawable instanceof java.awt.Component) {
-            java.awt.Component comp = (java.awt.Component) drawable;
+        } else if (GLProfile.isAWTAvailable() && upstreamWidget instanceof java.awt.Component) {
+            final java.awt.Component comp = (java.awt.Component) upstreamWidget;
             new com.jogamp.newt.event.awt.AWTMouseAdapter(gearsMouse).addTo(comp);
             new com.jogamp.newt.event.awt.AWTKeyAdapter(gearsKeys).addTo(comp);
         }
         st.useProgram(gl, false);
         
-        gl.setSwapInterval(swapInterval);
-        
         System.err.println(Thread.currentThread()+" GearsES2.init FIN");
     }
 
     public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
-        // System.err.println(Thread.currentThread()+" GearsES2.reshape "+x+"/"+y+" "+width+"x"+height+", swapInterval "+swapInterval);
+        System.err.println(Thread.currentThread()+" GearsES2.reshape "+x+"/"+y+" "+width+"x"+height+", swapInterval "+swapInterval);
         GL2ES2 gl = drawable.getGL().getGL2ES2();
 
+        if(-1 != swapInterval) {
+            gl.setSwapInterval(swapInterval); // in case switching the drawable (impl. may bound attribute there)
+        }
+        
         st.useProgram(gl, true);
         pmvMatrix.glMatrixMode(PMVMatrix.GL_PROJECTION);
         pmvMatrix.glLoadIdentity();
@@ -206,9 +217,15 @@ public class GearsES2 implements GLEventListener {
     // private boolean useAndroidDebug = false;
 
     public void dispose(GLAutoDrawable drawable) {
+        if(!isInitialized) {
+            System.err.println(Thread.currentThread()+" GearsES2.dispose skipped!");
+            return; 
+        }
+        isInitialized = false;
         System.err.println(Thread.currentThread()+" GearsES2.dispose ... ");
-        if (drawable instanceof Window) {
-            Window window = (Window) drawable;
+        final Object upstreamWidget = drawable.getUpstreamWidget();
+        if (upstreamWidget instanceof Window) {            
+            final Window window = (Window) upstreamWidget;
             window.removeMouseListener(gearsMouse);
             window.removeKeyListener(gearsKeys);
         }
@@ -224,6 +241,7 @@ public class GearsES2 implements GLEventListener {
         colorU = null;        
         st.destroy(gl);
         st = null;
+
         System.err.println(Thread.currentThread()+" GearsES2.dispose FIN");
     }
 
@@ -235,12 +253,16 @@ public class GearsES2 implements GLEventListener {
         GL2ES2 gl = drawable.getGL().getGL2ES2();
 
         final boolean hasFocus;
-        if(drawable.getNativeSurface() instanceof NativeWindow) {
-          hasFocus = ((NativeWindow)drawable.getNativeSurface()).hasFocus();
+        final Object upstreamWidget = drawable.getUpstreamWidget();
+        if(upstreamWidget instanceof NativeWindow) {
+          hasFocus = ((NativeWindow)upstreamWidget).hasFocus();
         } else {
           hasFocus = true;
         }
-        if(hasFocus) {
+        
+        gl.glEnable(GL.GL_CULL_FACE);
+        
+        if( isFBOSlave || hasFocus ) {
           gl.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
         } else {
           gl.glClearColor(0.2f, 0.2f, 0.2f, 0.0f);
@@ -267,7 +289,9 @@ public class GearsES2 implements GLEventListener {
         gear2.draw(gl,  3.1f, -2.0f, -2f * angle -  9.0f, GearsObject.green);
         gear3.draw(gl, -3.1f,  4.2f, -2f * angle - 25.0f, GearsObject.blue);    
         pmvMatrix.glPopMatrix();
-        st.useProgram(gl, false);        
+        st.useProgram(gl, false);
+        
+        gl.glDisable(GL.GL_CULL_FACE);
     }
     
     boolean confinedFixedCenter = false;
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/MultisampleDemoES2.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/MultisampleDemoES2.java
new file mode 100644
index 0000000..5facc1a
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/MultisampleDemoES2.java
@@ -0,0 +1,178 @@
+/*
+ * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright (c) 2010 JogAmp Community. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * - Redistribution of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any kind. ALL
+ * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+ * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+ * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
+ * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
+ * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
+ * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
+ * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+ * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
+ * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
+ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed or intended for use
+ * in the design, construction, operation or maintenance of any nuclear
+ * facility.
+ *
+ * Sun gratefully acknowledges that this software was originally authored
+ * and developed by Kenneth Bradley Russell and Christopher John Kline.
+ */
+
+package com.jogamp.opengl.test.junit.jogl.demos.es2;
+
+import javax.media.opengl.GL;
+import javax.media.opengl.GL2ES2;
+import javax.media.opengl.GLAutoDrawable;
+import javax.media.opengl.GLEventListener;
+import javax.media.opengl.GLUniformData;
+import javax.media.opengl.fixedfunc.GLMatrixFunc;
+
+import com.jogamp.opengl.util.ImmModeSink;
+import com.jogamp.opengl.util.PMVMatrix;
+import com.jogamp.opengl.util.glsl.ShaderCode;
+import com.jogamp.opengl.util.glsl.ShaderProgram;
+import com.jogamp.opengl.util.glsl.ShaderState;
+
+public class MultisampleDemoES2 implements GLEventListener {
+
+    private boolean multisample;
+    private final ShaderState st;
+    private final PMVMatrix pmvMatrix;
+    private ShaderProgram sp0;
+    private GLUniformData pmvMatrixUniform;
+    private ImmModeSink immModeSink;
+
+    public MultisampleDemoES2(boolean multisample) {
+        this.multisample = multisample;
+        st = new ShaderState();
+        st.setVerbose(true);        
+        pmvMatrix = new PMVMatrix();        
+    }
+
+    static final String[] es2_prelude = { "#version 100\n", "precision mediump float;\n" };
+    static final String gl2_prelude = "#version 110\n";
+    
+    public void init(GLAutoDrawable glad) {
+        final GL2ES2 gl = glad.getGL().getGL2ES2();
+        System.err.println();
+        System.err.println("Requested: " + glad.getNativeSurface().getGraphicsConfiguration().getRequestedCapabilities());
+        System.err.println();
+        System.err.println("Chosen   : " + glad.getChosenGLCapabilities());
+        System.err.println();
+        
+        final ShaderCode vp0 = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, MultisampleDemoES2.class, "shader",
+                "shader/bin", "mgl_default_xxx", true);
+        final ShaderCode fp0 = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, MultisampleDemoES2.class, "shader",
+                "shader/bin", "mgl_default_xxx", true);
+        
+        // Prelude shader code w/ GLSL profile specifics [ 1. pre-proc, 2. other ]
+        int fp0Pos;
+        if(gl.isGLES2()) {
+            vp0.insertShaderSource(0, 0, es2_prelude[0]);
+            fp0Pos = fp0.insertShaderSource(0, 0, es2_prelude[0]);
+        } else {
+            vp0.insertShaderSource(0, 0, gl2_prelude);
+            fp0Pos = fp0.insertShaderSource(0, 0, gl2_prelude);
+        }
+        if(gl.isGLES2()) {
+            fp0Pos = fp0.insertShaderSource(0, fp0Pos, es2_prelude[1]);
+        }        
+        
+        sp0 = new ShaderProgram();
+        sp0.add(gl, vp0, System.err);
+        sp0.add(gl, fp0, System.err);       
+        st.attachShaderProgram(gl, sp0, true);
+        
+        pmvMatrixUniform = new GLUniformData("mgl_PMVMatrix", 4, 4, pmvMatrix.glGetPMvMatrixf());
+        st.ownUniform(pmvMatrixUniform);       
+        st.uniform(gl, pmvMatrixUniform);
+        
+        // Using predef array names, see 
+        //    GLPointerFuncUtil.getPredefinedArrayIndexName(glArrayIndex);
+        immModeSink = ImmModeSink.createGLSL(gl, GL.GL_STATIC_DRAW, 40, 
+                                              3, GL.GL_FLOAT,  // vertex
+                                              4, GL.GL_FLOAT,  // color
+                                              0, GL.GL_FLOAT,// normal
+                                              0, GL.GL_FLOAT); // texture
+        final int numSteps = 20;
+        final double increment = Math.PI / numSteps;
+        final double radius = 1;
+        immModeSink.glBegin(GL.GL_LINES);
+        for (int i = numSteps - 1; i >= 0; i--) {
+            immModeSink.glVertex3f((float) (radius * Math.cos(i * increment)), 
+                                   (float) (radius * Math.sin(i * increment)), 
+                                   0f);
+            immModeSink.glColor4f( 1f, 1f, 1f, 1f ); 
+            immModeSink.glVertex3f((float) (-1.0 * radius * Math.cos(i * increment)), 
+                                   (float) (-1.0 * radius * Math.sin(i * increment)), 
+                                   0f);
+            immModeSink.glColor4f( 1f, 1f, 1f, 1f ); 
+        }
+        immModeSink.glEnd(gl, false);
+        
+        st.useProgram(gl, false);
+    }
+
+    public void dispose(GLAutoDrawable glad) {
+        final GL2ES2 gl = glad.getGL().getGL2ES2();
+        immModeSink.destroy(gl);
+        immModeSink = null;
+        st.destroy(gl);
+    }
+
+    public void display(GLAutoDrawable glad) {
+        final GL2ES2 gl = glad.getGL().getGL2ES2();
+        if (multisample) {
+            gl.glEnable(GL.GL_MULTISAMPLE);
+        }
+        gl.glClearColor(0, 0, 0, 0);
+        //      gl.glEnable(GL.GL_DEPTH_TEST);
+        //      gl.glDepthFunc(GL.GL_LESS);
+        gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
+        
+        st.useProgram(gl, true);
+        
+        immModeSink.draw(gl, true);
+        
+        st.useProgram(gl, false);
+    }
+
+    // Unused routines
+    public void reshape(GLAutoDrawable glad, int x, int y, int width, int height) {
+        System.err.println("reshape ..");
+        final GL2ES2 gl = glad.getGL().getGL2ES2();
+        pmvMatrix.glMatrixMode(GLMatrixFunc.GL_PROJECTION);
+        pmvMatrix.glLoadIdentity();
+        // pmvMatrix.glOrthof(-1.0f, 1.0f, -1.0f, 1.0f, -1.0f, 1.0f);
+        pmvMatrix.glOrthof(-1.0f, 1.0f, -1.0f, 1.0f, 0.0f, 10.0f);
+        pmvMatrix.glMatrixMode(GLMatrixFunc.GL_MODELVIEW);
+        pmvMatrix.glLoadIdentity();
+        
+        st.useProgram(gl, true);
+        st.uniform(gl, pmvMatrixUniform);
+        st.useProgram(gl, false);
+    }
+
+    public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) {
+    }
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/RedSquareES2.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/RedSquareES2.java
index 6202671..a956fe1 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/RedSquareES2.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/RedSquareES2.java
@@ -27,9 +27,7 @@
  */
 package com.jogamp.opengl.test.junit.jogl.demos.es2;
 
-import com.jogamp.newt.event.MouseAdapter;
-import com.jogamp.newt.event.MouseEvent;
-import com.jogamp.newt.opengl.GLWindow;
+import com.jogamp.newt.Window;
 import com.jogamp.opengl.util.GLArrayDataServer;
 import com.jogamp.opengl.util.PMVMatrix;
 import com.jogamp.opengl.util.glsl.ShaderCode;
@@ -37,10 +35,8 @@ import com.jogamp.opengl.util.glsl.ShaderProgram;
 import com.jogamp.opengl.util.glsl.ShaderState;
 import javax.media.opengl.GL;
 import javax.media.opengl.GL2ES2;
-import javax.media.opengl.GLAnimatorControl;
 import javax.media.opengl.GLAutoDrawable;
 import javax.media.opengl.GLEventListener;
-import javax.media.opengl.GLRunnable;
 import javax.media.opengl.GLUniformData;
 
 public class RedSquareES2 implements GLEventListener {
@@ -51,8 +47,11 @@ public class RedSquareES2 implements GLEventListener {
     GLArrayDataServer colors ;
     long t0;
     private int swapInterval = 0;
-    MyMouseAdapter myMouse = new MyMouseAdapter();
-    GLWindow glWindow = null;
+    Window window = null;
+    float aspect = 1.0f;
+    boolean doRotate = true;
+    boolean isInitialized = false;
+    boolean isFBOSlave = false;
 
     public RedSquareES2(int swapInterval) {
         this.swapInterval = swapInterval;
@@ -62,7 +61,16 @@ public class RedSquareES2 implements GLEventListener {
         this.swapInterval = 1;
     }
         
+    public void setIsFBOSlave(boolean v) { isFBOSlave = v; }
+    public void setAspect(float aspect) { this.aspect = aspect; }
+    public void setDoRotation(boolean rotate) { this.doRotate = rotate; }
+    
     public void init(GLAutoDrawable glad) {
+        if(isInitialized) {
+            System.err.println(Thread.currentThread()+" RedSquareES2.init skipped!");
+            return; 
+        }
+        isInitialized = true;
         System.err.println(Thread.currentThread()+" RedSquareES2.init ...");
         GL2ES2 gl = glad.getGL().getGL2ES2();
         
@@ -118,16 +126,9 @@ public class RedSquareES2 implements GLEventListener {
         colors.enableBuffer(gl, false);
         
         // OpenGL Render Settings
-        gl.glClearColor(0, 0, 0, 1);
         gl.glEnable(GL2ES2.GL_DEPTH_TEST);
         st.useProgram(gl, false);        
 
-        gl.setSwapInterval(swapInterval);
-        
-        if (glad instanceof GLWindow) {
-            glWindow = (GLWindow) glad;
-            glWindow.addMouseListener(myMouse);
-        }
         t0 = System.currentTimeMillis();
         System.err.println(Thread.currentThread()+" RedSquareES2.init FIN");
     }
@@ -136,15 +137,18 @@ public class RedSquareES2 implements GLEventListener {
         long t1 = System.currentTimeMillis();
 
         GL2ES2 gl = glad.getGL().getGL2ES2();
+        gl.glClearColor(0, 0, 0, 0);
         gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
         st.useProgram(gl, true);
         // One rotation every four seconds
         pmvMatrix.glMatrixMode(PMVMatrix.GL_MODELVIEW);
         pmvMatrix.glLoadIdentity();
         pmvMatrix.glTranslatef(0, 0, -10);
-        float ang = ((float) (t1 - t0) * 360.0F) / 4000.0F;
-        pmvMatrix.glRotatef(ang, 0, 0, 1);
-        pmvMatrix.glRotatef(ang, 0, 1, 0);
+        if(doRotate) {
+            float ang = ((float) (t1 - t0) * 360.0F) / 4000.0F;
+            pmvMatrix.glRotatef(ang, 0, 0, 1);
+            pmvMatrix.glRotatef(ang, 0, 1, 0);
+        }
         st.uniform(gl, pmvMatrixUniform);        
 
         // Draw a square
@@ -160,11 +164,15 @@ public class RedSquareES2 implements GLEventListener {
         System.err.println(Thread.currentThread()+" RedSquareES2.reshape "+x+"/"+y+" "+width+"x"+height+", swapInterval "+swapInterval);        
         GL2ES2 gl = glad.getGL().getGL2ES2();
         
+        if(-1 != swapInterval) {        
+            gl.setSwapInterval(swapInterval); // in case switching the drawable (impl. may bound attribute there)
+        }
+        
         st.useProgram(gl, true);
         // Set location in front of camera
         pmvMatrix.glMatrixMode(PMVMatrix.GL_PROJECTION);
         pmvMatrix.glLoadIdentity();
-        pmvMatrix.gluPerspective(45.0F, (float) width / (float) height, 1.0F, 100.0F);
+        pmvMatrix.gluPerspective(45.0F, ( (float) width / (float) height ) / aspect, 1.0F, 100.0F);
         //pmvMatrix.glOrthof(-4.0f, 4.0f, -4.0f, 4.0f, 1.0f, 100.0f);
         st.uniform(gl, pmvMatrixUniform);
         st.useProgram(gl, false);
@@ -173,41 +181,17 @@ public class RedSquareES2 implements GLEventListener {
     }
 
     public void dispose(GLAutoDrawable glad) {
-        System.err.println(Thread.currentThread()+" RedSquareES2.dispose ... ");
-        if (null != glWindow) {
-            glWindow.removeMouseListener(myMouse);
-            glWindow = null;            
+        if(!isInitialized) {
+            System.err.println(Thread.currentThread()+" RedSquareES2.dispose skipped!");
+            return; 
         }
+        isInitialized = false;
+        System.err.println(Thread.currentThread()+" RedSquareES2.dispose ... ");
         GL2ES2 gl = glad.getGL().getGL2ES2();
         st.destroy(gl);
         st = null;
         pmvMatrix.destroy();
         pmvMatrix = null;
         System.err.println(Thread.currentThread()+" RedSquareES2.dispose FIN");
-    }
-    
-    class MyMouseAdapter extends MouseAdapter {
-        public void mouseClicked(MouseEvent e) {
-            System.err.println(e);
-            if(null != glWindow && e.getSource() == glWindow.getDelegatedWindow()) {
-                if(e.getX() < glWindow.getWidth()/2) {
-                    glWindow.setFullscreen(!glWindow.isFullscreen());
-                    System.err.println("setFullscreen: "+glWindow.isFullscreen());
-                } else { 
-                    glWindow.invoke(false, new GLRunnable() {
-                        public boolean run(GLAutoDrawable drawable) {
-                            GL gl = drawable.getGL();
-                            gl.setSwapInterval(gl.getSwapInterval()<=0?1:0);
-                            System.err.println("setSwapInterval: "+gl.getSwapInterval());
-                            final GLAnimatorControl a = drawable.getAnimator();
-                            if( null != a ) {
-                                a.resetFPSCounter();
-                            }
-                            return true;
-                        }
-                    });
-                }                
-            }
-        }
-     }
+    }    
 }
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/TextureSequenceCubeES2.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/TextureSequenceCubeES2.java
index b04bd07..9217e2b 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/TextureSequenceCubeES2.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/TextureSequenceCubeES2.java
@@ -265,11 +265,12 @@ public class TextureSequenceCubeES2 implements GLEventListener {
 
         st.useProgram(gl, false);
 
-        if (drawable instanceof Window) {
-            Window window = (Window) drawable;
+        final Object upstreamWidget = drawable.getUpstreamWidget();
+        if (upstreamWidget instanceof Window) {            
+            final Window window = (Window) upstreamWidget;
             window.addMouseListener(mouseAction);
-        } else if (GLProfile.isAWTAvailable() && drawable instanceof java.awt.Component) {
-            java.awt.Component comp = (java.awt.Component) drawable;
+        } else if (GLProfile.isAWTAvailable() && upstreamWidget instanceof java.awt.Component) {
+            final java.awt.Component comp = (java.awt.Component) upstreamWidget;
             new com.jogamp.newt.event.awt.AWTMouseAdapter(mouseAction).addTo(comp);
         }
         
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/av/MovieCube.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/av/MovieCube.java
index 0b83aac..7f27133 100755
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/av/MovieCube.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/av/MovieCube.java
@@ -163,8 +163,9 @@ public class MovieCube implements GLEventListener, GLMediaEventListener {
         mPlayer.start();
 
         boolean added;
-        if (drawable instanceof Window) {
-            Window window = (Window) drawable;
+        final Object upstreamWidget = drawable.getUpstreamWidget();
+        if (upstreamWidget instanceof Window) {            
+            final Window window = (Window) upstreamWidget;
             window.addKeyListener(keyAction);
             added = true;
         } else { added = false; }       
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/av/MovieSimple.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/av/MovieSimple.java
index 8210065..e17c9e8 100755
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/av/MovieSimple.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/av/MovieSimple.java
@@ -400,8 +400,9 @@ public class MovieSimple implements GLEventListener, GLMediaEventListener {
         
         startTime = System.currentTimeMillis();
         
-        if (drawable instanceof Window) {
-            Window window = (Window) drawable;
+        final Object upstreamWidget = drawable.getUpstreamWidget();
+        if (upstreamWidget instanceof Window) {            
+            final Window window = (Window) upstreamWidget;
             window.addMouseListener(mouseAction);
             winWidth = window.getWidth();
             winHeight = window.getHeight();
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/TestGearsES2AWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/TestGearsES2AWT.java
index c6e2245..b3fdaa0 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/TestGearsES2AWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/awt/TestGearsES2AWT.java
@@ -32,6 +32,8 @@ import javax.media.opengl.*;
 
 import com.jogamp.opengl.util.Animator;
 import javax.media.opengl.awt.GLCanvas;
+
+import com.jogamp.common.os.Platform;
 import com.jogamp.newt.event.awt.AWTKeyAdapter;
 import com.jogamp.newt.event.awt.AWTWindowAdapter;
 import com.jogamp.newt.event.TraceKeyAdapter;
@@ -41,7 +43,11 @@ import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
 import com.jogamp.opengl.test.junit.util.MiscUtils;
 import com.jogamp.opengl.test.junit.util.UITestCase;
 import com.jogamp.opengl.test.junit.util.QuitAdapter;
+
+import java.awt.BorderLayout;
+import java.awt.Dimension;
 import java.awt.Frame;
+import java.awt.TextArea;
 import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.InputStreamReader;
@@ -57,13 +63,14 @@ public class TestGearsES2AWT extends UITestCase {
     static boolean firstUIActionOnProcess = false;
     static boolean forceES2 = false;
     static boolean shallUseOffscreenLayer = false;
+    static boolean addComp = true;
     static int swapInterval = 1;
     static boolean showFPS = false;    
 
     @BeforeClass
     public static void initClass() {
-        width  = 512;
-        height = 512;
+        width  = 640;
+        height = 480;
     }
 
     @AfterClass
@@ -77,8 +84,19 @@ public class TestGearsES2AWT extends UITestCase {
         final GLCanvas glCanvas = new GLCanvas(caps);
         Assert.assertNotNull(glCanvas);
         glCanvas.setShallUseOffscreenLayer(shallUseOffscreenLayer);
-        frame.add(glCanvas);
-        frame.setSize(512, 512);
+        Dimension glc_sz = new Dimension(width, height);
+        glCanvas.setMinimumSize(glc_sz);
+        glCanvas.setPreferredSize(glc_sz);
+        glCanvas.setSize(glc_sz);
+        if(addComp) {
+            final TextArea ta = new TextArea(2, 20);
+            ta.append("0123456789");
+            ta.append(Platform.getNewline());
+            ta.append("Some Text");
+            ta.append(Platform.getNewline());
+            frame.add(ta, BorderLayout.SOUTH);
+        }
+        frame.add(glCanvas, BorderLayout.CENTER);
         frame.setTitle("Gears AWT Test (translucent "+!caps.isBackgroundOpaque()+"), swapInterval "+swapInterval);
 
         glCanvas.addGLEventListener(new GearsES2(swapInterval));
@@ -91,12 +109,13 @@ public class TestGearsES2AWT extends UITestCase {
 
         javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
             public void run() {
+                frame.pack();
                 frame.setVisible(true);
             }});
         animator.setUpdateFPSFrames(60, System.err);
         animator.start();
 
-        while(!quitAdapter.shouldQuit() && animator.isAnimating() && animator.getTotalFPSDuration()<duration) {
+        while(!quitAdapter.shouldQuit() /* && animator.isAnimating() */ && animator.getTotalFPSDuration()<duration) {
             Thread.sleep(100);
         }
 
@@ -145,6 +164,8 @@ public class TestGearsES2AWT extends UITestCase {
                 firstUIActionOnProcess = true;
             } else if(args[i].equals("-wait")) {
                 waitForKey = true;
+            } else if(args[i].equals("-justGears")) {
+                addComp = false;
             }
         }
         System.err.println("forceES2 "+forceES2);
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestGearsES2NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestGearsES2NEWT.java
index 3fe0706..fab5bf9 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestGearsES2NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestGearsES2NEWT.java
@@ -37,6 +37,8 @@ import com.jogamp.newt.NewtFactory;
 import com.jogamp.newt.Screen;
 import com.jogamp.newt.event.KeyAdapter;
 import com.jogamp.newt.event.KeyEvent;
+import com.jogamp.newt.event.MouseAdapter;
+import com.jogamp.newt.event.MouseEvent;
 import com.jogamp.newt.event.WindowEvent;
 import com.jogamp.newt.event.WindowAdapter;
 import com.jogamp.newt.opengl.GLWindow;
@@ -89,7 +91,7 @@ public class TestGearsES2NEWT extends UITestCase {
     @BeforeClass
     public static void initClass() {
         if(null == wsize) {
-            wsize = new Dimension(200, 200);
+            wsize = new Dimension(640, 480);
         }
     }
 
@@ -220,6 +222,12 @@ public class TestGearsES2NEWT extends UITestCase {
                 }
             }
         });
+        glWindow.addMouseListener(new MouseAdapter() {
+            public void mouseClicked(MouseEvent e) {
+                glWindow.setFullscreen(!glWindow.isFullscreen());
+                System.err.println("setFullscreen: "+glWindow.isFullscreen());
+            }
+         });
 
         animator.start();
         // glWindow.setSkipContextReleaseThread(animator.getThread());
@@ -257,8 +265,7 @@ public class TestGearsES2NEWT extends UITestCase {
     }
 
     public static void main(String args[]) throws IOException {        
-        int x=0, y=0, w=200, h=200;
-        boolean useSize = false;
+        int x=0, y=0, w=640, h=480;
         boolean usePos = false;
         
         for(int i=0; i<args.length; i++) {
@@ -291,11 +298,9 @@ public class TestGearsES2NEWT extends UITestCase {
             } else if(args[i].equals("-width")) {
                 i++;
                 w = MiscUtils.atoi(args[i], w);
-                useSize = true;
             } else if(args[i].equals("-height")) {
                 i++;
                 h = MiscUtils.atoi(args[i], h);
-                useSize = true;
             } else if(args[i].equals("-x")) {
                 i++;
                 x = MiscUtils.atoi(args[i], x);
@@ -319,9 +324,8 @@ public class TestGearsES2NEWT extends UITestCase {
                 }
             }
         }
-        if(useSize) {
-            wsize = new Dimension(w, h);
-        }
+        wsize = new Dimension(w, h);
+        
         if(usePos) {
             wpos = new Point(x, y);
         }
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestRedSquareES2NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestRedSquareES2NEWT.java
index 74d52c3..ff231ef 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestRedSquareES2NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestRedSquareES2NEWT.java
@@ -54,6 +54,7 @@ public class TestRedSquareES2NEWT extends UITestCase {
     static GLProfile.ShutdownType loop_shutdown = null;
     static boolean vsync = false;
     static boolean forceES2 = false;
+    static boolean doRotate = true;
 
     @BeforeClass
     public static void initClass() {
@@ -72,7 +73,9 @@ public class TestRedSquareES2NEWT extends UITestCase {
         glWindow.setTitle("Gears NEWT Test");
         glWindow.setSize(width, height);
 
-        glWindow.addGLEventListener(new RedSquareES2(vsync ? 1 : -1));
+        final RedSquareES2 demo = new RedSquareES2(vsync ? 1 : -1);
+        demo.setDoRotation(doRotate);
+        glWindow.addGLEventListener(demo);
 
         Animator animator = new Animator(glWindow);
         QuitAdapter quitAdapter = new QuitAdapter();
@@ -143,6 +146,8 @@ public class TestRedSquareES2NEWT extends UITestCase {
                 } catch (Exception ex) { ex.printStackTrace(); }
             } else if(args[i].equals("-es2")) {
                 forceES2 = true;
+            } else if(args[i].equals("-norotate")) {
+                doRotate = false;
             } else if(args[i].equals("-loops")) {
                 i++;
                 loops = MiscUtils.atoi(args[i], 1);
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/mgl_default_xxx.fp b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/mgl_default_xxx.fp
new file mode 100644
index 0000000..a26dc97
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/mgl_default_xxx.fp
@@ -0,0 +1,10 @@
+// Copyright 2012 JogAmp Community. All rights reserved.
+
+varying  vec4          frontColor;
+
+void main (void)
+{
+  gl_FragColor = frontColor;
+  // gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
+}
+
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/mgl_default_xxx.vp b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/mgl_default_xxx.vp
new file mode 100644
index 0000000..097a73e
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/mgl_default_xxx.vp
@@ -0,0 +1,14 @@
+//Copyright 2012 JogAmp Community. All rights reserved.
+
+
+uniform mat4    mgl_PMVMatrix[2]; // P, Mv
+attribute vec4  mgl_Vertex;
+attribute vec4  mgl_Color;
+
+varying   vec4  frontColor;
+
+void main(void)
+{
+  frontColor = mgl_Color;
+  gl_Position = mgl_PMVMatrix[0] * mgl_PMVMatrix[1] * mgl_Vertex;
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/texture02_xxx.fp b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/texture02_xxx.fp
new file mode 100644
index 0000000..d222606
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/texture02_xxx.fp
@@ -0,0 +1,20 @@
+// Copyright 2012 JogAmp Community. All rights reserved.
+
+varying  vec2          mgl_texCoord;
+varying  vec4          frontColor;
+
+uniform sampler2D      mgl_Texture0;
+uniform sampler2D      mgl_Texture1;
+
+const vec4 One = vec4(1.0, 1.0, 1.0, 1.0);
+
+void main (void)
+{
+  vec4 texColor0 = texture2D(mgl_Texture0, mgl_texCoord);
+  vec4 texColor1 = texture2D(mgl_Texture1, mgl_texCoord);
+
+  // gl_FragColor = ( ( texColor0 + texColor1 ) / 2.0 ) * frontColor;
+  // gl_FragColor = mix(texColor0, texColor1, One/2.0) * frontColor;
+  gl_FragColor = min(One, mix(texColor0, texColor1, One/2.0) * 1.6) * frontColor;
+}
+
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/Gears.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/Gears.java
index b4881ab..b3166b0 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/Gears.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/Gears.java
@@ -29,6 +29,8 @@ public class Gears implements GLEventListener {
   private int gear1=0, gear2=0, gear3=0;
   private float angle = 0.0f;
   private int swapInterval;
+  private MouseListener gearsMouse = new GearsMouseAdapter();    
+  private KeyListener gearsKeys = new GearsKeyAdapter();
 
   // private boolean mouseRButtonDown = false;
   private int prevMouseX, prevMouseY;
@@ -122,18 +124,15 @@ public class Gears implements GLEventListener {
             
     gl.glEnable(GL2.GL_NORMALIZE);
                 
-    // MouseListener gearsMouse = new TraceMouseAdapter(new GearsMouseAdapter());
-    MouseListener gearsMouse = new GearsMouseAdapter();    
-    KeyListener gearsKeys = new GearsKeyAdapter();
-
-    if (drawable instanceof Window) {
-        Window window = (Window) drawable;
+    final Object upstreamWidget = drawable.getUpstreamWidget();
+    if (upstreamWidget instanceof Window) {            
+        final Window window = (Window) upstreamWidget;
         window.addMouseListener(gearsMouse);
         window.addKeyListener(gearsKeys);
-    } else if (GLProfile.isAWTAvailable() && drawable instanceof java.awt.Component) {
-        java.awt.Component comp = (java.awt.Component) drawable;
+    } else if (GLProfile.isAWTAvailable() && upstreamWidget instanceof java.awt.Component) {
+        final java.awt.Component comp = (java.awt.Component) upstreamWidget;
         new AWTMouseAdapter(gearsMouse).addTo(comp);
-        new AWTKeyAdapter(gearsKeys).addTo(comp);
+        new AWTKeyAdapter(gearsKeys).addTo(comp);    
     }
   }
     
@@ -143,12 +142,16 @@ public class Gears implements GLEventListener {
 
     gl.setSwapInterval(swapInterval);
 
-    float h = (float)height / (float)width;
-            
     gl.glMatrixMode(GL2.GL_PROJECTION);
 
     gl.glLoadIdentity();
-    gl.glFrustum(-1.0f, 1.0f, -h, h, 5.0f, 60.0f);
+    if(height>width) {
+        float h = (float)height / (float)width;
+        gl.glFrustum(-1.0f, 1.0f, -h, h, 5.0f, 60.0f);
+    } else {
+        float h = (float)width / (float)height;
+        gl.glFrustum(-h, h, -1.0f, 1.0f, 5.0f, 60.0f);
+    }
     gl.glMatrixMode(GL2.GL_MODELVIEW);
     gl.glLoadIdentity();
     gl.glTranslatef(0.0f, 0.0f, -40.0f);
@@ -156,6 +159,14 @@ public class Gears implements GLEventListener {
 
   public void dispose(GLAutoDrawable drawable) {
     System.err.println("Gears: Dispose");
+    try {
+        final Object upstreamWidget = drawable.getUpstreamWidget();
+        if (upstreamWidget instanceof Window) {            
+            final Window window = (Window) upstreamWidget;
+            window.removeMouseListener(gearsMouse);
+            window.removeKeyListener(gearsKeys);
+        }
+    } catch (Exception e) { System.err.println("Catched: "); e.printStackTrace(); }
     setGears(0, 0, 0);
   }
 
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/awt/TestGearsGLJPanelAWTBug450.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/awt/TestGLJPanelAWTBug450.java
similarity index 77%
rename from src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/awt/TestGearsGLJPanelAWTBug450.java
rename to src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/awt/TestGLJPanelAWTBug450.java
index 7207e78..4f97feb 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/awt/TestGearsGLJPanelAWTBug450.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/awt/TestGLJPanelAWTBug450.java
@@ -30,11 +30,13 @@
 import javax.media.opengl.*;
 
 import com.jogamp.opengl.util.FPSAnimator;
+import com.jogamp.opengl.util.GLReadBufferUtil;
+import com.jogamp.opengl.util.texture.TextureIO;
 
 import javax.media.opengl.awt.GLJPanel;
 import javax.media.opengl.glu.gl2.GLUgl2;
 
-import com.jogamp.opengl.test.junit.jogl.demos.gl2.Gears;
+import com.jogamp.opengl.test.junit.jogl.demos.es2.RedSquareES2;
 import com.jogamp.opengl.test.junit.util.UITestCase;
 import java.awt.AWTException;
 import java.awt.BorderLayout;
@@ -59,23 +61,22 @@ import org.junit.Test;
  *
  * @author Wade Walker (adapted from TestGearsGLJPanelAWT)
  */
-public class TestGearsGLJPanelAWTBug450 extends UITestCase {
+public class TestGLJPanelAWTBug450 extends UITestCase {
     static GLProfile glp;
     static int width, height;
+    static int r_x, r_y;
     /** Set this if test fails. Needed because we can't throw an exception
      * all the way up the stack from where we test the pixel. */
     static boolean failed;
 
     @BeforeClass
     public static void initClass() {
-        if(GLProfile.isAvailable(GLProfile.GL2)) {
-            glp = GLProfile.get(GLProfile.GL2);
-            Assert.assertNotNull(glp);
-            width  = 512;
-            height = 256;
-        } else {
-            setTestSupported(false);
-        }
+        glp = GLProfile.getGL2ES2();
+        Assert.assertNotNull(glp);
+        height = 256;
+        width  = 2*height;
+        r_x    = 5*height/4; // 5/8 * width
+        r_y    =   height/2;
     }
 
     @AfterClass
@@ -85,26 +86,45 @@ public class TestGearsGLJPanelAWTBug450 extends UITestCase {
     protected void runTestGL(GLCapabilities caps)
             throws AWTException, InterruptedException, InvocationTargetException
     {
+        final GLReadBufferUtil screenshot = new GLReadBufferUtil(true, false);
         JFrame frame = new JFrame("Swing GLJPanel");
         Assert.assertNotNull(frame);
 
         GLJPanel glJPanel = new GLJPanel(caps);
         Assert.assertNotNull(glJPanel);
-        glJPanel.addGLEventListener(new Gears() {
+        RedSquareES2 demo = new RedSquareES2();
+        demo.setAspect((float)width/(float)height);
+        demo.setDoRotation(false);
+        glJPanel.addGLEventListener(demo);
+        glJPanel.addGLEventListener(new GLEventListener() {
+            int f = 0;
+            @Override
+            public void init(GLAutoDrawable drawable) {
+                // drawable.getGL().glClearColor(0, 0, 1, 1);                
+            }
             @Override
             public void display(GLAutoDrawable drawable) {
-                super.display(drawable);
                 // look at one pixel at the bottom of the frame, just right of
                 // the center line, and make sure it's not black
                 GL2 gl = GLUgl2.getCurrentGL2();
                 ByteBuffer bytebuffer = ByteBuffer.allocateDirect( 3 );
-                gl.glReadPixels( 260, 10, 1, 1, GL2.GL_BGR, GL2.GL_UNSIGNED_BYTE, bytebuffer );
+                gl.glReadPixels( r_x, r_y, 1, 1, GL2.GL_BGR, GL2.GL_UNSIGNED_BYTE, bytebuffer );
                 byte byte0 = bytebuffer.get( 0 );
                 byte byte1 = bytebuffer.get( 1 );
                 byte byte2 = bytebuffer.get( 2 );
-                if( (byte0 == 0) && (byte1 == 0) && (byte2 == 0) )
+                if( (byte0 == 0) && (byte1 == 0) && (byte2 == 0) ) {
                     failed = true;
+                }
+                if(0 == f) {
+                    System.err.println("BGR ("+r_x+"/"+r_y+"): "+byte0+", "+byte1+", "+byte2+" - OK "+(!failed));
+                    snapshot(getSimpleTestName("."), f, null, gl, screenshot, TextureIO.PNG, null);
+                }
+                f++;
             }
+            @Override
+            public void dispose(GLAutoDrawable drawable) {}
+            @Override
+            public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) { }
         });
 
         FPSAnimator animator = new FPSAnimator(glJPanel, 60);
@@ -163,6 +183,6 @@ public class TestGearsGLJPanelAWTBug450 extends UITestCase {
                 } catch (Exception ex) { ex.printStackTrace(); }
             }
         }
-        org.junit.runner.JUnitCore.main(TestGearsGLJPanelAWTBug450.class.getName());
+        org.junit.runner.JUnitCore.main(TestGLJPanelAWTBug450.class.getName());
     }
 }
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/awt/TestGearsAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/awt/TestGearsAWT.java
index ff24979..498a328 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/awt/TestGearsAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/awt/TestGearsAWT.java
@@ -40,6 +40,8 @@ import com.jogamp.newt.event.TraceWindowAdapter;
 import com.jogamp.opengl.test.junit.jogl.demos.gl2.Gears;
 import com.jogamp.opengl.test.junit.util.UITestCase;
 import com.jogamp.opengl.test.junit.util.QuitAdapter;
+
+import java.awt.Dimension;
 import java.awt.Frame;
 import java.io.BufferedReader;
 import java.io.IOException;
@@ -61,8 +63,8 @@ public class TestGearsAWT extends UITestCase {
         if(GLProfile.isAvailable(GLProfile.GL2)) {
             glp = GLProfile.get(GLProfile.GL2);
             Assert.assertNotNull(glp);
-            width  = 512;
-            height = 512;
+            width  = 640;
+            height = 480;
         } else {
             setTestSupported(false);
         }
@@ -80,8 +82,11 @@ public class TestGearsAWT extends UITestCase {
 
         final GLCanvas glCanvas = new GLCanvas(caps);
         Assert.assertNotNull(glCanvas);
+        Dimension glc_sz = new Dimension(width, height);
+        glCanvas.setMinimumSize(glc_sz);
+        glCanvas.setPreferredSize(glc_sz);
+        glCanvas.setSize(glc_sz);
         frame.add(glCanvas);
-        frame.setSize(512, 512);
 
         glCanvas.addGLEventListener(new Gears(1));
 
@@ -93,6 +98,7 @@ public class TestGearsAWT extends UITestCase {
 
         javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
             public void run() {
+                frame.pack();
                 frame.setVisible(true);
             }});
         animator.setUpdateFPSFrames(60, System.err);        
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/awt/TestGearsGLJPanelAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/awt/TestGearsGLJPanelAWT.java
index c7254dd..cb54c26 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/awt/TestGearsGLJPanelAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/awt/TestGearsGLJPanelAWT.java
@@ -37,6 +37,7 @@ import com.jogamp.opengl.test.junit.jogl.demos.gl2.Gears;
 import com.jogamp.opengl.test.junit.util.UITestCase;
 import java.awt.AWTException;
 import java.awt.BorderLayout;
+import java.awt.Dimension;
 import java.lang.reflect.InvocationTargetException;
 import javax.swing.JFrame;
 import javax.swing.SwingUtilities;
@@ -55,8 +56,8 @@ public class TestGearsGLJPanelAWT extends UITestCase {
         if(GLProfile.isAvailable(GLProfile.GL2)) {
             glp = GLProfile.get(GLProfile.GL2);
             Assert.assertNotNull(glp);
-            width  = 512;
-            height = 512;
+            width  = 640;
+            height = 480;
         } else {
             setTestSupported(false);
         }
@@ -74,6 +75,10 @@ public class TestGearsGLJPanelAWT extends UITestCase {
 
         GLJPanel glJPanel = new GLJPanel(caps);
         Assert.assertNotNull(glJPanel);
+        Dimension glc_sz = new Dimension(width, height);
+        glJPanel.setMinimumSize(glc_sz);
+        glJPanel.setPreferredSize(glc_sz);
+        glJPanel.setSize(glc_sz);
         glJPanel.addGLEventListener(new Gears());
 
         FPSAnimator animator = new FPSAnimator(glJPanel, 60);
@@ -83,7 +88,8 @@ public class TestGearsGLJPanelAWT extends UITestCase {
         SwingUtilities.invokeAndWait(new Runnable() {
                 public void run() {
                     _frame.getContentPane().add(_glJPanel, BorderLayout.CENTER);
-                    _frame.setSize(512, 512);
+                    _frame.getContentPane().validate();
+                    _frame.pack();
                     _frame.setVisible(true);
                 } } ) ;
 
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/newt/TestGearsNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/newt/TestGearsNEWT.java
index 0f3c7e2..93dc885 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/newt/TestGearsNEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/newt/TestGearsNEWT.java
@@ -55,8 +55,8 @@ public class TestGearsNEWT extends UITestCase {
         if(GLProfile.isAvailable(GLProfile.GL2)) {
             glp = GLProfile.get(GLProfile.GL2);
             Assert.assertNotNull(glp);
-            width  = 512;
-            height = 512;
+            width  = 640;
+            height = 480;
         } else {
             setTestSupported(false);
         }
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/newt/TestGearsNewtAWTWrapper.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/newt/TestGearsNewtAWTWrapper.java
index 54cfd0a..62914bd 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/newt/TestGearsNewtAWTWrapper.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/newt/TestGearsNewtAWTWrapper.java
@@ -53,8 +53,8 @@ public class TestGearsNewtAWTWrapper extends UITestCase {
     public static void initClass() {
         glp = GLProfile.getGL2ES2();
         Assert.assertNotNull(glp);
-        width  = 512;
-        height = 512;
+        width  = 640;
+        height = 480;
     }
 
     @AfterClass
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLShaderState01NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLShaderState01NEWT.java
index 881399d..987dedc 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLShaderState01NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLShaderState01NEWT.java
@@ -47,7 +47,6 @@ import javax.media.opengl.GLUniformData;
 
 import org.junit.Assert;
 import org.junit.Test;
-import org.junit.BeforeClass;
 
 /**
  * Testing different vertex attribute (VA) data sets on one shader
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLShaderState02NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLShaderState02NEWT.java
index 6421c24..91dcfc3 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLShaderState02NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLShaderState02NEWT.java
@@ -47,7 +47,6 @@ import javax.media.opengl.GLUniformData;
 
 import org.junit.Assert;
 import org.junit.Test;
-import org.junit.BeforeClass;
 
 /**
  * Testing different vertex attribute (VA) data sets on one shader
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/ReadBufferBase.java b/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/ReadBufferBase.java
index e3ca25a..4ef7b27 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/ReadBufferBase.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/ReadBufferBase.java
@@ -85,9 +85,7 @@ public class ReadBufferBase implements GLEventListener {
     }
 
     public void display(GLAutoDrawable drawable) {
-        GL gl = drawable.getGL();
-
-        readBufferUtil.readPixels(gl, drawable, false);
+        readBufferUtil.readPixels(drawable.getGL(), false);
     }
 
 }
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/Surface2File.java b/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/Surface2File.java
index d1297e0..974e322 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/Surface2File.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/Surface2File.java
@@ -34,14 +34,24 @@ import com.jogamp.opengl.util.GLReadBufferUtil;
 
 import java.io.File;
 import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
 
 import javax.media.nativewindow.*;
 
 public class Surface2File implements SurfaceUpdatedListener {
 
-    GLReadBufferUtil readBufferUtil = new GLReadBufferUtil(false, false);
+    final String filename;
+    final boolean alpha;
+    final GLReadBufferUtil readBufferUtil;
     int shotNum = 0;
 
+    public Surface2File(String filename, boolean alpha) {
+        this.filename = filename;
+        this.alpha = alpha;        
+        this.readBufferUtil = new GLReadBufferUtil(alpha, false);
+    }
+    
     public void dispose(GL gl) {
         readBufferUtil.dispose(gl);
     }
@@ -54,10 +64,10 @@ public class Surface2File implements SurfaceUpdatedListener {
                 GL gl = ctx.getGL();
                 // FIXME glFinish() is an expensive paranoia sync, should not be necessary due to spec
                 gl.glFinish();
-                if(readBufferUtil.readPixels(gl, drawable, false)) {
+                if(readBufferUtil.readPixels(gl, false)) {
                     gl.glFinish();
                     try {
-                        surface2File("shot");
+                        surface2File();
                     } catch (IOException ex) {
                         throw new RuntimeException("can not write survace to file", ex);
                     }
@@ -66,14 +76,17 @@ public class Surface2File implements SurfaceUpdatedListener {
         }
     }
 
-    public void surface2File(String basename) throws IOException {
+    public void surface2File() throws IOException {
         if (!readBufferUtil.isValid()) {
             return;
         }
-
-        File file = File.createTempFile(basename + shotNum + "-", ".tga");
+        final StringWriter sw = new StringWriter();
+        {
+            final String pfmt = alpha ? "rgba" : "rgb_" ;
+            new PrintWriter(sw).printf("%s-I_%s-%04d.png", filename, pfmt, shotNum);
+        }
+        File file = new File(sw.toString());
         readBufferUtil.write(file);
-        System.err.println("Wrote: " + file.getAbsolutePath() + ", ...");
         shotNum++;
     }
 }
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/TestOffscreen01GLPBufferNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/TestOffscreen01GLPBufferNEWT.java
index 3f1fd14..2ed4714 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/TestOffscreen01GLPBufferNEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/TestOffscreen01GLPBufferNEWT.java
@@ -32,8 +32,6 @@ import com.jogamp.newt.Display;
 import com.jogamp.newt.NewtFactory;
 import com.jogamp.newt.Screen;
 import com.jogamp.newt.Window;
-import com.jogamp.newt.event.MouseListener;
-import com.jogamp.newt.event.WindowListener;
 import com.jogamp.newt.opengl.GLWindow;
 import org.junit.AfterClass;
 import org.junit.Assert;
@@ -42,7 +40,6 @@ import org.junit.BeforeClass;
 import org.junit.Test;
 
 import javax.media.opengl.*;
-import javax.media.nativewindow.*;
 
 import com.jogamp.opengl.test.junit.util.UITestCase;
 import com.jogamp.opengl.test.junit.jogl.demos.es2.RedSquareES2;
@@ -72,6 +69,7 @@ public class TestOffscreen01GLPBufferNEWT extends UITestCase {
     public void init() {
         capsDefault = new GLCapabilities(glpDefault);
         Assert.assertNotNull(capsDefault);
+        capsDefault.setAlphaBits(1); // req. alpha channel        
     }
 
     private void do01OffscreenWindowPBuffer(GLCapabilities caps) {
@@ -280,14 +278,8 @@ public class TestOffscreen01GLPBufferNEWT extends UITestCase {
         Assert.assertNotNull(glWindow);
         glWindow.setVisible(true);
 
-        WindowListener wl=null;
-        MouseListener ml=null;
-        SurfaceUpdatedListener ul=null;
-
-        GLEventListener demo = new RedSquareES2();
-        Assert.assertNotNull(demo);
-
-        WindowUtilNEWT.run(glWindow, demo, null, wl, ml, ul, 2, true /*snapshot*/, false /*debug*/);
+        WindowUtilNEWT.run(getSimpleTestName("."), glWindow, new RedSquareES2(), null, null, null, null, 
+                           2 /* frames */, true /*snapshot*/, false /*debug*/);
 
         if(null!=glWindow) {
             glWindow.destroy();
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/TestOffscreen02BitmapNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/TestOffscreen02BitmapNEWT.java
index 7898dda..0701d88 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/TestOffscreen02BitmapNEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/TestOffscreen02BitmapNEWT.java
@@ -33,14 +33,11 @@ import com.jogamp.newt.Display;
 import com.jogamp.newt.NewtFactory;
 import com.jogamp.newt.Screen;
 import com.jogamp.newt.Window;
-import com.jogamp.newt.event.MouseListener;
-import com.jogamp.newt.event.WindowListener;
 import com.jogamp.newt.opengl.GLWindow;
 import org.junit.Assert;
 import org.junit.Test;
 
 import javax.media.opengl.*;
-import javax.media.nativewindow.*;
 
 import com.jogamp.opengl.test.junit.util.UITestCase;
 import com.jogamp.opengl.test.junit.jogl.demos.es1.RedSquareES1;
@@ -119,14 +116,8 @@ public class TestOffscreen02BitmapNEWT extends UITestCase {
         Assert.assertNotNull(glWindow);
         glWindow.setVisible(true);
 
-        WindowListener wl=null;
-        MouseListener ml=null;
-        SurfaceUpdatedListener ul=null;
-
-        GLEventListener demo = new RedSquareES1();
-        Assert.assertNotNull(demo);
-
-        WindowUtilNEWT.run(glWindow, demo, null, wl, ml, ul, 2, true /*snapshot*/, false /*debug*/);
+        WindowUtilNEWT.run(getSimpleTestName("."), glWindow, new RedSquareES1(), null, null, null, null, 
+                           2 /* frames */, true /*snapshot*/, false /*debug*/);
 
         if(null!=glWindow) {
             glWindow.destroy();
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/WindowUtilNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/WindowUtilNEWT.java
index 1d1ee1e..efca752 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/WindowUtilNEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/WindowUtilNEWT.java
@@ -60,8 +60,8 @@ public class WindowUtilNEWT {
         }
     }
 
-    public static void run(GLWindow windowOffScreen, GLEventListener demo, 
-                           GLWindow windowOnScreen, WindowListener wl, MouseListener ml, 
+    public static void run(String testName, GLWindow windowOffScreen, GLEventListener demo, 
+                           GLWindow windowOnScreenBlit, WindowListener wl, MouseListener ml, 
                            SurfaceUpdatedListener ul, int frames, boolean snapshot, boolean debug) {
         Assert.assertNotNull(windowOffScreen);
         Assert.assertNotNull(demo);
@@ -69,35 +69,34 @@ public class WindowUtilNEWT {
         setDemoFields(demo, windowOffScreen, windowOffScreen, debug);
         windowOffScreen.addGLEventListener(demo);
 
-        if ( null != windowOnScreen ) {
+        if ( null != windowOnScreenBlit ) {
             if(null!=wl) {
-                windowOnScreen.addWindowListener(wl);
+                windowOnScreenBlit.addWindowListener(wl);
             }
             if(null!=ml) {
-                windowOnScreen.addMouseListener(ml);
+                windowOnScreenBlit.addMouseListener(ml);
             }
-            windowOnScreen.setVisible(true);
+            windowOnScreenBlit.setVisible(true);
         }
 
         GLDrawable readDrawable = windowOffScreen.getContext().getGLDrawable() ;
-
-        if ( null == windowOnScreen ) {
-            if(snapshot) {
-                Surface2File s2f = new Surface2File();
-                windowOffScreen.addSurfaceUpdatedListener(s2f);
-            }
-        } else {
+        if ( null != windowOnScreenBlit ) {
             ReadBuffer2Screen readDemo = new ReadBuffer2Screen( readDrawable ) ;
-            windowOnScreen.addGLEventListener(readDemo);
+            windowOnScreenBlit.addGLEventListener(readDemo);
+        }
+        if(snapshot) {
+            final boolean alpha = windowOffScreen.getChosenGLCapabilities().getAlphaBits()>0;
+            Surface2File s2f = new Surface2File(testName, alpha);
+            windowOffScreen.addSurfaceUpdatedListener(s2f);
         }
         if(null!=ul) {
             windowOffScreen.addSurfaceUpdatedListener(ul);
         }
 
         if(debug) {
-            System.err.println("+++++++++++++++++++++++++++");
+            System.err.println("+++++++++++++++++++++++++++ "+testName);
             System.err.println(windowOffScreen);
-            System.err.println("+++++++++++++++++++++++++++");
+            System.err.println("+++++++++++++++++++++++++++ "+testName);
         }
 
         while ( windowOffScreen.getTotalFPSFrames() < frames) {
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestNewtCanvasSWTGLn.java b/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestNewtCanvasSWTGLn.java
new file mode 100644
index 0000000..6a27e6f
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestNewtCanvasSWTGLn.java
@@ -0,0 +1,233 @@
+/**
+ * Copyright 2010 JogAmp Community. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ * 
+ *    1. Redistributions of source code must retain the above copyright notice, this list of
+ *       conditions and the following disclaimer.
+ * 
+ *    2. Redistributions in binary form must reproduce the above copyright notice, this list
+ *       of conditions and the following disclaimer in the documentation and/or other materials
+ *       provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * 
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of JogAmp Community.
+ */
+ 
+package com.jogamp.opengl.test.junit.jogl.swt;
+
+import javax.media.opengl.GLAutoDrawable;
+import javax.media.opengl.GLCapabilities;
+import javax.media.opengl.GLCapabilitiesImmutable;
+import javax.media.opengl.GLEventListener;
+import javax.media.opengl.GLProfile;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
+import org.junit.Assert;
+import org.junit.Assume;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.After;
+import org.junit.Test;
+
+import com.jogamp.nativewindow.swt.SWTAccessor;
+import com.jogamp.newt.opengl.GLWindow;
+import com.jogamp.newt.swt.NewtCanvasSWT;
+import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
+import com.jogamp.opengl.test.junit.jogl.demos.es2.MultisampleDemoES2;
+import com.jogamp.opengl.test.junit.util.UITestCase;
+import com.jogamp.opengl.util.Animator;
+import com.jogamp.opengl.util.GLReadBufferUtil;
+import com.jogamp.opengl.util.texture.TextureIO;
+
+/**
+ * Tests that a basic SWT app can open without crashing under different GL profiles
+ * _and_ custom GLCapabilities. 
+ * <p> 
+ * Uses JOGL's NewtCanvasSWT, which allows to be a native container of a NEWT Window.<br/>
+ * This method allows utilizing custom GLCapability settings,
+ * independent from the already instantiated SWT visual.
+ * </p>
+ * <p>
+ * Note that {@link SWTAccessor#invoke(boolean, Runnable)} is still used to comply w/ 
+ * SWT running on Mac OSX, i.e. to enforce UI action on the main thread.
+ * </p>
+ */
+public class TestNewtCanvasSWTGLn extends UITestCase {
+
+    static int duration = 250;
+
+    static final int iwidth = 640;
+    static final int iheight = 480;
+
+    Display display = null;
+    Shell shell = null;
+    Composite composite = null;
+
+    @BeforeClass
+    public static void startup() {
+        System.out.println( "GLProfile " + GLProfile.glAvailabilityToString() );
+    }
+
+    @Before
+    public void init() {
+        SWTAccessor.invoke(true, new Runnable() {
+            public void run() {        
+                display = new Display();
+                Assert.assertNotNull( display );
+                shell = new Shell( display );
+                Assert.assertNotNull( shell );
+                shell.setLayout( new FillLayout() );
+                composite = new Composite( shell, SWT.NONE );
+                composite.setLayout( new FillLayout() );
+                Assert.assertNotNull( composite );
+            }});
+    }
+
+    @After
+    public void release() {
+        Assert.assertNotNull( display );
+        Assert.assertNotNull( shell );
+        Assert.assertNotNull( composite );
+        try {
+            SWTAccessor.invoke(true, new Runnable() {
+               public void run() {
+                composite.dispose();
+                shell.dispose();
+                display.dispose();
+               }});
+        }
+        catch( Throwable throwable ) {
+            throwable.printStackTrace();
+            Assume.assumeNoException( throwable );
+        }
+        display = null;
+        shell = null;
+        composite = null;
+    }
+
+    protected void runTestAGL( GLCapabilitiesImmutable caps, GLEventListener demo, 
+                               boolean postAttach, boolean useAnimator ) throws InterruptedException {
+        final GLReadBufferUtil screenshot = new GLReadBufferUtil(false, false);
+        
+        final GLWindow glWindow1 = GLWindow.create(caps);
+        Assert.assertNotNull(glWindow1);
+        Assert.assertEquals(false, glWindow1.isVisible());
+        Assert.assertEquals(false, glWindow1.isNativeValid());
+        Assert.assertNull(glWindow1.getParent());
+        glWindow1.addGLEventListener(demo);
+        glWindow1.addGLEventListener(new GLEventListener() {
+           int displayCount = 0;
+           public void init(final GLAutoDrawable drawable) { } 
+           public void reshape(final GLAutoDrawable drawable, final int x, final int y, final int width, final int height) { }
+           public void display(final GLAutoDrawable drawable) {
+              if(displayCount < 3) {
+                  snapshot(getSimpleTestName("."), displayCount++, null, drawable.getGL(), screenshot, TextureIO.PNG, null);
+              }
+           }
+           public void dispose(final GLAutoDrawable drawable) { }
+        });       
+        
+        final NewtCanvasSWT canvas1 = NewtCanvasSWT.create( composite, 0, postAttach ? null : glWindow1 );
+        Assert.assertNotNull( canvas1 );
+
+        SWTAccessor.invoke(true, new Runnable() {
+           public void run() {
+              shell.setText( getSimpleTestName(".") );
+              shell.setSize( 640, 480 );
+              shell.open();
+           }
+        });
+        
+        if(postAttach) {
+            canvas1.setNEWTChild(glWindow1);
+        }
+        
+        // canvas1.update();
+        
+        Animator anim;
+        if(useAnimator) {
+            anim = new Animator(glWindow1);
+            anim.start();
+        } else {
+            anim = null;
+        }
+        
+        long lStartTime = System.currentTimeMillis();
+        long lEndTime = lStartTime + duration;
+        try {
+            while( (System.currentTimeMillis() < lEndTime) && !canvas1.isDisposed() ) {
+                if( !display.readAndDispatch() ) {
+                    // blocks on linux .. display.sleep();
+                    Thread.sleep(10);
+                }
+            }
+        } catch( Throwable throwable ) {
+            throwable.printStackTrace();
+            Assume.assumeNoException( throwable );
+        }
+        if(null != anim) {
+            anim.stop();
+        }
+        
+        canvas1.dispose();
+    }
+
+    @Test
+    public void preAttach_WithAnimator() throws InterruptedException {
+        runTestAGL( new GLCapabilities(GLProfile.getGL2ES2()), new GearsES2(), false /* postAttach */, true /* animator */);
+    }
+
+    @Test
+    public void preAttach_NoAnimator() throws InterruptedException {
+        runTestAGL( new GLCapabilities(GLProfile.getGL2ES2()), new GearsES2(), false /* postAttach */, false /* animator */);
+    }
+
+    @Test
+    public void postAttach_WithAnimator() throws InterruptedException {
+        runTestAGL( new GLCapabilities(GLProfile.getGL2ES2()), new GearsES2(), true /* postAttach */, true /* animator */);
+    }
+    
+    @Test
+    public void test_MultisampleAndAlpha() throws InterruptedException {
+        GLCapabilities caps = new GLCapabilities(GLProfile.getGL2ES2());
+        caps.setSampleBuffers(true);
+        caps.setNumSamples(2);
+        runTestAGL( caps, new MultisampleDemoES2(true), false /* postAttach */, false /* animator */);
+    }
+
+    static int atoi(String a) {
+        int i=0;
+        try {
+            i = Integer.parseInt(a);
+        } catch (Exception ex) { ex.printStackTrace(); }
+        return i;
+    }
+
+    public static void main(String args[]) {
+        for(int i=0; i<args.length; i++) {
+            if(args[i].equals("-time")) {
+                duration = atoi(args[++i]);
+            }
+        }
+        System.out.println("durationPerTest: "+duration);
+        org.junit.runner.JUnitCore.main(TestNewtCanvasSWTGLn.class.getName());
+    }
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTAccessor02GLn.java b/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTAccessor02GLn.java
deleted file mode 100644
index 0c35025..0000000
--- a/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTAccessor02GLn.java
+++ /dev/null
@@ -1,257 +0,0 @@
-/**
- * Copyright 2010 JogAmp Community. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are
- * permitted provided that the following conditions are met:
- * 
- *    1. Redistributions of source code must retain the above copyright notice, this list of
- *       conditions and the following disclaimer.
- * 
- *    2. Redistributions in binary form must reproduce the above copyright notice, this list
- *       of conditions and the following disclaimer in the documentation and/or other materials
- *       provided with the distribution.
- * 
- * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- * 
- * The views and conclusions contained in the software and documentation are those of the
- * authors and should not be interpreted as representing official policies, either expressed
- * or implied, of JogAmp Community.
- */
- 
-package com.jogamp.opengl.test.junit.jogl.swt;
-
-import javax.media.opengl.GL2ES1;
-import javax.media.opengl.GLContext;
-import javax.media.opengl.GLDrawableFactory;
-import javax.media.opengl.GLProfile;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.PaintEvent;
-import org.eclipse.swt.events.PaintListener;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Shell;
-
-import org.junit.Assert;
-import org.junit.Assume;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.After;
-import org.junit.Test;
-
-import com.jogamp.nativewindow.swt.SWTAccessor;
-import com.jogamp.opengl.test.junit.jogl.demos.es1.OneTriangle;
-import com.jogamp.opengl.test.junit.util.UITestCase;
-import javax.media.nativewindow.AbstractGraphicsDevice;
-import javax.media.nativewindow.ProxySurface;
-import javax.media.opengl.GLCapabilities;
-import javax.media.opengl.GLDrawable;
-import org.eclipse.swt.widgets.Canvas;
-
-/**
- * Tests that a basic SWT app can open without crashing under different GL profiles. 
- * <p> 
- * Uses JOGL's SWTAccessor only.
- * </p>
- * @author Wade Walker, et.al.
- */
-public class TestSWTAccessor02GLn extends UITestCase {
-
-    static int duration = 250;
-
-    static final int iwidth = 640;
-    static final int iheight = 480;
-
-    Display display = null;
-    Shell shell = null;
-    Composite composite = null;
-
-    @BeforeClass
-    public static void startup() {
-        System.out.println( "GLProfile " + GLProfile.glAvailabilityToString() );
-    }
-
-    @Before
-    public void init() {
-        final Display[] r = new Display[1];
-        final Shell[] s = new Shell[1];
-        SWTAccessor.invoke(true, new Runnable() {
-           public void run() {
-               r[0] = new Display();
-               s[0] = new Shell();
-           }
-        });
-        display = r[0];
-        shell = s[0];        
-        Assert.assertNotNull( display );        
-        Assert.assertNotNull( shell );
-        
-        SWTAccessor.invoke(true, new Runnable() {
-           public void run() {
-            shell.setLayout( new FillLayout() );
-            composite = new Composite( shell, SWT.NONE );
-            Assert.assertNotNull( composite );
-            composite.setLayout( new FillLayout() );
-           }});
-    }
-
-    @After
-    public void release() {
-        Assert.assertNotNull( display );
-        Assert.assertNotNull( shell );
-        Assert.assertNotNull( composite );
-        try {
-            SWTAccessor.invoke(true, new Runnable() {
-               public void run() {
-                composite.dispose();
-                shell.dispose();
-                display.dispose();
-               }});
-        }
-        catch( Throwable throwable ) {
-            throwable.printStackTrace();
-            Assume.assumeNoException( throwable );
-        }
-        display = null;
-        shell = null;
-        composite = null;
-    }
-    
-    class CanvasCStr implements Runnable {
-           Canvas canvas;
-           
-           public void run() {
-               canvas = new Canvas( composite, SWT.NO_BACKGROUND);
-           }        
-    }
-    
-    protected void runTestAGL( GLProfile glprofile ) throws InterruptedException {
-        GLCapabilities caps = new GLCapabilities(glprofile);
-        GLDrawableFactory factory = GLDrawableFactory.getFactory(glprofile);
-        
-        // need SWT.NO_BACKGROUND to prevent SWT from clearing the window
-        // at the wrong times (we use glClear for this instead)
-        CanvasCStr canvasCstr = new CanvasCStr();
-        
-        SWTAccessor.invoke(true, canvasCstr);
-        final Canvas canvas = canvasCstr.canvas;        
-        Assert.assertNotNull( canvas );
-        
-        SWTAccessor.setRealized(canvas, true);
-        AbstractGraphicsDevice device = SWTAccessor.getDevice(canvas);
-        long nativeWindowHandle = SWTAccessor.getWindowHandle(canvas);
-        System.err.println("*** device: " + device);
-        System.err.println("*** window handle: 0x" + Long.toHexString(nativeWindowHandle));
-        
-        ProxySurface proxySurface = factory.createProxySurface(device, nativeWindowHandle, caps, null);
-        Assert.assertNotNull( proxySurface );        
-        proxySurface.surfaceSizeChanged( 640, 480 );
-        System.err.println("*** ProxySurface: " + proxySurface);
-        final GLDrawable drawable = factory.createGLDrawable(proxySurface);
-        Assert.assertNotNull( drawable );
-        drawable.setRealized(true);
-        System.err.println("*** Drawable: " + drawable);
-        Assert.assertTrue( drawable.isRealized() );
-        final GLContext glcontext = drawable.createContext(null);
-        // trigger native creation ..
-        if( GLContext.CONTEXT_NOT_CURRENT < glcontext.makeCurrent() ) {        
-            glcontext.release();
-        }
-        
-        final boolean[] sizeMissing = new boolean[] { false };
-        
-        // fix the viewport when the user resizes the window
-        canvas.addListener( SWT.Resize, new Listener() {
-            public void handleEvent( Event event ) {
-                Rectangle rectangle = canvas.getClientArea();
-                boolean glok=false;
-                if( GLContext.CONTEXT_NOT_CURRENT < glcontext.makeCurrent() ) {
-                    glok=true;
-                    GL2ES1 gl = glcontext.getGL().getGL2ES1();
-                    OneTriangle.setup( gl, rectangle.width, rectangle.height );
-                    glcontext.release();
-                } else {
-                    sizeMissing[0] = true;
-                }
-                System.err.println("resize: glok " + glok);
-            }
-        });
-
-        // draw the triangle when the OS tells us that any part of the window needs drawing
-        canvas.addPaintListener( new PaintListener() {
-            public void paintControl( PaintEvent paintevent ) {
-                Rectangle rectangle = canvas.getClientArea();
-                boolean glok=false;
-                if( GLContext.CONTEXT_NOT_CURRENT < glcontext.makeCurrent() ) {
-                    glok=true;
-                    GL2ES1 gl = glcontext.getGL().getGL2ES1();
-                    if(sizeMissing[0]) {
-                        OneTriangle.setup( gl, rectangle.width, rectangle.height);
-                        sizeMissing[0] = false;
-                    }
-                    OneTriangle.render( gl, rectangle.width, rectangle.height);
-                    drawable.swapBuffers();
-                    glcontext.release();
-                }
-                System.err.println("paint: glok " + glok);
-            }
-        });
-        
-        shell.setText( getClass().getName() );
-        shell.setSize( 640, 480 );
-        shell.open();
-
-        long lStartTime = System.currentTimeMillis();
-        long lEndTime = lStartTime + duration;
-        try {
-            while( (System.currentTimeMillis() < lEndTime) && !canvas.isDisposed() ) {
-                if( !display.readAndDispatch() ) {
-                    // blocks on linux .. display.sleep();
-                    Thread.sleep(10);
-                }
-            }
-        } catch( Throwable throwable ) {
-            throwable.printStackTrace();
-            Assume.assumeNoException( throwable );
-        }
-        glcontext.destroy();
-        drawable.setRealized(false);
-        canvas.dispose();
-    }
-
-    @Test
-    public void test() throws InterruptedException {
-        GLProfile glprofile = GLProfile.getGL2ES1();
-        runTestAGL( glprofile );
-    }
-
-    static int atoi(String a) {
-        int i=0;
-        try {
-            i = Integer.parseInt(a);
-        } catch (Exception ex) { ex.printStackTrace(); }
-        return i;
-    }
-
-    public static void main(String args[]) {
-        for(int i=0; i<args.length; i++) {
-            if(args[i].equals("-time")) {
-                duration = atoi(args[++i]);
-            }
-        }
-        System.out.println("durationPerTest: "+duration);
-        org.junit.runner.JUnitCore.main(TestSWTAccessor02GLn.class.getName());
-    }
-}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTAWT01GLn.java b/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTAccessor03AWTGLn.java
similarity index 95%
rename from src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTAWT01GLn.java
rename to src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTAccessor03AWTGLn.java
index 021e117..ad8da8a 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTAWT01GLn.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTAccessor03AWTGLn.java
@@ -63,7 +63,7 @@ import com.jogamp.opengl.test.junit.util.UITestCase;
  * the SWT_AWT bridge.
  * @author Wade Walker, et.al.
  */
-public class TestSWTAWT01GLn extends UITestCase {
+public class TestSWTAccessor03AWTGLn extends UITestCase {
 
     static final int duration = 250;
 
@@ -75,7 +75,11 @@ public class TestSWTAWT01GLn extends UITestCase {
 
     @BeforeClass
     public static void startup() {
-        System.out.println( "GLProfile " + GLProfile.glAvailabilityToString() );        
+        System.out.println( "GLProfile " + GLProfile.glAvailabilityToString() ); 
+        Frame f0 = new Frame("Test - AWT 1st");
+        f0.add(new java.awt.Label("AWT was here 1st"));
+        f0.pack();
+        f0.setVisible(true);
         if(!GLProfile.isAvailable(GLProfile.GL2)) {
             setTestSupported(false);
         }
@@ -190,6 +194,6 @@ public class TestSWTAWT01GLn extends UITestCase {
     }
 
     public static void main(String args[]) {
-        org.junit.runner.JUnitCore.main( TestSWTAWT01GLn.class.getName() );
+        org.junit.runner.JUnitCore.main( TestSWTAccessor03AWTGLn.class.getName() );
     }
 }
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTEclipseGLCanvas01GLn.java b/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTEclipseGLCanvas01GLn.java
index f38d5c7..0bd47c9 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTEclipseGLCanvas01GLn.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTEclipseGLCanvas01GLn.java
@@ -53,6 +53,7 @@ import org.junit.BeforeClass;
 import org.junit.After;
 import org.junit.Test;
 
+import com.jogamp.nativewindow.swt.SWTAccessor;
 import com.jogamp.opengl.test.junit.jogl.demos.es1.OneTriangle;
 import com.jogamp.opengl.test.junit.util.UITestCase;
 
@@ -81,14 +82,17 @@ public class TestSWTEclipseGLCanvas01GLn extends UITestCase {
 
     @Before
     public void init() {
-        display = new Display();
-        Assert.assertNotNull( display );
-        shell = new Shell( display );
-        Assert.assertNotNull( shell );
-        shell.setLayout( new FillLayout() );
-        composite = new Composite( shell, SWT.NONE );
-        composite.setLayout( new FillLayout() );
-        Assert.assertNotNull( composite );
+        SWTAccessor.invoke(true, new Runnable() {
+            public void run() {        
+                display = new Display();
+                Assert.assertNotNull( display );
+                shell = new Shell( display );
+                Assert.assertNotNull( shell );
+                shell.setLayout( new FillLayout() );
+                composite = new Composite( shell, SWT.NONE );
+                composite.setLayout( new FillLayout() );
+                Assert.assertNotNull( composite );
+            }});
     }
 
     @After
@@ -97,9 +101,12 @@ public class TestSWTEclipseGLCanvas01GLn extends UITestCase {
         Assert.assertNotNull( shell );
         Assert.assertNotNull( composite );
         try {
-            composite.dispose();
-            shell.dispose();
-            display.dispose();
+            SWTAccessor.invoke(true, new Runnable() {
+               public void run() {
+                composite.dispose();
+                shell.dispose();
+                display.dispose();
+               }});
         }
         catch( Throwable throwable ) {
             throwable.printStackTrace();
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTJOGLGLCanvas01GLnAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTJOGLGLCanvas01GLn.java
similarity index 65%
rename from src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTJOGLGLCanvas01GLnAWT.java
rename to src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTJOGLGLCanvas01GLn.java
index 6abca28..4ca1dae 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTJOGLGLCanvas01GLnAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTJOGLGLCanvas01GLn.java
@@ -47,9 +47,12 @@ import org.junit.BeforeClass;
 import org.junit.After;
 import org.junit.Test;
 
+import com.jogamp.nativewindow.swt.SWTAccessor;
 import com.jogamp.opengl.swt.GLCanvas;
-import com.jogamp.opengl.test.junit.jogl.demos.es1.OneTriangle;
+import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
 import com.jogamp.opengl.test.junit.util.UITestCase;
+import com.jogamp.opengl.util.GLReadBufferUtil;
+import com.jogamp.opengl.util.texture.TextureIO;
 
 /**
  * Tests that a basic SWT app can open without crashing under different GL profiles.
@@ -57,12 +60,15 @@ import com.jogamp.opengl.test.junit.util.UITestCase;
  * Uses JOGL's new SWT GLCanvas.
  * </p>
  * <p>
- * Holds AWT in it's test name, since our impl. still needs the AWT threading, 
- * see {@link GLCanvas}.
+ * Note: To employ custom GLCapabilities, NewtCanvasSWT shall be used.
  * </p>
- * @author Wade Walker, et.al.
+ * <p>
+ * Note that {@link SWTAccessor#invoke(boolean, Runnable)} is still used to comply w/ 
+ * SWT running on Mac OSX, i.e. to enforce UI action on the main thread.
+ * </p>
+ * @author Wade Walker, et al.
  */
-public class TestSWTJOGLGLCanvas01GLnAWT extends UITestCase {
+public class TestSWTJOGLGLCanvas01GLn extends UITestCase {
 
     static int duration = 250;
 
@@ -80,14 +86,17 @@ public class TestSWTJOGLGLCanvas01GLnAWT extends UITestCase {
 
     @Before
     public void init() {
-        display = new Display();
-        Assert.assertNotNull( display );
-        shell = new Shell( display );
-        Assert.assertNotNull( shell );
-        shell.setLayout( new FillLayout() );
-        composite = new Composite( shell, SWT.NONE );
-        composite.setLayout( new FillLayout() );
-        Assert.assertNotNull( composite );
+        SWTAccessor.invoke(true, new Runnable() {
+            public void run() {        
+                display = new Display();
+                Assert.assertNotNull( display );
+                shell = new Shell( display );
+                Assert.assertNotNull( shell );
+                shell.setLayout( new FillLayout() );
+                composite = new Composite( shell, SWT.NONE );
+                composite.setLayout( new FillLayout() );
+                Assert.assertNotNull( composite );
+            }});
     }
 
     @After
@@ -96,9 +105,12 @@ public class TestSWTJOGLGLCanvas01GLnAWT extends UITestCase {
         Assert.assertNotNull( shell );
         Assert.assertNotNull( composite );
         try {
-            composite.dispose();
-            shell.dispose();
-            display.dispose();
+            SWTAccessor.invoke(true, new Runnable() {
+               public void run() {
+                composite.dispose();
+                shell.dispose();
+                display.dispose();
+               }});
         }
         catch( Throwable throwable ) {
             throwable.printStackTrace();
@@ -109,29 +121,32 @@ public class TestSWTJOGLGLCanvas01GLnAWT extends UITestCase {
         composite = null;
     }
 
-    protected void runTestAGL( GLProfile glprofile ) throws InterruptedException {
-        // need SWT.NO_BACKGROUND to prevent SWT from clearing the window
-        // at the wrong times (we use glClear for this instead)
-        final GLCapabilitiesImmutable caps = new GLCapabilities( glprofile );
+    protected void runTestAGL( GLCapabilitiesImmutable caps, GLEventListener demo ) throws InterruptedException {
+        final GLReadBufferUtil screenshot = new GLReadBufferUtil(false, false);
         
-        final GLCanvas canvas = new GLCanvas( composite, SWT.NO_BACKGROUND, caps, null, null);
+        final GLCanvas canvas = GLCanvas.create( composite, 0, caps, null, null);
         Assert.assertNotNull( canvas );
 
+        canvas.addGLEventListener( demo );
         canvas.addGLEventListener(new GLEventListener() {
-           public void init(final GLAutoDrawable drawable) { }
-           public void reshape(final GLAutoDrawable drawable, final int x, final int y, final int width, final int height) {
-                OneTriangle.setup( drawable.getGL().getGL2(), width, height );
-           }                 
+           int displayCount = 0;
+           public void init(final GLAutoDrawable drawable) { } 
+           public void reshape(final GLAutoDrawable drawable, final int x, final int y, final int width, final int height) { }
            public void display(final GLAutoDrawable drawable) {
-                OneTriangle.render( drawable.getGL().getGL2(), drawable.getWidth(), drawable.getHeight());
+              if(displayCount < 3) {
+                  snapshot(getSimpleTestName("."), displayCount++, null, drawable.getGL(), screenshot, TextureIO.PNG, null);
+              }
            }
-           public void dispose(final GLAutoDrawable drawable) {}         
-        });
+           public void dispose(final GLAutoDrawable drawable) { }
+        });       
        
-        shell.setText( getClass().getName() );
-        shell.setSize( 640, 480 );
-        shell.open();
-
+        SWTAccessor.invoke(true, new Runnable() {
+           public void run() {
+            shell.setText( getSimpleTestName(".") );
+            shell.setSize( 640, 480 );
+            shell.open();
+           } } );
+        
         long lStartTime = System.currentTimeMillis();
         long lEndTime = lStartTime + duration;
         try {
@@ -145,13 +160,15 @@ public class TestSWTJOGLGLCanvas01GLnAWT extends UITestCase {
             throwable.printStackTrace();
             Assume.assumeNoException( throwable );
         }
-        canvas.dispose();
+        SWTAccessor.invoke(true, new Runnable() {
+           public void run() {
+               canvas.dispose();
+           } } );
     }
 
     @Test
     public void test() throws InterruptedException {
-        GLProfile glprofile = GLProfile.getGL2ES1();
-        runTestAGL( glprofile );
+        runTestAGL( new GLCapabilities(GLProfile.getGL2ES2()), new GearsES2() );
     }
 
     static int atoi(String a) {
@@ -169,6 +186,6 @@ public class TestSWTJOGLGLCanvas01GLnAWT extends UITestCase {
             }
         }
         System.out.println("durationPerTest: "+duration);
-        org.junit.runner.JUnitCore.main(TestSWTJOGLGLCanvas01GLnAWT.class.getName());
+        org.junit.runner.JUnitCore.main(TestSWTJOGLGLCanvas01GLn.class.getName());
     }
 }
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestGLReadBufferUtilTextureIOWrite01AWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestGLReadBufferUtilTextureIOWrite01AWT.java
new file mode 100644
index 0000000..6cee319
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestGLReadBufferUtilTextureIOWrite01AWT.java
@@ -0,0 +1,156 @@
+/**
+ * Copyright 2011 JogAmp Community. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ * 
+ *    1. Redistributions of source code must retain the above copyright notice, this list of
+ *       conditions and the following disclaimer.
+ * 
+ *    2. Redistributions in binary form must reproduce the above copyright notice, this list
+ *       of conditions and the following disclaimer in the documentation and/or other materials
+ *       provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * 
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of JogAmp Community.
+ */
+ 
+package com.jogamp.opengl.test.junit.jogl.util.texture;
+
+import java.awt.Dimension;
+import java.awt.Frame;
+
+import javax.media.opengl.GLAutoDrawable;
+import javax.media.opengl.GLCapabilities;
+import javax.media.opengl.GLEventListener;
+import javax.media.opengl.GLProfile;
+import javax.media.opengl.awt.GLCanvas;
+
+import jogamp.nativewindow.jawt.JAWTUtil;
+
+import com.jogamp.opengl.util.Animator;
+import com.jogamp.opengl.util.GLReadBufferUtil;
+import com.jogamp.opengl.util.texture.TextureIO;
+
+import com.jogamp.opengl.test.junit.util.AWTRobotUtil;
+import com.jogamp.opengl.test.junit.util.UITestCase;
+import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
+
+import org.junit.Assert;
+import org.junit.Assume;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class TestGLReadBufferUtilTextureIOWrite01AWT extends UITestCase {
+    static GLProfile glp;
+    static GLCapabilities caps;
+    static int width, height;
+
+    @BeforeClass
+    public static void initClass() {
+        glp = GLProfile.getDefault();
+        Assert.assertNotNull(glp);
+        caps = new GLCapabilities(glp);
+        Assert.assertNotNull(caps);
+        caps.setAlphaBits(1); // req. alpha channel
+        width  = 256;
+        height = 256;
+    }
+
+    protected void testWritePNG_Impl(boolean offscreenLayer) throws InterruptedException {
+        final GLReadBufferUtil screenshotRGB = new GLReadBufferUtil(false, false);
+        final GLReadBufferUtil screenshotRGBA = new GLReadBufferUtil(true, false);
+        
+        if(!offscreenLayer && JAWTUtil.isOffscreenLayerRequired()) {
+            System.err.println("onscreen layer n/a");
+            return;
+        }
+        if(offscreenLayer && !JAWTUtil.isOffscreenLayerSupported()) {
+            System.err.println("offscreen layer n/a");
+            return;
+        }        
+        final GLCanvas glc = new GLCanvas(caps);
+        glc.setShallUseOffscreenLayer(offscreenLayer); // trigger offscreen layer - if supported
+        Dimension glc_sz = new Dimension(width, height);
+        glc.setMinimumSize(glc_sz);
+        glc.setPreferredSize(glc_sz);
+        final Frame frame = new Frame(getSimpleTestName("."));
+        Assert.assertNotNull(frame);
+        frame.add(glc);
+        
+        glc.setSize(width, height);
+        glc.addGLEventListener(new GearsES2(1));
+        glc.addGLEventListener(new GLEventListener() {
+            int f = 0;
+            public void init(GLAutoDrawable drawable) {}
+            public void dispose(GLAutoDrawable drawable) {}
+            public void display(GLAutoDrawable drawable) {
+                snapshot(getSimpleTestName("."), f, null, drawable.getGL(), screenshotRGBA, TextureIO.PNG, null);
+                snapshot(getSimpleTestName("."), f, null,  drawable.getGL(), screenshotRGB, TextureIO.PNG, null);
+                f++;
+            }
+            public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) { }
+        });
+        
+        Animator animator = new Animator(glc);
+        animator.setUpdateFPSFrames(60, null);
+        
+        try {
+            javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
+                public void run() {
+                    frame.pack();
+                    frame.setVisible(true);
+                }});
+        } catch( Throwable throwable ) {
+            throwable.printStackTrace();
+            Assume.assumeNoException( throwable );
+        }
+        Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glc, true));
+        Assert.assertEquals(true, AWTRobotUtil.waitForVisible(glc, true));
+        Assert.assertEquals(JAWTUtil.isOffscreenLayerSupported() && offscreenLayer,
+                            glc.isOffscreenLayerSurfaceEnabled());
+        animator.start();
+
+        while(animator.getTotalFPSFrames() < 2) {
+            Thread.sleep(60);
+        }
+        
+        animator.stop();
+        try {
+            javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
+                public void run() {
+                    frame.setVisible(false);
+                    frame.remove(glc);
+                    frame.dispose();
+                }});
+        } catch( Throwable throwable ) {
+            throwable.printStackTrace();
+            Assume.assumeNoException( throwable );
+        }        
+    }
+
+    @Test
+    public void testOnscreenWritePNG() throws InterruptedException {
+        testWritePNG_Impl(false);
+    }
+    
+    @Test
+    public void testOffscreenWritePNG() throws InterruptedException {
+        testWritePNG_Impl(true);
+    }
+
+    public static void main(String args[]) {
+        org.junit.runner.JUnitCore.main(TestGLReadBufferUtilTextureIOWrite01AWT.class.getName());
+    }
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestGLReadBufferUtilTextureIOWrite01NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestGLReadBufferUtilTextureIOWrite01NEWT.java
index 687465a..5681df0 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestGLReadBufferUtilTextureIOWrite01NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestGLReadBufferUtilTextureIOWrite01NEWT.java
@@ -28,8 +28,6 @@
  
 package com.jogamp.opengl.test.junit.jogl.util.texture;
 
-import java.io.File;
-
 import com.jogamp.newt.opengl.GLWindow;
 
 import javax.media.opengl.GLAutoDrawable;
@@ -37,9 +35,11 @@ import javax.media.opengl.GLCapabilities;
 import javax.media.opengl.GLEventListener;
 import javax.media.opengl.GLProfile;
 import com.jogamp.opengl.util.GLReadBufferUtil;
+import com.jogamp.opengl.util.texture.TextureIO;
 
 import com.jogamp.opengl.test.junit.util.UITestCase;
 import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
+import com.jogamp.opengl.test.junit.jogl.offscreen.WindowUtilNEWT;
 
 import org.junit.Assert;
 import org.junit.BeforeClass;
@@ -56,38 +56,58 @@ public class TestGLReadBufferUtilTextureIOWrite01NEWT extends UITestCase {
         Assert.assertNotNull(glp);
         caps = new GLCapabilities(glp);
         Assert.assertNotNull(caps);
+        caps.setAlphaBits(1); // req. alpha channel
         width  = 256;
         height = 256;
     }
 
-    protected void snapshot(GLAutoDrawable drawable, boolean alpha, boolean flip, String filename) {
-        GLReadBufferUtil screenshot = new GLReadBufferUtil(alpha, false);
-        if(screenshot.readPixels(drawable.getGL(), drawable, flip)) {
-            screenshot.write(new File(filename));
-        }                
-    }
-    
     @Test
-    public void testWritePNG_TGA_PAM() throws InterruptedException {
+    public void testOnscreenWritePNG_TGA_PAM() throws InterruptedException {
+        final GLReadBufferUtil screenshotRGB = new GLReadBufferUtil(false, false);
+        final GLReadBufferUtil screenshotRGBA = new GLReadBufferUtil(true, false);
         GLWindow glWindow = GLWindow.create(caps);
         Assert.assertNotNull(glWindow);
         glWindow.setTitle("Shared Gears NEWT Test");
         glWindow.setSize(width, height);
         glWindow.addGLEventListener(new GearsES2(1));
         glWindow.addGLEventListener(new GLEventListener() {
+            int f = 0;
+            public void init(GLAutoDrawable drawable) {}
+            public void dispose(GLAutoDrawable drawable) {}
+            public void display(GLAutoDrawable drawable) {
+                snapshot(getSimpleTestName("."), f++, null, drawable.getGL(), screenshotRGBA, TextureIO.PNG, null);
+                snapshot(getSimpleTestName("."), f++, null,  drawable.getGL(), screenshotRGB, TextureIO.PNG, null);                
+                snapshot(getSimpleTestName("."), f++, null, drawable.getGL(), screenshotRGBA, TextureIO.TGA, null);
+                snapshot(getSimpleTestName("."), f++, null,  drawable.getGL(), screenshotRGB, TextureIO.TGA, null);                
+                snapshot(getSimpleTestName("."), f++, null, drawable.getGL(), screenshotRGBA, TextureIO.PAM, null);
+                snapshot(getSimpleTestName("."), f++, null,  drawable.getGL(), screenshotRGB, TextureIO.PAM, null);                
+            }
+            public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) { }
+        });
+        glWindow.setVisible(true);
+        Thread.sleep(60);
+        glWindow.destroy();        
+    }
+
+    @Test
+    public void testOffscreenWritePNG() throws InterruptedException {
+        final GLReadBufferUtil screenshotRGB = new GLReadBufferUtil(false, false);
+        final GLReadBufferUtil screenshotRGBA = new GLReadBufferUtil(true, false);
+        final GLCapabilities caps2 = WindowUtilNEWT.fixCaps(caps, false, true, false);        
+        GLWindow glWindow = GLWindow.create(caps2);
+        Assert.assertNotNull(glWindow);
+        glWindow.setSize(width, height);
+        glWindow.addGLEventListener(new GearsES2(1));
+        glWindow.addGLEventListener(new GLEventListener() {
+            int f = 0;
             public void init(GLAutoDrawable drawable) {}
             public void dispose(GLAutoDrawable drawable) {}
             public void display(GLAutoDrawable drawable) {
-                // snapshot(drawable, false, true,  getSimpleTestName(".")+"-rgb_-"+drawable.getGLProfile().getName()+".ppm");
-                snapshot(drawable, true,  false, getSimpleTestName(".")+"-rgba-"+drawable.getGLProfile().getName()+".png");
-                snapshot(drawable, true,  false, getSimpleTestName(".")+"-rgba-"+drawable.getGLProfile().getName()+".tga");
-                snapshot(drawable, true,  true,  getSimpleTestName(".")+"-rgba-"+drawable.getGLProfile().getName()+".pam");
-                snapshot(drawable, false, false, getSimpleTestName(".")+"-rgb_-"+drawable.getGLProfile().getName()+".png");
-                snapshot(drawable, false, false, getSimpleTestName(".")+"-rgb_-"+drawable.getGLProfile().getName()+".tga");
-                snapshot(drawable, false, true,  getSimpleTestName(".")+"-rgb_-"+drawable.getGLProfile().getName()+".pam");
+                snapshot(getSimpleTestName("."), f, null, drawable.getGL(), screenshotRGBA, TextureIO.PNG, null);
+                snapshot(getSimpleTestName("."), f, null,  drawable.getGL(), screenshotRGB, TextureIO.PNG, null);
+                f++;
             }
-            public void reshape(GLAutoDrawable drawable, int x, int y,
-                    int width, int height) { }
+            public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) { }
         });
         glWindow.setVisible(true);
         Thread.sleep(60);
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestGLReadBufferUtilTextureIOWrite02AWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestGLReadBufferUtilTextureIOWrite02AWT.java
new file mode 100644
index 0000000..43641fe
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestGLReadBufferUtilTextureIOWrite02AWT.java
@@ -0,0 +1,181 @@
+/**
+ * Copyright 2011 JogAmp Community. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ * 
+ *    1. Redistributions of source code must retain the above copyright notice, this list of
+ *       conditions and the following disclaimer.
+ * 
+ *    2. Redistributions in binary form must reproduce the above copyright notice, this list
+ *       of conditions and the following disclaimer in the documentation and/or other materials
+ *       provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * 
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of JogAmp Community.
+ */
+ 
+package com.jogamp.opengl.test.junit.jogl.util.texture;
+
+import java.awt.Dimension;
+import java.awt.Frame;
+
+import javax.media.opengl.GLAutoDrawable;
+import javax.media.opengl.GLCapabilities;
+import javax.media.opengl.GLEventListener;
+import javax.media.opengl.GLProfile;
+import javax.media.opengl.Threading;
+import javax.media.opengl.awt.GLCanvas;
+
+import jogamp.nativewindow.jawt.JAWTUtil;
+
+import com.jogamp.opengl.util.Animator;
+import com.jogamp.opengl.util.GLReadBufferUtil;
+import com.jogamp.opengl.util.texture.TextureIO;
+
+import com.jogamp.opengl.test.junit.util.AWTRobotUtil;
+import com.jogamp.opengl.test.junit.util.UITestCase;
+import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
+
+import org.junit.Assert;
+import org.junit.Assume;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class TestGLReadBufferUtilTextureIOWrite02AWT extends UITestCase {
+    static GLProfile glp;
+    static GLCapabilities caps;
+    static int width, height;
+
+    @BeforeClass
+    public static void initClass() {
+        glp = GLProfile.getDefault();
+        Assert.assertNotNull(glp);
+        caps = new GLCapabilities(glp);
+        Assert.assertNotNull(caps);
+        caps.setAlphaBits(1); // req. alpha channel
+        width  = 64;
+        height = 64;
+    }
+
+    protected void testWritePNGWithResizeImpl(boolean offscreenLayer) throws InterruptedException {
+        if(!offscreenLayer && JAWTUtil.isOffscreenLayerRequired()) {
+            System.err.println("onscreen layer n/a");
+            return;
+        }
+        if(offscreenLayer && !JAWTUtil.isOffscreenLayerSupported()) {
+            System.err.println("offscreen layer n/a");
+            return;
+        }        
+        final GLReadBufferUtil screenshot = new GLReadBufferUtil(true, false);
+        final GLCanvas glc = new GLCanvas(caps);
+        glc.setShallUseOffscreenLayer(offscreenLayer); // trigger offscreen layer - if supported
+        Dimension glc_sz = new Dimension(width, height);
+        glc.setMinimumSize(glc_sz);
+        glc.setPreferredSize(glc_sz);
+        glc.setSize(glc_sz);
+        final Frame frame = new Frame(getSimpleTestName("."));
+        Assert.assertNotNull(frame);
+        frame.add(glc);
+        
+        glc.addGLEventListener(new GearsES2(1));
+        glc.addGLEventListener(new GLEventListener() {
+            int i=0, fw_old=0, dw_old=0, c=0;
+            public void init(GLAutoDrawable drawable) {}
+            public void dispose(GLAutoDrawable drawable) {}
+            public void display(GLAutoDrawable drawable) {
+                final int fw = frame.getWidth();
+                final int fh = frame.getHeight();
+                final int dw = drawable.getWidth();
+                final int dh = drawable.getHeight();
+                final boolean sz_changed = fw_old != fw && dw_old != dw && dw <= 512; // need to check both sizes [frame + drawable], due to async resize of AWT!
+                final boolean snap;
+                if(sz_changed) {
+                    c++;
+                    snap = c>3; // only snap the 3rd image ..
+                } else {
+                    snap = false;
+                }
+                
+                if(snap) {
+                    System.err.println("XXX: ["+fw_old+", "+dw_old+"], "+fw+"x"+fh+", "+dw+"x"+dh+", sz_changed "+sz_changed+", snap "+snap);
+                    c=0;
+                    snapshot(getSimpleTestName("."), i++, null, drawable.getGL(), screenshot, TextureIO.PNG, null);
+                    dw_old = dw;
+                    fw_old = fw;
+                    Threading.invoke(true, new Runnable() {
+                        public void run() {
+                            final Dimension new_sz = new Dimension(2*dw, 2*dh);
+                            glc.setMinimumSize(new_sz);
+                            glc.setPreferredSize(new_sz);
+                            glc.setSize(new_sz);
+                            frame.pack();
+                            frame.validate();
+                        } }, glc.getTreeLock());
+                }
+            }
+            public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) { }
+        });
+        
+        Animator animator = new Animator(glc);
+        animator.setUpdateFPSFrames(60, null);
+        
+        try {
+            javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
+                public void run() {
+                    frame.pack();
+                    frame.setVisible(true);
+                }});
+        } catch( Throwable throwable ) {
+            throwable.printStackTrace();
+            Assume.assumeNoException( throwable );
+        }
+        Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glc, true));
+        Assert.assertEquals(true, AWTRobotUtil.waitForVisible(glc, true));
+        Assert.assertEquals(JAWTUtil.isOffscreenLayerSupported() && offscreenLayer,
+                            glc.isOffscreenLayerSurfaceEnabled());
+        animator.start();
+
+        while(animator.getTotalFPSFrames() < 30) {
+            Thread.sleep(60);
+        }
+        
+        animator.stop();
+        try {
+            javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
+                public void run() {
+                    frame.setVisible(false);
+                    frame.remove(glc);
+                    frame.dispose();
+                }});
+        } catch( Throwable throwable ) {
+            throwable.printStackTrace();
+            Assume.assumeNoException( throwable );
+        }        
+    }
+
+    @Test
+    public void testOnscreenWritePNGWithResize() throws InterruptedException {
+        testWritePNGWithResizeImpl(false);
+    }
+    
+    @Test
+    public void testOffscreenWritePNGWithResize() throws InterruptedException {
+        testWritePNGWithResizeImpl(true);
+    }
+    
+    public static void main(String args[]) {
+        org.junit.runner.JUnitCore.main(TestGLReadBufferUtilTextureIOWrite02AWT.class.getName());
+    }
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestGLReadBufferUtilTextureIOWrite02NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestGLReadBufferUtilTextureIOWrite02NEWT.java
index 6bb7f3b..d1ffa84 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestGLReadBufferUtilTextureIOWrite02NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestGLReadBufferUtilTextureIOWrite02NEWT.java
@@ -28,20 +28,20 @@
  
 package com.jogamp.opengl.test.junit.jogl.util.texture;
 
-import java.io.File;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-
 import com.jogamp.newt.opengl.GLWindow;
 
 import javax.media.opengl.GLAutoDrawable;
 import javax.media.opengl.GLCapabilities;
 import javax.media.opengl.GLEventListener;
 import javax.media.opengl.GLProfile;
+
+import com.jogamp.opengl.util.Animator;
 import com.jogamp.opengl.util.GLReadBufferUtil;
+import com.jogamp.opengl.util.texture.TextureIO;
 
 import com.jogamp.opengl.test.junit.util.UITestCase;
 import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
+import com.jogamp.opengl.test.junit.jogl.offscreen.WindowUtilNEWT;
 
 import org.junit.Assert;
 import org.junit.BeforeClass;
@@ -58,86 +58,75 @@ public class TestGLReadBufferUtilTextureIOWrite02NEWT extends UITestCase {
         Assert.assertNotNull(glp);
         caps = new GLCapabilities(glp);
         Assert.assertNotNull(caps);
-        width  = 256;
-        height = 256;
+        caps.setAlphaBits(1); // req. alpha channel
+        width  = 64;
+        height = 64;
     }
 
-    protected void snapshot(GLAutoDrawable drawable, GLReadBufferUtil screenshot, String filename) {
-        if(screenshot.readPixels(drawable.getGL(), drawable, false)) {
-            screenshot.write(new File(filename));
-        }                
-    }
-    
-    @Test
-    public void testWriteTGAWithResize() throws InterruptedException {
+    private void testWritePNGWithResizeImpl(boolean offscreen) throws InterruptedException {
         final GLReadBufferUtil screenshot = new GLReadBufferUtil(true, false);
-        GLWindow glWindow = GLWindow.create(caps);
+        final GLCapabilities caps2 = offscreen ? WindowUtilNEWT.fixCaps(caps, false, true, false) : caps;
+        final GLWindow glWindow = GLWindow.create(caps2);
         Assert.assertNotNull(glWindow);
         glWindow.setTitle("Shared Gears NEWT Test");
         glWindow.setSize(width, height);
         glWindow.addGLEventListener(new GearsES2(1));
         glWindow.addGLEventListener(new GLEventListener() {
-            int i=0;
-            public void init(GLAutoDrawable drawable) {}
-            public void dispose(GLAutoDrawable drawable) {}
+            int i=0, dw_old=0, c=0;
+            public void init(GLAutoDrawable drawable) {
+                System.err.println("XXX: init");
+            }
+            public void dispose(GLAutoDrawable drawable) {
+                System.err.println("XXX: dispose");
+            }
             public void display(GLAutoDrawable drawable) {
-                StringWriter filename = new StringWriter();
-                {
-                    PrintWriter pw = new PrintWriter(filename);
-                    pw.printf("%s-rgba-%s-%03dx%03d-n%03d.tga", 
-                            getSimpleTestName("."), drawable.getGLProfile().getName(), 
-                            drawable.getWidth(), drawable.getHeight(), i++);
+                final int dw = drawable.getWidth();
+                final int dh = drawable.getHeight();
+                final boolean sz_changed = dw_old != dw && dw <= 512;
+                final boolean snap;
+                if(sz_changed) {
+                    c++;
+                    snap = c>1; // only snap the 3rd image ..
+                } else {
+                    snap = false;
+                }
+                
+                if(snap) {
+                    System.err.println("XXX: ["+dw_old+"], "+dw+"x"+dh+", sz_changed "+sz_changed+", snap "+snap);
+                    c=0;
+                    snapshot(getSimpleTestName("."), i++, null, drawable.getGL(), screenshot, TextureIO.PNG, null);
+                    dw_old = dw;
+                    new Thread() { 
+                        @Override
+                        public void run() {
+                            glWindow.setSize(2*dw, 2*dh);                            
+                        } }.start();
                 }
-                if(screenshot.readPixels(drawable.getGL(), drawable, false)) {
-                    screenshot.write(new File(filename.toString()));
-                }                
             }
-            public void reshape(GLAutoDrawable drawable, int x, int y,
-                    int width, int height) { }
+            public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) { }
         });
+        Animator animator = new Animator(glWindow);
+        animator.setUpdateFPSFrames(60, null);
+        
         glWindow.setVisible(true);
-        Thread.sleep(60);
-        glWindow.setSize(300, 300);
-        Thread.sleep(60);
-        glWindow.setSize(400, 400);
-        Thread.sleep(60);
-        glWindow.destroy();
+        animator.start();
+        
+        while(animator.getTotalFPSFrames() < 50) {
+            Thread.sleep(60);
+        }
+        
+        animator.stop();
+        glWindow.destroy();        
+    }
+    
+    @Test
+    public void testOnscreenWritePNGWithResize() throws InterruptedException {
+        testWritePNGWithResizeImpl(false);
     }
 
     @Test
-    public void testWritePNGWithResize() throws InterruptedException {
-        final GLReadBufferUtil screenshot = new GLReadBufferUtil(true, false);
-        GLWindow glWindow = GLWindow.create(caps);
-        Assert.assertNotNull(glWindow);
-        glWindow.setTitle("Shared Gears NEWT Test");
-        glWindow.setSize(width, height);
-        glWindow.addGLEventListener(new GearsES2(1));
-        glWindow.addGLEventListener(new GLEventListener() {
-            int i=0;
-            public void init(GLAutoDrawable drawable) {}
-            public void dispose(GLAutoDrawable drawable) {}
-            public void display(GLAutoDrawable drawable) {
-                StringWriter filename = new StringWriter();
-                {
-                    PrintWriter pw = new PrintWriter(filename);
-                    pw.printf("%s-rgba-%s-%03dx%03d-n%03d.png", 
-                            getSimpleTestName("."), drawable.getGLProfile().getName(), 
-                            drawable.getWidth(), drawable.getHeight(), i++);
-                }
-                if(screenshot.readPixels(drawable.getGL(), drawable, false)) {
-                    screenshot.write(new File(filename.toString()));
-                }                
-            }
-            public void reshape(GLAutoDrawable drawable, int x, int y,
-                    int width, int height) { }
-        });
-        glWindow.setVisible(true);
-        Thread.sleep(60);
-        glWindow.setSize(300, 300);
-        Thread.sleep(60);
-        glWindow.setSize(400, 400);
-        Thread.sleep(60);
-        glWindow.destroy();
+    public void testOffscreenWritePNGWithResize() throws InterruptedException {
+        testWritePNGWithResizeImpl(true);
     }
 
     public static void main(String args[]) {
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestPNGTextureFromFileAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestPNGTextureFromFileAWT.java
index 0687326..0d4f2b0 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestPNGTextureFromFileAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestPNGTextureFromFileAWT.java
@@ -52,7 +52,6 @@ import com.jogamp.opengl.util.GLReadBufferUtil;
 import java.awt.Dimension;
 import java.awt.Frame;
 
-import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.URLConnection;
@@ -96,16 +95,10 @@ public class TestPNGTextureFromFileAWT extends UITestCase {
         testTextureStream = null;
     }
 
-    protected void snapshot(GLAutoDrawable drawable, String filename) {
-        GLReadBufferUtil screenshot = new GLReadBufferUtil(false, false);
-        if(screenshot.readPixels(drawable.getGL(), drawable, false)) {
-            screenshot.write(new File(filename));
-        }                
-    }
-    
     public void testImpl(boolean useFFP, final InputStream istream, final boolean useAWTIIOP) 
             throws InterruptedException, IOException 
     {
+        final GLReadBufferUtil screenshot = new GLReadBufferUtil(true, false);
         GLProfile glp;
         if(useFFP && GLProfile.isAvailable(GLProfile.GL2GL3)) {
             glp = GLProfile.getGL2GL3();
@@ -137,7 +130,7 @@ public class TestPNGTextureFromFileAWT extends UITestCase {
         // the bug submitter was doing it
         final GLEventListener gle = useFFP ? new TextureDraw01GL2Listener( texData ) : new TextureDraw01ES2Listener( texData ) ;
         glc.addGLEventListener(gle);
-        glc.addGLEventListener(new GLEventListener() {
+        glc.addGLEventListener(new GLEventListener() {            
             boolean shot = false;
             
             @Override public void init(GLAutoDrawable drawable) {}
@@ -147,7 +140,7 @@ public class TestPNGTextureFromFileAWT extends UITestCase {
                 // 1 snapshot
                 if(null!=((TextureDraw01Accessor)gle).getTexture() && !shot) {
                     shot = true;
-                    snapshot(drawable, getSimpleTestName(".")+".png");                            
+                    snapshot(getSimpleTestName("."), 0, null, drawable.getGL(), screenshot, TextureIO.PNG, null);
                 }
             }
 
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestPNGTextureFromFileNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestPNGTextureFromFileNEWT.java
index d973dea..b4faafb 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestPNGTextureFromFileNEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/TestPNGTextureFromFileNEWT.java
@@ -48,7 +48,6 @@ import com.jogamp.opengl.util.texture.TextureIO;
 import com.jogamp.opengl.util.Animator;
 import com.jogamp.opengl.util.GLReadBufferUtil;
 
-import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.URLConnection;
@@ -80,14 +79,8 @@ public class TestPNGTextureFromFileNEWT extends UITestCase {
         testTextureStream = null;
     }
 
-    protected void snapshot(GLAutoDrawable drawable, String filename) {
-        GLReadBufferUtil screenshot = new GLReadBufferUtil(false, false);
-        if(screenshot.readPixels(drawable.getGL(), drawable, false)) {
-            screenshot.write(new File(filename));
-        }                
-    }
-    
     public void testImpl(boolean useFFP, final InputStream istream) throws InterruptedException, IOException {
+        final GLReadBufferUtil screenshot = new GLReadBufferUtil(true, false);
         GLProfile glp;
         if(useFFP && GLProfile.isAvailable(GLProfile.GL2GL3)) {
             glp = GLProfile.getGL2GL3();
@@ -119,7 +112,7 @@ public class TestPNGTextureFromFileNEWT extends UITestCase {
                 // 1 snapshot
                 if(null!=((TextureDraw01Accessor)gle).getTexture() && !shot) {
                     shot = true;
-                    snapshot(drawable, getSimpleTestName(".")+".png");                            
+                    snapshot(getSimpleTestName("."), 0, null, drawable.getGL(), screenshot, TextureIO.PNG, null);
                 }
             }
             
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01aSWT.java b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01aSWT.java
new file mode 100644
index 0000000..11aef7c
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01aSWT.java
@@ -0,0 +1,210 @@
+/**
+ * Copyright 2012 JogAmp Community. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ * 
+ *    1. Redistributions of source code must retain the above copyright notice, this list of
+ *       conditions and the following disclaimer.
+ * 
+ *    2. Redistributions in binary form must reproduce the above copyright notice, this list
+ *       of conditions and the following disclaimer in the documentation and/or other materials
+ *       provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * 
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of JogAmp Community.
+ */
+ 
+package com.jogamp.opengl.test.junit.newt.parenting;
+
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+
+import javax.media.opengl.GLCapabilities;
+import javax.media.opengl.GLEventListener;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Assume;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.jogamp.nativewindow.swt.SWTAccessor;
+import com.jogamp.newt.Window;
+import com.jogamp.newt.opengl.GLWindow;
+import com.jogamp.newt.swt.NewtCanvasSWT;
+import com.jogamp.opengl.test.junit.jogl.demos.es2.RedSquareES2;
+import com.jogamp.opengl.test.junit.util.MiscUtils;
+import com.jogamp.opengl.test.junit.util.UITestCase;
+
+/**
+ * Simple visibility test ..
+ */
+public class TestParenting01aSWT extends UITestCase {
+    static int width, height;
+    static long durationPerTest = 800;
+    static GLCapabilities glCaps;
+
+    Display display = null;
+    Shell shell = null;
+    Composite composite1 = null;
+    
+    @BeforeClass
+    public static void initClass() {
+        width  = 640;
+        height = 480;
+        glCaps = new GLCapabilities(null);
+    }
+
+    @Before
+    public void init() {
+        SWTAccessor.invoke(true, new Runnable() {
+            public void run() {        
+                display = new Display();
+                Assert.assertNotNull( display );
+                shell = new Shell( display );
+                Assert.assertNotNull( shell );
+                shell.setLayout( new FillLayout() );
+                composite1 = new Composite( shell, SWT.NONE );
+                composite1.setLayout( new FillLayout() );
+                Assert.assertNotNull( composite1 );
+            }});
+    }
+    
+    @After
+    public void release() {
+        Assert.assertNotNull( display );
+        Assert.assertNotNull( shell );
+        Assert.assertNotNull( composite1 );
+        try {
+            SWTAccessor.invoke(true, new Runnable() {
+               public void run() {
+                composite1.dispose();
+                shell.dispose();
+                display.dispose();
+               }});
+        }
+        catch( Throwable throwable ) {
+            throwable.printStackTrace();
+            Assume.assumeNoException( throwable );
+        }
+        display = null;
+        shell = null;
+        composite1 = null;
+    }
+    
+    @Test
+    public void testWindowParenting01CreateVisibleDestroy1() throws InterruptedException, InvocationTargetException {
+
+        GLWindow glWindow1 = GLWindow.create(glCaps);
+        Assert.assertNotNull(glWindow1);
+        Assert.assertEquals(false, glWindow1.isVisible());
+        Assert.assertEquals(false, glWindow1.isNativeValid());
+        Assert.assertNull(glWindow1.getParent());
+        glWindow1.setTitle("testWindowParenting01CreateVisibleDestroy");
+        GLEventListener demo1 = new RedSquareES2();
+        setDemoFields(demo1, glWindow1, false);
+        glWindow1.addGLEventListener(demo1);
+
+        final NewtCanvasSWT canvas1 = NewtCanvasSWT.create( composite1, 0, glWindow1 );
+        Assert.assertNotNull(canvas1);
+        Assert.assertEquals(false, glWindow1.isVisible());
+        Assert.assertEquals(false, glWindow1.isNativeValid());
+        Assert.assertNull(glWindow1.getParent());
+
+        SWTAccessor.invoke(true, new Runnable() {
+           public void run() {
+              shell.setText( getSimpleTestName(".") );
+              shell.setSize( 640, 480 );
+              shell.open();
+           }
+        });
+        
+        // visible test
+        Assert.assertEquals(canvas1.getNativeWindow(),glWindow1.getParent());
+
+        for(int i=0; i*10<durationPerTest; i++) {
+            if( !display.readAndDispatch() ) {
+                // blocks on linux .. display.sleep();
+                Thread.sleep(10);
+            }
+        }
+
+        SWTAccessor.invoke(true, new Runnable() {
+           public void run() {
+               canvas1.setVisible(false);
+           }
+        });
+        Assert.assertEquals(true, glWindow1.isNativeValid());
+
+        SWTAccessor.invoke(true, new Runnable() {
+           public void run() {
+               canvas1.setVisible(true);
+           }
+        });
+        Assert.assertEquals(true, glWindow1.isNativeValid());
+
+        canvas1.dispose();
+
+        Assert.assertEquals(false, glWindow1.isNativeValid());
+    }
+
+    public static void setDemoFields(GLEventListener demo, GLWindow glWindow, boolean debug) {
+        Assert.assertNotNull(demo);
+        Assert.assertNotNull(glWindow);
+        Window window = glWindow.getDelegatedWindow();
+        if(debug) {
+            MiscUtils.setFieldIfExists(demo, "glDebug", true);
+            MiscUtils.setFieldIfExists(demo, "glTrace", true);
+        }
+        if(!MiscUtils.setFieldIfExists(demo, "window", window)) {
+            MiscUtils.setFieldIfExists(demo, "glWindow", glWindow);
+        }
+    }
+
+    static int atoi(String a) {
+        int i=0;
+        try {
+            i = Integer.parseInt(a);
+        } catch (Exception ex) { ex.printStackTrace(); }
+        return i;
+    }
+
+    public static void main(String args[]) throws IOException {
+        for(int i=0; i<args.length; i++) {
+            if(args[i].equals("-time")) {
+                durationPerTest = atoi(args[++i]);
+            }
+        }
+        String tstname = TestParenting01aSWT.class.getName();
+        org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(new String[] {
+            tstname,
+            "filtertrace=true",
+            "haltOnError=false",
+            "haltOnFailure=false",
+            "showoutput=true",
+            "outputtoformatters=true",
+            "logfailedtests=true",
+            "logtestlistenerevents=true",
+            "formatter=org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResultFormatter",
+            "formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,TEST-"+tstname+".xml" } );
+    }
+
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01cSwingAWT.java b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01cSwingAWT.java
index 22ed7c6..4b02be8 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01cSwingAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01cSwingAWT.java
@@ -66,6 +66,57 @@ public class TestParenting01cSwingAWT extends UITestCase {
         glCaps = new GLCapabilities(null);
     }
 
+    static class GLDisturbanceAction implements Runnable {        
+        public boolean isRunning = false;
+        private volatile boolean shallStop = false;
+        private final GLAutoDrawable glad;
+        private final GLRunnable glRunnable;
+        
+        public GLDisturbanceAction(GLAutoDrawable glad) {
+            this.glad = glad;
+            this.glRunnable = new GLRunnableDummy();
+        }
+        
+        public void waitUntilRunning() {
+            synchronized(this) {
+                while(!isRunning) {
+                    try {
+                        this.wait();
+                    } catch (InterruptedException e) { e.printStackTrace(); }
+                }                
+            }
+        }
+        
+        public void stopAndWaitUntilDone() {
+            shallStop = true;
+            synchronized(this) {
+                while(isRunning) {
+                    try {
+                        this.wait();
+                    } catch (InterruptedException e) { e.printStackTrace(); }
+                }                
+            }
+        }
+        
+        public void run() {
+            synchronized(this) {
+                isRunning = true;
+                this.notifyAll();
+                System.err.println("$");
+            }
+            while(!shallStop) {
+               try {
+                   glad.invoke(true, glRunnable);
+                   Thread.sleep(100);
+               } catch (Throwable t) {}
+            }
+            synchronized(this) {
+                isRunning = false;
+                this.notifyAll();
+            }
+        }
+    }
+    
     @Test
     public void testWindowParenting01CreateVisibleDestroy1() throws InterruptedException, InvocationTargetException {
         /**
@@ -84,22 +135,9 @@ public class TestParenting01cSwingAWT extends UITestCase {
         animator1.setUpdateFPSFrames(1, null);
         animator1.start();
         
-        final GLWindow _glWindow1 = glWindow1;
-        final GLRunnable _glRunnable = new GLRunnableDummy();
-        Thread disturbanceThread = new Thread(new Runnable() {
-            public void run() {
-                System.out.println("$");
-                while(true) 
-                {
-                   try {
-                       _glWindow1.invoke(true, _glRunnable);
-                       Thread.sleep(100);
-                   } catch (Throwable t) {}
-               }
-            }
-        });
-        disturbanceThread.start();
-
+        final GLDisturbanceAction disturbanceAction = new GLDisturbanceAction(glWindow1);
+        new Thread(disturbanceAction).start();
+        disturbanceAction.waitUntilRunning();
 
         final NewtCanvasAWT newtCanvasAWT = new NewtCanvasAWT(glWindow1);
         Assert.assertNotNull(newtCanvasAWT);
@@ -128,7 +166,7 @@ public class TestParenting01cSwingAWT extends UITestCase {
         jFrame1.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); // equivalent to Frame, use windowClosing event!
         jFrame1.setContentPane(jPanel1);
         jFrame1.setSize(width, height);
-        System.out.println("Demos: 1 - Visible");
+        System.err.println("Demos: 1 - Visible");
         SwingUtilities.invokeAndWait(new Runnable() {
            public void run() {
                jFrame1.setVisible(true);
@@ -143,27 +181,30 @@ public class TestParenting01cSwingAWT extends UITestCase {
         while(animator1.isAnimating() && animator1.getTotalFPSDuration()<durationPerTest) {
             Thread.sleep(100);
         }
-        System.out.println("Demos: 2 - StopAnimator");
+        System.err.println("Demos: 2 - StopAnimator");
         animator1.stop();
         Assert.assertEquals(false, animator1.isAnimating());
 
         SwingUtilities.invokeAndWait(new Runnable() {
                 public void run() {
-                    System.out.println("Demos: 3 - !Visible");
+                    System.err.println("Demos: 3 - !Visible");
                     jFrame1.setVisible(false);
                 } });
         Assert.assertEquals(true, AWTRobotUtil.waitForVisible(glWindow1, false));
 
         SwingUtilities.invokeAndWait(new Runnable() {
                 public void run() {
-                    System.out.println("Demos: 4 - Visible");
+                    System.err.println("Demos: 4 - Visible");
                     jFrame1.setVisible(true);
                 } });
         Assert.assertEquals(true, AWTRobotUtil.waitForVisible(glWindow1, true));
 
+        // Always recommended to remove our native parented Window
+        // from the AWT resources before destruction, since it could lead
+        // to a BadMatch X11 error w/o.
         SwingUtilities.invokeAndWait(new Runnable() {
                 public void run() {
-                    System.out.println("Demos: 5 - X Container");
+                    System.err.println("Demos: 5 - X Container");
                     jPanel1.remove(container1);
                     jFrame1.validate();
                 } });
@@ -171,12 +212,17 @@ public class TestParenting01cSwingAWT extends UITestCase {
 
         SwingUtilities.invokeAndWait(new Runnable() {
                 public void run() {
+                    System.err.println("Demos: 6 - X Frame");
                     jFrame1.dispose();
                 } });
         Assert.assertEquals(true, glWindow1.isNativeValid());
 
+        System.err.println("Demos: 7 - X GLWindow");        
         glWindow1.destroy();
         Assert.assertEquals(false, glWindow1.isNativeValid());
+        
+        System.err.println("Demos: 8 - X DisturbanceThread");        
+        disturbanceAction.stopAndWaitUntilDone();
     }
 
     @Test
@@ -192,26 +238,33 @@ public class TestParenting01cSwingAWT extends UITestCase {
         glWindow1.setTitle("testWindowParenting01CreateVisibleDestroy");
         GLEventListener demo1 = new RedSquareES2();
         setDemoFields(demo1, glWindow1, false);
+        /*
+        glWindow1.addGLEventListener(new GLEventListener() {
+            @Override
+            public void init(GLAutoDrawable drawable) {
+                System.err.println("XXX init");                
+            }
+            @Override
+            public void dispose(GLAutoDrawable drawable) {
+                System.err.println("XXX dispose");                
+                // Thread.dumpStack();
+            }
+            @Override
+            public void display(GLAutoDrawable drawable) {}
+            @Override
+            public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
+                System.err.println("XXX reshape");
+                // Thread.dumpStack();
+            }            
+        }); */
         glWindow1.addGLEventListener(demo1);
         Animator animator1 = new Animator(glWindow1);
         animator1.setUpdateFPSFrames(1, null);
         animator1.start();
-        
-        final GLWindow _glWindow1 = glWindow1;
-        final GLRunnable _glRunnable = new GLRunnableDummy();
-        Thread disturbanceThread = new Thread(new Runnable() {
-            public void run() {
-                System.out.println("$");
-                while(true) 
-                {
-                   try {
-                       _glWindow1.invoke(true, _glRunnable);
-                       Thread.sleep(100);
-                   } catch (Throwable t) {}
-               }
-            }
-        });
-        disturbanceThread.start();
+
+        final GLDisturbanceAction disturbanceAction = new GLDisturbanceAction(glWindow1);
+        new Thread(disturbanceAction).start();
+        disturbanceAction.waitUntilRunning();
 
         final NewtCanvasAWT newtCanvasAWT = new NewtCanvasAWT(glWindow1);
         Assert.assertNotNull(newtCanvasAWT);
@@ -298,22 +351,48 @@ public class TestParenting01cSwingAWT extends UITestCase {
         animator1.stop();
         Assert.assertEquals(false, animator1.isAnimating());
 
+        /*
+         * Always recommended to remove our native parented Window
+         * from the AWT resources before destruction, since it could lead
+         * to a BadMatch X11 error w/o (-> XAWT related).
+         * Or ensure old/new parent is visible, see below.
+         *
         SwingUtilities.invokeAndWait(new Runnable() {
                 public void run() {
+                    System.err.println("Demos: 1 - X Container 1");
+                    container1.remove(newtCanvasAWT);
+                    jFrame1.validate();
+                    System.err.println("Demos: 1 - X Container 2");
+                    jPanel2.remove(newtCanvasAWT);
+                    jFrame2.validate();                                
+                } }); */
+        /*
+         * Invisible X11 windows may also case BadMatch (-> XAWT related)
+         */ 
+        SwingUtilities.invokeAndWait(new Runnable() {
+                public void run() {
+                    System.err.println("Demos: 2 - !visible");
                     jFrame1.setVisible(false);
+                    System.err.println("Demos: 3 - !visible");
                     jFrame2.setVisible(false);
                 } });
         Assert.assertEquals(true, glWindow1.isNativeValid());
 
         SwingUtilities.invokeAndWait(new Runnable() {
                 public void run() {
+                    System.err.println("Demos: 4 - X frame");
                     jFrame1.dispose();
+                    System.err.println("Demos: 5 - X frame");
                     jFrame2.dispose();
                 } });
         Assert.assertEquals(true, glWindow1.isNativeValid());
 
+        System.err.println("Demos: 6 - X GLWindow");        
         glWindow1.destroy();
         Assert.assertEquals(false, glWindow1.isNativeValid());
+        
+        System.err.println("Demos: 7 - X DisturbanceThread");        
+        disturbanceAction.stopAndWaitUntilDone();        
     }
 
     public static void setDemoFields(GLEventListener demo, GLWindow glWindow, boolean debug) {
@@ -345,8 +424,10 @@ public class TestParenting01cSwingAWT extends UITestCase {
                 waitReparent = atoi(args[++i]);
             }
         }
-        System.out.println("durationPerTest "+durationPerTest);
-        System.out.println("waitReparent "+waitReparent);
+        System.err.println("durationPerTest "+durationPerTest);
+        System.err.println("waitReparent "+waitReparent);
+        org.junit.runner.JUnitCore.main(TestParenting01cSwingAWT.class.getName());
+        /**
         String tstname = TestParenting01cSwingAWT.class.getName();
         org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(new String[] {
             tstname,
@@ -358,7 +439,7 @@ public class TestParenting01cSwingAWT extends UITestCase {
             "logfailedtests=true",
             "logtestlistenerevents=true",
             "formatter=org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResultFormatter",
-            "formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,TEST-"+tstname+".xml" } );
+            "formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,TEST-"+tstname+".xml" } ); */
     }
 
 }
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting02NEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting02NEWT.java
index bc39883..8e2c73e 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting02NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting02NEWT.java
@@ -111,8 +111,8 @@ public class TestParenting02NEWT extends UITestCase {
         Assert.assertEquals(height,glWindow1.getHeight());
         glWindow1.setTitle("testWindowParenting01NewtOnNewtParentChildDraw - PARENT");
         glWindow1.setPosition(x,y);
-        glWindow1.addKeyListener(new TraceKeyAdapter(new KeyAction(eventFifo)));
-        glWindow1.addWindowListener(new TraceWindowAdapter());
+        //glWindow1.addKeyListener(new TraceKeyAdapter(new KeyAction(eventFifo)));
+        //glWindow1.addWindowListener(new TraceWindowAdapter());
 
         GLEventListener demo1 = new RedSquareES2();
         setDemoFields(demo1, window1, glWindow1, false);
@@ -132,8 +132,8 @@ public class TestParenting02NEWT extends UITestCase {
         //Assert.assertEquals(height/2,glWindow2.getHeight());
         glWindow2.setTitle("testWindowParenting01NewtOnNewtParentChildDraw - CHILD");
         glWindow2.setPosition(glWindow1.getWidth()/2, glWindow1.getHeight()/2);
-        glWindow2.addKeyListener(new TraceKeyAdapter(new KeyAction(eventFifo)));
-        glWindow2.addWindowListener(new TraceWindowAdapter(new WindowAction(eventFifo)));
+        //glWindow2.addKeyListener(new TraceKeyAdapter(new KeyAction(eventFifo)));
+        //glWindow2.addWindowListener(new TraceWindowAdapter(new WindowAction(eventFifo)));
         // glWindow2.addMouseListener(new TraceMouseAdapter());
 
         GLEventListener demo2 = new GearsES2();
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting04AWT.java b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting04AWT.java
new file mode 100644
index 0000000..09b6d04
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting04AWT.java
@@ -0,0 +1,239 @@
+/**
+ * Copyright 2010 JogAmp Community. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ * 
+ *    1. Redistributions of source code must retain the above copyright notice, this list of
+ *       conditions and the following disclaimer.
+ * 
+ *    2. Redistributions in binary form must reproduce the above copyright notice, this list
+ *       of conditions and the following disclaimer in the documentation and/or other materials
+ *       provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * 
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of JogAmp Community.
+ */
+ 
+package com.jogamp.opengl.test.junit.newt.parenting;
+
+import java.awt.BorderLayout;
+import java.awt.Button;
+import java.awt.Frame;
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+
+import javax.media.opengl.GLCapabilities;
+import javax.media.opengl.GLEventListener;
+import javax.swing.SwingUtilities;
+
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.jogamp.newt.Window;
+import com.jogamp.newt.awt.NewtCanvasAWT;
+import com.jogamp.newt.opengl.GLWindow;
+import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
+import com.jogamp.opengl.test.junit.jogl.demos.es2.RedSquareES2;
+import com.jogamp.opengl.test.junit.util.MiscUtils;
+import com.jogamp.opengl.test.junit.util.UITestCase;
+import com.jogamp.opengl.util.Animator;
+
+/**
+ * Using {@link NewtCanvasAWT#setNEWTChild(Window)} for reparenting, i.e. NEWT/AWT hopping
+ */
+public class TestParenting04AWT extends UITestCase {
+    static int width, height;
+    static long durationPerTest = 800;
+    static GLCapabilities glCaps;
+
+    @BeforeClass
+    public static void initClass() {
+        width  = 400;
+        height = 400;
+        glCaps = new GLCapabilities(null);
+    }
+
+    @Test
+    public void winHopFrame2FrameDirectHop() throws InterruptedException, InvocationTargetException {
+        // Will produce some artifacts .. resizing etc
+        winHopFrame2Frame(false);
+    }
+    
+    @Test
+    public void winHopFrame2FrameDetachFirst() throws InterruptedException, InvocationTargetException {
+        // Note: detaching first setNEWTChild(null) is much cleaner visually 
+        winHopFrame2Frame(true);
+    }
+    
+    protected void winHopFrame2Frame(final boolean detachFirst) throws InterruptedException, InvocationTargetException {
+        final GLWindow glWindow1 = GLWindow.create(glCaps);
+        GLEventListener demo1 = new RedSquareES2();
+        setDemoFields(demo1, glWindow1, false);
+        glWindow1.addGLEventListener(demo1);
+        Animator anim1 = new Animator(glWindow1);
+
+        final GLWindow glWindow2 = GLWindow.create(glCaps);
+        GLEventListener demo2 = new GearsES2();
+        setDemoFields(demo2, glWindow2, false);
+        glWindow2.addGLEventListener(demo2);
+        Animator anim2 = new Animator(glWindow2);
+        
+        final NewtCanvasAWT canvas1 = new NewtCanvasAWT(glWindow1);
+        final NewtCanvasAWT canvas2 = new NewtCanvasAWT(glWindow2);
+
+        final Frame frame1 = new Frame("AWT Parent Frame");
+        frame1.setLayout(new BorderLayout());
+        frame1.add(new Button("North"), BorderLayout.NORTH);
+        frame1.add(new Button("South"), BorderLayout.SOUTH);
+        frame1.add(new Button("East"), BorderLayout.EAST);
+        frame1.add(new Button("West"), BorderLayout.WEST);
+        frame1.setSize(width, height);
+        frame1.setLocation(0, 0);
+        SwingUtilities.invokeAndWait(new Runnable() {
+           public void run() {
+               frame1.setVisible(true);
+               frame1.validate();
+           }
+        });
+
+        SwingUtilities.invokeAndWait(new Runnable() {
+           public void run() {
+               frame1.add(canvas1, BorderLayout.CENTER);
+               frame1.validate();
+           }
+        });
+        Assert.assertEquals(canvas1.getNativeWindow(),glWindow1.getParent());
+        
+        final Frame frame2 = new Frame("AWT Parent Frame");
+        frame2.setLayout(new BorderLayout());
+        frame2.add(new Button("North"), BorderLayout.NORTH);
+        frame2.add(new Button("South"), BorderLayout.SOUTH);
+        frame2.add(new Button("East"), BorderLayout.EAST);
+        frame2.add(new Button("West"), BorderLayout.WEST);
+        frame2.setSize(width, height);
+        frame2.setLocation(width+50, 0);
+        SwingUtilities.invokeAndWait(new Runnable() {
+           public void run() {
+               frame2.setVisible(true);
+               frame2.validate();
+           }
+        });
+
+        SwingUtilities.invokeAndWait(new Runnable() {
+           public void run() {
+               frame2.add(canvas2, BorderLayout.CENTER);
+               frame2.validate();
+           }
+        });
+        Assert.assertEquals(canvas2.getNativeWindow(),glWindow2.getParent());
+
+        anim1.start();
+        anim2.start();
+        
+        int state;
+        for(state=0; state<3; state++) {
+            Thread.sleep(durationPerTest);
+            switch(state) {
+                case 0:
+                    SwingUtilities.invokeAndWait(new Runnable() {
+                       public void run() {
+                           // 1 -> 2
+                           if(detachFirst) {
+                               canvas1.setNEWTChild(null);
+                               canvas2.setNEWTChild(null);                               
+                           } else {
+                               canvas2.setNEWTChild(null);  // free g2 of w2
+                           }
+                           canvas1.setNEWTChild(glWindow2); // put g2 -> w1. free g1 of w1
+                           canvas2.setNEWTChild(glWindow1); // put g1 -> w2
+                           frame1.validate();
+                           frame2.validate();
+                       }
+                    });
+                    break;
+                case 1:
+                    SwingUtilities.invokeAndWait(new Runnable() {
+                       public void run() {
+                           // 2 -> 1
+                           if(detachFirst) {
+                               canvas1.setNEWTChild(null);
+                               canvas2.setNEWTChild(null);                               
+                           } else {
+                               canvas2.setNEWTChild(null);
+                           }
+                           canvas1.setNEWTChild(glWindow1);
+                           canvas2.setNEWTChild(glWindow2);
+                           frame1.validate();
+                           frame2.validate();
+                       }
+                    });
+                    break;
+            }
+        }
+
+        SwingUtilities.invokeAndWait(new Runnable() {
+           public void run() {
+                frame1.dispose();
+                frame2.dispose();
+           } } );
+        glWindow1.destroy();
+        glWindow2.destroy();
+        Assert.assertEquals(false, glWindow1.isNativeValid());
+        Assert.assertEquals(false, glWindow2.isNativeValid());        
+    }
+
+    public static void setDemoFields(GLEventListener demo, GLWindow glWindow, boolean debug) {
+        Assert.assertNotNull(demo);
+        Assert.assertNotNull(glWindow);
+        Window window = glWindow.getDelegatedWindow();
+        if(debug) {
+            MiscUtils.setFieldIfExists(demo, "glDebug", true);
+            MiscUtils.setFieldIfExists(demo, "glTrace", true);
+        }
+        if(!MiscUtils.setFieldIfExists(demo, "window", window)) {
+            MiscUtils.setFieldIfExists(demo, "glWindow", glWindow);
+        }
+    }
+
+    static int atoi(String a) {
+        int i=0;
+        try {
+            i = Integer.parseInt(a);
+        } catch (Exception ex) { ex.printStackTrace(); }
+        return i;
+    }
+
+    public static void main(String args[]) throws IOException {
+        for(int i=0; i<args.length; i++) {
+            if(args[i].equals("-time")) {
+                durationPerTest = atoi(args[++i]);
+            }
+        }
+        String tstname = TestParenting04AWT.class.getName();
+        org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(new String[] {
+            tstname,
+            "filtertrace=true",
+            "haltOnError=false",
+            "haltOnFailure=false",
+            "showoutput=true",
+            "outputtoformatters=true",
+            "logfailedtests=true",
+            "logtestlistenerevents=true",
+            "formatter=org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResultFormatter",
+            "formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,TEST-"+tstname+".xml" } );
+    }
+
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting04SWT.java b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting04SWT.java
new file mode 100644
index 0000000..14a36c5
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting04SWT.java
@@ -0,0 +1,264 @@
+/**
+ * Copyright 2010 JogAmp Community. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ * 
+ *    1. Redistributions of source code must retain the above copyright notice, this list of
+ *       conditions and the following disclaimer.
+ * 
+ *    2. Redistributions in binary form must reproduce the above copyright notice, this list
+ *       of conditions and the following disclaimer in the documentation and/or other materials
+ *       provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * 
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of JogAmp Community.
+ */
+ 
+package com.jogamp.opengl.test.junit.newt.parenting;
+
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+
+import javax.media.opengl.GLCapabilities;
+import javax.media.opengl.GLEventListener;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Assume;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.jogamp.nativewindow.swt.SWTAccessor;
+import com.jogamp.newt.Window;
+import com.jogamp.newt.opengl.GLWindow;
+import com.jogamp.newt.swt.NewtCanvasSWT;
+import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
+import com.jogamp.opengl.test.junit.jogl.demos.es2.RedSquareES2;
+import com.jogamp.opengl.test.junit.util.MiscUtils;
+import com.jogamp.opengl.test.junit.util.UITestCase;
+import com.jogamp.opengl.util.Animator;
+
+/**
+ * Using {@link NewtCanvasSWT#setNEWTChild(Window)} for reparenting, i.e. NEWT/AWT hopping
+ */
+public class TestParenting04SWT extends UITestCase {
+    static int width, height;
+    static long durationPerTest = 800;
+    static GLCapabilities glCaps;
+
+    Display display = null;
+    Shell shell1 = null;
+    Shell shell2 = null;
+    Composite composite1 = null;
+    Composite composite2 = null;
+    
+    @BeforeClass
+    public static void initClass() {
+        width  = 400;
+        height = 400;
+        glCaps = new GLCapabilities(null);
+    }
+
+    @Before
+    public void init() {
+        SWTAccessor.invoke(true, new Runnable() {
+            public void run() {        
+                display = new Display();
+                Assert.assertNotNull( display );
+                
+                shell1 = new Shell( display );
+                Assert.assertNotNull( shell1 );
+                shell1.setLayout( new FillLayout() );
+                composite1 = new Composite( shell1, SWT.NONE );
+                composite1.setLayout( new FillLayout() );
+                Assert.assertNotNull( composite1 );
+                
+                shell2 = new Shell( display );
+                Assert.assertNotNull( shell2 );
+                shell2.setLayout( new FillLayout() );
+                composite2 = new Composite( shell2, SWT.NONE );
+                composite2.setLayout( new FillLayout() );
+                Assert.assertNotNull( composite2 );
+            }});
+    }
+    
+    @After
+    public void release() {
+        Assert.assertNotNull( display );
+        Assert.assertNotNull( shell1 );
+        Assert.assertNotNull( shell2 );
+        Assert.assertNotNull( composite1 );
+        Assert.assertNotNull( composite2 );
+        try {
+            SWTAccessor.invoke(true, new Runnable() {
+               public void run() {
+                composite1.dispose();
+                composite2.dispose();
+                shell1.dispose();
+                shell2.dispose();
+                display.dispose();
+               }});
+        }
+        catch( Throwable throwable ) {
+            throwable.printStackTrace();
+            Assume.assumeNoException( throwable );
+        }
+        display = null;
+        shell1 = null;
+        shell2 = null;
+        composite1 = null;
+        composite2 = null;
+    }
+    
+    @Test
+    public void winHopFrame2FrameDirectHop() throws InterruptedException, InvocationTargetException {
+        // Will produce some artifacts .. resizing etc
+        winHopFrame2Frame(false);
+    }
+    
+    @Test
+    public void winHopFrame2FrameDetachFirst() throws InterruptedException, InvocationTargetException {
+        // Note: detaching first setNEWTChild(null) is much cleaner visually 
+        winHopFrame2Frame(true);
+    }
+    
+    protected void winHopFrame2Frame(final boolean detachFirst) throws InterruptedException, InvocationTargetException {
+        final GLWindow glWindow1 = GLWindow.create(glCaps);
+        GLEventListener demo1 = new RedSquareES2();
+        setDemoFields(demo1, glWindow1, false);
+        glWindow1.addGLEventListener(demo1);
+        Animator anim1 = new Animator(glWindow1);
+        
+        final GLWindow glWindow2 = GLWindow.create(glCaps);
+        GLEventListener demo2 = new GearsES2();
+        setDemoFields(demo2, glWindow2, false);
+        glWindow2.addGLEventListener(demo2);
+        Animator anim2 = new Animator(glWindow2);
+
+        final NewtCanvasSWT canvas1 = NewtCanvasSWT.create( composite1, 0, glWindow1 );
+        final NewtCanvasSWT canvas2 = NewtCanvasSWT.create( composite2, 0, glWindow2 );
+    
+        SWTAccessor.invoke(true, new Runnable() {
+           public void run() {
+              shell1.setText( getSimpleTestName(".")+"-Win1" );
+              shell1.setSize( width, height);
+              shell1.setLocation(0, 0);
+              shell1.open();
+              shell2.setText( getSimpleTestName(".")+"-Win2" );
+              shell2.setSize( width, height);
+              shell2.setLocation(width + 50, 0);
+              shell2.open();
+           }
+        });        
+        Assert.assertEquals(canvas1.getNativeWindow(),glWindow1.getParent());
+        Assert.assertEquals(canvas2.getNativeWindow(),glWindow2.getParent());
+
+        anim1.start();
+        anim2.start();
+        
+        int state;
+        for(state=0; state<3; state++) {
+            for(int i=0; i*10<durationPerTest; i++) {
+                if( !display.readAndDispatch() ) {
+                    // blocks on linux .. display.sleep();
+                    Thread.sleep(10);
+                }
+            }
+            switch(state) {
+                case 0:
+                    SWTAccessor.invoke(true, new Runnable() {
+                       public void run() {
+                           // 1 -> 2
+                           if(detachFirst) {
+                               canvas1.setNEWTChild(null);
+                               canvas2.setNEWTChild(null);                               
+                           } else {
+                               canvas2.setNEWTChild(null);  // free g2 of w2
+                           }
+                           canvas1.setNEWTChild(glWindow2); // put g2 -> w1. free g1 of w1
+                           canvas2.setNEWTChild(glWindow1); // put g1 -> w2
+                       } } );
+                    break;
+                case 1:
+                    SWTAccessor.invoke(true, new Runnable() {
+                       public void run() {
+                           // 2 -> 1
+                           if(detachFirst) {
+                               canvas1.setNEWTChild(null);
+                               canvas2.setNEWTChild(null);                               
+                           } else {
+                               canvas2.setNEWTChild(null);
+                           }
+                           canvas1.setNEWTChild(glWindow1);
+                           canvas2.setNEWTChild(glWindow2);
+                       } } );
+                    break;
+            }
+        }
+
+        canvas1.dispose();
+        canvas2.dispose();
+        Assert.assertEquals(false, glWindow1.isNativeValid());
+        Assert.assertEquals(false, glWindow2.isNativeValid());        
+    }
+
+    public static void setDemoFields(GLEventListener demo, GLWindow glWindow, boolean debug) {
+        Assert.assertNotNull(demo);
+        Assert.assertNotNull(glWindow);
+        Window window = glWindow.getDelegatedWindow();
+        if(debug) {
+            MiscUtils.setFieldIfExists(demo, "glDebug", true);
+            MiscUtils.setFieldIfExists(demo, "glTrace", true);
+        }
+        if(!MiscUtils.setFieldIfExists(demo, "window", window)) {
+            MiscUtils.setFieldIfExists(demo, "glWindow", glWindow);
+        }
+    }
+
+    static int atoi(String a) {
+        int i=0;
+        try {
+            i = Integer.parseInt(a);
+        } catch (Exception ex) { ex.printStackTrace(); }
+        return i;
+    }
+
+    public static void main(String args[]) throws IOException {
+        for(int i=0; i<args.length; i++) {
+            if(args[i].equals("-time")) {
+                durationPerTest = atoi(args[++i]);
+            }
+        }
+        String tstname = TestParenting04SWT.class.getName();
+        org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(new String[] {
+            tstname,
+            "filtertrace=true",
+            "haltOnError=false",
+            "haltOnFailure=false",
+            "showoutput=true",
+            "outputtoformatters=true",
+            "logfailedtests=true",
+            "logtestlistenerevents=true",
+            "formatter=org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResultFormatter",
+            "formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,TEST-"+tstname+".xml" } );
+    }
+
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParentingOffscreenLayer01GLCanvasAWT.java b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParentingOffscreenLayer01GLCanvasAWT.java
index 8ec65bf..4542fa4 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParentingOffscreenLayer01GLCanvasAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParentingOffscreenLayer01GLCanvasAWT.java
@@ -115,37 +115,26 @@ public class TestParentingOffscreenLayer01GLCanvasAWT extends UITestCase {
     
     @Test
     public void testOnscreenLayerGLCanvas_Onscreen() throws InterruptedException, InvocationTargetException {
-        if(!JAWTUtil.isOffscreenLayerRequired()) {
-            testOffscreenLayerGLCanvas_Impl(false, false);
-        } else {
-            System.err.println("onscreen layer n/a");
-        }
+        testOffscreenLayerGLCanvas_Impl(false);
     }
     
-    /** We have no GLCanvas OffscreenWindow as we have for NEWT .. test disabled.
-    @Test
-    public void testOffscreenLayerGLCanvas_OffscreenLayerWithOffscreenClass() throws InterruptedException, InvocationTargetException {
-        testOffscreenLayerGLCanvas_Impl(true, true);
-    } */
-    
     @Test
     public void testOffscreenLayerGLCanvas_OffscreenLayerWithOnscreenClass() throws InterruptedException, InvocationTargetException {        
-        if(JAWTUtil.isOffscreenLayerSupported()) {
-            testOffscreenLayerGLCanvas_Impl(true, false);
-        } else {
-            System.err.println("offscreen layer n/a");
-        }
+        testOffscreenLayerGLCanvas_Impl(true);
     }
     
-    private void testOffscreenLayerGLCanvas_Impl(boolean offscreenLayer, boolean offscreenClass) throws InterruptedException, InvocationTargetException {
+    private void testOffscreenLayerGLCanvas_Impl(boolean offscreenLayer) throws InterruptedException, InvocationTargetException {
+        if(!offscreenLayer && JAWTUtil.isOffscreenLayerRequired()) {
+            System.err.println("onscreen layer n/a");
+            return;
+        }
+        if(offscreenLayer && !JAWTUtil.isOffscreenLayerSupported()) {
+            System.err.println("offscreen layer n/a");
+            return;
+        }        
         final Frame frame1 = new Frame("AWT Parent Frame");
         
         GLCapabilities glCaps = new GLCapabilities(null);
-        if(offscreenClass) {
-            glCaps.setOnscreen(false);
-            glCaps.setPBuffer(true);
-        }
-
         final GLCanvas glc = new GLCanvas(glCaps);
         glc.setShallUseOffscreenLayer(offscreenLayer); // trigger offscreen layer - if supported
         glc.setPreferredSize(preferredGLSize);
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestTranslucentParentingAWT.java b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestTranslucentParentingAWT.java
index 57b8517..373c83f 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestTranslucentParentingAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestTranslucentParentingAWT.java
@@ -69,7 +69,6 @@ public class TestTranslucentParentingAWT extends UITestCase {
     public static void initClass() {
         size = new Dimension(400,200);
         glCaps = new GLCapabilities(null);
-        glCaps.setAlphaBits(8);
         glCaps.setBackgroundOpaque(false);
     }
 
diff --git a/src/test/com/jogamp/opengl/test/junit/util/NEWTGLContext.java b/src/test/com/jogamp/opengl/test/junit/util/NEWTGLContext.java
index 4edac15..3f989bf 100644
--- a/src/test/com/jogamp/opengl/test/junit/util/NEWTGLContext.java
+++ b/src/test/com/jogamp/opengl/test/junit/util/NEWTGLContext.java
@@ -43,10 +43,12 @@ public class NEWTGLContext {
 
     public static class WindowContext {        
         public final Window window;
+        public final GLDrawable drawable;
         public final GLContext context;
         
-        public WindowContext(Window w, GLContext c) {
+        public WindowContext(Window w, GLDrawable d, GLContext c) {
             window = w;
+            drawable = d;
             context = c;
         }
     }
@@ -86,7 +88,7 @@ public class NEWTGLContext {
         int res = context.makeCurrent();
         Assert.assertTrue(GLContext.CONTEXT_CURRENT_NEW==res || GLContext.CONTEXT_CURRENT==res);
         
-        return new WindowContext(window, context);
+        return new WindowContext(window, drawable, context);
     }
 
     public static WindowContext createOnscreenWindow(GLCapabilities caps, int width, int height, boolean debugGL) throws InterruptedException {        
@@ -121,7 +123,7 @@ public class NEWTGLContext {
         int res = context.makeCurrent();
         Assert.assertTrue(GLContext.CONTEXT_CURRENT_NEW==res || GLContext.CONTEXT_CURRENT==res);
         
-        return new WindowContext(window, context);
+        return new WindowContext(window, drawable, context);
     }
 
     public static void destroyWindow(WindowContext winctx) {
diff --git a/src/test/com/jogamp/opengl/test/junit/util/UITestCase.java b/src/test/com/jogamp/opengl/test/junit/util/UITestCase.java
index 672675f..c07d5b7 100644
--- a/src/test/com/jogamp/opengl/test/junit/util/UITestCase.java
+++ b/src/test/com/jogamp/opengl/test/junit/util/UITestCase.java
@@ -28,7 +28,17 @@
  
 package com.jogamp.opengl.test.junit.util;
 
+import java.io.File;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+
+import javax.media.opengl.GL;
+import javax.media.opengl.GLCapabilitiesImmutable;
+import javax.media.opengl.GLDrawable;
+
 import com.jogamp.common.util.locks.SingletonInstance;
+import com.jogamp.opengl.util.GLReadBufferUtil;
+import com.jogamp.opengl.util.texture.TextureIO;
 
 import org.junit.Assume;
 import org.junit.Before;
@@ -108,6 +118,49 @@ public abstract class UITestCase {
     }
     
     static final String unsupportedTestMsg = "Test not supported on this platform.";
-
+    
+    /**
+     * Takes a snapshot of the drawable's current framebuffer. Example filenames: 
+     * <pre>
+     * TestFBODrawableNEWT.test01-F_rgba-I_rgba-S0_default-GL2-n0004-0800x0600.png
+     * TestFBODrawableNEWT.test01-F_rgba-I_rgba-S0_default-GL2-n0005-0800x0600.png
+     * </pre>
+     * 
+     * @param simpleTestName will be used as the filename prefix
+     * @param sn sequential number 
+     * @param postSNDetail optional detail to be added to the filename after <code>sn</code>
+     * @param gl the current GL context object. It's read drawable is being used as the pixel source and to gather some details which will end up in the filename.
+     * @param readBufferUtil the {@link GLReadBufferUtil} to be used to read the pixels for the screenshot.
+     * @param fileSuffix Optional file suffix without a <i>dot</i> defining the file type, i.e. <code>"png"</code>.
+     *                   If <code>null</code> the <code>"png"</code> as defined in {@link TextureIO#PNG} is being used.
+     * @param destPath Optional platform dependent file path. It shall use {@link File#separatorChar} as is directory separator.
+     *                 It shall not end with a directory separator, {@link File#separatorChar}.
+     *                 If <code>null</code> the current working directory is being used.  
+     */
+    public static void snapshot(String simpleTestName, int sn, String postSNDetail, GL gl, GLReadBufferUtil readBufferUtil, String fileSuffix, String destPath) {
+        if(null == fileSuffix) {
+            fileSuffix = TextureIO.PNG;
+        }
+        final StringWriter filenameSW = new StringWriter();
+        {
+            final GLDrawable drawable = gl.getContext().getGLReadDrawable();
+            final GLCapabilitiesImmutable caps = drawable.getChosenGLCapabilities();
+            final String F_pfmt = readBufferUtil.hasAlpha() ? "rgba" : "rgb_";
+            final String pfmt = caps.getAlphaBits() > 0 ? "rgba" : "rgb_";
+            final String aaext = caps.getSampleExtension();
+            final int samples = caps.getNumSamples() ;
+            postSNDetail = null != postSNDetail ? "-"+postSNDetail : "";
+            final PrintWriter pw = new PrintWriter(filenameSW);
+            pw.printf("%s-n%04d%s-F_%s-I_%s-S%d_%s-%s-%04dx%04d.%s", 
+                    simpleTestName, sn, postSNDetail, F_pfmt, pfmt, samples, aaext, drawable.getGLProfile().getName(), 
+                    drawable.getWidth(), drawable.getHeight(), fileSuffix);
+        }
+        final String filename = null != destPath ? destPath + File.separator + filenameSW.toString() : filenameSW.toString();
+        System.err.println(Thread.currentThread().getName()+": ** screenshot: "+filename);
+        gl.glFinish(); // just make sure rendering finished ..
+        if(readBufferUtil.readPixels(gl, false)) {
+            readBufferUtil.write(new File(filename));
+        }                
+    }    
 }
 
diff --git a/www/index.html b/www/index.html
index e48128b..e01abd5 100644
--- a/www/index.html
+++ b/www/index.html
@@ -146,7 +146,7 @@
                                                             <tr>
                                                                 <td width="50%">
                                                                     <a href="http://c3d.com"><img src="media/c3d-studio.jpg"
-                                                                                                                       width="160" height="107" align="left" alt="C3D"></img>C3D</a>'s                                              <a href="http://c3d.com/index.php?option=com_content&view=section&layout=blog&id=5&Itemid=65">product palette</a> includes <i>C3D Studio</i> and <i>C3D Viewer</i>.<a href="http://c3d.com/index.php?option=com_content&view=article&id=46:c3dstudio&catid=34:generalpro [...]
+                                                                                                                       width="160" height="107" align="left" alt="C3D"></img>C3D</a>'s                                              <a href="http://c3d.com/index.php?option=com_content&view=section&layout=blog&id=5&Itemid=65">product palette</a> includes <i>C3D Studio</i> and <i>C3D Viewer</i>.<a href="http://c3d.com/index.php?option=com_content&view=article&id=46:c3dst [...]
                                                                 </td>
 
                                                                 <td >
@@ -248,9 +248,6 @@
                                                             </tr>
 
                                                             <tr>
-                                                            </tr>
-
-                                                            <tr>
                                                                 <td width="50%">
                                                                     <b>On the brink ...</b>
                                                                 </td>
@@ -277,7 +274,7 @@
                                                                 </td>
 
                                                                 <td width="50%">
-                                                                    <a href="http://www.geogebra.org/"><img src="media/geogebra-screenshot-tangents.png" width="200" align="left" alt="GeoGebra"></img>GeoGebra</a> is free and multi-platform dynamic mathematics software for all levels of education that joins geometry, algebra, tables, graphing, statistics and calculus in one easy-to-use package. It has received several educational software awards in Europe and the USA. <a href="http://www.g [...]
+                                                                    <a href="http://www.geogebra.org/"><img src="media/geogebra-screenshot-tangents.png" width="200" align="left" alt="GeoGebra"></img>GeoGebra</a> is free and multi-platform dynamic mathematics software for all levels of education that joins geometry, algebra, tables, graphing, statistics and calculus in one easy-to-use package. It has received several educational software awards in Europe and the USA. <a href="http://www.g [...]
                                                                 </td>
                                                             </tr>
 
@@ -566,7 +563,7 @@
                                                                     controller classes. Instead of drawing 2D figures, you can now draw 3D figures.
                                                                     Existing GEF-based 2D editors can be embedded into 3D editors with minimal effort.
                                                                 </td>
-                                                            --->
+                                                            -->
 
                                                         </tbody>
                                                     </table>

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/libjogl2-java.git



More information about the pkg-java-commits mailing list