[libjogl2-java] 08/58: Imported Upstream version 2.0-rc3

Tony Mancill tmancill at moszumanska.debian.org
Thu Sep 4 03:59:07 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 02cd93d9dbcc34146f2288692f711a78c3d0462e
Author: tony mancill <tmancill at debian.org>
Date:   Fri Aug 29 18:42:51 2014 -0700

    Imported Upstream version 2.0-rc3
---
 .classpath                                         |    2 +
 .externalToolBuilders/jogl builder.launch          |   12 +-
 .gitignore                                         |    6 -
 .htaccess                                          |    7 -
 .project                                           |    6 +-
 LICENSE.txt                                        |  150 +-
 README.txt                                         |   26 +-
 REPOSITORIES.txt                                   |    6 +-
 doc/HowToBuild.html                                |   10 +-
 doc/Implementation/runtime-properties.txt          |   22 +-
 doc/NEWT-Overview.html                             |  181 ++
 doc/NewUI-Req01.txt                                |   66 +
 doc/Overview-OpenGL-Evolution-And-JOGL.html        |  212 ++
 doc/TODO.txt                                       |    2 -
 doc/curve/alt-algorithm-rsantina-01.pdf            |  Bin 0 -> 52435 bytes
 doc/deployment/JOGL-DEPLOYMENT.html                |  205 +-
 doc/licenses/Apache.LICENSE-1.1                    |   58 +
 doc/licenses/Apache.LICENSE-2.0                    |  202 ++
 doc/licenses/SGIFreeSWLicB.2.0.pdf                 |  Bin 0 -> 61086 bytes
 doc/licenses/ubuntu-font-licence-1.0.txt           |   96 +
 etc/profile.jogl                                   |   80 +-
 jnlp-files/applet-version-jnlp.html                |   41 -
 jnlp-files/applet-version-lancheronly.html         |   39 -
 jnlp-files/applet-version.jnlp                     |   24 -
 jnlp-files/application-version.jnlp                |   19 -
 jnlp-files/atomic/jogl-awt.jnlp                    |   98 +
 jnlp-files/atomic/jogl-noawt.jnlp                  |   96 +
 jnlp-files/atomic/nativewindow-awt.jnlp            |   72 +
 jnlp-files/atomic/nativewindow-noawt.jnlp          |   83 +
 jnlp-files/atomic/newt-awt-jogl.jnlp               |   89 +
 jnlp-files/atomic/newt-awt.jnlp                    |   86 +
 jnlp-files/atomic/newt-noawt-jogl.jnlp             |   88 +
 jnlp-files/atomic/newt-noawt.jnlp                  |   85 +
 jnlp-files/javaws-version.jnlp                     |   19 -
 jnlp-files/jogl-all-awt.jnlp                       |   39 +-
 jnlp-files/jogl-all-mobile.jnlp                    |   72 +
 jnlp-files/jogl-all-noawt.jnlp                     |   39 +-
 ...nner-newt-ElektronenMultiplizierer-napplet.html |   67 +
 ...pplet-runner-newt-ElektronenMultiplizierer.html |   84 +
 ...applet-runner-newt-GraphTextDemo01-napplet.html |   68 +
 .../jogl-applet-runner-newt-GraphTextDemo01.html   |   86 +
 ...let-runner-newt-GraphUISceneDemo01-napplet.html |   69 +
 ...jogl-applet-runner-newt-GraphUISceneDemo01.html |   87 +
 ...plet-runner-newt-gears-normal-launcheronly.html |  147 ++
 ...gl-applet-runner-newt-gears-normal-napplet.html |  107 +
 .../jogl-applet-runner-newt-gears-normal.html      |  196 ++
 ...l-applet-runner-newt-gears-special-napplet.html |   71 +
 .../jogl-applet-runner-newt-gears-special.html     |   89 +
 jnlp-files/jogl-applet-runner-newt.jnlp            |   26 +
 jnlp-files/jogl-applet-version-lancheronly.html    |   56 +
 jnlp-files/jogl-applet-version-napplet.html        |   61 +
 jnlp-files/jogl-applet-version.html                |   59 +
 jnlp-files/jogl-applet-version.jnlp                |   24 +
 jnlp-files/jogl-application-version.jnlp           |   19 +
 jnlp-files/jogl-awt.jnlp                           |   24 -
 jnlp-files/jogl-core.jnlp                          |   68 -
 jnlp-files/jogl-javaws-version.jnlp                |   19 +
 jnlp-files/jogl-test-applets.html                  |  199 ++
 jnlp-files/nativewindow-all-awt.jnlp               |   65 -
 jnlp-files/nativewindow-awt.jnlp                   |   22 -
 jnlp-files/nativewindow.jnlp                       |   77 -
 jnlp-files/newt-all-awt.jnlp                       |   65 -
 jnlp-files/newt-all-noawt.jnlp                     |   65 -
 jnlp-files/newt-awt.jnlp                           |   22 -
 jnlp-files/newt-jogl.jnlp                          |   22 -
 jnlp-files/newt.jnlp                               |   79 -
 make/README-zip-bundles.txt                        |    8 +
 make/build-common.xml                              |  350 ++-
 make/build-jogl.xml                                |  390 ++-
 make/build-nativewindow.xml                        |  130 +-
 make/build-newt.xml                                |  281 +--
 make/build-test.xml                                |   42 +-
 make/build.xml                                     |  212 +-
 make/config/intptr.cfg                             |   17 -
 make/config/jogl/cg-common.cfg                     |    1 +
 make/config/jogl/cgl-macosx.cfg                    |    1 +
 make/config/jogl/cglext.cfg                        |    3 +-
 make/config/jogl/egl.cfg                           |    5 +-
 make/config/jogl/eglext.cfg                        |    5 +-
 make/config/jogl/gl-common.cfg                     |   23 +-
 make/config/jogl/gl-es1.cfg                        |    3 +-
 make/config/jogl/gl-es2.cfg                        |    3 +-
 make/config/jogl/gl-gl4bc.cfg                      |    6 +-
 make/config/jogl/gl-headers.cfg                    |    4 +-
 make/config/jogl/gl-if-CustomJavaCode-gl.java      |   19 +-
 make/config/jogl/gl-if-gl2.cfg                     |    1 -
 make/config/jogl/gl-if-gl3.cfg                     |    1 -
 make/config/jogl/gl-if-gl3bc.cfg                   |    1 -
 make/config/jogl/gl-if-gl4.cfg                     |    1 -
 .../config/jogl/gl-impl-CustomJavaCode-common.java |    6 +-
 .../jogl/gl-impl-CustomJavaCode-desktop.java       |   83 +-
 .../jogl/gl-impl-CustomJavaCode-embedded.java      |   41 +-
 .../jogl/gl-impl-CustomJavaCode-gl2_es2.java       |    8 +-
 make/config/jogl/gl-impl-CustomJavaCode-gl4bc.java |  116 +-
 make/config/jogl/gl-impl-CustomJavaCode-gles1.java |   82 +-
 make/config/jogl/gl-impl-CustomJavaCode-gles2.java |   64 +-
 make/config/jogl/gl2_es2-common.cfg                |   10 +-
 make/config/jogl/gl3-headers.cfg                   |    3 +-
 make/config/jogl/gl3ext-headers.cfg                |    1 +
 make/config/jogl/glu-gl2.cfg                       |    5 +-
 make/config/jogl/glxext.cfg                        |    1 -
 make/config/jogl/wgl-win32.cfg                     |    3 +-
 make/config/jogl/wglext.cfg                        |    1 -
 make/config/nativewindow/jawt-win32.cfg            |    3 +-
 make/config/nativewindow/jawt-x11.cfg              |    3 +-
 make/config/nativewindow/win32-CustomJavaCode.java |    2 +
 make/config/nativewindow/win32-lib.cfg             |    8 +-
 make/config/nativewindow/x11-lib.cfg               |    6 +-
 make/joglversion                                   |    1 +
 make/lib/gluegen.compiler.intelgdl.xml             |   43 -
 make/lib/swt/LICENSE.txt                           |   16 -
 make/lib/swt/README.txt                            |    1 -
 make/lib/swt/cocoa-macosx-x86_64/about.html        |  205 --
 .../swt/cocoa-macosx-x86_64/about_files/IJG_README |  385 ---
 .../cocoa-macosx-x86_64/about_files/mpl-v11.txt    |  470 ----
 make/lib/swt/cocoa-macosx-x86_64/swt-debug.jar     |  Bin 2110655 -> 0 bytes
 make/lib/swt/cocoa-macosx/about.html               |  218 --
 make/lib/swt/cocoa-macosx/about_files/IJG_README   |  385 ---
 make/lib/swt/cocoa-macosx/about_files/mpl-v11.txt  |  470 ----
 make/lib/swt/cocoa-macosx/swt-debug.jar            |  Bin 2197872 -> 0 bytes
 make/lib/swt/epl-v10.html                          |  261 --
 make/lib/swt/gtk-linux-x86/about.html              |  301 ---
 make/lib/swt/gtk-linux-x86/about_files/IJG_README  |  385 ---
 .../swt/gtk-linux-x86/about_files/about_cairo.html |   48 -
 .../lib/swt/gtk-linux-x86/about_files/lgpl-v21.txt |  506 ----
 make/lib/swt/gtk-linux-x86/about_files/mpl-v11.txt |  470 ----
 .../gtk-linux-x86/about_files/pixman-licenses.txt  |   92 -
 .../swt/gtk-linux-x86/about_files/webkit-bsd.txt   |   20 -
 make/lib/swt/gtk-linux-x86/swt-debug.jar           |  Bin 2097107 -> 0 bytes
 make/lib/swt/gtk-linux-x86_64/about.html           |  301 ---
 .../swt/gtk-linux-x86_64/about_files/IJG_README    |  385 ---
 .../gtk-linux-x86_64/about_files/about_cairo.html  |   48 -
 .../swt/gtk-linux-x86_64/about_files/lgpl-v21.txt  |  506 ----
 .../swt/gtk-linux-x86_64/about_files/mpl-v11.txt   |  470 ----
 .../about_files/pixman-licenses.txt                |   92 -
 .../gtk-linux-x86_64/about_files/webkit-bsd.txt    |   20 -
 make/lib/swt/gtk-linux-x86_64/swt-debug.jar        |  Bin 2259562 -> 0 bytes
 make/lib/swt/notice.html                           |  107 -
 make/lib/swt/win32-win32-x86/about.html            |  184 --
 .../lib/swt/win32-win32-x86/about_files/IJG_README |  385 ---
 .../swt/win32-win32-x86/about_files/mpl-v11.txt    |  470 ----
 make/lib/swt/win32-win32-x86/swt-debug.jar         |  Bin 2402240 -> 0 bytes
 make/lib/swt/win32-win32-x86_64/about.html         |  171 --
 .../swt/win32-win32-x86_64/about_files/IJG_README  |  385 ---
 .../swt/win32-win32-x86_64/about_files/mpl-v11.txt |  470 ----
 make/lib/swt/win32-win32-x86_64/swt-debug.jar      |  Bin 2425896 -> 0 bytes
 make/lib/wince/arm/nvap/libEGL.lib                 |  Bin 9314 -> 0 bytes
 make/lib/wince/arm/nvap/libGLESv1_CM.lib           |  Bin 32500 -> 0 bytes
 make/lib/wince/arm/nvap/libGLESv2.lib              |  Bin 30670 -> 0 bytes
 make/lib/wince/arm/nvap/libKD.lib                  |  Bin 34346 -> 0 bytes
 make/lib/wince/arm/nvap/libnvkdmain.lib            |  Bin 3036 -> 0 bytes
 make/lib/wince/arm/nvap/libnvomx.lib               |  Bin 5962 -> 0 bytes
 make/nativewindowversion                           |    1 +
 make/newtversion                                   |    1 +
 make/resources/android/AndroidManifest-jogl.xml    |   28 +
 .../resources/android/AndroidManifest-launcher.xml |  128 +
 make/resources/android/AndroidManifest-test.xml    |   17 +
 .../android/res-jogl/drawable-hdpi/icon.png        |  Bin 0 -> 2516 bytes
 .../android/res-jogl/drawable-ldpi/icon.png        |  Bin 0 -> 1172 bytes
 .../android/res-jogl/drawable-mdpi/icon.png        |  Bin 0 -> 1570 bytes
 make/resources/android/res-jogl/layout/main.xml    |   12 +
 make/resources/android/res-jogl/values/strings.xml |    8 +
 .../android/res-launcher/drawable-hdpi/icon.png    |  Bin 0 -> 2516 bytes
 .../android/res-launcher/drawable-ldpi/icon.png    |  Bin 0 -> 1172 bytes
 .../android/res-launcher/drawable-mdpi/icon.png    |  Bin 0 -> 1570 bytes
 .../resources/android/res-launcher/layout/main.xml |   12 +
 .../android/res-launcher/values/colors.xml         |    6 +
 .../android/res-launcher/values/strings.xml        |   22 +
 .../android/res-launcher/values/styles.xml         |   20 +
 make/scripts/adb-install-all.sh                    |    4 +
 make/scripts/adb-reinstall-all.sh                  |    4 +
 make/scripts/adb-uninstall-all.sh                  |    4 +
 make/scripts/clean-graph.sh                        |    3 +
 make/scripts/clean-tests.sh                        |    5 +
 make/scripts/crosstest-java-android-armv7-rel.sh   |   69 +
 make/scripts/crosstest-java-linux-armv7-rel.sh     |   60 +
 make/scripts/crosstest-launch-android-activity.sh  |   17 +
 make/scripts/eglestest-java-linux.sh               |   44 +
 make/scripts/java-win32-dbg.bat                    |    8 +-
 make/scripts/java-win32.bat                        |    8 +-
 make/scripts/java-win64-dbg.bat                    |   12 +-
 make/scripts/java-win64.bat                        |    6 +-
 make/scripts/lstjars.sh                            |   78 +-
 make/scripts/make.jogl.all.android-armv7-cross.sh  |  112 +
 make/scripts/make.jogl.all.linux-armv7-cross.sh    |   41 +
 make/scripts/make.jogl.all.linux-x86.sh            |   29 +-
 make/scripts/make.jogl.all.linux-x86_64.sh         |   23 +-
 make/scripts/make.jogl.all.macosx.sh               |    1 -
 make/scripts/make.jogl.all.win32.bat               |   11 +-
 make/scripts/make.jogl.all.win64.bat               |   11 +-
 make/scripts/make.jogl.doc.all.x86_64.sh           |    7 +-
 make/scripts/make.jogl.doc.x86_64.sh               |    7 +-
 make/scripts/setenv-jogl.sh                        |    5 +-
 make/scripts/tests-armv7l_eabi.sh                  |    7 +
 make/scripts/tests-javaws-x64.bat                  |    2 +-
 make/scripts/tests-x32.bat                         |   11 +-
 make/scripts/tests-x32.sh                          |    8 +-
 make/scripts/tests-x64.bat                         |   42 +-
 make/scripts/tests-x64.sh                          |    7 +-
 make/scripts/tests.sh                              |  145 +-
 make/stub_includes/egl/EGL/eglplatform.h           |    2 +-
 make/stub_includes/gluegen/gluegen_types.h         |   44 -
 make/stub_includes/gluegen/inttypes.h              |    7 -
 make/stub_includes/gluegen/stdarg.h                |    7 -
 make/stub_includes/gluegen/stddef.h                |    6 -
 make/stub_includes/gluegen/stdint.h                |    7 -
 make/stub_includes/jni/classfile_constants.h       |  523 ----
 make/stub_includes/jni/jawt.h                      |  214 +-
 make/stub_includes/jni/jdwpTransport.h             |  237 --
 make/stub_includes/jni/jni.h                       |   75 +-
 make/stub_includes/jni/jvmti.h                     | 2504 --------------------
 make/stub_includes/jni/macosx/AWTCocoaComponent.h  |   15 -
 make/stub_includes/jni/macosx/JDWP.h               |   53 -
 make/stub_includes/jni/macosx/JDWPCommands.h       |  238 --
 make/stub_includes/jni/macosx/jni_md.h             |   23 +-
 make/stub_includes/jni/macosx/jvmdi.h              | 1012 --------
 make/stub_includes/jni/macosx/jvmpi.h              |  642 -----
 make/stub_includes/jni/win32/jawt_md.h             |   32 +-
 make/stub_includes/jni/win32/jni_md.h              |   23 +-
 make/stub_includes/jni/x11/jawt_md.h               |   29 +-
 make/stub_includes/jni/x11/jni_md.h                |   23 +-
 make/stub_includes/khr/KHR/khrplatform.h           |  104 +-
 make/stub_includes/macosx/OpenGL/OpenGL.h          |    3 +-
 make/stub_includes/opengl/macosx-window-system.h   |    1 +
 make/stub_includes/win32/WindowsDWM.h              |   33 +
 make/stub_includes/win32/window-lib.c              |    1 +
 make/stub_includes/win32/windows.h                 |    2 +
 make/stub_includes/x11/X11/extensions/Xrender.h    |   42 +
 make/stub_includes/x11/window-lib.c                |    4 +
 make/versions.xml                                  |    1 +
 nbproject/.gitignore                               |    1 -
 .../jogamp/android/launcher/ClassLoaderUtil.java   |  121 +
 .../android/launcher/LauncherTempFileCache.java    |  477 ++++
 .../android/launcher/NEWTLauncherActivity.java     |  254 ++
 .../launcher/NEWTLauncherElektronActivity.java     |   15 +
 .../launcher/NEWTLauncherGearsES1Activity.java     |   15 +
 .../launcher/NEWTLauncherGearsES2Activity.java     |   15 +
 .../NEWTLauncherGearsES2TransActivity.java         |   15 +
 .../launcher/NEWTLauncherGraphUI1pActivity.java    |   15 +
 .../launcher/NEWTLauncherGraphUI2pActivity.java    |   15 +
 .../launcher/NEWTLauncherRedSquareES1Activity.java |   15 +
 .../launcher/NEWTLauncherRedSquareES2Activity.java |   15 +
 .../gluegen/opengl/BuildComposablePipeline.java    |   19 +-
 .../com/jogamp/gluegen/opengl/GLEmitter.java       |    1 +
 .../gluegen/opengl/GLJavaMethodBindingEmitter.java |    1 +
 .../opengl/nativesig/NativeSignatureEmitter.java   |    1 +
 .../NativeSignatureJavaMethodBindingEmitter.java   |    1 +
 .../com/jogamp/graph/curve/OutlineShape.java       |  629 +++++
 .../classes/com/jogamp/graph/curve/Region.java     |  191 ++
 .../com/jogamp/graph/curve/opengl/GLRegion.java    |  127 +
 .../jogamp/graph/curve/opengl/RegionRenderer.java  |   83 +
 .../com/jogamp/graph/curve/opengl/RenderState.java |  111 +
 .../com/jogamp/graph/curve/opengl/Renderer.java    |  281 +++
 .../jogamp/graph/curve/opengl/TextRenderer.java    |  192 ++
 .../com/jogamp/graph/curve/tess/Triangulation.java |   44 +
 .../com/jogamp/graph/curve/tess/Triangulator.java  |   69 +
 src/jogl/classes/com/jogamp/graph/font/Font.java   |  106 +
 .../classes/com/jogamp/graph/font/FontFactory.java |   92 +
 .../classes/com/jogamp/graph/font/FontSet.java     |   60 +
 src/jogl/classes/com/jogamp/graph/geom/AABBox.java |  326 +++
 .../classes/com/jogamp/graph/geom/Outline.java     |  243 ++
 .../classes/com/jogamp/graph/geom/Triangle.java    |   79 +
 src/jogl/classes/com/jogamp/graph/geom/Vertex.java |   91 +
 .../com/jogamp/graph/geom/opengl/SVertex.java      |  174 ++
 .../classes/com/jogamp/graph/math/Quaternion.java  |  382 +++
 .../classes/com/jogamp/graph/math/VectorUtil.java  |  433 ++++
 src/jogl/classes/com/jogamp/graph/package.html     |   33 +
 .../classes/com/jogamp/opengl/JoglVersion.java     |    4 +-
 .../opengl/cg/CgDynamicLibraryBundleInfo.java      |   30 +-
 .../com/jogamp/opengl/util/AWTAnimatorImpl.java    |   26 +-
 .../classes/com/jogamp/opengl/util/Animator.java   |   16 +-
 .../com/jogamp/opengl/util/AnimatorBase.java       |   67 +-
 .../jogamp/opengl/util/DefaultAnimatorImpl.java    |    4 +-
 .../classes/com/jogamp/opengl/util/FBObject.java   |  457 +++-
 .../com/jogamp/opengl/util/FPSAnimator.java        |   29 +-
 .../classes/com/jogamp/opengl/util/FileUtil.java   |   89 -
 .../com/jogamp/opengl/util/GLArrayDataClient.java  |  296 ++-
 .../jogamp/opengl/util/GLArrayDataEditable.java    |   63 +-
 .../com/jogamp/opengl/util/GLArrayDataServer.java  |  332 ++-
 .../com/jogamp/opengl/util/GLArrayDataWrapper.java |  274 ++-
 .../com/jogamp/opengl/util/GLArrayHandler.java     |   11 -
 .../classes/com/jogamp/opengl/util/GLBuffers.java  |  412 +++-
 .../jogamp/opengl/util/GLFixedArrayHandler.java    |   65 -
 .../jogamp/opengl/util/GLPixelStorageModes.java    |  136 ++
 .../com/jogamp/opengl/util/GLReadBufferUtil.java   |  181 ++
 .../com/jogamp/opengl/util/ImmModeSink.java        |   64 +-
 .../classes/com/jogamp/opengl/util/Locator.java    |  137 --
 .../classes/com/jogamp/opengl/util/PMVMatrix.java  |  202 +-
 .../classes/com/jogamp/opengl/util/StreamUtil.java |   98 -
 .../com/jogamp/opengl/util/awt/Overlay.java        |    1 -
 .../com/jogamp/opengl/util/awt/Screenshot.java     |   69 +-
 .../com/jogamp/opengl/util/awt/TextRenderer.java   |    4 +-
 .../jogamp/opengl/util/awt/TextureRenderer.java    |   29 +-
 .../classes/com/jogamp/opengl/util/gl2/GLUT.java   |    8 +-
 .../jogamp/opengl/util/glsl/GLSLArrayHandler.java  |   85 -
 .../com/jogamp/opengl/util/glsl/ShaderCode.java    |   99 +-
 .../com/jogamp/opengl/util/glsl/ShaderProgram.java |  215 +-
 .../com/jogamp/opengl/util/glsl/ShaderState.java   | 1004 +++++---
 .../com/jogamp/opengl/util/glsl/ShaderUtil.java    |   44 +-
 .../opengl/util/glsl/fixedfunc/FixedFuncUtil.java  |   28 +-
 .../jogamp/opengl/util/glsl/sdk/CompileShader.java |    6 +-
 .../com/jogamp/opengl/util/texture/Texture.java    |  198 +-
 .../jogamp/opengl/util/texture/TextureData.java    |    7 +-
 .../com/jogamp/opengl/util/texture/TextureIO.java  |  125 +-
 .../opengl/util/texture/spi/LEDataInputStream.java |   92 +-
 .../util/texture/spi/NetPbmTextureWriter.java      |   13 +-
 .../jogamp/opengl/util/texture/spi/SGIImage.java   |   10 +-
 .../util/texture/spi/awt/IIOTextureWriter.java     |    8 +-
 .../media/opengl/DefaultGLCapabilitiesChooser.java |   39 +-
 .../classes/javax/media/opengl/FPSCounter.java     |  117 +
 .../javax/media/opengl/GLAnimatorControl.java      |   42 +-
 .../classes/javax/media/opengl/GLArrayData.java    |   50 +-
 .../classes/javax/media/opengl/GLAutoDrawable.java |   23 +-
 src/jogl/classes/javax/media/opengl/GLBase.java    |    7 +
 .../classes/javax/media/opengl/GLCapabilities.java |   55 +-
 .../media/opengl/GLCapabilitiesImmutable.java      |    8 +-
 src/jogl/classes/javax/media/opengl/GLContext.java |  245 +-
 .../javax/media/opengl/GLDebugListener.java        |   44 +
 .../classes/javax/media/opengl/GLDebugMessage.java |  248 ++
 .../javax/media/opengl/GLDrawableFactory.java      |   67 +-
 .../javax/media/opengl/GLPipelineFactory.java      |   29 +-
 src/jogl/classes/javax/media/opengl/GLProfile.java |  496 ++--
 .../classes/javax/media/opengl/GLRunnable.java     |    6 +-
 .../classes/javax/media/opengl/GLUniformData.java  |   14 +-
 .../classes/javax/media/opengl/awt/GLCanvas.java   |   65 +-
 .../classes/javax/media/opengl/awt/GLJPanel.java   |   39 +-
 .../media/opengl/fixedfunc/GLLightingFunc.java     |   29 +-
 .../javax/media/opengl/fixedfunc/GLMatrixFunc.java |   25 +
 .../media/opengl/fixedfunc/GLPointerFunc.java      |   27 +-
 .../media/opengl/fixedfunc/GLPointerFuncUtil.java  |   55 +
 .../jogamp/graph/curve/opengl/RegionFactory.java   |   74 +
 .../graph/curve/opengl/RegionRendererImpl01.java   |   93 +
 .../jogamp/graph/curve/opengl/RenderStateImpl.java |   74 +
 .../graph/curve/opengl/TextRendererImpl01.java     |   96 +
 .../jogamp/graph/curve/opengl/VBORegion2PES2.java  |  328 +++
 .../jogamp/graph/curve/opengl/VBORegionSPES2.java  |  160 ++
 .../graph/curve/opengl/shader/AttributeNames.java  |   45 +
 .../graph/curve/opengl/shader/UniformNames.java    |   10 +
 .../graph/curve/opengl/shader/attributes.glsl      |   11 +
 .../opengl/shader/curverenderer01-es2-merged.vp    |   19 +
 .../curve/opengl/shader/curverenderer01-es2.vp     |    9 +
 .../curve/opengl/shader/curverenderer01-gl2.vp     |    6 +
 .../curve/opengl/shader/curverenderer01-xxx.vp     |   12 +
 .../opengl/shader/curverenderer01a-es2-merged.fp   |   52 +
 .../curve/opengl/shader/curverenderer01a-es2.fp    |   13 +
 .../curve/opengl/shader/curverenderer01a-gl2.fp    |    6 +
 .../curve/opengl/shader/curverenderer01a-xxx.fp    |   42 +
 .../curve/opengl/shader/curverenderer01b-es2.fp    |   14 +
 .../curve/opengl/shader/curverenderer01b-gl2.fp    |    6 +
 .../curve/opengl/shader/curverenderer01b-xxx.fp    |   82 +
 .../curve/opengl/shader/curverenderer02a-es2.fp    |   14 +
 .../curve/opengl/shader/curverenderer02a-gl2.fp    |    6 +
 .../curve/opengl/shader/curverenderer02a-xxx.fp    |   48 +
 .../curve/opengl/shader/curverenderer02b-es2.fp    |   14 +
 .../curve/opengl/shader/curverenderer02b-gl2.fp    |    6 +
 .../curve/opengl/shader/curverenderer02b-xxx.fp    |   88 +
 .../jogamp/graph/curve/opengl/shader/uniforms.glsl |   22 +
 .../jogamp/graph/curve/opengl/shader/varyings.glsl |    9 +
 .../jogamp/graph/curve/tess/CDTriangulator2D.java  |  203 ++
 .../jogamp/graph/curve/tess/GraphOutline.java      |   72 +
 .../jogamp/graph/curve/tess/GraphVertex.java       |  123 +
 .../classes/jogamp/graph/curve/tess/HEdge.java     |  130 +
 src/jogl/classes/jogamp/graph/curve/tess/Loop.java |  332 +++
 .../jogamp/graph/curve/text/GlyphShape.java        |   99 +
 .../jogamp/graph/curve/text/GlyphString.java       |  206 ++
 .../classes/jogamp/graph/font/FontConstructor.java |   39 +
 src/jogl/classes/jogamp/graph/font/FontInt.java    |   53 +
 .../classes/jogamp/graph/font/JavaFontLoader.java  |  155 ++
 .../jogamp/graph/font/UbuntuFontLoader.java        |  139 ++
 .../graph/font/fonts/ubuntu/CONTRIBUTING.txt       |   21 +
 .../jogamp/graph/font/fonts/ubuntu/FONTLOG.txt     |  211 ++
 .../jogamp/graph/font/fonts/ubuntu/LICENCE-FAQ.txt |  177 ++
 .../jogamp/graph/font/fonts/ubuntu/LICENCE.txt     |   96 +
 .../jogamp/graph/font/fonts/ubuntu/README.txt      |   15 +
 .../jogamp/graph/font/fonts/ubuntu/TRADEMARKS.txt  |    4 +
 .../jogamp/graph/font/fonts/ubuntu/Ubuntu-B.ttf    |  Bin 0 -> 339320 bytes
 .../jogamp/graph/font/fonts/ubuntu/Ubuntu-BI.ttf   |  Bin 0 -> 362784 bytes
 .../jogamp/graph/font/fonts/ubuntu/Ubuntu-L.ttf    |  Bin 0 -> 421172 bytes
 .../jogamp/graph/font/fonts/ubuntu/Ubuntu-LI.ttf   |  Bin 0 -> 415424 bytes
 .../jogamp/graph/font/fonts/ubuntu/Ubuntu-M.ttf    |  Bin 0 -> 346940 bytes
 .../jogamp/graph/font/fonts/ubuntu/Ubuntu-MI.ttf   |  Bin 0 -> 372728 bytes
 .../jogamp/graph/font/fonts/ubuntu/Ubuntu-R.ttf    |  Bin 0 -> 359668 bytes
 .../jogamp/graph/font/fonts/ubuntu/Ubuntu-RI.ttf   |  Bin 0 -> 389744 bytes
 .../jogamp/graph/font/fonts/ubuntu/copyright.txt   |    5 +
 .../jogamp/graph/font/typecast/TypecastFont.java   |  296 +++
 .../font/typecast/TypecastFontConstructor.java     |   84 +
 .../jogamp/graph/font/typecast/TypecastGlyph.java  |  232 ++
 .../graph/font/typecast/TypecastHMetrics.java      |   84 +
 .../graph/font/typecast/TypecastRenderer.java      |  220 ++
 .../graph/font/typecast/ot/Disassembler.java       |  109 +
 .../jogamp/graph/font/typecast/ot/Fixed.java       |  852 +++++++
 .../jogamp/graph/font/typecast/ot/Mnemonic.java    |  397 ++++
 .../jogamp/graph/font/typecast/ot/OTFont.java      |  293 +++
 .../graph/font/typecast/ot/OTFontCollection.java   |  170 ++
 .../jogamp/graph/font/typecast/ot/OTGlyph.java     |  169 ++
 .../jogamp/graph/font/typecast/ot/Point.java       |   29 +
 .../graph/font/typecast/ot/mac/ResourceData.java   |   45 +
 .../graph/font/typecast/ot/mac/ResourceFile.java   |   77 +
 .../graph/font/typecast/ot/mac/ResourceHeader.java |   61 +
 .../graph/font/typecast/ot/mac/ResourceMap.java    |   83 +
 .../font/typecast/ot/mac/ResourceReference.java    |   81 +
 .../graph/font/typecast/ot/mac/ResourceType.java   |   82 +
 .../graph/font/typecast/ot/table/BaseTable.java    |  435 ++++
 .../font/typecast/ot/table/CffStandardStrings.java |  424 ++++
 .../graph/font/typecast/ot/table/CffTable.java     |  620 +++++
 .../graph/font/typecast/ot/table/Charstring.java   |   33 +
 .../font/typecast/ot/table/CharstringType2.java    |  235 ++
 .../graph/font/typecast/ot/table/ClassDef.java     |   33 +
 .../font/typecast/ot/table/ClassDefFormat1.java    |   39 +
 .../font/typecast/ot/table/ClassDefFormat2.java    |   37 +
 .../graph/font/typecast/ot/table/CmapFormat.java   |  134 ++
 .../graph/font/typecast/ot/table/CmapFormat0.java  |   92 +
 .../graph/font/typecast/ot/table/CmapFormat2.java  |  173 ++
 .../graph/font/typecast/ot/table/CmapFormat4.java  |  165 ++
 .../graph/font/typecast/ot/table/CmapFormat6.java  |   87 +
 .../font/typecast/ot/table/CmapFormatUnknown.java  |   54 +
 .../font/typecast/ot/table/CmapIndexEntry.java     |  117 +
 .../graph/font/typecast/ot/table/CmapTable.java    |  161 ++
 .../graph/font/typecast/ot/table/Coverage.java     |   83 +
 .../font/typecast/ot/table/CoverageFormat1.java    |   88 +
 .../font/typecast/ot/table/CoverageFormat2.java    |   89 +
 .../graph/font/typecast/ot/table/CvtTable.java     |   61 +
 .../graph/font/typecast/ot/table/Device.java       |   50 +
 .../font/typecast/ot/table/DirectoryEntry.java     |  115 +
 .../graph/font/typecast/ot/table/DsigEntry.java    |   43 +
 .../graph/font/typecast/ot/table/DsigTable.java    |   69 +
 .../graph/font/typecast/ot/table/Feature.java      |   85 +
 .../graph/font/typecast/ot/table/FeatureList.java  |  118 +
 .../font/typecast/ot/table/FeatureRecord.java      |   88 +
 .../graph/font/typecast/ot/table/FeatureTags.java  |   63 +
 .../graph/font/typecast/ot/table/FpgmTable.java    |   47 +
 .../graph/font/typecast/ot/table/GaspRange.java    |   45 +
 .../graph/font/typecast/ot/table/GaspTable.java    |   63 +
 .../font/typecast/ot/table/GlyfCompositeComp.java  |  200 ++
 .../typecast/ot/table/GlyfCompositeDescript.java   |  202 ++
 .../graph/font/typecast/ot/table/GlyfDescript.java |  124 +
 .../font/typecast/ot/table/GlyfSimpleDescript.java |  246 ++
 .../graph/font/typecast/ot/table/GlyfTable.java    |  132 ++
 .../font/typecast/ot/table/GlyphDescription.java   |   86 +
 .../graph/font/typecast/ot/table/GposTable.java    |   66 +
 .../graph/font/typecast/ot/table/GsubTable.java    |  181 ++
 .../graph/font/typecast/ot/table/HdmxTable.java    |  130 +
 .../graph/font/typecast/ot/table/HeadTable.java    |  206 ++
 .../graph/font/typecast/ot/table/HheaTable.java    |  136 ++
 .../graph/font/typecast/ot/table/HmtxTable.java    |  141 ++
 .../jogamp/graph/font/typecast/ot/table/ID.java    |  399 ++++
 .../graph/font/typecast/ot/table/KernSubtable.java |   49 +
 .../typecast/ot/table/KernSubtableFormat0.java     |   47 +
 .../typecast/ot/table/KernSubtableFormat2.java     |   42 +
 .../graph/font/typecast/ot/table/KernTable.java    |   62 +
 .../graph/font/typecast/ot/table/KerningPair.java  |   44 +
 .../graph/font/typecast/ot/table/LangSys.java      |  105 +
 .../font/typecast/ot/table/LangSysRecord.java      |   88 +
 .../graph/font/typecast/ot/table/Ligature.java     |   85 +
 .../graph/font/typecast/ot/table/LigatureSet.java  |   85 +
 .../font/typecast/ot/table/LigatureSubst.java      |   73 +
 .../typecast/ot/table/LigatureSubstFormat1.java    |   95 +
 .../graph/font/typecast/ot/table/LocaTable.java    |   77 +
 .../graph/font/typecast/ot/table/Lookup.java       |  110 +
 .../graph/font/typecast/ot/table/LookupList.java   |  108 +
 .../font/typecast/ot/table/LookupSubtable.java     |   60 +
 .../typecast/ot/table/LookupSubtableFactory.java   |   64 +
 .../graph/font/typecast/ot/table/LtshTable.java    |   68 +
 .../graph/font/typecast/ot/table/MaxpTable.java    |  163 ++
 .../graph/font/typecast/ot/table/NameRecord.java   |  146 ++
 .../graph/font/typecast/ot/table/NameTable.java    |  147 ++
 .../graph/font/typecast/ot/table/Os2Table.java     |  357 +++
 .../graph/font/typecast/ot/table/Panose.java       |   96 +
 .../graph/font/typecast/ot/table/PcltTable.java    |  105 +
 .../graph/font/typecast/ot/table/PostTable.java    |  423 ++++
 .../graph/font/typecast/ot/table/PrepTable.java    |   47 +
 .../graph/font/typecast/ot/table/Program.java      |   40 +
 .../graph/font/typecast/ot/table/RangeRecord.java  |   87 +
 .../graph/font/typecast/ot/table/Script.java       |  118 +
 .../graph/font/typecast/ot/table/ScriptList.java   |  115 +
 .../graph/font/typecast/ot/table/ScriptRecord.java |   88 +
 .../graph/font/typecast/ot/table/ScriptTags.java   |   61 +
 .../font/typecast/ot/table/SignatureBlock.java     |   46 +
 .../graph/font/typecast/ot/table/SingleSubst.java  |   81 +
 .../font/typecast/ot/table/SingleSubstFormat1.java |   92 +
 .../font/typecast/ot/table/SingleSubstFormat2.java |   97 +
 .../graph/font/typecast/ot/table/TTCHeader.java    |   59 +
 .../jogamp/graph/font/typecast/ot/table/Table.java |   69 +
 .../font/typecast/ot/table/TableDirectory.java     |  130 +
 .../font/typecast/ot/table/TableException.java     |   46 +
 .../graph/font/typecast/ot/table/TableFactory.java |  185 ++
 .../graph/font/typecast/ot/table/VdmxTable.java    |  197 ++
 .../graph/font/typecast/ot/table/VheaTable.java    |  148 ++
 .../graph/font/typecast/ot/table/VmtxTable.java    |  112 +
 .../graph/font/typecast/t2/T2Interpreter.java      | 1044 ++++++++
 .../jogamp/graph/font/typecast/t2/T2Mnemonic.java  |   86 +
 .../font/typecast/tt/engine/GraphicsState.java     |   50 +
 .../graph/font/typecast/tt/engine/Interpreter.java | 1357 +++++++++++
 .../graph/font/typecast/tt/engine/Parser.java      |  192 ++
 .../jogamp/graph/geom/plane/AffineTransform.java   |  580 +++++
 .../geom/plane/IllegalPathStateException.java      |   34 +
 .../plane/NoninvertibleTransformException.java     |   31 +
 .../classes/jogamp/graph/geom/plane/Path2D.java    |  431 ++++
 .../jogamp/graph/geom/plane/PathIterator.java      |   42 +
 src/jogl/classes/jogamp/graph/math/MathFloat.java  |   45 +
 .../classes/jogamp/graph/math/plane/Crossing.java  |  903 +++++++
 .../opengl/DesktopGLDynamicLibraryBundleInfo.java  |   18 +-
 .../opengl/DesktopGLDynamicLookupHelper.java       |    4 -
 .../jogamp/opengl/ExtensionAvailabilityCache.java  |   42 +-
 src/jogl/classes/jogamp/opengl/FPSCounterImpl.java |  137 ++
 .../classes/jogamp/opengl/GLBufferSizeTracker.java |   47 +-
 .../jogamp/opengl/GLBufferStateTracker.java        |   61 +-
 src/jogl/classes/jogamp/opengl/GLContextImpl.java  |  336 ++-
 src/jogl/classes/jogamp/opengl/GLContextLock.java  |  157 --
 .../jogamp/opengl/GLDebugMessageHandler.java       |  316 +++
 .../jogamp/opengl/GLDrawableFactoryImpl.java       |    7 +
 .../classes/jogamp/opengl/GLDrawableHelper.java    |   88 +-
 src/jogl/classes/jogamp/opengl/GLDrawableImpl.java |    1 -
 .../jogamp/opengl/GLDynamicLibraryBundleInfo.java  |    6 +-
 .../opengl/GLGraphicsConfigurationFactory.java     |    4 +-
 .../jogamp/opengl/GLGraphicsConfigurationUtil.java |   14 +
 src/jogl/classes/jogamp/opengl/GLPbufferImpl.java  |   22 +-
 src/jogl/classes/jogamp/opengl/GLRunnableTask.java |    8 +-
 src/jogl/classes/jogamp/opengl/GLStateTracker.java |  106 +-
 .../jogamp/opengl/ListenerSyncedImplStub.java      |   79 +
 src/jogl/classes/jogamp/opengl/MemoryObject.java   |   26 +-
 .../jogamp/opengl/SharedResourceRunner.java        |   73 +-
 .../classes/jogamp/opengl/awt/VersionApplet.java   |  168 ++
 src/jogl/classes/jogamp/opengl/egl/EGLContext.java |   60 +-
 .../classes/jogamp/opengl/egl/EGLDrawable.java     |   37 +-
 .../jogamp/opengl/egl/EGLDrawableFactory.java      |  110 +-
 .../opengl/egl/EGLDynamicLibraryBundleInfo.java    |   48 +-
 .../opengl/egl/EGLES1DynamicLibraryBundleInfo.java |   61 +-
 .../opengl/egl/EGLES2DynamicLibraryBundleInfo.java |   60 +-
 .../jogamp/opengl/egl/EGLExternalContext.java      |    2 +-
 .../jogamp/opengl/egl/EGLGLCapabilities.java       |   84 +-
 .../opengl/egl/EGLGraphicsConfiguration.java       |   99 +-
 .../egl/EGLGraphicsConfigurationFactory.java       |  148 +-
 .../jogamp/opengl/egl/EGLOnscreenDrawable.java     |    7 +-
 .../jogamp/opengl/egl/EGLPbufferDrawable.java      |    7 +-
 .../classes/jogamp/opengl/glu/GLUquadricImpl.java  |   16 +-
 .../opengl/glu/gl2/nurbs/GL2CurveEvaluator.java    |    8 +-
 .../opengl/glu/gl2/nurbs/GL2SurfaceEvaluator.java  |   12 +-
 .../opengl/glu/gl2/nurbs/GLUgl2nurbsImpl.java      |   12 +-
 .../jogamp/opengl/glu/nurbs/ArcSdirSorter.java     |    4 +-
 .../jogamp/opengl/glu/nurbs/ArcTdirSorter.java     |    4 +-
 .../jogamp/opengl/glu/nurbs/ArcTesselator.java     |    4 +-
 .../classes/jogamp/opengl/glu/nurbs/Backend.java   |    2 +-
 .../classes/jogamp/opengl/glu/nurbs/Curve.java     |   14 +-
 .../jogamp/opengl/glu/nurbs/DisplayList.java       |    2 +-
 .../classes/jogamp/opengl/glu/nurbs/Knotspec.java  |   10 +-
 .../jogamp/opengl/glu/nurbs/Knotvector.java        |    2 +-
 .../classes/jogamp/opengl/glu/nurbs/Mapdesc.java   |    6 +-
 .../classes/jogamp/opengl/glu/nurbs/Patch.java     |    2 +-
 .../classes/jogamp/opengl/glu/nurbs/Patchlist.java |   14 +-
 .../classes/jogamp/opengl/glu/nurbs/Quilt.java     |    4 +-
 .../classes/jogamp/opengl/glu/nurbs/README.txt     |  110 +-
 .../jogamp/opengl/glu/nurbs/Subdivider.java        |   52 +-
 .../opengl/glu/tessellator/ActiveRegion.java       |   14 +-
 .../jogamp/opengl/glu/tessellator/GLUface.java     |   14 +-
 .../jogamp/opengl/glu/tessellator/GLUhalfEdge.java |   16 +-
 .../jogamp/opengl/glu/tessellator/GLUmesh.java     |    8 +-
 .../opengl/glu/tessellator/GLUtessellatorImpl.java |   50 +-
 .../jogamp/opengl/glu/tessellator/GLUvertex.java   |   14 +-
 .../jogamp/opengl/glu/tessellator/Mesh.java        |    8 +-
 .../jogamp/opengl/glu/tessellator/Normal.java      |    4 +-
 .../opengl/glu/tessellator/PriorityQHeap.java      |    4 +-
 .../opengl/glu/tessellator/PriorityQSort.java      |    6 +-
 .../jogamp/opengl/glu/tessellator/Render.java      |    6 +-
 .../jogamp/opengl/glu/tessellator/Sweep.java       |   30 +-
 .../jogamp/opengl/macosx/cgl/MacOSXCGLContext.java |   50 +-
 .../macosx/cgl/MacOSXCGLDrawableFactory.java       |   13 +-
 .../cgl/MacOSXCGLDynamicLibraryBundleInfo.java     |   29 +-
 .../macosx/cgl/MacOSXExternalCGLContext.java       |    2 +-
 .../macosx/cgl/MacOSXOffscreenCGLContext.java      |    2 +-
 .../opengl/macosx/cgl/MacOSXPbufferCGLContext.java |    4 +-
 .../macosx/cgl/awt/MacOSXJava2DCGLContext.java     |    2 +-
 .../classes/jogamp/opengl/util/GLArrayHandler.java |   69 +
 .../opengl/util/GLArrayHandlerInterleaved.java     |   92 +
 .../jogamp/opengl/util/GLDataArrayHandler.java     |   78 +
 .../jogamp/opengl/util/GLFixedArrayHandler.java    |   98 +
 .../opengl/util/GLFixedArrayHandlerFlat.java       |   83 +
 .../jogamp/opengl/util/glsl/GLSLArrayHandler.java  |  115 +
 .../opengl/util/glsl/GLSLArrayHandlerFlat.java     |   72 +
 .../opengl/util/glsl/fixedfunc/FixedFuncHook.java  |   55 +-
 .../util/glsl/fixedfunc/FixedFuncPipeline.java     |  175 +-
 .../glsl/fixedfunc/shaders/FixedFuncColorLight.vp  |    4 +-
 .../util/glsl/fixedfunc/shaders/mgl_attribute.glsl |    2 +-
 .../util/glsl/fixedfunc/shaders/mgl_uniform.glsl   |    3 +-
 .../opengl/windows/wgl/WGLGLCapabilities.java      |   15 +-
 .../windows/wgl/WindowsExternalWGLContext.java     |    5 +-
 .../windows/wgl/WindowsExternalWGLDrawable.java    |    2 +-
 .../opengl/windows/wgl/WindowsWGLContext.java      |  146 +-
 .../windows/wgl/WindowsWGLDrawableFactory.java     |   75 +-
 .../wgl/WindowsWGLDynamicLibraryBundleInfo.java    |   21 +-
 .../wgl/WindowsWGLGraphicsConfiguration.java       |  134 +-
 .../WindowsWGLGraphicsConfigurationFactory.java    |  124 +-
 .../opengl/x11/glx/X11ExternalGLXContext.java      |   17 +-
 .../jogamp/opengl/x11/glx/X11GLCapabilities.java   |   10 +-
 .../jogamp/opengl/x11/glx/X11GLXContext.java       |  232 +-
 .../opengl/x11/glx/X11GLXDrawableFactory.java      |   74 +-
 .../x11/glx/X11GLXDynamicLibraryBundleInfo.java    |   34 +-
 .../x11/glx/X11GLXGraphicsConfiguration.java       |   55 +-
 .../glx/X11GLXGraphicsConfigurationFactory.java    |   31 +-
 .../opengl/x11/glx/X11OnscreenGLXDrawable.java     |    6 +-
 .../awt/X11AWTGLXGraphicsConfigurationFactory.java |   22 +-
 src/jogl/native/GLDebugMessageHandler.c            |  206 ++
 src/jogl/native/JoglCommon.c                       |   55 +
 src/jogl/native/JoglCommon.h                       |   15 +
 src/jogl/native/macosx/ContextUpdater.h            |    8 +-
 src/jogl/native/macosx/ContextUpdater.m            |   74 +-
 .../native/macosx/MacOSXWindowSystemInterface.m    |  697 +++---
 src/jogl/native/openmax/omx_tool.c                 |   12 +-
 src/jogl/native/openmax/omx_tool.h                 |   19 +-
 .../javax/media/nativewindow/Capabilities.java     |   66 +-
 .../media/nativewindow/CapabilitiesImmutable.java  |    5 +-
 .../nativewindow/DefaultCapabilitiesChooser.java   |    7 +-
 .../javax/media/nativewindow/NativeSurface.java    |   10 +-
 .../javax/media/nativewindow/NativeWindow.java     |   38 +-
 .../media/nativewindow/NativeWindowFactory.java    |  137 +-
 .../javax/media/nativewindow/ProxySurface.java     |   11 +-
 .../javax/media/nativewindow/util/Dimension.java   |    6 +-
 .../nativewindow/util/DimensionImmutable.java      |   57 +
 .../media/nativewindow/util/DimensionReadOnly.java |   55 -
 .../javax/media/nativewindow/util/Insets.java      |  165 +-
 .../media/nativewindow/util/InsetsImmutable.java   |   66 +
 .../javax/media/nativewindow/util/Point.java       |   10 +-
 .../media/nativewindow/util/PointImmutable.java    |   52 +
 .../media/nativewindow/util/PointReadOnly.java     |   50 -
 .../javax/media/nativewindow/util/Rectangle.java   |   16 +-
 .../nativewindow/util/RectangleImmutable.java      |   56 +
 .../media/nativewindow/util/RectangleReadOnly.java |   54 -
 .../javax/media/nativewindow/util/SurfaceSize.java |   18 +-
 .../jogamp/nativewindow/NWJNILibLoader.java        |   10 +-
 .../nativewindow/NativeWindowFactoryImpl.java      |   11 +-
 .../jogamp/nativewindow/NullToolkitLock.java       |    6 +-
 .../jogamp/nativewindow/jawt/JAWTJNILibLoader.java |    2 +-
 .../classes/jogamp/nativewindow/jawt/JAWTUtil.java |    5 +-
 .../jogamp/nativewindow/jawt/JAWTWindow.java       |   73 +-
 .../nativewindow/jawt/macosx/MacOSXJAWTWindow.java |   13 +-
 .../jogamp/nativewindow/macosx/OSXUtil.java        |   39 +
 .../classes/jogamp/nativewindow/x11/X11Util.java   |  207 +-
 src/nativewindow/native/macosx/OSXmisc.c           |  106 +
 src/nativewindow/native/windows/GDImisc.c          |   18 +-
 src/nativewindow/native/windows/WindowsDWM.c       |   95 +
 src/nativewindow/native/windows/WindowsDWM.h       |   32 +
 src/nativewindow/native/x11/XineramaHelper.c       |   19 +-
 src/nativewindow/native/x11/Xmisc.c                |   83 +-
 src/newt/classes/com/jogamp/newt/Display.java      |   12 +-
 src/newt/classes/com/jogamp/newt/NewtFactory.java  |   22 +-
 src/newt/classes/com/jogamp/newt/Screen.java       |   10 +-
 src/newt/classes/com/jogamp/newt/ScreenMode.java   |   37 +-
 src/newt/classes/com/jogamp/newt/Window.java       |  150 +-
 .../classes/com/jogamp/newt/awt/NewtCanvasAWT.java |   40 +-
 .../com/jogamp/newt/awt/NewtFactoryAWT.java        |   73 -
 .../jogamp/newt/awt/applet/JOGLNewtApplet1Run.java |  177 ++
 .../jogamp/newt/awt/applet/JOGLNewtAppletBase.java |  244 ++
 .../classes/com/jogamp/newt/event/InputEvent.java  |   26 +-
 .../classes/com/jogamp/newt/event/KeyEvent.java    |    4 +-
 .../classes/com/jogamp/newt/event/MouseEvent.java  |  196 +-
 .../classes/com/jogamp/newt/event/NEWTEvent.java   |    6 +-
 .../com/jogamp/newt/event/WindowUpdateEvent.java   |    2 +-
 .../com/jogamp/newt/event/awt/AWTAdapter.java      |    8 +
 .../com/jogamp/newt/event/awt/AWTKeyAdapter.java   |    2 +
 .../com/jogamp/newt/event/awt/AWTMouseAdapter.java |    2 +
 .../jogamp/newt/event/awt/AWTNewtEventFactory.java |  146 --
 .../newt/event/awt/AWTParentWindowAdapter.java     |  130 -
 .../jogamp/newt/event/awt/AWTWindowAdapter.java    |    2 +
 .../classes/com/jogamp/newt/opengl/GLWindow.java   |  247 +-
 .../classes/com/jogamp/newt/util/MainThread.java   |  300 +--
 .../classes/com/jogamp/newt/util/MonitorMode.java  |   18 +-
 .../com/jogamp/newt/util/ScreenModeUtil.java       |  101 +-
 src/newt/classes/jogamp/newt/DefaultEDTUtil.java   |   74 +-
 src/newt/classes/jogamp/newt/DisplayImpl.java      |   79 +-
 src/newt/classes/jogamp/newt/NEWTJNILibLoader.java |   15 +-
 src/newt/classes/jogamp/newt/OffscreenWindow.java  |   32 +-
 src/newt/classes/jogamp/newt/ScreenImpl.java       |  171 +-
 src/newt/classes/jogamp/newt/ScreenModeStatus.java |   39 +-
 src/newt/classes/jogamp/newt/WindowImpl.java       | 1019 ++++----
 src/newt/classes/jogamp/newt/awt/AWTCanvas.java    |  312 ---
 src/newt/classes/jogamp/newt/awt/AWTDisplay.java   |   67 -
 src/newt/classes/jogamp/newt/awt/AWTEDTUtil.java   |  108 -
 src/newt/classes/jogamp/newt/awt/AWTScreen.java    |   65 -
 src/newt/classes/jogamp/newt/awt/AWTWindow.java    |  244 --
 .../jogamp/newt/awt/event/AWTNewtEventFactory.java |  146 ++
 .../newt/awt/event/AWTParentWindowAdapter.java     |  129 +
 .../jogamp/newt/awt/event/NewtFactoryAWT.java      |   73 +
 .../jogamp/newt/awt/opengl/VersionApplet.java      |  174 --
 .../jogamp/newt/driver/android/AndroidDisplay.java |   79 +
 .../jogamp/newt/driver/android/AndroidScreen.java  |  124 +
 .../jogamp/newt/driver/android/AndroidWindow.java  |  412 ++++
 .../classes/jogamp/newt/driver/android/MD.java     |   65 +
 .../newt/driver/android/NewtBaseActivity.java      |  168 ++
 .../newt/driver/android/NewtVersionActivity.java   |   59 +
 .../android/event/AndroidNewtEventFactory.java     |  215 ++
 .../classes/jogamp/newt/driver/awt/AWTCanvas.java  |  312 +++
 .../classes/jogamp/newt/driver/awt/AWTDisplay.java |   67 +
 .../classes/jogamp/newt/driver/awt/AWTEDTUtil.java |  143 ++
 .../classes/jogamp/newt/driver/awt/AWTScreen.java  |   65 +
 .../classes/jogamp/newt/driver/awt/AWTWindow.java  |  245 ++
 .../jogamp/newt/driver/broadcom/egl/Display.java   |   81 +
 .../jogamp/newt/driver/broadcom/egl/Screen.java    |   62 +
 .../jogamp/newt/driver/broadcom/egl/Window.java    |  166 ++
 .../jogamp/newt/driver/intel/gdl/Display.java      |  104 +
 .../jogamp/newt/driver/intel/gdl/Screen.java       |   68 +
 .../jogamp/newt/driver/intel/gdl/Window.java       |  152 ++
 .../classes/jogamp/newt/driver/kd/KDDisplay.java   |   84 +
 .../classes/jogamp/newt/driver/kd/KDScreen.java    |   57 +
 .../classes/jogamp/newt/driver/kd/KDWindow.java    |  156 ++
 .../jogamp/newt/driver/macosx/MacDisplay.java      |   79 +
 .../jogamp/newt/driver/macosx/MacScreen.java       |   57 +
 .../jogamp/newt/driver/macosx/MacWindow.java       |  444 ++++
 .../jogamp/newt/driver/windows/WindowsDisplay.java |   94 +
 .../jogamp/newt/driver/windows/WindowsScreen.java  |  114 +
 .../jogamp/newt/driver/windows/WindowsWindow.java  |  214 ++
 .../classes/jogamp/newt/driver/x11/X11Display.java |  152 ++
 .../classes/jogamp/newt/driver/x11/X11Screen.java  |  301 +++
 .../classes/jogamp/newt/driver/x11/X11Window.java  |  173 ++
 .../classes/jogamp/newt/intel/gdl/Display.java     |  104 -
 src/newt/classes/jogamp/newt/intel/gdl/Screen.java |   68 -
 src/newt/classes/jogamp/newt/intel/gdl/Window.java |  148 --
 .../classes/jogamp/newt/macosx/MacDisplay.java     |  100 -
 src/newt/classes/jogamp/newt/macosx/MacScreen.java |   57 -
 src/newt/classes/jogamp/newt/macosx/MacWindow.java |  439 ----
 .../jogamp/newt/opengl/broadcom/egl/Display.java   |   81 -
 .../jogamp/newt/opengl/broadcom/egl/Screen.java    |   62 -
 .../jogamp/newt/opengl/broadcom/egl/Window.java    |  165 --
 .../classes/jogamp/newt/opengl/kd/KDDisplay.java   |   84 -
 .../classes/jogamp/newt/opengl/kd/KDScreen.java    |   58 -
 .../classes/jogamp/newt/opengl/kd/KDWindow.java    |  148 --
 .../jogamp/newt/windows/WindowsDisplay.java        |   94 -
 .../classes/jogamp/newt/windows/WindowsScreen.java |  114 -
 .../classes/jogamp/newt/windows/WindowsWindow.java |  209 --
 src/newt/classes/jogamp/newt/x11/X11Display.java   |  114 -
 src/newt/classes/jogamp/newt/x11/X11Screen.java    |  270 ---
 src/newt/classes/jogamp/newt/x11/X11Window.java    |  146 --
 src/newt/native/AndroidWindow.c                    |   81 +
 src/newt/native/BroadcomEGL.c                      |   22 +-
 src/newt/native/IntelGDL.c                         |   26 +-
 src/newt/native/KDWindow.c                         |   54 +-
 src/newt/native/MacWindow.m                        |  339 +--
 src/newt/native/NewtCommon.c                       |   31 +-
 src/newt/native/NewtCommon.h                       |    2 +
 src/newt/native/NewtMacWindow.h                    |   24 +-
 src/newt/native/NewtMacWindow.m                    |  237 +-
 src/newt/native/Window.h                           |   30 +
 src/newt/native/WindowsWindow.c                    |  350 ++-
 src/newt/native/X11Window.c                        |  951 +++++---
 .../opengl/test/android/NEWTElektronActivity.java  |   77 +
 .../opengl/test/android/NEWTGearsES1Activity.java  |   73 +
 .../opengl/test/android/NEWTGearsES2Activity.java  |   74 +
 .../test/android/NEWTGearsES2TransActivity.java    |   77 +
 .../opengl/test/android/NEWTGraphUI1pActivity.java |   77 +
 .../opengl/test/android/NEWTGraphUI2pActivity.java |   78 +
 .../test/android/NEWTRedSquareES1Activity.java     |   73 +
 .../test/android/NEWTRedSquareES2Activity.java     |   74 +
 .../opengl/test/bugs/Bug427GLJPanelTest1.java      |    6 +-
 .../com/jogamp/opengl/test/bugs/Issue326Test1.java |   20 +-
 .../com/jogamp/opengl/test/bugs/Issue326Test2.java |   14 +-
 .../com/jogamp/opengl/test/bugs/Issue344Base.java  |    4 +-
 .../test/junit/graph/TestRegionRendererNEWT01.java |  190 ++
 .../test/junit/graph/TestTextRendererNEWT01.java   |  175 ++
 .../junit/graph/demos/GPURegionGLListener01.java   |  126 +
 .../junit/graph/demos/GPURegionGLListener02.java   |  125 +
 .../junit/graph/demos/GPURegionNewtDemo01.java     |   99 +
 .../junit/graph/demos/GPURegionNewtDemo02.java     |   94 +
 .../demos/GPURegionRendererListenerBase01.java     |   52 +
 .../graph/demos/GPURendererListenerBase01.java     |  297 +++
 .../junit/graph/demos/GPUTextGLListener0A.java     |   77 +
 .../test/junit/graph/demos/GPUTextNewtDemo01.java  |   91 +
 .../test/junit/graph/demos/GPUTextNewtDemo02.java  |  100 +
 .../graph/demos/GPUTextRendererListenerBase01.java |  292 +++
 .../junit/graph/demos/GPUUISceneGLListener0A.java  |  408 ++++
 .../junit/graph/demos/GPUUISceneNewtDemo01.java    |   49 +
 .../junit/graph/demos/GPUUISceneNewtDemo02.java    |   50 +
 .../opengl/test/junit/graph/demos/MSAATool.java    |   69 +
 .../opengl/test/junit/graph/demos/ui/Label.java    |  106 +
 .../opengl/test/junit/graph/demos/ui/RIButton.java |  271 +++
 .../junit/graph/demos/ui/SceneUIController.java    |  261 ++
 .../test/junit/graph/demos/ui/UIGLListener01.java  |  123 +
 .../junit/graph/demos/ui/UIListenerBase01.java     |  322 +++
 .../test/junit/graph/demos/ui/UINewtDemo01.java    |   96 +
 .../opengl/test/junit/graph/demos/ui/UIShape.java  |  130 +
 .../test/junit/graph/demos/ui/UITextShape.java     |   37 +
 .../test/junit/graph/demos/ui/opengl/UIRegion.java |   77 +
 .../test/junit/jogl/acore/TestGLDebug00NEWT.java   |  235 ++
 .../test/junit/jogl/acore/TestGLDebug01NEWT.java   |  195 ++
 .../jogl/acore/TestGLExtensionQueryOffscreen.java  |   96 +
 .../test/junit/jogl/acore/TestGLProfile01NEWT.java |   68 +-
 .../test/junit/jogl/acore/TestGPUMemSec01NEWT.java |  324 +++
 .../test/junit/jogl/acore/TestMapBuffer01NEWT.java |  111 +
 .../test/junit/jogl/acore/TestNVSwapGroupNEWT.java |  140 ++
 .../junit/jogl/acore/TestSharedContextListAWT.java |   55 +-
 .../jogl/acore/TestSharedContextListNEWT.java      |   34 +-
 .../jogl/acore/TestSharedContextVBOES1NEWT.java    |  146 ++
 .../jogl/acore/TestSharedContextVBOES2NEWT.java    |  146 ++
 .../opengl/test/junit/jogl/awt/TestAWT01GLn.java   |    5 +-
 .../junit/jogl/awt/TestAWT02WindowClosing.java     |    5 -
 .../jogl/awt/TestAWT03GLCanvasRecreate01.java      |    6 +-
 .../junit/jogl/awt/TestBug460GLCanvasNPEAWT.java   |   56 +
 .../test/junit/jogl/awt/TestSwingAWT01GLn.java     |   10 +-
 .../TestAWTTextRendererUseVertexArrayBug464.java   |   52 +-
 .../awt/text/TextRendererGLEventListener01.java    |   36 +-
 .../jogl/awt/text/TextRendererTraceGL2Mock01.java  |  140 +-
 .../test/junit/jogl/caps/TestMultisampleNEWT.java  |    3 +-
 .../test/junit/jogl/caps/TestTranslucencyNEWT.java |  155 ++
 .../opengl/test/junit/jogl/demos/GearsObject.java  |  275 +++
 .../opengl/test/junit/jogl/demos/es1/GearsES1.java |  266 +++
 .../test/junit/jogl/demos/es1/GearsObjectES1.java  |   80 +
 .../test/junit/jogl/demos/es1/RedSquare.java       |  169 --
 .../test/junit/jogl/demos/es1/RedSquareES1.java    |  162 ++
 .../jogl/demos/es1/newt/TestGearsES1NEWT.java      |  136 ++
 .../jogl/demos/es1/newt/TestRedSquareES1NEWT.java  |  136 ++
 .../jogl/demos/es2/ElektronenMultiplizierer.java   |  538 +++++
 .../opengl/test/junit/jogl/demos/es2/GearsES2.java |  300 +++
 .../test/junit/jogl/demos/es2/GearsObjectES2.java  |  107 +
 .../test/junit/jogl/demos/es2/RedSquare0.java      |  198 --
 .../test/junit/jogl/demos/es2/RedSquareES2.java    |  211 ++
 .../es2/newt/TestElektronenMultipliziererNEWT.java |  151 ++
 .../jogl/demos/es2/newt/TestGearsES2NEWT.java      |  174 ++
 .../jogl/demos/es2/newt/TestRedSquareES2NEWT.java  |  136 ++
 .../junit/jogl/demos/es2/shader/RedSquareShader.fp |   23 +
 .../jogl/demos/es2/shader/RedSquareShader.java     |   27 +-
 .../junit/jogl/demos/es2/shader/RedSquareShader.vp |   27 +
 .../jogl/demos/es2/shader/RedSquareShader2.fp      |   26 +
 .../test/junit/jogl/demos/es2/shader/default.vp    |   19 +
 .../shader/elektronenmultiplizierer_development.fp |  379 +++
 .../es2/shader/elektronenmultiplizierer_port.fp    |  234 ++
 .../test/junit/jogl/demos/es2/shader/fbo-mrt-1.fp  |   11 +
 .../test/junit/jogl/demos/es2/shader/fbo-mrt-1.vp  |   16 +
 .../test/junit/jogl/demos/es2/shader/fbo-mrt-2.fp  |   16 +
 .../test/junit/jogl/demos/es2/shader/fbo-mrt-2.vp  |   18 +
 .../test/junit/jogl/demos/es2/shader/gears.fp      |   47 +
 .../test/junit/jogl/demos/es2/shader/gears.vp      |   44 +
 .../test/junit/jogl/demos/es2/shader/ruler.fp      |   26 +
 .../opengl/test/junit/jogl/demos/gl2/Gears.java    |  387 +++
 .../test/junit/jogl/demos/gl2/OneTriangle.java     |   69 +
 .../junit/jogl/demos/gl2/awt/TestGearsAWT.java     |  124 +
 .../jogl/demos/gl2/awt/TestGearsGLJPanelAWT.java   |  132 ++
 .../demos/gl2/awt/TestGearsGLJPanelAWTBug450.java  |  164 ++
 .../test/junit/jogl/demos/gl2/gears/Gears.java     |  371 ---
 .../junit/jogl/demos/gl2/gears/TestGearsAWT.java   |  122 -
 .../jogl/demos/gl2/gears/TestGearsGLJPanelAWT.java |  130 -
 .../gl2/gears/TestGearsGLJPanelAWTBug450.java      |  163 --
 .../jogl/demos/gl2/gears/newt/TestGearsNEWT.java   |  130 -
 .../gl2/gears/newt/TestGearsNewtAWTWrapper.java    |  112 -
 .../junit/jogl/demos/gl2/newt/TestGearsNEWT.java   |  133 ++
 .../demos/gl2/newt/TestGearsNewtAWTWrapper.java    |  113 +
 .../junit/jogl/drawable/TestDrawable01NEWT.java    |    2 +-
 .../test/junit/jogl/glsl/GLSLMiscHelper.java       |  198 ++
 .../test/junit/jogl/glsl/TestFBOMRTNEWT01.java     |  230 ++
 .../junit/jogl/glsl/TestGLSLShaderState01NEWT.java |  408 ++++
 .../junit/jogl/glsl/TestGLSLShaderState02NEWT.java |  390 +++
 .../test/junit/jogl/glsl/TestGLSLSimple01NEWT.java |    8 +-
 .../test/junit/jogl/glsl/TestRulerNEWT01.java      |  172 ++
 .../jogl/glsl/TestShaderCompilationBug459AWT.java  |   31 +-
 .../TestTransformFeedbackVaryingsBug407NEWT.java   |    6 +-
 .../jogl/glu/TestBug463ScaleImageMemoryAWT.java    |   51 +-
 ...TestSwingAWTRobotUsageBeforeJOGLInitBug411.java |   35 +-
 .../test/junit/jogl/offscreen/ReadBuffer2File.java |    5 +-
 .../junit/jogl/offscreen/ReadBuffer2Screen.java    |   22 +-
 .../test/junit/jogl/offscreen/ReadBufferBase.java  |   11 +-
 .../test/junit/jogl/offscreen/ReadBufferUtil.java  |  107 -
 .../test/junit/jogl/offscreen/Surface2File.java    |   12 +-
 .../offscreen/TestOffscreen01GLPBufferNEWT.java    |   23 +-
 .../jogl/offscreen/TestOffscreen02BitmapNEWT.java  |   18 +-
 .../test/junit/jogl/offscreen/WindowUtilNEWT.java  |    2 +-
 .../opengl/test/junit/jogl/swt/OneTriangle.java    |   71 -
 .../opengl/test/junit/jogl/swt/TestSWT01GLn.java   |    7 +-
 .../opengl/test/junit/jogl/swt/TestSWT02GLn.java   |    7 +-
 .../test/junit/jogl/swt/TestSWTAWT01GLn.java       |   18 +-
 .../texture/TestGrayTextureFromFileAWTBug417.java  |   23 +-
 .../test/junit/jogl/texture/TestTexture01AWT.java  |   24 +-
 .../util/texture/gl2/TextureGL2ListenerDraw1.java  |    8 +-
 .../test/junit/newt/ManualScreenMode03NEWT.java    |  110 +
 .../junit/newt/TestDisplayLifecycle01NEWT.java     |   55 +-
 .../junit/newt/TestDisplayLifecycle02NEWT.java     |   86 +-
 .../test/junit/newt/TestEventSourceNotAWTBug.java  |   11 +-
 .../test/junit/newt/TestFocus01SwingAWTRobot.java  |   65 +-
 .../test/junit/newt/TestFocus02SwingAWTRobot.java  |  137 +-
 .../test/junit/newt/TestGLWindows00NEWT.java       |   11 +-
 .../test/junit/newt/TestGLWindows01NEWT.java       |   27 +-
 .../junit/newt/TestGLWindows02NEWTAnimated.java    |   68 +-
 .../test/junit/newt/TestListenerCom01AWT.java      |   24 +-
 .../test/junit/newt/TestRemoteGLWindows01NEWT.java |   14 +-
 .../test/junit/newt/TestScreenMode00NEWT.java      |   24 +-
 .../test/junit/newt/TestScreenMode00bNEWT.java     |  124 +
 .../test/junit/newt/TestScreenMode01NEWT.java      |  130 +-
 .../test/junit/newt/TestScreenMode01bNEWT.java     |  190 ++
 .../test/junit/newt/TestScreenMode02NEWT.java      |   25 +-
 .../junit/newt/TestWindowClosingProtocol01AWT.java |    9 +-
 .../newt/TestWindowClosingProtocol02NEWT.java      |    7 +-
 .../newt/TestWindowClosingProtocol03NewtAWT.java   |   38 +-
 .../opengl/test/junit/newt/TestWindows01NEWT.java  |  158 +-
 .../test/junit/newt/parenting/GLRunnableDummy.java |   11 +-
 .../parenting/NewtAWTReparentingKeyAdapter.java    |   95 +
 .../junit/newt/parenting/TestParenting01NEWT.java  |  178 +-
 .../junit/newt/parenting/TestParenting01aAWT.java  |   99 +-
 .../junit/newt/parenting/TestParenting01bAWT.java  |   52 +-
 .../junit/newt/parenting/TestParenting01cAWT.java  |   43 +-
 .../newt/parenting/TestParenting01cSwingAWT.java   |  116 +-
 .../junit/newt/parenting/TestParenting02AWT.java   |   76 +-
 .../junit/newt/parenting/TestParenting02NEWT.java  |   23 +-
 .../junit/newt/parenting/TestParenting03AWT.java   |   25 +-
 .../junit/newt/parenting/TestParenting03bAWT.java  |   83 +-
 .../opengl/test/junit/util/AWTFocusAdapter.java    |   17 +-
 .../opengl/test/junit/util/AWTKeyAdapter.java      |   22 +-
 .../opengl/test/junit/util/AWTMouseAdapter.java    |   26 +-
 .../opengl/test/junit/util/AWTRobotUtil.java       |  288 ++-
 .../opengl/test/junit/util/EventCountAdapter.java  |    2 -
 .../test/junit/util/FocusEventCountAdapter.java    |   34 +
 .../opengl/test/junit/util/GLSLSimpleProgram.java  |   10 +
 .../test/junit/util/InputEventCountAdapter.java    |   35 +
 .../opengl/test/junit/util/NEWTFocusAdapter.java   |   27 +-
 .../opengl/test/junit/util/NEWTGLContext.java      |  141 ++
 .../opengl/test/junit/util/NEWTKeyAdapter.java     |   20 +-
 .../opengl/test/junit/util/NEWTMouseAdapter.java   |   20 +-
 .../jogamp/opengl/test/junit/util/QuitAdapter.java |    4 +-
 .../opengl/test/junit/util/SingletonInstance.java  |  143 --
 .../jogamp/opengl/test/junit/util/UITestCase.java  |   42 +-
 tools/jackpotc/.gitignore                          |    1 -
 tools/jackpotc/test/oldgears/.gitignore            |    4 -
 www/index.html                                     |   32 +-
 ...-demoscene-elektronenmultiplizierer01-small.png |  Bin 0 -> 46454 bytes
 ...applet-demoscene-elektronenmultiplizierer01.png |  Bin 0 -> 410998 bytes
 www/media/jogl-applet-gearses2-normal-small.png    |  Bin 0 -> 6523 bytes
 www/media/jogl-applet-gearses2-normal.png          |  Bin 0 -> 69330 bytes
 .../jogl-applet-gearses2-translucent-small.png     |  Bin 0 -> 28387 bytes
 www/media/jogl-applet-gearses2-translucent.png     |  Bin 0 -> 72883 bytes
 www/media/jogl-applet-graph-text01-small.png       |  Bin 0 -> 13499 bytes
 www/media/jogl-applet-graph-text01.png             |  Bin 0 -> 103995 bytes
 www/media/jogl-applet-graph-uiscene01-small.png    |  Bin 0 -> 17151 bytes
 www/media/jogl-applet-graph-uiscene01.png          |  Bin 0 -> 106628 bytes
 www/media/jogl-applet-version-small.png            |  Bin 0 -> 21426 bytes
 www/media/jogl-applet-version.png                  |  Bin 0 -> 121630 bytes
 930 files changed, 64509 insertions(+), 29576 deletions(-)

diff --git a/.classpath b/.classpath
index a37a338..3a9a469 100644
--- a/.classpath
+++ b/.classpath
@@ -26,10 +26,12 @@
 			<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="jogl/build/newt/obj"/>
 		</attributes>
 	</classpathentry>
+	<classpathentry kind="src" path="src/android"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
 	<classpathentry combineaccessrules="false" kind="src" path="/gluegen"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Ant"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/SWT"/>
+	<classpathentry kind="lib" path="/gluegen/make/lib/android-sdk/9/android.jar" sourcepath="/gluegen/make/lib/android-sdk/9/android-java-src.zip"/>
 	<classpathentry kind="output" path="build/eclipse-classes"/>
 </classpath>
diff --git a/.externalToolBuilders/jogl builder.launch b/.externalToolBuilders/jogl builder.launch
index eab22e8..6c3ea63 100644
--- a/.externalToolBuilders/jogl builder.launch	
+++ b/.externalToolBuilders/jogl builder.launch	
@@ -7,9 +7,19 @@
 <booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
 <booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
 <stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${project}"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/jogl"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="4"/>
+</listAttribute>
 <booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
+<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
+<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<runtimeClasspathEntry containerPath="org.eclipse.jdt.launching.JRE_CONTAINER" path="1" type="4"/>
"/>
+<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<runtimeClasspathEntry id="org.eclipse.ant.ui.classpathentry.extraClasspathEntries">
<memento/>
</runtimeClasspathEntry>
"/>
+</listAttribute>
 <stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
-<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/>
+<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
 <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="jogl"/>
 <stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/jogl/make/build.xml}"/>
 <stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,auto,clean"/>
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index 6e3af64..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,6 +0,0 @@
-build
-javadoc_public
-build-temp
-make/temp*
-.idea/workspace.xml
-**~
\ No newline at end of file
diff --git a/.htaccess b/.htaccess
deleted file mode 100644
index a947f3c..0000000
--- a/.htaccess
+++ /dev/null
@@ -1,7 +0,0 @@
-
-RewriteEngine On
-RewriteBase   /jogl
-
-RewriteRule ^$ www/ [R=301,L,NE]
-RewriteRule ^index\.html$ www/index.html [R=301,L,NE]
-
diff --git a/.project b/.project
index db143f4..17f842e 100644
--- a/.project
+++ b/.project
@@ -7,20 +7,20 @@
 	<buildSpec>
 		<buildCommand>
 			<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
+			<triggers>full,incremental,</triggers>
 			<arguments>
 				<dictionary>
 					<key>LaunchConfigHandle</key>
-					<value><project>/.externalToolBuilders/jogl builder.launch</value>
+					<value><project>/.externalToolBuilders/org.eclipse.jdt.core.javabuilder.launch</value>
 				</dictionary>
 			</arguments>
 		</buildCommand>
 		<buildCommand>
 			<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
-			<triggers>full,incremental,</triggers>
 			<arguments>
 				<dictionary>
 					<key>LaunchConfigHandle</key>
-					<value><project>/.externalToolBuilders/org.eclipse.jdt.core.javabuilder.launch</value>
+					<value><project>/.externalToolBuilders/jogl builder.launch</value>
 				</dictionary>
 			</arguments>
 		</buildCommand>
diff --git a/LICENSE.txt b/LICENSE.txt
index 9631a94..695e1dd 100644
--- a/LICENSE.txt
+++ b/LICENSE.txt
@@ -1,14 +1,12 @@
-JOGL as a whole may be used under the terms of the New BSD 3-clause license,
-which is the common denominator of the following used 5 BSD licenses L.1 - L.5.
+The JOGL source code is mostly licensed under the New BSD 2-clause license,
+however it contains other licensed material as well.
 
-+++
-
-Additional licenses compatible with the BSD 3-clause license are listed below A.1 - A...
+Below you find a detailed list of licenses used in this project.
 
 +++
 
-Exception is the content of folder 'make/lib'.
-This folder contains build/test time only Java binaries (JAR) to ease the build setup.
+The content of folder 'make/lib' contains build- and test-time only 
+Java binaries (JAR) to ease the build setup.
 Each JAR file has it's corresponding LICENSE file containing the 
 source location and license text. None of these binaries are contained in any way 
 by the generated and deployed JOGL binaries.
@@ -46,7 +44,7 @@ L.1) The JOGL source tree contains code from the JogAmp Community
 
    You can address the JogAmp Community via:
        Web                http://jogamp.org/
-       Forum/Mailinglist  http://jogamp.762907.n3.nabble.com/
+       Forum/Mailinglist  http://forum.jogamp.org
        JogAmp Channel     server: conference.jabber.org room: jogamp
        Repository         http://jogamp.org/git/
        Email              mediastream _at_ jogamp _dot_ org
@@ -102,6 +100,8 @@ L.3) The JOGL source tree contains code ported from the OpenGL sample
    Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
    
    http://oss.sgi.com/projects/FreeB
+   http://oss.sgi.com/projects/FreeB/SGIFreeSWLicB.2.0.pdf
+   Or within this repository: doc/licenses/SGIFreeSWLicB.2.0.pdf
    
    Note that, as provided in the License, the Software is distributed on an
    "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
@@ -180,7 +180,13 @@ L.5) The JOGL source tree also contains a Java port of Brian Paul's Tile
 A.1) The JOGL source tree also contains header files from Khronos,
      reflecting OpenKODE, EGL, OpenGL ES1, OpenGL ES2 and OpenGL.
 
-     http://www.khronos.org/legal/license/
+   http://www.khronos.org/legal/license/
+
+   Files:
+     make/stub_includes/opengl/**
+     make/stub_includes/egl/**
+     make/stub_includes/khr/**
+     make/stub_includes/openmax/**
 
    Copyright (c) 2007-2010 The Khronos Group Inc.
     
@@ -204,3 +210,129 @@ A.1) The JOGL source tree also contains header files from Khronos,
    MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
 
 
+A.2) The JOGL source tree contains code from The Apache Software Foundation
+     which is covered by the Apache License Version 2.0
+
+   Apache Harmony - Open Source Java SE
+   =====================================
+
+   <http://harmony.apache.org/>
+
+   Author: The Apache Software Foundation (http://www.apache.org/).
+
+   Copyright 2006, 2010 The Apache Software Foundation.
+
+   Apache License Version 2.0, January 2004
+   http://www.apache.org/licenses/LICENSE-2.0
+   Or within this repository: doc/licenses/Apache.LICENSE-2.0
+
+   Files:
+    src/jogamp/graph/geom/plane/AffineTransform.java
+    src/jogamp/graph/geom/plane/IllegalPathStateException.java
+    src/jogamp/graph/geom/plane/NoninvertibleTransformException.java
+    src/jogamp/graph/geom/plane/PathIterator.java
+    src/jogamp/graph/geom/plane/Path2D.java
+    src/jogamp/graph/math/plane/Crossing.java
+    src/org/apache/harmony/misc/HashCode.java
+
+
+A.3) The JOGL source tree contains code from David Schweinsberg
+     which is covered by the Apache License Version 1.1 and Version 2.0
+
+   Typecast
+   ========
+
+   Typecast is a font development environment for OpenType font technology.
+
+   <http://typecast.dev.java.net/>
+
+   Author: David Schweinsberg
+
+   Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+   Apache Licenses
+   http://www.apache.org/licenses/
+
+   Apache License Version 1.1
+   http://www.apache.org/licenses/LICENSE-1.1
+   Or within this repository: doc/licenses/Apache.LICENSE-1.1
+   Files:
+    src/jogl/classes/jogamp/graph/font/typecast/ot/*
+    src/jogl/classes/jogamp/graph/font/typecast/ot/table/*
+
+   Apache License Version 2.0
+   http://www.apache.org/licenses/LICENSE-2.0
+   Or within this repository: doc/licenses/Apache.LICENSE-2.0
+    src/jogl/classes/jogamp/graph/font/typecast/ot/*
+    src/jogl/classes/jogamp/graph/font/typecast/ot/mac/*
+    src/jogl/classes/jogamp/graph/font/typecast/ot/table/*
+    src/jogl/classes/jogamp/graph/font/typecast/tt/engine/*
+
+A.4) The JOGL source tree contains fonts from Ubuntu
+     which is covered by the UBUNTU FONT LICENCE Version 1.0
+
+   Ubunut Font Family
+   ==================
+
+   The Ubuntu Font Family are libre fonts funded by Canonical Ltd on behalf of the Ubuntu project. 
+
+   <http://font.ubuntu.com/>
+
+   Copyright 2010 Canonical Ltd.  
+   Licensed under the Ubuntu Font Licence 1.0
+
+   Author: Canonical Ltd., Dalton Maag
+
+   UBUNTU FONT LICENCE 
+   Version 1.0
+   http://font.ubuntu.com/ufl/ubuntu-font-licence-1.0.txt
+   Or within this repository: doc/licenses/ubuntu-font-licence-1.0.txt
+
+   Files:
+    src/jogamp/graph/font/fonts/ubuntu/*
+
+A.5) The JOGL source tree also contains header files from NVIDIA,
+     reflecting Cg.
+
+   Files:
+     make/stub_includes/cg/CG/**
+
+   Copyright (c) 2002, NVIDIA Corporation
+   
+   NVIDIA Corporation("NVIDIA") supplies this software to you in consideration 
+   of your agreement to the following terms, and your use, installation, 
+   modification or redistribution of this NVIDIA software constitutes 
+   acceptance of these terms.  If you do not agree with these terms, please do 
+   not use, install, modify or redistribute this NVIDIA software.
+   
+   In consideration of your agreement to abide by the following terms, and 
+   subject to these terms, NVIDIA grants you a personal, non-exclusive license,
+   under NVIDIA's copyrights in this original NVIDIA software (the "NVIDIA 
+   Software"), to use, reproduce, modify and redistribute the NVIDIA 
+   Software, with or without modifications, in source and/or binary forms; 
+   provided that if you redistribute the NVIDIA Software, you must retain the 
+   copyright notice of NVIDIA, this notice and the following text and 
+   disclaimers in all such redistributions of the NVIDIA Software. Neither the 
+   name, trademarks, service marks nor logos of NVIDIA Corporation may be used 
+   to endorse or promote products derived from the NVIDIA Software without 
+   specific prior written permission from NVIDIA.  Except as expressly stated 
+   in this notice, no other rights or licenses express or implied, are granted 
+   by NVIDIA herein, including but not limited to any patent rights that may be 
+   infringed by your derivative works or by other works in which the NVIDIA 
+   Software may be incorporated. No hardware is licensed hereunder. 
+   
+   THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT 
+   WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING 
+   WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, 
+   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR ITS USE AND OPERATION 
+   EITHER ALONE OR IN COMBINATION WITH OTHER PRODUCTS.
+   
+   IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL, 
+   EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOST 
+   PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
+   PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY OUT OF THE USE, 
+   REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE NVIDIA SOFTWARE, 
+   HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING 
+   NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF NVIDIA HAS BEEN ADVISED 
+   OF THE POSSIBILITY OF SUCH DAMAGE.
+   
diff --git a/README.txt b/README.txt
index 4ce55f7..0cf1417 100644
--- a/README.txt
+++ b/README.txt
@@ -21,7 +21,7 @@ Contact Us
 ---------------
 
 Web                http://jogamp.org/
-Forum/Mailinglist  http://jogamp.762907.n3.nabble.com/
+Forum/Mailinglist  http://forum.jogamp.org/
 JogAmp Channel     server: conference.jabber.org room: jogamp
 Repository         http://jogamp.org/git/
 Email              mediastream _at_ jogamp _dot_ org
@@ -38,6 +38,9 @@ of all of the individuals who have advanced the project.
 For sure we are not able to list all of them here.
 Please contact us if you like to be added to this list.
 
+This list can hardly cover all contributors and their contributions.
+You may like to check the author field of our SCM.
+
 (Chronological)
 
 Gerard Ziemski contributed the original port of JOGL to Mac OS X.
@@ -74,7 +77,12 @@ Java2D and JOGL in Java SE 6, and also co-authored the TextureIO
 subsystem.
 
 Sven Gothel refactored the windowing subsystem layer to be generic,
-introduced the support for multiple GL profiles, realized NEWT and more..
+introduced the support for multiple GL profiles, realized NEWT etc.
+Teamed up with Rami Santina, the new graph package was realized,
+exposing generic curve, text and UI support.
+
+Rami Santina researched and implemented the math behind the new 
+graph package [RSantina], etc.
 
 The following individuals made significant contributions to various
 areas of the project (Alphabetical):
@@ -84,10 +92,16 @@ Alban Cousini
 Athomas Goldberg
 Yuri Vladimir Gushchin
 Gregory Pierce
-Rami Santina
+Dominik Str�hlein (DemoscenePassivist)
+Wade Walker
 Carsten Weisse
 
 The JogAmp Community is grateful for the support of the
-javagaming.org community, from where dozens, if not hundreds, of
-individuals have contributed discussions, bug reports, bug fixes, and
-other forms of support.
+javagaming.org community and it's own JogAmp forum, 
+from where dozens, if not hundreds, of individuals have 
+contributed discussions, bug reports, bug fixes, and other forms of support.
+
++++
+
+[RSantina]: Resolution Independent NURBS Curve Rendering using Programmable Graphics Pipeline
+
diff --git a/REPOSITORIES.txt b/REPOSITORIES.txt
index fafd453..decf4b3 100644
--- a/REPOSITORIES.txt
+++ b/REPOSITORIES.txt
@@ -1 +1,5 @@
-test ..
+jogamp	 git://jogamp.org/srv/scm/jogl.git (fetch)
+sgothel	 git://github.com/sgothel/jogl.git (fetch)
+rsantina git://github.com/rsantina/jogl.git (fetch)
+wwalker	 git://github.com/WadeWalker/jogl.git (fetch)
+jausoft	 git://jausoft.com/srv/scm/jogl.git (fetch)
diff --git a/doc/HowToBuild.html b/doc/HowToBuild.html
index 6097c57..913eb13 100644
--- a/doc/HowToBuild.html
+++ b/doc/HowToBuild.html
@@ -90,6 +90,7 @@
                                         <li>libxxf86vm-dev</li>
                                         <li>libxinerama-dev</li>
                                         <li>libxrandr-dev</li>
+                                        <li>libxrender-dev</li>
                                         <li>Optional: Your card vendor's proprietary driver</li>
                                     </ul>
                                 </li>
@@ -117,6 +118,7 @@
                                         <li>libXxf86vm-devel</li>
                                         <li>libXinerama-devel</li>
                                         <li>libXrandr-devel</li>
+                                        <li>libXrender-devel</li>
                                         <li>Optional: Your card vendor's proprietary driver</li>
                                     </ul>
                                 </li>
@@ -171,13 +173,13 @@
                     <ol>
                         <li><b>Optain the source code</b> using git:
                             <ul>
-                                <li><a href="http://github.com/sgothel/gluegen">Gluegen Dev GIT Repo</a></li>
-                                <li><a href="http://github.com/sgothel/jogl">JOGL Dev GIT Repo</a></li>
+                                <li><a href="http://jogamp.org/git/?p=gluegen.git">Gluegen Dev GIT Repo</a></li>
+                                <li><a href="http://jogamp.org/git/?p=jogl.git">JOGL Dev GIT Repo</a></li>
                             </ul><br/>
                             It is crucial that you checkout the source code under a common root directory:
                             <pre>
-    /home/dude/projects/jogamp> git clone git://github.com/sgothel/gluegen.git  gluegen
-    /home/dude/projects/jogamp> git clone git://github.com/sgothel/jogl.git jogl
+    /home/dude/projects/jogamp> git clone git://jogamp.org/srv/scm/gluegen.git gluegen
+    /home/dude/projects/jogamp> git clone git://jogamp.org/srv/scm/jogl.git jogl
                             </pre>
                             Now you should have following directory structure:
                             <pre>
diff --git a/doc/Implementation/runtime-properties.txt b/doc/Implementation/runtime-properties.txt
index 0d9b0b1..9efd6ea 100644
--- a/doc/Implementation/runtime-properties.txt
+++ b/doc/Implementation/runtime-properties.txt
@@ -3,13 +3,14 @@
     jogamp.debug.JNILibLoader
     jogamp.debug.JVMUtil
     jogamp.debug.Lock
-    jogamp.debug.ReflectionUtil
     jogamp.debug.NativeLibrary
     jogamp.debug.NativeLibrary.Lookup
+    jogamp.debug.ReflectionUtil
     jogamp.debug.ProcAddressHelper
     jogamp.debug.ProcAddressHelper.prefix
 
 
+
 ../doc/Implementation/runtime-properties-temp/gluegen-rt.ipd.debug.txt
 ----------------------------------------
     jnlp.launcher.class
@@ -19,27 +20,33 @@
     sun.jnlp.applet.launcher
 
 
+
 ../doc/Implementation/runtime-properties-temp/jogl.debug.all.txt
 ----------------------------------------
     jogl.debug.Animator
     jogl.debug.BuildMipmap
     jogl.debug.CapabilitiesChooser
+    jogl.debug.DebugGL
     jogl.debug.EGL
     jogl.debug.GLCanvas
     jogl.debug.GLContext
+    jogl.debug.GLDebugMessageHandler
     jogl.debug.GLDrawable
     jogl.debug.GLJPanel
     jogl.debug.GLPipelineFactory
     jogl.debug.GLProfile
     jogl.debug.GLSLCode
-    jogl.debug.GLStateTracker
     jogl.debug.GLStatusTracker
+    jogl.debug.graph.curve
     jogl.debug.GraphicsConfiguration
     jogl.debug.Java2D
     jogl.debug.MacOSXPbufferCGLDrawable
     jogl.debug.Texture
     jogl.debug.TextureIO
     jogl.debug.Threading
+    jogl.debug.TraceGL
+    jogl.debug.Triangulation
+
 
 
 ../doc/Implementation/runtime-properties-temp/jogl.ipd.debug.txt
@@ -60,22 +67,27 @@
     jogl.texture.notexrect
 
 
+
 ../doc/Implementation/runtime-properties-temp/nativewindow.debug.txt
 ----------------------------------------
     nativewindow.debug.DefaultCapabilitiesChooser
     nativewindow.debug.GraphicsConfiguration
-    nativewindow.debug.    if(Debug.debugAll()) {
+    nativewindow.debug.GraphicsDevice
     nativewindow.debug.JAWT
     nativewindow.debug.NativeWindow
+    nativewindow.debug.RegisteredClass
     nativewindow.debug.X11Util
 
 
+
 ../doc/Implementation/runtime-properties-temp/nativewindow.ipd.debug.txt
 ----------------------------------------
     java.awt.headless
     nativewindow.debug.ToolkitLock.TraceLock
     nativewindow.debug.X11Util.TraceDisplayLifecycle
     nativewindow.ws.name
+    nativewindow.x11.mt-bug
+
 
 
 ../doc/Implementation/runtime-properties-temp/newt.debug.txt
@@ -90,13 +102,15 @@
     newt.debug.Window.WindowEvent
 
 
+
 ../doc/Implementation/runtime-properties-temp/newt.ipd.debug.txt
 ----------------------------------------
     newt.MainThread.force
     newt.test.EDTMainThread
-    newt.test.Window.reparent.incompatible
     newt.test.Screen.disableScreenMode
+    newt.test.Window.reparent.incompatible
     newt.ws.sheight
     newt.ws.swidth
 
 
+
diff --git a/doc/NEWT-Overview.html b/doc/NEWT-Overview.html
new file mode 100644
index 0000000..4f8f718
--- /dev/null
+++ b/doc/NEWT-Overview.html
@@ -0,0 +1,181 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+        <link href="../../style.css" rel="stylesheet" type="text/css"/>
+        <title>NEWT - JOGL’s High Performance Native Windowing Toolkit</title>
+    </head>
+    <body>
+        <div id="container">
+            <div id="header">
+                <div id="slogan">NEWT & JOGL</div>
+                <div id="logo"><a href="http://jogamp.org/jogl/">OpenGL & JOGL</a></div>
+            </div>
+            <div id="menu">
+                <ul>
+                    <li><a href="http://jogamp.org/">Home</a></li>
+                    <li><a href="../../gluegen/www/">Gluegen</a></li>
+                    <li><a href="../../joal/www/">JOAL</a></li>
+                    <li><a href="../../jocl/www/">JOCL</a></li>
+                    <li><a href="../../jogl/www/">JOGL</a></li>
+                    <li><a href="../../demos/www/">Demos</a></li>
+                    <li><a href="../../wiki/">Wiki</a></li>
+                    <li><a href="../../deployment/jogl-next/javadoc_public/">JavaDoc</a></li>
+                    <li><a href="../../blog/">Blogs</a></li>
+                    <li><a href="../../forum.html">Forums</a></li>
+                </ul>
+            </div>
+            <div id="main">
+                <div id="text" class="fill">
+<h2>NEWT - JOGL’s High Performance Native Windowing Toolkit</h2>
+
+<h4>NEWT Usage</h4>
+
+<p>
+Consider the classic demo code
+    <a href="http://jogamp.org/git/?p=jogl.git;a=blob;f=src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/GearsES2.java;hb=HEAD">GearsES2.java</a>
+    [<a href="http://jogamp.org/git/?p=jogl.git;a=blob;f=src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/GearsES2.java;h=d92d98894acc4cfe42e77ec316858d16d202b5b8;hb=HEAD">v2.0-rc3</a>],
+which implements a
+<a href="/deployment/jogamp-next/javadoc/jogl/javadoc/javax/media/opengl/GLEventListener.html">GLEventEventListener</a>.</p>
+
+<p>
+The simple application
+<a href="http://jogamp.org/git/?p=jogl.git;a=blob;f=src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestGearsES2NEWT.java;hb=HEAD">TestGearsES2NEWT.java</a>
+    [<a href="http://jogamp.org/git/?p=jogl.git;a=blob;f=src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestGearsES2NEWT.java;h=df86b83d2c3af9efed44d973aac24e678e85cd4c;hb=HEAD">v2.0-rc3</a>]
+creates a NEWT 
+<a href="/deployment/jogamp-next/javadoc/jogl/javadoc/com/jogamp/newt/opengl/GLWindow.html">GLWindow</a>,
+which implements a
+<a href="/deployment/jogamp-next/javadoc/jogl/javadoc/javax/media/opengl/GLAutoDrawable.html">GLAutoDrawable</a>
+and hence is able to add the demo code.
+NEWT’s GLWindow also implements the NEWT <a href="/deployment/jogamp-next/javadoc/jogl/javadoc/com/jogamp/newt/Window.html">Window</a>,
+which gives you full control of the native windowing, as shown in the demo.</p>
+
+<p>
+Finally we just add our GLWindow to an
+<a href="/deployment/jogamp-next/javadoc/jogl/javadoc/com/jogamp/opengl/util/Animator.html">Animator</a> instance,
+which renders our demo in it's own rendering thread independent from user input.</p>
+
+<p>
+For NEWT’s AWT integration, please read the dedicated section below.
+</p>
+
+<h4>NEWT Threading Overview</h4>
+
+<p>NEWT’s event model is pretty simple.<br />
+It spawns one Event Dispatch Thread (EDT) for each unique Display which role is to handle:</p>
+<ul>
+<li> input events </li>
+<li> window lifecycle actions (window visibility, resize, .. etc) </li>
+<li> <b>not</b> rendering </li>
+</ul>
+
+<p>
+High performance rendering is achieved without being blocked by input events or vice versa.<br/>
+As demonstrated in the above NEWT example, rendering does not disturb or lag user input.<br/>
+This gives you fluent animation even for complex models.</p>
+
+<h4>NEWT’s AWT integration and NEWT Applet’s</h4>
+
+<p>
+<a href="/deployment/jogamp-next/javadoc/jogl/javadoc/com/jogamp/newt/awt/NewtCanvasAWT.html">NewtCanvasAWT</a>,
+representing an AWT Canvas, allows you to hook a NEWT Window into it.</p>
+Since the NewtCanvasAWT is an AWT heavyweight Component, this gives you the ability hook NEWT into an AWT UI.<br/>
+<p>
+The implementation uses the AWT native JAWT API to reparent the NEWT Window natively into the AWT one<br/>
+and hence is even more compatible with JOGL’s GLCanvas implementation.</p>
+<p>
+This enables us to use both worlds, AWT/Swing UI and decoupled high performance rendering.</p>
+
+<p>
+<a href="http://jogamp.org/git/?p=jogl.git;a=blob;f=src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01cAWT.java;hb=HEAD">TestParenting01cAWT.java</a>
+[<a href="http://jogamp.org/git/?p=jogl.git;a=blob;f=src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01cAWT.java;h=4477c3f8e8ebc43c91ea90a82af69a5bb0f38091;hb=HEAD">v2.0-rc3</a>] 
+shows you how to add an GLWindow to an NewtCanvasAWT, which iself is added to an AWT Frame.<br/>
+It also shows how the NewtCanvasAWT can be easily removed from the AWT Frame and placed into another AWT Container.<br/>
+Since we use native reparenting, the native window resource keeps alive and hence your OpenGL application (GLEventListener)
+is not being asked to dispose all resources.<br/> 
+<a href="http://jogamp.org/git/?p=jogl.git;a=blob;f=src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01cSwingAWT.java;hb=HEAD">TestParenting01cSwingAWT.java</a>
+[<a href="http://jogamp.org/git/?p=jogl.git;a=blob;f=src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01cSwingAWT.java;h=478e00007b14f2d4d14da3d5ccca0500b441ba96;hb=HEAD">v2.0-rc3</a>] 
+shows the same example using Swing.<br/>
+</p>
+
+<p>
+Last but not least, the above mechanism can be used to show NEWT Window’s in an AWT Applet.<br/>
+<a href="/deployment/jogamp-next/javadoc/jogl/javadoc/com/jogamp/newt/awt/applet/JOGLNewtApplet1Run.html">JOGLNewtApplet1Run</a>
+is an Applet launcher for any
+<a href="/deployment/jogamp-next/javadoc/jogl/javadoc/javax/media/opengl/GLEventListener.html">GLEventEventListener</a>
+exposing a default constructor.
+See it <a href="/deployment/jogamp-next/jogl-test-applets.html"><i>alive</i> here</a>.
+</p>
+
+
+<!---
+    <a href="">TestParenting01cSwingAWT.java</a>
+    [<a href="">v2.0-rc3</a>]
+-->
+
+<h4>How to pass user input back to the rendering loop ?</h4>
+
+The following example shows you how to use a fifo to pipe events from the EDT (listener) to the rendering loop.
+<ul>
+<li>
+    <a href="http://jogamp.org/git/?p=jogl.git;a=blob;f=src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting02NEWT.java;hb=HEAD">TestParenting02NEWT.java</a>
+    [<a href="http://jogamp.org/git/?p=jogl.git;a=blob;f=src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting02NEWT.java;h=13aad0c25873a29f8c5df80e71bb76c96c5d4197;hb=HEAD">v2.0-rc3</a>]
+</li>
+<li>
+    <a href="http://jogamp.org/git/?p=jogl.git;a=blob;f=src/test/com/jogamp/opengl/test/junit/newt/parenting/KeyAction.java;hb=HEAD">KeyAction.java</a>
+    [<a href="http://jogamp.org/git/?p=jogl.git;a=blob;f=src/test/com/jogamp/opengl/test/junit/newt/parenting/KeyAction.java;h=3313ec65c59783c67b01cd6bc387a25df943e60f;hb=HEAD">v2.0-rc3</a>]
+</li>
+</ul>
+<p><b>How to inject some GL action to the rendering loop ?</b><br />
+  Shows you how to inject GL render actions into a GL fifo from another thread.</p>
+<ul>
+<li>
+    <a href="http://jogamp.org/git/?p=jogl.git;a=blob;f=src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01cSwingAWT.java;hb=HEAD">TestParenting01cSwingAWT.java</a>
+    [<a href="http://jogamp.org/git/?p=jogl.git;a=blob;f=src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01cSwingAWT.java;h=478e00007b14f2d4d14da3d5ccca0500b441ba96;hb=HEAD">v2.0-rc3</a>]
+</li>
+
+<li>
+    <a href="http://jogamp.org/git/?p=jogl.git;a=blob;f=src/test/com/jogamp/opengl/test/junit/newt/parenting/GLRunnableDummy.java;hb=HEAD">GLRunnableDummy.java</a>
+    [<a href="http://jogamp.org/git/?p=jogl.git;a=blob;f=src/test/com/jogamp/opengl/test/junit/newt/parenting/GLRunnableDummy.java;h=1ca74774b73963ba4e3b20fc3491b0b2f7bfe454;hb=HEAD">v2.0-rc3</a>]
+</li>
+</ul>
+
+<p><b>AWT agnostic input event listener</b><br />
+We also have a way to write AWT agnostic input event listener:</p>
+<ul>
+<li>
+    <a href="http://jogamp.org/git/?p=jogl.git;a=blob;f=src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/newt/TestGearsNEWT.java;hb=HEAD">TestGearsNEWT.java</a>
+     [<a href="http://jogamp.org/git/?p=jogl.git;a=blob;f=src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/newt/TestGearsNEWT.java;h=4b6f7999a194bf8515d828124239b0acba81fd49;hb=HEAD">v2.0-rc3</a>]
+</li>
+
+<li>
+    <a href="http://jogamp.org/git/?p=jogl.git;a=blob;f=src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/awt/TestGearsAWT.java;hb=HEAD">TestGearsAWT.java</a>
+     [<a href="http://jogamp.org/git/?p=jogl.git;a=blob;f=src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/awt/TestGearsAWT.java;h=8ab641267c8a4e958ccf1709bc07fd050c8a7213;hb=HEAD">v2.0-rc3</a>]
+</li>
+</ul>
+
+<p>We provide some utilities to make life a bit easier.<br />
+These are not really necessary, ie you could write and use your own, sure.</p>
+<p>The NEWT threading requirements are easy – they are just <b>none</b> for rendering,<br />
+
+and the input event listener should better not lock the rendering GL context.<br />
+Well, they can using <code>GLContext.setSynchronized(true) etc .. </code>,<br />
+but that would be a pity performance wise.</p>
+
+                    <h3>References</h3>
+<ul>
+    <li><a href="/deployment/jogamp-next/javadoc/jogl/javadoc/com/jogamp/newt/package-summary.html">NEWT API Overview</a></li>
+</ul>
+                </div>
+            </div>
+            <div id="footer">
+                <div id="footer_left">
+                    <span>JogAmp.org</span>
+                    by <a href="http://jogamp.org">http://jogamp.org</a>
+                    is licensed under a <br/>
+                    <a href="http://creativecommons.org/licenses/by/3.0/us/">Creative Commons Attribution 3.0 License</a>.
+                </div>
+            </div>
+        </div>
+    </body>
+</html>
diff --git a/doc/NewUI-Req01.txt b/doc/NewUI-Req01.txt
new file mode 100644
index 0000000..67af76d
--- /dev/null
+++ b/doc/NewUI-Req01.txt
@@ -0,0 +1,66 @@
+http://forum.jogamp.org/Re-JOGL-amp-UI-Toolkit-s-td862612.html
+
+Sven Gothel - Jun 01, 2010; 9:21pm Re: JOGL & UI Toolkit[s] 
+
+++++
+
+A UI toolkit should be agnostic (as possible) in regards to the
+windowing toolkit (NEWT) and maybe event to the rendering toolkit (JOGL).
+
+So allow me to start with the Windowing Toolkit.
+
+(REQ-WinTK-01) Windowing Toolkit: Seamless integrations into the underlying native one.
+
+The following sub requirements shall be implemented if supported by the
+underlying native windowing toolkit.
+Proper behaviour in case of lack of support, shall be achieved.
+
+NEWT covers sub-requirements [01-01 .. 01-06] already.
+
+(REQ-WinTK-01-01) Creation/Destruction of top level and child windows
+(REQ-WinTK-01-02) Multithreaded Window Surface Access
+(REQ-WinTK-01-03) Parenting and Re-Parenting
+(REQ-WinTK-01-04) Decorated- or Undecorated - Windows
+(REQ-WinTK-01-05) Passive Fullscreen Mode, no change of display mode
+(REQ-WinTK-01-06) Event handling, at least per creation thread (-> REQ-WinTK-01-01)
+
+(REQ-WinTK-01-07) Transparency
+        - API prepared
+(REQ-WinTK-01-08) Active Fullscreen Mode, change of display mode
+        - API prepared
+(REQ-WinTK-01-20) Drag & Drop
+        - Pending
+
++++++
+
+
+Phenomenon for a UI toolkit may start with the following:
+
+(REQ-UITK-01) UI Toolkit: Generic UI Object Rendering
+(REQ-UITK-01-01) Should be abstracted from the windowing toolkit.
+(REQ-UITK-01-02) Should support multithreading (-> REQ-WinTK-01-02)
+(REQ-UITK-01-02) Should include implementation using native rendering TKs (JOGL, ..)
+(REQ-UITK-01-03) Render primitives on a 2D plane
+
+(REQ-UITK-02) UI Toolkit: User Interaction
+(REQ-UITK-02-01) Should be abstracted from the windowing toolkit -> Events.
+(REQ-UITK-01-02) Mouse feedback from a picked 2D plane
+
+
+REQ-WinTK-01-02 and REQ-UITK-01-01 already reject AWT/Swing usage.
+
+REQ-UITK-01-03 and REQ-UITK-01-02 almost request at least a little basic scenegraph,
+or an offscreen UI rendering (texture) approach will be used.
+
+It may turn out that a seamless integration of a UI
+cannot be completely application independent, since such application
+already utilized a scenegraph and some meaning of UI.
+
+IMHO the only generic UI TK path would be supporting offscreen
+rendered UI elements, the application may add on a 2D place in the scene
+and propagates events to the UI TK event dispatcher.
+
+Additionally we could just offer such a 'realizer' adapter for simple applications,
+ie render the UI textures and propagating catched events on it's plane.
+
+
diff --git a/doc/Overview-OpenGL-Evolution-And-JOGL.html b/doc/Overview-OpenGL-Evolution-And-JOGL.html
new file mode 100644
index 0000000..86b5b18
--- /dev/null
+++ b/doc/Overview-OpenGL-Evolution-And-JOGL.html
@@ -0,0 +1,212 @@
+<!DOCTYPE HTML>
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+        <link href="../../style.css" rel="stylesheet" type="text/css"/>
+        <title>OpenGL Evolution & JOGL</title>
+    </head>
+    <body>
+        <div id="container">
+            <div id="header">
+                <div id="slogan">OpenGL & JOGL</div>
+                <div id="logo"><a href="http://jogamp.org/jogl/">OpenGL & JOGL</a></div>
+            </div>
+            <div id="menu">
+                <ul>
+                    <li><a href="http://jogamp.org/">Home</a></li>
+                    <li><a href="../../gluegen/www/">Gluegen</a></li>
+                    <li><a href="../../joal/www/">JOAL</a></li>
+                    <li><a href="../../jocl/www/">JOCL</a></li>
+                    <li><a href="../../jogl/www/">JOGL</a></li>
+                    <li><a href="../../demos/www/">Demos</a></li>
+                    <li><a href="../../wiki/">Wiki</a></li>
+                    <li><a href="../../deployment/jogl-next/javadoc_public/">JavaDoc</a></li>
+                    <li><a href="../../blog/">Blogs</a></li>
+                    <li><a href="../../forum.html">Forums</a></li>
+                </ul>
+            </div>
+            <div id="main">
+                <div id="text" class="fill">
+                    <h2>OpenGL Evolution & JOGL</h2>
+
+                    <h3>OpenGL Evolution</h3>
+                    <hr/>
+
+<p>
+<a href="http://www.opengl.org/">OpenGL</a> is an application programming interface (API) giving application developers
+access to hardware accelerated 3D rendering (incl. 2D).</p>
+
+<p>
+SGI released the first OpenGL specification in January 1992. 
+Since this point OpenGL 1.x constantly evolved, first under the ARB and later under the <a href="http://www.khronos.org/">Khronos Group</a>.</p>
+
+<p>
+The OpenGL API was specified with the objective of maximal hardware acceleration,
+ie the API functions shall be implemented in hardware - as much as possible.
+Further more, OpenGL is considered a vendor neutral and platform agnostic API,
+ie should run anywhere, implemented by all 3D GPU manufacturer.</p>
+
+<p>
+Up until OpenGL 1.5, released in July 2003, the core API reflected the so called fixed function pipeline (FFP).
+FFP allowed a user to pass triangles, textures and attributes to the GPU.
+The attributes had to be utilized to select predefined function of rendering, 
+hence the name fixed function.</p>
+
+<p>
+Around 2000 new types of GPU hardware evolved,
+allowing custom code running on the GPU hardware, 
+instead of being restricted to the fixed function rendering code.</p>
+
+<p>
+To allow processing of such user defined algorithms on the GPU, 
+in 2002 the programmable shader pipeline (PSP) was introduced. 
+The OpenGL Shading Language (GLSL) used to write such shader programs
+became an extension to OpenGL 1.4.</p>
+
+GLSL allows users to 
+<ul>
+ <li> write ANSI-C like shader programs</li>
+ <li> compile shader programs</li>
+ <li> upload shader programs to the GPU </li>
+</ul>
+
+<p>
+The shader, executed on the GPU, transform the
+triangle position and determine the pixel color.</p>
+
+<p>
+Within this process, the shader may use any form of data, 
+arrays, textures and framebuffer. 
+It reads it, computes and stores the result in the target framebuffer(s), 
+hence the name programmable.</p>
+
+<p>
+In September 2004, GLSL subsumed into the core OpenGL 2.0 API,
+hence OpenGL 2.0 supported both, FFP and PSP.</p>
+
+<p>
+The desire to utilize OpenGL on embedded devices increased
+the more 3D capabilities appeared.</p>
+
+<p>
+Around 2005 a subset of the FFP of OpenGL 1.3 
+for embedded systems was released, OpenGL ES 1.0.</p>
+
+<p>
+In March 2007 a programmable shader (PSP) only subset of OpenGL 2.0 
+for embedded systems was released.</p>
+
+<p>
+In July 2010 OpenGL 4.1 was released and it's core profile
+is fully compatible to OpenGL ES 2.0.</p>
+
+<p>
+Today, desktop and embedded GPU's implement the programmatic shader (PSP)
+based rendering.</p>
+
+<p>
+Still the fixed function subset is provided by most drivers.
+However, since the hardware itself does not implement such functionality anymore,
+it is completely implemented in software by the OpenGL driver.</p>
+
+<p>
+This leads to the conclusion it is best advised for OpenGL applications
+to avoid the FFP, but using the PSP. This allows the implementor
+to utilize application level optimization which usually cannot be reached 
+by the very generic implemented FFP in the OpenGL drivers.</p>
+ 
+                    <h3>JOGL & The OpenGL Evolution</h3>
+                    <hr/>
+<p>
+Like <a href="http://jausoft.com/gl4java/">GL4Java</a>, the 1st JOGL release 1.x
+mapped OpenGL in one interface. This architecture was feasible and correct until the new OpenGL
+profiles surfaced. There was only one unique way to create an OpenGL context for all available 
+OpenGL versions.</p>
+
+<p>
+The continously developed <a href="http://jogamp.org/">JOGL 2.x</a> reflects the aforementioned OpenGL evolution
+by <a href="/deployment/jogamp-next/javadoc/jogl/javadoc/overview-summary.html#overview_description">mapping the OpenGL profiles to interfaces</a>.
+This is essential since creating an OpenGL context for each class of OpenGL profiles
+requires it's <a href="/deployment/jogamp-next/javadoc/jogl/javadoc/overview-summary.html#GLAPIInclusionCriteria">specific initialisation</a>.<br/>
+Some OpenGL profiles like 
+    <a href="/deployment/jogamp-next/javadoc/jogl/javadoc/javax/media/opengl/GLES2.html">GLES2</a>
+for embedded may not be available on desktop machines.</p>
+
+Fixed Function (FFP) Only Profiles:
+<ul>
+    <li><a href="/deployment/jogamp-next/javadoc/jogl/javadoc/javax/media/opengl/GLES1.html">GLES1</a></li>
+</ul><br/>
+
+Programmable Shader (PSP) Only Profiles:
+<ul>
+    <li><a href="/deployment/jogamp-next/javadoc/jogl/javadoc/javax/media/opengl/GLES2.html">GLES2</a></li>
+    <li><a href="/deployment/jogamp-next/javadoc/jogl/javadoc/javax/media/opengl/GL3.html">GL3</a></li>
+    <li><a href="/deployment/jogamp-next/javadoc/jogl/javadoc/javax/media/opengl/GL4.html">GL4</a></li>
+</ul><br/>
+
+FFP & PSP Profiles:
+<ul>
+    <li><a href="/deployment/jogamp-next/javadoc/jogl/javadoc/javax/media/opengl/GL2.html">GL2</a></li>
+    <li><a href="/deployment/jogamp-next/javadoc/jogl/javadoc/javax/media/opengl/GL3bc.html">GL3bc</a></li>
+    <li><a href="/deployment/jogamp-next/javadoc/jogl/javadoc/javax/media/opengl/GL4bc.html">GL4bc</a></li>
+</ul><br/>
+
+<p>
+The following UML diagram show that JOGL also adds common subsets of OpenGL profiles
+to allow easy development of multiple target profiles.</p>
+
+Common OpenGL Profile Subsets:
+<ul>
+    <li><a href="/deployment/jogamp-next/javadoc/jogl/javadoc/javax/media/opengl/GL.html">GL</a></li>
+    <li><a href="/deployment/jogamp-next/javadoc/jogl/javadoc/javax/media/opengl/GL2ES1.html">GL2ES1</a></li>
+    <li><a href="/deployment/jogamp-next/javadoc/jogl/javadoc/javax/media/opengl/GL2ES2.html">GL2ES2</a></li>
+    <li><a href="/deployment/jogamp-next/javadoc/jogl/javadoc/javax/media/opengl/GL2GL3.html">GL2GL3</a></li>
+</ul><br/>
+
+<br/>
+For example using the common interface 
+<a href="/deployment/jogamp-next/javadoc/jogl/javadoc/javax/media/opengl/GL2ES2.html">GL2ES2</a>
+of <a href="/deployment/jogamp-next/javadoc/jogl/javadoc/javax/media/opengl/GL2.html">GL2</a>
+and <a href="/deployment/jogamp-next/javadoc/jogl/javadoc/javax/media/opengl/GLES2.html">GLES2</a>,
+ensures the code complies with the GL2 and GLES2 profile and an implementation may use both:<br/>
+<pre>
+    void renderSomethingForGL2(GL2 gl, int program) {
+        renderSomethingForGL2AndGLES2(gl, program);
+    }
+
+    void renderSomethingForGLES2(GLES2 gl, int program) {
+        renderSomethingForGL2AndGLES2(gl, program);
+    }
+
+    void renderSomethingForGL2AndGLES2(GL2ES2 gl, int program) {
+        gl.glValidateProgram(program);
+        ...
+
+    }
+</pre>
+
+<h4><a href="bouml/html-svg/fig128069.svg">OpenGL Profile Model (UML)</a> (<a href="bouml/html-svg/index-withframe.html">with frames</a>)</h4>
+<embed src="bouml/html-svg/fig128069.svg" width="1024" height="800" />
+
+                    <h3>References</h3>
+<ul>
+    <li><a href="http://en.wikipedia.org/wiki/OpenGL">OpenGL on Wikipedia</a></li>
+    <li><a href="http://en.wikipedia.org/wiki/OpenGL_ES">OpenGL ES on Wikipedia</a></li>
+    <li><a href="http://en.wikipedia.org/wiki/GLSL">GLSL on Wikipedia</a></li>
+    <li><a href="http://www.opengl.org/">OpenGL Web Site</a></li>
+    <li><a href="http://www.khronos.org/">Khronos Web Site</a></li>
+    <li><a href="/deployment/jogamp-next/javadoc/jogl/javadoc/overview-summary.html#overview_description">JOGL API Overview</a></li>
+</ul>
+                </div>
+            </div>
+            <div id="footer">
+                <div id="footer_left">
+                    <span>JogAmp.org</span>
+                    by <a href="http://jogamp.org">http://jogamp.org</a>
+                    is licensed under a <br/>
+                    <a href="http://creativecommons.org/licenses/by/3.0/us/">Creative Commons Attribution 3.0 License</a>.
+                </div>
+            </div>
+        </div>
+    </body>
+</html>
diff --git a/doc/TODO.txt b/doc/TODO.txt
index 4c5f61f..f86d31e 100644
--- a/doc/TODO.txt
+++ b/doc/TODO.txt
@@ -1,7 +1,5 @@
 WIP:
 
-- Protected access for Impl classes
-
 Random, somewhat old to-do list:
 
 - Non-const array types must be properly released with JNI_COMMIT in
diff --git a/doc/curve/alt-algorithm-rsantina-01.pdf b/doc/curve/alt-algorithm-rsantina-01.pdf
new file mode 100644
index 0000000..969b3a7
Binary files /dev/null and b/doc/curve/alt-algorithm-rsantina-01.pdf differ
diff --git a/doc/deployment/JOGL-DEPLOYMENT.html b/doc/deployment/JOGL-DEPLOYMENT.html
index b54bc64..abaa661 100644
--- a/doc/deployment/JOGL-DEPLOYMENT.html
+++ b/doc/deployment/JOGL-DEPLOYMENT.html
@@ -3,13 +3,13 @@
     <head>
         <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
         <link href="../../../style.css" rel="stylesheet" type="text/css"/>
-        <title>JOGL JAR Bundeling</title>
+        <title>JOGL Deployment</title>
     </head>
     <body>
         <div id="container">
             <div id="header">
                 <div id="slogan">.. bundle .. deploy</div>
-                <div id="logo"><a href="http://jogamp.org/">JOGL JAR Bundeling</a></div>
+                <div id="logo"><a href="http://jogamp.org/">JOGL Deployment</a></div>
             </div>
             <div id="menu">
                 <ul>
@@ -28,105 +28,102 @@
             <div id="main">
                 <div id="text" class="fill">
 
-                    <h1>JNLP Deployment</h1>
+                    <h1><a name="JNLPFiles">JNLP Files</a></h1>
+
+                    <p>
+                    You may choose to use JNLP to deploy your application
+                    and reference the JOGL resources.<p/>
+
+                    <p>
+                    You have the choice to use <a href="http://jdk6.dev.java.net/plugin2/jnlp/">JNLP Applets</a>
+                    or <a href="http://java.sun.com/products/javawebstart/">Java Webstart</a>.<p/>
+
+                    <p>
+                    You might want to have a look at our <a href="http://jogamp.org/deployment/jogamp-current/jogl-test-applets.html">Test page for JOGL Applets</a>. Here is a <a href="http://jogamp.org/deployment/jogamp-current/jogl-applet-runner-newt-gears-normal.html">documented example</a><p/>
 
                     Supported JNLP bases are:
                     <ul>
-                        <li> Latest <code> http://jogamp.org/deployment/webstart/ </code></li>
-                        <li> Next <code> http://jogamp.org/deployment/webstart-next/ </code></li>
+                        <li> <code><b> http://jogamp.org/deployment/jogamp-current/ </b></code> Current Version </li>
+                        <li> <code><b> http://jogamp.org/deployment/jogamp-next/ </b></code> Next Version </li>
+                        <li> <code><b> http://jogamp.org/deployment/v2.0-rc3/ </b></code> Specific Version </li>
                     </ul>
 
                     <h2>Desktop All in One</h2>
 
-                    <h3>With AWT and NEWT</h3>
+                    <h3>With AWT</h3>
                     <ul>
-                        <li><code>newt-all-awt.jnlp</code><br/>
+                        <li><code>jogl-all-awt.jnlp</code><br/>
                             <ul>
-                                <li><code>jogl-all-awt.jnlp</code><br/>
-                                    <ul>
-                                        <li><code>gluegen-rt.jnlp</code></li>
-                                        <li><code>nativewindow-all-awt.jnlp</code></li>
-                                    </ul>
-                                </li>
+                                <li><code>gluegen-rt.jnlp</code></li>
                             </ul>
                         </li>
                     </ul>
 
-                    <h3>With AWT - Without NEWT</h3>
+                    <h3>Without AWT</h3>
                     <ul>
-                        <li><code>jogl-all-awt.jnlp</code><br/>
+                        <li><code>jogl-all-noawt.jnlp</code><br/>
                             <ul>
                                 <li><code>gluegen-rt.jnlp</code></li>
-                                <li><code>nativewindow-all-awt.jnlp</code></li>
                             </ul>
                         </li>
                     </ul>
-                    <p>
-                        It loads the JAR files for the <a href="#NativeLibraries">native libraries</a>,<br/>
-                        as well as the other <a href="#AllInOneJARs">All In One JAR files</a>
-                        for <a href="#AllInOneJARsAWT">AWT support</a>.
-                    </p>
-
-                    <h3>Without AWT</h3>
 
+                    <h3>Mobile</h3>
                     <ul>
-                        <li><code>newt-all-noawt.jnlp</code><br/>
+                        <li><code>jogl-all-mobile.jnlp</code><br/>
                             <ul>
-                                <li><code>jogl-all-noawt.jnlp</code><br/>
-                                    <ul>
-                                        <li><code>gluegen-rt.jnlp</code></li>
-                                        <li><code>nativewindow.jnlp</code></li>
-                                    </ul>
-                                </li>
+                                <li><code>gluegen-rt.jnlp</code></li>
                             </ul>
                         </li>
                     </ul>
-
                     <p>
-                        It loads the JAR files for the <a href="#NativeLibraries">native libraries</a>,<br/>
-                        as well as the other <a href="#AllInOneJARs">All In One JAR files</a>
-                        for <a href="#AllInOneJARsNoAWT">Without AWT support</a>.
+                        The above JNLP files will load the <a href="#GluegenJARs">GlueGen JARs</a>
+                        as well as the <a href="#JOGLAllInOneJARs">JOGL All-In-One JARs</a>.
                     </p>
 
                     <hr/>
-                    <h1>Manual Deployment</h1>
-
-                    <h2><a name="NativeLibraries">Native Libraries</a></h2>
-
-                    Gluegen native libraries:
-                    <ul>
-                        <li>libgluegen-rt.so</li>
-                    </ul>
+                    <h1><a name="JARFiles">JAR Files</a></h1>
 
-                    NativeWindow native libraries
-                    <ul>
-                        <li>libnativewindow_awt.so</li>
-                        <li>libnativewindow_jvm.so</li>
-                        <li>libnativewindow_x11.so</li>
-                    </ul>
+                    <h2><a name="NativeJARFiles">Native JAR Files</a></h2>
+                    All JAR files containing platform dependent native libraries 
+                    contain the string <code>natives</code> and the 
+                    <a href="#NativeJARFileNameConvention"><b><i>os.and.arch</i></b></a>
+                    identifier in their name.
 
-                    JOGL native libraries
-                    <ul>
-                        <li>libjogl_desktop.so</li>
-                        <li>libjogl_gl2es12.so</li>
-                        <li>libjogl_es1.so</li>
-                        <li>libjogl_es2.so</li>
-                        <li>libjogl_cg.so</li>
-                    </ul>
+                    The actual native library files are <a href="#NativeLibraryFiles">listed below</a>.
 
-                    NEWT native libraries
+                    <h3><a name="NativeJARFileNameConvention">Naming Convention</a></h3>
+                    JogAmp's build system has the notion of <b><i>os.and.arch</i></b> string identifier,
+                    to name platform dependent build artifacts.<br/> 
+                    Currently used and supported names are:
                     <ul>
-                        <li>libnewt.so</li>
+                        <li>freebsd-i586</li>
+                        <li>freebsd-amd64</li>
+                        <li>hpux-hppa</li>
+                        <li>linux-amd64</li>
+                        <li>linux-ia64</li>
+                        <li>linux-i586</li>
+                        <li>linux-armv7</li>
+                        <li>android-armv7</li>
+                        <li>macosx-universal</li>
+                        <li>solaris-sparc</li>
+                        <li>solaris-sparcv9</li>
+                        <li>solaris-amd64</li>
+                        <li>solaris-i586</li>
+                        <li>windows-amd64</li>
+                        <li>windows-i586</li>
                     </ul>
 
-                    <h2><a name="JavaLibraries">Java Libraries (JARs)</a></h2>
-
-                    <h3><a name="GluegenJAR">Gluegen JAR - Mandatory</a></h3>
+                    <h2><a name="GluegenJARs">Gluegen JARs - Mandatory</a></h2>
                     <ul>
-                        <li>gluegen-rt.jar</li>
+                        <li><code>gluegen-rt.jar</code><br/>
+                            <ul>
+                                <li><code>gluegen-rt-natives-<b><i>os.and.arch</i></b>.jar</code></li>
+                            </ul>
+                        </li>
                     </ul>
 
-                    <h3><a name="AllInOneJARs">All In One Deployment</a></h3>
+                    <h3><a name="JOGLAllInOneJARs">JOGL JARs - All-In-One</a></h3>
 
                     <p>
                         This might be the best solution
@@ -139,20 +136,41 @@
                         be reuseable.<br/>
                     </p>
 
-                    <a name="AllInOneJARsAWT">With AWT</a>:
+                    <a name="JOGLAllInOneJARsAWT">With AWT</a>:
+                    <ul>
+                        <li><code>jogl.all.jar</code><br/>
+                            <ul>
+                                <li><code>jogl-all-natives-<b><i>os.and.arch</i></b>.jar</code></li>
+                            </ul>
+                        </li>
+                    </ul>
+
+                    <a name="JOGLAllInOneJARsNoAWT">Without AWT</a>:
                     <ul>
-                        <li>nativewindow.all.jar</li>
-                        <li>jogl.all.jar</li>
-                        <li>newt.all.jar (optional - redundant if no NEWT is used)</li>
+                        <li><code>jogl.all-noawt.jar</code><br/>
+                            <ul>
+                                <li><code>jogl-all-natives-<b><i>os.and.arch</i></b>.jar</code></li>
+                            </ul>
+                        </li>
                     </ul>
 
-                    <a name="AllInOneJARsNoAWT">Without AWT</a>:
+                    <a name="JOGLAllInOneJARsMobile">Mobile</a>:
                     <ul>
-                        <li>nativewindow.all-noawt.jar</li>
-                        <li>jogl.all-noawt.jar</li>
-                        <li>newt.all-noawt.jar</li>
+                        <li><code>jogl.all-mobile.jar</code><br/>
+                            <ul>
+                                <li><code>jogl-all-natives-<b><i>os.and.arch</i></b>.jar</code></li>
+                            </ul>
+                        </li>
                     </ul>
 
+                    <a name="JOGLAllInOneJARsAndroid">Android</a>:
+                    <ul>
+                        <li><code>jogl.all-android.jar</code><br/>
+                            <ul>
+                                <li><code>jogl-all-natives-<b><i>os.and.arch</i></b>.jar</code></li>
+                            </ul>
+                        </li>
+                    </ul>
 
                     <h3>Atomic Deployment </h3>
 
@@ -190,17 +208,19 @@
 
                         <li>JOGL [pick your platform]:<br/>
                             <ul>
-                                <li>jogl.egl.jar</li>
                                 <li>jogl.os.x11.jar</li>
                                 <li>jogl.os.win.jar</li>
                                 <li>jogl.os.osx.jar</li>
+                                <li>none</li>
                             </ul></li>
 
                         <li>Newt [pick your platform] (optional):<br/>
                             <ul>
-                                <li>newt.os.x11.jar</li>
-                                <li>newt.os.win.jar</li>
-                                <li>newt.os.osx.jar</li>
+                                <li>newt.driver.x11.jar</li>
+                                <li>newt.driver.win.jar</li>
+                                <li>newt.driver.osx.jar</li>
+                                <li>newt.driver.kd.jar</li>
+                                <li>none</li>
                             </ul></li>
                     </ul>
 
@@ -211,13 +231,9 @@
                     <ul>
                         <li>Embedded Device Profiles<br/>
                             <ul>
-                                <li>jogl.gles1.jar<br/>
+                                <li>jogl.glmobile.jar<br/>
                                     <ul>
-                                        <li>jogl.gles1.dbg.jar</li>
-                                    </ul></li>
-                                <li>jogl.gles2.jar<br/>
-                                    <ul>
-                                        <li>jogl.gles2.dbg.jar</li>
+                                        <li>jogl.glmobile.dbg.jar</li>
                                     </ul></li>
                             </ul></li>
 
@@ -227,7 +243,6 @@
                                     <ul>
                                         <li>jogl.gldesktop.dbg.jar</li>
                                     </ul></li>
-                                <li>jogl.gl2es12.jar (for desktop ES1/ES2 emulation)</li>
                             </ul></li>
                     </ul>
 
@@ -256,6 +271,32 @@
                         <li>jogl.glugl2.jar</li>
                     </ul>
 
+                    <h2><a name="NativeLibraryFiles">Native Library Files</a></h2>
+
+                    Gluegen native libraries:
+                    <ul>
+                        <li>libgluegen-rt.so</li>
+                    </ul>
+
+                    NativeWindow native libraries
+                    <ul>
+                        <li>libnativewindow_awt.so</li>
+                        <li>libnativewindow_jvm.so</li>
+                        <li>libnativewindow_x11.so</li>
+                    </ul>
+
+                    JOGL native libraries
+                    <ul>
+                        <li>libjogl_desktop.so</li>
+                        <li>libjogl_mobile.so</li>
+                        <li>libjogl_cg.so</li>
+                    </ul>
+
+                    NEWT native libraries
+                    <ul>
+                        <li>libnewt.so</li>
+                    </ul>
+
                 </div>
             </div>
             <div id="footer">
diff --git a/doc/licenses/Apache.LICENSE-1.1 b/doc/licenses/Apache.LICENSE-1.1
new file mode 100644
index 0000000..de6706f
--- /dev/null
+++ b/doc/licenses/Apache.LICENSE-1.1
@@ -0,0 +1,58 @@
+/* ====================================================================
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 2000 The Apache Software Foundation.  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.
+ *
+ * 3. The end-user documentation included with the redistribution,
+ *    if any, must include the following acknowledgment:
+ *       "This product includes software developed by the
+ *        Apache Software Foundation (http://www.apache.org/)."
+ *    Alternately, this acknowledgment may appear in the software itself,
+ *    if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "Apache" and "Apache Software Foundation" must
+ *    not be used to endorse or promote products derived from this
+ *    software without prior written permission. For written
+ *    permission, please contact apache at apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache",
+ *    nor may "Apache" appear in their name, without prior written
+ *    permission of the Apache Software Foundation.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 THE APACHE SOFTWARE FOUNDATION OR
+ * ITS 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.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ *
+ * Portions of this software are based upon public domain software
+ * originally written at the National Center for Supercomputing Applications,
+ * University of Illinois, Urbana-Champaign.
+ */
+
diff --git a/doc/licenses/Apache.LICENSE-2.0 b/doc/licenses/Apache.LICENSE-2.0
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/doc/licenses/Apache.LICENSE-2.0
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
diff --git a/doc/licenses/SGIFreeSWLicB.2.0.pdf b/doc/licenses/SGIFreeSWLicB.2.0.pdf
new file mode 100644
index 0000000..f92f9c0
Binary files /dev/null and b/doc/licenses/SGIFreeSWLicB.2.0.pdf differ
diff --git a/doc/licenses/ubuntu-font-licence-1.0.txt b/doc/licenses/ubuntu-font-licence-1.0.txt
new file mode 100644
index 0000000..ae78a8f
--- /dev/null
+++ b/doc/licenses/ubuntu-font-licence-1.0.txt
@@ -0,0 +1,96 @@
+-------------------------------
+UBUNTU FONT LICENCE Version 1.0
+-------------------------------
+
+PREAMBLE
+This licence allows the licensed fonts to be used, studied, modified and
+redistributed freely. The fonts, including any derivative works, can be
+bundled, embedded, and redistributed provided the terms of this licence
+are met. The fonts and derivatives, however, cannot be released under
+any other licence. The requirement for fonts to remain under this
+licence does not require any document created using the fonts or their
+derivatives to be published under this licence, as long as the primary
+purpose of the document is not to be a vehicle for the distribution of
+the fonts.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this licence and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Original Version" refers to the collection of Font Software components
+as received under this licence.
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to
+a new environment.
+
+"Copyright Holder(s)" refers to all individuals and companies who have a
+copyright ownership of the Font Software.
+
+"Substantially Changed" refers to Modified Versions which can be easily
+identified as dissimilar to the Font Software by users of the Font
+Software comparing the Original Version with the Modified Version.
+
+To "Propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification and with or without charging
+a redistribution fee), making available to the public, and in some
+countries other activities as well.
+
+PERMISSION & CONDITIONS
+This licence does not grant any rights under trademark law and all such
+rights are reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of the Font Software, to propagate the Font Software, subject to
+the below conditions:
+
+1) Each copy of the Font Software must contain the above copyright
+notice and this licence. These can be included either as stand-alone
+text files, human-readable headers or in the appropriate machine-
+readable metadata fields within text or binary files as long as those
+fields can be easily viewed by the user.
+
+2) The font name complies with the following:
+(a) The Original Version must retain its name, unmodified.
+(b) Modified Versions which are Substantially Changed must be renamed to
+avoid use of the name of the Original Version or similar names entirely.
+(c) Modified Versions which are not Substantially Changed must be
+renamed to both (i) retain the name of the Original Version and (ii) add
+additional naming elements to distinguish the Modified Version from the
+Original Version. The name of such Modified Versions must be the name of
+the Original Version, with "derivative X" where X represents the name of
+the new work, appended to that name.
+
+3) The name(s) of the Copyright Holder(s) and any contributor to the
+Font Software shall not be used to promote, endorse or advertise any
+Modified Version, except (i) as required by this licence, (ii) to
+acknowledge the contribution(s) of the Copyright Holder(s) or (iii) with
+their explicit written permission.
+
+4) The Font Software, modified or unmodified, in part or in whole, must
+be distributed entirely under this licence, and must not be distributed
+under any other licence. The requirement for fonts to remain under this
+licence does not affect any document created using the Font Software,
+except any version of the Font Software extracted from a document
+created using the Font Software may only be distributed under this
+licence.
+
+TERMINATION
+This licence becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER
+DEALINGS IN THE FONT SOFTWARE.
diff --git a/etc/profile.jogl b/etc/profile.jogl
index dec1296..9b38d6a 100755
--- a/etc/profile.jogl
+++ b/etc/profile.jogl
@@ -2,14 +2,14 @@
 
 function print_usage()
 {
-    echo "Usage: $0 {JOGL_ALLALL|JOGL_ALL|JOGL_ALL_NOAWT|JOGL_ES1_MIN|JOGL_ES1_MAX|JOGL_ES2_MIN|JOGL_ES2_MAX|JOGL_GL2ES12_MIN|JOGL_GL2ES12_MAX|JOGL_GLDESKTOP_MIN|JOGL_GLDESKTOP_MAX} [jogl-build-dir]"
+    echo "Usage: $0 {JOGL_ALL|JOGL_ALL_NOAWT|JOGL_ALL_MOBILE} [jogl-build-dir]"
 }
 
 function concat_jogl_list()
 {
     ITEMDIR=$1
     shift
-    for j in $ITEMDIR/nativewindow $ITEMDIR/jogl $ITEMDIR/newt $ITEMDIR ; do
+    for j in $ITEMDIR $ITEMDIR/jar ; do
         for i in $* ; do
             if [ -e $j/$i ] ; then 
                 if [ -z "$JOGL_LIST" ] ; then
@@ -30,38 +30,18 @@ uname -a | grep -i LINUX && OSS=x11
 uname -a | grep -i Darwin && OSS=osx
 uname -a | grep -i CYGWIN && OSS=win
 
-JOGL_AWT="jogl.awt.jar jogl.util.awt.jar newt.awt.jar nativewindow.awt.jar"
-
-JOGL_CORE="nativewindow.core.jar nativewindow.os.$OSS.jar jogl.core.jar jogl.os.$OSS.jar newt.core.jar newt.os.$OSS.jar newt.ogl.jar jogl.util.jar"
-
 JOGL_TEST="jogl.test.jar"
 
-JOGL_JAR_ALL_NOAWT="$JOGL_CORE jogl.gles1.jar jogl.gles1.dbg.jar jogl.gles2.jar jogl.gles2.dbg.jar jogl.egl.jar jogl.os.$OSS.jar jogl.gl2es12.jar jogl.gldesktop.jar jogl.gldesktop.dbg.jar jogl.util.gldesktop.jar jogl.glu.tess.jar jogl.glu.mipmap.jar jogl.glu.gldesktop.jar jogl.util.gldesktop.jar jogl.util.fixedfuncemu.jar jogl.cg.jar"
-JOGL_JAR_ALL="$JOGL_JAR_ALL_NOAWT $JOGL_AWT"
-JOGL_LIB_ALL="libjogl_desktop.so libjogl_es1.so libjogl_es2.so libnewt.so libjogl_awt.so"
-
-JOGL_JAR_ES1_MIN="$JOGL_CORE jogl.gles1.jar jogl.gles1.dbg.jar jogl.egl.jar"
-JOGL_JAR_ES1_MAX="$JOGL_CORE jogl.gles1.jar jogl.gles1.dbg.jar jogl.egl.jar jogl.glu.tess.jar jogl.glu.mipmap.jar $JOGL_AWT"
-JOGL_LIB_ES1_MIN="libjogl_es1.so libnewt.so"
-JOGL_LIB_ES1_MAX="libjogl_es1.so libnewt.so libjogl_awt.so libnativewindow_x11.so libnativewindow_awt.so"
-
-JOGL_JAR_ES2_MIN="$JOGL_CORE jogl.gles2.jar jogl.gles2.dbg.jar jogl.egl.jar jogl.util.fixedfuncemu.jar"
-JOGL_JAR_ES2_MAX="$JOGL_CORE jogl.gles2.jar jogl.gles2.dbg.jar jogl.egl.jar jogl.util.fixedfuncemu.jar jogl.glu.tess.jar $JOGL_AWT"
-JOGL_LIB_ES2_MIN="libjogl_es2.so libnewt.so"
-JOGL_LIB_ES2_MAX="libjogl_es2.so libnewt.so libjogl_awt.so libnativewindow_x11.so libnativewindow_awt.so"
+JOGL_JAR_ALL="jogl.all.jar"
+JOGL_JAR_ALL_NOAWT="jogl.all-noawt.jar"
+JOGL_JAR_ALL_MOBILE="jogl.all-mobile.jar"
 
-JOGL_JAR_GL2ES12_MIN="$JOGL_CORE jogl.os.$OSS.jar jogl.gl2es12.jar jogl.gles1.dbg.jar jogl.gles2.dbg.jar jogl.util.fixedfuncemu.jar"
-JOGL_JAR_GL2ES12_MAX="$JOGL_CORE jogl.os.$OSS.jar jogl.gl2es12.jar jogl.gles1.dbg.jar jogl.gles2.dbg.jar jogl.util.fixedfuncemu.jar jogl.gl2es12.dbg.jar jogl.glu.tess.jar jogl.glu.mipmap.jar $JOGL_AWT"
-JOGL_LIB_GL2ES12_MIN="libjogl_gl2es12.so libnewt.so libnativewindow_x11.so libnativewindow_awt.so"
-JOGL_LIB_GL2ES12_MAX="libjogl_gl2es12.so libnewt.so libnativewindow_x11.so libnativewindow_awt.so"
+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"
+JOGL_LIB_ALL_MOBILE="libjogl_mobile.so libnewt.so"
 
-JOGL_JAR_GLDESKTOP_MIN="$JOGL_CORE jogl.os.$OSS.jar jogl.gldesktop.jar jogl.gldesktop.dbg.jar"
-JOGL_JAR_GLDESKTOP_MAX="$JOGL_CORE jogl.os.$OSS.jar jogl.gldesktop.jar jogl.gldesktop.dbg.jar jogl.glu.tess.jar jogl.glu.mipmap.jar jogl.glu.gldesktop.jar jogl.util.gldesktop.jar $JOGL_AWT jogl.cg.jar"
-JOGL_LIB_GLDESKTOP_MIN="libjogl_desktop.so libnewt.so libnativewindow_x11.so libnativewindow_awt.so"
-JOGL_LIB_GLDESKTOP_MAX="libjogl_desktop.so libnewt.so libnativewindow_x11.so libnativewindow_awt.so"
-
-export JOGL_JAR_ALL JOGL_JAR_ALL_NOAWT JOGL_JAR_ES1_MIN JOGL_JAR_ES1_MAX JOGL_JAR_ES2_MIN JOGL_JAR_ES2_MAX JOGL_JAR_GL2ES12_MIN JOGL_JAR_GL2ES12_MAX JOGL_JAR_GLDESKTOP_MIN JOGL_JAR_GLDESKTOP_MAX
-export JOGL_LIB_ALL JOGL_LIB_ES1_MIN JOGL_LIB_ES1_MAX JOGL_LIB_ES2_MIN JOGL_LIB_ES2_MAX JOGL_LIB_GL2ES12_MIN JOGL_LIB_GL2ES12_MAX JOGL_LIB_GLDESKTOP_MIN JOGL_LIB_GLDESKTOP_MAX
+export JOGL_JAR_ALL JOGL_JAR_ALL_NOAWT JOGL_JAR_ALL_MOBILE
+export JOGL_LIB_ALL JOGL_LIB_ALL_NOAWT JOGL_LIB_ALL_MOBILE
 
 THISDIR=`dirname $0`
 
@@ -90,53 +70,19 @@ else
 fi 
 export JOGL_BUILD_DIR
 
-JOGL_LIB_DIR=""
-if [ $AUTOBUILD -eq 0 ] ; then
-    JOGL_LIB_DIR=$JOGL_BUILD_DIR/nativewindow/obj:$JOGL_BUILD_DIR/jogl/obj:$JOGL_BUILD_DIR/newt/obj
-else
-    # Autobuild
-    JOGL_LIB_DIR=$THISDIR/lib
-fi
+JOGL_LIB_DIR=$JOGL_BUILD_DIR/lib
 export JOGL_LIB_DIR
 
 if [ ! -z "$JOGL_PROFILE" ] ; then
     case "$JOGL_PROFILE" in
-        JOGL_ALLALL)
-            JOGL_CLASSPATH=$(concat_jogl_list $JOGL_BUILD_DIR gluegen-rt.jar nativewindow.all.jar jogl.all.jar newt.all.jar $JOGL_TEST)
-            ;;
         JOGL_ALL)
             JOGL_CLASSPATH=$(concat_jogl_list $JOGL_BUILD_DIR $JOGL_JAR_ALL $JOGL_TEST)
             ;;
         JOGL_ALL_NOAWT)
             JOGL_CLASSPATH=$(concat_jogl_list $JOGL_BUILD_DIR $JOGL_JAR_ALL_NOAWT)
             ;;
-        JOGL_ES1_MIN)
-            JOGL_CLASSPATH=$(concat_jogl_list $JOGL_BUILD_DIR $JOGL_JAR_ES1_MIN)
-            JOGL_VBO_BUG=true ; export JOGL_VBO_BUG # ES emulation has buggy VBO impl.
-            ;;
-        JOGL_ES1_MAX)
-            JOGL_CLASSPATH=$(concat_jogl_list $JOGL_BUILD_DIR $JOGL_JAR_ES1_MAX)
-            JOGL_VBO_BUG=true ; export JOGL_VBO_BUG # ES emulation has buggy VBO impl.
-            ;;
-        JOGL_ES2_MIN)
-            JOGL_CLASSPATH=$(concat_jogl_list $JOGL_BUILD_DIR $JOGL_JAR_ES2_MIN)
-            JOGL_VBO_BUG=true ; export JOGL_VBO_BUG # ES emulation has buggy VBO impl.
-            ;;
-        JOGL_ES2_MAX)
-            JOGL_CLASSPATH=$(concat_jogl_list $JOGL_BUILD_DIR $JOGL_JAR_ES2_MAX)
-            JOGL_VBO_BUG=true ; export JOGL_VBO_BUG # ES emulation has buggy VBO impl.
-            ;;
-        JOGL_GL2ES12_MIN)
-            JOGL_CLASSPATH=$(concat_jogl_list $JOGL_BUILD_DIR $JOGL_JAR_GL2ES12_MIN)
-            ;;
-        JOGL_GL2ES12_MAX)
-            JOGL_CLASSPATH=$(concat_jogl_list $JOGL_BUILD_DIR $JOGL_JAR_GL2ES12_MAX)
-            ;;
-        JOGL_GLDESKTOP_MIN)
-            JOGL_CLASSPATH=$(concat_jogl_list $JOGL_BUILD_DIR $JOGL_JAR_GLDESKTOP_MIN)
-            ;;
-        JOGL_GLDESKTOP_MAX)
-            JOGL_CLASSPATH=$(concat_jogl_list $JOGL_BUILD_DIR $JOGL_JAR_GLDESKTOP_MAX)
+        JOGL_ALL_MOBILE)
+            JOGL_CLASSPATH=$(concat_jogl_list $JOGL_BUILD_DIR $JOGL_JAR_ALL_MOBILE)
             ;;
     esac
 
diff --git a/jnlp-files/applet-version-jnlp.html b/jnlp-files/applet-version-jnlp.html
deleted file mode 100644
index 218f21f..0000000
--- a/jnlp-files/applet-version-jnlp.html
+++ /dev/null
@@ -1,41 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-<title>JOGL JNLP Applet Version (JNLP/Launcher)</title>
-</head>
-<body>
-
-<P>
-The applet below shall show you the version of the Jogl components
-and your platform.
-</P>
-<p>
-JNLP Applet with AppletLauncher fallback version.
-</p>
-
-<P>
-
-<applet code="org.jdesktop.applet.util.JNLPAppletLauncher"
-      width=800
-      height=600
-      archive="JOGL_CODEBASE_TAG/../util/applet-launcher.jar,
-               JOGL_CODEBASE_TAG/newt.all.jar,
-               JOGL_CODEBASE_TAG/jogl.all.jar,
-               JOGL_CODEBASE_TAG/nativewindow.all.jar,
-               JOGL_CODEBASE_TAG/gluegen-rt.jar">
-   <param name="codebase_lookup" value="false">
-   <param name="subapplet.classname" value="jogamp.newt.awt.opengl.VersionApplet">
-   <param name="subapplet.displayname" value="JOGL Applet Version">
-   <!-- param name="noddraw.check" value="true" -->
-   <param name="progressbar" value="true">
-   <param name="jnlpNumExtensions" value="1">
-   <param name="jnlpExtension1" value="JOGL_CODEBASE_TAG/jogl-core.jnlp">
-   <!-- param name="java_arguments" value="-Dsun.java2d.noddraw=true" -->
-   <param name="jnlp_href" value="JOGL_CODEBASE_TAG/applet-version.jnlp">
-</applet>
-
-
-</P>
-
-</body>
-</html>
diff --git a/jnlp-files/applet-version-lancheronly.html b/jnlp-files/applet-version-lancheronly.html
deleted file mode 100644
index 718e9eb..0000000
--- a/jnlp-files/applet-version-lancheronly.html
+++ /dev/null
@@ -1,39 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-<title>JOGL JNLP Applet Version (Launcher)</title>
-</head>
-<body>
-
-<P>
-The applet below shall show you the version of the Jogl components
-and your platform.
-</P>
-<p>
-AppletLauncher only version.
-</p>
-
-<P>
-
-<applet code="org.jdesktop.applet.util.JNLPAppletLauncher"
-      width=800
-      height=600
-      archive="JOGL_CODEBASE_TAG/../util/applet-launcher.jar,
-               JOGL_CODEBASE_TAG/newt.all.jar,
-               JOGL_CODEBASE_TAG/jogl.all.jar,
-               JOGL_CODEBASE_TAG/nativewindow.all.jar,
-               JOGL_CODEBASE_TAG/gluegen-rt.jar">
-   <param name="codebase_lookup" value="false">
-   <param name="subapplet.classname" value="jogamp.newt.awt.opengl.VersionApplet">
-   <param name="subapplet.displayname" value="JOGL Applet Version">
-   <!-- param name="noddraw.check" value="true" -->
-   <param name="progressbar" value="true">
-   <param name="jnlpNumExtensions" value="1">
-   <param name="jnlpExtension1" value="JOGL_CODEBASE_TAG/jogl-core.jnlp">
-</applet>
-
-
-</P>
-
-</body>
-</html>
diff --git a/jnlp-files/applet-version.jnlp b/jnlp-files/applet-version.jnlp
deleted file mode 100644
index c621b46..0000000
--- a/jnlp-files/applet-version.jnlp
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<jnlp codebase="JOGL_CODEBASE_TAG" href="applet-version.jnlp" version="JOGAMP_VERSION">
-  <information>
-    <title>JOGL JNLP Applet Version</title>
-    <vendor>JogAmp Community</vendor>
-    <homepage href="http://jogamp.org/"/>
-    <description>JOGL Version</description>
-    <offline-allowed/>
-  </information>
-  <update check="background" policy="always"/>
-
-    <resources>
-      <j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+"/>
-      <!-- property name="sun.java2d.noddraw" value="true"/-->
-      <extension name="newt-all-awt" href="JOGL_CODEBASE_TAG/newt-all-awt.jnlp" />
-    </resources>
-
-  <applet-desc 
-      name="Version-Applet"
-      main-class="jogamp.newt.awt.opengl.VersionApplet"
-      width="800" 
-      height="600">
-  </applet-desc>
-</jnlp>
diff --git a/jnlp-files/application-version.jnlp b/jnlp-files/application-version.jnlp
deleted file mode 100644
index 3fac56c..0000000
--- a/jnlp-files/application-version.jnlp
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<jnlp codebase="JOGL_CODEBASE_TAG" href="applet-version.jnlp" version="JOGAMP_VERSION">
-  <information>
-    <title>JOGL JNLP Application Version</title>
-    <vendor>JogAmp Community</vendor>
-    <homepage href="http://jogamp.org/"/>
-    <description>JOGL Version</description>
-    <offline-allowed/>
-  </information>
-  <update check="background" policy="always"/>
-
-    <resources>
-      <j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+"/>
-      <!-- property name="sun.java2d.noddraw" value="true"/-->
-      <extension name="newt-all-awt" href="JOGL_CODEBASE_TAG/newt-all-awt.jnlp" />
-    </resources>
-
-  <application-desc main-class="jogamp.newt.awt.opengl.VersionApplet"/>
-</jnlp>
diff --git a/jnlp-files/atomic/jogl-awt.jnlp b/jnlp-files/atomic/jogl-awt.jnlp
new file mode 100644
index 0000000..a33eb35
--- /dev/null
+++ b/jnlp-files/atomic/jogl-awt.jnlp
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp codebase="JOGL_CODEBASE_TAG/"
+      href="jogl-awt.jnlp" version="JOGAMP_VERSION">
+  <information>
+    <title>Java(tm) Binding to the OpenGL(r) API (AWT)</title>
+    <vendor>JogAmp Community</vendor>
+    <homepage href="http://jogamp.org/"/>
+    <description>Java Binding to the OpenGL API - 2.0.0 - AWT</description>
+    <description kind="short">Java programming language binding for the OpenGL 3D graphics API - AWT</description>
+    <offline-allowed/>
+  </information>
+  <update check="background" policy="always"/>
+  <security>
+      <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" />
+
+      <extension name="nativewindow" href="JOGL_CODEBASE_TAG/nativewindow-awt.jnlp" />
+    </resources>
+
+    <resources os="Windows" arch="x86">
+      <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" />
+      <nativelib href = "jar/atomic/jogl-natives-windows-amd64.jar" />
+    </resources>
+    <resources os="Windows" arch="x86_64">
+      <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" />
+      <nativelib href = "jar/atomic/jogl-natives-solaris-sparc.jar" />
+    </resources>
+    <resources os="SunOS" arch="sparcv9">
+      <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" />
+      <nativelib href = "jar/atomic/jogl-natives-solaris-i586.jar" />
+    </resources>
+    <resources os="SunOS" arch="amd64">
+      <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" />
+      <nativelib href = "jar/atomic/jogl-natives-solaris-amd64.jar" />
+    </resources>
+    <resources os="Linux" arch="i386">
+      <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" />
+      <nativelib href = "jar/atomic/jogl-natives-linux-i586.jar" />
+    </resources>
+    <resources os="Linux" arch="amd64">
+      <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" />
+      <nativelib href = "jar/atomic/jogl-natives-linux-amd64.jar" />
+    </resources>
+    <resources os="Linux" arch="arm">
+      <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" />
+      <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" />
+      <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" />
+      <nativelib href = "jar/atomic/jogl-natives-macosx-universal.jar" />
+    </resources>
+
+  <component-desc />
+</jnlp>
diff --git a/jnlp-files/atomic/jogl-noawt.jnlp b/jnlp-files/atomic/jogl-noawt.jnlp
new file mode 100644
index 0000000..3463a19
--- /dev/null
+++ b/jnlp-files/atomic/jogl-noawt.jnlp
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp codebase="JOGL_CODEBASE_TAG/"
+      href="jogl-noawt.jnlp" version="JOGAMP_VERSION">
+  <information>
+    <title>Java(tm) Binding to the OpenGL(r) API (NO_AWT)</title>
+    <vendor>JogAmp Community</vendor>
+    <homepage href="http://jogamp.org/"/>
+    <description>Java Binding to the OpenGL API - 2.0.0 - NO_AWT</description>
+    <description kind="short">Java programming language binding for the OpenGL 3D graphics API - NO_AWT</description>
+    <offline-allowed/>
+  </information>
+  <update check="background" policy="always"/>
+  <security>
+      <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" />
+
+      <extension name="nativewindow" href="JOGL_CODEBASE_TAG/nativewindow-noawt.jnlp" />
+    </resources>
+
+    <resources os="Windows" arch="x86">
+      <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" />
+      <nativelib href = "jar/atomic/jogl-natives-windows-amd64.jar" />
+    </resources>
+    <resources os="Windows" arch="x86_64">
+      <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" />
+      <nativelib href = "jar/atomic/jogl-natives-solaris-sparc.jar" />
+    </resources>
+    <resources os="SunOS" arch="sparcv9">
+      <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" />
+      <nativelib href = "jar/atomic/jogl-natives-solaris-i586.jar" />
+    </resources>
+    <resources os="SunOS" arch="amd64">
+      <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" />
+      <nativelib href = "jar/atomic/jogl-natives-solaris-amd64.jar" />
+    </resources>
+    <resources os="Linux" arch="i386">
+      <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" />
+      <nativelib href = "jar/atomic/jogl-natives-linux-i586.jar" />
+    </resources>
+    <resources os="Linux" arch="amd64">
+      <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" />
+      <nativelib href = "jar/atomic/jogl-natives-linux-amd64.jar" />
+    </resources>
+    <resources os="Linux" arch="arm">
+      <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" />
+      <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" />
+      <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" />
+      <nativelib href = "jar/atomic/jogl-natives-macosx-universal.jar" />
+    </resources>
+
+  <component-desc />
+</jnlp>
diff --git a/jnlp-files/atomic/nativewindow-awt.jnlp b/jnlp-files/atomic/nativewindow-awt.jnlp
new file mode 100644
index 0000000..db80b64
--- /dev/null
+++ b/jnlp-files/atomic/nativewindow-awt.jnlp
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp codebase="JOGL_CODEBASE_TAG"
+      href="nativewindow-awt.jnlp" version="JOGAMP_VERSION">
+  <information>
+    <title>Java(tm) NativeWindow Interface API (AWT)</title>
+    <vendor>JogAmp Community</vendor>
+    <homepage href="http://jogamp.org/"/>
+    <description>Java API for a binding to a native windowing system - 2.0 - AWT</description>
+    <description kind="short">Java API for a binding to a native windowing system - 2.0 - AWT</description>
+    <offline-allowed/>
+  </information>
+  <update check="background" policy="always"/>
+  <security>
+      <all-permissions/>
+  </security>
+    <resources>
+      <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">
+      <nativelib href = "jar/atomic/nativewindow-natives-windows-i586.jar" />
+    </resources>
+    <resources os="Windows" arch="amd64">
+      <nativelib href = "jar/atomic/nativewindow-natives-windows-amd64.jar" />
+    </resources>
+    <resources os="Windows" arch="x86_64">
+      <nativelib href = "jar/atomic/nativewindow-natives-windows-amd64.jar" />
+    </resources>
+    <resources os="SunOS" arch="sparc">
+      <nativelib href = "jar/atomic/nativewindow-natives-solaris-sparc.jar" />
+    </resources>
+    <resources os="SunOS" arch="sparcv9">
+      <nativelib href = "jar/atomic/nativewindow-natives-solaris-sparcv9.jar" />
+    </resources>
+    <resources os="SunOS" arch="x86">
+      <nativelib href = "jar/atomic/nativewindow-natives-solaris-i586.jar" />
+    </resources>
+    <resources os="SunOS" arch="amd64">
+      <nativelib href = "jar/atomic/nativewindow-natives-solaris-amd64.jar" />
+    </resources>
+    <resources os="SunOS" arch="x86_64">
+      <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">
+      <nativelib href = "jar/atomic/nativewindow-natives-linux-i586.jar" />
+    </resources>
+    <resources os="Linux" arch="amd64">
+      <nativelib href = "jar/atomic/nativewindow-natives-linux-amd64.jar" />
+    </resources>
+    <resources os="Linux" arch="x86_64">
+      <nativelib href = "jar/atomic/nativewindow-natives-linux-amd64.jar" />
+    </resources>
+    <resources os="Linux" arch="arm">
+      <nativelib href = "jar/atomic/nativewindow-natives-linux-armv7.jar" />
+    </resources>
+    <resources os="Linux" arch="armv7">
+      <nativelib href = "jar/atomic/nativewindow-natives-linux-armv7.jar" />
+    </resources>
+    <resources os="Mac OS X" arch="i386">
+      <nativelib href = "jar/atomic/nativewindow-natives-macosx-universal.jar" />
+    </resources>
+    <resources os="Mac OS X" arch="x86_64">
+      <nativelib href = "jar/atomic/nativewindow-natives-macosx-universal.jar" />
+    </resources>
+
+  <component-desc />
+</jnlp>
diff --git a/jnlp-files/atomic/nativewindow-noawt.jnlp b/jnlp-files/atomic/nativewindow-noawt.jnlp
new file mode 100644
index 0000000..fed7310
--- /dev/null
+++ b/jnlp-files/atomic/nativewindow-noawt.jnlp
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp codebase="JOGL_CODEBASE_TAG"
+      href="nativewindow-noawt.jnlp" version="JOGAMP_VERSION">
+  <information>
+    <title>Java(tm) NativeWindow Interface API (NO_AWT)</title>
+    <vendor>JogAmp Community</vendor>
+    <homepage href="http://jogamp.org/"/>
+    <description>Java API for a binding to a native windowing system - 2.0 - NO_AWT</description>
+    <description kind="short">Java API for a binding to a native windowing system - 2.0 - NO_AWT</description>
+    <offline-allowed/>
+  </information>
+  <update check="background" policy="always"/>
+  <security>
+      <all-permissions/>
+  </security>
+    <resources>
+      <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" />
+      <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">
+      <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" />
+      <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">
+      <nativelib href = "jar/atomic/nativewindow-natives-linux-armv7.jar" />
+    </resources>
+    <resources os="Linux" arch="armv7">
+      <nativelib href = "jar/atomic/nativewindow-natives-linux-armv7.jar" />
+    </resources>
+    <resources os="Mac OS X" arch="i386">
+      <nativelib href = "jar/atomic/nativewindow-natives-macosx-universal.jar" />
+    </resources>
+    <resources os="Mac OS X" arch="x86_64">
+      <nativelib href = "jar/atomic/nativewindow-natives-macosx-universal.jar" />
+    </resources>
+
+  <component-desc />
+</jnlp>
diff --git a/jnlp-files/atomic/newt-awt-jogl.jnlp b/jnlp-files/atomic/newt-awt-jogl.jnlp
new file mode 100644
index 0000000..69406e4
--- /dev/null
+++ b/jnlp-files/atomic/newt-awt-jogl.jnlp
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp codebase="JOGL_CODEBASE_TAG"
+      href="newt-awt-jogl.jnlp" version="JOGAMP_VERSION">
+  <information>
+    <title>NEWT - New Windowing Toolkit (AWT, JOGL)</title>
+    <vendor>JogAmp Community</vendor>
+    <homepage href="http://jogamp.org/"/>
+    <description>NEWT - A NativeWindow Interface implementation - AWT, JOGL</description>
+    <description kind="short">NEWT - A NativeWindow Interface implementation - AWT, JOGL</description>
+    <offline-allowed/>
+  </information>
+  <update check="background" policy="always"/>
+  <security>
+      <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" />
+      <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" />
+      <nativelib href = "jar/atomic/newt-natives-windows-i586.jar" />
+    </resources>
+    <resources os="Windows" arch="amd64">
+      <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" />
+      <nativelib href = "jar/atomic/newt-natives-windows-amd64.jar" />
+    </resources>
+    <resources os="SunOS" arch="sparc">
+      <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" />
+      <nativelib href = "jar/atomic/newt-natives-solaris-sparcv9.jar" />
+    </resources>
+    <resources os="SunOS" arch="x86">
+      <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" />
+      <nativelib href = "jar/atomic/newt-natives-solaris-amd64.jar" />
+    </resources>
+    <resources os="SunOS" arch="x86_64">
+      <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" />
+      <nativelib href = "jar/atomic/newt-natives-linux-i586.jar" />
+    </resources>
+    <resources os="Linux" arch="x86">
+      <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" />
+      <nativelib href = "jar/atomic/newt-natives-linux-amd64.jar" />
+    </resources>
+    <resources os="Linux" arch="x86_64">
+      <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" />
+      <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" />
+      <nativelib href = "jar/atomic/newt-natives-macosx-universal.jar" />
+    </resources>
+
+  <component-desc />
+</jnlp>
diff --git a/jnlp-files/atomic/newt-awt.jnlp b/jnlp-files/atomic/newt-awt.jnlp
new file mode 100644
index 0000000..26e45e3
--- /dev/null
+++ b/jnlp-files/atomic/newt-awt.jnlp
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp codebase="JOGL_CODEBASE_TAG"
+      href="newt-awt.jnlp" version="JOGAMP_VERSION">
+  <information>
+    <title>NEWT - New Windowing Toolkit (AWT)</title>
+    <vendor>JogAmp Community</vendor>
+    <homepage href="http://jogamp.org/"/>
+    <description>NEWT - A NativeWindow Interface implementation - AWT</description>
+    <description kind="short">NEWT - A NativeWindow Interface implementation - AWT</description>
+    <offline-allowed/>
+  </information>
+  <update check="background" policy="always"/>
+  <security>
+      <all-permissions/>
+  </security>
+    <resources>
+      <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" />
+      <nativelib href = "jar/atomic/newt-natives-windows-i586.jar" />
+    </resources>
+    <resources os="Windows" arch="amd64">
+      <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" />
+      <nativelib href = "jar/atomic/newt-natives-windows-amd64.jar" />
+    </resources>
+    <resources os="SunOS" arch="sparc">
+      <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" />
+      <nativelib href = "jar/atomic/newt-natives-solaris-sparcv9.jar" />
+    </resources>
+    <resources os="SunOS" arch="x86">
+      <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" />
+      <nativelib href = "jar/atomic/newt-natives-solaris-amd64.jar" />
+    </resources>
+    <resources os="SunOS" arch="x86_64">
+      <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" />
+      <nativelib href = "jar/atomic/newt-natives-linux-i586.jar" />
+    </resources>
+    <resources os="Linux" arch="x86">
+      <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" />
+      <nativelib href = "jar/atomic/newt-natives-linux-amd64.jar" />
+    </resources>
+    <resources os="Linux" arch="x86_64">
+      <jar href="jar/atomic/newt.driver.x11.jar" />
+      <nativelib href = "jar/atomic/newt-natives-linux-amd64.jar" />
+    </resources>
+    <resources os="Linux" arch="arm">
+      <nativelib href = "jar/atomic/newt-natives-linux-armv7.jar" />
+    </resources>
+    <resources os="Linux" arch="armv7">
+      <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" />
+      <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" />
+      <nativelib href = "jar/atomic/newt-natives-macosx-universal.jar" />
+    </resources>
+
+  <component-desc />
+</jnlp>
diff --git a/jnlp-files/atomic/newt-noawt-jogl.jnlp b/jnlp-files/atomic/newt-noawt-jogl.jnlp
new file mode 100644
index 0000000..ced8b29
--- /dev/null
+++ b/jnlp-files/atomic/newt-noawt-jogl.jnlp
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp codebase="JOGL_CODEBASE_TAG"
+      href="newt-noawt-jogl.jnlp" version="JOGAMP_VERSION">
+  <information>
+    <title>NEWT - New Windowing Toolkit (NO_AWT, JOGL)</title>
+    <vendor>JogAmp Community</vendor>
+    <homepage href="http://jogamp.org/"/>
+    <description>NEWT - A NativeWindow Interface implementation - NO_AWT, JOGL</description>
+    <description kind="short">NEWT - A NativeWindow Interface implementation - NO_AWT, JOGL</description>
+    <offline-allowed/>
+  </information>
+  <update check="background" policy="always"/>
+  <security>
+      <all-permissions/>
+  </security>
+    <resources>
+      <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" />
+      <nativelib href = "jar/atomic/newt-natives-windows-i586.jar" />
+    </resources>
+    <resources os="Windows" arch="amd64">
+      <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" />
+      <nativelib href = "jar/atomic/newt-natives-windows-amd64.jar" />
+    </resources>
+    <resources os="SunOS" arch="sparc">
+      <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" />
+      <nativelib href = "jar/atomic/newt-natives-solaris-sparcv9.jar" />
+    </resources>
+    <resources os="SunOS" arch="x86">
+      <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" />
+      <nativelib href = "jar/atomic/newt-natives-solaris-amd64.jar" />
+    </resources>
+    <resources os="SunOS" arch="x86_64">
+      <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" />
+      <nativelib href = "jar/atomic/newt-natives-linux-i586.jar" />
+    </resources>
+    <resources os="Linux" arch="x86">
+      <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" />
+      <nativelib href = "jar/atomic/newt-natives-linux-amd64.jar" />
+    </resources>
+    <resources os="Linux" arch="x86_64">
+      <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" />
+      <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" />
+      <nativelib href = "jar/atomic/newt-natives-macosx-universal.jar" />
+    </resources>
+
+  <component-desc />
+</jnlp>
diff --git a/jnlp-files/atomic/newt-noawt.jnlp b/jnlp-files/atomic/newt-noawt.jnlp
new file mode 100644
index 0000000..1616dff
--- /dev/null
+++ b/jnlp-files/atomic/newt-noawt.jnlp
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp codebase="JOGL_CODEBASE_TAG"
+      href="newt-noawt.jnlp" version="JOGAMP_VERSION">
+  <information>
+    <title>NEWT - New Windowing Toolkit (NO_AWT)</title>
+    <vendor>JogAmp Community</vendor>
+    <homepage href="http://jogamp.org/"/>
+    <description>NEWT - A NativeWindow Interface implementation - NO_AWT</description>
+    <description kind="short">NEWT - A NativeWindow Interface implementation - NO_AWT</description>
+    <offline-allowed/>
+  </information>
+  <update check="background" policy="always"/>
+  <security>
+      <all-permissions/>
+  </security>
+    <resources>
+      <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" />
+      <nativelib href = "jar/atomic/newt-natives-windows-i586.jar" />
+    </resources>
+    <resources os="Windows" arch="amd64">
+      <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" />
+      <nativelib href = "jar/atomic/newt-natives-windows-amd64.jar" />
+    </resources>
+    <resources os="SunOS" arch="sparc">
+      <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" />
+      <nativelib href = "jar/atomic/newt-natives-solaris-sparcv9.jar" />
+    </resources>
+    <resources os="SunOS" arch="x86">
+      <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" />
+      <nativelib href = "jar/atomic/newt-natives-solaris-amd64.jar" />
+    </resources>
+    <resources os="SunOS" arch="x86_64">
+      <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" />
+      <nativelib href = "jar/atomic/newt-natives-linux-i586.jar" />
+    </resources>
+    <resources os="Linux" arch="x86">
+      <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" />
+      <nativelib href = "jar/atomic/newt-natives-linux-amd64.jar" />
+    </resources>
+    <resources os="Linux" arch="x86_64">
+      <jar href="jar/atomic/newt.driver.x11.jar" />
+      <nativelib href = "jar/atomic/newt-natives-linux-amd64.jar" />
+    </resources>
+    <resources os="Linux" arch="arm">
+      <nativelib href = "jar/atomic/newt-natives-linux-armv7.jar" />
+    </resources>
+    <resources os="Linux" arch="armv7">
+      <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" />
+      <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" />
+      <nativelib href = "jar/atomic/newt-natives-macosx-universal.jar" />
+    </resources>
+
+  <component-desc />
+</jnlp>
diff --git a/jnlp-files/javaws-version.jnlp b/jnlp-files/javaws-version.jnlp
deleted file mode 100755
index fa14f95..0000000
--- a/jnlp-files/javaws-version.jnlp
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<jnlp codebase="JOGL_CODEBASE_TAG" href="javaws-version.jnlp" version="JOGAMP_VERSION">
-  <information>
-    <title>JOGL JNLP Javaws Version</title>
-    <vendor>JogAmp Community</vendor>
-    <homepage href="http://jogamp.org/"/>
-    <description>JOGL Version</description>
-    <offline-allowed/>
-  </information>
-  <update check="background" policy="always"/>
-
-    <resources>
-      <j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+"/>
-      <!-- property name="sun.java2d.noddraw" value="true"/-->
-      <extension name="newt-all-awt" href="JOGL_CODEBASE_TAG/newt-all-awt.jnlp" />
-    </resources>
-
-  <application-desc main-class="jogamp.newt.awt.opengl.VersionApplet"/>
-</jnlp>
diff --git a/jnlp-files/jogl-all-awt.jnlp b/jnlp-files/jogl-all-awt.jnlp
index 822c26a..55ae21d 100644
--- a/jnlp-files/jogl-all-awt.jnlp
+++ b/jnlp-files/jogl-all-awt.jnlp
@@ -5,7 +5,7 @@
     <title>Java(tm) Binding to the OpenGL(r) API (ALL.AWT)</title>
     <vendor>JogAmp Community</vendor>
     <homepage href="http://jogamp.org/"/>
-    <description>Java Binding to the OpenGL API - JSR-231 2.0.0 - ALL.AWT</description>
+    <description>Java Binding to the OpenGL API - 2.0.0 - ALL.AWT</description>
     <description kind="short">Java programming language binding for the OpenGL 3D graphics API - ALL.AWT</description>
     <offline-allowed/>
   </information>
@@ -14,53 +14,58 @@
       <all-permissions/>
   </security>
     <resources>
-      <jar href="jogl.all.jar" />
+      <jar href="jar/jogl.all.jar" />
 
       <extension name="gluegen-rt"   href="GLUEGEN_CODEBASE_TAG/gluegen-rt.jnlp" />
-      <extension name="nativewindow-all-awt" href="JOGL_CODEBASE_TAG/nativewindow-all-awt.jnlp" />
     </resources>
 
     <resources os="Windows" arch="x86">
-      <nativelib href = "jogl-natives-windows-i586.jar" />
+      <nativelib href = "jar/jogl-all-natives-windows-i586.jar" />
     </resources>
     <resources os="Windows" arch="amd64">
-      <nativelib href = "jogl-natives-windows-amd64.jar" />
+      <nativelib href = "jar/jogl-all-natives-windows-amd64.jar" />
     </resources>
     <resources os="Windows" arch="x86_64">
-      <nativelib href = "jogl-natives-windows-amd64.jar" />
+      <nativelib href = "jar/jogl-all-natives-windows-amd64.jar" />
     </resources>
     <resources os="SunOS" arch="sparc">
-      <nativelib href = "jogl-natives-solaris-sparc.jar" />
+      <nativelib href = "jar/jogl-all-natives-solaris-sparc.jar" />
     </resources>
     <resources os="SunOS" arch="sparcv9">
-      <nativelib href = "jogl-natives-solaris-sparcv9.jar" />
+      <nativelib href = "jar/jogl-all-natives-solaris-sparcv9.jar" />
     </resources>
     <resources os="SunOS" arch="x86">
-      <nativelib href = "jogl-natives-solaris-i586.jar" />
+      <nativelib href = "jar/jogl-all-natives-solaris-i586.jar" />
     </resources>
     <resources os="SunOS" arch="amd64">
-      <nativelib href = "jogl-natives-solaris-amd64.jar" />
+      <nativelib href = "jar/jogl-all-natives-solaris-amd64.jar" />
     </resources>
     <resources os="SunOS" arch="x86_64">
-      <nativelib href = "jogl-natives-solaris-amd64.jar" />
+      <nativelib href = "jar/jogl-all-natives-solaris-amd64.jar" />
     </resources>
     <resources os="Linux" arch="i386">
-      <nativelib href = "jogl-natives-linux-i586.jar" />
+      <nativelib href = "jar/jogl-all-natives-linux-i586.jar" />
     </resources>
     <resources os="Linux" arch="x86">
-      <nativelib href = "jogl-natives-linux-i586.jar" />
+      <nativelib href = "jar/jogl-all-natives-linux-i586.jar" />
     </resources>
     <resources os="Linux" arch="amd64">
-      <nativelib href = "jogl-natives-linux-amd64.jar" />
+      <nativelib href = "jar/jogl-all-natives-linux-amd64.jar" />
     </resources>
     <resources os="Linux" arch="x86_64">
-      <nativelib href = "jogl-natives-linux-amd64.jar" />
+      <nativelib href = "jar/jogl-all-natives-linux-amd64.jar" />
+    </resources>
+    <resources os="Linux" arch="arm">
+      <nativelib href = "jar/jogl-all-natives-linux-armv7.jar" />
+    </resources>
+    <resources os="Linux" arch="armv7">
+      <nativelib href = "jar/jogl-all-natives-linux-armv7.jar" />
     </resources>
     <resources os="Mac OS X" arch="i386">
-      <nativelib href = "jogl-natives-macosx-universal.jar" />
+      <nativelib href = "jar/jogl-all-natives-macosx-universal.jar" />
     </resources>
     <resources os="Mac OS X" arch="x86_64">
-      <nativelib href = "jogl-natives-macosx-universal.jar" />
+      <nativelib href = "jar/jogl-all-natives-macosx-universal.jar" />
     </resources>
 
   <component-desc />
diff --git a/jnlp-files/jogl-all-mobile.jnlp b/jnlp-files/jogl-all-mobile.jnlp
new file mode 100644
index 0000000..5f96137
--- /dev/null
+++ b/jnlp-files/jogl-all-mobile.jnlp
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp codebase="JOGL_CODEBASE_TAG/"
+      href="jogl-all-mobile.jnlp" version="JOGAMP_VERSION">
+  <information>
+    <title>Java(tm) Binding to the OpenGL(r) API (ALL.MOBILE)</title>
+    <vendor>JogAmp Community</vendor>
+    <homepage href="http://jogamp.org/"/>
+    <description>Java Binding to the OpenGL API - 2.0.0 - ALL.MOBILE</description>
+    <description kind="short">Java programming language binding for the OpenGL 3D graphics API - ALL.MOBILE</description>
+    <offline-allowed/>
+  </information>
+  <update check="background" policy="always"/>
+  <security>
+      <all-permissions/>
+  </security>
+    <resources>
+      <jar href="jar/jogl.all-mobile.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" />
+    </resources>
+    <resources os="Windows" arch="amd64">
+      <nativelib href = "jar/jogl-all-natives-windows-amd64.jar" />
+    </resources>
+    <resources os="Windows" arch="x86_64">
+      <nativelib href = "jar/jogl-all-natives-windows-amd64.jar" />
+    </resources>
+    <resources os="SunOS" arch="sparc">
+      <nativelib href = "jar/jogl-all-natives-solaris-sparc.jar" />
+    </resources>
+    <resources os="SunOS" arch="sparcv9">
+      <nativelib href = "jar/jogl-all-natives-solaris-sparcv9.jar" />
+    </resources>
+    <resources os="SunOS" arch="x86">
+      <nativelib href = "jar/jogl-all-natives-solaris-i586.jar" />
+    </resources>
+    <resources os="SunOS" arch="amd64">
+      <nativelib href = "jar/jogl-all-natives-solaris-amd64.jar" />
+    </resources>
+    <resources os="SunOS" arch="x86_64">
+      <nativelib href = "jar/jogl-all-natives-solaris-amd64.jar" />
+    </resources>
+    <resources os="Linux" arch="i386">
+      <nativelib href = "jar/jogl-all-natives-linux-i586.jar" />
+    </resources>
+    <resources os="Linux" arch="x86">
+      <nativelib href = "jar/jogl-all-natives-linux-i586.jar" />
+    </resources>
+    <resources os="Linux" arch="amd64">
+      <nativelib href = "jar/jogl-all-natives-linux-amd64.jar" />
+    </resources>
+    <resources os="Linux" arch="x86_64">
+      <nativelib href = "jar/jogl-all-natives-linux-amd64.jar" />
+    </resources>
+    <resources os="Linux" arch="arm">
+      <nativelib href = "jar/jogl-all-natives-linux-armv7.jar" />
+    </resources>
+    <resources os="Linux" arch="armv7">
+      <nativelib href = "jar/jogl-all-natives-linux-armv7.jar" />
+    </resources>
+    <resources os="Mac OS X" arch="i386">
+      <nativelib href = "jar/jogl-all-natives-macosx-universal.jar" />
+    </resources>
+    <resources os="Mac OS X" arch="x86_64">
+      <nativelib href = "jar/jogl-all-natives-macosx-universal.jar" />
+    </resources>
+
+  <component-desc />
+</jnlp>
diff --git a/jnlp-files/jogl-all-noawt.jnlp b/jnlp-files/jogl-all-noawt.jnlp
index 55b548f..63f558d 100644
--- a/jnlp-files/jogl-all-noawt.jnlp
+++ b/jnlp-files/jogl-all-noawt.jnlp
@@ -5,7 +5,7 @@
     <title>Java(tm) Binding to the OpenGL(r) API (ALL.NO_AWT)</title>
     <vendor>JogAmp Community</vendor>
     <homepage href="http://jogamp.org/"/>
-    <description>Java Binding to the OpenGL API - JSR-231 2.0.0 - ALL.NO_AWT</description>
+    <description>Java Binding to the OpenGL API - 2.0.0 - ALL.NO_AWT</description>
     <description kind="short">Java programming language binding for the OpenGL 3D graphics API - ALL.NO_AWT</description>
     <offline-allowed/>
   </information>
@@ -14,53 +14,58 @@
       <all-permissions/>
   </security>
     <resources>
-      <jar href="jogl.all-noawt.jar" />
+      <jar href="jar/jogl.all-noawt.jar" />
 
       <extension name="gluegen-rt"   href="GLUEGEN_CODEBASE_TAG/gluegen-rt.jnlp" />
-      <extension name="nativewindow" href="JOGL_CODEBASE_TAG/nativewindow.jnlp" />
     </resources>
 
     <resources os="Windows" arch="x86">
-      <nativelib href = "jogl-natives-windows-i586.jar" />
+      <nativelib href = "jar/jogl-all-natives-windows-i586.jar" />
     </resources>
     <resources os="Windows" arch="amd64">
-      <nativelib href = "jogl-natives-windows-amd64.jar" />
+      <nativelib href = "jar/jogl-all-natives-windows-amd64.jar" />
     </resources>
     <resources os="Windows" arch="x86_64">
-      <nativelib href = "jogl-natives-windows-amd64.jar" />
+      <nativelib href = "jar/jogl-all-natives-windows-amd64.jar" />
     </resources>
     <resources os="SunOS" arch="sparc">
-      <nativelib href = "jogl-natives-solaris-sparc.jar" />
+      <nativelib href = "jar/jogl-all-natives-solaris-sparc.jar" />
     </resources>
     <resources os="SunOS" arch="sparcv9">
-      <nativelib href = "jogl-natives-solaris-sparcv9.jar" />
+      <nativelib href = "jar/jogl-all-natives-solaris-sparcv9.jar" />
     </resources>
     <resources os="SunOS" arch="x86">
-      <nativelib href = "jogl-natives-solaris-i586.jar" />
+      <nativelib href = "jar/jogl-all-natives-solaris-i586.jar" />
     </resources>
     <resources os="SunOS" arch="amd64">
-      <nativelib href = "jogl-natives-solaris-amd64.jar" />
+      <nativelib href = "jar/jogl-all-natives-solaris-amd64.jar" />
     </resources>
     <resources os="SunOS" arch="x86_64">
-      <nativelib href = "jogl-natives-solaris-amd64.jar" />
+      <nativelib href = "jar/jogl-all-natives-solaris-amd64.jar" />
     </resources>
     <resources os="Linux" arch="i386">
-      <nativelib href = "jogl-natives-linux-i586.jar" />
+      <nativelib href = "jar/jogl-all-natives-linux-i586.jar" />
     </resources>
     <resources os="Linux" arch="x86">
-      <nativelib href = "jogl-natives-linux-i586.jar" />
+      <nativelib href = "jar/jogl-all-natives-linux-i586.jar" />
     </resources>
     <resources os="Linux" arch="amd64">
-      <nativelib href = "jogl-natives-linux-amd64.jar" />
+      <nativelib href = "jar/jogl-all-natives-linux-amd64.jar" />
     </resources>
     <resources os="Linux" arch="x86_64">
-      <nativelib href = "jogl-natives-linux-amd64.jar" />
+      <nativelib href = "jar/jogl-all-natives-linux-amd64.jar" />
+    </resources>
+    <resources os="Linux" arch="arm">
+      <nativelib href = "jar/jogl-all-natives-linux-armv7.jar" />
+    </resources>
+    <resources os="Linux" arch="armv7">
+      <nativelib href = "jar/jogl-all-natives-linux-armv7.jar" />
     </resources>
     <resources os="Mac OS X" arch="i386">
-      <nativelib href = "jogl-natives-macosx-universal.jar" />
+      <nativelib href = "jar/jogl-all-natives-macosx-universal.jar" />
     </resources>
     <resources os="Mac OS X" arch="x86_64">
-      <nativelib href = "jogl-natives-macosx-universal.jar" />
+      <nativelib href = "jar/jogl-all-natives-macosx-universal.jar" />
     </resources>
 
   <component-desc />
diff --git a/jnlp-files/jogl-applet-runner-newt-ElektronenMultiplizierer-napplet.html b/jnlp-files/jogl-applet-runner-newt-ElektronenMultiplizierer-napplet.html
new file mode 100644
index 0000000..0f7fb0f
--- /dev/null
+++ b/jnlp-files/jogl-applet-runner-newt-ElektronenMultiplizierer-napplet.html
@@ -0,0 +1,67 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>Demoscene Passivist's Elektronen-Multiplizierer (NApplet)</title>
+</head>
+<body  BGCOLOR="#ffffff">
+
+<P>
+Demoscene Passivist's Elektronen-Multiplizierer
+</P>
+
+<P>
+<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
+      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/junit.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">
+   <param name="gl_swap_interval" value="1">
+   <param name="gl_debug" value="false">
+   <param name="gl_trace" value="false">
+   <comment>
+     <embed code="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run"
+          width="640" height="480"
+          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/junit.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"
+          gl_profile="GL2ES2"
+          gl_swap_interval="1"
+          gl_debug="false"
+          gl_trace="false">
+        <noembed>Sorry, no Java support detected.</noembed>
+     </embed>
+   </comment>
+</object>
+
+</P>
+
+<P>
+ElektronenMultiplizierer Keys:<br>
+<ul>
+        <li> Cursor-Left  - time backwards</li>
+        <li> Cursor-Right - time forward</li>
+</ul>
+</P>
+<P>
+JOGL NEWT JNLP Applet Runner Special Keys:<br>
+<ul>
+    <li> d - toggle decoration </li>
+    <li> f - toggle fullscreen </li>
+    <li> r - in/out browser window </li>
+    <li> a - on/off always-on-top </li>
+</ul>
+</P>
+
+</body>
+</html>
diff --git a/jnlp-files/jogl-applet-runner-newt-ElektronenMultiplizierer.html b/jnlp-files/jogl-applet-runner-newt-ElektronenMultiplizierer.html
new file mode 100644
index 0000000..4f03bdc
--- /dev/null
+++ b/jnlp-files/jogl-applet-runner-newt-ElektronenMultiplizierer.html
@@ -0,0 +1,84 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>Demoscene Passivist's Elektronen-Multiplizierer</title>
+</head>
+<body  BGCOLOR="#ffffff">
+
+<P>
+Demoscene Passivist's Elektronen-Multiplizierer
+</P>
+
+<P>
+<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
+      width="640" height="480">
+   <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/junit.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">
+   <param name="noddraw.check" value="true">
+   <param name="progressbar" value="true">
+   <param name="jnlpNumExtensions" value="1">
+   <param name="jnlpExtension1" value="jogl-all-awt.jnlp">
+   <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">
+   <param name="gl_swap_interval" value="1">
+   <param name="gl_debug" value="false">
+   <param name="gl_trace" value="false">
+   <param name="jnlp_href" value="jogl-applet-runner-newt.jnlp">
+   <comment>
+     <embed code="org.jdesktop.applet.util.JNLPAppletLauncher"
+          width="640" height="480"
+          type="application/x-java-applet;version=1.6"
+          pluginspage="http://java.sun.com/javase/downloads/ea.jsp"
+          archive="jar/applet-launcher.jar,
+                   jar/gluegen-rt.jar,
+                   jar/jogl.all.jar,
+                   jar/junit.jar,
+                   jar/jogl.test.jar"
+          codebase_lookup" value="false"
+          subapplet.classname="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run"
+          subapplet.displayname="ElektronenMultiplizierer"
+          noddraw.check="true"
+          progressbar="true"
+          jnlpNumExtensions="1"
+          jnlpExtension1="jogl-all-awt.jnlp"
+          java_arguments="-Dsun.java2d.noddraw=true"
+          gl_event_listener_class="com.jogamp.opengl.test.junit.jogl.demos.es2.ElektronenMultiplizierer"
+          gl_profile="GL2ES2"
+          gl_swap_interval="1"
+          gl_debug="false"
+          gl_trace="false"
+          jnlp_href="jogl-applet-runner-newt.jnlp">
+        <noembed>Sorry, no Java support detected.</noembed>
+     </embed>
+   </comment>
+</object>
+
+</P>
+
+<P>
+ElektronenMultiplizierer Keys:<br>
+<ul>
+        <li> Cursor-Left  - time backwards</li>
+        <li> Cursor-Right - time forward</li>
+</ul>
+</P>
+<P>
+JOGL NEWT JNLP Applet Runner Special Keys:<br>
+<ul>
+    <li> d - toggle decoration </li>
+    <li> f - toggle fullscreen </li>
+    <li> r - in/out browser window </li>
+    <li> a - on/off always-on-top </li>
+</ul>
+</P>
+
+</body>
+</html>
diff --git a/jnlp-files/jogl-applet-runner-newt-GraphTextDemo01-napplet.html b/jnlp-files/jogl-applet-runner-newt-GraphTextDemo01-napplet.html
new file mode 100644
index 0000000..e321741
--- /dev/null
+++ b/jnlp-files/jogl-applet-runner-newt-GraphTextDemo01-napplet.html
@@ -0,0 +1,68 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>JOGL Graph Text Demo 01 (NApplet)</title>
+</head>
+<body  BGCOLOR="#ffffff">
+
+<P>
+JOGL Graph Text Demo 01
+</P>
+
+<P>
+<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
+      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/junit.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">
+   <param name="gl_swap_interval" value="1">
+   <param name="gl_alpha" value="4">
+   <param name="gl_multisamplebuffer" value="4">
+   <param name="gl_nodefaultkeyListener" value="true">
+   <param name="gl_debug" value="false">
+   <param name="gl_trace" value="false">
+   <comment>
+     <embed code="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run"
+          width="800" height="400"
+          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/junit.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"
+          gl_swap_interval="1"
+          gl_alpha="4"
+          gl_multisamplebuffer="4"
+          gl_nodefaultkeyListener="true"
+          gl_debug="false"
+          gl_trace="false">
+        <noembed>Sorry, no Java support detected.</noembed>
+     </embed>
+   </comment>
+</object>
+</P>
+
+<P>
+Graph Text Demo Keys:<br>
+<ul>
+    <li> 1/2     - zoom in/out red-text </li>
+    <li> 6/7     - edit texture size if using VBAA (nope) </li>
+    <li> 0/9     - rotate the red-text </li>
+    <li> v       - toggle vsync </li>
+    <li> i       - live text input (CR ends it, backspace supported)</li>
+    <li> f       - toggle fps </li>
+    <li> h       - change text</li>
+    <li> space   - change font</li>
+</ul>
+</P>
+
+</body>
+</html>
diff --git a/jnlp-files/jogl-applet-runner-newt-GraphTextDemo01.html b/jnlp-files/jogl-applet-runner-newt-GraphTextDemo01.html
new file mode 100644
index 0000000..e9f54ad
--- /dev/null
+++ b/jnlp-files/jogl-applet-runner-newt-GraphTextDemo01.html
@@ -0,0 +1,86 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>JOGL Graph Text Demo 01</title>
+</head>
+<body  BGCOLOR="#ffffff">
+
+<P>
+JOGL Graph Text Demo 01
+</P>
+
+<P>
+<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
+      width="800" height="400">
+   <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/junit.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">
+   <param name="noddraw.check" value="true">
+   <param name="progressbar" value="true">
+   <param name="jnlpNumExtensions" value="1">
+   <param name="jnlpExtension1" value="jogl-all-awt.jnlp">
+   <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">
+   <param name="gl_swap_interval" value="1">
+   <param name="gl_alpha" value="4">
+   <param name="gl_multisamplebuffer" value="4">
+   <param name="gl_nodefaultkeyListener" value="true">
+   <param name="gl_debug" value="false">
+   <param name="gl_trace" value="false">
+   <param name="jnlp_href" value="jogl-applet-runner-newt.jnlp">
+   <comment>
+     <embed code="org.jdesktop.applet.util.JNLPAppletLauncher"
+          width="800" height="400"
+          type="application/x-java-applet;version=1.6"
+          pluginspage="http://java.sun.com/javase/downloads/ea.jsp"
+          archive="jar/applet-launcher.jar,
+                   jar/gluegen-rt.jar,
+                   jar/jogl.all.jar,
+                   jar/junit.jar,
+                   jar/jogl.test.jar"
+          codebase_lookup" value="false"
+          subapplet.classname="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run"
+          subapplet.displayname="JOGL Graph Text Demo01"
+          noddraw.check="true"
+          progressbar="true"
+          jnlpNumExtensions="1"
+          jnlpExtension1="jogl-all-awt.jnlp"
+          java_arguments="-Dsun.java2d.noddraw=true"
+          gl_event_listener_class="com.jogamp.opengl.test.junit.graph.demos.GPUTextGLListener0A"
+          gl_profile="GL2ES2"
+          gl_swap_interval="1"
+          gl_alpha="4"
+          gl_multisamplebuffer="4"
+          gl_nodefaultkeyListener="true"
+          gl_debug="false"
+          gl_trace="false"
+          jnlp_href="jogl-applet-runner-newt.jnlp">
+        <noembed>Sorry, no Java support detected.</noembed>
+     </embed>
+   </comment>
+</object>
+</P>
+
+<P>
+Graph Text Demo Keys:<br>
+<ul>
+    <li> 1/2     - zoom in/out red-text </li>
+    <li> 6/7     - edit texture size if using VBAA (nope) </li>
+    <li> 0/9     - rotate the red-text </li>
+    <li> v       - toggle vsync </li>
+    <li> i       - live text input (CR ends it, backspace supported)</li>
+    <li> f       - toggle fps </li>
+    <li> h       - change text</li>
+    <li> space   - change font</li>
+</ul>
+</P>
+
+</body>
+</html>
diff --git a/jnlp-files/jogl-applet-runner-newt-GraphUISceneDemo01-napplet.html b/jnlp-files/jogl-applet-runner-newt-GraphUISceneDemo01-napplet.html
new file mode 100644
index 0000000..784678e
--- /dev/null
+++ b/jnlp-files/jogl-applet-runner-newt-GraphUISceneDemo01-napplet.html
@@ -0,0 +1,69 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>JOGL Graph UI-Scene Demo 01 (NApplet)</title>
+</head>
+<body  BGCOLOR="#ffffff">
+
+<P>
+JOGL Graph UI-Scene Demo 01
+</P>
+
+<P>
+<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
+      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/junit.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">
+   <param name="gl_swap_interval" value="1">
+   <param name="gl_alpha" value="4">
+   <param name="gl_multisamplebuffer" value="4">
+   <param name="gl_debug" value="false">
+   <param name="gl_trace" value="false">
+   <comment>
+     <embed code="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run"
+          width="640" height="480"
+          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/junit.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"
+          gl_swap_interval="1"
+          gl_alpha="4"
+          gl_multisamplebuffer="4"
+          gl_debug="false"
+          gl_trace="false">
+        <noembed>Sorry, no Java support detected.</noembed>
+     </embed>
+   </comment>
+</object>
+
+</P>
+
+<P>
+Graph UI-Scene Demo Keys:<br>
+<ul>
+    <li> none - use mouse </li>
+</ul>
+</P>
+<P>
+JOGL NEWT JNLP Applet Runner Special Keys:<br>
+<ul>
+    <li> d - toggle decoration </li>
+    <li> f - toggle fullscreen </li>
+    <li> r - in/out browser window </li>
+    <li> a - on/off always-on-top </li>
+</ul>
+</P>
+
+</body>
+</html>
diff --git a/jnlp-files/jogl-applet-runner-newt-GraphUISceneDemo01.html b/jnlp-files/jogl-applet-runner-newt-GraphUISceneDemo01.html
new file mode 100644
index 0000000..b887314
--- /dev/null
+++ b/jnlp-files/jogl-applet-runner-newt-GraphUISceneDemo01.html
@@ -0,0 +1,87 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>JOGL Graph UI-Scene Demo 01</title>
+</head>
+<body  BGCOLOR="#ffffff">
+
+<P>
+JOGL Graph UI-Scene Demo 01
+</P>
+
+<P>
+<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
+      width="640" height="480">
+   <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/junit.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">
+   <param name="noddraw.check" value="true">
+   <param name="progressbar" value="true">
+   <param name="jnlpNumExtensions" value="1">
+   <param name="jnlpExtension1" value="jogl-all-awt.jnlp">
+   <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">
+   <param name="gl_swap_interval" value="1">
+   <param name="gl_alpha" value="4">
+   <param name="gl_multisamplebuffer" value="4">
+   <param name="gl_debug" value="false">
+   <param name="gl_trace" value="false">
+   <param name="jnlp_href" value="jogl-applet-runner-newt.jnlp">
+   <comment>
+     <embed code="org.jdesktop.applet.util.JNLPAppletLauncher"
+          width="640" height="480"
+          type="application/x-java-applet;version=1.6"
+          pluginspage="http://java.sun.com/javase/downloads/ea.jsp"
+          archive="jar/applet-launcher.jar,
+                   jar/gluegen-rt.jar,
+                   jar/jogl.all.jar,
+                   jar/junit.jar,
+                   jar/jogl.test.jar"
+          codebase_lookup" value="false"
+          subapplet.classname="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run"
+          subapplet.displayname="JOGL Graph UI Demo01"
+          noddraw.check="true"
+          progressbar="true"
+          jnlpNumExtensions="1"
+          jnlpExtension1="jogl-all-awt.jnlp"
+          java_arguments="-Dsun.java2d.noddraw=true"
+          gl_event_listener_class="com.jogamp.opengl.test.junit.graph.demos.GPUUISceneGLListener0A"
+          gl_profile="GL2ES2"
+          gl_swap_interval="1"
+          gl_alpha="4"
+          gl_multisamplebuffer="4"
+          gl_debug="false"
+          gl_trace="false"
+          jnlp_href="jogl-applet-runner-newt.jnlp">
+        <noembed>Sorry, no Java support detected.</noembed>
+     </embed>
+   </comment>
+</object>
+
+</P>
+
+<P>
+Graph UI-Scene Demo Keys:<br>
+<ul>
+    <li> none - use mouse </li>
+</ul>
+</P>
+<P>
+JOGL NEWT JNLP Applet Runner Special Keys:<br>
+<ul>
+    <li> d - toggle decoration </li>
+    <li> f - toggle fullscreen </li>
+    <li> r - in/out browser window </li>
+    <li> a - on/off always-on-top </li>
+</ul>
+</P>
+
+</body>
+</html>
diff --git a/jnlp-files/jogl-applet-runner-newt-gears-normal-launcheronly.html b/jnlp-files/jogl-applet-runner-newt-gears-normal-launcheronly.html
new file mode 100644
index 0000000..6e2a70f
--- /dev/null
+++ b/jnlp-files/jogl-applet-runner-newt-gears-normal-launcheronly.html
@@ -0,0 +1,147 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>JOGL NEWT JNLP Applet Runner - GearsES2 - normal - launcheronly</title>
+</head>
+<body  BGCOLOR="#ffffff">
+
+<P>
+JOGL NEWT JNLP Applet Runner Special Keys:<br>
+<ul>
+    <li> d - toggle decoration </li>
+    <li> f - toggle fullscreen </li>
+    <li> r - in/out browser window </li>
+    <li> a - on/off always-on-top </li>
+</ul>
+</P>
+
+<P>
+<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
+      width="200" height="200">
+   <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/junit.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">
+   <param name="noddraw.check" value="true">
+   <param name="progressbar" value="true">
+   <param name="jnlpNumExtensions" value="1">
+   <param name="jnlpExtension1" value="jogl-all-awt.jnlp">
+   <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">
+   <param name="gl_swap_interval" value="1">
+   <param name="gl_debug" value="false">
+   <param name="gl_trace" value="false">
+   <comment>
+     <embed code="org.jdesktop.applet.util.JNLPAppletLauncher"
+          width="200" height="200"
+          type="application/x-java-applet;version=1.6"
+          pluginspage="http://java.sun.com/javase/downloads/ea.jsp"
+          archive="jar/applet-launcher.jar,
+                   jar/gluegen-rt.jar,
+                   jar/jogl.all.jar,
+                   jar/junit.jar,
+                   jar/jogl.test.jar"
+          codebase_lookup" value="false"
+          subapplet.classname="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run"
+          subapplet.displayname="JOGL GearsES2 Applet"
+          noddraw.check="true"
+          progressbar="true"
+          jnlpNumExtensions="1"
+          jnlpExtension1="jogl-all-awt.jnlp"
+          java_arguments="-Dsun.java2d.noddraw=true"
+          gl_event_listener_class="com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2"
+          gl_profile="GL2ES2"
+          gl_swap_interval="1"
+          gl_debug="false"
+          gl_trace="false"
+        <noembed>Sorry, no Java support detected.</noembed>
+     </embed>
+   </comment>
+</object>
+
+</P>
+
+<P>
+
+The applet above is instantiated with the following code:
+
+<pre>
+<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
+      width="200" height="200">
+   <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/junit.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">
+   <param name="noddraw.check" value="true">
+   <param name="progressbar" value="true">
+   <param name="jnlpNumExtensions" value="1">
+   <param name="jnlpExtension1" value="jogl-all-awt.jnlp">
+   <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">
+   <param name="gl_swap_interval" value="1">
+   <param name="gl_debug" value="false">
+   <param name="gl_trace" value="false">
+   <comment>
+     <embed code="org.jdesktop.applet.util.JNLPAppletLauncher"
+          width="200" height="200"
+          type="application/x-java-applet;version=1.6"
+          pluginspage="http://java.sun.com/javase/downloads/ea.jsp"
+          archive="jar/applet-launcher.jar,
+                   jar/gluegen-rt.jar,
+                   jar/jogl.all.jar,
+                   jar/junit.jar,
+                   jar/jogl.test.jar"
+          codebase_lookup" value="false"
+          subapplet.classname="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run"
+          subapplet.displayname="JOGL GearsES2 Applet"
+          noddraw.check="true"
+          progressbar="true"
+          jnlpNumExtensions="1"
+          jnlpExtension1="jogl-all-awt.jnlp"
+          java_arguments="-Dsun.java2d.noddraw=true"
+          gl_event_listener_class="com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2"
+          gl_profile="GL2ES2"
+          gl_swap_interval="1"
+          gl_debug="false"
+          gl_trace="false"
+        <noembed>Sorry, no Java support detected.</noembed>
+     </embed>
+   </comment>
+</object>
+
+</pre>
+
+</P>
+<P>
+
+Note that the jogl-demos.jar, which contains the GearsApplet 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
+Java code which needs to be signed in order to deploy applets using
+JOGL and is the only certificate the end user must accept.
+
+</P>
+<P>
+
+The <a href="http://jogamp.org/applet-launcher/www/">JNLPAppletLauncher
+home page</a> contains more information about what files must be
+placed on the web server in order to enable the deployment of applets
+using JOGL and other extensions.
+
+</P>
+
+</body>
+</html>
diff --git a/jnlp-files/jogl-applet-runner-newt-gears-normal-napplet.html b/jnlp-files/jogl-applet-runner-newt-gears-normal-napplet.html
new file mode 100644
index 0000000..7a01e87
--- /dev/null
+++ b/jnlp-files/jogl-applet-runner-newt-gears-normal-napplet.html
@@ -0,0 +1,107 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>JOGL NEWT Applet Runner - GearsES2 - normal - Normal Applet</title>
+</head>
+<body  BGCOLOR="#ffffff">
+
+<P>
+JOGL NEWT Applet Runner Special Keys:<br>
+<ul>
+    <li> d - toggle decoration </li>
+    <li> f - toggle fullscreen </li>
+    <li> r - in/out browser window </li>
+    <li> a - on/off always-on-top </li>
+</ul>
+</P>
+
+<P>
+<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
+      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/junit.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">
+   <param name="gl_swap_interval" value="1">
+   <param name="gl_debug" value="false">
+   <param name="gl_trace" value="false">
+   <comment>
+     <embed code="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run"
+          width="200" height="200"
+          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/junit.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"
+          gl_swap_interval="1"
+          gl_debug="false"
+          gl_trace="false">
+        <noembed>Sorry, no Java support detected.</noembed>
+     </embed>
+   </comment>
+</object>
+
+</P>
+
+<P>
+
+The applet above is instantiated with the following code:
+
+<pre>
+<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
+      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/junit.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">
+   <param name="gl_swap_interval" value="1">
+   <param name="gl_debug" value="false">
+   <param name="gl_trace" value="false">
+   <comment>
+     <embed code="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run"
+          width="200" height="200"
+          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/junit.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"
+          gl_swap_interval="1"
+          gl_debug="false"
+          gl_trace="false">
+        <noembed>Sorry, no Java support detected.</noembed>
+     </embed>
+   </comment>
+</object>
+
+</pre>
+
+</P>
+<P>
+
+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
+Java code which needs to be signed in order to deploy applets using
+JOGL and is the only certificate the end user must accept.
+
+</P>
+
+</body>
+</html>
diff --git a/jnlp-files/jogl-applet-runner-newt-gears-normal.html b/jnlp-files/jogl-applet-runner-newt-gears-normal.html
new file mode 100644
index 0000000..7d6adc4
--- /dev/null
+++ b/jnlp-files/jogl-applet-runner-newt-gears-normal.html
@@ -0,0 +1,196 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>JOGL NEWT JNLP Applet Runner - GearsES2 - normal</title>
+</head>
+<body  BGCOLOR="#ffffff">
+
+<P>
+In case your <a href="https://jdk6.dev.java.net/plugin2/jnlp/">Java Plugin supports JNLP</a>, 
+the <em>jogl-applet-runner-newt.jnlp</em> is used, 
+otherwise it shall fallback to <a href="http://jogamp.org/applet-launcher/www/">JNLPAppletLauncher</a>.
+</P>
+
+<P>
+Note that it is important for the startup time to have the same JVM arguments in the applet tags,
+as well as within the JNLP applet description, here see property <em>sun.java2d.noddraw</em>. <br>
+Only if JVM arguments of the JNLP applet description are satisfied by the applet tag's JVM,<br>
+the plugin will not need to start a new JVM. OF course, the applet tag's JVM spec may exceed the
+JNLP applet's one.
+</P>
+
+<P>
+JOGL NEWT JNLP Applet Runner Special Keys:<br>
+<ul>
+    <li> d - toggle decoration </li>
+    <li> f - toggle fullscreen </li>
+    <li> r - in/out browser window </li>
+    <li> a - on/off always-on-top </li>
+</ul>
+</P>
+
+<P>
+<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
+      width="200" height="200">
+   <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/junit.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">
+   <param name="noddraw.check" value="true">
+   <param name="progressbar" value="true">
+   <param name="jnlpNumExtensions" value="1">
+   <param name="jnlpExtension1" value="jogl-all-awt.jnlp">
+   <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">
+   <param name="gl_swap_interval" value="1">
+   <param name="gl_debug" value="false">
+   <param name="gl_trace" value="false">
+   <param name="jnlp_href" value="jogl-applet-runner-newt.jnlp">
+   <comment>
+     <embed code="org.jdesktop.applet.util.JNLPAppletLauncher"
+          width="200" height="200"
+          type="application/x-java-applet;version=1.6"
+          pluginspage="http://java.sun.com/javase/downloads/ea.jsp"
+          archive="jar/applet-launcher.jar,
+                   jar/gluegen-rt.jar,
+                   jar/jogl.all.jar,
+                   jar/junit.jar,
+                   jar/jogl.test.jar"
+          codebase_lookup" value="false"
+          subapplet.classname="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run"
+          subapplet.displayname="JOGL GearsES2 Applet"
+          noddraw.check="true"
+          progressbar="true"
+          jnlpNumExtensions="1"
+          jnlpExtension1="jogl-all-awt.jnlp"
+          java_arguments="-Dsun.java2d.noddraw=true"
+          gl_event_listener_class="com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2"
+          gl_profile="GL2ES2"
+          gl_swap_interval="1"
+          gl_debug="false"
+          gl_trace="false"
+          jnlp_href="jogl-applet-runner-newt.jnlp">
+        <noembed>Sorry, no Java support detected.</noembed>
+     </embed>
+   </comment>
+</object>
+
+</P>
+
+<P>
+
+The applet above is instantiated with the following code:
+
+<pre>
+<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
+      width="200" height="200">
+   <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/junit.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">
+   <param name="noddraw.check" value="true">
+   <param name="progressbar" value="true">
+   <param name="jnlpNumExtensions" value="1">
+   <param name="jnlpExtension1" value="jogl-all-awt.jnlp">
+   <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">
+   <param name="gl_swap_interval" value="1">
+   <param name="gl_debug" value="false">
+   <param name="gl_trace" value="false">
+   <param name="jnlp_href" value="jogl-applet-runner-newt.jnlp">
+   <comment>
+     <embed code="org.jdesktop.applet.util.JNLPAppletLauncher"
+          width="200" height="200"
+          type="application/x-java-applet;version=1.6"
+          pluginspage="http://java.sun.com/javase/downloads/ea.jsp"
+          archive="jar/applet-launcher.jar,
+                   jar/gluegen-rt.jar,
+                   jar/jogl.all.jar,
+                   jar/junit.jar,
+                   jar/jogl.test.jar"
+          codebase_lookup" value="false"
+          subapplet.classname="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run"
+          subapplet.displayname="JOGL GearsES2 Applet"
+          noddraw.check="true"
+          progressbar="true"
+          jnlpNumExtensions="1"
+          jnlpExtension1="jogl-all-awt.jnlp"
+          java_arguments="-Dsun.java2d.noddraw=true"
+          gl_event_listener_class="com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2"
+          gl_profile="GL2ES2"
+          gl_swap_interval="1"
+          gl_debug="false"
+          gl_trace="false"
+          jnlp_href="jogl-applet-runner-newt.jnlp">
+        <noembed>Sorry, no Java support detected.</noembed>
+     </embed>
+   </comment>
+</object>
+
+</pre>
+
+Where the referenced JNLP file <em>jogl-applet-runner-newt.jnlp</em> looks as follow:
+
+<pre>
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp codebase="http://jogamp.org/deployment/jogamp-current" href="jogl-applet-runner-newt.jnlp" version="v2.0-rc3">
+  <information>
+    <title>JOGL JNLP Applet Runner NEWT</title>
+    <vendor>JogAmp Community</vendor>
+    <homepage href="http://jogamp.org/"/>
+    <description>JOGL JNLP Applet Runner NEWT</description>
+    <offline-allowed/>
+  </information>
+  <update check="background" policy="always"/>
+
+    <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/junit.jar" />
+      <extension name="jogl-all-awt" href="http://jogamp.org/deployment/jogamp-current/jogl-all-awt.jnlp" />
+    </resources>
+
+  <applet-desc 
+      name="JOGLNewtApplet1Run-Applet"
+      main-class="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run"
+      width="200" 
+      height="200">
+  </applet-desc>
+</jnlp>
+</pre>
+
+</P>
+<P>
+
+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
+Java code which needs to be signed in order to deploy applets using
+JOGL and is the only certificate the end user must accept.
+
+</P>
+<P>
+
+The <a href="http://jogamp.org/applet-launcher/www/">JNLPAppletLauncher
+home page</a> contains more information about what files must be
+placed on the web server in order to enable the deployment of applets
+using JOGL and other extensions.
+
+</P>
+
+</body>
+</html>
diff --git a/jnlp-files/jogl-applet-runner-newt-gears-special-napplet.html b/jnlp-files/jogl-applet-runner-newt-gears-special-napplet.html
new file mode 100644
index 0000000..4190fb6
--- /dev/null
+++ b/jnlp-files/jogl-applet-runner-newt-gears-special-napplet.html
@@ -0,0 +1,71 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>JOGL NEWT JNLP Applet Runner - GearsES2 - special (NApplet)</title>
+</head>
+<body  BGCOLOR="#ffffff">
+
+<P>
+JOGL NEWT JNLP Applet Runner Special Keys:
+<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
+      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/junit.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">
+   <param name="gl_swap_interval" value="1">
+   <param name="gl_undecorated" value="true">
+   <param name="gl_opaque" value="false">
+   <param name="gl_alwaysontop" value="true">
+   <param name="gl_dx" value="0">
+   <param name="gl_dy" value="-50">
+   <param name="gl_width" value="200">
+   <param name="gl_height" value="200">
+   <param name="gl_debug" value="false">
+   <param name="gl_trace" value="false">
+   <comment>
+     <embed code="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run"
+          width="1" height="1"
+          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/junit.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"
+          gl_swap_interval="1"
+          gl_undecorated="true"
+          gl_opaque="false"
+          gl_alwaysontop="true"
+          gl_dx="0"
+          gl_dy="-50"
+          gl_width="200"
+          gl_height="200"
+          gl_debug="false"
+          gl_trace="false">
+        <noembed>Sorry, no Java support detected.</noembed>
+     </embed>
+   </comment>
+</object> Hello Gears - Hello Gears - Hello Gears
+<br>
+<ul>
+    <li> d - toggle decoration </li>
+    <li> f - toggle fullscreen </li>
+    <li> r - in/out browser window </li>
+    <li> a - on/off always-on-top </li>
+</ul>
+Normal webpage text - Normal webpage text - Normal webpage text - Normal webpage text<br>
+Normal webpage text - Normal webpage text - Normal webpage text - Normal webpage text<br>
+Normal webpage text - Normal webpage text - Normal webpage text - Normal webpage text<br>
+Normal webpage text - Normal webpage text - Normal webpage text - Normal webpage text<br>
+</P>
+
+
+</body>
+</html>
diff --git a/jnlp-files/jogl-applet-runner-newt-gears-special.html b/jnlp-files/jogl-applet-runner-newt-gears-special.html
new file mode 100644
index 0000000..7141adb
--- /dev/null
+++ b/jnlp-files/jogl-applet-runner-newt-gears-special.html
@@ -0,0 +1,89 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>JOGL NEWT JNLP Applet Runner - GearsES2 - special</title>
+</head>
+<body  BGCOLOR="#ffffff">
+
+<P>
+JOGL NEWT JNLP Applet Runner Special Keys:
+<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
+      width="1" height="1">
+   <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/junit.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">
+   <param name="noddraw.check" value="true">
+   <param name="progressbar" value="true">
+   <param name="jnlpNumExtensions" value="1">
+   <param name="jnlpExtension1" value="jogl-all-awt.jnlp">
+   <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">
+   <param name="gl_swap_interval" value="1">
+   <param name="gl_undecorated" value="true">
+   <param name="gl_opaque" value="false">
+   <param name="gl_alwaysontop" value="true">
+   <param name="gl_dx" value="0">
+   <param name="gl_dy" value="-50">
+   <param name="gl_width" value="200">
+   <param name="gl_height" value="200">
+   <param name="gl_debug" value="false">
+   <param name="gl_trace" value="false">
+   <param name="jnlp_href" value="jogl-applet-runner-newt.jnlp">
+   <comment>
+     <embed code="org.jdesktop.applet.util.JNLPAppletLauncher"
+          width="1" height="1"
+          type="application/x-java-applet;version=1.6"
+          pluginspage="http://java.sun.com/javase/downloads/ea.jsp"
+          archive="jar/applet-launcher.jar,
+                   jar/gluegen-rt.jar,
+                   jar/jogl.all.jar,
+                   jar/junit.jar,
+                   jar/jogl.test.jar"
+          codebase_lookup" value="false"
+          subapplet.classname="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run"
+          subapplet.displayname="JOGL GearsES2 Applet Transparent"
+          noddraw.check="true"
+          progressbar="true"
+          jnlpNumExtensions="1"
+          jnlpExtension1="jogl-all-awt.jnlp"
+          java_arguments="-Dsun.java2d.noddraw=true"
+          gl_event_listener_class="com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2"
+          gl_profile="GL2ES2"
+          gl_swap_interval="1"
+          gl_undecorated="true"
+          gl_opaque="false"
+          gl_alwaysontop="true"
+          gl_dx="0"
+          gl_dy="-50"
+          gl_width="200"
+          gl_height="200"
+          gl_debug="false"
+          gl_trace="false"
+          jnlp_href="jogl-applet-runner-newt.jnlp">
+        <noembed>Sorry, no Java support detected.</noembed>
+     </embed>
+   </comment>
+</object> Hello Gears - Hello Gears - Hello Gears
+<br>
+<ul>
+    <li> d - toggle decoration </li>
+    <li> f - toggle fullscreen </li>
+    <li> r - in/out browser window </li>
+    <li> a - on/off always-on-top </li>
+</ul>
+Normal webpage text - Normal webpage text - Normal webpage text - Normal webpage text<br>
+Normal webpage text - Normal webpage text - Normal webpage text - Normal webpage text<br>
+Normal webpage text - Normal webpage text - Normal webpage text - Normal webpage text<br>
+Normal webpage text - Normal webpage text - Normal webpage text - Normal webpage text<br>
+</P>
+
+
+</body>
+</html>
diff --git a/jnlp-files/jogl-applet-runner-newt.jnlp b/jnlp-files/jogl-applet-runner-newt.jnlp
new file mode 100644
index 0000000..f58cc66
--- /dev/null
+++ b/jnlp-files/jogl-applet-runner-newt.jnlp
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp href="jogl-applet-runner-newt.jnlp">
+  <information>
+    <title>JOGL JNLP Applet Runner NEWT</title>
+    <vendor>JogAmp Community</vendor>
+    <homepage href="http://jogamp.org/jogl/"/>
+    <description>JOGL JNLP Applet Runner NEWT</description>
+    <offline-allowed/>
+  </information>
+  <update check="background" policy="always"/>
+
+    <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/junit.jar" />
+      <extension name="jogl-all-awt" href="jogl-all-awt.jnlp" />
+    </resources>
+
+  <applet-desc 
+      name="JOGLNewtApplet1Run-Applet"
+      main-class="com.jogamp.newt.awt.applet.JOGLNewtApplet1Run"
+      width="200" 
+      height="200">
+  </applet-desc>
+</jnlp>
diff --git a/jnlp-files/jogl-applet-version-lancheronly.html b/jnlp-files/jogl-applet-version-lancheronly.html
new file mode 100644
index 0000000..685d911
--- /dev/null
+++ b/jnlp-files/jogl-applet-version-lancheronly.html
@@ -0,0 +1,56 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>JOGL JNLP Applet Version (Launcher)</title>
+</head>
+<body>
+
+<P>
+The applet below shall show you the version of the Jogl components
+and your platform.
+</P>
+<p>
+<a href="http://jogamp.org/applet-launcher/www/">JNLPAppletLauncher</a> only version.
+</p>
+
+<P>
+
+<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
+      width="800" height="600">
+   <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">
+   <param name="codebase_lookup" value="false">
+   <param name="subapplet.classname" value="jogamp.opengl.awt.VersionApplet">
+   <param name="subapplet.displayname" value="JOGL Applet Version">
+   <param name="noddraw.check" value="true">
+   <param name="progressbar" value="true">
+   <param name="jnlpNumExtensions" value="1">
+   <param name="jnlpExtension1" value="jogl-all-awt.jnlp">
+   <param name="java_arguments" value="-Dsun.java2d.noddraw=true">
+   <comment>
+     <embed code="org.jdesktop.applet.util.JNLPAppletLauncher"
+          width="800" height="600"
+          type="application/x-java-applet;version=1.6"
+          pluginspage="http://java.sun.com/javase/downloads/ea.jsp"
+          archive="jar/applet-launcher.jar,
+                   jar/gluegen-rt.jar,
+                   jar/jogl.all.jar"
+          codebase_lookup" value="false"
+          subapplet.classname="jogamp.opengl.awt.VersionApplet"
+          subapplet.displayname="JOGL Applet Version"
+          noddraw.check="true"
+          progressbar="true"
+          jnlpNumExtensions="1"
+          jnlpExtension1="jogl-all-awt.jnlp"
+          java_arguments="-Dsun.java2d.noddraw=true">
+        <noembed>Sorry, no Java support detected.</noembed>
+     </embed>
+   </comment>
+</object>
+
+</P>
+
+</body>
+</html>
diff --git a/jnlp-files/jogl-applet-version-napplet.html b/jnlp-files/jogl-applet-version-napplet.html
new file mode 100644
index 0000000..e8104cb
--- /dev/null
+++ b/jnlp-files/jogl-applet-version-napplet.html
@@ -0,0 +1,61 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>JOGL JNLP Applet Version (NApplet)</title>
+</head>
+<body>
+
+<P>
+The applet below shall show you the version of the Jogl components
+and your platform.
+</P>
+
+<P>
+
+<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
+      width="800" height="600">
+   <param name="code" value="jogamp.opengl.awt.VersionApplet">
+   <param name="archive" value="jar/gluegen-rt.jar,
+                                jar/jogl.all.jar">
+   <param name="java_arguments" value="-Dsun.java2d.noddraw=true">
+   <comment>
+     <embed code="jogamp.opengl.awt.VersionApplet"
+          width="800" height="600"
+          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"
+          java_arguments="-Dsun.java2d.noddraw=true">
+        <noembed>Sorry, no Java support detected.</noembed>
+     </embed>
+   </comment>
+</object>
+
+</P>
+<P>
+
+The applet above is instantiated with the following code:
+
+<pre>
+<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
+      width="800" height="600">
+   <param name="code" value="jogamp.opengl.awt.VersionApplet">
+   <param name="archive" value="jar/gluegen-rt.jar,
+                                jar/jogl.all.jar">
+   <param name="java_arguments" value="-Dsun.java2d.noddraw=true">
+   <comment>
+     <embed code="jogamp.opengl.awt.VersionApplet"
+          width="800" height="600"
+          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"
+          java_arguments="-Dsun.java2d.noddraw=true">
+        <noembed>Sorry, no Java support detected.</noembed>
+     </embed>
+   </comment>
+</object>
+</pre>
+</P>
+</body>
+</html>
diff --git a/jnlp-files/jogl-applet-version.html b/jnlp-files/jogl-applet-version.html
new file mode 100644
index 0000000..5b73896
--- /dev/null
+++ b/jnlp-files/jogl-applet-version.html
@@ -0,0 +1,59 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<title>JOGL JNLP Applet Version (JNLP/Launcher)</title>
+</head>
+<body>
+
+<P>
+The applet below shall show you the version of the Jogl components
+and your platform.
+</P>
+<P>
+In case your <a href="https://jdk6.dev.java.net/plugin2/jnlp/">Java Plugin supports JNLP</a>, 
+the <em>jogl-applet-runner-newt.jnlp</em> is used, 
+otherwise it shall fallback to <a href="http://jogamp.org/applet-launcher/www/">JNLPAppletLauncher</a>.
+</P>
+
+<P>
+
+<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
+      width="800" height="600">
+   <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">
+   <param name="codebase_lookup" value="false">
+   <param name="subapplet.classname" value="jogamp.opengl.awt.VersionApplet">
+   <param name="subapplet.displayname" value="JOGL Applet Version">
+   <param name="noddraw.check" value="true">
+   <param name="progressbar" value="true">
+   <param name="jnlpNumExtensions" value="1">
+   <param name="jnlpExtension1" value="jogl-all-awt.jnlp">
+   <param name="java_arguments" value="-Dsun.java2d.noddraw=true">
+   <param name="jnlp_href" value="jogl-applet-version.jnlp">
+   <comment>
+     <embed code="org.jdesktop.applet.util.JNLPAppletLauncher"
+          width="800" height="600"
+          type="application/x-java-applet;version=1.6"
+          pluginspage="http://java.sun.com/javase/downloads/ea.jsp"
+          archive="jar/applet-launcher.jar,
+                   jar/gluegen-rt.jar,
+                   jar/jogl.all.jar"
+          codebase_lookup" value="false"
+          subapplet.classname="jogamp.opengl.awt.VersionApplet"
+          subapplet.displayname="JOGL Applet Version"
+          noddraw.check="true"
+          progressbar="true"
+          jnlpNumExtensions="1"
+          jnlpExtension1="jogl-all-awt.jnlp"
+          java_arguments="-Dsun.java2d.noddraw=true"
+          jnlp_href="jogl-applet-version.jnlp">
+        <noembed>Sorry, no Java support detected.</noembed>
+     </embed>
+   </comment>
+</object>
+
+</P>
+</body>
+</html>
diff --git a/jnlp-files/jogl-applet-version.jnlp b/jnlp-files/jogl-applet-version.jnlp
new file mode 100644
index 0000000..a06ea83
--- /dev/null
+++ b/jnlp-files/jogl-applet-version.jnlp
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp codebase="JOGL_CODEBASE_TAG" href="jogl-applet-version.jnlp" version="JOGAMP_VERSION">
+  <information>
+    <title>JOGL JNLP Applet Version</title>
+    <vendor>JogAmp Community</vendor>
+    <homepage href="http://jogamp.org/"/>
+    <description>JOGL Version</description>
+    <offline-allowed/>
+  </information>
+  <update check="background" policy="always"/>
+
+    <resources>
+      <j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+"/>
+      <!-- property name="sun.java2d.noddraw" value="true"/-->
+      <extension name="jogl-all-awt" href="JOGL_CODEBASE_TAG/jogl-all-awt.jnlp" />
+    </resources>
+
+  <applet-desc 
+      name="Version-Applet"
+      main-class="jogamp.opengl.awt.VersionApplet"
+      width="800" 
+      height="600">
+  </applet-desc>
+</jnlp>
diff --git a/jnlp-files/jogl-application-version.jnlp b/jnlp-files/jogl-application-version.jnlp
new file mode 100644
index 0000000..3b3cb07
--- /dev/null
+++ b/jnlp-files/jogl-application-version.jnlp
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp codebase="JOGL_CODEBASE_TAG" href="jogl-application-version.jnlp" version="JOGAMP_VERSION">
+  <information>
+    <title>JOGL JNLP Application Version</title>
+    <vendor>JogAmp Community</vendor>
+    <homepage href="http://jogamp.org/"/>
+    <description>JOGL Version</description>
+    <offline-allowed/>
+  </information>
+  <update check="background" policy="always"/>
+
+    <resources>
+      <j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+"/>
+      <!-- property name="sun.java2d.noddraw" value="true"/-->
+      <extension name="jogl-all-awt" href="JOGL_CODEBASE_TAG/jogl-all-awt.jnlp" />
+    </resources>
+
+  <application-desc main-class="jogamp.opengl.awt.VersionApplet"/>
+</jnlp>
diff --git a/jnlp-files/jogl-awt.jnlp b/jnlp-files/jogl-awt.jnlp
deleted file mode 100644
index ffdaee0..0000000
--- a/jnlp-files/jogl-awt.jnlp
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<jnlp codebase="JOGL_CODEBASE_TAG/"
-      href="jogl-awt.jnlp" version="JOGAMP_VERSION">
-  <information>
-    <title>Java(tm) Binding to the OpenGL(r) API (AWT)</title>
-    <vendor>JogAmp Community</vendor>
-    <homepage href="http://jogamp.org/"/>
-    <description>Java Binding to the OpenGL API - JSR-231 2.0.0 - AWT</description>
-    <description kind="short">Java programming language binding for the OpenGL 3D graphics API - AWT.</description>
-    <offline-allowed/>
-  </information>
-  <update check="background" policy="always"/>
-  <security>
-      <all-permissions/>
-  </security>
-    <resources>
-      <jar href="jogl.awt.jar" />
-      <jar href="jogl.util.awt.jar" download="lazy"/>
-
-      <extension name="jogl-core" href="JOGL_CODEBASE_TAG/jogl-core.jnlp" />
-      <extension name="nativewindow-awt" href="JOGL_CODEBASE_TAG/nativewindow-awt.jnlp" />
-    </resources>
-  <component-desc />
-</jnlp>
diff --git a/jnlp-files/jogl-core.jnlp b/jnlp-files/jogl-core.jnlp
deleted file mode 100644
index 464c65c..0000000
--- a/jnlp-files/jogl-core.jnlp
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<jnlp codebase="JOGL_CODEBASE_TAG/"
-      href="jogl-core.jnlp" version="JOGAMP_VERSION">
-  <information>
-    <title>Java(tm) Binding to the OpenGL(r) API (CORE)</title>
-    <vendor>JogAmp Community</vendor>
-    <homepage href="http://jogamp.org/"/>
-    <description>Java Binding to the OpenGL API - JSR-231 2.0.0 - CORE</description>
-    <description kind="short">Java programming language binding for the OpenGL 3D graphics API - CORE.</description>
-    <offline-allowed/>
-  </information>
-  <update check="background" policy="always"/>
-  <security>
-      <all-permissions/>
-  </security>
-    <resources>
-      <jar href="jogl.core.jar"/>
-      <jar href="jogl.util.jar" download="lazy"/>
-
-      <extension name="gluegen-rt"   href="GLUEGEN_CODEBASE_TAG/gluegen-rt.jnlp" />
-      <extension name="nativewindow" href="JOGL_CODEBASE_TAG/nativewindow.jnlp" />
-    </resources>
-
-    <resources os="Windows" arch="x86">
-      <nativelib href = "jogl-natives-windows-i586.jar" />
-    </resources>
-    <resources os="Windows" arch="amd64">
-      <nativelib href = "jogl-natives-windows-amd64.jar" />
-    </resources>
-    <resources os="Windows" arch="x86_64">
-      <nativelib href = "jogl-natives-windows-amd64.jar" />
-    </resources>
-    <resources os="SunOS" arch="sparc">
-      <nativelib href = "jogl-natives-solaris-sparc.jar" />
-    </resources>
-    <resources os="SunOS" arch="sparcv9">
-      <nativelib href = "jogl-natives-solaris-sparcv9.jar" />
-    </resources>
-    <resources os="SunOS" arch="x86">
-      <nativelib href = "jogl-natives-solaris-i586.jar" />
-    </resources>
-    <resources os="SunOS" arch="amd64">
-      <nativelib href = "jogl-natives-solaris-amd64.jar" />
-    </resources>
-    <resources os="SunOS" arch="x86_64">
-      <nativelib href = "jogl-natives-solaris-amd64.jar" />
-    </resources>
-    <resources os="Linux" arch="i386">
-      <nativelib href = "jogl-natives-linux-i586.jar" />
-    </resources>
-    <resources os="Linux" arch="x86">
-      <nativelib href = "jogl-natives-linux-i586.jar" />
-    </resources>
-    <resources os="Linux" arch="amd64">
-      <nativelib href = "jogl-natives-linux-amd64.jar" />
-    </resources>
-    <resources os="Linux" arch="x86_64">
-      <nativelib href = "jogl-natives-linux-amd64.jar" />
-    </resources>
-    <resources os="Mac OS X" arch="i386">
-      <nativelib href = "jogl-natives-macosx-universal.jar" />
-    </resources>
-    <resources os="Mac OS X" arch="x86_64">
-      <nativelib href = "jogl-natives-macosx-universal.jar" />
-    </resources>
-
-  <component-desc />
-</jnlp>
diff --git a/jnlp-files/jogl-javaws-version.jnlp b/jnlp-files/jogl-javaws-version.jnlp
new file mode 100755
index 0000000..10f228c
--- /dev/null
+++ b/jnlp-files/jogl-javaws-version.jnlp
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp codebase="JOGL_CODEBASE_TAG" href="jogl-javaws-version.jnlp" version="JOGAMP_VERSION">
+  <information>
+    <title>JOGL JNLP Javaws Version</title>
+    <vendor>JogAmp Community</vendor>
+    <homepage href="http://jogamp.org/"/>
+    <description>JOGL Version</description>
+    <offline-allowed/>
+  </information>
+  <update check="background" policy="always"/>
+
+    <resources>
+      <j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+"/>
+      <!-- property name="sun.java2d.noddraw" value="true"/-->
+      <extension name="jogl-all-awt" href="JOGL_CODEBASE_TAG/jogl-all-awt.jnlp" />
+    </resources>
+
+  <application-desc main-class="jogamp.opengl.awt.VersionApplet"/>
+</jnlp>
diff --git a/jnlp-files/jogl-test-applets.html b/jnlp-files/jogl-test-applets.html
new file mode 100644
index 0000000..70bf1c0
--- /dev/null
+++ b/jnlp-files/jogl-test-applets.html
@@ -0,0 +1,199 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+        <link href="../../style.css" rel="stylesheet" type="text/css"/>
+        <title>JOGL Test Applets</title>
+        <link href="../../SocialCoding/logo_symbol_finals/website_final_blue_favicon_symbol_16x16pel.ico" rel="shortcut icon"/>
+    </head>
+<body>
+
+<div id="container">
+    <div id="header">
+        <div id="slogan"><img src="../../images/jogamp_symbols/website_final_sideslogan_jogl_404x20pel.png" alt="Java™ Binding for the OpenGL® API"/></div>
+        <div id="logo"><a href="http://jogamp.org/"><img src="../../images/jogamp_symbols/website_final_blue_jogl_346x70pel.png" alt="JOGL Symbol"/></a></div>
+    </div>
+    <div id="menu">
+        <ul>
+            <li><a href="../../">Home</a></li>
+            <li><a href="../../jogl/">JOGL</a></li>
+            <li><a href="../../jogl-demos/www/">Demos</a></li>
+            <li><a href="../../deployment/jogamp-next/javadoc/jogl/javadoc/">JavaDoc</a></li>
+            <li><a href="../../gluegen/www/">Gluegen</a></li>
+            <li><a href="../../wiki/">Wiki</a></li>
+            <li><a href="../../blog/">Blogs</a></li>
+            <li><a href="../../forum.html">Forums</a></li>
+        </ul>
+    </div>
+    <div id="main">
+        <div id="sidebar">
+        </div>
+        <div id="text">
+
+<h2> Test page for JOGL Applets </h2>
+
+<div style="font : 10px serif;">
+See Legend below table
+</div>
+
+<table width="100%" cellspacing="0" border="0" cellpadding="0"><tbody><tr valign="top">
+
+  <td width="50%"> <!-- LEFT COLUMN -->
+    <table border="0" cellpadding="10" cellspacing="0"><tbody>
+        <tr>
+            <th align="left"><strong>Screenshot</strong></th>
+            <th align="left"><strong>Launch</strong></th>
+            <th align="left"><strong>Description</strong></th>
+        </tr>
+        <tr>
+            <td>
+                <a href="../../jogl/www/media/jogl-applet-version.png">
+                    <img src="../../jogl/www/media/jogl-applet-version-small.png" width="200" alt="Full Size"/>
+                </a>
+            </td>
+            <td>
+                <a href="jogl-applet-version.html">Dual</a><br/>
+                <a href="jogl-applet-version-lancheronly.html">LApplet</a><br/>
+                <a href="jogl-applet-version-napplet.html">NApplet</a><br/>
+                <a href="jogl-application-version.jnlp">WebStart</a><br/>
+            </td>
+            <td>
+                JOGL Version Information.
+            </td>
+        </tr>
+        <tr>
+            <td>
+                <a href="../../jogl/www/media/jogl-applet-gearses2-normal.png">
+                    <img src="../../jogl/www/media/jogl-applet-gearses2-normal-small.png" width="200" alt="Full Size"/>
+                </a>
+            </td>
+            <td>
+                <a href="jogl-applet-runner-newt-gears-normal.html">Dual</a><br/>
+                <a href="jogl-applet-runner-newt-gears-normal-launcheronly.html">LApplet</a><br/>
+                <a href="jogl-applet-runner-newt-gears-normal-napplet.html">NApplet</a><br/>
+            </td>
+            <td>
+                Classic OpenGL Gears for ES2 
+                running as a normal Applet.<br/>
+                <small><b>Launch documentation included</b></small>.
+            </td>
+        </tr>
+        <tr>
+            <td>
+                <a href="../../jogl/www/media/jogl-applet-gearses2-translucent.png">
+                    <img src="../../jogl/www/media/jogl-applet-gearses2-translucent-small.png" width="200" alt="Full Size"/>
+                </a>
+            </td>
+            <td>
+                <a href="jogl-applet-runner-newt-gears-special.html">Dual</a><br/>
+                <a href="jogl-applet-runner-newt-gears-special-napplet.html">NApplet</a><br/>
+            </td>
+            <td>
+                Classic OpenGL Gears for ES2 
+                running as a translucent Applet hanging over the page.
+            </td>
+        </tr>
+    </tbody></table>
+  </td>
+
+  <td width="50%"> <!-- RIGHT COLUMN -->
+    <table border="0" cellpadding="10" cellspacing="0"><tbody>
+        <tr>
+            <th align="left"><strong>Screenshot</strong></th>
+            <th align="left"><strong>Launch</strong></th>
+            <th align="left"><strong>Description</strong></th>
+        </tr>
+        <tr>
+            <td>
+                <a href="../../jogl/www/media/jogl-applet-graph-text01.png">
+                    <img src="../../jogl/www/media/jogl-applet-graph-text01-small.png" width="200" alt="Full Size"/>
+                </a>
+            </td>
+            <td>
+                <a href="jogl-applet-runner-newt-GraphTextDemo01.html">Dual</a><br/>
+                <a href="jogl-applet-runner-newt-GraphTextDemo01-napplet.html">NApplet</a><br/>
+            </td>
+            <td>
+                GPU accelerated Text Demo using JOGL's new Graph package.
+            </td>
+        </tr>
+        <tr>
+            <td>
+                <a href="../../jogl/www/media/jogl-applet-graph-uiscene01.png">
+                    <img src="../../jogl/www/media/jogl-applet-graph-uiscene01-small.png" width="200" alt="Full Size"/>
+                </a>
+            </td>
+            <td>
+                <a href="jogl-applet-runner-newt-GraphUISceneDemo01.html">Dual</a><br/>
+                <a href="jogl-applet-runner-newt-GraphUISceneDemo01-napplet.html">NApplet</a><br/>
+            </td>
+            <td>
+                Demonstration of GPU accelerated Text and UI rendering and interaction
+                using JOGL's new Graph package.
+            </td>
+        </tr>
+        <tr>
+            <td>
+                <a href="../../jogl/www/media/jogl-applet-demoscene-elektronenmultiplizierer01.png">
+                    <img src="../../jogl/www/media/jogl-applet-demoscene-elektronenmultiplizierer01-small.png" width="200" alt="Full Size"/>
+                </a>
+            </td>
+            <td>
+                <a href="jogl-applet-runner-newt-ElektronenMultiplizierer.html">Dual</a><br/>
+                <a href="jogl-applet-runner-newt-ElektronenMultiplizierer-napplet.html">NApplet</a><br/>
+            </td>
+            <td>
+                Demoscene Passivist's ElektronenMultiplizierer
+            </td>
+        </tr>
+    </tbody></table>
+  </td>
+
+</tr></tbody></table>
+
+<div style="font : 10px serif;">
+Click on <i>Screenshot</i> for the full sized screenshot.<br/>
+Click on the <i>Launch</i> link to actually launch the demo.<br/>
+  <table border="0" cellpadding="0" cellspacing="10"><tbody>
+    <tr>
+        <th align="left" ><strong>Launch</strong></th>
+        <th align="left" ><strong>Description</strong></th>
+    </tr>
+    <tr>
+        <td> JApplet </td>
+        <td> Applet using JNLP-Applet mechanism only. </td>
+    </tr>
+    <tr>
+        <td> LApplet </td>
+        <td> Applet using JOGL's Applet Launcher mechanism only. </td>
+    </tr>
+    <tr>
+        <td> Dual </td>
+        <td> Applet using JNLP-Applet & JOGL's AppletLauncher mechanism.  (JApplet + LApplet) </td>
+    </tr>
+    <tr>
+        <td> NApplet </td>
+        <td> Applet just using Applet/Object or Embed tag, where native JARs are post-loaded by GlueGen/JOGL. </td>
+    </tr>
+    <tr>
+        <td> WebStart </td>
+        <td> Application using JNLP's WebStart mechanism. </td>
+    </tr>
+  </tbody></table>
+</div>
+
+</div> <!-- text -->
+</div> <!-- main -->
+
+<div id="footer">
+  <div id="footer_left">
+    <span>JogAmp.org</span>
+    by <a href="http://jogamp.org">http://jogamp.org</a> is licensed under a <br/>
+    <a href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 License</a>.
+  </div>
+</div>
+
+</div> <!-- container -->
+
+</body>
+</html>
diff --git a/jnlp-files/nativewindow-all-awt.jnlp b/jnlp-files/nativewindow-all-awt.jnlp
deleted file mode 100644
index 57a1895..0000000
--- a/jnlp-files/nativewindow-all-awt.jnlp
+++ /dev/null
@@ -1,65 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<jnlp codebase="JOGL_CODEBASE_TAG/"
-      href="nativewindow-all-awt.jnlp" version="JOGAMP_VERSION">
-  <information>
-    <title>Java(tm) NativeWindow Interface API (ALL.AWT)</title>
-    <vendor>JogAmp Community</vendor>
-    <homepage href="http://jogamp.org/"/>
-    <description>Java API for a binding to a native windowing system - 2.0 - ALL.AWT</description>
-    <description kind="short">Java API for a binding to a native windowing system - 2.0 - ALL.AWT</description>
-    <offline-allowed/>
-  </information>
-  <update check="background" policy="always"/>
-  <security>
-      <all-permissions/>
-  </security>
-    <resources>
-      <jar href="nativewindow.all.jar"/>
-      <extension name="gluegen-rt"   href="GLUEGEN_CODEBASE_TAG/gluegen-rt.jnlp" />
-    </resources>
-
-    <resources os="Windows" arch="x86">
-      <nativelib href = "nativewindow-natives-windows-i586.jar" />
-    </resources>
-    <resources os="Windows" arch="amd64">
-      <nativelib href = "nativewindow-natives-windows-amd64.jar" />
-    </resources>
-    <resources os="Windows" arch="x86_64">
-      <nativelib href = "nativewindow-natives-windows-amd64.jar" />
-    </resources>
-    <resources os="SunOS" arch="sparc">
-      <nativelib href = "nativewindow-natives-solaris-sparc.jar" />
-    </resources>
-    <resources os="SunOS" arch="sparcv9">
-      <nativelib href = "nativewindow-natives-solaris-sparcv9.jar" />
-    </resources>
-    <resources os="SunOS" arch="x86">
-      <nativelib href = "nativewindow-natives-solaris-i586.jar" />
-    </resources>
-    <resources os="SunOS" arch="amd64">
-      <nativelib href = "nativewindow-natives-solaris-amd64.jar" />
-    </resources>
-    <resources os="SunOS" arch="x86_64">
-      <nativelib href = "nativewindow-natives-solaris-amd64.jar" />
-    </resources>
-    <resources os="Linux" arch="i386">
-      <nativelib href = "nativewindow-natives-linux-i586.jar" />
-    </resources>
-    <resources os="Linux" arch="x86">
-      <nativelib href = "nativewindow-natives-linux-i586.jar" />
-    </resources>
-    <resources os="Linux" arch="amd64">
-      <nativelib href = "nativewindow-natives-linux-amd64.jar" />
-    </resources>
-    <resources os="Linux" arch="x86_64">
-      <nativelib href = "nativewindow-natives-linux-amd64.jar" />
-    </resources>
-    <resources os="Mac OS X" arch="i386">
-      <nativelib href = "nativewindow-natives-macosx-universal.jar" />
-    </resources>
-    <resources os="Mac OS X" arch="x86_64">
-      <nativelib href = "nativewindow-natives-macosx-universal.jar" />
-    </resources>
-
-  <component-desc />
-</jnlp>
diff --git a/jnlp-files/nativewindow-awt.jnlp b/jnlp-files/nativewindow-awt.jnlp
deleted file mode 100644
index d37446c..0000000
--- a/jnlp-files/nativewindow-awt.jnlp
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<jnlp codebase="JOGL_CODEBASE_TAG/"
-      href="nativewindow-awt.jnlp" version="JOGAMP_VERSION">
-  <information>
-    <title>Java(tm) NativeWindow Interface API (AWT)</title>
-    <vendor>JogAmp Community</vendor>
-    <homepage href="http://jogamp.org/"/>
-    <description>Java API for a binding to a native windowing system - 2.0 - AWT</description>
-    <description kind="short">Java API for a binding to a native windowing system - 2.0 - AWT</description>
-    <offline-allowed/>
-  </information>
-  <update check="background" policy="always"/>
-  <security>
-      <all-permissions/>
-  </security>
-    <resources>
-      <jar href="nativewindow.awt.jar"/>
-      <extension name="nativewindow" href="JOGL_CODEBASE_TAG/nativewindow.jnlp" />
-    </resources>
-
-  <component-desc />
-</jnlp>
diff --git a/jnlp-files/nativewindow.jnlp b/jnlp-files/nativewindow.jnlp
deleted file mode 100644
index a2b0c79..0000000
--- a/jnlp-files/nativewindow.jnlp
+++ /dev/null
@@ -1,77 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<jnlp codebase="JOGL_CODEBASE_TAG/"
-      href="nativewindow.jnlp" version="JOGAMP_VERSION">
-  <information>
-    <title>Java(tm) NativeWindow Interface API (CORE)</title>
-    <vendor>JogAmp Community</vendor>
-    <homepage href="http://jogamp.org/"/>
-    <description>Java API for a binding to a native windowing system - 2.0 - CORE</description>
-    <description kind="short">Java API for a binding to a native windowing system - 2.0 - CORE</description>
-    <offline-allowed/>
-  </information>
-  <update check="background" policy="always"/>
-  <security>
-      <all-permissions/>
-  </security>
-    <resources>
-      <jar href="nativewindow.core.jar" />
-      <extension name="gluegen-rt"   href="GLUEGEN_CODEBASE_TAG/gluegen-rt.jnlp" />
-    </resources>
-
-    <resources os="Windows" arch="x86">
-      <jar href="nativewindow.os.win.jar" />
-      <nativelib href = "nativewindow-natives-windows-i586.jar" />
-    </resources>
-    <resources os="Windows" arch="amd64">
-      <jar href="nativewindow.os.win.jar" />
-      <nativelib href = "nativewindow-natives-windows-amd64.jar" />
-    </resources>
-    <resources os="Windows" arch="x86_64">
-      <jar href="nativewindow.os.win.jar" />
-      <nativelib href = "nativewindow-natives-windows-amd64.jar" />
-    </resources>
-    <resources os="SunOS" arch="sparc">
-      <jar href="nativewindow.os.x11.jar" />
-      <nativelib href = "nativewindow-natives-solaris-sparc.jar" />
-    </resources>
-    <resources os="SunOS" arch="sparcv9">
-      <jar href="nativewindow.os.x11.jar" />
-      <nativelib href = "nativewindow-natives-solaris-sparcv9.jar" />
-    </resources>
-    <resources os="SunOS" arch="x86">
-      <jar href="nativewindow.os.x11.jar" />
-      <nativelib href = "nativewindow-natives-solaris-i586.jar" />
-    </resources>
-    <resources os="SunOS" arch="amd64">
-      <jar href="nativewindow.os.x11.jar" />
-      <nativelib href = "nativewindow-natives-solaris-amd64.jar" />
-    </resources>
-    <resources os="SunOS" arch="x86_64">
-      <jar href="nativewindow.os.x11.jar" />
-      <nativelib href = "nativewindow-natives-solaris-amd64.jar" />
-    </resources>
-    <resources os="Linux" arch="i386">
-      <jar href="nativewindow.os.x11.jar" />
-      <nativelib href = "nativewindow-natives-linux-i586.jar" />
-    </resources>
-    <resources os="Linux" arch="x86">
-      <jar href="nativewindow.os.x11.jar" />
-      <nativelib href = "nativewindow-natives-linux-i586.jar" />
-    </resources>
-    <resources os="Linux" arch="amd64">
-      <jar href="nativewindow.os.x11.jar" />
-      <nativelib href = "nativewindow-natives-linux-amd64.jar" />
-    </resources>
-    <resources os="Linux" arch="x86_64">
-      <jar href="nativewindow.os.x11.jar" />
-      <nativelib href = "nativewindow-natives-linux-amd64.jar" />
-    </resources>
-    <resources os="Mac OS X" arch="i386">
-      <nativelib href = "nativewindow-natives-macosx-universal.jar" />
-    </resources>
-    <resources os="Mac OS X" arch="x86_64">
-      <nativelib href = "nativewindow-natives-macosx-universal.jar" />
-    </resources>
-
-  <component-desc />
-</jnlp>
diff --git a/jnlp-files/newt-all-awt.jnlp b/jnlp-files/newt-all-awt.jnlp
deleted file mode 100644
index c4444ff..0000000
--- a/jnlp-files/newt-all-awt.jnlp
+++ /dev/null
@@ -1,65 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<jnlp codebase="JOGL_CODEBASE_TAG/"
-      href="newt-all-awt.jnlp" version="JOGAMP_VERSION">
-  <information>
-    <title>NEWT - New Windowing Toolkit (ALL.AWT)</title>
-    <vendor>JogAmp Community</vendor>
-    <homepage href="http://jogamp.org/"/>
-    <description>NEWT - A NativeWindow Interface implementation - ALL.AWT</description>
-    <description kind="short">NEWT - A NativeWindow Interface implementation - ALL.AWT</description>
-    <offline-allowed/>
-  </information>
-  <update check="background" policy="always"/>
-  <security>
-      <all-permissions/>
-  </security>
-    <resources>
-      <jar href="newt.all.jar" />
-      <extension name="jogl-all-awt" href="JOGL_CODEBASE_TAG/jogl-all-awt.jnlp" />
-    </resources>
-
-    <resources os="Windows" arch="x86">
-      <nativelib href = "newt-natives-windows-i586.jar" />
-    </resources>
-    <resources os="Windows" arch="amd64">
-      <nativelib href = "newt-natives-windows-amd64.jar" />
-    </resources>
-    <resources os="Windows" arch="x86_64">
-      <nativelib href = "newt-natives-windows-amd64.jar" />
-    </resources>
-    <resources os="SunOS" arch="sparc">
-      <nativelib href = "newt-natives-solaris-sparc.jar" />
-    </resources>
-    <resources os="SunOS" arch="sparcv9">
-      <nativelib href = "newt-natives-solaris-sparcv9.jar" />
-    </resources>
-    <resources os="SunOS" arch="x86">
-      <nativelib href = "newt-natives-solaris-i586.jar" />
-    </resources>
-    <resources os="SunOS" arch="amd64">
-      <nativelib href = "newt-natives-solaris-amd64.jar" />
-    </resources>
-    <resources os="SunOS" arch="x86_64">
-      <nativelib href = "newt-natives-solaris-amd64.jar" />
-    </resources>
-    <resources os="Linux" arch="i386">
-      <nativelib href = "newt-natives-linux-i586.jar" />
-    </resources>
-    <resources os="Linux" arch="x86">
-      <nativelib href = "newt-natives-linux-i586.jar" />
-    </resources>
-    <resources os="Linux" arch="amd64">
-      <nativelib href = "newt-natives-linux-amd64.jar" />
-    </resources>
-    <resources os="Linux" arch="x86_64">
-      <nativelib href = "newt-natives-linux-amd64.jar" />
-    </resources>
-    <resources os="Mac OS X" arch="i386">
-      <nativelib href = "newt-natives-macosx-universal.jar" />
-    </resources>
-    <resources os="Mac OS X" arch="x86_64">
-      <nativelib href = "newt-natives-macosx-universal.jar" />
-    </resources>
-
-  <component-desc />
-</jnlp>
diff --git a/jnlp-files/newt-all-noawt.jnlp b/jnlp-files/newt-all-noawt.jnlp
deleted file mode 100644
index c67c7ac..0000000
--- a/jnlp-files/newt-all-noawt.jnlp
+++ /dev/null
@@ -1,65 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<jnlp codebase="JOGL_CODEBASE_TAG/"
-      href="newt-all-noawt.jnlp" version="JOGAMP_VERSION">
-  <information>
-    <title>NEWT - New Windowing Toolkit (ALL.NO_AWT)</title>
-    <vendor>JogAmp Community</vendor>
-    <homepage href="http://jogamp.org/"/>
-    <description>NEWT - A NativeWindow Interface implementation - ALL.NO_AWT</description>
-    <description kind="short">NEWT - A NativeWindow Interface implementation - ALL.NO_AWT</description>
-    <offline-allowed/>
-  </information>
-  <update check="background" policy="always"/>
-  <security>
-      <all-permissions/>
-  </security>
-    <resources>
-      <jar href="newt.all-noawt.jar" />
-      <extension name="jogl-all-noawt" href="JOGL_CODEBASE_TAG/jogl-all-noawt.jnlp" />
-    </resources>
-
-    <resources os="Windows" arch="x86">
-      <nativelib href = "newt-natives-windows-i586.jar" />
-    </resources>
-    <resources os="Windows" arch="amd64">
-      <nativelib href = "newt-natives-windows-amd64.jar" />
-    </resources>
-    <resources os="Windows" arch="x86_64">
-      <nativelib href = "newt-natives-windows-amd64.jar" />
-    </resources>
-    <resources os="SunOS" arch="sparc">
-      <nativelib href = "newt-natives-solaris-sparc.jar" />
-    </resources>
-    <resources os="SunOS" arch="sparcv9">
-      <nativelib href = "newt-natives-solaris-sparcv9.jar" />
-    </resources>
-    <resources os="SunOS" arch="x86">
-      <nativelib href = "newt-natives-solaris-i586.jar" />
-    </resources>
-    <resources os="SunOS" arch="amd64">
-      <nativelib href = "newt-natives-solaris-amd64.jar" />
-    </resources>
-    <resources os="SunOS" arch="x86_64">
-      <nativelib href = "newt-natives-solaris-amd64.jar" />
-    </resources>
-    <resources os="Linux" arch="i386">
-      <nativelib href = "newt-natives-linux-i586.jar" />
-    </resources>
-    <resources os="Linux" arch="x86">
-      <nativelib href = "newt-natives-linux-i586.jar" />
-    </resources>
-    <resources os="Linux" arch="amd64">
-      <nativelib href = "newt-natives-linux-amd64.jar" />
-    </resources>
-    <resources os="Linux" arch="x86_64">
-      <nativelib href = "newt-natives-linux-amd64.jar" />
-    </resources>
-    <resources os="Mac OS X" arch="i386">
-      <nativelib href = "newt-natives-macosx-universal.jar" />
-    </resources>
-    <resources os="Mac OS X" arch="x86_64">
-      <nativelib href = "newt-natives-macosx-universal.jar" />
-    </resources>
-
-  <component-desc />
-</jnlp>
diff --git a/jnlp-files/newt-awt.jnlp b/jnlp-files/newt-awt.jnlp
deleted file mode 100644
index fc5b7f1..0000000
--- a/jnlp-files/newt-awt.jnlp
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<jnlp codebase="JOGL_CODEBASE_TAG/"
-      href="newt-awt.jnlp" version="JOGAMP_VERSION">
-  <information>
-    <title>NEWT - New Windowing Toolkit (AWT)</title>
-    <vendor>JogAmp Community</vendor>
-    <homepage href="http://jogamp.org/"/>
-    <description>NEWT - A NativeWindow Interface implementation - AWT</description>
-    <description kind="short">NEWT - A NativeWindow Interface implementation - AWT</description>
-    <offline-allowed/>
-  </information>
-  <update check="background" policy="always"/>
-  <security>
-      <all-permissions/>
-  </security>
-    <resources>
-      <jar href="newt.awt.jar" />
-      <extension name="nativewindow-awt" href="JOGL_CODEBASE_TAG/nativewindow-awt.jnlp" />
-      <extension name="newt" href="JOGL_CODEBASE_TAG/newt.jnlp" />
-    </resources>
-  <component-desc />
-</jnlp>
diff --git a/jnlp-files/newt-jogl.jnlp b/jnlp-files/newt-jogl.jnlp
deleted file mode 100644
index cd0f5d6..0000000
--- a/jnlp-files/newt-jogl.jnlp
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<jnlp codebase="JOGL_CODEBASE_TAG/"
-      href="newt-jogl.jnlp" version="JOGAMP_VERSION">
-  <information>
-    <title>NEWT - New Windowing Toolkit (JOGL)</title>
-    <vendor>JogAmp Community</vendor>
-    <homepage href="http://jogamp.org/"/>
-    <description>NEWT - A NativeWindow Interface implementation - JOGL</description>
-    <description kind="short">NEWT - A NativeWindow Interface implementation - JOGL</description>
-    <offline-allowed/>
-  </information>
-  <update check="background" policy="always"/>
-  <security>
-      <all-permissions/>
-  </security>
-    <resources>
-      <jar href="newt.ogl.jar" />
-      <extension name="newt" href="JOGL_CODEBASE_TAG/newt.jnlp" />
-      <extension name="jogl-core" href="JOGL_CODEBASE_TAG/jogl-core.jnlp" />
-    </resources>
-  <component-desc />
-</jnlp>
diff --git a/jnlp-files/newt.jnlp b/jnlp-files/newt.jnlp
deleted file mode 100644
index 9decf24..0000000
--- a/jnlp-files/newt.jnlp
+++ /dev/null
@@ -1,79 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<jnlp codebase="JOGL_CODEBASE_TAG/"
-      href="newt.jnlp" version="JOGAMP_VERSION">
-  <information>
-    <title>NEWT - New Windowing Toolkit (CORE)</title>
-    <vendor>JogAmp Community</vendor>
-    <homepage href="http://jogamp.org/"/>
-    <description>NEWT - A NativeWindow Interface implementation - CORE</description>
-    <description kind="short">NEWT - A NativeWindow Interface implementation - CORE</description>
-    <offline-allowed/>
-  </information>
-  <update check="background" policy="always"/>
-  <security>
-      <all-permissions/>
-  </security>
-    <resources>
-      <jar href="newt.core.jar" />
-      <extension name="nativewindow" href="JOGL_CODEBASE_TAG/nativewindow.jnlp" />
-    </resources>
-
-    <resources os="Windows" arch="x86">
-      <jar href="newt.os.win.jar" />
-      <nativelib href = "newt-natives-windows-i586.jar" />
-    </resources>
-    <resources os="Windows" arch="amd64">
-      <jar href="newt.os.win.jar" />
-      <nativelib href = "newt-natives-windows-amd64.jar" />
-    </resources>
-    <resources os="Windows" arch="x86_64">
-      <jar href="newt.os.win.jar" />
-      <nativelib href = "newt-natives-windows-amd64.jar" />
-    </resources>
-    <resources os="SunOS" arch="sparc">
-      <jar href="newt.os.x11.jar" />
-      <nativelib href = "newt-natives-solaris-sparc.jar" />
-    </resources>
-    <resources os="SunOS" arch="sparcv9">
-      <jar href="newt.os.x11.jar" />
-      <nativelib href = "newt-natives-solaris-sparcv9.jar" />
-    </resources>
-    <resources os="SunOS" arch="x86">
-      <jar href="newt.os.x11.jar" />
-      <nativelib href = "newt-natives-solaris-i586.jar" />
-    </resources>
-    <resources os="SunOS" arch="amd64">
-      <jar href="newt.os.x11.jar" />
-      <nativelib href = "newt-natives-solaris-amd64.jar" />
-    </resources>
-    <resources os="SunOS" arch="x86_64">
-      <jar href="newt.os.x11.jar" />
-      <nativelib href = "newt-natives-solaris-amd64.jar" />
-    </resources>
-    <resources os="Linux" arch="i386">
-      <jar href="newt.os.x11.jar" />
-      <nativelib href = "newt-natives-linux-i586.jar" />
-    </resources>
-    <resources os="Linux" arch="x86">
-      <jar href="newt.os.x11.jar" />
-      <nativelib href = "newt-natives-linux-i586.jar" />
-    </resources>
-    <resources os="Linux" arch="amd64">
-      <jar href="newt.os.x11.jar" />
-      <nativelib href = "newt-natives-linux-amd64.jar" />
-    </resources>
-    <resources os="Linux" arch="x86_64">
-      <jar href="newt.os.x11.jar" />
-      <nativelib href = "newt-natives-linux-amd64.jar" />
-    </resources>
-    <resources os="Mac OS X" arch="i386">
-      <jar href="newt.os.osx.jar" />
-      <nativelib href = "newt-natives-macosx-universal.jar" />
-    </resources>
-    <resources os="Mac OS X" arch="x86_64">
-      <jar href="newt.os.osx.jar" />
-      <nativelib href = "newt-natives-macosx-universal.jar" />
-    </resources>
-
-  <component-desc />
-</jnlp>
diff --git a/make/README-zip-bundles.txt b/make/README-zip-bundles.txt
index 29f2650..3a0b4b0 100644
--- a/make/README-zip-bundles.txt
+++ b/make/README-zip-bundles.txt
@@ -28,6 +28,14 @@ and the following subdirectory:
   lib                         contains JOGL implementation, native libraries
   jnlp-files                  contains JOGL jnlp-file templates
 
+additionally the following Java source zip archives are added,
+allowing convenient IDE integration (javadoc, class/method help, etc).
+Generated Java source code is included as well.
+
+  nativewindow-java-src.zip   contains NativeWindow Java sources, reflecting nativewindow.all.jar
+  jogl-java-src.zip           contains JOGL Java sources, reflecting jogl.all.jar
+  newt-java-src.zip           contains NEWT Java sources, reflecting newt.all.jar
+
 For instructions on how to use these implementation files 
 to build or run a JOGL program look at:
     http://jogamp.org/
diff --git a/make/build-common.xml b/make/build-common.xml
index 4d38d74..58a829f 100644
--- a/make/build-common.xml
+++ b/make/build-common.xml
@@ -16,6 +16,7 @@
     <property name="gluegen.root" value="../../gluegen" />
     <import file="${gluegen.root}/make/gluegen-cpptasks.xml" />
     <import file="${gluegen.root}/make/jogamp-archivetasks.xml" />
+    <import file="${gluegen.root}/make/jogamp-androidtasks.xml" />
     <import file="${gluegen.root}/make/jogamp-env.xml" />
 
     <property name="ant-contrib.jar"  value="${gluegen.root}/make/lib/ant-contrib-1.0b3.jar" />
@@ -32,12 +33,20 @@
     <!-- 
        - Base initialization of properties and detection of operating system.
       -->
+    <target name="set.debug">
+        <property name="c.compiler.debug" value="true" /> 
+        <property name="javacdebug"       value="true" /> 
+        <property name="javacdebuglevel"  value="source,lines,vars" /> 
+    </target>
+    <target name="common.init.debug" depends="set.debug, common.init"/>
+
     <target name="common.init" depends="jogamp.env.init, gluegen.cpptasks.detect.os" unless="common.init.done">
         <property name="common.init.done" value="true" />
 
         <!-- Set the project root directory to be up one directory. -->
         <property name="project.root"               value=".." />
         <property name="build"                      value="${project.root}/${rootrel.build}" />
+        <property name="tempdir"                    value="${project.root}/build-temp" />
         <property name="src"                        value="${project.root}/src" />
         <property name="lib"                        value="${build}/lib" />
         <property name="jar"                        value="${build}/jar" />
@@ -50,35 +59,56 @@
         <property name="make"                       value="." />
         <property name="config"                     value="${make}/config" />
         <property name="stub.includes"              value="stub_includes" /> <!-- NOTE:  this MUST be relative for FileSet -->
-        <property name="stub.includes.common"       value="${stub.includes}/gluegen" />
+
+        <property name="stub.includes.gluegen.gg"  value="${gluegen.root}/make/stub_includes/gluegen" />
+        <property name="stub.includes.gluegen.cc"  value="${gluegen.root}/make/stub_includes/platform" />
 
         <tstamp>
              <format property="version.timestamp" pattern="yyyyMMdd"/>
         </tstamp>
 
-        <property file="${build}/artifact.properties"/>
         <property name="jogl.build.number" value="manual"/>
         <property name="jogl.build.id"     value="${version.timestamp}"/>
-        <property name="jogl.build.branch" value="master"/>
-        <property name="jogl.build.commit" value="manual"/>
+        <mkdir dir="${tempdir}" />
+        <exec dir="." executable="git" logError="true" failonerror="false" failifexecutionfails="false"
+                  output="${tempdir}/localbranch.raw">
+            <arg line="branch --no-color"/>
+        </exec>
+        <exec dir="." executable="sed" logError="true" failonerror="false" failifexecutionfails="false"
+                  outputproperty="jogl.build.branch">
+            <arg line="-e '/^[^*]/d' -e 's/* \(.*\)/\1/' ${tempdir}/localbranch.raw"/>
+        </exec>
+        <property name="jogl.build.branch" value="manual"/> <!-- fallback -->
+        <exec dir="${project.root}" executable="git" logError="true" failonerror="false" failifexecutionfails="false"
+                  outputproperty="jogl.build.commit">
+            <arg line="rev-parse HEAD"/>
+        </exec>
+        <property name="jogl.build.commit" value="manual"/> <!-- fallback -->
 
         <property name="nativewindow.version" value="${nativewindow_base_version}-b${jogl.build.number}-${version.timestamp}" />
         <property name="jogl.version"         value="${jogl_base_version}-b${jogl.build.number}-${version.timestamp}" />
         <property name="newt.version"         value="${newt_base_version}-b${jogl.build.number}-${version.timestamp}" />
+        <property name="jogl.version.plus"    value="${jogl_base_version}-${jogl.build.branch}-b${jogl.build.number}-${jogl.build.commit}-${version.timestamp}" />
 
-        <property name="archive.name"               value="jogl-${jogl.version}-${os.and.arch}" />
-        <property name="archive"                    value="${build}/${archive.name}" />
+        <property name="archive.name"         value="jogl-${jogl.version}-${os.and.arch}" />
+        <property name="archive"              value="${build}/${archive.name}" />
+
+        <condition property="setup.noNativeAWT">
+            <or>
+                <isset property="setup.noAWT"/> 
+                <isset property="isAndroid"/> 
+            </or>
+        </condition>
 
-        <condition property="setup.nodesktop">
-            <and>
-                <isfalse value="${isWindows}" />
-                <isfalse value="${isOSX}" />
-                <isfalse value="${isX11}" />
-            </and>
+        <condition property="setup.noNativeDesktop">
+            <or>
+                <isset property="isAndroid"/> 
+            </or>
         </condition>
 
-        <echo message="setup.nodesktop: ${setup.nodesktop}" />
         <echo message="setup.noAWT: ${setup.noAWT}" />
+        <echo message="setup.noNativeAWT: ${setup.noNativeAWT}" />
+        <echo message="setup.noNativeDesktop: ${setup.noNativeDesktop}" />
 
         <!-- Load the user specified properties file that defines various host
            - specific paths.  The user will be notified if this is does not
@@ -90,6 +120,7 @@
         <echo message="Loaded ${user.home}/gluegen.properties." />
         <echo message="antlr.jar=${antlr.jar}" />
         <echo message="junit.jar=${junit.jar}" />
+        <echo message="android.jar=${android.jar}" />
 
         <!-- Set swt.jar to the correct file for this platform. We point to the debug JARs to allow
              stepping into SWT calls using the accompanying source code zip archives. -->
@@ -105,6 +136,12 @@
         <condition property="swt.jar" value="${project.root}/make/lib/swt/gtk-linux-x86/swt-debug.jar">
           <istrue value="${isLinuxX86}" />
         </condition>
+        <condition property="swt.jar" value="${project.root}/make/lib/swt/gtk-linux-x86/swt-debug.jar">
+          <istrue value="${isLinuxARMv7}" /> <!-- FIXME JAU .. hack -->
+        </condition>
+        <condition property="swt.jar" value="${project.root}/make/lib/swt/gtk-linux-x86/swt-debug.jar">
+          <istrue value="${isAndroid}" /> <!-- FIXME JAU .. hack -->
+        </condition>
         <condition property="swt.jar" value="${project.root}/make/lib/swt/cocoa-macosx-x86_64/swt-debug.jar">
           <and>
             <istrue value="${isOSX}" />
@@ -123,6 +160,18 @@
             </or>
           </and>
         </condition>
+        <condition property="swt.jar" value="${project.root}/make/lib/swt/gtk-solaris-x86/swt-debug.jar">
+          <istrue value="${isSolarisX86}" />
+        </condition>
+        <condition property="swt.jar" value="${project.root}/make/lib/swt/gtk-solaris-x86/swt-debug.jar">
+          <istrue value="${isSolarisAMD64}" />
+        </condition>
+        <condition property="swt.jar" value="${project.root}/make/lib/swt/gtk-solaris-sparc/swt-debug.jar">
+          <istrue value="${isSolarisSparc}" />
+        </condition>
+		<condition property="swt.jar" value="${project.root}/make/lib/swt/gtk-solaris-sparc/swt-debug.jar">
+          <istrue value="${isSolarisSparcv9}" />
+        </condition>
         <echo message="swt.jar=${swt.jar}" />
 
         <property name="target.sourcelevel" value="1.5" />
@@ -134,7 +183,6 @@
         <!-- NOTE: the value of the debug and optimise attributes will not be overridden if already set externally -->
         <property name="javacdebug"       value="true" /> 
         <property name="javacdebuglevel"  value="source,lines" /> 
-        <!--property name="javacdebug"       value="true" /--> 
         <!--property name="javacdebuglevel"  value="source,lines,vars" /--> 
         <!-- property name="javac.memorymax"  value="128m" /-->  <!-- I ran out of memory with these .. linux x86_64 6u14 -->
         <property name="javac.memorymax"  value="512m" /> 
@@ -191,161 +239,245 @@
           <pathelement location="${gluegen-gl.jar}" />
         </path>
 
+        <!-- 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"  />
+
+        <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}" />
+        </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}" />
+        </path>
+        <path id="nativewindow_core_atoms.classpath">
+            <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.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.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" />
+
+        <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.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}" />
+        </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}" />
+        </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}" />
+        </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.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 -->
+        <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}" />
+        </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}" />
+        </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}" />
+        </path>
+        <path id="newt_all-android_atoms.classpath">
+            <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="jogl.test.jar"              value="${build.jogl}/jogl.test.jar"/>
+        <property name="gluegen-rt.jar"                 value="${build.gluegen}/gluegen-rt.jar" />
+        <property name="jogl.test.jar"                  value="${jar}/jogl.test.jar"/>
 
         <!-- JavaSE combinations . AWT -->
-        <property name="nativewindow.all.jar"       value="${build.nativewindow}/nativewindow.all.jar" />
-        <property name="jogl.all.jar"               value="${build.jogl}/jogl.all.jar" />
-        <property name="newt.all.jar"               value="${build.newt}/newt.all.jar" />
-        <property name="newt.event.jar"             value="${build.newt}/newt.event.jar" />
+        <property name="jogl.all.jar"                   value="${jar}/jogl.all.jar" />
+        <property name="newt.event.jar"                 value="${jar}/newt.event.jar" />
 
         <!-- JavaSE combinations . NO.AWT -->
-        <property name="nativewindow.all-noawt.jar" value="${build.nativewindow}/nativewindow.all-noawt.jar" />
-        <property name="jogl.all-noawt.jar"         value="${build.jogl}/jogl.all-noawt.jar" />
-        <property name="newt.all-noawt.jar"         value="${build.newt}/newt.all-noawt.jar" />
+        <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" />
 
         <path id="swt_gluegen.classpath">
             <pathelement location="${gluegen-rt.jar}" />
             <pathelement location="${swt.jar}" />
         </path>
 
+        <!-- JOGL Compilation .. -->
         <path id="nativewindow_gluegen.classpath">
             <pathelement location="${gluegen-rt.jar}" />
             <pathelement location="${swt.jar}" />
-            <pathelement location="${nativewindow.all.jar}" />
+            <path refid="nativewindow_all_atoms.classpath" />
         </path>
 
-        <path id="nativewindow_gluegen_jogl.classpath">
+        <!-- NEWT Compilation .. -->
+        <path id="jogl_nativewindow_gluegen.classpath">
+            <pathelement location="${android.jar}" />
             <pathelement location="${gluegen-rt.jar}" />
             <pathelement location="${swt.jar}" />
-            <pathelement location="${nativewindow.all.jar}" />
-            <pathelement location="${jogl.all.jar}" />
+            <path refid="nativewindow_all_atoms.classpath" />
+            <path refid="jogl_all_atoms.classpath" />
         </path>
 
-        <path id="jogl_newt_all.classpath">
+        <!-- Test Compilation .. -->
+        <path id="junit_jogl_newt_android.compile.classpath">
+            <pathelement location="${android.jar}" />
+            <pathelement location="${junit.jar}" />
+            <pathelement location="${ant.jar}" />
+            <pathelement location="${ant-junit.jar}" />
             <pathelement location="${gluegen-rt.jar}" />
             <pathelement location="${swt.jar}" />
-            <pathelement location="${nativewindow.all.jar}" />
-            <pathelement location="${jogl.all.jar}" />
-            <pathelement location="${newt.all.jar}" />
+            <path refid="nativewindow_all_atoms.classpath" />
+            <path refid="jogl_all_atoms.classpath" />
+            <path refid="newt_all_atoms.classpath" />
+            <pathelement location="${newt.driver.android.jar}" />
         </path>
 
-        <path id="jogl_newt_all-noawt.classpath">
+        <!-- Postbuild: javadoc .. -->
+        <path id="jogl_all.classpath">
+            <pathelement location="${android.jar}" />
             <pathelement location="${gluegen-rt.jar}" />
             <pathelement location="${swt.jar}" />
-            <pathelement location="${nativewindow.all-noawt.jar}" />
-            <pathelement location="${jogl.all-noawt.jar}" />
-            <pathelement location="${newt.all-noawt.jar}" />
+            <pathelement location="${jogl.all.jar}" />
         </path>
 
-        <path id="junit_jogl_newt.compile.classpath">
+        <!-- Test Run w/ AWT .. -->
+        <path id="junit_jogl_awt.run.classpath">
             <pathelement location="${junit.jar}" />
             <pathelement location="${ant.jar}" />
             <pathelement location="${ant-junit.jar}" />
             <pathelement location="${gluegen-rt.jar}" />
-            <pathelement location="${nativewindow.all.jar}" />
             <pathelement location="${jogl.all.jar}" />
-            <pathelement location="${newt.all.jar}" />
-            <pathelement location="${swt.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}"/>
 
-        <path id="junit_jogl_awt.run.classpath">
+        <!-- Test Run w/o AWT .. -->
+        <path id="junit_jogl_noawt.run.classpath">
             <pathelement location="${junit.jar}" />
             <pathelement location="${ant.jar}" />
             <pathelement location="${ant-junit.jar}" />
             <pathelement location="${gluegen-rt.jar}" />
-            <pathelement location="${nativewindow.all.jar}" />
-            <pathelement location="${jogl.all.jar}" />
-            <pathelement location="${newt.event.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}"/>
 
-        <!-- classpath used when running SWT tests -->
+        <!-- Test Run w/ SWT .. -->
         <path id="junit_jogl_swt.run.classpath">
           <pathelement location="${junit.jar}" />
           <pathelement location="${ant.jar}" />
           <pathelement location="${ant-junit.jar}" />
           <pathelement location="${gluegen-rt.jar}" />
           <pathelement location="${swt.jar}" />
-          <pathelement location="${nativewindow.all.jar}" />
           <pathelement location="${jogl.all.jar}" />
-          <pathelement location="${newt.event.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}${nativewindow.all.jar}${path.separator}${jogl.all.jar}${path.separator}${newt.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}"/>
 
-        <path id="junit_jogl_newt.run.classpath">
+        <!-- Test Run w/ Android [w/o AWT] .. -->
+        <path id="junit_jogl_android.run.classpath">
             <pathelement location="${junit.jar}" />
             <pathelement location="${ant.jar}" />
             <pathelement location="${ant-junit.jar}" />
+            <pathelement location="${android.jar}" />
             <pathelement location="${gluegen-rt.jar}" />
-            <pathelement location="${nativewindow.all-noawt.jar}" />
-            <pathelement location="${jogl.all-noawt.jar}" />
-            <pathelement location="${newt.all-noawt.jar}" />
+            <pathelement location="${jogl.all-android.jar}" />
             <pathelement location="${jogl.test.jar}" />
         </path>
-        <property name="junit_jogl_newt.run.jars"
-                  value="${junit.jar}${path.separator}${ant.jar}${path.separator}${ant-junit.jar}${path.separator}${gluegen-rt.jar}${path.separator}${nativewindow.all-noawt.jar}${path.separator}${jogl.all-noawt.jar}${path.separator}${newt.all-noawt.jar}${path.separator}${jogl.test.jar}"/>
-
-        <path id="junit_jogl_newt_awt.run.classpath">
-            <pathelement location="${junit.jar}" />
-            <pathelement location="${ant.jar}" />
-            <pathelement location="${ant-junit.jar}" />
-            <pathelement location="${gluegen-rt.jar}" />
-            <pathelement location="${nativewindow.all.jar}" />
-            <pathelement location="${jogl.all.jar}" />
-            <pathelement location="${newt.all.jar}" />
-            <pathelement location="${jogl.test.jar}" />
-        </path>
-        <property name="junit_jogl_newt_awt.run.jars"
-                  value="${junit.jar}${path.separator}${ant.jar}${path.separator}${ant-junit.jar}${path.separator}${gluegen-rt.jar}${path.separator}${nativewindow.all.jar}${path.separator}${jogl.all.jar}${path.separator}${newt.all.jar}${path.separator}${jogl.test.jar}"/>
-
-
-        <!-- 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="jogl.core.jar"                  value="${build.jogl}/jogl.core.jar" />
-        <property name="jogl.cg.jar"                    value="${build.jogl}/jogl.cg.jar" />
-        <property name="jogl.gles1.jar"                 value="${build.jogl}/jogl.gles1.jar" />
-        <property name="jogl.gles1.dbg.jar"             value="${build.jogl}/jogl.gles1.dbg.jar" />
-        <property name="jogl.gles2.jar"                 value="${build.jogl}/jogl.gles2.jar" />
-        <property name="jogl.gles2.dbg.jar"             value="${build.jogl}/jogl.gles2.dbg.jar" />
-        <property name="jogl.egl.jar"                   value="${build.jogl}/jogl.egl.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.glugldesktop.jar"                value="${build.jogl}/jogl.glu.gldesktop.jar" />
+        <property name="junit_jogl_android.run.jars"
+                  value="${junit.jar}${path.separator}${ant.jar}${path.separator}${ant-junit.jar}${path.separator}${gluegen-rt.jar}${path.separator}${jogl.all-android.jar}${path.separator}${jogl.test.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.gldesktop.jar"             value="${build.jogl}/jogl.gldesktop.jar" />
-        <property name="jogl.gldesktop.dbg.jar"         value="${build.jogl}/jogl.gldesktop.dbg.jar" />
-
-        <property name="jogl.omx.jar"                   value="${build.jogl}/jogl.omx.jar" />
-
-        <property name="jogl.awt.jar"                   value="${build.jogl}/jogl.awt.jar" />
-        <property name="jogl.util.jar"                  value="${build.jogl}/jogl.util.jar" />
-        <property name="jogl.util.gldesktop.jar"              value="${build.jogl}/jogl.util.gldesktop.jar" />
-        <property name="jogl.util.awt.jar"              value="${build.jogl}/jogl.util.awt.jar" />
-        <property name="jogl.util.fixedfuncemu.jar"     value="${build.jogl}/jogl.util.fixedfuncemu.jar" />
-        <property name="jogl.sdk.jar"                   value="${build.jogl}/jogl.sdk.jar" />
-
-        <property name="newt.core.jar"                  value="${build.newt}/newt.core.jar" />
-        <property name="newt.awt.jar"                   value="${build.newt}/newt.awt.jar" />
-        <property name="newt.os.x11.jar"                value="${build.newt}/newt.os.x11.jar" />
-        <property name="newt.os.win.jar"                value="${build.newt}/newt.os.win.jar" />
-        <property name="newt.os.osx.jar"                value="${build.newt}/newt.os.osx.jar" />
-        <property name="newt.ogl.jar"                   value="${build.newt}/newt.ogl.jar" />
-        <property name="newt.hw.broadcomegl.jar"        value="${build.newt}/newt.hw.broadcomegl.jar" />
-        <property name="newt.hw.intelgdl.jar"           value="${build.newt}/newt.hw.intelgdl.jar" />
 
         <!-- The location and name of the configuration ANT file that will 
            - validate to ensure that all user-define variables are set. -->
diff --git a/make/build-jogl.xml b/make/build-jogl.xml
index c14f667..0cf7c17 100644
--- a/make/build-jogl.xml
+++ b/make/build-jogl.xml
@@ -35,10 +35,6 @@
    - property in gluegen.properties; again see the example file in this
    - directory.
    -   
-   - Optional properties:
-   -   -Djogl.cg=1 when combined with the build or javadoc targets will cause
-   -               the experimental binding to NVidia's Cg language to be built.
-   -
    - Thanks to Rob Grzywinski and Artur Biesiadowski for the bulk of the
    - ANT build, including the GlueGen and StaticGLInfo tasks, the building of
    - the Java generated sources, the first and second phase Java compiles, and
@@ -46,10 +42,13 @@
    - port to the ant-contrib CPPTask framework. Thanks to Athomas Goldberg for
    - the original OS detection code.
    -
-   - Some environment defs affecting compilation
+   - Some environment defs affecting native compilation (only)
+       setup.noNativeDesktop     - drop native desktop bindings (glx, wgl, ..)
+
+       setup.addNativeOpenMAX    - add experimental binding to Khrono's OpenMAX
 
-   - setup.nodesktop is set iff:
-        !isWindows && !isOSX && !isX11
+       setup.addNativeNVidiaCG   - add experimental binding to NVidia's Cg language 
+                                   (enabled for windows, osx and X11 per default)
 
    - Internal settings, may not be necessary to set them manually,
      since all JAR archives are orthogonal.
@@ -66,6 +65,14 @@
       <classpath> <pathelement location="${ant-contrib.jar}"/> </classpath>
     </taskdef>
 
+    <condition property="setup.addNativeNVidiaCG">
+        <or>
+            <isset property="${isWindows}" />
+            <isset property="${isOSX}" />
+            <isset property="${isX11}" />
+        </or>
+    </condition>
+
     <!-- ================================================================== -->
     <!-- 
        - Base initialization and detection of operating system.
@@ -130,7 +137,7 @@
                   value="javax/media/opengl/awt/** jogamp/opengl/**/awt/**"/>
 
         <property name="java.part.util"
-                  value="com/jogamp/opengl/util/* com/jogamp/opengl/util/texture/** com/jogamp/opengl/util/packrect/**"/>
+                  value="com/jogamp/opengl/util/* com/jogamp/opengl/util/texture/** com/jogamp/opengl/util/packrect/** jogamp/opengl/util/*"/>
 
         <property name="java.part.util.awt"
                   value="com/jogamp/opengl/util/**/awt/** com/jogamp/opengl/util/AWTAnimatorImpl*"/>
@@ -139,7 +146,16 @@
                   value="com/jogamp/opengl/util/**/gl2/**"/>
 
         <property name="java.part.util.glsl"
-                  value="com/jogamp/opengl/util/glsl/* com/jogamp/opengl/util/glsl/fixedfunc/*"/>
+                  value="com/jogamp/opengl/util/glsl/* com/jogamp/opengl/util/glsl/fixedfunc/* jogamp/opengl/util/glsl/*"/>
+
+        <property name="java.part.util.graph"
+                  value="com/jogamp/graph/** jogamp/graph/**"/>
+
+        <property name="java.part.util.graph.fonts"
+                  value="jogamp/graph/font/fonts/**"/>
+
+        <property name="java.part.util.graph.shadercode"
+                  value="jogamp/graph/curve/opengl/shader/* jogamp/graph/curve/opengl/shader/bin/**"/>
 
         <property name="java.part.util.fixedfuncemu"
                   value="jogamp/opengl/util/glsl/fixedfunc/**"/>
@@ -147,14 +163,13 @@
         <property name="java.part.util.fixedfuncemu.shadercode"
                   value="jogamp/opengl/util/glsl/fixedfunc/shaders/* jogamp/opengl/util/glsl/fixedfunc/shaders/bin/**"/>
 
-        <!-- condition excludes -->
+        <property name="java.part.nonjava" 
+                  value="${java.part.util.fixedfuncemu.shadercode} ${java.part.util.graph.shadercode} ${java.part.util.graph.fonts}"/>
 
-        <condition property="java.excludes.nv-cg"
-                   value="${java.part.nv-cg}">
-          <not>
-           <isset property="jogl.cg"/> 
-          </not>
-        </condition>
+        <property name="java.part.all-desktop" 
+                  value="${java.part.sdk} ${java.part.glx} ${java.part.wgl} ${java.part.cgl} ${java.part.gldesktop} ${java.part.glugldesktop} ${java.part.util.gldesktop}"/>
+
+        <!-- condition excludes -->
 
         <condition property="java.excludes.awt"
                    value="${java.part.awt} ${java.part.util.awt}">
@@ -167,15 +182,7 @@
         <property name="java.excludes.fixme" 
                   value="jogamp/opengl/gl2/fixme/** com/jogamp/audio/windows/waveout/TestSpatialization.java" />
 
-        <property name="java.part.desktop"
-                   value="${java.part.glx} ${java.part.wgl} ${java.part.cgl} ${java.excludes.fixme} ${java.part.nv-cg} ${java.part.gldesktop} ${java.part.gldesktop.dbg} ${java.part.awt} ${java.part.glugldesktop} ${java.part.util.awt} ${java.part.util.gldesktop} com/jogamp/opengl/util/TGAWriter.java"/>
-
-        <condition property="java.excludes.desktop"
-                   value="${java.part.desktop}">
-           <isset property="setup.nodesktop"/> 
-        </condition>
-
-        <property name="java.excludes.all" value="${java.excludes.fixme} ${java.excludes.nv-cg} ${java.excludes.awt} ${java.excludes.desktop}" />
+        <property name="java.excludes.all" value="${java.excludes.fixme} ${java.excludes.awt}" />
         <echo message="java.excludes.all: ${java.excludes.all}" />
     </target>
 
@@ -197,7 +204,6 @@
         <!-- The source directories. -->
         <property name="src.java" value="${project.root}/${rootrel.src.java}" />
         <property name="src.c"    value="${project.root}/${rootrel.src.c}" />
-        <property name="tempdir"  value="${project.root}/build-temp" />
         
         <!-- The generated source directories. -->
         <property name="src.generated" value="${build.jogl}/gensrc" />
@@ -212,6 +218,8 @@
         <property name="obj.joglsub"                value="${obj.jogl}/jogl" />
         <property name="obj.cgsub"                  value="${obj.jogl}/cg" />
 
+        <property name="javah.classpath" value="${gluegen-rt.jar}:${build.nativewindow}/classes:${classes}" />
+
         <!-- The GL headers from which Java files are generated -->
         <property name="stub.includes.opengl"       value="${stub.includes}/opengl" />
 
@@ -220,10 +228,10 @@
             <include name="${stub.includes}/macosx/**" />
             <include name="${stub.includes}/win32/**" />
             <include name="${stub.includes}/x11/**" />
-            <include name="${stub.includes}/gluegen/**" />
             <include name="${stub.includes}/khr/**" />
             <include name="${stub.includes}/jni/**" />
         </dirset>
+
         <fileset id="stub.includes.dependencies.fileset.1" dir="${stub.includes}">
             <include name="opengl/**" />
             <include name="macosx/**" />
@@ -245,8 +253,8 @@
             <include name="${stub.includes}/macosx/**" />
             <include name="${stub.includes}/win32/**" />
             <include name="${stub.includes}/x11/**" />
-            <include name="${stub.includes}/gluegen/**" />
             <include name="${stub.includes}/khr/**" />
+            <include name="${stub.includes}/jni/**" />
         </dirset>
         <fileset id="stub.includes.cg.dependencies.fileset" dir=".">
             <include name="${stub.includes}/cg/**" />
@@ -389,7 +397,8 @@
         <gluegen src="${stub.includes.opengl}/gles2.c"
                  outputRootDir="${build.jogl}"
                  config="${config.jogl}/gl-if-gl.cfg"
-                 includeRefid="stub.includes.fileset.all.gldesktop"
+                 includeRefid="stub.includes.fileset.all.gldesktop" 
+                 literalInclude="${stub.includes.gluegen.gg}"
                  emitter="com.jogamp.gluegen.opengl.GLEmitter"
                  debug="false">
             <classpath refid="gluegen-gl.classpath" />
@@ -403,6 +412,7 @@
                  outputRootDir="${build.jogl}"
                  config="${config.jogl}/gl-if-gl2_es1.cfg" 
                  includeRefid="stub.includes.fileset.all.gldesktop"
+                 literalInclude="${stub.includes.gluegen.gg}"
                  emitter="com.jogamp.gluegen.opengl.GLEmitter">
             <classpath refid="gluegen-gl.classpath" />
         </gluegen>
@@ -415,6 +425,7 @@
                  outputRootDir="${build.jogl}"
                  config="${config.jogl}/gl-if-gl2_es2.cfg" 
                  includeRefid="stub.includes.fileset.all.gldesktop"
+                 literalInclude="${stub.includes.gluegen.gg}"
                  emitter="com.jogamp.gluegen.opengl.GLEmitter">
             <classpath refid="gluegen-gl.classpath" />
         </gluegen>
@@ -427,6 +438,7 @@
                  outputRootDir="${build.jogl}"
                  config="${config.jogl}/gl-if-gl3-subset.cfg"
                  includeRefid="stub.includes.fileset.all.gldesktop"
+                 literalInclude="${stub.includes.gluegen.gg}"
                  emitter="com.jogamp.gluegen.opengl.GLEmitter"
                  debug="false">
             <classpath refid="gluegen-gl.classpath" />
@@ -435,6 +447,7 @@
                  outputRootDir="${build.jogl}"
                  config="${config.jogl}/gl-if-gl2_gl3.cfg"
                  includeRefid="stub.includes.fileset.all.gldesktop"
+                 literalInclude="${stub.includes.gluegen.gg}"
                  emitter="com.jogamp.gluegen.opengl.GLEmitter">
             <classpath refid="gluegen-gl.classpath" />
         </gluegen>
@@ -447,6 +460,7 @@
                  outputRootDir="${build.jogl}"
                  config="${config.jogl}/gl-if-gl2.cfg"
                  includeRefid="stub.includes.fileset.all.gldesktop"
+                 literalInclude="${stub.includes.gluegen.gg}"
                  emitter="com.jogamp.gluegen.opengl.GLEmitter">
             <classpath refid="gluegen-gl.classpath" />
         </gluegen>
@@ -459,6 +473,7 @@
                  outputRootDir="${build.jogl}"
                  config="${config.jogl}/gl-if-gl3.cfg"
                  includeRefid="stub.includes.fileset.all.gldesktop"
+                 literalInclude="${stub.includes.gluegen.gg}"
                  emitter="com.jogamp.gluegen.opengl.GLEmitter">
             <classpath refid="gluegen-gl.classpath" />
         </gluegen>
@@ -471,6 +486,7 @@
                  outputRootDir="${build.jogl}"
                  config="${config.jogl}/gl-if-gl3bc.cfg"
                  includeRefid="stub.includes.fileset.all.gldesktop"
+                 literalInclude="${stub.includes.gluegen.gg}"
                  emitter="com.jogamp.gluegen.opengl.GLEmitter">
             <classpath refid="gluegen-gl.classpath" />
         </gluegen>
@@ -483,6 +499,7 @@
                  outputRootDir="${build.jogl}"
                  config="${config.jogl}/gl-if-gl4.cfg"
                  includeRefid="stub.includes.fileset.all.gldesktop"
+                 literalInclude="${stub.includes.gluegen.gg}"
                  emitter="com.jogamp.gluegen.opengl.GLEmitter">
             <classpath refid="gluegen-gl.classpath" />
         </gluegen>
@@ -495,6 +512,7 @@
                  outputRootDir="${build.jogl}"
                  config="${config.jogl}/gl-gl4bc.cfg"
                  includeRefid="stub.includes.fileset.all.gldesktop"
+                 literalInclude="${stub.includes.gluegen.gg}"
                  emitter="com.jogamp.gluegen.opengl.GLEmitter"
                  debug="false">
             <classpath refid="gluegen-gl.classpath" />
@@ -508,6 +526,7 @@
                  outputRootDir="${build.jogl}"
                  config="${config.jogl}/gl-es1.cfg"
                  includeRefid="stub.includes.fileset.all.gldesktop"
+                 literalInclude="${stub.includes.gluegen.gg}"
                  emitter="com.jogamp.gluegen.opengl.GLEmitter"
                  debug="false">
             <classpath refid="gluegen-gl.classpath" />
@@ -521,6 +540,7 @@
                  outputRootDir="${build.jogl}"
                  config="${config.jogl}/gl-es2.cfg"
                  includeRefid="stub.includes.fileset.all.gldesktop"
+                 literalInclude="${stub.includes.gluegen.gg}"
                  emitter="com.jogamp.gluegen.opengl.GLEmitter">
             <classpath refid="gluegen-gl.classpath" />
         </gluegen>
@@ -533,6 +553,7 @@
         <gluegen src="${gl.c}" 
                  config="${gl.cfg.nsig}"
                  includeRefid="stub.includes.fileset.all.gldesktop"
+                 literalInclude="${stub.includes.gluegen.gg}"
                  emitter="com.jogamp.gluegen.nativesig.NativeSignatureEmitter">
             <classpath refid="gluegen-gl.classpath" />
         </gluegen>
@@ -545,6 +566,7 @@
                  outputRootDir="${build.jogl}"
                  config="${config.jogl}/glu-base.cfg"
                  includeRefid="stub.includes.fileset.all.gldesktop"
+                 literalInclude="${stub.includes.gluegen.gg}"
                  emitter="com.jogamp.gluegen.opengl.GLEmitter">
             <classpath refid="gluegen-gl.classpath" />
         </gluegen>
@@ -557,6 +579,7 @@
                  outputRootDir="${build.jogl}"
                  config="${config.jogl}/glu-gl2es1.cfg"
                  includeRefid="stub.includes.fileset.all.gldesktop"
+                 literalInclude="${stub.includes.gluegen.gg}"
                  emitter="com.jogamp.gluegen.opengl.GLEmitter">
             <classpath refid="gluegen-gl.classpath" />
         </gluegen>
@@ -569,6 +592,7 @@
                  outputRootDir="${build.jogl}"
                  config="${config.jogl}/glu-gl2.cfg"
                  includeRefid="stub.includes.fileset.all.gldesktop"
+                 literalInclude="${stub.includes.gluegen.gg}"
                  emitter="com.jogamp.gluegen.opengl.GLEmitter">
             <classpath refid="gluegen-gl.classpath" />
         </gluegen>
@@ -581,6 +605,7 @@
                  outputRootDir="${build.jogl}"
                  config="${glext.platform.cfg}"
                  includeRefid="stub.includes.fileset.all.gldesktop"
+                 literalInclude="${stub.includes.gluegen.gg}"
                  emitter="com.jogamp.gluegen.opengl.GLEmitter">
             <classpath refid="gluegen-gl.classpath" />
         </gluegen>
@@ -594,6 +619,7 @@
                  outputRootDir="${build.jogl}"
                  config="${window.es.cfg}"
                  includeRefid="stub.includes.fileset.platform"
+                 literalInclude="${stub.includes.gluegen.gg}"
                  emitter="com.jogamp.gluegen.opengl.GLEmitter"
                  debug="false">
             <classpath refid="gluegen-gl.classpath" />
@@ -608,6 +634,7 @@
                  outputRootDir="${build.jogl}"
                  config="${window.es.ext.cfg}"
                  includeRefid="stub.includes.fileset.platform"
+                 literalInclude="${stub.includes.gluegen.gg}"
                  emitter="com.jogamp.gluegen.opengl.GLEmitter"
                  debug="false">
             <classpath refid="gluegen-gl.classpath" />
@@ -621,6 +648,7 @@
                  outputRootDir="${build.jogl}"
                  config="${window.os0.cfg}"
                  includeRefid="stub.includes.fileset.platform"
+                 literalInclude="${stub.includes.gluegen.gg}"
                  emitter="com.jogamp.gluegen.opengl.GLEmitter">
             <classpath refid="gluegen-gl.classpath" />
         </gluegen>
@@ -633,6 +661,7 @@
                  outputRootDir="${build.jogl}"
                  config="${window.os1.cfg}"
                  includeRefid="stub.includes.fileset.platform"
+                 literalInclude="${stub.includes.gluegen.gg}"
                  emitter="com.jogamp.gluegen.opengl.GLEmitter">
             <classpath refid="gluegen-gl.classpath" />
         </gluegen>
@@ -662,7 +691,7 @@
             <src path="${src.java}" />
         </javac>
 
-        <jar manifest="${build.jogl}/tempversion" destfile="${gluegen-gl.jar}" filesonly="true">
+        <jar manifest="${build.jogl}/manifest.mf" destfile="${gluegen-gl.jar}" filesonly="true">
             <fileset dir="${classes}"
                      includes="${java.part.gluegen-gl}"/>
         </jar>
@@ -752,7 +781,7 @@
        - from the C GL headers.  This involves setting the taskdef and creating
        - the classpath reference id then running the task on each header.
       -->
-    <target name="java.generate.cg" depends="build.gluegen-gl.jar,java.generate.cg.check" if="jogl.cg" unless="java.generate.cg.skip">
+    <target name="java.generate.cg" depends="build.gluegen-gl.jar,java.generate.cg.check" unless="java.generate.cg.skip">
         <!-- Add the GlueGen and BuildStaticGLInfo tasks to ANT -->
         <taskdef name="gluegen" classname="com.jogamp.gluegen.ant.GlueGenTask"
                  classpathref="gluegen.classpath" />
@@ -764,6 +793,7 @@
                  outputRootDir="${build.jogl}"
                  config="${config.jogl}/cg-common.cfg"
                  includeRefid="stub.includes.cg.fileset.all"
+                 literalInclude="${stub.includes.gluegen.gg}"
                  emitter="com.jogamp.gluegen.procaddress.ProcAddressEmitter">
             <classpath refid="gluegen-gl.classpath" />
         </gluegen>
@@ -1005,7 +1035,14 @@
 
     <target name="java.compile.thirdpass" depends="java.generate.composable.pipeline.custom, java.compile.thirdpass.javase" />
 
-    <target name="java.compile" depends="java.compile.firstpass,java.compile.secondpass,java.compile.thirdpass" />
+    <target name="java.compile" depends="java.compile.firstpass,java.compile.secondpass,java.compile.thirdpass">
+        <!-- make shadercode and fonts available in classpath -->
+        <copy todir="${classes}">
+            <fileset dir="${src.java}"
+                     includes="${java.part.nonjava}"
+                     excludes="**/*.java"/>
+        </copy>
+    </target>
 
     <!-- ================================================================== -->
     <!-- 
@@ -1022,6 +1059,12 @@
         <includepath path="/usr/local/include" />
       </compiler>
 
+      <compiler id="compiler.cfg.linux.armv7.jogl.x11" extends="compiler.cfg.linux.armv7">
+        <!-- Need to force /usr/include headers on to include path (after all others), due to crosscompiler usage -->
+        <compilerarg value="-idirafter" />
+        <compilerarg value="/usr/include" />
+      </compiler>
+
       <!-- linker configuration -->
  
       <linker id="linker.cfg.freebsd.jogl.x11" extends="linker.cfg.freebsd">
@@ -1039,11 +1082,24 @@
         <syslibset libs="Xxf86vm" />
       </linker>
 
+      <linker id="linker.cfg.linux.x86.jogl.x11" extends="linker.cfg.linux.x86">
+        <syslibset libs="X11"/>
+        <syslibset libs="Xxf86vm" />
+      </linker>
+
       <linker id="linker.cfg.linux.amd64.jogl.x11" extends="linker.cfg.linux.amd64">
         <syslibset libs="X11"/>
         <syslibset libs="Xxf86vm" />
       </linker>
 
+      <linker id="linker.cfg.linux.armv7.jogl.x11" extends="linker.cfg.linux.armv7">
+        <syslibset dir="${env.TARGET_PLATFORM_LIBS}" libs="X11"/>
+        <syslibset dir="${env.TARGET_PLATFORM_LIBS}" libs="Xxf86vm" />
+      </linker>
+
+      <linker id="linker.cfg.android.jogl" extends="linker.cfg.android">
+      </linker>
+
       <linker id="linker.cfg.solaris.jogl.x11" extends="linker.cfg.solaris">
         <syslibset libs="X11"/>
       </linker>
@@ -1112,8 +1168,8 @@
 
     <target name="c.configure.linux.x86" if="isLinuxX86">
       <echo message="Linux.x86" />
-      <property name="compiler.cfg.id"                     value="compiler.cfg.linux" />
-      <property name="linker.cfg.id.os"                    value="linker.cfg.linux.jogl.x11" />
+      <property name="compiler.cfg.id"                     value="compiler.cfg.linux.x86" />
+      <property name="linker.cfg.id.os"                    value="linker.cfg.linux.x86.jogl.x11" />
     </target>
     
     <target name="c.configure.linux.amd64" if="isLinuxAMD64">
@@ -1122,14 +1178,26 @@
       <property name="linker.cfg.id.os"                    value="linker.cfg.linux.amd64.jogl.x11" />
     </target>
     
+    <target name="c.configure.linux.armv7" if="isLinuxARMv7">
+      <echo message="Linux.armv7" />
+      <property name="compiler.cfg.id"                     value="compiler.cfg.linux.armv7.jogl.x11" />
+      <property name="linker.cfg.id.os"                    value="linker.cfg.linux.armv7.jogl.x11" />
+    </target>
+    
     <target name="c.configure.linux.ia64" if="isLinuxIA64">
       <echo message="Linux.IA64" />
       <property name="compiler.cfg.id"                     value="compiler.cfg.linux" />
       <property name="linker.cfg.id.os"                    value="linker.cfg.linux.jogl.x11" />
     </target>
 
-    <target name="c.configure.linux" depends="c.configure.linux.x86,c.configure.linux.amd64,c.configure.linux.ia64,c.configure.x11" if="isLinux" />
+    <target name="c.configure.linux" depends="c.configure.linux.armv7,c.configure.linux.x86,c.configure.linux.amd64,c.configure.linux.ia64,c.configure.x11" if="isLinux" />
 
+    <target name="c.configure.android" if="isAndroid">
+      <echo message="Android" />
+      <property name="compiler.cfg.id"                      value="compiler.cfg.android" />
+      <property name="linker.cfg.id.os"                     value="linker.cfg.android.jogl" />
+    </target>
+    
     <target name="c.configure.solaris32" depends="c.configure.x11" if="isSolaris32Bit">
       <echo message="Solaris" />
       <property name="compiler.cfg.id"                     value="compiler.cfg.solaris" />
@@ -1179,7 +1247,7 @@
       <property name="linker.cfg.id.os"                    value="linker.cfg.macosx.jogl" />
     </target>
     
-    <target name="c.configure.2" depends="c.configure.win32,c.configure.linux,c.configure.solaris32,c.configure.solaris.sparcv9,c.configure.solaris.amd64,c.configure.macosx,c.configure.freebsd,c.configure.hpux" />
+    <target name="c.configure.2" depends="c.configure.win32,c.configure.linux,c.configure.android,c.configure.solaris32,c.configure.solaris.sparcv9,c.configure.solaris.amd64,c.configure.macosx,c.configure.freebsd,c.configure.hpux" />
 
     <target name="c.configure" depends="c.configure.1,c.configure.2" />
 
@@ -1208,14 +1276,16 @@
         <condition property="c.compiler.use-debug"><istrue value="${c.compiler.debug}"/></condition>
 
         <patternset id="c.src.files.jogl.desktop">
+          <include name="${rootrel.src.c}/JoglCommon.c"/>
+          <include name="${rootrel.src.c}/GLDebugMessageHandler.c"/>
           <include name="${rootrel.src.c}/macosx/MacOSXCustomCGLCode.c" if="isOSX"/>
           <include name="${rootrel.src.c}/macosx/MacOSXWindowSystemInterface.m" if="isOSX"/>
           <include name="${rootrel.src.c}/macosx/ContextUpdater.m" if="isOSX"/>
           <include name="${rootrel.src.c}/GLXGetProcAddressARB.c" if="isX11"/>
           <!-- FIXME: the Mixer should be moved to another library -->
           <!--include name="${rootrel.src.c}/Mixer.cpp" if="isWindows"/-->
-          <include name="${rootrel.src.c.openmax}/omx_tool.c"  if="useOpenMAX"/>
-          <include name="${rootrel.src.c.openmax}/com_jogamp_openmax_OMXInstance.c"  if="useOpenMAX"/>
+          <include name="${rootrel.src.c.openmax}/omx_tool.c"  if="setup.addNativeOpenMAX"/>
+          <include name="${rootrel.src.c.openmax}/com_jogamp_openmax_OMXInstance.c"  if="setup.addNativeOpenMAX"/>
 
           <include name="${rootrel.generated.c.jogl}/gl4/GL4bcImpl_JNI.c"/>
           <!--include name="${rootrel.generated.c.jogl}/GLU_JNI.c"/ EMPTY -->
@@ -1226,23 +1296,16 @@
           <include name="${rootrel.generated.c.jogl}/Windows/WGL*.c" if="isWindows"/>
         </patternset>
 
-        <patternset id="c.src.files.jogl.es2">
+        <patternset id="c.src.files.jogl.mobile">
+          <include name="${rootrel.src.c}/JoglCommon.c"/>
+          <include name="${rootrel.src.c}/GLDebugMessageHandler.c"/>
           <include name="${rootrel.src.c}/GLXGetProcAddressARB.c" if="isX11"/>
-          <include name="${rootrel.src.c.openmax}/omx_tool.c"  if="useOpenMAX"/>
-          <include name="${rootrel.src.c.openmax}/com_jogamp_openmax_OMXInstance.c"  if="useOpenMAX"/>
+          <include name="${rootrel.src.c.openmax}/omx_tool.c"  if="setup.addNativeOpenMAX"/>
+          <include name="${rootrel.src.c.openmax}/com_jogamp_openmax_OMXInstance.c"  if="setup.addNativeOpenMAX"/>
 
           <include name="${rootrel.generated.c.jogl}/egl/EGL_JNI.c"/>
           <include name="${rootrel.generated.c.jogl}/egl/EGLExtImpl_JNI.c"/>
           <include name="${rootrel.generated.c.jogl}/es2/GLES2Impl_JNI.c"/>
-        </patternset>
-
-        <patternset id="c.src.files.jogl.es1">
-          <include name="${rootrel.src.c}/GLXGetProcAddressARB.c" if="isX11"/>
-          <include name="${rootrel.src.c.openmax}/omx_tool.c"  if="useOpenMAX"/>
-          <include name="${rootrel.src.c.openmax}/com_jogamp_openmax_OMXInstance.c"  if="useOpenMAX"/>
-
-          <include name="${rootrel.generated.c.jogl}/egl/EGL_JNI.c"/>
-          <include name="${rootrel.generated.c.jogl}/egl/EGLExtImpl_JNI.c"/>
           <include name="${rootrel.generated.c.jogl}/es1/GLES1Impl_JNI.c"/>
           <!--include name="${rootrel.generated.c.jogl}/GLU_JNI.c"/ EMPTY -->
           <!--include name="${rootrel.generated.c.jogl}/es1/GLUes1_JNI.c" EMPTY /-->
@@ -1280,18 +1343,19 @@
               <compiler extends="@{compiler.cfg.id}" >
                 <sysincludepath path="${java.includes.dir}"/>
                 <sysincludepath path="${java.includes.dir.platform}"/>
+                <sysincludepath path="${stub.includes.gluegen.cc}"/>
                 <includepath path="stub_includes/khr"/>
                 <includepath path="stub_includes/egl"/>
                 <includepath path="stub_includes/opengl"/>
-                <includepath path="stub_includes/openmax" if="useOpenMAX"/>
-                <includepath path="stub_includes/cg" if="jogl.cg"/>        
+                <includepath path="stub_includes/openmax" if="setup.addNativeOpenMAX"/>
+                <includepath path="stub_includes/cg" if="setup.addNativeNVidiaCG"/>        
       
                 <!-- This is for the generated headers for handwritten C code -->
                 <includepath path="${src.generated.c}" />
                 <includepath path="${src.generated.c}/X11" if="isX11"/>
                 <includepath path="${src.generated.c}/MacOSX" if="isOSX"/>
                 <includepath path="${src.generated.c}/Windows" if="isWindows"/>
-                <includepath path="${src.generated.c.openmax}" if="useOpenMAX"/>
+                <includepath path="${src.generated.c.openmax}" if="setup.addNativeOpenMAX"/>
       
                 <!-- This must come last to not override real include paths -->
                 <!-- includepath path="stub_includes/macosx" if="isOSX" / -->
@@ -1329,45 +1393,39 @@
       </sequential>
     </macrodef>  
 
-    <target name="c.build.jogl.prepare.openMAX" if="useOpenMAX">
-      <javah destdir="${src.generated.c.openmax}" classpath="${classes}" class="com.jogamp.openmax.OMXInstance" />
+    <target name="c.build.jogl.prepare.openMAX" if="setup.addNativeOpenMAX">
+      <javah destdir="${src.generated.c.openmax}" classpath="${javah.classpath}" class="com.jogamp.openmax.OMXInstance" />
     </target>
 
     <target name="c.build.jogl.prepare" depends="c.build.jogl.prepare.openMAX">
+      <javah destdir="${build.jogl}/gensrc/native/jogl" classpath="${javah.classpath}" class="jogamp.opengl.GLDebugMessageHandler" />
       <!-- Generate the waveout Mixer header -->
       <!-- FIXME: this is temporary until we move this to another workspace -->
-      <!--javah destdir="${build.jogl}/gensrc/native/jogl" classpath="${classes}" class="com.jogamp.audio.windows.waveout.Mixer" /-->
+      <!--javah destdir="${build.jogl}/gensrc/native/jogl" classpath="${javah.classpath}" class="com.jogamp.audio.windows.waveout.Mixer" /-->
     </target>
 
-    <target name="c.build.jogl.desktop" unless="setup.nodesktop">
+    <target name="c.build.jogl.desktop" unless="setup.noNativeDesktop">
       <c.build c.compiler.src.files="c.src.files.jogl.desktop"
                output.lib.name="jogl_desktop"
                compiler.cfg.id="${compiler.cfg.id}"
                linker.cfg.id="${linker.cfg.id.os}"/>
     </target>
 
-    <target name="c.build.jogl.es2">
-      <c.build c.compiler.src.files="c.src.files.jogl.es2"
-               output.lib.name="jogl_es2"
-               compiler.cfg.id="${compiler.cfg.id}"
-               linker.cfg.id="${linker.cfg.id.base}"/>
-    </target>
-
-    <target name="c.build.jogl.es1">
-      <c.build c.compiler.src.files="c.src.files.jogl.es1"
-               output.lib.name="jogl_es1"
+    <target name="c.build.jogl.mobile">
+      <c.build c.compiler.src.files="c.src.files.jogl.mobile"
+               output.lib.name="jogl_mobile"
                compiler.cfg.id="${compiler.cfg.id}"
-               linker.cfg.id="${linker.cfg.id.base}"/>
+               linker.cfg.id="${linker.cfg.id.os}"/>
     </target>
 
-    <target name="c.build.jogl.cg" if="jogl.cg">
+    <target name="c.build.jogl.cg" if="setup.addNativeNVidiaCG">
       <c.build c.compiler.src.files="c.src.files.cg"
                output.lib.name="jogl_cg"
                compiler.cfg.id="${compiler.cfg.id}"
                linker.cfg.id="${linker.cfg.id.os}"/>
     </target>
     
-    <target name="c.manifest.cg" if="jogl.cg">
+    <target name="c.manifest.cg" if="setup.addNativeNVidiaCG">
       <msvc.manifest objdir="${obj.jogl}" dllname="jogl_cg" />
     </target>
 
@@ -1379,7 +1437,7 @@
       <antcall target="c.manifest.cg" inheritRefs="true" />
     </target>
 
-    <target name="c.build.jogl" depends="c.configure,c.build.jogl.prepare,c.build.jogl.desktop,c.build.jogl.es2,c.build.jogl.es1,c.build.jogl.cg">
+    <target name="c.build.jogl" depends="c.configure,c.build.jogl.prepare,c.build.jogl.desktop,c.build.jogl.mobile,c.build.jogl.cg">
       <antcall target="c.manifest" inheritRefs="true" />
     </target>
 
@@ -1387,12 +1445,20 @@
     <!--
        - Build the jogl.jar files.
       -->
-    <target name="build-jars" depends="gluegen.cpptasks.detect.os,build-jars-javase" />
+    <target name="build-jars-dependset" depends="init,gluegen.cpptasks.detect.os" >
+        <dependset>
+            <srcfileset dir="${src.java}"
+                     includes="${java.part.nonjava}"/>
+            <targetfileset dir="."
+                     includes="${jogl.util.jar} ${jogl.util.fixedfuncemu.jar}" />
+        </dependset>
+    </target>
+    <target name="build-jars" depends="build-jars-dependset,build-jars-javase" />
 
     <target name="setup-manifestfile" depends="common.init">
         <property name="manifestfile" value="joglversion"/>
         <copy file="${manifestfile}"
-            tofile="${build.jogl}/tempversion"
+            tofile="${build.jogl}/manifest.mf"
             overwrite="true">
             <filterset>
                 <filter token="VERSION" value="${jogl.version}"/>
@@ -1403,146 +1469,104 @@
         </copy>
     </target>
 
-    <target name="build-cg-jar-javase" depends="setup-manifestfile" if="jogl.cg">
-        <jar manifest="${build.jogl}/tempversion" destfile="${jogl.cg.jar}" filesonly="true">
-            <fileset dir="${classes}"
-                     includes="${java.part.nv-cg}"/>
-        </jar>
-    </target>
-
-    <target name="build-jars-os-desktop-javase" depends="setup-manifestfile" unless="setup.nodesktop">
-        <jar manifest="${build.jogl}/tempversion" destfile="${jogl.os.x11.jar}" filesonly="true">
+    <target name="build-jars-os-desktop-javase" depends="setup-manifestfile">
+        <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}/tempversion" 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}/tempversion" 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-es-javase" depends="setup-manifestfile">
-        <jar manifest="${build.jogl}/tempversion" destfile="${jogl.egl.jar}" filesonly="true">
-            <fileset dir="${classes}"
-                     includes="${java.part.egl}"
-                     excludes="${java.part.awt}"/>
-        </jar>
-        <jar manifest="${build.jogl}/tempversion" destfile="${jogl.gles1.jar}" filesonly="true">
-            <fileset dir="${classes}"
-                     includes="${java.part.es1}"
-                     excludes="${java.part.es1.dbg}"/>
-        </jar>
-        <jar manifest="${build.jogl}/tempversion" destfile="${jogl.gles1.dbg.jar}" filesonly="true">
-            <fileset dir="${classes}"
-                     includes="${java.part.es1.dbg}"/>
-        </jar>
-        <jar manifest="${build.jogl}/tempversion" destfile="${jogl.gles2.jar}" filesonly="true">
+    <target name="build-jars-mobile-javase" depends="setup-manifestfile">
+        <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl.glmobile.jar}" filesonly="true">
             <fileset dir="${classes}"
-                     includes="${java.part.es2} ${java.part.openmax}"
-                     excludes="${java.part.es2.dbg}"/>
+                     includes="${java.part.egl} ${java.part.es1} ${java.part.es2}"
+                     excludes="${java.part.awt} ${java.part.es1.dbg} ${java.part.es2.dbg}"/>
         </jar>
-        <jar manifest="${build.jogl}/tempversion" destfile="${jogl.gles2.dbg.jar}" filesonly="true">
+        <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl.glmobile.dbg.jar}" filesonly="true">
             <fileset dir="${classes}"
-                     includes="${java.part.es2.dbg}"/>
+                     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}/tempversion" 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}/tempversion" 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-all-awt-javase" depends="setup-manifestfile" unless="setup.noAWT">
-        <jar manifest="${build.jogl}/tempversion" destfile="${jogl.all.jar}" filesonly="true">
-            <fileset dir="${classes}"
-                     includes="${java.part.openmax}">
-                <include name="javax/media/opengl/**" />
-                <include name="com/jogamp/gluegen/runtime/**" />
-                <include name="com/jogamp/opengl/**" />
-                <include name="jogamp/opengl/**" />
-            </fileset>
-            <fileset dir="${src.java}"
-                     includes="${java.part.util.fixedfuncemu.shadercode}"/>
-        </jar>
-    </target>
-    <target name="build-jars-all-noawt-javase" depends="setup-manifestfile">
-        <jar manifest="${build.jogl}/tempversion" destfile="${jogl.all-noawt.jar}" filesonly="true">
-            <fileset dir="${classes}"
-                     includes="${java.part.openmax}"
-                     excludes="${java.part.awt} ${java.part.util.awt}">
-                <include name="javax/media/opengl/**" />
-                <include name="com/jogamp/gluegen/runtime/**" />
-                <include name="com/jogamp/opengl/**" />
-                <include name="jogamp/opengl/**" />
-            </fileset>
-            <fileset dir="${src.java}"
-                     includes="${java.part.util.fixedfuncemu.shadercode}"/>
-        </jar>
-    </target>
-
-    <target name="build-jars-desktop-javase" depends="setup-manifestfile,build-jars-os-desktop-javase" unless="setup.nodesktop">
+    <target name="build-jars-desktop-javase" depends="setup-manifestfile,build-jars-os-desktop-javase">
         <!--os specific gldesktop-->
-        <jar manifest="${build.jogl}/tempversion" 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} ${java.part.openmax}"
+                     includes="${java.part.gldesktop}"
                      excludes="${java.part.gldesktop.dbg} ${java.part.glugldesktop}"/>
         </jar>
 
         <!-- misc -->
-        <jar manifest="${build.jogl}/tempversion" 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}/tempversion" destfile="${jogl.glugldesktop.jar}" filesonly="true">
+        <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl.glugldesktop.jar}" filesonly="true">
             <fileset dir="${classes}"
                      includes="${java.part.glugldesktop}"/>
         </jar>
-        <jar manifest="${build.jogl}/tempversion" 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}"/>
         </jar>
     </target>
 
-    <target name="build-jars-javase" depends="setup-manifestfile, build-jars-es-javase, build-jars-awt-javase, build-cg-jar-javase, build-jars-all-awt-javase, build-jars-all-noawt-javase, build-jars-desktop-javase">
-        <jar manifest="${build.jogl}/tempversion" destfile="${jogl.core.jar}" filesonly="true">
+    <target name="build-jars-javase" depends="setup-manifestfile, build-jars-mobile-javase, build-jars-desktop-javase, build-jars-awt-javase">
+        <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}/tempversion" 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}/tempversion" 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}/tempversion" 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}/tempversion" 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}"
+                     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}"/>
         </jar>
-        <jar manifest="${build.jogl}/tempversion" 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}"/>
-            <fileset dir="${src.java}"
-                     includes="${java.part.util.fixedfuncemu.shadercode}"/>
         </jar>
-        <jar manifest="${build.jogl}/tempversion" destfile="${build.jogl}/jogl-natives-${os.and.arch}.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">
+            <fileset dir="${classes}"
+                     includes="${java.part.nv-cg}"/>
+        </jar>
+        <jar manifest="${build.jogl}/manifest.mf" destfile="${build.jogl}/jogl-natives-${os.and.arch}.jar" filesonly="true">
             <fileset dir="${obj.jogl}">
               <include name="*.${native.library.suffix}" />
+              <exclude name="*jogl_cg.${native.library.suffix}" />
             </fileset>
         </jar>
     </target>
@@ -1554,24 +1578,8 @@
        -        on the platform specific build targets.  To circumvent any 
        -        errors, ensure that the source is built first.
       -->
-    <target name="javadoc.nocg" depends="init" unless="jogl.cg">
-        <!-- Build the general public Javadoc -->
-        <javadoc packagenames="${javadoc.packagenames}"
-                 excludepackagenames="${java.excludes.javadoc.packagenames}"
-                 sourcepath="${src.java};${src.generated.java}"        
-                 destdir="${javadoc}" windowtitle="${javadoc.windowtitle}"
-                 overview="${javadoc.overview}" 
-                 source="${target.sourcelevel}"
-                 maxmemory="512m"
-                 linkoffline="${javadoc.link} 142-packages"
-         bottom="${javadoc.bottom}" >
-          <classpath refid="nativewindow_gluegen.classpath"/>
-          <taglet name="net.highteq.nativetaglet.NativeTaglet" path="${gluegen.jar}" />
-        </javadoc>
-    </target>
-
     <!-- Same as above but with Cg directories added -->
-    <target name="javadoc.cg" depends="init" if="jogl.cg">
+    <target name="javadoc" depends="init">
         <!-- Build the general public Javadoc with CG -->
         <javadoc packagenames="${javadoc.packagenames},com.jogamp.opengl.cg"
                  excludepackagenames="${java.excludes.javadoc.packagenames}"
@@ -1587,10 +1595,7 @@
         </javadoc>
     </target>
 
-    <target name="javadoc" depends="javadoc.nocg,javadoc.cg" />
-
-    <target name="javadoc.spec.nocg" depends="init" unless="jogl.cg">
-        <!-- Build the specification Javadoc -->
+    <target name="javadoc.spec" depends="init">
         <javadoc packagenames="${javadoc.spec.packagenames}"
                  excludepackagenames="${java.excludes.javadoc.packagenames}"
                  sourcepath="${src.java};${src.generated.java}"
@@ -1604,45 +1609,8 @@
           <taglet name="net.highteq.nativetaglet.NativeTaglet" path="${gluegen.jar}" />
         </javadoc>
     </target>
-                                                                                                                                   
-    <!-- Same as above since Cg directories are not part of spec -->
-    <target name="javadoc.spec.cg" depends="init" if="jogl.cg">
-        <!-- Build the specification Javadoc with CG -->
-        <javadoc packagenames="${javadoc.spec.packagenames}"
-                 excludepackagenames="${java.excludes.javadoc.packagenames}"
-                 sourcepath="${src.java};${src.generated.java}"
-                 destdir="${javadoc.spec}" windowtitle="${javadoc.windowtitle}"
-                 overview="${javadoc.overview}"
-                 source="${target.sourcelevel}"
-                 maxmemory="512m"
-                 linkoffline="${javadoc.link} 142-packages"
-                 bottom="${javadoc.bottom}" >
-          <classpath refid="nativewindow_gluegen.classpath"/>
-          <taglet name="net.highteq.nativetaglet.NativeTaglet" path="${gluegen.jar}" />
-        </javadoc>
-    </target>
-
-    <target name="javadoc.spec" depends="javadoc.spec.nocg,javadoc.spec.cg" />
-
-    <target name="javadoc.dev.nocg" unless="jogl.cg">
-        <!-- Build the internal developer Javadoc -->
-        <javadoc packagenames="${javadoc.dev.packagenames}"
-                 excludepackagenames="${java.excludes.javadoc.packagenames}"
-                 sourcepath="${src.java};${src.generated.java}"        
-                 destdir="${javadoc.dev}" windowtitle="${javadoc.windowtitle}"
-                 overview="${javadoc.overview}" 
-                 source="${target.sourcelevel}"
-                 maxmemory="512m"
-                 linkoffline="${javadoc.link} 142-packages"
-         bottom="${javadoc.bottom}" >
-          <classpath refid="nativewindow_gluegen.classpath"/>
-          <taglet name="net.highteq.nativetaglet.NativeTaglet" path="${gluegen.jar}" />
-        </javadoc>
-    </target>
 
-    <!-- Same as above but with Cg directories added -->
-    <target name="javadoc.dev.cg" if="jogl.cg">
-        <!-- Build the internal developer Javadoc -->
+    <target name="javadoc.dev.all" depends="init">
         <javadoc packagenames="${javadoc.dev.packagenames},com.jogamp.opengl.cg"
                  excludepackagenames="${java.excludes.javadoc.packagenames}"
                  sourcepath="${src.java};${src.generated.java}"        
@@ -1657,8 +1625,6 @@
         </javadoc>
     </target>
 
-    <target name="javadoc.dev.all"  depends="init,javadoc.dev.nocg,javadoc.dev.cg" />
-
     <target name="all.doc" description="Build JOGL docs" depends="init,javadoc,javadoc.spec,javadoc.dev.all" />
 
     <!-- ================================================================== -->
diff --git a/make/build-nativewindow.xml b/make/build-nativewindow.xml
index 475904b..244f610 100644
--- a/make/build-nativewindow.xml
+++ b/make/build-nativewindow.xml
@@ -42,10 +42,8 @@
    - port to the ant-contrib CPPTask framework. Thanks to Athomas Goldberg for
    - the original OS detection code.
    -
-   - Some environment defs affecting compilation
-
-   - setup.nodesktop is set iff:
-        !isWindows && !isOSX && !isX11
+   - Some environment defs affecting native compilation
+       setup.noNativeAWT
 
    - Internal settings, may not be necessary to set them manually,
      since all JAR archives are orthogonal.
@@ -66,22 +64,13 @@
       -->
     <target name="base.init" depends="common.init">
 
-        <condition property="setup.noNativeAWT">
-            <or>
-                <isset property="setup.noAWT"/> 
-                <isset property="setup.nodesktop"/> 
-            </or>
-        </condition>
-
-        <echo message="setup.noNativeAWT: ${setup.noNativeAWT}" />
-
         <!-- partitioning -->
 
         <property name="java.part.swt"
                   value="jogamp/nativewindow/swt/**"/>
 
         <property name="java.part.core"
-                  value="javax/media/nativewindow/* javax/media/nativewindow/util/* javax/media/nativewindow/egl/* javax/media/nativewindow/macosx/* javax/media/nativewindow/windows/* com/jogamp/nativewindow/* jogamp/nativewindow/* jogamp/nativewindow/jvm/* ${java.part.swt}"/>
+                  value="javax/media/nativewindow/* javax/media/nativewindow/util/* javax/media/nativewindow/egl/* com/jogamp/nativewindow/* jogamp/nativewindow/* jogamp/nativewindow/jvm/* ${java.part.swt}"/>
 
         <property name="java.part.awt"
                   value="javax/media/nativewindow/awt/* jogamp/nativewindow/jawt/** jogamp/nativewindow/**/awt/**"/>
@@ -92,6 +81,9 @@
         <property name="java.part.windows"
                   value="jogamp/nativewindow/windows/** javax/media/nativewindow/windows/*" />
 
+        <property name="java.part.macosx"
+                  value="jogamp/nativewindow/macosx/** javax/media/nativewindow/macosx/*" />
+
         <!-- condition excludes -->
 
         <condition property="java.excludes.awt"
@@ -131,6 +123,8 @@
         <!-- The compiler output directories. -->
         <property name="classes" value="${build.nativewindow}/classes" />
 
+        <property name="javah.classpath" value="${gluegen-rt.jar}:${classes}" />
+
         <!-- The headers from which Java files are generated -->
         <dirset id="stub.includes.fileset.all" dir=".">
             <include name="${stub.includes}/macosx/**" />
@@ -232,7 +226,10 @@
                  outputRootDir="${build.nativewindow}"
                  config="${windowlib.os.cfg}"
                  includeRefid="stub.includes.fileset.platform"
-                 emitter="com.jogamp.gluegen.JavaEmitter">
+                 literalInclude="${stub.includes.gluegen.gg}"
+                 emitter="com.jogamp.gluegen.JavaEmitter"
+                 debug="false"
+                 dumpCPP="false">
             <classpath refid="gluegen.classpath" />
         </gluegen>
     </target>
@@ -246,8 +243,8 @@
         <gluegen src="${jawt.platform.header}"
                  outputRootDir="${build.nativewindow}"
                  config="${jawt.cfg}"
-                 literalInclude="${stub.includes}/jni"
                  includeRefid="stub.includes.fileset.platform"
+                 literalInclude="${stub.includes.gluegen.gg}, ${stub.includes}/jni"
                  emitter="com.jogamp.gluegen.JavaEmitter">
             <classpath refid="gluegen.classpath" />
         </gluegen>
@@ -332,36 +329,61 @@
 
     <target name="c.configure.1" depends="gluegen.cpptasks.detect.os,gluegen.cpptasks.setup.compiler">
       <!-- compiler configuration -->
+
       <!-- Note that we can use the base setups in the gluegen-cpptasks for most of these -->
       <compiler id="compiler.cfg.freebsd.nativewindow" extends="compiler.cfg.freebsd">
         <!-- Need to force X11R6 headers on to include path after stub_includes -->
         <includepath path="/usr/local/include" />
       </compiler>
 
+      <compiler id="compiler.cfg.linux.armv7.nativewindow.x11" extends="compiler.cfg.linux.armv7">
+        <!-- Need to force /usr/include headers on to include path (after all others), due to crosscompiler usage -->
+        <compilerarg value="-idirafter" />
+        <compilerarg value="/usr/include" />
+      </compiler>
+
       <!-- linker configuration -->
 
       <linker id="linker.cfg.freebsd.nativewindow.x11" extends="linker.cfg.freebsd">
         <syslibset dir="/usr/local/lib" libs="X11"/>
         <syslibset dir="/usr/local/lib" libs="Xxf86vm" />
         <syslibset dir="/usr/local/lib" libs="Xinerama"/>
+        <syslibset dir="/usr/local/lib" libs="Xrender"/>
       </linker>
 
       <linker id="linker.cfg.freebsd.amd64.nativewindow.x11" extends="linker.cfg.freebsd.amd64">
         <syslibset dir="/usr/local/lib" libs="X11" />
         <syslibset dir="/usr/local/lib" libs="Xxf86vm" />
         <syslibset dir="/usr/local/lib" libs="Xinerama"/>
+        <syslibset dir="/usr/local/lib" libs="Xrender"/>
       </linker>
 
       <linker id="linker.cfg.linux.nativewindow.x11" extends="linker.cfg.linux">
         <syslibset libs="X11"/>
         <syslibset libs="Xxf86vm" />
         <syslibset libs="Xinerama"/>
+        <syslibset libs="Xrender"/>
+      </linker>
+
+      <linker id="linker.cfg.linux.x86.nativewindow.x11" extends="linker.cfg.linux.x86">
+        <syslibset libs="X11"/>
+        <syslibset libs="Xxf86vm" />
+        <syslibset libs="Xinerama"/>
+        <syslibset libs="Xrender"/>
       </linker>
 
       <linker id="linker.cfg.linux.amd64.nativewindow.x11" extends="linker.cfg.linux.amd64">
         <syslibset libs="X11"/>
         <syslibset libs="Xxf86vm" />
         <syslibset libs="Xinerama"/>
+        <syslibset libs="Xrender"/>
+      </linker>
+
+      <linker id="linker.cfg.linux.armv7.nativewindow.x11" extends="linker.cfg.linux.armv7">
+        <syslibset dir="${env.TARGET_PLATFORM_LIBS}" libs="X11" />
+        <syslibset dir="${env.TARGET_PLATFORM_LIBS}" libs="Xxf86vm" />
+        <syslibset dir="${env.TARGET_PLATFORM_LIBS}" libs="Xinerama" />
+        <syslibset dir="${env.TARGET_PLATFORM_LIBS}" libs="Xrender" />
       </linker>
 
       <linker id="linker.cfg.solaris.nativewindow.x11" extends="linker.cfg.solaris">
@@ -421,8 +443,8 @@
 
     <target name="c.configure.linux.x86" if="isLinuxX86">
       <echo message="Linux.x86" />
-      <property name="compiler.cfg.id"                      value="compiler.cfg.linux" />
-      <property name="linker.cfg.id.oswin"                  value="linker.cfg.linux.nativewindow.x11" />
+      <property name="compiler.cfg.id"                      value="compiler.cfg.linux.x86" />
+      <property name="linker.cfg.id.oswin"                  value="linker.cfg.linux.x86.nativewindow.x11" />
     </target>
     
     <target name="c.configure.linux.amd64" if="isLinuxAMD64">
@@ -431,14 +453,26 @@
       <property name="linker.cfg.id.oswin"                  value="linker.cfg.linux.amd64.nativewindow.x11" />
     </target>
     
+    <target name="c.configure.linux.armv7" if="isLinuxARMv7">
+      <echo message="Linux.armv7" />
+      <property name="compiler.cfg.id"                      value="compiler.cfg.linux.armv7.nativewindow.x11" />
+      <property name="linker.cfg.id.oswin"                  value="linker.cfg.linux.armv7.nativewindow.x11" />
+    </target>
+    
     <target name="c.configure.linux.ia64" if="isLinuxIA64">
       <echo message="Linux.IA64" />
       <property name="compiler.cfg.id"                      value="compiler.cfg.linux" />
       <property name="linker.cfg.id.oswin"                  value="linker.cfg.linux.nativewindow.x11" />
     </target>
 
-    <target name="c.configure.linux" depends="c.configure.linux.x86,c.configure.linux.amd64,c.configure.linux.ia64,c.configure.x11" if="isLinux" />
+    <target name="c.configure.linux" depends="c.configure.linux.armv7,c.configure.linux.x86,c.configure.linux.amd64,c.configure.linux.ia64,c.configure.x11" if="isLinux" />
 
+    <target name="c.configure.android" if="isAndroid">
+      <echo message="Android" />
+      <property name="compiler.cfg.id"                      value="compiler.cfg.android" />
+      <property name="linker.cfg.id.oswin"                  value="linker.cfg.android" />
+    </target>
+    
     <target name="c.configure.solaris32" depends="c.configure.x11" if="isSolaris32Bit">
       <echo message="Solaris" />
       <property name="compiler.cfg.id"                      value="compiler.cfg.solaris" />
@@ -488,7 +522,7 @@
       <property name="linker.cfg.id.oswin"                  value="linker.cfg.macosx.nativewindow" />
     </target>
     
-    <target name="c.configure.2" depends="c.configure.win32,c.configure.linux,c.configure.solaris32,c.configure.solaris.sparcv9,c.configure.solaris.amd64,c.configure.macosx,c.configure.freebsd,c.configure.hpux" />
+    <target name="c.configure.2" depends="c.configure.win32,c.configure.linux,c.configure.android,c.configure.solaris32,c.configure.solaris.sparcv9,c.configure.solaris.amd64,c.configure.macosx,c.configure.freebsd,c.configure.hpux" />
 
     <target name="c.configure" depends="c.configure.1,c.configure.2" />
 
@@ -547,6 +581,12 @@
         <patternset id="c.src.files.windows">
           <include name="${rootrel.generated.c}/Windows/GDI*.c"/>
           <include name="${rootrel.src.c}/windows/GDImisc.c"/>
+          <include name="${rootrel.src.c}/windows/WindowsDWM.c"/>
+          <include name="${rootrel.src.c}/NativewindowCommon.c"/>
+        </patternset>
+
+        <patternset id="c.src.files.macosx">
+          <include name="${rootrel.src.c}/macosx/OSXmisc.c"/>
           <include name="${rootrel.src.c}/NativewindowCommon.c"/>
         </patternset>
 
@@ -578,11 +618,13 @@
               <compiler extends="@{compiler.cfg.id}" >
                 <sysincludepath path="${java.includes.dir}"/>
                 <sysincludepath path="${java.includes.dir.platform}"/>
+                <sysincludepath path="${stub.includes.gluegen.cc}"/>
                 <!-- This is for the generated headers for handwritten C code -->
                 <includepath path="${src.generated.c}" />
-                <includepath path="${src.generated.c}/X11" if="isX11"/>
-                <includepath path="${src.generated.c}/MacOSX" if="isOSX"/>
+                <includepath path="${src.generated.c}/X11"     if="isX11"/>
+                <includepath path="${src.generated.c}/MacOSX"  if="isOSX"/>
                 <includepath path="${src.generated.c}/Windows" if="isWindows"/>
+                <includepath path="${src.c}/windows"           if="isWindows"/>
                 <includepath path="${src.c}"/>
       
                 <!-- This must come last to not override real include paths -->
@@ -644,7 +686,7 @@
     </target>
 
     <target name="c.build.nativewindow.windowlib.x11" if="isX11">
-      <javah destdir="${src.generated.c}/X11" classpath="${classes}" class="jogamp.nativewindow.x11.X11Lib" />
+      <javah destdir="${src.generated.c}/X11" classpath="${javah.classpath}" class="jogamp.nativewindow.x11.X11Lib" />
 
       <c.build c.compiler.src.files="c.src.files.x11"
                output.lib.name="nativewindow_x11"
@@ -653,14 +695,24 @@
     </target>
 
     <target name="c.build.nativewindow.windowlib.windows" if="isWindows">
-      <javah destdir="${src.generated.c}/Windows" classpath="${classes}" class="jogamp.nativewindow.windows.GDI" />
+      <javah destdir="${src.generated.c}/Windows" classpath="${javah.classpath}" class="jogamp.nativewindow.windows.GDI" />
 
       <c.build c.compiler.src.files="c.src.files.windows"
                output.lib.name="nativewindow_win32"
                compiler.cfg.id="${compiler.cfg.id}"
                linker.cfg.id="${linker.cfg.id.oswin}"/>
     </target>
-    <target name="c.build.nativewindow.windowlib" depends="c.build.nativewindow.windowlib.x11, c.build.nativewindow.windowlib.windows"/>
+
+    <target name="c.build.nativewindow.windowlib.macosx" if="isOSX">
+      <javah destdir="${src.generated.c}/MacOSX" classpath="${javah.classpath}" class="jogamp.nativewindow.macosx.OSXUtil" />
+
+      <c.build c.compiler.src.files="c.src.files.macosx"
+               output.lib.name="nativewindow_macosx"
+               compiler.cfg.id="${compiler.cfg.id}"
+               linker.cfg.id="${linker.cfg.id.oswin}"/>
+    </target>
+
+    <target name="c.build.nativewindow.windowlib" depends="c.build.nativewindow.windowlib.x11, c.build.nativewindow.windowlib.windows, c.build.nativewindow.windowlib.macosx"/>
 
     <target name="c.manifest" if="isVC8Family">
       <!-- exec mt, the Microsoft Manifest Tool, to include DLL manifests in order to resolve the location of msvcr80.dll -->
@@ -682,7 +734,7 @@
     <target name="setup-manifestfile">
         <property name="manifestfile" value="nativewindowversion"/>
         <copy file="${manifestfile}"
-          tofile="tempversion"
+          tofile="${build.nativewindow}/manifest.mf"
           overwrite="true">
           <filterset>
               <filter token="VERSION" value="${nativewindow.version}"/>
@@ -694,7 +746,7 @@
     </target>
 
     <target name="build-jars-awt" depends="setup-manifestfile" unless="setup.noAWT">
-        <jar manifest="tempversion" 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}"/>
@@ -702,45 +754,37 @@
     </target>
 
     <target name="build-jars-x11" depends="setup-manifestfile">
-        <jar manifest="tempversion" 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="tempversion" 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-all" depends="setup-manifestfile" unless="setup.noAWT">
-        <jar manifest="tempversion" destfile="${nativewindow.all.jar}" filesonly="true">
-            <fileset dir="${classes}"
-                     includes="javax/media/nativewindow/** com/jogamp/nativewindow/** jogamp/nativewindow/**" />
-        </jar>
-    </target>
-    <target name="build-jars-all-noawt" depends="setup-manifestfile">
-        <jar manifest="tempversion" destfile="${nativewindow.all-noawt.jar}" filesonly="true">
+    <target name="build-jars-macosx" depends="setup-manifestfile">
+        <jar manifest="${build.nativewindow}/manifest.mf" destfile="${nativewindow.os.macosx.jar}" filesonly="true">
             <fileset dir="${classes}"
-                     includes="javax/media/nativewindow/** com/jogamp/nativewindow/** jogamp/nativewindow/**" 
-                     excludes="${java.part.awt}"/>
+                     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-all,build-jars-all-noawt">
-        <jar manifest="tempversion" destfile="${nativewindow.core.jar}" filesonly="true">
+    <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">
             <fileset dir="${classes}"
                      includes="${java.part.core}"
                      excludes="${java.part.awt} ${java.part.x11} ${java.part.windows}"/>
         </jar>
-        <jar manifest="tempversion" destfile="${build.nativewindow}/nativewindow-natives-${os.and.arch}.jar" filesonly="true">
+        <jar manifest="${build.nativewindow}/manifest.mf" destfile="${build.nativewindow}/nativewindow-natives-${os.and.arch}.jar" filesonly="true">
             <fileset dir="${obj.nativewindow}">
               <include name="*.${native.library.suffix}" />
             </fileset>
         </jar>
-        <delete file="tempversion"/>
     </target>
 
     <!-- ================================================================== -->
diff --git a/make/build-newt.xml b/make/build-newt.xml
index d062f92..e433b28 100644
--- a/make/build-newt.xml
+++ b/make/build-newt.xml
@@ -44,14 +44,17 @@
    -
    - Some environment defs affecting compilation
 
+   - Some environment defs affecting native compilation
+       setup.noNativeDesktop
+       setup.addNativeKD
+       setup.addNativeIntelGDL
+       setup.addNativeBroadcomEGL
+
    - Internal settings, may not be necessary to set them manually,
      since all JAR archives are orthogonal.
        setup.noAWT
        setup.noOpenGL
 
-   - setup.nodesktop is set iff:
-        !isWindows && !isOSX && !isX11
-
    -->
 <project name="NEWT" basedir="." default="all">
 
@@ -73,9 +76,10 @@
                 <isfalse value="${isWindows}" />
                 <isfalse value="${isOSX}" />
                 <isfalse value="${isX11}" />
-                <isfalse value="${useKD}" />
-                <isfalse value="${useIntelGDL}" />
-                <isfalse value="${useBroadcomEGL}" />
+                <isfalse value="${isAndroid}" />
+                <isfalse value="${setup.addNativeKD}" />
+                <isfalse value="${setup.addNativeIntelGDL}" />
+                <isfalse value="${setup.addNativeBroadcomEGL}" />
             </and>
         </condition>
 
@@ -83,9 +87,10 @@
         <echo message="isWindows: ${isWindows}" />
         <echo message="isOSX: ${isOSX}" />
         <echo message="isX11: ${isX11}" />
-        <echo message="useKD: ${useKD}" />
-        <echo message="useIntelGDL: ${useIntelGDL}" />
-        <echo message="useBroadcomEGL: ${useBroadcomEGL}" />
+        <echo message="isAndroid: ${isAndroid}" />
+        <echo message="setup.addNativeKD: ${setup.addNativeKD}" />
+        <echo message="setup.addNativeIntelGDL: ${setup.addNativeIntelGDL}" />
+        <echo message="setup.addNativeBroadcomEGL: ${setup.addNativeBroadcomEGL}" />
         <echo message="setup.nonatives: ${setup.nonatives}" />
 
         <!-- partitioning -->
@@ -93,26 +98,35 @@
         <property name="java.part.core"
                   value="com/jogamp/newt/* com/jogamp/newt/event/* com/jogamp/newt/util/* jogamp/newt/* jogamp/newt/event/*"/>
 
+        <property name="java.part.opengl"
+                  value="com/jogamp/newt/opengl/**"/>
+
+        <property name="java.part.driver.awt"
+                  value="jogamp/newt/driver/awt/**"/>
+
         <property name="java.part.awt"
-                  value="com/jogamp/newt/awt/* com/jogamp/newt/event/awt/* jogamp/newt/awt/**"/>
+                  value="com/jogamp/newt/awt/** com/jogamp/newt/event/awt/** jogamp/newt/awt/** ${java.part.driver.awt}"/>
 
-        <property name="java.part.x11"
-                  value="jogamp/newt/x11/*"/>
+        <property name="java.part.driver.x11"
+                  value="jogamp/newt/driver/x11/**"/>
 
-        <property name="java.part.windows"
-                  value="jogamp/newt/windows/*"/>
+        <property name="java.part.driver.windows"
+                  value="jogamp/newt/driver/windows/**"/>
 
-        <property name="java.part.macosx"
-                  value="jogamp/newt/macosx/*"/>
+        <property name="java.part.driver.macosx"
+                  value="jogamp/newt/driver/macosx/**"/>
 
-        <property name="java.part.opengl"
-                  value="com/jogamp/newt/opengl/* jogamp/newt/opengl/kd/*"/>
+        <property name="java.part.driver.kd"
+                  value="jogamp/newt/driver/kd/**"/>
 
-        <property name="java.part.broadcomegl"
-                  value="jogamp/newt/opengl/broadcom/egl/*"/>
+        <property name="java.part.driver.intelgdl"
+                  value="jogamp/newt/driver/intel/gdl/**"/>
 
-        <property name="java.part.intelgdl"
-                  value="jogamp/newt/intel/gdl/*"/>
+        <property name="java.part.driver.broadcomegl"
+                  value="jogamp/newt/driver/broadcom/egl/**"/>
+
+        <property name="java.part.driver.android"
+                  value="jogamp/newt/driver/android/**"/>
 
         <!-- condition excludes -->
 
@@ -121,17 +135,11 @@
            <isset property="setup.noAWT"/>
         </condition>
 
-        <condition property="java.excludes.opengl"
-                   value="${java.part.opengl} ${java.part.broadcomegl}">
+        <condition property="java.excludes.opengl" value="${java.part.opengl}">
            <isset property="setup.noOpenGL"/>
         </condition>
 
-        <condition property="java.excludes.desktop"
-                   value="${java.part.x11} ${java.part.windows}, ${java.part.macosx}, ${java.part.awt}">
-           <isset property="setup.nodesktop"/>
-        </condition>
-
-        <property name="java.excludes.all" value="${java.excludes.awt}, ${java.excludes.opengl} ${java.excludes.desktop}" />
+        <property name="java.excludes.all" value="${java.excludes.awt}, ${java.excludes.opengl}" />
         <echo message="java.excludes.all: ${java.excludes.all}" />
 
     </target>
@@ -156,13 +164,15 @@
         <!-- The compiler output directories. -->
         <property name="classes" value="${build.newt}/classes" />
 
+        <property name="javah.classpath" value="${gluegen-rt.jar}:${build.nativewindow}/classes:${classes}" />
+
         <!-- The javadoc dirs. -->
         <property name="javadoc" value="${project.root}/javadoc_newt_public" />
         <property name="javadoc.spec" value="${project.root}/javadoc_newt_spec" />
         <property name="javadoc.dev" value="${project.root}/javadoc_newt_dev" />
         <property name="javadoc.windowtitle" value="NEWT API -- ${newt_base_version} Specification" />
         <property name="javadoc.overview" value="spec-overview.html" />
-        <property name="javadoc.spec.packagenames" value="com.jogamp.newt, com.jogamp.newt.event.*, com.jogamp.newt.opengl" />
+        <property name="javadoc.spec.packagenames" value="com.jogamp.newt, com.jogamp.newt.event, com.jogamp.newt.opengl, com.jogamp.newt.util" />
 
         <property name="javadoc.packagenames" value="${javadoc.spec.packagenames}" />
 
@@ -177,6 +187,7 @@
       -->
     <target name="init" depends="declare.common">
         <mkdir dir="${src.generated.c}" />
+        <mkdir dir="${src.generated.c}/Android" />
         <mkdir dir="${src.generated.c}/X11" />
         <mkdir dir="${src.generated.c}/MacOSX" />
         <mkdir dir="${src.generated.c}/Windows" />
@@ -201,7 +212,7 @@
                memoryMaximumSize="${javac.memorymax}"
                debug="${javacdebug}" debuglevel="${javacdebuglevel}">
             <src path="${src.java}" />
-            <classpath refid="nativewindow_gluegen_jogl.classpath"/>
+            <classpath refid="jogl_nativewindow_gluegen.classpath"/>
         </javac>
     </target>
 
@@ -219,6 +230,12 @@
         <includepath path="/usr/local/include" />
       </compiler>
 
+      <compiler id="compiler.cfg.linux.armv7.newt.x11" extends="compiler.cfg.linux.armv7">
+        <!-- Need to force /usr/include headers on to include path (after all others), due to crosscompiler usage -->
+        <compilerarg value="-idirafter" />
+        <compilerarg value="/usr/include" />
+      </compiler>
+
       <!-- linker configuration -->
 
       <linker id="linker.cfg.freebsd.newt.x11" extends="linker.cfg.freebsd">
@@ -244,12 +261,28 @@
         <syslibset libs="Xxf86vm" />
       </linker>
 
+      <linker id="linker.cfg.linux.x86.newt.x11" extends="linker.cfg.linux.x86">
+        <syslibset libs="X11"/>
+        <syslibset libs="Xrandr"/>
+        <syslibset libs="Xxf86vm" />
+      </linker>
+
       <linker id="linker.cfg.linux.amd64.newt.x11" extends="linker.cfg.linux.amd64">
         <syslibset libs="X11"/>
         <syslibset libs="Xrandr"/>
         <syslibset libs="Xxf86vm" />
       </linker>
 
+      <linker id="linker.cfg.linux.armv7.newt.x11" extends="linker.cfg.linux.armv7">
+        <syslibset dir="${env.TARGET_PLATFORM_LIBS}" libs="X11" />
+        <syslibset dir="${env.TARGET_PLATFORM_LIBS}" libs="Xrandr" />
+        <syslibset dir="${env.TARGET_PLATFORM_LIBS}" libs="Xxf86vm" />
+      </linker>
+
+      <linker id="linker.cfg.android.newt" extends="linker.cfg.android">
+        <syslibset dir="${env.TARGET_PLATFORM_LIBS}" libs="android" />
+      </linker>
+
       <linker id="linker.cfg.solaris.newt.x11" extends="linker.cfg.solaris">
         <syslibset libs="X11"/>
       </linker>
@@ -289,30 +322,26 @@
     <target name="c.configure.win32.vc" if="isVCFamily">
       <echo message="Win32.VC" />
       <property name="compiler.cfg.id"                      value="compiler.cfg.win32.msvc" />
-      <property name="linker.cfg.id.core"                   value="linker.cfg.win32.msvc" />
       <property name="linker.cfg.id.oswin"                  value="linker.cfg.win32.msvc.newt" />
     </target>
 
     <target name="c.configure.win32.mingw" if="isMingW32">
       <echo message="Win32.MingW" />
       <property name="compiler.cfg.id"                      value="compiler.cfg.win32.mingw" />
-      <property name="linker.cfg.id.core"                   value="linker.cfg.win32.mingw" />
       <property name="linker.cfg.id.oswin"                  value="linker.cfg.win32.mingw.newt" />
     </target>
 
     <target name="c.configure.win64.mingw" if="isMingW64">
       <echo message="Win64.MingW" />
       <property name="compiler.cfg.id"                      value="compiler.cfg.win64.mingw" />
-      <property name="linker.cfg.id.core"                   value="linker.cfg.win64.mingw" />
       <property name="linker.cfg.id.oswin"                  value="linker.cfg.win64.mingw.newt" />
     </target>
 
     <target name="c.configure.linux.x86" if="isLinuxX86">
       <echo message="Linux.x86" />
-      <property name="compiler.cfg.id"                      value="compiler.cfg.linux" />
-      <property name="linker.cfg.id.core"                   value="linker.cfg.linux" />
-      <condition property="linker.cfg.id.oswin"             value="linker.cfg.linux.newt.x11"
-                                                            else="linker.cfg.linux">
+      <property name="compiler.cfg.id"                      value="compiler.cfg.linux.x86" />
+      <condition property="linker.cfg.id.oswin"             value="linker.cfg.linux.x86.newt.x11"
+                                                            else="linker.cfg.linux.x86">
           <isset property="isX11" />
       </condition>
       <echo message="linker.cfg.id.oswin ${linker.cfg.id.oswin}" />
@@ -321,7 +350,6 @@
     <target name="c.configure.linux.amd64" if="isLinuxAMD64">
       <echo message="Linux.AMD64" />
       <property name="compiler.cfg.id"                      value="compiler.cfg.linux.amd64" />
-      <property name="linker.cfg.id.core"                   value="linker.cfg.linux.amd64" />
       <condition property="linker.cfg.id.oswin"             value="linker.cfg.linux.amd64.newt.x11"
                                                             else="linker.cfg.linux.amd64">
           <isset property="isX11" />
@@ -329,19 +357,33 @@
       <echo message="linker.cfg.id.oswin ${linker.cfg.id.oswin}" />
     </target>
 
+    <target name="c.configure.linux.armv7" if="isLinuxARMv7">
+      <echo message="Linux.armv7" />
+      <property name="compiler.cfg.id"                      value="compiler.cfg.linux.armv7.newt.x11" />
+      <condition property="linker.cfg.id.oswin"             value="linker.cfg.linux.armv7.newt.x11"
+                                                            else="linker.cfg.linux.armv7">
+          <isset property="isX11" />
+      </condition>
+      <echo message="linker.cfg.id.oswin ${linker.cfg.id.oswin}" />
+    </target>
+
     <target name="c.configure.linux.ia64" if="isLinuxIA64">
       <echo message="Linux.IA64" />
       <property name="compiler.cfg.id"                      value="compiler.cfg.linux" />
-      <property name="linker.cfg.id.core"                   value="linker.cfg.linux" />
       <property name="linker.cfg.id.oswin"                  value="linker.cfg.linux.newt.x11" />
     </target>
 
-    <target name="c.configure.linux" depends="c.configure.linux.x86,c.configure.linux.amd64,c.configure.linux.ia64,c.configure.x11" if="isLinux"/>
+    <target name="c.configure.linux" depends="c.configure.linux.x86,c.configure.linux.amd64,c.configure.linux.armv7,c.configure.linux.ia64,c.configure.x11" if="isLinux"/>
 
+    <target name="c.configure.android" if="isAndroid">
+      <echo message="Android" />
+      <property name="compiler.cfg.id"                      value="compiler.cfg.android" />
+      <property name="linker.cfg.id.oswin"                  value="linker.cfg.android.newt" />
+    </target>
+    
     <target name="c.configure.solaris32" depends="c.configure.x11" if="isSolaris32Bit">
       <echo message="Solaris" />
       <property name="compiler.cfg.id"                      value="compiler.cfg.solaris" />
-      <property name="linker.cfg.id.core"                   value="linker.cfg.solaris" />
       <property name="linker.cfg.id.oswin"                  value="linker.cfg.solaris.newt.x11" />
     </target>
 
@@ -349,7 +391,6 @@
     <target name="c.configure.solaris.sparcv9" depends="c.configure.x11" if="isSolarisSparcv9">
       <echo message="SolarisSparcv9" />
       <property name="compiler.cfg.id"                      value="compiler.cfg.solaris.sparcv9" />
-      <property name="linker.cfg.id.core"                   value="linker.cfg.solaris.sparcv9" />
       <property name="linker.cfg.id.oswin"                  value="linker.cfg.solaris.sparcv9.newt.x11" />
     </target>
 
@@ -357,14 +398,12 @@
     <target name="c.configure.solaris.amd64" depends="c.configure.x11" if="isSolarisAMD64">
       <echo message="SolarisAMD64" />
       <property name="compiler.cfg.id"                      value="compiler.cfg.solaris.amd64" />
-      <property name="linker.cfg.id.core"                   value="linker.cfg.solaris.amd64" />
       <property name="linker.cfg.id.oswin"                  value="linker.cfg.solaris.amd64.newt.x11" />
     </target>
 
     <target name="c.configure.freebsd.x86" if="isFreeBSDX86">
       <echo message="FreeBSD.x86" />
       <property name="compiler.cfg.id"                      value="compiler.cfg.freebsd.newt" />
-      <property name="linker.cfg.id.core"                   value="linker.cfg.freebsd" />
       <condition property="linker.cfg.id.oswin"             value="linker.cfg.freebsd.newt.x11"
                                                             else="linker.cfg.freebsd">
           <isset property="isX11" />
@@ -375,7 +414,6 @@
     <target name="c.configure.freebsd.amd64" if="isFreeBSDAMD64">
       <echo message="FreeBSD.AMD64" />
       <property name="compiler.cfg.id"                      value="compiler.cfg.freebsd.newt" />
-      <property name="linker.cfg.id.core"                   value="linker.cfg.freebsd.amd64" />
       <condition property="linker.cfg.id.oswin"             value="linker.cfg.freebsd.amd64.newt.x11"
                                                             else="linker.cfg.freebsd.amd64">
           <isset property="isX11" />
@@ -388,7 +426,6 @@
     <target name="c.configure.hpux" depends="c.configure.x11" if="isHPUX">
       <echo message="HP-UX" />
       <property name="compiler.cfg.id"                      value="compiler.cfg.hpux" />
-      <property name="linker.cfg.id.core"                   value="linker.cfg.hpux" />
       <property name="linker.cfg.id.oswin"                  value="linker.cfg.hpux.newt.x11" />
     </target>
 
@@ -398,11 +435,10 @@
 
     <target name="c.configure.macosx" if="isOSX">
       <property name="compiler.cfg.id"                      value="compiler.cfg.macosx" />
-      <property name="linker.cfg.id.core"                   value="linker.cfg.macosx" />
       <property name="linker.cfg.id.oswin"                  value="linker.cfg.macosx.newt" />
     </target>
 
-    <target name="c.configure.2" depends="c.configure.win32,c.configure.linux,c.configure.solaris32,c.configure.solaris.sparcv9,c.configure.solaris.amd64,c.configure.macosx,c.configure.freebsd,c.configure.hpux" />
+    <target name="c.configure.2" depends="c.configure.win32,c.configure.linux,c.configure.android,c.configure.solaris32,c.configure.solaris.sparcv9,c.configure.solaris.amd64,c.configure.macosx,c.configure.freebsd,c.configure.hpux" />
 
     <target name="c.configure" depends="c.configure.1,c.configure.2" />
 
@@ -433,11 +469,12 @@
         <patternset id="c.src.files.newt">
           <include name="${rootrel.src.c}/NewtCommon.c" />
           <include name="${rootrel.src.c}/WindowsWindow.c" if="isWindows"/>
-          <include name="${rootrel.src.c}/*.m" if="isOSX"/>
-          <include name="${rootrel.src.c}/X11Window.c" if="isX11"/>
-          <include name="${rootrel.src.c}/KDWindow.c"  if="useKD"/>
-          <include name="${rootrel.src.c}/IntelGDL.c"  if="useIntelGDL"/>
-          <include name="${rootrel.src.c}/BroadcomEGL.c"  if="useBroadcomEGL"/>
+          <include name="${rootrel.src.c}/*.m"             if="isOSX"/>
+          <include name="${rootrel.src.c}/AndroidWindow.c" if="isAndroid"/>
+          <include name="${rootrel.src.c}/X11Window.c"     if="isX11"/>
+          <include name="${rootrel.src.c}/KDWindow.c"      if="setup.addNativeKD"/>
+          <include name="${rootrel.src.c}/IntelGDL.c"      if="setup.addNativeIntelGDL"/>
+          <include name="${rootrel.src.c}/BroadcomEGL.c"   if="setup.addNativeBroadcomEGL"/>
         </patternset>
 
         <echo message="Compiling @{output.lib.name}" />
@@ -468,19 +505,21 @@
               <compiler extends="@{compiler.cfg.id}" >
                 <sysincludepath path="${java.includes.dir}"/>
                 <sysincludepath path="${java.includes.dir.platform}"/>
+                <sysincludepath path="${stub.includes.gluegen.cc}"/>
                 <includepath path="stub_includes/khr"/>
                 <includepath path="stub_includes/egl"/>
                 <!-- This is for finding Xrandr.h on Solaris. -->
                 <includepath path="/usr/X11/include" />
                 <!-- This is for the generated headers for handwritten C code -->
                 <includepath path="${src.generated.c}" />
-                <includepath path="${src.generated.c}/X11" if="isX11"/>
-                <includepath path="${src.generated.c}/MacOSX" if="isOSX"/>
-                <includepath path="${src.generated.c}/Windows" if="isWindows"/>
-                <includepath path="${src.generated.c}/KD" if="useKD" />
-                <includepath path="${src.generated.c}/IntelGDL" if="useIntelGDL" />
-                <includepath path="stub_includes/embedded/IntelGDL" if="useIntelGDL" />
-                <includepath path="${src.generated.c}/BroadcomEGL" if="useBroadcomEGL" />
+                <includepath path="${src.generated.c}/Android"      if="isAndroid"/>
+                <includepath path="${src.generated.c}/X11"          if="isX11"/>
+                <includepath path="${src.generated.c}/MacOSX"       if="isOSX"/>
+                <includepath path="${src.generated.c}/Windows"      if="isWindows"/>
+                <includepath path="${src.generated.c}/KD"           if="setup.addNativeKD" />
+                <includepath path="${src.generated.c}/IntelGDL"     if="setup.addNativeIntelGDL" />
+                <includepath path="stub_includes/embedded/IntelGDL" if="setup.addNativeIntelGDL" />
+                <includepath path="${src.generated.c}/BroadcomEGL"  if="setup.addNativeBroadcomEGL" />
     
                 <!-- This must come last to not override real include paths -->
                 <!-- includepath path="stub_includes/macosx" if="isOSX" / -->
@@ -518,34 +557,27 @@
       </sequential>
     </macrodef>
 
-    <target name="c.build.newt.prepare.KD" if="useKD">
-      <javah destdir="${src.generated.c}/KD" classpath="${classes}" class="jogamp.newt.opengl.kd.KDWindow" />
-    </target>
+    <target name="c.build.newt.prepare">
+      <javah destdir="${src.generated.c}/KD"          classpath="${javah.classpath}" class="jogamp.newt.driver.kd.KDWindow" />
 
-    <target name="c.build.newt.prepare.IntelGDL" if="useIntelGDL">
-      <javah destdir="${src.generated.c}/IntelGDL" classpath="${classes}" class="jogamp.newt.intel.gdl.Display" />
-      <javah destdir="${src.generated.c}/IntelGDL" classpath="${classes}" class="jogamp.newt.intel.gdl.Screen" />
-      <javah destdir="${src.generated.c}/IntelGDL" classpath="${classes}" class="jogamp.newt.intel.gdl.Window" />
-    </target>
+      <javah destdir="${src.generated.c}/IntelGDL"    classpath="${javah.classpath}" class="jogamp.newt.driver.intel.gdl.Display" />
+      <javah destdir="${src.generated.c}/IntelGDL"    classpath="${javah.classpath}" class="jogamp.newt.driver.intel.gdl.Screen" />
+      <javah destdir="${src.generated.c}/IntelGDL"    classpath="${javah.classpath}" class="jogamp.newt.driver.intel.gdl.Window" />
 
-    <target name="c.build.newt.prepare.BroadcomEGL" if="useBroadcomEGL">
-      <javah destdir="${src.generated.c}/BroadcomEGL" classpath="${classes}" class="jogamp.newt.opengl.broadcom.egl.Window" />
-    </target>
+      <javah destdir="${src.generated.c}/BroadcomEGL" classpath="${javah.classpath}" class="jogamp.newt.driver.broadcom.egl.Window" />
 
-    <target name="c.build.newt.prepare.desktop" unless="setup.nodesktop">
-      <javah destdir="${src.generated.c}/Windows" classpath="${classes}" class="jogamp.newt.windows.WindowsWindow" />
-      <javah destdir="${src.generated.c}/Windows" classpath="${classes}" class="jogamp.newt.windows.WindowsScreen" />
-      <javah destdir="${src.generated.c}/Windows" classpath="${classes}" class="jogamp.newt.windows.WindowsDisplay" />
-      <javah destdir="${src.generated.c}/MacOSX" classpath="${classes}" class="jogamp.newt.macosx.MacWindow" />
-      <javah destdir="${src.generated.c}/MacOSX" classpath="${classes}" class="jogamp.newt.macosx.MacScreen" />
-      <javah destdir="${src.generated.c}/MacOSX" classpath="${classes}" class="jogamp.newt.macosx.MacDisplay" />
-      <javah destdir="${src.generated.c}/X11" classpath="${classes}" class="jogamp.newt.x11.X11Window" />
-      <javah destdir="${src.generated.c}/X11" classpath="${classes}" class="jogamp.newt.x11.X11Screen" />
-      <javah destdir="${src.generated.c}/X11" classpath="${classes}" class="jogamp.newt.x11.X11Display" />
+      <javah destdir="${src.generated.c}/Windows"     classpath="${javah.classpath}" class="jogamp.newt.driver.windows.WindowsWindow" />
+      <javah destdir="${src.generated.c}/Windows"     classpath="${javah.classpath}" class="jogamp.newt.driver.windows.WindowsScreen" />
+      <javah destdir="${src.generated.c}/Windows"     classpath="${javah.classpath}" class="jogamp.newt.driver.windows.WindowsDisplay" />
+      <javah destdir="${src.generated.c}/MacOSX"      classpath="${javah.classpath}" class="jogamp.newt.driver.macosx.MacWindow" />
+      <javah destdir="${src.generated.c}/MacOSX"      classpath="${javah.classpath}" class="jogamp.newt.driver.macosx.MacScreen" />
+      <javah destdir="${src.generated.c}/MacOSX"      classpath="${javah.classpath}" class="jogamp.newt.driver.macosx.MacDisplay" />
+      <javah destdir="${src.generated.c}/X11"         classpath="${javah.classpath}" class="jogamp.newt.driver.x11.X11Window" />
+      <javah destdir="${src.generated.c}/X11"         classpath="${javah.classpath}" class="jogamp.newt.driver.x11.X11Screen" />
+      <javah destdir="${src.generated.c}/X11"         classpath="${javah.classpath}" class="jogamp.newt.driver.x11.X11Display" />
+      <javah destdir="${src.generated.c}/Android"     classpath="${javah.classpath}:${android.jar}" class="jogamp.newt.driver.android.AndroidWindow" />
     </target>
 
-    <target name="c.build.newt.prepare" depends="c.build.newt.prepare.KD,c.build.newt.prepare.IntelGDL,c.build.newt.prepare.BroadcomEGL,c.build.newt.prepare.desktop" />
-
     <target name="c.build.newt.windowlib" unless="setup.nonatives">
       <c.build c.compiler.src.files="c.src.files.newt"
                output.lib.name="newt"
@@ -574,7 +606,7 @@
     <target name="setup-manifestfile">
         <property name="manifestfile" value="newtversion"/>
         <copy file="${manifestfile}"
-          tofile="tempversion"
+          tofile="${build.newt}/manifest.mf"
           overwrite="true">
           <filterset>
               <filter token="VERSION" value="${newt.version}"/>
@@ -586,53 +618,56 @@
     </target>
 
     <target name="build-jars-awt" depends="setup-manifestfile" unless="setup.noAWT">
-        <jar manifest="tempversion" 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-opengl" depends="setup-manifestfile" unless="setup.noOpenGL">
-        <jar manifest="tempversion" 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>
-        <jar manifest="tempversion" destfile="${newt.hw.broadcomegl.jar}" filesonly="true">
-            <fileset dir="${classes}"
-                     includes="${java.part.broadcomegl}"/>
-        </jar>
     </target>
 
     <target name="build-jars-driver" depends="setup-manifestfile">
-        <jar manifest="tempversion" destfile="${newt.hw.intelgdl.jar}" filesonly="true">
+        <jar manifest="${build.newt}/manifest.mf" destfile="${newt.driver.x11.jar}" filesonly="true">
             <fileset dir="${classes}"
-                     includes="${java.part.intelgdl}"/>
+                     includes="${java.part.driver.x11}"/>
         </jar>
-    </target>
-
-    <target name="build-jars-desktop" depends="setup-manifestfile" unless="setup.nodesktop">
-        <jar manifest="tempversion" destfile="${newt.os.x11.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">
+            <fileset dir="${classes}"
+                     includes="${java.part.driver.macosx}"/>
+        </jar>
+        <jar manifest="${build.newt}/manifest.mf" destfile="${newt.driver.android.jar}" filesonly="true">
+            <fileset dir="${classes}"
+                     includes="${java.part.driver.android}"/>
+        </jar>
+        <jar manifest="${build.newt}/manifest.mf" destfile="${newt.driver.kd.jar}" filesonly="true">
             <fileset dir="${classes}"
-                     includes="${java.part.x11}"/>
+                     includes="${java.part.driver.kd}"/>
         </jar>
-        <jar manifest="tempversion" destfile="${newt.os.win.jar}" filesonly="true">
+        <jar manifest="${build.newt}/manifest.mf" destfile="${newt.driver.broadcomegl.jar}" filesonly="true">
             <fileset dir="${classes}"
-                     includes="${java.part.windows}"/>
+                     includes="${java.part.driver.broadcomegl}"/>
         </jar>
-        <jar manifest="tempversion" destfile="${newt.os.osx.jar}" filesonly="true">
+        <jar manifest="${build.newt}/manifest.mf" destfile="${newt.driver.intelgdl.jar}" filesonly="true">
             <fileset dir="${classes}"
-                     includes="${java.part.macosx}"/>
+                     includes="${java.part.driver.intelgdl}"/>
         </jar>
     </target>
 
-    <target name="build-jars-all-awt" depends="setup-manifestfile" unless="setup.noAWT">
-        <jar manifest="tempversion" destfile="${newt.all.jar}" filesonly="true">
-            <fileset dir="${classes}">
-                <include name="com/jogamp/newt/**" />
-                <include name="jogamp/newt/**" />
-            </fileset>
+    <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">
+            <fileset dir="${classes}"
+                     includes="${java.part.core}"/>
         </jar>
-        <jar manifest="tempversion" 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*" />
@@ -642,29 +677,11 @@
                 <include name="jogamp/newt/Debug*" />
             </fileset>
         </jar>
-    </target>
-
-    <target name="build-jars-all-noawt" depends="setup-manifestfile">
-        <jar manifest="tempversion" destfile="${newt.all-noawt.jar}" filesonly="true">
-            <fileset dir="${classes}"
-                     excludes="${java.part.awt}">
-                <include name="com/jogamp/newt/**" />
-                <include name="jogamp/newt/**" />
-            </fileset>
-        </jar>
-    </target>
-
-    <target name="build-jars-javase" depends="setup-manifestfile,build-jars-awt,build-jars-opengl,build-jars-all-noawt,build-jars-all-awt,build-jars-desktop,build-jars-driver">
-        <jar manifest="tempversion" destfile="${newt.core.jar}" filesonly="true">
-            <fileset dir="${classes}"
-                     includes="${java.part.core}"/>
-        </jar>
-        <jar manifest="tempversion" destfile="${build.newt}/newt-natives-${os.and.arch}.jar" filesonly="true">
+        <jar manifest="${build.newt}/manifest.mf" destfile="${build.newt}/newt-natives-${os.and.arch}.jar" filesonly="true">
             <fileset dir="${obj.newt}">
               <include name="*.${native.library.suffix}" />
             </fileset>
         </jar>
-        <delete file="tempversion"/>
     </target>
 
     <!-- ================================================================== -->
@@ -684,7 +701,7 @@
                  source="${target.sourcelevel}"
                  linkoffline="${javadoc.link} 142-packages"
          bottom="${javadoc.bottom}" >
-         <classpath refid="nativewindow_gluegen_jogl.classpath"/>
+         <classpath refid="jogl_nativewindow_gluegen.classpath"/>
         </javadoc>
     </target>
 
@@ -698,7 +715,7 @@
                  source="${target.sourcelevel}"
                  linkoffline="${javadoc.link} 142-packages"
                  bottom="${javadoc.bottom}" >
-         <classpath refid="nativewindow_gluegen_jogl.classpath"/>
+         <classpath refid="jogl_nativewindow_gluegen.classpath"/>
         </javadoc>
     </target>
 
@@ -712,7 +729,7 @@
                  source="${target.sourcelevel}"
                  linkoffline="${javadoc.link} 142-packages"
          bottom="${javadoc.bottom}" >
-         <classpath refid="nativewindow_gluegen_jogl.classpath"/>
+         <classpath refid="jogl_nativewindow_gluegen.classpath"/>
         </javadoc>
     </target>
 
diff --git a/make/build-test.xml b/make/build-test.xml
index f996ba2..f7f9760 100644
--- a/make/build-test.xml
+++ b/make/build-test.xml
@@ -42,6 +42,8 @@
     <target name="clean" description="Remove all build products" depends="declare.common">
         <delete includeEmptyDirs="true" quiet="true">
             <fileset dir="${build.test}" />
+            <fileset dir="." includes="*.tga" />
+            <fileset file="${jogl.test.jar}" />
         </delete>
     </target>
 
@@ -58,6 +60,7 @@
       <delete quiet="true">
         <fileset dir="${results.test}" includes="**"/>
         <fileset file="${build}/${test.archive.name}.7z"/>
+        <fileset dir="." includes="*.tga" />
       </delete>
       <mkdir dir="${results.test}" />
 
@@ -66,10 +69,10 @@
       <uptodate property="test.compile.skip">
         <srcfiles dir= "."                 includes="*.xml"/>
         <srcfiles dir= "${src.test}"       includes="**"/>
-        <srcfiles                          file="${nativewindow.all.jar}" />
-        <srcfiles                          file="${jogl.all.jar}" />
-        <srcfiles                          file="${newt.all.jar}" />
         <srcfiles                          file="${gluegen.jar}" />
+        <srcfiles                          dir="${src}/nativewindow" />
+        <srcfiles                          dir="${src}/jogl" />
+        <srcfiles                          dir="${src}/newt" />
         <mapper type="merge" to="${jogl.test.jar.path}"/>
       </uptodate>
     </target>
@@ -82,19 +85,21 @@
                memoryMaximumSize="${javac.memorymax}"
                includeAntRuntime="false"
                debug="${javacdebug}" debuglevel="${javacdebuglevel}">
-            <classpath refid="junit_jogl_newt.compile.classpath"/>
+            <classpath refid="junit_jogl_newt_android.compile.classpath"/>
             <src path="${src.test}" />
         </javac>
+        <!-- include any resource files that tests may require -->
+        <copy todir="${classes}">
+            <fileset dir="${src.test}">
+                <exclude name="**/*.java"/>
+            </fileset>
+        </copy>
         <jar 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) -->
             <fileset dir="${classes}"
                 includes="${java.part.test}"/>
-            <!-- include any resource files that tests may requre -->
-            <fileset dir="${src.test}">
-                <exclude name="**/*.java"/>
-            </fileset>
         </jar>
     </target>
 
@@ -126,7 +131,7 @@
                  failonerror="false"
                  output="${test.class.result.file}">
                 <env key="${system.env.library.path}" path="${obj.all.paths}"/>
-                <env key="CLASSPATH" value="${junit_jogl_newt_awt.run.jars}"/>
+                <env key="CLASSPATH" value="${junit_jogl_awt.run.jars}"/>
                 <arg value="-Djava.library.path=${obj.all.paths}"/>
                 <!--
                 <arg line="-Dnewt.debug.EDT"/>
@@ -174,8 +179,7 @@
         </junit>
     </target>
 
-    <!-- NEWT is currently not supported on OSX -->
-    <target name="junit.run.newt.headless" depends="test.compile" unless="isOSX">
+    <target name="junit.run.newt.headless" depends="test.compile">
         <!-- Test*NEWT* 
 
              Emulation of junit task,
@@ -209,7 +213,7 @@
                  relative="true"
                  failonerror="false">
                 <env key="${system.env.library.path}" path="${obj.all.paths}"/>
-                <env key="CLASSPATH" value="${junit_jogl_newt.run.jars}"/>
+                <env key="CLASSPATH" value="${junit_jogl_noawt.run.jars}"/>
                 <arg value="-Djava.library.path=${obj.all.paths}"/>
                 <arg line="${jvmarg.headless}"/>
                 <!--
@@ -241,7 +245,7 @@
          if run in parallel.
          NEWT is currently not supported on OSX 
       -->
-    <target name="junit.run.newt" depends="test.compile" unless="isOSX">
+    <target name="junit.run.newt" depends="test.compile">
         <!-- Test*NEWT* -->
         <junit forkmode="perTest" showoutput="true" fork="true" haltonerror="off" timeout="${batchtest.timeout}">
             <env key="${system.env.library.path}" path="${obj.all.paths}"/>
@@ -262,7 +266,7 @@
 
             <formatter usefile="false" type="plain"/>
             <formatter usefile="true" type="xml"/>
-            <classpath refid="junit_jogl_newt.run.classpath"/>
+            <classpath refid="junit_jogl_noawt.run.classpath"/>
 
             <batchtest todir="${results.test}">
               <fileset dir="${classes}">
@@ -328,7 +332,7 @@
 
             <formatter usefile="false" type="plain"/>
             <formatter usefile="true" type="xml"/>
-            <classpath refid="junit_jogl_newt_awt.run.classpath"/>
+            <classpath refid="junit_jogl_awt.run.classpath"/>
 
             <test name="${testclass}"/>
         </junit>
@@ -432,7 +436,7 @@
     </target>
 
     <!-- NEWT is currently not supported on OSX -->
-    <target name="junit.run.newt.awt" depends="test.compile" unless="isOSX">
+    <target name="junit.run.newt.awt" depends="test.compile">
         <!-- Test*AWT* -->
         <junit forkmode="perTest" showoutput="true" fork="true" haltonerror="off" timeout="${batchtest.timeout}">
             <env key="${system.env.library.path}" path="${obj.all.paths}"/>
@@ -453,7 +457,7 @@
 
             <formatter usefile="false" type="plain"/>
             <formatter usefile="true" type="xml"/>
-            <classpath refid="junit_jogl_newt_awt.run.classpath"/>
+            <classpath refid="junit_jogl_awt.run.classpath"/>
 
             <batchtest todir="${results.test}">
               <fileset dir="${classes}">
@@ -473,6 +477,10 @@
 
     <!-- updates / create the test results zip file -->
     <target name="test-zip-archive" depends="declare.common">
+        <move todir="${results.test}">
+            <fileset dir="." includes="*.tga" />
+        </move>
+        <mkdir dir="${results.test}" />
         <archive.7z destfile="${build}/${test.archive.name}.7z"
                     basedir="${results.test}" 
                     includes="**" />
diff --git a/make/build.xml b/make/build.xml
index d9fdf1e..791e69a 100644
--- a/make/build.xml
+++ b/make/build.xml
@@ -8,16 +8,20 @@
        - Main build target.
       -->
 
-    <target name="all" description="Build nativewindow, jogl and newt projects, incl. all junit tests " depends="init,build.nativewindow,build.jogl,build.newt,test.compile,one.dir,tag.build,developer-zip-archive" />
+    <target name="all" description="Build nativewindow, jogl and newt projects, incl. all junit tests " depends="init,build.nativewindow,build.jogl,build.newt,one.dir,tag.build,test.compile,developer-zip-archive" />
 
-    <target name="all.but-archives" description="Build nativewindow, jogl and newt projects, incl. all junit tests " depends="init,build.nativewindow,build.jogl,build.newt,test.compile,one.dir,tag.build" />
+    <target name="all.debug" description="Debug build nativewindow, jogl and newt projects, incl. all junit tests " depends="init.debug,build.nativewindow,build.jogl,build.newt,one.dir,tag.build,test.compile,developer-zip-archive" />
 
-    <target name="all.ide" description="Build nativewindow, jogl and newt projects, including all junit tests, but don't copy libs or JARs or tag the build" depends="init,build.nativewindow,build.jogl,build.newt,test.compile" />
+    <target name="all.but-archives" description="Build nativewindow, jogl and newt projects, incl. all junit tests " depends="init,build.nativewindow,build.jogl,build.newt,one.dir,tag.build,test.compile" />
 
-    <target name="test.compile">
+    <target name="all.ide" description="Debug IDE build nativewindow, jogl and newt projects, including all junit tests, but don't tag the build or create archives" depends="init.debug,build.nativewindow,build.jogl,build.newt,one.dir,test.compile" />
+
+    <target name="test.compile.1">
       <ant antfile="build-test.xml" target="test.compile" inheritRefs="true" inheritAll="true"/>
     </target>
 
+    <target name="test.compile" depends="test.compile.1,android.test.package"/>
+
     <target name="test.auto.run" description="Run automated tests (junit and others) in nativewindow, jogl and newt projects">
       <ant antfile="build-test.xml" target="test.auto.run" inheritRefs="true" inheritAll="true"/>
     </target>
@@ -47,9 +51,14 @@
         <ant antfile="${nativewindow.build.xml}" dir="${nativewindow.make}" target="clean" inheritRefs="true" inheritAll="true"/>
         <ant antfile="${jogl.build.xml}" dir="${jogl.make}" target="clean" inheritRefs="true" inheritAll="true"/>
         <ant antfile="${newt.build.xml}" dir="${newt.make}" target="clean" inheritRefs="true" inheritAll="true"/>
+        <ant antfile="${newt.build.xml}" dir="${newt.make}" target="clean" inheritRefs="true" inheritAll="true"/>
+        <ant antfile="build-test.xml"                       target="clean" inheritRefs="true" inheritAll="true"/>
         <delete includeEmptyDirs="true" quiet="true" failonerror="false">
             <fileset dir="${build}" />
+            <fileset dir="." includes="*.tga" />
         </delete>
+        <delete includeEmptyDirs="true" quiet="true" dir="${jar}" failonerror="false" />
+        <delete includeEmptyDirs="true" quiet="true" dir="${lib}" failonerror="false" />
     </target>        
 
     <!-- ================================================================== -->
@@ -58,6 +67,7 @@
       -->
 
     <target name="init" depends="common.init" />
+    <target name="init.debug" depends="common.init.debug" />
 
     <target name="build.nativewindow" depends="init">
         <ant antfile="${nativewindow.build.xml}" dir="${nativewindow.make}" target="all" inheritRefs="true" inheritAll="true"/>
@@ -71,29 +81,167 @@
         <ant antfile="${newt.build.xml}" dir="${newt.make}" target="all" inheritRefs="true" inheritAll="true"/>
     </target>
 
-    <target name="one.lib.dir" depends="init,gluegen.cpptasks.detect.os">
-        <delete includeEmptyDirs="true" quiet="true" dir="${lib}" failonerror="false" />
+    <target name="one.lib.dir" depends="init,gluegen.cpptasks.detect.os" unless="one.dir.skip">
         <mkdir dir="${lib}" />
         <copy todir="${lib}">
-            <fileset dir="${gluegen.root}/${rootrel.build}/obj" includes="*.${native.library.suffix}" />
             <fileset dir="${build}/jogl/obj" includes="*.${native.library.suffix}" />
             <fileset dir="${build}/nativewindow/obj" includes="*.${native.library.suffix}" />
             <fileset dir="${build}/newt/obj" includes="*.${native.library.suffix}" />
         </copy>
     </target>
 
-    <target name="one.jar.dir" depends="init,gluegen.cpptasks.detect.os">
-        <delete includeEmptyDirs="true" quiet="true" dir="${jar}" failonerror="false" />
+    <target name="one.jar.dir.prep" depends="one.lib.dir" unless="one.dir.skip">
         <mkdir dir="${jar}" />
-        <copy todir="${jar}">
-            <fileset dir="${gluegen.root}/${rootrel.build}" includes="gluegen-rt*.jar" />
-            <fileset dir="${build}/jogl" includes="*.jar" />
-            <fileset dir="${build}/nativewindow" includes="*.jar" />
-            <fileset dir="${build}/newt" includes="*.jar" />
+        <mkdir dir="${jar}/atomic" />
+        <copy todir="${jar}/atomic">
+            <fileset dir="${build.jogl}" includes="*.jar" />
+            <fileset dir="${build.nativewindow}" includes="*.jar" />
+            <fileset dir="${build.newt}" includes="*.jar" />
         </copy>
     </target>
 
-    <target name="one.dir" depends="one.lib.dir,one.jar.dir"/>
+    <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/*">
+            <archives>
+                <zips>
+                    <path refid="nativewindow_core_atoms.classpath"/>
+                    <path refid="jogl_all-mobile_atoms.classpath"/>
+                    <path refid="newt_all-android_atoms.classpath"/>
+                </zips>
+            </archives>
+        </jar>
+    </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/*">
+            <archives>
+                <zips>
+                    <path refid="nativewindow_all_atoms.classpath"/>
+                    <path refid="jogl_all_atoms.classpath"/>
+                    <path refid="newt_all_atoms.classpath"/>
+                </zips>
+            </archives>
+        </jar>
+        <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"/>
+                    <path refid="jogl_all-noawt_atoms.classpath"/>
+                    <path refid="newt_all-noawt_atoms.classpath"/>
+                </zips>
+            </archives>
+        </jar>
+        <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"/>
+                    <path refid="jogl_all-mobile_atoms.classpath"/>
+                    <path refid="newt_all-mobile_atoms.classpath"/>
+                </zips>
+            </archives>
+        </jar>
+        <jar manifest="${build.jogl}/manifest.mf" destfile="${jar}/jogl-all-natives-${os.and.arch}.jar" filesonly="true">
+            <fileset dir="${lib}">
+              <include name="*.${native.library.suffix}" />
+              <exclude name="*jogl_cg.${native.library.suffix}" />
+            </fileset>
+        </jar>
+    </target>
+
+    <target name="android.package.jogl.skip.check" depends="init,gluegen.cpptasks.detect.os">
+      <uptodate property="android.package.jogl.skip" targetfile="${jar}/jogl.all-android.apk">
+        <srcfiles dir="${jar}" includes="jogl.all-android.jar" />
+        <srcfiles dir="resources/android" includes="**" />
+      </uptodate>
+    </target>
+
+    <target name="android.jogl.package" depends="init,gluegen.cpptasks.detect.os,android.package.jogl.skip.check" if="isAndroid" unless="android.package.jogl.skip">
+        <aapt.signed 
+            jarsrcdir="${src}/jogl/classes"
+            jarbuilddir="${jar}"
+            jarbasename="jogl.all-android"
+            nativebuilddir="${lib}"
+            nativebasename=""
+            androidmanifest.path="resources/android/AndroidManifest-jogl.xml"
+            androidresources.path="resources/android/res-jogl"
+            jarmanifest.path="${build.jogl}/manifest.mf"
+            version.code="${jogl_int_version}"
+            version.name="${jogl.version.plus}" />
+    </target>
+
+    <target name="android.package.test.skip.check" depends="init,gluegen.cpptasks.detect.os">
+      <uptodate property="android.package.test.skip" targetfile="${jar}/jogl.test.apk">
+        <srcfiles dir="${jar}" includes="jogl.test.jar" />
+        <srcfiles dir="resources/android" includes="**" />
+      </uptodate>
+    </target>
+
+    <target name="android.test.package" depends="init,gluegen.cpptasks.detect.os,android.package.test.skip.check" if="isAndroid" unless="android.package.test.skip">
+        <aapt.signed 
+            jarsrcdir="${src}/test"
+            jarbuilddir="${jar}"
+            jarbasename="jogl.test"
+            nativebuilddir="${lib}"
+            nativebasename="non-existing"
+            androidmanifest.path="resources/android/AndroidManifest-test.xml"
+            androidresources.path="resources/android/res-jogl"
+            jarmanifest.path="${build.jogl}/manifest.mf"
+            version.code="${jogl_int_version}"
+            version.name="${jogl.version.plus}" />
+    </target>
+
+    <target name="android.launcher.package" depends="init,gluegen.cpptasks.detect.os" if="isAndroid">
+        <mkdir dir="${build}/android/classes" />
+        <mkdir dir="${build}/android/lib" />
+        <javac destdir="${build}/android/classes"
+               includes="com/jogamp/android/launcher/**"
+               source="${target.sourcelevel}"
+               fork="yes"
+               includeAntRuntime="false"
+               memoryMaximumSize="${javac.memorymax}"
+               debug="${javacdebug}" debuglevel="${javacdebuglevel}">
+            <src path="${project.root}/src/android" />
+            <classpath location="${android.jar}"/>
+        </javac>
+        <jar destfile="${jar}/jogl.android-launcher.jar" filesonly="true">
+            <fileset dir="${build}/android/classes"
+                     includes="com/jogamp/android/launcher/**"/>
+        </jar>
+        <aapt.signed 
+            jarbuilddir="${jar}"
+            jarbasename="jogl.android-launcher"
+            nativebuilddir="${build}/android/lib"
+            nativebasename="non-existing"
+            androidmanifest.path="resources/android/AndroidManifest-launcher.xml"
+            androidresources.path="resources/android/res-launcher"
+            version.code="1"
+            version.name="version 1" />
+    </target>
+
+    <target name="one.dir.skip.check" depends="init,gluegen.cpptasks.detect.os">
+      <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}">
+        <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}">
+        <srcfiles dir="${build.nativewindow}" includes="*.jar"/>
+        <srcfiles dir="${build.jogl}" includes="*.jar"/>
+        <srcfiles dir="${build.newt}" includes="*.jar"/>
+      </uptodate>
+      <condition property="one.dir.skip">
+          <and>
+              <isset property="one.dir.skip.native"/>
+              <isset property="one.dir.skip.all"/>
+              <isset property="one.dir.skip.android"/>
+          </and>
+      </condition>
+    </target>
+
+    <target name="one.dir" depends="one.dir.skip.check, one.jar.dir, android.jogl.package, android.launcher.package"/>
 
     <target name="repack-jars" depends="one.jar.dir">
         <!-- Re-pack jars we have the intent to compress later, after signing -->
@@ -118,7 +266,20 @@
        - This must be called after all of the build targets complete.
       -->
 
-    <target name="developer-zip-archive" depends="init" if="build.archiveon">
+    <target name="developer-src-zip" depends="init">
+        <!--delete includeEmptyDirs="true" quiet="true" failonerror="false">
+            <fileset dir="${build}" includes="jogl-java-src.zip" />
+        </delete-->
+        <zip destfile="${build}/jogl-java-src.zip" level="0">
+            <fileset dir="${src}/nativewindow/classes"/>
+            <fileset dir="${build}/nativewindow/gensrc/classes"/>
+            <fileset dir="${src}/jogl/classes"/>
+            <fileset dir="${build}/jogl/gensrc/classes"/>
+            <fileset dir="${src}/newt/classes"/>
+        </zip>
+    </target>
+
+    <target name="developer-zip-archive" depends="init,developer-src-zip" if="build.archiveon">
         <delete includeEmptyDirs="true" quiet="true" dir="${archive}" failonerror="false" />
         <mkdir dir="${archive}" />
         <copy file="${build}/artifact.properties" todir="${archive}" />
@@ -129,7 +290,7 @@
             tofile="${archive}/README.txt"
             overwrite="true">
             <filterset>
-                <filter token="VERSION" value="${jogl.version}"/>
+                <filter token="VERSION"  value="${jogl.version}"/>
                 <filter token="SCM_BRANCH" value="${jogl.build.branch}"/>
                 <filter token="SCM_COMMIT" value="${jogl.build.commit}"/>
                 <filter token="BASEVERSION" value="${jogl_base_version}"/>
@@ -137,7 +298,7 @@
         </copy>
         <mkdir dir="${archive}/jar" />
         <copy todir="${archive}/jar">
-            <fileset dir="${build}/jar" includes="*"/>
+            <fileset dir="${build}/jar" includes="**"/>
         </copy>
         <mkdir dir="${archive}/lib" />
         <copy todir="${archive}/lib">
@@ -145,12 +306,17 @@
         </copy>
         <mkdir dir="${archive}/jnlp-files" />
         <copy todir="${archive}/jnlp-files">
-            <fileset dir="${project.root}/jnlp-files" includes="*" />
+            <fileset dir="${project.root}/jnlp-files" includes="**" />
         </copy>
         <mkdir dir="${archive}/etc" />
         <copy todir="${archive}/etc">
             <fileset dir="${project.root}/etc" includes="*" />
         </copy>
+        <copy todir="${archive}">
+            <fileset dir="${build}">
+                <include name="jogl-java-src.zip"/>
+            </fileset>
+        </copy>
         <archive.7z destfile="${build}/${archive.name}.7z"
              basedir="${build}"
              includes="${archive.name}/**" />
@@ -254,7 +420,7 @@
                  source="${target.sourcelevel}"
                  maxmemory="1024m"
                  bottom="${javadoc.bottom}" >
-            <classpath refid="jogl_newt_all.classpath"/>
+            <classpath refid="jogl_all.classpath"/>
             <link offline="true" href="${javadoc.link}" packagelistLoc="${gluegen.root}/make/142-packages" />
             <link offline="false" href="${gluegen.link}" />
             <arg line="-J-Dnativetaglet.mapping=${basedir}/native-taglet.properties"/> 
@@ -275,7 +441,7 @@
                  source="${target.sourcelevel}"
                  maxmemory="1024m"
                  bottom="${javadoc.bottom}" >
-            <classpath refid="jogl_newt_all.classpath"/>
+            <classpath refid="jogl_all.classpath"/>
             <link offline="true" href="${javadoc.link}" packagelistLoc="${gluegen.root}/make/142-packages" />
             <link offline="false" href="${gluegen.link}" />
             <arg line="-J-Dnativetaglet.mapping=${basedir}/native-taglet.properties"/>
@@ -297,7 +463,7 @@
                  source="${target.sourcelevel}"
                  maxmemory="1024m"
                  bottom="${javadoc.bottom}" >
-            <classpath refid="jogl_newt_all.classpath"/>
+            <classpath refid="jogl_all.classpath"/>
             <link offline="true" href="${javadoc.link}" packagelistLoc="${gluegen.root}/make/142-packages" />
             <link offline="false" href="${gluegen.link}" />
             <arg line="-J-Dnativetaglet.mapping=${basedir}/native-taglet.properties"/>
@@ -318,7 +484,7 @@
                  source="${target.sourcelevel}"
                  maxmemory="1024m"
                  bottom="${javadoc.bottom}" >
-            <classpath refid="jogl_newt_all.classpath"/>
+            <classpath refid="jogl_all.classpath"/>
             <link offline="true" href="${javadoc.link}" packagelistLoc="${gluegen.root}/make/142-packages" />
             <link offline="false" href="${gluegen.link}" />
             <arg line="-J-Dnativetaglet.mapping=${basedir}/native-taglet.properties"/>
diff --git a/make/config/intptr.cfg b/make/config/intptr.cfg
deleted file mode 100644
index c946e48..0000000
--- a/make/config/intptr.cfg
+++ /dev/null
@@ -1,17 +0,0 @@
-CustomCCode #ifdef _WIN32
-CustomCCode  #ifdef _MSC_VER
-CustomCCode  /* This typedef is apparently needed for Microsoft compilers before VC8,
-CustomCCode     and on Windows CE */
-CustomCCode   #if (_MSC_VER < 1400) || defined(UNDER_CE)
-CustomCCode    #ifdef _WIN64
-CustomCCode     typedef long long intptr_t;
-CustomCCode    #else
-CustomCCode     typedef int intptr_t;
-CustomCCode    #endif
-CustomCCode   #endif
-CustomCCode  #else
-CustomCCode   #include <inttypes.h>
-CustomCCode  #endif
-CustomCCode #else
-CustomCCode  #include <inttypes.h>
-CustomCCode #endif
diff --git a/make/config/jogl/cg-common.cfg b/make/config/jogl/cg-common.cfg
index 7ec4739..606f86b 100644
--- a/make/config/jogl/cg-common.cfg
+++ b/make/config/jogl/cg-common.cfg
@@ -119,6 +119,7 @@ RuntimeExceptionType CgException
 # generated C code
 #
 
+CustomCCode #include <stdio.h> /* android */
 CustomCCode #include <stdlib.h>
 CustomCCode #include <Cg/cgGL.h>
 CustomCCode
diff --git a/make/config/jogl/cgl-macosx.cfg b/make/config/jogl/cgl-macosx.cfg
index 38034a7..06bc946 100644
--- a/make/config/jogl/cgl-macosx.cfg
+++ b/make/config/jogl/cgl-macosx.cfg
@@ -16,6 +16,7 @@ Opaque long void *
 
 # Opaque directives for low-level CGL binding (for Java2D/JOGL bridge)
 Opaque long CGLContextObj
+Opaque long CGLShareGroupObj
 Opaque long CGLPBufferObj
 Opaque long CGLPixelFormatObj
 
diff --git a/make/config/jogl/cglext.cfg b/make/config/jogl/cglext.cfg
index 721fe91..34a59dd 100644
--- a/make/config/jogl/cglext.cfg
+++ b/make/config/jogl/cglext.cfg
@@ -23,8 +23,9 @@ GetProcAddressTableExpr _context.getCGLExtProcAddressTable()
 # Ignore everything that doesn't start with cgl or CGL
 IgnoreNot ^(cgl|CGL).+
 
+CustomCCode #include <gluegen_stdint.h>
+CustomCCode #include <gluegen_stddef.h>
 Include gl-headers.cfg
-Include ../intptr.cfg
 
 CustomJavaCode CGLExt      public boolean isFunctionAvailable(String glFunctionName);
 CustomJavaCode CGLExt      public boolean isExtensionAvailable(String glExtensionName);
diff --git a/make/config/jogl/egl.cfg b/make/config/jogl/egl.cfg
index ea299bf..ee74b46 100644
--- a/make/config/jogl/egl.cfg
+++ b/make/config/jogl/egl.cfg
@@ -21,10 +21,11 @@ GetProcAddressTableExpr _table
 ArgumentIsString eglGetProcAddress 0
 ReturnsString eglQueryString
 
+CustomCCode #include <stdio.h> /* android */
+CustomCCode #include <gluegen_stdint.h>
+CustomCCode #include <gluegen_stddef.h>
 CustomCCode #include <EGL/egl.h>
 
-Include ../intptr.cfg
-
 CustomJavaCode EGL  private static EGLProcAddressTable _table = new EGLProcAddressTable(new GLProcAddressResolver());
 CustomJavaCode EGL  public static void resetProcAddressTable(DynamicLookupHelper lookup) {
 CustomJavaCode EGL      _table.reset(lookup);
diff --git a/make/config/jogl/eglext.cfg b/make/config/jogl/eglext.cfg
index 3af90d3..2e422ff 100644
--- a/make/config/jogl/eglext.cfg
+++ b/make/config/jogl/eglext.cfg
@@ -20,6 +20,9 @@ EmitProcAddressTable true
 ProcAddressTableClassName EGLExtProcAddressTable
 GetProcAddressTableExpr _context.getEGLExtProcAddressTable()
 
+CustomCCode #include <stdio.h> /* android */
+CustomCCode #include <gluegen_stdint.h>
+CustomCCode #include <gluegen_stddef.h>
 CustomCCode /* Define EGL_EGLEXT_PROTOTYPES so that the EGL extension prototypes in
 CustomCCode    "eglext.h" are parsed. */
 CustomCCode #define EGL_EGLEXT_PROTOTYPES
@@ -27,8 +30,6 @@ CustomCCode
 CustomCCode #include <EGL/egl.h>
 CustomCCode #include <EGL/eglext.h>
 
-Include ../intptr.cfg
-
 # There are some #defines in eglext.h that GlueGen and PCPP don't currently handle
 CustomJavaCode EGLExt      /** Part of <code>EGL_KHR_image</code> */
 CustomJavaCode EGLExt      public static final long EGL_NO_IMAGE = 0;
diff --git a/make/config/jogl/gl-common.cfg b/make/config/jogl/gl-common.cfg
index 2c59a74..74af5cf 100644
--- a/make/config/jogl/gl-common.cfg
+++ b/make/config/jogl/gl-common.cfg
@@ -434,7 +434,7 @@ ArgumentIsString glGetUniformIndices 2
 ArgumentIsString glGetUniformBlockIndex 1
 ArgumentIsString glTransformFeedbackVaryings 2
 
-# String output values:
+# String return values must use byte[] etc ..
 #   ArgumentIsString glGetActiveAttrib 6
 #   ArgumentIsString glGetActiveUniformBlockName 4
 #   ArgumentIsString glGetActiveUniformName 4
@@ -443,6 +443,27 @@ ArgumentIsString glTransformFeedbackVaryings 2
 #   ArgumentIsString glGetShaderInfoLog 3
 #   ArgumentIsString glGetShaderSource 3
 #   ArgumentIsString glGetTransformFeedbackVarying 6
+#   ArgumentIsString glGetActiveUniformARB 6
+#   ArgumentIsString glGetActiveSubroutineName 5
+#   ArgumentIsString glGetActiveSubroutineUniformName 5
+#   ArgumentIsString glGetNamedStringARB 4 - bug param1 is String r/o see below
+#   ArgumentIsString glGetDebugMessageLogARB  7
+#   ArgumentIsString glGetDebugMessageLogAMD  6
+
+ArgumentIsString glBindFragDataLocationIndexed 3
+ArgumentIsString glGetFragDataIndex 1
+ArgumentIsString glGetSubroutineIndex 2
+ArgumentIsString glGetSubroutineUniformLocation 2
+
+ArgumentIsString glDebugMessageInsertARB  5
+ArgumentIsString glDebugMessageInsertAMD  4
+
+ArgumentIsString glNamedStringARB 2 4
+ArgumentIsString glDeleteNamedStringARB 1
+ArgumentIsString glCompileShaderIncludeARB 2
+ArgumentIsString glIsNamedStringARB 1
+ArgumentIsString glGetNamedStringARB 1
+ArgumentIsString glGetNamedStringivARB 1
 
 #
 # Use cached GL_EXTENSION if possible,
diff --git a/make/config/jogl/gl-es1.cfg b/make/config/jogl/gl-es1.cfg
index 5c69be9..518dc07 100644
--- a/make/config/jogl/gl-es1.cfg
+++ b/make/config/jogl/gl-es1.cfg
@@ -78,6 +78,7 @@ CustomJavaCode GLES1Impl   glClearDepthf((float)depth); }
 CustomJavaCode GLES1Impl  public void glDepthRange(double zNear, double zFar) {
 CustomJavaCode GLES1Impl   glDepthRangef((float)zNear, (float)zFar); }
 
+CustomCCode #include <stdio.h> /* android */
 CustomCCode /* Define GL_GLEXT_PROTOTYPES so that the OpenGL extension prototypes in
 CustomCCode    "glext.h" are parsed. */
 CustomCCode #define GL_GLEXT_PROTOTYPES
@@ -87,7 +88,6 @@ CustomCCode /* #define GL_APICALL __declspec(dllimport) */
 CustomCCode #include <GLES/gl.h>
 CustomCCode #include <GLES/glext.h>
 CustomCCode #include <stdlib.h>
-Include ../intptr.cfg
 
 IncludeAs CustomJavaCode GLES1Impl gl-impl-CustomJavaCode-common.java
 IncludeAs CustomJavaCode GLES1Impl gl-impl-CustomJavaCode-gles1.java
@@ -98,3 +98,4 @@ Import javax.media.opengl.GLES1
 Import javax.media.opengl.GLES2
 Import javax.media.opengl.GL2
 Import com.jogamp.common.nio.Buffers
+Import com.jogamp.opengl.util.GLBuffers
diff --git a/make/config/jogl/gl-es2.cfg b/make/config/jogl/gl-es2.cfg
index dcdc39b..614904a 100644
--- a/make/config/jogl/gl-es2.cfg
+++ b/make/config/jogl/gl-es2.cfg
@@ -62,6 +62,7 @@ JavaPrologue glGetIntegerv if ( glStateTracker.getInt(pname, params, params_offs
 
 IncludeAs CustomJavaCode GLES2 gl-if-CustomJavaCode-gles2.java
 
+CustomCCode #include <stdio.h> /* android */
 CustomCCode /* Define GL_GLEXT_PROTOTYPES so that the OpenGL extension prototypes in
 CustomCCode    "glext.h" are parsed. */
 CustomCCode #define GL_GLEXT_PROTOTYPES
@@ -71,7 +72,6 @@ CustomCCode /* #define GL_APICALL __declspec(dllimport) */
 CustomCCode #include <GLES2/gl2.h>
 CustomCCode #include <GLES2/gl2ext.h>
 CustomCCode #include <stdlib.h>
-Include ../intptr.cfg
 
 IncludeAs CustomJavaCode GLES2Impl gl-impl-CustomJavaCode-common.java
 IncludeAs CustomJavaCode GLES2Impl gl-impl-CustomJavaCode-gles2.java
@@ -85,5 +85,6 @@ Import javax.media.opengl.GL2
 Import javax.media.opengl.GLArrayData
 Import javax.media.opengl.GLUniformData
 Import com.jogamp.common.nio.Buffers
+Import com.jogamp.opengl.util.GLBuffers
 Import java.io.PrintStream
 
diff --git a/make/config/jogl/gl-gl4bc.cfg b/make/config/jogl/gl-gl4bc.cfg
index 06a9c76..67582af 100644
--- a/make/config/jogl/gl-gl4bc.cfg
+++ b/make/config/jogl/gl-gl4bc.cfg
@@ -51,6 +51,10 @@ ManuallyImplement glMapNamedBufferEXT
 ForceProcAddressGen glMapNamedBufferEXT
 JavaEpilogue glNamedBufferDataEXT bufferSizeTracker.setDirectStateBufferSize({0}, this, {1});
 
+# Manuall implement glDebugMessageCallback* using the proc address resolver
+ForceProcAddressGen glDebugMessageCallbackARB
+ForceProcAddressGen glDebugMessageCallbackAMD
+
 # Force all of the methods to be emitted using dynamic linking so we
 # don't need to link against any emulation library on the desktop or
 # depend on the presence of an import library for a particular device
@@ -85,7 +89,6 @@ CustomJavaCode GL4bcImpl   glOrtho((double)left, (double)right, (double)bottom,
 
 Include gl-headers.cfg
 Include gl3ext-headers.cfg
-Include ../intptr.cfg
 
 IncludeAs CustomJavaCode GL4bcImpl gl-impl-CustomJavaCode-common.java
 IncludeAs CustomJavaCode GL4bcImpl gl-impl-CustomJavaCode-gl4bc.java
@@ -101,4 +104,5 @@ Import javax.media.opengl.GL3
 Import javax.media.opengl.GL3bc
 Import javax.media.opengl.GL4
 Import com.jogamp.common.nio.Buffers
+Import com.jogamp.opengl.util.GLBuffers
 Import java.io.PrintStream
diff --git a/make/config/jogl/gl-headers.cfg b/make/config/jogl/gl-headers.cfg
index 5a648b5..b80630c 100644
--- a/make/config/jogl/gl-headers.cfg
+++ b/make/config/jogl/gl-headers.cfg
@@ -1,3 +1,5 @@
+CustomCCode #include <gluegen_stdint.h>
+CustomCCode #include <stdio.h> /* android */
 CustomCCode /* Define GL_GLEXT_PROTOTYPES so that the OpenGL extension prototypes in
 CustomCCode    "glext.h" are parsed. */
 CustomCCode #define GL_GLEXT_PROTOTYPES
@@ -23,7 +25,7 @@ CustomCCode   #include </usr/include/machine/types.h>
 CustomCCode   /* Provide Windows typedefs */
 CustomCCode   typedef void* LPVOID;
 CustomCCode   typedef unsigned int* PUINT;
-CustomCCode #elif defined(linux) || defined(__sun) || defined(__FreeBSD__) || defined(_HPUX)
+CustomCCode #elif defined(__unix__)
 CustomCCode   #include <inttypes.h>
 CustomCCode   #include <stdlib.h>
 CustomCCode   #include <X11/Xlib.h>
diff --git a/make/config/jogl/gl-if-CustomJavaCode-gl.java b/make/config/jogl/gl-if-CustomJavaCode-gl.java
index 1ff8b8e..4741b2d 100644
--- a/make/config/jogl/gl-if-CustomJavaCode-gl.java
+++ b/make/config/jogl/gl-if-CustomJavaCode-gl.java
@@ -58,8 +58,25 @@
 
   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();
-  public boolean glIsVBOElementEnabled();
+
+  /**
+   * @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-if-gl2.cfg b/make/config/jogl/gl-if-gl2.cfg
index 6063bba..da6ca16 100644
--- a/make/config/jogl/gl-if-gl2.cfg
+++ b/make/config/jogl/gl-if-gl2.cfg
@@ -35,7 +35,6 @@ CustomJavaCode GL2     public boolean glIsPBOPackEnabled();
 CustomJavaCode GL2     public boolean glIsPBOUnpackEnabled();
 
 Include gl-headers.cfg
-Include ../intptr.cfg
 
 EmitProcAddressTable false
 ProcAddressTableClassName DontGenerateProcAddressTableStuff
diff --git a/make/config/jogl/gl-if-gl3.cfg b/make/config/jogl/gl-if-gl3.cfg
index 3ccc2c5..fc08ecc 100644
--- a/make/config/jogl/gl-if-gl3.cfg
+++ b/make/config/jogl/gl-if-gl3.cfg
@@ -31,7 +31,6 @@ EmitProcAddressTable false
 TagNativeBinding true
 
 Include gl3-headers.cfg
-Include ../intptr.cfg
 
 EmitProcAddressTable false
 ProcAddressTableClassName DontGenerateProcAddressTableStuff
diff --git a/make/config/jogl/gl-if-gl3bc.cfg b/make/config/jogl/gl-if-gl3bc.cfg
index f23d371..6765e09 100644
--- a/make/config/jogl/gl-if-gl3bc.cfg
+++ b/make/config/jogl/gl-if-gl3bc.cfg
@@ -38,7 +38,6 @@ IgnoreExtension GL_EXT_point_parameters
 
 Include gl-headers.cfg
 Include gl3ext-headers.cfg
-Include ../intptr.cfg
 
 EmitProcAddressTable false
 ProcAddressTableClassName DontGenerateProcAddressTableStuff
diff --git a/make/config/jogl/gl-if-gl4.cfg b/make/config/jogl/gl-if-gl4.cfg
index b660bfa..dbcf633 100644
--- a/make/config/jogl/gl-if-gl4.cfg
+++ b/make/config/jogl/gl-if-gl4.cfg
@@ -29,5 +29,4 @@ GetProcAddressTableExpr DontGenerateProcAddressTableStuff
 TagNativeBinding true
 
 Include gl3-headers.cfg
-Include ../intptr.cfg
 
diff --git a/make/config/jogl/gl-impl-CustomJavaCode-common.java b/make/config/jogl/gl-impl-CustomJavaCode-common.java
index 4872490..0a8e901 100644
--- a/make/config/jogl/gl-impl-CustomJavaCode-common.java
+++ b/make/config/jogl/gl-impl-CustomJavaCode-common.java
@@ -7,11 +7,15 @@
         return bufferStateTracker.getBoundBufferObject(target, this);
     }
 
+    public long glGetBufferSize(int buffer) {
+        return bufferSizeTracker.getDirectStateBufferSize(buffer, this);
+    }
+
     public boolean glIsVBOArrayEnabled() {
         return checkArrayVBOEnabled(false);
     }
 
-    public boolean glIsVBOElementEnabled() {
+    public boolean glIsVBOElementArrayEnabled() {
         return checkElementVBOEnabled(false);
     }
 
diff --git a/make/config/jogl/gl-impl-CustomJavaCode-desktop.java b/make/config/jogl/gl-impl-CustomJavaCode-desktop.java
index 93a2752..08b981a 100644
--- a/make/config/jogl/gl-impl-CustomJavaCode-desktop.java
+++ b/make/config/jogl/gl-impl-CustomJavaCode-desktop.java
@@ -1,80 +1,7 @@
     private int[] imageSizeTemp = new int[1];
 
-    /** Helper for more precise computation of number of bytes that will
-        be touched by a pixel pack or unpack operation. */
-    private int imageSizeInBytes(int bytesPerElement,
-                                 int width, int height, int depth, boolean pack) {
-        int rowLength = 0;
-        int skipRows = 0;
-        int skipPixels = 0;
-        int alignment = 1;
-        int imageHeight = 0;
-        int skipImages = 0;
-
-        if (pack) {
-            glGetIntegerv(GL_PACK_ROW_LENGTH, imageSizeTemp, 0);
-            rowLength = imageSizeTemp[0];
-            glGetIntegerv(GL_PACK_SKIP_ROWS, imageSizeTemp, 0);
-            skipRows = imageSizeTemp[0];
-            glGetIntegerv(GL_PACK_SKIP_PIXELS, imageSizeTemp, 0);
-            skipPixels = imageSizeTemp[0];
-            glGetIntegerv(GL_PACK_ALIGNMENT, imageSizeTemp, 0);
-            alignment = imageSizeTemp[0];
-            if (depth > 1) {
-                glGetIntegerv(GL_PACK_IMAGE_HEIGHT, imageSizeTemp, 0);
-                imageHeight = imageSizeTemp[0];
-                glGetIntegerv(GL_PACK_SKIP_IMAGES, imageSizeTemp, 0);
-                skipImages = imageSizeTemp[0];
-            }
-        } else {
-            glGetIntegerv(GL_UNPACK_ROW_LENGTH, imageSizeTemp, 0);
-            rowLength = imageSizeTemp[0];
-            glGetIntegerv(GL_UNPACK_SKIP_ROWS, imageSizeTemp, 0);
-            skipRows = imageSizeTemp[0];
-            glGetIntegerv(GL_UNPACK_SKIP_PIXELS, imageSizeTemp, 0);
-            skipPixels = imageSizeTemp[0];
-            glGetIntegerv(GL_UNPACK_ALIGNMENT, imageSizeTemp, 0);
-            alignment = imageSizeTemp[0];
-            if (depth > 1) {
-                glGetIntegerv(GL_UNPACK_IMAGE_HEIGHT, imageSizeTemp, 0);
-                imageHeight = imageSizeTemp[0];
-                glGetIntegerv(GL_UNPACK_SKIP_IMAGES, imageSizeTemp, 0);
-                skipImages = imageSizeTemp[0];
-            }
-        }
-        // Try to deal somewhat correctly with potentially invalid values
-        width       = Math.max(0, width );
-        height      = Math.max(1, height); // min 1D
-        depth       = Math.max(1, depth ); // min 1 * imageSize
-        skipRows    = Math.max(0, skipRows);
-        skipPixels  = Math.max(0, skipPixels);
-        alignment   = Math.max(1, alignment);
-        skipImages  = Math.max(0, skipImages);
-
-        imageHeight = ( imageHeight > 0 ) ? imageHeight : height;
-        rowLength   = ( rowLength   > 0 ) ? rowLength   : width;
-
-        int rowLengthInBytes = rowLength * bytesPerElement;
-
-        if (alignment > 1) {
-            int padding = rowLengthInBytes % alignment;
-            if (padding > 0) {
-                rowLengthInBytes += alignment - padding;
-            }
-        }
-
-        /**
-         * skipPixels and skipRows is a static one time offset.
-         *
-         * skipImages and depth are in multiples of image size.
-         *
-         * rowlenght is the actual repeating offset 
-         * to go from line n to line n+1 at the same x-axis position.
-         */
-        return 
-            ( skipImages + depth  - 1 ) * imageHeight * rowLengthInBytes + // whole images
-            ( skipRows   + height - 1 ) * rowLengthInBytes +               // lines with padding
-            ( skipPixels + width      ) * bytesPerElement;                 // last line
+    private final int imageSizeInBytes(int format, int type, int width, int height, int depth, boolean pack) {
+        return GLBuffers.sizeof(this, imageSizeTemp, format, type, width, height, depth, pack) ;                                    
     }
 
     public final boolean isGL4bc() {
@@ -105,6 +32,10 @@
         return _context.isGL2ES2();
     }
 
+    public final boolean isGLES2Compatible() {
+        return _context.isGLES2Compatible();
+    }
+
     public final boolean isGL2GL3() {
         return _context.isGL2GL3();
     }
@@ -121,7 +52,7 @@
     }
 
     public final GL4 getGL4() throws GLException {
-        if(!isGL4bc()) {
+        if(!isGL4()) {
             throw new GLException("Not a GL4 implementation");
         }
         return this;
diff --git a/make/config/jogl/gl-impl-CustomJavaCode-embedded.java b/make/config/jogl/gl-impl-CustomJavaCode-embedded.java
index 0408c21..e1273e6 100644
--- a/make/config/jogl/gl-impl-CustomJavaCode-embedded.java
+++ b/make/config/jogl/gl-impl-CustomJavaCode-embedded.java
@@ -1,42 +1,7 @@
-private int[] imageSizeTemp = new int[1];
 
-/** Helper for more precise computation of number of bytes that will
-    be touched by a pixel pack or unpack operation. */
-private int imageSizeInBytes(int bytesPerElement,
-                             int rowLength, int imageHeight, int depth, boolean pack) {
-    int alignment = 1;
+    private int[] imageSizeTemp = new int[1];
 
-    if (pack) {
-        glGetIntegerv(GL_PACK_ALIGNMENT, imageSizeTemp, 0);
-        alignment = imageSizeTemp[0];
-    } else {
-        glGetIntegerv(GL_UNPACK_ALIGNMENT, imageSizeTemp, 0);
-        alignment = imageSizeTemp[0];
+    private final int imageSizeInBytes(int format, int type, int width, int height, int depth, boolean pack) {
+        return GLBuffers.sizeof(this, imageSizeTemp, format, type, width, height, depth, pack) ;                                    
     }
-    // Try to deal somewhat correctly with potentially invalid values
-    rowLength   = Math.max(0, rowLength );
-    imageHeight = Math.max(1, imageHeight); // min 1D
-    depth       = Math.max(1, depth );      // min 1 * imageSize
-    alignment   = Math.max(1, alignment);
-
-    int rowLengthInBytes = rowLength * bytesPerElement;
-
-    if (alignment > 1) {
-        int padding = rowLengthInBytes % alignment;
-        if (padding > 0) {
-            rowLengthInBytes += alignment - padding;
-        }
-    }
-
-    /**
-     * depth is in multiples of image size.
-     *
-     * rowlenght is the actual repeating offset 
-     * to go from line n to line n+1 at the same x-axis position.
-     */
-    return 
-        ( depth       - 1 ) * imageHeight * rowLengthInBytes + // whole images
-        ( imageHeight - 1 ) * rowLengthInBytes +               // lines with padding
-        ( rowLength       ) * bytesPerElement;                 // last line
-}
 
diff --git a/make/config/jogl/gl-impl-CustomJavaCode-gl2_es2.java b/make/config/jogl/gl-impl-CustomJavaCode-gl2_es2.java
index d99f46e..b31a087 100644
--- a/make/config/jogl/gl-impl-CustomJavaCode-gl2_es2.java
+++ b/make/config/jogl/gl-impl-CustomJavaCode-gl2_es2.java
@@ -1,10 +1,10 @@
   public void glVertexAttribPointer(GLArrayData array) {
-    if(array.getComponentNumber()==0) return;
+    if(array.getComponentCount()==0) return;
     if(array.isVBO()) {
-        glVertexAttribPointer(array.getLocation(), array.getComponentNumber(), array.getComponentType(), 
-                              array.getNormalized(), array.getStride(), array.getOffset());
+        glVertexAttribPointer(array.getLocation(), array.getComponentCount(), array.getComponentType(), 
+                              array.getNormalized(), array.getStride(), array.getVBOOffset());
     } else {
-        glVertexAttribPointer(array.getLocation(), array.getComponentNumber(), array.getComponentType(), 
+        glVertexAttribPointer(array.getLocation(), array.getComponentCount(), array.getComponentType(), 
                               array.getNormalized(), array.getStride(), array.getBuffer());
     }
   }
diff --git a/make/config/jogl/gl-impl-CustomJavaCode-gl4bc.java b/make/config/jogl/gl-impl-CustomJavaCode-gl4bc.java
index 6776fee..d83ccd8 100644
--- a/make/config/jogl/gl-impl-CustomJavaCode-gl4bc.java
+++ b/make/config/jogl/gl-impl-CustomJavaCode-gl4bc.java
@@ -35,98 +35,6 @@ public java.nio.ByteBuffer glAllocateMemoryNV(int arg0, float arg1, float arg2,
 // Helpers for ensuring the correct amount of texture data
 //
 
-/** Returns the number of bytes required to fill in the appropriate
-    texture. This is computed as closely as possible based on the
-    pixel pack or unpack parameters. The logic in this routine is
-    based on code in the SGI OpenGL sample implementation. */
-
-private int imageSizeInBytes(int format, int type, int w, int h, int d,
-                             boolean pack) {
-  int elements = 0;
-  int esize = 0;
-  
-  if (w < 0) return 0;
-  if (h < 0) return 0;
-  if (d < 0) return 0;
-  switch (format) {
-  case GL_COLOR_INDEX:
-  case GL_STENCIL_INDEX:
-    elements = 1;
-    break;
-  case GL_RED:
-  case GL_GREEN:
-  case GL_BLUE:
-  case GL_ALPHA:
-  case GL_LUMINANCE:
-  case GL_DEPTH_COMPONENT:
-    elements = 1;
-    break;
-  case GL_LUMINANCE_ALPHA:
-    elements = 2;
-    break;
-  case GL_RGB:
-  case GL_BGR:
-    elements = 3;
-    break;
-  case GL_RGBA:
-  case GL_BGRA:
-  case GL_ABGR_EXT:
-    elements = 4;
-    break;
-  /* FIXME ?? 
-   case GL_HILO_NV:
-    elements = 2;
-    break; */
-  default:
-    return 0;
-  }
-  switch (type) {
-  case GL_BITMAP:
-    if (format == GL_COLOR_INDEX) {
-      return (d * (h * ((w+7)/8)));
-    } else {
-      return 0;
-    }
-  case GL_BYTE:
-  case GL_UNSIGNED_BYTE:
-    esize = 1;
-    break;
-  case GL_UNSIGNED_BYTE_3_3_2:
-  case GL_UNSIGNED_BYTE_2_3_3_REV:
-    esize = 1;
-    elements = 1;
-    break;
-  case GL_SHORT:
-  case GL_UNSIGNED_SHORT:
-    esize = 2;
-    break;
-  case GL_UNSIGNED_SHORT_5_6_5:
-  case GL_UNSIGNED_SHORT_5_6_5_REV:
-  case GL_UNSIGNED_SHORT_4_4_4_4:
-  case GL_UNSIGNED_SHORT_4_4_4_4_REV:
-  case GL_UNSIGNED_SHORT_5_5_5_1:
-  case GL_UNSIGNED_SHORT_1_5_5_5_REV:
-    esize = 2;
-    elements = 1;
-    break;
-  case GL_INT:
-  case GL_UNSIGNED_INT:
-  case GL_FLOAT:
-    esize = 4;
-    break;
-  case GL_UNSIGNED_INT_8_8_8_8:
-  case GL_UNSIGNED_INT_8_8_8_8_REV:
-  case GL_UNSIGNED_INT_10_10_10_2:
-  case GL_UNSIGNED_INT_2_10_10_10_REV:
-    esize = 4;
-    elements = 1;
-    break;
-  default:
-    return 0;
-  }
-  return imageSizeInBytes(elements * esize, w, h, d, pack);
-}
-
 private GLBufferSizeTracker  bufferSizeTracker;
 private GLBufferStateTracker bufferStateTracker;
 private GLStateTracker       glStateTracker;
@@ -356,39 +264,39 @@ private native long dispatch_glMapNamedBufferEXT(int buffer, int access, long pr
 native private ByteBuffer newDirectByteBuffer(long addr, long capacity);
 
     public void glVertexPointer(GLArrayData array) {
-      if(array.getComponentNumber()==0) return;
+      if(array.getComponentCount()==0) return;
       if(array.isVBO()) {
-          glVertexPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getOffset());
+          glVertexPointer(array.getComponentCount(), array.getComponentType(), array.getStride(), array.getVBOOffset());
       } else {
-          glVertexPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getBuffer());
+          glVertexPointer(array.getComponentCount(), array.getComponentType(), array.getStride(), array.getBuffer());
       }
     }
     public void glColorPointer(GLArrayData array) {
-      if(array.getComponentNumber()==0) return;
+      if(array.getComponentCount()==0) return;
       if(array.isVBO()) {
-          glColorPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getOffset());
+          glColorPointer(array.getComponentCount(), array.getComponentType(), array.getStride(), array.getVBOOffset());
       } else {
-          glColorPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getBuffer());
+          glColorPointer(array.getComponentCount(), array.getComponentType(), array.getStride(), array.getBuffer());
       }
 
     }
     public void glNormalPointer(GLArrayData array) {
-      if(array.getComponentNumber()==0) return;
-      if(array.getComponentNumber()!=3) {
+      if(array.getComponentCount()==0) return;
+      if(array.getComponentCount()!=3) {
         throw new GLException("Only 3 components per normal allowed");
       }
       if(array.isVBO()) {
-          glNormalPointer(array.getComponentType(), array.getStride(), array.getOffset());
+          glNormalPointer(array.getComponentType(), array.getStride(), array.getVBOOffset());
       } else {
           glNormalPointer(array.getComponentType(), array.getStride(), array.getBuffer());
       }
     }
     public void glTexCoordPointer(GLArrayData array) {
-      if(array.getComponentNumber()==0) return;
+      if(array.getComponentCount()==0) return;
       if(array.isVBO()) {
-          glTexCoordPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getOffset());
+          glTexCoordPointer(array.getComponentCount(), array.getComponentType(), array.getStride(), array.getVBOOffset());
       } else {
-          glTexCoordPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getBuffer());
+          glTexCoordPointer(array.getComponentCount(), array.getComponentType(), array.getStride(), array.getBuffer());
       }
     }
 
diff --git a/make/config/jogl/gl-impl-CustomJavaCode-gles1.java b/make/config/jogl/gl-impl-CustomJavaCode-gles1.java
index faff8b8..54bb37c 100644
--- a/make/config/jogl/gl-impl-CustomJavaCode-gles1.java
+++ b/make/config/jogl/gl-impl-CustomJavaCode-gles1.java
@@ -46,6 +46,10 @@ public final boolean isGL2ES2() {
     return false;
 }
 
+public final boolean isGLES2Compatible() {
+    return false;
+}
+
 public final boolean isGL2GL3() {
     return false;
 }
@@ -98,60 +102,6 @@ public final GL2GL3 getGL2GL3() throws GLException {
 // Helpers for ensuring the correct amount of texture data
 //
 
-/** Returns the number of bytes required to fill in the appropriate
-    texture. This is computed as closely as possible based on the
-    pixel pack or unpack parameters. The logic in this routine is
-    based on code in the SGI OpenGL sample implementation. */
-
-private int imageSizeInBytes(int format, int type, int w, int h, int d,
-                             boolean pack) {
-  int elements = 0;
-  int esize = 0;
-  
-  if (w < 0) return 0;
-  if (h < 0) return 0;
-  if (d < 0) return 0;
-  switch (format) {
-  case GL_ALPHA:
-  case GL_LUMINANCE:
-    elements = 1;
-    break;
-  case GL_LUMINANCE_ALPHA:
-    elements = 2;
-    break;
-  case GL_RGB:
-    elements = 3;
-    break;
-  case GL_RGBA:
-    elements = 4;
-    break;
-  default:
-    return 0;
-  }
-  switch (type) {
-  case GL_BYTE:
-  case GL_UNSIGNED_BYTE:
-    esize = 1;
-    break;
-  case GL_SHORT:
-  case GL_UNSIGNED_SHORT:
-    esize = 2;
-    break;
-  case GL_UNSIGNED_SHORT_5_6_5:
-  case GL_UNSIGNED_SHORT_4_4_4_4:
-  case GL_UNSIGNED_SHORT_5_5_5_1:
-    esize = 2;
-    elements = 1;
-    break;
-  case GL_FLOAT:
-    esize = 4;
-    break;
-  default:
-    return 0;
-  }
-  return imageSizeInBytes(elements * esize, w, h, d, pack);
-}
-
 private GLBufferSizeTracker  bufferSizeTracker;
 private GLBufferStateTracker bufferStateTracker;
 private GLStateTracker       glStateTracker;
@@ -293,39 +243,39 @@ native private long dispatch_glMapBuffer(int target, int access, long glProcAddr
 native private ByteBuffer newDirectByteBuffer(long addr, long capacity);
 
 public void glVertexPointer(GLArrayData array) {
-  if(array.getComponentNumber()==0) return;
+  if(array.getComponentCount()==0) return;
   if(array.isVBO()) {
-      glVertexPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getOffset());
+      glVertexPointer(array.getComponentCount(), array.getComponentType(), array.getStride(), array.getVBOOffset());
   } else {
-      glVertexPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getBuffer());
+      glVertexPointer(array.getComponentCount(), array.getComponentType(), array.getStride(), array.getBuffer());
   }
 }
 public void glColorPointer(GLArrayData array) {
-  if(array.getComponentNumber()==0) return;
+  if(array.getComponentCount()==0) return;
   if(array.isVBO()) {
-      glColorPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getOffset());
+      glColorPointer(array.getComponentCount(), array.getComponentType(), array.getStride(), array.getVBOOffset());
   } else {
-      glColorPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getBuffer());
+      glColorPointer(array.getComponentCount(), array.getComponentType(), array.getStride(), array.getBuffer());
   }
 
 }
 public void glNormalPointer(GLArrayData array) {
-  if(array.getComponentNumber()==0) return;
-  if(array.getComponentNumber()!=3) {
+  if(array.getComponentCount()==0) return;
+  if(array.getComponentCount()!=3) {
     throw new GLException("Only 3 components per normal allowed");
   }
   if(array.isVBO()) {
-      glNormalPointer(array.getComponentType(), array.getStride(), array.getOffset());
+      glNormalPointer(array.getComponentType(), array.getStride(), array.getVBOOffset());
   } else {
       glNormalPointer(array.getComponentType(), array.getStride(), array.getBuffer());
   }
 }
 public void glTexCoordPointer(GLArrayData array) {
-  if(array.getComponentNumber()==0) return;
+  if(array.getComponentCount()==0) return;
   if(array.isVBO()) {
-      glTexCoordPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getOffset());
+      glTexCoordPointer(array.getComponentCount(), array.getComponentType(), array.getStride(), array.getVBOOffset());
   } else {
-      glTexCoordPointer(array.getComponentNumber(), array.getComponentType(), array.getStride(), array.getBuffer());
+      glTexCoordPointer(array.getComponentCount(), array.getComponentType(), array.getStride(), array.getBuffer());
   }
 }
 
diff --git a/make/config/jogl/gl-impl-CustomJavaCode-gles2.java b/make/config/jogl/gl-impl-CustomJavaCode-gles2.java
index e096d21..b009d93 100644
--- a/make/config/jogl/gl-impl-CustomJavaCode-gles2.java
+++ b/make/config/jogl/gl-impl-CustomJavaCode-gles2.java
@@ -50,6 +50,10 @@ public final boolean isGL2ES2() {
     return true;
 }
 
+public final boolean isGLES2Compatible() {
+    return true;
+}
+
 public final boolean isGL2GL3() {
     return false;
 }
@@ -102,66 +106,6 @@ public final GL2GL3 getGL2GL3() throws GLException {
 // Helpers for ensuring the correct amount of texture data
 //
 
-/** Returns the number of bytes required to fill in the appropriate
-    texture. This is computed as closely as possible based on the
-    pixel pack or unpack parameters. The logic in this routine is
-    based on code in the SGI OpenGL sample implementation. */
-
-private int imageSizeInBytes(int format, int type, int w, int h, int d,
-                             boolean pack) {
-  int elements = 0;
-  int esize = 0;
-  
-  if (w < 0) return 0;
-  if (h < 0) return 0;
-  if (d < 0) return 0;
-  switch (format) {
-  case GL_STENCIL_INDEX:
-    elements = 1;
-    break;
-  case GL_ALPHA:
-  case GL_LUMINANCE:
-  case GL_DEPTH_COMPONENT:
-    elements = 1;
-    break;
-  case GL_LUMINANCE_ALPHA:
-    elements = 2;
-    break;
-  case GL_RGB:
-    elements = 3;
-    break;
-  case GL_RGBA:
-    elements = 4;
-    break;
-  default:
-    return 0;
-  }
-  switch (type) {
-  case GL_BYTE:
-  case GL_UNSIGNED_BYTE:
-    esize = 1;
-    break;
-  case GL_SHORT:
-  case GL_UNSIGNED_SHORT:
-    esize = 2;
-    break;
-  case GL_UNSIGNED_SHORT_5_6_5:
-  case GL_UNSIGNED_SHORT_4_4_4_4:
-  case GL_UNSIGNED_SHORT_5_5_5_1:
-    esize = 2;
-    elements = 1;
-    break;
-  case GL_INT:
-  case GL_UNSIGNED_INT:
-  case GL_FLOAT:
-    esize = 4;
-    break;
-  default:
-    return 0;
-  }
-  return imageSizeInBytes(elements * esize, w, h, d, pack);
-}
-
 private GLBufferSizeTracker  bufferSizeTracker;
 private GLBufferStateTracker bufferStateTracker;
 private GLStateTracker       glStateTracker;
diff --git a/make/config/jogl/gl2_es2-common.cfg b/make/config/jogl/gl2_es2-common.cfg
index 89f30a9..d26c76e 100644
--- a/make/config/jogl/gl2_es2-common.cfg
+++ b/make/config/jogl/gl2_es2-common.cfg
@@ -1,22 +1,22 @@
 
-JavaPrologue glReleaseShaderCompiler if ( !_context.hasNativeES2Methods() ) {
+JavaPrologue glReleaseShaderCompiler if ( !_context.isGLES2Compatible() ) {
 JavaPrologue glReleaseShaderCompiler    return;
 JavaPrologue glReleaseShaderCompiler }
 
-JavaPrologue glShaderBinary if ( !_context.hasNativeES2Methods() ) {
+JavaPrologue glShaderBinary if ( !_context.isGLES2Compatible() ) {
 JavaPrologue glShaderBinary     throw new GLException("Method \"glShaderBinary\" not available");
 JavaPrologue glShaderBinary }
 
-JavaPrologue glGetShaderPrecisionFormat if ( !_context.hasNativeES2Methods() ) {
+JavaPrologue glGetShaderPrecisionFormat if ( !_context.isGLES2Compatible() ) {
 JavaPrologue glGetShaderPrecisionFormat     throw new GLException("Method \"glGetShaderPrecisionFormat\" not available");
 JavaPrologue glGetShaderPrecisionFormat }
 
-JavaPrologue glDepthRangef if ( !_context.hasNativeES2Methods() ) {
+JavaPrologue glDepthRangef if ( !_context.isGLES2Compatible() ) {
 JavaPrologue glDepthRangef   glDepthRange( (double)zNear, (double)zFar );  
 JavaPrologue glDepthRangef   return;
 JavaPrologue glDepthRangef }
 
-JavaPrologue glClearDepthf if ( !_context.hasNativeES2Methods() ) {
+JavaPrologue glClearDepthf if ( !_context.isGLES2Compatible() ) {
 JavaPrologue glClearDepthf   glClearDepth( (double)depth );  
 JavaPrologue glClearDepthf   return;
 JavaPrologue glClearDepthf }
diff --git a/make/config/jogl/gl3-headers.cfg b/make/config/jogl/gl3-headers.cfg
index 8af9157..8b35a07 100644
--- a/make/config/jogl/gl3-headers.cfg
+++ b/make/config/jogl/gl3-headers.cfg
@@ -1,3 +1,4 @@
+CustomCCode #include <stdio.h> /* android */
 CustomCCode /* Define GL3_PROTOTYPES so that the OpenGL extension prototypes in
 CustomCCode    "gl3.h" are parsed. */
 CustomCCode #define GL3_PROTOTYPES
@@ -17,7 +18,7 @@ CustomCCode   #include </usr/include/machine/types.h>
 CustomCCode   /* Provide Windows typedefs */
 CustomCCode   typedef void* LPVOID;
 CustomCCode   typedef unsigned int* PUINT;
-CustomCCode #elif defined(linux) || defined(__sun) || defined(__FreeBSD__) || defined(_HPUX)
+CustomCCode #elif defined(__unix__)
 CustomCCode   #include <inttypes.h>
 CustomCCode   #include <stdlib.h>
 CustomCCode   #include <X11/Xlib.h>
diff --git a/make/config/jogl/gl3ext-headers.cfg b/make/config/jogl/gl3ext-headers.cfg
index dfc4ea7..5e2c7aa 100644
--- a/make/config/jogl/gl3ext-headers.cfg
+++ b/make/config/jogl/gl3ext-headers.cfg
@@ -1,3 +1,4 @@
+CustomCCode #include <stdio.h> /* android */
 CustomCCode /* Define GL_GL3EXT_PROTOTYPES so that the OpenGL extension prototypes in
 CustomCCode    "gl3ext.h" are parsed. */
 CustomCCode #define GL_GL3EXT_PROTOTYPES
diff --git a/make/config/jogl/glu-gl2.cfg b/make/config/jogl/glu-gl2.cfg
index 11eeb7c..9387b4c 100644
--- a/make/config/jogl/glu-gl2.cfg
+++ b/make/config/jogl/glu-gl2.cfg
@@ -8,6 +8,7 @@ ImplPackage javax.media.opengl.glu.gl2
 ImplJavaClass GLUgl2
 ParentClass GLUgl2 GLU
 
+CustomCCode #include <stdio.h> /* android */
 CustomCCode #if defined(WIN32)
 CustomCCode   #define WIN32_LEAN_AND_MEAN
 CustomCCode   #include <windows.h>
@@ -18,12 +19,10 @@ CustomCCode #elif defined(macosx)
 CustomCCode   #include <inttypes.h>
 CustomCCode   #include <jni.h>
 CustomCCode   #include </usr/include/machine/types.h>
-CustomCCode #elif defined(linux) || defined(__sun) || defined(__FreeBSD__) || defined(_HPUX)
+CustomCCode #elif defined(__unix__)
 CustomCCode   #include <inttypes.h>
 CustomCCode #endif
 
-Include ../intptr.cfg
-
 EmitProcAddressTable true
 ProcAddressTablePackage   jogamp.opengl.glu.gl2
 ProcAddressTableClassName GLUgl2ProcAddressTable
diff --git a/make/config/jogl/glxext.cfg b/make/config/jogl/glxext.cfg
index 82490a2..de23b9f 100644
--- a/make/config/jogl/glxext.cfg
+++ b/make/config/jogl/glxext.cfg
@@ -26,7 +26,6 @@ Import jogamp.nativewindow.x11.*
 IgnoreNot ^(glX|GLX).+
 
 Include gl-headers.cfg
-Include ../intptr.cfg
 
 CustomCCode /* Provide Windows typedefs */
 CustomCCode typedef void* LPVOID;
diff --git a/make/config/jogl/wgl-win32.cfg b/make/config/jogl/wgl-win32.cfg
index a868345..c7adffa 100644
--- a/make/config/jogl/wgl-win32.cfg
+++ b/make/config/jogl/wgl-win32.cfg
@@ -34,11 +34,10 @@ CustomCCode #define WIN32_LEAN_AND_MEAN
 CustomCCode #include <windows.h>
 CustomCCode #undef WIN32_LEAN_AND_MEAN
 
+CustomCCode #include <gluegen_stdint.h>
 CustomCCode #include <wingdi.h>
 CustomCCode #include <stddef.h>
 
-Include ../intptr.cfg
-
 DropUniqVendorExtensions AMD
 # We need GL_APPLE_float_pixels for our pbuffer implementation
 # DropUniqVendorExtensions APPLE
diff --git a/make/config/jogl/wglext.cfg b/make/config/jogl/wglext.cfg
index d37a861..15986b6 100644
--- a/make/config/jogl/wglext.cfg
+++ b/make/config/jogl/wglext.cfg
@@ -25,7 +25,6 @@ Ignore GL_.+
 Ignore gl.+
 
 Include gl-headers.cfg
-Include ../intptr.cfg
 
 # FIXME: for the time being, ignore all extensions requiring the
 # presence of java.nio.LongBuffer because it doesn't exist on CDC/FP +
diff --git a/make/config/nativewindow/jawt-win32.cfg b/make/config/nativewindow/jawt-win32.cfg
index d1fa702..5b571f7 100644
--- a/make/config/nativewindow/jawt-win32.cfg
+++ b/make/config/nativewindow/jawt-win32.cfg
@@ -8,7 +8,8 @@ Opaque long HDC
 IgnoreField JAWT_Win32DrawingSurfaceInfo null
 IgnoreField JAWT_Win32DrawingSurfaceInfo hpalette
 
-Include ../intptr.cfg
+CustomCCode #include <gluegen_stdint.h>
+CustomCCode #include <gluegen_stddef.h>
 
 StructPackage JAWT_Win32DrawingSurfaceInfo jogamp.nativewindow.jawt.windows
 EmitStruct JAWT_Win32DrawingSurfaceInfo
diff --git a/make/config/nativewindow/jawt-x11.cfg b/make/config/nativewindow/jawt-x11.cfg
index ac9d1aa..05db2aa 100644
--- a/make/config/nativewindow/jawt-x11.cfg
+++ b/make/config/nativewindow/jawt-x11.cfg
@@ -8,7 +8,8 @@ Opaque long Display *
 
 IgnoreField JAWT_X11DrawingSurfaceInfo GetAWTColor
 
-CustomCCode #include <inttypes.h>
+CustomCCode #include <gluegen_stdint.h>
+CustomCCode #include <gluegen_stddef.h>
 
 StructPackage JAWT_X11DrawingSurfaceInfo jogamp.nativewindow.jawt.x11
 EmitStruct JAWT_X11DrawingSurfaceInfo
diff --git a/make/config/nativewindow/win32-CustomJavaCode.java b/make/config/nativewindow/win32-CustomJavaCode.java
index 5d0c829..e14e4d1 100644
--- a/make/config/nativewindow/win32-CustomJavaCode.java
+++ b/make/config/nativewindow/win32-CustomJavaCode.java
@@ -25,6 +25,8 @@
     }
   }
 
+  public static boolean requiresToolkitLock() { return false; }
+
   private static RegisteredClass dummyWindowClass = null;
   private static Object dummyWindowSync = new Object();
 
diff --git a/make/config/nativewindow/win32-lib.cfg b/make/config/nativewindow/win32-lib.cfg
index 8942111..b8ff424 100644
--- a/make/config/nativewindow/win32-lib.cfg
+++ b/make/config/nativewindow/win32-lib.cfg
@@ -8,6 +8,7 @@ JavaClass GDI
 Style AllStatic
 
 Opaque boolean BOOL
+Opaque int HRESULT
 Opaque long HANDLE
 Opaque long PROC
 Opaque long HINSTANCE
@@ -16,6 +17,7 @@ Opaque long HBITMAP
 Opaque long HDC
 Opaque long HGDIOBJ
 Opaque long HGLRC
+Opaque long HRGN
 Opaque long HPBUFFERARB
 Opaque long HPBUFFEREXT
 Opaque long void **
@@ -29,10 +31,10 @@ CustomCCode #define WIN32_LEAN_AND_MEAN
 CustomCCode #include <windows.h>
 CustomCCode #undef WIN32_LEAN_AND_MEAN
 
+CustomCCode #include <gluegen_stdint.h>
+CustomCCode #include <gluegen_stddef.h>
 CustomCCode #include <wingdi.h>
-CustomCCode #include <stddef.h>
-
-Include ../intptr.cfg
+CustomCCode #include "WindowsDWM.h"
 
 CustomCCode extern HINSTANCE   GetApplicationHandle();
 
diff --git a/make/config/nativewindow/x11-lib.cfg b/make/config/nativewindow/x11-lib.cfg
index 8848980..2fe45cf 100644
--- a/make/config/nativewindow/x11-lib.cfg
+++ b/make/config/nativewindow/x11-lib.cfg
@@ -20,11 +20,13 @@ Opaque long XID
 Opaque long Display *
 Opaque boolean Bool
 Opaque long GLXFBConfig
+Opaque long Visual *
 
 IncludeAs CustomJavaCode X11Lib x11-CustomJavaCode.java
 
 ArgumentIsString XOpenDisplay 0
 ReturnsString XDisplayString
+ReturnValueCapacity XRenderFindVisualFormat sizeof(XRenderPictFormat)
 
 # We have Custom code for the following
 Ignore XGetVisualInfo
@@ -39,7 +41,9 @@ CustomJavaCode X11Lib private static int getFirstElement(int[] arr, int offset)
 
 CustomJavaCode XVisualInfo public static XVisualInfo create(XVisualInfo s) { XVisualInfo d = XVisualInfo.create(); d.getBuffer().put(s.getBuffer()); d.getBuffer().rewind(); s.getBuffer().rewind(); return d; }
 
-CustomCCode #include <inttypes.h>
+CustomCCode #include <gluegen_stdint.h>
+CustomCCode #include <gluegen_stddef.h>
 CustomCCode #include <X11/Xlib.h>
 CustomCCode #include <X11/Xutil.h>
+CustomCCode #include <X11/extensions/Xrender.h>
 
diff --git a/make/joglversion b/make/joglversion
index c7d7f48..bf0220f 100644
--- a/make/joglversion
+++ b/make/joglversion
@@ -1,3 +1,4 @@
+Manifest-Version: 1.0
 Specification-Title: Java Bindings for OpenGL API Specification
 Specification-Version: @BASEVERSION@
 Specification-Vendor: JogAmp Community
diff --git a/make/lib/gluegen.compiler.intelgdl.xml b/make/lib/gluegen.compiler.intelgdl.xml
deleted file mode 100644
index 9691a39..0000000
--- a/make/lib/gluegen.compiler.intelgdl.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-    This is an example of how to add custom compiler/linker arguments
-    for a crosscompiler and a custom NEWT windowing implementation.
-
-    You can use such files with setting the property 'gluegen-cpptasks.file', ie:
-
-        -Dgluegen-cpptasks.file=`pwd`/lib/gluegen.compiler.intelgdl.xml
-
-  -->
-      
-<project name="GlueGen-cpptasks" basedir=".">
-
-    <import file="../gluegen-cpptasks-base.xml" optional="false" />
-
-    <target name="gluegen.cpptasks.configure.compiler" depends="setup.java.home.dir">
-        <echo message="Custom forced linker.cfg.linux, linker.cfg.linux.amd64" />
-        <linker id="linker.cfg.linux" name="gcc">
-            <linkerarg value="-m32" />
-            <linkerarg value="-L/usr/lib" />
-            <linkerarg value="-L../../import/crossroots.intel-ce3100-x86-libs-1.0/nfsroot.intel-ce3110-x86-glibc/i686-linux-elf/lib" />
-            <syslibset dir="../../import/crossroots.intel-ce3100-x86-libs-1.0/nfsroot.intel-ce3110-x86-glibc/i686-linux-elf/lib" libs="gdl"/>
-            <syslibset dir="../../import/crossroots.intel-ce3100-x86-libs-1.0/nfsroot.intel-ce3110-x86-glibc/i686-linux-elf/lib" libs="srv_um"/>
-            <syslibset dir="../../import/crossroots.intel-ce3100-x86-libs-1.0/nfsroot.intel-ce3110-x86-glibc/i686-linux-elf/lib" libs="osal"/>
-            <syslibset dir="../../import/crossroots.intel-ce3100-x86-libs-1.0/nfsroot.intel-ce3110-x86-glibc/i686-linux-elf/lib" libs="GLESv2"/>
-            <syslibset dir="../../import/crossroots.intel-ce3100-x86-libs-1.0/nfsroot.intel-ce3110-x86-glibc/i686-linux-elf/lib" libs="IMGegl"/>
-            <syslibset dir="../../import/crossroots.intel-ce3100-x86-libs-1.0/nfsroot.intel-ce3110-x86-glibc/i686-linux-elf/lib" libs="EGL"/>
-            <syslibset dir="../../import/crossroots.intel-ce3100-x86-libs-1.0/nfsroot.intel-ce3110-x86-glibc/i686-linux-elf/lib" libs="GLES_CM"/>
-        </linker>
-        <linker id="linker.cfg.linux.amd64" name="gcc">
-            <linkerarg value="-L/usr/lib64" />
-            <linkerarg value="-L../../import/crossroots.intel-ce3100-x86-libs-1.0/nfsroot.intel-ce3110-x86-glibc/i686-linux-elf/lib" />
-            <syslibset dir="../../import/crossroots.intel-ce3100-x86-libs-1.0/nfsroot.intel-ce3110-x86-glibc/i686-linux-elf/lib" libs="gdl"/>
-            <syslibset dir="../../import/crossroots.intel-ce3100-x86-libs-1.0/nfsroot.intel-ce3110-x86-glibc/i686-linux-elf/lib" libs="srv_um"/>
-            <syslibset dir="../../import/crossroots.intel-ce3100-x86-libs-1.0/nfsroot.intel-ce3110-x86-glibc/i686-linux-elf/lib" libs="osal"/>
-            <syslibset dir="../../import/crossroots.intel-ce3100-x86-libs-1.0/nfsroot.intel-ce3110-x86-glibc/i686-linux-elf/lib" libs="GLESv2"/>
-            <syslibset dir="../../import/crossroots.intel-ce3100-x86-libs-1.0/nfsroot.intel-ce3110-x86-glibc/i686-linux-elf/lib" libs="IMGegl"/>
-            <syslibset dir="../../import/crossroots.intel-ce3100-x86-libs-1.0/nfsroot.intel-ce3110-x86-glibc/i686-linux-elf/lib" libs="EGL"/>
-            <syslibset dir="../../import/crossroots.intel-ce3100-x86-libs-1.0/nfsroot.intel-ce3110-x86-glibc/i686-linux-elf/lib" libs="GLES_CM"/>
-        </linker>
-    </target>
-</project>
diff --git a/make/lib/swt/LICENSE.txt b/make/lib/swt/LICENSE.txt
deleted file mode 100644
index 671ea7c..0000000
--- a/make/lib/swt/LICENSE.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-Project Website incl source code: http://wiki.eclipse.org/SWT
-
-License
-
-The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available at http://www.eclipse.org/legal/epl-v10.html. For purposes of the EPL, "Program" will mean the Content.
-
-http://www.eclipse.org/legal/epl/notice.html (local copy: ./notice.html)
-http://www.eclipse.org/legal/epl-v10.html    (local copy: ./epl-v10.html)
-
-Each subdirectory contains the proper license documents:
-    cocoa-macosx/about.html
-    cocoa-macosx-x86_64/about.html
-    gtk-linux-x86/about.html
-    gtk-linux-x86_64/about.html
-    win32-win32-x86/about.html
-    win32-win32-x86_64/about.html
diff --git a/make/lib/swt/README.txt b/make/lib/swt/README.txt
deleted file mode 100644
index 214cec5..0000000
--- a/make/lib/swt/README.txt
+++ /dev/null
@@ -1 +0,0 @@
-version 3.6.1
diff --git a/make/lib/swt/cocoa-macosx-x86_64/about.html b/make/lib/swt/cocoa-macosx-x86_64/about.html
deleted file mode 100644
index e8d3f42..0000000
--- a/make/lib/swt/cocoa-macosx-x86_64/about.html
+++ /dev/null
@@ -1,205 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
- 
-<p>August 17, 2006</p>	
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in ("Content").  Unless otherwise 
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 ("EPL").  A copy of the EPL is available 
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, "Program" will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is 
-being redistributed by another party ("Redistributor") and different terms and conditions may
-apply to your use of any object code in the Content.  Check the Redistributor's license that was 
-provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-<h3>Third Party Content</h3>
-
-<p>The Content includes items that have been sourced from third parties as set out below. If you 
-did not receive this Content directly from the Eclipse Foundation, the following is provided 
-for informational purposes only, and you should look to the Redistributor’s license for 
-terms and conditions of use.</p>
-
-<h4>Carbon Binding</h4>
-
-<p>The "Carbon Binding" is a binding to the Carbon API.  The Content may include any or all of three portions of the Carbon Binding:</p>
-
-<p>The following files in the plug-in JAR shall be defined as the native code portion of the Carbon Binding:</p>
-<ul>
-	<li>libswt-pi-carbon-xxxx.jnilib (where "xxxx" is the version number)</li>	
-</ul>
-
-<p>The following files in both the plug-in JAR and the src.zip shall be defined respectively as the bytecode and source code portions of the Carbon Binding:</p>
-
-<ul>
-	<li>The contents of the directory org/eclipse/swt/internal/carbon (but not including any sub-directories)</li>
-</ul>
-
-<p>The Carbon Binding contains portions of Apple Computer's Carbon API header files which are:</p>
-
-<blockquote>Copyright © 1983-2002 Apple Computer, Inc.</blockquote>
-
-<p>In addition to the terms and conditions of the EPL, the following notice applies to your use of the Carbon Binding and must be retained and reproduced in its entirety with all redistributions of the
-Carbon Binding:</p>
-
-<blockquote>
-Copyright © 2004 Apple Computer, Inc.<br>
-This text and the following notice must be retained and reproduced in their entirety with all redistributions of this project:<br><br>
-<strong>IMPORTANT NOTICE</strong>: This project, which consists of certain Java bindings, includes or otherwise makes references to application programming interfaces
-(APIs) that are owned by Apple Computer, Inc., including but not limited to certain Apple Carbon APIs. While you may use, copy, modify and redistribute
-this Java bindings project in accordance with the terms of the Eclipse Public License (EPL) version 1.0, you are not granted any rights under any Apple or
-third party intellectual property rights (including without limitation, patent, copyright, trademark and trade secret rights) to Apple's Carbon API header files
-themselves, nor to any underlying implementations of any Apple Carbon APIs or to any functionality that is invoked by calling any of those APIs. Without
-limiting the generality of the foregoing, you understand that it is not Apple's intention by way of this project to authorize the reverse engineering of the Java
-bindings into Apple's original Carbon.h header files.
-</blockquote>
-
-<h4>Mozilla Binding</h4>
-
-<p>The "Mozilla Binding" is a binding to the Mozilla API.  The Content may include any or all of the following files:</p>
-
-<p>The following files in the plug-in JAR shall be defined as the native code portion of the Mozilla Binding:</p>
-<ul>
-	<li>libswt-xulrunner-carbon-xxxx.so (where "xxxx" is the version number)</li>
-	<li>libswt-xpcominit-carbon-xxxx.so (where "xxxx" is the version number)</li>
-</ul>
-
-<p>The following files in both the plug-in JAR and the src.zip shall be defined respectively as the bytecode and source code portions of the Mozilla Binding:</p>
-<ul>
-	<li>The contents of the directory org/eclipse/swt/internal/mozilla (but not including any sub-directories)</li>
-</ul>
-
-<p>The Mozilla Binding contains portions of Mozilla ("Mozilla").  Mozilla is made available by Mozilla.org.  Use of Mozilla is governed by the terms and
-conditions of the Mozilla Public License Version 1.1 ("MPL").  A copy of the MPL is provided with the Content (<a href="about_files/mpl-v11.txt" target="_blank">mpl-v11.txt</a>) and is also available at
-<a href="http://www.mozilla.org/MPL/MPL-1.1.html" target="_blank">http://www.mozilla.org/MPL/MPL-1.1.html</a>.</p>
-
-<h4>Independent JPEG Group's JPEG software release 6b</h4>
-
-<p>This software is based in part on the work of the Independent JPEG Group's JPEG software release 6b ("LIBJPEG").
-LIBJPEG was used to implement the decoding of JPEG format files in Java (TM).  The Content does NOT include any portion of the LIBJPEG file ansi2knr.c.</p>
-
-<p>Your use of LIBJPEG is subject to the terms and conditions located in the <a href="about_files/IJG_README">about_files/IJG_README</a> file which is included
-with the Content.</p>
-
-<p>The IJG's website is located at <a href="http://ijg.org/" target="_blank">http://ijg.org</a>.</p>
-
-<p>The class org.eclipse.swt.internal.image.JPEGFileFormat is based on following files from LIBJPEG:</p>
-
-<ul>
-    <li>cderror.h</li>
-    <li>cdjpeg.h</li>
-    <li>jchuff.h</li>
-    <li>jdcolor.c</li>
-    <li>jdct.h</li>
-    <li>jdhuff.h</li>
-    <li>jerror.h</li>
-    <li>jidctint.c</li>
-    <li>jinclude.h</li>
-    <li>jmemsys.h</li>
-    <li>jmorecfg.h</li>
-    <li>jpegint.h</li>
-    <li>jpeglib.h</li>
-    <li>jversion.h</li>
-    <li>transupp.h</li>
-</ul>
-
-<p>The class org.eclipse.swt.internal.image.JPEGDecoder is based on the following files from LIBJPEG:</p>
-
-<ul>
-	<li>jcapimin.c</li>
-	<li>jcapistd.c</li>
-	<li>jccoefct.c</li>
-	<li>jccolor.c</li>
-	<li>jcdctmgr.c</li>
-	<li>jchuff.c</li>
-	<li>jcinit.c</li>
-	<li>jcmainct.c</li>
-	<li>jcmarker.c</li>
-	<li>jcmaster.c</li>
-	<li>jcomapi.c</li>
-	<li>jcparam.c</li>
-	<li>jcphuff.c</li>
-	<li>jcprepct.c</li>
-	<li>jcsample.c</li>
-	<li>jctrans.c</li>
-	<li>jdapimin.c</li>
-	<li>jdapistd.c</li>
-	<li>jdatadst.c</li>
-	<li>jdatasrc.c</li>
-	<li>jdcoefct.c</li>
-	<li>jdcolor.c</li>
-	<li>jddctmgr.c</li>
-	<li>jdhuff.c</li>
-	<li>jdinput.c</li>
-	<li>jdmainct.c</li>
-	<li>jdmarker.c</li>
-	<li>jdmaster.c</li>
-	<li>jdmerge.c</li>
-	<li>jdphuff.c</li>
-	<li>jdpostct.c</li>
-	<li>jdsample.c</li>
-	<li>jdtrans.c</li>
-	<li>jerror.c</li>
-	<li>jfdctflt.c</li>
-	<li>jfdctfst.c</li>
-	<li>jfdctint.c</li>
-	<li>jidctflt.c</li>
-	<li>jidctfst.c</li>
-	<li>jidctint.c</li>
-	<li>jidctred.c</li>
-	<li>jpegtran.c</li>
-	<li>jquant1.c</li>
-	<li>jquant2.c</li>
-	<li>jutils.c</li>
-	<li>cderror.h</li>
-	<li>cdjpeg.h</li>
-	<li>jchuff.h</li>
-	<li>jconfig.h</li>
-	<li>jdct.h</li>
-	<li>jdhuff.h</li>
-	<li>jerror.h</li>
-	<li>jinclude.h</li>
-	<li>jmorecfg.h</li>
-	<li>jpegint.h</li>
-	<li>jpeglib.h</li>
-	<li>jversion.h</li>
-	<li>transupp.h</li>
-</ul>
-	
-<p>The following changes were made to the LIBJPEG code in the Content:</p>
-
-<ol>
-	<li>In Java, pointer math is not allowed so indexing was used instead.</li>
-	<li>Function pointers were replaced with switch statements.</li>
-	<li>The virtual memory, tracing and progress monitoring were removed.</li>
-	<li>The error handling was simplified and now uses Java exceptions.</li>
-</ol>
-
-<h4>PuTTY 0.58 (derivative work)</h4>
-
-<p>Portions of the SWT class org/eclipse/swt/internal/image/PngDeflater are based on PuTTY's sshzlib.c. PuTTY is made available by Mozilla.org.  Use of PuTTY is governed by the terms and
-conditions of the the following MIT-style license:  </p>
-<blockquote>
-  <p><em>PuTTY is copyright 1997-2007 Simon Tatham.</em> </p>
-  <p><em>Portions copyright Robert de Bath, Joris van Rantwijk, Delian  Delchev, Andreas Schultz, Jeroen Massar, Wez Furlong, Nicolas Barry,  Justin Bradford, Ben Harris, Malcolm Smith, Ahmad Khalifa, Markus Kuhn,  and CORE SDI S.A.</em> </p>
-  <p><em>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:</em> </p>
-  <p><em>The above copyright notice and this permission notice shall be  included in all copies or substantial portions of the Software.</em> </p>
-  <p><em>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 SIMON TATHAM 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.</em> </p>
-</blockquote>
-<p>A copy of the license is also available at <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/licence.html" target="_blank">http://www.chiark.greenend.org.uk/~sgtatham/putty/licence.html</a>.</p>
-
-<p><small>Java and all Java-based trademarks and logos are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries.</small></p>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/make/lib/swt/cocoa-macosx-x86_64/about_files/IJG_README b/make/lib/swt/cocoa-macosx-x86_64/about_files/IJG_README
deleted file mode 100644
index 86cc206..0000000
--- a/make/lib/swt/cocoa-macosx-x86_64/about_files/IJG_README
+++ /dev/null
@@ -1,385 +0,0 @@
-The Independent JPEG Group's JPEG software
-==========================================
-
-README for release 6b of 27-Mar-1998
-====================================
-
-This distribution contains the sixth public release of the Independent JPEG
-Group's free JPEG software.  You are welcome to redistribute this software and
-to use it for any purpose, subject to the conditions under LEGAL ISSUES, below.
-
-Serious users of this software (particularly those incorporating it into
-larger programs) should contact IJG at jpeg-info at uunet.uu.net to be added to
-our electronic mailing list.  Mailing list members are notified of updates
-and have a chance to participate in technical discussions, etc.
-
-This software is the work of Tom Lane, Philip Gladstone, Jim Boucher,
-Lee Crocker, Julian Minguillon, Luis Ortiz, George Phillips, Davide Rossi,
-Guido Vollbeding, Ge' Weijers, and other members of the Independent JPEG
-Group.
-
-IJG is not affiliated with the official ISO JPEG standards committee.
-
-
-DOCUMENTATION ROADMAP
-=====================
-
-This file contains the following sections:
-
-OVERVIEW            General description of JPEG and the IJG software.
-LEGAL ISSUES        Copyright, lack of warranty, terms of distribution.
-REFERENCES          Where to learn more about JPEG.
-ARCHIVE LOCATIONS   Where to find newer versions of this software.
-RELATED SOFTWARE    Other stuff you should get.
-FILE FORMAT WARS    Software *not* to get.
-TO DO               Plans for future IJG releases.
-
-Other documentation files in the distribution are:
-
-User documentation:
-  install.doc       How to configure and install the IJG software.
-  usage.doc         Usage instructions for cjpeg, djpeg, jpegtran,
-                    rdjpgcom, and wrjpgcom.
-  *.1               Unix-style man pages for programs (same info as usage.doc).
-  wizard.doc        Advanced usage instructions for JPEG wizards only.
-  change.log        Version-to-version change highlights.
-Programmer and internal documentation:
-  libjpeg.doc       How to use the JPEG library in your own programs.
-  example.c         Sample code for calling the JPEG library.
-  structure.doc     Overview of the JPEG library's internal structure.
-  filelist.doc      Road map of IJG files.
-  coderules.doc     Coding style rules --- please read if you contribute code.
-
-Please read at least the files install.doc and usage.doc.  Useful information
-can also be found in the JPEG FAQ (Frequently Asked Questions) article.  See
-ARCHIVE LOCATIONS below to find out where to obtain the FAQ article.
-
-If you want to understand how the JPEG code works, we suggest reading one or
-more of the REFERENCES, then looking at the documentation files (in roughly
-the order listed) before diving into the code.
-
-
-OVERVIEW
-========
-
-This package contains C software to implement JPEG image compression and
-decompression.  JPEG (pronounced "jay-peg") is a standardized compression
-method for full-color and gray-scale images.  JPEG is intended for compressing
-"real-world" scenes; line drawings, cartoons and other non-realistic images
-are not its strong suit.  JPEG is lossy, meaning that the output image is not
-exactly identical to the input image.  Hence you must not use JPEG if you
-have to have identical output bits.  However, on typical photographic images,
-very good compression levels can be obtained with no visible change, and
-remarkably high compression levels are possible if you can tolerate a
-low-quality image.  For more details, see the references, or just experiment
-with various compression settings.
-
-This software implements JPEG baseline, extended-sequential, and progressive
-compression processes.  Provision is made for supporting all variants of these
-processes, although some uncommon parameter settings aren't implemented yet.
-For legal reasons, we are not distributing code for the arithmetic-coding
-variants of JPEG; see LEGAL ISSUES.  We have made no provision for supporting
-the hierarchical or lossless processes defined in the standard.
-
-We provide a set of library routines for reading and writing JPEG image files,
-plus two sample applications "cjpeg" and "djpeg", which use the library to
-perform conversion between JPEG and some other popular image file formats.
-The library is intended to be reused in other applications.
-
-In order to support file conversion and viewing software, we have included
-considerable functionality beyond the bare JPEG coding/decoding capability;
-for example, the color quantization modules are not strictly part of JPEG
-decoding, but they are essential for output to colormapped file formats or
-colormapped displays.  These extra functions can be compiled out of the
-library if not required for a particular application.  We have also included
-"jpegtran", a utility for lossless transcoding between different JPEG
-processes, and "rdjpgcom" and "wrjpgcom", two simple applications for
-inserting and extracting textual comments in JFIF files.
-
-The emphasis in designing this software has been on achieving portability and
-flexibility, while also making it fast enough to be useful.  In particular,
-the software is not intended to be read as a tutorial on JPEG.  (See the
-REFERENCES section for introductory material.)  Rather, it is intended to
-be reliable, portable, industrial-strength code.  We do not claim to have
-achieved that goal in every aspect of the software, but we strive for it.
-
-We welcome the use of this software as a component of commercial products.
-No royalty is required, but we do ask for an acknowledgement in product
-documentation, as described under LEGAL ISSUES.
-
-
-LEGAL ISSUES
-============
-
-In plain English:
-
-1. We don't promise that this software works.  (But if you find any bugs,
-   please let us know!)
-2. You can use this software for whatever you want.  You don't have to pay us.
-3. You may not pretend that you wrote this software.  If you use it in a
-   program, you must acknowledge somewhere in your documentation that
-   you've used the IJG code.
-
-In legalese:
-
-The authors make NO WARRANTY or representation, either express or implied,
-with respect to this software, its quality, accuracy, merchantability, or
-fitness for a particular purpose.  This software is provided "AS IS", and you,
-its user, assume the entire risk as to its quality and accuracy.
-
-This software is copyright (C) 1991-1998, Thomas G. Lane.
-All Rights Reserved except as specified below.
-
-Permission is hereby granted to use, copy, modify, and distribute this
-software (or portions thereof) for any purpose, without fee, subject to these
-conditions:
-(1) If any part of the source code for this software is distributed, then this
-README file must be included, with this copyright and no-warranty notice
-unaltered; and any additions, deletions, or changes to the original files
-must be clearly indicated in accompanying documentation.
-(2) If only executable code is distributed, then the accompanying
-documentation must state that "this software is based in part on the work of
-the Independent JPEG Group".
-(3) Permission for use of this software is granted only if the user accepts
-full responsibility for any undesirable consequences; the authors accept
-NO LIABILITY for damages of any kind.
-
-These conditions apply to any software derived from or based on the IJG code,
-not just to the unmodified library.  If you use our work, you ought to
-acknowledge us.
-
-Permission is NOT granted for the use of any IJG author's name or company name
-in advertising or publicity relating to this software or products derived from
-it.  This software may be referred to only as "the Independent JPEG Group's
-software".
-
-We specifically permit and encourage the use of this software as the basis of
-commercial products, provided that all warranty or liability claims are
-assumed by the product vendor.
-
-
-ansi2knr.c is included in this distribution by permission of L. Peter Deutsch,
-sole proprietor of its copyright holder, Aladdin Enterprises of Menlo Park, CA.
-ansi2knr.c is NOT covered by the above copyright and conditions, but instead
-by the usual distribution terms of the Free Software Foundation; principally,
-that you must include source code if you redistribute it.  (See the file
-ansi2knr.c for full details.)  However, since ansi2knr.c is not needed as part
-of any program generated from the IJG code, this does not limit you more than
-the foregoing paragraphs do.
-
-The Unix configuration script "configure" was produced with GNU Autoconf.
-It is copyright by the Free Software Foundation but is freely distributable.
-The same holds for its supporting scripts (config.guess, config.sub,
-ltconfig, ltmain.sh).  Another support script, install-sh, is copyright
-by M.I.T. but is also freely distributable.
-
-It appears that the arithmetic coding option of the JPEG spec is covered by
-patents owned by IBM, AT&T, and Mitsubishi.  Hence arithmetic coding cannot
-legally be used without obtaining one or more licenses.  For this reason,
-support for arithmetic coding has been removed from the free JPEG software.
-(Since arithmetic coding provides only a marginal gain over the unpatented
-Huffman mode, it is unlikely that very many implementations will support it.)
-So far as we are aware, there are no patent restrictions on the remaining
-code.
-
-The IJG distribution formerly included code to read and write GIF files.
-To avoid entanglement with the Unisys LZW patent, GIF reading support has
-been removed altogether, and the GIF writer has been simplified to produce
-"uncompressed GIFs".  This technique does not use the LZW algorithm; the
-resulting GIF files are larger than usual, but are readable by all standard
-GIF decoders.
-
-We are required to state that
-    "The Graphics Interchange Format(c) is the Copyright property of
-    CompuServe Incorporated.  GIF(sm) is a Service Mark property of
-    CompuServe Incorporated."
-
-
-REFERENCES
-==========
-
-We highly recommend reading one or more of these references before trying to
-understand the innards of the JPEG software.
-
-The best short technical introduction to the JPEG compression algorithm is
-	Wallace, Gregory K.  "The JPEG Still Picture Compression Standard",
-	Communications of the ACM, April 1991 (vol. 34 no. 4), pp. 30-44.
-(Adjacent articles in that issue discuss MPEG motion picture compression,
-applications of JPEG, and related topics.)  If you don't have the CACM issue
-handy, a PostScript file containing a revised version of Wallace's article is
-available at ftp://ftp.uu.net/graphics/jpeg/wallace.ps.gz.  The file (actually
-a preprint for an article that appeared in IEEE Trans. Consumer Electronics)
-omits the sample images that appeared in CACM, but it includes corrections
-and some added material.  Note: the Wallace article is copyright ACM and IEEE,
-and it may not be used for commercial purposes.
-
-A somewhat less technical, more leisurely introduction to JPEG can be found in
-"The Data Compression Book" by Mark Nelson and Jean-loup Gailly, published by
-M&T Books (New York), 2nd ed. 1996, ISBN 1-55851-434-1.  This book provides
-good explanations and example C code for a multitude of compression methods
-including JPEG.  It is an excellent source if you are comfortable reading C
-code but don't know much about data compression in general.  The book's JPEG
-sample code is far from industrial-strength, but when you are ready to look
-at a full implementation, you've got one here...
-
-The best full description of JPEG is the textbook "JPEG Still Image Data
-Compression Standard" by William B. Pennebaker and Joan L. Mitchell, published
-by Van Nostrand Reinhold, 1993, ISBN 0-442-01272-1.  Price US$59.95, 638 pp.
-The book includes the complete text of the ISO JPEG standards (DIS 10918-1
-and draft DIS 10918-2).  This is by far the most complete exposition of JPEG
-in existence, and we highly recommend it.
-
-The JPEG standard itself is not available electronically; you must order a
-paper copy through ISO or ITU.  (Unless you feel a need to own a certified
-official copy, we recommend buying the Pennebaker and Mitchell book instead;
-it's much cheaper and includes a great deal of useful explanatory material.)
-In the USA, copies of the standard may be ordered from ANSI Sales at (212)
-642-4900, or from Global Engineering Documents at (800) 854-7179.  (ANSI
-doesn't take credit card orders, but Global does.)  It's not cheap: as of
-1992, ANSI was charging $95 for Part 1 and $47 for Part 2, plus 7%
-shipping/handling.  The standard is divided into two parts, Part 1 being the
-actual specification, while Part 2 covers compliance testing methods.  Part 1
-is titled "Digital Compression and Coding of Continuous-tone Still Images,
-Part 1: Requirements and guidelines" and has document numbers ISO/IEC IS
-10918-1, ITU-T T.81.  Part 2 is titled "Digital Compression and Coding of
-Continuous-tone Still Images, Part 2: Compliance testing" and has document
-numbers ISO/IEC IS 10918-2, ITU-T T.83.
-
-Some extensions to the original JPEG standard are defined in JPEG Part 3,
-a newer ISO standard numbered ISO/IEC IS 10918-3 and ITU-T T.84.  IJG
-currently does not support any Part 3 extensions.
-
-The JPEG standard does not specify all details of an interchangeable file
-format.  For the omitted details we follow the "JFIF" conventions, revision
-1.02.  A copy of the JFIF spec is available from:
-	Literature Department
-	C-Cube Microsystems, Inc.
-	1778 McCarthy Blvd.
-	Milpitas, CA 95035
-	phone (408) 944-6300,  fax (408) 944-6314
-A PostScript version of this document is available by FTP at
-ftp://ftp.uu.net/graphics/jpeg/jfif.ps.gz.  There is also a plain text
-version at ftp://ftp.uu.net/graphics/jpeg/jfif.txt.gz, but it is missing
-the figures.
-
-The TIFF 6.0 file format specification can be obtained by FTP from
-ftp://ftp.sgi.com/graphics/tiff/TIFF6.ps.gz.  The JPEG incorporation scheme
-found in the TIFF 6.0 spec of 3-June-92 has a number of serious problems.
-IJG does not recommend use of the TIFF 6.0 design (TIFF Compression tag 6).
-Instead, we recommend the JPEG design proposed by TIFF Technical Note #2
-(Compression tag 7).  Copies of this Note can be obtained from ftp.sgi.com or
-from ftp://ftp.uu.net/graphics/jpeg/.  It is expected that the next revision
-of the TIFF spec will replace the 6.0 JPEG design with the Note's design.
-Although IJG's own code does not support TIFF/JPEG, the free libtiff library
-uses our library to implement TIFF/JPEG per the Note.  libtiff is available
-from ftp://ftp.sgi.com/graphics/tiff/.
-
-
-ARCHIVE LOCATIONS
-=================
-
-The "official" archive site for this software is ftp.uu.net (Internet
-address 192.48.96.9).  The most recent released version can always be found
-there in directory graphics/jpeg.  This particular version will be archived
-as ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz.  If you don't have
-direct Internet access, UUNET's archives are also available via UUCP; contact
-help at uunet.uu.net for information on retrieving files that way.
-
-Numerous Internet sites maintain copies of the UUNET files.  However, only
-ftp.uu.net is guaranteed to have the latest official version.
-
-You can also obtain this software in DOS-compatible "zip" archive format from
-the SimTel archives (ftp://ftp.simtel.net/pub/simtelnet/msdos/graphics/), or
-on CompuServe in the Graphics Support forum (GO CIS:GRAPHSUP), library 12
-"JPEG Tools".  Again, these versions may sometimes lag behind the ftp.uu.net
-release.
-
-The JPEG FAQ (Frequently Asked Questions) article is a useful source of
-general information about JPEG.  It is updated constantly and therefore is
-not included in this distribution.  The FAQ is posted every two weeks to
-Usenet newsgroups comp.graphics.misc, news.answers, and other groups.
-It is available on the World Wide Web at http://www.faqs.org/faqs/jpeg-faq/
-and other news.answers archive sites, including the official news.answers
-archive at rtfm.mit.edu: ftp://rtfm.mit.edu/pub/usenet/news.answers/jpeg-faq/.
-If you don't have Web or FTP access, send e-mail to mail-server at rtfm.mit.edu
-with body
-	send usenet/news.answers/jpeg-faq/part1
-	send usenet/news.answers/jpeg-faq/part2
-
-
-RELATED SOFTWARE
-================
-
-Numerous viewing and image manipulation programs now support JPEG.  (Quite a
-few of them use this library to do so.)  The JPEG FAQ described above lists
-some of the more popular free and shareware viewers, and tells where to
-obtain them on Internet.
-
-If you are on a Unix machine, we highly recommend Jef Poskanzer's free
-PBMPLUS software, which provides many useful operations on PPM-format image
-files.  In particular, it can convert PPM images to and from a wide range of
-other formats, thus making cjpeg/djpeg considerably more useful.  The latest
-version is distributed by the NetPBM group, and is available from numerous
-sites, notably ftp://wuarchive.wustl.edu/graphics/graphics/packages/NetPBM/.
-Unfortunately PBMPLUS/NETPBM is not nearly as portable as the IJG software is;
-you are likely to have difficulty making it work on any non-Unix machine.
-
-A different free JPEG implementation, written by the PVRG group at Stanford,
-is available from ftp://havefun.stanford.edu/pub/jpeg/.  This program
-is designed for research and experimentation rather than production use;
-it is slower, harder to use, and less portable than the IJG code, but it
-is easier to read and modify.  Also, the PVRG code supports lossless JPEG,
-which we do not.  (On the other hand, it doesn't do progressive JPEG.)
-
-
-FILE FORMAT WARS
-================
-
-Some JPEG programs produce files that are not compatible with our library.
-The root of the problem is that the ISO JPEG committee failed to specify a
-concrete file format.  Some vendors "filled in the blanks" on their own,
-creating proprietary formats that no one else could read.  (For example, none
-of the early commercial JPEG implementations for the Macintosh were able to
-exchange compressed files.)
-
-The file format we have adopted is called JFIF (see REFERENCES).  This format
-has been agreed to by a number of major commercial JPEG vendors, and it has
-become the de facto standard.  JFIF is a minimal or "low end" representation.
-We recommend the use of TIFF/JPEG (TIFF revision 6.0 as modified by TIFF
-Technical Note #2) for "high end" applications that need to record a lot of
-additional data about an image.  TIFF/JPEG is fairly new and not yet widely
-supported, unfortunately.
-
-The upcoming JPEG Part 3 standard defines a file format called SPIFF.
-SPIFF is interoperable with JFIF, in the sense that most JFIF decoders should
-be able to read the most common variant of SPIFF.  SPIFF has some technical
-advantages over JFIF, but its major claim to fame is simply that it is an
-official standard rather than an informal one.  At this point it is unclear
-whether SPIFF will supersede JFIF or whether JFIF will remain the de-facto
-standard.  IJG intends to support SPIFF once the standard is frozen, but we
-have not decided whether it should become our default output format or not.
-(In any case, our decoder will remain capable of reading JFIF indefinitely.)
-
-Various proprietary file formats incorporating JPEG compression also exist.
-We have little or no sympathy for the existence of these formats.  Indeed,
-one of the original reasons for developing this free software was to help
-force convergence on common, open format standards for JPEG files.  Don't
-use a proprietary file format!
-
-
-TO DO
-=====
-
-The major thrust for v7 will probably be improvement of visual quality.
-The current method for scaling the quantization tables is known not to be
-very good at low Q values.  We also intend to investigate block boundary
-smoothing, "poor man's variable quantization", and other means of improving
-quality-vs-file-size performance without sacrificing compatibility.
-
-In future versions, we are considering supporting some of the upcoming JPEG
-Part 3 extensions --- principally, variable quantization and the SPIFF file
-format.
-
-As always, speeding things up is of great interest.
-
-Please send bug reports, offers of help, etc. to jpeg-info at uunet.uu.net.
diff --git a/make/lib/swt/cocoa-macosx-x86_64/about_files/mpl-v11.txt b/make/lib/swt/cocoa-macosx-x86_64/about_files/mpl-v11.txt
deleted file mode 100644
index 7714141..0000000
--- a/make/lib/swt/cocoa-macosx-x86_64/about_files/mpl-v11.txt
+++ /dev/null
@@ -1,470 +0,0 @@
-                          MOZILLA PUBLIC LICENSE
-                                Version 1.1
-
-                              ---------------
-
-1. Definitions.
-
-     1.0.1. "Commercial Use" means distribution or otherwise making the
-     Covered Code available to a third party.
-
-     1.1. "Contributor" means each entity that creates or contributes to
-     the creation of Modifications.
-
-     1.2. "Contributor Version" means the combination of the Original
-     Code, prior Modifications used by a Contributor, and the Modifications
-     made by that particular Contributor.
-
-     1.3. "Covered Code" means the Original Code or Modifications or the
-     combination of the Original Code and Modifications, in each case
-     including portions thereof.
-
-     1.4. "Electronic Distribution Mechanism" means a mechanism generally
-     accepted in the software development community for the electronic
-     transfer of data.
-
-     1.5. "Executable" means Covered Code in any form other than Source
-     Code.
-
-     1.6. "Initial Developer" means the individual or entity identified
-     as the Initial Developer in the Source Code notice required by Exhibit
-     A.
-
-     1.7. "Larger Work" means a work which combines Covered Code or
-     portions thereof with code not governed by the terms of this License.
-
-     1.8. "License" means this document.
-
-     1.8.1. "Licensable" means having the right to grant, to the maximum
-     extent possible, whether at the time of the initial grant or
-     subsequently acquired, any and all of the rights conveyed herein.
-
-     1.9. "Modifications" means any addition to or deletion from the
-     substance or structure of either the Original Code or any previous
-     Modifications. When Covered Code is released as a series of files, a
-     Modification is:
-          A. Any addition to or deletion from the contents of a file
-          containing Original Code or previous Modifications.
-
-          B. Any new file that contains any part of the Original Code or
-          previous Modifications.
-
-     1.10. "Original Code" means Source Code of computer software code
-     which is described in the Source Code notice required by Exhibit A as
-     Original Code, and which, at the time of its release under this
-     License is not already Covered Code governed by this License.
-
-     1.10.1. "Patent Claims" means any patent claim(s), now owned or
-     hereafter acquired, including without limitation,  method, process,
-     and apparatus claims, in any patent Licensable by grantor.
-
-     1.11. "Source Code" means the preferred form of the Covered Code for
-     making modifications to it, including all modules it contains, plus
-     any associated interface definition files, scripts used to control
-     compilation and installation of an Executable, or source code
-     differential comparisons against either the Original Code or another
-     well known, available Covered Code of the Contributor's choice. The
-     Source Code can be in a compressed or archival form, provided the
-     appropriate decompression or de-archiving software is widely available
-     for no charge.
-
-     1.12. "You" (or "Your")  means an individual or a legal entity
-     exercising rights under, and complying with all of the terms of, this
-     License or a future version of this License issued under Section 6.1.
-     For legal entities, "You" includes any entity which controls, is
-     controlled by, or is under common control with You. For purposes of
-     this definition, "control" means (a) the power, direct or indirect,
-     to cause the direction or management of such entity, whether by
-     contract or otherwise, or (b) ownership of more than fifty percent
-     (50%) of the outstanding shares or beneficial ownership of such
-     entity.
-
-2. Source Code License.
-
-     2.1. The Initial Developer Grant.
-     The Initial Developer hereby grants You a world-wide, royalty-free,
-     non-exclusive license, subject to third party intellectual property
-     claims:
-          (a)  under intellectual property rights (other than patent or
-          trademark) Licensable by Initial Developer to use, reproduce,
-          modify, display, perform, sublicense and distribute the Original
-          Code (or portions thereof) with or without Modifications, and/or
-          as part of a Larger Work; and
-
-          (b) under Patents Claims infringed by the making, using or
-          selling of Original Code, to make, have made, use, practice,
-          sell, and offer for sale, and/or otherwise dispose of the
-          Original Code (or portions thereof).
-
-          (c) the licenses granted in this Section 2.1(a) and (b) are
-          effective on the date Initial Developer first distributes
-          Original Code under the terms of this License.
-
-          (d) Notwithstanding Section 2.1(b) above, no patent license is
-          granted: 1) for code that You delete from the Original Code; 2)
-          separate from the Original Code;  or 3) for infringements caused
-          by: i) the modification of the Original Code or ii) the
-          combination of the Original Code with other software or devices.
-
-     2.2. Contributor Grant.
-     Subject to third party intellectual property claims, each Contributor
-     hereby grants You a world-wide, royalty-free, non-exclusive license
-
-          (a)  under intellectual property rights (other than patent or
-          trademark) Licensable by Contributor, to use, reproduce, modify,
-          display, perform, sublicense and distribute the Modifications
-          created by such Contributor (or portions thereof) either on an
-          unmodified basis, with other Modifications, as Covered Code
-          and/or as part of a Larger Work; and
-
-          (b) under Patent Claims infringed by the making, using, or
-          selling of  Modifications made by that Contributor either alone
-          and/or in combination with its Contributor Version (or portions
-          of such combination), to make, use, sell, offer for sale, have
-          made, and/or otherwise dispose of: 1) Modifications made by that
-          Contributor (or portions thereof); and 2) the combination of
-          Modifications made by that Contributor with its Contributor
-          Version (or portions of such combination).
-
-          (c) the licenses granted in Sections 2.2(a) and 2.2(b) are
-          effective on the date Contributor first makes Commercial Use of
-          the Covered Code.
-
-          (d)    Notwithstanding Section 2.2(b) above, no patent license is
-          granted: 1) for any code that Contributor has deleted from the
-          Contributor Version; 2)  separate from the Contributor Version;
-          3)  for infringements caused by: i) third party modifications of
-          Contributor Version or ii)  the combination of Modifications made
-          by that Contributor with other software  (except as part of the
-          Contributor Version) or other devices; or 4) under Patent Claims
-          infringed by Covered Code in the absence of Modifications made by
-          that Contributor.
-
-3. Distribution Obligations.
-
-     3.1. Application of License.
-     The Modifications which You create or to which You contribute are
-     governed by the terms of this License, including without limitation
-     Section 2.2. The Source Code version of Covered Code may be
-     distributed only under the terms of this License or a future version
-     of this License released under Section 6.1, and You must include a
-     copy of this License with every copy of the Source Code You
-     distribute. You may not offer or impose any terms on any Source Code
-     version that alters or restricts the applicable version of this
-     License or the recipients' rights hereunder. However, You may include
-     an additional document offering the additional rights described in
-     Section 3.5.
-
-     3.2. Availability of Source Code.
-     Any Modification which You create or to which You contribute must be
-     made available in Source Code form under the terms of this License
-     either on the same media as an Executable version or via an accepted
-     Electronic Distribution Mechanism to anyone to whom you made an
-     Executable version available; and if made available via Electronic
-     Distribution Mechanism, must remain available for at least twelve (12)
-     months after the date it initially became available, or at least six
-     (6) months after a subsequent version of that particular Modification
-     has been made available to such recipients. You are responsible for
-     ensuring that the Source Code version remains available even if the
-     Electronic Distribution Mechanism is maintained by a third party.
-
-     3.3. Description of Modifications.
-     You must cause all Covered Code to which You contribute to contain a
-     file documenting the changes You made to create that Covered Code and
-     the date of any change. You must include a prominent statement that
-     the Modification is derived, directly or indirectly, from Original
-     Code provided by the Initial Developer and including the name of the
-     Initial Developer in (a) the Source Code, and (b) in any notice in an
-     Executable version or related documentation in which You describe the
-     origin or ownership of the Covered Code.
-
-     3.4. Intellectual Property Matters
-          (a) Third Party Claims.
-          If Contributor has knowledge that a license under a third party's
-          intellectual property rights is required to exercise the rights
-          granted by such Contributor under Sections 2.1 or 2.2,
-          Contributor must include a text file with the Source Code
-          distribution titled "LEGAL" which describes the claim and the
-          party making the claim in sufficient detail that a recipient will
-          know whom to contact. If Contributor obtains such knowledge after
-          the Modification is made available as described in Section 3.2,
-          Contributor shall promptly modify the LEGAL file in all copies
-          Contributor makes available thereafter and shall take other steps
-          (such as notifying appropriate mailing lists or newsgroups)
-          reasonably calculated to inform those who received the Covered
-          Code that new knowledge has been obtained.
-
-          (b) Contributor APIs.
-          If Contributor's Modifications include an application programming
-          interface and Contributor has knowledge of patent licenses which
-          are reasonably necessary to implement that API, Contributor must
-          also include this information in the LEGAL file.
-
-               (c)    Representations.
-          Contributor represents that, except as disclosed pursuant to
-          Section 3.4(a) above, Contributor believes that Contributor's
-          Modifications are Contributor's original creation(s) and/or
-          Contributor has sufficient rights to grant the rights conveyed by
-          this License.
-
-     3.5. Required Notices.
-     You must duplicate the notice in Exhibit A in each file of the Source
-     Code.  If it is not possible to put such notice in a particular Source
-     Code file due to its structure, then You must include such notice in a
-     location (such as a relevant directory) where a user would be likely
-     to look for such a notice.  If You created one or more Modification(s)
-     You may add your name as a Contributor to the notice described in
-     Exhibit A.  You must also duplicate this License in any documentation
-     for the Source Code where You describe recipients' rights or ownership
-     rights relating to Covered Code.  You may choose to offer, and to
-     charge a fee for, warranty, support, indemnity or liability
-     obligations to one or more recipients of Covered Code. However, You
-     may do so only on Your own behalf, and not on behalf of the Initial
-     Developer or any Contributor. You must make it absolutely clear than
-     any such warranty, support, indemnity or liability obligation is
-     offered by You alone, and You hereby agree to indemnify the Initial
-     Developer and every Contributor for any liability incurred by the
-     Initial Developer or such Contributor as a result of warranty,
-     support, indemnity or liability terms You offer.
-
-     3.6. Distribution of Executable Versions.
-     You may distribute Covered Code in Executable form only if the
-     requirements of Section 3.1-3.5 have been met for that Covered Code,
-     and if You include a notice stating that the Source Code version of
-     the Covered Code is available under the terms of this License,
-     including a description of how and where You have fulfilled the
-     obligations of Section 3.2. The notice must be conspicuously included
-     in any notice in an Executable version, related documentation or
-     collateral in which You describe recipients' rights relating to the
-     Covered Code. You may distribute the Executable version of Covered
-     Code or ownership rights under a license of Your choice, which may
-     contain terms different from this License, provided that You are in
-     compliance with the terms of this License and that the license for the
-     Executable version does not attempt to limit or alter the recipient's
-     rights in the Source Code version from the rights set forth in this
-     License. If You distribute the Executable version under a different
-     license You must make it absolutely clear that any terms which differ
-     from this License are offered by You alone, not by the Initial
-     Developer or any Contributor. You hereby agree to indemnify the
-     Initial Developer and every Contributor for any liability incurred by
-     the Initial Developer or such Contributor as a result of any such
-     terms You offer.
-
-     3.7. Larger Works.
-     You may create a Larger Work by combining Covered Code with other code
-     not governed by the terms of this License and distribute the Larger
-     Work as a single product. In such a case, You must make sure the
-     requirements of this License are fulfilled for the Covered Code.
-
-4. Inability to Comply Due to Statute or Regulation.
-
-     If it is impossible for You to comply with any of the terms of this
-     License with respect to some or all of the Covered Code due to
-     statute, judicial order, or regulation then You must: (a) comply with
-     the terms of this License to the maximum extent possible; and (b)
-     describe the limitations and the code they affect. Such description
-     must be included in the LEGAL file described in Section 3.4 and must
-     be included with all distributions of the Source Code. Except to the
-     extent prohibited by statute or regulation, such description must be
-     sufficiently detailed for a recipient of ordinary skill to be able to
-     understand it.
-
-5. Application of this License.
-
-     This License applies to code to which the Initial Developer has
-     attached the notice in Exhibit A and to related Covered Code.
-
-6. Versions of the License.
-
-     6.1. New Versions.
-     Netscape Communications Corporation ("Netscape") may publish revised
-     and/or new versions of the License from time to time. Each version
-     will be given a distinguishing version number.
-
-     6.2. Effect of New Versions.
-     Once Covered Code has been published under a particular version of the
-     License, You may always continue to use it under the terms of that
-     version. You may also choose to use such Covered Code under the terms
-     of any subsequent version of the License published by Netscape. No one
-     other than Netscape has the right to modify the terms applicable to
-     Covered Code created under this License.
-
-     6.3. Derivative Works.
-     If You create or use a modified version of this License (which you may
-     only do in order to apply it to code which is not already Covered Code
-     governed by this License), You must (a) rename Your license so that
-     the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape",
-     "MPL", "NPL" or any confusingly similar phrase do not appear in your
-     license (except to note that your license differs from this License)
-     and (b) otherwise make it clear that Your version of the license
-     contains terms which differ from the Mozilla Public License and
-     Netscape Public License. (Filling in the name of the Initial
-     Developer, Original Code or Contributor in the notice described in
-     Exhibit A shall not of themselves be deemed to be modifications of
-     this License.)
-
-7. DISCLAIMER OF WARRANTY.
-
-     COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
-     WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
-     WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
-     DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
-     THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
-     IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
-     YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
-     COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
-     OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
-     ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
-
-8. TERMINATION.
-
-     8.1.  This License and the rights granted hereunder will terminate
-     automatically if You fail to comply with terms herein and fail to cure
-     such breach within 30 days of becoming aware of the breach. All
-     sublicenses to the Covered Code which are properly granted shall
-     survive any termination of this License. Provisions which, by their
-     nature, must remain in effect beyond the termination of this License
-     shall survive.
-
-     8.2.  If You initiate litigation by asserting a patent infringement
-     claim (excluding declatory judgment actions) against Initial Developer
-     or a Contributor (the Initial Developer or Contributor against whom
-     You file such action is referred to as "Participant")  alleging that:
-
-     (a)  such Participant's Contributor Version directly or indirectly
-     infringes any patent, then any and all rights granted by such
-     Participant to You under Sections 2.1 and/or 2.2 of this License
-     shall, upon 60 days notice from Participant terminate prospectively,
-     unless if within 60 days after receipt of notice You either: (i)
-     agree in writing to pay Participant a mutually agreeable reasonable
-     royalty for Your past and future use of Modifications made by such
-     Participant, or (ii) withdraw Your litigation claim with respect to
-     the Contributor Version against such Participant.  If within 60 days
-     of notice, a reasonable royalty and payment arrangement are not
-     mutually agreed upon in writing by the parties or the litigation claim
-     is not withdrawn, the rights granted by Participant to You under
-     Sections 2.1 and/or 2.2 automatically terminate at the expiration of
-     the 60 day notice period specified above.
-
-     (b)  any software, hardware, or device, other than such Participant's
-     Contributor Version, directly or indirectly infringes any patent, then
-     any rights granted to You by such Participant under Sections 2.1(b)
-     and 2.2(b) are revoked effective as of the date You first made, used,
-     sold, distributed, or had made, Modifications made by that
-     Participant.
-
-     8.3.  If You assert a patent infringement claim against Participant
-     alleging that such Participant's Contributor Version directly or
-     indirectly infringes any patent where such claim is resolved (such as
-     by license or settlement) prior to the initiation of patent
-     infringement litigation, then the reasonable value of the licenses
-     granted by such Participant under Sections 2.1 or 2.2 shall be taken
-     into account in determining the amount or value of any payment or
-     license.
-
-     8.4.  In the event of termination under Sections 8.1 or 8.2 above,
-     all end user license agreements (excluding distributors and resellers)
-     which have been validly granted by You or any distributor hereunder
-     prior to termination shall survive termination.
-
-9. LIMITATION OF LIABILITY.
-
-     UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
-     (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL
-     DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
-     OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR
-     ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
-     CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,
-     WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
-     COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
-     INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
-     LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
-     RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
-     PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
-     EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
-     THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
-
-10. U.S. GOVERNMENT END USERS.
-
-     The Covered Code is a "commercial item," as that term is defined in
-     48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
-     software" and "commercial computer software documentation," as such
-     terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
-     C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
-     all U.S. Government End Users acquire Covered Code with only those
-     rights set forth herein.
-
-11. MISCELLANEOUS.
-
-     This License represents the complete agreement concerning subject
-     matter hereof. If any provision of this License is held to be
-     unenforceable, such provision shall be reformed only to the extent
-     necessary to make it enforceable. This License shall be governed by
-     California law provisions (except to the extent applicable law, if
-     any, provides otherwise), excluding its conflict-of-law provisions.
-     With respect to disputes in which at least one party is a citizen of,
-     or an entity chartered or registered to do business in the United
-     States of America, any litigation relating to this License shall be
-     subject to the jurisdiction of the Federal Courts of the Northern
-     District of California, with venue lying in Santa Clara County,
-     California, with the losing party responsible for costs, including
-     without limitation, court costs and reasonable attorneys' fees and
-     expenses. The application of the United Nations Convention on
-     Contracts for the International Sale of Goods is expressly excluded.
-     Any law or regulation which provides that the language of a contract
-     shall be construed against the drafter shall not apply to this
-     License.
-
-12. RESPONSIBILITY FOR CLAIMS.
-
-     As between Initial Developer and the Contributors, each party is
-     responsible for claims and damages arising, directly or indirectly,
-     out of its utilization of rights under this License and You agree to
-     work with Initial Developer and Contributors to distribute such
-     responsibility on an equitable basis. Nothing herein is intended or
-     shall be deemed to constitute any admission of liability.
-
-13. MULTIPLE-LICENSED CODE.
-
-     Initial Developer may designate portions of the Covered Code as
-     "Multiple-Licensed".  "Multiple-Licensed" means that the Initial
-     Developer permits you to utilize portions of the Covered Code under
-     Your choice of the NPL or the alternative licenses, if any, specified
-     by the Initial Developer in the file described in Exhibit A.
-
-EXHIBIT A -Mozilla Public License.
-
-     ``The contents of this file are subject to the Mozilla Public License
-     Version 1.1 (the "License"); you may not use this file except in
-     compliance with the License. You may obtain a copy of the License at
-     http://www.mozilla.org/MPL/
-
-     Software distributed under the License is distributed on an "AS IS"
-     basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
-     License for the specific language governing rights and limitations
-     under the License.
-
-     The Original Code is ______________________________________.
-
-     The Initial Developer of the Original Code is ________________________.
-     Portions created by ______________________ are Copyright (C) ______
-     _______________________. All Rights Reserved.
-
-     Contributor(s): ______________________________________.
-
-     Alternatively, the contents of this file may be used under the terms
-     of the _____ license (the  "[___] License"), in which case the
-     provisions of [______] License are applicable instead of those
-     above.  If you wish to allow use of your version of this file only
-     under the terms of the [____] License and not to allow others to use
-     your version of this file under the MPL, indicate your decision by
-     deleting  the provisions above and replace  them with the notice and
-     other provisions required by the [___] License.  If you do not delete
-     the provisions above, a recipient may use your version of this file
-     under either the MPL or the [___] License."
-
-     [NOTE: The text of this Exhibit A may differ slightly from the text of
-     the notices in the Source Code files of the Original Code. You should
-     use the text of this Exhibit A rather than the text found in the
-     Original Code Source Code for Your Modifications.]
-
diff --git a/make/lib/swt/cocoa-macosx-x86_64/swt-debug.jar b/make/lib/swt/cocoa-macosx-x86_64/swt-debug.jar
deleted file mode 100644
index a369b68..0000000
Binary files a/make/lib/swt/cocoa-macosx-x86_64/swt-debug.jar and /dev/null differ
diff --git a/make/lib/swt/cocoa-macosx/about.html b/make/lib/swt/cocoa-macosx/about.html
deleted file mode 100644
index d4f53de..0000000
--- a/make/lib/swt/cocoa-macosx/about.html
+++ /dev/null
@@ -1,218 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
- 
-<p>August 17, 2006</p>	
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in ("Content").  Unless otherwise 
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 ("EPL").  A copy of the EPL is available 
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, "Program" will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is 
-being redistributed by another party ("Redistributor") and different terms and conditions may
-apply to your use of any object code in the Content.  Check the Redistributor's license that was 
-provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-<h3>Third Party Content</h3>
-
-<p>The Content includes items that have been sourced from third parties as set out below. If you 
-did not receive this Content directly from the Eclipse Foundation, the following is provided 
-for informational purposes only, and you should look to the Redistributor’s license for 
-terms and conditions of use.</p>
-
-<h4>Carbon Binding</h4>
-
-<p>The "Carbon Binding" is a binding to the Carbon API.  The Content may include any or all of three portions of the Carbon Binding:</p>
-
-<p>The following files in the plug-in JAR shall be defined as the native code portion of the Carbon Binding:</p>
-<ul>
-	<li>libswt-pi-carbon-xxxx.jnilib (where "xxxx" is the version number)</li>	
-</ul>
-
-<p>The following files in both the plug-in JAR and the src.zip shall be defined respectively as the bytecode and source code portions of the Carbon Binding:</p>
-
-<ul>
-	<li>The contents of the directory org/eclipse/swt/internal/carbon (but not including any sub-directories)</li>
-</ul>
-
-<p>The Carbon Binding contains portions of Apple Computer's Carbon API header files which are:</p>
-
-<blockquote>Copyright © 1983-2002 Apple Computer, Inc.</blockquote>
-
-<p>In addition to the terms and conditions of the EPL, the following notice applies to your use of the Carbon Binding and must be retained and reproduced in its entirety with all redistributions of the
-Carbon Binding:</p>
-
-<blockquote>
-Copyright © 2004 Apple Computer, Inc.<br>
-This text and the following notice must be retained and reproduced in their entirety with all redistributions of this project:<br><br>
-<strong>IMPORTANT NOTICE</strong>: This project, which consists of certain Java bindings, includes or otherwise makes references to application programming interfaces
-(APIs) that are owned by Apple Computer, Inc., including but not limited to certain Apple Carbon APIs. While you may use, copy, modify and redistribute
-this Java bindings project in accordance with the terms of the Eclipse Public License (EPL) version 1.0, you are not granted any rights under any Apple or
-third party intellectual property rights (including without limitation, patent, copyright, trademark and trade secret rights) to Apple's Carbon API header files
-themselves, nor to any underlying implementations of any Apple Carbon APIs or to any functionality that is invoked by calling any of those APIs. Without
-limiting the generality of the foregoing, you understand that it is not Apple's intention by way of this project to authorize the reverse engineering of the Java
-bindings into Apple's original Carbon.h header files.
-</blockquote>
-
-<h4>Mozilla Binding</h4>
-
-<p>The "Mozilla Binding" is a binding to the Mozilla API.  The Content may include any or all of the following files:</p>
-
-<p>The following files in the plug-in JAR shall be defined as the native code portion of the Mozilla Binding:</p>
-<ul>
-	<li>libswt-xulrunner-cocoa-xxxx.so (where "xxxx" is the version number)</li>
-	<li>libswt-xpcominit-cocoa-xxxx.so (where "xxxx" is the version number)</li>
-</ul>
-
-<p>The following files in both the plug-in JAR and the src.zip shall be defined respectively as the bytecode and source code portions of the Mozilla Binding:</p>
-<ul>
-	<li>The contents of the directory org/eclipse/swt/internal/mozilla (but not including any sub-directories)</li>
-</ul>
-
-<p>The Mozilla Binding contains portions of Mozilla ("Mozilla").  Mozilla is made available by Mozilla.org.  Use of Mozilla is governed by the terms and
-conditions of the Mozilla Public License Version 1.1 ("MPL").  A copy of the MPL is provided with the Content (<a href="about_files/mpl-v11.txt" target="_blank">mpl-v11.txt</a>) and is also available at
-<a href="http://www.mozilla.org/MPL/MPL-1.1.html" target="_blank">http://www.mozilla.org/MPL/MPL-1.1.html</a>.</p>
-
-<h4>XULRunner 1.9 (subset, derivative work)</h4>
-
-The library libswt-xulrunner-cocoa-xxxx.jnilib (where "xxxx" is the version number) contains a small portion of XULRunner 1.9 content (header files) that have
-been modified from the Original Code provided by mozilla.org, and whose Initial Developer is Netscape Communications Corporation. Use of this code is governed by
-the terms and conditions of the Mozilla Public License Version 1.1 ("MPL").  A copy of the MPL is provided with the Content (<a href="./about_files/mpl-v11.txt">mpl-v11.txt</a>)
-and is also available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>.
-<p>The changed files are:
-<ul>
-  <li>org.eclipse.swt/Eclipse SWT Mozilla/common/library/nsIScriptContext.h</code>
-  <li>org.eclipse.swt/Eclipse SWT Mozilla/common/library/nsIScriptGlobalObject.h</code>
-</ul>
-Changes to the original files were made by SWT on April 7, 2009 and are marked with trailing comment <em>"//SWT-20090407"</em>.
-
-<h4>Independent JPEG Group's JPEG software release 6b</h4>
-
-<p>This software is based in part on the work of the Independent JPEG Group's JPEG software release 6b ("LIBJPEG").
-LIBJPEG was used to implement the decoding of JPEG format files in Java (TM).  The Content does NOT include any portion of the LIBJPEG file ansi2knr.c.</p>
-
-<p>Your use of LIBJPEG is subject to the terms and conditions located in the <a href="about_files/IJG_README">about_files/IJG_README</a> file which is included
-with the Content.</p>
-
-<p>The IJG's website is located at <a href="http://ijg.org/" target="_blank">http://ijg.org</a>.</p>
-
-<p>The class org.eclipse.swt.internal.image.JPEGFileFormat is based on following files from LIBJPEG:</p>
-
-<ul>
-    <li>cderror.h</li>
-    <li>cdjpeg.h</li>
-    <li>jchuff.h</li>
-    <li>jdcolor.c</li>
-    <li>jdct.h</li>
-    <li>jdhuff.h</li>
-    <li>jerror.h</li>
-    <li>jidctint.c</li>
-    <li>jinclude.h</li>
-    <li>jmemsys.h</li>
-    <li>jmorecfg.h</li>
-    <li>jpegint.h</li>
-    <li>jpeglib.h</li>
-    <li>jversion.h</li>
-    <li>transupp.h</li>
-</ul>
-
-<p>The class org.eclipse.swt.internal.image.JPEGDecoder is based on the following files from LIBJPEG:</p>
-
-<ul>
-	<li>jcapimin.c</li>
-	<li>jcapistd.c</li>
-	<li>jccoefct.c</li>
-	<li>jccolor.c</li>
-	<li>jcdctmgr.c</li>
-	<li>jchuff.c</li>
-	<li>jcinit.c</li>
-	<li>jcmainct.c</li>
-	<li>jcmarker.c</li>
-	<li>jcmaster.c</li>
-	<li>jcomapi.c</li>
-	<li>jcparam.c</li>
-	<li>jcphuff.c</li>
-	<li>jcprepct.c</li>
-	<li>jcsample.c</li>
-	<li>jctrans.c</li>
-	<li>jdapimin.c</li>
-	<li>jdapistd.c</li>
-	<li>jdatadst.c</li>
-	<li>jdatasrc.c</li>
-	<li>jdcoefct.c</li>
-	<li>jdcolor.c</li>
-	<li>jddctmgr.c</li>
-	<li>jdhuff.c</li>
-	<li>jdinput.c</li>
-	<li>jdmainct.c</li>
-	<li>jdmarker.c</li>
-	<li>jdmaster.c</li>
-	<li>jdmerge.c</li>
-	<li>jdphuff.c</li>
-	<li>jdpostct.c</li>
-	<li>jdsample.c</li>
-	<li>jdtrans.c</li>
-	<li>jerror.c</li>
-	<li>jfdctflt.c</li>
-	<li>jfdctfst.c</li>
-	<li>jfdctint.c</li>
-	<li>jidctflt.c</li>
-	<li>jidctfst.c</li>
-	<li>jidctint.c</li>
-	<li>jidctred.c</li>
-	<li>jpegtran.c</li>
-	<li>jquant1.c</li>
-	<li>jquant2.c</li>
-	<li>jutils.c</li>
-	<li>cderror.h</li>
-	<li>cdjpeg.h</li>
-	<li>jchuff.h</li>
-	<li>jconfig.h</li>
-	<li>jdct.h</li>
-	<li>jdhuff.h</li>
-	<li>jerror.h</li>
-	<li>jinclude.h</li>
-	<li>jmorecfg.h</li>
-	<li>jpegint.h</li>
-	<li>jpeglib.h</li>
-	<li>jversion.h</li>
-	<li>transupp.h</li>
-</ul>
-	
-<p>The following changes were made to the LIBJPEG code in the Content:</p>
-
-<ol>
-	<li>In Java, pointer math is not allowed so indexing was used instead.</li>
-	<li>Function pointers were replaced with switch statements.</li>
-	<li>The virtual memory, tracing and progress monitoring were removed.</li>
-	<li>The error handling was simplified and now uses Java exceptions.</li>
-</ol>
-
-<h4>PuTTY 0.58 (derivative work)</h4>
-
-<p>Portions of the SWT class org/eclipse/swt/internal/image/PngDeflater are based on PuTTY's sshzlib.c. PuTTY is made available by Mozilla.org.  Use of PuTTY is governed by the terms and
-conditions of the the following MIT-style license:  </p>
-<blockquote>
-  <p><em>PuTTY is copyright 1997-2007 Simon Tatham.</em> </p>
-  <p><em>Portions copyright Robert de Bath, Joris van Rantwijk, Delian  Delchev, Andreas Schultz, Jeroen Massar, Wez Furlong, Nicolas Barry,  Justin Bradford, Ben Harris, Malcolm Smith, Ahmad Khalifa, Markus Kuhn,  and CORE SDI S.A.</em> </p>
-  <p><em>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:</em> </p>
-  <p><em>The above copyright notice and this permission notice shall be  included in all copies or substantial portions of the Software.</em> </p>
-  <p><em>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 SIMON TATHAM 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.</em> </p>
-</blockquote>
-<p>A copy of the license is also available at <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/licence.html" target="_blank">http://www.chiark.greenend.org.uk/~sgtatham/putty/licence.html</a>.</p>
-
-<p><small>Java and all Java-based trademarks and logos are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries.</small></p>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/make/lib/swt/cocoa-macosx/about_files/IJG_README b/make/lib/swt/cocoa-macosx/about_files/IJG_README
deleted file mode 100644
index 86cc206..0000000
--- a/make/lib/swt/cocoa-macosx/about_files/IJG_README
+++ /dev/null
@@ -1,385 +0,0 @@
-The Independent JPEG Group's JPEG software
-==========================================
-
-README for release 6b of 27-Mar-1998
-====================================
-
-This distribution contains the sixth public release of the Independent JPEG
-Group's free JPEG software.  You are welcome to redistribute this software and
-to use it for any purpose, subject to the conditions under LEGAL ISSUES, below.
-
-Serious users of this software (particularly those incorporating it into
-larger programs) should contact IJG at jpeg-info at uunet.uu.net to be added to
-our electronic mailing list.  Mailing list members are notified of updates
-and have a chance to participate in technical discussions, etc.
-
-This software is the work of Tom Lane, Philip Gladstone, Jim Boucher,
-Lee Crocker, Julian Minguillon, Luis Ortiz, George Phillips, Davide Rossi,
-Guido Vollbeding, Ge' Weijers, and other members of the Independent JPEG
-Group.
-
-IJG is not affiliated with the official ISO JPEG standards committee.
-
-
-DOCUMENTATION ROADMAP
-=====================
-
-This file contains the following sections:
-
-OVERVIEW            General description of JPEG and the IJG software.
-LEGAL ISSUES        Copyright, lack of warranty, terms of distribution.
-REFERENCES          Where to learn more about JPEG.
-ARCHIVE LOCATIONS   Where to find newer versions of this software.
-RELATED SOFTWARE    Other stuff you should get.
-FILE FORMAT WARS    Software *not* to get.
-TO DO               Plans for future IJG releases.
-
-Other documentation files in the distribution are:
-
-User documentation:
-  install.doc       How to configure and install the IJG software.
-  usage.doc         Usage instructions for cjpeg, djpeg, jpegtran,
-                    rdjpgcom, and wrjpgcom.
-  *.1               Unix-style man pages for programs (same info as usage.doc).
-  wizard.doc        Advanced usage instructions for JPEG wizards only.
-  change.log        Version-to-version change highlights.
-Programmer and internal documentation:
-  libjpeg.doc       How to use the JPEG library in your own programs.
-  example.c         Sample code for calling the JPEG library.
-  structure.doc     Overview of the JPEG library's internal structure.
-  filelist.doc      Road map of IJG files.
-  coderules.doc     Coding style rules --- please read if you contribute code.
-
-Please read at least the files install.doc and usage.doc.  Useful information
-can also be found in the JPEG FAQ (Frequently Asked Questions) article.  See
-ARCHIVE LOCATIONS below to find out where to obtain the FAQ article.
-
-If you want to understand how the JPEG code works, we suggest reading one or
-more of the REFERENCES, then looking at the documentation files (in roughly
-the order listed) before diving into the code.
-
-
-OVERVIEW
-========
-
-This package contains C software to implement JPEG image compression and
-decompression.  JPEG (pronounced "jay-peg") is a standardized compression
-method for full-color and gray-scale images.  JPEG is intended for compressing
-"real-world" scenes; line drawings, cartoons and other non-realistic images
-are not its strong suit.  JPEG is lossy, meaning that the output image is not
-exactly identical to the input image.  Hence you must not use JPEG if you
-have to have identical output bits.  However, on typical photographic images,
-very good compression levels can be obtained with no visible change, and
-remarkably high compression levels are possible if you can tolerate a
-low-quality image.  For more details, see the references, or just experiment
-with various compression settings.
-
-This software implements JPEG baseline, extended-sequential, and progressive
-compression processes.  Provision is made for supporting all variants of these
-processes, although some uncommon parameter settings aren't implemented yet.
-For legal reasons, we are not distributing code for the arithmetic-coding
-variants of JPEG; see LEGAL ISSUES.  We have made no provision for supporting
-the hierarchical or lossless processes defined in the standard.
-
-We provide a set of library routines for reading and writing JPEG image files,
-plus two sample applications "cjpeg" and "djpeg", which use the library to
-perform conversion between JPEG and some other popular image file formats.
-The library is intended to be reused in other applications.
-
-In order to support file conversion and viewing software, we have included
-considerable functionality beyond the bare JPEG coding/decoding capability;
-for example, the color quantization modules are not strictly part of JPEG
-decoding, but they are essential for output to colormapped file formats or
-colormapped displays.  These extra functions can be compiled out of the
-library if not required for a particular application.  We have also included
-"jpegtran", a utility for lossless transcoding between different JPEG
-processes, and "rdjpgcom" and "wrjpgcom", two simple applications for
-inserting and extracting textual comments in JFIF files.
-
-The emphasis in designing this software has been on achieving portability and
-flexibility, while also making it fast enough to be useful.  In particular,
-the software is not intended to be read as a tutorial on JPEG.  (See the
-REFERENCES section for introductory material.)  Rather, it is intended to
-be reliable, portable, industrial-strength code.  We do not claim to have
-achieved that goal in every aspect of the software, but we strive for it.
-
-We welcome the use of this software as a component of commercial products.
-No royalty is required, but we do ask for an acknowledgement in product
-documentation, as described under LEGAL ISSUES.
-
-
-LEGAL ISSUES
-============
-
-In plain English:
-
-1. We don't promise that this software works.  (But if you find any bugs,
-   please let us know!)
-2. You can use this software for whatever you want.  You don't have to pay us.
-3. You may not pretend that you wrote this software.  If you use it in a
-   program, you must acknowledge somewhere in your documentation that
-   you've used the IJG code.
-
-In legalese:
-
-The authors make NO WARRANTY or representation, either express or implied,
-with respect to this software, its quality, accuracy, merchantability, or
-fitness for a particular purpose.  This software is provided "AS IS", and you,
-its user, assume the entire risk as to its quality and accuracy.
-
-This software is copyright (C) 1991-1998, Thomas G. Lane.
-All Rights Reserved except as specified below.
-
-Permission is hereby granted to use, copy, modify, and distribute this
-software (or portions thereof) for any purpose, without fee, subject to these
-conditions:
-(1) If any part of the source code for this software is distributed, then this
-README file must be included, with this copyright and no-warranty notice
-unaltered; and any additions, deletions, or changes to the original files
-must be clearly indicated in accompanying documentation.
-(2) If only executable code is distributed, then the accompanying
-documentation must state that "this software is based in part on the work of
-the Independent JPEG Group".
-(3) Permission for use of this software is granted only if the user accepts
-full responsibility for any undesirable consequences; the authors accept
-NO LIABILITY for damages of any kind.
-
-These conditions apply to any software derived from or based on the IJG code,
-not just to the unmodified library.  If you use our work, you ought to
-acknowledge us.
-
-Permission is NOT granted for the use of any IJG author's name or company name
-in advertising or publicity relating to this software or products derived from
-it.  This software may be referred to only as "the Independent JPEG Group's
-software".
-
-We specifically permit and encourage the use of this software as the basis of
-commercial products, provided that all warranty or liability claims are
-assumed by the product vendor.
-
-
-ansi2knr.c is included in this distribution by permission of L. Peter Deutsch,
-sole proprietor of its copyright holder, Aladdin Enterprises of Menlo Park, CA.
-ansi2knr.c is NOT covered by the above copyright and conditions, but instead
-by the usual distribution terms of the Free Software Foundation; principally,
-that you must include source code if you redistribute it.  (See the file
-ansi2knr.c for full details.)  However, since ansi2knr.c is not needed as part
-of any program generated from the IJG code, this does not limit you more than
-the foregoing paragraphs do.
-
-The Unix configuration script "configure" was produced with GNU Autoconf.
-It is copyright by the Free Software Foundation but is freely distributable.
-The same holds for its supporting scripts (config.guess, config.sub,
-ltconfig, ltmain.sh).  Another support script, install-sh, is copyright
-by M.I.T. but is also freely distributable.
-
-It appears that the arithmetic coding option of the JPEG spec is covered by
-patents owned by IBM, AT&T, and Mitsubishi.  Hence arithmetic coding cannot
-legally be used without obtaining one or more licenses.  For this reason,
-support for arithmetic coding has been removed from the free JPEG software.
-(Since arithmetic coding provides only a marginal gain over the unpatented
-Huffman mode, it is unlikely that very many implementations will support it.)
-So far as we are aware, there are no patent restrictions on the remaining
-code.
-
-The IJG distribution formerly included code to read and write GIF files.
-To avoid entanglement with the Unisys LZW patent, GIF reading support has
-been removed altogether, and the GIF writer has been simplified to produce
-"uncompressed GIFs".  This technique does not use the LZW algorithm; the
-resulting GIF files are larger than usual, but are readable by all standard
-GIF decoders.
-
-We are required to state that
-    "The Graphics Interchange Format(c) is the Copyright property of
-    CompuServe Incorporated.  GIF(sm) is a Service Mark property of
-    CompuServe Incorporated."
-
-
-REFERENCES
-==========
-
-We highly recommend reading one or more of these references before trying to
-understand the innards of the JPEG software.
-
-The best short technical introduction to the JPEG compression algorithm is
-	Wallace, Gregory K.  "The JPEG Still Picture Compression Standard",
-	Communications of the ACM, April 1991 (vol. 34 no. 4), pp. 30-44.
-(Adjacent articles in that issue discuss MPEG motion picture compression,
-applications of JPEG, and related topics.)  If you don't have the CACM issue
-handy, a PostScript file containing a revised version of Wallace's article is
-available at ftp://ftp.uu.net/graphics/jpeg/wallace.ps.gz.  The file (actually
-a preprint for an article that appeared in IEEE Trans. Consumer Electronics)
-omits the sample images that appeared in CACM, but it includes corrections
-and some added material.  Note: the Wallace article is copyright ACM and IEEE,
-and it may not be used for commercial purposes.
-
-A somewhat less technical, more leisurely introduction to JPEG can be found in
-"The Data Compression Book" by Mark Nelson and Jean-loup Gailly, published by
-M&T Books (New York), 2nd ed. 1996, ISBN 1-55851-434-1.  This book provides
-good explanations and example C code for a multitude of compression methods
-including JPEG.  It is an excellent source if you are comfortable reading C
-code but don't know much about data compression in general.  The book's JPEG
-sample code is far from industrial-strength, but when you are ready to look
-at a full implementation, you've got one here...
-
-The best full description of JPEG is the textbook "JPEG Still Image Data
-Compression Standard" by William B. Pennebaker and Joan L. Mitchell, published
-by Van Nostrand Reinhold, 1993, ISBN 0-442-01272-1.  Price US$59.95, 638 pp.
-The book includes the complete text of the ISO JPEG standards (DIS 10918-1
-and draft DIS 10918-2).  This is by far the most complete exposition of JPEG
-in existence, and we highly recommend it.
-
-The JPEG standard itself is not available electronically; you must order a
-paper copy through ISO or ITU.  (Unless you feel a need to own a certified
-official copy, we recommend buying the Pennebaker and Mitchell book instead;
-it's much cheaper and includes a great deal of useful explanatory material.)
-In the USA, copies of the standard may be ordered from ANSI Sales at (212)
-642-4900, or from Global Engineering Documents at (800) 854-7179.  (ANSI
-doesn't take credit card orders, but Global does.)  It's not cheap: as of
-1992, ANSI was charging $95 for Part 1 and $47 for Part 2, plus 7%
-shipping/handling.  The standard is divided into two parts, Part 1 being the
-actual specification, while Part 2 covers compliance testing methods.  Part 1
-is titled "Digital Compression and Coding of Continuous-tone Still Images,
-Part 1: Requirements and guidelines" and has document numbers ISO/IEC IS
-10918-1, ITU-T T.81.  Part 2 is titled "Digital Compression and Coding of
-Continuous-tone Still Images, Part 2: Compliance testing" and has document
-numbers ISO/IEC IS 10918-2, ITU-T T.83.
-
-Some extensions to the original JPEG standard are defined in JPEG Part 3,
-a newer ISO standard numbered ISO/IEC IS 10918-3 and ITU-T T.84.  IJG
-currently does not support any Part 3 extensions.
-
-The JPEG standard does not specify all details of an interchangeable file
-format.  For the omitted details we follow the "JFIF" conventions, revision
-1.02.  A copy of the JFIF spec is available from:
-	Literature Department
-	C-Cube Microsystems, Inc.
-	1778 McCarthy Blvd.
-	Milpitas, CA 95035
-	phone (408) 944-6300,  fax (408) 944-6314
-A PostScript version of this document is available by FTP at
-ftp://ftp.uu.net/graphics/jpeg/jfif.ps.gz.  There is also a plain text
-version at ftp://ftp.uu.net/graphics/jpeg/jfif.txt.gz, but it is missing
-the figures.
-
-The TIFF 6.0 file format specification can be obtained by FTP from
-ftp://ftp.sgi.com/graphics/tiff/TIFF6.ps.gz.  The JPEG incorporation scheme
-found in the TIFF 6.0 spec of 3-June-92 has a number of serious problems.
-IJG does not recommend use of the TIFF 6.0 design (TIFF Compression tag 6).
-Instead, we recommend the JPEG design proposed by TIFF Technical Note #2
-(Compression tag 7).  Copies of this Note can be obtained from ftp.sgi.com or
-from ftp://ftp.uu.net/graphics/jpeg/.  It is expected that the next revision
-of the TIFF spec will replace the 6.0 JPEG design with the Note's design.
-Although IJG's own code does not support TIFF/JPEG, the free libtiff library
-uses our library to implement TIFF/JPEG per the Note.  libtiff is available
-from ftp://ftp.sgi.com/graphics/tiff/.
-
-
-ARCHIVE LOCATIONS
-=================
-
-The "official" archive site for this software is ftp.uu.net (Internet
-address 192.48.96.9).  The most recent released version can always be found
-there in directory graphics/jpeg.  This particular version will be archived
-as ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz.  If you don't have
-direct Internet access, UUNET's archives are also available via UUCP; contact
-help at uunet.uu.net for information on retrieving files that way.
-
-Numerous Internet sites maintain copies of the UUNET files.  However, only
-ftp.uu.net is guaranteed to have the latest official version.
-
-You can also obtain this software in DOS-compatible "zip" archive format from
-the SimTel archives (ftp://ftp.simtel.net/pub/simtelnet/msdos/graphics/), or
-on CompuServe in the Graphics Support forum (GO CIS:GRAPHSUP), library 12
-"JPEG Tools".  Again, these versions may sometimes lag behind the ftp.uu.net
-release.
-
-The JPEG FAQ (Frequently Asked Questions) article is a useful source of
-general information about JPEG.  It is updated constantly and therefore is
-not included in this distribution.  The FAQ is posted every two weeks to
-Usenet newsgroups comp.graphics.misc, news.answers, and other groups.
-It is available on the World Wide Web at http://www.faqs.org/faqs/jpeg-faq/
-and other news.answers archive sites, including the official news.answers
-archive at rtfm.mit.edu: ftp://rtfm.mit.edu/pub/usenet/news.answers/jpeg-faq/.
-If you don't have Web or FTP access, send e-mail to mail-server at rtfm.mit.edu
-with body
-	send usenet/news.answers/jpeg-faq/part1
-	send usenet/news.answers/jpeg-faq/part2
-
-
-RELATED SOFTWARE
-================
-
-Numerous viewing and image manipulation programs now support JPEG.  (Quite a
-few of them use this library to do so.)  The JPEG FAQ described above lists
-some of the more popular free and shareware viewers, and tells where to
-obtain them on Internet.
-
-If you are on a Unix machine, we highly recommend Jef Poskanzer's free
-PBMPLUS software, which provides many useful operations on PPM-format image
-files.  In particular, it can convert PPM images to and from a wide range of
-other formats, thus making cjpeg/djpeg considerably more useful.  The latest
-version is distributed by the NetPBM group, and is available from numerous
-sites, notably ftp://wuarchive.wustl.edu/graphics/graphics/packages/NetPBM/.
-Unfortunately PBMPLUS/NETPBM is not nearly as portable as the IJG software is;
-you are likely to have difficulty making it work on any non-Unix machine.
-
-A different free JPEG implementation, written by the PVRG group at Stanford,
-is available from ftp://havefun.stanford.edu/pub/jpeg/.  This program
-is designed for research and experimentation rather than production use;
-it is slower, harder to use, and less portable than the IJG code, but it
-is easier to read and modify.  Also, the PVRG code supports lossless JPEG,
-which we do not.  (On the other hand, it doesn't do progressive JPEG.)
-
-
-FILE FORMAT WARS
-================
-
-Some JPEG programs produce files that are not compatible with our library.
-The root of the problem is that the ISO JPEG committee failed to specify a
-concrete file format.  Some vendors "filled in the blanks" on their own,
-creating proprietary formats that no one else could read.  (For example, none
-of the early commercial JPEG implementations for the Macintosh were able to
-exchange compressed files.)
-
-The file format we have adopted is called JFIF (see REFERENCES).  This format
-has been agreed to by a number of major commercial JPEG vendors, and it has
-become the de facto standard.  JFIF is a minimal or "low end" representation.
-We recommend the use of TIFF/JPEG (TIFF revision 6.0 as modified by TIFF
-Technical Note #2) for "high end" applications that need to record a lot of
-additional data about an image.  TIFF/JPEG is fairly new and not yet widely
-supported, unfortunately.
-
-The upcoming JPEG Part 3 standard defines a file format called SPIFF.
-SPIFF is interoperable with JFIF, in the sense that most JFIF decoders should
-be able to read the most common variant of SPIFF.  SPIFF has some technical
-advantages over JFIF, but its major claim to fame is simply that it is an
-official standard rather than an informal one.  At this point it is unclear
-whether SPIFF will supersede JFIF or whether JFIF will remain the de-facto
-standard.  IJG intends to support SPIFF once the standard is frozen, but we
-have not decided whether it should become our default output format or not.
-(In any case, our decoder will remain capable of reading JFIF indefinitely.)
-
-Various proprietary file formats incorporating JPEG compression also exist.
-We have little or no sympathy for the existence of these formats.  Indeed,
-one of the original reasons for developing this free software was to help
-force convergence on common, open format standards for JPEG files.  Don't
-use a proprietary file format!
-
-
-TO DO
-=====
-
-The major thrust for v7 will probably be improvement of visual quality.
-The current method for scaling the quantization tables is known not to be
-very good at low Q values.  We also intend to investigate block boundary
-smoothing, "poor man's variable quantization", and other means of improving
-quality-vs-file-size performance without sacrificing compatibility.
-
-In future versions, we are considering supporting some of the upcoming JPEG
-Part 3 extensions --- principally, variable quantization and the SPIFF file
-format.
-
-As always, speeding things up is of great interest.
-
-Please send bug reports, offers of help, etc. to jpeg-info at uunet.uu.net.
diff --git a/make/lib/swt/cocoa-macosx/about_files/mpl-v11.txt b/make/lib/swt/cocoa-macosx/about_files/mpl-v11.txt
deleted file mode 100644
index 7714141..0000000
--- a/make/lib/swt/cocoa-macosx/about_files/mpl-v11.txt
+++ /dev/null
@@ -1,470 +0,0 @@
-                          MOZILLA PUBLIC LICENSE
-                                Version 1.1
-
-                              ---------------
-
-1. Definitions.
-
-     1.0.1. "Commercial Use" means distribution or otherwise making the
-     Covered Code available to a third party.
-
-     1.1. "Contributor" means each entity that creates or contributes to
-     the creation of Modifications.
-
-     1.2. "Contributor Version" means the combination of the Original
-     Code, prior Modifications used by a Contributor, and the Modifications
-     made by that particular Contributor.
-
-     1.3. "Covered Code" means the Original Code or Modifications or the
-     combination of the Original Code and Modifications, in each case
-     including portions thereof.
-
-     1.4. "Electronic Distribution Mechanism" means a mechanism generally
-     accepted in the software development community for the electronic
-     transfer of data.
-
-     1.5. "Executable" means Covered Code in any form other than Source
-     Code.
-
-     1.6. "Initial Developer" means the individual or entity identified
-     as the Initial Developer in the Source Code notice required by Exhibit
-     A.
-
-     1.7. "Larger Work" means a work which combines Covered Code or
-     portions thereof with code not governed by the terms of this License.
-
-     1.8. "License" means this document.
-
-     1.8.1. "Licensable" means having the right to grant, to the maximum
-     extent possible, whether at the time of the initial grant or
-     subsequently acquired, any and all of the rights conveyed herein.
-
-     1.9. "Modifications" means any addition to or deletion from the
-     substance or structure of either the Original Code or any previous
-     Modifications. When Covered Code is released as a series of files, a
-     Modification is:
-          A. Any addition to or deletion from the contents of a file
-          containing Original Code or previous Modifications.
-
-          B. Any new file that contains any part of the Original Code or
-          previous Modifications.
-
-     1.10. "Original Code" means Source Code of computer software code
-     which is described in the Source Code notice required by Exhibit A as
-     Original Code, and which, at the time of its release under this
-     License is not already Covered Code governed by this License.
-
-     1.10.1. "Patent Claims" means any patent claim(s), now owned or
-     hereafter acquired, including without limitation,  method, process,
-     and apparatus claims, in any patent Licensable by grantor.
-
-     1.11. "Source Code" means the preferred form of the Covered Code for
-     making modifications to it, including all modules it contains, plus
-     any associated interface definition files, scripts used to control
-     compilation and installation of an Executable, or source code
-     differential comparisons against either the Original Code or another
-     well known, available Covered Code of the Contributor's choice. The
-     Source Code can be in a compressed or archival form, provided the
-     appropriate decompression or de-archiving software is widely available
-     for no charge.
-
-     1.12. "You" (or "Your")  means an individual or a legal entity
-     exercising rights under, and complying with all of the terms of, this
-     License or a future version of this License issued under Section 6.1.
-     For legal entities, "You" includes any entity which controls, is
-     controlled by, or is under common control with You. For purposes of
-     this definition, "control" means (a) the power, direct or indirect,
-     to cause the direction or management of such entity, whether by
-     contract or otherwise, or (b) ownership of more than fifty percent
-     (50%) of the outstanding shares or beneficial ownership of such
-     entity.
-
-2. Source Code License.
-
-     2.1. The Initial Developer Grant.
-     The Initial Developer hereby grants You a world-wide, royalty-free,
-     non-exclusive license, subject to third party intellectual property
-     claims:
-          (a)  under intellectual property rights (other than patent or
-          trademark) Licensable by Initial Developer to use, reproduce,
-          modify, display, perform, sublicense and distribute the Original
-          Code (or portions thereof) with or without Modifications, and/or
-          as part of a Larger Work; and
-
-          (b) under Patents Claims infringed by the making, using or
-          selling of Original Code, to make, have made, use, practice,
-          sell, and offer for sale, and/or otherwise dispose of the
-          Original Code (or portions thereof).
-
-          (c) the licenses granted in this Section 2.1(a) and (b) are
-          effective on the date Initial Developer first distributes
-          Original Code under the terms of this License.
-
-          (d) Notwithstanding Section 2.1(b) above, no patent license is
-          granted: 1) for code that You delete from the Original Code; 2)
-          separate from the Original Code;  or 3) for infringements caused
-          by: i) the modification of the Original Code or ii) the
-          combination of the Original Code with other software or devices.
-
-     2.2. Contributor Grant.
-     Subject to third party intellectual property claims, each Contributor
-     hereby grants You a world-wide, royalty-free, non-exclusive license
-
-          (a)  under intellectual property rights (other than patent or
-          trademark) Licensable by Contributor, to use, reproduce, modify,
-          display, perform, sublicense and distribute the Modifications
-          created by such Contributor (or portions thereof) either on an
-          unmodified basis, with other Modifications, as Covered Code
-          and/or as part of a Larger Work; and
-
-          (b) under Patent Claims infringed by the making, using, or
-          selling of  Modifications made by that Contributor either alone
-          and/or in combination with its Contributor Version (or portions
-          of such combination), to make, use, sell, offer for sale, have
-          made, and/or otherwise dispose of: 1) Modifications made by that
-          Contributor (or portions thereof); and 2) the combination of
-          Modifications made by that Contributor with its Contributor
-          Version (or portions of such combination).
-
-          (c) the licenses granted in Sections 2.2(a) and 2.2(b) are
-          effective on the date Contributor first makes Commercial Use of
-          the Covered Code.
-
-          (d)    Notwithstanding Section 2.2(b) above, no patent license is
-          granted: 1) for any code that Contributor has deleted from the
-          Contributor Version; 2)  separate from the Contributor Version;
-          3)  for infringements caused by: i) third party modifications of
-          Contributor Version or ii)  the combination of Modifications made
-          by that Contributor with other software  (except as part of the
-          Contributor Version) or other devices; or 4) under Patent Claims
-          infringed by Covered Code in the absence of Modifications made by
-          that Contributor.
-
-3. Distribution Obligations.
-
-     3.1. Application of License.
-     The Modifications which You create or to which You contribute are
-     governed by the terms of this License, including without limitation
-     Section 2.2. The Source Code version of Covered Code may be
-     distributed only under the terms of this License or a future version
-     of this License released under Section 6.1, and You must include a
-     copy of this License with every copy of the Source Code You
-     distribute. You may not offer or impose any terms on any Source Code
-     version that alters or restricts the applicable version of this
-     License or the recipients' rights hereunder. However, You may include
-     an additional document offering the additional rights described in
-     Section 3.5.
-
-     3.2. Availability of Source Code.
-     Any Modification which You create or to which You contribute must be
-     made available in Source Code form under the terms of this License
-     either on the same media as an Executable version or via an accepted
-     Electronic Distribution Mechanism to anyone to whom you made an
-     Executable version available; and if made available via Electronic
-     Distribution Mechanism, must remain available for at least twelve (12)
-     months after the date it initially became available, or at least six
-     (6) months after a subsequent version of that particular Modification
-     has been made available to such recipients. You are responsible for
-     ensuring that the Source Code version remains available even if the
-     Electronic Distribution Mechanism is maintained by a third party.
-
-     3.3. Description of Modifications.
-     You must cause all Covered Code to which You contribute to contain a
-     file documenting the changes You made to create that Covered Code and
-     the date of any change. You must include a prominent statement that
-     the Modification is derived, directly or indirectly, from Original
-     Code provided by the Initial Developer and including the name of the
-     Initial Developer in (a) the Source Code, and (b) in any notice in an
-     Executable version or related documentation in which You describe the
-     origin or ownership of the Covered Code.
-
-     3.4. Intellectual Property Matters
-          (a) Third Party Claims.
-          If Contributor has knowledge that a license under a third party's
-          intellectual property rights is required to exercise the rights
-          granted by such Contributor under Sections 2.1 or 2.2,
-          Contributor must include a text file with the Source Code
-          distribution titled "LEGAL" which describes the claim and the
-          party making the claim in sufficient detail that a recipient will
-          know whom to contact. If Contributor obtains such knowledge after
-          the Modification is made available as described in Section 3.2,
-          Contributor shall promptly modify the LEGAL file in all copies
-          Contributor makes available thereafter and shall take other steps
-          (such as notifying appropriate mailing lists or newsgroups)
-          reasonably calculated to inform those who received the Covered
-          Code that new knowledge has been obtained.
-
-          (b) Contributor APIs.
-          If Contributor's Modifications include an application programming
-          interface and Contributor has knowledge of patent licenses which
-          are reasonably necessary to implement that API, Contributor must
-          also include this information in the LEGAL file.
-
-               (c)    Representations.
-          Contributor represents that, except as disclosed pursuant to
-          Section 3.4(a) above, Contributor believes that Contributor's
-          Modifications are Contributor's original creation(s) and/or
-          Contributor has sufficient rights to grant the rights conveyed by
-          this License.
-
-     3.5. Required Notices.
-     You must duplicate the notice in Exhibit A in each file of the Source
-     Code.  If it is not possible to put such notice in a particular Source
-     Code file due to its structure, then You must include such notice in a
-     location (such as a relevant directory) where a user would be likely
-     to look for such a notice.  If You created one or more Modification(s)
-     You may add your name as a Contributor to the notice described in
-     Exhibit A.  You must also duplicate this License in any documentation
-     for the Source Code where You describe recipients' rights or ownership
-     rights relating to Covered Code.  You may choose to offer, and to
-     charge a fee for, warranty, support, indemnity or liability
-     obligations to one or more recipients of Covered Code. However, You
-     may do so only on Your own behalf, and not on behalf of the Initial
-     Developer or any Contributor. You must make it absolutely clear than
-     any such warranty, support, indemnity or liability obligation is
-     offered by You alone, and You hereby agree to indemnify the Initial
-     Developer and every Contributor for any liability incurred by the
-     Initial Developer or such Contributor as a result of warranty,
-     support, indemnity or liability terms You offer.
-
-     3.6. Distribution of Executable Versions.
-     You may distribute Covered Code in Executable form only if the
-     requirements of Section 3.1-3.5 have been met for that Covered Code,
-     and if You include a notice stating that the Source Code version of
-     the Covered Code is available under the terms of this License,
-     including a description of how and where You have fulfilled the
-     obligations of Section 3.2. The notice must be conspicuously included
-     in any notice in an Executable version, related documentation or
-     collateral in which You describe recipients' rights relating to the
-     Covered Code. You may distribute the Executable version of Covered
-     Code or ownership rights under a license of Your choice, which may
-     contain terms different from this License, provided that You are in
-     compliance with the terms of this License and that the license for the
-     Executable version does not attempt to limit or alter the recipient's
-     rights in the Source Code version from the rights set forth in this
-     License. If You distribute the Executable version under a different
-     license You must make it absolutely clear that any terms which differ
-     from this License are offered by You alone, not by the Initial
-     Developer or any Contributor. You hereby agree to indemnify the
-     Initial Developer and every Contributor for any liability incurred by
-     the Initial Developer or such Contributor as a result of any such
-     terms You offer.
-
-     3.7. Larger Works.
-     You may create a Larger Work by combining Covered Code with other code
-     not governed by the terms of this License and distribute the Larger
-     Work as a single product. In such a case, You must make sure the
-     requirements of this License are fulfilled for the Covered Code.
-
-4. Inability to Comply Due to Statute or Regulation.
-
-     If it is impossible for You to comply with any of the terms of this
-     License with respect to some or all of the Covered Code due to
-     statute, judicial order, or regulation then You must: (a) comply with
-     the terms of this License to the maximum extent possible; and (b)
-     describe the limitations and the code they affect. Such description
-     must be included in the LEGAL file described in Section 3.4 and must
-     be included with all distributions of the Source Code. Except to the
-     extent prohibited by statute or regulation, such description must be
-     sufficiently detailed for a recipient of ordinary skill to be able to
-     understand it.
-
-5. Application of this License.
-
-     This License applies to code to which the Initial Developer has
-     attached the notice in Exhibit A and to related Covered Code.
-
-6. Versions of the License.
-
-     6.1. New Versions.
-     Netscape Communications Corporation ("Netscape") may publish revised
-     and/or new versions of the License from time to time. Each version
-     will be given a distinguishing version number.
-
-     6.2. Effect of New Versions.
-     Once Covered Code has been published under a particular version of the
-     License, You may always continue to use it under the terms of that
-     version. You may also choose to use such Covered Code under the terms
-     of any subsequent version of the License published by Netscape. No one
-     other than Netscape has the right to modify the terms applicable to
-     Covered Code created under this License.
-
-     6.3. Derivative Works.
-     If You create or use a modified version of this License (which you may
-     only do in order to apply it to code which is not already Covered Code
-     governed by this License), You must (a) rename Your license so that
-     the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape",
-     "MPL", "NPL" or any confusingly similar phrase do not appear in your
-     license (except to note that your license differs from this License)
-     and (b) otherwise make it clear that Your version of the license
-     contains terms which differ from the Mozilla Public License and
-     Netscape Public License. (Filling in the name of the Initial
-     Developer, Original Code or Contributor in the notice described in
-     Exhibit A shall not of themselves be deemed to be modifications of
-     this License.)
-
-7. DISCLAIMER OF WARRANTY.
-
-     COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
-     WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
-     WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
-     DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
-     THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
-     IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
-     YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
-     COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
-     OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
-     ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
-
-8. TERMINATION.
-
-     8.1.  This License and the rights granted hereunder will terminate
-     automatically if You fail to comply with terms herein and fail to cure
-     such breach within 30 days of becoming aware of the breach. All
-     sublicenses to the Covered Code which are properly granted shall
-     survive any termination of this License. Provisions which, by their
-     nature, must remain in effect beyond the termination of this License
-     shall survive.
-
-     8.2.  If You initiate litigation by asserting a patent infringement
-     claim (excluding declatory judgment actions) against Initial Developer
-     or a Contributor (the Initial Developer or Contributor against whom
-     You file such action is referred to as "Participant")  alleging that:
-
-     (a)  such Participant's Contributor Version directly or indirectly
-     infringes any patent, then any and all rights granted by such
-     Participant to You under Sections 2.1 and/or 2.2 of this License
-     shall, upon 60 days notice from Participant terminate prospectively,
-     unless if within 60 days after receipt of notice You either: (i)
-     agree in writing to pay Participant a mutually agreeable reasonable
-     royalty for Your past and future use of Modifications made by such
-     Participant, or (ii) withdraw Your litigation claim with respect to
-     the Contributor Version against such Participant.  If within 60 days
-     of notice, a reasonable royalty and payment arrangement are not
-     mutually agreed upon in writing by the parties or the litigation claim
-     is not withdrawn, the rights granted by Participant to You under
-     Sections 2.1 and/or 2.2 automatically terminate at the expiration of
-     the 60 day notice period specified above.
-
-     (b)  any software, hardware, or device, other than such Participant's
-     Contributor Version, directly or indirectly infringes any patent, then
-     any rights granted to You by such Participant under Sections 2.1(b)
-     and 2.2(b) are revoked effective as of the date You first made, used,
-     sold, distributed, or had made, Modifications made by that
-     Participant.
-
-     8.3.  If You assert a patent infringement claim against Participant
-     alleging that such Participant's Contributor Version directly or
-     indirectly infringes any patent where such claim is resolved (such as
-     by license or settlement) prior to the initiation of patent
-     infringement litigation, then the reasonable value of the licenses
-     granted by such Participant under Sections 2.1 or 2.2 shall be taken
-     into account in determining the amount or value of any payment or
-     license.
-
-     8.4.  In the event of termination under Sections 8.1 or 8.2 above,
-     all end user license agreements (excluding distributors and resellers)
-     which have been validly granted by You or any distributor hereunder
-     prior to termination shall survive termination.
-
-9. LIMITATION OF LIABILITY.
-
-     UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
-     (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL
-     DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
-     OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR
-     ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
-     CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,
-     WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
-     COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
-     INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
-     LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
-     RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
-     PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
-     EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
-     THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
-
-10. U.S. GOVERNMENT END USERS.
-
-     The Covered Code is a "commercial item," as that term is defined in
-     48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
-     software" and "commercial computer software documentation," as such
-     terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
-     C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
-     all U.S. Government End Users acquire Covered Code with only those
-     rights set forth herein.
-
-11. MISCELLANEOUS.
-
-     This License represents the complete agreement concerning subject
-     matter hereof. If any provision of this License is held to be
-     unenforceable, such provision shall be reformed only to the extent
-     necessary to make it enforceable. This License shall be governed by
-     California law provisions (except to the extent applicable law, if
-     any, provides otherwise), excluding its conflict-of-law provisions.
-     With respect to disputes in which at least one party is a citizen of,
-     or an entity chartered or registered to do business in the United
-     States of America, any litigation relating to this License shall be
-     subject to the jurisdiction of the Federal Courts of the Northern
-     District of California, with venue lying in Santa Clara County,
-     California, with the losing party responsible for costs, including
-     without limitation, court costs and reasonable attorneys' fees and
-     expenses. The application of the United Nations Convention on
-     Contracts for the International Sale of Goods is expressly excluded.
-     Any law or regulation which provides that the language of a contract
-     shall be construed against the drafter shall not apply to this
-     License.
-
-12. RESPONSIBILITY FOR CLAIMS.
-
-     As between Initial Developer and the Contributors, each party is
-     responsible for claims and damages arising, directly or indirectly,
-     out of its utilization of rights under this License and You agree to
-     work with Initial Developer and Contributors to distribute such
-     responsibility on an equitable basis. Nothing herein is intended or
-     shall be deemed to constitute any admission of liability.
-
-13. MULTIPLE-LICENSED CODE.
-
-     Initial Developer may designate portions of the Covered Code as
-     "Multiple-Licensed".  "Multiple-Licensed" means that the Initial
-     Developer permits you to utilize portions of the Covered Code under
-     Your choice of the NPL or the alternative licenses, if any, specified
-     by the Initial Developer in the file described in Exhibit A.
-
-EXHIBIT A -Mozilla Public License.
-
-     ``The contents of this file are subject to the Mozilla Public License
-     Version 1.1 (the "License"); you may not use this file except in
-     compliance with the License. You may obtain a copy of the License at
-     http://www.mozilla.org/MPL/
-
-     Software distributed under the License is distributed on an "AS IS"
-     basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
-     License for the specific language governing rights and limitations
-     under the License.
-
-     The Original Code is ______________________________________.
-
-     The Initial Developer of the Original Code is ________________________.
-     Portions created by ______________________ are Copyright (C) ______
-     _______________________. All Rights Reserved.
-
-     Contributor(s): ______________________________________.
-
-     Alternatively, the contents of this file may be used under the terms
-     of the _____ license (the  "[___] License"), in which case the
-     provisions of [______] License are applicable instead of those
-     above.  If you wish to allow use of your version of this file only
-     under the terms of the [____] License and not to allow others to use
-     your version of this file under the MPL, indicate your decision by
-     deleting  the provisions above and replace  them with the notice and
-     other provisions required by the [___] License.  If you do not delete
-     the provisions above, a recipient may use your version of this file
-     under either the MPL or the [___] License."
-
-     [NOTE: The text of this Exhibit A may differ slightly from the text of
-     the notices in the Source Code files of the Original Code. You should
-     use the text of this Exhibit A rather than the text found in the
-     Original Code Source Code for Your Modifications.]
-
diff --git a/make/lib/swt/cocoa-macosx/swt-debug.jar b/make/lib/swt/cocoa-macosx/swt-debug.jar
deleted file mode 100644
index 6e1a2a5..0000000
Binary files a/make/lib/swt/cocoa-macosx/swt-debug.jar and /dev/null differ
diff --git a/make/lib/swt/epl-v10.html b/make/lib/swt/epl-v10.html
deleted file mode 100644
index fd39122..0000000
--- a/make/lib/swt/epl-v10.html
+++ /dev/null
@@ -1,261 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
-<title>Eclipse Public License - Version 1.0</title>
-<style type="text/css">
-  body {
-    size: 8.5in 11.0in;
-    margin: 0.25in 0.5in 0.25in 0.5in;
-    tab-interval: 0.5in;
-    }
-  p {  	
-    margin-left: auto;
-    margin-top:  0.5em;
-    margin-bottom: 0.5em;
-    }
-  p.list {
-  	margin-left: 0.5in;
-    margin-top:  0.05em;
-    margin-bottom: 0.05em;
-    }
-  </style>
-
-</head>
-
-<body lang="EN-US">
-
-<h2>Eclipse Public License - v 1.0</h2>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">where such changes and/or additions to the Program
-originate from and are distributed by that particular Contributor. A
-Contribution 'originates' from a Contributor if it was added to the
-Program by such Contributor itself or anyone acting on such
-Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in
-conjunction with the Program under their own license agreement, and (ii)
-are not derivative works of the Program.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" mean patent claims licensable by a
-Contributor which are necessarily infringed by the use or sale of its
-Contribution alone or when combined with the Program.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to reproduce, prepare derivative works
-of, publicly display, publicly perform, distribute and sublicense the
-Contribution of such Contributor, if any, and such derivative works, in
-source code and object code form.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free patent license under Licensed Patents to make, use, sell,
-offer to sell, import and otherwise transfer the Contribution of such
-Contributor, if any, in source code and object code form. This patent
-license shall apply to the combination of the Contribution and the
-Program if, at the time the Contribution is added by the Contributor,
-such addition of the Contribution causes such combination to be covered
-by the Licensed Patents. The patent license shall not apply to any other
-combinations which include the Contribution. No hardware per se is
-licensed hereunder.</p>
-
-<p class="list">c) Recipient understands that although each Contributor
-grants the licenses to its Contributions set forth herein, no assurances
-are provided by any Contributor that the Program does not infringe the
-patent or other intellectual property rights of any other entity. Each
-Contributor disclaims any liability to Recipient for claims brought by
-any other entity based on infringement of intellectual property rights
-or otherwise. As a condition to exercising the rights and licenses
-granted hereunder, each Recipient hereby assumes sole responsibility to
-secure any other intellectual property rights needed, if any. For
-example, if a third party patent license is required to allow Recipient
-to distribute the Program, it is Recipient's responsibility to acquire
-that license before distributing the Program.</p>
-
-<p class="list">d) Each Contributor represents that to its knowledge it
-has sufficient copyright rights in its Contribution, if any, to grant
-the copyright license set forth in this Agreement.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">i) effectively disclaims on behalf of all Contributors
-all warranties and conditions, express and implied, including warranties
-or conditions of title and non-infringement, and implied warranties or
-conditions of merchantability and fitness for a particular purpose;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">iv) states that source code for the Program is available
-from such Contributor, and informs licensees how to obtain it in a
-reasonable manner on or through a medium customarily used for software
-exchange.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>Each Contributor must identify itself as the originator of its
-Contribution, if any, in a manner that reasonably allows subsequent
-Recipients to identify the originator of the Contribution.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>Commercial distributors of software may accept certain
-responsibilities with respect to end users, business partners and the
-like. While this license is intended to facilitate the commercial use of
-the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create
-potential liability for other Contributors. Therefore, if a Contributor
-includes the Program in a commercial product offering, such Contributor
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-arising from claims, lawsuits and other legal actions brought by a third
-party against the Indemnified Contributor to the extent caused by the
-acts or omissions of such Commercial Contributor in connection with its
-distribution of the Program in a commercial product offering. The
-obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In
-order to qualify, an Indemnified Contributor must: a) promptly notify
-the Commercial Contributor in writing of such claim, and b) allow the
-Commercial Contributor to control, and cooperate with the Commercial
-Contributor in, the defense and any related settlement negotiations. The
-Indemnified Contributor may participate in any such claim at its own
-expense.</p>
-
-<p>For example, a Contributor might include the Program in a commercial
-product offering, Product X. That Contributor is then a Commercial
-Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance
-claims and warranties are such Commercial Contributor's responsibility
-alone. Under this section, the Commercial Contributor would have to
-defend claims against the other Contributors related to those
-performance claims and warranties, and if a court requires any other
-Contributor to pay any damages as a result, the Commercial Contributor
-must pay those damages.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
-OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION,
-ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
-OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and
-distributing the Program and assumes all risks associated with its
-exercise of rights under this Agreement , including but not limited to
-the risks and costs of program errors, compliance with applicable laws,
-damage to or loss of data, programs or equipment, and unavailability or
-interruption of operations.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT
-NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
-WITHOUT LIMITATION LOST PROFITS), 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 OR
-DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
-HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>If any provision of this Agreement is invalid or unenforceable under
-applicable law, it shall not affect the validity or enforceability of
-the remainder of the terms of this Agreement, and without further action
-by the parties hereto, such provision shall be reformed to the minimum
-extent necessary to make such provision valid and enforceable.</p>
-
-<p>If Recipient institutes patent litigation against any entity
-(including a cross-claim or counterclaim in a lawsuit) alleging that the
-Program itself (excluding combinations of the Program with other
-software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the
-date such litigation is filed.</p>
-
-<p>All Recipient's rights under this Agreement shall terminate if it
-fails to comply with any of the material terms or conditions of this
-Agreement and does not cure such failure in a reasonable period of time
-after becoming aware of such noncompliance. If all Recipient's rights
-under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive.</p>
-
-<p>Everyone is permitted to copy and distribute copies of this
-Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The
-Agreement Steward reserves the right to publish new versions (including
-revisions) of this Agreement from time to time. No one other than the
-Agreement Steward has the right to modify this Agreement. The Eclipse
-Foundation is the initial Agreement Steward. The Eclipse Foundation may
-assign the responsibility to serve as the Agreement Steward to a
-suitable separate entity. Each new version of the Agreement will be
-given a distinguishing version number. The Program (including
-Contributions) may always be distributed subject to the version of the
-Agreement under which it was received. In addition, after a new version
-of the Agreement is published, Contributor may elect to distribute the
-Program (including its Contributions) under the new version. Except as
-expressly stated in Sections 2(a) and 2(b) above, Recipient receives no
-rights or licenses to the intellectual property of any Contributor under
-this Agreement, whether expressly, by implication, estoppel or
-otherwise. All rights in the Program not expressly granted under this
-Agreement are reserved.</p>
-
-<p>This Agreement is governed by the laws of the State of New York and
-the intellectual property laws of the United States of America. No party
-to this Agreement will bring a legal action under this Agreement more
-than one year after the cause of action arose. Each party waives its
-rights to a jury trial in any resulting litigation.</p>
-
-</body>
-
-</html>
diff --git a/make/lib/swt/gtk-linux-x86/about.html b/make/lib/swt/gtk-linux-x86/about.html
deleted file mode 100644
index 6c5fbd8..0000000
--- a/make/lib/swt/gtk-linux-x86/about.html
+++ /dev/null
@@ -1,301 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
- 
-<p>August 17, 2006</p>	
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in ("Content").  Unless otherwise 
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 ("EPL").  A copy of the EPL is available 
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, "Program" will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is 
-being redistributed by another party ("Redistributor") and different terms and conditions may
-apply to your use of any object code in the Content.  Check the Redistributor's license that was 
-provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-<h3>Third Party Content</h3>
-
-<p>The Content includes items that have been sourced from third parties as set out below. If you 
-did not receive this Content directly from the Eclipse Foundation, the following is provided 
-for informational purposes only, and you should look to the Redistributor’s license for 
-terms and conditions of use.</p>
-
-<h4>Gnome Binding</h4>
-
-<p>The "Gnome Binding" is a binding to the Gnome API.  The Content may include any or all of the following files:</p>
-
-<p>The following files in the plug-in JAR shall be defined as the native code portion of the Gnome Binding:</p>
-<ul>
-	<li>libswt-gnome-gtk-xxxx.so (where "xxxx" is the version number)</li>
-</ul>
-
-<p>The following files in both the plug-in JAR and the src.zip shall be defined respectively as the bytecode and source code portions of the Gnome Binding:</p>
-<ul>
-	<li>The contents of the directory org/eclipse/swt/internal/gnome (but not including any sub-directories)</li>
-</ul>
-
-<p>The Gnome Binding contains portions of Gnome ("Library").  Gnome is made available by The Free Software Foundation.  Use of the Library is governed by the terms and
-conditions of the GNU Lesser General Public License Version 2.1 ("LGPL").  Use of the Gnome Binding on a standalone
-basis, is also governed by the terms and conditions of the LGPL.  A copy of the LGPL is provided with the Content (<a href="about_files/lgpl-v21.txt" target="_blank">lgpl-v21.txt</a>) and is also available at
-<a href="http://www.gnu.org/licenses/lgpl.html" target="_blank">http://www.gnu.org/licenses/lgpl.html</a>.</p>
-
-<p>In accordance with Section 6 of the LGPL, you may combine or link a "work that uses the Library" (e.g. the SWT) with the Library to produce a work
-containing portions of the Library (e.g. the Gnome Binding) and distribute that work under the terms of your choice (e.g. the EPL) provided you comply with all
-other terms and conditions of Section 6 as well as other Sections of the LGPL.  Please note, if you modify the Gnome Binding such modifications shall be
-governed by the terms and conditions of the LGPL.  Also note, the terms of the EPL permit you to modify the combined work and the source code of the combined
-work is provided for debugging purposes so there is no need to reverse engineer the combined work.</p>
-
-<h4>GTK+ Binding</h4>
-
-<p>The "GTK+ Binding" is a binding to the GTK+ API.  The Content may include any or all of the following files:</p>
-
-<p>The following files in the plug-in JAR shall be defined as the native code portion of the GTK+ Binding:</p>
-<ul>
-	<li>libswt-atk-gtk-xxxx.so (where "xxxx" is the version number)</li>
-	<li>libswt-pi-gtk-xxxx.so (where "xxxx" is the version number)</li>
-</ul>
-
-<p>The following files in both the plug-in JAR and the src.zip shall be defined respectively as the bytecode and source code portions of the GTK+ Binding:</p>
-<ul>
-	<li>The contents of the directory org/eclipse/swt/internal/accessibility/gtk (but not including any sub-directories)</li>
-	<li>The contents of the directory org/eclipse/swt/internal/cde (but not including any sub-directories)</li>
-	<li>The contents of the directory org/eclipse/swt/internal/gtk (but not including any sub-directories)</li>				
-</ul>
-
-<p>The GTK+ Binding contains portions of GTK+ ("Library").  GTK+ is made available by The Free Software Foundation.  Use of the Library is governed by the terms and
-conditions of the GNU Lesser General Public License Version 2.1 ("LGPL").  Use of the GTK+ Binding on a standalone
-basis, is also governed by the terms and conditions of the LGPL.  A copy of the LGPL is provided with the Content (<a href="about_files/lgpl-v21.txt" target="_blank">lgpl-v21.txt</a>) and is also available at
-<a href="http://www.gnu.org/licenses/lgpl.html" target="_blank">http://www.gnu.org/licenses/lgpl.html</a>.</p>
-
-<p>In accordance with Section 6 of the LGPL, you may combine or link a "work that uses the Library" (e.g. the SWT) with the Library to produce a work
-containing portions of the Library (e.g. the GTK+ Binding) and distribute that work under the terms of your choice (e.g. the EPL) provided you comply with all
-other terms and conditions of Section 6 as well as other Sections of the LGPL.  Please note, if you modify the GTK+ Binding such modifications shall be
-governed by the terms and conditions of the LGPL.  Also note, the terms of the EPL permit you to modify the combined work and the source code of the combined
-work is provided for debugging purposes so there is no need to reverse engineer the combined work.</p>
-
-<h4>WebKitGTK+ Binding</h4>
-
-<p>The "WebKitGTK+ Binding" is a binding to the WebKitGTK+ API. The Content may include any or all of the following files:</p>
-
-<p>The following files in the plug-in JAR shall be defined as the native code portion of the WebKitGTK+ Binding:</p>
-
-<ul>
-    <li>libswt-webkit-gtk-xxxx.so (where "xxxx" is the version number)</li>
-</ul>
-
-<p>The following files in both the plug-in JAR and the src.zip shall be defined respectively as the bytecode and source code portions of the WebKitGTK+ Binding:</p>
-<ul>
-    <li>The contents of the directory org/eclipse/swt/internal/webkit (but not including any sub-directories)</li>
-</ul>
-
-<p>
-The WebKitGTK+ Binding contains portions of WebKitGTK+ ("Library"). WebKitGTK+ is made available by the WebKitGTK+ open source project (<a href="http://webkitgtk.org/" target="_blank">http://webkit.org/</a>). Use of the Library is governed by the terms and conditions of the GNU Lesser General Public License Version 2.1 ("LGPL"). Use of the WebKitGTK+ Binding on a standalone basis, is also governed by the terms and conditions of the LGPL. A copy of the LGPL is provided [...]
-
-<p>
-In accordance with Section 6 of the LGPL, you may combine or link a "work that uses the Library" (e.g. the SWT) with the Library to produce a work containing portions of the Library (e.g. the WebKitGTK+ Binding) and distribute that work under the terms of your choice (e.g. the EPL) provided you comply with all other terms and conditions of Section 6 as well as other Sections of the LGPL. Please note, if you modify the WebKitGTK+ Binding such modifications shall be governed by t [...]
-
-<p>The WebKitGTK+ Binding also contains portions of the WebKit JavaScriptCore code which is made available by the WebKit open source project (<a href="http://webkit.org/" target="_blank">http://webkit.org/</a>).  The WebKit JavaScriptCore code was obtained under the terms of the BSD license.  A copy of the BSD license is provided (<a href="about_files/webkit-bsd.txt"target="_blank">webkit-bsd.txt</a>) and is also available at <a href="http://webkit.org/coding/bsd-license.html" target="_b [...]
-
-<h4>libsoup</h4>
-
-<p>The "WebKitGTK+ Binding" also includes a binding to the libsoup API. The Content may include any or all of the following files:</p>
-
-<p>The following files in the plug-in JAR shall be defined as the native code portion of the WebKitGTK+ Binding:</p>
-<ul>
-    <li>libswt-webkit-gtk-xxxx.so (where "xxxx" is the version number)</li>
-</ul>
-
-<p>The following files in both the plug-in JAR and the src.zip shall be defined respectively as the bytecode and source code portions of the WebKitGTK+ Binding:</p>
-<ul>
-    <li>The contents of the directory org/eclipse/swt/internal/webkit (but not including any sub-directories)</li>
-</ul>
-
-<p>The WebKitGTK+ Binding contains portions of libsoup ("Library"). libsoup is made available by The GNOME Project (<a href="http://live.gnome.org/LibSoup" target="_blank">http://live.gnome.org/LibSoup/</a>). Use of the Library is governed by the terms and conditions of the GNU Lesser General Public License Version 2.1 ("LGPL"). Use of the WebKitGTK+ Binding on a standalone basis, is also governed by the terms and conditions of the LGPL. A copy of the LGPL is provided [...]
-
-<h4>Mozilla Binding</h4>
-
-<p>The "Mozilla Binding" is a binding to the Mozilla API.  The Content may include any or all of the following files:</p>
-
-<p>The following files in the plug-in JAR shall be defined as the native code portion of the Mozilla Binding:</p>
-<ul>
-	<li>libswt-mozilla-gtk-xxxx.so (where "xxxx" is the version number)</li>
-	<li>libswt-mozilla-gcc3-gtk-xxxx.so (where "xxxx" is the version number)</li>
-	<li>libswt-xulrunner-gtk-xxxx.so (where "xxxx" is the version number)</li>
-	<li>libswt-xpcominit-gtk-xxxx.so (where "xxxx" is the version number)</li>
-</ul>
-
-<p>The following files in both the plug-in JAR and the src.zip shall be defined respectively as the bytecode and source code portions of the Mozilla Binding:</p>
-<ul>
-	<li>The contents of the directory org/eclipse/swt/internal/mozilla (but not including any sub-directories)</li>
-</ul>
-
-<p>The Mozilla Binding contains portions of Mozilla ("Mozilla").  Mozilla is made available by Mozilla.org.  Use of Mozilla is governed by the terms and
-conditions of the Mozilla Public License Version 1.1 ("MPL").  A copy of the MPL is provided with the Content (<a href="about_files/mpl-v11.txt" target="_blank">mpl-v11.txt</a>) and is also available at
-<a href="http://www.mozilla.org/MPL/MPL-1.1.html" target="_blank">http://www.mozilla.org/MPL/MPL-1.1.html</a>.</p>
-
-<h4>XULRunner 1.9 (subset, derivative work)</h4>
-
-The libraries libswt-xulrunner-gtk-xxxx.so, libswt-mozilla-gtk-xxxx.so, and libswt-mozilla-gcc3-gtk-xxxx.so (where "xxxx" is the version number) contain a small portion of XULRunner 1.9 content (header files)
-that have been modified from the Original Code provided by mozilla.org, and whose Initial Developer is Netscape Communications Corporation. Use of this code is governed by
-the terms and conditions of the Mozilla Public License Version 1.1 ("MPL").  A copy of the MPL is provided with the Content (<a href="./about_files/mpl-v11.txt">mpl-v11.txt</a>)
-and is also available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>.
-<p>The changed files are:
-<ul>
-  <li>org.eclipse.swt/Eclipse SWT Mozilla/common/library/nsIScriptContext.h</code>
-  <li>org.eclipse.swt/Eclipse SWT Mozilla/common/library/nsIScriptGlobalObject.h</code>
-</ul>
-Changes to the original files were made by SWT on April 7, 2009 and are marked with trailing comment <em>"//SWT-20090407"</em>.
-
-<h4>Cairo Binding</h4>
-
-<p>The "Cairo Binding" is a binding to the Cairo API.  The Content may include any or all of the following files:</p>
-
-<p>The following files in the plug-in JAR shall be defined as the native code portion of the Cairo Binding:</p>
-<ul>
-	<li>libswt-cairo-gtk-xxxx.so (where "xxxx" is the version number)</li>
-</ul>
-
-<p>The following files in both the plug-in JAR and the src.zip shall be defined respectively as the bytecode and source code portions of the Cairo Binding:</p>
-<ul>
-	<li>The contents of the directory org/eclipse/swt/internal/cairo (but not including any sub-directories)</li>
-</ul>
-
-<p>The Cairo Binding contains portions of Cairo ("Cairo").  Cairo is made available by the Cairo project at
-<a href="http://www.cairographics.org" target="_blank">http://www.cairographics.org</a>.  Use of Cairo by the Cairo Binding is governed by the terms and
-conditions of the Mozilla Public License Version 1.1 ("MPL").  A copy of the MPL is
-provided with the Content (<a href="about_files/mpl-v11.txt" target="_blank">mpl-v11.txt</a>) and is also available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>.</p>
-
-<h4>Cairo for Linux</h4>
-
-<p>Refer to the file <a href="about_files/about_cairo.html">about_files/about_cairo.html</a> for licensing details about "Cairo for Linux."
-
-<h4>Independent JPEG Group's JPEG software release 6b</h4>
-
-<p>This software is based in part on the work of the Independent JPEG Group's JPEG software release 6b ("LIBJPEG").
-LIBJPEG was used to implement the decoding of JPEG format files in Java (TM).  The Content does NOT include any portion of the LIBJPEG file ansi2knr.c.</p>
-
-<p>Your use of LIBJPEG is subject to the terms and conditions located in the <a href="about_files/IJG_README">about_files/IJG_README</a> file which is included
-with the Content.</p>
-
-<p>The IJG's website is located at <a href="http://ijg.org/" target="_blank">http://ijg.org</a>.</p>
-
-<p>The class org.eclipse.swt.internal.image.JPEGFileFormat is based on following files from LIBJPEG:</p>
-
-<ul>
-    <li>cderror.h</li>
-    <li>cdjpeg.h</li>
-    <li>jchuff.h</li>
-    <li>jdcolor.c</li>
-    <li>jdct.h</li>
-    <li>jdhuff.h</li>
-    <li>jerror.h</li>
-    <li>jidctint.c</li>
-    <li>jinclude.h</li>
-    <li>jmemsys.h</li>
-    <li>jmorecfg.h</li>
-    <li>jpegint.h</li>
-    <li>jpeglib.h</li>
-    <li>jversion.h</li>
-    <li>transupp.h</li>
-</ul>
-
-<p>The class org.eclipse.swt.internal.image.JPEGDecoder is based on the following files from LIBJPEG:</p>
-
-<ul>
-	<li>jcapimin.c</li>
-	<li>jcapistd.c</li>
-	<li>jccoefct.c</li>
-	<li>jccolor.c</li>
-	<li>jcdctmgr.c</li>
-	<li>jchuff.c</li>
-	<li>jcinit.c</li>
-	<li>jcmainct.c</li>
-	<li>jcmarker.c</li>
-	<li>jcmaster.c</li>
-	<li>jcomapi.c</li>
-	<li>jcparam.c</li>
-	<li>jcphuff.c</li>
-	<li>jcprepct.c</li>
-	<li>jcsample.c</li>
-	<li>jctrans.c</li>
-	<li>jdapimin.c</li>
-	<li>jdapistd.c</li>
-	<li>jdatadst.c</li>
-	<li>jdatasrc.c</li>
-	<li>jdcoefct.c</li>
-	<li>jdcolor.c</li>
-	<li>jddctmgr.c</li>
-	<li>jdhuff.c</li>
-	<li>jdinput.c</li>
-	<li>jdmainct.c</li>
-	<li>jdmarker.c</li>
-	<li>jdmaster.c</li>
-	<li>jdmerge.c</li>
-	<li>jdphuff.c</li>
-	<li>jdpostct.c</li>
-	<li>jdsample.c</li>
-	<li>jdtrans.c</li>
-	<li>jerror.c</li>
-	<li>jfdctflt.c</li>
-	<li>jfdctfst.c</li>
-	<li>jfdctint.c</li>
-	<li>jidctflt.c</li>
-	<li>jidctfst.c</li>
-	<li>jidctint.c</li>
-	<li>jidctred.c</li>
-	<li>jpegtran.c</li>
-	<li>jquant1.c</li>
-	<li>jquant2.c</li>
-	<li>jutils.c</li>
-	<li>cderror.h</li>
-	<li>cdjpeg.h</li>
-	<li>jchuff.h</li>
-	<li>jconfig.h</li>
-	<li>jdct.h</li>
-	<li>jdhuff.h</li>
-	<li>jerror.h</li>
-	<li>jinclude.h</li>
-	<li>jmorecfg.h</li>
-	<li>jpegint.h</li>
-	<li>jpeglib.h</li>
-	<li>jversion.h</li>
-	<li>transupp.h</li>
-</ul>
-	
-<p>The following changes were made to the LIBJPEG code in the Content:</p>
-
-<ol>
-	<li>In Java, pointer math is not allowed so indexing was used instead.</li>
-	<li>Function pointers were replaced with switch statements.</li>
-	<li>The virtual memory, tracing and progress monitoring were removed.</li>
-	<li>The error handling was simplified and now uses Java exceptions.</li>
-</ol>
-
-<h4>PuTTY 0.58 (derivative work)</h4>
-
-<p>Portions of the SWT class org/eclipse/swt/internal/image/PngDeflater are based on PuTTY's sshzlib.c. PuTTY is made available by Mozilla.org.  Use of PuTTY is governed by the terms and
-conditions of the the following MIT-style license:  </p>
-<blockquote>
-  <p><em>PuTTY is copyright 1997-2007 Simon Tatham.</em> </p>
-  <p><em>Portions copyright Robert de Bath, Joris van Rantwijk, Delian  Delchev, Andreas Schultz, Jeroen Massar, Wez Furlong, Nicolas Barry,  Justin Bradford, Ben Harris, Malcolm Smith, Ahmad Khalifa, Markus Kuhn,  and CORE SDI S.A.</em> </p>
-  <p><em>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:</em> </p>
-  <p><em>The above copyright notice and this permission notice shall be  included in all copies or substantial portions of the Software.</em> </p>
-  <p><em>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 SIMON TATHAM 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.</em> </p>
-</blockquote>
-<p>A copy of the license is also available at <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/licence.html" target="_blank">http://www.chiark.greenend.org.uk/~sgtatham/putty/licence.html</a>.</p>
-
-<p><small>Java and all Java-based trademarks and logos are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries.</small></p>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/make/lib/swt/gtk-linux-x86/about_files/IJG_README b/make/lib/swt/gtk-linux-x86/about_files/IJG_README
deleted file mode 100644
index 86cc206..0000000
--- a/make/lib/swt/gtk-linux-x86/about_files/IJG_README
+++ /dev/null
@@ -1,385 +0,0 @@
-The Independent JPEG Group's JPEG software
-==========================================
-
-README for release 6b of 27-Mar-1998
-====================================
-
-This distribution contains the sixth public release of the Independent JPEG
-Group's free JPEG software.  You are welcome to redistribute this software and
-to use it for any purpose, subject to the conditions under LEGAL ISSUES, below.
-
-Serious users of this software (particularly those incorporating it into
-larger programs) should contact IJG at jpeg-info at uunet.uu.net to be added to
-our electronic mailing list.  Mailing list members are notified of updates
-and have a chance to participate in technical discussions, etc.
-
-This software is the work of Tom Lane, Philip Gladstone, Jim Boucher,
-Lee Crocker, Julian Minguillon, Luis Ortiz, George Phillips, Davide Rossi,
-Guido Vollbeding, Ge' Weijers, and other members of the Independent JPEG
-Group.
-
-IJG is not affiliated with the official ISO JPEG standards committee.
-
-
-DOCUMENTATION ROADMAP
-=====================
-
-This file contains the following sections:
-
-OVERVIEW            General description of JPEG and the IJG software.
-LEGAL ISSUES        Copyright, lack of warranty, terms of distribution.
-REFERENCES          Where to learn more about JPEG.
-ARCHIVE LOCATIONS   Where to find newer versions of this software.
-RELATED SOFTWARE    Other stuff you should get.
-FILE FORMAT WARS    Software *not* to get.
-TO DO               Plans for future IJG releases.
-
-Other documentation files in the distribution are:
-
-User documentation:
-  install.doc       How to configure and install the IJG software.
-  usage.doc         Usage instructions for cjpeg, djpeg, jpegtran,
-                    rdjpgcom, and wrjpgcom.
-  *.1               Unix-style man pages for programs (same info as usage.doc).
-  wizard.doc        Advanced usage instructions for JPEG wizards only.
-  change.log        Version-to-version change highlights.
-Programmer and internal documentation:
-  libjpeg.doc       How to use the JPEG library in your own programs.
-  example.c         Sample code for calling the JPEG library.
-  structure.doc     Overview of the JPEG library's internal structure.
-  filelist.doc      Road map of IJG files.
-  coderules.doc     Coding style rules --- please read if you contribute code.
-
-Please read at least the files install.doc and usage.doc.  Useful information
-can also be found in the JPEG FAQ (Frequently Asked Questions) article.  See
-ARCHIVE LOCATIONS below to find out where to obtain the FAQ article.
-
-If you want to understand how the JPEG code works, we suggest reading one or
-more of the REFERENCES, then looking at the documentation files (in roughly
-the order listed) before diving into the code.
-
-
-OVERVIEW
-========
-
-This package contains C software to implement JPEG image compression and
-decompression.  JPEG (pronounced "jay-peg") is a standardized compression
-method for full-color and gray-scale images.  JPEG is intended for compressing
-"real-world" scenes; line drawings, cartoons and other non-realistic images
-are not its strong suit.  JPEG is lossy, meaning that the output image is not
-exactly identical to the input image.  Hence you must not use JPEG if you
-have to have identical output bits.  However, on typical photographic images,
-very good compression levels can be obtained with no visible change, and
-remarkably high compression levels are possible if you can tolerate a
-low-quality image.  For more details, see the references, or just experiment
-with various compression settings.
-
-This software implements JPEG baseline, extended-sequential, and progressive
-compression processes.  Provision is made for supporting all variants of these
-processes, although some uncommon parameter settings aren't implemented yet.
-For legal reasons, we are not distributing code for the arithmetic-coding
-variants of JPEG; see LEGAL ISSUES.  We have made no provision for supporting
-the hierarchical or lossless processes defined in the standard.
-
-We provide a set of library routines for reading and writing JPEG image files,
-plus two sample applications "cjpeg" and "djpeg", which use the library to
-perform conversion between JPEG and some other popular image file formats.
-The library is intended to be reused in other applications.
-
-In order to support file conversion and viewing software, we have included
-considerable functionality beyond the bare JPEG coding/decoding capability;
-for example, the color quantization modules are not strictly part of JPEG
-decoding, but they are essential for output to colormapped file formats or
-colormapped displays.  These extra functions can be compiled out of the
-library if not required for a particular application.  We have also included
-"jpegtran", a utility for lossless transcoding between different JPEG
-processes, and "rdjpgcom" and "wrjpgcom", two simple applications for
-inserting and extracting textual comments in JFIF files.
-
-The emphasis in designing this software has been on achieving portability and
-flexibility, while also making it fast enough to be useful.  In particular,
-the software is not intended to be read as a tutorial on JPEG.  (See the
-REFERENCES section for introductory material.)  Rather, it is intended to
-be reliable, portable, industrial-strength code.  We do not claim to have
-achieved that goal in every aspect of the software, but we strive for it.
-
-We welcome the use of this software as a component of commercial products.
-No royalty is required, but we do ask for an acknowledgement in product
-documentation, as described under LEGAL ISSUES.
-
-
-LEGAL ISSUES
-============
-
-In plain English:
-
-1. We don't promise that this software works.  (But if you find any bugs,
-   please let us know!)
-2. You can use this software for whatever you want.  You don't have to pay us.
-3. You may not pretend that you wrote this software.  If you use it in a
-   program, you must acknowledge somewhere in your documentation that
-   you've used the IJG code.
-
-In legalese:
-
-The authors make NO WARRANTY or representation, either express or implied,
-with respect to this software, its quality, accuracy, merchantability, or
-fitness for a particular purpose.  This software is provided "AS IS", and you,
-its user, assume the entire risk as to its quality and accuracy.
-
-This software is copyright (C) 1991-1998, Thomas G. Lane.
-All Rights Reserved except as specified below.
-
-Permission is hereby granted to use, copy, modify, and distribute this
-software (or portions thereof) for any purpose, without fee, subject to these
-conditions:
-(1) If any part of the source code for this software is distributed, then this
-README file must be included, with this copyright and no-warranty notice
-unaltered; and any additions, deletions, or changes to the original files
-must be clearly indicated in accompanying documentation.
-(2) If only executable code is distributed, then the accompanying
-documentation must state that "this software is based in part on the work of
-the Independent JPEG Group".
-(3) Permission for use of this software is granted only if the user accepts
-full responsibility for any undesirable consequences; the authors accept
-NO LIABILITY for damages of any kind.
-
-These conditions apply to any software derived from or based on the IJG code,
-not just to the unmodified library.  If you use our work, you ought to
-acknowledge us.
-
-Permission is NOT granted for the use of any IJG author's name or company name
-in advertising or publicity relating to this software or products derived from
-it.  This software may be referred to only as "the Independent JPEG Group's
-software".
-
-We specifically permit and encourage the use of this software as the basis of
-commercial products, provided that all warranty or liability claims are
-assumed by the product vendor.
-
-
-ansi2knr.c is included in this distribution by permission of L. Peter Deutsch,
-sole proprietor of its copyright holder, Aladdin Enterprises of Menlo Park, CA.
-ansi2knr.c is NOT covered by the above copyright and conditions, but instead
-by the usual distribution terms of the Free Software Foundation; principally,
-that you must include source code if you redistribute it.  (See the file
-ansi2knr.c for full details.)  However, since ansi2knr.c is not needed as part
-of any program generated from the IJG code, this does not limit you more than
-the foregoing paragraphs do.
-
-The Unix configuration script "configure" was produced with GNU Autoconf.
-It is copyright by the Free Software Foundation but is freely distributable.
-The same holds for its supporting scripts (config.guess, config.sub,
-ltconfig, ltmain.sh).  Another support script, install-sh, is copyright
-by M.I.T. but is also freely distributable.
-
-It appears that the arithmetic coding option of the JPEG spec is covered by
-patents owned by IBM, AT&T, and Mitsubishi.  Hence arithmetic coding cannot
-legally be used without obtaining one or more licenses.  For this reason,
-support for arithmetic coding has been removed from the free JPEG software.
-(Since arithmetic coding provides only a marginal gain over the unpatented
-Huffman mode, it is unlikely that very many implementations will support it.)
-So far as we are aware, there are no patent restrictions on the remaining
-code.
-
-The IJG distribution formerly included code to read and write GIF files.
-To avoid entanglement with the Unisys LZW patent, GIF reading support has
-been removed altogether, and the GIF writer has been simplified to produce
-"uncompressed GIFs".  This technique does not use the LZW algorithm; the
-resulting GIF files are larger than usual, but are readable by all standard
-GIF decoders.
-
-We are required to state that
-    "The Graphics Interchange Format(c) is the Copyright property of
-    CompuServe Incorporated.  GIF(sm) is a Service Mark property of
-    CompuServe Incorporated."
-
-
-REFERENCES
-==========
-
-We highly recommend reading one or more of these references before trying to
-understand the innards of the JPEG software.
-
-The best short technical introduction to the JPEG compression algorithm is
-	Wallace, Gregory K.  "The JPEG Still Picture Compression Standard",
-	Communications of the ACM, April 1991 (vol. 34 no. 4), pp. 30-44.
-(Adjacent articles in that issue discuss MPEG motion picture compression,
-applications of JPEG, and related topics.)  If you don't have the CACM issue
-handy, a PostScript file containing a revised version of Wallace's article is
-available at ftp://ftp.uu.net/graphics/jpeg/wallace.ps.gz.  The file (actually
-a preprint for an article that appeared in IEEE Trans. Consumer Electronics)
-omits the sample images that appeared in CACM, but it includes corrections
-and some added material.  Note: the Wallace article is copyright ACM and IEEE,
-and it may not be used for commercial purposes.
-
-A somewhat less technical, more leisurely introduction to JPEG can be found in
-"The Data Compression Book" by Mark Nelson and Jean-loup Gailly, published by
-M&T Books (New York), 2nd ed. 1996, ISBN 1-55851-434-1.  This book provides
-good explanations and example C code for a multitude of compression methods
-including JPEG.  It is an excellent source if you are comfortable reading C
-code but don't know much about data compression in general.  The book's JPEG
-sample code is far from industrial-strength, but when you are ready to look
-at a full implementation, you've got one here...
-
-The best full description of JPEG is the textbook "JPEG Still Image Data
-Compression Standard" by William B. Pennebaker and Joan L. Mitchell, published
-by Van Nostrand Reinhold, 1993, ISBN 0-442-01272-1.  Price US$59.95, 638 pp.
-The book includes the complete text of the ISO JPEG standards (DIS 10918-1
-and draft DIS 10918-2).  This is by far the most complete exposition of JPEG
-in existence, and we highly recommend it.
-
-The JPEG standard itself is not available electronically; you must order a
-paper copy through ISO or ITU.  (Unless you feel a need to own a certified
-official copy, we recommend buying the Pennebaker and Mitchell book instead;
-it's much cheaper and includes a great deal of useful explanatory material.)
-In the USA, copies of the standard may be ordered from ANSI Sales at (212)
-642-4900, or from Global Engineering Documents at (800) 854-7179.  (ANSI
-doesn't take credit card orders, but Global does.)  It's not cheap: as of
-1992, ANSI was charging $95 for Part 1 and $47 for Part 2, plus 7%
-shipping/handling.  The standard is divided into two parts, Part 1 being the
-actual specification, while Part 2 covers compliance testing methods.  Part 1
-is titled "Digital Compression and Coding of Continuous-tone Still Images,
-Part 1: Requirements and guidelines" and has document numbers ISO/IEC IS
-10918-1, ITU-T T.81.  Part 2 is titled "Digital Compression and Coding of
-Continuous-tone Still Images, Part 2: Compliance testing" and has document
-numbers ISO/IEC IS 10918-2, ITU-T T.83.
-
-Some extensions to the original JPEG standard are defined in JPEG Part 3,
-a newer ISO standard numbered ISO/IEC IS 10918-3 and ITU-T T.84.  IJG
-currently does not support any Part 3 extensions.
-
-The JPEG standard does not specify all details of an interchangeable file
-format.  For the omitted details we follow the "JFIF" conventions, revision
-1.02.  A copy of the JFIF spec is available from:
-	Literature Department
-	C-Cube Microsystems, Inc.
-	1778 McCarthy Blvd.
-	Milpitas, CA 95035
-	phone (408) 944-6300,  fax (408) 944-6314
-A PostScript version of this document is available by FTP at
-ftp://ftp.uu.net/graphics/jpeg/jfif.ps.gz.  There is also a plain text
-version at ftp://ftp.uu.net/graphics/jpeg/jfif.txt.gz, but it is missing
-the figures.
-
-The TIFF 6.0 file format specification can be obtained by FTP from
-ftp://ftp.sgi.com/graphics/tiff/TIFF6.ps.gz.  The JPEG incorporation scheme
-found in the TIFF 6.0 spec of 3-June-92 has a number of serious problems.
-IJG does not recommend use of the TIFF 6.0 design (TIFF Compression tag 6).
-Instead, we recommend the JPEG design proposed by TIFF Technical Note #2
-(Compression tag 7).  Copies of this Note can be obtained from ftp.sgi.com or
-from ftp://ftp.uu.net/graphics/jpeg/.  It is expected that the next revision
-of the TIFF spec will replace the 6.0 JPEG design with the Note's design.
-Although IJG's own code does not support TIFF/JPEG, the free libtiff library
-uses our library to implement TIFF/JPEG per the Note.  libtiff is available
-from ftp://ftp.sgi.com/graphics/tiff/.
-
-
-ARCHIVE LOCATIONS
-=================
-
-The "official" archive site for this software is ftp.uu.net (Internet
-address 192.48.96.9).  The most recent released version can always be found
-there in directory graphics/jpeg.  This particular version will be archived
-as ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz.  If you don't have
-direct Internet access, UUNET's archives are also available via UUCP; contact
-help at uunet.uu.net for information on retrieving files that way.
-
-Numerous Internet sites maintain copies of the UUNET files.  However, only
-ftp.uu.net is guaranteed to have the latest official version.
-
-You can also obtain this software in DOS-compatible "zip" archive format from
-the SimTel archives (ftp://ftp.simtel.net/pub/simtelnet/msdos/graphics/), or
-on CompuServe in the Graphics Support forum (GO CIS:GRAPHSUP), library 12
-"JPEG Tools".  Again, these versions may sometimes lag behind the ftp.uu.net
-release.
-
-The JPEG FAQ (Frequently Asked Questions) article is a useful source of
-general information about JPEG.  It is updated constantly and therefore is
-not included in this distribution.  The FAQ is posted every two weeks to
-Usenet newsgroups comp.graphics.misc, news.answers, and other groups.
-It is available on the World Wide Web at http://www.faqs.org/faqs/jpeg-faq/
-and other news.answers archive sites, including the official news.answers
-archive at rtfm.mit.edu: ftp://rtfm.mit.edu/pub/usenet/news.answers/jpeg-faq/.
-If you don't have Web or FTP access, send e-mail to mail-server at rtfm.mit.edu
-with body
-	send usenet/news.answers/jpeg-faq/part1
-	send usenet/news.answers/jpeg-faq/part2
-
-
-RELATED SOFTWARE
-================
-
-Numerous viewing and image manipulation programs now support JPEG.  (Quite a
-few of them use this library to do so.)  The JPEG FAQ described above lists
-some of the more popular free and shareware viewers, and tells where to
-obtain them on Internet.
-
-If you are on a Unix machine, we highly recommend Jef Poskanzer's free
-PBMPLUS software, which provides many useful operations on PPM-format image
-files.  In particular, it can convert PPM images to and from a wide range of
-other formats, thus making cjpeg/djpeg considerably more useful.  The latest
-version is distributed by the NetPBM group, and is available from numerous
-sites, notably ftp://wuarchive.wustl.edu/graphics/graphics/packages/NetPBM/.
-Unfortunately PBMPLUS/NETPBM is not nearly as portable as the IJG software is;
-you are likely to have difficulty making it work on any non-Unix machine.
-
-A different free JPEG implementation, written by the PVRG group at Stanford,
-is available from ftp://havefun.stanford.edu/pub/jpeg/.  This program
-is designed for research and experimentation rather than production use;
-it is slower, harder to use, and less portable than the IJG code, but it
-is easier to read and modify.  Also, the PVRG code supports lossless JPEG,
-which we do not.  (On the other hand, it doesn't do progressive JPEG.)
-
-
-FILE FORMAT WARS
-================
-
-Some JPEG programs produce files that are not compatible with our library.
-The root of the problem is that the ISO JPEG committee failed to specify a
-concrete file format.  Some vendors "filled in the blanks" on their own,
-creating proprietary formats that no one else could read.  (For example, none
-of the early commercial JPEG implementations for the Macintosh were able to
-exchange compressed files.)
-
-The file format we have adopted is called JFIF (see REFERENCES).  This format
-has been agreed to by a number of major commercial JPEG vendors, and it has
-become the de facto standard.  JFIF is a minimal or "low end" representation.
-We recommend the use of TIFF/JPEG (TIFF revision 6.0 as modified by TIFF
-Technical Note #2) for "high end" applications that need to record a lot of
-additional data about an image.  TIFF/JPEG is fairly new and not yet widely
-supported, unfortunately.
-
-The upcoming JPEG Part 3 standard defines a file format called SPIFF.
-SPIFF is interoperable with JFIF, in the sense that most JFIF decoders should
-be able to read the most common variant of SPIFF.  SPIFF has some technical
-advantages over JFIF, but its major claim to fame is simply that it is an
-official standard rather than an informal one.  At this point it is unclear
-whether SPIFF will supersede JFIF or whether JFIF will remain the de-facto
-standard.  IJG intends to support SPIFF once the standard is frozen, but we
-have not decided whether it should become our default output format or not.
-(In any case, our decoder will remain capable of reading JFIF indefinitely.)
-
-Various proprietary file formats incorporating JPEG compression also exist.
-We have little or no sympathy for the existence of these formats.  Indeed,
-one of the original reasons for developing this free software was to help
-force convergence on common, open format standards for JPEG files.  Don't
-use a proprietary file format!
-
-
-TO DO
-=====
-
-The major thrust for v7 will probably be improvement of visual quality.
-The current method for scaling the quantization tables is known not to be
-very good at low Q values.  We also intend to investigate block boundary
-smoothing, "poor man's variable quantization", and other means of improving
-quality-vs-file-size performance without sacrificing compatibility.
-
-In future versions, we are considering supporting some of the upcoming JPEG
-Part 3 extensions --- principally, variable quantization and the SPIFF file
-format.
-
-As always, speeding things up is of great interest.
-
-Please send bug reports, offers of help, etc. to jpeg-info at uunet.uu.net.
diff --git a/make/lib/swt/gtk-linux-x86/about_files/about_cairo.html b/make/lib/swt/gtk-linux-x86/about_files/about_cairo.html
deleted file mode 100644
index 0132307..0000000
--- a/make/lib/swt/gtk-linux-x86/about_files/about_cairo.html
+++ /dev/null
@@ -1,48 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<title>About</title>
-<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
- 
-<p>March 27, 2006</p>	
-<h3>License</h3>
-
-<p>The Eclipse Foundation has included the following package for your convenience:</p> 
-
-<h4>Cairo 1.0.2 for Linux</h4>
-
-<p>Cairo for Linux ("Cairo") is developed by The Cairo Project (<a href="http://www.cairographics.org" target="_blank">http://www.cairographics.org</a>):</p>
-
-<p>Cairo is delivered in the following file ("Cairo Library"):</p>
-<ul>
-    <li>libcairo-swt.so</li>
-</ul>
-
-<p>which was compiled from Cairo source code available at <a href="http://www.cairographics.org/snapshots" target="_blank">http://www.cairographics.org/snapshots</a>.</p>
-
-<p>Your use of the Cairo code in binary form is subject to
-the terms and conditions of Mozilla Public License Version 1.1 ("MPL").  A copy of the MPL is provided (<a href="mpl-v11.txt" target="blank">mpl-v11.txt</a>)
-and is also available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html" target="_blank">http://www.mozilla.org/MPL/MPL-1.1.html.</a>
-
-<h4>pixman 0.1.6</h4>
-
-<p>pixman ("pixman") is packaged within the Cairo Library and was compiled from source code available at
-<a href="http://www.cairographics.org/snapshots" target="_blank">http://www.cairographics.org/snapshots</a>.
-pixman includes the following packages:</p>
-
-<ul>
-	<li>libpixregion</li>
-	<li>libic</li>
-	<li>slim</li>
-</ul>
-
-Your use of pixman is subject to the terms and conditions of the licenses in <a href="pixman-licenses.txt" target="blank">pixman-licenses.txt</a>.</p>
-
-<p>If you did not receive the Cairo Library directly from the Eclipse Foundation, the package is being redistributed by another party ("Redistributor") and different terms and conditions may
-apply its use.  Check the Redistributor's license that was provided with the content.  If no such license exists, contact the Redistributor.</p>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/make/lib/swt/gtk-linux-x86/about_files/lgpl-v21.txt b/make/lib/swt/gtk-linux-x86/about_files/lgpl-v21.txt
deleted file mode 100644
index 807db79..0000000
--- a/make/lib/swt/gtk-linux-x86/about_files/lgpl-v21.txt
+++ /dev/null
@@ -1,506 +0,0 @@
-		  GNU LESSER GENERAL PUBLIC LICENSE
-		       Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
-     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL.  It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
-			    Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
-  This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it.  You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
-  When we speak of free software, we are referring to freedom of use,
-not price.  Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
-  To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights.  These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
-  For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you.  You must make sure that they, too, receive or can get the source
-code.  If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it.  And you must show them these terms so they know their rights.
-
-  We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
-  To protect each distributor, we want to make it very clear that
-there is no warranty for the free library.  Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-

-  Finally, software patents pose a constant threat to the existence of
-any free program.  We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder.  Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
-  Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License.  This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License.  We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
-  When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library.  The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom.  The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
-  We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License.  It also provides other free software developers Less
-of an advantage over competing non-free programs.  These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries.  However, the Lesser license provides advantages in certain
-special circumstances.
-
-  For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard.  To achieve this, non-free programs must be
-allowed to use the library.  A more frequent case is that a free
-library does the same job as widely used non-free libraries.  In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
-  In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software.  For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
-  Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.  Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library".  The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-

-		  GNU LESSER GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
-  A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
-  The "Library", below, refers to any such software library or work
-which has been distributed under these terms.  A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language.  (Hereinafter, translation is
-included without limitation in the term "modification".)
-
-  "Source code" for a work means the preferred form of the work for
-making modifications to it.  For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
-  Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it).  Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-  
-  1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
-  You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-

-  2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) The modified work must itself be a software library.
-
-    b) You must cause the files modified to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    c) You must cause the whole of the work to be licensed at no
-    charge to all third parties under the terms of this License.
-
-    d) If a facility in the modified Library refers to a function or a
-    table of data to be supplied by an application program that uses
-    the facility, other than as an argument passed when the facility
-    is invoked, then you must make a good faith effort to ensure that,
-    in the event an application does not supply such function or
-    table, the facility still operates, and performs whatever part of
-    its purpose remains meaningful.
-
-    (For example, a function in a library to compute square roots has
-    a purpose that is entirely well-defined independent of the
-    application.  Therefore, Subsection 2d requires that any
-    application-supplied function or table used by this function must
-    be optional: if the application does not supply it, the square
-    root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library.  To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License.  (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.)  Do not make any other change in
-these notices.
-

-  Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
-  This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
-  4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
-  If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library".  Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
-  However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library".  The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
-  When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library.  The
-threshold for this to be true is not precisely defined by law.
-
-  If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work.  (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
-  Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-

-  6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
-  You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License.  You must supply a copy of this License.  If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License.  Also, you must do one
-of these things:
-
-    a) Accompany the work with the complete corresponding
-    machine-readable source code for the Library including whatever
-    changes were used in the work (which must be distributed under
-    Sections 1 and 2 above); and, if the work is an executable linked
-    with the Library, with the complete machine-readable "work that
-    uses the Library", as object code and/or source code, so that the
-    user can modify the Library and then relink to produce a modified
-    executable containing the modified Library.  (It is understood
-    that the user who changes the contents of definitions files in the
-    Library will not necessarily be able to recompile the application
-    to use the modified definitions.)
-
-    b) Use a suitable shared library mechanism for linking with the
-    Library.  A suitable mechanism is one that (1) uses at run time a
-    copy of the library already present on the user's computer system,
-    rather than copying library functions into the executable, and (2)
-    will operate properly with a modified version of the library, if
-    the user installs one, as long as the modified version is
-    interface-compatible with the version that the work was made with.
-
-    c) Accompany the work with a written offer, valid for at
-    least three years, to give the same user the materials
-    specified in Subsection 6a, above, for a charge no more
-    than the cost of performing this distribution.
-
-    d) If distribution of the work is made by offering access to copy
-    from a designated place, offer equivalent access to copy the above
-    specified materials from the same place.
-
-    e) Verify that the user has already received a copy of these
-    materials or that you have already sent this user a copy.
-
-  For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it.  However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
-  It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system.  Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-

-  7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
-    a) Accompany the combined library with a copy of the same work
-    based on the Library, uncombined with any other library
-    facilities.  This must be distributed under the terms of the
-    Sections above.
-
-    b) Give prominent notice with the combined library of the fact
-    that part of it is a work based on the Library, and explaining
-    where to find the accompanying uncombined form of the same work.
-
-  8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License.  Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License.  However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
-  9. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Library or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
-  10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-

-  11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded.  In such case, this License incorporates the limitation as if
-written in the body of this License.
-
-  13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation.  If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-

-  14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission.  For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this.  Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
-			    NO WARRANTY
-
-  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
-		     END OF TERMS AND CONDITIONS
-

-           How to Apply These Terms to Your New Libraries
-
-  If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change.  You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
-  To apply these terms, attach the following notices to the library.  It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the library's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the
-  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
-  <signature of Ty Coon>, 1 April 1990
-  Ty Coon, President of Vice
-
-That's all there is to it!
-
-
-
-
diff --git a/make/lib/swt/gtk-linux-x86/about_files/mpl-v11.txt b/make/lib/swt/gtk-linux-x86/about_files/mpl-v11.txt
deleted file mode 100644
index 7714141..0000000
--- a/make/lib/swt/gtk-linux-x86/about_files/mpl-v11.txt
+++ /dev/null
@@ -1,470 +0,0 @@
-                          MOZILLA PUBLIC LICENSE
-                                Version 1.1
-
-                              ---------------
-
-1. Definitions.
-
-     1.0.1. "Commercial Use" means distribution or otherwise making the
-     Covered Code available to a third party.
-
-     1.1. "Contributor" means each entity that creates or contributes to
-     the creation of Modifications.
-
-     1.2. "Contributor Version" means the combination of the Original
-     Code, prior Modifications used by a Contributor, and the Modifications
-     made by that particular Contributor.
-
-     1.3. "Covered Code" means the Original Code or Modifications or the
-     combination of the Original Code and Modifications, in each case
-     including portions thereof.
-
-     1.4. "Electronic Distribution Mechanism" means a mechanism generally
-     accepted in the software development community for the electronic
-     transfer of data.
-
-     1.5. "Executable" means Covered Code in any form other than Source
-     Code.
-
-     1.6. "Initial Developer" means the individual or entity identified
-     as the Initial Developer in the Source Code notice required by Exhibit
-     A.
-
-     1.7. "Larger Work" means a work which combines Covered Code or
-     portions thereof with code not governed by the terms of this License.
-
-     1.8. "License" means this document.
-
-     1.8.1. "Licensable" means having the right to grant, to the maximum
-     extent possible, whether at the time of the initial grant or
-     subsequently acquired, any and all of the rights conveyed herein.
-
-     1.9. "Modifications" means any addition to or deletion from the
-     substance or structure of either the Original Code or any previous
-     Modifications. When Covered Code is released as a series of files, a
-     Modification is:
-          A. Any addition to or deletion from the contents of a file
-          containing Original Code or previous Modifications.
-
-          B. Any new file that contains any part of the Original Code or
-          previous Modifications.
-
-     1.10. "Original Code" means Source Code of computer software code
-     which is described in the Source Code notice required by Exhibit A as
-     Original Code, and which, at the time of its release under this
-     License is not already Covered Code governed by this License.
-
-     1.10.1. "Patent Claims" means any patent claim(s), now owned or
-     hereafter acquired, including without limitation,  method, process,
-     and apparatus claims, in any patent Licensable by grantor.
-
-     1.11. "Source Code" means the preferred form of the Covered Code for
-     making modifications to it, including all modules it contains, plus
-     any associated interface definition files, scripts used to control
-     compilation and installation of an Executable, or source code
-     differential comparisons against either the Original Code or another
-     well known, available Covered Code of the Contributor's choice. The
-     Source Code can be in a compressed or archival form, provided the
-     appropriate decompression or de-archiving software is widely available
-     for no charge.
-
-     1.12. "You" (or "Your")  means an individual or a legal entity
-     exercising rights under, and complying with all of the terms of, this
-     License or a future version of this License issued under Section 6.1.
-     For legal entities, "You" includes any entity which controls, is
-     controlled by, or is under common control with You. For purposes of
-     this definition, "control" means (a) the power, direct or indirect,
-     to cause the direction or management of such entity, whether by
-     contract or otherwise, or (b) ownership of more than fifty percent
-     (50%) of the outstanding shares or beneficial ownership of such
-     entity.
-
-2. Source Code License.
-
-     2.1. The Initial Developer Grant.
-     The Initial Developer hereby grants You a world-wide, royalty-free,
-     non-exclusive license, subject to third party intellectual property
-     claims:
-          (a)  under intellectual property rights (other than patent or
-          trademark) Licensable by Initial Developer to use, reproduce,
-          modify, display, perform, sublicense and distribute the Original
-          Code (or portions thereof) with or without Modifications, and/or
-          as part of a Larger Work; and
-
-          (b) under Patents Claims infringed by the making, using or
-          selling of Original Code, to make, have made, use, practice,
-          sell, and offer for sale, and/or otherwise dispose of the
-          Original Code (or portions thereof).
-
-          (c) the licenses granted in this Section 2.1(a) and (b) are
-          effective on the date Initial Developer first distributes
-          Original Code under the terms of this License.
-
-          (d) Notwithstanding Section 2.1(b) above, no patent license is
-          granted: 1) for code that You delete from the Original Code; 2)
-          separate from the Original Code;  or 3) for infringements caused
-          by: i) the modification of the Original Code or ii) the
-          combination of the Original Code with other software or devices.
-
-     2.2. Contributor Grant.
-     Subject to third party intellectual property claims, each Contributor
-     hereby grants You a world-wide, royalty-free, non-exclusive license
-
-          (a)  under intellectual property rights (other than patent or
-          trademark) Licensable by Contributor, to use, reproduce, modify,
-          display, perform, sublicense and distribute the Modifications
-          created by such Contributor (or portions thereof) either on an
-          unmodified basis, with other Modifications, as Covered Code
-          and/or as part of a Larger Work; and
-
-          (b) under Patent Claims infringed by the making, using, or
-          selling of  Modifications made by that Contributor either alone
-          and/or in combination with its Contributor Version (or portions
-          of such combination), to make, use, sell, offer for sale, have
-          made, and/or otherwise dispose of: 1) Modifications made by that
-          Contributor (or portions thereof); and 2) the combination of
-          Modifications made by that Contributor with its Contributor
-          Version (or portions of such combination).
-
-          (c) the licenses granted in Sections 2.2(a) and 2.2(b) are
-          effective on the date Contributor first makes Commercial Use of
-          the Covered Code.
-
-          (d)    Notwithstanding Section 2.2(b) above, no patent license is
-          granted: 1) for any code that Contributor has deleted from the
-          Contributor Version; 2)  separate from the Contributor Version;
-          3)  for infringements caused by: i) third party modifications of
-          Contributor Version or ii)  the combination of Modifications made
-          by that Contributor with other software  (except as part of the
-          Contributor Version) or other devices; or 4) under Patent Claims
-          infringed by Covered Code in the absence of Modifications made by
-          that Contributor.
-
-3. Distribution Obligations.
-
-     3.1. Application of License.
-     The Modifications which You create or to which You contribute are
-     governed by the terms of this License, including without limitation
-     Section 2.2. The Source Code version of Covered Code may be
-     distributed only under the terms of this License or a future version
-     of this License released under Section 6.1, and You must include a
-     copy of this License with every copy of the Source Code You
-     distribute. You may not offer or impose any terms on any Source Code
-     version that alters or restricts the applicable version of this
-     License or the recipients' rights hereunder. However, You may include
-     an additional document offering the additional rights described in
-     Section 3.5.
-
-     3.2. Availability of Source Code.
-     Any Modification which You create or to which You contribute must be
-     made available in Source Code form under the terms of this License
-     either on the same media as an Executable version or via an accepted
-     Electronic Distribution Mechanism to anyone to whom you made an
-     Executable version available; and if made available via Electronic
-     Distribution Mechanism, must remain available for at least twelve (12)
-     months after the date it initially became available, or at least six
-     (6) months after a subsequent version of that particular Modification
-     has been made available to such recipients. You are responsible for
-     ensuring that the Source Code version remains available even if the
-     Electronic Distribution Mechanism is maintained by a third party.
-
-     3.3. Description of Modifications.
-     You must cause all Covered Code to which You contribute to contain a
-     file documenting the changes You made to create that Covered Code and
-     the date of any change. You must include a prominent statement that
-     the Modification is derived, directly or indirectly, from Original
-     Code provided by the Initial Developer and including the name of the
-     Initial Developer in (a) the Source Code, and (b) in any notice in an
-     Executable version or related documentation in which You describe the
-     origin or ownership of the Covered Code.
-
-     3.4. Intellectual Property Matters
-          (a) Third Party Claims.
-          If Contributor has knowledge that a license under a third party's
-          intellectual property rights is required to exercise the rights
-          granted by such Contributor under Sections 2.1 or 2.2,
-          Contributor must include a text file with the Source Code
-          distribution titled "LEGAL" which describes the claim and the
-          party making the claim in sufficient detail that a recipient will
-          know whom to contact. If Contributor obtains such knowledge after
-          the Modification is made available as described in Section 3.2,
-          Contributor shall promptly modify the LEGAL file in all copies
-          Contributor makes available thereafter and shall take other steps
-          (such as notifying appropriate mailing lists or newsgroups)
-          reasonably calculated to inform those who received the Covered
-          Code that new knowledge has been obtained.
-
-          (b) Contributor APIs.
-          If Contributor's Modifications include an application programming
-          interface and Contributor has knowledge of patent licenses which
-          are reasonably necessary to implement that API, Contributor must
-          also include this information in the LEGAL file.
-
-               (c)    Representations.
-          Contributor represents that, except as disclosed pursuant to
-          Section 3.4(a) above, Contributor believes that Contributor's
-          Modifications are Contributor's original creation(s) and/or
-          Contributor has sufficient rights to grant the rights conveyed by
-          this License.
-
-     3.5. Required Notices.
-     You must duplicate the notice in Exhibit A in each file of the Source
-     Code.  If it is not possible to put such notice in a particular Source
-     Code file due to its structure, then You must include such notice in a
-     location (such as a relevant directory) where a user would be likely
-     to look for such a notice.  If You created one or more Modification(s)
-     You may add your name as a Contributor to the notice described in
-     Exhibit A.  You must also duplicate this License in any documentation
-     for the Source Code where You describe recipients' rights or ownership
-     rights relating to Covered Code.  You may choose to offer, and to
-     charge a fee for, warranty, support, indemnity or liability
-     obligations to one or more recipients of Covered Code. However, You
-     may do so only on Your own behalf, and not on behalf of the Initial
-     Developer or any Contributor. You must make it absolutely clear than
-     any such warranty, support, indemnity or liability obligation is
-     offered by You alone, and You hereby agree to indemnify the Initial
-     Developer and every Contributor for any liability incurred by the
-     Initial Developer or such Contributor as a result of warranty,
-     support, indemnity or liability terms You offer.
-
-     3.6. Distribution of Executable Versions.
-     You may distribute Covered Code in Executable form only if the
-     requirements of Section 3.1-3.5 have been met for that Covered Code,
-     and if You include a notice stating that the Source Code version of
-     the Covered Code is available under the terms of this License,
-     including a description of how and where You have fulfilled the
-     obligations of Section 3.2. The notice must be conspicuously included
-     in any notice in an Executable version, related documentation or
-     collateral in which You describe recipients' rights relating to the
-     Covered Code. You may distribute the Executable version of Covered
-     Code or ownership rights under a license of Your choice, which may
-     contain terms different from this License, provided that You are in
-     compliance with the terms of this License and that the license for the
-     Executable version does not attempt to limit or alter the recipient's
-     rights in the Source Code version from the rights set forth in this
-     License. If You distribute the Executable version under a different
-     license You must make it absolutely clear that any terms which differ
-     from this License are offered by You alone, not by the Initial
-     Developer or any Contributor. You hereby agree to indemnify the
-     Initial Developer and every Contributor for any liability incurred by
-     the Initial Developer or such Contributor as a result of any such
-     terms You offer.
-
-     3.7. Larger Works.
-     You may create a Larger Work by combining Covered Code with other code
-     not governed by the terms of this License and distribute the Larger
-     Work as a single product. In such a case, You must make sure the
-     requirements of this License are fulfilled for the Covered Code.
-
-4. Inability to Comply Due to Statute or Regulation.
-
-     If it is impossible for You to comply with any of the terms of this
-     License with respect to some or all of the Covered Code due to
-     statute, judicial order, or regulation then You must: (a) comply with
-     the terms of this License to the maximum extent possible; and (b)
-     describe the limitations and the code they affect. Such description
-     must be included in the LEGAL file described in Section 3.4 and must
-     be included with all distributions of the Source Code. Except to the
-     extent prohibited by statute or regulation, such description must be
-     sufficiently detailed for a recipient of ordinary skill to be able to
-     understand it.
-
-5. Application of this License.
-
-     This License applies to code to which the Initial Developer has
-     attached the notice in Exhibit A and to related Covered Code.
-
-6. Versions of the License.
-
-     6.1. New Versions.
-     Netscape Communications Corporation ("Netscape") may publish revised
-     and/or new versions of the License from time to time. Each version
-     will be given a distinguishing version number.
-
-     6.2. Effect of New Versions.
-     Once Covered Code has been published under a particular version of the
-     License, You may always continue to use it under the terms of that
-     version. You may also choose to use such Covered Code under the terms
-     of any subsequent version of the License published by Netscape. No one
-     other than Netscape has the right to modify the terms applicable to
-     Covered Code created under this License.
-
-     6.3. Derivative Works.
-     If You create or use a modified version of this License (which you may
-     only do in order to apply it to code which is not already Covered Code
-     governed by this License), You must (a) rename Your license so that
-     the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape",
-     "MPL", "NPL" or any confusingly similar phrase do not appear in your
-     license (except to note that your license differs from this License)
-     and (b) otherwise make it clear that Your version of the license
-     contains terms which differ from the Mozilla Public License and
-     Netscape Public License. (Filling in the name of the Initial
-     Developer, Original Code or Contributor in the notice described in
-     Exhibit A shall not of themselves be deemed to be modifications of
-     this License.)
-
-7. DISCLAIMER OF WARRANTY.
-
-     COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
-     WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
-     WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
-     DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
-     THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
-     IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
-     YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
-     COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
-     OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
-     ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
-
-8. TERMINATION.
-
-     8.1.  This License and the rights granted hereunder will terminate
-     automatically if You fail to comply with terms herein and fail to cure
-     such breach within 30 days of becoming aware of the breach. All
-     sublicenses to the Covered Code which are properly granted shall
-     survive any termination of this License. Provisions which, by their
-     nature, must remain in effect beyond the termination of this License
-     shall survive.
-
-     8.2.  If You initiate litigation by asserting a patent infringement
-     claim (excluding declatory judgment actions) against Initial Developer
-     or a Contributor (the Initial Developer or Contributor against whom
-     You file such action is referred to as "Participant")  alleging that:
-
-     (a)  such Participant's Contributor Version directly or indirectly
-     infringes any patent, then any and all rights granted by such
-     Participant to You under Sections 2.1 and/or 2.2 of this License
-     shall, upon 60 days notice from Participant terminate prospectively,
-     unless if within 60 days after receipt of notice You either: (i)
-     agree in writing to pay Participant a mutually agreeable reasonable
-     royalty for Your past and future use of Modifications made by such
-     Participant, or (ii) withdraw Your litigation claim with respect to
-     the Contributor Version against such Participant.  If within 60 days
-     of notice, a reasonable royalty and payment arrangement are not
-     mutually agreed upon in writing by the parties or the litigation claim
-     is not withdrawn, the rights granted by Participant to You under
-     Sections 2.1 and/or 2.2 automatically terminate at the expiration of
-     the 60 day notice period specified above.
-
-     (b)  any software, hardware, or device, other than such Participant's
-     Contributor Version, directly or indirectly infringes any patent, then
-     any rights granted to You by such Participant under Sections 2.1(b)
-     and 2.2(b) are revoked effective as of the date You first made, used,
-     sold, distributed, or had made, Modifications made by that
-     Participant.
-
-     8.3.  If You assert a patent infringement claim against Participant
-     alleging that such Participant's Contributor Version directly or
-     indirectly infringes any patent where such claim is resolved (such as
-     by license or settlement) prior to the initiation of patent
-     infringement litigation, then the reasonable value of the licenses
-     granted by such Participant under Sections 2.1 or 2.2 shall be taken
-     into account in determining the amount or value of any payment or
-     license.
-
-     8.4.  In the event of termination under Sections 8.1 or 8.2 above,
-     all end user license agreements (excluding distributors and resellers)
-     which have been validly granted by You or any distributor hereunder
-     prior to termination shall survive termination.
-
-9. LIMITATION OF LIABILITY.
-
-     UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
-     (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL
-     DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
-     OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR
-     ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
-     CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,
-     WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
-     COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
-     INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
-     LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
-     RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
-     PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
-     EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
-     THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
-
-10. U.S. GOVERNMENT END USERS.
-
-     The Covered Code is a "commercial item," as that term is defined in
-     48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
-     software" and "commercial computer software documentation," as such
-     terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
-     C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
-     all U.S. Government End Users acquire Covered Code with only those
-     rights set forth herein.
-
-11. MISCELLANEOUS.
-
-     This License represents the complete agreement concerning subject
-     matter hereof. If any provision of this License is held to be
-     unenforceable, such provision shall be reformed only to the extent
-     necessary to make it enforceable. This License shall be governed by
-     California law provisions (except to the extent applicable law, if
-     any, provides otherwise), excluding its conflict-of-law provisions.
-     With respect to disputes in which at least one party is a citizen of,
-     or an entity chartered or registered to do business in the United
-     States of America, any litigation relating to this License shall be
-     subject to the jurisdiction of the Federal Courts of the Northern
-     District of California, with venue lying in Santa Clara County,
-     California, with the losing party responsible for costs, including
-     without limitation, court costs and reasonable attorneys' fees and
-     expenses. The application of the United Nations Convention on
-     Contracts for the International Sale of Goods is expressly excluded.
-     Any law or regulation which provides that the language of a contract
-     shall be construed against the drafter shall not apply to this
-     License.
-
-12. RESPONSIBILITY FOR CLAIMS.
-
-     As between Initial Developer and the Contributors, each party is
-     responsible for claims and damages arising, directly or indirectly,
-     out of its utilization of rights under this License and You agree to
-     work with Initial Developer and Contributors to distribute such
-     responsibility on an equitable basis. Nothing herein is intended or
-     shall be deemed to constitute any admission of liability.
-
-13. MULTIPLE-LICENSED CODE.
-
-     Initial Developer may designate portions of the Covered Code as
-     "Multiple-Licensed".  "Multiple-Licensed" means that the Initial
-     Developer permits you to utilize portions of the Covered Code under
-     Your choice of the NPL or the alternative licenses, if any, specified
-     by the Initial Developer in the file described in Exhibit A.
-
-EXHIBIT A -Mozilla Public License.
-
-     ``The contents of this file are subject to the Mozilla Public License
-     Version 1.1 (the "License"); you may not use this file except in
-     compliance with the License. You may obtain a copy of the License at
-     http://www.mozilla.org/MPL/
-
-     Software distributed under the License is distributed on an "AS IS"
-     basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
-     License for the specific language governing rights and limitations
-     under the License.
-
-     The Original Code is ______________________________________.
-
-     The Initial Developer of the Original Code is ________________________.
-     Portions created by ______________________ are Copyright (C) ______
-     _______________________. All Rights Reserved.
-
-     Contributor(s): ______________________________________.
-
-     Alternatively, the contents of this file may be used under the terms
-     of the _____ license (the  "[___] License"), in which case the
-     provisions of [______] License are applicable instead of those
-     above.  If you wish to allow use of your version of this file only
-     under the terms of the [____] License and not to allow others to use
-     your version of this file under the MPL, indicate your decision by
-     deleting  the provisions above and replace  them with the notice and
-     other provisions required by the [___] License.  If you do not delete
-     the provisions above, a recipient may use your version of this file
-     under either the MPL or the [___] License."
-
-     [NOTE: The text of this Exhibit A may differ slightly from the text of
-     the notices in the Source Code files of the Original Code. You should
-     use the text of this Exhibit A rather than the text found in the
-     Original Code Source Code for Your Modifications.]
-
diff --git a/make/lib/swt/gtk-linux-x86/about_files/pixman-licenses.txt b/make/lib/swt/gtk-linux-x86/about_files/pixman-licenses.txt
deleted file mode 100644
index 5d8dca6..0000000
--- a/make/lib/swt/gtk-linux-x86/about_files/pixman-licenses.txt
+++ /dev/null
@@ -1,92 +0,0 @@
-libpixregion
-
-Copyright 1987, 1998  The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-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 THE
-OPEN GROUP 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.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
-
-                        All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its 
-documentation for any purpose and without fee is hereby granted, 
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in 
-supporting documentation, and that the name of Digital not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.  
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-----------------------------------------------------------------------
-libic
-
-Copyright � 2001 Keith Packard
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation, and that the name of Keith Packard not be used in
-advertising or publicity pertaining to distribution of the software without
-specific, written prior permission.  Keith Packard makes no
-representations about the suitability of this software for any purpose.  It
-is provided "as is" without express or implied warranty.
-
-KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
-EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
-CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
-TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-PERFORMANCE OF THIS SOFTWARE.
-
-----------------------------------------------------------------------
-slim
-
-slim is Copyright � 2003 Richard Henderson
-
-Permission to use, copy, modify, distribute, and sell this software
-and its documentation for any purpose is hereby granted without fee,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of Richard Henderson not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.  Richard Henderson
-makes no representations about the suitability of this software for
-any purpose.  It is provided "as is" without express or implied
-warranty.
-
-RICHARD HENDERSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
-EVENT SHALL RICHARD HENDERSON BE LIABLE FOR ANY SPECIAL, INDIRECT OR
-CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
-USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
-OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-PERFORMANCE OF THIS SOFTWARE.
-
diff --git a/make/lib/swt/gtk-linux-x86/about_files/webkit-bsd.txt b/make/lib/swt/gtk-linux-x86/about_files/webkit-bsd.txt
deleted file mode 100644
index b3b07c6..0000000
--- a/make/lib/swt/gtk-linux-x86/about_files/webkit-bsd.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-BSD License
-
-Copyright (C) 2009 Apple 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:
-
-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 APPLE INC. AND ITS CONTRIBUTORS �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 APPLE INC. OR ITS 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.
diff --git a/make/lib/swt/gtk-linux-x86/swt-debug.jar b/make/lib/swt/gtk-linux-x86/swt-debug.jar
deleted file mode 100644
index 2dc8966..0000000
Binary files a/make/lib/swt/gtk-linux-x86/swt-debug.jar and /dev/null differ
diff --git a/make/lib/swt/gtk-linux-x86_64/about.html b/make/lib/swt/gtk-linux-x86_64/about.html
deleted file mode 100644
index 6c5fbd8..0000000
--- a/make/lib/swt/gtk-linux-x86_64/about.html
+++ /dev/null
@@ -1,301 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
- 
-<p>August 17, 2006</p>	
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in ("Content").  Unless otherwise 
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 ("EPL").  A copy of the EPL is available 
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, "Program" will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is 
-being redistributed by another party ("Redistributor") and different terms and conditions may
-apply to your use of any object code in the Content.  Check the Redistributor's license that was 
-provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-<h3>Third Party Content</h3>
-
-<p>The Content includes items that have been sourced from third parties as set out below. If you 
-did not receive this Content directly from the Eclipse Foundation, the following is provided 
-for informational purposes only, and you should look to the Redistributor’s license for 
-terms and conditions of use.</p>
-
-<h4>Gnome Binding</h4>
-
-<p>The "Gnome Binding" is a binding to the Gnome API.  The Content may include any or all of the following files:</p>
-
-<p>The following files in the plug-in JAR shall be defined as the native code portion of the Gnome Binding:</p>
-<ul>
-	<li>libswt-gnome-gtk-xxxx.so (where "xxxx" is the version number)</li>
-</ul>
-
-<p>The following files in both the plug-in JAR and the src.zip shall be defined respectively as the bytecode and source code portions of the Gnome Binding:</p>
-<ul>
-	<li>The contents of the directory org/eclipse/swt/internal/gnome (but not including any sub-directories)</li>
-</ul>
-
-<p>The Gnome Binding contains portions of Gnome ("Library").  Gnome is made available by The Free Software Foundation.  Use of the Library is governed by the terms and
-conditions of the GNU Lesser General Public License Version 2.1 ("LGPL").  Use of the Gnome Binding on a standalone
-basis, is also governed by the terms and conditions of the LGPL.  A copy of the LGPL is provided with the Content (<a href="about_files/lgpl-v21.txt" target="_blank">lgpl-v21.txt</a>) and is also available at
-<a href="http://www.gnu.org/licenses/lgpl.html" target="_blank">http://www.gnu.org/licenses/lgpl.html</a>.</p>
-
-<p>In accordance with Section 6 of the LGPL, you may combine or link a "work that uses the Library" (e.g. the SWT) with the Library to produce a work
-containing portions of the Library (e.g. the Gnome Binding) and distribute that work under the terms of your choice (e.g. the EPL) provided you comply with all
-other terms and conditions of Section 6 as well as other Sections of the LGPL.  Please note, if you modify the Gnome Binding such modifications shall be
-governed by the terms and conditions of the LGPL.  Also note, the terms of the EPL permit you to modify the combined work and the source code of the combined
-work is provided for debugging purposes so there is no need to reverse engineer the combined work.</p>
-
-<h4>GTK+ Binding</h4>
-
-<p>The "GTK+ Binding" is a binding to the GTK+ API.  The Content may include any or all of the following files:</p>
-
-<p>The following files in the plug-in JAR shall be defined as the native code portion of the GTK+ Binding:</p>
-<ul>
-	<li>libswt-atk-gtk-xxxx.so (where "xxxx" is the version number)</li>
-	<li>libswt-pi-gtk-xxxx.so (where "xxxx" is the version number)</li>
-</ul>
-
-<p>The following files in both the plug-in JAR and the src.zip shall be defined respectively as the bytecode and source code portions of the GTK+ Binding:</p>
-<ul>
-	<li>The contents of the directory org/eclipse/swt/internal/accessibility/gtk (but not including any sub-directories)</li>
-	<li>The contents of the directory org/eclipse/swt/internal/cde (but not including any sub-directories)</li>
-	<li>The contents of the directory org/eclipse/swt/internal/gtk (but not including any sub-directories)</li>				
-</ul>
-
-<p>The GTK+ Binding contains portions of GTK+ ("Library").  GTK+ is made available by The Free Software Foundation.  Use of the Library is governed by the terms and
-conditions of the GNU Lesser General Public License Version 2.1 ("LGPL").  Use of the GTK+ Binding on a standalone
-basis, is also governed by the terms and conditions of the LGPL.  A copy of the LGPL is provided with the Content (<a href="about_files/lgpl-v21.txt" target="_blank">lgpl-v21.txt</a>) and is also available at
-<a href="http://www.gnu.org/licenses/lgpl.html" target="_blank">http://www.gnu.org/licenses/lgpl.html</a>.</p>
-
-<p>In accordance with Section 6 of the LGPL, you may combine or link a "work that uses the Library" (e.g. the SWT) with the Library to produce a work
-containing portions of the Library (e.g. the GTK+ Binding) and distribute that work under the terms of your choice (e.g. the EPL) provided you comply with all
-other terms and conditions of Section 6 as well as other Sections of the LGPL.  Please note, if you modify the GTK+ Binding such modifications shall be
-governed by the terms and conditions of the LGPL.  Also note, the terms of the EPL permit you to modify the combined work and the source code of the combined
-work is provided for debugging purposes so there is no need to reverse engineer the combined work.</p>
-
-<h4>WebKitGTK+ Binding</h4>
-
-<p>The "WebKitGTK+ Binding" is a binding to the WebKitGTK+ API. The Content may include any or all of the following files:</p>
-
-<p>The following files in the plug-in JAR shall be defined as the native code portion of the WebKitGTK+ Binding:</p>
-
-<ul>
-    <li>libswt-webkit-gtk-xxxx.so (where "xxxx" is the version number)</li>
-</ul>
-
-<p>The following files in both the plug-in JAR and the src.zip shall be defined respectively as the bytecode and source code portions of the WebKitGTK+ Binding:</p>
-<ul>
-    <li>The contents of the directory org/eclipse/swt/internal/webkit (but not including any sub-directories)</li>
-</ul>
-
-<p>
-The WebKitGTK+ Binding contains portions of WebKitGTK+ ("Library"). WebKitGTK+ is made available by the WebKitGTK+ open source project (<a href="http://webkitgtk.org/" target="_blank">http://webkit.org/</a>). Use of the Library is governed by the terms and conditions of the GNU Lesser General Public License Version 2.1 ("LGPL"). Use of the WebKitGTK+ Binding on a standalone basis, is also governed by the terms and conditions of the LGPL. A copy of the LGPL is provided [...]
-
-<p>
-In accordance with Section 6 of the LGPL, you may combine or link a "work that uses the Library" (e.g. the SWT) with the Library to produce a work containing portions of the Library (e.g. the WebKitGTK+ Binding) and distribute that work under the terms of your choice (e.g. the EPL) provided you comply with all other terms and conditions of Section 6 as well as other Sections of the LGPL. Please note, if you modify the WebKitGTK+ Binding such modifications shall be governed by t [...]
-
-<p>The WebKitGTK+ Binding also contains portions of the WebKit JavaScriptCore code which is made available by the WebKit open source project (<a href="http://webkit.org/" target="_blank">http://webkit.org/</a>).  The WebKit JavaScriptCore code was obtained under the terms of the BSD license.  A copy of the BSD license is provided (<a href="about_files/webkit-bsd.txt"target="_blank">webkit-bsd.txt</a>) and is also available at <a href="http://webkit.org/coding/bsd-license.html" target="_b [...]
-
-<h4>libsoup</h4>
-
-<p>The "WebKitGTK+ Binding" also includes a binding to the libsoup API. The Content may include any or all of the following files:</p>
-
-<p>The following files in the plug-in JAR shall be defined as the native code portion of the WebKitGTK+ Binding:</p>
-<ul>
-    <li>libswt-webkit-gtk-xxxx.so (where "xxxx" is the version number)</li>
-</ul>
-
-<p>The following files in both the plug-in JAR and the src.zip shall be defined respectively as the bytecode and source code portions of the WebKitGTK+ Binding:</p>
-<ul>
-    <li>The contents of the directory org/eclipse/swt/internal/webkit (but not including any sub-directories)</li>
-</ul>
-
-<p>The WebKitGTK+ Binding contains portions of libsoup ("Library"). libsoup is made available by The GNOME Project (<a href="http://live.gnome.org/LibSoup" target="_blank">http://live.gnome.org/LibSoup/</a>). Use of the Library is governed by the terms and conditions of the GNU Lesser General Public License Version 2.1 ("LGPL"). Use of the WebKitGTK+ Binding on a standalone basis, is also governed by the terms and conditions of the LGPL. A copy of the LGPL is provided [...]
-
-<h4>Mozilla Binding</h4>
-
-<p>The "Mozilla Binding" is a binding to the Mozilla API.  The Content may include any or all of the following files:</p>
-
-<p>The following files in the plug-in JAR shall be defined as the native code portion of the Mozilla Binding:</p>
-<ul>
-	<li>libswt-mozilla-gtk-xxxx.so (where "xxxx" is the version number)</li>
-	<li>libswt-mozilla-gcc3-gtk-xxxx.so (where "xxxx" is the version number)</li>
-	<li>libswt-xulrunner-gtk-xxxx.so (where "xxxx" is the version number)</li>
-	<li>libswt-xpcominit-gtk-xxxx.so (where "xxxx" is the version number)</li>
-</ul>
-
-<p>The following files in both the plug-in JAR and the src.zip shall be defined respectively as the bytecode and source code portions of the Mozilla Binding:</p>
-<ul>
-	<li>The contents of the directory org/eclipse/swt/internal/mozilla (but not including any sub-directories)</li>
-</ul>
-
-<p>The Mozilla Binding contains portions of Mozilla ("Mozilla").  Mozilla is made available by Mozilla.org.  Use of Mozilla is governed by the terms and
-conditions of the Mozilla Public License Version 1.1 ("MPL").  A copy of the MPL is provided with the Content (<a href="about_files/mpl-v11.txt" target="_blank">mpl-v11.txt</a>) and is also available at
-<a href="http://www.mozilla.org/MPL/MPL-1.1.html" target="_blank">http://www.mozilla.org/MPL/MPL-1.1.html</a>.</p>
-
-<h4>XULRunner 1.9 (subset, derivative work)</h4>
-
-The libraries libswt-xulrunner-gtk-xxxx.so, libswt-mozilla-gtk-xxxx.so, and libswt-mozilla-gcc3-gtk-xxxx.so (where "xxxx" is the version number) contain a small portion of XULRunner 1.9 content (header files)
-that have been modified from the Original Code provided by mozilla.org, and whose Initial Developer is Netscape Communications Corporation. Use of this code is governed by
-the terms and conditions of the Mozilla Public License Version 1.1 ("MPL").  A copy of the MPL is provided with the Content (<a href="./about_files/mpl-v11.txt">mpl-v11.txt</a>)
-and is also available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>.
-<p>The changed files are:
-<ul>
-  <li>org.eclipse.swt/Eclipse SWT Mozilla/common/library/nsIScriptContext.h</code>
-  <li>org.eclipse.swt/Eclipse SWT Mozilla/common/library/nsIScriptGlobalObject.h</code>
-</ul>
-Changes to the original files were made by SWT on April 7, 2009 and are marked with trailing comment <em>"//SWT-20090407"</em>.
-
-<h4>Cairo Binding</h4>
-
-<p>The "Cairo Binding" is a binding to the Cairo API.  The Content may include any or all of the following files:</p>
-
-<p>The following files in the plug-in JAR shall be defined as the native code portion of the Cairo Binding:</p>
-<ul>
-	<li>libswt-cairo-gtk-xxxx.so (where "xxxx" is the version number)</li>
-</ul>
-
-<p>The following files in both the plug-in JAR and the src.zip shall be defined respectively as the bytecode and source code portions of the Cairo Binding:</p>
-<ul>
-	<li>The contents of the directory org/eclipse/swt/internal/cairo (but not including any sub-directories)</li>
-</ul>
-
-<p>The Cairo Binding contains portions of Cairo ("Cairo").  Cairo is made available by the Cairo project at
-<a href="http://www.cairographics.org" target="_blank">http://www.cairographics.org</a>.  Use of Cairo by the Cairo Binding is governed by the terms and
-conditions of the Mozilla Public License Version 1.1 ("MPL").  A copy of the MPL is
-provided with the Content (<a href="about_files/mpl-v11.txt" target="_blank">mpl-v11.txt</a>) and is also available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>.</p>
-
-<h4>Cairo for Linux</h4>
-
-<p>Refer to the file <a href="about_files/about_cairo.html">about_files/about_cairo.html</a> for licensing details about "Cairo for Linux."
-
-<h4>Independent JPEG Group's JPEG software release 6b</h4>
-
-<p>This software is based in part on the work of the Independent JPEG Group's JPEG software release 6b ("LIBJPEG").
-LIBJPEG was used to implement the decoding of JPEG format files in Java (TM).  The Content does NOT include any portion of the LIBJPEG file ansi2knr.c.</p>
-
-<p>Your use of LIBJPEG is subject to the terms and conditions located in the <a href="about_files/IJG_README">about_files/IJG_README</a> file which is included
-with the Content.</p>
-
-<p>The IJG's website is located at <a href="http://ijg.org/" target="_blank">http://ijg.org</a>.</p>
-
-<p>The class org.eclipse.swt.internal.image.JPEGFileFormat is based on following files from LIBJPEG:</p>
-
-<ul>
-    <li>cderror.h</li>
-    <li>cdjpeg.h</li>
-    <li>jchuff.h</li>
-    <li>jdcolor.c</li>
-    <li>jdct.h</li>
-    <li>jdhuff.h</li>
-    <li>jerror.h</li>
-    <li>jidctint.c</li>
-    <li>jinclude.h</li>
-    <li>jmemsys.h</li>
-    <li>jmorecfg.h</li>
-    <li>jpegint.h</li>
-    <li>jpeglib.h</li>
-    <li>jversion.h</li>
-    <li>transupp.h</li>
-</ul>
-
-<p>The class org.eclipse.swt.internal.image.JPEGDecoder is based on the following files from LIBJPEG:</p>
-
-<ul>
-	<li>jcapimin.c</li>
-	<li>jcapistd.c</li>
-	<li>jccoefct.c</li>
-	<li>jccolor.c</li>
-	<li>jcdctmgr.c</li>
-	<li>jchuff.c</li>
-	<li>jcinit.c</li>
-	<li>jcmainct.c</li>
-	<li>jcmarker.c</li>
-	<li>jcmaster.c</li>
-	<li>jcomapi.c</li>
-	<li>jcparam.c</li>
-	<li>jcphuff.c</li>
-	<li>jcprepct.c</li>
-	<li>jcsample.c</li>
-	<li>jctrans.c</li>
-	<li>jdapimin.c</li>
-	<li>jdapistd.c</li>
-	<li>jdatadst.c</li>
-	<li>jdatasrc.c</li>
-	<li>jdcoefct.c</li>
-	<li>jdcolor.c</li>
-	<li>jddctmgr.c</li>
-	<li>jdhuff.c</li>
-	<li>jdinput.c</li>
-	<li>jdmainct.c</li>
-	<li>jdmarker.c</li>
-	<li>jdmaster.c</li>
-	<li>jdmerge.c</li>
-	<li>jdphuff.c</li>
-	<li>jdpostct.c</li>
-	<li>jdsample.c</li>
-	<li>jdtrans.c</li>
-	<li>jerror.c</li>
-	<li>jfdctflt.c</li>
-	<li>jfdctfst.c</li>
-	<li>jfdctint.c</li>
-	<li>jidctflt.c</li>
-	<li>jidctfst.c</li>
-	<li>jidctint.c</li>
-	<li>jidctred.c</li>
-	<li>jpegtran.c</li>
-	<li>jquant1.c</li>
-	<li>jquant2.c</li>
-	<li>jutils.c</li>
-	<li>cderror.h</li>
-	<li>cdjpeg.h</li>
-	<li>jchuff.h</li>
-	<li>jconfig.h</li>
-	<li>jdct.h</li>
-	<li>jdhuff.h</li>
-	<li>jerror.h</li>
-	<li>jinclude.h</li>
-	<li>jmorecfg.h</li>
-	<li>jpegint.h</li>
-	<li>jpeglib.h</li>
-	<li>jversion.h</li>
-	<li>transupp.h</li>
-</ul>
-	
-<p>The following changes were made to the LIBJPEG code in the Content:</p>
-
-<ol>
-	<li>In Java, pointer math is not allowed so indexing was used instead.</li>
-	<li>Function pointers were replaced with switch statements.</li>
-	<li>The virtual memory, tracing and progress monitoring were removed.</li>
-	<li>The error handling was simplified and now uses Java exceptions.</li>
-</ol>
-
-<h4>PuTTY 0.58 (derivative work)</h4>
-
-<p>Portions of the SWT class org/eclipse/swt/internal/image/PngDeflater are based on PuTTY's sshzlib.c. PuTTY is made available by Mozilla.org.  Use of PuTTY is governed by the terms and
-conditions of the the following MIT-style license:  </p>
-<blockquote>
-  <p><em>PuTTY is copyright 1997-2007 Simon Tatham.</em> </p>
-  <p><em>Portions copyright Robert de Bath, Joris van Rantwijk, Delian  Delchev, Andreas Schultz, Jeroen Massar, Wez Furlong, Nicolas Barry,  Justin Bradford, Ben Harris, Malcolm Smith, Ahmad Khalifa, Markus Kuhn,  and CORE SDI S.A.</em> </p>
-  <p><em>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:</em> </p>
-  <p><em>The above copyright notice and this permission notice shall be  included in all copies or substantial portions of the Software.</em> </p>
-  <p><em>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 SIMON TATHAM 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.</em> </p>
-</blockquote>
-<p>A copy of the license is also available at <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/licence.html" target="_blank">http://www.chiark.greenend.org.uk/~sgtatham/putty/licence.html</a>.</p>
-
-<p><small>Java and all Java-based trademarks and logos are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries.</small></p>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/make/lib/swt/gtk-linux-x86_64/about_files/IJG_README b/make/lib/swt/gtk-linux-x86_64/about_files/IJG_README
deleted file mode 100644
index 86cc206..0000000
--- a/make/lib/swt/gtk-linux-x86_64/about_files/IJG_README
+++ /dev/null
@@ -1,385 +0,0 @@
-The Independent JPEG Group's JPEG software
-==========================================
-
-README for release 6b of 27-Mar-1998
-====================================
-
-This distribution contains the sixth public release of the Independent JPEG
-Group's free JPEG software.  You are welcome to redistribute this software and
-to use it for any purpose, subject to the conditions under LEGAL ISSUES, below.
-
-Serious users of this software (particularly those incorporating it into
-larger programs) should contact IJG at jpeg-info at uunet.uu.net to be added to
-our electronic mailing list.  Mailing list members are notified of updates
-and have a chance to participate in technical discussions, etc.
-
-This software is the work of Tom Lane, Philip Gladstone, Jim Boucher,
-Lee Crocker, Julian Minguillon, Luis Ortiz, George Phillips, Davide Rossi,
-Guido Vollbeding, Ge' Weijers, and other members of the Independent JPEG
-Group.
-
-IJG is not affiliated with the official ISO JPEG standards committee.
-
-
-DOCUMENTATION ROADMAP
-=====================
-
-This file contains the following sections:
-
-OVERVIEW            General description of JPEG and the IJG software.
-LEGAL ISSUES        Copyright, lack of warranty, terms of distribution.
-REFERENCES          Where to learn more about JPEG.
-ARCHIVE LOCATIONS   Where to find newer versions of this software.
-RELATED SOFTWARE    Other stuff you should get.
-FILE FORMAT WARS    Software *not* to get.
-TO DO               Plans for future IJG releases.
-
-Other documentation files in the distribution are:
-
-User documentation:
-  install.doc       How to configure and install the IJG software.
-  usage.doc         Usage instructions for cjpeg, djpeg, jpegtran,
-                    rdjpgcom, and wrjpgcom.
-  *.1               Unix-style man pages for programs (same info as usage.doc).
-  wizard.doc        Advanced usage instructions for JPEG wizards only.
-  change.log        Version-to-version change highlights.
-Programmer and internal documentation:
-  libjpeg.doc       How to use the JPEG library in your own programs.
-  example.c         Sample code for calling the JPEG library.
-  structure.doc     Overview of the JPEG library's internal structure.
-  filelist.doc      Road map of IJG files.
-  coderules.doc     Coding style rules --- please read if you contribute code.
-
-Please read at least the files install.doc and usage.doc.  Useful information
-can also be found in the JPEG FAQ (Frequently Asked Questions) article.  See
-ARCHIVE LOCATIONS below to find out where to obtain the FAQ article.
-
-If you want to understand how the JPEG code works, we suggest reading one or
-more of the REFERENCES, then looking at the documentation files (in roughly
-the order listed) before diving into the code.
-
-
-OVERVIEW
-========
-
-This package contains C software to implement JPEG image compression and
-decompression.  JPEG (pronounced "jay-peg") is a standardized compression
-method for full-color and gray-scale images.  JPEG is intended for compressing
-"real-world" scenes; line drawings, cartoons and other non-realistic images
-are not its strong suit.  JPEG is lossy, meaning that the output image is not
-exactly identical to the input image.  Hence you must not use JPEG if you
-have to have identical output bits.  However, on typical photographic images,
-very good compression levels can be obtained with no visible change, and
-remarkably high compression levels are possible if you can tolerate a
-low-quality image.  For more details, see the references, or just experiment
-with various compression settings.
-
-This software implements JPEG baseline, extended-sequential, and progressive
-compression processes.  Provision is made for supporting all variants of these
-processes, although some uncommon parameter settings aren't implemented yet.
-For legal reasons, we are not distributing code for the arithmetic-coding
-variants of JPEG; see LEGAL ISSUES.  We have made no provision for supporting
-the hierarchical or lossless processes defined in the standard.
-
-We provide a set of library routines for reading and writing JPEG image files,
-plus two sample applications "cjpeg" and "djpeg", which use the library to
-perform conversion between JPEG and some other popular image file formats.
-The library is intended to be reused in other applications.
-
-In order to support file conversion and viewing software, we have included
-considerable functionality beyond the bare JPEG coding/decoding capability;
-for example, the color quantization modules are not strictly part of JPEG
-decoding, but they are essential for output to colormapped file formats or
-colormapped displays.  These extra functions can be compiled out of the
-library if not required for a particular application.  We have also included
-"jpegtran", a utility for lossless transcoding between different JPEG
-processes, and "rdjpgcom" and "wrjpgcom", two simple applications for
-inserting and extracting textual comments in JFIF files.
-
-The emphasis in designing this software has been on achieving portability and
-flexibility, while also making it fast enough to be useful.  In particular,
-the software is not intended to be read as a tutorial on JPEG.  (See the
-REFERENCES section for introductory material.)  Rather, it is intended to
-be reliable, portable, industrial-strength code.  We do not claim to have
-achieved that goal in every aspect of the software, but we strive for it.
-
-We welcome the use of this software as a component of commercial products.
-No royalty is required, but we do ask for an acknowledgement in product
-documentation, as described under LEGAL ISSUES.
-
-
-LEGAL ISSUES
-============
-
-In plain English:
-
-1. We don't promise that this software works.  (But if you find any bugs,
-   please let us know!)
-2. You can use this software for whatever you want.  You don't have to pay us.
-3. You may not pretend that you wrote this software.  If you use it in a
-   program, you must acknowledge somewhere in your documentation that
-   you've used the IJG code.
-
-In legalese:
-
-The authors make NO WARRANTY or representation, either express or implied,
-with respect to this software, its quality, accuracy, merchantability, or
-fitness for a particular purpose.  This software is provided "AS IS", and you,
-its user, assume the entire risk as to its quality and accuracy.
-
-This software is copyright (C) 1991-1998, Thomas G. Lane.
-All Rights Reserved except as specified below.
-
-Permission is hereby granted to use, copy, modify, and distribute this
-software (or portions thereof) for any purpose, without fee, subject to these
-conditions:
-(1) If any part of the source code for this software is distributed, then this
-README file must be included, with this copyright and no-warranty notice
-unaltered; and any additions, deletions, or changes to the original files
-must be clearly indicated in accompanying documentation.
-(2) If only executable code is distributed, then the accompanying
-documentation must state that "this software is based in part on the work of
-the Independent JPEG Group".
-(3) Permission for use of this software is granted only if the user accepts
-full responsibility for any undesirable consequences; the authors accept
-NO LIABILITY for damages of any kind.
-
-These conditions apply to any software derived from or based on the IJG code,
-not just to the unmodified library.  If you use our work, you ought to
-acknowledge us.
-
-Permission is NOT granted for the use of any IJG author's name or company name
-in advertising or publicity relating to this software or products derived from
-it.  This software may be referred to only as "the Independent JPEG Group's
-software".
-
-We specifically permit and encourage the use of this software as the basis of
-commercial products, provided that all warranty or liability claims are
-assumed by the product vendor.
-
-
-ansi2knr.c is included in this distribution by permission of L. Peter Deutsch,
-sole proprietor of its copyright holder, Aladdin Enterprises of Menlo Park, CA.
-ansi2knr.c is NOT covered by the above copyright and conditions, but instead
-by the usual distribution terms of the Free Software Foundation; principally,
-that you must include source code if you redistribute it.  (See the file
-ansi2knr.c for full details.)  However, since ansi2knr.c is not needed as part
-of any program generated from the IJG code, this does not limit you more than
-the foregoing paragraphs do.
-
-The Unix configuration script "configure" was produced with GNU Autoconf.
-It is copyright by the Free Software Foundation but is freely distributable.
-The same holds for its supporting scripts (config.guess, config.sub,
-ltconfig, ltmain.sh).  Another support script, install-sh, is copyright
-by M.I.T. but is also freely distributable.
-
-It appears that the arithmetic coding option of the JPEG spec is covered by
-patents owned by IBM, AT&T, and Mitsubishi.  Hence arithmetic coding cannot
-legally be used without obtaining one or more licenses.  For this reason,
-support for arithmetic coding has been removed from the free JPEG software.
-(Since arithmetic coding provides only a marginal gain over the unpatented
-Huffman mode, it is unlikely that very many implementations will support it.)
-So far as we are aware, there are no patent restrictions on the remaining
-code.
-
-The IJG distribution formerly included code to read and write GIF files.
-To avoid entanglement with the Unisys LZW patent, GIF reading support has
-been removed altogether, and the GIF writer has been simplified to produce
-"uncompressed GIFs".  This technique does not use the LZW algorithm; the
-resulting GIF files are larger than usual, but are readable by all standard
-GIF decoders.
-
-We are required to state that
-    "The Graphics Interchange Format(c) is the Copyright property of
-    CompuServe Incorporated.  GIF(sm) is a Service Mark property of
-    CompuServe Incorporated."
-
-
-REFERENCES
-==========
-
-We highly recommend reading one or more of these references before trying to
-understand the innards of the JPEG software.
-
-The best short technical introduction to the JPEG compression algorithm is
-	Wallace, Gregory K.  "The JPEG Still Picture Compression Standard",
-	Communications of the ACM, April 1991 (vol. 34 no. 4), pp. 30-44.
-(Adjacent articles in that issue discuss MPEG motion picture compression,
-applications of JPEG, and related topics.)  If you don't have the CACM issue
-handy, a PostScript file containing a revised version of Wallace's article is
-available at ftp://ftp.uu.net/graphics/jpeg/wallace.ps.gz.  The file (actually
-a preprint for an article that appeared in IEEE Trans. Consumer Electronics)
-omits the sample images that appeared in CACM, but it includes corrections
-and some added material.  Note: the Wallace article is copyright ACM and IEEE,
-and it may not be used for commercial purposes.
-
-A somewhat less technical, more leisurely introduction to JPEG can be found in
-"The Data Compression Book" by Mark Nelson and Jean-loup Gailly, published by
-M&T Books (New York), 2nd ed. 1996, ISBN 1-55851-434-1.  This book provides
-good explanations and example C code for a multitude of compression methods
-including JPEG.  It is an excellent source if you are comfortable reading C
-code but don't know much about data compression in general.  The book's JPEG
-sample code is far from industrial-strength, but when you are ready to look
-at a full implementation, you've got one here...
-
-The best full description of JPEG is the textbook "JPEG Still Image Data
-Compression Standard" by William B. Pennebaker and Joan L. Mitchell, published
-by Van Nostrand Reinhold, 1993, ISBN 0-442-01272-1.  Price US$59.95, 638 pp.
-The book includes the complete text of the ISO JPEG standards (DIS 10918-1
-and draft DIS 10918-2).  This is by far the most complete exposition of JPEG
-in existence, and we highly recommend it.
-
-The JPEG standard itself is not available electronically; you must order a
-paper copy through ISO or ITU.  (Unless you feel a need to own a certified
-official copy, we recommend buying the Pennebaker and Mitchell book instead;
-it's much cheaper and includes a great deal of useful explanatory material.)
-In the USA, copies of the standard may be ordered from ANSI Sales at (212)
-642-4900, or from Global Engineering Documents at (800) 854-7179.  (ANSI
-doesn't take credit card orders, but Global does.)  It's not cheap: as of
-1992, ANSI was charging $95 for Part 1 and $47 for Part 2, plus 7%
-shipping/handling.  The standard is divided into two parts, Part 1 being the
-actual specification, while Part 2 covers compliance testing methods.  Part 1
-is titled "Digital Compression and Coding of Continuous-tone Still Images,
-Part 1: Requirements and guidelines" and has document numbers ISO/IEC IS
-10918-1, ITU-T T.81.  Part 2 is titled "Digital Compression and Coding of
-Continuous-tone Still Images, Part 2: Compliance testing" and has document
-numbers ISO/IEC IS 10918-2, ITU-T T.83.
-
-Some extensions to the original JPEG standard are defined in JPEG Part 3,
-a newer ISO standard numbered ISO/IEC IS 10918-3 and ITU-T T.84.  IJG
-currently does not support any Part 3 extensions.
-
-The JPEG standard does not specify all details of an interchangeable file
-format.  For the omitted details we follow the "JFIF" conventions, revision
-1.02.  A copy of the JFIF spec is available from:
-	Literature Department
-	C-Cube Microsystems, Inc.
-	1778 McCarthy Blvd.
-	Milpitas, CA 95035
-	phone (408) 944-6300,  fax (408) 944-6314
-A PostScript version of this document is available by FTP at
-ftp://ftp.uu.net/graphics/jpeg/jfif.ps.gz.  There is also a plain text
-version at ftp://ftp.uu.net/graphics/jpeg/jfif.txt.gz, but it is missing
-the figures.
-
-The TIFF 6.0 file format specification can be obtained by FTP from
-ftp://ftp.sgi.com/graphics/tiff/TIFF6.ps.gz.  The JPEG incorporation scheme
-found in the TIFF 6.0 spec of 3-June-92 has a number of serious problems.
-IJG does not recommend use of the TIFF 6.0 design (TIFF Compression tag 6).
-Instead, we recommend the JPEG design proposed by TIFF Technical Note #2
-(Compression tag 7).  Copies of this Note can be obtained from ftp.sgi.com or
-from ftp://ftp.uu.net/graphics/jpeg/.  It is expected that the next revision
-of the TIFF spec will replace the 6.0 JPEG design with the Note's design.
-Although IJG's own code does not support TIFF/JPEG, the free libtiff library
-uses our library to implement TIFF/JPEG per the Note.  libtiff is available
-from ftp://ftp.sgi.com/graphics/tiff/.
-
-
-ARCHIVE LOCATIONS
-=================
-
-The "official" archive site for this software is ftp.uu.net (Internet
-address 192.48.96.9).  The most recent released version can always be found
-there in directory graphics/jpeg.  This particular version will be archived
-as ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz.  If you don't have
-direct Internet access, UUNET's archives are also available via UUCP; contact
-help at uunet.uu.net for information on retrieving files that way.
-
-Numerous Internet sites maintain copies of the UUNET files.  However, only
-ftp.uu.net is guaranteed to have the latest official version.
-
-You can also obtain this software in DOS-compatible "zip" archive format from
-the SimTel archives (ftp://ftp.simtel.net/pub/simtelnet/msdos/graphics/), or
-on CompuServe in the Graphics Support forum (GO CIS:GRAPHSUP), library 12
-"JPEG Tools".  Again, these versions may sometimes lag behind the ftp.uu.net
-release.
-
-The JPEG FAQ (Frequently Asked Questions) article is a useful source of
-general information about JPEG.  It is updated constantly and therefore is
-not included in this distribution.  The FAQ is posted every two weeks to
-Usenet newsgroups comp.graphics.misc, news.answers, and other groups.
-It is available on the World Wide Web at http://www.faqs.org/faqs/jpeg-faq/
-and other news.answers archive sites, including the official news.answers
-archive at rtfm.mit.edu: ftp://rtfm.mit.edu/pub/usenet/news.answers/jpeg-faq/.
-If you don't have Web or FTP access, send e-mail to mail-server at rtfm.mit.edu
-with body
-	send usenet/news.answers/jpeg-faq/part1
-	send usenet/news.answers/jpeg-faq/part2
-
-
-RELATED SOFTWARE
-================
-
-Numerous viewing and image manipulation programs now support JPEG.  (Quite a
-few of them use this library to do so.)  The JPEG FAQ described above lists
-some of the more popular free and shareware viewers, and tells where to
-obtain them on Internet.
-
-If you are on a Unix machine, we highly recommend Jef Poskanzer's free
-PBMPLUS software, which provides many useful operations on PPM-format image
-files.  In particular, it can convert PPM images to and from a wide range of
-other formats, thus making cjpeg/djpeg considerably more useful.  The latest
-version is distributed by the NetPBM group, and is available from numerous
-sites, notably ftp://wuarchive.wustl.edu/graphics/graphics/packages/NetPBM/.
-Unfortunately PBMPLUS/NETPBM is not nearly as portable as the IJG software is;
-you are likely to have difficulty making it work on any non-Unix machine.
-
-A different free JPEG implementation, written by the PVRG group at Stanford,
-is available from ftp://havefun.stanford.edu/pub/jpeg/.  This program
-is designed for research and experimentation rather than production use;
-it is slower, harder to use, and less portable than the IJG code, but it
-is easier to read and modify.  Also, the PVRG code supports lossless JPEG,
-which we do not.  (On the other hand, it doesn't do progressive JPEG.)
-
-
-FILE FORMAT WARS
-================
-
-Some JPEG programs produce files that are not compatible with our library.
-The root of the problem is that the ISO JPEG committee failed to specify a
-concrete file format.  Some vendors "filled in the blanks" on their own,
-creating proprietary formats that no one else could read.  (For example, none
-of the early commercial JPEG implementations for the Macintosh were able to
-exchange compressed files.)
-
-The file format we have adopted is called JFIF (see REFERENCES).  This format
-has been agreed to by a number of major commercial JPEG vendors, and it has
-become the de facto standard.  JFIF is a minimal or "low end" representation.
-We recommend the use of TIFF/JPEG (TIFF revision 6.0 as modified by TIFF
-Technical Note #2) for "high end" applications that need to record a lot of
-additional data about an image.  TIFF/JPEG is fairly new and not yet widely
-supported, unfortunately.
-
-The upcoming JPEG Part 3 standard defines a file format called SPIFF.
-SPIFF is interoperable with JFIF, in the sense that most JFIF decoders should
-be able to read the most common variant of SPIFF.  SPIFF has some technical
-advantages over JFIF, but its major claim to fame is simply that it is an
-official standard rather than an informal one.  At this point it is unclear
-whether SPIFF will supersede JFIF or whether JFIF will remain the de-facto
-standard.  IJG intends to support SPIFF once the standard is frozen, but we
-have not decided whether it should become our default output format or not.
-(In any case, our decoder will remain capable of reading JFIF indefinitely.)
-
-Various proprietary file formats incorporating JPEG compression also exist.
-We have little or no sympathy for the existence of these formats.  Indeed,
-one of the original reasons for developing this free software was to help
-force convergence on common, open format standards for JPEG files.  Don't
-use a proprietary file format!
-
-
-TO DO
-=====
-
-The major thrust for v7 will probably be improvement of visual quality.
-The current method for scaling the quantization tables is known not to be
-very good at low Q values.  We also intend to investigate block boundary
-smoothing, "poor man's variable quantization", and other means of improving
-quality-vs-file-size performance without sacrificing compatibility.
-
-In future versions, we are considering supporting some of the upcoming JPEG
-Part 3 extensions --- principally, variable quantization and the SPIFF file
-format.
-
-As always, speeding things up is of great interest.
-
-Please send bug reports, offers of help, etc. to jpeg-info at uunet.uu.net.
diff --git a/make/lib/swt/gtk-linux-x86_64/about_files/about_cairo.html b/make/lib/swt/gtk-linux-x86_64/about_files/about_cairo.html
deleted file mode 100644
index 0132307..0000000
--- a/make/lib/swt/gtk-linux-x86_64/about_files/about_cairo.html
+++ /dev/null
@@ -1,48 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<title>About</title>
-<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
- 
-<p>March 27, 2006</p>	
-<h3>License</h3>
-
-<p>The Eclipse Foundation has included the following package for your convenience:</p> 
-
-<h4>Cairo 1.0.2 for Linux</h4>
-
-<p>Cairo for Linux ("Cairo") is developed by The Cairo Project (<a href="http://www.cairographics.org" target="_blank">http://www.cairographics.org</a>):</p>
-
-<p>Cairo is delivered in the following file ("Cairo Library"):</p>
-<ul>
-    <li>libcairo-swt.so</li>
-</ul>
-
-<p>which was compiled from Cairo source code available at <a href="http://www.cairographics.org/snapshots" target="_blank">http://www.cairographics.org/snapshots</a>.</p>
-
-<p>Your use of the Cairo code in binary form is subject to
-the terms and conditions of Mozilla Public License Version 1.1 ("MPL").  A copy of the MPL is provided (<a href="mpl-v11.txt" target="blank">mpl-v11.txt</a>)
-and is also available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html" target="_blank">http://www.mozilla.org/MPL/MPL-1.1.html.</a>
-
-<h4>pixman 0.1.6</h4>
-
-<p>pixman ("pixman") is packaged within the Cairo Library and was compiled from source code available at
-<a href="http://www.cairographics.org/snapshots" target="_blank">http://www.cairographics.org/snapshots</a>.
-pixman includes the following packages:</p>
-
-<ul>
-	<li>libpixregion</li>
-	<li>libic</li>
-	<li>slim</li>
-</ul>
-
-Your use of pixman is subject to the terms and conditions of the licenses in <a href="pixman-licenses.txt" target="blank">pixman-licenses.txt</a>.</p>
-
-<p>If you did not receive the Cairo Library directly from the Eclipse Foundation, the package is being redistributed by another party ("Redistributor") and different terms and conditions may
-apply its use.  Check the Redistributor's license that was provided with the content.  If no such license exists, contact the Redistributor.</p>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/make/lib/swt/gtk-linux-x86_64/about_files/lgpl-v21.txt b/make/lib/swt/gtk-linux-x86_64/about_files/lgpl-v21.txt
deleted file mode 100644
index 807db79..0000000
--- a/make/lib/swt/gtk-linux-x86_64/about_files/lgpl-v21.txt
+++ /dev/null
@@ -1,506 +0,0 @@
-		  GNU LESSER GENERAL PUBLIC LICENSE
-		       Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
-     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL.  It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
-			    Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
-  This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it.  You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
-  When we speak of free software, we are referring to freedom of use,
-not price.  Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
-  To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights.  These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
-  For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you.  You must make sure that they, too, receive or can get the source
-code.  If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it.  And you must show them these terms so they know their rights.
-
-  We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
-  To protect each distributor, we want to make it very clear that
-there is no warranty for the free library.  Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-

-  Finally, software patents pose a constant threat to the existence of
-any free program.  We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder.  Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
-  Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License.  This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License.  We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
-  When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library.  The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom.  The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
-  We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License.  It also provides other free software developers Less
-of an advantage over competing non-free programs.  These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries.  However, the Lesser license provides advantages in certain
-special circumstances.
-
-  For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard.  To achieve this, non-free programs must be
-allowed to use the library.  A more frequent case is that a free
-library does the same job as widely used non-free libraries.  In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
-  In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software.  For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
-  Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.  Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library".  The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-

-		  GNU LESSER GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
-  A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
-  The "Library", below, refers to any such software library or work
-which has been distributed under these terms.  A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language.  (Hereinafter, translation is
-included without limitation in the term "modification".)
-
-  "Source code" for a work means the preferred form of the work for
-making modifications to it.  For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
-  Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it).  Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-  
-  1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
-  You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-

-  2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) The modified work must itself be a software library.
-
-    b) You must cause the files modified to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    c) You must cause the whole of the work to be licensed at no
-    charge to all third parties under the terms of this License.
-
-    d) If a facility in the modified Library refers to a function or a
-    table of data to be supplied by an application program that uses
-    the facility, other than as an argument passed when the facility
-    is invoked, then you must make a good faith effort to ensure that,
-    in the event an application does not supply such function or
-    table, the facility still operates, and performs whatever part of
-    its purpose remains meaningful.
-
-    (For example, a function in a library to compute square roots has
-    a purpose that is entirely well-defined independent of the
-    application.  Therefore, Subsection 2d requires that any
-    application-supplied function or table used by this function must
-    be optional: if the application does not supply it, the square
-    root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library.  To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License.  (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.)  Do not make any other change in
-these notices.
-

-  Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
-  This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
-  4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
-  If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library".  Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
-  However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library".  The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
-  When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library.  The
-threshold for this to be true is not precisely defined by law.
-
-  If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work.  (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
-  Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-

-  6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
-  You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License.  You must supply a copy of this License.  If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License.  Also, you must do one
-of these things:
-
-    a) Accompany the work with the complete corresponding
-    machine-readable source code for the Library including whatever
-    changes were used in the work (which must be distributed under
-    Sections 1 and 2 above); and, if the work is an executable linked
-    with the Library, with the complete machine-readable "work that
-    uses the Library", as object code and/or source code, so that the
-    user can modify the Library and then relink to produce a modified
-    executable containing the modified Library.  (It is understood
-    that the user who changes the contents of definitions files in the
-    Library will not necessarily be able to recompile the application
-    to use the modified definitions.)
-
-    b) Use a suitable shared library mechanism for linking with the
-    Library.  A suitable mechanism is one that (1) uses at run time a
-    copy of the library already present on the user's computer system,
-    rather than copying library functions into the executable, and (2)
-    will operate properly with a modified version of the library, if
-    the user installs one, as long as the modified version is
-    interface-compatible with the version that the work was made with.
-
-    c) Accompany the work with a written offer, valid for at
-    least three years, to give the same user the materials
-    specified in Subsection 6a, above, for a charge no more
-    than the cost of performing this distribution.
-
-    d) If distribution of the work is made by offering access to copy
-    from a designated place, offer equivalent access to copy the above
-    specified materials from the same place.
-
-    e) Verify that the user has already received a copy of these
-    materials or that you have already sent this user a copy.
-
-  For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it.  However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
-  It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system.  Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-

-  7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
-    a) Accompany the combined library with a copy of the same work
-    based on the Library, uncombined with any other library
-    facilities.  This must be distributed under the terms of the
-    Sections above.
-
-    b) Give prominent notice with the combined library of the fact
-    that part of it is a work based on the Library, and explaining
-    where to find the accompanying uncombined form of the same work.
-
-  8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License.  Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License.  However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
-  9. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Library or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
-  10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-

-  11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded.  In such case, this License incorporates the limitation as if
-written in the body of this License.
-
-  13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation.  If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-

-  14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission.  For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this.  Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
-			    NO WARRANTY
-
-  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
-		     END OF TERMS AND CONDITIONS
-

-           How to Apply These Terms to Your New Libraries
-
-  If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change.  You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
-  To apply these terms, attach the following notices to the library.  It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the library's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the
-  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
-  <signature of Ty Coon>, 1 April 1990
-  Ty Coon, President of Vice
-
-That's all there is to it!
-
-
-
-
diff --git a/make/lib/swt/gtk-linux-x86_64/about_files/mpl-v11.txt b/make/lib/swt/gtk-linux-x86_64/about_files/mpl-v11.txt
deleted file mode 100644
index 7714141..0000000
--- a/make/lib/swt/gtk-linux-x86_64/about_files/mpl-v11.txt
+++ /dev/null
@@ -1,470 +0,0 @@
-                          MOZILLA PUBLIC LICENSE
-                                Version 1.1
-
-                              ---------------
-
-1. Definitions.
-
-     1.0.1. "Commercial Use" means distribution or otherwise making the
-     Covered Code available to a third party.
-
-     1.1. "Contributor" means each entity that creates or contributes to
-     the creation of Modifications.
-
-     1.2. "Contributor Version" means the combination of the Original
-     Code, prior Modifications used by a Contributor, and the Modifications
-     made by that particular Contributor.
-
-     1.3. "Covered Code" means the Original Code or Modifications or the
-     combination of the Original Code and Modifications, in each case
-     including portions thereof.
-
-     1.4. "Electronic Distribution Mechanism" means a mechanism generally
-     accepted in the software development community for the electronic
-     transfer of data.
-
-     1.5. "Executable" means Covered Code in any form other than Source
-     Code.
-
-     1.6. "Initial Developer" means the individual or entity identified
-     as the Initial Developer in the Source Code notice required by Exhibit
-     A.
-
-     1.7. "Larger Work" means a work which combines Covered Code or
-     portions thereof with code not governed by the terms of this License.
-
-     1.8. "License" means this document.
-
-     1.8.1. "Licensable" means having the right to grant, to the maximum
-     extent possible, whether at the time of the initial grant or
-     subsequently acquired, any and all of the rights conveyed herein.
-
-     1.9. "Modifications" means any addition to or deletion from the
-     substance or structure of either the Original Code or any previous
-     Modifications. When Covered Code is released as a series of files, a
-     Modification is:
-          A. Any addition to or deletion from the contents of a file
-          containing Original Code or previous Modifications.
-
-          B. Any new file that contains any part of the Original Code or
-          previous Modifications.
-
-     1.10. "Original Code" means Source Code of computer software code
-     which is described in the Source Code notice required by Exhibit A as
-     Original Code, and which, at the time of its release under this
-     License is not already Covered Code governed by this License.
-
-     1.10.1. "Patent Claims" means any patent claim(s), now owned or
-     hereafter acquired, including without limitation,  method, process,
-     and apparatus claims, in any patent Licensable by grantor.
-
-     1.11. "Source Code" means the preferred form of the Covered Code for
-     making modifications to it, including all modules it contains, plus
-     any associated interface definition files, scripts used to control
-     compilation and installation of an Executable, or source code
-     differential comparisons against either the Original Code or another
-     well known, available Covered Code of the Contributor's choice. The
-     Source Code can be in a compressed or archival form, provided the
-     appropriate decompression or de-archiving software is widely available
-     for no charge.
-
-     1.12. "You" (or "Your")  means an individual or a legal entity
-     exercising rights under, and complying with all of the terms of, this
-     License or a future version of this License issued under Section 6.1.
-     For legal entities, "You" includes any entity which controls, is
-     controlled by, or is under common control with You. For purposes of
-     this definition, "control" means (a) the power, direct or indirect,
-     to cause the direction or management of such entity, whether by
-     contract or otherwise, or (b) ownership of more than fifty percent
-     (50%) of the outstanding shares or beneficial ownership of such
-     entity.
-
-2. Source Code License.
-
-     2.1. The Initial Developer Grant.
-     The Initial Developer hereby grants You a world-wide, royalty-free,
-     non-exclusive license, subject to third party intellectual property
-     claims:
-          (a)  under intellectual property rights (other than patent or
-          trademark) Licensable by Initial Developer to use, reproduce,
-          modify, display, perform, sublicense and distribute the Original
-          Code (or portions thereof) with or without Modifications, and/or
-          as part of a Larger Work; and
-
-          (b) under Patents Claims infringed by the making, using or
-          selling of Original Code, to make, have made, use, practice,
-          sell, and offer for sale, and/or otherwise dispose of the
-          Original Code (or portions thereof).
-
-          (c) the licenses granted in this Section 2.1(a) and (b) are
-          effective on the date Initial Developer first distributes
-          Original Code under the terms of this License.
-
-          (d) Notwithstanding Section 2.1(b) above, no patent license is
-          granted: 1) for code that You delete from the Original Code; 2)
-          separate from the Original Code;  or 3) for infringements caused
-          by: i) the modification of the Original Code or ii) the
-          combination of the Original Code with other software or devices.
-
-     2.2. Contributor Grant.
-     Subject to third party intellectual property claims, each Contributor
-     hereby grants You a world-wide, royalty-free, non-exclusive license
-
-          (a)  under intellectual property rights (other than patent or
-          trademark) Licensable by Contributor, to use, reproduce, modify,
-          display, perform, sublicense and distribute the Modifications
-          created by such Contributor (or portions thereof) either on an
-          unmodified basis, with other Modifications, as Covered Code
-          and/or as part of a Larger Work; and
-
-          (b) under Patent Claims infringed by the making, using, or
-          selling of  Modifications made by that Contributor either alone
-          and/or in combination with its Contributor Version (or portions
-          of such combination), to make, use, sell, offer for sale, have
-          made, and/or otherwise dispose of: 1) Modifications made by that
-          Contributor (or portions thereof); and 2) the combination of
-          Modifications made by that Contributor with its Contributor
-          Version (or portions of such combination).
-
-          (c) the licenses granted in Sections 2.2(a) and 2.2(b) are
-          effective on the date Contributor first makes Commercial Use of
-          the Covered Code.
-
-          (d)    Notwithstanding Section 2.2(b) above, no patent license is
-          granted: 1) for any code that Contributor has deleted from the
-          Contributor Version; 2)  separate from the Contributor Version;
-          3)  for infringements caused by: i) third party modifications of
-          Contributor Version or ii)  the combination of Modifications made
-          by that Contributor with other software  (except as part of the
-          Contributor Version) or other devices; or 4) under Patent Claims
-          infringed by Covered Code in the absence of Modifications made by
-          that Contributor.
-
-3. Distribution Obligations.
-
-     3.1. Application of License.
-     The Modifications which You create or to which You contribute are
-     governed by the terms of this License, including without limitation
-     Section 2.2. The Source Code version of Covered Code may be
-     distributed only under the terms of this License or a future version
-     of this License released under Section 6.1, and You must include a
-     copy of this License with every copy of the Source Code You
-     distribute. You may not offer or impose any terms on any Source Code
-     version that alters or restricts the applicable version of this
-     License or the recipients' rights hereunder. However, You may include
-     an additional document offering the additional rights described in
-     Section 3.5.
-
-     3.2. Availability of Source Code.
-     Any Modification which You create or to which You contribute must be
-     made available in Source Code form under the terms of this License
-     either on the same media as an Executable version or via an accepted
-     Electronic Distribution Mechanism to anyone to whom you made an
-     Executable version available; and if made available via Electronic
-     Distribution Mechanism, must remain available for at least twelve (12)
-     months after the date it initially became available, or at least six
-     (6) months after a subsequent version of that particular Modification
-     has been made available to such recipients. You are responsible for
-     ensuring that the Source Code version remains available even if the
-     Electronic Distribution Mechanism is maintained by a third party.
-
-     3.3. Description of Modifications.
-     You must cause all Covered Code to which You contribute to contain a
-     file documenting the changes You made to create that Covered Code and
-     the date of any change. You must include a prominent statement that
-     the Modification is derived, directly or indirectly, from Original
-     Code provided by the Initial Developer and including the name of the
-     Initial Developer in (a) the Source Code, and (b) in any notice in an
-     Executable version or related documentation in which You describe the
-     origin or ownership of the Covered Code.
-
-     3.4. Intellectual Property Matters
-          (a) Third Party Claims.
-          If Contributor has knowledge that a license under a third party's
-          intellectual property rights is required to exercise the rights
-          granted by such Contributor under Sections 2.1 or 2.2,
-          Contributor must include a text file with the Source Code
-          distribution titled "LEGAL" which describes the claim and the
-          party making the claim in sufficient detail that a recipient will
-          know whom to contact. If Contributor obtains such knowledge after
-          the Modification is made available as described in Section 3.2,
-          Contributor shall promptly modify the LEGAL file in all copies
-          Contributor makes available thereafter and shall take other steps
-          (such as notifying appropriate mailing lists or newsgroups)
-          reasonably calculated to inform those who received the Covered
-          Code that new knowledge has been obtained.
-
-          (b) Contributor APIs.
-          If Contributor's Modifications include an application programming
-          interface and Contributor has knowledge of patent licenses which
-          are reasonably necessary to implement that API, Contributor must
-          also include this information in the LEGAL file.
-
-               (c)    Representations.
-          Contributor represents that, except as disclosed pursuant to
-          Section 3.4(a) above, Contributor believes that Contributor's
-          Modifications are Contributor's original creation(s) and/or
-          Contributor has sufficient rights to grant the rights conveyed by
-          this License.
-
-     3.5. Required Notices.
-     You must duplicate the notice in Exhibit A in each file of the Source
-     Code.  If it is not possible to put such notice in a particular Source
-     Code file due to its structure, then You must include such notice in a
-     location (such as a relevant directory) where a user would be likely
-     to look for such a notice.  If You created one or more Modification(s)
-     You may add your name as a Contributor to the notice described in
-     Exhibit A.  You must also duplicate this License in any documentation
-     for the Source Code where You describe recipients' rights or ownership
-     rights relating to Covered Code.  You may choose to offer, and to
-     charge a fee for, warranty, support, indemnity or liability
-     obligations to one or more recipients of Covered Code. However, You
-     may do so only on Your own behalf, and not on behalf of the Initial
-     Developer or any Contributor. You must make it absolutely clear than
-     any such warranty, support, indemnity or liability obligation is
-     offered by You alone, and You hereby agree to indemnify the Initial
-     Developer and every Contributor for any liability incurred by the
-     Initial Developer or such Contributor as a result of warranty,
-     support, indemnity or liability terms You offer.
-
-     3.6. Distribution of Executable Versions.
-     You may distribute Covered Code in Executable form only if the
-     requirements of Section 3.1-3.5 have been met for that Covered Code,
-     and if You include a notice stating that the Source Code version of
-     the Covered Code is available under the terms of this License,
-     including a description of how and where You have fulfilled the
-     obligations of Section 3.2. The notice must be conspicuously included
-     in any notice in an Executable version, related documentation or
-     collateral in which You describe recipients' rights relating to the
-     Covered Code. You may distribute the Executable version of Covered
-     Code or ownership rights under a license of Your choice, which may
-     contain terms different from this License, provided that You are in
-     compliance with the terms of this License and that the license for the
-     Executable version does not attempt to limit or alter the recipient's
-     rights in the Source Code version from the rights set forth in this
-     License. If You distribute the Executable version under a different
-     license You must make it absolutely clear that any terms which differ
-     from this License are offered by You alone, not by the Initial
-     Developer or any Contributor. You hereby agree to indemnify the
-     Initial Developer and every Contributor for any liability incurred by
-     the Initial Developer or such Contributor as a result of any such
-     terms You offer.
-
-     3.7. Larger Works.
-     You may create a Larger Work by combining Covered Code with other code
-     not governed by the terms of this License and distribute the Larger
-     Work as a single product. In such a case, You must make sure the
-     requirements of this License are fulfilled for the Covered Code.
-
-4. Inability to Comply Due to Statute or Regulation.
-
-     If it is impossible for You to comply with any of the terms of this
-     License with respect to some or all of the Covered Code due to
-     statute, judicial order, or regulation then You must: (a) comply with
-     the terms of this License to the maximum extent possible; and (b)
-     describe the limitations and the code they affect. Such description
-     must be included in the LEGAL file described in Section 3.4 and must
-     be included with all distributions of the Source Code. Except to the
-     extent prohibited by statute or regulation, such description must be
-     sufficiently detailed for a recipient of ordinary skill to be able to
-     understand it.
-
-5. Application of this License.
-
-     This License applies to code to which the Initial Developer has
-     attached the notice in Exhibit A and to related Covered Code.
-
-6. Versions of the License.
-
-     6.1. New Versions.
-     Netscape Communications Corporation ("Netscape") may publish revised
-     and/or new versions of the License from time to time. Each version
-     will be given a distinguishing version number.
-
-     6.2. Effect of New Versions.
-     Once Covered Code has been published under a particular version of the
-     License, You may always continue to use it under the terms of that
-     version. You may also choose to use such Covered Code under the terms
-     of any subsequent version of the License published by Netscape. No one
-     other than Netscape has the right to modify the terms applicable to
-     Covered Code created under this License.
-
-     6.3. Derivative Works.
-     If You create or use a modified version of this License (which you may
-     only do in order to apply it to code which is not already Covered Code
-     governed by this License), You must (a) rename Your license so that
-     the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape",
-     "MPL", "NPL" or any confusingly similar phrase do not appear in your
-     license (except to note that your license differs from this License)
-     and (b) otherwise make it clear that Your version of the license
-     contains terms which differ from the Mozilla Public License and
-     Netscape Public License. (Filling in the name of the Initial
-     Developer, Original Code or Contributor in the notice described in
-     Exhibit A shall not of themselves be deemed to be modifications of
-     this License.)
-
-7. DISCLAIMER OF WARRANTY.
-
-     COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
-     WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
-     WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
-     DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
-     THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
-     IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
-     YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
-     COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
-     OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
-     ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
-
-8. TERMINATION.
-
-     8.1.  This License and the rights granted hereunder will terminate
-     automatically if You fail to comply with terms herein and fail to cure
-     such breach within 30 days of becoming aware of the breach. All
-     sublicenses to the Covered Code which are properly granted shall
-     survive any termination of this License. Provisions which, by their
-     nature, must remain in effect beyond the termination of this License
-     shall survive.
-
-     8.2.  If You initiate litigation by asserting a patent infringement
-     claim (excluding declatory judgment actions) against Initial Developer
-     or a Contributor (the Initial Developer or Contributor against whom
-     You file such action is referred to as "Participant")  alleging that:
-
-     (a)  such Participant's Contributor Version directly or indirectly
-     infringes any patent, then any and all rights granted by such
-     Participant to You under Sections 2.1 and/or 2.2 of this License
-     shall, upon 60 days notice from Participant terminate prospectively,
-     unless if within 60 days after receipt of notice You either: (i)
-     agree in writing to pay Participant a mutually agreeable reasonable
-     royalty for Your past and future use of Modifications made by such
-     Participant, or (ii) withdraw Your litigation claim with respect to
-     the Contributor Version against such Participant.  If within 60 days
-     of notice, a reasonable royalty and payment arrangement are not
-     mutually agreed upon in writing by the parties or the litigation claim
-     is not withdrawn, the rights granted by Participant to You under
-     Sections 2.1 and/or 2.2 automatically terminate at the expiration of
-     the 60 day notice period specified above.
-
-     (b)  any software, hardware, or device, other than such Participant's
-     Contributor Version, directly or indirectly infringes any patent, then
-     any rights granted to You by such Participant under Sections 2.1(b)
-     and 2.2(b) are revoked effective as of the date You first made, used,
-     sold, distributed, or had made, Modifications made by that
-     Participant.
-
-     8.3.  If You assert a patent infringement claim against Participant
-     alleging that such Participant's Contributor Version directly or
-     indirectly infringes any patent where such claim is resolved (such as
-     by license or settlement) prior to the initiation of patent
-     infringement litigation, then the reasonable value of the licenses
-     granted by such Participant under Sections 2.1 or 2.2 shall be taken
-     into account in determining the amount or value of any payment or
-     license.
-
-     8.4.  In the event of termination under Sections 8.1 or 8.2 above,
-     all end user license agreements (excluding distributors and resellers)
-     which have been validly granted by You or any distributor hereunder
-     prior to termination shall survive termination.
-
-9. LIMITATION OF LIABILITY.
-
-     UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
-     (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL
-     DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
-     OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR
-     ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
-     CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,
-     WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
-     COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
-     INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
-     LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
-     RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
-     PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
-     EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
-     THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
-
-10. U.S. GOVERNMENT END USERS.
-
-     The Covered Code is a "commercial item," as that term is defined in
-     48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
-     software" and "commercial computer software documentation," as such
-     terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
-     C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
-     all U.S. Government End Users acquire Covered Code with only those
-     rights set forth herein.
-
-11. MISCELLANEOUS.
-
-     This License represents the complete agreement concerning subject
-     matter hereof. If any provision of this License is held to be
-     unenforceable, such provision shall be reformed only to the extent
-     necessary to make it enforceable. This License shall be governed by
-     California law provisions (except to the extent applicable law, if
-     any, provides otherwise), excluding its conflict-of-law provisions.
-     With respect to disputes in which at least one party is a citizen of,
-     or an entity chartered or registered to do business in the United
-     States of America, any litigation relating to this License shall be
-     subject to the jurisdiction of the Federal Courts of the Northern
-     District of California, with venue lying in Santa Clara County,
-     California, with the losing party responsible for costs, including
-     without limitation, court costs and reasonable attorneys' fees and
-     expenses. The application of the United Nations Convention on
-     Contracts for the International Sale of Goods is expressly excluded.
-     Any law or regulation which provides that the language of a contract
-     shall be construed against the drafter shall not apply to this
-     License.
-
-12. RESPONSIBILITY FOR CLAIMS.
-
-     As between Initial Developer and the Contributors, each party is
-     responsible for claims and damages arising, directly or indirectly,
-     out of its utilization of rights under this License and You agree to
-     work with Initial Developer and Contributors to distribute such
-     responsibility on an equitable basis. Nothing herein is intended or
-     shall be deemed to constitute any admission of liability.
-
-13. MULTIPLE-LICENSED CODE.
-
-     Initial Developer may designate portions of the Covered Code as
-     "Multiple-Licensed".  "Multiple-Licensed" means that the Initial
-     Developer permits you to utilize portions of the Covered Code under
-     Your choice of the NPL or the alternative licenses, if any, specified
-     by the Initial Developer in the file described in Exhibit A.
-
-EXHIBIT A -Mozilla Public License.
-
-     ``The contents of this file are subject to the Mozilla Public License
-     Version 1.1 (the "License"); you may not use this file except in
-     compliance with the License. You may obtain a copy of the License at
-     http://www.mozilla.org/MPL/
-
-     Software distributed under the License is distributed on an "AS IS"
-     basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
-     License for the specific language governing rights and limitations
-     under the License.
-
-     The Original Code is ______________________________________.
-
-     The Initial Developer of the Original Code is ________________________.
-     Portions created by ______________________ are Copyright (C) ______
-     _______________________. All Rights Reserved.
-
-     Contributor(s): ______________________________________.
-
-     Alternatively, the contents of this file may be used under the terms
-     of the _____ license (the  "[___] License"), in which case the
-     provisions of [______] License are applicable instead of those
-     above.  If you wish to allow use of your version of this file only
-     under the terms of the [____] License and not to allow others to use
-     your version of this file under the MPL, indicate your decision by
-     deleting  the provisions above and replace  them with the notice and
-     other provisions required by the [___] License.  If you do not delete
-     the provisions above, a recipient may use your version of this file
-     under either the MPL or the [___] License."
-
-     [NOTE: The text of this Exhibit A may differ slightly from the text of
-     the notices in the Source Code files of the Original Code. You should
-     use the text of this Exhibit A rather than the text found in the
-     Original Code Source Code for Your Modifications.]
-
diff --git a/make/lib/swt/gtk-linux-x86_64/about_files/pixman-licenses.txt b/make/lib/swt/gtk-linux-x86_64/about_files/pixman-licenses.txt
deleted file mode 100644
index 5d8dca6..0000000
--- a/make/lib/swt/gtk-linux-x86_64/about_files/pixman-licenses.txt
+++ /dev/null
@@ -1,92 +0,0 @@
-libpixregion
-
-Copyright 1987, 1998  The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-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 THE
-OPEN GROUP 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.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
-
-                        All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its 
-documentation for any purpose and without fee is hereby granted, 
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in 
-supporting documentation, and that the name of Digital not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.  
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-----------------------------------------------------------------------
-libic
-
-Copyright � 2001 Keith Packard
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation, and that the name of Keith Packard not be used in
-advertising or publicity pertaining to distribution of the software without
-specific, written prior permission.  Keith Packard makes no
-representations about the suitability of this software for any purpose.  It
-is provided "as is" without express or implied warranty.
-
-KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
-EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
-CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
-TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-PERFORMANCE OF THIS SOFTWARE.
-
-----------------------------------------------------------------------
-slim
-
-slim is Copyright � 2003 Richard Henderson
-
-Permission to use, copy, modify, distribute, and sell this software
-and its documentation for any purpose is hereby granted without fee,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of Richard Henderson not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.  Richard Henderson
-makes no representations about the suitability of this software for
-any purpose.  It is provided "as is" without express or implied
-warranty.
-
-RICHARD HENDERSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
-EVENT SHALL RICHARD HENDERSON BE LIABLE FOR ANY SPECIAL, INDIRECT OR
-CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
-USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
-OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-PERFORMANCE OF THIS SOFTWARE.
-
diff --git a/make/lib/swt/gtk-linux-x86_64/about_files/webkit-bsd.txt b/make/lib/swt/gtk-linux-x86_64/about_files/webkit-bsd.txt
deleted file mode 100644
index b3b07c6..0000000
--- a/make/lib/swt/gtk-linux-x86_64/about_files/webkit-bsd.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-BSD License
-
-Copyright (C) 2009 Apple 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:
-
-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 APPLE INC. AND ITS CONTRIBUTORS �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 APPLE INC. OR ITS 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.
diff --git a/make/lib/swt/gtk-linux-x86_64/swt-debug.jar b/make/lib/swt/gtk-linux-x86_64/swt-debug.jar
deleted file mode 100644
index 682b2b0..0000000
Binary files a/make/lib/swt/gtk-linux-x86_64/swt-debug.jar and /dev/null differ
diff --git a/make/lib/swt/notice.html b/make/lib/swt/notice.html
deleted file mode 100644
index c184ca3..0000000
--- a/make/lib/swt/notice.html
+++ /dev/null
@@ -1,107 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
-<title>Eclipse Foundation Software User Agreement</title>
-</head>
-
-<body lang="EN-US">
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>April 14, 2010</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
-   (COLLECTIVELY "CONTENT").  USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
-   CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW.  BY USING THE CONTENT, YOU AGREE THAT YOUR USE
-   OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
-   NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
-   CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
-   ("EPL").  A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-   For purposes of the EPL, "Program" will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
-   repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</p>
-
-<ul>
-       <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
-       <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
-       <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
-      and/or Fragments associated with that Feature.</li>
-       <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
-Included Features should be contained in files named "license.html" ("Feature Licenses").  Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
-       <li>The top-level (root) directory</li>
-       <li>Plug-in and Fragment directories</li>
-       <li>Inside Plug-ins and Fragments packaged as JARs</li>
-       <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
-       <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the
-installation process.  If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them.  Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.  SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
-       <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
-       <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
-       <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
-       <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
-       <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT.  If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-
-<h3>Use of Provisioning Technology</h3>
-
-<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
-   Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or
-   other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to
-   install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
-       href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
-   ("Specification").</p>
-
-<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
-   applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
-   in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
-   Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
-
-<ol>
-       <li>A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology
-       on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based
-       product.</li>
-       <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
-       accessed and copied to the Target Machine.</li>
-       <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
-       Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target
-       Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
-       the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
-       indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
-</ol>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
-   another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
-   possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
-</body>
-</html>
diff --git a/make/lib/swt/win32-win32-x86/about.html b/make/lib/swt/win32-win32-x86/about.html
deleted file mode 100644
index c787c6b..0000000
--- a/make/lib/swt/win32-win32-x86/about.html
+++ /dev/null
@@ -1,184 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
- 
-<p>August 17, 2006</p>	
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in ("Content").  Unless otherwise 
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 ("EPL").  A copy of the EPL is available 
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, "Program" will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is 
-being redistributed by another party ("Redistributor") and different terms and conditions may
-apply to your use of any object code in the Content.  Check the Redistributor's license that was 
-provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-<h3>Third Party Content</h3>
-
-<p>The Content includes items that have been sourced from third parties as set out below. If you 
-did not receive this Content directly from the Eclipse Foundation, the following is provided 
-for informational purposes only, and you should look to the Redistributor’s license for 
-terms and conditions of use.</p>
-
-<h4>Mozilla Binding</h4>
-
-<p>The "Mozilla Binding" is a binding to the Mozilla API.  The Content may include any or all of the following files:</p>
-
-<p>The following files in the plug-in JAR shall be defined as the native code portion of the Mozilla Binding:</p>
-<ul>
-	<li>swt-xulrunner-win32-xxxx.dll (where "xxxx" is the version number)</li>
-	<li>swt-xpcominit-win32-xxxx.dll (where "xxxx" is the version number)</li>
-</ul>
-
-<p>The following files in both the plug-in JAR and the src.zip shall be defined respectively as the bytecode and source code portions of the Mozilla Binding:</p>
-<ul>
-	<li>The contents of the directory org/eclipse/swt/internal/mozilla (but not including any sub-directories)</li>
-</ul>
-
-<p>The Mozilla Binding contains portions of Mozilla ("Mozilla").  Mozilla is made available by Mozilla.org.  Use of Mozilla is governed by the terms and
-conditions of the Mozilla Public License Version 1.1 ("MPL").  A copy of the MPL is provided with the Content (<a href="about_files/mpl-v11.txt" target="_blank">mpl-v11.txt</a>) and is also available at
-<a href="http://www.mozilla.org/MPL/MPL-1.1.html" target="_blank">http://www.mozilla.org/MPL/MPL-1.1.html</a>.</p>
-
-<h4>XULRunner 1.9 (subset, derivative work)</h4>
-
-The library swt-xulrunner-win32-xxxx.dll (where "xxxx" is the version number) contains a small portion of XULRunner 1.9 content (header files) that have
-been modified from the Original Code provided by mozilla.org, and whose Initial Developer is Netscape Communications Corporation. Use of this code is governed by
-the terms and conditions of the Mozilla Public License Version 1.1 ("MPL").  A copy of the MPL is provided with the Content (<a href="./about_files/mpl-v11.txt">mpl-v11.txt</a>)
-and is also available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>.
-<p>The changed files are:
-<ul>
-  <li>org.eclipse.swt/Eclipse SWT Mozilla/common/library/nsIScriptContext.h</code>
-  <li>org.eclipse.swt/Eclipse SWT Mozilla/common/library/nsIScriptGlobalObject.h</code>
-</ul>
-Changes to the original files were made by SWT on April 7, 2009 and are marked with trailing comment <em>"//SWT-20090407"</em>.
-
-<h4>Independent JPEG Group's JPEG software release 6b</h4>
-
-<p>This software is based in part on the work of the Independent JPEG Group's JPEG software release 6b ("LIBJPEG").
-LIBJPEG was used to implement the decoding of JPEG format files in Java (TM).  The Content does NOT include any portion of the LIBJPEG file ansi2knr.c.</p>
-
-<p>Your use of LIBJPEG is subject to the terms and conditions located in the <a href="about_files/IJG_README">about_files/IJG_README</a> file which is included
-with the Content.</p>
-
-<p>The IJG's website is located at <a href="http://ijg.org/" target="_blank">http://ijg.org</a>.</p>
-
-<p>The class org.eclipse.swt.internal.image.JPEGFileFormat is based on following files from LIBJPEG:</p>
-
-<ul>
-    <li>cderror.h</li>
-    <li>cdjpeg.h</li>
-    <li>jchuff.h</li>
-    <li>jdcolor.c</li>
-    <li>jdct.h</li>
-    <li>jdhuff.h</li>
-    <li>jerror.h</li>
-    <li>jidctint.c</li>
-    <li>jinclude.h</li>
-    <li>jmemsys.h</li>
-    <li>jmorecfg.h</li>
-    <li>jpegint.h</li>
-    <li>jpeglib.h</li>
-    <li>jversion.h</li>
-    <li>transupp.h</li>
-</ul>
-
-<p>The class org.eclipse.swt.internal.image.JPEGDecoder is based on the following files from LIBJPEG:</p>
-
-<ul>
-	<li>jcapimin.c</li>
-	<li>jcapistd.c</li>
-	<li>jccoefct.c</li>
-	<li>jccolor.c</li>
-	<li>jcdctmgr.c</li>
-	<li>jchuff.c</li>
-	<li>jcinit.c</li>
-	<li>jcmainct.c</li>
-	<li>jcmarker.c</li>
-	<li>jcmaster.c</li>
-	<li>jcomapi.c</li>
-	<li>jcparam.c</li>
-	<li>jcphuff.c</li>
-	<li>jcprepct.c</li>
-	<li>jcsample.c</li>
-	<li>jctrans.c</li>
-	<li>jdapimin.c</li>
-	<li>jdapistd.c</li>
-	<li>jdatadst.c</li>
-	<li>jdatasrc.c</li>
-	<li>jdcoefct.c</li>
-	<li>jdcolor.c</li>
-	<li>jddctmgr.c</li>
-	<li>jdhuff.c</li>
-	<li>jdinput.c</li>
-	<li>jdmainct.c</li>
-	<li>jdmarker.c</li>
-	<li>jdmaster.c</li>
-	<li>jdmerge.c</li>
-	<li>jdphuff.c</li>
-	<li>jdpostct.c</li>
-	<li>jdsample.c</li>
-	<li>jdtrans.c</li>
-	<li>jerror.c</li>
-	<li>jfdctflt.c</li>
-	<li>jfdctfst.c</li>
-	<li>jfdctint.c</li>
-	<li>jidctflt.c</li>
-	<li>jidctfst.c</li>
-	<li>jidctint.c</li>
-	<li>jidctred.c</li>
-	<li>jpegtran.c</li>
-	<li>jquant1.c</li>
-	<li>jquant2.c</li>
-	<li>jutils.c</li>
-	<li>cderror.h</li>
-	<li>cdjpeg.h</li>
-	<li>jchuff.h</li>
-	<li>jconfig.h</li>
-	<li>jdct.h</li>
-	<li>jdhuff.h</li>
-	<li>jerror.h</li>
-	<li>jinclude.h</li>
-	<li>jmorecfg.h</li>
-	<li>jpegint.h</li>
-	<li>jpeglib.h</li>
-	<li>jversion.h</li>
-	<li>transupp.h</li>
-</ul>
-	
-<p>The following changes were made to the LIBJPEG code in the Content:</p>
-
-<ol>
-	<li>In Java, pointer math is not allowed so indexing was used instead.</li>
-	<li>Function pointers were replaced with switch statements.</li>
-	<li>The virtual memory, tracing and progress monitoring were removed.</li>
-	<li>The error handling was simplified and now uses Java exceptions.</li>
-</ol>
-
-<h4>PuTTY 0.58 (derivative work)</h4>
-
-<p>Portions of the SWT class org/eclipse/swt/internal/image/PngDeflater are based on PuTTY's sshzlib.c. PuTTY is made available by Mozilla.org.  Use of PuTTY is governed by the terms and
-conditions of the the following MIT-style license:  </p>
-<blockquote>
-  <p><em>PuTTY is copyright 1997-2007 Simon Tatham.</em> </p>
-  <p><em>Portions copyright Robert de Bath, Joris van Rantwijk, Delian  Delchev, Andreas Schultz, Jeroen Massar, Wez Furlong, Nicolas Barry,  Justin Bradford, Ben Harris, Malcolm Smith, Ahmad Khalifa, Markus Kuhn,  and CORE SDI S.A.</em> </p>
-  <p><em>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:</em> </p>
-  <p><em>The above copyright notice and this permission notice shall be  included in all copies or substantial portions of the Software.</em> </p>
-  <p><em>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 SIMON TATHAM 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.</em> </p>
-</blockquote>
-<p>A copy of the license is also available at <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/licence.html" target="_blank">http://www.chiark.greenend.org.uk/~sgtatham/putty/licence.html</a>.</p>
-
-<p><small>Java and all Java-based trademarks and logos are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries.</small></p>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/make/lib/swt/win32-win32-x86/about_files/IJG_README b/make/lib/swt/win32-win32-x86/about_files/IJG_README
deleted file mode 100644
index 86cc206..0000000
--- a/make/lib/swt/win32-win32-x86/about_files/IJG_README
+++ /dev/null
@@ -1,385 +0,0 @@
-The Independent JPEG Group's JPEG software
-==========================================
-
-README for release 6b of 27-Mar-1998
-====================================
-
-This distribution contains the sixth public release of the Independent JPEG
-Group's free JPEG software.  You are welcome to redistribute this software and
-to use it for any purpose, subject to the conditions under LEGAL ISSUES, below.
-
-Serious users of this software (particularly those incorporating it into
-larger programs) should contact IJG at jpeg-info at uunet.uu.net to be added to
-our electronic mailing list.  Mailing list members are notified of updates
-and have a chance to participate in technical discussions, etc.
-
-This software is the work of Tom Lane, Philip Gladstone, Jim Boucher,
-Lee Crocker, Julian Minguillon, Luis Ortiz, George Phillips, Davide Rossi,
-Guido Vollbeding, Ge' Weijers, and other members of the Independent JPEG
-Group.
-
-IJG is not affiliated with the official ISO JPEG standards committee.
-
-
-DOCUMENTATION ROADMAP
-=====================
-
-This file contains the following sections:
-
-OVERVIEW            General description of JPEG and the IJG software.
-LEGAL ISSUES        Copyright, lack of warranty, terms of distribution.
-REFERENCES          Where to learn more about JPEG.
-ARCHIVE LOCATIONS   Where to find newer versions of this software.
-RELATED SOFTWARE    Other stuff you should get.
-FILE FORMAT WARS    Software *not* to get.
-TO DO               Plans for future IJG releases.
-
-Other documentation files in the distribution are:
-
-User documentation:
-  install.doc       How to configure and install the IJG software.
-  usage.doc         Usage instructions for cjpeg, djpeg, jpegtran,
-                    rdjpgcom, and wrjpgcom.
-  *.1               Unix-style man pages for programs (same info as usage.doc).
-  wizard.doc        Advanced usage instructions for JPEG wizards only.
-  change.log        Version-to-version change highlights.
-Programmer and internal documentation:
-  libjpeg.doc       How to use the JPEG library in your own programs.
-  example.c         Sample code for calling the JPEG library.
-  structure.doc     Overview of the JPEG library's internal structure.
-  filelist.doc      Road map of IJG files.
-  coderules.doc     Coding style rules --- please read if you contribute code.
-
-Please read at least the files install.doc and usage.doc.  Useful information
-can also be found in the JPEG FAQ (Frequently Asked Questions) article.  See
-ARCHIVE LOCATIONS below to find out where to obtain the FAQ article.
-
-If you want to understand how the JPEG code works, we suggest reading one or
-more of the REFERENCES, then looking at the documentation files (in roughly
-the order listed) before diving into the code.
-
-
-OVERVIEW
-========
-
-This package contains C software to implement JPEG image compression and
-decompression.  JPEG (pronounced "jay-peg") is a standardized compression
-method for full-color and gray-scale images.  JPEG is intended for compressing
-"real-world" scenes; line drawings, cartoons and other non-realistic images
-are not its strong suit.  JPEG is lossy, meaning that the output image is not
-exactly identical to the input image.  Hence you must not use JPEG if you
-have to have identical output bits.  However, on typical photographic images,
-very good compression levels can be obtained with no visible change, and
-remarkably high compression levels are possible if you can tolerate a
-low-quality image.  For more details, see the references, or just experiment
-with various compression settings.
-
-This software implements JPEG baseline, extended-sequential, and progressive
-compression processes.  Provision is made for supporting all variants of these
-processes, although some uncommon parameter settings aren't implemented yet.
-For legal reasons, we are not distributing code for the arithmetic-coding
-variants of JPEG; see LEGAL ISSUES.  We have made no provision for supporting
-the hierarchical or lossless processes defined in the standard.
-
-We provide a set of library routines for reading and writing JPEG image files,
-plus two sample applications "cjpeg" and "djpeg", which use the library to
-perform conversion between JPEG and some other popular image file formats.
-The library is intended to be reused in other applications.
-
-In order to support file conversion and viewing software, we have included
-considerable functionality beyond the bare JPEG coding/decoding capability;
-for example, the color quantization modules are not strictly part of JPEG
-decoding, but they are essential for output to colormapped file formats or
-colormapped displays.  These extra functions can be compiled out of the
-library if not required for a particular application.  We have also included
-"jpegtran", a utility for lossless transcoding between different JPEG
-processes, and "rdjpgcom" and "wrjpgcom", two simple applications for
-inserting and extracting textual comments in JFIF files.
-
-The emphasis in designing this software has been on achieving portability and
-flexibility, while also making it fast enough to be useful.  In particular,
-the software is not intended to be read as a tutorial on JPEG.  (See the
-REFERENCES section for introductory material.)  Rather, it is intended to
-be reliable, portable, industrial-strength code.  We do not claim to have
-achieved that goal in every aspect of the software, but we strive for it.
-
-We welcome the use of this software as a component of commercial products.
-No royalty is required, but we do ask for an acknowledgement in product
-documentation, as described under LEGAL ISSUES.
-
-
-LEGAL ISSUES
-============
-
-In plain English:
-
-1. We don't promise that this software works.  (But if you find any bugs,
-   please let us know!)
-2. You can use this software for whatever you want.  You don't have to pay us.
-3. You may not pretend that you wrote this software.  If you use it in a
-   program, you must acknowledge somewhere in your documentation that
-   you've used the IJG code.
-
-In legalese:
-
-The authors make NO WARRANTY or representation, either express or implied,
-with respect to this software, its quality, accuracy, merchantability, or
-fitness for a particular purpose.  This software is provided "AS IS", and you,
-its user, assume the entire risk as to its quality and accuracy.
-
-This software is copyright (C) 1991-1998, Thomas G. Lane.
-All Rights Reserved except as specified below.
-
-Permission is hereby granted to use, copy, modify, and distribute this
-software (or portions thereof) for any purpose, without fee, subject to these
-conditions:
-(1) If any part of the source code for this software is distributed, then this
-README file must be included, with this copyright and no-warranty notice
-unaltered; and any additions, deletions, or changes to the original files
-must be clearly indicated in accompanying documentation.
-(2) If only executable code is distributed, then the accompanying
-documentation must state that "this software is based in part on the work of
-the Independent JPEG Group".
-(3) Permission for use of this software is granted only if the user accepts
-full responsibility for any undesirable consequences; the authors accept
-NO LIABILITY for damages of any kind.
-
-These conditions apply to any software derived from or based on the IJG code,
-not just to the unmodified library.  If you use our work, you ought to
-acknowledge us.
-
-Permission is NOT granted for the use of any IJG author's name or company name
-in advertising or publicity relating to this software or products derived from
-it.  This software may be referred to only as "the Independent JPEG Group's
-software".
-
-We specifically permit and encourage the use of this software as the basis of
-commercial products, provided that all warranty or liability claims are
-assumed by the product vendor.
-
-
-ansi2knr.c is included in this distribution by permission of L. Peter Deutsch,
-sole proprietor of its copyright holder, Aladdin Enterprises of Menlo Park, CA.
-ansi2knr.c is NOT covered by the above copyright and conditions, but instead
-by the usual distribution terms of the Free Software Foundation; principally,
-that you must include source code if you redistribute it.  (See the file
-ansi2knr.c for full details.)  However, since ansi2knr.c is not needed as part
-of any program generated from the IJG code, this does not limit you more than
-the foregoing paragraphs do.
-
-The Unix configuration script "configure" was produced with GNU Autoconf.
-It is copyright by the Free Software Foundation but is freely distributable.
-The same holds for its supporting scripts (config.guess, config.sub,
-ltconfig, ltmain.sh).  Another support script, install-sh, is copyright
-by M.I.T. but is also freely distributable.
-
-It appears that the arithmetic coding option of the JPEG spec is covered by
-patents owned by IBM, AT&T, and Mitsubishi.  Hence arithmetic coding cannot
-legally be used without obtaining one or more licenses.  For this reason,
-support for arithmetic coding has been removed from the free JPEG software.
-(Since arithmetic coding provides only a marginal gain over the unpatented
-Huffman mode, it is unlikely that very many implementations will support it.)
-So far as we are aware, there are no patent restrictions on the remaining
-code.
-
-The IJG distribution formerly included code to read and write GIF files.
-To avoid entanglement with the Unisys LZW patent, GIF reading support has
-been removed altogether, and the GIF writer has been simplified to produce
-"uncompressed GIFs".  This technique does not use the LZW algorithm; the
-resulting GIF files are larger than usual, but are readable by all standard
-GIF decoders.
-
-We are required to state that
-    "The Graphics Interchange Format(c) is the Copyright property of
-    CompuServe Incorporated.  GIF(sm) is a Service Mark property of
-    CompuServe Incorporated."
-
-
-REFERENCES
-==========
-
-We highly recommend reading one or more of these references before trying to
-understand the innards of the JPEG software.
-
-The best short technical introduction to the JPEG compression algorithm is
-	Wallace, Gregory K.  "The JPEG Still Picture Compression Standard",
-	Communications of the ACM, April 1991 (vol. 34 no. 4), pp. 30-44.
-(Adjacent articles in that issue discuss MPEG motion picture compression,
-applications of JPEG, and related topics.)  If you don't have the CACM issue
-handy, a PostScript file containing a revised version of Wallace's article is
-available at ftp://ftp.uu.net/graphics/jpeg/wallace.ps.gz.  The file (actually
-a preprint for an article that appeared in IEEE Trans. Consumer Electronics)
-omits the sample images that appeared in CACM, but it includes corrections
-and some added material.  Note: the Wallace article is copyright ACM and IEEE,
-and it may not be used for commercial purposes.
-
-A somewhat less technical, more leisurely introduction to JPEG can be found in
-"The Data Compression Book" by Mark Nelson and Jean-loup Gailly, published by
-M&T Books (New York), 2nd ed. 1996, ISBN 1-55851-434-1.  This book provides
-good explanations and example C code for a multitude of compression methods
-including JPEG.  It is an excellent source if you are comfortable reading C
-code but don't know much about data compression in general.  The book's JPEG
-sample code is far from industrial-strength, but when you are ready to look
-at a full implementation, you've got one here...
-
-The best full description of JPEG is the textbook "JPEG Still Image Data
-Compression Standard" by William B. Pennebaker and Joan L. Mitchell, published
-by Van Nostrand Reinhold, 1993, ISBN 0-442-01272-1.  Price US$59.95, 638 pp.
-The book includes the complete text of the ISO JPEG standards (DIS 10918-1
-and draft DIS 10918-2).  This is by far the most complete exposition of JPEG
-in existence, and we highly recommend it.
-
-The JPEG standard itself is not available electronically; you must order a
-paper copy through ISO or ITU.  (Unless you feel a need to own a certified
-official copy, we recommend buying the Pennebaker and Mitchell book instead;
-it's much cheaper and includes a great deal of useful explanatory material.)
-In the USA, copies of the standard may be ordered from ANSI Sales at (212)
-642-4900, or from Global Engineering Documents at (800) 854-7179.  (ANSI
-doesn't take credit card orders, but Global does.)  It's not cheap: as of
-1992, ANSI was charging $95 for Part 1 and $47 for Part 2, plus 7%
-shipping/handling.  The standard is divided into two parts, Part 1 being the
-actual specification, while Part 2 covers compliance testing methods.  Part 1
-is titled "Digital Compression and Coding of Continuous-tone Still Images,
-Part 1: Requirements and guidelines" and has document numbers ISO/IEC IS
-10918-1, ITU-T T.81.  Part 2 is titled "Digital Compression and Coding of
-Continuous-tone Still Images, Part 2: Compliance testing" and has document
-numbers ISO/IEC IS 10918-2, ITU-T T.83.
-
-Some extensions to the original JPEG standard are defined in JPEG Part 3,
-a newer ISO standard numbered ISO/IEC IS 10918-3 and ITU-T T.84.  IJG
-currently does not support any Part 3 extensions.
-
-The JPEG standard does not specify all details of an interchangeable file
-format.  For the omitted details we follow the "JFIF" conventions, revision
-1.02.  A copy of the JFIF spec is available from:
-	Literature Department
-	C-Cube Microsystems, Inc.
-	1778 McCarthy Blvd.
-	Milpitas, CA 95035
-	phone (408) 944-6300,  fax (408) 944-6314
-A PostScript version of this document is available by FTP at
-ftp://ftp.uu.net/graphics/jpeg/jfif.ps.gz.  There is also a plain text
-version at ftp://ftp.uu.net/graphics/jpeg/jfif.txt.gz, but it is missing
-the figures.
-
-The TIFF 6.0 file format specification can be obtained by FTP from
-ftp://ftp.sgi.com/graphics/tiff/TIFF6.ps.gz.  The JPEG incorporation scheme
-found in the TIFF 6.0 spec of 3-June-92 has a number of serious problems.
-IJG does not recommend use of the TIFF 6.0 design (TIFF Compression tag 6).
-Instead, we recommend the JPEG design proposed by TIFF Technical Note #2
-(Compression tag 7).  Copies of this Note can be obtained from ftp.sgi.com or
-from ftp://ftp.uu.net/graphics/jpeg/.  It is expected that the next revision
-of the TIFF spec will replace the 6.0 JPEG design with the Note's design.
-Although IJG's own code does not support TIFF/JPEG, the free libtiff library
-uses our library to implement TIFF/JPEG per the Note.  libtiff is available
-from ftp://ftp.sgi.com/graphics/tiff/.
-
-
-ARCHIVE LOCATIONS
-=================
-
-The "official" archive site for this software is ftp.uu.net (Internet
-address 192.48.96.9).  The most recent released version can always be found
-there in directory graphics/jpeg.  This particular version will be archived
-as ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz.  If you don't have
-direct Internet access, UUNET's archives are also available via UUCP; contact
-help at uunet.uu.net for information on retrieving files that way.
-
-Numerous Internet sites maintain copies of the UUNET files.  However, only
-ftp.uu.net is guaranteed to have the latest official version.
-
-You can also obtain this software in DOS-compatible "zip" archive format from
-the SimTel archives (ftp://ftp.simtel.net/pub/simtelnet/msdos/graphics/), or
-on CompuServe in the Graphics Support forum (GO CIS:GRAPHSUP), library 12
-"JPEG Tools".  Again, these versions may sometimes lag behind the ftp.uu.net
-release.
-
-The JPEG FAQ (Frequently Asked Questions) article is a useful source of
-general information about JPEG.  It is updated constantly and therefore is
-not included in this distribution.  The FAQ is posted every two weeks to
-Usenet newsgroups comp.graphics.misc, news.answers, and other groups.
-It is available on the World Wide Web at http://www.faqs.org/faqs/jpeg-faq/
-and other news.answers archive sites, including the official news.answers
-archive at rtfm.mit.edu: ftp://rtfm.mit.edu/pub/usenet/news.answers/jpeg-faq/.
-If you don't have Web or FTP access, send e-mail to mail-server at rtfm.mit.edu
-with body
-	send usenet/news.answers/jpeg-faq/part1
-	send usenet/news.answers/jpeg-faq/part2
-
-
-RELATED SOFTWARE
-================
-
-Numerous viewing and image manipulation programs now support JPEG.  (Quite a
-few of them use this library to do so.)  The JPEG FAQ described above lists
-some of the more popular free and shareware viewers, and tells where to
-obtain them on Internet.
-
-If you are on a Unix machine, we highly recommend Jef Poskanzer's free
-PBMPLUS software, which provides many useful operations on PPM-format image
-files.  In particular, it can convert PPM images to and from a wide range of
-other formats, thus making cjpeg/djpeg considerably more useful.  The latest
-version is distributed by the NetPBM group, and is available from numerous
-sites, notably ftp://wuarchive.wustl.edu/graphics/graphics/packages/NetPBM/.
-Unfortunately PBMPLUS/NETPBM is not nearly as portable as the IJG software is;
-you are likely to have difficulty making it work on any non-Unix machine.
-
-A different free JPEG implementation, written by the PVRG group at Stanford,
-is available from ftp://havefun.stanford.edu/pub/jpeg/.  This program
-is designed for research and experimentation rather than production use;
-it is slower, harder to use, and less portable than the IJG code, but it
-is easier to read and modify.  Also, the PVRG code supports lossless JPEG,
-which we do not.  (On the other hand, it doesn't do progressive JPEG.)
-
-
-FILE FORMAT WARS
-================
-
-Some JPEG programs produce files that are not compatible with our library.
-The root of the problem is that the ISO JPEG committee failed to specify a
-concrete file format.  Some vendors "filled in the blanks" on their own,
-creating proprietary formats that no one else could read.  (For example, none
-of the early commercial JPEG implementations for the Macintosh were able to
-exchange compressed files.)
-
-The file format we have adopted is called JFIF (see REFERENCES).  This format
-has been agreed to by a number of major commercial JPEG vendors, and it has
-become the de facto standard.  JFIF is a minimal or "low end" representation.
-We recommend the use of TIFF/JPEG (TIFF revision 6.0 as modified by TIFF
-Technical Note #2) for "high end" applications that need to record a lot of
-additional data about an image.  TIFF/JPEG is fairly new and not yet widely
-supported, unfortunately.
-
-The upcoming JPEG Part 3 standard defines a file format called SPIFF.
-SPIFF is interoperable with JFIF, in the sense that most JFIF decoders should
-be able to read the most common variant of SPIFF.  SPIFF has some technical
-advantages over JFIF, but its major claim to fame is simply that it is an
-official standard rather than an informal one.  At this point it is unclear
-whether SPIFF will supersede JFIF or whether JFIF will remain the de-facto
-standard.  IJG intends to support SPIFF once the standard is frozen, but we
-have not decided whether it should become our default output format or not.
-(In any case, our decoder will remain capable of reading JFIF indefinitely.)
-
-Various proprietary file formats incorporating JPEG compression also exist.
-We have little or no sympathy for the existence of these formats.  Indeed,
-one of the original reasons for developing this free software was to help
-force convergence on common, open format standards for JPEG files.  Don't
-use a proprietary file format!
-
-
-TO DO
-=====
-
-The major thrust for v7 will probably be improvement of visual quality.
-The current method for scaling the quantization tables is known not to be
-very good at low Q values.  We also intend to investigate block boundary
-smoothing, "poor man's variable quantization", and other means of improving
-quality-vs-file-size performance without sacrificing compatibility.
-
-In future versions, we are considering supporting some of the upcoming JPEG
-Part 3 extensions --- principally, variable quantization and the SPIFF file
-format.
-
-As always, speeding things up is of great interest.
-
-Please send bug reports, offers of help, etc. to jpeg-info at uunet.uu.net.
diff --git a/make/lib/swt/win32-win32-x86/about_files/mpl-v11.txt b/make/lib/swt/win32-win32-x86/about_files/mpl-v11.txt
deleted file mode 100644
index 7714141..0000000
--- a/make/lib/swt/win32-win32-x86/about_files/mpl-v11.txt
+++ /dev/null
@@ -1,470 +0,0 @@
-                          MOZILLA PUBLIC LICENSE
-                                Version 1.1
-
-                              ---------------
-
-1. Definitions.
-
-     1.0.1. "Commercial Use" means distribution or otherwise making the
-     Covered Code available to a third party.
-
-     1.1. "Contributor" means each entity that creates or contributes to
-     the creation of Modifications.
-
-     1.2. "Contributor Version" means the combination of the Original
-     Code, prior Modifications used by a Contributor, and the Modifications
-     made by that particular Contributor.
-
-     1.3. "Covered Code" means the Original Code or Modifications or the
-     combination of the Original Code and Modifications, in each case
-     including portions thereof.
-
-     1.4. "Electronic Distribution Mechanism" means a mechanism generally
-     accepted in the software development community for the electronic
-     transfer of data.
-
-     1.5. "Executable" means Covered Code in any form other than Source
-     Code.
-
-     1.6. "Initial Developer" means the individual or entity identified
-     as the Initial Developer in the Source Code notice required by Exhibit
-     A.
-
-     1.7. "Larger Work" means a work which combines Covered Code or
-     portions thereof with code not governed by the terms of this License.
-
-     1.8. "License" means this document.
-
-     1.8.1. "Licensable" means having the right to grant, to the maximum
-     extent possible, whether at the time of the initial grant or
-     subsequently acquired, any and all of the rights conveyed herein.
-
-     1.9. "Modifications" means any addition to or deletion from the
-     substance or structure of either the Original Code or any previous
-     Modifications. When Covered Code is released as a series of files, a
-     Modification is:
-          A. Any addition to or deletion from the contents of a file
-          containing Original Code or previous Modifications.
-
-          B. Any new file that contains any part of the Original Code or
-          previous Modifications.
-
-     1.10. "Original Code" means Source Code of computer software code
-     which is described in the Source Code notice required by Exhibit A as
-     Original Code, and which, at the time of its release under this
-     License is not already Covered Code governed by this License.
-
-     1.10.1. "Patent Claims" means any patent claim(s), now owned or
-     hereafter acquired, including without limitation,  method, process,
-     and apparatus claims, in any patent Licensable by grantor.
-
-     1.11. "Source Code" means the preferred form of the Covered Code for
-     making modifications to it, including all modules it contains, plus
-     any associated interface definition files, scripts used to control
-     compilation and installation of an Executable, or source code
-     differential comparisons against either the Original Code or another
-     well known, available Covered Code of the Contributor's choice. The
-     Source Code can be in a compressed or archival form, provided the
-     appropriate decompression or de-archiving software is widely available
-     for no charge.
-
-     1.12. "You" (or "Your")  means an individual or a legal entity
-     exercising rights under, and complying with all of the terms of, this
-     License or a future version of this License issued under Section 6.1.
-     For legal entities, "You" includes any entity which controls, is
-     controlled by, or is under common control with You. For purposes of
-     this definition, "control" means (a) the power, direct or indirect,
-     to cause the direction or management of such entity, whether by
-     contract or otherwise, or (b) ownership of more than fifty percent
-     (50%) of the outstanding shares or beneficial ownership of such
-     entity.
-
-2. Source Code License.
-
-     2.1. The Initial Developer Grant.
-     The Initial Developer hereby grants You a world-wide, royalty-free,
-     non-exclusive license, subject to third party intellectual property
-     claims:
-          (a)  under intellectual property rights (other than patent or
-          trademark) Licensable by Initial Developer to use, reproduce,
-          modify, display, perform, sublicense and distribute the Original
-          Code (or portions thereof) with or without Modifications, and/or
-          as part of a Larger Work; and
-
-          (b) under Patents Claims infringed by the making, using or
-          selling of Original Code, to make, have made, use, practice,
-          sell, and offer for sale, and/or otherwise dispose of the
-          Original Code (or portions thereof).
-
-          (c) the licenses granted in this Section 2.1(a) and (b) are
-          effective on the date Initial Developer first distributes
-          Original Code under the terms of this License.
-
-          (d) Notwithstanding Section 2.1(b) above, no patent license is
-          granted: 1) for code that You delete from the Original Code; 2)
-          separate from the Original Code;  or 3) for infringements caused
-          by: i) the modification of the Original Code or ii) the
-          combination of the Original Code with other software or devices.
-
-     2.2. Contributor Grant.
-     Subject to third party intellectual property claims, each Contributor
-     hereby grants You a world-wide, royalty-free, non-exclusive license
-
-          (a)  under intellectual property rights (other than patent or
-          trademark) Licensable by Contributor, to use, reproduce, modify,
-          display, perform, sublicense and distribute the Modifications
-          created by such Contributor (or portions thereof) either on an
-          unmodified basis, with other Modifications, as Covered Code
-          and/or as part of a Larger Work; and
-
-          (b) under Patent Claims infringed by the making, using, or
-          selling of  Modifications made by that Contributor either alone
-          and/or in combination with its Contributor Version (or portions
-          of such combination), to make, use, sell, offer for sale, have
-          made, and/or otherwise dispose of: 1) Modifications made by that
-          Contributor (or portions thereof); and 2) the combination of
-          Modifications made by that Contributor with its Contributor
-          Version (or portions of such combination).
-
-          (c) the licenses granted in Sections 2.2(a) and 2.2(b) are
-          effective on the date Contributor first makes Commercial Use of
-          the Covered Code.
-
-          (d)    Notwithstanding Section 2.2(b) above, no patent license is
-          granted: 1) for any code that Contributor has deleted from the
-          Contributor Version; 2)  separate from the Contributor Version;
-          3)  for infringements caused by: i) third party modifications of
-          Contributor Version or ii)  the combination of Modifications made
-          by that Contributor with other software  (except as part of the
-          Contributor Version) or other devices; or 4) under Patent Claims
-          infringed by Covered Code in the absence of Modifications made by
-          that Contributor.
-
-3. Distribution Obligations.
-
-     3.1. Application of License.
-     The Modifications which You create or to which You contribute are
-     governed by the terms of this License, including without limitation
-     Section 2.2. The Source Code version of Covered Code may be
-     distributed only under the terms of this License or a future version
-     of this License released under Section 6.1, and You must include a
-     copy of this License with every copy of the Source Code You
-     distribute. You may not offer or impose any terms on any Source Code
-     version that alters or restricts the applicable version of this
-     License or the recipients' rights hereunder. However, You may include
-     an additional document offering the additional rights described in
-     Section 3.5.
-
-     3.2. Availability of Source Code.
-     Any Modification which You create or to which You contribute must be
-     made available in Source Code form under the terms of this License
-     either on the same media as an Executable version or via an accepted
-     Electronic Distribution Mechanism to anyone to whom you made an
-     Executable version available; and if made available via Electronic
-     Distribution Mechanism, must remain available for at least twelve (12)
-     months after the date it initially became available, or at least six
-     (6) months after a subsequent version of that particular Modification
-     has been made available to such recipients. You are responsible for
-     ensuring that the Source Code version remains available even if the
-     Electronic Distribution Mechanism is maintained by a third party.
-
-     3.3. Description of Modifications.
-     You must cause all Covered Code to which You contribute to contain a
-     file documenting the changes You made to create that Covered Code and
-     the date of any change. You must include a prominent statement that
-     the Modification is derived, directly or indirectly, from Original
-     Code provided by the Initial Developer and including the name of the
-     Initial Developer in (a) the Source Code, and (b) in any notice in an
-     Executable version or related documentation in which You describe the
-     origin or ownership of the Covered Code.
-
-     3.4. Intellectual Property Matters
-          (a) Third Party Claims.
-          If Contributor has knowledge that a license under a third party's
-          intellectual property rights is required to exercise the rights
-          granted by such Contributor under Sections 2.1 or 2.2,
-          Contributor must include a text file with the Source Code
-          distribution titled "LEGAL" which describes the claim and the
-          party making the claim in sufficient detail that a recipient will
-          know whom to contact. If Contributor obtains such knowledge after
-          the Modification is made available as described in Section 3.2,
-          Contributor shall promptly modify the LEGAL file in all copies
-          Contributor makes available thereafter and shall take other steps
-          (such as notifying appropriate mailing lists or newsgroups)
-          reasonably calculated to inform those who received the Covered
-          Code that new knowledge has been obtained.
-
-          (b) Contributor APIs.
-          If Contributor's Modifications include an application programming
-          interface and Contributor has knowledge of patent licenses which
-          are reasonably necessary to implement that API, Contributor must
-          also include this information in the LEGAL file.
-
-               (c)    Representations.
-          Contributor represents that, except as disclosed pursuant to
-          Section 3.4(a) above, Contributor believes that Contributor's
-          Modifications are Contributor's original creation(s) and/or
-          Contributor has sufficient rights to grant the rights conveyed by
-          this License.
-
-     3.5. Required Notices.
-     You must duplicate the notice in Exhibit A in each file of the Source
-     Code.  If it is not possible to put such notice in a particular Source
-     Code file due to its structure, then You must include such notice in a
-     location (such as a relevant directory) where a user would be likely
-     to look for such a notice.  If You created one or more Modification(s)
-     You may add your name as a Contributor to the notice described in
-     Exhibit A.  You must also duplicate this License in any documentation
-     for the Source Code where You describe recipients' rights or ownership
-     rights relating to Covered Code.  You may choose to offer, and to
-     charge a fee for, warranty, support, indemnity or liability
-     obligations to one or more recipients of Covered Code. However, You
-     may do so only on Your own behalf, and not on behalf of the Initial
-     Developer or any Contributor. You must make it absolutely clear than
-     any such warranty, support, indemnity or liability obligation is
-     offered by You alone, and You hereby agree to indemnify the Initial
-     Developer and every Contributor for any liability incurred by the
-     Initial Developer or such Contributor as a result of warranty,
-     support, indemnity or liability terms You offer.
-
-     3.6. Distribution of Executable Versions.
-     You may distribute Covered Code in Executable form only if the
-     requirements of Section 3.1-3.5 have been met for that Covered Code,
-     and if You include a notice stating that the Source Code version of
-     the Covered Code is available under the terms of this License,
-     including a description of how and where You have fulfilled the
-     obligations of Section 3.2. The notice must be conspicuously included
-     in any notice in an Executable version, related documentation or
-     collateral in which You describe recipients' rights relating to the
-     Covered Code. You may distribute the Executable version of Covered
-     Code or ownership rights under a license of Your choice, which may
-     contain terms different from this License, provided that You are in
-     compliance with the terms of this License and that the license for the
-     Executable version does not attempt to limit or alter the recipient's
-     rights in the Source Code version from the rights set forth in this
-     License. If You distribute the Executable version under a different
-     license You must make it absolutely clear that any terms which differ
-     from this License are offered by You alone, not by the Initial
-     Developer or any Contributor. You hereby agree to indemnify the
-     Initial Developer and every Contributor for any liability incurred by
-     the Initial Developer or such Contributor as a result of any such
-     terms You offer.
-
-     3.7. Larger Works.
-     You may create a Larger Work by combining Covered Code with other code
-     not governed by the terms of this License and distribute the Larger
-     Work as a single product. In such a case, You must make sure the
-     requirements of this License are fulfilled for the Covered Code.
-
-4. Inability to Comply Due to Statute or Regulation.
-
-     If it is impossible for You to comply with any of the terms of this
-     License with respect to some or all of the Covered Code due to
-     statute, judicial order, or regulation then You must: (a) comply with
-     the terms of this License to the maximum extent possible; and (b)
-     describe the limitations and the code they affect. Such description
-     must be included in the LEGAL file described in Section 3.4 and must
-     be included with all distributions of the Source Code. Except to the
-     extent prohibited by statute or regulation, such description must be
-     sufficiently detailed for a recipient of ordinary skill to be able to
-     understand it.
-
-5. Application of this License.
-
-     This License applies to code to which the Initial Developer has
-     attached the notice in Exhibit A and to related Covered Code.
-
-6. Versions of the License.
-
-     6.1. New Versions.
-     Netscape Communications Corporation ("Netscape") may publish revised
-     and/or new versions of the License from time to time. Each version
-     will be given a distinguishing version number.
-
-     6.2. Effect of New Versions.
-     Once Covered Code has been published under a particular version of the
-     License, You may always continue to use it under the terms of that
-     version. You may also choose to use such Covered Code under the terms
-     of any subsequent version of the License published by Netscape. No one
-     other than Netscape has the right to modify the terms applicable to
-     Covered Code created under this License.
-
-     6.3. Derivative Works.
-     If You create or use a modified version of this License (which you may
-     only do in order to apply it to code which is not already Covered Code
-     governed by this License), You must (a) rename Your license so that
-     the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape",
-     "MPL", "NPL" or any confusingly similar phrase do not appear in your
-     license (except to note that your license differs from this License)
-     and (b) otherwise make it clear that Your version of the license
-     contains terms which differ from the Mozilla Public License and
-     Netscape Public License. (Filling in the name of the Initial
-     Developer, Original Code or Contributor in the notice described in
-     Exhibit A shall not of themselves be deemed to be modifications of
-     this License.)
-
-7. DISCLAIMER OF WARRANTY.
-
-     COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
-     WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
-     WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
-     DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
-     THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
-     IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
-     YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
-     COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
-     OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
-     ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
-
-8. TERMINATION.
-
-     8.1.  This License and the rights granted hereunder will terminate
-     automatically if You fail to comply with terms herein and fail to cure
-     such breach within 30 days of becoming aware of the breach. All
-     sublicenses to the Covered Code which are properly granted shall
-     survive any termination of this License. Provisions which, by their
-     nature, must remain in effect beyond the termination of this License
-     shall survive.
-
-     8.2.  If You initiate litigation by asserting a patent infringement
-     claim (excluding declatory judgment actions) against Initial Developer
-     or a Contributor (the Initial Developer or Contributor against whom
-     You file such action is referred to as "Participant")  alleging that:
-
-     (a)  such Participant's Contributor Version directly or indirectly
-     infringes any patent, then any and all rights granted by such
-     Participant to You under Sections 2.1 and/or 2.2 of this License
-     shall, upon 60 days notice from Participant terminate prospectively,
-     unless if within 60 days after receipt of notice You either: (i)
-     agree in writing to pay Participant a mutually agreeable reasonable
-     royalty for Your past and future use of Modifications made by such
-     Participant, or (ii) withdraw Your litigation claim with respect to
-     the Contributor Version against such Participant.  If within 60 days
-     of notice, a reasonable royalty and payment arrangement are not
-     mutually agreed upon in writing by the parties or the litigation claim
-     is not withdrawn, the rights granted by Participant to You under
-     Sections 2.1 and/or 2.2 automatically terminate at the expiration of
-     the 60 day notice period specified above.
-
-     (b)  any software, hardware, or device, other than such Participant's
-     Contributor Version, directly or indirectly infringes any patent, then
-     any rights granted to You by such Participant under Sections 2.1(b)
-     and 2.2(b) are revoked effective as of the date You first made, used,
-     sold, distributed, or had made, Modifications made by that
-     Participant.
-
-     8.3.  If You assert a patent infringement claim against Participant
-     alleging that such Participant's Contributor Version directly or
-     indirectly infringes any patent where such claim is resolved (such as
-     by license or settlement) prior to the initiation of patent
-     infringement litigation, then the reasonable value of the licenses
-     granted by such Participant under Sections 2.1 or 2.2 shall be taken
-     into account in determining the amount or value of any payment or
-     license.
-
-     8.4.  In the event of termination under Sections 8.1 or 8.2 above,
-     all end user license agreements (excluding distributors and resellers)
-     which have been validly granted by You or any distributor hereunder
-     prior to termination shall survive termination.
-
-9. LIMITATION OF LIABILITY.
-
-     UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
-     (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL
-     DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
-     OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR
-     ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
-     CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,
-     WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
-     COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
-     INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
-     LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
-     RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
-     PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
-     EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
-     THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
-
-10. U.S. GOVERNMENT END USERS.
-
-     The Covered Code is a "commercial item," as that term is defined in
-     48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
-     software" and "commercial computer software documentation," as such
-     terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
-     C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
-     all U.S. Government End Users acquire Covered Code with only those
-     rights set forth herein.
-
-11. MISCELLANEOUS.
-
-     This License represents the complete agreement concerning subject
-     matter hereof. If any provision of this License is held to be
-     unenforceable, such provision shall be reformed only to the extent
-     necessary to make it enforceable. This License shall be governed by
-     California law provisions (except to the extent applicable law, if
-     any, provides otherwise), excluding its conflict-of-law provisions.
-     With respect to disputes in which at least one party is a citizen of,
-     or an entity chartered or registered to do business in the United
-     States of America, any litigation relating to this License shall be
-     subject to the jurisdiction of the Federal Courts of the Northern
-     District of California, with venue lying in Santa Clara County,
-     California, with the losing party responsible for costs, including
-     without limitation, court costs and reasonable attorneys' fees and
-     expenses. The application of the United Nations Convention on
-     Contracts for the International Sale of Goods is expressly excluded.
-     Any law or regulation which provides that the language of a contract
-     shall be construed against the drafter shall not apply to this
-     License.
-
-12. RESPONSIBILITY FOR CLAIMS.
-
-     As between Initial Developer and the Contributors, each party is
-     responsible for claims and damages arising, directly or indirectly,
-     out of its utilization of rights under this License and You agree to
-     work with Initial Developer and Contributors to distribute such
-     responsibility on an equitable basis. Nothing herein is intended or
-     shall be deemed to constitute any admission of liability.
-
-13. MULTIPLE-LICENSED CODE.
-
-     Initial Developer may designate portions of the Covered Code as
-     "Multiple-Licensed".  "Multiple-Licensed" means that the Initial
-     Developer permits you to utilize portions of the Covered Code under
-     Your choice of the NPL or the alternative licenses, if any, specified
-     by the Initial Developer in the file described in Exhibit A.
-
-EXHIBIT A -Mozilla Public License.
-
-     ``The contents of this file are subject to the Mozilla Public License
-     Version 1.1 (the "License"); you may not use this file except in
-     compliance with the License. You may obtain a copy of the License at
-     http://www.mozilla.org/MPL/
-
-     Software distributed under the License is distributed on an "AS IS"
-     basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
-     License for the specific language governing rights and limitations
-     under the License.
-
-     The Original Code is ______________________________________.
-
-     The Initial Developer of the Original Code is ________________________.
-     Portions created by ______________________ are Copyright (C) ______
-     _______________________. All Rights Reserved.
-
-     Contributor(s): ______________________________________.
-
-     Alternatively, the contents of this file may be used under the terms
-     of the _____ license (the  "[___] License"), in which case the
-     provisions of [______] License are applicable instead of those
-     above.  If you wish to allow use of your version of this file only
-     under the terms of the [____] License and not to allow others to use
-     your version of this file under the MPL, indicate your decision by
-     deleting  the provisions above and replace  them with the notice and
-     other provisions required by the [___] License.  If you do not delete
-     the provisions above, a recipient may use your version of this file
-     under either the MPL or the [___] License."
-
-     [NOTE: The text of this Exhibit A may differ slightly from the text of
-     the notices in the Source Code files of the Original Code. You should
-     use the text of this Exhibit A rather than the text found in the
-     Original Code Source Code for Your Modifications.]
-
diff --git a/make/lib/swt/win32-win32-x86/swt-debug.jar b/make/lib/swt/win32-win32-x86/swt-debug.jar
deleted file mode 100644
index 30ce492..0000000
Binary files a/make/lib/swt/win32-win32-x86/swt-debug.jar and /dev/null differ
diff --git a/make/lib/swt/win32-win32-x86_64/about.html b/make/lib/swt/win32-win32-x86_64/about.html
deleted file mode 100644
index 7a5cfd1..0000000
--- a/make/lib/swt/win32-win32-x86_64/about.html
+++ /dev/null
@@ -1,171 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
- 
-<p>August 17, 2006</p>	
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in ("Content").  Unless otherwise 
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 ("EPL").  A copy of the EPL is available 
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, "Program" will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is 
-being redistributed by another party ("Redistributor") and different terms and conditions may
-apply to your use of any object code in the Content.  Check the Redistributor's license that was 
-provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-<h3>Third Party Content</h3>
-
-<p>The Content includes items that have been sourced from third parties as set out below. If you 
-did not receive this Content directly from the Eclipse Foundation, the following is provided 
-for informational purposes only, and you should look to the Redistributor’s license for 
-terms and conditions of use.</p>
-
-<h4>Mozilla Binding</h4>
-
-<p>The "Mozilla Binding" is a binding to the Mozilla API.  The Content may include any or all of the following files:</p>
-
-<p>The following files in the plug-in JAR shall be defined as the native code portion of the Mozilla Binding:</p>
-<ul>
-	<li>swt-xulrunner-win32-xxxx.so (where "xxxx" is the version number)</li>
-	<li>swt-xpcominit-win32-xxxx.so (where "xxxx" is the version number)</li>
-</ul>
-
-<p>The following files in both the plug-in JAR and the src.zip shall be defined respectively as the bytecode and source code portions of the Mozilla Binding:</p>
-<ul>
-	<li>The contents of the directory org/eclipse/swt/internal/mozilla (but not including any sub-directories)</li>
-</ul>
-
-<p>The Mozilla Binding contains portions of Mozilla ("Mozilla").  Mozilla is made available by Mozilla.org.  Use of Mozilla is governed by the terms and
-conditions of the Mozilla Public License Version 1.1 ("MPL").  A copy of the MPL is provided with the Content (<a href="about_files/mpl-v11.txt" target="_blank">mpl-v11.txt</a>) and is also available at
-<a href="http://www.mozilla.org/MPL/MPL-1.1.html" target="_blank">http://www.mozilla.org/MPL/MPL-1.1.html</a>.</p>
-
-<h4>Independent JPEG Group's JPEG software release 6b</h4>
-
-<p>This software is based in part on the work of the Independent JPEG Group's JPEG software release 6b ("LIBJPEG").
-LIBJPEG was used to implement the decoding of JPEG format files in Java (TM).  The Content does NOT include any portion of the LIBJPEG file ansi2knr.c.</p>
-
-<p>Your use of LIBJPEG is subject to the terms and conditions located in the <a href="about_files/IJG_README">about_files/IJG_README</a> file which is included
-with the Content.</p>
-
-<p>The IJG's website is located at <a href="http://ijg.org/" target="_blank">http://ijg.org</a>.</p>
-
-<p>The class org.eclipse.swt.internal.image.JPEGFileFormat is based on following files from LIBJPEG:</p>
-
-<ul>
-    <li>cderror.h</li>
-    <li>cdjpeg.h</li>
-    <li>jchuff.h</li>
-    <li>jdcolor.c</li>
-    <li>jdct.h</li>
-    <li>jdhuff.h</li>
-    <li>jerror.h</li>
-    <li>jidctint.c</li>
-    <li>jinclude.h</li>
-    <li>jmemsys.h</li>
-    <li>jmorecfg.h</li>
-    <li>jpegint.h</li>
-    <li>jpeglib.h</li>
-    <li>jversion.h</li>
-    <li>transupp.h</li>
-</ul>
-
-<p>The class org.eclipse.swt.internal.image.JPEGDecoder is based on the following files from LIBJPEG:</p>
-
-<ul>
-	<li>jcapimin.c</li>
-	<li>jcapistd.c</li>
-	<li>jccoefct.c</li>
-	<li>jccolor.c</li>
-	<li>jcdctmgr.c</li>
-	<li>jchuff.c</li>
-	<li>jcinit.c</li>
-	<li>jcmainct.c</li>
-	<li>jcmarker.c</li>
-	<li>jcmaster.c</li>
-	<li>jcomapi.c</li>
-	<li>jcparam.c</li>
-	<li>jcphuff.c</li>
-	<li>jcprepct.c</li>
-	<li>jcsample.c</li>
-	<li>jctrans.c</li>
-	<li>jdapimin.c</li>
-	<li>jdapistd.c</li>
-	<li>jdatadst.c</li>
-	<li>jdatasrc.c</li>
-	<li>jdcoefct.c</li>
-	<li>jdcolor.c</li>
-	<li>jddctmgr.c</li>
-	<li>jdhuff.c</li>
-	<li>jdinput.c</li>
-	<li>jdmainct.c</li>
-	<li>jdmarker.c</li>
-	<li>jdmaster.c</li>
-	<li>jdmerge.c</li>
-	<li>jdphuff.c</li>
-	<li>jdpostct.c</li>
-	<li>jdsample.c</li>
-	<li>jdtrans.c</li>
-	<li>jerror.c</li>
-	<li>jfdctflt.c</li>
-	<li>jfdctfst.c</li>
-	<li>jfdctint.c</li>
-	<li>jidctflt.c</li>
-	<li>jidctfst.c</li>
-	<li>jidctint.c</li>
-	<li>jidctred.c</li>
-	<li>jpegtran.c</li>
-	<li>jquant1.c</li>
-	<li>jquant2.c</li>
-	<li>jutils.c</li>
-	<li>cderror.h</li>
-	<li>cdjpeg.h</li>
-	<li>jchuff.h</li>
-	<li>jconfig.h</li>
-	<li>jdct.h</li>
-	<li>jdhuff.h</li>
-	<li>jerror.h</li>
-	<li>jinclude.h</li>
-	<li>jmorecfg.h</li>
-	<li>jpegint.h</li>
-	<li>jpeglib.h</li>
-	<li>jversion.h</li>
-	<li>transupp.h</li>
-</ul>
-	
-<p>The following changes were made to the LIBJPEG code in the Content:</p>
-
-<ol>
-	<li>In Java, pointer math is not allowed so indexing was used instead.</li>
-	<li>Function pointers were replaced with switch statements.</li>
-	<li>The virtual memory, tracing and progress monitoring were removed.</li>
-	<li>The error handling was simplified and now uses Java exceptions.</li>
-</ol>
-
-<h4>PuTTY 0.58 (derivative work)</h4>
-
-<p>Portions of the SWT class org/eclipse/swt/internal/image/PngDeflater are based on PuTTY's sshzlib.c. PuTTY is made available by Mozilla.org.  Use of PuTTY is governed by the terms and
-conditions of the the following MIT-style license:  </p>
-<blockquote>
-  <p><em>PuTTY is copyright 1997-2007 Simon Tatham.</em> </p>
-  <p><em>Portions copyright Robert de Bath, Joris van Rantwijk, Delian  Delchev, Andreas Schultz, Jeroen Massar, Wez Furlong, Nicolas Barry,  Justin Bradford, Ben Harris, Malcolm Smith, Ahmad Khalifa, Markus Kuhn,  and CORE SDI S.A.</em> </p>
-  <p><em>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:</em> </p>
-  <p><em>The above copyright notice and this permission notice shall be  included in all copies or substantial portions of the Software.</em> </p>
-  <p><em>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 SIMON TATHAM 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.</em> </p>
-</blockquote>
-<p>A copy of the license is also available at <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/licence.html" target="_blank">http://www.chiark.greenend.org.uk/~sgtatham/putty/licence.html</a>.</p>
-
-<p><small>Java and all Java-based trademarks and logos are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries.</small></p>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/make/lib/swt/win32-win32-x86_64/about_files/IJG_README b/make/lib/swt/win32-win32-x86_64/about_files/IJG_README
deleted file mode 100644
index 86cc206..0000000
--- a/make/lib/swt/win32-win32-x86_64/about_files/IJG_README
+++ /dev/null
@@ -1,385 +0,0 @@
-The Independent JPEG Group's JPEG software
-==========================================
-
-README for release 6b of 27-Mar-1998
-====================================
-
-This distribution contains the sixth public release of the Independent JPEG
-Group's free JPEG software.  You are welcome to redistribute this software and
-to use it for any purpose, subject to the conditions under LEGAL ISSUES, below.
-
-Serious users of this software (particularly those incorporating it into
-larger programs) should contact IJG at jpeg-info at uunet.uu.net to be added to
-our electronic mailing list.  Mailing list members are notified of updates
-and have a chance to participate in technical discussions, etc.
-
-This software is the work of Tom Lane, Philip Gladstone, Jim Boucher,
-Lee Crocker, Julian Minguillon, Luis Ortiz, George Phillips, Davide Rossi,
-Guido Vollbeding, Ge' Weijers, and other members of the Independent JPEG
-Group.
-
-IJG is not affiliated with the official ISO JPEG standards committee.
-
-
-DOCUMENTATION ROADMAP
-=====================
-
-This file contains the following sections:
-
-OVERVIEW            General description of JPEG and the IJG software.
-LEGAL ISSUES        Copyright, lack of warranty, terms of distribution.
-REFERENCES          Where to learn more about JPEG.
-ARCHIVE LOCATIONS   Where to find newer versions of this software.
-RELATED SOFTWARE    Other stuff you should get.
-FILE FORMAT WARS    Software *not* to get.
-TO DO               Plans for future IJG releases.
-
-Other documentation files in the distribution are:
-
-User documentation:
-  install.doc       How to configure and install the IJG software.
-  usage.doc         Usage instructions for cjpeg, djpeg, jpegtran,
-                    rdjpgcom, and wrjpgcom.
-  *.1               Unix-style man pages for programs (same info as usage.doc).
-  wizard.doc        Advanced usage instructions for JPEG wizards only.
-  change.log        Version-to-version change highlights.
-Programmer and internal documentation:
-  libjpeg.doc       How to use the JPEG library in your own programs.
-  example.c         Sample code for calling the JPEG library.
-  structure.doc     Overview of the JPEG library's internal structure.
-  filelist.doc      Road map of IJG files.
-  coderules.doc     Coding style rules --- please read if you contribute code.
-
-Please read at least the files install.doc and usage.doc.  Useful information
-can also be found in the JPEG FAQ (Frequently Asked Questions) article.  See
-ARCHIVE LOCATIONS below to find out where to obtain the FAQ article.
-
-If you want to understand how the JPEG code works, we suggest reading one or
-more of the REFERENCES, then looking at the documentation files (in roughly
-the order listed) before diving into the code.
-
-
-OVERVIEW
-========
-
-This package contains C software to implement JPEG image compression and
-decompression.  JPEG (pronounced "jay-peg") is a standardized compression
-method for full-color and gray-scale images.  JPEG is intended for compressing
-"real-world" scenes; line drawings, cartoons and other non-realistic images
-are not its strong suit.  JPEG is lossy, meaning that the output image is not
-exactly identical to the input image.  Hence you must not use JPEG if you
-have to have identical output bits.  However, on typical photographic images,
-very good compression levels can be obtained with no visible change, and
-remarkably high compression levels are possible if you can tolerate a
-low-quality image.  For more details, see the references, or just experiment
-with various compression settings.
-
-This software implements JPEG baseline, extended-sequential, and progressive
-compression processes.  Provision is made for supporting all variants of these
-processes, although some uncommon parameter settings aren't implemented yet.
-For legal reasons, we are not distributing code for the arithmetic-coding
-variants of JPEG; see LEGAL ISSUES.  We have made no provision for supporting
-the hierarchical or lossless processes defined in the standard.
-
-We provide a set of library routines for reading and writing JPEG image files,
-plus two sample applications "cjpeg" and "djpeg", which use the library to
-perform conversion between JPEG and some other popular image file formats.
-The library is intended to be reused in other applications.
-
-In order to support file conversion and viewing software, we have included
-considerable functionality beyond the bare JPEG coding/decoding capability;
-for example, the color quantization modules are not strictly part of JPEG
-decoding, but they are essential for output to colormapped file formats or
-colormapped displays.  These extra functions can be compiled out of the
-library if not required for a particular application.  We have also included
-"jpegtran", a utility for lossless transcoding between different JPEG
-processes, and "rdjpgcom" and "wrjpgcom", two simple applications for
-inserting and extracting textual comments in JFIF files.
-
-The emphasis in designing this software has been on achieving portability and
-flexibility, while also making it fast enough to be useful.  In particular,
-the software is not intended to be read as a tutorial on JPEG.  (See the
-REFERENCES section for introductory material.)  Rather, it is intended to
-be reliable, portable, industrial-strength code.  We do not claim to have
-achieved that goal in every aspect of the software, but we strive for it.
-
-We welcome the use of this software as a component of commercial products.
-No royalty is required, but we do ask for an acknowledgement in product
-documentation, as described under LEGAL ISSUES.
-
-
-LEGAL ISSUES
-============
-
-In plain English:
-
-1. We don't promise that this software works.  (But if you find any bugs,
-   please let us know!)
-2. You can use this software for whatever you want.  You don't have to pay us.
-3. You may not pretend that you wrote this software.  If you use it in a
-   program, you must acknowledge somewhere in your documentation that
-   you've used the IJG code.
-
-In legalese:
-
-The authors make NO WARRANTY or representation, either express or implied,
-with respect to this software, its quality, accuracy, merchantability, or
-fitness for a particular purpose.  This software is provided "AS IS", and you,
-its user, assume the entire risk as to its quality and accuracy.
-
-This software is copyright (C) 1991-1998, Thomas G. Lane.
-All Rights Reserved except as specified below.
-
-Permission is hereby granted to use, copy, modify, and distribute this
-software (or portions thereof) for any purpose, without fee, subject to these
-conditions:
-(1) If any part of the source code for this software is distributed, then this
-README file must be included, with this copyright and no-warranty notice
-unaltered; and any additions, deletions, or changes to the original files
-must be clearly indicated in accompanying documentation.
-(2) If only executable code is distributed, then the accompanying
-documentation must state that "this software is based in part on the work of
-the Independent JPEG Group".
-(3) Permission for use of this software is granted only if the user accepts
-full responsibility for any undesirable consequences; the authors accept
-NO LIABILITY for damages of any kind.
-
-These conditions apply to any software derived from or based on the IJG code,
-not just to the unmodified library.  If you use our work, you ought to
-acknowledge us.
-
-Permission is NOT granted for the use of any IJG author's name or company name
-in advertising or publicity relating to this software or products derived from
-it.  This software may be referred to only as "the Independent JPEG Group's
-software".
-
-We specifically permit and encourage the use of this software as the basis of
-commercial products, provided that all warranty or liability claims are
-assumed by the product vendor.
-
-
-ansi2knr.c is included in this distribution by permission of L. Peter Deutsch,
-sole proprietor of its copyright holder, Aladdin Enterprises of Menlo Park, CA.
-ansi2knr.c is NOT covered by the above copyright and conditions, but instead
-by the usual distribution terms of the Free Software Foundation; principally,
-that you must include source code if you redistribute it.  (See the file
-ansi2knr.c for full details.)  However, since ansi2knr.c is not needed as part
-of any program generated from the IJG code, this does not limit you more than
-the foregoing paragraphs do.
-
-The Unix configuration script "configure" was produced with GNU Autoconf.
-It is copyright by the Free Software Foundation but is freely distributable.
-The same holds for its supporting scripts (config.guess, config.sub,
-ltconfig, ltmain.sh).  Another support script, install-sh, is copyright
-by M.I.T. but is also freely distributable.
-
-It appears that the arithmetic coding option of the JPEG spec is covered by
-patents owned by IBM, AT&T, and Mitsubishi.  Hence arithmetic coding cannot
-legally be used without obtaining one or more licenses.  For this reason,
-support for arithmetic coding has been removed from the free JPEG software.
-(Since arithmetic coding provides only a marginal gain over the unpatented
-Huffman mode, it is unlikely that very many implementations will support it.)
-So far as we are aware, there are no patent restrictions on the remaining
-code.
-
-The IJG distribution formerly included code to read and write GIF files.
-To avoid entanglement with the Unisys LZW patent, GIF reading support has
-been removed altogether, and the GIF writer has been simplified to produce
-"uncompressed GIFs".  This technique does not use the LZW algorithm; the
-resulting GIF files are larger than usual, but are readable by all standard
-GIF decoders.
-
-We are required to state that
-    "The Graphics Interchange Format(c) is the Copyright property of
-    CompuServe Incorporated.  GIF(sm) is a Service Mark property of
-    CompuServe Incorporated."
-
-
-REFERENCES
-==========
-
-We highly recommend reading one or more of these references before trying to
-understand the innards of the JPEG software.
-
-The best short technical introduction to the JPEG compression algorithm is
-	Wallace, Gregory K.  "The JPEG Still Picture Compression Standard",
-	Communications of the ACM, April 1991 (vol. 34 no. 4), pp. 30-44.
-(Adjacent articles in that issue discuss MPEG motion picture compression,
-applications of JPEG, and related topics.)  If you don't have the CACM issue
-handy, a PostScript file containing a revised version of Wallace's article is
-available at ftp://ftp.uu.net/graphics/jpeg/wallace.ps.gz.  The file (actually
-a preprint for an article that appeared in IEEE Trans. Consumer Electronics)
-omits the sample images that appeared in CACM, but it includes corrections
-and some added material.  Note: the Wallace article is copyright ACM and IEEE,
-and it may not be used for commercial purposes.
-
-A somewhat less technical, more leisurely introduction to JPEG can be found in
-"The Data Compression Book" by Mark Nelson and Jean-loup Gailly, published by
-M&T Books (New York), 2nd ed. 1996, ISBN 1-55851-434-1.  This book provides
-good explanations and example C code for a multitude of compression methods
-including JPEG.  It is an excellent source if you are comfortable reading C
-code but don't know much about data compression in general.  The book's JPEG
-sample code is far from industrial-strength, but when you are ready to look
-at a full implementation, you've got one here...
-
-The best full description of JPEG is the textbook "JPEG Still Image Data
-Compression Standard" by William B. Pennebaker and Joan L. Mitchell, published
-by Van Nostrand Reinhold, 1993, ISBN 0-442-01272-1.  Price US$59.95, 638 pp.
-The book includes the complete text of the ISO JPEG standards (DIS 10918-1
-and draft DIS 10918-2).  This is by far the most complete exposition of JPEG
-in existence, and we highly recommend it.
-
-The JPEG standard itself is not available electronically; you must order a
-paper copy through ISO or ITU.  (Unless you feel a need to own a certified
-official copy, we recommend buying the Pennebaker and Mitchell book instead;
-it's much cheaper and includes a great deal of useful explanatory material.)
-In the USA, copies of the standard may be ordered from ANSI Sales at (212)
-642-4900, or from Global Engineering Documents at (800) 854-7179.  (ANSI
-doesn't take credit card orders, but Global does.)  It's not cheap: as of
-1992, ANSI was charging $95 for Part 1 and $47 for Part 2, plus 7%
-shipping/handling.  The standard is divided into two parts, Part 1 being the
-actual specification, while Part 2 covers compliance testing methods.  Part 1
-is titled "Digital Compression and Coding of Continuous-tone Still Images,
-Part 1: Requirements and guidelines" and has document numbers ISO/IEC IS
-10918-1, ITU-T T.81.  Part 2 is titled "Digital Compression and Coding of
-Continuous-tone Still Images, Part 2: Compliance testing" and has document
-numbers ISO/IEC IS 10918-2, ITU-T T.83.
-
-Some extensions to the original JPEG standard are defined in JPEG Part 3,
-a newer ISO standard numbered ISO/IEC IS 10918-3 and ITU-T T.84.  IJG
-currently does not support any Part 3 extensions.
-
-The JPEG standard does not specify all details of an interchangeable file
-format.  For the omitted details we follow the "JFIF" conventions, revision
-1.02.  A copy of the JFIF spec is available from:
-	Literature Department
-	C-Cube Microsystems, Inc.
-	1778 McCarthy Blvd.
-	Milpitas, CA 95035
-	phone (408) 944-6300,  fax (408) 944-6314
-A PostScript version of this document is available by FTP at
-ftp://ftp.uu.net/graphics/jpeg/jfif.ps.gz.  There is also a plain text
-version at ftp://ftp.uu.net/graphics/jpeg/jfif.txt.gz, but it is missing
-the figures.
-
-The TIFF 6.0 file format specification can be obtained by FTP from
-ftp://ftp.sgi.com/graphics/tiff/TIFF6.ps.gz.  The JPEG incorporation scheme
-found in the TIFF 6.0 spec of 3-June-92 has a number of serious problems.
-IJG does not recommend use of the TIFF 6.0 design (TIFF Compression tag 6).
-Instead, we recommend the JPEG design proposed by TIFF Technical Note #2
-(Compression tag 7).  Copies of this Note can be obtained from ftp.sgi.com or
-from ftp://ftp.uu.net/graphics/jpeg/.  It is expected that the next revision
-of the TIFF spec will replace the 6.0 JPEG design with the Note's design.
-Although IJG's own code does not support TIFF/JPEG, the free libtiff library
-uses our library to implement TIFF/JPEG per the Note.  libtiff is available
-from ftp://ftp.sgi.com/graphics/tiff/.
-
-
-ARCHIVE LOCATIONS
-=================
-
-The "official" archive site for this software is ftp.uu.net (Internet
-address 192.48.96.9).  The most recent released version can always be found
-there in directory graphics/jpeg.  This particular version will be archived
-as ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz.  If you don't have
-direct Internet access, UUNET's archives are also available via UUCP; contact
-help at uunet.uu.net for information on retrieving files that way.
-
-Numerous Internet sites maintain copies of the UUNET files.  However, only
-ftp.uu.net is guaranteed to have the latest official version.
-
-You can also obtain this software in DOS-compatible "zip" archive format from
-the SimTel archives (ftp://ftp.simtel.net/pub/simtelnet/msdos/graphics/), or
-on CompuServe in the Graphics Support forum (GO CIS:GRAPHSUP), library 12
-"JPEG Tools".  Again, these versions may sometimes lag behind the ftp.uu.net
-release.
-
-The JPEG FAQ (Frequently Asked Questions) article is a useful source of
-general information about JPEG.  It is updated constantly and therefore is
-not included in this distribution.  The FAQ is posted every two weeks to
-Usenet newsgroups comp.graphics.misc, news.answers, and other groups.
-It is available on the World Wide Web at http://www.faqs.org/faqs/jpeg-faq/
-and other news.answers archive sites, including the official news.answers
-archive at rtfm.mit.edu: ftp://rtfm.mit.edu/pub/usenet/news.answers/jpeg-faq/.
-If you don't have Web or FTP access, send e-mail to mail-server at rtfm.mit.edu
-with body
-	send usenet/news.answers/jpeg-faq/part1
-	send usenet/news.answers/jpeg-faq/part2
-
-
-RELATED SOFTWARE
-================
-
-Numerous viewing and image manipulation programs now support JPEG.  (Quite a
-few of them use this library to do so.)  The JPEG FAQ described above lists
-some of the more popular free and shareware viewers, and tells where to
-obtain them on Internet.
-
-If you are on a Unix machine, we highly recommend Jef Poskanzer's free
-PBMPLUS software, which provides many useful operations on PPM-format image
-files.  In particular, it can convert PPM images to and from a wide range of
-other formats, thus making cjpeg/djpeg considerably more useful.  The latest
-version is distributed by the NetPBM group, and is available from numerous
-sites, notably ftp://wuarchive.wustl.edu/graphics/graphics/packages/NetPBM/.
-Unfortunately PBMPLUS/NETPBM is not nearly as portable as the IJG software is;
-you are likely to have difficulty making it work on any non-Unix machine.
-
-A different free JPEG implementation, written by the PVRG group at Stanford,
-is available from ftp://havefun.stanford.edu/pub/jpeg/.  This program
-is designed for research and experimentation rather than production use;
-it is slower, harder to use, and less portable than the IJG code, but it
-is easier to read and modify.  Also, the PVRG code supports lossless JPEG,
-which we do not.  (On the other hand, it doesn't do progressive JPEG.)
-
-
-FILE FORMAT WARS
-================
-
-Some JPEG programs produce files that are not compatible with our library.
-The root of the problem is that the ISO JPEG committee failed to specify a
-concrete file format.  Some vendors "filled in the blanks" on their own,
-creating proprietary formats that no one else could read.  (For example, none
-of the early commercial JPEG implementations for the Macintosh were able to
-exchange compressed files.)
-
-The file format we have adopted is called JFIF (see REFERENCES).  This format
-has been agreed to by a number of major commercial JPEG vendors, and it has
-become the de facto standard.  JFIF is a minimal or "low end" representation.
-We recommend the use of TIFF/JPEG (TIFF revision 6.0 as modified by TIFF
-Technical Note #2) for "high end" applications that need to record a lot of
-additional data about an image.  TIFF/JPEG is fairly new and not yet widely
-supported, unfortunately.
-
-The upcoming JPEG Part 3 standard defines a file format called SPIFF.
-SPIFF is interoperable with JFIF, in the sense that most JFIF decoders should
-be able to read the most common variant of SPIFF.  SPIFF has some technical
-advantages over JFIF, but its major claim to fame is simply that it is an
-official standard rather than an informal one.  At this point it is unclear
-whether SPIFF will supersede JFIF or whether JFIF will remain the de-facto
-standard.  IJG intends to support SPIFF once the standard is frozen, but we
-have not decided whether it should become our default output format or not.
-(In any case, our decoder will remain capable of reading JFIF indefinitely.)
-
-Various proprietary file formats incorporating JPEG compression also exist.
-We have little or no sympathy for the existence of these formats.  Indeed,
-one of the original reasons for developing this free software was to help
-force convergence on common, open format standards for JPEG files.  Don't
-use a proprietary file format!
-
-
-TO DO
-=====
-
-The major thrust for v7 will probably be improvement of visual quality.
-The current method for scaling the quantization tables is known not to be
-very good at low Q values.  We also intend to investigate block boundary
-smoothing, "poor man's variable quantization", and other means of improving
-quality-vs-file-size performance without sacrificing compatibility.
-
-In future versions, we are considering supporting some of the upcoming JPEG
-Part 3 extensions --- principally, variable quantization and the SPIFF file
-format.
-
-As always, speeding things up is of great interest.
-
-Please send bug reports, offers of help, etc. to jpeg-info at uunet.uu.net.
diff --git a/make/lib/swt/win32-win32-x86_64/about_files/mpl-v11.txt b/make/lib/swt/win32-win32-x86_64/about_files/mpl-v11.txt
deleted file mode 100644
index 7714141..0000000
--- a/make/lib/swt/win32-win32-x86_64/about_files/mpl-v11.txt
+++ /dev/null
@@ -1,470 +0,0 @@
-                          MOZILLA PUBLIC LICENSE
-                                Version 1.1
-
-                              ---------------
-
-1. Definitions.
-
-     1.0.1. "Commercial Use" means distribution or otherwise making the
-     Covered Code available to a third party.
-
-     1.1. "Contributor" means each entity that creates or contributes to
-     the creation of Modifications.
-
-     1.2. "Contributor Version" means the combination of the Original
-     Code, prior Modifications used by a Contributor, and the Modifications
-     made by that particular Contributor.
-
-     1.3. "Covered Code" means the Original Code or Modifications or the
-     combination of the Original Code and Modifications, in each case
-     including portions thereof.
-
-     1.4. "Electronic Distribution Mechanism" means a mechanism generally
-     accepted in the software development community for the electronic
-     transfer of data.
-
-     1.5. "Executable" means Covered Code in any form other than Source
-     Code.
-
-     1.6. "Initial Developer" means the individual or entity identified
-     as the Initial Developer in the Source Code notice required by Exhibit
-     A.
-
-     1.7. "Larger Work" means a work which combines Covered Code or
-     portions thereof with code not governed by the terms of this License.
-
-     1.8. "License" means this document.
-
-     1.8.1. "Licensable" means having the right to grant, to the maximum
-     extent possible, whether at the time of the initial grant or
-     subsequently acquired, any and all of the rights conveyed herein.
-
-     1.9. "Modifications" means any addition to or deletion from the
-     substance or structure of either the Original Code or any previous
-     Modifications. When Covered Code is released as a series of files, a
-     Modification is:
-          A. Any addition to or deletion from the contents of a file
-          containing Original Code or previous Modifications.
-
-          B. Any new file that contains any part of the Original Code or
-          previous Modifications.
-
-     1.10. "Original Code" means Source Code of computer software code
-     which is described in the Source Code notice required by Exhibit A as
-     Original Code, and which, at the time of its release under this
-     License is not already Covered Code governed by this License.
-
-     1.10.1. "Patent Claims" means any patent claim(s), now owned or
-     hereafter acquired, including without limitation,  method, process,
-     and apparatus claims, in any patent Licensable by grantor.
-
-     1.11. "Source Code" means the preferred form of the Covered Code for
-     making modifications to it, including all modules it contains, plus
-     any associated interface definition files, scripts used to control
-     compilation and installation of an Executable, or source code
-     differential comparisons against either the Original Code or another
-     well known, available Covered Code of the Contributor's choice. The
-     Source Code can be in a compressed or archival form, provided the
-     appropriate decompression or de-archiving software is widely available
-     for no charge.
-
-     1.12. "You" (or "Your")  means an individual or a legal entity
-     exercising rights under, and complying with all of the terms of, this
-     License or a future version of this License issued under Section 6.1.
-     For legal entities, "You" includes any entity which controls, is
-     controlled by, or is under common control with You. For purposes of
-     this definition, "control" means (a) the power, direct or indirect,
-     to cause the direction or management of such entity, whether by
-     contract or otherwise, or (b) ownership of more than fifty percent
-     (50%) of the outstanding shares or beneficial ownership of such
-     entity.
-
-2. Source Code License.
-
-     2.1. The Initial Developer Grant.
-     The Initial Developer hereby grants You a world-wide, royalty-free,
-     non-exclusive license, subject to third party intellectual property
-     claims:
-          (a)  under intellectual property rights (other than patent or
-          trademark) Licensable by Initial Developer to use, reproduce,
-          modify, display, perform, sublicense and distribute the Original
-          Code (or portions thereof) with or without Modifications, and/or
-          as part of a Larger Work; and
-
-          (b) under Patents Claims infringed by the making, using or
-          selling of Original Code, to make, have made, use, practice,
-          sell, and offer for sale, and/or otherwise dispose of the
-          Original Code (or portions thereof).
-
-          (c) the licenses granted in this Section 2.1(a) and (b) are
-          effective on the date Initial Developer first distributes
-          Original Code under the terms of this License.
-
-          (d) Notwithstanding Section 2.1(b) above, no patent license is
-          granted: 1) for code that You delete from the Original Code; 2)
-          separate from the Original Code;  or 3) for infringements caused
-          by: i) the modification of the Original Code or ii) the
-          combination of the Original Code with other software or devices.
-
-     2.2. Contributor Grant.
-     Subject to third party intellectual property claims, each Contributor
-     hereby grants You a world-wide, royalty-free, non-exclusive license
-
-          (a)  under intellectual property rights (other than patent or
-          trademark) Licensable by Contributor, to use, reproduce, modify,
-          display, perform, sublicense and distribute the Modifications
-          created by such Contributor (or portions thereof) either on an
-          unmodified basis, with other Modifications, as Covered Code
-          and/or as part of a Larger Work; and
-
-          (b) under Patent Claims infringed by the making, using, or
-          selling of  Modifications made by that Contributor either alone
-          and/or in combination with its Contributor Version (or portions
-          of such combination), to make, use, sell, offer for sale, have
-          made, and/or otherwise dispose of: 1) Modifications made by that
-          Contributor (or portions thereof); and 2) the combination of
-          Modifications made by that Contributor with its Contributor
-          Version (or portions of such combination).
-
-          (c) the licenses granted in Sections 2.2(a) and 2.2(b) are
-          effective on the date Contributor first makes Commercial Use of
-          the Covered Code.
-
-          (d)    Notwithstanding Section 2.2(b) above, no patent license is
-          granted: 1) for any code that Contributor has deleted from the
-          Contributor Version; 2)  separate from the Contributor Version;
-          3)  for infringements caused by: i) third party modifications of
-          Contributor Version or ii)  the combination of Modifications made
-          by that Contributor with other software  (except as part of the
-          Contributor Version) or other devices; or 4) under Patent Claims
-          infringed by Covered Code in the absence of Modifications made by
-          that Contributor.
-
-3. Distribution Obligations.
-
-     3.1. Application of License.
-     The Modifications which You create or to which You contribute are
-     governed by the terms of this License, including without limitation
-     Section 2.2. The Source Code version of Covered Code may be
-     distributed only under the terms of this License or a future version
-     of this License released under Section 6.1, and You must include a
-     copy of this License with every copy of the Source Code You
-     distribute. You may not offer or impose any terms on any Source Code
-     version that alters or restricts the applicable version of this
-     License or the recipients' rights hereunder. However, You may include
-     an additional document offering the additional rights described in
-     Section 3.5.
-
-     3.2. Availability of Source Code.
-     Any Modification which You create or to which You contribute must be
-     made available in Source Code form under the terms of this License
-     either on the same media as an Executable version or via an accepted
-     Electronic Distribution Mechanism to anyone to whom you made an
-     Executable version available; and if made available via Electronic
-     Distribution Mechanism, must remain available for at least twelve (12)
-     months after the date it initially became available, or at least six
-     (6) months after a subsequent version of that particular Modification
-     has been made available to such recipients. You are responsible for
-     ensuring that the Source Code version remains available even if the
-     Electronic Distribution Mechanism is maintained by a third party.
-
-     3.3. Description of Modifications.
-     You must cause all Covered Code to which You contribute to contain a
-     file documenting the changes You made to create that Covered Code and
-     the date of any change. You must include a prominent statement that
-     the Modification is derived, directly or indirectly, from Original
-     Code provided by the Initial Developer and including the name of the
-     Initial Developer in (a) the Source Code, and (b) in any notice in an
-     Executable version or related documentation in which You describe the
-     origin or ownership of the Covered Code.
-
-     3.4. Intellectual Property Matters
-          (a) Third Party Claims.
-          If Contributor has knowledge that a license under a third party's
-          intellectual property rights is required to exercise the rights
-          granted by such Contributor under Sections 2.1 or 2.2,
-          Contributor must include a text file with the Source Code
-          distribution titled "LEGAL" which describes the claim and the
-          party making the claim in sufficient detail that a recipient will
-          know whom to contact. If Contributor obtains such knowledge after
-          the Modification is made available as described in Section 3.2,
-          Contributor shall promptly modify the LEGAL file in all copies
-          Contributor makes available thereafter and shall take other steps
-          (such as notifying appropriate mailing lists or newsgroups)
-          reasonably calculated to inform those who received the Covered
-          Code that new knowledge has been obtained.
-
-          (b) Contributor APIs.
-          If Contributor's Modifications include an application programming
-          interface and Contributor has knowledge of patent licenses which
-          are reasonably necessary to implement that API, Contributor must
-          also include this information in the LEGAL file.
-
-               (c)    Representations.
-          Contributor represents that, except as disclosed pursuant to
-          Section 3.4(a) above, Contributor believes that Contributor's
-          Modifications are Contributor's original creation(s) and/or
-          Contributor has sufficient rights to grant the rights conveyed by
-          this License.
-
-     3.5. Required Notices.
-     You must duplicate the notice in Exhibit A in each file of the Source
-     Code.  If it is not possible to put such notice in a particular Source
-     Code file due to its structure, then You must include such notice in a
-     location (such as a relevant directory) where a user would be likely
-     to look for such a notice.  If You created one or more Modification(s)
-     You may add your name as a Contributor to the notice described in
-     Exhibit A.  You must also duplicate this License in any documentation
-     for the Source Code where You describe recipients' rights or ownership
-     rights relating to Covered Code.  You may choose to offer, and to
-     charge a fee for, warranty, support, indemnity or liability
-     obligations to one or more recipients of Covered Code. However, You
-     may do so only on Your own behalf, and not on behalf of the Initial
-     Developer or any Contributor. You must make it absolutely clear than
-     any such warranty, support, indemnity or liability obligation is
-     offered by You alone, and You hereby agree to indemnify the Initial
-     Developer and every Contributor for any liability incurred by the
-     Initial Developer or such Contributor as a result of warranty,
-     support, indemnity or liability terms You offer.
-
-     3.6. Distribution of Executable Versions.
-     You may distribute Covered Code in Executable form only if the
-     requirements of Section 3.1-3.5 have been met for that Covered Code,
-     and if You include a notice stating that the Source Code version of
-     the Covered Code is available under the terms of this License,
-     including a description of how and where You have fulfilled the
-     obligations of Section 3.2. The notice must be conspicuously included
-     in any notice in an Executable version, related documentation or
-     collateral in which You describe recipients' rights relating to the
-     Covered Code. You may distribute the Executable version of Covered
-     Code or ownership rights under a license of Your choice, which may
-     contain terms different from this License, provided that You are in
-     compliance with the terms of this License and that the license for the
-     Executable version does not attempt to limit or alter the recipient's
-     rights in the Source Code version from the rights set forth in this
-     License. If You distribute the Executable version under a different
-     license You must make it absolutely clear that any terms which differ
-     from this License are offered by You alone, not by the Initial
-     Developer or any Contributor. You hereby agree to indemnify the
-     Initial Developer and every Contributor for any liability incurred by
-     the Initial Developer or such Contributor as a result of any such
-     terms You offer.
-
-     3.7. Larger Works.
-     You may create a Larger Work by combining Covered Code with other code
-     not governed by the terms of this License and distribute the Larger
-     Work as a single product. In such a case, You must make sure the
-     requirements of this License are fulfilled for the Covered Code.
-
-4. Inability to Comply Due to Statute or Regulation.
-
-     If it is impossible for You to comply with any of the terms of this
-     License with respect to some or all of the Covered Code due to
-     statute, judicial order, or regulation then You must: (a) comply with
-     the terms of this License to the maximum extent possible; and (b)
-     describe the limitations and the code they affect. Such description
-     must be included in the LEGAL file described in Section 3.4 and must
-     be included with all distributions of the Source Code. Except to the
-     extent prohibited by statute or regulation, such description must be
-     sufficiently detailed for a recipient of ordinary skill to be able to
-     understand it.
-
-5. Application of this License.
-
-     This License applies to code to which the Initial Developer has
-     attached the notice in Exhibit A and to related Covered Code.
-
-6. Versions of the License.
-
-     6.1. New Versions.
-     Netscape Communications Corporation ("Netscape") may publish revised
-     and/or new versions of the License from time to time. Each version
-     will be given a distinguishing version number.
-
-     6.2. Effect of New Versions.
-     Once Covered Code has been published under a particular version of the
-     License, You may always continue to use it under the terms of that
-     version. You may also choose to use such Covered Code under the terms
-     of any subsequent version of the License published by Netscape. No one
-     other than Netscape has the right to modify the terms applicable to
-     Covered Code created under this License.
-
-     6.3. Derivative Works.
-     If You create or use a modified version of this License (which you may
-     only do in order to apply it to code which is not already Covered Code
-     governed by this License), You must (a) rename Your license so that
-     the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape",
-     "MPL", "NPL" or any confusingly similar phrase do not appear in your
-     license (except to note that your license differs from this License)
-     and (b) otherwise make it clear that Your version of the license
-     contains terms which differ from the Mozilla Public License and
-     Netscape Public License. (Filling in the name of the Initial
-     Developer, Original Code or Contributor in the notice described in
-     Exhibit A shall not of themselves be deemed to be modifications of
-     this License.)
-
-7. DISCLAIMER OF WARRANTY.
-
-     COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
-     WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
-     WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
-     DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
-     THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
-     IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
-     YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
-     COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
-     OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
-     ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
-
-8. TERMINATION.
-
-     8.1.  This License and the rights granted hereunder will terminate
-     automatically if You fail to comply with terms herein and fail to cure
-     such breach within 30 days of becoming aware of the breach. All
-     sublicenses to the Covered Code which are properly granted shall
-     survive any termination of this License. Provisions which, by their
-     nature, must remain in effect beyond the termination of this License
-     shall survive.
-
-     8.2.  If You initiate litigation by asserting a patent infringement
-     claim (excluding declatory judgment actions) against Initial Developer
-     or a Contributor (the Initial Developer or Contributor against whom
-     You file such action is referred to as "Participant")  alleging that:
-
-     (a)  such Participant's Contributor Version directly or indirectly
-     infringes any patent, then any and all rights granted by such
-     Participant to You under Sections 2.1 and/or 2.2 of this License
-     shall, upon 60 days notice from Participant terminate prospectively,
-     unless if within 60 days after receipt of notice You either: (i)
-     agree in writing to pay Participant a mutually agreeable reasonable
-     royalty for Your past and future use of Modifications made by such
-     Participant, or (ii) withdraw Your litigation claim with respect to
-     the Contributor Version against such Participant.  If within 60 days
-     of notice, a reasonable royalty and payment arrangement are not
-     mutually agreed upon in writing by the parties or the litigation claim
-     is not withdrawn, the rights granted by Participant to You under
-     Sections 2.1 and/or 2.2 automatically terminate at the expiration of
-     the 60 day notice period specified above.
-
-     (b)  any software, hardware, or device, other than such Participant's
-     Contributor Version, directly or indirectly infringes any patent, then
-     any rights granted to You by such Participant under Sections 2.1(b)
-     and 2.2(b) are revoked effective as of the date You first made, used,
-     sold, distributed, or had made, Modifications made by that
-     Participant.
-
-     8.3.  If You assert a patent infringement claim against Participant
-     alleging that such Participant's Contributor Version directly or
-     indirectly infringes any patent where such claim is resolved (such as
-     by license or settlement) prior to the initiation of patent
-     infringement litigation, then the reasonable value of the licenses
-     granted by such Participant under Sections 2.1 or 2.2 shall be taken
-     into account in determining the amount or value of any payment or
-     license.
-
-     8.4.  In the event of termination under Sections 8.1 or 8.2 above,
-     all end user license agreements (excluding distributors and resellers)
-     which have been validly granted by You or any distributor hereunder
-     prior to termination shall survive termination.
-
-9. LIMITATION OF LIABILITY.
-
-     UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
-     (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL
-     DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
-     OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR
-     ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
-     CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,
-     WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
-     COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
-     INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
-     LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
-     RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
-     PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
-     EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
-     THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
-
-10. U.S. GOVERNMENT END USERS.
-
-     The Covered Code is a "commercial item," as that term is defined in
-     48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
-     software" and "commercial computer software documentation," as such
-     terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
-     C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
-     all U.S. Government End Users acquire Covered Code with only those
-     rights set forth herein.
-
-11. MISCELLANEOUS.
-
-     This License represents the complete agreement concerning subject
-     matter hereof. If any provision of this License is held to be
-     unenforceable, such provision shall be reformed only to the extent
-     necessary to make it enforceable. This License shall be governed by
-     California law provisions (except to the extent applicable law, if
-     any, provides otherwise), excluding its conflict-of-law provisions.
-     With respect to disputes in which at least one party is a citizen of,
-     or an entity chartered or registered to do business in the United
-     States of America, any litigation relating to this License shall be
-     subject to the jurisdiction of the Federal Courts of the Northern
-     District of California, with venue lying in Santa Clara County,
-     California, with the losing party responsible for costs, including
-     without limitation, court costs and reasonable attorneys' fees and
-     expenses. The application of the United Nations Convention on
-     Contracts for the International Sale of Goods is expressly excluded.
-     Any law or regulation which provides that the language of a contract
-     shall be construed against the drafter shall not apply to this
-     License.
-
-12. RESPONSIBILITY FOR CLAIMS.
-
-     As between Initial Developer and the Contributors, each party is
-     responsible for claims and damages arising, directly or indirectly,
-     out of its utilization of rights under this License and You agree to
-     work with Initial Developer and Contributors to distribute such
-     responsibility on an equitable basis. Nothing herein is intended or
-     shall be deemed to constitute any admission of liability.
-
-13. MULTIPLE-LICENSED CODE.
-
-     Initial Developer may designate portions of the Covered Code as
-     "Multiple-Licensed".  "Multiple-Licensed" means that the Initial
-     Developer permits you to utilize portions of the Covered Code under
-     Your choice of the NPL or the alternative licenses, if any, specified
-     by the Initial Developer in the file described in Exhibit A.
-
-EXHIBIT A -Mozilla Public License.
-
-     ``The contents of this file are subject to the Mozilla Public License
-     Version 1.1 (the "License"); you may not use this file except in
-     compliance with the License. You may obtain a copy of the License at
-     http://www.mozilla.org/MPL/
-
-     Software distributed under the License is distributed on an "AS IS"
-     basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
-     License for the specific language governing rights and limitations
-     under the License.
-
-     The Original Code is ______________________________________.
-
-     The Initial Developer of the Original Code is ________________________.
-     Portions created by ______________________ are Copyright (C) ______
-     _______________________. All Rights Reserved.
-
-     Contributor(s): ______________________________________.
-
-     Alternatively, the contents of this file may be used under the terms
-     of the _____ license (the  "[___] License"), in which case the
-     provisions of [______] License are applicable instead of those
-     above.  If you wish to allow use of your version of this file only
-     under the terms of the [____] License and not to allow others to use
-     your version of this file under the MPL, indicate your decision by
-     deleting  the provisions above and replace  them with the notice and
-     other provisions required by the [___] License.  If you do not delete
-     the provisions above, a recipient may use your version of this file
-     under either the MPL or the [___] License."
-
-     [NOTE: The text of this Exhibit A may differ slightly from the text of
-     the notices in the Source Code files of the Original Code. You should
-     use the text of this Exhibit A rather than the text found in the
-     Original Code Source Code for Your Modifications.]
-
diff --git a/make/lib/swt/win32-win32-x86_64/swt-debug.jar b/make/lib/swt/win32-win32-x86_64/swt-debug.jar
deleted file mode 100644
index a1deaf7..0000000
Binary files a/make/lib/swt/win32-win32-x86_64/swt-debug.jar and /dev/null differ
diff --git a/make/lib/wince/arm/nvap/libEGL.lib b/make/lib/wince/arm/nvap/libEGL.lib
deleted file mode 100644
index 46d7817..0000000
Binary files a/make/lib/wince/arm/nvap/libEGL.lib and /dev/null differ
diff --git a/make/lib/wince/arm/nvap/libGLESv1_CM.lib b/make/lib/wince/arm/nvap/libGLESv1_CM.lib
deleted file mode 100644
index 482ea65..0000000
Binary files a/make/lib/wince/arm/nvap/libGLESv1_CM.lib and /dev/null differ
diff --git a/make/lib/wince/arm/nvap/libGLESv2.lib b/make/lib/wince/arm/nvap/libGLESv2.lib
deleted file mode 100644
index 8cf4c31..0000000
Binary files a/make/lib/wince/arm/nvap/libGLESv2.lib and /dev/null differ
diff --git a/make/lib/wince/arm/nvap/libKD.lib b/make/lib/wince/arm/nvap/libKD.lib
deleted file mode 100644
index 820a6d4..0000000
Binary files a/make/lib/wince/arm/nvap/libKD.lib and /dev/null differ
diff --git a/make/lib/wince/arm/nvap/libnvkdmain.lib b/make/lib/wince/arm/nvap/libnvkdmain.lib
deleted file mode 100644
index 425acfe..0000000
Binary files a/make/lib/wince/arm/nvap/libnvkdmain.lib and /dev/null differ
diff --git a/make/lib/wince/arm/nvap/libnvomx.lib b/make/lib/wince/arm/nvap/libnvomx.lib
deleted file mode 100644
index e669585..0000000
Binary files a/make/lib/wince/arm/nvap/libnvomx.lib and /dev/null differ
diff --git a/make/nativewindowversion b/make/nativewindowversion
index 462ffdb..3eb3bc2 100644
--- a/make/nativewindowversion
+++ b/make/nativewindowversion
@@ -1,3 +1,4 @@
+Manifest-Version: 1.0
 Specification-Title: Native Window Interface API Specification
 Specification-Version: @BASEVERSION@
 Specification-Vendor: JogAmp Community
diff --git a/make/newtversion b/make/newtversion
index 84847fb..e8aa60c 100644
--- a/make/newtversion
+++ b/make/newtversion
@@ -1,3 +1,4 @@
+Manifest-Version: 1.0
 Specification-Title: NEWT API Specification
 Specification-Version: @BASEVERSION@
 Specification-Vendor: JogAmp Community
diff --git a/make/resources/android/AndroidManifest-jogl.xml b/make/resources/android/AndroidManifest-jogl.xml
new file mode 100644
index 0000000..c2017d3
--- /dev/null
+++ b/make/resources/android/AndroidManifest-jogl.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+      sharedUserId="com.jogamp.Community" 
+      package="javax.media.opengl">
+
+    <uses-sdk android:minSdkVersion="9" />
+    <uses-library android:name="com.jogamp.common" android:required="true" />
+
+    <application android:icon="@drawable/icon" 
+                 android:label="@string/app_name"
+                 android:description="@string/app_descr"
+                 android:persistent="false"
+                 >
+        <activity android:name="jogamp.newt.driver.android.NewtVersionActivity"
+                  android:finishOnTaskLaunch="true"
+                  android:launchMode="singleTop"
+                  android:configChanges="keyboardHidden|orientation"
+                  android:label="@string/activity_v_name"
+                  android:description="@string/activity_v_descr"
+                  >
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+    </application>
+
+</manifest>
diff --git a/make/resources/android/AndroidManifest-launcher.xml b/make/resources/android/AndroidManifest-launcher.xml
new file mode 100644
index 0000000..88abc8b
--- /dev/null
+++ b/make/resources/android/AndroidManifest-launcher.xml
@@ -0,0 +1,128 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+      sharedUserId="com.jogamp.Community" 
+      package="com.jogamp.android.launcher">
+
+    <uses-permission android:name="android.permission.INTERNET" /> <!-- required for NV's perfhud -->
+    <uses-sdk android:minSdkVersion="9" />
+    <uses-library android:name="com.jogamp.common" android:required="true" />
+    <uses-library android:name="javax.media.opengl" android:required="true" />
+    <uses-library android:name="com.jogamp.opengl.test" android:required="true" />
+
+    <application android:icon="@drawable/icon" 
+                 android:label="@string/app_name"
+                 android:description="@string/app_descr"
+                 android:persistent="false"
+                 >
+
+        <!-- We use activities with ES1 and ES2,
+             also setting the feature tag didn't fix the tegra issue.
+             Leave it here for documentation, maybe later use.
+		<uses-feature android:glEsVersion="0x00020000" />
+           -->
+        <activity android:name="com.jogamp.android.launcher.NEWTLauncherRedSquareES1Activity"
+                  android:finishOnTaskLaunch="true"
+                  android:launchMode="standard"
+                  android:configChanges="keyboardHidden|orientation"
+                  android:label="@string/activity_redsquarees1_name"
+                  android:description="@string/activity_redsquarees1_descr"
+                  >
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="com.jogamp.android.launcher.NEWTLauncherRedSquareES2Activity"
+                  android:finishOnTaskLaunch="true"
+                  android:launchMode="standard"
+                  android:configChanges="keyboardHidden|orientation"
+                  android:label="@string/activity_redsquarees2_name"
+                  android:description="@string/activity_redsquarees2_descr"
+                  >
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="com.jogamp.android.launcher.NEWTLauncherGearsES1Activity"
+                  android:finishOnTaskLaunch="true"
+                  android:launchMode="standard"
+                  android:configChanges="keyboardHidden|orientation"
+                  android:label="@string/activity_gearses1_name"
+                  android:description="@string/activity_gearses1_descr"
+                  android:exported="true"
+                  >
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="com.jogamp.android.launcher.NEWTLauncherGearsES2Activity"
+                  android:finishOnTaskLaunch="true"
+                  android:launchMode="standard"
+                  android:configChanges="keyboardHidden|orientation"
+                  android:label="@string/activity_gearses2_name"
+                  android:description="@string/activity_gearses2_descr"
+                  android:exported="true"
+                  >
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="com.jogamp.android.launcher.NEWTLauncherGearsES2TransActivity"
+                  android:finishOnTaskLaunch="true"
+                  android:launchMode="standard"
+                  android:configChanges="keyboardHidden|orientation"
+                  android:label="@string/activity_gearses2t_name"
+                  android:description="@string/activity_gearses2t_descr"
+                  android:exported="true"
+                  android:theme="@style/Theme.Transparent"
+                  >
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="com.jogamp.android.launcher.NEWTLauncherGraphUI1pActivity"
+                  android:finishOnTaskLaunch="true"
+                  android:launchMode="standard"
+                  android:configChanges="keyboardHidden|orientation"
+                  android:label="@string/activity_graphui1p_name"
+                  android:description="@string/activity_graphui1p_descr"
+                  android:exported="true"
+                  >
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="com.jogamp.android.launcher.NEWTLauncherGraphUI2pActivity"
+                  android:finishOnTaskLaunch="true"
+                  android:launchMode="standard"
+                  android:configChanges="keyboardHidden|orientation"
+                  android:label="@string/activity_graphui2p_name"
+                  android:description="@string/activity_graphui2p_descr"
+                  android:exported="true"
+                  >
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity android:name="com.jogamp.android.launcher.NEWTLauncherElektronActivity"
+                  android:finishOnTaskLaunch="true"
+                  android:launchMode="standard"
+                  android:configChanges="keyboardHidden|orientation"
+                  android:label="@string/activity_elektro_name"
+                  android:description="@string/activity_elektro_descr"
+                  android:exported="true"
+                  >
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+    </application>
+
+</manifest>
diff --git a/make/resources/android/AndroidManifest-test.xml b/make/resources/android/AndroidManifest-test.xml
new file mode 100644
index 0000000..80539cf
--- /dev/null
+++ b/make/resources/android/AndroidManifest-test.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+      sharedUserId="com.jogamp.Community" 
+      package="com.jogamp.opengl.test">
+
+    <uses-sdk android:minSdkVersion="9" />
+    <uses-library android:name="com.jogamp.common" android:required="true" />
+    <uses-library android:name="javax.media.opengl" android:required="true" />
+
+    <application android:icon="@drawable/icon" 
+                 android:label="@string/app_name"
+                 android:description="@string/app_descr"
+                 android:persistent="false"
+                 >
+    </application>
+
+</manifest>
diff --git a/make/resources/android/res-jogl/drawable-hdpi/icon.png b/make/resources/android/res-jogl/drawable-hdpi/icon.png
new file mode 100644
index 0000000..2148232
Binary files /dev/null and b/make/resources/android/res-jogl/drawable-hdpi/icon.png differ
diff --git a/make/resources/android/res-jogl/drawable-ldpi/icon.png b/make/resources/android/res-jogl/drawable-ldpi/icon.png
new file mode 100644
index 0000000..c16211f
Binary files /dev/null and b/make/resources/android/res-jogl/drawable-ldpi/icon.png differ
diff --git a/make/resources/android/res-jogl/drawable-mdpi/icon.png b/make/resources/android/res-jogl/drawable-mdpi/icon.png
new file mode 100644
index 0000000..1c26e3f
Binary files /dev/null and b/make/resources/android/res-jogl/drawable-mdpi/icon.png differ
diff --git a/make/resources/android/res-jogl/layout/main.xml b/make/resources/android/res-jogl/layout/main.xml
new file mode 100644
index 0000000..3a5f117
--- /dev/null
+++ b/make/resources/android/res-jogl/layout/main.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="vertical"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent"
+    >
+<TextView  
+    android:layout_width="fill_parent" 
+    android:layout_height="wrap_content" 
+    android:text="@string/hello"
+    />
+</LinearLayout>
diff --git a/make/resources/android/res-jogl/values/strings.xml b/make/resources/android/res-jogl/values/strings.xml
new file mode 100644
index 0000000..6c0a469
--- /dev/null
+++ b/make/resources/android/res-jogl/values/strings.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <string name="hello">Jogl Library</string>
+    <string name="app_name">JogAmp\'s Jogl Library</string>
+    <string name="app_descr">Contains Dalvik and native code, supporting native bindings.</string>
+    <string name="activity_v_name">Jogl</string>
+    <string name="activity_v_descr">The Jogl Library.</string>
+</resources>
diff --git a/make/resources/android/res-launcher/drawable-hdpi/icon.png b/make/resources/android/res-launcher/drawable-hdpi/icon.png
new file mode 100644
index 0000000..2148232
Binary files /dev/null and b/make/resources/android/res-launcher/drawable-hdpi/icon.png differ
diff --git a/make/resources/android/res-launcher/drawable-ldpi/icon.png b/make/resources/android/res-launcher/drawable-ldpi/icon.png
new file mode 100644
index 0000000..c16211f
Binary files /dev/null and b/make/resources/android/res-launcher/drawable-ldpi/icon.png differ
diff --git a/make/resources/android/res-launcher/drawable-mdpi/icon.png b/make/resources/android/res-launcher/drawable-mdpi/icon.png
new file mode 100644
index 0000000..1c26e3f
Binary files /dev/null and b/make/resources/android/res-launcher/drawable-mdpi/icon.png differ
diff --git a/make/resources/android/res-launcher/layout/main.xml b/make/resources/android/res-launcher/layout/main.xml
new file mode 100644
index 0000000..3a5f117
--- /dev/null
+++ b/make/resources/android/res-launcher/layout/main.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="vertical"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent"
+    >
+<TextView  
+    android:layout_width="fill_parent" 
+    android:layout_height="wrap_content" 
+    android:text="@string/hello"
+    />
+</LinearLayout>
diff --git a/make/resources/android/res-launcher/values/colors.xml b/make/resources/android/res-launcher/values/colors.xml
new file mode 100644
index 0000000..f4d188b
--- /dev/null
+++ b/make/resources/android/res-launcher/values/colors.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+	<drawable name="screen_background_black">#ff000000</drawable>
+    <drawable name="translucent_background">#e0000000</drawable>
+    <drawable name="transparent_background">#00000000</drawable>
+</resources>
diff --git a/make/resources/android/res-launcher/values/strings.xml b/make/resources/android/res-launcher/values/strings.xml
new file mode 100644
index 0000000..8b6928d
--- /dev/null
+++ b/make/resources/android/res-launcher/values/strings.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <string name="hello">Jogl Launcher</string>
+    <string name="app_name">JogAmp\'s Jogl Launcher</string>
+    <string name="app_descr">Launches Jogl Applications.</string>
+    <string name="activity_redsquarees1_name">RedSqrES1</string>
+    <string name="activity_redsquarees1_descr">RedSquareES1</string>
+    <string name="activity_redsquarees2_name">RedSqrES2</string>
+    <string name="activity_redsquarees2_descr">RedSquareES2</string>
+    <string name="activity_gearses1_name">GearsES1</string>
+    <string name="activity_gearses1_descr">GearsES1</string>
+    <string name="activity_gearses2_name">GearsES2</string>
+    <string name="activity_gearses2_descr">GearsES2</string>
+    <string name="activity_gearses2t_name">GearsES2T</string>
+    <string name="activity_gearses2t_descr">GearsES2T</string>
+    <string name="activity_graphui1p_name">GraphUI1p</string>
+    <string name="activity_graphui1p_descr">GraphUI 1-pass</string>
+    <string name="activity_graphui2p_name">GraphUI2p</string>
+    <string name="activity_graphui2p_descr">GraphUI 2-pass</string>
+    <string name="activity_elektro_name">Elektro</string>
+    <string name="activity_elektro_descr">Elektro</string>
+</resources>
diff --git a/make/resources/android/res-launcher/values/styles.xml b/make/resources/android/res-launcher/values/styles.xml
new file mode 100644
index 0000000..5b7eb7e
--- /dev/null
+++ b/make/resources/android/res-launcher/values/styles.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <style name="Theme" parent="android:Theme">
+    </style>
+
+    <style name="Theme.Translucent" parent="android:style/Theme.Translucent">
+        <item name="android:windowBackground">@drawable/translucent_background</item>
+        <item name="android:windowNoTitle">true</item>
+        <item name="android:colorForeground">#fff</item>
+    </style>
+
+    <style name="Theme.Transparent">
+        <item name="android:windowIsTranslucent">true</item>
+        <item name="android:windowAnimationStyle">@android:style/Animation.Translucent</item>
+        <item name="android:windowBackground">@drawable/transparent_background</item>
+        <item name="android:windowNoTitle">true</item>
+        <item name="android:colorForeground">#fff</item>
+    </style>
+
+</resources>
diff --git a/make/scripts/adb-install-all.sh b/make/scripts/adb-install-all.sh
new file mode 100755
index 0000000..d48d0ab
--- /dev/null
+++ b/make/scripts/adb-install-all.sh
@@ -0,0 +1,4 @@
+adb $* install ../../gluegen/build-android-armv7/gluegen-rt.apk
+adb $* install ../build-android-armv7/jar/jogl.all-android.apk
+adb $* install ../build-android-armv7/jar/jogl.android-launcher.apk
+adb $* install ../build-android-armv7/jar/jogl.test.apk
diff --git a/make/scripts/adb-reinstall-all.sh b/make/scripts/adb-reinstall-all.sh
new file mode 100755
index 0000000..db366c4
--- /dev/null
+++ b/make/scripts/adb-reinstall-all.sh
@@ -0,0 +1,4 @@
+sdir=`dirname $0`
+
+$sdir/adb-uninstall-all.sh $*
+$sdir/adb-install-all.sh $*
diff --git a/make/scripts/adb-uninstall-all.sh b/make/scripts/adb-uninstall-all.sh
new file mode 100755
index 0000000..3e65e12
--- /dev/null
+++ b/make/scripts/adb-uninstall-all.sh
@@ -0,0 +1,4 @@
+adb $* uninstall com.jogamp.common
+adb $* uninstall javax.media.opengl
+adb $* uninstall com.jogamp.android.launcher
+adb $* uninstall com.jogamp.opengl.test
diff --git a/make/scripts/clean-graph.sh b/make/scripts/clean-graph.sh
new file mode 100755
index 0000000..23e0d45
--- /dev/null
+++ b/make/scripts/clean-graph.sh
@@ -0,0 +1,3 @@
+#! /bin/bash
+
+rm -rf ../build/jogl/classes/jogamp/graph ../build/jogl/classes/com/jogamp/graph ../build/test/build/classes/com/jogamp/opengl/test/junit/graph
diff --git a/make/scripts/clean-tests.sh b/make/scripts/clean-tests.sh
new file mode 100755
index 0000000..ac6231f
--- /dev/null
+++ b/make/scripts/clean-tests.sh
@@ -0,0 +1,5 @@
+#! /bin/bash
+
+rm -rf ../build/test/* \
+       ../build/jar/jogl.test.jar
+
diff --git a/make/scripts/crosstest-java-android-armv7-rel.sh b/make/scripts/crosstest-java-android-armv7-rel.sh
new file mode 100644
index 0000000..8d9ae27
--- /dev/null
+++ b/make/scripts/crosstest-java-android-armv7-rel.sh
@@ -0,0 +1,69 @@
+#! /bin/bash
+
+export HOST_UID=sven
+export HOST_IP=192.168.0.52
+export HOST_RSYNC_ROOT=PROJECTS/JOGL
+
+export TARGET_UID=jogamp
+export TARGET_IP=beagle02
+export TARGET_ROOT=/projects
+
+export BUILD_DIR=../build-android-armv7
+
+if [ -e /opt-linux-x86/android-sdk-linux_x86 ] ; then
+    export ANDROID_SDK_HOME=/opt-linux-x86/android-sdk-linux_x86
+    export PATH=$ANDROID_SDK_HOME/platform-tools:$PATH
+fi 
+
+#
+# orig android:
+#   export LD_LIBRARY_PATH /system/lib
+#   export BOOTCLASSPATH /system/framework/core.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/core-junit.jar
+#
+
+#TSTCLASS=com.jogamp.nativewindow.NativeWindowVersion
+#TSTCLASS=com.jogamp.opengl.JoglVersion
+#TSTCLASS=com.jogamp.newt.NewtVersion
+TSTCLASS=com.jogamp.newt.opengl.GLWindow
+#TSTCLASS=com.jogamp.opengl.test.junit.jogl.offscreen.TestOffscreen01GLPBufferNEWT
+#TSTCLASS=com.jogamp.opengl.test.junit.jogl.glsl.TestGLSLSimple01NEWT
+#TSTCLASS=com.jogamp.opengl.test.junit.jogl.glsl.TestGLSLShaderState01NEWT
+#TSTCLASS=com.jogamp.opengl.test.junit.jogl.glsl.TestGLSLShaderState02NEWT
+#TSTCLASS=com.jogamp.opengl.test.junit.jogl.glsl.TestRulerNEWT01
+#TSTCLASS=com.jogamp.opengl.test.junit.graph.demos.GPUTextNewtDemo01
+#TSTCLASS=com.jogamp.opengl.test.junit.graph.demos.GPUTextNewtDemo02
+#TSTCLASS=com.jogamp.opengl.test.junit.jogl.demos.gl2es1.gears.newt.TestGearsGL2ES1NEWT
+
+
+LOGFILE=`basename $0 .sh`.log
+
+#  -Djava.class.path=lib/junit.jar:/usr/share/ant/lib/ant.jar:/usr/share/ant/lib/ant-junit.jar:$BUILD_DIR/gluegen.jar:$BUILD_DIR/test/build/gluegen-test.jar \
+#  -Djava.class.path=lib/ant-junit-all.apk:$BUILD_DIR/gluegen-rt.apk \
+#  -Djava.library.path=/system/lib:$TARGET_ROOT/gluegen/make/$BUILD_DIR/obj:$BUILD_DIR/test/build/natives \
+
+RSYNC_EXCLUDES="--exclude 'build-x86*/' --exclude 'build-linux*/' --exclude 'build-win*/' --exclude 'build-mac*/' \
+                --exclude 'classes/' --exclude 'src/' --exclude '.git/' --exclude 'jogl-java-src.zip' \
+                --delete-excluded"
+
+echo "#! /system/bin/sh" > $BUILD_DIR/targetcommand.sh
+
+echo "\
+rsync -av --delete --delete-after $RSYNC_EXCLUDES $HOST_UID@$HOST_IP::$HOST_RSYNC_ROOT/gluegen $HOST_UID@$HOST_IP::$HOST_RSYNC_ROOT/jogl $TARGET_ROOT ; \
+cd $TARGET_ROOT/jogl/make ;
+export LD_LIBRARY_PATH=/system/lib:$TARGET_ROOT/gluegen/make/$BUILD_DIR/obj:$TARGET_ROOT/jogl/make/$BUILD_DIR/lib ; \
+export BOOTCLASSPATH=/system/framework/core.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar ; \
+dalvikvm \
+  -Xjnigreflimit:2000 \
+  -cp ../../gluegen/make/lib/ant-junit-all.apk:../../gluegen/make/$BUILD_DIR/gluegen-rt.apk:$BUILD_DIR/jar/jogl.all-android.apk:$BUILD_DIR/jar/jogl.test.jar \
+  -Djogamp.debug.JNILibLoader=true \
+  -Djogamp.debug.NativeLibrary=true \
+  -Djogamp.debug.NativeLibrary.Lookup=true \
+  -Djogl.debug=all \
+  com.android.internal.util.WithFramework \
+  $TSTCLASS \
+" >> $BUILD_DIR/targetcommand.sh
+
+chmod ugo+x $BUILD_DIR/targetcommand.sh
+adb push $BUILD_DIR/targetcommand.sh $TARGET_ROOT/targetcommand.sh
+adb shell $TARGET_ROOT/targetcommand.sh 2>&1 | tee $LOGFILE
+
diff --git a/make/scripts/crosstest-java-linux-armv7-rel.sh b/make/scripts/crosstest-java-linux-armv7-rel.sh
new file mode 100644
index 0000000..e32d01d
--- /dev/null
+++ b/make/scripts/crosstest-java-linux-armv7-rel.sh
@@ -0,0 +1,60 @@
+export HOST_UID=sven
+export HOST_IP=192.168.0.52
+#export HOST_IP=192.168.1.5
+export HOST_RSYNC_ROOT=PROJECTS/JOGL
+
+export TARGET_UID=jogamp
+export TARGET_IP=beagle01
+export TARGET_ROOT=projects-cross
+#export TARGET_JAVA=/usr/bin/java
+export TARGET_JAVA=/opt-linux-armv7-eabi/jre6/bin/java
+
+export BUILD_DIR=../build-linux-armv7
+export ANT_PATH=/usr/share/ant
+
+#TSTCLASS=com.jogamp.nativewindow.NativeWindowVersion
+#TSTCLASS=com.jogamp.opengl.JoglVersion
+#TSTCLASS=com.jogamp.newt.NewtVersion
+#TSTCLASS=com.jogamp.newt.opengl.GLWindow
+#TSTCLASS=com.jogamp.opengl.test.junit.jogl.offscreen.TestOffscreen01GLPBufferNEWT
+#TSTCLASS=com.jogamp.opengl.test.junit.jogl.glsl.TestGLSLSimple01NEWT
+#TSTCLASS=com.jogamp.opengl.test.junit.jogl.glsl.TestGLSLShaderState01NEWT
+#TSTCLASS=com.jogamp.opengl.test.junit.jogl.glsl.TestGLSLShaderState02NEWT
+#TSTCLASS=com.jogamp.opengl.test.junit.jogl.glsl.TestRulerNEWT01
+#TSTCLASS=com.jogamp.opengl.test.junit.graph.demos.GPUTextNewtDemo01
+#TSTCLASS=com.jogamp.opengl.test.junit.graph.demos.GPUTextNewtDemo02
+#TSTCLASS=com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NEWT
+TSTCLASS=com.jogamp.opengl.test.junit.jogl.demos.es1.newt.TestGearsES1NEWT
+
+LOGFILE=`basename $0 .sh`.log
+
+#  -Djogamp.debug.NativeLibrary.Lookup=true \
+#  -Djogamp.debug.ProcAddressHelper=true \
+
+RSYNC_EXCLUDES="--exclude 'build-x86*/' --exclude 'build-linux-x*/' --exclude 'build-android*/' --exclude 'build-win*/' --exclude 'build-mac*/' \
+                --exclude 'classes/' --exclude 'src/' --exclude '.git/' --exclude 'jogl-java-src.zip' \
+                --delete-excluded"
+
+CP_BASE=../../gluegen/make/lib/junit.jar:$ANT_PATH/lib/ant.jar:$ANT_PATH/lib/ant-junit.jar:../../gluegen/make/$BUILD_DIR/gluegen.jar
+CP_JOGL_MOBILE=$BUILD_DIR/jar/jogl.all-mobile.jar:$BUILD_DIR/jar/jogl.test.jar
+
+#  -Djogl.debug=all \
+#  -Dnewt.debug=all \
+#  -Djogl.debug.DebugGL \
+
+ssh $TARGET_UID@$TARGET_IP "\
+rsync -aAv --delete --delete-after $RSYNC_EXCLUDES $HOST_UID@$HOST_IP::$HOST_RSYNC_ROOT/gluegen $HOST_UID@$HOST_IP::$HOST_RSYNC_ROOT/jogl $TARGET_ROOT ; \
+cd $TARGET_ROOT/jogl/make ;
+export DISPLAY=:0.0 ;
+LD_LIBRARY_PATH=../../gluegen/make/$BUILD_DIR/obj:$BUILD_DIR/lib \
+$TARGET_JAVA \
+  -server \
+  -Xmx256m \
+  -Djava.library.path=../../gluegen/make/$BUILD_DIR/obj:$BUILD_DIR/lib \
+  -Djava.class.path=$CP_BASE:$CP_JOGL_MOBILE \
+  -Dnativewindow.x11.mt-bug=true \
+  $TSTCLASS $* \
+ 2>&1 | tee $LOGFILE \
+"
+
+scp $TARGET_UID@$TARGET_IP:$TARGET_ROOT/jogl/make/$LOGFILE .
diff --git a/make/scripts/crosstest-launch-android-activity.sh b/make/scripts/crosstest-launch-android-activity.sh
new file mode 100644
index 0000000..c67cbfa
--- /dev/null
+++ b/make/scripts/crosstest-launch-android-activity.sh
@@ -0,0 +1,17 @@
+#! /bin/sh
+
+#adb uninstall com.jogamp.common
+#adb install ../../gluegen/build-android-armv7/gluegen-rt.apk
+
+adb uninstall javax.media.opengl
+adb install ../build-android-armv7/jar/jogl.all-android.apk 
+
+adb shell "setprop log.redirect-stdio true ; setprop log.redirect-stderr true ; \
+           am start -a android.intent.action.MAIN -n javax.media.opengl/jogamp.newt.driver.android.NewtVersionActivity"
+
+#adb uninstall com.jogamp.android.launcher
+#adb install ../build-android-armv7/android/jar/jogllauncher.apk 
+
+#adb shell "setprop log.redirect-stdio true ; setprop log.redirect-stderr true ; \
+#           am start -a android.intent.action.MAIN -n com.jogamp.android.launcher/com.jogamp.android.launcher.NEWTLauncherVersionActivity"
+
diff --git a/make/scripts/eglestest-java-linux.sh b/make/scripts/eglestest-java-linux.sh
new file mode 100644
index 0000000..c55db0e
--- /dev/null
+++ b/make/scripts/eglestest-java-linux.sh
@@ -0,0 +1,44 @@
+#
+# desktop EGL/ES1/ES2 test script
+#
+# Ubuntu:
+#  sudo apt-get install mesa-utils-extra libegl1-mesa libegl1-mesa-drivers libgles1-mesa libgles2-mesa 
+#
+export BUILD_DIR=../build-x86_64
+export ANT_PATH=/opt-share/apache-ant
+
+#TSTCLASS=com.jogamp.nativewindow.NativeWindowVersion
+#TSTCLASS=com.jogamp.opengl.JoglVersion
+#TSTCLASS=com.jogamp.newt.NewtVersion
+#TSTCLASS=com.jogamp.newt.opengl.GLWindow
+TSTCLASS=com.jogamp.opengl.test.junit.jogl.demos.gl2es1.gears.newt.TestGearsGL2ES1NEWT
+#TSTCLASS=com.jogamp.opengl.test.junit.jogl.offscreen.TestOffscreen01GLPBufferNEWT
+#TSTCLASS=com.jogamp.opengl.test.junit.jogl.glsl.TestGLSLSimple01NEWT
+#TSTCLASS=com.jogamp.opengl.test.junit.jogl.glsl.TestGLSLShaderState01NEWT
+#TSTCLASS=com.jogamp.opengl.test.junit.jogl.glsl.TestGLSLShaderState02NEWT
+#TSTCLASS=com.jogamp.opengl.test.junit.jogl.glsl.TestRulerNEWT01
+
+LOGFILE=`basename $0 .sh`.log
+
+#  -Djogamp.debug.NativeLibrary=true \
+#  -Djogamp.debug.NativeLibrary.Lookup=true \
+#  -Djogamp.debug.ProcAddressHelper=true \
+#  -Djogamp.debug=all \
+#  -Dnativewindow.debug=all \
+#  -Djogl.debug=all \
+#  -Dnewt.debug=all \
+
+CP_BASE=../../gluegen/make/lib/junit.jar:$ANT_PATH/lib/ant.jar:$ANT_PATH/lib/ant-junit.jar:../../gluegen/make/$BUILD_DIR/gluegen.jar
+CP_JOGL_ALL=$BUILD_DIR/jar/jogl.all.jar:$BUILD_DIR/jar/jogl.test.jar
+CP_JOGL_MOBILE=$BUILD_DIR/jar/jogl.all-mobile.jar:$BUILD_DIR/jar/jogl.test.jar
+
+export DISPLAY=:0.0 ;
+java \
+  -Djava.library.path=../../gluegen/make/$BUILD_DIR/obj:$BUILD_DIR/lib \
+  -Djava.class.path=$CP_BASE:$CP_JOGL_MOBILE \
+  -Djogamp.debug.NativeLibrary=true \
+  -Dnativewindow.debug=all \
+  -Djogl.debug=all \
+  $TSTCLASS $* \
+ 2>&1 | tee $LOGFILE \
+
diff --git a/make/scripts/java-win32-dbg.bat b/make/scripts/java-win32-dbg.bat
index 2b15410..c97dd20 100755
--- a/make/scripts/java-win32-dbg.bat
+++ b/make/scripts/java-win32-dbg.bat
@@ -1,15 +1,15 @@
 
 set BLD_SUB=build-win32
-set J2RE_HOME=c:\jre1.6.0_24_x32
-set JAVA_HOME=c:\jdk1.6.0_24_x32
+set J2RE_HOME=c:\jre1.6.0_26_x32
+set JAVA_HOME=c:\jdk1.6.0_26_x32
 set ANT_PATH=C:\apache-ant-1.8.2
 
 set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;c:\mingw\bin;%PATH%
 
 set BLD_DIR=..\%BLD_SUB%
-set LIB_DIR=..\..\gluegen\%BLD_SUB%\obj;%BLD_DIR%\nativewindow\obj;%BLD_DIR%\jogl\obj;%BLD_DIR%\newt\obj
+set LIB_DIR=..\..\gluegen\%BLD_SUB%\obj;%BLD_DIR%\lib
 
-set CP_ALL=.;%BLD_DIR%\jogl\jogl.all.jar;%BLD_DIR%\nativewindow\nativewindow.all.jar;%BLD_DIR%\newt\newt.all.jar;%BLD_DIR%\jogl\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-win32.bat b/make/scripts/java-win32.bat
index 368501c..280818c 100755
--- a/make/scripts/java-win32.bat
+++ b/make/scripts/java-win32.bat
@@ -1,15 +1,15 @@
 
 set BLD_SUB=build-win32
-set J2RE_HOME=c:\jre1.6.0_24_x32
-set JAVA_HOME=c:\jdk1.6.0_24_x32
+set J2RE_HOME=c:\jre1.6.0_26_x32
+set JAVA_HOME=c:\jdk1.6.0_26_x32
 set ANT_PATH=C:\apache-ant-1.8.2
 
 set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;c:\mingw\bin;%PATH%
 
 set BLD_DIR=..\%BLD_SUB%
-set LIB_DIR=..\..\gluegen\%BLD_SUB%\obj;%BLD_DIR%\nativewindow\obj;%BLD_DIR%\jogl\obj;%BLD_DIR%\newt\obj
+set LIB_DIR=..\..\gluegen\%BLD_SUB%\obj;%BLD_DIR%\lib
 
-set CP_ALL=.;%BLD_DIR%\jogl\jogl.all.jar;%BLD_DIR%\nativewindow\nativewindow.all.jar;%BLD_DIR%\newt\newt.all.jar;%BLD_DIR%\jogl\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 34a2fdc..1c2ba17 100755
--- a/make/scripts/java-win64-dbg.bat
+++ b/make/scripts/java-win64-dbg.bat
@@ -1,7 +1,7 @@
 
 set BLD_SUB=build-win64
-set J2RE_HOME=c:\jre1.6.0_24_x64
-set JAVA_HOME=c:\jdk1.6.0_24_x64
+set J2RE_HOME=c:\jre1.6.0_26_x64
+set JAVA_HOME=c:\jdk1.6.0_26_x64
 set ANT_PATH=C:\apache-ant-1.8.2
 
 set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;c:\mingw\bin;%PATH%
@@ -9,7 +9,7 @@ set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;c:\mingw\bin;%PATH%
 set BLD_DIR=..\%BLD_SUB%
 set LIB_DIR=%BLD_DIR%\lib;..\..\gluegen\%BLD_SUB%\obj
 
-set CP_ALL=.;%BLD_DIR%\jogl\jogl.all.jar;%BLD_DIR%\nativewindow\nativewindow.all.jar;%BLD_DIR%\newt\newt.all.jar;%BLD_DIR%\jogl\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%
 
@@ -19,7 +19,11 @@ REM set D_ARGS="-Djogl.debug.GraphicsConfiguration"
 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" "-Djogamp.debug.Lock" "-Djogamp.debug.Lock.TraceLock"
 REM set D_ARGS="-Djogl.debug=all" "-Dnativewindow.debug=all"
-set D_ARGS="-Djogl.debug=all"
+REM set D_ARGS="-Djogl.debug=all"
+set D_ARGS="-Dnewt.debug.Window"
+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 320db57..5e9af91 100755
--- a/make/scripts/java-win64.bat
+++ b/make/scripts/java-win64.bat
@@ -1,7 +1,7 @@
 
 set BLD_SUB=build-win64
-set J2RE_HOME=c:\jre1.6.0_24_x64
-set JAVA_HOME=c:\jdk1.6.0_24_x64
+set J2RE_HOME=c:\jre1.6.0_26_x64
+set JAVA_HOME=c:\jdk1.6.0_26_x64
 set ANT_PATH=C:\apache-ant-1.8.2
 
 set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;c:\mingw\bin;%PATH%
@@ -9,7 +9,7 @@ set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;c:\mingw\bin;%PATH%
 set BLD_DIR=..\%BLD_SUB%
 set LIB_DIR=%BLD_DIR%\lib;..\..\gluegen\%BLD_SUB%\obj
 
-set CP_ALL=.;%BLD_DIR%\jogl\jogl.all.jar;%BLD_DIR%\nativewindow\nativewindow.all.jar;%BLD_DIR%\newt\newt.all.jar;%BLD_DIR%\jogl\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/lstjars.sh b/make/scripts/lstjars.sh
index c72a48a..82e378e 100755
--- a/make/scripts/lstjars.sh
+++ b/make/scripts/lstjars.sh
@@ -34,61 +34,33 @@ function listdeployment() {
     echo JOGL Deployment Payload for $JAR_SUFFIX
     echo
 
-    echo JOGL ES1 NEWT CORE
-    report gluegen-rt.$JAR_SUFFIX nativewindow.all-noawt.$JAR_SUFFIX jogl.core.$JAR_SUFFIX jogl.util.$JAR_SUFFIX jogl.egl.$JAR_SUFFIX jogl.gles1.$JAR_SUFFIX newt.all-noawt.$JAR_SUFFIX libgluegen-rt.so.gz libjogl_es1.so.gz libnewt.so.gz
+    echo JOGL ALL
+    report gluegen-rt.$JAR_SUFFIX jogl.all.$JAR_SUFFIX libgluegen-rt.so.gz libnativewindow_awt.so.gz libnativewindow_x11.so.gz libjogl_desktop.so.gz libnewt.so.gz
     echo
 
-    echo JOGL ES2 NEWT CORE
-    report gluegen-rt.$JAR_SUFFIX nativewindow.all-noawt.$JAR_SUFFIX jogl.core.$JAR_SUFFIX jogl.util.$JAR_SUFFIX jogl.egl.$JAR_SUFFIX jogl.gles2.$JAR_SUFFIX newt.all-noawt.$JAR_SUFFIX libgluegen-rt.so.gz libjogl_es2.so.gz libnewt.so.gz
+    echo JOGL ALL no AWT
+    report gluegen-rt.$JAR_SUFFIX jogl.all-noawt.$JAR_SUFFIX libgluegen-rt.so.gz libnativewindow_x11.so.gz libjogl_desktop.so.gz libnewt.so.gz
     echo
 
-    echo JOGL ES2 NEWT CORE FIXED
-    report gluegen-rt.$JAR_SUFFIX nativewindow.all-noawt.$JAR_SUFFIX jogl.core.$JAR_SUFFIX jogl.util.$JAR_SUFFIX jogl.egl.$JAR_SUFFIX jogl.gles2.$JAR_SUFFIX jogl.util.fixedfuncemu.$JAR_SUFFIX newt.all-noawt.$JAR_SUFFIX libgluegen-rt.so.gz libjogl_es2.so.gz libnewt.so.gz
-    echo
-
-    echo JOGL GL2ES12 NEWT 
-    report gluegen-rt.$JAR_SUFFIX nativewindow.all-noawt.$JAR_SUFFIX jogl.core.$JAR_SUFFIX jogl.util.$JAR_SUFFIX jogl.os.$OSS.$JAR_SUFFIX jogl.gl2es12.$JAR_SUFFIX newt.all-noawt.$JAR_SUFFIX libgluegen-rt.so.gz libjogl_gl2es12.so.gz libnewt.so.gz libnativewindow_$OSS.so.gz
-    echo
-
-    echo JOGL GL2 NEWT 
-    report gluegen-rt.$JAR_SUFFIX nativewindow.all-noawt.$JAR_SUFFIX jogl.core.$JAR_SUFFIX jogl.util.$JAR_SUFFIX jogl.os.$OSS.$JAR_SUFFIX jogl.gldesktop.$JAR_SUFFIX newt.all-noawt.$JAR_SUFFIX libgluegen-rt.so.gz libjogl_desktop.so.gz libnewt.so.gz libnativewindow_$OSS.so.gz
-    echo
-
-    echo JOGL GL2 AWT
-    report gluegen-rt.$JAR_SUFFIX nativewindow.all.$JAR_SUFFIX jogl.core.$JAR_SUFFIX jogl.util.$JAR_SUFFIX jogl.os.$OSS.$JAR_SUFFIX jogl.gldesktop.$JAR_SUFFIX jogl.awt.$JAR_SUFFIX libgluegen-rt.so.gz libjogl_desktop.so.gz libnativewindow_$OSS.so.gz libnativewindow_awt.so.gz
-    echo
-
-    echo JOGL ALL AWT
-    report gluegen-rt.$JAR_SUFFIX nativewindow.all.$JAR_SUFFIX jogl.all.$JAR_SUFFIX libgluegen-rt.so.gz libjogl_desktop.so.gz libnativewindow_$OSS.so.gz libnativewindow_awt.so.gz
-    echo
-
-    echo JOGL ALL No AWT
-    report gluegen-rt.$JAR_SUFFIX nativewindow.all-noawt.$JAR_SUFFIX jogl.all-noawt.$JAR_SUFFIX newt.all-noawt.$JAR_SUFFIX libgluegen-rt.so.gz libjogl_desktop.so.gz libnativewindow_$OSS.so.gz libnewt.so.gz
-    echo
-
-    echo JOGL GLU
-    report jogl.glu.*$JAR_SUFFIX
-    echo
-
-    echo JOGL EVERYTHING
-    report *.all.$JAR_SUFFIX libgluegen-rt.so.gz libnativewindow_$OSS.so.gz libnativewindow_awt.so.gz libjogl_desktop.so.gz  libjogl_es1.so.gz  libjogl_es2.so.gz  libnewt.so.gz
+    echo JOGL Android - mobile egl es1 es2
+    report gluegen-rt.$JAR_SUFFIX jogl.all-android.$JAR_SUFFIX libgluegen-rt.so.gz libjogl_mobile.so.gz
     echo
 }
 
 rm -rf $STATDIR
 mkdir -p $STATDIR
-cp -a $BUILDDIR/nativewindow/obj/*.so $STATDIR
-cp -a $BUILDDIR/jogl/obj/*.so $STATDIR
-cp -a $BUILDDIR/newt/obj/*.so $STATDIR
-cp -a $BUILDDIR/nativewindow/*.jar $STATDIR
-cp -a $BUILDDIR/jogl/*.jar $STATDIR
-cp -a $BUILDDIR/newt/*.jar $STATDIR
+cp -a $BUILDDIR/lib/*.so $STATDIR
+cp -a $BUILDDIR/jar/*    $STATDIR
 cp -a $BUILDDIR_GLUEGEN/gluegen-rt.jar $STATDIR
-cp -a $BUILDDIR_GLUEGEN/gluegen-rt-natives-linux-i586.jar $STATDIR
 cp -a $BUILDDIR_GLUEGEN/obj/libgluegen-rt.so $STATDIR
 
 cd $STATDIR
 
+rm -rf nope
+mkdir -p nope/atomic
+mv gluegen*jar *-natives*.jar nope/
+mv atomic/gluegen-gl.jar nope/atomic
+
 for i in *.so ; do
     gzip $i
 done
@@ -99,33 +71,27 @@ echo
 
 rm -f *.lst
 
-for i in *.jar ; do
+for i in *.jar atomic/*.jar ; do
     fname=$i
-    bname=$(basename $fname .jar)
+    bname=$(dirname $fname)/$(basename $fname .jar)
     echo list $fname to $bname.lst
     jar tf $fname | grep class | sort > $bname.lst
 done
 
-rm -rf nope
-mkdir -p nope
-
-mv jogl.test.lst *-noawt.lst *.all*.lst nope/
-
-mv jogl.gl2es12.*.lst jogl.gldesktop.*.lst nope/
-echo duplicates - w/o gl2es12.* gldesktop.*
+echo duplicates in atomics
 echo
-sort jogl*.lst | uniq -d
-mv nope/* .
+sort atomic/jogl*.lst | uniq -d
 
-mv jogl.test.lst *.all*.lst gluegen-gl.lst nope/
-cat *.lst | sort -u > allparts.lst
-mv nope/* .
-cat *.all.lst gluegen-rt.lst   | sort -u > allall.lst
+cat atomic/*.lst | sort -u > allparts.lst
+mv nope/*jar .
+cat jogl.all.lst gluegen-rt.lst  | sort -u > allall.lst
 
 echo all vs allparts delta
 echo
 diff -Nur allparts.lst allall.lst
 
+mv nope/* .
+
 listdeployment jar
 
 if [ $pack200 -eq 1 ] ; then
diff --git a/make/scripts/make.jogl.all.android-armv7-cross.sh b/make/scripts/make.jogl.all.android-armv7-cross.sh
new file mode 100755
index 0000000..37a5c4c
--- /dev/null
+++ b/make/scripts/make.jogl.all.android-armv7-cross.sh
@@ -0,0 +1,112 @@
+#! /bin/sh
+
+export HOST_UID=sven
+export HOST_IP=192.168.0.52
+export HOST_RSYNC_ROOT=PROJECTS/JOGL
+
+export TARGET_UID=jogamp
+export TARGET_IP=beagle01
+export TARGET_ROOT=/projects
+export TARGET_ANT_HOME=/usr/share/ant
+
+export ANDROID_VERSION=9
+
+echo ANDROID_SDK_HOME $ANDROID_SDK_HOME
+echo NDK_ROOT $NDK_ROOT
+
+if [ -z "$NDK_ROOT" ] ; then
+    if [ -e /usr/local/android-ndk-r6 ] ; then
+        NDK_ROOT=/usr/local/android-ndk-r6
+    elif [ -e /opt-linux-x86/android-ndk-r6 ] ; then
+        NDK_ROOT=/opt-linux-x86/android-ndk-r6
+    elif [ -e /opt/android-ndk-r6 ] ; then
+        NDK_ROOT=/opt/android-ndk-r6
+    else 
+        echo NDK_ROOT is not specified and does not exist in default locations
+        exit 1
+    fi
+elif [ ! -e $NDK_ROOT ] ; then
+    echo NDK_ROOT $NDK_ROOT does not exist
+    exit 1
+fi
+export NDK_ROOT
+NDK_TOOLCHAIN=$NDK_ROOT/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/arm-linux-androideabi
+
+if [ -z "$ANDROID_SDK_HOME" ] ; then
+    if [ -e /usr/local/android-sdk-linux_x86 ] ; then
+        ANDROID_SDK_HOME=/usr/local/android-sdk-linux_x86
+    elif [ -e /opt-linux-x86/android-sdk-linux_x86 ] ; then
+        ANDROID_SDK_HOME=/opt-linux-x86/android-sdk-linux_x86
+    elif [ -e /opt/android-sdk-linux_x86 ] ; then
+        ANDROID_SDK_HOME=/opt/android-sdk-linux_x86
+    else 
+        echo ANDROID_SDK_HOME is not specified and does not exist in default locations
+        exit 1
+    fi
+elif [ ! -e $ANDROID_SDK_HOME ] ; then
+    echo ANDROID_SDK_HOME $ANDROID_SDK_HOME does not exist
+    exit 1
+fi
+export ANDROID_SDK_HOME
+
+export PATH="$NDK_TOOLCHAIN/bin:$ANDROID_SDK_HOME/platform-tools:$PATH"
+
+export GCC_VERSION=4.4.3
+HOST_ARCH=linux-x86
+export TARGET_ARCH=arm-linux-androideabi
+# mcpu: cortex-a8', `cortex-a9', `cortex-r4', `cortex-r4f', `cortex-m3', `cortex-m1', `xscale', `iwmmxt', `iwmmxt2', `ep9312'. 
+export TARGET_CPU_NAME=armv7-a
+TARGET_CPU_TUNE=armv7-a
+# mfpu: `vfp', `vfpv3', `vfpv3-d16' and `neon'
+TARGET_FPU_NAME=vfpv3
+TARGET_FPU_ABI=softfp
+
+export TARGET_TOOL_PATH=${NDK_ROOT}/toolchains/${TARGET_ARCH}-${GCC_VERSION}/prebuilt/${HOST_ARCH}
+
+export TARGET_OS_PATH=${NDK_ROOT}/platforms/android-${ANDROID_VERSION}/arch-arm/usr
+export TARGET_PLATFORM_LIBS=${TARGET_OS_PATH}/lib
+export HOST_OS_PATH=${NDK_ROOT}/platforms/android-${ANDROID_VERSION}/arch-x86/usr
+
+export NDK_XBIN_PATH=${TARGET_TOOL_PATH}/bin
+export NDK_BIN_PATH=${TARGET_TOOL_PATH}/${TARGET_ARCH}/bin
+
+export NDK_GCC=${NDK_XBIN_PATH}/${TARGET_ARCH}-gcc
+export NDK_AR=${NDK_XBIN_PATH}/${TARGET_ARCH}-ar
+export NDK_STRIP=${NDK_XBIN_PATH}/${TARGET_ARCH}-strip
+export NDK_READELF=${NDK_XBIN_PATH}/${TARGET_ARCH}-readelf
+
+export PATH=${NDK_XBIN_PATH}:$PATH
+
+export NDK_CFLAGS="\
+-march=${TARGET_CPU_NAME} \
+-fpic \
+-DANDROID \
+"
+
+export NDK_LDFLAGS="\
+-Wl,--demangle \
+-nostdlib -Bdynamic -Wl,-dynamic-linker,/system/bin/linker -Wl,--gc-sections -Wl,-z,nocopyreloc \
+${TARGET_OS_PATH}/lib/libc.so \
+${TARGET_OS_PATH}/lib/libstdc++.so \
+${TARGET_OS_PATH}/lib/libm.so \
+${TARGET_OS_PATH}/lib/crtbegin_dynamic.o \
+-Wl,--no-undefined -Wl,-rpath-link=${TARGET_OS_PATH}/lib \
+${TARGET_TOOL_PATH}/lib/gcc/${TARGET_ARCH}/${GCC_VERSION}/${TARGET_CPU_NAME}/libgcc.a \
+${TARGET_OS_PATH}/lib/crtend_android.o \
+"
+
+
+which gcc 2>&1 | tee make.jogl.all.android-armv7-cross.log
+
+ant \
+    -Dgluegen-cpptasks.file=`pwd`/../../gluegen/make/lib/gluegen-cpptasks-android-armv7.xml \
+    -Drootrel.build=build-android-armv7 \
+    -Dgluegen.cpptasks.detected.os=true \
+    -DisUnix=true \
+    -DisAndroid=true \
+    -DisAndroidARMv7=true \
+    -DisCrosscompilation=true \
+    \
+    $* 2>&1 | tee -a make.jogl.all.android-armv7-cross.log
+
+
diff --git a/make/scripts/make.jogl.all.linux-armv7-cross.sh b/make/scripts/make.jogl.all.linux-armv7-cross.sh
new file mode 100755
index 0000000..9a6b00a
--- /dev/null
+++ b/make/scripts/make.jogl.all.linux-armv7-cross.sh
@@ -0,0 +1,41 @@
+#! /bin/sh
+
+PATH=`pwd`/../../gluegen/make/lib/linux/arm-linux-gnueabi/bin:$PATH
+export PATH
+
+#    -Dc.compiler.debug=true 
+#    -Dgluegen.cpptasks.detected.os=true \
+#    -DisUnix=true \
+#    -DisLinux=true \
+#    -DisLinuxARMv7=true \
+#    -DisX11=false \
+
+export HOST_UID=sven
+export HOST_IP=192.168.0.52
+export HOST_RSYNC_ROOT=PROJECTS/JOGL
+
+export TARGET_UID=jogamp
+export TARGET_IP=beagle01
+export TARGET_ROOT=/home/jogamp/projects-cross
+export TARGET_ANT_HOME=/usr/share/ant
+
+export TARGET_PLATFORM_LIBS=/opt-linux-armv7-eabi/lib
+export TARGET_JAVA_LIBS=/opt-linux-armv7-eabi/jre/lib/arm
+
+ant \
+    -Drootrel.build=build-linux-armv7 \
+    -Dgluegen.cpptasks.detected.os=true \
+    -DisUnix=true \
+    -DisLinux=true \
+    -DisLinuxARMv7=true \
+    -DisX11=true \
+    -DisCrosscompilation=true \
+    \
+    -Dsetup.addNativeKD=true \
+    -Dsetup.addNativeOpenMAX=true \
+    -Dsetup.addNativeBroadcomEGL=true \
+    $* 2>&1 | tee make.jogl.all.linux-armv7-cross.log
+
+
+
+
diff --git a/make/scripts/make.jogl.all.linux-x86.sh b/make/scripts/make.jogl.all.linux-x86.sh
index 03dedb9..b79fffe 100755
--- a/make/scripts/make.jogl.all.linux-x86.sh
+++ b/make/scripts/make.jogl.all.linux-x86.sh
@@ -1,19 +1,9 @@
 #! /bin/sh
 
-if [ -e ../../setenv-build-jogl-x86.sh ] ; then
-    . ../../setenv-build-jogl-x86.sh
-fi
+SDIR=`dirname $0` 
 
-if [ -z "$ANT_PATH" ] ; then
-    if [ -e /usr/share/ant/bin/ant -a -e /usr/share/ant/lib/ant.jar ] ; then
-        ANT_PATH=/usr/share/ant
-        export ANT_PATH
-        echo autosetting ANT_PATH to $ANT_PATH
-    fi
-fi
-if [ -z "$ANT_PATH" ] ; then
-    echo ANT_PATH does not exist, set it
-    exit
+if [ -e $SDIR/../../../gluegen/make/scripts/setenv-build-jogl-x86.sh ] ; then
+    . $SDIR/../../../gluegen/make/scripts/setenv-build-jogl-x86.sh
 fi
 
 if [ "$1" = "-libdir" ] ; then
@@ -28,15 +18,13 @@ if [ "$1" = "-libdir" ] ; then
 fi
 
 
-# -Djogl.cg=1
 #    -Dc.compiler.debug=true 
-#    -DuseOpenMAX=true \
+#    -Dsetup.addNativeOpenMAX=true \
 #    -Dgluegen.cpptasks.detected.os=true \
 #    -DisUnix=true \
 #    -DisLinux=true \
 #    -DisLinuxX86=true \
 #    -DisX11=true \
-#    -Djogl.cg=1 \
 
 #LD_LIBRARY_PATH=/opt-linux-x86_64/mesa-7.8.1/lib64
 #export LD_LIBRARY_PATH
@@ -50,13 +38,14 @@ echo LIBXCB_ALLOW_SLOPPY_LOCK: $LIBXCB_ALLOW_SLOPPY_LOCK 2>&1 | tee -a $LOGF
 echo LIBGL_DRIVERS_PATH: $LIBGL_DRIVERS_PATH 2>&1 | tee -a $LOGF
 echo LIBGL_DEBUG: $LIBGL_DEBUG 2>&1 | tee -a $LOGF
 
+#    -Dgluegen-cpptasks.file=`pwd`/../../gluegen/make/lib/gluegen-cpptasks-linux-32bit.xml \
+#
+
 ant \
     $CUSTOMLIBDIR \
-    -Dgluegen-cpptasks.file=`pwd`/../../gluegen/make/lib/gluegen-cpptasks-linux-32bit.xml \
-    -Djogl.cg=1 \
     -Drootrel.build=build-x86 \
     -Dos.arch=x86 \
-    -DuseKD=true \
-    -DuseOpenMAX=true \
+    -Dsetup.addNativeOpenMAX=true \
+    -Dsetup.addNativeKD=true \
     $* 2>&1 | tee -a $LOGF
 
diff --git a/make/scripts/make.jogl.all.linux-x86_64.sh b/make/scripts/make.jogl.all.linux-x86_64.sh
index 577caeb..6fe8031 100755
--- a/make/scripts/make.jogl.all.linux-x86_64.sh
+++ b/make/scripts/make.jogl.all.linux-x86_64.sh
@@ -1,19 +1,9 @@
 #! /bin/sh
 
-if [ -e ../../setenv-build-jogl-x86_64.sh ] ; then
-    . ../../setenv-build-jogl-x86_64.sh
-fi
+SDIR=`dirname $0` 
 
-if [ -z "$ANT_PATH" ] ; then
-    if [ -e /usr/share/ant/bin/ant -a -e /usr/share/ant/lib/ant.jar ] ; then
-        ANT_PATH=/usr/share/ant
-        export ANT_PATH
-        echo autosetting ANT_PATH to $ANT_PATH
-    fi
-fi
-if [ -z "$ANT_PATH" ] ; then
-    echo ANT_PATH does not exist, set it
-    exit
+if [ -e $SDIR/../../../gluegen/make/scripts/setenv-build-jogl-x86_64.sh ] ; then
+    . $SDIR/../../../gluegen/make/scripts/setenv-build-jogl-x86_64.sh
 fi
 
 if [ "$1" = "-libdir" ] ; then
@@ -27,7 +17,6 @@ if [ "$1" = "-libdir" ] ; then
     shift
 fi
 
-# -Djogl.cg=1
 #    -Dc.compiler.debug=true \
 
 #    -Dgluegen.cpptasks.detected.os=true \
@@ -52,12 +41,12 @@ echo LIBGL_DEBUG: $LIBGL_DEBUG 2>&1 | tee -a $LOGF
 #    -Djavacdebug="true" \
 #    -Djavacdebuglevel="source,lines,vars" \
 
+# BUILD_ARCHIVE=true \
 ant  \
     $CUSTOMLIBDIR \
     -Djavacdebuglevel="source,lines,vars" \
-    -Djogl.cg=1 \
     -Drootrel.build=build-x86_64 \
-    -DuseKD=true \
-    -DuseOpenMAX=true \
+    -Dsetup.addNativeOpenMAX=true \
+    -Dsetup.addNativeKD=true \
     $* 2>&1 | tee -a $LOGF
 
diff --git a/make/scripts/make.jogl.all.macosx.sh b/make/scripts/make.jogl.all.macosx.sh
index 967790b..0eaaa1c 100755
--- a/make/scripts/make.jogl.all.macosx.sh
+++ b/make/scripts/make.jogl.all.macosx.sh
@@ -8,6 +8,5 @@ fi
 #    -Dc.compiler.debug=true 
 
 ant \
-    -Djogl.cg=1 \
     -Drootrel.build=build-macosx \
     $* 2>&1 | tee make.jogl.all.macosx.log
diff --git a/make/scripts/make.jogl.all.win32.bat b/make/scripts/make.jogl.all.win32.bat
index f73a332..c9aac83 100755
--- a/make/scripts/make.jogl.all.win32.bat
+++ b/make/scripts/make.jogl.all.win32.bat
@@ -1,7 +1,7 @@
 set THISDIR="C:\JOGL"
 
-set J2RE_HOME=c:\jre1.6.0_24_x32
-set JAVA_HOME=c:\jdk1.6.0_24_x32
+set J2RE_HOME=c:\jre1.6.0_26_x32
+set JAVA_HOME=c:\jdk1.6.0_26_x32
 set ANT_PATH=C:\apache-ant-1.8.2
 
 set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;c:\mingw\bin;%PATH%
@@ -9,8 +9,7 @@ set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;c:\mingw\bin;%PATH%
 set LIB_GEN=%THISDIR%\lib
 set CLASSPATH=.;%THISDIR%\build-win32\classes
 REM    -Dc.compiler.debug=true 
-REM    -DuseOpenMAX=true 
-REM    -DuseKD=true
-REM    -Djogl.cg=1
+REM    -Dsetup.addNativeOpenMAX=true 
+REM    -Dsetup.addNativeKD=true
 
-ant -Drootrel.build=build-win32 -Djogl.cg=1 %1 %2 %3 %4 %5 %6 %7 %8 %9 > make.jogl.all.win32.log 2>&1
+ant -Drootrel.build=build-win32 %1 %2 %3 %4 %5 %6 %7 %8 %9 > make.jogl.all.win32.log 2>&1
diff --git a/make/scripts/make.jogl.all.win64.bat b/make/scripts/make.jogl.all.win64.bat
index 76e459a..5b1b10a 100755
--- a/make/scripts/make.jogl.all.win64.bat
+++ b/make/scripts/make.jogl.all.win64.bat
@@ -1,7 +1,7 @@
 set THISDIR="C:\JOGL"
 
-set J2RE_HOME=c:\jre1.6.0_24_x64
-set JAVA_HOME=c:\jdk1.6.0_24_x64
+set J2RE_HOME=c:\jre1.6.0_26_x64
+set JAVA_HOME=c:\jdk1.6.0_26_x64
 set ANT_PATH=C:\apache-ant-1.8.2
 
 set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;c:\mingw64\bin;c:\mingw\bin;%PATH%
@@ -9,8 +9,7 @@ set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;c:\mingw64\bin;c:\mingw\bin;%PATH%
 set LIB_GEN=%THISDIR%\lib
 set CLASSPATH=.;%THISDIR%\build-win64\classes
 REM    -Dc.compiler.debug=true 
-REM    -DuseOpenMAX=true 
-REM    -DuseKD=true
-REM    -Djogl.cg=1
+REM    -Dsetup.addNativeOpenMAX=true 
+REM    -Dsetup.addNativeKD=true
 
-ant -Dc.compiler.debug=true -Drootrel.build=build-win64 -Djogl.cg=1 %1 %2 %3 %4 %5 %6 %7 %8 %9 > make.jogl.all.win64.log 2>&1
+ant -Dc.compiler.debug=true -Drootrel.build=build-win64 %1 %2 %3 %4 %5 %6 %7 %8 %9 > make.jogl.all.win64.log 2>&1
diff --git a/make/scripts/make.jogl.doc.all.x86_64.sh b/make/scripts/make.jogl.doc.all.x86_64.sh
index 5e111d5..d75f5b0 100755
--- a/make/scripts/make.jogl.doc.all.x86_64.sh
+++ b/make/scripts/make.jogl.doc.all.x86_64.sh
@@ -1,9 +1,10 @@
 #! /bin/sh
 
-if [ -e ../../setenv-build-jogl-x86_64.sh ] ; then
-    . ../../setenv-build-jogl-x86_64.sh
-fi
+SDIR=`dirname $0` 
 
+if [ -e $SDIR/../../../gluegen/make/scripts/setenv-build-jogl-x86_64.sh ] ; then
+    . $SDIR/../../../gluegen/make/scripts/setenv-build-jogl-x86_64.sh
+fi
 
 ant -v  \
     -Drootrel.build=build-x86_64 \
diff --git a/make/scripts/make.jogl.doc.x86_64.sh b/make/scripts/make.jogl.doc.x86_64.sh
index 677de39..028a5d9 100755
--- a/make/scripts/make.jogl.doc.x86_64.sh
+++ b/make/scripts/make.jogl.doc.x86_64.sh
@@ -1,9 +1,10 @@
 #! /bin/sh
 
-if [ -e ../../setenv-build-jogl-x86_64.sh ] ; then
-    . ../../setenv-build-jogl-x86_64.sh
-fi
+SDIR=`dirname $0` 
 
+if [ -e $SDIR/../../../gluegen/make/scripts/setenv-build-jogl-x86_64.sh ] ; then
+    . $SDIR/../../../gluegen/make/scripts/setenv-build-jogl-x86_64.sh
+fi
 
 ant -v  \
     -Drootrel.build=build-x86_64 \
diff --git a/make/scripts/setenv-jogl.sh b/make/scripts/setenv-jogl.sh
index 586b667..e52c238 100755
--- a/make/scripts/setenv-jogl.sh
+++ b/make/scripts/setenv-jogl.sh
@@ -89,8 +89,9 @@ for i in $LIB/*jar ; do
     CLASSPATH=$CLASSPATH:$i
 done
 export CLASSPATH
-export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$GLUEGEN_OS:$JOGL_LIB_DIR
-export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$GLUEGEN_OS:$JOGL_LIB_DIR
+# 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
 
 echo CLASSPATH: $CLASSPATH
 echo
diff --git a/make/scripts/tests-armv7l_eabi.sh b/make/scripts/tests-armv7l_eabi.sh
new file mode 100755
index 0000000..e7e3270
--- /dev/null
+++ b/make/scripts/tests-armv7l_eabi.sh
@@ -0,0 +1,7 @@
+#! /bin/bash
+
+spath=`dirname $0`
+
+. $spath/tests.sh  `which java` ../build-armv7l_eabi $*
+
+
diff --git a/make/scripts/tests-javaws-x64.bat b/make/scripts/tests-javaws-x64.bat
index c25ccf3..23d01a2 100755
--- a/make/scripts/tests-javaws-x64.bat
+++ b/make/scripts/tests-javaws-x64.bat
@@ -1,4 +1,4 @@
-set JRE_PATH=C:\jre1.6.0_24_x64\bin
+set JRE_PATH=C:\jre1.6.0_26_x64\bin
 set LOG_PATH=%USERPROFILE%\AppData\LocalLow\Sun\Java\Deployment\log
 
 %JRE_PATH%\javaws -uninstall
diff --git a/make/scripts/tests-x32.bat b/make/scripts/tests-x32.bat
index 07a60d9..e7126d1 100755
--- a/make/scripts/tests-x32.bat
+++ b/make/scripts/tests-x32.bat
@@ -3,13 +3,14 @@ REM scripts\java-win32-dbg.bat com.jogamp.newt.opengl.GLWindow
 REM scripts\java-win32.bat com.jogamp.opengl.test.junit.jogl.offscreen.TestOffscreen01GLPBufferNEWT -time 5000
 REM scripts\java-win32.bat com.jogamp.opengl.test.junit.jogl.offscreen.TestOffscreen02BitmapNEWT -time 5000
 REM scripts\java-win32-dbg.bat com.jogamp.opengl.test.junit.jogl.acore.TestGLProfile01NEWT
-REM scripts\java-win32-dbg.bat com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.newt.TestGearsNEWT -time 30000
+REM scripts\java-win32-dbg.bat com.jogamp.opengl.test.junit.jogl.demos.gl2.newt.TestGearsNEWT -time 30000
 REM scripts\java-win32-dbg.bat com.jogamp.opengl.test.junit.jogl.newt.TestSwingAWTRobotUsageBeforeJOGLInitBug411
 REM scripts\java-win32-dbg.bat com.jogamp.opengl.test.junit.jogl.glsl.TestTransformFeedbackVaryingsBug407NEWT
 REM scripts\java-win32.bat com.jogamp.opengl.test.junit.jogl.glsl.TestGLSLSimple01NEWT -time 2000
 
 REM scripts\java-win32-dbg.bat com.jogamp.opengl.test.junit.newt.TestParenting01AWT
 REM scripts\java-win32-dbg.bat com.jogamp.opengl.test.junit.newt.parenting.TestParenting01cAWT -time 50000
+REM scripts\java-win32-dbg.bat com.jogamp.opengl.test.junit.newt.parenting.TestParenting01cSwingAWT
 REM scripts\java-win32-dbg.bat com.jogamp.opengl.test.junit.newt.TestListenerCom01AWT
 REM scripts\java-win32-dbg.bat com.jogamp.opengl.test.junit.newt.parenting.TestParenting01NEWT
 
@@ -34,5 +35,11 @@ REM scripts\java-win32-dbg.bat com.jogamp.opengl.test.junit.jogl.caps.TestMultis
 REM scripts\java-win32-dbg.bat com.jogamp.opengl.test.junit.jogl.caps.TestMultisampleNEWT -time 10000
 
 REM scripts\java-win32-dbg.bat com.jogamp.opengl.test.junit.jogl.swt.TestSWT01GLn %1 %2 %3 %4
-scripts\java-win32-dbg.bat com.jogamp.opengl.test.junit.jogl.swt.TestSWT02GLn %1 %2 %3 %4
+REM scripts\java-win32-dbg.bat com.jogamp.opengl.test.junit.jogl.swt.TestSWT02GLn %1 %2 %3 %4
 REM scripts\java-win32-dbg.bat com.jogamp.opengl.test.junit.jogl.swt.TestSWTAWT01GLn $*
+
+REM scripts\java-win32.bat com.jogamp.opengl.test.junit.jogl.acore.TestGLDebug00NEWT $*
+REM scripts\java-win32-dbg.bat com.jogamp.opengl.test.junit.jogl.acore.TestGLDebug01NEWT $*
+
+scripts\java-win32.bat com.jogamp.opengl.test.junit.jogl.glsl.TestRulerNEWT01
+REM scripts\java-win32.bat com.jogamp.opengl.test.junit.jogl.glsl.TestFBOMRTNEWT01
diff --git a/make/scripts/tests-x32.sh b/make/scripts/tests-x32.sh
index edbab5a..8ac1dc5 100755
--- a/make/scripts/tests-x32.sh
+++ b/make/scripts/tests-x32.sh
@@ -1,7 +1,11 @@
 #! /bin/bash
 
-spath=`dirname $0`
+SDIR=`dirname $0` 
 
-. $spath/tests.sh  /opt-linux-x86/j2se6/bin/java ../build-x86 $*
+if [ -e $SDIR/../../../gluegen/make/scripts/setenv-build-jogl-x86.sh ] ; then
+    . $SDIR/../../../gluegen/make/scripts/setenv-build-jogl-x86.sh
+fi
+
+. $SDIR/tests.sh  `which java` ../build-x86 $*
 
 
diff --git a/make/scripts/tests-x64.bat b/make/scripts/tests-x64.bat
index 3318b20..fe513da 100755
--- a/make/scripts/tests-x64.bat
+++ b/make/scripts/tests-x64.bat
@@ -6,36 +6,45 @@ REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.jogl.awt.TestAWT01GL
 REM scripts\java-win64.bat com.jogamp.opengl.test.junit.jogl.awt.TestSwingAWT01GLn
 REM scripts\java-win64.bat com.jogamp.opengl.test.junit.jogl.acore.TestSharedContextListAWT -time 5000
 REM scripts\java-win64.bat com.jogamp.opengl.test.junit.jogl.acore.TestSharedContextListNEWT -time 5000
+REM scripts\java-win64.bat com.jogamp.opengl.test.junit.jogl.acore.TestSharedContextVBOES2NEWT %1 %2 %3 %4 %5 %6
 REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.jogl.acore.TestGLProfile01NEWT
 
-REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.newt.TestGearsNEWT -time 30000
-REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.TestGearsGLJPanelAWT -time 5000
+REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.jogl.demos.gl2.newt.TestGearsNewtAWTWrapper %1 %2 %3 %4 %5 %6
+REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.jogl.demos.gl2.newt.TestGearsNEWT -time 30000
+REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.jogl.demos.es1.newt.TestGearsES1NEWT %1 %2 %3
+REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NEWT %1 %2 %3 %4 %5 %6
+REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.jogl.demos.gl2.awt.TestGearsAWT -time 5000
+REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.jogl.demos.gl2.awt.TestGearsGLJPanelAWT -time 5000
 REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.jogl.awt.TestAWT03GLCanvasRecreate01
 REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.jogl.newt.TestSwingAWTRobotUsageBeforeJOGLInitBug411
 REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.jogl.glsl.TestTransformFeedbackVaryingsBug407NEWT
 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 %1 %2 %3 %4 %5 %6
 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
+scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.newt.parenting.TestParenting01NEWT %1 %2 %3 %4 %5 %6
 
+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.TestFocus02SwingAWTRobot
-REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.newt.TestFocus01SwingAWTRobot
+REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.newt.TestFocus01SwingAWTRobot %1 %2 %3 %4 %5 %6
 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 -time 100000
+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
 REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.newt.TestScreenMode01NEWT
 REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.newt.TestScreenMode02NEWT
+REM scripts\java-win64.bat com.jogamp.opengl.test.junit.newt.ManualScreenMode03NEWT
 
 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-dbg.bat com.jogamp.opengl.test.junit.newt.parenting.TestParenting02NEWT
+REM scripts\java-win64.bat com.jogamp.opengl.test.junit.newt.parenting.TestParenting02NEWT %1 %2 %3 %4
 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
@@ -48,10 +57,31 @@ REM scripts\java-win64.bat com.jogamp.opengl.test.junit.newt.TestWindowClosingPr
 REM scripts\java-win64.bat com.jogamp.opengl.test.junit.newt.TestWindowClosingProtocol03NewtAWT $*
 
 REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.jogl.swt.TestSWT01GLn %1 %2 %3 %4
-scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.jogl.swt.TestSWT02GLn %1 %2 %3 %4
+REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.jogl.swt.TestSWT02GLn %1 %2 %3 %4
 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.offscreen.TestOffscreen02BitmapNEWT -time 5000
 
 REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.jogl.offscreen.TestOffscreen02BitmapNEWT
 
+REM scripts\java-win64.bat com.jogamp.opengl.test.junit.graph.TestRegionRendererNEWT01
+REM scripts\java-win64.bat com.jogamp.opengl.test.junit.graph.TestTextRendererNEWT01
+REM scripts\java-win64.bat com.jogamp.opengl.test.junit.jogl.glsl.TestGLSLShaderState02NEWT
+REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.jogl.glsl.TestGLSLShaderState02NEWT
+REM scripts\java-win64.bat com.jogamp.opengl.test.junit.graph.demos.ui.UINewtDemo01
+REM scripts\java-win64.bat com.jogamp.opengl.test.junit.graph.demos.GPUTextNewtDemo01
+REM scripts\java-win64.bat com.jogamp.opengl.test.junit.graph.demos.GPUTextNewtDemo02
+REM scripts\java-win64.bat com.jogamp.opengl.test.junit.graph.demos.GPURegionNewtDemo01
+REM scripts\java-win64.bat com.jogamp.opengl.test.junit.graph.demos.GPURegionNewtDemo02
+
+REM scripts\java-win64.bat com.jogamp.opengl.test.junit.jogl.acore.TestGLDebug00NEWT $*
+REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.jogl.acore.TestGLDebug01NEWT $*
+
+REM scripts\java-win64.bat com.jogamp.opengl.test.junit.jogl.acore.TestGPUMemSec01NEWT $*
+REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.jogl.acore.TestGPUMemSec01NEWT $*
+
+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.demos.es2.newt.TestElektronenMultipliziererNEWT %1 %2 %3 %4
+
diff --git a/make/scripts/tests-x64.sh b/make/scripts/tests-x64.sh
index 48c71c5..1816f59 100755
--- a/make/scripts/tests-x64.sh
+++ b/make/scripts/tests-x64.sh
@@ -1,7 +1,10 @@
 #! /bin/bash
 
-spath=`dirname $0`
+SDIR=`dirname $0` 
 
-. $spath/tests.sh  /opt-linux-x86_64/j2se6/bin/java ../build-x86_64 $*
+if [ -e $SDIR/../../../gluegen/make/scripts/setenv-build-jogl-x86_64.sh ] ; then
+    . $SDIR/../../../gluegen/make/scripts/setenv-build-jogl-x86_64.sh
+fi
 
+. $SDIR/tests.sh  `which java` ../build-x86_64 $*
 
diff --git a/make/scripts/tests.sh b/make/scripts/tests.sh
index 52dd65a..69068a2 100755
--- a/make/scripts/tests.sh
+++ b/make/scripts/tests.sh
@@ -53,26 +53,55 @@ function jrun() {
     #D_ARGS="-Djogl.debug.GLProfile"
     # D_ARGS="-Dnewt.debug.EDT -Dnativewindow.debug.ToolkitLock.TraceLock -Dnativewindow.debug.NativeWindow"
     #D_ARGS="-Dnewt.debug.Window -Dnewt.debug.Display -Dnewt.debug.EDT"
-    # D_ARGS="-Dnewt.debug.EDT -Dnativewindow.debug.ToolkitLock.TraceLock -Dnativewindow.debug.X11Util.TraceDisplayLifecycle=true"
+    #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 -Djogl.debug.GLContext -Djogl.debug.GLDrawable -Dnewt.debug=all"
+    #D_ARGS="-Dnativewindow.debug.X11Util"
     #D_ARGS="-Djogamp.common.utils.locks.Lock.timeout=600000 -Djogamp.debug.Lock -Djogamp.debug.Lock.TraceLock"
     #D_ARGS="-Djogamp.common.utils.locks.Lock.timeout=1000 -Djogamp.debug.Lock -Djogamp.debug.Lock.TraceLock"
-    # D_ARGS="-Dnewt.debug.Window -Dnewt.debug.EDT -Dnewt.debug.Display "
     #D_ARGS="-Dnewt.debug.EDT -Djogamp.common.utils.locks.Lock.timeout=600000 -Djogl.debug.Animator -Dnewt.debug.Display -Dnewt.debug.Screen"
     #D_ARGS="-Dnewt.debug.Window -Djogamp.common.utils.locks.Lock.timeout=600000 -Djogl.debug.Animator"
     #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 -Dnewt.debug=all"
+    #D_ARGS="-Djogl.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="-Dnewt.debug.EDT"
     #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=all"
+    #D_ARGS="-Dnewt.debug.Window -Djogl.debug.Animator -Dnewt.debug.Screen"
+    #D_ARGS="-Dnewt.debug.Window"
+    #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="-Djogl.debug.DebugGL -Djogl.debug.GLDebugMessageHandler -Djogl.debug.GLSLCode"
+    #D_ARGS="-Djogl.debug.DebugGL -Djogl.debug.TraceGL"
+    #D_ARGS="-Djogl.debug.GLDebugMessageHandler -Dnewt.debug.Window -Dnewt.debug.Display -Dnewt.debug.EDT"
+    #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.DebugGL -Djogl.debug.TraceGL"
     #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="-Dnewt.test.EDTMainThread -Dnewt.debug.MainThread"
+    #C_ARG="com.jogamp.newt.util.MainThread"
+    #D_ARGS="-Dnewt.debug.MainThread"
+    #D_ARGS="-Dnewt.debug=all -Djogamp.debug.Lock.TraceLock -Djogamp.common.utils.locks.Lock.timeout=600000"
+    #D_ARGS="-Dnewt.debug=all -Djogamp.debug.Lock -Djogamp.debug.Lock.TraceLock"
+    #D_ARGS="-Djogl.debug.GLContext -Dnewt.debug=all -Djogamp.debug.Lock -Djogamp.common.utils.locks.Lock.timeout=10000"
+    #D_ARGS="-Dnewt.debug=all"
     #X_ARGS="-Dsun.java2d.noddraw=true -Dsun.java2d.opengl=true"
     #X_ARGS="-verbose:jni"
 
@@ -88,6 +117,14 @@ function jrun() {
     echo
     echo "Test Start: $*"
     echo
+    echo LD_LIBRARY_PATH $LD_LIBRARY_PATH
+    echo
+    echo $javaexe $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 \
     $javaexe $X_ARGS $D_ARGS $C_ARG $*
     echo
     echo "Test End: $*"
@@ -117,25 +154,38 @@ function testawtmt() {
 #testnoawt com.jogamp.opengl.test.junit.jogl.offscreen.TestOffscreen01GLPBufferNEWT $*
 #testnoawt com.jogamp.opengl.test.junit.jogl.offscreen.TestOffscreen02BitmapNEWT $*
 #testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestGLProfile01NEWT $*
-#testawt com.jogamp.opengl.test.junit.jogl.acore.TestGLProfile01NEWT $*
-#testawt com.jogamp.opengl.test.junit.jogl.acore.TestSharedContextListNEWT $*
-#testnoawt com.jogamp.opengl.test.junit.jogl.glsl.TestTransformFeedbackVaryingsBug407NEWT $*
-#testnoawt com.jogamp.opengl.test.junit.jogl.glsl.TestGLSLSimple01NEWT $*
+#testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestGLDebug00NEWT $*
+#testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestGLDebug01NEWT $*
+#testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestGLProfile01NEWT $*
+#testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestSharedContextListNEWT $*
+#testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestSharedContextVBOES1NEWT $*
+#testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestSharedContextVBOES2NEWT $*
 #testnoawt com.jogamp.opengl.test.junit.newt.TestRemoteWindow01NEWT $*
 #testnoawt com.jogamp.opengl.test.junit.newt.TestRemoteGLWindows01NEWT $*
-#testawt com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.newt.TestGearsNEWT $*
-#testawt com.jogamp.opengl.test.junit.newt.TestDisplayLifecycle01NEWT
-#testawt com.jogamp.opengl.test.junit.newt.TestDisplayLifecycle02NEWT
-#testawt com.jogamp.opengl.test.junit.newt.parenting.TestParenting01NEWT
-#testawt com.jogamp.opengl.test.junit.newt.parenting.TestParenting02NEWT
-#testawt com.jogamp.opengl.test.junit.newt.TestScreenMode00NEWT
+#testnoawt com.jogamp.opengl.test.junit.jogl.demos.gl2.newt.TestGearsNEWT $*
+#testnoawt com.jogamp.opengl.test.junit.jogl.demos.es1.newt.TestGearsES1NEWT $*
+#testawt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NEWT $*
+#testnoawt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NEWT $*
+#testnoawt com.jogamp.opengl.test.junit.jogl.demos.es1.newt.TestRedSquareES1NEWT $*
+testnoawt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestRedSquareES2NEWT $*
+#testnoawt com.jogamp.opengl.test.junit.newt.TestWindows01NEWT $*
+#testnoawt com.jogamp.opengl.test.junit.newt.TestWindowClosingProtocol02NEWT $*
+#testnoawt com.jogamp.opengl.test.junit.newt.TestGLWindows01NEWT $*
+#testnoawt com.jogamp.opengl.test.junit.newt.TestGLWindows02NEWTAnimated $*
+#testnoawt com.jogamp.opengl.test.junit.newt.TestDisplayLifecycle01NEWT
+#testnoawt com.jogamp.opengl.test.junit.newt.TestDisplayLifecycle02NEWT
+#testnoawt com.jogamp.opengl.test.junit.newt.parenting.TestParenting01NEWT $*
+#testnoawt com.jogamp.opengl.test.junit.newt.parenting.TestParenting02NEWT $*
+#testnoawt com.jogamp.opengl.test.junit.newt.TestScreenMode00NEWT
+#testnoawt com.jogamp.opengl.test.junit.newt.TestScreenMode00bNEWT
 #testnoawt com.jogamp.opengl.test.junit.newt.TestScreenMode01NEWT
+#testnoawt com.jogamp.opengl.test.junit.newt.TestScreenMode01bNEWT
 #testnoawt com.jogamp.opengl.test.junit.newt.TestScreenMode02NEWT
-#testawt com.jogamp.opengl.test.junit.newt.TestGLWindows01NEWT -time 1000000
-#testawt -Djava.awt.headless=true com.jogamp.opengl.test.junit.newt.TestGLWindows01NEWT
-#testawt com.jogamp.opengl.test.junit.newt.TestGLWindows02NEWTAnimated
+#testnoawt com.jogamp.opengl.test.junit.newt.ManualScreenMode03NEWT
+#testnoawt com.jogamp.opengl.test.junit.newt.TestWindowClosingProtocol02NEWT $*
+#testnoawt -Djava.awt.headless=true com.jogamp.opengl.test.junit.newt.TestGLWindows01NEWT
 #testnoawt com.jogamp.opengl.test.junit.jogl.swt.TestSWT01GLn $*
-testnoawt com.jogamp.opengl.test.junit.jogl.swt.TestSWT02GLn $*
+#testnoawt com.jogamp.opengl.test.junit.jogl.swt.TestSWT02GLn $*
 
 
 #
@@ -149,52 +199,67 @@ testnoawt com.jogamp.opengl.test.junit.jogl.swt.TestSWT02GLn $*
 #testawt com.jogamp.opengl.test.junit.jogl.awt.TestAWT03GLCanvasRecreate01 $*
 #testawt com.jogamp.opengl.test.junit.jogl.awt.TestAWT02WindowClosing
 #testawt com.jogamp.opengl.test.junit.jogl.awt.text.TestAWTTextRendererUseVertexArrayBug464
-#testawt com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.TestGearsAWT
-#testawt com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.TestGearsGLJPanelAWT $*
+#testawt com.jogamp.opengl.test.junit.jogl.demos.gl2.awt.TestGearsAWT $*
+#testawt com.jogamp.opengl.test.junit.jogl.demos.gl2.awt.TestGearsGLJPanelAWT $*
 #testawt com.jogamp.opengl.test.junit.jogl.texture.TestTexture01AWT
 #testawt com.jogamp.opengl.test.junit.jogl.caps.TestMultisampleAWT
 #testawt com.jogamp.opengl.test.junit.jogl.awt.TestBug461OffscreenSupersamplingSwingAWT
 #testawt com.jogamp.opengl.test.junit.jogl.texture.TestGrayTextureFromFileAWTBug417
-#testawtmt com.jogamp.opengl.test.junit.jogl.swt.TestSWTAWT01GLn $*
+#testawt com.jogamp.opengl.test.junit.jogl.swt.TestSWTAWT01GLn $*
+#testawt com.jogamp.opengl.test.junit.jogl.glu.TestBug463ScaleImageMemoryAWT $*
 
 #
 # newt.awt (testawt)
 #
 #testawt com.jogamp.opengl.test.junit.jogl.newt.TestSwingAWTRobotUsageBeforeJOGLInitBug411
-#testawt com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.newt.TestGearsNewtAWTWrapper
+#testawt com.jogamp.opengl.test.junit.jogl.demos.gl2.newt.TestGearsNewtAWTWrapper
 #testawt com.jogamp.opengl.test.junit.newt.TestEventSourceNotAWTBug
-#testawt com.jogamp.opengl.test.junit.newt.TestFocus01SwingAWTRobot
+#testawt com.jogamp.opengl.test.junit.newt.TestFocus01SwingAWTRobot $*
 #testawt com.jogamp.opengl.test.junit.newt.TestFocus02SwingAWTRobot
 #testawt com.jogamp.opengl.test.junit.newt.TestListenerCom01AWT
-#testawt com.jogamp.opengl.test.junit.newt.parenting.TestParenting01aAWT
-#testawt com.jogamp.opengl.test.junit.newt.parenting.TestParenting01bAWT
-#testawt com.jogamp.opengl.test.junit.newt.parenting.TestParenting01cAWT
-#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.TestParenting03AWT -time 100000
-#testawt com.jogamp.opengl.test.junit.newt.parenting.TestParenting03bAWT -time 100000
+#testawt com.jogamp.opengl.test.junit.newt.parenting.TestParenting01aAWT $*
+#testawt com.jogamp.opengl.test.junit.newt.parenting.TestParenting01bAWT $*
+#testawt com.jogamp.opengl.test.junit.newt.parenting.TestParenting01cAWT $*
+#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.TestParenting03AWT $*
+#testawt com.jogamp.opengl.test.junit.newt.parenting.TestParenting03bAWT $*
 #testawt com.jogamp.opengl.test.junit.newt.TestCloseNewtAWT
 #testawt com.jogamp.opengl.test.junit.jogl.caps.TestMultisampleAWT $*
 #testawt com.jogamp.opengl.test.junit.jogl.caps.TestMultisampleNEWT $*
 #testawt com.jogamp.opengl.test.junit.jogl.glsl.TestShaderCompilationBug459AWT
 
-#testawt com.jogamp.opengl.test.junit.newt.TestGLWindows02NEWTAnimated $*
-#testawt com.jogamp.opengl.test.junit.jogl.newt.TestSwingAWTRobotUsageBeforeJOGLInitBug411 $*
-#testawt com.jogamp.opengl.test.junit.newt.parenting.TestParenting01NEWT $*
-
 #testawt com.jogamp.opengl.test.junit.newt.TestWindowClosingProtocol01AWT $*
-#testawt com.jogamp.opengl.test.junit.newt.TestWindowClosingProtocol02NEWT $*
+#testnoawt com.jogamp.opengl.test.junit.newt.TestWindowClosingProtocol02NEWT $*
 #testawt com.jogamp.opengl.test.junit.newt.TestWindowClosingProtocol03NewtAWT $*
 
 #testawt $*
 
-#testnoawt com.jogamp.opengl.test.junit.jogl.offscreen.TestOffscreen02BitmapNEWT
-#
+#testnoawt com.jogamp.opengl.test.junit.jogl.glsl.TestTransformFeedbackVaryingsBug407NEWT $*
+#testnoawt com.jogamp.opengl.test.junit.jogl.glsl.TestGLSLSimple01NEWT $*
+#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 $*
 
-#testawt com.jogamp.opengl.test.junit.newt.TestFocus01SwingAWTRobot
-#testawt com.jogamp.opengl.test.junit.newt.TestFocus02SwingAWTRobot
-#testawt com.jogamp.opengl.test.junit.jogl.acore.TestSharedContextListAWT $*
+#testnoawt com.jogamp.opengl.test.junit.graph.TestRegionRendererNEWT01 $*
+#testnoawt com.jogamp.opengl.test.junit.graph.TestTextRendererNEWT01 $*
+#testnoawt com.jogamp.opengl.test.junit.graph.demos.ui.UINewtDemo01 $*
+#testnoawt com.jogamp.opengl.test.junit.graph.demos.GPUTextNewtDemo01 $*
+#testnoawt com.jogamp.opengl.test.junit.graph.demos.GPUTextNewtDemo02 $*
+#testnoawt com.jogamp.opengl.test.junit.graph.demos.GPURegionNewtDemo01 $*
+#testnoawt com.jogamp.opengl.test.junit.graph.demos.GPURegionNewtDemo02 $*
+#testnoawt com.jogamp.opengl.test.junit.graph.demos.GPUUISceneNewtDemo01 $*
+#testnoawt com.jogamp.opengl.test.junit.graph.demos.GPUUISceneNewtDemo02 $*
+
+#testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestGPUMemSec01NEWT $*
+#testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestMapBuffer01NEWT $*
+#testnoawt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestElektronenMultipliziererNEWT $*
+
+#
+# regressions
+#
 
 $spath/count-edt-start.sh java-run.log
 
diff --git a/make/stub_includes/egl/EGL/eglplatform.h b/make/stub_includes/egl/EGL/eglplatform.h
index 0a05f16..a661736 100644
--- a/make/stub_includes/egl/EGL/eglplatform.h
+++ b/make/stub_includes/egl/EGL/eglplatform.h
@@ -83,7 +83,7 @@ typedef int   EGLNativeDisplayType;
 typedef void *EGLNativeWindowType;
 typedef void *EGLNativePixmapType;
 
-#elif defined(__unix__)
+#elif defined(__X11__)
 
 /* X11 (tentative)  */
 #include <X11/Xlib.h>
diff --git a/make/stub_includes/gluegen/gluegen_types.h b/make/stub_includes/gluegen/gluegen_types.h
deleted file mode 100644
index c854d33..0000000
--- a/make/stub_includes/gluegen/gluegen_types.h
+++ /dev/null
@@ -1,44 +0,0 @@
-#ifndef __gluegen_types_h
-#define __gluegen_types_h
-
-/**
- * These are standard include replacement files
- * for gluegen processing only!
- *
- * Don't include this folder to your native compiler!
- *
- * Purpose of all files within this folder is to define a fixed bitsize
- * across all platforms to allow the resulting java type comfort all.
- * IE a 'intptr_t' shall always be 64bit.
- *
- * We use one size fits all.
- */
-#if defined(__STDC_VERSION__) || defined(__GNUC__) || defined (__ARMCC_2__) || \
-    defined(__VMS) || defined(__sgi) || defined(__sun__) || defined(__digital__) || defined(__unix__) || defined(__SCO__) || defined(OPENSTEP) || \
-    defined(BSD) || defined(FREEBSD) || defined(_HPUX) || defined(SOLARIS) || defined(macosx) || \
-    defined(_WIN32) || defined(_WIN32_WCE) || defined(WINVER) || defined(_WIN32_WINNT) || defined(__CYGWIN__) || \
-    defined(__SCITECH_SNAP__) || defined (__SYMBIAN32__) || \
-    defined(__arch64__) || defined(_LP64)
-
-    #error PLATFORM or COMPILER DEFINES FOUND, not allowed within GLUEGEN HEADER
-
-#endif
-
-/**
- * Look in the GlueGen.java API documentation for the build-in types (terminal symbols) 
- * definition.
- * 
- * The following types are build-in:
- *
- * __int32
- * int32_t
- * uint32_t
- * __int64
- * int64_t
- * uint64_t
- * ptrdiff_t
- * size_t
- */
-
-#endif /* __gluegen_types_h */
-
diff --git a/make/stub_includes/gluegen/inttypes.h b/make/stub_includes/gluegen/inttypes.h
deleted file mode 100644
index b4ac3d4..0000000
--- a/make/stub_includes/gluegen/inttypes.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef __inttypes_h
-#define __inttypes_h
-
-#include <gluegen_types.h>
-
-#endif /* __stdint_h */
-
diff --git a/make/stub_includes/gluegen/stdarg.h b/make/stub_includes/gluegen/stdarg.h
deleted file mode 100644
index b5b585b..0000000
--- a/make/stub_includes/gluegen/stdarg.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef __stdarg_h
-#define __stdarg_h
-
-#include <gluegen_types.h>
-
-#endif /* __stdarg_h */
-
diff --git a/make/stub_includes/gluegen/stddef.h b/make/stub_includes/gluegen/stddef.h
deleted file mode 100644
index a3890b0..0000000
--- a/make/stub_includes/gluegen/stddef.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef __stddef_h
-#define __stddef_h
-
-#include <gluegen_types.h>
-
-#endif /* __stddef_h */
diff --git a/make/stub_includes/gluegen/stdint.h b/make/stub_includes/gluegen/stdint.h
deleted file mode 100644
index dd03d2d..0000000
--- a/make/stub_includes/gluegen/stdint.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef __stdint_h
-#define __stdint_h
-
-#include <gluegen_types.h>
-
-#endif /* __stdint_h */
-
diff --git a/make/stub_includes/jni/classfile_constants.h b/make/stub_includes/jni/classfile_constants.h
deleted file mode 100644
index 6546436..0000000
--- a/make/stub_includes/jni/classfile_constants.h
+++ /dev/null
@@ -1,523 +0,0 @@
-/*
- * @(#)classfile_constants.h	1.4 05/11/17
- * 
- * Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
- * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
- * 
- */
-
-#ifndef CLASSFILE_CONSTANTS_H
-#define CLASSFILE_CONSTANTS_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Flags */
-
-enum {
-    JVM_ACC_PUBLIC        = 0x0001,
-    JVM_ACC_PRIVATE       = 0x0002,
-    JVM_ACC_PROTECTED     = 0x0004,
-    JVM_ACC_STATIC        = 0x0008,
-    JVM_ACC_FINAL         = 0x0010,
-    JVM_ACC_SYNCHRONIZED  = 0x0020,
-    JVM_ACC_SUPER         = 0x0020,
-    JVM_ACC_VOLATILE      = 0x0040,
-    JVM_ACC_BRIDGE        = 0x0040,
-    JVM_ACC_TRANSIENT     = 0x0080,
-    JVM_ACC_VARARGS       = 0x0080,
-    JVM_ACC_NATIVE        = 0x0100,
-    JVM_ACC_INTERFACE     = 0x0200,
-    JVM_ACC_ABSTRACT      = 0x0400,
-    JVM_ACC_STRICT        = 0x0800,
-    JVM_ACC_SYNTHETIC     = 0x1000,
-    JVM_ACC_ANNOTATION    = 0x2000,
-    JVM_ACC_ENUM          = 0x4000
-};
-
-/* Used in newarray instruction. */
-
-enum {
-    JVM_T_BOOLEAN = 4,
-    JVM_T_CHAR    = 5,
-    JVM_T_FLOAT   = 6,
-    JVM_T_DOUBLE  = 7,
-    JVM_T_BYTE    = 8,
-    JVM_T_SHORT   = 9,
-    JVM_T_INT     = 10,
-    JVM_T_LONG    = 11
-};
-
-/* Constant Pool Entries */
-
-enum {
-    JVM_CONSTANT_Utf8                   = 1,
-    JVM_CONSTANT_Unicode                = 2, /* unused */
-    JVM_CONSTANT_Integer                = 3,
-    JVM_CONSTANT_Float                  = 4,
-    JVM_CONSTANT_Long                   = 5,      
-    JVM_CONSTANT_Double                 = 6,
-    JVM_CONSTANT_Class                  = 7,
-    JVM_CONSTANT_String                 = 8,
-    JVM_CONSTANT_Fieldref               = 9,
-    JVM_CONSTANT_Methodref              = 10,
-    JVM_CONSTANT_InterfaceMethodref     = 11,
-    JVM_CONSTANT_NameAndType            = 12
-};
-
-/* StackMapTable type item numbers */
-
-enum {
-    JVM_ITEM_Top                = 0,
-    JVM_ITEM_Integer            = 1,
-    JVM_ITEM_Float              = 2,
-    JVM_ITEM_Double             = 3,
-    JVM_ITEM_Long               = 4,
-    JVM_ITEM_Null               = 5,
-    JVM_ITEM_UninitializedThis  = 6,
-    JVM_ITEM_Object             = 7,
-    JVM_ITEM_Uninitialized      = 8
-};
-
-/* Type signatures */
-
-enum {
-    JVM_SIGNATURE_ARRAY         = '[',
-    JVM_SIGNATURE_BYTE          = 'B',
-    JVM_SIGNATURE_CHAR          = 'C',
-    JVM_SIGNATURE_CLASS         = 'L',
-    JVM_SIGNATURE_ENDCLASS      = ';',
-    JVM_SIGNATURE_ENUM          = 'E',
-    JVM_SIGNATURE_FLOAT         = 'F',
-    JVM_SIGNATURE_DOUBLE        = 'D',
-    JVM_SIGNATURE_FUNC          = '(',
-    JVM_SIGNATURE_ENDFUNC       = ')',
-    JVM_SIGNATURE_INT           = 'I',
-    JVM_SIGNATURE_LONG          = 'J',
-    JVM_SIGNATURE_SHORT         = 'S',
-    JVM_SIGNATURE_VOID          = 'V',
-    JVM_SIGNATURE_BOOLEAN       = 'Z'
-};
-
-/* Opcodes */
-
-enum {
-    JVM_OPC_nop                 = 0,
-    JVM_OPC_aconst_null         = 1,
-    JVM_OPC_iconst_m1           = 2,
-    JVM_OPC_iconst_0            = 3,
-    JVM_OPC_iconst_1            = 4,
-    JVM_OPC_iconst_2            = 5,
-    JVM_OPC_iconst_3            = 6,
-    JVM_OPC_iconst_4            = 7,
-    JVM_OPC_iconst_5            = 8,
-    JVM_OPC_lconst_0            = 9,
-    JVM_OPC_lconst_1            = 10,
-    JVM_OPC_fconst_0            = 11,
-    JVM_OPC_fconst_1            = 12,
-    JVM_OPC_fconst_2            = 13,
-    JVM_OPC_dconst_0            = 14,
-    JVM_OPC_dconst_1            = 15,
-    JVM_OPC_bipush              = 16,
-    JVM_OPC_sipush              = 17,
-    JVM_OPC_ldc                 = 18,
-    JVM_OPC_ldc_w               = 19,
-    JVM_OPC_ldc2_w              = 20,
-    JVM_OPC_iload               = 21,
-    JVM_OPC_lload               = 22,
-    JVM_OPC_fload               = 23,
-    JVM_OPC_dload               = 24,
-    JVM_OPC_aload               = 25,
-    JVM_OPC_iload_0             = 26,
-    JVM_OPC_iload_1             = 27,
-    JVM_OPC_iload_2             = 28,
-    JVM_OPC_iload_3             = 29,
-    JVM_OPC_lload_0             = 30,
-    JVM_OPC_lload_1             = 31,
-    JVM_OPC_lload_2             = 32,
-    JVM_OPC_lload_3             = 33,
-    JVM_OPC_fload_0             = 34,
-    JVM_OPC_fload_1             = 35,
-    JVM_OPC_fload_2             = 36,
-    JVM_OPC_fload_3             = 37,
-    JVM_OPC_dload_0             = 38,
-    JVM_OPC_dload_1             = 39,
-    JVM_OPC_dload_2             = 40,
-    JVM_OPC_dload_3             = 41,
-    JVM_OPC_aload_0             = 42,
-    JVM_OPC_aload_1             = 43,
-    JVM_OPC_aload_2             = 44,
-    JVM_OPC_aload_3             = 45,
-    JVM_OPC_iaload              = 46,
-    JVM_OPC_laload              = 47,
-    JVM_OPC_faload              = 48,
-    JVM_OPC_daload              = 49,
-    JVM_OPC_aaload              = 50,
-    JVM_OPC_baload              = 51,
-    JVM_OPC_caload              = 52,
-    JVM_OPC_saload              = 53,
-    JVM_OPC_istore              = 54,
-    JVM_OPC_lstore              = 55,
-    JVM_OPC_fstore              = 56,
-    JVM_OPC_dstore              = 57,
-    JVM_OPC_astore              = 58,
-    JVM_OPC_istore_0            = 59,
-    JVM_OPC_istore_1            = 60,
-    JVM_OPC_istore_2            = 61,
-    JVM_OPC_istore_3            = 62,
-    JVM_OPC_lstore_0            = 63,
-    JVM_OPC_lstore_1            = 64,
-    JVM_OPC_lstore_2            = 65,
-    JVM_OPC_lstore_3            = 66,
-    JVM_OPC_fstore_0            = 67,
-    JVM_OPC_fstore_1            = 68,
-    JVM_OPC_fstore_2            = 69,
-    JVM_OPC_fstore_3            = 70,
-    JVM_OPC_dstore_0            = 71,
-    JVM_OPC_dstore_1            = 72,
-    JVM_OPC_dstore_2            = 73,
-    JVM_OPC_dstore_3            = 74,
-    JVM_OPC_astore_0            = 75,
-    JVM_OPC_astore_1            = 76,
-    JVM_OPC_astore_2            = 77,
-    JVM_OPC_astore_3            = 78,
-    JVM_OPC_iastore             = 79,
-    JVM_OPC_lastore             = 80,
-    JVM_OPC_fastore             = 81,
-    JVM_OPC_dastore             = 82,
-    JVM_OPC_aastore             = 83,
-    JVM_OPC_bastore             = 84,
-    JVM_OPC_castore             = 85,
-    JVM_OPC_sastore             = 86,
-    JVM_OPC_pop                 = 87,
-    JVM_OPC_pop2                = 88,
-    JVM_OPC_dup                 = 89,
-    JVM_OPC_dup_x1              = 90,
-    JVM_OPC_dup_x2              = 91,
-    JVM_OPC_dup2                = 92,
-    JVM_OPC_dup2_x1             = 93,
-    JVM_OPC_dup2_x2             = 94,
-    JVM_OPC_swap                = 95,
-    JVM_OPC_iadd                = 96,
-    JVM_OPC_ladd                = 97,
-    JVM_OPC_fadd                = 98,
-    JVM_OPC_dadd                = 99,
-    JVM_OPC_isub                = 100,
-    JVM_OPC_lsub                = 101,
-    JVM_OPC_fsub                = 102,
-    JVM_OPC_dsub                = 103,
-    JVM_OPC_imul                = 104,
-    JVM_OPC_lmul                = 105,
-    JVM_OPC_fmul                = 106,
-    JVM_OPC_dmul                = 107,
-    JVM_OPC_idiv                = 108,
-    JVM_OPC_ldiv                = 109,
-    JVM_OPC_fdiv                = 110,
-    JVM_OPC_ddiv                = 111,
-    JVM_OPC_irem                = 112,
-    JVM_OPC_lrem                = 113,
-    JVM_OPC_frem                = 114,
-    JVM_OPC_drem                = 115,
-    JVM_OPC_ineg                = 116,
-    JVM_OPC_lneg                = 117,
-    JVM_OPC_fneg                = 118,
-    JVM_OPC_dneg                = 119,
-    JVM_OPC_ishl                = 120,
-    JVM_OPC_lshl                = 121,
-    JVM_OPC_ishr                = 122,
-    JVM_OPC_lshr                = 123,
-    JVM_OPC_iushr               = 124,
-    JVM_OPC_lushr               = 125,
-    JVM_OPC_iand                = 126,
-    JVM_OPC_land                = 127,
-    JVM_OPC_ior                 = 128,
-    JVM_OPC_lor                 = 129,
-    JVM_OPC_ixor                = 130,
-    JVM_OPC_lxor                = 131,
-    JVM_OPC_iinc                = 132,
-    JVM_OPC_i2l                 = 133,
-    JVM_OPC_i2f                 = 134,
-    JVM_OPC_i2d                 = 135,
-    JVM_OPC_l2i                 = 136,
-    JVM_OPC_l2f                 = 137,
-    JVM_OPC_l2d                 = 138,
-    JVM_OPC_f2i                 = 139,
-    JVM_OPC_f2l                 = 140,
-    JVM_OPC_f2d                 = 141,
-    JVM_OPC_d2i                 = 142,
-    JVM_OPC_d2l                 = 143,
-    JVM_OPC_d2f                 = 144,
-    JVM_OPC_i2b                 = 145,
-    JVM_OPC_i2c                 = 146,
-    JVM_OPC_i2s                 = 147,
-    JVM_OPC_lcmp                = 148,
-    JVM_OPC_fcmpl               = 149,
-    JVM_OPC_fcmpg               = 150,
-    JVM_OPC_dcmpl               = 151,
-    JVM_OPC_dcmpg               = 152,
-    JVM_OPC_ifeq                = 153,
-    JVM_OPC_ifne                = 154,
-    JVM_OPC_iflt                = 155,
-    JVM_OPC_ifge                = 156,
-    JVM_OPC_ifgt                = 157,
-    JVM_OPC_ifle                = 158,
-    JVM_OPC_if_icmpeq           = 159,
-    JVM_OPC_if_icmpne           = 160,
-    JVM_OPC_if_icmplt           = 161,
-    JVM_OPC_if_icmpge           = 162,
-    JVM_OPC_if_icmpgt           = 163,
-    JVM_OPC_if_icmple           = 164,
-    JVM_OPC_if_acmpeq           = 165,
-    JVM_OPC_if_acmpne           = 166,
-    JVM_OPC_goto                = 167,
-    JVM_OPC_jsr                 = 168,
-    JVM_OPC_ret                 = 169,
-    JVM_OPC_tableswitch         = 170,
-    JVM_OPC_lookupswitch        = 171,
-    JVM_OPC_ireturn             = 172,
-    JVM_OPC_lreturn             = 173,
-    JVM_OPC_freturn             = 174,
-    JVM_OPC_dreturn             = 175,
-    JVM_OPC_areturn             = 176,
-    JVM_OPC_return              = 177,
-    JVM_OPC_getstatic           = 178,
-    JVM_OPC_putstatic           = 179,
-    JVM_OPC_getfield            = 180,
-    JVM_OPC_putfield            = 181,
-    JVM_OPC_invokevirtual       = 182,
-    JVM_OPC_invokespecial       = 183,
-    JVM_OPC_invokestatic        = 184,
-    JVM_OPC_invokeinterface     = 185,
-    JVM_OPC_xxxunusedxxx        = 186,
-    JVM_OPC_new                 = 187,
-    JVM_OPC_newarray            = 188,
-    JVM_OPC_anewarray           = 189,
-    JVM_OPC_arraylength         = 190,
-    JVM_OPC_athrow              = 191,
-    JVM_OPC_checkcast           = 192,
-    JVM_OPC_instanceof          = 193,
-    JVM_OPC_monitorenter        = 194,
-    JVM_OPC_monitorexit         = 195,
-    JVM_OPC_wide                = 196,
-    JVM_OPC_multianewarray      = 197,
-    JVM_OPC_ifnull              = 198,
-    JVM_OPC_ifnonnull           = 199,
-    JVM_OPC_goto_w              = 200,
-    JVM_OPC_jsr_w               = 201,
-    JVM_OPC_MAX                 = 201
-};
-
-/* Opcode length initializer, use with something like:
- *   unsigned char opcode_length[JVM_OPC_MAX+1] = JVM_OPCODE_LENGTH_INITIALIZER;
- */
-#define JVM_OPCODE_LENGTH_INITIALIZER { \
-   1,   /* nop */                       \
-   1,   /* aconst_null */               \
-   1,   /* iconst_m1 */                 \
-   1,   /* iconst_0 */                  \
-   1,   /* iconst_1 */                  \
-   1,   /* iconst_2 */                  \
-   1,   /* iconst_3 */                  \
-   1,   /* iconst_4 */                  \
-   1,   /* iconst_5 */                  \
-   1,   /* lconst_0 */                  \
-   1,   /* lconst_1 */                  \
-   1,   /* fconst_0 */                  \
-   1,   /* fconst_1 */                  \
-   1,   /* fconst_2 */                  \
-   1,   /* dconst_0 */                  \
-   1,   /* dconst_1 */                  \
-   2,   /* bipush */                    \
-   3,   /* sipush */                    \
-   2,   /* ldc */                       \
-   3,   /* ldc_w */                     \
-   3,   /* ldc2_w */                    \
-   2,   /* iload */                     \
-   2,   /* lload */                     \
-   2,   /* fload */                     \
-   2,   /* dload */                     \
-   2,   /* aload */                     \
-   1,   /* iload_0 */                   \
-   1,   /* iload_1 */                   \
-   1,   /* iload_2 */                   \
-   1,   /* iload_3 */                   \
-   1,   /* lload_0 */                   \
-   1,   /* lload_1 */                   \
-   1,   /* lload_2 */                   \
-   1,   /* lload_3 */                   \
-   1,   /* fload_0 */                   \
-   1,   /* fload_1 */                   \
-   1,   /* fload_2 */                   \
-   1,   /* fload_3 */                   \
-   1,   /* dload_0 */                   \
-   1,   /* dload_1 */                   \
-   1,   /* dload_2 */                   \
-   1,   /* dload_3 */                   \
-   1,   /* aload_0 */                   \
-   1,   /* aload_1 */                   \
-   1,   /* aload_2 */                   \
-   1,   /* aload_3 */                   \
-   1,   /* iaload */                    \
-   1,   /* laload */                    \
-   1,   /* faload */                    \
-   1,   /* daload */                    \
-   1,   /* aaload */                    \
-   1,   /* baload */                    \
-   1,   /* caload */                    \
-   1,   /* saload */                    \
-   2,   /* istore */                    \
-   2,   /* lstore */                    \
-   2,   /* fstore */                    \
-   2,   /* dstore */                    \
-   2,   /* astore */                    \
-   1,   /* istore_0 */                  \
-   1,   /* istore_1 */                  \
-   1,   /* istore_2 */                  \
-   1,   /* istore_3 */                  \
-   1,   /* lstore_0 */                  \
-   1,   /* lstore_1 */                  \
-   1,   /* lstore_2 */                  \
-   1,   /* lstore_3 */                  \
-   1,   /* fstore_0 */                  \
-   1,   /* fstore_1 */                  \
-   1,   /* fstore_2 */                  \
-   1,   /* fstore_3 */                  \
-   1,   /* dstore_0 */                  \
-   1,   /* dstore_1 */                  \
-   1,   /* dstore_2 */                  \
-   1,   /* dstore_3 */                  \
-   1,   /* astore_0 */                  \
-   1,   /* astore_1 */                  \
-   1,   /* astore_2 */                  \
-   1,   /* astore_3 */                  \
-   1,   /* iastore */                   \
-   1,   /* lastore */                   \
-   1,   /* fastore */                   \
-   1,   /* dastore */                   \
-   1,   /* aastore */                   \
-   1,   /* bastore */                   \
-   1,   /* castore */                   \
-   1,   /* sastore */                   \
-   1,   /* pop */                       \
-   1,   /* pop2 */                      \
-   1,   /* dup */                       \
-   1,   /* dup_x1 */                    \
-   1,   /* dup_x2 */                    \
-   1,   /* dup2 */                      \
-   1,   /* dup2_x1 */                   \
-   1,   /* dup2_x2 */                   \
-   1,   /* swap */                      \
-   1,   /* iadd */                      \
-   1,   /* ladd */                      \
-   1,   /* fadd */                      \
-   1,   /* dadd */                      \
-   1,   /* isub */                      \
-   1,   /* lsub */                      \
-   1,   /* fsub */                      \
-   1,   /* dsub */                      \
-   1,   /* imul */                      \
-   1,   /* lmul */                      \
-   1,   /* fmul */                      \
-   1,   /* dmul */                      \
-   1,   /* idiv */                      \
-   1,   /* ldiv */                      \
-   1,   /* fdiv */                      \
-   1,   /* ddiv */                      \
-   1,   /* irem */                      \
-   1,   /* lrem */                      \
-   1,   /* frem */                      \
-   1,   /* drem */                      \
-   1,   /* ineg */                      \
-   1,   /* lneg */                      \
-   1,   /* fneg */                      \
-   1,   /* dneg */                      \
-   1,   /* ishl */                      \
-   1,   /* lshl */                      \
-   1,   /* ishr */                      \
-   1,   /* lshr */                      \
-   1,   /* iushr */                     \
-   1,   /* lushr */                     \
-   1,   /* iand */                      \
-   1,   /* land */                      \
-   1,   /* ior */                       \
-   1,   /* lor */                       \
-   1,   /* ixor */                      \
-   1,   /* lxor */                      \
-   3,   /* iinc */                      \
-   1,   /* i2l */                       \
-   1,   /* i2f */                       \
-   1,   /* i2d */                       \
-   1,   /* l2i */                       \
-   1,   /* l2f */                       \
-   1,   /* l2d */                       \
-   1,   /* f2i */                       \
-   1,   /* f2l */                       \
-   1,   /* f2d */                       \
-   1,   /* d2i */                       \
-   1,   /* d2l */                       \
-   1,   /* d2f */                       \
-   1,   /* i2b */                       \
-   1,   /* i2c */                       \
-   1,   /* i2s */                       \
-   1,   /* lcmp */                      \
-   1,   /* fcmpl */                     \
-   1,   /* fcmpg */                     \
-   1,   /* dcmpl */                     \
-   1,   /* dcmpg */                     \
-   3,   /* ifeq */                      \
-   3,   /* ifne */                      \
-   3,   /* iflt */                      \
-   3,   /* ifge */                      \
-   3,   /* ifgt */                      \
-   3,   /* ifle */                      \
-   3,   /* if_icmpeq */                 \
-   3,   /* if_icmpne */                 \
-   3,   /* if_icmplt */                 \
-   3,   /* if_icmpge */                 \
-   3,   /* if_icmpgt */                 \
-   3,   /* if_icmple */                 \
-   3,   /* if_acmpeq */                 \
-   3,   /* if_acmpne */                 \
-   3,   /* goto */                      \
-   3,   /* jsr */                       \
-   2,   /* ret */                       \
-   99,  /* tableswitch */               \
-   99,  /* lookupswitch */              \
-   1,   /* ireturn */                   \
-   1,   /* lreturn */                   \
-   1,   /* freturn */                   \
-   1,   /* dreturn */                   \
-   1,   /* areturn */                   \
-   1,   /* return */                    \
-   3,   /* getstatic */                 \
-   3,   /* putstatic */                 \
-   3,   /* getfield */                  \
-   3,   /* putfield */                  \
-   3,   /* invokevirtual */             \
-   3,   /* invokespecial */             \
-   3,   /* invokestatic */              \
-   5,   /* invokeinterface */           \
-   0,   /* xxxunusedxxx */              \
-   3,   /* new */                       \
-   2,   /* newarray */                  \
-   3,   /* anewarray */                 \
-   1,   /* arraylength */               \
-   1,   /* athrow */                    \
-   3,   /* checkcast */                 \
-   3,   /* instanceof */                \
-   1,   /* monitorenter */              \
-   1,   /* monitorexit */               \
-   0,   /* wide */                      \
-   4,   /* multianewarray */            \
-   3,   /* ifnull */                    \
-   3,   /* ifnonnull */                 \
-   5,   /* goto_w */                    \
-   5    /* jsr_w */                     \
-}
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif /* __cplusplus */
-
-#endif /* CLASSFILE_CONSTANTS */
diff --git a/make/stub_includes/jni/jawt.h b/make/stub_includes/jni/jawt.h
index f5eea9b..3867d54 100644
--- a/make/stub_includes/jni/jawt.h
+++ b/make/stub_includes/jni/jawt.h
@@ -1,8 +1,27 @@
 /*
  * @(#)jawt.h	1.11 05/11/17
  *
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
- * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+ * This C header file is derived from Sun Microsystem's Java SDK provided C header file
+ * with the following copyright notice:
+ *
+ *   Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ *   SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+ *
+ * This version has complex comments removed and does not contain inlined algorithms etc, if any existed.
+ * 
+ * The original C header file was included to JOGL on Sat Jun 21 02:10:30 2008
+ * (commit cbc45e816f4ee81031bffce19a99550681462a24) by Sun Microsystem's staff and were approved. 
+ *
+ * This C header file is included due to ensure compatibility with - and invocation of the JAWT protocol.
+ * They are processed by GlueGen to create a Java binding for JAWT invocation only.
+ * 
+ * http://ftp.resource.org/courts.gov/c/F3/387/387.F3d.522.03-5400.html (36)
+ * "Atari Games Corp. v. Nintendo of Am., Inc., Nos. 88-4805 & 89-0027, 1993 WL 207548, at *1 (N.D.Cal. May 18, 1993) ("Atari III") 
+ * ("Program code that is strictly necessary to achieve current compatibility presents a merger problem, almost by definition, 
+ * and is thus excluded from the scope of any copyright.")."
+ *
+ * http://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=OJ:L:2009:111:0016:0022:EN:PDF
+ * L 111/17 (10) and (15)
  */
 
 #ifndef _JAVASOFT_JAWT_H_
@@ -16,109 +35,8 @@ extern "C" {
 
 /*
  * AWT native interface (new in JDK 1.3)
- *
- * The AWT native interface allows a native C or C++ application a means
- * by which to access native structures in AWT.  This is to facilitate moving
- * legacy C and C++ applications to Java and to target the needs of the
- * community who, at present, wish to do their own native rendering to canvases
- * for performance reasons.  Standard extensions such as Java3D also require a
- * means to access the underlying native data structures of AWT.
- *
- * There may be future extensions to this API depending on demand.
- *
- * A VM does not have to implement this API in order to pass the JCK.
- * It is recommended, however, that this API is implemented on VMs that support
- * standard extensions, such as Java3D.
- *
- * Since this is a native API, any program which uses it cannot be considered
- * 100% pure java.
  */
 
-/*
- * AWT Native Drawing Surface (JAWT_DrawingSurface).
- *
- * For each platform, there is a native drawing surface structure.  This
- * platform-specific structure can be found in jawt_md.h.  It is recommended
- * that additional platforms follow the same model.  It is also recommended
- * that VMs on Win32 and Solaris support the existing structures in jawt_md.h.
- *
- *******************
- * EXAMPLE OF USAGE:
- *******************
- *
- * In Win32, a programmer wishes to access the HWND of a canvas to perform
- * native rendering into it.  The programmer has declared the paint() method
- * for their canvas subclass to be native:
- *
- *
- * MyCanvas.java:
- *
- * import java.awt.*;
- *
- * public class MyCanvas extends Canvas {
- *
- *     static {
- *         System.loadLibrary("mylib");
- *     }
- *
- *     public native void paint(Graphics g);
- * }
- *
- *
- * myfile.c:
- *
- * #include "jawt_md.h"
- * #include <assert.h>
- *
- * JNIEXPORT void JNICALL
- * Java_MyCanvas_paint(JNIEnv* env, jobject canvas, jobject graphics)
- * {
- *     JAWT awt;
- *     JAWT_DrawingSurface* ds;
- *     JAWT_DrawingSurfaceInfo* dsi;
- *     JAWT_Win32DrawingSurfaceInfo* dsi_win;
- *     jboolean result;
- *     jint lock;
- *
- *     // Get the AWT
- *     awt.version = JAWT_VERSION_1_3;
- *     result = JAWT_GetAWT(env, &awt);
- *     assert(result != JNI_FALSE);
- *
- *     // Get the drawing surface
- *     ds = awt.GetDrawingSurface(env, canvas);
- *     assert(ds != NULL);
- *
- *     // Lock the drawing surface
- *     lock = ds->Lock(ds);
- *     assert((lock & JAWT_LOCK_ERROR) == 0);
- *
- *     // Get the drawing surface info
- *     dsi = ds->GetDrawingSurfaceInfo(ds);
- *
- *     // Get the platform-specific drawing info
- *     dsi_win = (JAWT_Win32DrawingSurfaceInfo*)dsi->platformInfo;
- *
- *     //////////////////////////////
- *     // !!! DO PAINTING HERE !!! //
- *     //////////////////////////////
- *
- *     // Free the drawing surface info
- *     ds->FreeDrawingSurfaceInfo(dsi);
- *
- *     // Unlock the drawing surface
- *     ds->Unlock(ds);
- *
- *     // Free the drawing surface
- *     awt.FreeDrawingSurface(ds);
- * }
- *
- */
-
-/*
- * JAWT_Rectangle
- * Structure for a native rectangle.
- */
 typedef struct jawt_Rectangle {
     jint x;
     jint y;
@@ -128,24 +46,11 @@ typedef struct jawt_Rectangle {
 
 struct jawt_DrawingSurface;
 
-/*
- * JAWT_DrawingSurfaceInfo
- * Structure for containing the underlying drawing information of a component.
- */
 typedef struct jawt_DrawingSurfaceInfo {
-    /*
-     * Pointer to the platform-specific information.  This can be safely
-     * cast to a JAWT_Win32DrawingSurfaceInfo on Windows or a
-     * JAWT_X11DrawingSurfaceInfo on Solaris.  See jawt_md.h for details.
-     */
     void* platformInfo;
-    /* Cached pointer to the underlying drawing surface */
     struct jawt_DrawingSurface* ds;
-    /* Bounding rectangle of the drawing surface */
     JAWT_Rectangle bounds;
-    /* Number of rectangles in the clip */
     jint clipSize;
-    /* Clip rectangle array */
     JAWT_Rectangle* clip;
 } JAWT_DrawingSurfaceInfo;
 
@@ -154,117 +59,40 @@ typedef struct jawt_DrawingSurfaceInfo {
 #define JAWT_LOCK_BOUNDS_CHANGED        0x00000004
 #define JAWT_LOCK_SURFACE_CHANGED       0x00000008
 
-/*
- * JAWT_DrawingSurface
- * Structure for containing the underlying drawing information of a component.
- * All operations on a JAWT_DrawingSurface MUST be performed from the same
- * thread as the call to GetDrawingSurface.
- */
 typedef struct jawt_DrawingSurface {
-    /*
-     * Cached reference to the Java environment of the calling thread.
-     * If Lock(), Unlock(), GetDrawingSurfaceInfo() or
-     * FreeDrawingSurfaceInfo() are called from a different thread,
-     * this data member should be set before calling those functions.
-     */
     JNIEnv* env;
-    /* Cached reference to the target object */
     jobject target;
-    /*
-     * Lock the surface of the target component for native rendering.
-     * When finished drawing, the surface must be unlocked with
-     * Unlock().  This function returns a bitmask with one or more of the
-     * following values:
-     *
-     * JAWT_LOCK_ERROR - When an error has occurred and the surface could not
-     * be locked.
-     *
-     * JAWT_LOCK_CLIP_CHANGED - When the clip region has changed.
-     *
-     * JAWT_LOCK_BOUNDS_CHANGED - When the bounds of the surface have changed.
-     *
-     * JAWT_LOCK_SURFACE_CHANGED - When the surface itself has changed
-     */
     jint (JNICALL *Lock)
         (struct jawt_DrawingSurface* ds);
-    /*
-     * Get the drawing surface info.
-     * The value returned may be cached, but the values may change if
-     * additional calls to Lock() or Unlock() are made.
-     * Lock() must be called before this can return a valid value.
-     * Returns NULL if an error has occurred.
-     * When finished with the returned value, FreeDrawingSurfaceInfo must be
-     * called.
-     */
     JAWT_DrawingSurfaceInfo* (JNICALL *GetDrawingSurfaceInfo)
         (struct jawt_DrawingSurface* ds);
-    /*
-     * Free the drawing surface info.
-     */
     void (JNICALL *FreeDrawingSurfaceInfo)
         (JAWT_DrawingSurfaceInfo* dsi);
-    /* 
-     * Unlock the drawing surface of the target component for native rendering.
-     */
     void (JNICALL *Unlock)
         (struct jawt_DrawingSurface* ds);
 } JAWT_DrawingSurface;
 
-/*
- * JAWT
- * Structure for containing native AWT functions.
- */
 typedef struct jawt {
-    /*
-     * Version of this structure.  This must always be set before
-     * calling JAWT_GetAWT()
-     */
     jint version;
-    /*
-     * Return a drawing surface from a target jobject.  This value
-     * may be cached.
-     * Returns NULL if an error has occurred.
-     * Target must be a java.awt.Component (should be a Canvas
-     * or Window for native rendering).
-     * FreeDrawingSurface() must be called when finished with the
-     * returned JAWT_DrawingSurface.
-     */
     JAWT_DrawingSurface* (JNICALL *GetDrawingSurface)
         (JNIEnv* env, jobject target);
-    /*
-     * Free the drawing surface allocated in GetDrawingSurface.
-     */
     void (JNICALL *FreeDrawingSurface)
         (JAWT_DrawingSurface* ds);
     /*
      * Since 1.4
-     * Locks the entire AWT for synchronization purposes
      */
     void (JNICALL *Lock)(JNIEnv* env);
     /*
      * Since 1.4
-     * Unlocks the entire AWT for synchronization purposes
      */
     void (JNICALL *Unlock)(JNIEnv* env);
     /*
      * Since 1.4
-     * Returns a reference to a java.awt.Component from a native
-     * platform handle.  On Windows, this corresponds to an HWND;
-     * on Solaris and Linux, this is a Drawable.  For other platforms,
-     * see the appropriate machine-dependent header file for a description.
-     * The reference returned by this function is a local
-     * reference that is only valid in this environment.
-     * This function returns a NULL reference if no component could be
-     * found with matching platform information.
      */
     jobject (JNICALL *GetComponent)(JNIEnv* env, void* platformInfo);
 
 } JAWT;
 
-/*
- * Get the AWT native structure.  This function returns JNI_FALSE if
- * an error occurs.
- */
 _JNI_IMPORT_OR_EXPORT_
 jboolean JNICALL JAWT_GetAWT(JNIEnv* env, JAWT* awt);
 
diff --git a/make/stub_includes/jni/jdwpTransport.h b/make/stub_includes/jni/jdwpTransport.h
deleted file mode 100644
index fc46ca4..0000000
--- a/make/stub_includes/jni/jdwpTransport.h
+++ /dev/null
@@ -1,237 +0,0 @@
-/*
- * @(#)jdwpTransport.h	1.8 05/11/17
- *
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
- * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
- */
-
-/*
- * Java Debug Wire Protocol Transport Service Provider Interface.
- */
-
-#ifndef JDWPTRANSPORT_H
-#define JDWPTRANSPORT_H
-
-#include "jni.h"
-
-enum {
-    JDWPTRANSPORT_VERSION_1_0 = 0x00010000
-};
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct jdwpTransportNativeInterface_;
-
-struct _jdwpTransportEnv;
-
-#ifdef __cplusplus
-typedef _jdwpTransportEnv jdwpTransportEnv;
-#else
-typedef const struct jdwpTransportNativeInterface_ *jdwpTransportEnv;
-#endif /* __cplusplus */
-
-/*
- * Errors. Universal errors with JVMTI/JVMDI equivalents keep the
- * values the same.
- */
-typedef enum {
-    JDWPTRANSPORT_ERROR_NONE = 0,
-    JDWPTRANSPORT_ERROR_ILLEGAL_ARGUMENT = 103,
-    JDWPTRANSPORT_ERROR_OUT_OF_MEMORY = 110,
-    JDWPTRANSPORT_ERROR_INTERNAL = 113,
-    JDWPTRANSPORT_ERROR_ILLEGAL_STATE = 201,
-    JDWPTRANSPORT_ERROR_IO_ERROR = 202,
-    JDWPTRANSPORT_ERROR_TIMEOUT = 203,
-    JDWPTRANSPORT_ERROR_MSG_NOT_AVAILABLE = 204
-} jdwpTransportError;
-    
-
-/*
- * Structure to define capabilities
- */
-typedef struct {
-    unsigned int can_timeout_attach     :1;
-    unsigned int can_timeout_accept     :1;
-    unsigned int can_timeout_handshake  :1;
-    unsigned int reserved3              :1;
-    unsigned int reserved4              :1;
-    unsigned int reserved5              :1;
-    unsigned int reserved6              :1;
-    unsigned int reserved7              :1;
-    unsigned int reserved8              :1;
-    unsigned int reserved9              :1;
-    unsigned int reserved10             :1;
-    unsigned int reserved11             :1;
-    unsigned int reserved12             :1;
-    unsigned int reserved13             :1;
-    unsigned int reserved14		:1;
-    unsigned int reserved15		:1;
-} JDWPTransportCapabilities;
-
-
-/*
- * Structures to define packet layout.
- * 
- * See: http://java.sun.com/j2se/1.5/docs/guide/jpda/jdwp-spec.html
- */
-
-enum {
-    JDWPTRANSPORT_FLAGS_NONE	 = 0x0,
-    JDWPTRANSPORT_FLAGS_REPLY	 = 0x80
-};
-
-typedef struct {
-    jint len; 
-    jint id;
-    jbyte flags;
-    jbyte cmdSet;
-    jbyte cmd;
-    jbyte *data;
-} jdwpCmdPacket;
-
-typedef struct {
-    jint len;
-    jint id;
-    jbyte flags;
-    jshort errorCode;
-    jbyte *data;
-} jdwpReplyPacket;
-
-typedef struct {
-    union {
-        jdwpCmdPacket cmd;
-        jdwpReplyPacket reply;
-    } type;
-} jdwpPacket;
-
-/*
- * JDWP functions called by the transport.
- */
-typedef struct jdwpTransportCallback {
-    void *(*alloc)(jint numBytes);   /* Call this for all allocations */
-    void (*free)(void *buffer);      /* Call this for all deallocations */
-} jdwpTransportCallback;
-
-typedef jint (JNICALL *jdwpTransport_OnLoad_t)(JavaVM *jvm,
-					       jdwpTransportCallback *callback,
-					       jint version,
-                                      	       jdwpTransportEnv** env);
-
-
-
-/* Function Interface */
-
-struct jdwpTransportNativeInterface_ {
-    /*  1 :  RESERVED */
-    void *reserved1;
-
-    /*	2 : Get Capabilities */
-    jdwpTransportError (JNICALL *GetCapabilities)(jdwpTransportEnv* env,
-	 JDWPTransportCapabilities *capabilities_ptr);
-
-    /*  3 : Attach */
-    jdwpTransportError (JNICALL *Attach)(jdwpTransportEnv* env,
-	const char* address,
-	jlong attach_timeout,
-	jlong handshake_timeout);
-
-    /*  4: StartListening */
-    jdwpTransportError (JNICALL *StartListening)(jdwpTransportEnv* env,
-	const char* address, 
-	char** actual_address);
-
-    /*  5: StopListening */
-    jdwpTransportError (JNICALL *StopListening)(jdwpTransportEnv* env);
-
-    /*  6: Accept */
-    jdwpTransportError (JNICALL *Accept)(jdwpTransportEnv* env,
-	jlong accept_timeout, 
-	jlong handshake_timeout);
-
-    /*  7: IsOpen */
-    jboolean (JNICALL *IsOpen)(jdwpTransportEnv* env);
-
-    /*  8: Close */
-    jdwpTransportError (JNICALL *Close)(jdwpTransportEnv* env);
-
-    /*  9: ReadPacket */
-    jdwpTransportError (JNICALL *ReadPacket)(jdwpTransportEnv* env,
-	jdwpPacket *pkt);
-
-    /*  10: Write Packet */
-    jdwpTransportError (JNICALL *WritePacket)(jdwpTransportEnv* env,
-	const jdwpPacket* pkt);
-
-    /*  11:  GetLastError */
-    jdwpTransportError (JNICALL *GetLastError)(jdwpTransportEnv* env,
-	char** error);
-
-};
-
-
-/*
- * Use inlined functions so that C++ code can use syntax such as
- *	env->Attach("mymachine:5000", 10*1000, 0);
- *
- * rather than using C's :-
- *
- *	(*env)->Attach(env, "mymachine:5000", 10*1000, 0);
- */
-struct _jdwpTransportEnv {
-    const struct jdwpTransportNativeInterface_ *functions;
-#ifdef __cplusplus
-
-    jdwpTransportError GetCapabilities(JDWPTransportCapabilities *capabilities_ptr) {
-	return functions->GetCapabilities(this, capabilities_ptr);
-    }
-
-    jdwpTransportError Attach(const char* address, jlong attach_timeout,
-        	jlong handshake_timeout) {
-	return functions->Attach(this, address, attach_timeout, handshake_timeout);
-    }
-
-    jdwpTransportError StartListening(const char* address,
-        	char** actual_address) {
-	return functions->StartListening(this, address, actual_address);
-    }
-
-    jdwpTransportError StopListening(void) {
-	return functions->StopListening(this);
-    }
-
-    jdwpTransportError Accept(jlong accept_timeout, jlong handshake_timeout) {
-	return functions->Accept(this, accept_timeout, handshake_timeout);
-    }
-
-    jboolean IsOpen(void) {
-        return functions->IsOpen(this);
-    }
-
-    jdwpTransportError Close(void) {
-        return functions->Close(this);
-    }
-
-    jdwpTransportError ReadPacket(jdwpPacket *pkt) {
-	return functions->ReadPacket(this, pkt);
-    }
-
-    jdwpTransportError WritePacket(const jdwpPacket* pkt) {
-	return functions->WritePacket(this, pkt);
-    }
-
-    jdwpTransportError GetLastError(char** error) {
-	return functions->GetLastError(this, error);
-    }
-
-
-#endif /* __cplusplus */
-};
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif /* __cplusplus */
-
-#endif /* JDWPTRANSPORT_H */
-
diff --git a/make/stub_includes/jni/jni.h b/make/stub_includes/jni/jni.h
index f53476c..f3aea72 100644
--- a/make/stub_includes/jni/jni.h
+++ b/make/stub_includes/jni/jni.h
@@ -1,8 +1,27 @@
 /*
  * @(#)jni.h	1.62 06/02/02
  *
- * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
- * SUN PROPRIETARY/CONFIDENTIAL.  Use is subject to license terms.
+ * This C header file is derived from Sun Microsystem's Java SDK provided C header file
+ * with the following copyright notice:
+ *
+ *   Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ *   SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+ *
+ * This version has complex comments removed and does not contain inlined algorithms etc, if any existed.
+ * 
+ * The original C header file was included to JOGL on Sat Jun 21 02:10:30 2008
+ * (commit cbc45e816f4ee81031bffce19a99550681462a24) by Sun Microsystem's staff and were approved. 
+ *
+ * This C header file is included due to ensure compatibility with - and invocation of the JAWT protocol.
+ * They are processed by GlueGen to create a Java binding for JAWT invocation only.
+ * 
+ * http://ftp.resource.org/courts.gov/c/F3/387/387.F3d.522.03-5400.html (36)
+ * "Atari Games Corp. v. Nintendo of Am., Inc., Nos. 88-4805 & 89-0027, 1993 WL 207548, at *1 (N.D.Cal. May 18, 1993) ("Atari III") 
+ * ("Program code that is strictly necessary to achieve current compatibility presents a merger problem, almost by definition, 
+ * and is thus excluded from the scope of any copyright.")."
+ *
+ * http://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=OJ:L:2009:111:0016:0022:EN:PDF
+ * L 111/17 (10) and (15)
  */
 
 /*
@@ -21,19 +40,12 @@
 #include <stdio.h>
 #include <stdarg.h>
 
-/* jni_md.h contains the machine-dependent typedefs for jbyte, jint
-   and jlong */
-
 #include "jni_md.h"
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-/*
- * JNI Types
- */
-
 #ifndef JNI_TYPES_ALREADY_DEFINED_IN_JNI_MD_H
 
 typedef unsigned char	jboolean;
@@ -117,7 +129,6 @@ typedef struct _jfieldID *jfieldID;
 struct _jmethodID;
 typedef struct _jmethodID *jmethodID;
 
-/* Return values from jobjectRefType */
 typedef enum _jobjectType {
      JNIInvalidRefType    = 0,
      JNILocalRefType      = 1,
@@ -128,17 +139,9 @@ typedef enum _jobjectType {
 
 #endif /* JNI_TYPES_ALREADY_DEFINED_IN_JNI_MD_H */
 
-/*
- * jboolean constants
- */
-
 #define JNI_FALSE 0
 #define JNI_TRUE 1
 
-/*
- * possible return values for JNI functions.
- */
-
 #define JNI_OK           0                 /* success */
 #define JNI_ERR          (-1)              /* unknown error */
 #define JNI_EDETACHED    (-2)              /* thread detached from the VM */
@@ -147,28 +150,15 @@ typedef enum _jobjectType {
 #define JNI_EEXIST       (-5)              /* VM already created */
 #define JNI_EINVAL       (-6)              /* invalid arguments */
 
-/*
- * used in ReleaseScalarArrayElements
- */
-
 #define JNI_COMMIT 1
 #define JNI_ABORT 2
 
-/*
- * used in RegisterNatives to describe native method name, signature,
- * and function pointer.
- */
-
 typedef struct {
     char *name;
     char *signature;
     void *fnPtr;
 } JNINativeMethod;
 
-/*
- * JNI Native Method Interface.
- */
-
 struct JNINativeInterface_;
 
 struct JNIEnv_;
@@ -179,10 +169,6 @@ typedef JNIEnv_ JNIEnv;
 typedef const struct JNINativeInterface_ *JNIEnv;
 #endif
 
-/*
- * JNI Invocation Interface.
- */
-
 struct JNIInvokeInterface_;
 
 struct JavaVM_;
@@ -749,18 +735,6 @@ struct JNINativeInterface_ {
         (JNIEnv* env, jobject obj);
 };
 
-/*
- * We use inlined functions for C++ so that programmers can write:
- *
- *    env->FindClass("java/lang/String")
- *
- * in C++ rather than:
- *
- *    (*env)->FindClass(env, "java/lang/String")
- *
- * in C.
- */
-
 struct JNIEnv_ {
     const struct JNINativeInterface_ *functions;
 #ifdef __cplusplus
@@ -1862,13 +1836,9 @@ typedef struct JavaVMAttachArgs {
     jobject group;
 } JavaVMAttachArgs;
 
-/* These will be VM-specific. */
-
 #define JDK1_2
 #define JDK1_4
 
-/* End VM-specific. */
-
 struct JNIInvokeInterface_ {
     void *reserved0;
     void *reserved1;
@@ -1922,7 +1892,6 @@ JNI_CreateJavaVM(JavaVM **pvm, void **penv, void *args);
 _JNI_IMPORT_OR_EXPORT_ jint JNICALL
 JNI_GetCreatedJavaVMs(JavaVM **, jsize, jsize *);
 
-/* Defined by native libraries. */
 JNIEXPORT jint JNICALL
 JNI_OnLoad(JavaVM *vm, void *reserved);
 
@@ -1940,5 +1909,3 @@ JNI_OnUnload(JavaVM *vm, void *reserved);
 
 #endif /* !_JAVASOFT_JNI_H_ */
 
-
-
diff --git a/make/stub_includes/jni/jvmti.h b/make/stub_includes/jni/jvmti.h
deleted file mode 100644
index 4cb89df..0000000
--- a/make/stub_includes/jni/jvmti.h
+++ /dev/null
@@ -1,2504 +0,0 @@
-#ifdef USE_PRAGMA_IDENT_HDR
-#pragma ident "@(#)jvmtiLib.xsl	1.38 06/08/02 23:22:31 JVM"
-#endif
-/*
- * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
- * SUN PROPRIETARY/CONFIDENTIAL.  Use is subject to license terms.
- */
-
-    /* AUTOMATICALLY GENERATED FILE - DO NOT EDIT */
-
-
-    /* Include file for the Java(tm) Virtual Machine Tool Interface */
-
-#ifndef _JAVA_JVMTI_H_
-#define _JAVA_JVMTI_H_
-
-#include "jni.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-enum {
-    JVMTI_VERSION_1   = 0x30010000,
-    JVMTI_VERSION_1_0 = 0x30010000,
-    JVMTI_VERSION_1_1 = 0x30010100,
-
-    JVMTI_VERSION = 0x30000000 + (1 * 0x10000) + (1 * 0x100) + 102  /* version: 1.1.102 */
-};
-
-JNIEXPORT jint JNICALL 
-Agent_OnLoad(JavaVM *vm, char *options, void *reserved);
-
-JNIEXPORT jint JNICALL
-Agent_OnAttach(JavaVM* vm, char* options, void* reserved);
-
-JNIEXPORT void JNICALL 
-Agent_OnUnload(JavaVM *vm);
-
-    /* Forward declaration of the environment */
-        
-struct _jvmtiEnv;
-
-struct jvmtiInterface_1_;
-  
-#ifdef __cplusplus
-typedef _jvmtiEnv jvmtiEnv;
-#else
-typedef const struct jvmtiInterface_1_ *jvmtiEnv;
-#endif /* __cplusplus */
-
-/* Derived Base Types */
-
-typedef jobject jthread;
-typedef jobject jthreadGroup;
-typedef jlong jlocation;
-struct _jrawMonitorID;
-typedef struct _jrawMonitorID *jrawMonitorID;
-typedef struct JNINativeInterface_ jniNativeInterface;
-
-    /* Constants */
-
-
-    /* Thread State Flags */ 
-
-enum {
-    JVMTI_THREAD_STATE_ALIVE = 0x0001,
-    JVMTI_THREAD_STATE_TERMINATED = 0x0002,
-    JVMTI_THREAD_STATE_RUNNABLE = 0x0004,
-    JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER = 0x0400,
-    JVMTI_THREAD_STATE_WAITING = 0x0080,
-    JVMTI_THREAD_STATE_WAITING_INDEFINITELY = 0x0010,
-    JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT = 0x0020,
-    JVMTI_THREAD_STATE_SLEEPING = 0x0040,
-    JVMTI_THREAD_STATE_IN_OBJECT_WAIT = 0x0100,
-    JVMTI_THREAD_STATE_PARKED = 0x0200,
-    JVMTI_THREAD_STATE_SUSPENDED = 0x100000,
-    JVMTI_THREAD_STATE_INTERRUPTED = 0x200000,
-    JVMTI_THREAD_STATE_IN_NATIVE = 0x400000,
-    JVMTI_THREAD_STATE_VENDOR_1 = 0x10000000,
-    JVMTI_THREAD_STATE_VENDOR_2 = 0x20000000,
-    JVMTI_THREAD_STATE_VENDOR_3 = 0x40000000
-};
-
-    /* java.lang.Thread.State Conversion Masks */ 
-
-enum {
-    JVMTI_JAVA_LANG_THREAD_STATE_MASK = JVMTI_THREAD_STATE_TERMINATED | JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_RUNNABLE | JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER | JVMTI_THREAD_STATE_WAITING | JVMTI_THREAD_STATE_WAITING_INDEFINITELY | JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT,
-    JVMTI_JAVA_LANG_THREAD_STATE_NEW = 0,
-    JVMTI_JAVA_LANG_THREAD_STATE_TERMINATED = JVMTI_THREAD_STATE_TERMINATED,
-    JVMTI_JAVA_LANG_THREAD_STATE_RUNNABLE = JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_RUNNABLE,
-    JVMTI_JAVA_LANG_THREAD_STATE_BLOCKED = JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER,
-    JVMTI_JAVA_LANG_THREAD_STATE_WAITING = JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_WAITING | JVMTI_THREAD_STATE_WAITING_INDEFINITELY,
-    JVMTI_JAVA_LANG_THREAD_STATE_TIMED_WAITING = JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_WAITING | JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT
-};
-
-    /* Thread Priority Constants */ 
-
-enum {
-    JVMTI_THREAD_MIN_PRIORITY = 1,
-    JVMTI_THREAD_NORM_PRIORITY = 5,
-    JVMTI_THREAD_MAX_PRIORITY = 10
-};
-
-    /* Heap Filter Flags */ 
-
-enum {
-    JVMTI_HEAP_FILTER_TAGGED = 0x4,
-    JVMTI_HEAP_FILTER_UNTAGGED = 0x8,
-    JVMTI_HEAP_FILTER_CLASS_TAGGED = 0x10,
-    JVMTI_HEAP_FILTER_CLASS_UNTAGGED = 0x20
-};
-
-    /* Heap Visit Control Flags */ 
-
-enum {
-    JVMTI_VISIT_OBJECTS = 0x100,
-    JVMTI_VISIT_ABORT = 0x8000
-};
-
-    /* Heap Reference Enumeration */ 
-
-typedef enum {
-    JVMTI_HEAP_REFERENCE_CLASS = 1,
-    JVMTI_HEAP_REFERENCE_FIELD = 2,
-    JVMTI_HEAP_REFERENCE_ARRAY_ELEMENT = 3,
-    JVMTI_HEAP_REFERENCE_CLASS_LOADER = 4,
-    JVMTI_HEAP_REFERENCE_SIGNERS = 5,
-    JVMTI_HEAP_REFERENCE_PROTECTION_DOMAIN = 6,
-    JVMTI_HEAP_REFERENCE_INTERFACE = 7,
-    JVMTI_HEAP_REFERENCE_STATIC_FIELD = 8,
-    JVMTI_HEAP_REFERENCE_CONSTANT_POOL = 9,
-    JVMTI_HEAP_REFERENCE_SUPERCLASS = 10,
-    JVMTI_HEAP_REFERENCE_JNI_GLOBAL = 21,
-    JVMTI_HEAP_REFERENCE_SYSTEM_CLASS = 22,
-    JVMTI_HEAP_REFERENCE_MONITOR = 23,
-    JVMTI_HEAP_REFERENCE_STACK_LOCAL = 24,
-    JVMTI_HEAP_REFERENCE_JNI_LOCAL = 25,
-    JVMTI_HEAP_REFERENCE_THREAD = 26,
-    JVMTI_HEAP_REFERENCE_OTHER = 27
-} jvmtiHeapReferenceKind;
-
-    /* Primitive Type Enumeration */ 
-
-typedef enum {
-    JVMTI_PRIMITIVE_TYPE_BOOLEAN = 90,
-    JVMTI_PRIMITIVE_TYPE_BYTE = 66,
-    JVMTI_PRIMITIVE_TYPE_CHAR = 67,
-    JVMTI_PRIMITIVE_TYPE_SHORT = 83,
-    JVMTI_PRIMITIVE_TYPE_INT = 73,
-    JVMTI_PRIMITIVE_TYPE_LONG = 74,
-    JVMTI_PRIMITIVE_TYPE_FLOAT = 70,
-    JVMTI_PRIMITIVE_TYPE_DOUBLE = 68
-} jvmtiPrimitiveType;
-
-    /* Heap Object Filter Enumeration */ 
-
-typedef enum {
-    JVMTI_HEAP_OBJECT_TAGGED = 1,
-    JVMTI_HEAP_OBJECT_UNTAGGED = 2,
-    JVMTI_HEAP_OBJECT_EITHER = 3
-} jvmtiHeapObjectFilter;
-
-    /* Heap Root Kind Enumeration */ 
-
-typedef enum {
-    JVMTI_HEAP_ROOT_JNI_GLOBAL = 1,
-    JVMTI_HEAP_ROOT_SYSTEM_CLASS = 2,
-    JVMTI_HEAP_ROOT_MONITOR = 3,
-    JVMTI_HEAP_ROOT_STACK_LOCAL = 4,
-    JVMTI_HEAP_ROOT_JNI_LOCAL = 5,
-    JVMTI_HEAP_ROOT_THREAD = 6,
-    JVMTI_HEAP_ROOT_OTHER = 7
-} jvmtiHeapRootKind;
-
-    /* Object Reference Enumeration */ 
-
-typedef enum {
-    JVMTI_REFERENCE_CLASS = 1,
-    JVMTI_REFERENCE_FIELD = 2,
-    JVMTI_REFERENCE_ARRAY_ELEMENT = 3,
-    JVMTI_REFERENCE_CLASS_LOADER = 4,
-    JVMTI_REFERENCE_SIGNERS = 5,
-    JVMTI_REFERENCE_PROTECTION_DOMAIN = 6,
-    JVMTI_REFERENCE_INTERFACE = 7,
-    JVMTI_REFERENCE_STATIC_FIELD = 8,
-    JVMTI_REFERENCE_CONSTANT_POOL = 9
-} jvmtiObjectReferenceKind;
-
-    /* Iteration Control Enumeration */ 
-
-typedef enum {
-    JVMTI_ITERATION_CONTINUE = 1,
-    JVMTI_ITERATION_IGNORE = 2,
-    JVMTI_ITERATION_ABORT = 0
-} jvmtiIterationControl;
-
-    /* Class Status Flags */ 
-
-enum {
-    JVMTI_CLASS_STATUS_VERIFIED = 1,
-    JVMTI_CLASS_STATUS_PREPARED = 2,
-    JVMTI_CLASS_STATUS_INITIALIZED = 4,
-    JVMTI_CLASS_STATUS_ERROR = 8,
-    JVMTI_CLASS_STATUS_ARRAY = 16,
-    JVMTI_CLASS_STATUS_PRIMITIVE = 32
-};
-
-    /* Event Enable/Disable */ 
-
-typedef enum {
-    JVMTI_ENABLE = 1,
-    JVMTI_DISABLE = 0
-} jvmtiEventMode;
-
-    /* Extension Function/Event Parameter Types */ 
-
-typedef enum {
-    JVMTI_TYPE_JBYTE = 101,
-    JVMTI_TYPE_JCHAR = 102,
-    JVMTI_TYPE_JSHORT = 103,
-    JVMTI_TYPE_JINT = 104,
-    JVMTI_TYPE_JLONG = 105,
-    JVMTI_TYPE_JFLOAT = 106,
-    JVMTI_TYPE_JDOUBLE = 107,
-    JVMTI_TYPE_JBOOLEAN = 108,
-    JVMTI_TYPE_JOBJECT = 109,
-    JVMTI_TYPE_JTHREAD = 110,
-    JVMTI_TYPE_JCLASS = 111,
-    JVMTI_TYPE_JVALUE = 112,
-    JVMTI_TYPE_JFIELDID = 113,
-    JVMTI_TYPE_JMETHODID = 114,
-    JVMTI_TYPE_CCHAR = 115,
-    JVMTI_TYPE_CVOID = 116,
-    JVMTI_TYPE_JNIENV = 117
-} jvmtiParamTypes;
-
-    /* Extension Function/Event Parameter Kinds */ 
-
-typedef enum {
-    JVMTI_KIND_IN = 91,
-    JVMTI_KIND_IN_PTR = 92,
-    JVMTI_KIND_IN_BUF = 93,
-    JVMTI_KIND_ALLOC_BUF = 94,
-    JVMTI_KIND_ALLOC_ALLOC_BUF = 95,
-    JVMTI_KIND_OUT = 96,
-    JVMTI_KIND_OUT_BUF = 97
-} jvmtiParamKind;
-
-    /* Timer Kinds */ 
-
-typedef enum {
-    JVMTI_TIMER_USER_CPU = 30,
-    JVMTI_TIMER_TOTAL_CPU = 31,
-    JVMTI_TIMER_ELAPSED = 32
-} jvmtiTimerKind;
-
-    /* Phases of execution */ 
-
-typedef enum {
-    JVMTI_PHASE_ONLOAD = 1,
-    JVMTI_PHASE_PRIMORDIAL = 2,
-    JVMTI_PHASE_START = 6,
-    JVMTI_PHASE_LIVE = 4,
-    JVMTI_PHASE_DEAD = 8
-} jvmtiPhase;
-
-    /* Version Interface Types */ 
-
-enum {
-    JVMTI_VERSION_INTERFACE_JNI = 0x00000000,
-    JVMTI_VERSION_INTERFACE_JVMTI = 0x30000000
-};
-
-    /* Version Masks */ 
-
-enum {
-    JVMTI_VERSION_MASK_INTERFACE_TYPE = 0x70000000,
-    JVMTI_VERSION_MASK_MAJOR = 0x0FFF0000,
-    JVMTI_VERSION_MASK_MINOR = 0x0000FF00,
-    JVMTI_VERSION_MASK_MICRO = 0x000000FF
-};
-
-    /* Version Shifts */ 
-
-enum {
-    JVMTI_VERSION_SHIFT_MAJOR = 16,
-    JVMTI_VERSION_SHIFT_MINOR = 8,
-    JVMTI_VERSION_SHIFT_MICRO = 0
-};
-
-    /* Verbose Flag Enumeration */ 
-
-typedef enum {
-    JVMTI_VERBOSE_OTHER = 0,
-    JVMTI_VERBOSE_GC = 1,
-    JVMTI_VERBOSE_CLASS = 2,
-    JVMTI_VERBOSE_JNI = 4
-} jvmtiVerboseFlag;
-
-    /* JLocation Format Enumeration */ 
-
-typedef enum {
-    JVMTI_JLOCATION_JVMBCI = 1,
-    JVMTI_JLOCATION_MACHINEPC = 2,
-    JVMTI_JLOCATION_OTHER = 0
-} jvmtiJlocationFormat;
-
-    /* Resource Exhaustion Flags */ 
-
-enum {
-    JVMTI_RESOURCE_EXHAUSTED_OOM_ERROR = 0x0001,
-    JVMTI_RESOURCE_EXHAUSTED_JAVA_HEAP = 0x0002,
-    JVMTI_RESOURCE_EXHAUSTED_THREADS = 0x0004
-};
-
-    /* Errors */
-
-typedef enum {
-    JVMTI_ERROR_NONE = 0,
-    JVMTI_ERROR_INVALID_THREAD = 10,
-    JVMTI_ERROR_INVALID_THREAD_GROUP = 11,
-    JVMTI_ERROR_INVALID_PRIORITY = 12,
-    JVMTI_ERROR_THREAD_NOT_SUSPENDED = 13,
-    JVMTI_ERROR_THREAD_SUSPENDED = 14,
-    JVMTI_ERROR_THREAD_NOT_ALIVE = 15,
-    JVMTI_ERROR_INVALID_OBJECT = 20,
-    JVMTI_ERROR_INVALID_CLASS = 21,
-    JVMTI_ERROR_CLASS_NOT_PREPARED = 22,
-    JVMTI_ERROR_INVALID_METHODID = 23,
-    JVMTI_ERROR_INVALID_LOCATION = 24,
-    JVMTI_ERROR_INVALID_FIELDID = 25,
-    JVMTI_ERROR_NO_MORE_FRAMES = 31,
-    JVMTI_ERROR_OPAQUE_FRAME = 32,
-    JVMTI_ERROR_TYPE_MISMATCH = 34,
-    JVMTI_ERROR_INVALID_SLOT = 35,
-    JVMTI_ERROR_DUPLICATE = 40,
-    JVMTI_ERROR_NOT_FOUND = 41,
-    JVMTI_ERROR_INVALID_MONITOR = 50,
-    JVMTI_ERROR_NOT_MONITOR_OWNER = 51,
-    JVMTI_ERROR_INTERRUPT = 52,
-    JVMTI_ERROR_INVALID_CLASS_FORMAT = 60,
-    JVMTI_ERROR_CIRCULAR_CLASS_DEFINITION = 61,
-    JVMTI_ERROR_FAILS_VERIFICATION = 62,
-    JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_ADDED = 63,
-    JVMTI_ERROR_UNSUPPORTED_REDEFINITION_SCHEMA_CHANGED = 64,
-    JVMTI_ERROR_INVALID_TYPESTATE = 65,
-    JVMTI_ERROR_UNSUPPORTED_REDEFINITION_HIERARCHY_CHANGED = 66,
-    JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_DELETED = 67,
-    JVMTI_ERROR_UNSUPPORTED_VERSION = 68,
-    JVMTI_ERROR_NAMES_DONT_MATCH = 69,
-    JVMTI_ERROR_UNSUPPORTED_REDEFINITION_CLASS_MODIFIERS_CHANGED = 70,
-    JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_MODIFIERS_CHANGED = 71,
-    JVMTI_ERROR_UNMODIFIABLE_CLASS = 79,
-    JVMTI_ERROR_NOT_AVAILABLE = 98,
-    JVMTI_ERROR_MUST_POSSESS_CAPABILITY = 99,
-    JVMTI_ERROR_NULL_POINTER = 100,
-    JVMTI_ERROR_ABSENT_INFORMATION = 101,
-    JVMTI_ERROR_INVALID_EVENT_TYPE = 102,
-    JVMTI_ERROR_ILLEGAL_ARGUMENT = 103,
-    JVMTI_ERROR_NATIVE_METHOD = 104,
-    JVMTI_ERROR_CLASS_LOADER_UNSUPPORTED = 106,
-    JVMTI_ERROR_OUT_OF_MEMORY = 110,
-    JVMTI_ERROR_ACCESS_DENIED = 111,
-    JVMTI_ERROR_WRONG_PHASE = 112,
-    JVMTI_ERROR_INTERNAL = 113,
-    JVMTI_ERROR_UNATTACHED_THREAD = 115,
-    JVMTI_ERROR_INVALID_ENVIRONMENT = 116,
-    JVMTI_ERROR_MAX = 116
-} jvmtiError;
-
-    /* Event IDs */
-
-typedef enum {
-    JVMTI_MIN_EVENT_TYPE_VAL = 50,
-    JVMTI_EVENT_VM_INIT = 50,
-    JVMTI_EVENT_VM_DEATH = 51,
-    JVMTI_EVENT_THREAD_START = 52,
-    JVMTI_EVENT_THREAD_END = 53,
-    JVMTI_EVENT_CLASS_FILE_LOAD_HOOK = 54,
-    JVMTI_EVENT_CLASS_LOAD = 55,
-    JVMTI_EVENT_CLASS_PREPARE = 56,
-    JVMTI_EVENT_VM_START = 57,
-    JVMTI_EVENT_EXCEPTION = 58,
-    JVMTI_EVENT_EXCEPTION_CATCH = 59,
-    JVMTI_EVENT_SINGLE_STEP = 60,
-    JVMTI_EVENT_FRAME_POP = 61,
-    JVMTI_EVENT_BREAKPOINT = 62,
-    JVMTI_EVENT_FIELD_ACCESS = 63,
-    JVMTI_EVENT_FIELD_MODIFICATION = 64,
-    JVMTI_EVENT_METHOD_ENTRY = 65,
-    JVMTI_EVENT_METHOD_EXIT = 66,
-    JVMTI_EVENT_NATIVE_METHOD_BIND = 67,
-    JVMTI_EVENT_COMPILED_METHOD_LOAD = 68,
-    JVMTI_EVENT_COMPILED_METHOD_UNLOAD = 69,
-    JVMTI_EVENT_DYNAMIC_CODE_GENERATED = 70,
-    JVMTI_EVENT_DATA_DUMP_REQUEST = 71,
-    JVMTI_EVENT_MONITOR_WAIT = 73,
-    JVMTI_EVENT_MONITOR_WAITED = 74,
-    JVMTI_EVENT_MONITOR_CONTENDED_ENTER = 75,
-    JVMTI_EVENT_MONITOR_CONTENDED_ENTERED = 76,
-    JVMTI_EVENT_RESOURCE_EXHAUSTED = 80,
-    JVMTI_EVENT_GARBAGE_COLLECTION_START = 81,
-    JVMTI_EVENT_GARBAGE_COLLECTION_FINISH = 82,
-    JVMTI_EVENT_OBJECT_FREE = 83,
-    JVMTI_EVENT_VM_OBJECT_ALLOC = 84,
-    JVMTI_MAX_EVENT_TYPE_VAL = 84
-} jvmtiEvent;
-
-
-    /* Pre-Declarations */
-struct _jvmtiThreadInfo;
-typedef struct _jvmtiThreadInfo jvmtiThreadInfo;
-struct _jvmtiMonitorStackDepthInfo;
-typedef struct _jvmtiMonitorStackDepthInfo jvmtiMonitorStackDepthInfo;
-struct _jvmtiThreadGroupInfo;
-typedef struct _jvmtiThreadGroupInfo jvmtiThreadGroupInfo;
-struct _jvmtiFrameInfo;
-typedef struct _jvmtiFrameInfo jvmtiFrameInfo;
-struct _jvmtiStackInfo;
-typedef struct _jvmtiStackInfo jvmtiStackInfo;
-struct _jvmtiHeapReferenceInfoField;
-typedef struct _jvmtiHeapReferenceInfoField jvmtiHeapReferenceInfoField;
-struct _jvmtiHeapReferenceInfoArray;
-typedef struct _jvmtiHeapReferenceInfoArray jvmtiHeapReferenceInfoArray;
-struct _jvmtiHeapReferenceInfoConstantPool;
-typedef struct _jvmtiHeapReferenceInfoConstantPool jvmtiHeapReferenceInfoConstantPool;
-struct _jvmtiHeapReferenceInfoStackLocal;
-typedef struct _jvmtiHeapReferenceInfoStackLocal jvmtiHeapReferenceInfoStackLocal;
-struct _jvmtiHeapReferenceInfoJniLocal;
-typedef struct _jvmtiHeapReferenceInfoJniLocal jvmtiHeapReferenceInfoJniLocal;
-struct _jvmtiHeapReferenceInfoReserved;
-typedef struct _jvmtiHeapReferenceInfoReserved jvmtiHeapReferenceInfoReserved;
-union _jvmtiHeapReferenceInfo;
-typedef union _jvmtiHeapReferenceInfo jvmtiHeapReferenceInfo;
-struct _jvmtiHeapCallbacks;
-typedef struct _jvmtiHeapCallbacks jvmtiHeapCallbacks;
-struct _jvmtiClassDefinition;
-typedef struct _jvmtiClassDefinition jvmtiClassDefinition;
-struct _jvmtiMonitorUsage;
-typedef struct _jvmtiMonitorUsage jvmtiMonitorUsage;
-struct _jvmtiLineNumberEntry;
-typedef struct _jvmtiLineNumberEntry jvmtiLineNumberEntry;
-struct _jvmtiLocalVariableEntry;
-typedef struct _jvmtiLocalVariableEntry jvmtiLocalVariableEntry;
-struct _jvmtiParamInfo;
-typedef struct _jvmtiParamInfo jvmtiParamInfo;
-struct _jvmtiExtensionFunctionInfo;
-typedef struct _jvmtiExtensionFunctionInfo jvmtiExtensionFunctionInfo;
-struct _jvmtiExtensionEventInfo;
-typedef struct _jvmtiExtensionEventInfo jvmtiExtensionEventInfo;
-struct _jvmtiTimerInfo;
-typedef struct _jvmtiTimerInfo jvmtiTimerInfo;
-struct _jvmtiAddrLocationMap;
-typedef struct _jvmtiAddrLocationMap jvmtiAddrLocationMap;
-
-    /* Function Types */
-
-typedef void (JNICALL *jvmtiStartFunction)
-    (jvmtiEnv* jvmti_env, JNIEnv* jni_env, void* arg);
-
-typedef jint (JNICALL *jvmtiHeapIterationCallback)
-    (jlong class_tag, jlong size, jlong* tag_ptr, jint length, void* user_data);
-
-typedef jint (JNICALL *jvmtiHeapReferenceCallback)
-    (jvmtiHeapReferenceKind reference_kind, const jvmtiHeapReferenceInfo* reference_info, jlong class_tag, jlong referrer_class_tag, jlong size, jlong* tag_ptr, jlong* referrer_tag_ptr, jint length, void* user_data);
-
-typedef jint (JNICALL *jvmtiPrimitiveFieldCallback)
-    (jvmtiHeapReferenceKind kind, const jvmtiHeapReferenceInfo* info, jlong object_class_tag, jlong* object_tag_ptr, jvalue value, jvmtiPrimitiveType value_type, void* user_data);
-
-typedef jint (JNICALL *jvmtiArrayPrimitiveValueCallback)
-    (jlong class_tag, jlong size, jlong* tag_ptr, jint element_count, jvmtiPrimitiveType element_type, const void* elements, void* user_data);
-
-typedef jint (JNICALL *jvmtiStringPrimitiveValueCallback)
-    (jlong class_tag, jlong size, jlong* tag_ptr, const jchar* value, jint value_length, void* user_data);
-
-typedef jint (JNICALL *jvmtiReservedCallback)
-    ();
-
-typedef jvmtiIterationControl (JNICALL *jvmtiHeapObjectCallback)
-    (jlong class_tag, jlong size, jlong* tag_ptr, void* user_data);
-
-typedef jvmtiIterationControl (JNICALL *jvmtiHeapRootCallback)
-    (jvmtiHeapRootKind root_kind, jlong class_tag, jlong size, jlong* tag_ptr, void* user_data);
-
-typedef jvmtiIterationControl (JNICALL *jvmtiStackReferenceCallback)
-    (jvmtiHeapRootKind root_kind, jlong class_tag, jlong size, jlong* tag_ptr, jlong thread_tag, jint depth, jmethodID method, jint slot, void* user_data);
-
-typedef jvmtiIterationControl (JNICALL *jvmtiObjectReferenceCallback)
-    (jvmtiObjectReferenceKind reference_kind, jlong class_tag, jlong size, jlong* tag_ptr, jlong referrer_tag, jint referrer_index, void* user_data);
-
-typedef jvmtiError (JNICALL *jvmtiExtensionFunction)
-    (jvmtiEnv* jvmti_env,  ...);
-
-typedef void (JNICALL *jvmtiExtensionEvent)
-    (jvmtiEnv* jvmti_env,  ...);
-
-
-    /* Structure Types */
-struct _jvmtiThreadInfo {
-    char* name;
-    jint priority;
-    jboolean is_daemon;
-    jthreadGroup thread_group;
-    jobject context_class_loader;
-};
-struct _jvmtiMonitorStackDepthInfo {
-    jobject monitor;
-    jint stack_depth;
-};
-struct _jvmtiThreadGroupInfo {
-    jthreadGroup parent;
-    char* name;
-    jint max_priority;
-    jboolean is_daemon;
-};
-struct _jvmtiFrameInfo {
-    jmethodID method;
-    jlocation location;
-};
-struct _jvmtiStackInfo {
-    jthread thread;
-    jint state;
-    jvmtiFrameInfo* frame_buffer;
-    jint frame_count;
-};
-struct _jvmtiHeapReferenceInfoField {
-    jint index;
-};
-struct _jvmtiHeapReferenceInfoArray {
-    jint index;
-};
-struct _jvmtiHeapReferenceInfoConstantPool {
-    jint index;
-};
-struct _jvmtiHeapReferenceInfoStackLocal {
-    jlong thread_tag;
-    jlong thread_id;
-    jint depth;
-    jmethodID method;
-    jlocation location;
-    jint slot;
-};
-struct _jvmtiHeapReferenceInfoJniLocal {
-    jlong thread_tag;
-    jlong thread_id;
-    jint depth;
-    jmethodID method;
-};
-struct _jvmtiHeapReferenceInfoReserved {
-    jlong reserved1;
-    jlong reserved2;
-    jlong reserved3;
-    jlong reserved4;
-    jlong reserved5;
-    jlong reserved6;
-    jlong reserved7;
-    jlong reserved8;
-};
-union _jvmtiHeapReferenceInfo {
-    jvmtiHeapReferenceInfoField field;
-    jvmtiHeapReferenceInfoArray array;
-    jvmtiHeapReferenceInfoConstantPool constant_pool;
-    jvmtiHeapReferenceInfoStackLocal stack_local;
-    jvmtiHeapReferenceInfoJniLocal jni_local;
-    jvmtiHeapReferenceInfoReserved other;
-};
-struct _jvmtiHeapCallbacks {
-    jvmtiHeapIterationCallback heap_iteration_callback;
-    jvmtiHeapReferenceCallback heap_reference_callback;
-    jvmtiPrimitiveFieldCallback primitive_field_callback;
-    jvmtiArrayPrimitiveValueCallback array_primitive_value_callback;
-    jvmtiStringPrimitiveValueCallback string_primitive_value_callback;
-    jvmtiReservedCallback reserved5;
-    jvmtiReservedCallback reserved6;
-    jvmtiReservedCallback reserved7;
-    jvmtiReservedCallback reserved8;
-    jvmtiReservedCallback reserved9;
-    jvmtiReservedCallback reserved10;
-    jvmtiReservedCallback reserved11;
-    jvmtiReservedCallback reserved12;
-    jvmtiReservedCallback reserved13;
-    jvmtiReservedCallback reserved14;
-    jvmtiReservedCallback reserved15;
-};
-struct _jvmtiClassDefinition {
-    jclass klass;
-    jint class_byte_count;
-    const unsigned char* class_bytes;
-};
-struct _jvmtiMonitorUsage {
-    jthread owner;
-    jint entry_count;
-    jint waiter_count;
-    jthread* waiters;
-    jint notify_waiter_count;
-    jthread* notify_waiters;
-};
-struct _jvmtiLineNumberEntry {
-    jlocation start_location;
-    jint line_number;
-};
-struct _jvmtiLocalVariableEntry {
-    jlocation start_location;
-    jint length;
-    char* name;
-    char* signature;
-    char* generic_signature;
-    jint slot;
-};
-struct _jvmtiParamInfo {
-    char* name;
-    jvmtiParamKind kind;
-    jvmtiParamTypes base_type;
-    jboolean null_ok;
-};
-struct _jvmtiExtensionFunctionInfo {
-    jvmtiExtensionFunction func;
-    char* id;
-    char* short_description;
-    jint param_count;
-    jvmtiParamInfo* params;
-    jint error_count;
-    jvmtiError* errors;
-};
-struct _jvmtiExtensionEventInfo {
-    jint extension_event_index;
-    char* id;
-    char* short_description;
-    jint param_count;
-    jvmtiParamInfo* params;
-};
-struct _jvmtiTimerInfo {
-    jlong max_value;
-    jboolean may_skip_forward;
-    jboolean may_skip_backward;
-    jvmtiTimerKind kind;
-    jlong reserved1;
-    jlong reserved2;
-};
-struct _jvmtiAddrLocationMap {
-    const void* start_address;
-    jlocation location;
-};
-
-typedef struct {
-    unsigned int can_tag_objects : 1;
-    unsigned int can_generate_field_modification_events : 1;
-    unsigned int can_generate_field_access_events : 1;
-    unsigned int can_get_bytecodes : 1;
-    unsigned int can_get_synthetic_attribute : 1;
-    unsigned int can_get_owned_monitor_info : 1;
-    unsigned int can_get_current_contended_monitor : 1;
-    unsigned int can_get_monitor_info : 1;
-    unsigned int can_pop_frame : 1;
-    unsigned int can_redefine_classes : 1;
-    unsigned int can_signal_thread : 1;
-    unsigned int can_get_source_file_name : 1;
-    unsigned int can_get_line_numbers : 1;
-    unsigned int can_get_source_debug_extension : 1;
-    unsigned int can_access_local_variables : 1;
-    unsigned int can_maintain_original_method_order : 1;
-    unsigned int can_generate_single_step_events : 1;
-    unsigned int can_generate_exception_events : 1;
-    unsigned int can_generate_frame_pop_events : 1;
-    unsigned int can_generate_breakpoint_events : 1;
-    unsigned int can_suspend : 1;
-    unsigned int can_redefine_any_class : 1;
-    unsigned int can_get_current_thread_cpu_time : 1;
-    unsigned int can_get_thread_cpu_time : 1;
-    unsigned int can_generate_method_entry_events : 1;
-    unsigned int can_generate_method_exit_events : 1;
-    unsigned int can_generate_all_class_hook_events : 1;
-    unsigned int can_generate_compiled_method_load_events : 1;
-    unsigned int can_generate_monitor_events : 1;
-    unsigned int can_generate_vm_object_alloc_events : 1;
-    unsigned int can_generate_native_method_bind_events : 1;
-    unsigned int can_generate_garbage_collection_events : 1;
-    unsigned int can_generate_object_free_events : 1;
-    unsigned int can_force_early_return : 1;
-    unsigned int can_get_owned_monitor_stack_depth_info : 1;
-    unsigned int can_get_constant_pool : 1;
-    unsigned int can_set_native_method_prefix : 1;
-    unsigned int can_retransform_classes : 1;
-    unsigned int can_retransform_any_class : 1;
-    unsigned int can_generate_resource_exhaustion_heap_events : 1;
-    unsigned int can_generate_resource_exhaustion_threads_events : 1;
-    unsigned int : 7;
-    unsigned int : 16;
-    unsigned int : 16;
-    unsigned int : 16;
-    unsigned int : 16;
-    unsigned int : 16;
-} jvmtiCapabilities;
-
-
-    /* Event Definitions */
-
-typedef void (JNICALL *jvmtiEventReserved)(void);
-
-
-typedef void (JNICALL *jvmtiEventBreakpoint)
-    (jvmtiEnv *jvmti_env, 
-     JNIEnv* jni_env, 
-     jthread thread, 
-     jmethodID method, 
-     jlocation location);
-
-typedef void (JNICALL *jvmtiEventClassFileLoadHook)
-    (jvmtiEnv *jvmti_env, 
-     JNIEnv* jni_env, 
-     jclass class_being_redefined, 
-     jobject loader, 
-     const char* name, 
-     jobject protection_domain, 
-     jint class_data_len, 
-     const unsigned char* class_data, 
-     jint* new_class_data_len, 
-     unsigned char** new_class_data);
-
-typedef void (JNICALL *jvmtiEventClassLoad)
-    (jvmtiEnv *jvmti_env, 
-     JNIEnv* jni_env, 
-     jthread thread, 
-     jclass klass);
-
-typedef void (JNICALL *jvmtiEventClassPrepare)
-    (jvmtiEnv *jvmti_env, 
-     JNIEnv* jni_env, 
-     jthread thread, 
-     jclass klass);
-
-typedef void (JNICALL *jvmtiEventCompiledMethodLoad)
-    (jvmtiEnv *jvmti_env, 
-     jmethodID method, 
-     jint code_size, 
-     const void* code_addr, 
-     jint map_length, 
-     const jvmtiAddrLocationMap* map, 
-     const void* compile_info);
-
-typedef void (JNICALL *jvmtiEventCompiledMethodUnload)
-    (jvmtiEnv *jvmti_env, 
-     jmethodID method, 
-     const void* code_addr);
-
-typedef void (JNICALL *jvmtiEventDataDumpRequest)
-    (jvmtiEnv *jvmti_env);
-
-typedef void (JNICALL *jvmtiEventDynamicCodeGenerated)
-    (jvmtiEnv *jvmti_env, 
-     const char* name, 
-     const void* address, 
-     jint length);
-
-typedef void (JNICALL *jvmtiEventException)
-    (jvmtiEnv *jvmti_env, 
-     JNIEnv* jni_env, 
-     jthread thread, 
-     jmethodID method, 
-     jlocation location, 
-     jobject exception, 
-     jmethodID catch_method, 
-     jlocation catch_location);
-
-typedef void (JNICALL *jvmtiEventExceptionCatch)
-    (jvmtiEnv *jvmti_env, 
-     JNIEnv* jni_env, 
-     jthread thread, 
-     jmethodID method, 
-     jlocation location, 
-     jobject exception);
-
-typedef void (JNICALL *jvmtiEventFieldAccess)
-    (jvmtiEnv *jvmti_env, 
-     JNIEnv* jni_env, 
-     jthread thread, 
-     jmethodID method, 
-     jlocation location, 
-     jclass field_klass, 
-     jobject object, 
-     jfieldID field);
-
-typedef void (JNICALL *jvmtiEventFieldModification)
-    (jvmtiEnv *jvmti_env, 
-     JNIEnv* jni_env, 
-     jthread thread, 
-     jmethodID method, 
-     jlocation location, 
-     jclass field_klass, 
-     jobject object, 
-     jfieldID field, 
-     char signature_type, 
-     jvalue new_value);
-
-typedef void (JNICALL *jvmtiEventFramePop)
-    (jvmtiEnv *jvmti_env, 
-     JNIEnv* jni_env, 
-     jthread thread, 
-     jmethodID method, 
-     jboolean was_popped_by_exception);
-
-typedef void (JNICALL *jvmtiEventGarbageCollectionFinish)
-    (jvmtiEnv *jvmti_env);
-
-typedef void (JNICALL *jvmtiEventGarbageCollectionStart)
-    (jvmtiEnv *jvmti_env);
-
-typedef void (JNICALL *jvmtiEventMethodEntry)
-    (jvmtiEnv *jvmti_env, 
-     JNIEnv* jni_env, 
-     jthread thread, 
-     jmethodID method);
-
-typedef void (JNICALL *jvmtiEventMethodExit)
-    (jvmtiEnv *jvmti_env, 
-     JNIEnv* jni_env, 
-     jthread thread, 
-     jmethodID method, 
-     jboolean was_popped_by_exception, 
-     jvalue return_value);
-
-typedef void (JNICALL *jvmtiEventMonitorContendedEnter)
-    (jvmtiEnv *jvmti_env, 
-     JNIEnv* jni_env, 
-     jthread thread, 
-     jobject object);
-
-typedef void (JNICALL *jvmtiEventMonitorContendedEntered)
-    (jvmtiEnv *jvmti_env, 
-     JNIEnv* jni_env, 
-     jthread thread, 
-     jobject object);
-
-typedef void (JNICALL *jvmtiEventMonitorWait)
-    (jvmtiEnv *jvmti_env, 
-     JNIEnv* jni_env, 
-     jthread thread, 
-     jobject object, 
-     jlong timeout);
-
-typedef void (JNICALL *jvmtiEventMonitorWaited)
-    (jvmtiEnv *jvmti_env, 
-     JNIEnv* jni_env, 
-     jthread thread, 
-     jobject object, 
-     jboolean timed_out);
-
-typedef void (JNICALL *jvmtiEventNativeMethodBind)
-    (jvmtiEnv *jvmti_env, 
-     JNIEnv* jni_env, 
-     jthread thread, 
-     jmethodID method, 
-     void* address, 
-     void** new_address_ptr);
-
-typedef void (JNICALL *jvmtiEventObjectFree)
-    (jvmtiEnv *jvmti_env, 
-     jlong tag);
-
-typedef void (JNICALL *jvmtiEventResourceExhausted)
-    (jvmtiEnv *jvmti_env, 
-     JNIEnv* jni_env, 
-     jint flags, 
-     const void* reserved, 
-     const char* description);
-
-typedef void (JNICALL *jvmtiEventSingleStep)
-    (jvmtiEnv *jvmti_env, 
-     JNIEnv* jni_env, 
-     jthread thread, 
-     jmethodID method, 
-     jlocation location);
-
-typedef void (JNICALL *jvmtiEventThreadEnd)
-    (jvmtiEnv *jvmti_env, 
-     JNIEnv* jni_env, 
-     jthread thread);
-
-typedef void (JNICALL *jvmtiEventThreadStart)
-    (jvmtiEnv *jvmti_env, 
-     JNIEnv* jni_env, 
-     jthread thread);
-
-typedef void (JNICALL *jvmtiEventVMDeath)
-    (jvmtiEnv *jvmti_env, 
-     JNIEnv* jni_env);
-
-typedef void (JNICALL *jvmtiEventVMInit)
-    (jvmtiEnv *jvmti_env, 
-     JNIEnv* jni_env, 
-     jthread thread);
-
-typedef void (JNICALL *jvmtiEventVMObjectAlloc)
-    (jvmtiEnv *jvmti_env, 
-     JNIEnv* jni_env, 
-     jthread thread, 
-     jobject object, 
-     jclass object_klass, 
-     jlong size);
-
-typedef void (JNICALL *jvmtiEventVMStart)
-    (jvmtiEnv *jvmti_env, 
-     JNIEnv* jni_env);
-
-    /* Event Callback Structure */
-
-typedef struct {
-                              /*   50 : VM Initialization Event */
-    jvmtiEventVMInit VMInit;
-                              /*   51 : VM Death Event */
-    jvmtiEventVMDeath VMDeath;
-                              /*   52 : Thread Start */
-    jvmtiEventThreadStart ThreadStart;
-                              /*   53 : Thread End */
-    jvmtiEventThreadEnd ThreadEnd;
-                              /*   54 : Class File Load Hook */
-    jvmtiEventClassFileLoadHook ClassFileLoadHook;
-                              /*   55 : Class Load */
-    jvmtiEventClassLoad ClassLoad;
-                              /*   56 : Class Prepare */
-    jvmtiEventClassPrepare ClassPrepare;
-                              /*   57 : VM Start Event */
-    jvmtiEventVMStart VMStart;
-                              /*   58 : Exception */
-    jvmtiEventException Exception;
-                              /*   59 : Exception Catch */
-    jvmtiEventExceptionCatch ExceptionCatch;
-                              /*   60 : Single Step */
-    jvmtiEventSingleStep SingleStep;
-                              /*   61 : Frame Pop */
-    jvmtiEventFramePop FramePop;
-                              /*   62 : Breakpoint */
-    jvmtiEventBreakpoint Breakpoint;
-                              /*   63 : Field Access */
-    jvmtiEventFieldAccess FieldAccess;
-                              /*   64 : Field Modification */
-    jvmtiEventFieldModification FieldModification;
-                              /*   65 : Method Entry */
-    jvmtiEventMethodEntry MethodEntry;
-                              /*   66 : Method Exit */
-    jvmtiEventMethodExit MethodExit;
-                              /*   67 : Native Method Bind */
-    jvmtiEventNativeMethodBind NativeMethodBind;
-                              /*   68 : Compiled Method Load */
-    jvmtiEventCompiledMethodLoad CompiledMethodLoad;
-                              /*   69 : Compiled Method Unload */
-    jvmtiEventCompiledMethodUnload CompiledMethodUnload;
-                              /*   70 : Dynamic Code Generated */
-    jvmtiEventDynamicCodeGenerated DynamicCodeGenerated;
-                              /*   71 : Data Dump Request */
-    jvmtiEventDataDumpRequest DataDumpRequest;
-                              /*   72 */
-    jvmtiEventReserved reserved72;
-                              /*   73 : Monitor Wait */
-    jvmtiEventMonitorWait MonitorWait;
-                              /*   74 : Monitor Waited */
-    jvmtiEventMonitorWaited MonitorWaited;
-                              /*   75 : Monitor Contended Enter */
-    jvmtiEventMonitorContendedEnter MonitorContendedEnter;
-                              /*   76 : Monitor Contended Entered */
-    jvmtiEventMonitorContendedEntered MonitorContendedEntered;
-                              /*   77 */
-    jvmtiEventReserved reserved77;
-                              /*   78 */
-    jvmtiEventReserved reserved78;
-                              /*   79 */
-    jvmtiEventReserved reserved79;
-                              /*   80 : Resource Exhausted */
-    jvmtiEventResourceExhausted ResourceExhausted;
-                              /*   81 : Garbage Collection Start */
-    jvmtiEventGarbageCollectionStart GarbageCollectionStart;
-                              /*   82 : Garbage Collection Finish */
-    jvmtiEventGarbageCollectionFinish GarbageCollectionFinish;
-                              /*   83 : Object Free */
-    jvmtiEventObjectFree ObjectFree;
-                              /*   84 : VM Object Allocation */
-    jvmtiEventVMObjectAlloc VMObjectAlloc;
-} jvmtiEventCallbacks;
-
-
-    /* Function Interface */
-    
-typedef struct jvmtiInterface_1_ {
-
-  /*   1 :  RESERVED */
-  void *reserved1;
-
-  /*   2 : Set Event Notification Mode */
-  jvmtiError (JNICALL *SetEventNotificationMode) (jvmtiEnv* env, 
-    jvmtiEventMode mode, 
-    jvmtiEvent event_type, 
-    jthread event_thread, 
-     ...);
-
-  /*   3 :  RESERVED */
-  void *reserved3;
-
-  /*   4 : Get All Threads */
-  jvmtiError (JNICALL *GetAllThreads) (jvmtiEnv* env, 
-    jint* threads_count_ptr, 
-    jthread** threads_ptr);
-
-  /*   5 : Suspend Thread */
-  jvmtiError (JNICALL *SuspendThread) (jvmtiEnv* env, 
-    jthread thread);
-
-  /*   6 : Resume Thread */
-  jvmtiError (JNICALL *ResumeThread) (jvmtiEnv* env, 
-    jthread thread);
-
-  /*   7 : Stop Thread */
-  jvmtiError (JNICALL *StopThread) (jvmtiEnv* env, 
-    jthread thread, 
-    jobject exception);
-
-  /*   8 : Interrupt Thread */
-  jvmtiError (JNICALL *InterruptThread) (jvmtiEnv* env, 
-    jthread thread);
-
-  /*   9 : Get Thread Info */
-  jvmtiError (JNICALL *GetThreadInfo) (jvmtiEnv* env, 
-    jthread thread, 
-    jvmtiThreadInfo* info_ptr);
-
-  /*   10 : Get Owned Monitor Info */
-  jvmtiError (JNICALL *GetOwnedMonitorInfo) (jvmtiEnv* env, 
-    jthread thread, 
-    jint* owned_monitor_count_ptr, 
-    jobject** owned_monitors_ptr);
-
-  /*   11 : Get Current Contended Monitor */
-  jvmtiError (JNICALL *GetCurrentContendedMonitor) (jvmtiEnv* env, 
-    jthread thread, 
-    jobject* monitor_ptr);
-
-  /*   12 : Run Agent Thread */
-  jvmtiError (JNICALL *RunAgentThread) (jvmtiEnv* env, 
-    jthread thread, 
-    jvmtiStartFunction proc, 
-    const void* arg, 
-    jint priority);
-
-  /*   13 : Get Top Thread Groups */
-  jvmtiError (JNICALL *GetTopThreadGroups) (jvmtiEnv* env, 
-    jint* group_count_ptr, 
-    jthreadGroup** groups_ptr);
-
-  /*   14 : Get Thread Group Info */
-  jvmtiError (JNICALL *GetThreadGroupInfo) (jvmtiEnv* env, 
-    jthreadGroup group, 
-    jvmtiThreadGroupInfo* info_ptr);
-
-  /*   15 : Get Thread Group Children */
-  jvmtiError (JNICALL *GetThreadGroupChildren) (jvmtiEnv* env, 
-    jthreadGroup group, 
-    jint* thread_count_ptr, 
-    jthread** threads_ptr, 
-    jint* group_count_ptr, 
-    jthreadGroup** groups_ptr);
-
-  /*   16 : Get Frame Count */
-  jvmtiError (JNICALL *GetFrameCount) (jvmtiEnv* env, 
-    jthread thread, 
-    jint* count_ptr);
-
-  /*   17 : Get Thread State */
-  jvmtiError (JNICALL *GetThreadState) (jvmtiEnv* env, 
-    jthread thread, 
-    jint* thread_state_ptr);
-
-  /*   18 : Get Current Thread */
-  jvmtiError (JNICALL *GetCurrentThread) (jvmtiEnv* env, 
-    jthread* thread_ptr);
-
-  /*   19 : Get Frame Location */
-  jvmtiError (JNICALL *GetFrameLocation) (jvmtiEnv* env, 
-    jthread thread, 
-    jint depth, 
-    jmethodID* method_ptr, 
-    jlocation* location_ptr);
-
-  /*   20 : Notify Frame Pop */
-  jvmtiError (JNICALL *NotifyFramePop) (jvmtiEnv* env, 
-    jthread thread, 
-    jint depth);
-
-  /*   21 : Get Local Variable - Object */
-  jvmtiError (JNICALL *GetLocalObject) (jvmtiEnv* env, 
-    jthread thread, 
-    jint depth, 
-    jint slot, 
-    jobject* value_ptr);
-
-  /*   22 : Get Local Variable - Int */
-  jvmtiError (JNICALL *GetLocalInt) (jvmtiEnv* env, 
-    jthread thread, 
-    jint depth, 
-    jint slot, 
-    jint* value_ptr);
-
-  /*   23 : Get Local Variable - Long */
-  jvmtiError (JNICALL *GetLocalLong) (jvmtiEnv* env, 
-    jthread thread, 
-    jint depth, 
-    jint slot, 
-    jlong* value_ptr);
-
-  /*   24 : Get Local Variable - Float */
-  jvmtiError (JNICALL *GetLocalFloat) (jvmtiEnv* env, 
-    jthread thread, 
-    jint depth, 
-    jint slot, 
-    jfloat* value_ptr);
-
-  /*   25 : Get Local Variable - Double */
-  jvmtiError (JNICALL *GetLocalDouble) (jvmtiEnv* env, 
-    jthread thread, 
-    jint depth, 
-    jint slot, 
-    jdouble* value_ptr);
-
-  /*   26 : Set Local Variable - Object */
-  jvmtiError (JNICALL *SetLocalObject) (jvmtiEnv* env, 
-    jthread thread, 
-    jint depth, 
-    jint slot, 
-    jobject value);
-
-  /*   27 : Set Local Variable - Int */
-  jvmtiError (JNICALL *SetLocalInt) (jvmtiEnv* env, 
-    jthread thread, 
-    jint depth, 
-    jint slot, 
-    jint value);
-
-  /*   28 : Set Local Variable - Long */
-  jvmtiError (JNICALL *SetLocalLong) (jvmtiEnv* env, 
-    jthread thread, 
-    jint depth, 
-    jint slot, 
-    jlong value);
-
-  /*   29 : Set Local Variable - Float */
-  jvmtiError (JNICALL *SetLocalFloat) (jvmtiEnv* env, 
-    jthread thread, 
-    jint depth, 
-    jint slot, 
-    jfloat value);
-
-  /*   30 : Set Local Variable - Double */
-  jvmtiError (JNICALL *SetLocalDouble) (jvmtiEnv* env, 
-    jthread thread, 
-    jint depth, 
-    jint slot, 
-    jdouble value);
-
-  /*   31 : Create Raw Monitor */
-  jvmtiError (JNICALL *CreateRawMonitor) (jvmtiEnv* env, 
-    const char* name, 
-    jrawMonitorID* monitor_ptr);
-
-  /*   32 : Destroy Raw Monitor */
-  jvmtiError (JNICALL *DestroyRawMonitor) (jvmtiEnv* env, 
-    jrawMonitorID monitor);
-
-  /*   33 : Raw Monitor Enter */
-  jvmtiError (JNICALL *RawMonitorEnter) (jvmtiEnv* env, 
-    jrawMonitorID monitor);
-
-  /*   34 : Raw Monitor Exit */
-  jvmtiError (JNICALL *RawMonitorExit) (jvmtiEnv* env, 
-    jrawMonitorID monitor);
-
-  /*   35 : Raw Monitor Wait */
-  jvmtiError (JNICALL *RawMonitorWait) (jvmtiEnv* env, 
-    jrawMonitorID monitor, 
-    jlong millis);
-
-  /*   36 : Raw Monitor Notify */
-  jvmtiError (JNICALL *RawMonitorNotify) (jvmtiEnv* env, 
-    jrawMonitorID monitor);
-
-  /*   37 : Raw Monitor Notify All */
-  jvmtiError (JNICALL *RawMonitorNotifyAll) (jvmtiEnv* env, 
-    jrawMonitorID monitor);
-
-  /*   38 : Set Breakpoint */
-  jvmtiError (JNICALL *SetBreakpoint) (jvmtiEnv* env, 
-    jmethodID method, 
-    jlocation location);
-
-  /*   39 : Clear Breakpoint */
-  jvmtiError (JNICALL *ClearBreakpoint) (jvmtiEnv* env, 
-    jmethodID method, 
-    jlocation location);
-
-  /*   40 :  RESERVED */
-  void *reserved40;
-
-  /*   41 : Set Field Access Watch */
-  jvmtiError (JNICALL *SetFieldAccessWatch) (jvmtiEnv* env, 
-    jclass klass, 
-    jfieldID field);
-
-  /*   42 : Clear Field Access Watch */
-  jvmtiError (JNICALL *ClearFieldAccessWatch) (jvmtiEnv* env, 
-    jclass klass, 
-    jfieldID field);
-
-  /*   43 : Set Field Modification Watch */
-  jvmtiError (JNICALL *SetFieldModificationWatch) (jvmtiEnv* env, 
-    jclass klass, 
-    jfieldID field);
-
-  /*   44 : Clear Field Modification Watch */
-  jvmtiError (JNICALL *ClearFieldModificationWatch) (jvmtiEnv* env, 
-    jclass klass, 
-    jfieldID field);
-
-  /*   45 : Is Modifiable Class */
-  jvmtiError (JNICALL *IsModifiableClass) (jvmtiEnv* env, 
-    jclass klass, 
-    jboolean* is_modifiable_class_ptr);
-
-  /*   46 : Allocate */
-  jvmtiError (JNICALL *Allocate) (jvmtiEnv* env, 
-    jlong size, 
-    unsigned char** mem_ptr);
-
-  /*   47 : Deallocate */
-  jvmtiError (JNICALL *Deallocate) (jvmtiEnv* env, 
-    unsigned char* mem);
-
-  /*   48 : Get Class Signature */
-  jvmtiError (JNICALL *GetClassSignature) (jvmtiEnv* env, 
-    jclass klass, 
-    char** signature_ptr, 
-    char** generic_ptr);
-
-  /*   49 : Get Class Status */
-  jvmtiError (JNICALL *GetClassStatus) (jvmtiEnv* env, 
-    jclass klass, 
-    jint* status_ptr);
-
-  /*   50 : Get Source File Name */
-  jvmtiError (JNICALL *GetSourceFileName) (jvmtiEnv* env, 
-    jclass klass, 
-    char** source_name_ptr);
-
-  /*   51 : Get Class Modifiers */
-  jvmtiError (JNICALL *GetClassModifiers) (jvmtiEnv* env, 
-    jclass klass, 
-    jint* modifiers_ptr);
-
-  /*   52 : Get Class Methods */
-  jvmtiError (JNICALL *GetClassMethods) (jvmtiEnv* env, 
-    jclass klass, 
-    jint* method_count_ptr, 
-    jmethodID** methods_ptr);
-
-  /*   53 : Get Class Fields */
-  jvmtiError (JNICALL *GetClassFields) (jvmtiEnv* env, 
-    jclass klass, 
-    jint* field_count_ptr, 
-    jfieldID** fields_ptr);
-
-  /*   54 : Get Implemented Interfaces */
-  jvmtiError (JNICALL *GetImplementedInterfaces) (jvmtiEnv* env, 
-    jclass klass, 
-    jint* interface_count_ptr, 
-    jclass** interfaces_ptr);
-
-  /*   55 : Is Interface */
-  jvmtiError (JNICALL *IsInterface) (jvmtiEnv* env, 
-    jclass klass, 
-    jboolean* is_interface_ptr);
-
-  /*   56 : Is Array Class */
-  jvmtiError (JNICALL *IsArrayClass) (jvmtiEnv* env, 
-    jclass klass, 
-    jboolean* is_array_class_ptr);
-
-  /*   57 : Get Class Loader */
-  jvmtiError (JNICALL *GetClassLoader) (jvmtiEnv* env, 
-    jclass klass, 
-    jobject* classloader_ptr);
-
-  /*   58 : Get Object Hash Code */
-  jvmtiError (JNICALL *GetObjectHashCode) (jvmtiEnv* env, 
-    jobject object, 
-    jint* hash_code_ptr);
-
-  /*   59 : Get Object Monitor Usage */
-  jvmtiError (JNICALL *GetObjectMonitorUsage) (jvmtiEnv* env, 
-    jobject object, 
-    jvmtiMonitorUsage* info_ptr);
-
-  /*   60 : Get Field Name (and Signature) */
-  jvmtiError (JNICALL *GetFieldName) (jvmtiEnv* env, 
-    jclass klass, 
-    jfieldID field, 
-    char** name_ptr, 
-    char** signature_ptr, 
-    char** generic_ptr);
-
-  /*   61 : Get Field Declaring Class */
-  jvmtiError (JNICALL *GetFieldDeclaringClass) (jvmtiEnv* env, 
-    jclass klass, 
-    jfieldID field, 
-    jclass* declaring_class_ptr);
-
-  /*   62 : Get Field Modifiers */
-  jvmtiError (JNICALL *GetFieldModifiers) (jvmtiEnv* env, 
-    jclass klass, 
-    jfieldID field, 
-    jint* modifiers_ptr);
-
-  /*   63 : Is Field Synthetic */
-  jvmtiError (JNICALL *IsFieldSynthetic) (jvmtiEnv* env, 
-    jclass klass, 
-    jfieldID field, 
-    jboolean* is_synthetic_ptr);
-
-  /*   64 : Get Method Name (and Signature) */
-  jvmtiError (JNICALL *GetMethodName) (jvmtiEnv* env, 
-    jmethodID method, 
-    char** name_ptr, 
-    char** signature_ptr, 
-    char** generic_ptr);
-
-  /*   65 : Get Method Declaring Class */
-  jvmtiError (JNICALL *GetMethodDeclaringClass) (jvmtiEnv* env, 
-    jmethodID method, 
-    jclass* declaring_class_ptr);
-
-  /*   66 : Get Method Modifiers */
-  jvmtiError (JNICALL *GetMethodModifiers) (jvmtiEnv* env, 
-    jmethodID method, 
-    jint* modifiers_ptr);
-
-  /*   67 :  RESERVED */
-  void *reserved67;
-
-  /*   68 : Get Max Locals */
-  jvmtiError (JNICALL *GetMaxLocals) (jvmtiEnv* env, 
-    jmethodID method, 
-    jint* max_ptr);
-
-  /*   69 : Get Arguments Size */
-  jvmtiError (JNICALL *GetArgumentsSize) (jvmtiEnv* env, 
-    jmethodID method, 
-    jint* size_ptr);
-
-  /*   70 : Get Line Number Table */
-  jvmtiError (JNICALL *GetLineNumberTable) (jvmtiEnv* env, 
-    jmethodID method, 
-    jint* entry_count_ptr, 
-    jvmtiLineNumberEntry** table_ptr);
-
-  /*   71 : Get Method Location */
-  jvmtiError (JNICALL *GetMethodLocation) (jvmtiEnv* env, 
-    jmethodID method, 
-    jlocation* start_location_ptr, 
-    jlocation* end_location_ptr);
-
-  /*   72 : Get Local Variable Table */
-  jvmtiError (JNICALL *GetLocalVariableTable) (jvmtiEnv* env, 
-    jmethodID method, 
-    jint* entry_count_ptr, 
-    jvmtiLocalVariableEntry** table_ptr);
-
-  /*   73 : Set Native Method Prefix */
-  jvmtiError (JNICALL *SetNativeMethodPrefix) (jvmtiEnv* env, 
-    const char* prefix);
-
-  /*   74 : Set Native Method Prefixes */
-  jvmtiError (JNICALL *SetNativeMethodPrefixes) (jvmtiEnv* env, 
-    jint prefix_count, 
-    char** prefixes);
-
-  /*   75 : Get Bytecodes */
-  jvmtiError (JNICALL *GetBytecodes) (jvmtiEnv* env, 
-    jmethodID method, 
-    jint* bytecode_count_ptr, 
-    unsigned char** bytecodes_ptr);
-
-  /*   76 : Is Method Native */
-  jvmtiError (JNICALL *IsMethodNative) (jvmtiEnv* env, 
-    jmethodID method, 
-    jboolean* is_native_ptr);
-
-  /*   77 : Is Method Synthetic */
-  jvmtiError (JNICALL *IsMethodSynthetic) (jvmtiEnv* env, 
-    jmethodID method, 
-    jboolean* is_synthetic_ptr);
-
-  /*   78 : Get Loaded Classes */
-  jvmtiError (JNICALL *GetLoadedClasses) (jvmtiEnv* env, 
-    jint* class_count_ptr, 
-    jclass** classes_ptr);
-
-  /*   79 : Get Classloader Classes */
-  jvmtiError (JNICALL *GetClassLoaderClasses) (jvmtiEnv* env, 
-    jobject initiating_loader, 
-    jint* class_count_ptr, 
-    jclass** classes_ptr);
-
-  /*   80 : Pop Frame */
-  jvmtiError (JNICALL *PopFrame) (jvmtiEnv* env, 
-    jthread thread);
-
-  /*   81 : Force Early Return - Object */
-  jvmtiError (JNICALL *ForceEarlyReturnObject) (jvmtiEnv* env, 
-    jthread thread, 
-    jobject value);
-
-  /*   82 : Force Early Return - Int */
-  jvmtiError (JNICALL *ForceEarlyReturnInt) (jvmtiEnv* env, 
-    jthread thread, 
-    jint value);
-
-  /*   83 : Force Early Return - Long */
-  jvmtiError (JNICALL *ForceEarlyReturnLong) (jvmtiEnv* env, 
-    jthread thread, 
-    jlong value);
-
-  /*   84 : Force Early Return - Float */
-  jvmtiError (JNICALL *ForceEarlyReturnFloat) (jvmtiEnv* env, 
-    jthread thread, 
-    jfloat value);
-
-  /*   85 : Force Early Return - Double */
-  jvmtiError (JNICALL *ForceEarlyReturnDouble) (jvmtiEnv* env, 
-    jthread thread, 
-    jdouble value);
-
-  /*   86 : Force Early Return - Void */
-  jvmtiError (JNICALL *ForceEarlyReturnVoid) (jvmtiEnv* env, 
-    jthread thread);
-
-  /*   87 : Redefine Classes */
-  jvmtiError (JNICALL *RedefineClasses) (jvmtiEnv* env, 
-    jint class_count, 
-    const jvmtiClassDefinition* class_definitions);
-
-  /*   88 : Get Version Number */
-  jvmtiError (JNICALL *GetVersionNumber) (jvmtiEnv* env, 
-    jint* version_ptr);
-
-  /*   89 : Get Capabilities */
-  jvmtiError (JNICALL *GetCapabilities) (jvmtiEnv* env, 
-    jvmtiCapabilities* capabilities_ptr);
-
-  /*   90 : Get Source Debug Extension */
-  jvmtiError (JNICALL *GetSourceDebugExtension) (jvmtiEnv* env, 
-    jclass klass, 
-    char** source_debug_extension_ptr);
-
-  /*   91 : Is Method Obsolete */
-  jvmtiError (JNICALL *IsMethodObsolete) (jvmtiEnv* env, 
-    jmethodID method, 
-    jboolean* is_obsolete_ptr);
-
-  /*   92 : Suspend Thread List */
-  jvmtiError (JNICALL *SuspendThreadList) (jvmtiEnv* env, 
-    jint request_count, 
-    const jthread* request_list, 
-    jvmtiError* results);
-
-  /*   93 : Resume Thread List */
-  jvmtiError (JNICALL *ResumeThreadList) (jvmtiEnv* env, 
-    jint request_count, 
-    const jthread* request_list, 
-    jvmtiError* results);
-
-  /*   94 :  RESERVED */
-  void *reserved94;
-
-  /*   95 :  RESERVED */
-  void *reserved95;
-
-  /*   96 :  RESERVED */
-  void *reserved96;
-
-  /*   97 :  RESERVED */
-  void *reserved97;
-
-  /*   98 :  RESERVED */
-  void *reserved98;
-
-  /*   99 :  RESERVED */
-  void *reserved99;
-
-  /*   100 : Get All Stack Traces */
-  jvmtiError (JNICALL *GetAllStackTraces) (jvmtiEnv* env, 
-    jint max_frame_count, 
-    jvmtiStackInfo** stack_info_ptr, 
-    jint* thread_count_ptr);
-
-  /*   101 : Get Thread List Stack Traces */
-  jvmtiError (JNICALL *GetThreadListStackTraces) (jvmtiEnv* env, 
-    jint thread_count, 
-    const jthread* thread_list, 
-    jint max_frame_count, 
-    jvmtiStackInfo** stack_info_ptr);
-
-  /*   102 : Get Thread Local Storage */
-  jvmtiError (JNICALL *GetThreadLocalStorage) (jvmtiEnv* env, 
-    jthread thread, 
-    void** data_ptr);
-
-  /*   103 : Set Thread Local Storage */
-  jvmtiError (JNICALL *SetThreadLocalStorage) (jvmtiEnv* env, 
-    jthread thread, 
-    const void* data);
-
-  /*   104 : Get Stack Trace */
-  jvmtiError (JNICALL *GetStackTrace) (jvmtiEnv* env, 
-    jthread thread, 
-    jint start_depth, 
-    jint max_frame_count, 
-    jvmtiFrameInfo* frame_buffer, 
-    jint* count_ptr);
-
-  /*   105 :  RESERVED */
-  void *reserved105;
-
-  /*   106 : Get Tag */
-  jvmtiError (JNICALL *GetTag) (jvmtiEnv* env, 
-    jobject object, 
-    jlong* tag_ptr);
-
-  /*   107 : Set Tag */
-  jvmtiError (JNICALL *SetTag) (jvmtiEnv* env, 
-    jobject object, 
-    jlong tag);
-
-  /*   108 : Force Garbage Collection */
-  jvmtiError (JNICALL *ForceGarbageCollection) (jvmtiEnv* env);
-
-  /*   109 : Iterate Over Objects Reachable From Object */
-  jvmtiError (JNICALL *IterateOverObjectsReachableFromObject) (jvmtiEnv* env, 
-    jobject object, 
-    jvmtiObjectReferenceCallback object_reference_callback, 
-    const void* user_data);
-
-  /*   110 : Iterate Over Reachable Objects */
-  jvmtiError (JNICALL *IterateOverReachableObjects) (jvmtiEnv* env, 
-    jvmtiHeapRootCallback heap_root_callback, 
-    jvmtiStackReferenceCallback stack_ref_callback, 
-    jvmtiObjectReferenceCallback object_ref_callback, 
-    const void* user_data);
-
-  /*   111 : Iterate Over Heap */
-  jvmtiError (JNICALL *IterateOverHeap) (jvmtiEnv* env, 
-    jvmtiHeapObjectFilter object_filter, 
-    jvmtiHeapObjectCallback heap_object_callback, 
-    const void* user_data);
-
-  /*   112 : Iterate Over Instances Of Class */
-  jvmtiError (JNICALL *IterateOverInstancesOfClass) (jvmtiEnv* env, 
-    jclass klass, 
-    jvmtiHeapObjectFilter object_filter, 
-    jvmtiHeapObjectCallback heap_object_callback, 
-    const void* user_data);
-
-  /*   113 :  RESERVED */
-  void *reserved113;
-
-  /*   114 : Get Objects With Tags */
-  jvmtiError (JNICALL *GetObjectsWithTags) (jvmtiEnv* env, 
-    jint tag_count, 
-    const jlong* tags, 
-    jint* count_ptr, 
-    jobject** object_result_ptr, 
-    jlong** tag_result_ptr);
-
-  /*   115 : Follow References */
-  jvmtiError (JNICALL *FollowReferences) (jvmtiEnv* env, 
-    jint heap_filter, 
-    jclass klass, 
-    jobject initial_object, 
-    const jvmtiHeapCallbacks* callbacks, 
-    const void* user_data);
-
-  /*   116 : Iterate Through Heap */
-  jvmtiError (JNICALL *IterateThroughHeap) (jvmtiEnv* env, 
-    jint heap_filter, 
-    jclass klass, 
-    const jvmtiHeapCallbacks* callbacks, 
-    const void* user_data);
-
-  /*   117 :  RESERVED */
-  void *reserved117;
-
-  /*   118 :  RESERVED */
-  void *reserved118;
-
-  /*   119 :  RESERVED */
-  void *reserved119;
-
-  /*   120 : Set JNI Function Table */
-  jvmtiError (JNICALL *SetJNIFunctionTable) (jvmtiEnv* env, 
-    const jniNativeInterface* function_table);
-
-  /*   121 : Get JNI Function Table */
-  jvmtiError (JNICALL *GetJNIFunctionTable) (jvmtiEnv* env, 
-    jniNativeInterface** function_table);
-
-  /*   122 : Set Event Callbacks */
-  jvmtiError (JNICALL *SetEventCallbacks) (jvmtiEnv* env, 
-    const jvmtiEventCallbacks* callbacks, 
-    jint size_of_callbacks);
-
-  /*   123 : Generate Events */
-  jvmtiError (JNICALL *GenerateEvents) (jvmtiEnv* env, 
-    jvmtiEvent event_type);
-
-  /*   124 : Get Extension Functions */
-  jvmtiError (JNICALL *GetExtensionFunctions) (jvmtiEnv* env, 
-    jint* extension_count_ptr, 
-    jvmtiExtensionFunctionInfo** extensions);
-
-  /*   125 : Get Extension Events */
-  jvmtiError (JNICALL *GetExtensionEvents) (jvmtiEnv* env, 
-    jint* extension_count_ptr, 
-    jvmtiExtensionEventInfo** extensions);
-
-  /*   126 : Set Extension Event Callback */
-  jvmtiError (JNICALL *SetExtensionEventCallback) (jvmtiEnv* env, 
-    jint extension_event_index, 
-    jvmtiExtensionEvent callback);
-
-  /*   127 : Dispose Environment */
-  jvmtiError (JNICALL *DisposeEnvironment) (jvmtiEnv* env);
-
-  /*   128 : Get Error Name */
-  jvmtiError (JNICALL *GetErrorName) (jvmtiEnv* env, 
-    jvmtiError error, 
-    char** name_ptr);
-
-  /*   129 : Get JLocation Format */
-  jvmtiError (JNICALL *GetJLocationFormat) (jvmtiEnv* env, 
-    jvmtiJlocationFormat* format_ptr);
-
-  /*   130 : Get System Properties */
-  jvmtiError (JNICALL *GetSystemProperties) (jvmtiEnv* env, 
-    jint* count_ptr, 
-    char*** property_ptr);
-
-  /*   131 : Get System Property */
-  jvmtiError (JNICALL *GetSystemProperty) (jvmtiEnv* env, 
-    const char* property, 
-    char** value_ptr);
-
-  /*   132 : Set System Property */
-  jvmtiError (JNICALL *SetSystemProperty) (jvmtiEnv* env, 
-    const char* property, 
-    const char* value);
-
-  /*   133 : Get Phase */
-  jvmtiError (JNICALL *GetPhase) (jvmtiEnv* env, 
-    jvmtiPhase* phase_ptr);
-
-  /*   134 : Get Current Thread CPU Timer Information */
-  jvmtiError (JNICALL *GetCurrentThreadCpuTimerInfo) (jvmtiEnv* env, 
-    jvmtiTimerInfo* info_ptr);
-
-  /*   135 : Get Current Thread CPU Time */
-  jvmtiError (JNICALL *GetCurrentThreadCpuTime) (jvmtiEnv* env, 
-    jlong* nanos_ptr);
-
-  /*   136 : Get Thread CPU Timer Information */
-  jvmtiError (JNICALL *GetThreadCpuTimerInfo) (jvmtiEnv* env, 
-    jvmtiTimerInfo* info_ptr);
-
-  /*   137 : Get Thread CPU Time */
-  jvmtiError (JNICALL *GetThreadCpuTime) (jvmtiEnv* env, 
-    jthread thread, 
-    jlong* nanos_ptr);
-
-  /*   138 : Get Timer Information */
-  jvmtiError (JNICALL *GetTimerInfo) (jvmtiEnv* env, 
-    jvmtiTimerInfo* info_ptr);
-
-  /*   139 : Get Time */
-  jvmtiError (JNICALL *GetTime) (jvmtiEnv* env, 
-    jlong* nanos_ptr);
-
-  /*   140 : Get Potential Capabilities */
-  jvmtiError (JNICALL *GetPotentialCapabilities) (jvmtiEnv* env, 
-    jvmtiCapabilities* capabilities_ptr);
-
-  /*   141 :  RESERVED */
-  void *reserved141;
-
-  /*   142 : Add Capabilities */
-  jvmtiError (JNICALL *AddCapabilities) (jvmtiEnv* env, 
-    const jvmtiCapabilities* capabilities_ptr);
-
-  /*   143 : Relinquish Capabilities */
-  jvmtiError (JNICALL *RelinquishCapabilities) (jvmtiEnv* env, 
-    const jvmtiCapabilities* capabilities_ptr);
-
-  /*   144 : Get Available Processors */
-  jvmtiError (JNICALL *GetAvailableProcessors) (jvmtiEnv* env, 
-    jint* processor_count_ptr);
-
-  /*   145 : Get Class Version Numbers */
-  jvmtiError (JNICALL *GetClassVersionNumbers) (jvmtiEnv* env, 
-    jclass klass, 
-    jint* minor_version_ptr, 
-    jint* major_version_ptr);
-
-  /*   146 : Get Constant Pool */
-  jvmtiError (JNICALL *GetConstantPool) (jvmtiEnv* env, 
-    jclass klass, 
-    jint* constant_pool_count_ptr, 
-    jint* constant_pool_byte_count_ptr, 
-    unsigned char** constant_pool_bytes_ptr);
-
-  /*   147 : Get Environment Local Storage */
-  jvmtiError (JNICALL *GetEnvironmentLocalStorage) (jvmtiEnv* env, 
-    void** data_ptr);
-
-  /*   148 : Set Environment Local Storage */
-  jvmtiError (JNICALL *SetEnvironmentLocalStorage) (jvmtiEnv* env, 
-    const void* data);
-
-  /*   149 : Add To Bootstrap Class Loader Search */
-  jvmtiError (JNICALL *AddToBootstrapClassLoaderSearch) (jvmtiEnv* env, 
-    const char* segment);
-
-  /*   150 : Set Verbose Flag */
-  jvmtiError (JNICALL *SetVerboseFlag) (jvmtiEnv* env, 
-    jvmtiVerboseFlag flag, 
-    jboolean value);
-
-  /*   151 : Add To System Class Loader Search */
-  jvmtiError (JNICALL *AddToSystemClassLoaderSearch) (jvmtiEnv* env, 
-    const char* segment);
-
-  /*   152 : Retransform Classes */
-  jvmtiError (JNICALL *RetransformClasses) (jvmtiEnv* env, 
-    jint class_count, 
-    const jclass* classes);
-
-  /*   153 : Get Owned Monitor Stack Depth Info */
-  jvmtiError (JNICALL *GetOwnedMonitorStackDepthInfo) (jvmtiEnv* env, 
-    jthread thread, 
-    jint* monitor_info_count_ptr, 
-    jvmtiMonitorStackDepthInfo** monitor_info_ptr);
-
-  /*   154 : Get Object Size */
-  jvmtiError (JNICALL *GetObjectSize) (jvmtiEnv* env, 
-    jobject object, 
-    jlong* size_ptr);
-
-} jvmtiInterface_1;
-
-struct _jvmtiEnv {
-    const struct jvmtiInterface_1_ *functions;
-#ifdef __cplusplus
-
-
-  jvmtiError Allocate(jlong size,
-            unsigned char** mem_ptr) {
-    return functions->Allocate(this, size, mem_ptr);
-  }
-
-  jvmtiError Deallocate(unsigned char* mem) {
-    return functions->Deallocate(this, mem);
-  }
-
-  jvmtiError GetThreadState(jthread thread,
-            jint* thread_state_ptr) {
-    return functions->GetThreadState(this, thread, thread_state_ptr);
-  }
-
-  jvmtiError GetCurrentThread(jthread* thread_ptr) {
-    return functions->GetCurrentThread(this, thread_ptr);
-  }
-
-  jvmtiError GetAllThreads(jint* threads_count_ptr,
-            jthread** threads_ptr) {
-    return functions->GetAllThreads(this, threads_count_ptr, threads_ptr);
-  }
-
-  jvmtiError SuspendThread(jthread thread) {
-    return functions->SuspendThread(this, thread);
-  }
-
-  jvmtiError SuspendThreadList(jint request_count,
-            const jthread* request_list,
-            jvmtiError* results) {
-    return functions->SuspendThreadList(this, request_count, request_list, results);
-  }
-
-  jvmtiError ResumeThread(jthread thread) {
-    return functions->ResumeThread(this, thread);
-  }
-
-  jvmtiError ResumeThreadList(jint request_count,
-            const jthread* request_list,
-            jvmtiError* results) {
-    return functions->ResumeThreadList(this, request_count, request_list, results);
-  }
-
-  jvmtiError StopThread(jthread thread,
-            jobject exception) {
-    return functions->StopThread(this, thread, exception);
-  }
-
-  jvmtiError InterruptThread(jthread thread) {
-    return functions->InterruptThread(this, thread);
-  }
-
-  jvmtiError GetThreadInfo(jthread thread,
-            jvmtiThreadInfo* info_ptr) {
-    return functions->GetThreadInfo(this, thread, info_ptr);
-  }
-
-  jvmtiError GetOwnedMonitorInfo(jthread thread,
-            jint* owned_monitor_count_ptr,
-            jobject** owned_monitors_ptr) {
-    return functions->GetOwnedMonitorInfo(this, thread, owned_monitor_count_ptr, owned_monitors_ptr);
-  }
-
-  jvmtiError GetOwnedMonitorStackDepthInfo(jthread thread,
-            jint* monitor_info_count_ptr,
-            jvmtiMonitorStackDepthInfo** monitor_info_ptr) {
-    return functions->GetOwnedMonitorStackDepthInfo(this, thread, monitor_info_count_ptr, monitor_info_ptr);
-  }
-
-  jvmtiError GetCurrentContendedMonitor(jthread thread,
-            jobject* monitor_ptr) {
-    return functions->GetCurrentContendedMonitor(this, thread, monitor_ptr);
-  }
-
-  jvmtiError RunAgentThread(jthread thread,
-            jvmtiStartFunction proc,
-            const void* arg,
-            jint priority) {
-    return functions->RunAgentThread(this, thread, proc, arg, priority);
-  }
-
-  jvmtiError SetThreadLocalStorage(jthread thread,
-            const void* data) {
-    return functions->SetThreadLocalStorage(this, thread, data);
-  }
-
-  jvmtiError GetThreadLocalStorage(jthread thread,
-            void** data_ptr) {
-    return functions->GetThreadLocalStorage(this, thread, data_ptr);
-  }
-
-  jvmtiError GetTopThreadGroups(jint* group_count_ptr,
-            jthreadGroup** groups_ptr) {
-    return functions->GetTopThreadGroups(this, group_count_ptr, groups_ptr);
-  }
-
-  jvmtiError GetThreadGroupInfo(jthreadGroup group,
-            jvmtiThreadGroupInfo* info_ptr) {
-    return functions->GetThreadGroupInfo(this, group, info_ptr);
-  }
-
-  jvmtiError GetThreadGroupChildren(jthreadGroup group,
-            jint* thread_count_ptr,
-            jthread** threads_ptr,
-            jint* group_count_ptr,
-            jthreadGroup** groups_ptr) {
-    return functions->GetThreadGroupChildren(this, group, thread_count_ptr, threads_ptr, group_count_ptr, groups_ptr);
-  }
-
-  jvmtiError GetStackTrace(jthread thread,
-            jint start_depth,
-            jint max_frame_count,
-            jvmtiFrameInfo* frame_buffer,
-            jint* count_ptr) {
-    return functions->GetStackTrace(this, thread, start_depth, max_frame_count, frame_buffer, count_ptr);
-  }
-
-  jvmtiError GetAllStackTraces(jint max_frame_count,
-            jvmtiStackInfo** stack_info_ptr,
-            jint* thread_count_ptr) {
-    return functions->GetAllStackTraces(this, max_frame_count, stack_info_ptr, thread_count_ptr);
-  }
-
-  jvmtiError GetThreadListStackTraces(jint thread_count,
-            const jthread* thread_list,
-            jint max_frame_count,
-            jvmtiStackInfo** stack_info_ptr) {
-    return functions->GetThreadListStackTraces(this, thread_count, thread_list, max_frame_count, stack_info_ptr);
-  }
-
-  jvmtiError GetFrameCount(jthread thread,
-            jint* count_ptr) {
-    return functions->GetFrameCount(this, thread, count_ptr);
-  }
-
-  jvmtiError PopFrame(jthread thread) {
-    return functions->PopFrame(this, thread);
-  }
-
-  jvmtiError GetFrameLocation(jthread thread,
-            jint depth,
-            jmethodID* method_ptr,
-            jlocation* location_ptr) {
-    return functions->GetFrameLocation(this, thread, depth, method_ptr, location_ptr);
-  }
-
-  jvmtiError NotifyFramePop(jthread thread,
-            jint depth) {
-    return functions->NotifyFramePop(this, thread, depth);
-  }
-
-  jvmtiError ForceEarlyReturnObject(jthread thread,
-            jobject value) {
-    return functions->ForceEarlyReturnObject(this, thread, value);
-  }
-
-  jvmtiError ForceEarlyReturnInt(jthread thread,
-            jint value) {
-    return functions->ForceEarlyReturnInt(this, thread, value);
-  }
-
-  jvmtiError ForceEarlyReturnLong(jthread thread,
-            jlong value) {
-    return functions->ForceEarlyReturnLong(this, thread, value);
-  }
-
-  jvmtiError ForceEarlyReturnFloat(jthread thread,
-            jfloat value) {
-    return functions->ForceEarlyReturnFloat(this, thread, value);
-  }
-
-  jvmtiError ForceEarlyReturnDouble(jthread thread,
-            jdouble value) {
-    return functions->ForceEarlyReturnDouble(this, thread, value);
-  }
-
-  jvmtiError ForceEarlyReturnVoid(jthread thread) {
-    return functions->ForceEarlyReturnVoid(this, thread);
-  }
-
-  jvmtiError FollowReferences(jint heap_filter,
-            jclass klass,
-            jobject initial_object,
-            const jvmtiHeapCallbacks* callbacks,
-            const void* user_data) {
-    return functions->FollowReferences(this, heap_filter, klass, initial_object, callbacks, user_data);
-  }
-
-  jvmtiError IterateThroughHeap(jint heap_filter,
-            jclass klass,
-            const jvmtiHeapCallbacks* callbacks,
-            const void* user_data) {
-    return functions->IterateThroughHeap(this, heap_filter, klass, callbacks, user_data);
-  }
-
-  jvmtiError GetTag(jobject object,
-            jlong* tag_ptr) {
-    return functions->GetTag(this, object, tag_ptr);
-  }
-
-  jvmtiError SetTag(jobject object,
-            jlong tag) {
-    return functions->SetTag(this, object, tag);
-  }
-
-  jvmtiError GetObjectsWithTags(jint tag_count,
-            const jlong* tags,
-            jint* count_ptr,
-            jobject** object_result_ptr,
-            jlong** tag_result_ptr) {
-    return functions->GetObjectsWithTags(this, tag_count, tags, count_ptr, object_result_ptr, tag_result_ptr);
-  }
-
-  jvmtiError ForceGarbageCollection() {
-    return functions->ForceGarbageCollection(this);
-  }
-
-  jvmtiError IterateOverObjectsReachableFromObject(jobject object,
-            jvmtiObjectReferenceCallback object_reference_callback,
-            const void* user_data) {
-    return functions->IterateOverObjectsReachableFromObject(this, object, object_reference_callback, user_data);
-  }
-
-  jvmtiError IterateOverReachableObjects(jvmtiHeapRootCallback heap_root_callback,
-            jvmtiStackReferenceCallback stack_ref_callback,
-            jvmtiObjectReferenceCallback object_ref_callback,
-            const void* user_data) {
-    return functions->IterateOverReachableObjects(this, heap_root_callback, stack_ref_callback, object_ref_callback, user_data);
-  }
-
-  jvmtiError IterateOverHeap(jvmtiHeapObjectFilter object_filter,
-            jvmtiHeapObjectCallback heap_object_callback,
-            const void* user_data) {
-    return functions->IterateOverHeap(this, object_filter, heap_object_callback, user_data);
-  }
-
-  jvmtiError IterateOverInstancesOfClass(jclass klass,
-            jvmtiHeapObjectFilter object_filter,
-            jvmtiHeapObjectCallback heap_object_callback,
-            const void* user_data) {
-    return functions->IterateOverInstancesOfClass(this, klass, object_filter, heap_object_callback, user_data);
-  }
-
-  jvmtiError GetLocalObject(jthread thread,
-            jint depth,
-            jint slot,
-            jobject* value_ptr) {
-    return functions->GetLocalObject(this, thread, depth, slot, value_ptr);
-  }
-
-  jvmtiError GetLocalInt(jthread thread,
-            jint depth,
-            jint slot,
-            jint* value_ptr) {
-    return functions->GetLocalInt(this, thread, depth, slot, value_ptr);
-  }
-
-  jvmtiError GetLocalLong(jthread thread,
-            jint depth,
-            jint slot,
-            jlong* value_ptr) {
-    return functions->GetLocalLong(this, thread, depth, slot, value_ptr);
-  }
-
-  jvmtiError GetLocalFloat(jthread thread,
-            jint depth,
-            jint slot,
-            jfloat* value_ptr) {
-    return functions->GetLocalFloat(this, thread, depth, slot, value_ptr);
-  }
-
-  jvmtiError GetLocalDouble(jthread thread,
-            jint depth,
-            jint slot,
-            jdouble* value_ptr) {
-    return functions->GetLocalDouble(this, thread, depth, slot, value_ptr);
-  }
-
-  jvmtiError SetLocalObject(jthread thread,
-            jint depth,
-            jint slot,
-            jobject value) {
-    return functions->SetLocalObject(this, thread, depth, slot, value);
-  }
-
-  jvmtiError SetLocalInt(jthread thread,
-            jint depth,
-            jint slot,
-            jint value) {
-    return functions->SetLocalInt(this, thread, depth, slot, value);
-  }
-
-  jvmtiError SetLocalLong(jthread thread,
-            jint depth,
-            jint slot,
-            jlong value) {
-    return functions->SetLocalLong(this, thread, depth, slot, value);
-  }
-
-  jvmtiError SetLocalFloat(jthread thread,
-            jint depth,
-            jint slot,
-            jfloat value) {
-    return functions->SetLocalFloat(this, thread, depth, slot, value);
-  }
-
-  jvmtiError SetLocalDouble(jthread thread,
-            jint depth,
-            jint slot,
-            jdouble value) {
-    return functions->SetLocalDouble(this, thread, depth, slot, value);
-  }
-
-  jvmtiError SetBreakpoint(jmethodID method,
-            jlocation location) {
-    return functions->SetBreakpoint(this, method, location);
-  }
-
-  jvmtiError ClearBreakpoint(jmethodID method,
-            jlocation location) {
-    return functions->ClearBreakpoint(this, method, location);
-  }
-
-  jvmtiError SetFieldAccessWatch(jclass klass,
-            jfieldID field) {
-    return functions->SetFieldAccessWatch(this, klass, field);
-  }
-
-  jvmtiError ClearFieldAccessWatch(jclass klass,
-            jfieldID field) {
-    return functions->ClearFieldAccessWatch(this, klass, field);
-  }
-
-  jvmtiError SetFieldModificationWatch(jclass klass,
-            jfieldID field) {
-    return functions->SetFieldModificationWatch(this, klass, field);
-  }
-
-  jvmtiError ClearFieldModificationWatch(jclass klass,
-            jfieldID field) {
-    return functions->ClearFieldModificationWatch(this, klass, field);
-  }
-
-  jvmtiError GetLoadedClasses(jint* class_count_ptr,
-            jclass** classes_ptr) {
-    return functions->GetLoadedClasses(this, class_count_ptr, classes_ptr);
-  }
-
-  jvmtiError GetClassLoaderClasses(jobject initiating_loader,
-            jint* class_count_ptr,
-            jclass** classes_ptr) {
-    return functions->GetClassLoaderClasses(this, initiating_loader, class_count_ptr, classes_ptr);
-  }
-
-  jvmtiError GetClassSignature(jclass klass,
-            char** signature_ptr,
-            char** generic_ptr) {
-    return functions->GetClassSignature(this, klass, signature_ptr, generic_ptr);
-  }
-
-  jvmtiError GetClassStatus(jclass klass,
-            jint* status_ptr) {
-    return functions->GetClassStatus(this, klass, status_ptr);
-  }
-
-  jvmtiError GetSourceFileName(jclass klass,
-            char** source_name_ptr) {
-    return functions->GetSourceFileName(this, klass, source_name_ptr);
-  }
-
-  jvmtiError GetClassModifiers(jclass klass,
-            jint* modifiers_ptr) {
-    return functions->GetClassModifiers(this, klass, modifiers_ptr);
-  }
-
-  jvmtiError GetClassMethods(jclass klass,
-            jint* method_count_ptr,
-            jmethodID** methods_ptr) {
-    return functions->GetClassMethods(this, klass, method_count_ptr, methods_ptr);
-  }
-
-  jvmtiError GetClassFields(jclass klass,
-            jint* field_count_ptr,
-            jfieldID** fields_ptr) {
-    return functions->GetClassFields(this, klass, field_count_ptr, fields_ptr);
-  }
-
-  jvmtiError GetImplementedInterfaces(jclass klass,
-            jint* interface_count_ptr,
-            jclass** interfaces_ptr) {
-    return functions->GetImplementedInterfaces(this, klass, interface_count_ptr, interfaces_ptr);
-  }
-
-  jvmtiError GetClassVersionNumbers(jclass klass,
-            jint* minor_version_ptr,
-            jint* major_version_ptr) {
-    return functions->GetClassVersionNumbers(this, klass, minor_version_ptr, major_version_ptr);
-  }
-
-  jvmtiError GetConstantPool(jclass klass,
-            jint* constant_pool_count_ptr,
-            jint* constant_pool_byte_count_ptr,
-            unsigned char** constant_pool_bytes_ptr) {
-    return functions->GetConstantPool(this, klass, constant_pool_count_ptr, constant_pool_byte_count_ptr, constant_pool_bytes_ptr);
-  }
-
-  jvmtiError IsInterface(jclass klass,
-            jboolean* is_interface_ptr) {
-    return functions->IsInterface(this, klass, is_interface_ptr);
-  }
-
-  jvmtiError IsArrayClass(jclass klass,
-            jboolean* is_array_class_ptr) {
-    return functions->IsArrayClass(this, klass, is_array_class_ptr);
-  }
-
-  jvmtiError IsModifiableClass(jclass klass,
-            jboolean* is_modifiable_class_ptr) {
-    return functions->IsModifiableClass(this, klass, is_modifiable_class_ptr);
-  }
-
-  jvmtiError GetClassLoader(jclass klass,
-            jobject* classloader_ptr) {
-    return functions->GetClassLoader(this, klass, classloader_ptr);
-  }
-
-  jvmtiError GetSourceDebugExtension(jclass klass,
-            char** source_debug_extension_ptr) {
-    return functions->GetSourceDebugExtension(this, klass, source_debug_extension_ptr);
-  }
-
-  jvmtiError RetransformClasses(jint class_count,
-            const jclass* classes) {
-    return functions->RetransformClasses(this, class_count, classes);
-  }
-
-  jvmtiError RedefineClasses(jint class_count,
-            const jvmtiClassDefinition* class_definitions) {
-    return functions->RedefineClasses(this, class_count, class_definitions);
-  }
-
-  jvmtiError GetObjectSize(jobject object,
-            jlong* size_ptr) {
-    return functions->GetObjectSize(this, object, size_ptr);
-  }
-
-  jvmtiError GetObjectHashCode(jobject object,
-            jint* hash_code_ptr) {
-    return functions->GetObjectHashCode(this, object, hash_code_ptr);
-  }
-
-  jvmtiError GetObjectMonitorUsage(jobject object,
-            jvmtiMonitorUsage* info_ptr) {
-    return functions->GetObjectMonitorUsage(this, object, info_ptr);
-  }
-
-  jvmtiError GetFieldName(jclass klass,
-            jfieldID field,
-            char** name_ptr,
-            char** signature_ptr,
-            char** generic_ptr) {
-    return functions->GetFieldName(this, klass, field, name_ptr, signature_ptr, generic_ptr);
-  }
-
-  jvmtiError GetFieldDeclaringClass(jclass klass,
-            jfieldID field,
-            jclass* declaring_class_ptr) {
-    return functions->GetFieldDeclaringClass(this, klass, field, declaring_class_ptr);
-  }
-
-  jvmtiError GetFieldModifiers(jclass klass,
-            jfieldID field,
-            jint* modifiers_ptr) {
-    return functions->GetFieldModifiers(this, klass, field, modifiers_ptr);
-  }
-
-  jvmtiError IsFieldSynthetic(jclass klass,
-            jfieldID field,
-            jboolean* is_synthetic_ptr) {
-    return functions->IsFieldSynthetic(this, klass, field, is_synthetic_ptr);
-  }
-
-  jvmtiError GetMethodName(jmethodID method,
-            char** name_ptr,
-            char** signature_ptr,
-            char** generic_ptr) {
-    return functions->GetMethodName(this, method, name_ptr, signature_ptr, generic_ptr);
-  }
-
-  jvmtiError GetMethodDeclaringClass(jmethodID method,
-            jclass* declaring_class_ptr) {
-    return functions->GetMethodDeclaringClass(this, method, declaring_class_ptr);
-  }
-
-  jvmtiError GetMethodModifiers(jmethodID method,
-            jint* modifiers_ptr) {
-    return functions->GetMethodModifiers(this, method, modifiers_ptr);
-  }
-
-  jvmtiError GetMaxLocals(jmethodID method,
-            jint* max_ptr) {
-    return functions->GetMaxLocals(this, method, max_ptr);
-  }
-
-  jvmtiError GetArgumentsSize(jmethodID method,
-            jint* size_ptr) {
-    return functions->GetArgumentsSize(this, method, size_ptr);
-  }
-
-  jvmtiError GetLineNumberTable(jmethodID method,
-            jint* entry_count_ptr,
-            jvmtiLineNumberEntry** table_ptr) {
-    return functions->GetLineNumberTable(this, method, entry_count_ptr, table_ptr);
-  }
-
-  jvmtiError GetMethodLocation(jmethodID method,
-            jlocation* start_location_ptr,
-            jlocation* end_location_ptr) {
-    return functions->GetMethodLocation(this, method, start_location_ptr, end_location_ptr);
-  }
-
-  jvmtiError GetLocalVariableTable(jmethodID method,
-            jint* entry_count_ptr,
-            jvmtiLocalVariableEntry** table_ptr) {
-    return functions->GetLocalVariableTable(this, method, entry_count_ptr, table_ptr);
-  }
-
-  jvmtiError GetBytecodes(jmethodID method,
-            jint* bytecode_count_ptr,
-            unsigned char** bytecodes_ptr) {
-    return functions->GetBytecodes(this, method, bytecode_count_ptr, bytecodes_ptr);
-  }
-
-  jvmtiError IsMethodNative(jmethodID method,
-            jboolean* is_native_ptr) {
-    return functions->IsMethodNative(this, method, is_native_ptr);
-  }
-
-  jvmtiError IsMethodSynthetic(jmethodID method,
-            jboolean* is_synthetic_ptr) {
-    return functions->IsMethodSynthetic(this, method, is_synthetic_ptr);
-  }
-
-  jvmtiError IsMethodObsolete(jmethodID method,
-            jboolean* is_obsolete_ptr) {
-    return functions->IsMethodObsolete(this, method, is_obsolete_ptr);
-  }
-
-  jvmtiError SetNativeMethodPrefix(const char* prefix) {
-    return functions->SetNativeMethodPrefix(this, prefix);
-  }
-
-  jvmtiError SetNativeMethodPrefixes(jint prefix_count,
-            char** prefixes) {
-    return functions->SetNativeMethodPrefixes(this, prefix_count, prefixes);
-  }
-
-  jvmtiError CreateRawMonitor(const char* name,
-            jrawMonitorID* monitor_ptr) {
-    return functions->CreateRawMonitor(this, name, monitor_ptr);
-  }
-
-  jvmtiError DestroyRawMonitor(jrawMonitorID monitor) {
-    return functions->DestroyRawMonitor(this, monitor);
-  }
-
-  jvmtiError RawMonitorEnter(jrawMonitorID monitor) {
-    return functions->RawMonitorEnter(this, monitor);
-  }
-
-  jvmtiError RawMonitorExit(jrawMonitorID monitor) {
-    return functions->RawMonitorExit(this, monitor);
-  }
-
-  jvmtiError RawMonitorWait(jrawMonitorID monitor,
-            jlong millis) {
-    return functions->RawMonitorWait(this, monitor, millis);
-  }
-
-  jvmtiError RawMonitorNotify(jrawMonitorID monitor) {
-    return functions->RawMonitorNotify(this, monitor);
-  }
-
-  jvmtiError RawMonitorNotifyAll(jrawMonitorID monitor) {
-    return functions->RawMonitorNotifyAll(this, monitor);
-  }
-
-  jvmtiError SetJNIFunctionTable(const jniNativeInterface* function_table) {
-    return functions->SetJNIFunctionTable(this, function_table);
-  }
-
-  jvmtiError GetJNIFunctionTable(jniNativeInterface** function_table) {
-    return functions->GetJNIFunctionTable(this, function_table);
-  }
-
-  jvmtiError SetEventCallbacks(const jvmtiEventCallbacks* callbacks,
-            jint size_of_callbacks) {
-    return functions->SetEventCallbacks(this, callbacks, size_of_callbacks);
-  }
-
-  jvmtiError SetEventNotificationMode(jvmtiEventMode mode,
-            jvmtiEvent event_type,
-            jthread event_thread,
-             ...) {
-    return functions->SetEventNotificationMode(this, mode, event_type, event_thread);
-  }
-
-  jvmtiError GenerateEvents(jvmtiEvent event_type) {
-    return functions->GenerateEvents(this, event_type);
-  }
-
-  jvmtiError GetExtensionFunctions(jint* extension_count_ptr,
-            jvmtiExtensionFunctionInfo** extensions) {
-    return functions->GetExtensionFunctions(this, extension_count_ptr, extensions);
-  }
-
-  jvmtiError GetExtensionEvents(jint* extension_count_ptr,
-            jvmtiExtensionEventInfo** extensions) {
-    return functions->GetExtensionEvents(this, extension_count_ptr, extensions);
-  }
-
-  jvmtiError SetExtensionEventCallback(jint extension_event_index,
-            jvmtiExtensionEvent callback) {
-    return functions->SetExtensionEventCallback(this, extension_event_index, callback);
-  }
-
-  jvmtiError GetPotentialCapabilities(jvmtiCapabilities* capabilities_ptr) {
-    return functions->GetPotentialCapabilities(this, capabilities_ptr);
-  }
-
-  jvmtiError AddCapabilities(const jvmtiCapabilities* capabilities_ptr) {
-    return functions->AddCapabilities(this, capabilities_ptr);
-  }
-
-  jvmtiError RelinquishCapabilities(const jvmtiCapabilities* capabilities_ptr) {
-    return functions->RelinquishCapabilities(this, capabilities_ptr);
-  }
-
-  jvmtiError GetCapabilities(jvmtiCapabilities* capabilities_ptr) {
-    return functions->GetCapabilities(this, capabilities_ptr);
-  }
-
-  jvmtiError GetCurrentThreadCpuTimerInfo(jvmtiTimerInfo* info_ptr) {
-    return functions->GetCurrentThreadCpuTimerInfo(this, info_ptr);
-  }
-
-  jvmtiError GetCurrentThreadCpuTime(jlong* nanos_ptr) {
-    return functions->GetCurrentThreadCpuTime(this, nanos_ptr);
-  }
-
-  jvmtiError GetThreadCpuTimerInfo(jvmtiTimerInfo* info_ptr) {
-    return functions->GetThreadCpuTimerInfo(this, info_ptr);
-  }
-
-  jvmtiError GetThreadCpuTime(jthread thread,
-            jlong* nanos_ptr) {
-    return functions->GetThreadCpuTime(this, thread, nanos_ptr);
-  }
-
-  jvmtiError GetTimerInfo(jvmtiTimerInfo* info_ptr) {
-    return functions->GetTimerInfo(this, info_ptr);
-  }
-
-  jvmtiError GetTime(jlong* nanos_ptr) {
-    return functions->GetTime(this, nanos_ptr);
-  }
-
-  jvmtiError GetAvailableProcessors(jint* processor_count_ptr) {
-    return functions->GetAvailableProcessors(this, processor_count_ptr);
-  }
-
-  jvmtiError AddToBootstrapClassLoaderSearch(const char* segment) {
-    return functions->AddToBootstrapClassLoaderSearch(this, segment);
-  }
-
-  jvmtiError AddToSystemClassLoaderSearch(const char* segment) {
-    return functions->AddToSystemClassLoaderSearch(this, segment);
-  }
-
-  jvmtiError GetSystemProperties(jint* count_ptr,
-            char*** property_ptr) {
-    return functions->GetSystemProperties(this, count_ptr, property_ptr);
-  }
-
-  jvmtiError GetSystemProperty(const char* property,
-            char** value_ptr) {
-    return functions->GetSystemProperty(this, property, value_ptr);
-  }
-
-  jvmtiError SetSystemProperty(const char* property,
-            const char* value) {
-    return functions->SetSystemProperty(this, property, value);
-  }
-
-  jvmtiError GetPhase(jvmtiPhase* phase_ptr) {
-    return functions->GetPhase(this, phase_ptr);
-  }
-
-  jvmtiError DisposeEnvironment() {
-    return functions->DisposeEnvironment(this);
-  }
-
-  jvmtiError SetEnvironmentLocalStorage(const void* data) {
-    return functions->SetEnvironmentLocalStorage(this, data);
-  }
-
-  jvmtiError GetEnvironmentLocalStorage(void** data_ptr) {
-    return functions->GetEnvironmentLocalStorage(this, data_ptr);
-  }
-
-  jvmtiError GetVersionNumber(jint* version_ptr) {
-    return functions->GetVersionNumber(this, version_ptr);
-  }
-
-  jvmtiError GetErrorName(jvmtiError error,
-            char** name_ptr) {
-    return functions->GetErrorName(this, error, name_ptr);
-  }
-
-  jvmtiError SetVerboseFlag(jvmtiVerboseFlag flag,
-            jboolean value) {
-    return functions->SetVerboseFlag(this, flag, value);
-  }
-
-  jvmtiError GetJLocationFormat(jvmtiJlocationFormat* format_ptr) {
-    return functions->GetJLocationFormat(this, format_ptr);
-  }
-
-#endif /* __cplusplus */
-};
-
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif /* __cplusplus */
-
-#endif /* !_JAVA_JVMTI_H_ */
-
diff --git a/make/stub_includes/jni/macosx/AWTCocoaComponent.h b/make/stub_includes/jni/macosx/AWTCocoaComponent.h
deleted file mode 100644
index 8f004c5..0000000
--- a/make/stub_includes/jni/macosx/AWTCocoaComponent.h
+++ /dev/null
@@ -1,15 +0,0 @@
-//
-//  AWTCocoaComponent.h
-//
-//  Copyright (c) 2003 Apple Computer Inc. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-#import <JavaVM/jni.h>
-
-// This is implemented by a com.apple.eawt.CocoaComponent. It receives messages
-//  from java safely on the AppKit thread. See the com.apple.eawt.CocoaComponent
-//  java documentation for more information.
- at protocol AWTCocoaComponent
--(void)awtMessage:(jint)messageID message:(jobject)message env:(JNIEnv*)env;
- at end
diff --git a/make/stub_includes/jni/macosx/JDWP.h b/make/stub_includes/jni/macosx/JDWP.h
deleted file mode 100644
index 9f359e0..0000000
--- a/make/stub_includes/jni/macosx/JDWP.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * @(#)JDWP.h	1.31 03/12/19
- *
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
- * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
- */
-
-#ifndef JDWP_JDWP_H
-#define JDWP_JDWP_H
-
-#include "JDWPCommands.h"
-
-/*                         
- * JDWPCommands.h is the javah'ed version of all the constants defined
- * com.sun.tools.jdi.JDWP and all its nested classes. Since the names are
- * very long, the macros below are provided for convenience.
- */
- 
-#define JDWP_COMMAND_SET(name) JDWP_ ## name 
-#define JDWP_COMMAND(set, name) JDWP_ ## set ## _ ## name
-#define JDWP_REQUEST_MODIFIER(name) \
-           JDWP_EventRequest_Set_Out_modifiers_Modifier_ ## name
-#define JDWP_EVENT(name) \
-           JDWP_EventKind_ ## name 
-#define JDWP_THREAD_STATUS(name) \
-           JDWP_ThreadStatus_ ## name 
-#define JDWP_SUSPEND_STATUS(name) \
-           JDWP_SuspendStatus_SUSPEND_STATUS_ ## name 
-#define JDWP_CLASS_STATUS(name) \
-           JDWP_ClassStatus_ ## name 
-#define JDWP_TYPE_TAG(name) \
-           JDWP_TypeTag_ ## name 
-#define JDWP_TAG(name) \
-           JDWP_Tag_ ## name 
-#define JDWP_STEP_DEPTH(name) \
-           JDWP_StepDepth_ ## name 
-#define JDWP_STEP_SIZE(name) \
-           JDWP_StepSize_ ## name 
-#define JDWP_SUSPEND_POLICY(name) \
-           JDWP_SuspendPolicy_ ## name 
-#define JDWP_INVOKE_OPTIONS(name) \
-           JDWP_InvokeOptions_INVOKE_ ## name 
-#define JDWP_ERROR(name) \
-	   JDWP_Error_ ## name
-#define JDWP_HIGHEST_COMMAND_SET 17
-#define JDWP_REQUEST_NONE        -1
-
-/* This typedef helps keep the event and error types straight. */
-typedef unsigned short jdwpError;
-typedef unsigned char  jdwpEvent;
-typedef jint           jdwpThreadStatus;
-
-#endif
diff --git a/make/stub_includes/jni/macosx/JDWPCommands.h b/make/stub_includes/jni/macosx/JDWPCommands.h
deleted file mode 100644
index f5011b2..0000000
--- a/make/stub_includes/jni/macosx/JDWPCommands.h
+++ /dev/null
@@ -1,238 +0,0 @@
-#define JDWP_VirtualMachine 1
-#define JDWP_VirtualMachine_Version 1
-#define JDWP_VirtualMachine_ClassesBySignature 2
-#define JDWP_VirtualMachine_AllClasses 3
-#define JDWP_VirtualMachine_AllThreads 4
-#define JDWP_VirtualMachine_TopLevelThreadGroups 5
-#define JDWP_VirtualMachine_Dispose 6
-#define JDWP_VirtualMachine_IDSizes 7
-#define JDWP_VirtualMachine_Suspend 8
-#define JDWP_VirtualMachine_Resume 9
-#define JDWP_VirtualMachine_Exit 10
-#define JDWP_VirtualMachine_CreateString 11
-#define JDWP_VirtualMachine_Capabilities 12
-#define JDWP_VirtualMachine_ClassPaths 13
-#define JDWP_VirtualMachine_DisposeObjects 14
-#define JDWP_VirtualMachine_HoldEvents 15
-#define JDWP_VirtualMachine_ReleaseEvents 16
-#define JDWP_VirtualMachine_CapabilitiesNew 17
-#define JDWP_VirtualMachine_RedefineClasses 18
-#define JDWP_VirtualMachine_SetDefaultStratum 19
-#define JDWP_VirtualMachine_AllClassesWithGeneric 20
-#define JDWP_ReferenceType 2
-#define JDWP_ReferenceType_Signature 1
-#define JDWP_ReferenceType_ClassLoader 2
-#define JDWP_ReferenceType_Modifiers 3
-#define JDWP_ReferenceType_Fields 4
-#define JDWP_ReferenceType_Methods 5
-#define JDWP_ReferenceType_GetValues 6
-#define JDWP_ReferenceType_SourceFile 7
-#define JDWP_ReferenceType_NestedTypes 8
-#define JDWP_ReferenceType_Status 9
-#define JDWP_ReferenceType_Interfaces 10
-#define JDWP_ReferenceType_ClassObject 11
-#define JDWP_ReferenceType_SourceDebugExtension 12
-#define JDWP_ReferenceType_SignatureWithGeneric 13
-#define JDWP_ReferenceType_FieldsWithGeneric 14
-#define JDWP_ReferenceType_MethodsWithGeneric 15
-#define JDWP_ClassType 3
-#define JDWP_ClassType_Superclass 1
-#define JDWP_ClassType_SetValues 2
-#define JDWP_ClassType_InvokeMethod 3
-#define JDWP_ClassType_NewInstance 4
-#define JDWP_ArrayType 4
-#define JDWP_ArrayType_NewInstance 1
-#define JDWP_InterfaceType 5
-#define JDWP_Method 6
-#define JDWP_Method_LineTable 1
-#define JDWP_Method_VariableTable 2
-#define JDWP_Method_Bytecodes 3
-#define JDWP_Method_IsObsolete 4
-#define JDWP_Method_VariableTableWithGeneric 5
-#define JDWP_Field 8
-#define JDWP_ObjectReference 9
-#define JDWP_ObjectReference_ReferenceType 1
-#define JDWP_ObjectReference_GetValues 2
-#define JDWP_ObjectReference_SetValues 3
-#define JDWP_ObjectReference_MonitorInfo 5
-#define JDWP_ObjectReference_InvokeMethod 6
-#define JDWP_ObjectReference_DisableCollection 7
-#define JDWP_ObjectReference_EnableCollection 8
-#define JDWP_ObjectReference_IsCollected 9
-#define JDWP_StringReference 10
-#define JDWP_StringReference_Value 1
-#define JDWP_ThreadReference 11
-#define JDWP_ThreadReference_Name 1
-#define JDWP_ThreadReference_Suspend 2
-#define JDWP_ThreadReference_Resume 3
-#define JDWP_ThreadReference_Status 4
-#define JDWP_ThreadReference_ThreadGroup 5
-#define JDWP_ThreadReference_Frames 6
-#define JDWP_ThreadReference_FrameCount 7
-#define JDWP_ThreadReference_OwnedMonitors 8
-#define JDWP_ThreadReference_CurrentContendedMonitor 9
-#define JDWP_ThreadReference_Stop 10
-#define JDWP_ThreadReference_Interrupt 11
-#define JDWP_ThreadReference_SuspendCount 12
-#define JDWP_ThreadGroupReference 12
-#define JDWP_ThreadGroupReference_Name 1
-#define JDWP_ThreadGroupReference_Parent 2
-#define JDWP_ThreadGroupReference_Children 3
-#define JDWP_ArrayReference 13
-#define JDWP_ArrayReference_Length 1
-#define JDWP_ArrayReference_GetValues 2
-#define JDWP_ArrayReference_SetValues 3
-#define JDWP_ClassLoaderReference 14
-#define JDWP_ClassLoaderReference_VisibleClasses 1
-#define JDWP_EventRequest 15
-#define JDWP_EventRequest_Set 1
-#define JDWP_EventRequest_Set_Out_modifiers_Modifier_Count 1
-#define JDWP_EventRequest_Set_Out_modifiers_Modifier_Conditional 2
-#define JDWP_EventRequest_Set_Out_modifiers_Modifier_ThreadOnly 3
-#define JDWP_EventRequest_Set_Out_modifiers_Modifier_ClassOnly 4
-#define JDWP_EventRequest_Set_Out_modifiers_Modifier_ClassMatch 5
-#define JDWP_EventRequest_Set_Out_modifiers_Modifier_ClassExclude 6
-#define JDWP_EventRequest_Set_Out_modifiers_Modifier_LocationOnly 7
-#define JDWP_EventRequest_Set_Out_modifiers_Modifier_ExceptionOnly 8
-#define JDWP_EventRequest_Set_Out_modifiers_Modifier_FieldOnly 9
-#define JDWP_EventRequest_Set_Out_modifiers_Modifier_Step 10
-#define JDWP_EventRequest_Set_Out_modifiers_Modifier_InstanceOnly 11
-#define JDWP_EventRequest_Clear 2
-#define JDWP_EventRequest_ClearAllBreakpoints 3
-#define JDWP_StackFrame 16
-#define JDWP_StackFrame_GetValues 1
-#define JDWP_StackFrame_SetValues 2
-#define JDWP_StackFrame_ThisObject 3
-#define JDWP_StackFrame_PopFrames 4
-#define JDWP_ClassObjectReference 17
-#define JDWP_ClassObjectReference_ReflectedType 1
-#define JDWP_Event 64
-#define JDWP_Event_Composite 100
-#define JDWP_Event_Composite_Event_events_Events_VMStart JDWP.EventKind.VM_START
-#define JDWP_Event_Composite_Event_events_Events_SingleStep JDWP.EventKind.SINGLE_STEP
-#define JDWP_Event_Composite_Event_events_Events_Breakpoint JDWP.EventKind.BREAKPOINT
-#define JDWP_Event_Composite_Event_events_Events_MethodEntry JDWP.EventKind.METHOD_ENTRY
-#define JDWP_Event_Composite_Event_events_Events_MethodExit JDWP.EventKind.METHOD_EXIT
-#define JDWP_Event_Composite_Event_events_Events_Exception JDWP.EventKind.EXCEPTION
-#define JDWP_Event_Composite_Event_events_Events_ThreadStart JDWP.EventKind.THREAD_START
-#define JDWP_Event_Composite_Event_events_Events_ThreadDeath JDWP.EventKind.THREAD_DEATH
-#define JDWP_Event_Composite_Event_events_Events_ClassPrepare JDWP.EventKind.CLASS_PREPARE
-#define JDWP_Event_Composite_Event_events_Events_ClassUnload JDWP.EventKind.CLASS_UNLOAD
-#define JDWP_Event_Composite_Event_events_Events_FieldAccess JDWP.EventKind.FIELD_ACCESS
-#define JDWP_Event_Composite_Event_events_Events_FieldModification JDWP.EventKind.FIELD_MODIFICATION
-#define JDWP_Event_Composite_Event_events_Events_VMDeath JDWP.EventKind.VM_DEATH
-#define JDWP_Error_NONE 0
-#define JDWP_Error_INVALID_THREAD 10
-#define JDWP_Error_INVALID_THREAD_GROUP 11
-#define JDWP_Error_INVALID_PRIORITY 12
-#define JDWP_Error_THREAD_NOT_SUSPENDED 13
-#define JDWP_Error_THREAD_SUSPENDED 14
-#define JDWP_Error_INVALID_OBJECT 20
-#define JDWP_Error_INVALID_CLASS 21
-#define JDWP_Error_CLASS_NOT_PREPARED 22
-#define JDWP_Error_INVALID_METHODID 23
-#define JDWP_Error_INVALID_LOCATION 24
-#define JDWP_Error_INVALID_FIELDID 25
-#define JDWP_Error_INVALID_FRAMEID 30
-#define JDWP_Error_NO_MORE_FRAMES 31
-#define JDWP_Error_OPAQUE_FRAME 32
-#define JDWP_Error_NOT_CURRENT_FRAME 33
-#define JDWP_Error_TYPE_MISMATCH 34
-#define JDWP_Error_INVALID_SLOT 35
-#define JDWP_Error_DUPLICATE 40
-#define JDWP_Error_NOT_FOUND 41
-#define JDWP_Error_INVALID_MONITOR 50
-#define JDWP_Error_NOT_MONITOR_OWNER 51
-#define JDWP_Error_INTERRUPT 52
-#define JDWP_Error_INVALID_CLASS_FORMAT 60
-#define JDWP_Error_CIRCULAR_CLASS_DEFINITION 61
-#define JDWP_Error_FAILS_VERIFICATION 62
-#define JDWP_Error_ADD_METHOD_NOT_IMPLEMENTED 63
-#define JDWP_Error_SCHEMA_CHANGE_NOT_IMPLEMENTED 64
-#define JDWP_Error_INVALID_TYPESTATE 65
-#define JDWP_Error_HIERARCHY_CHANGE_NOT_IMPLEMENTED 66
-#define JDWP_Error_DELETE_METHOD_NOT_IMPLEMENTED 67
-#define JDWP_Error_UNSUPPORTED_VERSION 68
-#define JDWP_Error_NAMES_DONT_MATCH 69
-#define JDWP_Error_CLASS_MODIFIERS_CHANGE_NOT_IMPLEMENTED 70
-#define JDWP_Error_METHOD_MODIFIERS_CHANGE_NOT_IMPLEMENTED 71
-#define JDWP_Error_NOT_IMPLEMENTED 99
-#define JDWP_Error_NULL_POINTER 100
-#define JDWP_Error_ABSENT_INFORMATION 101
-#define JDWP_Error_INVALID_EVENT_TYPE 102
-#define JDWP_Error_ILLEGAL_ARGUMENT 103
-#define JDWP_Error_OUT_OF_MEMORY 110
-#define JDWP_Error_ACCESS_DENIED 111
-#define JDWP_Error_VM_DEAD 112
-#define JDWP_Error_INTERNAL 113
-#define JDWP_Error_UNATTACHED_THREAD 115
-#define JDWP_Error_INVALID_TAG 500
-#define JDWP_Error_ALREADY_INVOKING 502
-#define JDWP_Error_INVALID_INDEX 503
-#define JDWP_Error_INVALID_LENGTH 504
-#define JDWP_Error_INVALID_STRING 506
-#define JDWP_Error_INVALID_CLASS_LOADER 507
-#define JDWP_Error_INVALID_ARRAY 508
-#define JDWP_Error_TRANSPORT_LOAD 509
-#define JDWP_Error_TRANSPORT_INIT 510
-#define JDWP_Error_NATIVE_METHOD 511
-#define JDWP_Error_INVALID_COUNT 512
-#define JDWP_EventKind_VM_DISCONNECTED 100
-#define JDWP_EventKind_VM_START JDWP.EventKind.VM_INIT
-#define JDWP_EventKind_THREAD_DEATH JDWP.EventKind.THREAD_END
-#define JDWP_EventKind_SINGLE_STEP 1
-#define JDWP_EventKind_BREAKPOINT 2
-#define JDWP_EventKind_FRAME_POP 3
-#define JDWP_EventKind_EXCEPTION 4
-#define JDWP_EventKind_USER_DEFINED 5
-#define JDWP_EventKind_THREAD_START 6
-#define JDWP_EventKind_THREAD_END 7
-#define JDWP_EventKind_CLASS_PREPARE 8
-#define JDWP_EventKind_CLASS_UNLOAD 9
-#define JDWP_EventKind_CLASS_LOAD 10
-#define JDWP_EventKind_FIELD_ACCESS 20
-#define JDWP_EventKind_FIELD_MODIFICATION 21
-#define JDWP_EventKind_EXCEPTION_CATCH 30
-#define JDWP_EventKind_METHOD_ENTRY 40
-#define JDWP_EventKind_METHOD_EXIT 41
-#define JDWP_EventKind_VM_INIT 90
-#define JDWP_EventKind_VM_DEATH 99
-#define JDWP_ThreadStatus_ZOMBIE 0
-#define JDWP_ThreadStatus_RUNNING 1
-#define JDWP_ThreadStatus_SLEEPING 2
-#define JDWP_ThreadStatus_MONITOR 3
-#define JDWP_ThreadStatus_WAIT 4
-#define JDWP_SuspendStatus_SUSPEND_STATUS_SUSPENDED 0x1
-#define JDWP_ClassStatus_VERIFIED 1
-#define JDWP_ClassStatus_PREPARED 2
-#define JDWP_ClassStatus_INITIALIZED 4
-#define JDWP_ClassStatus_ERROR 8
-#define JDWP_TypeTag_CLASS 1
-#define JDWP_TypeTag_INTERFACE 2
-#define JDWP_TypeTag_ARRAY 3
-#define JDWP_Tag_ARRAY 91
-#define JDWP_Tag_BYTE 66
-#define JDWP_Tag_CHAR 67
-#define JDWP_Tag_OBJECT 76
-#define JDWP_Tag_FLOAT 70
-#define JDWP_Tag_DOUBLE 68
-#define JDWP_Tag_INT 73
-#define JDWP_Tag_LONG 74
-#define JDWP_Tag_SHORT 83
-#define JDWP_Tag_VOID 86
-#define JDWP_Tag_BOOLEAN 90
-#define JDWP_Tag_STRING 115
-#define JDWP_Tag_THREAD 116
-#define JDWP_Tag_THREAD_GROUP 103
-#define JDWP_Tag_CLASS_LOADER 108
-#define JDWP_Tag_CLASS_OBJECT 99
-#define JDWP_StepDepth_INTO 0
-#define JDWP_StepDepth_OVER 1
-#define JDWP_StepDepth_OUT 2
-#define JDWP_StepSize_MIN 0
-#define JDWP_StepSize_LINE 1
-#define JDWP_SuspendPolicy_NONE 0
-#define JDWP_SuspendPolicy_EVENT_THREAD 1
-#define JDWP_SuspendPolicy_ALL 2
-#define JDWP_InvokeOptions_INVOKE_SINGLE_THREADED 0x01
-#define JDWP_InvokeOptions_INVOKE_NONVIRTUAL 0x02
diff --git a/make/stub_includes/jni/macosx/jni_md.h b/make/stub_includes/jni/macosx/jni_md.h
index 86b5ad2..1d6124c 100644
--- a/make/stub_includes/jni/macosx/jni_md.h
+++ b/make/stub_includes/jni/macosx/jni_md.h
@@ -1,8 +1,27 @@
 /*
  * @(#)jni_md.h	1.18 03/12/19
  *
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
- * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+ * This C header file is derived from Sun Microsystem's Java SDK provided C header file
+ * with the following copyright notice:
+ *
+ *   Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ *   SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+ *
+ * This version has complex comments removed and does not contain inlined algorithms etc, if any existed.
+ * 
+ * The original C header file was included to JOGL on Sat Jun 21 02:10:30 2008
+ * (commit cbc45e816f4ee81031bffce19a99550681462a24) by Sun Microsystem's staff and were approved. 
+ *
+ * This C header file is included due to ensure compatibility with - and invocation of the JAWT protocol.
+ * They are processed by GlueGen to create a Java binding for JAWT invocation only.
+ * 
+ * http://ftp.resource.org/courts.gov/c/F3/387/387.F3d.522.03-5400.html (36)
+ * "Atari Games Corp. v. Nintendo of Am., Inc., Nos. 88-4805 & 89-0027, 1993 WL 207548, at *1 (N.D.Cal. May 18, 1993) ("Atari III") 
+ * ("Program code that is strictly necessary to achieve current compatibility presents a merger problem, almost by definition, 
+ * and is thus excluded from the scope of any copyright.")."
+ *
+ * http://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=OJ:L:2009:111:0016:0022:EN:PDF
+ * L 111/17 (10) and (15)
  */
 
 #ifndef _JAVASOFT_JNI_MD_H_
diff --git a/make/stub_includes/jni/macosx/jvmdi.h b/make/stub_includes/jni/macosx/jvmdi.h
deleted file mode 100644
index 81e559d..0000000
--- a/make/stub_includes/jni/macosx/jvmdi.h
+++ /dev/null
@@ -1,1012 +0,0 @@
-/*
- * @(#)jvmdi.h	1.48 03/12/19
- *
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
- * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
- */
-
-/*
- *   Java Virtual Machine Debug Interface
- *
- *   Defines debugging functionality that a VM should provide.  
- *
- *   Should not overlap functionality in jni.h
- */
-
-#ifndef _JAVASOFT_JVMDI_H_
-#define _JAVASOFT_JVMDI_H_
-
-#include "jni.h"
-
-#define JVMDI_VERSION_1    0x20010000
-#define JVMDI_VERSION_1_1  0x20010001
-#define JVMDI_VERSION_1_2  0x20010002
-#define JVMDI_VERSION_1_3  0x20010003
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef jobject jthread;
-
-typedef jobject jthreadGroup;
-
-struct _jframeID;
-typedef struct _jframeID *jframeID;
-
-  /* specifies program location "pc" - often byte code index */
-typedef jlong jlocation;
-
-  /* The jmethodID for methods that have been replaced */
-  /* via RedefineClasses - used when the implementation */
-  /* does not wish to retain replaced jmethodIDs */
-#define OBSOLETE_METHOD_ID ((jmethodID)(NULL))
-
-  /*
-   *  Errors
-   */
-
-typedef jint jvmdiError;
-
-  /* no error */
-#define JVMDI_ERROR_NONE                 ((jvmdiError)0)
-
-  /*
-   * Errors on thread operations
-   */
-
-  /* invalid thread */
-#define JVMDI_ERROR_INVALID_THREAD       ((jvmdiError)10)
-  /* invalid thread group */
-#define JVMDI_ERROR_INVALID_THREAD_GROUP ((jvmdiError)11)
-  /* invalid thread priority */
-#define JVMDI_ERROR_INVALID_PRIORITY     ((jvmdiError)12)
-  /* thread not suspended */
-#define JVMDI_ERROR_THREAD_NOT_SUSPENDED ((jvmdiError)13)
-  /* thread already suspended */
-#define JVMDI_ERROR_THREAD_SUSPENDED     ((jvmdiError)14)
-
-  /* 
-   * Errors on object and class operations
-   */
-
-  /* invalid object (implementation not required to gracefully catch) */
-#define JVMDI_ERROR_INVALID_OBJECT       ((jvmdiError)20)
-  /* invalid class (implementation not required to gracefully catch) */
-#define JVMDI_ERROR_INVALID_CLASS        ((jvmdiError)21)
-  /* class not prepared */
-#define JVMDI_ERROR_CLASS_NOT_PREPARED   ((jvmdiError)22)
-  /* invalid methodID (implementation not required to gracefully catch) */
-#define JVMDI_ERROR_INVALID_METHODID     ((jvmdiError)23)
-  /* invalid location */
-#define JVMDI_ERROR_INVALID_LOCATION     ((jvmdiError)24)
-  /* invalid fieldID (implementation not required to gracefully catch) */
-#define JVMDI_ERROR_INVALID_FIELDID      ((jvmdiError)25)
-
-  /*
-   * Errors on frame operations
-   */
-
-  /* invalid frameID (implementation not required to gracefully catch) */
-#define JVMDI_ERROR_INVALID_FRAMEID      ((jvmdiError)30)
-  /* there are no more frames on the stack */
-#define JVMDI_ERROR_NO_MORE_FRAMES       ((jvmdiError)31)
-  /* operation cannot be performed on this frame */
-#define JVMDI_ERROR_OPAQUE_FRAME         ((jvmdiError)32)
-  /* operation can only be performed on current frame */
-#define JVMDI_ERROR_NOT_CURRENT_FRAME    ((jvmdiError)33)
-  /* type mismatch (implementation not required to gracefully catch) */
-#define JVMDI_ERROR_TYPE_MISMATCH        ((jvmdiError)34)
-  /* invalid slot */
-#define JVMDI_ERROR_INVALID_SLOT         ((jvmdiError)35)
-
-  /*
-   * Errors on set/clear/find operations
-   */
-
-  /* item already present */
-#define JVMDI_ERROR_DUPLICATE            ((jvmdiError)40)
-  /* item not found */
-#define JVMDI_ERROR_NOT_FOUND            ((jvmdiError)41)
-
-  /*
-   * Errors on monitor operations
-   */
-
-  /* invalid monitor */
-#define JVMDI_ERROR_INVALID_MONITOR      ((jvmdiError)50)
-  /* wait, notify, notify all tried without entering monitor  */
-#define JVMDI_ERROR_NOT_MONITOR_OWNER    ((jvmdiError)51)
-  /* waiting thread interrupted */
-#define JVMDI_ERROR_INTERRUPT            ((jvmdiError)52)
-  
-  /*
-   * Class redefinition / operand stack errors
-   */
-
-  /* The equivalent of ClassFormatError */
-#define JVMDI_ERROR_INVALID_CLASS_FORMAT          ((jvmdiError)60)
-  /* The equivalent of ClassCircularityError */
-#define JVMDI_ERROR_CIRCULAR_CLASS_DEFINITION     ((jvmdiError)61)
-  /* The class bytes fail verification */
-#define JVMDI_ERROR_FAILS_VERIFICATION            ((jvmdiError)62)
-  /* The new class version adds new methods */
-  /* and can_add_method is false */
-#define JVMDI_ERROR_ADD_METHOD_NOT_IMPLEMENTED    ((jvmdiError)63)
-  /* The new class version changes fields */ 
-  /* and can_unrestrictedly_redefine_classes is false */
-#define JVMDI_ERROR_SCHEMA_CHANGE_NOT_IMPLEMENTED ((jvmdiError)64)
-  /* bci/operand stack/local var combination is not verifiably */
-  /* type safe */
-#define JVMDI_ERROR_INVALID_TYPESTATE             ((jvmdiError)65)
-  /* A direct superclass is different for the new class */
-  /* version, or the set of directly implemented */
-  /* interfaces is different */
-  /* and can_unrestrictedly_redefine_classes is false */
-#define JVMDI_ERROR_HIERARCHY_CHANGE_NOT_IMPLEMENTED ((jvmdiError)66)
-  /* The new class version does not declare a method */
-  /* declared in the old class version */
-  /* and can_unrestrictedly_redefine_classes is false */
-#define JVMDI_ERROR_DELETE_METHOD_NOT_IMPLEMENTED ((jvmdiError)67)
-  /* A class file has a version number not supported */
-  /* by this VM. */
-#define JVMDI_ERROR_UNSUPPORTED_VERSION           ((jvmdiError)68)
-  /* The class name defined in the new class file is */
-  /* different from the name in the old class object */
-#define JVMDI_ERROR_NAMES_DONT_MATCH              ((jvmdiError)69)
-  /* The new class version has different modifiers and */
-  /* can_unrestrictedly_redefine_classes is false */
-#define JVMDI_ERROR_CLASS_MODIFIERS_CHANGE_NOT_IMPLEMENTED   ((jvmdiError)70)
-  /* A method in the new class version has different modifiers */
-  /* than its counterpart in the old class version */
-  /* and can_unrestrictedly_redefine_classes is false */
-#define JVMDI_ERROR_METHOD_MODIFIERS_CHANGE_NOT_IMPLEMENTED  ((jvmdiError)71)
-
-  /*
-   * Miscellaneous errors
-   */
-
-  /* Not yet implemented */
-#define JVMDI_ERROR_NOT_IMPLEMENTED      ((jvmdiError)99)
-  /* null pointer */
-#define JVMDI_ERROR_NULL_POINTER         ((jvmdiError)100)
-  /* information is absent */
-#define JVMDI_ERROR_ABSENT_INFORMATION   ((jvmdiError)101)
-  /* invalid event type  */
-#define JVMDI_ERROR_INVALID_EVENT_TYPE   ((jvmdiError)102)
-  /* invalid argument  */
-#define JVMDI_ERROR_ILLEGAL_ARGUMENT     ((jvmdiError)103)
-
-  /*
-   * Universal errors. These errors may be returned by
-   * any JVMDI function, not just the ones for which they are listed
-   * below.
-   */
-
-  /* no more memory available for allocation */
-#define JVMDI_ERROR_OUT_OF_MEMORY        ((jvmdiError)110)
-  /* debugging has not been enabled in this VM */
-#define JVMDI_ERROR_ACCESS_DENIED        ((jvmdiError)111)
-  /* VM is dead (implementation not required to gracefully catch) */
-#define JVMDI_ERROR_VM_DEAD              ((jvmdiError)112)
-  /* internal error  */
-#define JVMDI_ERROR_INTERNAL             ((jvmdiError)113)
-  /* Thread calling JVMDI function not attached to VM */
-#define JVMDI_ERROR_UNATTACHED_THREAD    ((jvmdiError)115)
-
-
-  /*
-   *  Threads
-   */
-
-  /* Thread status is unknown */
-#define JVMDI_THREAD_STATUS_UNKNOWN      ((jint)-1)
-  /* Thread is waiting to die */
-#define JVMDI_THREAD_STATUS_ZOMBIE       ((jint)0)
-  /* Thread is runnable */
-#define JVMDI_THREAD_STATUS_RUNNING      ((jint)1)
-  /* Thread is sleeping - Thread.sleep() or JVM_Sleep() was called */
-#define JVMDI_THREAD_STATUS_SLEEPING     ((jint)2)
-  /* Thread is waiting on a java monitor */
-#define JVMDI_THREAD_STATUS_MONITOR      ((jint)3)
-  /* Thread is waiting - Thread.wait() or JVM_MonitorWait() was called */
-#define JVMDI_THREAD_STATUS_WAIT         ((jint)4)
-
-  /* Thread is suspended - Thread.suspend(), JVM_Suspend() or
-   * JVMDI_Suspend was called */
-#define JVMDI_SUSPEND_STATUS_SUSPENDED   ((jint)0x1)
-  /* Thread is at a breakpoint */
-#define JVMDI_SUSPEND_STATUS_BREAK       ((jint)0x2)
-
-
-  /* Thread priority constants */
-#define JVMDI_THREAD_MIN_PRIORITY   ((jint)1)
-#define JVMDI_THREAD_NORM_PRIORITY  ((jint)5)
-#define JVMDI_THREAD_MAX_PRIORITY   ((jint)10)
-
-typedef struct {
-    char *name;
-    jint  priority;
-    jboolean is_daemon;
-    jthreadGroup thread_group;
-    jobject context_class_loader;
-} JVMDI_thread_info;
-
-typedef struct {
-    jthreadGroup parent;
-    char *name;
-    jint  max_priority;
-    jboolean is_daemon;
-} JVMDI_thread_group_info;
-
-#define JVMDI_DISABLE ((jint) 0)
-#define JVMDI_ENABLE  ((jint) 1)
-
-/*
- * Initial function for debug threads created through JVMDI
- */
-typedef void (*JVMDI_StartFunction)(void *);
-
-/*
- * Type for debug monitors created through JVMDI
- */
-typedef void *JVMDI_RawMonitor;
-
-#define JVMDI_MONITOR_WAIT_FOREVER ((jlong)(0))
-
-/*
- * Monitor information
- */
-typedef struct {
-    jthread owner;
-    jint entry_count;
-    jint waiter_count;
-    jthread *waiters;
-} JVMDI_monitor_info;
-
-typedef struct {
-    jint owned_monitor_count;
-    jobject *owned_monitors;
-} JVMDI_owned_monitor_info;
-
-  /*
-   *  Events
-   */
-
-    /* kind = JVMDI_EVENT_SINGLE_STEP */
-    typedef struct { 
-        jthread thread;
-        jclass clazz;
-        jmethodID method;
-        jlocation location;
-    } JVMDI_single_step_event_data;
-			
-    /* kind = JVMDI_EVENT_BREAKPOINT */
-    typedef struct { 
-        jthread thread;
-        jclass clazz;
-        jmethodID method;
-        jlocation location;
-    } JVMDI_breakpoint_event_data;
-    
-    /* kind = JVMDI_EVENT_FIELD_ACCESS */
-    typedef struct { 
-        jthread thread;
-        jclass clazz;
-        jmethodID method;
-        jlocation location;
-        jclass field_clazz;
-        jobject object;
-        jfieldID field;
-    } JVMDI_field_access_event_data;
-    
-    /* kind = JVMDI_EVENT_FIELD_MODIFICATION */
-    typedef struct { 
-        jthread thread;
-        jclass clazz;
-        jmethodID method;
-        jlocation location;
-        jclass field_clazz;
-        jobject object;
-        jfieldID field;
-        char signature_type;
-        jvalue new_value;
-    } JVMDI_field_modification_event_data;
-    
-    /* kind = JVMDI_EVENT_FRAME_POP */
-    /* kind = JVMDI_EVENT_METHOD_ENTRY */
-    /* kind = JVMDI_EVENT_METHOD_EXIT */
-    typedef struct { 
-        jthread thread;
-        jclass clazz;
-        jmethodID method;
-        jframeID frame;
-    } JVMDI_frame_event_data;
-    
-    /* kind = JVMDI_EVENT_EXCEPTION */
-    typedef struct { 
-        jthread thread;
-        jclass clazz;
-        jmethodID method;
-        jlocation location;
-        jobject exception;
-        jclass catch_clazz;
-        jmethodID catch_method;
-        jlocation catch_location;
-    } JVMDI_exception_event_data;
-    
-    /* kind = JVMDI_EVENT_EXCEPTION_CATCH */
-    typedef struct { 
-        jthread thread;
-        jclass clazz;
-        jmethodID method;
-        jlocation location;
-        jobject exception;
-    } JVMDI_exception_catch_event_data;
-    
-    /* kind = JVMDI_EVENT_USER_DEFINED */
-    typedef struct { 
-        jobject object;
-        jint key;
-    } JVMDI_user_event_data;
-    
-    /* kind = JVMDI_EVENT_THREAD_END or */
-    /* JVMDI_EVENT_THREAD_START */
-    typedef struct { 
-        jthread thread;
-    } JVMDI_thread_change_event_data;
-    
-    /* kind = JVMDI_EVENT_CLASS_LOAD, */
-    /* JVMDI_EVENT_CLASS_UNLOAD, or */
-    /* JVMDI_EVENT_CLASS_PREPARE */
-    typedef struct { 
-        jthread thread;
-        jclass clazz;
-    } JVMDI_class_event_data;
-    
-/* This stucture passes information about the event.
- * location is the index of the last instruction executed. 
- */
-typedef struct {
-    jint kind;		/* the discriminant */
-
-    union {
-	/* kind = JVMDI_EVENT_SINGLE_STEP */
-        JVMDI_single_step_event_data single_step;
-			
-        /* kind = JVMDI_EVENT_BREAKPOINT */
-        JVMDI_breakpoint_event_data breakpoint;
-
-        /* kind = JVMDI_EVENT_FRAME_POP */
-        /* kind = JVMDI_EVENT_METHOD_ENTRY */
-        /* kind = JVMDI_EVENT_METHOD_EXIT */
-        JVMDI_frame_event_data frame;
-
-        /* kind = JVMDI_EVENT_FIELD_ACCESS */
-        JVMDI_field_access_event_data field_access;
-
-        /* kind = JVMDI_EVENT_FIELD_MODIFICATION */
-        JVMDI_field_modification_event_data field_modification;
-
-        /* kind = JVMDI_EVENT_EXCEPTION */
-        JVMDI_exception_event_data exception;
-
-        /* kind = JVMDI_EVENT_EXCEPTION_CATCH */
-        JVMDI_exception_catch_event_data exception_catch;
-
-        /* kind = JVMDI_EVENT_USER_DEFINED */
-        JVMDI_user_event_data user;
-			
-        /* kind = JVMDI_EVENT_THREAD_END or */
-        /* JVMDI_EVENT_THREAD_START */
-        JVMDI_thread_change_event_data thread_change;
-			
-        /* kind = JVMDI_EVENT_CLASS_LOAD, */
-        /* JVMDI_EVENT_CLASS_UNLOAD, or */
-        /* JVMDI_EVENT_CLASS_PREPARE */
-        JVMDI_class_event_data class_event;
-			
-        /* kind = JVMDI_EVENT_VM_DEATH, JVMDI_EVENT_VM_INIT */
-        /* no additional fields */		
-    } u;
-} JVMDI_Event;
-
-	/*** event kinds ***/
-#define JVMDI_EVENT_SINGLE_STEP   ((jint)1)
-#define JVMDI_EVENT_BREAKPOINT    ((jint)2)
-#define JVMDI_EVENT_FRAME_POP     ((jint)3)
-#define JVMDI_EVENT_EXCEPTION     ((jint)4)
-#define JVMDI_EVENT_USER_DEFINED  ((jint)5)
-#define JVMDI_EVENT_THREAD_START  ((jint)6)
-#define JVMDI_EVENT_THREAD_END    ((jint)7)
-#define JVMDI_EVENT_CLASS_PREPARE ((jint)8)
-#define JVMDI_EVENT_CLASS_UNLOAD  ((jint)9)
-#define JVMDI_EVENT_CLASS_LOAD    ((jint)10)
-#define JVMDI_EVENT_FIELD_ACCESS       ((jint)20)
-#define JVMDI_EVENT_FIELD_MODIFICATION ((jint)21)
-#define JVMDI_EVENT_EXCEPTION_CATCH    ((jint)30)
-#define JVMDI_EVENT_METHOD_ENTRY       ((jint)40)
-#define JVMDI_EVENT_METHOD_EXIT        ((jint)41)
-#define JVMDI_EVENT_VM_INIT            ((jint)90)
-#define JVMDI_EVENT_VM_DEATH           ((jint)99)
-
-#define JVMDI_MAX_EVENT_TYPE_VAL       ((jint)99)
-
-
-
-/* event handler hook */
-typedef void (*JVMDI_EventHook)(JNIEnv *env, JVMDI_Event *event);
-
-typedef jvmdiError (*JVMDI_AllocHook) (jlong size, jbyte** memPtr);
-typedef jvmdiError (*JVMDI_DeallocHook) (jbyte* buffer);
-
-/*
- * Class states used in JVMDI_GetClassStatus
- */
-#define JVMDI_CLASS_STATUS_VERIFIED          ((jint)0x01)
-#define JVMDI_CLASS_STATUS_PREPARED          ((jint)0x02)
-#define JVMDI_CLASS_STATUS_INITIALIZED       ((jint)0x04)
- /* Error prevents initialization */
-#define JVMDI_CLASS_STATUS_ERROR             ((jint)0x08) 
-
-/* structure for returning line number information 
- */
-typedef struct {
-    jlocation start_location;
-    jint line_number;
-} JVMDI_line_number_entry;
-
-
-/* structure for returning local variable information 
- */
-typedef struct {
-    jlocation start_location;   /* variable valid start_location */
-    jint length;                /* upto start_location+length */ 
-    char *name;                 /* name in UTF8 */
-    char *signature;            /* type signature in UTF8 */
-    jint slot;                  /* variable slot, see JVMDI_GetLocal*()  */
-} JVMDI_local_variable_entry;
-
-/* structure for returning exception handler information 
- */
-typedef struct {
-    jlocation start_location;
-    jlocation end_location;
-    jlocation handler_location;
-    jclass exception;           /* if null, all exceptions */
-} JVMDI_exception_handler_entry;
-
-#define JVMDI_OPERAND_TYPE_REFERENCE      ((jint)1)
-#define JVMDI_OPERAND_TYPE_INT            ((jint)2)
-#define JVMDI_OPERAND_TYPE_FLOAT          ((jint)3)
-#define JVMDI_OPERAND_TYPE_LONG0          ((jint)4) /* least sig. 32 bits */
-#define JVMDI_OPERAND_TYPE_LONG1          ((jint)5) /* most sig. 32 bits */
-#define JVMDI_OPERAND_TYPE_DOUBLE0        ((jint)6) /* least sig. 32 bits */
-#define JVMDI_OPERAND_TYPE_DOUBLE1        ((jint)7) /* most sig. 32 bits */
-#define JVMDI_OPERAND_TYPE_RETURN_ADDRESS ((jint)8)
-
-typedef struct {
-    jint word;                 /* 32 bit operand stack quantities */
-    jint type;                 /* type encoding of the operand word */
-                               /* one of JVMDI_OPERAND_TYPE_* */
-} JVMDI_operand_stack_element;
-
-typedef struct { 
-    jint instance_field_count; /* number of instance fields referencing obj */
-    struct JVMDI_instance_field {
-        jobject instance;      /* instance referencing obj */
-        jfieldID field;        /* field holding reference */
-    } *instance_fields;        /* instanceField_count of them */
-     
-    jint static_field_count;   /* number of static fields referencing obj */
-    struct JVMDI_static_field {
-        jclass clazz;          /* class referencing obj */
-        jfieldID static_field; /* field holding reference */
-    } *static_fields;          /* static_field_count of them */
-    
-    jint array_element_count;  /* number of array elements referencing obj */
-    struct JVMDI_array_element {
-        jobjectArray array;    /* array referencing obj */
-        jint index;            /* index holding reference */
-    } *array_elements;         /* array_element_count of them */
-    
-    jint frame_slot_count;     /* number of frame slots referencing obj */
-    struct JVMDI_frame_slot {
-        jthread thread;        /* thread of the frame */
-        jframeID frame;        /* frame referencing obj */
-        jint slot;             /* slot holding reference */
-    } *frame_slots;            /* frame_slot_count of them */
-} JVMDI_object_reference_info;
-
-/* structure for defining a class
-*/
-typedef struct {
-    jclass clazz;              /* Class object for this class */
-    jint class_byte_count;     /* number of bytes defining class (below) */
-    jbyte *class_bytes;        /* bytes defining class (in JVM spec */
-                               /* Class File Format) */
-} JVMDI_class_definition;
-
-  /* For backwards compatibility */
-#define can_change_schema can_unrestrictedly_redefine_classes
-
-typedef struct {
-    unsigned int can_watch_field_modification      : 1;
-    unsigned int can_watch_field_access            : 1;
-    unsigned int can_get_bytecodes                 : 1;
-    unsigned int can_get_synthetic_attribute       : 1;
-    unsigned int can_get_owned_monitor_info        : 1;
-    unsigned int can_get_current_contended_monitor : 1;
-    unsigned int can_get_monitor_info              : 1;
-    unsigned int can_get_heap_info                 : 1;
-    unsigned int can_get_operand_stack             : 1;
-    unsigned int can_set_operand_stack             : 1;
-    unsigned int can_pop_frame                     : 1;
-    unsigned int can_get_class_definition          : 1;
-    unsigned int can_redefine_classes              : 1; 
-    unsigned int can_add_method                    : 1;
-    unsigned int can_unrestrictedly_redefine_classes : 1;
-    unsigned int can_suspend_resume_thread_lists   : 1;
-} JVMDI_capabilities;
-
-typedef struct JVMDI_Interface_1_ {
-    jvmdiError (JNICALL *SetEventHook)
-      (JVMDI_EventHook hook);
-    jvmdiError (JNICALL *SetEventNotificationMode)
-      (jint mode, jint eventType, jthread thread, ...);
-
-    jvmdiError (JNICALL *GetThreadStatus)
-      (jthread thread,
-       jint *threadStatusPtr, jint *suspendStatusPtr);
-    jvmdiError (JNICALL *GetAllThreads)
-      (jint *threadsCountPtr, jthread **threadsPtr);
-    jvmdiError (JNICALL *SuspendThread)
-      (jthread thread); 
-    jvmdiError (JNICALL *ResumeThread)
-      (jthread thread);
-    jvmdiError (JNICALL *StopThread)
-      (jthread thread, jobject exception);
-    jvmdiError (JNICALL *InterruptThread)
-      (jthread thread);
-    jvmdiError (JNICALL *GetThreadInfo)
-      (jthread thread, JVMDI_thread_info *infoPtr);
-    jvmdiError (JNICALL *GetOwnedMonitorInfo)
-      (jthread thread, JVMDI_owned_monitor_info *infoPtr);
-    jvmdiError (JNICALL *GetCurrentContendedMonitor)
-      (jthread thread, jobject *monitor);
-    jvmdiError (JNICALL *RunDebugThread)
-      (jthread thread, JVMDI_StartFunction proc, void *arg,
-       int priority);
-
-    jvmdiError (JNICALL *GetTopThreadGroups)
-      (jint *groupCountPtr, jthreadGroup **groupsPtr);
-    jvmdiError (JNICALL *GetThreadGroupInfo)
-      (jthreadGroup group, JVMDI_thread_group_info *infoPtr);
-    jvmdiError (JNICALL *GetThreadGroupChildren)
-      (jthreadGroup group, 
-       jint *threadCountPtr, jthread **threadsPtr,
-       jint *groupCountPtr, jthreadGroup **groupsPtr);
-
-    jvmdiError (JNICALL *GetFrameCount)
-      (jthread thread, jint *countPtr);
-    jvmdiError (JNICALL *GetCurrentFrame)
-      (jthread thread, jframeID *framePtr);
-    jvmdiError (JNICALL *GetCallerFrame)
-      (jframeID called, jframeID *framePtr);
-    jvmdiError (JNICALL *GetFrameLocation)
-      (jframeID frame, jclass *classPtr, jmethodID *methodPtr,
-       jlocation *locationPtr);
-    jvmdiError (JNICALL *NotifyFramePop)
-      (jframeID frame); 
-    jvmdiError (JNICALL *GetLocalObject)
-      (jframeID frame, jint slot, jobject *valuePtr);
-    jvmdiError (JNICALL *GetLocalInt)
-      (jframeID frame, jint slot, jint *valuePtr);
-    jvmdiError (JNICALL *GetLocalLong)
-      (jframeID frame, jint slot, jlong *valuePtr);
-    jvmdiError (JNICALL *GetLocalFloat)
-      (jframeID frame, jint slot, jfloat *valuePtr);
-    jvmdiError (JNICALL *GetLocalDouble)
-      (jframeID frame, jint slot, jdouble *valuePtr);
-    jvmdiError (JNICALL *SetLocalObject)
-      (jframeID frame, jint slot, jobject value);
-    jvmdiError (JNICALL *SetLocalInt)
-      (jframeID frame, jint slot, jint value);
-    jvmdiError (JNICALL *SetLocalLong)
-      (jframeID frame, jint slot, jlong value);
-    jvmdiError (JNICALL *SetLocalFloat)
-      (jframeID frame, jint slot, jfloat value);
-    jvmdiError (JNICALL *SetLocalDouble)
-      (jframeID frame, jint slot, jdouble value);
-
-    jvmdiError (JNICALL *CreateRawMonitor)
-      (char *name, JVMDI_RawMonitor *monitorPtr);
-    jvmdiError (JNICALL *DestroyRawMonitor)
-      (JVMDI_RawMonitor monitor);
-    jvmdiError (JNICALL *RawMonitorEnter)
-      (JVMDI_RawMonitor monitor);
-    jvmdiError (JNICALL *RawMonitorExit)
-      (JVMDI_RawMonitor monitor);
-    jvmdiError (JNICALL *RawMonitorWait)
-      (JVMDI_RawMonitor monitor, jlong millis);
-    jvmdiError (JNICALL *RawMonitorNotify)
-      (JVMDI_RawMonitor monitor);
-    jvmdiError (JNICALL *RawMonitorNotifyAll)
-      (JVMDI_RawMonitor monitor);
-
-    jvmdiError (JNICALL *SetBreakpoint)
-      (jclass clazz, jmethodID method, jlocation location);
-    jvmdiError (JNICALL *ClearBreakpoint)
-      (jclass clazz, jmethodID method, jlocation location);
-    jvmdiError (JNICALL *ClearAllBreakpoints)
-      ();
-
-    jvmdiError (JNICALL *SetFieldAccessWatch)
-      (jclass clazz, jfieldID field);
-    jvmdiError (JNICALL *ClearFieldAccessWatch)
-      (jclass clazz, jfieldID field);
-    jvmdiError (JNICALL *SetFieldModificationWatch)
-      (jclass clazz, jfieldID field);
-    jvmdiError (JNICALL *ClearFieldModificationWatch)
-      (jclass clazz, jfieldID field);
-
-    jvmdiError (JNICALL *SetAllocationHooks)
-      (JVMDI_AllocHook ahook, JVMDI_DeallocHook dhook);
-    jvmdiError (JNICALL *Allocate)
-      (jlong size, jbyte** memPtr);
-    jvmdiError (JNICALL *Deallocate)
-      (jbyte* mem);
-
-    jvmdiError (JNICALL *GetClassSignature)
-      (jclass clazz, char **sigPtr);
-    jvmdiError (JNICALL *GetClassStatus)
-      (jclass clazz, jint *statusPtr);
-    jvmdiError (JNICALL *GetSourceFileName)
-      (jclass clazz, char **sourceNamePtr);
-    jvmdiError (JNICALL *GetClassModifiers)
-      (jclass clazz, jint *modifiersPtr);
-    jvmdiError (JNICALL *GetClassMethods)
-      (jclass clazz, jint *methodCountPtr, jmethodID **methodsPtr);
-    jvmdiError (JNICALL *GetClassFields)
-       (jclass clazz, jint *fieldCountPtr, jfieldID **fieldsPtr);
-    jvmdiError (JNICALL *GetImplementedInterfaces)
-      (jclass clazz, jint *interfaceCountPtr, jclass **interfacesPtr);
-    jvmdiError (JNICALL *IsInterface)
-      (jclass clazz, jboolean *isInterfacePtr);
-    jvmdiError (JNICALL *IsArrayClass)
-      (jclass clazz, jboolean *isArrayClassPtr);
-    jvmdiError (JNICALL *GetClassLoader)
-      (jclass clazz, jobject *classloaderPtr);
-
-    jvmdiError (JNICALL *GetObjectHashCode)
-      (jobject object, jint *hashCodePtr);
-    jvmdiError (JNICALL *GetMonitorInfo)
-      (jobject object, JVMDI_monitor_info *infoPtr);
-
-    jvmdiError (JNICALL *GetFieldName)
-      (jclass clazz, jfieldID field, char **namePtr, char **signaturePtr);
-    jvmdiError (JNICALL *GetFieldDeclaringClass)
-      (jclass clazz, jfieldID field, jclass *declaringClassPtr);
-    jvmdiError (JNICALL *GetFieldModifiers)
-      (jclass clazz, jfieldID field, jint *modifiersPtr);
-    jvmdiError (JNICALL *IsFieldSynthetic)
-      (jclass clazz, jfieldID field, jboolean *isSyntheticPtr);
-
-    jvmdiError (JNICALL *GetMethodName)
-      (jclass clazz, jmethodID method, 
-       char **namePtr, char **signaturePtr);
-    jvmdiError (JNICALL *GetMethodDeclaringClass)
-      (jclass clazz, jmethodID method, jclass *declaringClassPtr);
-    jvmdiError (JNICALL *GetMethodModifiers)
-      (jclass clazz, jmethodID method, jint *modifiersPtr);
-    jvmdiError (JNICALL *GetMaxStack)
-      (jclass clazz, jmethodID method, jint *maxPtr);
-    jvmdiError (JNICALL *GetMaxLocals)
-      (jclass clazz, jmethodID method, jint *maxPtr);
-    jvmdiError (JNICALL *GetArgumentsSize)
-      (jclass clazz, jmethodID method, jint *sizePtr);
-    jvmdiError (JNICALL *GetLineNumberTable)
-      (jclass clazz, jmethodID method,
-       jint *entryCountPtr, JVMDI_line_number_entry **tablePtr);
-    jvmdiError (JNICALL *GetMethodLocation)
-      (jclass clazz, jmethodID method,
-       jlocation *startLocationPtr, jlocation *endLocationPtr);
-    jvmdiError (JNICALL *GetLocalVariableTable)
-      (jclass clazz, jmethodID method,
-       jint *entryCountPtr, JVMDI_local_variable_entry **tablePtr);
-    jvmdiError (JNICALL *GetExceptionHandlerTable)
-      (jclass clazz, jmethodID method,
-       jint *entryCountPtr, JVMDI_exception_handler_entry **tablePtr);
-    jvmdiError (JNICALL *GetThrownExceptions)
-      (jclass clazz, jmethodID method,
-       jint *exceptionCountPtr, jclass **exceptionsPtr);
-    jvmdiError (JNICALL *GetBytecodes)
-      (jclass clazz, jmethodID method,
-       jint *bytecodeCountPtr, jbyte **bytecodesPtr);
-    jvmdiError (JNICALL *IsMethodNative)
-      (jclass clazz, jmethodID method, jboolean *isNativePtr);
-    jvmdiError (JNICALL *IsMethodSynthetic)
-      (jclass clazz, jmethodID method, jboolean *isSyntheticPtr);
-
-    jvmdiError (JNICALL *GetLoadedClasses)
-      (jint *classCountPtr, jclass **classesPtr);
-    jvmdiError (JNICALL *GetClassLoaderClasses)
-      (jobject initiatingLoader, jint *classesCountPtr, 
-       jclass **classesPtr);
-
-    jvmdiError (JNICALL *PopFrame)
-      (jthread thread);
-    jvmdiError (JNICALL *SetFrameLocation)
-      (jframeID frame, jlocation location);
-    jvmdiError (JNICALL *GetOperandStack)
-      (jframeID frame, jint *operandStackSizePtr, 
-       JVMDI_operand_stack_element **operandStackPtr);
-    jvmdiError (JNICALL *SetOperandStack)
-      (jframeID frame, jint operandStackSize, 
-       JVMDI_operand_stack_element *operandStack);
-    jvmdiError (JNICALL *AllInstances)
-      (jclass clazz, jint *instanceCountPtr, jobject **instancesPtr);
-    jvmdiError (JNICALL *References)
-      (jobject obj, JVMDI_object_reference_info *refs);
-    jvmdiError (JNICALL *GetClassDefinition)
-      (jclass clazz, JVMDI_class_definition *classDefPtr);
-    jvmdiError (JNICALL *RedefineClasses)
-      (jint classCount, JVMDI_class_definition *classDefs);
-
-    jvmdiError (JNICALL *GetVersionNumber)
-      (jint *versionPtr);
-    jvmdiError (JNICALL *GetCapabilities)
-      (JVMDI_capabilities *capabilitiesPtr);
-
-    jvmdiError (JNICALL *GetSourceDebugExtension)
-      (jclass clazz, char **sourceDebugExtension);
-    jvmdiError (JNICALL *IsMethodObsolete)
-      (jclass clazz, jmethodID method, jboolean *isObsoletePtr);
-
-    jvmdiError (JNICALL *SuspendThreadList)
-      (jint reqCount, jthread *reqList, jvmdiError *results); 
-    jvmdiError (JNICALL *ResumeThreadList)
-      (jint reqCount, jthread *reqList, jvmdiError *results); 
-} JVMDI_Interface_1;
-  
-#ifndef NO_JVMDI_MACROS
-
-#define JVMDI_ERROR_DUPLICATE_BREAKPOINT JVMDI_ERROR_DUPLICATE
-#define JVMDI_ERROR_NO_SUCH_BREAKPOINT   JVMDI_ERROR_NOT_FOUND
-#define JVMDI_ERROR_DUPLICATE_FRAME_POP  JVMDI_ERROR_DUPLICATE
-
-
-static JVMDI_Interface_1 *jvmdi_interface = NULL;
-static JavaVM *j_vm;
-
-#ifdef __cplusplus
-#define SetJVMDIfromJNIEnv(a_env) ( (jvmdi_interface == NULL)?  \
-              ((a_env)->GetJavaVM(&j_vm),  \
-               (j_vm)->GetEnv((void **)&jvmdi_interface,  \
-                               JVMDI_VERSION_1)):0)
-#else
-#define SetJVMDIfromJNIEnv(a_env) ( (jvmdi_interface == NULL)?  \
-              ((*a_env)->GetJavaVM(a_env, &j_vm), \
-               (*j_vm)->GetEnv(j_vm, (void **)&jvmdi_interface, \
-                               JVMDI_VERSION_1)):0)
-#endif
-
-#define JVMDI_SetEventHook(a_env, a1) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->SetEventHook(a1) )
-#define JVMDI_GetThreadStatus(a_env, a1, a2, a3) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->GetThreadStatus(a1, a2, a3) )
-#define JVMDI_GetAllThreads(a_env, a1, a2) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->GetAllThreads(a1, a2) )
-#define JVMDI_SuspendThread(a_env, a1) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->SuspendThread(a1) )
-#define JVMDI_ResumeThread(a_env, a1) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->ResumeThread(a1) )
-#define JVMDI_StopThread(a_env, a1, a2) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->StopThread(a1, a2) )
-#define JVMDI_InterruptThread(a_env, a1) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->InterruptThread(a1) )
-#define JVMDI_SetSingleStep(a_env, a1, a2) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->SetEventNotificationMode( \
-                                       (a2) ? JVMDI_ENABLE : JVMDI_DISABLE, \
-                                        JVMDI_EVENT_SINGLE_STEP, a1) )
-#define JVMDI_GetThreadInfo(a_env, a1, a2) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->GetThreadInfo(a1, a2) )
-#define JVMDI_RunDebugThread(a_env, a1, a2, a3, a4) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->RunDebugThread(a1, a2, a3, a4) )
-#define JVMDI_GetTopThreadGroups(a_env, a1, a2) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->GetTopThreadGroups(a1, a2) )
-#define JVMDI_GetThreadGroupInfo(a_env, a1, a2) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->GetThreadGroupInfo(a1, a2) )
-#define JVMDI_GetThreadGroupChildren(a_env, a1, a2, a3, a4, a5) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->GetThreadGroupChildren(a1, a2, a3, a4, a5) )
-#define JVMDI_GetCurrentFrame(a_env, a1, a2) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->GetCurrentFrame(a1, a2) )
-#define JVMDI_GetCallerFrame(a_env, a1, a2) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->GetCallerFrame(a1, a2) )
-#define JVMDI_GetFrameLocation(a_env, a1, a2, a3, a4) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->GetFrameLocation(a1, a2, a3, a4) )
-#define JVMDI_NotifyFramePop(a_env, a1) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->NotifyFramePop(a1) )
-#define JVMDI_GetLocalObject(a_env, a1, a2, a3) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->GetLocalObject(a1, a2, a3) )
-#define JVMDI_GetLocalInt(a_env, a1, a2, a3) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->GetLocalInt(a1, a2, a3) )
-#define JVMDI_GetLocalLong(a_env, a1, a2, a3) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->GetLocalLong(a1, a2, a3) )
-#define JVMDI_GetLocalFloat(a_env, a1, a2, a3) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->GetLocalFloat(a1, a2, a3) )
-#define JVMDI_GetLocalDouble(a_env, a1, a2, a3) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->GetLocalDouble(a1, a2, a3) )
-#define JVMDI_SetLocalObject(a_env, a1, a2, a3) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->SetLocalObject(a1, a2, a3) )
-#define JVMDI_SetLocalInt(a_env, a1, a2, a3) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->SetLocalInt(a1, a2, a3) )
-#define JVMDI_SetLocalLong(a_env, a1, a2, a3) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->SetLocalLong(a1, a2, a3) )
-#define JVMDI_SetLocalFloat(a_env, a1, a2, a3) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->SetLocalFloat(a1, a2, a3) )
-#define JVMDI_SetLocalDouble(a_env, a1, a2, a3) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->SetLocalDouble(a1, a2, a3) )
-#define JVMDI_CreateRawMonitor(a_env, a1, a2) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->CreateRawMonitor(a1, a2) )
-#define JVMDI_DestroyRawMonitor(a_env, a1) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->DestroyRawMonitor(a1) )
-#define JVMDI_RawMonitorEnter(a_env, a1) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->RawMonitorEnter(a1) )
-#define JVMDI_RawMonitorExit(a_env, a1) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->RawMonitorExit(a1) )
-#define JVMDI_RawMonitorWait(a_env, a1, a2) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->RawMonitorWait(a1, a2) )
-#define JVMDI_RawMonitorNotify(a_env, a1) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->RawMonitorNotify(a1) )
-#define JVMDI_RawMonitorNotifyAll(a_env, a1) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->RawMonitorNotifyAll(a1) )
-#define JVMDI_SetBreakpoint(a_env, a1, a2, a3) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->SetBreakpoint(a1, a2, a3) )
-#define JVMDI_ClearBreakpoint(a_env, a1, a2, a3) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->ClearBreakpoint(a1, a2, a3) )
-#define JVMDI_ClearAllBreakpoints(a_env) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->ClearAllBreakpoints() )
-#define JVMDI_SetAllocationHooks(a_env, a1, a2) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->SetAllocationHooks(a1, a2) )
-#define JVMDI_Allocate(a_env, a1, a2) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->Allocate(a1, a2) )
-#define JVMDI_Deallocate(a_env, a1) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->Deallocate(a1) )
-#define JVMDI_GetClassSignature(a_env, a1, a2) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->GetClassSignature(a1, a2) )
-#define JVMDI_GetClassStatus(a_env, a1, a2) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->GetClassStatus(a1, a2) )
-#define JVMDI_GetSourceFileName(a_env, a1, a2) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->GetSourceFileName(a1, a2) )
-#define JVMDI_GetClassModifiers(a_env, a1, a2) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->GetClassModifiers(a1, a2) )
-#define JVMDI_GetClassMethods(a_env, a1, a2, a3) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->GetClassMethods(a1, a2, a3) )
-#define JVMDI_GetClassFields(a_env, a1, a2, a3) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->GetClassFields(a1, a2, a3) )
-#define JVMDI_GetImplementedInterfaces(a_env, a1, a2, a3) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->GetImplementedInterfaces(a1, a2, a3) )
-#define JVMDI_IsInterface(a_env, a1, a2) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->IsInterface(a1, a2) )
-#define JVMDI_IsArrayClass(a_env, a1, a2) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->IsArrayClass(a1, a2) )
-#define JVMDI_ClassLoader(a_env, a1, a2) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->GetClassLoader(a1, a2) )
-#define JVMDI_GetFieldName(a_env, a1, a2, a3, a4) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->GetFieldName(a1, a2, a3, a4) )
-#define JVMDI_GetFieldDeclaringClass(a_env, a1, a2, a3) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->GetFieldDeclaringClass(a1, a2, a3) )
-#define JVMDI_GetFieldModifiers(a_env, a1, a2, a3) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->GetFieldModifiers(a1, a2, a3) )
-#define JVMDI_GetMethodName(a_env, a1, a2, a3, a4) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->GetMethodName(a1, a2, a3, a4) )
-#define JVMDI_GetMethodDeclaringClass(a_env, a1, a2, a3) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->GetMethodDeclaringClass(a1, a2, a3) )
-#define JVMDI_GetMethodModifiers(a_env, a1, a2, a3) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->GetMethodModifiers(a1, a2, a3) )
-#define JVMDI_GetMaxStack(a_env, a1, a2, a3) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->GetMaxStack(a1, a2, a3) )
-#define JVMDI_GetMaxLocals(a_env, a1, a2, a3) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->GetMaxLocals(a1, a2, a3) )
-#define JVMDI_GetArgumentsSize(a_env, a1, a2, a3) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->GetArgumentsSize(a1, a2, a3) )
-#define JVMDI_GetLineNumberTable(a_env, a1, a2, a3, a4) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->GetLineNumberTable(a1, a2, a3, a4) )
-#define JVMDI_GetMethodLocation(a_env, a1, a2, a3, a4) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->GetMethodLocation(a1, a2, a3, a4) )
-#define JVMDI_GetLocalVariableTable(a_env, a1, a2, a3, a4) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->GetLocalVariableTable(a1, a2, a3, a4) )
-#define JVMDI_GetExceptionHandlerTable(a_env, a1, a2, a3, a4) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->GetExceptionHandlerTable(a1, a2, a3, a4) )
-#define JVMDI_GetThrownExceptions(a_env, a1, a2, a3, a4) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->GetThrownExceptions(a1, a2, a3, a4) )
-#define JVMDI_GetBytecodes(a_env, a1, a2, a3, a4) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->GetBytecodes(a1, a2, a3, a4) )
-#define JVMDI_IsMethodNative(a_env, a1, a2, a3) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->IsMethodNative(a1, a2, a3) )
-#define JVMDI_GetLoadedClasses(a_env, a1, a2) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->GetLoadedClasses(a1, a2) )
-#define JVMDI_GetClassLoaderClasses(a_env, a1, a2, a3) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->GetClassLoaderClasses(a1, a2, a3) )
-#define JVMDI_GetVersionNumber(a_env, a1) ( \
-              SetJVMDIfromJNIEnv(a_env), \
-              jvmdi_interface->GetVersionNumber(a1) )
-
-#endif /* !NO_JVMDI_MACROS */
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif /* __cplusplus */
-
-#endif /* !_JAVASOFT_JVMDI_H_ */
-
-
diff --git a/make/stub_includes/jni/macosx/jvmpi.h b/make/stub_includes/jni/macosx/jvmpi.h
deleted file mode 100644
index 2dbaae5..0000000
--- a/make/stub_includes/jni/macosx/jvmpi.h
+++ /dev/null
@@ -1,642 +0,0 @@
-/*
- * @(#)jvmpi.h	1.28 03/12/19
- *
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
- * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
- */
-
-#ifndef _JAVASOFT_JVMPI_H_
-#define _JAVASOFT_JVMPI_H_
-
-#include "jni.h"
-
-#define JVMPI_VERSION_1   ((jint)0x10000001)  /* implied 0 for minor version */
-#define JVMPI_VERSION_1_1 ((jint)0x10000002)
-#define JVMPI_VERSION_1_2 ((jint)0x10000003)
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-  typedef void (*jvmpi_void_function_of_void)(void *);
-#ifdef __cplusplus
-}
-#endif
-
-/****************************************************************
- * Profiler interface data structures.
- ****************************************************************/
-/* identifier types. */
-struct _jobjectID;
-typedef struct _jobjectID * jobjectID;       /* type of object ids */ 
-
-/* raw monitors */
-struct _JVMPI_RawMonitor;
-typedef struct _JVMPI_RawMonitor * JVMPI_RawMonitor;
-
-/* call frame */
-typedef struct {
-    jint lineno;                      /* line number in the source file */
-    jmethodID method_id;              /* method executed in this frame */
-} JVMPI_CallFrame;
-
-/* call trace */
-typedef struct {
-    JNIEnv *env_id;                   /* Env where trace was recorded */
-    jint num_frames;                  /* number of frames in this trace */
-    JVMPI_CallFrame *frames;          /* frames */
-} JVMPI_CallTrace;
-
-/* method */
-typedef struct {
-    char *method_name;                /* name of method */
-    char *method_signature;           /* signature of method */
-    jint start_lineno;                /* -1 if native, abstract .. */
-    jint end_lineno;                  /* -1 if native, abstract .. */
-    jmethodID method_id;              /* id assigned to this method */
-} JVMPI_Method;
-
-/* Field */
-typedef struct {
-    char *field_name;                 /* name of field */
-    char *field_signature;            /* signature of field */
-} JVMPI_Field;
-
-/* line number info for a compiled method */
-typedef struct {
-    jint offset;                      /* offset from beginning of method */
-    jint lineno;                      /* lineno from beginning of src file */
-} JVMPI_Lineno;
-
-/* event */
-typedef struct {
-    jint event_type;                  /* event_type */
-    JNIEnv *env_id;                   /* env where this event occured */
-  
-    union {
-        struct {
-	    const char *class_name;   /* class name */
-	    char *source_name;        /* name of source file */
-	    jint num_interfaces;      /* number of interfaces implemented */
-  	    jint num_methods;         /* number of methods in the class */
-	    JVMPI_Method *methods;    /* methods */
-	    jint num_static_fields;   /* number of static fields */
-	    JVMPI_Field *statics;     /* static fields */
-	    jint num_instance_fields; /* number of instance fields */
-	    JVMPI_Field *instances;   /* instance fields */
-	    jobjectID class_id;       /* id of the class object */
-	} class_load;
-
-        struct {
-	    jobjectID class_id;       /* id of the class object */
-	} class_unload;
-
-        struct {
-	    unsigned char *class_data;        /* content of class file */
-	    jint class_data_len;              /* class file length */
-	    unsigned char *new_class_data;    /* instrumented class file */
-	    jint new_class_data_len;          /* new class file length */
-	    void * (*malloc_f)(unsigned int); /* memory allocation function */
-	} class_load_hook;
-
-        struct {
-            jint arena_id;
-	    jobjectID class_id;       /* id of object class */
-	    jint is_array;            /* JVMPI_NORMAL_OBJECT, ... */
-	    jint size;                /* size in number of bytes */
-	    jobjectID obj_id;         /* id assigned to this object */
-        } obj_alloc;
-
-        struct {
-	    jobjectID obj_id;         /* id of the object */
-	} obj_free;
-
-        struct {
-	    jint arena_id;            /* cur arena id */
-	    jobjectID obj_id;         /* cur object id */
-	    jint new_arena_id;        /* new arena id */
-	    jobjectID new_obj_id;     /* new object id */	  
-	} obj_move;
-
-        struct {
-	    jint arena_id;            /* id of arena */
-	    const char *arena_name;   /* name of arena */
-	} new_arena;
-
-        struct {
-	    jint arena_id;            /* id of arena */
-	} delete_arena;
-
-        struct {
-	    char *thread_name;        /* name of thread */
-	    char *group_name;         /* name of group */
-	    char *parent_name;        /* name of parent */
-	    jobjectID thread_id;      /* id of the thread object */
-	    JNIEnv *thread_env_id;
-        } thread_start;
-
-        struct {
-	    int dump_level;           /* level of the heap dump info */
-	    char *begin;              /* where all the root records begin,
-					 please see the heap dump buffer 
-				         format described below */
-	    char *end;                /* where the object records end. */
-	    jint num_traces;          /* number of thread traces, 
-				         0 if dump level = JVMPI_DUMP_LEVEL_0 */
-	    JVMPI_CallTrace *traces;  /* thread traces collected during 
-					 heap dump */ 
-	} heap_dump;
-
-        struct {
-	    jobjectID obj_id;         /* object id */
-	    jobject ref_id;           /* id assigned to the globalref */
-	} jni_globalref_alloc;
-      
-        struct {
-	    jobject ref_id;           /* id of the global ref */
-	} jni_globalref_free;
-
-        struct {
-	    jmethodID method_id;      /* method */
-	} method;
-
-        struct {
-	    jmethodID method_id;      /* id of method */
-	    jobjectID obj_id;         /* id of target object */
-	} method_entry2;
-
-        struct {
-	    jmethodID method_id;        /* id of compiled method */
-	    void *code_addr;            /* code start addr. in memory */
-	    jint code_size;             /* code size */
-	    jint lineno_table_size;     /* size of lineno table */
-	    JVMPI_Lineno *lineno_table; /* lineno info */
-	} compiled_method_load;
-        
-        struct {
-	    jmethodID method_id;        /* id of unloaded compiled method */
-	} compiled_method_unload;
-
-	struct {
-	    jmethodID method_id; /* id of the method the instruction belongs to */
-	    jint offset;         /* instruction offset in the method's bytecode */
-	    union {
-		struct {
-		    jboolean is_true; /* whether true or false branch is taken  */
-		} if_info;
-		struct {
-		    jint key; /* top stack value used as an index */
-		    jint low; /* min value of the index           */
-		    jint hi;  /* max value of the index           */
-		} tableswitch_info;
-		struct {
-		    jint chosen_pair_index; /* actually chosen pair index (0-based)
-                                             * if chosen_pair_index == pairs_total then
-                                             * the 'default' branch is taken
-                                             */
-		    jint pairs_total;       /* total number of lookupswitch pairs */
-		} lookupswitch_info;
-	    } u;
-	} instruction;
-	
-        struct {
-	    char *begin;                /* beginning of dump buffer, 
-					   see below for format */
-	    char *end;                  /* end of dump buffer */
-	    jint num_traces;            /* number of traces */
-	    JVMPI_CallTrace *traces;    /* traces of all threads */
-	    jint *threads_status;       /* status of all threads */
-	} monitor_dump;
-
-        struct {
-	    const char *name;           /* name of raw monitor */
-	    JVMPI_RawMonitor id;        /* id */
-	} raw_monitor;
-
-        struct {
-	    jobjectID object;           /* Java object */
-	} monitor;
-
-        struct {
-	    jobjectID object;           /* Java object */
-	    jlong timeout;              /* timeout period */
-	} monitor_wait;
-
-        struct {
-	    jlong used_objects;
-	    jlong used_object_space;
-	    jlong total_object_space;
-	} gc_info;
-
-        struct {
-	    jint data_len;
-	    char *data;
-	} object_dump;
-    } u;
-} JVMPI_Event;
-
-/* interface functions */
-typedef struct {
-    jint version;   /* JVMPI version */
-    
-    /* ------interface implemented by the profiler------ */
-
-    /**
-     * Function called by the JVM to notify an event. 
-     */
-    void (*NotifyEvent)(JVMPI_Event *event);
-  
-    /* ------interface implemented by the JVM------ */
-    
-    /**
-     * Function called by the profiler to enable/disable/send notification 
-     * for a particular event type.  
-     * 
-     * event_type - event_type
-     * arg - event specific arg
-     *
-     * return JVMPI_NOT_AVAILABLE, JVMPI_SUCCESS or JVMPI_FAIL
-     */
-    jint (*EnableEvent)(jint event_type, void *arg);
-    jint (*DisableEvent)(jint event_type, void *arg);
-    jint (*RequestEvent)(jint event_type, void *arg);
-  
-    /**
-     * Function called by the profiler to get a stack
-     * trace from the JVM.
-     *
-     * trace - trace data structure to be filled
-     * depth - maximum depth of the trace.
-     */
-    void (*GetCallTrace)(JVMPI_CallTrace *trace, jint depth);
-
-    /**
-     * Function called by profiler when it wants to exit/stop.
-     */
-    void (*ProfilerExit)(jint);
-
-    /**
-     * Utility functions provided by the JVM.
-     */
-    JVMPI_RawMonitor (*RawMonitorCreate)(char *lock_name);
-    void (*RawMonitorEnter)(JVMPI_RawMonitor lock_id);
-    void (*RawMonitorExit)(JVMPI_RawMonitor lock_id);
-    void (*RawMonitorWait)(JVMPI_RawMonitor lock_id, jlong ms);
-    void (*RawMonitorNotifyAll)(JVMPI_RawMonitor lock_id);
-    void (*RawMonitorDestroy)(JVMPI_RawMonitor lock_id);
-
-    /**
-     * Function called by the profiler to get the current thread's CPU time.
-     *
-     * return time in nanoseconds;
-     */
-    jlong (*GetCurrentThreadCpuTime)(void);
-
-    void (*SuspendThread)(JNIEnv *env);
-    void (*ResumeThread)(JNIEnv *env);
-    jint (*GetThreadStatus)(JNIEnv *env);
-    jboolean (*ThreadHasRun)(JNIEnv *env);
-
-    /* This function can be called safely only after JVMPI_EVENT_VM_INIT_DONE
-       notification by the JVM. */
-    jint (*CreateSystemThread)(char *name, jint priority, void (*f)(void *));
-
-    /* thread local storage access functions to avoid locking in time 
-       critical functions */
-    void (*SetThreadLocalStorage)(JNIEnv *env_id, void *ptr);
-    void * (*GetThreadLocalStorage)(JNIEnv *env_id);
-
-    /* control GC */
-    void (*DisableGC)(void);
-    void (*EnableGC)(void);
-    void (*RunGC)(void);
-
-    jobjectID (*GetThreadObject)(JNIEnv *env);
-    jobjectID (*GetMethodClass)(jmethodID mid);
-
-    /* JNI <-> jobject conversions */
-    jobject   (*jobjectID2jobject)(jobjectID jid);
-    jobjectID (*jobject2jobjectID)(jobject jobj);
-
-    void (*SuspendThreadList)
-      (jint reqCount, JNIEnv **reqList, jint *results);
-    void (*ResumeThreadList)
-      (jint reqCount, JNIEnv **reqList, jint *results);
-} JVMPI_Interface;
-
-/* type of argument passed to RequestEvent for heap dumps */
-typedef struct {
-    jint heap_dump_level;
-} JVMPI_HeapDumpArg;
-
-/**********************************************************************
- * Constants and formats used in JVM Profiler Interface.
- **********************************************************************/
-/*
- * Event type constants.
- */
-#define JVMPI_EVENT_METHOD_ENTRY            ((jint)1) 
-#define JVMPI_EVENT_METHOD_ENTRY2           ((jint)2) 
-#define JVMPI_EVENT_METHOD_EXIT             ((jint)3) 
-
-#define JVMPI_EVENT_OBJECT_ALLOC            ((jint)4) 
-#define JVMPI_EVENT_OBJECT_FREE             ((jint)5) 
-#define JVMPI_EVENT_OBJECT_MOVE             ((jint)6) 
-
-#define JVMPI_EVENT_COMPILED_METHOD_LOAD    ((jint)7) 
-#define JVMPI_EVENT_COMPILED_METHOD_UNLOAD  ((jint)8) 
-
-#define JVMPI_EVENT_INSTRUCTION_START       ((jint)9) 
-
-#define JVMPI_EVENT_THREAD_START           ((jint)33) 
-#define JVMPI_EVENT_THREAD_END             ((jint)34) 
-
-#define JVMPI_EVENT_CLASS_LOAD_HOOK        ((jint)35) 
-
-#define JVMPI_EVENT_HEAP_DUMP                     ((jint)37) 
-#define JVMPI_EVENT_JNI_GLOBALREF_ALLOC           ((jint)38) 
-#define JVMPI_EVENT_JNI_GLOBALREF_FREE            ((jint)39) 
-#define JVMPI_EVENT_JNI_WEAK_GLOBALREF_ALLOC      ((jint)40) 
-#define JVMPI_EVENT_JNI_WEAK_GLOBALREF_FREE       ((jint)41) 
-#define JVMPI_EVENT_CLASS_LOAD                    ((jint)42) 
-#define JVMPI_EVENT_CLASS_UNLOAD                  ((jint)43) 
-#define JVMPI_EVENT_DATA_DUMP_REQUEST             ((jint)44) 
-#define JVMPI_EVENT_DATA_RESET_REQUEST            ((jint)45) 
-
-#define JVMPI_EVENT_JVM_INIT_DONE          ((jint)46) 
-#define JVMPI_EVENT_JVM_SHUT_DOWN          ((jint)47) 
-
-#define JVMPI_EVENT_ARENA_NEW              ((jint)48)
-#define JVMPI_EVENT_ARENA_DELETE           ((jint)49)
-
-#define JVMPI_EVENT_OBJECT_DUMP            ((jint)50)
-
-#define JVMPI_EVENT_RAW_MONITOR_CONTENDED_ENTER   ((jint)51)
-#define JVMPI_EVENT_RAW_MONITOR_CONTENDED_ENTERED ((jint)52)
-#define JVMPI_EVENT_RAW_MONITOR_CONTENDED_EXIT    ((jint)53)
-#define JVMPI_EVENT_MONITOR_CONTENDED_ENTER       ((jint)54)
-#define JVMPI_EVENT_MONITOR_CONTENDED_ENTERED     ((jint)55)
-#define JVMPI_EVENT_MONITOR_CONTENDED_EXIT        ((jint)56)
-#define JVMPI_EVENT_MONITOR_WAIT                  ((jint)57)
-#define JVMPI_EVENT_MONITOR_WAITED                ((jint)58)
-#define JVMPI_EVENT_MONITOR_DUMP                  ((jint)59)
-
-#define JVMPI_EVENT_GC_START                      ((jint)60)
-#define JVMPI_EVENT_GC_FINISH                     ((jint)61)
-
-#define JVMPI_MAX_EVENT_TYPE_VAL                  ((jint)61)
-
-/* old definitions, to be removed */
-#define JVMPI_EVENT_LOAD_COMPILED_METHOD          ((jint)7) 
-#define JVMPI_EVENT_UNLOAD_COMPILED_METHOD        ((jint)8) 
-#define JVMPI_EVENT_NEW_ARENA                     ((jint)48)
-#define JVMPI_EVENT_DELETE_ARENA                  ((jint)49)
-#define JVMPI_EVENT_DUMP_DATA_REQUEST             ((jint)44) 
-#define JVMPI_EVENT_RESET_DATA_REQUEST            ((jint)45) 
-#define JVMPI_EVENT_OBJ_ALLOC                     ((jint)4) 
-#define JVMPI_EVENT_OBJ_FREE                      ((jint)5) 
-#define JVMPI_EVENT_OBJ_MOVE                      ((jint)6) 
-
-#define JVMPI_REQUESTED_EVENT                     ((jint)0x10000000)
-
-
- 
-/* 
- * enabling/disabling event notification.
- */
-/* results */
-#define JVMPI_SUCCESS                    ((jint)0)
-#define JVMPI_NOT_AVAILABLE              ((jint)1)
-#define JVMPI_FAIL                       ((jint)-1)
-
-/*
- * Thread status
- */
-enum {
-    JVMPI_THREAD_RUNNABLE = 1,
-    JVMPI_THREAD_MONITOR_WAIT,
-    JVMPI_THREAD_CONDVAR_WAIT
-};
-
-#define JVMPI_THREAD_SUSPENDED        0x8000
-#define JVMPI_THREAD_INTERRUPTED      0x4000
-
-/*
- * Thread priority
- */
-#define JVMPI_MINIMUM_PRIORITY	    1
-#define JVMPI_MAXIMUM_PRIORITY	    10
-#define JVMPI_NORMAL_PRIORITY	    5
-
-/*
- * Object type constants.
- */
-#define JVMPI_NORMAL_OBJECT	         ((jint)0)
-#define JVMPI_CLASS		         ((jint)2)
-#define JVMPI_BOOLEAN	                 ((jint)4)
-#define JVMPI_CHAR                       ((jint)5)
-#define JVMPI_FLOAT                      ((jint)6)
-#define JVMPI_DOUBLE                     ((jint)7)
-#define JVMPI_BYTE                       ((jint)8)
-#define JVMPI_SHORT                      ((jint)9)
-#define JVMPI_INT                        ((jint)10)
-#define JVMPI_LONG                       ((jint)11)    
-
-/*
- * Monitor dump constants.
- */
-
-#define JVMPI_MONITOR_JAVA          0x01
-#define JVMPI_MONITOR_RAW           0x02
-
-/*
- * Heap dump constants.
- */
-#define JVMPI_GC_ROOT_UNKNOWN       0xff
-#define JVMPI_GC_ROOT_JNI_GLOBAL    0x01
-#define JVMPI_GC_ROOT_JNI_LOCAL     0x02
-#define JVMPI_GC_ROOT_JAVA_FRAME    0x03
-#define JVMPI_GC_ROOT_NATIVE_STACK  0x04
-#define JVMPI_GC_ROOT_STICKY_CLASS  0x05
-#define JVMPI_GC_ROOT_THREAD_BLOCK  0x06
-#define JVMPI_GC_ROOT_MONITOR_USED  0x07
-#define JVMPI_GC_ROOT_THREAD_OBJ    0x08
-
-#define JVMPI_GC_CLASS_DUMP         0x20
-#define JVMPI_GC_INSTANCE_DUMP      0x21 
-#define JVMPI_GC_OBJ_ARRAY_DUMP     0x22
-#define JVMPI_GC_PRIM_ARRAY_DUMP    0x23
-
-/*
- * Dump levels
- */
-#define JVMPI_DUMP_LEVEL_0    ((jint)0)
-#define JVMPI_DUMP_LEVEL_1    ((jint)1)
-#define JVMPI_DUMP_LEVEL_2    ((jint)2)
-
-/* Types used in dumps -
- *
- * u1: 1 byte
- * u2: 2 bytes
- * u4: 4 bytes
- * u8: 8 bytes
- *
- * ty: u1 where:
- *     JVMPI_CLASS:   object
- *     JVMPI_BOOLEAN: boolean
- *     JVMPI_CHAR:    char
- *     JVMPI_FLOAT:   float
- *     JVMPI_DOUBLE:  double
- *     JVMPI_BYTE:    byte
- *     JVMPI_SHORT:   short
- *     JVMPI_INT:     int
- *     JVMPI_LONG:    long
- *
- * vl: values, exact type depends on the type of the value:
- *     JVMPI_BOOLEAN & JVMPI_BYTE:   u1
- *     JVMPI_SHORT & JVMPI_CHAR:     u2
- *     JVMPI_INT & JVMPI_FLOAT:      u4
- *     JVMPI_LONG & JVMPI_DOUBLE:    u8
- *     JVMPI_CLASS:                  jobjectID
- */
-
-/* Format of the monitor dump buffer:
- *
- *               u1                          monitor type
- *
- *               JVMPI_MONITOR_JAVA          Java monitor
- *
- *                          jobjectID        object
- *                          JNIEnv *         owner thread
- *                          u4               entry count
- *                          u4               # of threads waiting to enter
- *                          [JNIEnv *]*      threads waiting to enter
- *                          u4               # of threads waiting to be notified
- *                          [JNIEnv *]*      threads waiting to be notified
- *
- *               JVMPI_MONITOR_RAW           raw monitor
- *
- *                          char *           name
- *                          JVMPI_RawMonitor raw monitor
- *                          JNIEnv *         owner thread
- *                          u4               entry count
- *                          u4               # of threads waiting to enter
- *                          [JNIEnv *]*      threads waiting to enter
- *                          u4               # of threads waiting to be notified
- *                          [JNIEnv *]*      threads waiting to be notified
- */
-
-/* Format of the heap dump buffer depends on the dump level 
- * specified in the JVMPI_HeapDumpArg passed to RequestEvent as arg. 
- * The default is JVMPI_DUMP_LEVEL_2.
- *
- * JVMPI_DUMP_LEVEL_0:
- * 
- *               u1                          object type (JVMPI_CLASS ...)
- *               jobjectID                   object
- *
- * JVMPI_DUMP_LEVEL_1 and JVMPI_DUMP_LEVEL_2 use the following format:  
- * In the case of JVMPI_DUMP_LEVEL_1 the values of primitive fields in object 
- * instance dumps , the values of primitive statics in class dumps and the 
- * values of primitive arrays are excluded.  JVMPI_DUMP_LEVEL_2 includes the
- * primitive values.
- *
- *               u1                          record type
- *
- *               JVMPI_GC_ROOT_UNKNOWN       unknown root
- *
- *                          jobjectID        object
- *
- *               JVMPI_GC_ROOT_JNI_GLOBAL    JNI global ref root
- *
- *                          jobjectID        object
- *                          jobject          JNI global reference
- *
- *               JVMPI_GC_ROOT_JNI_LOCAL     JNI local ref
- *
- *                          jobjectID        object
- *                          JNIEnv *         thread
- *                          u4               frame # in stack trace (-1 for empty)
- *
- *               JVMPI_GC_ROOT_JAVA_FRAME    Java stack frame
- *
- *                          jobjectID        object
- *                          JNIEnv *         thread
- *                          u4               frame # in stack trace (-1 for empty)
- *
- *               JVMPI_GC_ROOT_NATIVE_STACK  Native stack
- *
- *                          jobjectID        object
- *                          JNIEnv *         thread
- *
- *               JVMPI_GC_ROOT_STICKY_CLASS  System class
- *
- *                          jobjectID        class object
- *
- *               JVMPI_GC_ROOT_THREAD_BLOCK  Reference from thread block
- *
- *                          jobjectID        thread object
- *                          JNIEnv *         thread
- *
- *               JVMPI_GC_ROOT_MONITOR_USED  Busy monitor
- *
- *                          jobjectID        object
- *
- *               JVMPI_GC_CLASS_DUMP         dump of a class object
- *
- *                          jobjectID        class
- *                          jobjectID        super
- *                          jobjectID        class loader
- *                          jobjectID        signers
- *                          jobjectID        protection domain
- *                          jobjectID        class name
- *                          void *           reserved
- *
- *                          u4               instance size (in bytes)
- *
- *                          [jobjectID]*     interfaces
- *
- *                          u2               size of constant pool
- *                          [u2,             constant pool index,
- *                           ty,             type, 
- *                           vl]*            value
- *
- *                          [vl]*            static field values
- *
- *               JVMPI_GC_INSTANCE_DUMP      dump of a normal object
- *
- *                          jobjectID        object
- *                          jobjectID        class
- *                          u4               number of bytes that follow
- *                          [vl]*            instance field values (class, followed
- *                                           by super, super's super ...)
- *
- *               JVMPI_GC_OBJ_ARRAY_DUMP     dump of an object array
- *
- *                          jobjectID        array object
- *                          u4               number of elements
- *                          jobjectID        element class
- *                          [jobjectID]*     elements
- *
- *               JVMPI_GC_PRIM_ARRAY_DUMP    dump of a primitive array
- *
- *                          jobjectID        array object
- *                          u4               number of elements
- *                          ty               element type
- *                          [vl]*            elements
- *
- */
-
-/* Format of the dump received in JVMPI_EVENT_OBJECT_DUMP:
- * All the records have JVMPI_DUMP_LEVEL_2 information.
- *
- *               u1                          record type
- *
- *                     followed by a:
- *
- *                          JVMPI_GC_CLASS_DUMP,
- *                          JVMPI_GC_INSTANCE_DUMP,
- *                          JVMPI_GC_OBJ_ARRAY_DUMP, or
- *                          JVMPI_GC_PRIM_ARRAY_DUMP record.
- */
-
-#endif /* !_JAVASOFT_JVMPI_H_ */
diff --git a/make/stub_includes/jni/win32/jawt_md.h b/make/stub_includes/jni/win32/jawt_md.h
index 2e1fa52..23be13c 100644
--- a/make/stub_includes/jni/win32/jawt_md.h
+++ b/make/stub_includes/jni/win32/jawt_md.h
@@ -1,8 +1,27 @@
 /*
  * @(#)jawt_md.h	1.8 05/11/17
  *
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
- * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+ * This C header file is derived from Sun Microsystem's Java SDK provided C header file
+ * with the following copyright notice:
+ *
+ *   Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ *   SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+ *
+ * This version has complex comments removed and does not contain inlined algorithms etc, if any existed.
+ * 
+ * The original C header file was included to JOGL on Sat Jun 21 02:10:30 2008
+ * (commit cbc45e816f4ee81031bffce19a99550681462a24) by Sun Microsystem's staff and were approved. 
+ *
+ * This C header file is included due to ensure compatibility with - and invocation of the JAWT protocol.
+ * They are processed by GlueGen to create a Java binding for JAWT invocation only.
+ * 
+ * http://ftp.resource.org/courts.gov/c/F3/387/387.F3d.522.03-5400.html (36)
+ * "Atari Games Corp. v. Nintendo of Am., Inc., Nos. 88-4805 & 89-0027, 1993 WL 207548, at *1 (N.D.Cal. May 18, 1993) ("Atari III") 
+ * ("Program code that is strictly necessary to achieve current compatibility presents a merger problem, almost by definition, 
+ * and is thus excluded from the scope of any copyright.")."
+ *
+ * http://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=OJ:L:2009:111:0016:0022:EN:PDF
+ * L 111/17 (10) and (15)
  */
 
 #ifndef _JAVASOFT_JAWT_MD_H_
@@ -15,12 +34,7 @@
 extern "C" {
 #endif
 
-/*
- * Win32-specific declarations for AWT native interface.
- * See notes in jawt.h for an example of use.
- */
 typedef struct jawt_Win32DrawingSurfaceInfo {
-    /* Native window, DDB, or DIB handle */
     /**
     union {
         HWND hwnd;
@@ -29,10 +43,6 @@ typedef struct jawt_Win32DrawingSurfaceInfo {
     }; */
     HWND handle;
 
-    /*
-     * This HDC should always be used instead of the HDC returned from
-     * BeginPaint() or any calls to GetDC().
-     */
     HDC hdc;
     HPALETTE hpalette;
 } JAWT_Win32DrawingSurfaceInfo;
diff --git a/make/stub_includes/jni/win32/jni_md.h b/make/stub_includes/jni/win32/jni_md.h
index 9f0cfa4..001b1b3 100644
--- a/make/stub_includes/jni/win32/jni_md.h
+++ b/make/stub_includes/jni/win32/jni_md.h
@@ -1,8 +1,27 @@
 /*
  * @(#)jni_md.h	1.15 05/11/17
  *
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
- * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+ * This C header file is derived from Sun Microsystem's Java SDK provided C header file
+ * with the following copyright notice:
+ *
+ *   Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ *   SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+ *
+ * This version has complex comments removed and does not contain inlined algorithms etc, if any existed.
+ * 
+ * The original C header file was included to JOGL on Sat Jun 21 02:10:30 2008
+ * (commit cbc45e816f4ee81031bffce19a99550681462a24) by Sun Microsystem's staff and were approved. 
+ *
+ * This C header file is included due to ensure compatibility with - and invocation of the JAWT protocol.
+ * They are processed by GlueGen to create a Java binding for JAWT invocation only.
+ * 
+ * http://ftp.resource.org/courts.gov/c/F3/387/387.F3d.522.03-5400.html (36)
+ * "Atari Games Corp. v. Nintendo of Am., Inc., Nos. 88-4805 & 89-0027, 1993 WL 207548, at *1 (N.D.Cal. May 18, 1993) ("Atari III") 
+ * ("Program code that is strictly necessary to achieve current compatibility presents a merger problem, almost by definition, 
+ * and is thus excluded from the scope of any copyright.")."
+ *
+ * http://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=OJ:L:2009:111:0016:0022:EN:PDF
+ * L 111/17 (10) and (15)
  */
 
 #ifndef _JAVASOFT_JNI_MD_H_
diff --git a/make/stub_includes/jni/x11/jawt_md.h b/make/stub_includes/jni/x11/jawt_md.h
index 2a8fe5c..0879de8 100644
--- a/make/stub_includes/jni/x11/jawt_md.h
+++ b/make/stub_includes/jni/x11/jawt_md.h
@@ -1,8 +1,27 @@
 /*
  * @(#)jawt_md.h	1.12 05/11/17
  *
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
- * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+ * This C header file is derived from Sun Microsystem's Java SDK provided C header file
+ * with the following copyright notice:
+ *
+ *   Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ *   SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+ *
+ * This version has complex comments removed and does not contain inlined algorithms etc, if any existed.
+ * 
+ * The original C header file was included to JOGL on Sat Jun 21 02:10:30 2008
+ * (commit cbc45e816f4ee81031bffce19a99550681462a24) by Sun Microsystem's staff and were approved. 
+ *
+ * This C header file is included due to ensure compatibility with - and invocation of the JAWT protocol.
+ * They are processed by GlueGen to create a Java binding for JAWT invocation only.
+ * 
+ * http://ftp.resource.org/courts.gov/c/F3/387/387.F3d.522.03-5400.html (36)
+ * "Atari Games Corp. v. Nintendo of Am., Inc., Nos. 88-4805 & 89-0027, 1993 WL 207548, at *1 (N.D.Cal. May 18, 1993) ("Atari III") 
+ * ("Program code that is strictly necessary to achieve current compatibility presents a merger problem, almost by definition, 
+ * and is thus excluded from the scope of any copyright.")."
+ *
+ * http://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=OJ:L:2009:111:0016:0022:EN:PDF
+ * L 111/17 (10) and (15)
  */
 
 #ifndef _JAVASOFT_JAWT_MD_H_
@@ -17,10 +36,6 @@
 extern "C" {
 #endif
 
-/*
- * X11-specific declarations for AWT native interface.
- * See notes in jawt.h for an example of use.
- */
 typedef struct jawt_X11DrawingSurfaceInfo {
     Drawable drawable;
     Display* display;
@@ -29,8 +44,6 @@ typedef struct jawt_X11DrawingSurfaceInfo {
     int depth;
     /*
      * Since 1.4
-     * Returns a pixel value from a set of RGB values.
-     * This is useful for paletted color (256 color) modes.
      */
     int (JNICALL *GetAWTColor)(JAWT_DrawingSurface* ds,
         int r, int g, int b);
diff --git a/make/stub_includes/jni/x11/jni_md.h b/make/stub_includes/jni/x11/jni_md.h
index 3320cc7..47f3802 100644
--- a/make/stub_includes/jni/x11/jni_md.h
+++ b/make/stub_includes/jni/x11/jni_md.h
@@ -1,8 +1,27 @@
 /*
  * @(#)jni_md.h	1.19 05/11/17
  *
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
- * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+ * This C header file is derived from Sun Microsystem's Java SDK provided C header file
+ * with the following copyright notice:
+ *
+ *   Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ *   SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+ *
+ * This version has complex comments removed and does not contain inlined algorithms etc, if any existed.
+ * 
+ * The original C header file was included to JOGL on Sat Jun 21 02:10:30 2008
+ * (commit cbc45e816f4ee81031bffce19a99550681462a24) by Sun Microsystem's staff and were approved. 
+ *
+ * This C header file is included due to ensure compatibility with - and invocation of the JAWT protocol.
+ * They are processed by GlueGen to create a Java binding for JAWT invocation only.
+ * 
+ * http://ftp.resource.org/courts.gov/c/F3/387/387.F3d.522.03-5400.html (36)
+ * "Atari Games Corp. v. Nintendo of Am., Inc., Nos. 88-4805 & 89-0027, 1993 WL 207548, at *1 (N.D.Cal. May 18, 1993) ("Atari III") 
+ * ("Program code that is strictly necessary to achieve current compatibility presents a merger problem, almost by definition, 
+ * and is thus excluded from the scope of any copyright.")."
+ *
+ * http://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=OJ:L:2009:111:0016:0022:EN:PDF
+ * L 111/17 (10) and (15)
  */
 
 #ifndef _JAVASOFT_JNI_MD_H_
diff --git a/make/stub_includes/khr/KHR/khrplatform.h b/make/stub_includes/khr/KHR/khrplatform.h
index 1c578fe..1f10e5c 100644
--- a/make/stub_includes/khr/KHR/khrplatform.h
+++ b/make/stub_includes/khr/KHR/khrplatform.h
@@ -132,16 +132,14 @@
 /*-------------------------------------------------------------------------
  * basic type definitions
  *-----------------------------------------------------------------------*/
-#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__)
-
 
 /*
- * Using <stddef.h>
- * Using <stdint.h>
+ * Using <gluegen_stddef.h>
+ * Using <gluegen_stdint.h>
  */
-#include <stddef.h>
+#include <gluegen_stddef.h>
 #define HAS_STDDEF 1
-#include <stdint.h>
+#include <gluegen_stdint.h>
 typedef int32_t                 khronos_int32_t;
 typedef uint32_t                khronos_uint32_t;
 typedef int64_t                 khronos_int64_t;
@@ -149,100 +147,14 @@ typedef uint64_t                khronos_uint64_t;
 #define KHRONOS_SUPPORT_INT64   1
 #define KHRONOS_SUPPORT_FLOAT   1
 
-#elif defined(__VMS ) || defined(__sgi)
-
-/*
- * Using <stddef.h>
- * Using <inttypes.h>
- */
-#include <stddef.h>
-#define HAS_STDDEF 1
-#include <inttypes.h>
-typedef int32_t                 khronos_int32_t;
-typedef uint32_t                khronos_uint32_t;
-typedef int64_t                 khronos_int64_t;
-typedef uint64_t                khronos_uint64_t;
-#define KHRONOS_SUPPORT_INT64   1
-#define KHRONOS_SUPPORT_FLOAT   1
-
-#elif defined(_WIN32) && !defined(__SCITECH_SNAP__)
-
-/*
- * Win32
- */
-typedef __int32                 khronos_int32_t;
-typedef unsigned __int32        khronos_uint32_t;
-typedef __int64                 khronos_int64_t;
-typedef unsigned __int64        khronos_uint64_t;
-#define KHRONOS_SUPPORT_INT64   1
-#define KHRONOS_SUPPORT_FLOAT   1
-
-#elif defined(__sun__) || defined(__digital__)
-
-/*
- * Sun or Digital
- */
-typedef int                     khronos_int32_t;
-typedef unsigned int            khronos_uint32_t;
-#if defined(__arch64__) || defined(_LP64)
-typedef long int                khronos_int64_t;
-typedef unsigned long int       khronos_uint64_t;
-#else
-typedef long long int           khronos_int64_t;
-typedef unsigned long long int  khronos_uint64_t;
-#endif /* __arch64__ */
-#define KHRONOS_SUPPORT_INT64   1
-#define KHRONOS_SUPPORT_FLOAT   1
-
-#elif 0
-
-/*
- * Hypothetical platform with no float or int64 support
- */
-typedef int                     khronos_int32_t;
-typedef unsigned int            khronos_uint32_t;
-#define KHRONOS_SUPPORT_INT64   0
-#define KHRONOS_SUPPORT_FLOAT   0
-
-#else
-
-/*
- * Generic fallback
- *
- * Using <stddef.h>
- * Using <stdint.h>
- */
-#include <stddef.h>
-#define HAS_STDDEF 1
-#include <stdint.h>
-typedef int32_t                 khronos_int32_t;
-typedef uint32_t                khronos_uint32_t;
-typedef int64_t                 khronos_int64_t;
-typedef uint64_t                khronos_uint64_t;
-#define KHRONOS_SUPPORT_INT64   1
-#define KHRONOS_SUPPORT_FLOAT   1
-
-#endif
-
-
-/*
- * Types that are (so far) the same on all platforms
- */
 typedef signed   char          khronos_int8_t;
 typedef unsigned char          khronos_uint8_t;
 typedef signed   short int     khronos_int16_t;
 typedef unsigned short int     khronos_uint16_t;
-#ifndef HAS_STDDEF
-    typedef signed   long  int      khronos_intptr_t;
-    typedef unsigned long  int      khronos_uintptr_t;
-    typedef signed   long  int      khronos_ssize_t;
-    typedef unsigned long  int      khronos_usize_t;
-#else
-    typedef ptrdiff_t               khronos_intptr_t;
-    typedef size_t                  khronos_uintptr_t;
-    typedef ptrdiff_t               khronos_ssize_t;
-    typedef size_t                  khronos_usize_t;
-#endif
+typedef ptrdiff_t              khronos_intptr_t;
+typedef size_t                 khronos_uintptr_t;
+typedef ptrdiff_t              khronos_ssize_t;
+typedef size_t                 khronos_usize_t;
 
 #if KHRONOS_SUPPORT_FLOAT
 /*
diff --git a/make/stub_includes/macosx/OpenGL/OpenGL.h b/make/stub_includes/macosx/OpenGL/OpenGL.h
index afb11ef..e6f3030 100644
--- a/make/stub_includes/macosx/OpenGL/OpenGL.h
+++ b/make/stub_includes/macosx/OpenGL/OpenGL.h
@@ -3,6 +3,7 @@
 
 /* Typedefs to get things working */
 typedef struct _cglObj* CGLContextObj;
+typedef struct _cglObj* CGLShareGroupObj;
 typedef struct _cglObj* CGLPBufferObj;
 typedef struct _cglObj* CGLPixelFormatObj;
 
@@ -110,7 +111,7 @@ CGLError CGLFlushDrawable ( CGLContextObj ctx);
 CGLError CGLSetParameter ( CGLContextObj ctx, CGLContextParameter pname, const int *params );
 CGLError CGLCopyContext ( CGLContextObj src, CGLContextObj dst, int mask );
 
-
+CGLShareGroupObj CGLGetShareGroup(CGLContextObj ctx);
 
 /* PBuffer manipulation */
 CGLError CGLCreatePBuffer(long width,
diff --git a/make/stub_includes/opengl/macosx-window-system.h b/make/stub_includes/opengl/macosx-window-system.h
index 7d2704b..18cf6c7 100644
--- a/make/stub_includes/opengl/macosx-window-system.h
+++ b/make/stub_includes/opengl/macosx-window-system.h
@@ -24,6 +24,7 @@ void *getNSView(void* nsContext);
 void* createContext(void* shareContext,
                     void* nsView,
                     void* pixelFormat,
+                    Bool opaque,
                     int* viewNotReady);
 void *getCGLContext(void* nsContext);
 Bool  makeCurrentContext(void* nsContext);
diff --git a/make/stub_includes/win32/WindowsDWM.h b/make/stub_includes/win32/WindowsDWM.h
new file mode 100644
index 0000000..357602d
--- /dev/null
+++ b/make/stub_includes/win32/WindowsDWM.h
@@ -0,0 +1,33 @@
+#ifndef WGL_DWM_VERSION_1_X
+
+#define DWM_BB_ENABLE 1
+#define DWM_EC_DISABLECOMPOSITION     0
+#define DWM_EC_ENABLECOMPOSITION      1
+  
+typedef struct tagDWM_BLURBEHIND {  
+    DWORD dwFlags;  
+    int fEnable; /* BOOL */
+    HRGN hRgnBlur;  
+    int fTransitionOnMaximized; /* BOOL */
+} DWM_BLURBEHIND, *PDWM_BLURBEHIND;
+  
+typedef struct tagMARGINS {  
+    int cxLeftWidth;
+    int cxRightWidth;
+    int cyTopHeight;
+    int cyBottomHeight;
+} MARGINS, *PMARGINS;
+  
+#endif /*  WGL_DWM_VERSION_1_X */
+
+#ifndef WGL_DWM_VERSION_1_X
+#define WGL_DWM_VERSION_1_X
+
+BOOL DwmIsExtensionAvailable();
+BOOL DwmIsCompositionEnabled();
+BOOL DwmEnableComposition( UINT uCompositionAction );
+BOOL DwmEnableBlurBehindWindow(HWND, CONST DWM_BLURBEHIND *);
+BOOL DwmExtendFrameIntoClientArea(HWND, CONST MARGINS *);
+  
+#endif /*  WGL_DWM_VERSION_1_X */
+
diff --git a/make/stub_includes/win32/window-lib.c b/make/stub_includes/win32/window-lib.c
index c5c5d37..25355cd 100644
--- a/make/stub_includes/win32/window-lib.c
+++ b/make/stub_includes/win32/window-lib.c
@@ -1,2 +1,3 @@
 #include <windows.h>
 #include <wingdi.h>
+#include <WindowsDWM.h>
diff --git a/make/stub_includes/win32/windows.h b/make/stub_includes/win32/windows.h
index c30f99e..f2f3900 100644
--- a/make/stub_includes/win32/windows.h
+++ b/make/stub_includes/win32/windows.h
@@ -26,6 +26,7 @@ typedef HANDLE              HMODULE;
 typedef HANDLE              HINSTANCE;
 typedef HANDLE              HPALETTE;
 typedef HANDLE              HWND;
+typedef HANDLE              HRGN;
 typedef __int32             LONG;
 typedef const char*         LPCSTR;
 typedef void*               LPVOID;
@@ -38,6 +39,7 @@ typedef unsigned short      WORD;
 typedef unsigned short      ATOM;
 typedef intptr_t            DWORD_PTR;
 typedef intptr_t*           PDWORD_PTR;
+typedef __int32             HRESULT;
 
 /* Necessary handle typedefs for parsing wglext.h */
 
diff --git a/make/stub_includes/x11/X11/extensions/Xrender.h b/make/stub_includes/x11/X11/extensions/Xrender.h
new file mode 100644
index 0000000..49cdf69
--- /dev/null
+++ b/make/stub_includes/x11/X11/extensions/Xrender.h
@@ -0,0 +1,42 @@
+#ifndef _XRENDER_H_
+#define _XRENDER_H_
+
+#include <X11/X.h>
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+
+typedef XID PictFormat;
+
+typedef struct {
+    short   red;
+    short   redMask;
+    short   green;
+    short   greenMask;
+    short   blue;
+    short   blueMask;
+    short   alpha;
+    short   alphaMask;
+} XRenderDirectFormat;
+
+typedef struct {
+    PictFormat	id;
+    int			type;
+    int			depth;
+    XRenderDirectFormat	direct;
+    Colormap		colormap;
+} XRenderPictFormat;
+
+#define PictFormatID	    (1 << 0)
+#define PictFormatType	    (1 << 1)
+#define PictFormatDepth	    (1 << 2)
+#define PictFormatRed	    (1 << 3)
+#define PictFormatRedMask   (1 << 4)
+#define PictFormatGreen	    (1 << 5)
+#define PictFormatGreenMask (1 << 6)
+#define PictFormatBlue	    (1 << 7)
+#define PictFormatBlueMask  (1 << 8)
+#define PictFormatAlpha	    (1 << 9)
+#define PictFormatAlphaMask (1 << 10)
+#define PictFormatColormap  (1 << 11)
+
+#endif /* _XRENDER_H_ */
diff --git a/make/stub_includes/x11/window-lib.c b/make/stub_includes/x11/window-lib.c
index 5f33572..7b6da3c 100644
--- a/make/stub_includes/x11/window-lib.c
+++ b/make/stub_includes/x11/window-lib.c
@@ -1,5 +1,6 @@
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
+#include <X11/extensions/Xrender.h>
 
 // Routines needed from Xlib.h and Xutil.h (placed here to avoid having
 // XVisualInfo generated multiple times)
@@ -76,3 +77,6 @@ Bool XF86VidModeSetGammaRamp(
     unsigned short *red_array,
     unsigned short *green_array,
     unsigned short *blue_array);
+
+XRenderPictFormat * XRenderFindVisualFormat (Display *dpy, _Xconst Visual *visual);
+
diff --git a/make/versions.xml b/make/versions.xml
index 66e81d8..6cb59b9 100644
--- a/make/versions.xml
+++ b/make/versions.xml
@@ -12,6 +12,7 @@
        betas before release candidates to give the Community time to
        react.-->
   <property name="jogl_base_version" value="2.0" />
+  <property name="jogl_int_version"  value="2" />
 
   <!-- Uncomment this property in order to produce a JOGL release
        build without running the "RI" (Reference Implementation)
diff --git a/nbproject/.gitignore b/nbproject/.gitignore
deleted file mode 100644
index 3e18ebf..0000000
--- a/nbproject/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-private
diff --git a/src/android/com/jogamp/android/launcher/ClassLoaderUtil.java b/src/android/com/jogamp/android/launcher/ClassLoaderUtil.java
new file mode 100644
index 0000000..4f0bf46
--- /dev/null
+++ b/src/android/com/jogamp/android/launcher/ClassLoaderUtil.java
@@ -0,0 +1,121 @@
+/**
+ * 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.android.launcher;
+
+import java.io.File;
+import android.content.Context;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageManager;
+import android.util.Log;
+import dalvik.system.DexClassLoader;
+
+public class ClassLoaderUtil {
+   private static final String TAG = "JogampClassLoader";
+   
+   public static final String packageGlueGen = "com.jogamp.common";       
+   public static final String packageJogl = "javax.media.opengl";
+   
+   public static final String dexPathName= "jogampDex";
+   
+   private static LauncherTempFileCache tmpFileCache = null;
+   private static ClassLoader jogAmpClassLoader = null;
+   
+   public static synchronized ClassLoader createJogampClassLoaderSingleton(Context ctx, String userPackageName) {
+       if(null==jogAmpClassLoader) {
+           if(null!=tmpFileCache) {
+               throw new InternalError("XXX0");
+           }
+           if(!LauncherTempFileCache.initSingleton(ctx)) {
+               throw new InternalError("TempFileCache initialization error");
+           }
+           tmpFileCache = new LauncherTempFileCache();
+           if(!tmpFileCache.isValid()) {
+               throw new InternalError("TempFileCache instantiation error");                
+           }
+           final ApplicationInfo ai = ctx.getApplicationInfo();
+           Log.d(TAG, "S: userPackageName: "+userPackageName+", dataDir: "+ai.dataDir+", nativeLibraryDir: "+ai.nativeLibraryDir);
+    
+           final String appDir = new File(ai.dataDir).getParent();
+           final String libSub = ai.nativeLibraryDir.substring(ai.nativeLibraryDir.lastIndexOf('/')+1);
+           Log.d(TAG, "S: appDir: "+appDir+", libSub: "+libSub);
+           
+           final String libPathName = appDir + "/" + packageGlueGen + "/" + libSub + "/:" +
+                                      appDir + "/" + packageJogl + "/" + libSub + "/" ;
+           Log.d(TAG, "S: libPath: "+libPathName);
+                   
+           String apkGlueGen = null;
+           String apkJogl = null;
+       
+           try {
+               apkGlueGen = ctx.getPackageManager().getApplicationInfo(packageGlueGen,0).sourceDir;
+               apkJogl = ctx.getPackageManager().getApplicationInfo(packageJogl,0).sourceDir;
+           } catch (PackageManager.NameNotFoundException e) {
+               Log.d(TAG, "error: "+e, e);
+           }
+           if(null == apkGlueGen || null == apkJogl) {
+               Log.d(TAG, "not found: gluegen <"+apkGlueGen+">, jogl <"+apkJogl+">");
+               return null;
+           }
+           
+           final String cp = apkGlueGen + ":" + apkJogl ;
+           Log.d(TAG, "jogamp cp: " + cp);
+       
+           final File dexPath = new File(tmpFileCache.getTempDir(), dexPathName);
+           Log.d(TAG, "jogamp dexPath: " + dexPath.getAbsolutePath());
+           dexPath.mkdir();
+           jogAmpClassLoader = new DexClassLoader(cp, dexPath.getAbsolutePath(), libPathName, ctx.getClassLoader());
+       } else {
+           if(null==tmpFileCache) {
+               throw new InternalError("XXX1");
+           }           
+       }
+       
+       String apkUser = null;
+       try {
+           apkUser = ctx.getPackageManager().getApplicationInfo(userPackageName,0).sourceDir;
+       } catch (PackageManager.NameNotFoundException e) {
+           Log.d(TAG, "error: "+e, e);
+       }
+       if(null == apkUser) {
+           Log.d(TAG, "not found: user apk <"+apkUser+">");
+           return null;
+       }
+       
+       Log.d(TAG, "user cp: " + apkUser);
+       final File dexPath = new File(tmpFileCache.getTempDir(), userPackageName);
+       Log.d(TAG, "user dexPath: " + dexPath.getAbsolutePath());
+       dexPath.mkdir();
+       ClassLoader cl = new DexClassLoader(apkUser, dexPath.getAbsolutePath(), null, jogAmpClassLoader);
+       Log.d(TAG, "cl: " + cl);
+       // setAPKClassLoader(dexLoader);
+       
+       return cl;
+   }
+
+}
diff --git a/src/android/com/jogamp/android/launcher/LauncherTempFileCache.java b/src/android/com/jogamp/android/launcher/LauncherTempFileCache.java
new file mode 100644
index 0000000..9d98d07
--- /dev/null
+++ b/src/android/com/jogamp/android/launcher/LauncherTempFileCache.java
@@ -0,0 +1,477 @@
+/**
+ * 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.android.launcher;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.FilenameFilter;
+import java.io.IOException;
+import java.nio.channels.FileChannel;
+import java.nio.channels.FileLock;
+
+import android.content.Context;
+
+public class LauncherTempFileCache {
+    private static final boolean DEBUG = true;
+
+    // Lifecycle: For all JVMs, ClassLoader and times.
+    private static final String tmpDirPrefix = "jogamp.tmp.cache";
+    
+    // Get the value of the tmproot system property
+    // Lifecycle: For all JVMs and ClassLoader
+    /* package */ static final String tmpRootPropName = "jnlp.jogamp.tmp.cache.root";
+
+    // Flag indicating that we got a fatal error in the static initializer.
+    private static boolean staticInitError = false;
+    
+    private static File tmpBaseDir;
+
+    // String representing the name of the temp root directory relative to the
+    // tmpBaseDir. Its value is "jlnNNNNN", which is the unique filename created
+    // by File.createTempFile() without the ".tmp" extension.
+    //
+    // Lifecycle: For all JVMs and ClassLoader
+    //
+    private static String tmpRootPropValue;
+
+    private static File tmpRootDir;
+
+    // Flag indicating that we got a fatal error in the initializer.
+    private boolean initError = false;
+
+    private File individualTmpDir;
+    
+    /**
+     * Documented way to kick off static initialization
+     * @return true is static initialization was successful
+     */
+    public static synchronized boolean initSingleton(Context ctx) {
+        if(null == tmpRootDir && !staticInitError) {
+            // Create / initialize the temp root directory, starting the Reaper
+            // thread to reclaim old installations if necessary. If we get an
+            // exception, set an error code.
+            try {
+                initTmpRoot(ctx);
+            } catch (Exception ex) {
+                ex.printStackTrace();
+                staticInitError = true;
+            }
+        }
+        return !staticInitError;        
+    }
+    
+    /**
+     * This method is called by the static initializer to create / initialize
+     * the temp root directory that will hold the temp directories for this
+     * instance of the JVM. This is done as follows:
+     *
+     *     1. Synchronize on a global lock. Note that for this purpose we will
+     *        use System.out in the absence of a true global lock facility.
+     *        We are careful not to hold this lock too long.
+     *
+     *     2. Check for the existence of the "jnlp.applet.launcher.tmproot"
+     *        system property.
+     *
+     *         a. If set, then some other thread in a different ClassLoader has
+     *            already created the tmprootdir, so we just need to
+     *            use it. The remaining steps are skipped.
+     *
+     *         b. If not set, then we are the first thread in this JVM to run,
+     *            and we need to create the the tmprootdir.
+     *
+     *     3. Create the tmprootdir, along with the appropriate locks.
+     *        Note that we perform the operations in the following order,
+     *        prior to creating tmprootdir itself, to work around the fact that
+     *        the file creation and file lock steps are not atomic, and we need
+     *        to ensure that a newly-created tmprootdir isn't reaped by a
+     *        concurrently running JVM.
+     *
+     *            create jlnNNNN.tmp using File.createTempFile()
+     *            lock jlnNNNN.tmp
+     *            create jlnNNNN.lck while holding the lock on the .tmp file
+     *            lock jlnNNNN.lck
+     *
+     *        Since the Reaper thread will enumerate the list of *.lck files
+     *        before starting, we can guarantee that if there exists a *.lck file
+     *        for an active process, then the corresponding *.tmp file is locked
+     *        by that active process. This guarantee lets us avoid reaping an
+     *        active process' files.
+     *
+     *     4. Set the "jnlp.applet.launcher.tmproot" system property.
+     *
+     *     5. Add a shutdown hook to cleanup jlnNNNN.lck and jlnNNNN.tmp. We
+     *        don't actually expect that this shutdown hook will ever be called,
+     *        but the act of doing this, ensures that the locks never get
+     *        garbage-collected, which is necessary for correct behavior when
+     *        the first ClassLoader is later unloaded, while subsequent Applets
+     *        are still running.
+     *
+     *     6. Start the Reaper thread to cleanup old installations.
+     */
+    private static void initTmpRoot(Context ctx) throws IOException {
+        if (DEBUG) {
+            System.err.println("TempFileCache: Static Initialization ----------------------------------------------");
+            System.err.println("TempFileCache: Thread: "+Thread.currentThread().getName()+", CL 0x"+Integer.toHexString(LauncherTempFileCache.class.getClassLoader().hashCode()));
+        }
+
+        synchronized (System.out) {
+            // Get the name of the tmpbase directory.
+            {
+                final File tmpRoot = ctx.getDir("temp", Context.MODE_WORLD_READABLE);
+                tmpBaseDir = new File(tmpRoot, tmpDirPrefix);
+            }
+            tmpRootPropValue = System.getProperty(tmpRootPropName);
+
+            if (tmpRootPropValue == null) {
+                // Create the tmpbase directory if it doesn't already exist
+                tmpBaseDir.mkdir();
+                if (!tmpBaseDir.isDirectory()) {
+                    throw new IOException("Cannot create directory " + tmpBaseDir);
+                }
+
+                // Create ${tmpbase}/jlnNNNN.tmp then lock the file
+                File tmpFile = File.createTempFile("jln", ".tmp", tmpBaseDir);
+                if (DEBUG) {
+                    System.err.println("TempFileCache: tmpFile = " + tmpFile.getAbsolutePath());
+                }
+                final FileOutputStream tmpOut = new FileOutputStream(tmpFile);
+                final FileChannel tmpChannel = tmpOut.getChannel();
+                final FileLock tmpLock = tmpChannel.lock();
+
+                // Strip off the ".tmp" to get the name of the tmprootdir
+                String tmpFileName = tmpFile.getAbsolutePath();
+                String tmpRootName = tmpFileName.substring(0, tmpFileName.lastIndexOf(".tmp"));
+
+                // create ${tmpbase}/jlnNNNN.lck then lock the file
+                String lckFileName = tmpRootName + ".lck";
+                File lckFile = new File(lckFileName);
+                if (DEBUG) {
+                    System.err.println("TempFileCache: lckFile = " + lckFile.getAbsolutePath());
+                }
+                lckFile.createNewFile();
+                final FileOutputStream lckOut = new FileOutputStream(lckFile);
+                final FileChannel lckChannel = lckOut.getChannel();
+                final FileLock lckLock = lckChannel.lock();
+
+                // Create tmprootdir
+                tmpRootDir = new File(tmpRootName);
+                if (DEBUG) {
+                    System.err.println("TempFileCache: tmpRootDir = " + tmpRootDir.getAbsolutePath());
+                }
+                if (!tmpRootDir.mkdir()) {
+                    throw new IOException("Cannot create " + tmpRootDir);
+                }
+
+                // Add shutdown hook to cleanup the OutputStream, FileChannel,
+                // and FileLock for the jlnNNNN.lck and jlnNNNN.lck files.
+                // We do this so that the locks never get garbage-collected.
+                Runtime.getRuntime().addShutdownHook(new Thread() {
+                    /* @Override */
+                    public void run() {
+                        // NOTE: we don't really expect that this code will ever
+                        // be called. If it does, we will close the output
+                        // stream, which will in turn close the channel.
+                        // We will then release the lock.
+                        try {
+                            tmpOut.close();
+                            tmpLock.release();
+                            lckOut.close();
+                            lckLock.release();
+                        } catch (IOException ex) {
+                            // Do nothing
+                        }
+                    }
+                });
+
+                // Set the system property...
+                tmpRootPropValue = tmpRootName.substring(tmpRootName.lastIndexOf(File.separator) + 1);
+                System.setProperty(tmpRootPropName, tmpRootPropValue);
+                if (DEBUG) {
+                    System.err.println("TempFileCache: Setting " + tmpRootPropName + "=" + tmpRootPropValue);
+                }
+
+                // Start a new Reaper thread to do stuff...
+                Thread reaperThread = new Thread() {
+                    /* @Override */
+                    public void run() {
+                        deleteOldTempDirs();
+                    }
+                };
+                reaperThread.setName("TempFileCache-Reaper");
+                reaperThread.start();
+            } else {
+                // Make sure that the property is not set to an illegal value
+                if (tmpRootPropValue.indexOf('/') >= 0 ||
+                        tmpRootPropValue.indexOf(File.separatorChar) >= 0) {
+                    throw new IOException("Illegal value of: " + tmpRootPropName);
+                }
+
+                // Set tmpRootDir = ${tmpbase}/${jnlp.applet.launcher.tmproot}
+                if (DEBUG) {
+                    System.err.println("TempFileCache: Using existing value of: " +
+                            tmpRootPropName + "=" + tmpRootPropValue);
+                }
+                tmpRootDir = new File(tmpBaseDir, tmpRootPropValue);
+                if (DEBUG) {
+                    System.err.println("TempFileCache: tmpRootDir = " + tmpRootDir.getAbsolutePath());
+                }
+                if (!tmpRootDir.isDirectory()) {
+                    throw new IOException("Cannot access " + tmpRootDir);
+                }
+            }
+        }
+        if (DEBUG) {
+            System.err.println("------------------------------------------------------------------ (static ok: "+(!staticInitError)+")");
+        }
+    }
+
+    /**
+     * Called by the Reaper thread to delete old temp directories
+     * Only one of these threads will run per JVM invocation.
+     */
+    private static void deleteOldTempDirs() {
+        if (DEBUG) {
+            System.err.println("TempFileCache: *** Reaper: deleteOldTempDirs in " +
+                    tmpBaseDir.getAbsolutePath());
+        }
+
+        // enumerate list of jnl*.lck files, ignore our own jlnNNNN file
+        final String ourLockFile = tmpRootPropValue + ".lck";
+        FilenameFilter lckFilter = new FilenameFilter() {
+            /* @Override */
+            public boolean accept(File dir, String name) {
+                return name.endsWith(".lck") && !name.equals(ourLockFile);
+            }
+        };
+
+        // For each file <file>.lck in the list we will first try to lock
+        // <file>.tmp if that succeeds then we will try to lock <file>.lck
+        // (which should always succeed unless there is a problem). If we can
+        // get the lock on both files, then it must be an old installation, and
+        // we will delete it.
+        String[] fileNames = tmpBaseDir.list(lckFilter);
+        if (fileNames != null) {
+            for (int i = 0; i < fileNames.length; i++) {
+                String lckFileName = fileNames[i];
+                String tmpDirName = lckFileName.substring(0, lckFileName.lastIndexOf(".lck"));
+                String tmpFileName = tmpDirName + ".tmp";
+
+                File lckFile = new File(tmpBaseDir, lckFileName);
+                File tmpFile = new File(tmpBaseDir, tmpFileName);
+                File tmpDir = new File(tmpBaseDir, tmpDirName);
+
+                if (lckFile.exists() && tmpFile.exists() && tmpDir.isDirectory()) {
+                    FileOutputStream tmpOut = null;
+                    FileChannel tmpChannel = null;
+                    FileLock tmpLock = null;
+
+                    try {
+                        tmpOut = new FileOutputStream(tmpFile);
+                        tmpChannel = tmpOut.getChannel();
+                        tmpLock = tmpChannel.tryLock();
+                    } catch (Exception ex) {
+                        // Ignore exceptions
+                        if (DEBUG) {
+                            ex.printStackTrace();
+                        }
+                    }
+
+                    if (tmpLock != null) {
+                        FileOutputStream lckOut = null;
+                        FileChannel lckChannel = null;
+                        FileLock lckLock = null;
+
+                        try {
+                            lckOut = new FileOutputStream(lckFile);
+                            lckChannel = lckOut.getChannel();
+                            lckLock = lckChannel.tryLock();
+                        } catch (Exception ex) {
+                            if (DEBUG) {
+                                ex.printStackTrace();
+                            }
+                        }
+
+                        if (lckLock != null) {
+                            // Recursively remove the old tmpDir and all of
+                            // its contents
+                            removeAll(tmpDir);
+
+                            // Close the streams and delete the .lck and .tmp
+                            // files. Note that there is a slight race condition
+                            // in that another process could open a stream at
+                            // the same time we are trying to delete it, which will
+                            // prevent deletion, but we won't worry about it, since
+                            // the worst that will happen is we might have an
+                            // occasional 0-byte .lck or .tmp file left around
+                            try {
+                                lckOut.close();
+                            } catch (IOException ex) {
+                            }
+                            lckFile.delete();
+                            try {
+                                tmpOut.close();
+                            } catch (IOException ex) {
+                            }
+                            tmpFile.delete();
+                        } else {
+                            try {
+                                // Close the file and channel for the *.lck file
+                                if (lckOut != null) {
+                                    lckOut.close();
+                                }
+                                // Close the file/channel and release the lock
+                                // on the *.tmp file
+                                tmpOut.close();
+                                tmpLock.release();
+                            } catch (IOException ex) {
+                                if (DEBUG) {
+                                    ex.printStackTrace();
+                                }
+                            }
+                        }
+                    }
+                } else {
+                    if (DEBUG) {
+                        System.err.println("TempFileCache: Skipping: " + tmpDir.getAbsolutePath());
+                    }
+                }
+            }
+        }
+    }
+
+    /**
+     * Remove the specified file or directory. If "path" is a directory, then
+     * recursively remove all entries, then remove the directory itself.
+     */
+    private static void removeAll(File path) {
+        if (DEBUG) {
+            System.err.println("TempFileCache: removeAll(" + path + ")");
+        }
+
+        if (path.isDirectory()) {
+            // Recursively remove all files/directories in this directory
+            File[] list = path.listFiles();
+            if (list != null) {
+                for (int i = 0; i < list.length; i++) {
+                    removeAll(list[i]);
+                }
+            }
+        }
+
+        path.delete();
+    }
+
+    public LauncherTempFileCache () {
+        if (DEBUG) {
+            System.err.println("TempFileCache: new TempFileCache() --------------------- (static ok: "+(!staticInitError)+")");
+            System.err.println("TempFileCache: Thread: "+Thread.currentThread().getName()+", CL 0x"+Integer.toHexString(LauncherTempFileCache.class.getClassLoader().hashCode())+", this 0x"+Integer.toHexString(hashCode()));
+        }
+        if(!staticInitError) { 
+            try {
+                createTmpDir();
+            } catch (Exception ex) {
+                ex.printStackTrace();
+                initError = true;
+            }
+        }
+        if (DEBUG) {
+            System.err.println("tempDir: "+individualTmpDir+" (ok: "+(!initError)+")");
+            System.err.println("----------------------------------------------------------");
+        }        
+    }
+    
+    /**
+     * @return true is static and object initialization was successful
+     */
+    public boolean isValid() { return !staticInitError && !initError; }
+    
+    /**
+     * Base temp directory used by TempFileCache. 
+     * Lifecycle: For all JVMs, ClassLoader and times.
+     * 
+     * This is set to:
+     *
+     * ${java.io.tmpdir}/<tmpDirPrefix>
+     *
+     * 
+     * @return
+     */
+    public File getBaseDir() { return tmpBaseDir; }
+
+    /**
+     * Root temp directory for this JVM instance. Used to store individual
+     * directories.
+     *
+     * Lifecycle: For all JVMs and ClassLoader
+     *
+     * <tmpBaseDir>/<tmpRootPropValue>
+     *
+     * Use Case: Per ClassLoader files, eg. native libraries. 
+     *
+     * Old temp directories are cleaned up the next time a JVM is launched that
+     * uses TempFileCache.
+     *
+     * 
+     * @return
+     */
+    public File getRootDir() { return tmpRootDir; }
+    
+    /**
+     * Temporary directory for individual files (eg. native libraries of one ClassLoader instance).
+     * The directory name is:
+     *
+     * Lifecycle: Within each JVM .. use case dependent, ie. per ClassLoader
+     *
+     * <tmpRootDir>/jlnMMMMM
+     *
+     * where jlnMMMMM is the unique filename created by File.createTempFile()
+     * without the ".tmp" extension.
+     *
+     * 
+     * @return
+     */
+    public File getTempDir() { return individualTmpDir; }
+    
+    
+    /**
+     * Create the temp directory in tmpRootDir. To do this, we create a temp
+     * file with a ".tmp" extension, and then create a directory of the
+     * same name but without the ".tmp". The temp file, directory, and all
+     * files in the directory will be reaped the next time this is started.
+     * We avoid deleteOnExit, because it doesn't work reliably.
+     */
+    private void createTmpDir() throws IOException {
+        File tmpFile = File.createTempFile("jln", ".tmp", tmpRootDir);
+        String tmpFileName = tmpFile.getAbsolutePath();
+        String tmpDirName = tmpFileName.substring(0, tmpFileName.lastIndexOf(".tmp"));
+        individualTmpDir = new File(tmpDirName);
+        if (!individualTmpDir.mkdir()) {
+            throw new IOException("Cannot create " + individualTmpDir);
+        }
+    }
+}
diff --git a/src/android/com/jogamp/android/launcher/NEWTLauncherActivity.java b/src/android/com/jogamp/android/launcher/NEWTLauncherActivity.java
new file mode 100644
index 0000000..3120fc7
--- /dev/null
+++ b/src/android/com/jogamp/android/launcher/NEWTLauncherActivity.java
@@ -0,0 +1,254 @@
+/**
+ * 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.android.launcher;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import android.app.Activity;
+import android.os.Bundle;
+import android.view.Window;
+import android.view.WindowManager;
+import android.widget.TextView;
+import android.util.Log;
+
+public abstract class NEWTLauncherActivity extends Activity {
+   static final String TAG = "NEWTLauncherActivity";
+   TextView tv = null;
+   Method mOnCreate, mOnDestroy, mOnPause, mOnRestart, mOnResume, 
+          mOnStart, mOnStop, mSetIsInvokedByExternalActivity;
+   Class<?> activityClazz = null;
+   Object activityObject  = null;
+   
+   public abstract String getUserActivityName();
+   public abstract String getUserPackageName();
+   
+   @Override
+   public void onCreate(Bundle savedInstanceState) {
+       Log.d(TAG, "onCreate - S");
+       super.onCreate(savedInstanceState);
+       
+       System.setProperty("jogamp.debug.JNILibLoader", "true");
+       System.setProperty("jogamp.debug.NativeLibrary", "true");
+       // System.setProperty("jogamp.debug.NativeLibrary.Lookup", "true");
+       // System.setProperty("jogamp.debug.IOUtil", "true");       
+
+       // System.setProperty("nativewindow.debug", "all");
+       System.setProperty("nativewindow.debug.GraphicsConfiguration", "true");
+
+       // System.setProperty("jogl.debug", "all");
+       // System.setProperty("jogl.debug.GLProfile", "true");
+       System.setProperty("jogl.debug.GLDrawable", "true");
+       System.setProperty("jogl.debug.GLContext", "true");
+       System.setProperty("jogl.debug.GLSLCode", "true");
+       System.setProperty("jogl.debug.CapabilitiesChooser", "true");
+       
+       // System.setProperty("jogl.debug.GLSLState", "true");
+       // System.setProperty("jogl.debug.DebugGL", "true");
+       // System.setProperty("jogl.debug.TraceGL", "true");
+
+       // System.setProperty("newt.debug", "all");
+       System.setProperty("newt.debug.Window", "true");
+       // System.setProperty("newt.debug.Window.MouseEvent", "true");
+       // System.setProperty("newt.debug.Window.KeyEvent", "true");
+
+       ClassLoader cl = ClassLoaderUtil.createJogampClassLoaderSingleton(this, getUserPackageName());
+       if(null != cl) {
+           try {
+               activityClazz = Class.forName(getUserActivityName(), true, cl);
+               Log.d(TAG, "Activity Clazz "+activityClazz);
+               activityObject = createInstance(activityClazz, null);
+               Log.d(TAG, "Activity Object "+activityObject);
+               mOnCreate = activityClazz.getMethod("onCreate", Bundle.class);
+               mOnDestroy = activityClazz.getMethod("onDestroy");
+               mOnPause = activityClazz.getMethod("onPause");
+               mOnRestart = activityClazz.getMethod("onRestart");
+               mOnResume = activityClazz.getMethod("onResume");
+               mOnStart = activityClazz.getMethod("onStart");
+               mOnStop = activityClazz.getMethod("onStop");
+               mSetIsInvokedByExternalActivity = activityClazz.getMethod("setIsInvokedByExternalActivity", Activity.class);
+           } catch (Exception e) {
+               Log.d(TAG, "error: "+e, e);
+               throw new RuntimeException(e);
+           }
+       }
+
+       if( null == mOnCreate || null == mOnDestroy || null == mOnPause ||
+           null == mOnRestart || null == mOnResume ||
+           null == mSetIsInvokedByExternalActivity ) {
+           RuntimeException e = new RuntimeException("XXX - incomplete method set");
+           Log.d(TAG, "error: "+e, e);
+           throw e;
+       }
+       
+       callMethod(activityObject, mSetIsInvokedByExternalActivity, this);
+       
+       callMethod(activityObject, mOnCreate, savedInstanceState);
+       Log.d(TAG, "onCreate - X");
+   }
+   
+   @Override
+   public void onStart() {
+     Log.d(TAG, "onStart - S");
+     callMethod(activityObject, mOnStart);
+     super.onStart();
+     Log.d(TAG, "onStart - X");
+   }
+     
+   @Override
+   public void onRestart() {
+     Log.d(TAG, "onRestart - S");
+     callMethod(activityObject, mOnRestart);
+     super.onRestart();
+     Log.d(TAG, "onRestart - X");
+   }
+
+   @Override
+   public void onResume() {
+     Log.d(TAG, "onResume - S");
+     callMethod(activityObject, mOnResume);
+     super.onResume();
+     Log.d(TAG, "onResume - X");
+   }
+
+   @Override
+   public void onPause() {
+     Log.d(TAG, "onPause - S");
+     callMethod(activityObject, mOnPause);
+     super.onPause();
+     Log.d(TAG, "onPause - X");
+   }
+
+   @Override
+   public void onStop() {
+     Log.d(TAG, "onStop - S");
+     callMethod(activityObject, mOnStop);
+     super.onStop();  
+     Log.d(TAG, "onStop - X");
+   }
+
+   @Override
+   public void onDestroy() {
+     Log.d(TAG, "onDestroy - S");
+     callMethod(activityObject, mOnDestroy);
+     super.onDestroy();  
+     finish();
+     Log.d(TAG, "onDestroy - X");
+   }   
+
+   @Override
+   public void finish() {
+     Log.d(TAG, "finish - S");
+     super.finish();  
+     Log.d(TAG, "finish - X");
+   }   
+
+  /**
+   * @throws JogampRuntimeException if the instance can not be created.
+   */
+  public static final Object createInstance(Class<?> clazz, Class<?>[] cstrArgTypes, Object ... cstrArgs) 
+      throws RuntimeException
+  {
+    return createInstance(getConstructor(clazz, cstrArgTypes), cstrArgs);
+  }
+
+  public static final Object createInstance(Constructor<?> cstr, Object ... cstrArgs) 
+      throws RuntimeException
+  {
+    try {
+        return cstr.newInstance(cstrArgs);
+    } catch (Exception e) {
+      Throwable t = e;
+      if (t instanceof InvocationTargetException) {
+        t = ((InvocationTargetException) t).getTargetException();
+      }
+      if (t instanceof Error) {
+        throw (Error) t;
+      }
+      if (t instanceof RuntimeException) {
+        throw (RuntimeException) t;
+      }
+      throw new RuntimeException("can not create instance of "+cstr.getName(), t);
+    }
+  }
+  
+    /**
+     * @throws JogampRuntimeException if the constructor can not be delivered.
+     */
+    protected static final Constructor<?> getConstructor(Class<?> clazz, Class<?> ... cstrArgTypes) 
+        throws RuntimeException {
+        try {
+            if(null == cstrArgTypes) {
+                cstrArgTypes = zeroTypes;
+            }
+            return clazz.getDeclaredConstructor(cstrArgTypes);
+        } catch (NoSuchMethodException ex) {
+            throw new RuntimeException("Constructor: '" + clazz + "(" + asString(cstrArgTypes) + ")' not found", ex);
+        }
+    }
+    
+    protected static final Class<?>[] zeroTypes = new Class[0];
+
+    protected static final String asString(Class<?>[] argTypes) {
+        StringBuffer args = new StringBuffer();
+        boolean coma = false;
+        if(null != argTypes) {
+            for (int i = 0; i < argTypes.length; i++) {
+                if(coma) {
+                     args.append(", ");
+                }
+                args.append(argTypes[i].getName());
+                coma = true;
+            }
+        }
+        return args.toString();
+    }
+    
+  protected static final Object callMethod(Object instance, Method method, Object ... args)
+      throws RuntimeException
+  {
+    try {
+        return method.invoke(instance, args);
+    } catch (Exception e) {
+      Throwable t = e;
+      if (t instanceof InvocationTargetException) {
+        t = ((InvocationTargetException) t).getTargetException();
+      }
+      if (t instanceof Error) {
+        throw (Error) t;
+      }
+      if (t instanceof RuntimeException) {
+        throw (RuntimeException) t;
+      }
+      throw new RuntimeException("calling "+method+" failed", t);
+    }
+  }
+
+
+}
diff --git a/src/android/com/jogamp/android/launcher/NEWTLauncherElektronActivity.java b/src/android/com/jogamp/android/launcher/NEWTLauncherElektronActivity.java
new file mode 100644
index 0000000..85a751e
--- /dev/null
+++ b/src/android/com/jogamp/android/launcher/NEWTLauncherElektronActivity.java
@@ -0,0 +1,15 @@
+package com.jogamp.android.launcher;
+
+public class NEWTLauncherElektronActivity extends NEWTLauncherActivity {
+    static String demo = "com.jogamp.opengl.test.android.NEWTElektronActivity";
+    static String pkg = "com.jogamp.opengl.test";
+    
+    @Override
+    public String getUserActivityName() {
+        return demo;
+    }
+    @Override
+    public String getUserPackageName() {
+        return pkg;
+    }
+}
diff --git a/src/android/com/jogamp/android/launcher/NEWTLauncherGearsES1Activity.java b/src/android/com/jogamp/android/launcher/NEWTLauncherGearsES1Activity.java
new file mode 100644
index 0000000..05b4754
--- /dev/null
+++ b/src/android/com/jogamp/android/launcher/NEWTLauncherGearsES1Activity.java
@@ -0,0 +1,15 @@
+package com.jogamp.android.launcher;
+
+public class NEWTLauncherGearsES1Activity extends NEWTLauncherActivity {
+    static String demo = "com.jogamp.opengl.test.android.NEWTGearsES1Activity";
+    static String pkg = "com.jogamp.opengl.test";
+
+    @Override
+    public String getUserActivityName() {
+        return demo;
+    }
+    @Override
+    public String getUserPackageName() {
+        return pkg;
+    }
+}
diff --git a/src/android/com/jogamp/android/launcher/NEWTLauncherGearsES2Activity.java b/src/android/com/jogamp/android/launcher/NEWTLauncherGearsES2Activity.java
new file mode 100644
index 0000000..78f2b74
--- /dev/null
+++ b/src/android/com/jogamp/android/launcher/NEWTLauncherGearsES2Activity.java
@@ -0,0 +1,15 @@
+package com.jogamp.android.launcher;
+
+public class NEWTLauncherGearsES2Activity extends NEWTLauncherActivity {
+    static String demo = "com.jogamp.opengl.test.android.NEWTGearsES2Activity";
+    static String pkg = "com.jogamp.opengl.test";
+
+    @Override
+    public String getUserActivityName() {
+        return demo;
+    }
+    @Override
+    public String getUserPackageName() {
+        return pkg;
+    }
+}
diff --git a/src/android/com/jogamp/android/launcher/NEWTLauncherGearsES2TransActivity.java b/src/android/com/jogamp/android/launcher/NEWTLauncherGearsES2TransActivity.java
new file mode 100644
index 0000000..c55620f
--- /dev/null
+++ b/src/android/com/jogamp/android/launcher/NEWTLauncherGearsES2TransActivity.java
@@ -0,0 +1,15 @@
+package com.jogamp.android.launcher;
+
+public class NEWTLauncherGearsES2TransActivity extends NEWTLauncherActivity {
+    static String demo = "com.jogamp.opengl.test.android.NEWTGearsES2TransActivity";
+    static String pkg = "com.jogamp.opengl.test";
+
+    @Override
+    public String getUserActivityName() {
+        return demo;
+    }
+    @Override
+    public String getUserPackageName() {
+        return pkg;
+    }
+}
diff --git a/src/android/com/jogamp/android/launcher/NEWTLauncherGraphUI1pActivity.java b/src/android/com/jogamp/android/launcher/NEWTLauncherGraphUI1pActivity.java
new file mode 100644
index 0000000..1af0de1
--- /dev/null
+++ b/src/android/com/jogamp/android/launcher/NEWTLauncherGraphUI1pActivity.java
@@ -0,0 +1,15 @@
+package com.jogamp.android.launcher;
+
+public class NEWTLauncherGraphUI1pActivity extends NEWTLauncherActivity {
+    static String demo = "com.jogamp.opengl.test.android.NEWTGraphUI1pActivity";
+    static String pkg = "com.jogamp.opengl.test";
+
+    @Override
+    public String getUserActivityName() {
+        return demo;
+    }
+    @Override
+    public String getUserPackageName() {
+        return pkg;
+    }
+}
diff --git a/src/android/com/jogamp/android/launcher/NEWTLauncherGraphUI2pActivity.java b/src/android/com/jogamp/android/launcher/NEWTLauncherGraphUI2pActivity.java
new file mode 100644
index 0000000..0a5f8d2
--- /dev/null
+++ b/src/android/com/jogamp/android/launcher/NEWTLauncherGraphUI2pActivity.java
@@ -0,0 +1,15 @@
+package com.jogamp.android.launcher;
+
+public class NEWTLauncherGraphUI2pActivity extends NEWTLauncherActivity {
+    static String demo = "com.jogamp.opengl.test.android.NEWTGraphUI2pActivity";
+    static String pkg = "com.jogamp.opengl.test";
+
+    @Override
+    public String getUserActivityName() {
+        return demo;
+    }
+    @Override
+    public String getUserPackageName() {
+        return pkg;
+    }
+}
diff --git a/src/android/com/jogamp/android/launcher/NEWTLauncherRedSquareES1Activity.java b/src/android/com/jogamp/android/launcher/NEWTLauncherRedSquareES1Activity.java
new file mode 100644
index 0000000..af52705
--- /dev/null
+++ b/src/android/com/jogamp/android/launcher/NEWTLauncherRedSquareES1Activity.java
@@ -0,0 +1,15 @@
+package com.jogamp.android.launcher;
+
+public class NEWTLauncherRedSquareES1Activity extends NEWTLauncherActivity {
+    static String demo = "com.jogamp.opengl.test.android.NEWTRedSquareES1Activity";
+    static String pkg = "com.jogamp.opengl.test";
+
+    @Override
+    public String getUserActivityName() {
+        return demo;
+    }
+    @Override
+    public String getUserPackageName() {
+        return pkg;
+    }
+}
diff --git a/src/android/com/jogamp/android/launcher/NEWTLauncherRedSquareES2Activity.java b/src/android/com/jogamp/android/launcher/NEWTLauncherRedSquareES2Activity.java
new file mode 100644
index 0000000..03e2ad7
--- /dev/null
+++ b/src/android/com/jogamp/android/launcher/NEWTLauncherRedSquareES2Activity.java
@@ -0,0 +1,15 @@
+package com.jogamp.android.launcher;
+
+public class NEWTLauncherRedSquareES2Activity extends NEWTLauncherActivity {
+    static String demo = "com.jogamp.opengl.test.android.NEWTRedSquareES2Activity";
+    static String pkg = "com.jogamp.opengl.test";
+
+    @Override
+    public String getUserActivityName() {
+        return demo;
+    }
+    @Override
+    public String getUserPackageName() {
+        return pkg;
+    }
+}
diff --git a/src/jogl/classes/com/jogamp/gluegen/opengl/BuildComposablePipeline.java b/src/jogl/classes/com/jogamp/gluegen/opengl/BuildComposablePipeline.java
index d11504a..f3d0d37 100644
--- a/src/jogl/classes/com/jogamp/gluegen/opengl/BuildComposablePipeline.java
+++ b/src/jogl/classes/com/jogamp/gluegen/opengl/BuildComposablePipeline.java
@@ -630,6 +630,9 @@ public class BuildComposablePipeline {
             output.println("  public boolean isGLES() {");
             output.println("    return isGLES2() || isGLES1();");
             output.println("  }");
+            output.println("  public boolean isGLES2Compatible() {");
+            output.println("    return " + getDownstreamObjectName() + ".isGLES2Compatible();");
+            output.println("  }");
         }
 
         /**
@@ -934,10 +937,13 @@ public class BuildComposablePipeline {
                 output.println("    String txt = new String(\"" + m.getName() + "(\" +");
                 Class<?>[] params = m.getParameterTypes();
                 for (int i = 0; params != null && i < params.length; i++) {
-                    if (params[i].equals(int.class)) {
-                        output.println("    \"<" + params[i].getName() + "> 0x\"+Integer.toHexString(arg" + i + ").toUpperCase() +");
+                    output.print("    \"<" + params[i].getName() + ">");
+                    if (params[i].isArray()) {
+                        output.print("\" +");
+                    } else if (params[i].equals(int.class)) {
+                        output.print(" 0x\"+Integer.toHexString(arg" + i + ").toUpperCase() +");
                     } else {
-                        output.println("    \"<" + params[i].getName() + ">\" +");
+                        output.print(" \"+arg" + i + " +");
                     }
                     if (i < params.length - 1) {
                         output.println("    \", \" +");
@@ -1081,12 +1087,13 @@ public class BuildComposablePipeline {
         Class<?>[] params = m.getParameterTypes();
         output.print("    \"" + m.getName() + "(\"");
         for (int i = 0; i < params.length; i++) {
+            output.print("+\"<" + params[i].getName() + ">");
             if (params[i].isArray()) {
-                output.print("+\"<" + params[i].getName() + ">\"");
+                output.print("\"");
             } else if (params[i].equals(int.class)) {
-                output.print("+\"<" + params[i].getName() + "> 0x\"+Integer.toHexString(arg" + i + ").toUpperCase()");
+                output.print(" 0x\"+Integer.toHexString(arg" + i + ").toUpperCase()");
             } else {
-                output.print("+\"<" + params[i].getName() + "> \"+arg" + i);
+                output.print(" \"+arg" + i);
             }
             if (i < params.length - 1) {
                 output.print("+\", \"");
diff --git a/src/jogl/classes/com/jogamp/gluegen/opengl/GLEmitter.java b/src/jogl/classes/com/jogamp/gluegen/opengl/GLEmitter.java
index 530e6fe..a096934 100644
--- a/src/jogl/classes/com/jogamp/gluegen/opengl/GLEmitter.java
+++ b/src/jogl/classes/com/jogamp/gluegen/opengl/GLEmitter.java
@@ -52,6 +52,7 @@ 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 java.io.IOException;
 import java.io.PrintWriter;
 import java.util.ArrayList;
diff --git a/src/jogl/classes/com/jogamp/gluegen/opengl/GLJavaMethodBindingEmitter.java b/src/jogl/classes/com/jogamp/gluegen/opengl/GLJavaMethodBindingEmitter.java
index 4d8c149..87d8708 100755
--- a/src/jogl/classes/com/jogamp/gluegen/opengl/GLJavaMethodBindingEmitter.java
+++ b/src/jogl/classes/com/jogamp/gluegen/opengl/GLJavaMethodBindingEmitter.java
@@ -45,6 +45,7 @@ import com.jogamp.gluegen.JavaMethodBindingEmitter;
 import com.jogamp.gluegen.MethodBinding;
 import com.jogamp.gluegen.cgram.types.Type;
 import com.jogamp.gluegen.procaddress.ProcAddressJavaMethodBindingEmitter;
+
 import java.io.PrintWriter;
 
 /** A specialization of the proc address emitter which knows how to
diff --git a/src/jogl/classes/com/jogamp/gluegen/opengl/nativesig/NativeSignatureEmitter.java b/src/jogl/classes/com/jogamp/gluegen/opengl/nativesig/NativeSignatureEmitter.java
index e8cdcc4..bfaf7ac 100755
--- a/src/jogl/classes/com/jogamp/gluegen/opengl/nativesig/NativeSignatureEmitter.java
+++ b/src/jogl/classes/com/jogamp/gluegen/opengl/nativesig/NativeSignatureEmitter.java
@@ -46,6 +46,7 @@ import com.jogamp.gluegen.MethodBinding;
 import com.jogamp.gluegen.cgram.types.FunctionSymbol;
 import com.jogamp.gluegen.opengl.GLEmitter;
 import com.jogamp.gluegen.opengl.GLJavaMethodBindingEmitter;
+
 import java.io.PrintWriter;
 import java.util.ArrayList;
 import java.util.Iterator;
diff --git a/src/jogl/classes/com/jogamp/gluegen/opengl/nativesig/NativeSignatureJavaMethodBindingEmitter.java b/src/jogl/classes/com/jogamp/gluegen/opengl/nativesig/NativeSignatureJavaMethodBindingEmitter.java
index c0c66a4..b4cab28 100755
--- a/src/jogl/classes/com/jogamp/gluegen/opengl/nativesig/NativeSignatureJavaMethodBindingEmitter.java
+++ b/src/jogl/classes/com/jogamp/gluegen/opengl/nativesig/NativeSignatureJavaMethodBindingEmitter.java
@@ -47,6 +47,7 @@ import com.jogamp.gluegen.cgram.types.Type;
 import com.jogamp.gluegen.opengl.GLEmitter;
 import com.jogamp.gluegen.opengl.GLJavaMethodBindingEmitter;
 import com.jogamp.gluegen.procaddress.ProcAddressJavaMethodBindingEmitter;
+
 import java.io.PrintWriter;
 
 public class NativeSignatureJavaMethodBindingEmitter extends GLJavaMethodBindingEmitter {
diff --git a/src/jogl/classes/com/jogamp/graph/curve/OutlineShape.java b/src/jogl/classes/com/jogamp/graph/curve/OutlineShape.java
new file mode 100755
index 0000000..025a998
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/graph/curve/OutlineShape.java
@@ -0,0 +1,629 @@
+/**
+ * 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.graph.curve;
+
+import java.util.ArrayList;
+import java.util.Collections;
+
+import com.jogamp.graph.curve.tess.Triangulation;
+import com.jogamp.graph.curve.tess.Triangulator;
+import com.jogamp.graph.geom.AABBox;
+import com.jogamp.graph.geom.Outline;
+import com.jogamp.graph.geom.Triangle;
+import com.jogamp.graph.geom.Vertex;
+import com.jogamp.graph.math.VectorUtil;
+
+
+/** A Generic shape objects which is defined by a list of Outlines.
+ * This Shape can be transformed to Triangulations.
+ * The list of triangles generated are render-able by a Region object.
+ * The triangulation produced by this Shape will define the 
+ * closed region defined by the outlines.
+ * 
+ * One or more OutlineShape Object can be associated to a region
+ * this is left as a high-level representation of the Objects. For
+ * optimizations, flexibility requirements for future features.
+ * 
+ * <br><br>
+ * Example to creating an Outline Shape:
+ * <pre>
+      addVertex(...)
+      addVertex(...)
+      addVertex(...)
+      addEmptyOutline()
+      addVertex(...)
+      addVertex(...)
+      addVertex(...)
+ * </pre>
+ * 
+ * The above will create two outlines each with three vertices. By adding these two outlines to 
+ * the OutlineShape, we are stating that the combination of the two outlines represent the shape.
+ * <br>
+ * 
+ * To specify that the shape is curved at a region, the on-curve flag should be set to false 
+ * for the vertex that is in the middle of the curved region (if the curved region is defined by 3
+ * vertices (quadratic curve).
+ * <br>
+ * In case the curved region is defined by 4 or more vertices the middle vertices should both have 
+ * the on-curve flag set to false.
+ * 
+ * <br>Example: <br>
+ * <pre>
+      addVertex(0,0, true);
+      addVertex(0,1, false);
+      addVertex(1,1, false);
+      addVertex(1,0, true);
+ * </pre>
+ * 
+ * The above snippet defines a cubic nurbs curve where (0,1 and 1,1) 
+ * do not belong to the final rendered shape.
+ *  
+ * <i>Implementation Notes:</i><br>
+ * <ul>
+ *    <li> The first vertex of any outline belonging to the shape should be on-curve</li>
+ *    <li> Intersections between off-curved parts of the outline is not handled</li>
+ * </ul>
+ * 
+ * @see Outline
+ * @see Region
+ */
+public class OutlineShape implements Comparable<OutlineShape> {
+    /**
+     * Outline's vertices have undefined state until transformed.
+     */
+    public enum VerticesState {
+        UNDEFINED(0), QUADRATIC_NURBS(1);
+
+        public final int state;
+
+        VerticesState(int state){
+            this.state = state;
+        }
+    } 
+
+    public static final int DIRTY_BOUNDS = 1 << 0;
+
+    private final Vertex.Factory<? extends Vertex> vertexFactory;
+    private VerticesState outlineState;
+
+    /** The list of {@link Outline}s that are part of this 
+     *  outline shape.
+     */
+    private ArrayList<Outline> outlines;
+    private AABBox bbox;
+
+    /** dirty bits DIRTY_BOUNDS */
+    private int dirtyBits;  
+
+    /** Create a new Outline based Shape
+     */
+    public OutlineShape(Vertex.Factory<? extends Vertex> factory) {
+        this.vertexFactory = factory;
+        this.outlines = new ArrayList<Outline>(3);
+        this.outlines.add(new Outline());
+        this.outlineState = VerticesState.UNDEFINED;
+        this.bbox = new AABBox();
+        this.dirtyBits = 0;    
+    }
+
+    /** Clears all data and reset all states as if this instance was newly created */
+    public void clear() {
+        outlines.clear();
+        outlines.add(new Outline());
+        outlineState = VerticesState.UNDEFINED;
+        bbox.reset();
+        dirtyBits = 0;    
+    }
+
+    /** Returns the associated vertex factory of this outline shape
+     * @return Vertex.Factory object
+     */
+    public final Vertex.Factory<? extends Vertex> vertexFactory() { return vertexFactory; }
+
+    public int getOutlineNumber() {
+        return outlines.size();
+    }
+
+    /** Add a new empty {@link Outline} 
+     * to the end of this shape's outline list.
+     * <p>If the {@link #getLastOutline()} is empty already, no new one will be added.</p>
+     * 
+     * After a call to this function all new vertices added
+     * will belong to the new outline
+     */
+    public void addEmptyOutline() {
+        if( !getLastOutline().isEmpty() ) {
+            outlines.add(new Outline());
+        }
+    }
+
+    /** Appends the {@link Outline} element to the end,
+     * ensuring a clean tail.
+     * 
+     * <p>A clean tail is ensured, no double empty Outlines are produced
+     * and a pre-existing empty outline will be replaced with the given one. </p>
+     * 
+     * @param outline Outline object to be added
+     * @throws NullPointerException if the  {@link Outline} element is null 
+     */
+    public void addOutline(Outline outline) throws NullPointerException {
+        addOutline(outlines.size(), outline);
+    }
+
+    /** Insert the {@link Outline} element at the given {@code position}.
+     * 
+     * <p>If the {@code position} indicates the end of this list,
+     * a clean tail is ensured, no double empty Outlines are produced
+     * and a pre-existing empty outline will be replaced with the given one. </p>
+     * 
+     * @param position of the added Outline
+     * @param outline Outline object to be added
+     * @throws NullPointerException if the  {@link Outline} element is null 
+     * @throws IndexOutOfBoundsException if position is out of range (position < 0 || position > getOutlineNumber())
+     */
+    public void addOutline(int position, Outline outline) throws NullPointerException, IndexOutOfBoundsException {
+        if (null == outline) {
+            throw new NullPointerException("outline is null");
+        }
+        if( outlines.size() == position ) {
+            final Outline lastOutline = getLastOutline();
+            if( outline.isEmpty() && lastOutline.isEmpty() ) {
+                return;
+            }
+            if( lastOutline.isEmpty() ) {
+                outlines.set(position-1, outline);
+                if( 0 == ( dirtyBits & DIRTY_BOUNDS ) ) {
+                    bbox.resize(outline.getBounds());
+                }
+                return;
+            }
+        }
+        outlines.add(position, outline);
+        if( 0 == ( dirtyBits & DIRTY_BOUNDS ) ) {
+            bbox.resize(outline.getBounds());
+        }
+    }
+
+    /** Insert the {@link OutlineShape} elements of type {@link Outline}, .. at the end of this shape,
+     * using {@link #addOutline(Outline)} for each element.
+     * <p>Closes the current last outline via {@link #closeLastOutline()} before adding the new ones.</p>
+     * @param outlineShape OutlineShape elements to be added.
+     * @throws NullPointerException if the  {@link OutlineShape} is null 
+     * @throws IndexOutOfBoundsException if position is out of range (position < 0 || position > getOutlineNumber())
+     */
+    public void addOutlineShape(OutlineShape outlineShape) throws NullPointerException {
+        if (null == outlineShape) {
+            throw new NullPointerException("OutlineShape is null");
+        }
+        closeLastOutline();
+        for(int i=0; i<outlineShape.getOutlineNumber(); i++) {
+            addOutline(outlineShape.getOutline(i));
+        }
+    }
+
+    /** Replaces the {@link Outline} element at the given {@code position}.
+     * <p>Sets the bounding box dirty, hence a next call to {@link #getBounds()} will validate it.</p>
+     * 
+     * @param position of the replaced Outline
+     * @param outline replacement Outline object 
+     * @throws NullPointerException if the  {@link Outline} element is null 
+     * @throws IndexOutOfBoundsException if position is out of range (position < 0 || position >= getOutlineNumber())
+     */
+    public void setOutline(int position, Outline outline) throws NullPointerException, IndexOutOfBoundsException {
+        if (null == outline) {
+            throw new NullPointerException("outline is null");
+        }
+        outlines.set(position, outline);
+        dirtyBits |= DIRTY_BOUNDS;
+    }
+
+    /** Removes the {@link Outline} element at the given {@code position}.
+     * <p>Sets the bounding box dirty, hence a next call to {@link #getBounds()} will validate it.</p>
+     * 
+     * @param position of the to be removed Outline
+     * @throws IndexOutOfBoundsException if position is out of range (position < 0 || position >= getOutlineNumber())
+     */
+    public final Outline removeOutline(int position) throws IndexOutOfBoundsException {
+        dirtyBits |= DIRTY_BOUNDS;
+        return outlines.remove(position);
+    }
+
+    /** Get the last added outline to the list
+     * of outlines that define the shape
+     * @return the last outline
+     */
+    public final Outline getLastOutline() {
+        return outlines.get(outlines.size()-1);
+    }
+
+    /** @return the {@code Outline} at {@code position} 
+     * @throws IndexOutOfBoundsException if position is out of range (position < 0 || position >= getOutlineNumber())
+     */
+    public Outline getOutline(int position) throws IndexOutOfBoundsException {
+        return outlines.get(position);
+    }    
+
+    /** Adds a vertex to the last open outline in the
+     *  shape. 
+     * @param v the vertex to be added to the OutlineShape
+     */
+    public final void addVertex(Vertex v) {
+        final Outline lo = getLastOutline();
+        lo.addVertex(v);
+        if( 0 == ( dirtyBits & DIRTY_BOUNDS ) ) {
+            bbox.resize(lo.getBounds());
+        }
+    }
+
+    /** Adds a vertex to the last open outline in the shape. 
+     * at {@code position} 
+     * @param position indx at which the vertex will be added 
+     * @param v the vertex to be added to the OutlineShape
+     */
+    public final void addVertex(int position, Vertex v) {
+        final Outline lo = getLastOutline();
+        lo.addVertex(position, v);
+        if( 0 == ( dirtyBits & DIRTY_BOUNDS ) ) {
+            bbox.resize(lo.getBounds());
+        }
+    }
+
+    /** Add a 2D {@link Vertex} to the last outline by defining the coordniate attribute
+     * of the vertex. The 2D vertex will be represented as Z=0.
+     * 
+     * @param x the x coordinate
+     * @param y the y coordniate
+     * @param onCurve flag if this vertex is on the final curve or defines a curved region
+     * of the shape around this vertex.
+     */
+    public final void addVertex(float x, float y, boolean onCurve) {
+        addVertex(vertexFactory.create(x, y, 0f, onCurve));
+    }
+
+    /** Add a 3D {@link Vertex} to the last outline by defining the coordniate attribute
+     * of the vertex.
+     * @param x the x coordinate
+     * @param y the y coordinate
+     * @param z the z coordinate
+     * @param onCurve flag if this vertex is on the final curve or defines a curved region
+     * of the shape around this vertex.
+     */
+    public final void addVertex(float x, float y, float z, boolean onCurve) {
+        addVertex(vertexFactory.create(x, y, z, onCurve));
+    }
+
+    /** Add a vertex to the last outline by passing a float array and specifying the 
+     * offset and length in which. The attributes of the vertex are located. 
+     * The attributes should be continuous (stride = 0).
+     * Attributes which value are not set (when length less than 3) 
+     * are set implicitly to zero.
+     * @param coordsBuffer the coordinate array where the vertex attributes are to be picked from
+     * @param offset the offset in the buffer to the x coordinate
+     * @param length the number of attributes to pick from the buffer (maximum 3)
+     * @param onCurve flag if this vertex is on the final curve or defines a curved region
+     * of the shape around this vertex.
+     */
+    public final void addVertex(float[] coordsBuffer, int offset, int length, boolean onCurve) {
+        addVertex(vertexFactory.create(coordsBuffer, offset, length, onCurve));
+    }    
+
+    /** Closes the last outline in the shape.
+     * <p>If last vertex is not equal to first vertex.
+     * A new temp vertex is added at the end which 
+     * is equal to the first.</p>
+     */
+    public void closeLastOutline() {
+        getLastOutline().setClosed(true);
+    }
+
+    /**
+     * @return the outline's vertices state, {@link OutlineShape.VerticesState}
+     */
+    public final VerticesState getOutlineState() {
+        return outlineState;
+    }
+
+    /** Ensure the outlines represent
+     * the specified destinationType.
+     * and removes all overlaps in boundary triangles
+     * @param destinationType the target outline's vertices state. Currently only 
+     * {@link OutlineShape.VerticesState#QUADRATIC_NURBS} are supported.
+     */
+    public void transformOutlines(VerticesState destinationType) {
+        if(outlineState != destinationType){
+            if(destinationType == VerticesState.QUADRATIC_NURBS){
+                transformOutlines2Quadratic();
+                checkOverlaps();
+            } else {
+                throw new IllegalStateException("destinationType "+destinationType.name()+" not supported (currently "+outlineState.name()+")");
+            }
+        }
+    }
+
+    private void subdivideTriangle(final Outline outline, Vertex a, Vertex b, Vertex c, int index){
+        float[] v1 = VectorUtil.mid(a.getCoord(), b.getCoord());
+        float[] v3 = VectorUtil.mid(b.getCoord(), c.getCoord());
+        float[] v2 = VectorUtil.mid(v1, v3);
+
+        //drop off-curve vertex to image on the curve
+        b.setCoord(v2, 0, 3); 
+        b.setOnCurve(true);
+
+        outline.addVertex(index, vertexFactory.create(v1, 0, 3, false));
+        outline.addVertex(index+2, vertexFactory.create(v3, 0, 3, false));
+    }
+
+    /** Check overlaps between curved triangles
+     *  first check if any vertex in triangle a is in triangle b 
+     *  second check if edges of triangle a intersect segments of triangle b
+     *  if any of the two tests is true we divide current triangle
+     *  and add the other to the list of overlaps
+     *  
+     *  Loop until overlap array is empty. (check only in first pass)
+     */
+    private void checkOverlaps() { 
+        ArrayList<Vertex> overlaps = new ArrayList<Vertex>(3);
+        int count = getOutlineNumber();
+        boolean firstpass = true;
+        do {
+            for (int cc = 0; cc < count; cc++) { 
+                final Outline outline = getOutline(cc);
+                int vertexCount = outline.getVertexCount();
+                for(int i=0; i < outline.getVertexCount(); i++) {
+                    final Vertex currentVertex = outline.getVertex(i);
+                    if ( !currentVertex.isOnCurve()) {
+                        final Vertex nextV = outline.getVertex((i+1)%vertexCount);
+                        final Vertex prevV = outline.getVertex((i+vertexCount-1)%vertexCount);
+                        Vertex overlap =null;
+
+                        //check for overlap even if already set for subdivision
+                        //ensuring both trianglur overlaps get divided
+                        //for pref. only check in first pass
+                        //second pass to clear the overlaps arrray(reduces precision errors)
+                        if(firstpass) {
+                            overlap = checkTriOverlaps(prevV, currentVertex, nextV);
+                        }
+                        if(overlaps.contains(currentVertex) || overlap != null) {
+                            overlaps.remove(currentVertex);
+
+                            subdivideTriangle(outline, prevV, currentVertex, nextV, i);
+                            i+=3;
+                            vertexCount+=2;
+
+                            if(overlap != null && !overlap.isOnCurve()) {
+                                if(!overlaps.contains(overlap))
+                                    overlaps.add(overlap);
+                            }
+                        }
+                    }
+                }
+            }
+            firstpass = false;
+        }while(!overlaps.isEmpty());
+    }
+
+    private Vertex checkTriOverlaps(Vertex a, Vertex b, Vertex c) {
+        int count = getOutlineNumber();
+        for (int cc = 0; cc < count; cc++) { 
+            final Outline outline = getOutline(cc);
+            int vertexCount = outline.getVertexCount();
+            for(int i=0; i < vertexCount; i++) {
+                final Vertex current = outline.getVertex(i);
+                if(current.isOnCurve() || current == a || current == b || current == c) {
+                    continue;
+                }
+                final Vertex nextV = outline.getVertex((i+1)%vertexCount);
+                final Vertex prevV = outline.getVertex((i+vertexCount-1)%vertexCount);
+
+                //skip neighboring triangles
+                if(prevV == c || nextV == a) {
+                    continue;
+                }
+
+                if(VectorUtil.vertexInTriangle(a.getCoord(), b.getCoord(), c.getCoord(), current.getCoord())
+                        || VectorUtil.vertexInTriangle(a.getCoord(), b.getCoord(), c.getCoord(), nextV.getCoord())
+                        || VectorUtil.vertexInTriangle(a.getCoord(), b.getCoord(), c.getCoord(), prevV.getCoord())) {
+
+                    return current;
+                }
+                if(VectorUtil.tri2SegIntersection(a, b, c, prevV, current) 
+                        || VectorUtil.tri2SegIntersection(a, b, c, current, nextV)
+                        || VectorUtil.tri2SegIntersection(a, b, c, prevV, nextV)) {
+                    return current;
+                }
+            }
+        }
+        return null;
+    }
+
+    private void transformOutlines2Quadratic() {
+        int count = getOutlineNumber();
+        for (int cc = 0; cc < count; cc++) {            
+            final Outline outline = getOutline(cc);
+            int vertexCount = outline.getVertexCount();
+
+            for(int i=0; i < vertexCount; i++) {
+                final Vertex currentVertex = outline.getVertex(i);
+                final Vertex nextVertex = outline.getVertex((i+1)%vertexCount);
+                if ( !currentVertex.isOnCurve() && !nextVertex.isOnCurve() ) {
+                    final float[] newCoords = VectorUtil.mid(currentVertex.getCoord(), 
+                            nextVertex.getCoord());
+                    final Vertex v = vertexFactory.create(newCoords, 0, 3, true);
+                    i++;
+                    vertexCount++;
+                    outline.addVertex(i, v);
+                }                
+            }
+            if(vertexCount <= 0) {
+                outlines.remove(outline);
+                cc--;
+                count--;
+                continue;
+            }
+
+            if( vertexCount > 0 ) {
+                if(VectorUtil.checkEquality(outline.getVertex(0).getCoord(), 
+                        outline.getLastVertex().getCoord())) {
+                    outline.removeVertex(vertexCount-1);
+                }
+            }
+        }
+        outlineState = VerticesState.QUADRATIC_NURBS;
+    }
+
+    private void generateVertexIds() {
+        int maxVertexId = 0;
+        for(int i=0; i<outlines.size(); i++) {
+            final ArrayList<Vertex> vertices = outlines.get(i).getVertices();
+            for(int pos=0; pos<vertices.size(); pos++) {
+                Vertex vert = vertices.get(pos);
+                vert.setId(maxVertexId);
+                maxVertexId++;
+            }
+        }
+    }
+
+    /** @return the list of concatenated vertices associated with all 
+     * {@code Outline}s of this object
+     */
+    public ArrayList<Vertex> getVertices() {
+        ArrayList<Vertex> vertices = new ArrayList<Vertex>();
+        for(int i=0; i<outlines.size(); i++) {
+            vertices.addAll(outlines.get(i).getVertices());
+        }
+        return vertices;
+    }
+
+    /**
+     * Triangulate the {@link OutlineShape} generating a list of triangles
+     * @return an arraylist of triangles representing the filled region
+     * which is produced by the combination of the outlines
+     */
+    public ArrayList<Triangle> triangulate() {
+        if(outlines.size() == 0){
+            return null;
+        }
+        sortOutlines();
+        generateVertexIds();
+
+        Triangulator triangulator2d = Triangulation.create();
+        for(int index = 0; index<outlines.size(); index++) {
+            triangulator2d.addCurve(outlines.get(index));
+        }
+
+        ArrayList<Triangle> triangles = triangulator2d.generate();
+        triangulator2d.reset();
+
+        return triangles;
+    }
+
+    /** Sort the outlines from large
+     *  to small depending on the AABox
+     */
+    private void sortOutlines() {
+        Collections.sort(outlines);
+        Collections.reverse(outlines);
+    }
+
+    /** Compare two outline shapes with Bounding Box area
+     * as criteria. 
+     * @see java.lang.Comparable#compareTo(java.lang.Object)
+     */
+    public final int compareTo(OutlineShape outline) {
+        float size = getBounds().getSize();
+        float newSize = outline.getBounds().getSize();
+        if(size < newSize){
+            return -1;
+        }
+        else if(size > newSize){
+            return 1;
+        }
+        return 0;
+    }
+
+    private final void validateBoundingBox() {
+        dirtyBits &= ~DIRTY_BOUNDS;
+        bbox.reset();
+        for (int i=0; i<outlines.size(); i++) {
+            bbox.resize(outlines.get(i).getBounds());
+        }
+    }
+
+    public final AABBox getBounds() {
+        if( 0 == ( dirtyBits & DIRTY_BOUNDS ) ) {
+            validateBoundingBox();
+        }
+        return bbox;
+    }    
+
+    /**
+     * @param obj the Object to compare this OutlineShape with
+     * @return true if {@code obj} is an OutlineShape, not null, 
+     *                 same outlineState, equal bounds and equal outlines in the same order 
+     */
+    public boolean equals(Object obj) {
+        if( obj == this) {
+            return true;
+        }
+        if( null == obj || !(obj instanceof OutlineShape) ) {
+            return false;
+        }        
+        final OutlineShape o = (OutlineShape) obj;
+        if(getOutlineState() != o.getOutlineState()) {
+            return false;
+        }
+        if(getOutlineNumber() != o.getOutlineNumber()) {
+            return false;
+        }
+        if( !getBounds().equals( o.getBounds() ) ) {
+            return false;
+        }
+        for (int i=getOutlineNumber()-1; i>=0; i--) {
+            if( ! getOutline(i).equals( o.getOutline(i) ) ) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    /**
+     * @return deep clone of this OutlineShape w/o Region
+     */
+    public OutlineShape clone() {
+        OutlineShape o;
+        try {
+            o = (OutlineShape) super.clone();
+        } catch (CloneNotSupportedException e) { throw new InternalError(); }
+        o.bbox = bbox.clone();
+        o.outlines = new ArrayList<Outline>(outlines.size());
+        for(int i=0; i<outlines.size(); i++) {
+            o.outlines.add(outlines.get(i).clone());
+        }
+        return o;
+    }                
+}
diff --git a/src/jogl/classes/com/jogamp/graph/curve/Region.java b/src/jogl/classes/com/jogamp/graph/curve/Region.java
new file mode 100644
index 0000000..af15f9d
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/graph/curve/Region.java
@@ -0,0 +1,191 @@
+/**
+ * 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.graph.curve;
+
+import java.util.ArrayList;
+
+import jogamp.opengl.Debug;
+
+import com.jogamp.graph.geom.AABBox;
+import com.jogamp.graph.geom.Triangle;
+import com.jogamp.graph.geom.Vertex;
+
+/** Abstract Outline shape GL representation
+ *  define the method an OutlineShape(s) is
+ *  binded rendered.
+ *  
+ *  @see GLRegion
+ */
+public abstract class Region {
+    
+    /** Debug flag for region impl (graph.curve)
+     */
+    public static final boolean DEBUG = Debug.debug("graph.curve");
+    
+    public static final boolean DEBUG_INSTANCE = false;
+
+    /** View based Anti-Aliasing, A Two pass region rendering, slower 
+     *  and more resource hungry (FBO), but AA is perfect. 
+     *  Otherwise the default fast one pass MSAA region rendering is being used. 
+     */
+    public static final int VBAA_RENDERING_BIT = 1 << 0;
+
+    /** Use non uniform weights [0.0 .. 1.9] for curve region rendering.
+     *  Otherwise the default weight 1.0 for uniform curve region rendering is being applied.  
+     */
+    public static final int VARIABLE_CURVE_WEIGHT_BIT = 1 << 1;
+
+    public static final int TWO_PASS_DEFAULT_TEXTURE_UNIT = 0;
+
+    private final int renderModes;
+    private boolean dirty = true;    
+    protected int numVertices = 0;    
+    protected final AABBox box = new AABBox();
+    protected ArrayList<Triangle> triangles = new ArrayList<Triangle>();
+    protected ArrayList<Vertex> vertices = new ArrayList<Vertex>();
+
+    public static boolean isVBAA(int renderModes) { 
+        return 0 != ( renderModes & Region.VBAA_RENDERING_BIT ); 
+    }
+
+    /** Check if render mode capable of non uniform weights
+     * @param renderModes bit-field of modes, e.g. {@link Region#VARIABLE_CURVE_WEIGHT_BIT}, 
+     * {@link Region#VBAA_RENDERING_BIT} 
+     * @return true of capable of non uniform weights
+     */
+    public static boolean isNonUniformWeight(int renderModes) { 
+        return 0 != ( renderModes & Region.VARIABLE_CURVE_WEIGHT_BIT ); 
+    }
+
+    protected Region(int regionRenderModes) {
+        this.renderModes = regionRenderModes;
+    }
+
+    /** Get current Models
+     * @return bit-field of render modes 
+     */
+    public final int getRenderModes() { 
+        return renderModes; 
+    }
+
+    /** Check if current Region is using VBAA
+     * @return true if capable of two pass rendering - VBAA
+     */
+    public boolean isVBAA() { 
+        return Region.isVBAA(renderModes);  
+    }
+
+    /** Check if current instance uses non uniform weights 
+     * @return true if capable of nonuniform weights
+     */
+    public boolean isNonUniformWeight() { 
+        return Region.isNonUniformWeight(renderModes); 
+    }
+
+    /** Get the current number of vertices associated
+     * with this region. This number is not necessary equal to 
+     * the OGL bound number of vertices.
+     * @return vertices count
+     */
+    public final int getNumVertices(){
+        return numVertices;
+    }
+
+    /** Adds a {@link Triangle} object to the Region
+     * This triangle will be bound to OGL objects 
+     * on the next call to {@code update}
+     * @param tri a triangle object
+     * 
+     * @see update(GL2ES2)
+     */
+    public void addTriangle(Triangle tri) {
+        triangles.add(tri);
+        setDirty(true);
+    }
+
+    /** Adds a list of {@link Triangle} objects to the Region
+     * These triangles are to be binded to OGL objects 
+     * on the next call to {@code update}
+     * @param tris an arraylist of triangle objects
+     * 
+     * @see update(GL2ES2)
+     */
+    public void addTriangles(ArrayList<Triangle> tris) {
+        triangles.addAll(tris);
+        setDirty(true);
+    }
+
+    /** Adds a {@link Vertex} object to the Region
+     * This vertex will be bound to OGL objects 
+     * on the next call to {@code update}
+     * @param vert a vertex objects
+     * 
+     * @see update(GL2ES2)
+     */
+    public void addVertex(Vertex vert) {
+        vertices.add(vert);
+        numVertices++;
+        setDirty(true);
+    }
+
+    /** Adds a list of {@link Vertex} objects to the Region
+     * These vertices are to be binded to OGL objects 
+     * on the next call to {@code update}
+     * @param verts an arraylist of vertex objects
+     * 
+     * @see update(GL2ES2)
+     */
+    public void addVertices(ArrayList<Vertex> verts) {
+        vertices.addAll(verts);
+        numVertices = vertices.size();
+        setDirty(true);
+    }
+
+    /**
+     * @return the AxisAligned bounding box of
+     * current region
+     */
+    public final AABBox getBounds(){
+        return box;
+    }
+
+    /** Check if this region is dirty. A region is marked dirty
+     * when new Vertices, Triangles, and or Lines are added after a 
+     * call to update()
+     * @return true if region is Dirty, false otherwise
+     * 
+     * @see update(GL2ES2)
+     */
+    public final boolean isDirty() {
+        return dirty;
+    }
+
+    protected final void setDirty(boolean v) {
+        dirty = v;
+    }
+}
\ No newline at end of file
diff --git a/src/jogl/classes/com/jogamp/graph/curve/opengl/GLRegion.java b/src/jogl/classes/com/jogamp/graph/curve/opengl/GLRegion.java
new file mode 100755
index 0000000..749c7ef
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/graph/curve/opengl/GLRegion.java
@@ -0,0 +1,127 @@
+/**
+ * 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.graph.curve.opengl;
+
+
+import java.util.ArrayList;
+
+import javax.media.opengl.GL2ES2;
+import com.jogamp.opengl.util.PMVMatrix;
+
+import com.jogamp.graph.curve.OutlineShape;
+import com.jogamp.graph.curve.Region;
+import com.jogamp.graph.geom.Triangle;
+import com.jogamp.graph.geom.Vertex;
+import jogamp.graph.curve.opengl.RegionFactory;
+
+/** A GLRegion is the OGL binding of one or more OutlineShapes
+ *  Defined by its vertices and generated triangles. The Region
+ *  defines the final shape of the OutlineShape(s), which shall produced a shaded 
+ *  region on the screen.
+ *  
+ *  Implementations of the GLRegion shall take care of the OGL 
+ *  binding of the depending on its context, profile.
+ * 
+ * @see Region, RegionFactory, OutlineShape
+ */
+public abstract class GLRegion extends Region {    
+    
+    /** Create an ogl {@link GLRegion} defining the list of {@link OutlineShape}.
+     * Combining the Shapes into single buffers.
+     * @return the resulting Region inclusive the generated region
+     */
+    public static GLRegion create(OutlineShape[] outlineShapes, int renderModes) {
+        final GLRegion region = RegionFactory.create(renderModes);
+        
+        int numVertices = region.getNumVertices();
+        
+        for(int index=0; index<outlineShapes.length; index++) {
+            OutlineShape outlineShape = outlineShapes[index];
+            outlineShape.transformOutlines(OutlineShape.VerticesState.QUADRATIC_NURBS);
+    
+            ArrayList<Triangle> triangles = outlineShape.triangulate();
+            region.addTriangles(triangles);
+            
+            ArrayList<Vertex> vertices = outlineShape.getVertices();
+            for(int pos=0; pos < vertices.size(); pos++){
+                Vertex vert = vertices.get(pos);
+                vert.setId(numVertices++);
+            }
+            region.addVertices(vertices);
+        }
+        
+        return region;
+    }
+
+    /** 
+     * Create an ogl {@link GLRegion} defining this {@link OutlineShape}
+     * @return the resulting Region.
+     */
+    public static GLRegion create(OutlineShape outlineShape, int renderModes) {
+        final GLRegion region = RegionFactory.create(renderModes);
+        
+        outlineShape.transformOutlines(OutlineShape.VerticesState.QUADRATIC_NURBS);
+        ArrayList<Triangle> triangles = (ArrayList<Triangle>) outlineShape.triangulate();
+        ArrayList<Vertex> vertices = (ArrayList<Vertex>) outlineShape.getVertices();
+        region.addVertices(vertices);
+        region.addTriangles(triangles);
+        return region;
+    }        
+    
+    protected GLRegion(int renderModes) {
+        super(renderModes);
+    }
+    
+    /** Updates a graph region by updating the ogl related
+     *  objects for use in rendering if {@link #isDirty()}.
+     *  <p>Allocates the ogl related data and initializes it the 1st time.<p>  
+     *  <p>Called by {@link #draw(GL2ES2, RenderState, int, int, int)}.</p>
+     * @param rs TODO
+     */
+    protected abstract void update(GL2ES2 gl, RenderState rs);
+    
+    /** Delete and clean the associated OGL
+     *  objects
+     */
+    public abstract void destroy(GL2ES2 gl, RenderState rs);
+    
+    /** Renders the associated OGL objects specifying
+     * current width/hight of window for multi pass rendering
+     * of the region.
+     * @param matrix current {@link PMVMatrix}.
+     * @param vp_width current screen width
+     * @param vp_height current screen height
+     * @param width texture width for mp rendering
+     */
+    public final void draw(GL2ES2 gl, RenderState rs, int vp_width, int vp_height, int width) {
+        update(gl, rs);
+        drawImpl(gl, rs, vp_width, vp_height, width);
+    }
+    
+    protected abstract void drawImpl(GL2ES2 gl, RenderState rs, int vp_width, int vp_height, int width);
+}
diff --git a/src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java b/src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java
new file mode 100644
index 0000000..86d962f
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java
@@ -0,0 +1,83 @@
+/**
+ * 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.graph.curve.opengl;
+
+import javax.media.opengl.GL2ES2;
+import javax.media.opengl.GLException;
+
+import com.jogamp.graph.curve.OutlineShape;
+import com.jogamp.graph.curve.Region;
+
+public abstract class RegionRenderer extends Renderer {
+
+    /** 
+     * Create a Hardware accelerated Region Renderer.
+     * @param rs the used {@link RenderState} 
+     * @param renderModes bit-field of modes, e.g. {@link Region#VARIABLE_CURVE_WEIGHT_BIT}, {@link Region#VBAA_RENDERING_BIT} 
+     * @return an instance of Region Renderer
+     */
+    public static RegionRenderer create(RenderState rs, int renderModes) {
+        return new jogamp.graph.curve.opengl.RegionRendererImpl01(rs, renderModes);
+    }
+    
+    protected RegionRenderer(RenderState rs, int renderModes) {
+        super(rs, renderModes);
+    }
+    
+    
+    /** Render an {@link OutlineShape} in 3D space at the position provided
+     *  the triangles of the shapes will be generated, if not yet generated
+     * @param region the OutlineShape to Render.
+     * @param position the initial translation of the outlineShape. 
+     * @param texSize texture size for multipass render
+     * @throws Exception if HwRegionRenderer not initialized
+     */
+    public final void draw(GL2ES2 gl, Region region, float[] position, int texSize) {
+        if(!isInitialized()) {
+            throw new GLException("RegionRenderer: not initialized!");
+        }
+        if( !areRenderModesCompatible(region) ) {
+            throw new GLException("Incompatible render modes, : region modes "+region.getRenderModes()+
+                                  " doesn't contain renderer modes "+this.getRenderModes());
+        }        
+        drawImpl(gl, region, position, texSize);
+    }
+    
+    /**
+     * Usually just dispatched the draw call to the Region's draw implementation,
+     * e.g. {@link com.jogamp.graph.curve.opengl.GLRegion#draw(GL2ES2, RenderState, int, int, int) GLRegion#draw(GL2ES2, RenderState, int, int, int)}.
+     */
+    protected abstract void drawImpl(GL2ES2 gl, Region region, float[] position, int texSize);
+
+    @Override
+    protected void destroyImpl(GL2ES2 gl) {
+        // nop
+    }
+    
+    
+}
diff --git a/src/jogl/classes/com/jogamp/graph/curve/opengl/RenderState.java b/src/jogl/classes/com/jogamp/graph/curve/opengl/RenderState.java
new file mode 100644
index 0000000..eb07142
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/graph/curve/opengl/RenderState.java
@@ -0,0 +1,111 @@
+/**
+ * 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.graph.curve.opengl;
+
+import javax.media.opengl.GL2ES2;
+import javax.media.opengl.GLUniformData;
+
+import jogamp.graph.curve.opengl.RenderStateImpl;
+import jogamp.graph.curve.opengl.shader.UniformNames;
+
+import com.jogamp.common.os.Platform;
+import com.jogamp.graph.geom.Vertex;
+import com.jogamp.opengl.util.PMVMatrix;
+import com.jogamp.opengl.util.glsl.ShaderState;
+
+public abstract class RenderState {
+    private static final String thisKey = "jogamp.graph.curve.RenderState" ;
+    
+    public static RenderState createRenderState(ShaderState st, Vertex.Factory<? extends Vertex> pointFactory) {
+        return new RenderStateImpl(st, pointFactory);
+    }
+
+    public static RenderState createRenderState(ShaderState st, Vertex.Factory<? extends Vertex> pointFactory, PMVMatrix pmvMatrix) {
+        return new RenderStateImpl(st, pointFactory, pmvMatrix);
+    }
+    
+    public static final RenderState getRenderState(GL2ES2 gl) {
+        return (RenderState) gl.getContext().getAttachedObject(thisKey);
+    }
+    
+    protected final ShaderState st;
+    protected final Vertex.Factory<? extends Vertex> vertexFactory;
+    protected final PMVMatrix pmvMatrix;
+    protected final GLUniformData gcu_PMVMatrix;                    
+        
+    protected RenderState(ShaderState st, Vertex.Factory<? extends Vertex> vertexFactory, PMVMatrix pmvMatrix) {
+        this.st = st;
+        this.vertexFactory = vertexFactory;
+        this.pmvMatrix = pmvMatrix;        
+        this.gcu_PMVMatrix = new GLUniformData(UniformNames.gcu_PMVMatrix, 4, 4, pmvMatrix.glGetPMvMatrixf());
+        st.ownUniform(gcu_PMVMatrix);        
+    }
+        
+    public final ShaderState getShaderState() { return st; }
+    public final Vertex.Factory<? extends Vertex> getVertexFactory() { return vertexFactory; }
+    public final PMVMatrix pmvMatrix() { return pmvMatrix; }
+    public final GLUniformData getPMVMatrix() { return gcu_PMVMatrix; }
+    
+    public void destroy(GL2ES2 gl) {
+        st.destroy(gl);
+    }
+    
+    public abstract GLUniformData getWeight();
+    public abstract GLUniformData getAlpha();
+    public abstract GLUniformData getColorStatic();
+    // public abstract GLUniformData getStrength();
+    
+    public final RenderState attachTo(GL2ES2 gl) {
+        return (RenderState) gl.getContext().attachObject(thisKey, this);
+    }
+    
+    public final boolean detachFrom(GL2ES2 gl) {
+        RenderState _rs = (RenderState) gl.getContext().getAttachedObject(thisKey);
+        if(_rs == this) {
+            gl.getContext().detachObject(thisKey);
+            return true;
+        }
+        return false;
+    }    
+    
+    public StringBuilder toString(StringBuilder sb) {
+        if(null==sb) {
+            sb = new StringBuilder();
+        }
+
+        sb.append("RenderState[");
+        st.toString(sb).append(Platform.getNewline());
+        sb.append("]");
+
+        return sb;
+    }
+    
+    public String toString() {
+        return toString(null).toString();
+    }    
+}
diff --git a/src/jogl/classes/com/jogamp/graph/curve/opengl/Renderer.java b/src/jogl/classes/com/jogamp/graph/curve/opengl/Renderer.java
new file mode 100644
index 0000000..3c23733
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/graph/curve/opengl/Renderer.java
@@ -0,0 +1,281 @@
+/**
+ * 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.graph.curve.opengl;
+
+import java.nio.FloatBuffer;
+
+import javax.media.opengl.GL2ES2;
+import javax.media.opengl.GLException;
+import javax.media.opengl.fixedfunc.GLMatrixFunc;
+
+import com.jogamp.opengl.util.glsl.ShaderState;
+import com.jogamp.opengl.util.PMVMatrix;
+
+import com.jogamp.graph.curve.Region;
+
+public abstract class Renderer {
+    protected static final boolean DEBUG = Region.DEBUG;
+    protected static final boolean DEBUG_INSTANCE = Region.DEBUG_INSTANCE;
+
+    public static boolean isWeightValid(float v) {
+        return 0.0f <= v && v <= 1.9f ;
+    }
+
+    protected final int renderModes;
+    protected int vp_width;
+    protected int vp_height;
+    protected boolean initialized;
+    protected final RenderState rs;
+    private boolean vboSupported = false; 
+    
+    public final boolean isInitialized() { return initialized; }
+
+    public final int getWidth() { return vp_width; }
+    public final int getHeight() { return vp_height; }
+
+    public float getWeight() { return rs.getWeight().floatValue(); }
+    public float getAlpha() { return rs.getAlpha().floatValue(); }
+    public final PMVMatrix getMatrix() { return rs.pmvMatrix(); }
+    
+    /**
+     * Implementation shall load, compile and link the shader program and leave it active.
+     * @param gl referencing the current GLContext to which the ShaderState is bound to
+     * @return
+     */
+    protected abstract boolean initShaderProgram(GL2ES2 gl);
+    
+    protected abstract void destroyImpl(GL2ES2 gl);
+   
+    /**
+     * @param rs the used {@link RenderState} 
+     * @param renderModes bit-field of modes
+     */
+    protected Renderer(RenderState rs, int renderModes) {
+        this.rs = rs;
+        this.renderModes = renderModes;
+    }
+    
+    public final int getRenderModes() {
+        return renderModes;
+    }
+    
+    public boolean usesVariableCurveWeight() { return Region.isNonUniformWeight(renderModes); }
+
+    /**
+     * @return true if Region's renderModes contains all bits as this Renderer's renderModes
+     *         except {@link Region#VARIABLE_CURVE_WEIGHT_BIT}, otherwise false.
+     */
+    public final boolean areRenderModesCompatible(Region region) {
+        final int cleanRenderModes = getRenderModes() & ( Region.VARIABLE_CURVE_WEIGHT_BIT );
+        return cleanRenderModes == ( region.getRenderModes() & cleanRenderModes ); 
+    }
+    
+    public final boolean isVBOSupported() { return vboSupported; }
+    
+    /** 
+     * Initialize shader and bindings for GPU based rendering bound to the given GL object's GLContext
+     * if not initialized yet.
+     * <p>Leaves the renderer enabled, ie ShaderState.</p>
+     * <p>Shall be called by a {@code draw()} method, e.g. {@link RegionRenderer#draw(GL2ES2, Region, float[], int)}</p>
+     *  
+     * @param gl referencing the current GLContext to which the ShaderState is bound to
+     * @throws GLException if initialization failed
+     */
+    public final void init(GL2ES2 gl) throws GLException {
+        if(initialized){
+            return;
+        }
+        vboSupported =  gl.isFunctionAvailable("glGenBuffers") &&
+                        gl.isFunctionAvailable("glBindBuffer") &&
+                        gl.isFunctionAvailable("glBufferData") &&
+                        gl.isFunctionAvailable("glDrawElements") &&
+                        gl.isFunctionAvailable("glVertexAttribPointer") &&
+                        gl.isFunctionAvailable("glDeleteBuffers");
+    
+        if(DEBUG) {
+            System.err.println("TextRendererImpl01: VBO Supported = " + isVBOSupported());
+        }
+        
+        if(!vboSupported){
+            throw new GLException("VBO not supported");
+        }
+        
+        rs.attachTo(gl);
+        
+        gl.glEnable(GL2ES2.GL_BLEND);
+        gl.glBlendFunc(GL2ES2.GL_SRC_ALPHA, GL2ES2.GL_ONE_MINUS_SRC_ALPHA); // FIXME: alpha blending stage ?
+        
+        initialized = initShaderProgram(gl);
+        if(!initialized) {
+            throw new GLException("Shader initialization failed");
+        }
+        
+        if(!rs.getShaderState().uniform(gl, rs.getPMVMatrix())) {
+            throw new GLException("Error setting PMVMatrix in shader: "+rs.getShaderState());
+        }
+        
+        if(!rs.getShaderState().uniform(gl, rs.getWeight())) {
+            throw new GLException("Error setting weight in shader: "+rs.getShaderState());
+        }
+                
+        if(!rs.getShaderState().uniform(gl, rs.getAlpha())) {
+            throw new GLException("Error setting global alpha in shader: "+rs.getShaderState());
+        }        
+        
+        if(!rs.getShaderState().uniform(gl, rs.getColorStatic())) {
+            throw new GLException("Error setting global color in shader: "+rs.getShaderState());
+        }        
+    }
+
+    public final void flushCache(GL2ES2 gl) {  
+        // FIXME: REMOVE !
+    }
+        
+    public void destroy(GL2ES2 gl) {
+        if(!initialized){
+            if(DEBUG_INSTANCE) {
+                System.err.println("TextRenderer: Not initialized!");
+            }
+            return;
+        }
+        rs.getShaderState().useProgram(gl, false);
+        destroyImpl(gl);
+        rs.destroy(gl);
+        initialized = false;        
+    }
+    
+    public final RenderState getRenderState() { return rs; }
+    public final ShaderState getShaderState() { return rs.getShaderState(); }
+    
+    public final void enable(GL2ES2 gl, boolean enable) { 
+        rs.getShaderState().useProgram(gl, enable);
+    }
+
+    public void setWeight(GL2ES2 gl, float v) {
+        if( !isWeightValid(v) ) {
+        	 throw new IllegalArgumentException("Weight out of range");
+        }
+        rs.getWeight().setData(v);
+        if(null != gl && rs.getShaderState().inUse()) {
+            rs.getShaderState().uniform(gl, rs.getWeight());
+        }
+    }
+    
+    public void setAlpha(GL2ES2 gl, float alpha_t) {
+        rs.getAlpha().setData(alpha_t);
+        if(null != gl && rs.getShaderState().inUse()) {
+            rs.getShaderState().uniform(gl, rs.getAlpha());
+        }
+
+    }
+
+    public void getColorStatic(GL2ES2 gl, float[] rgb) {
+        FloatBuffer fb = (FloatBuffer) rs.getColorStatic().getBuffer();
+        rgb[0] = fb.get(0); 
+        rgb[1] = fb.get(1); 
+        rgb[2] = fb.get(2); 
+    }
+    
+    public void setColorStatic(GL2ES2 gl, float r, float g, float b){
+        FloatBuffer fb = (FloatBuffer) rs.getColorStatic().getBuffer();
+        fb.put(0, r);
+        fb.put(1, g);
+        fb.put(2, b);
+        if(null != gl && rs.getShaderState().inUse()) {
+            rs.getShaderState().uniform(gl, rs.getColorStatic());
+        }
+    }
+    
+    public void rotate(GL2ES2 gl, float angle, float x, float y, float z) {
+        rs.pmvMatrix().glRotatef(angle, x, y, z);
+        updateMatrix(gl);
+    }
+
+    public void translate(GL2ES2 gl, float x, float y, float z) {
+        rs.pmvMatrix().glTranslatef(x, y, z);
+        updateMatrix(gl);
+    }
+    
+    public void scale(GL2ES2 gl, float x, float y, float z) {
+        rs.pmvMatrix().glScalef(x, y, z);
+        updateMatrix(gl);
+    }
+
+    public void resetModelview(GL2ES2 gl) {
+        rs.pmvMatrix().glMatrixMode(GLMatrixFunc.GL_MODELVIEW);
+        rs.pmvMatrix().glLoadIdentity();
+        updateMatrix(gl);
+    }
+
+    public void updateMatrix(GL2ES2 gl) {
+        if(initialized && null != gl && rs.getShaderState().inUse()) {
+            rs.getShaderState().uniform(gl, rs.getPMVMatrix());
+        }
+    }
+
+    public boolean reshapePerspective(GL2ES2 gl, float angle, int width, int height, float near, float far) {
+        this.vp_width = width;
+        this.vp_height = height;
+        final float ratio = (float)width/(float)height;
+        final PMVMatrix p = rs.pmvMatrix();
+        p.glMatrixMode(GLMatrixFunc.GL_PROJECTION);
+        p.glLoadIdentity();
+        p.gluPerspective(angle, ratio, near, far);
+        updateMatrix(gl);
+        return true;
+    }
+
+    public boolean reshapeOrtho(GL2ES2 gl, int width, int height, float near, float far) {
+        this.vp_width = width;
+        this.vp_height = height;
+        final PMVMatrix p = rs.pmvMatrix();
+        p.glMatrixMode(GLMatrixFunc.GL_PROJECTION);
+        p.glLoadIdentity();
+        p.glOrthof(0, width, 0, height, near, far);
+        updateMatrix(gl);
+        return true;        
+    }
+
+    protected String getVertexShaderName(GL2ES2 gl) {
+        return "curverenderer01" + getShaderGLVersionSuffix(gl);
+    }
+    
+    protected String getFragmentShaderName(GL2ES2 gl) {
+        final String type = "01" ; // Region.isNonUniformWeight(renderModes) ? "02" : "01" ;
+        final String pass = Region.isVBAA(renderModes) ? "b" : "a" ;
+        return "curverenderer" + type + pass + getShaderGLVersionSuffix(gl);
+    }
+        
+    protected String getShaderGLVersionSuffix(GL2ES2 gl) {
+        if(gl.isGLES2()) {
+            return "-es2";
+        }
+        return "-gl2";
+    }    
+    
+}
\ No newline at end of file
diff --git a/src/jogl/classes/com/jogamp/graph/curve/opengl/TextRenderer.java b/src/jogl/classes/com/jogamp/graph/curve/opengl/TextRenderer.java
new file mode 100644
index 0000000..b466670
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/graph/curve/opengl/TextRenderer.java
@@ -0,0 +1,192 @@
+/**
+ * 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.graph.curve.opengl;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+
+import javax.media.opengl.GL2ES2;
+
+import jogamp.graph.curve.text.GlyphString;
+
+import com.jogamp.graph.font.Font;
+
+public abstract class TextRenderer extends Renderer {
+    /** 
+     * Create a Hardware accelerated Text Renderer.
+     * @param rs the used {@link RenderState} 
+     * @param renderModes either {@link com.jogamp.graph.curve.opengl.GLRegion#SINGLE_PASS} or {@link com.jogamp.graph.curve.Region#VBAA_RENDERING_BIT}
+     */
+    public static TextRenderer create(RenderState rs, int renderModes) {
+        return new jogamp.graph.curve.opengl.TextRendererImpl01(rs, renderModes);
+    }
+    
+    protected TextRenderer(RenderState rs, int type) {
+        super(rs, type);
+    }
+    
+
+    /** Render the String in 3D space wrt to the font provided at the position provided
+     * the outlines will be generated, if not yet generated
+     * @param gl the current GL state
+     * @param font {@link Font} to be used
+     * @param str text to be rendered 
+     * @param position the lower left corner of the string 
+     * @param fontSize font size
+     * @param texSize texture size for multipass render
+     * @throws Exception if TextRenderer not initialized
+     */
+    public abstract void drawString3D(GL2ES2 gl, Font font,
+                                      String str, float[] position, int fontSize, int texSize);
+
+    /**Create the resulting {@link GlyphString} that represents
+     * the String wrt to the font.
+     * @param font {@link Font} to be used
+     * @param size font size
+     * @param str {@link String} to be created
+     * @return the resulting GlyphString inclusive the generated region
+     */
+    public GlyphString createString(GL2ES2 gl, Font font, int size, String str) {
+        if(DEBUG_INSTANCE) {
+            System.err.println("createString: "+getCacheSize()+"/"+getCacheLimit()+" - "+Font.NAME_UNIQUNAME + " - " + str + " - " + size);
+        }
+        final GlyphString glyphString = GlyphString.createString(null, rs.getVertexFactory(), font, size, str);        
+        glyphString.createRegion(gl, renderModes);        
+        return glyphString;
+    }
+    
+    /** FIXME
+   public void flushCache(GL2ES2 gl) {
+       Iterator<GlyphString> iterator = stringCacheMap.values().iterator();
+       while(iterator.hasNext()){
+           GlyphString glyphString = iterator.next();
+           glyphString.destroy(gl, rs);
+       }
+       stringCacheMap.clear();    
+       stringCacheArray.clear();
+   } */
+   
+   @Override
+   protected void destroyImpl(GL2ES2 gl) {
+       // fluchCache(gl) already called
+       Iterator<GlyphString> iterator = stringCacheMap.values().iterator();
+       while(iterator.hasNext()){
+           GlyphString glyphString = iterator.next();
+           glyphString.destroy(gl, rs);
+       }
+       stringCacheMap.clear();    
+       stringCacheArray.clear();
+   }
+   
+   /**
+    * <p>Sets the cache limit for reusing GlyphString's and their Region.
+    * Default is {@link #DEFAULT_CACHE_LIMIT}, -1 unlimited, 0 turns cache off, >0 limited </p>
+    * 
+    * <p>The cache will be validate when the next string rendering happens.</p>
+    *  
+    * @param newLimit new cache size
+    * 
+    * @see #DEFAULT_CACHE_LIMIT
+    */
+   public final void setCacheLimit(int newLimit ) { stringCacheLimit = newLimit; }
+   
+   /**
+    * Sets the cache limit, see {@link #setCacheLimit(int)} and validates the cache.
+    * 
+    * @see #setCacheLimit(int)
+    * 
+    * @param gl current GL used to remove cached objects if required
+    * @param newLimit new cache size
+    */
+   public final void setCacheLimit(GL2ES2 gl, int newLimit ) { stringCacheLimit = newLimit; validateCache(gl, 0); }
+   
+   /**
+    * @return the current cache limit
+    */
+   public final int getCacheLimit() { return stringCacheLimit; }
+   
+   /** 
+    * @return the current utilized cache size, <= {@link #getCacheLimit()}
+    */
+   public final int getCacheSize() { return stringCacheArray.size(); }
+   
+   protected final void validateCache(GL2ES2 gl, int space) {
+       if ( getCacheLimit() > 0 ) {
+           while ( getCacheSize() + space > getCacheLimit() ) {
+               removeCachedGlyphString(gl, 0);
+           }
+       }
+   }
+   
+   protected final GlyphString getCachedGlyphString(Font font, String str, int fontSize) {
+       return stringCacheMap.get(getKey(font, str, fontSize));
+   }
+
+   protected final void addCachedGlyphString(GL2ES2 gl, Font font, String str, int fontSize, GlyphString glyphString) {
+       if ( 0 != getCacheLimit() ) {
+           final String key = getKey(font, str, fontSize);
+           GlyphString oldGlyphString = stringCacheMap.put(key, glyphString);
+           if ( null == oldGlyphString ) {
+               // new entry ..
+               validateCache(gl, 1);
+               stringCacheArray.add(stringCacheArray.size(), key);
+           } /// else overwrite is nop ..
+       }
+   }
+   
+   protected final void removeCachedGlyphString(GL2ES2 gl, Font font, String str, int fontSize) {
+       final String key = getKey(font, str, fontSize);
+       GlyphString glyphString = stringCacheMap.remove(key);
+       if(null != glyphString) {
+           glyphString.destroy(gl, rs);
+       }       
+       stringCacheArray.remove(key);
+   }
+
+   protected final void removeCachedGlyphString(GL2ES2 gl, int idx) {
+       final String key = stringCacheArray.remove(idx);
+       final GlyphString glyphString = stringCacheMap.remove(key);
+       if(null != glyphString) {
+           glyphString.destroy(gl, rs);
+       }
+   }
+      
+   protected final String getKey(Font font, String str, int fontSize) {
+       final StringBuilder sb = new StringBuilder();
+       return font.getName(sb, Font.NAME_UNIQUNAME)
+              .append(".").append(str.hashCode()).append(".").append(fontSize).toString();
+   }
+
+   /** Default cache limit, see {@link #setCacheLimit(int)} */
+   public static final int DEFAULT_CACHE_LIMIT = 256;
+   
+   private HashMap<String, GlyphString> stringCacheMap = new HashMap<String, GlyphString>(DEFAULT_CACHE_LIMIT);
+   private ArrayList<String> stringCacheArray = new ArrayList<String>(DEFAULT_CACHE_LIMIT);
+   private int stringCacheLimit = DEFAULT_CACHE_LIMIT;      
+}
\ No newline at end of file
diff --git a/src/jogl/classes/com/jogamp/graph/curve/tess/Triangulation.java b/src/jogl/classes/com/jogamp/graph/curve/tess/Triangulation.java
new file mode 100644
index 0000000..7728efc
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/graph/curve/tess/Triangulation.java
@@ -0,0 +1,44 @@
+/**
+ * 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.graph.curve.tess;
+
+import jogamp.graph.curve.tess.CDTriangulator2D;
+
+
+public class Triangulation {
+    /** Create a new instance of a triangulation.
+     *  Currently only a modified version of Constraint Delaunay 
+     *  is implemented.
+     * @return instance of a triangulator
+     * @see Triangulator
+     */
+    public static Triangulator create() {
+        return new CDTriangulator2D();
+    }
+}
diff --git a/src/jogl/classes/com/jogamp/graph/curve/tess/Triangulator.java b/src/jogl/classes/com/jogamp/graph/curve/tess/Triangulator.java
new file mode 100644
index 0000000..1ffacce
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/graph/curve/tess/Triangulator.java
@@ -0,0 +1,69 @@
+/**
+ * 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.graph.curve.tess;
+
+import java.util.ArrayList;
+
+import com.jogamp.graph.geom.Outline;
+import com.jogamp.graph.geom.Triangle;
+
+/** Interface to the triangulation algorithms provided
+ *  A triangulation of 2D outlines where you can
+ *  provides an easy one or more outlines to be triangulated
+ *  
+ *  example usage:
+ *      addCurve(o1);
+ *      addCurve(o2);
+ *      addCurve(o3);
+ *      generate();
+ *      reset();
+ *      
+ * @see Outline
+ * @see Triangulation
+ */
+public interface Triangulator {
+    
+    /** Add a curve to the list of Outlines
+     * describing the shape
+     * @param outline a bounding {@link Outline}
+     */
+    public void addCurve(Outline outline);
+    
+    /** Generate the triangulation of the provided 
+     *  List of {@link Outline}s
+     * @return an arraylist of {@link Triangle}s resembling the
+     * final shape.
+     */
+    public ArrayList<Triangle> generate();
+    
+    /** Reset the triangulation to initial state
+     *  Clearing cached data
+     */
+    public void reset();
+}
diff --git a/src/jogl/classes/com/jogamp/graph/font/Font.java b/src/jogl/classes/com/jogamp/graph/font/Font.java
new file mode 100644
index 0000000..6503f27
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/graph/font/Font.java
@@ -0,0 +1,106 @@
+/**
+ * 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.graph.font;
+
+import com.jogamp.graph.geom.AABBox;
+
+/**
+ * Interface wrapper for font implementation.
+ * 
+ * TrueType Font Specification:
+ *   http://developer.apple.com/fonts/ttrefman/rm06/Chap6.html
+ *   
+ * TrueType Font Table Introduction:
+ *   http://scripts.sil.org/cms/scripts/page.php?item_id=IWS-Chapter08
+ */
+
+public interface Font {
+
+    /** font name indices for name table */
+    public static final int NAME_COPYRIGHT = 0;
+    public static final int NAME_FAMILY = 1;
+    public static final int NAME_SUBFAMILY = 2;
+    public static final int NAME_UNIQUNAME = 3;
+    public static final int NAME_FULLNAME = 4;
+    public static final int NAME_VERSION = 5;
+    public static final int NAME_MANUFACTURER = 8;
+    public static final int NAME_DESIGNER = 9;
+    
+    
+    /**
+     * Metrics for font
+     * 
+     * Depending on the font's direction, horizontal or vertical,
+     * the following tables shall be used:
+     * 
+     * Vertical http://developer.apple.com/fonts/TTRefMan/RM06/Chap6vhea.html
+     * Horizontal http://developer.apple.com/fonts/TTRefMan/RM06/Chap6hhea.html
+     */
+    public interface Metrics {  
+        float getAscent(float pixelSize);
+        float getDescent(float pixelSize);
+        float getLineGap(float pixelSize);
+        float getMaxExtend(float pixelSize);        
+        float getScale(float pixelSize);
+        AABBox getBBox(float pixelSize);
+    }
+
+    /**
+     * Glyph for font
+     */
+    public interface Glyph {
+        public Font getFont();
+        public char getSymbol();
+        public AABBox getBBox(float pixelSize);
+        public float getAdvance(float pixelSize, boolean useFrationalMetrics);
+    }
+
+
+    public String getName(int nameIndex);
+    public StringBuilder getName(StringBuilder string, int nameIndex);
+    
+    /** Shall return the family and subfamily name, separated a dash.
+     * <p>{@link #getName(StringBuilder, int)} w/ {@link #NAME_FAMILY} and {@link #NAME_SUBFAMILY}</p>
+     * <p>Example: "{@code Ubuntu-Regular}"</p>  */
+    public StringBuilder getFullFamilyName(StringBuilder buffer);
+    
+    public StringBuilder getAllNames(StringBuilder string, String separator);
+    
+    public Metrics getMetrics();
+    public Glyph getGlyph(char symbol);
+    public int getNumGlyphs();
+    
+    public float getStringWidth(CharSequence string, float pixelSize);
+    public float getStringHeight(CharSequence string, float pixelSize);
+    public AABBox getStringBounds(CharSequence string, float pixelSize);
+    
+    public boolean isPrintableChar( char c );  
+    
+    /** Shall return {@link #getFullFamilyName()} */
+    public String toString();
+}
\ No newline at end of file
diff --git a/src/jogl/classes/com/jogamp/graph/font/FontFactory.java b/src/jogl/classes/com/jogamp/graph/font/FontFactory.java
new file mode 100644
index 0000000..dff8903
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/graph/font/FontFactory.java
@@ -0,0 +1,92 @@
+/**
+ * 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.graph.font;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+import java.security.AccessController;
+
+import com.jogamp.common.util.ReflectionUtil;
+
+import jogamp.graph.font.FontConstructor;
+import jogamp.graph.font.JavaFontLoader;
+import jogamp.graph.font.UbuntuFontLoader;
+import jogamp.opengl.Debug;
+
+public class FontFactory {
+    /** Ubuntu is the default font family */
+    public static final int UBUNTU = 0;
+    
+    /** Java fonts are optional */
+    public static final int JAVA = 1;
+    
+    private static final FontConstructor fontConstr;
+
+    static {
+        /**
+         * For example:
+         *   "jogamp.graph.font.typecast.TypecastFontFactory" (default)
+         *   "jogamp.graph.font.ttf.TTFFontImpl"
+         */
+        String fontImplName = Debug.getProperty("FontImpl", true, AccessController.getContext());
+        if(null == fontImplName) {
+            fontImplName = "jogamp.graph.font.typecast.TypecastFontConstructor";
+        }
+        fontConstr = (FontConstructor) ReflectionUtil.createInstance(fontImplName, FontFactory.class.getClassLoader());
+    }
+    
+    public static final FontSet getDefault() {
+        return get(UBUNTU);
+    }
+    
+    public static final FontSet get(int font) {
+        switch (font) {
+            case JAVA:
+                return JavaFontLoader.get();
+            default:
+                return UbuntuFontLoader.get();
+        }
+    }
+    
+    public static final Font get(File file) throws IOException {
+        return fontConstr.create(file);
+    }
+
+    public static final Font get(final URL url) throws IOException {
+        return fontConstr.create(url);
+    }    
+    
+    public static boolean isPrintableChar( char c ) {
+        Character.UnicodeBlock block = Character.UnicodeBlock.of( c );
+        return (!Character.isISOControl(c)) &&
+                c != 0 &&
+                block != null &&
+                block != Character.UnicodeBlock.SPECIALS;
+    }    
+}
diff --git a/src/jogl/classes/com/jogamp/graph/font/FontSet.java b/src/jogl/classes/com/jogamp/graph/font/FontSet.java
new file mode 100644
index 0000000..0cee811
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/graph/font/FontSet.java
@@ -0,0 +1,60 @@
+/**
+ * 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.graph.font;
+
+
+public interface FontSet {
+
+    /** Font family REGULAR **/
+    public static final int FAMILY_REGULAR    = 0;
+    
+    /** Font family LIGHT **/
+    public static final int FAMILY_LIGHT      = 1;
+    
+    /** Font family MEDIUM **/
+    public static final int FAMILY_MEDIUM     = 2;
+    
+    /** Font family CONDENSED **/
+    public static final int FAMILY_CONDENSED  = 3;
+    
+    /** Font family MONO **/
+    public static final int FAMILY_MONOSPACED = 4;
+    
+    /** SERIF style/family bit flag. Fallback to Sans Serif. */
+    public static final int STYLE_SERIF       = 1 << 1;
+    
+    /** BOLD style bit flag */
+    public static final int STYLE_BOLD        = 1 << 2;
+    
+    /** ITALIC style bit flag */
+    public static final int STYLE_ITALIC      = 1 << 3;
+
+    Font getDefault();
+    
+    Font get(int family, int stylebits);
+}
diff --git a/src/jogl/classes/com/jogamp/graph/geom/AABBox.java b/src/jogl/classes/com/jogamp/graph/geom/AABBox.java
new file mode 100644
index 0000000..87f0849
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/graph/geom/AABBox.java
@@ -0,0 +1,326 @@
+/**
+ * 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.graph.geom;
+
+import com.jogamp.graph.math.VectorUtil;
+
+/**
+ * Axis Aligned Bounding Box. Defined by two 3D coordinates (low and high)
+ * The low being the the lower left corner of the box, and the high being the upper 
+ * right corner of the box.
+ * 
+ */
+public class AABBox implements Cloneable {
+    private float[] low = new float[3];
+    private float[] high = new float[3];
+    private float[] center = new float[3];
+
+    /** Create a Axis Aligned bounding box (AABBox) 
+     * where the low and and high MAX float Values.
+     */
+    public AABBox() {
+        reset();
+    }
+
+    /** Create an AABBox specifying the coordinates 
+     * of the low and high
+     * @param lx min x-coordinate
+     * @param ly min y-coordnate
+     * @param lz min z-coordinate
+     * @param hx max x-coordinate
+     * @param hy max y-coordinate
+     * @param hz max z-coordinate
+     */
+    public AABBox(float lx, float ly, float lz,
+            float hx, float hy, float hz)
+    {
+        reset();
+        resize(lx, ly, lz);
+        resize(hx, hy, hz);
+
+        computeCenter();
+    }
+    
+    /** Create a AABBox defining the low and high
+     * @param low min xyz-coordinates
+     * @param high max xyz-coordinates
+     */
+    public AABBox(float[] low, float[] high) {
+        reset();
+        resize(low[0],low[1],low[2]);
+        resize(high[0],high[1],high[2]);
+
+        computeCenter();
+    }
+
+    /** resets this box to the inverse low/high, allowing the next {@link #resize(float, float, float)} command to hit. */
+    public final void reset() {
+        setLow(Float.MAX_VALUE,Float.MAX_VALUE,Float.MAX_VALUE);
+        setHigh(-1*Float.MAX_VALUE,-1*Float.MAX_VALUE,-1*Float.MAX_VALUE);
+        center[0] = 0f;
+        center[1] = 0f;
+        center[2] = 0f;
+    }
+    
+    /** Get the max xyz-coordinates
+     * @return a float array containing the max xyz coordinates
+     */
+    public final float[] getHigh() {
+        return high;
+    }
+    
+    private final void setHigh(float hx, float hy, float hz) {
+        this.high[0] = hx;
+        this.high[1] = hy;
+        this.high[2] = hz;
+    }
+    
+    /** Get the min xyz-coordinates
+     * @return a float array containing the min xyz coordinates
+     */
+    public final float[] getLow() {
+        return low;
+    }
+    
+    private final void setLow(float lx, float ly, float lz) {
+        this.low[0] = lx;
+        this.low[1] = ly;
+        this.low[2] = lz;
+    }
+
+    /** Resize the AABBox to encapsulate another AABox
+     * @param newBox AABBox to be encapsulated in
+     */
+    public final void resize(AABBox newBox) {
+        float[] newLow = newBox.getLow();
+        float[] newHigh = newBox.getHigh();
+
+        /** test low */
+        if (newLow[0] < low[0])
+            low[0] = newLow[0];
+        if (newLow[1] < low[1])
+            low[1] = newLow[1];
+        if (newLow[2] < low[2])
+            low[2] = newLow[2];
+
+        /** test high */
+        if (newHigh[0] > high[0])
+            high[0] = newHigh[0];
+        if (newHigh[1] > high[1])
+            high[1] = newHigh[1];
+        if (newHigh[2] > high[2])
+            high[2] = newHigh[2];
+
+        computeCenter();
+    }
+
+    private final void computeCenter() {
+        center[0] = (high[0] + low[0])/2;
+        center[1] = (high[1] + low[1])/2;
+        center[2] = (high[2] + low[2])/2;
+    }
+
+    /** Resize the AABBox to encapsulate the passed
+     * xyz-coordinates. 
+     * @param x x-axis coordinate value
+     * @param y y-axis coordinate value
+     * @param z z-axis coordinate value
+     */
+    public final void resize(float x, float y, float z) {    
+        /** test low */
+        if (x < low[0])
+            low[0] = x;
+        if (y < low[1])
+            low[1] = y;
+        if (z < low[2])
+            low[2] = z;
+
+        /** test high */
+        if (x > high[0])
+            high[0] = x;
+        if (y > high[1])
+            high[1] = y;
+        if (z > high[2])
+            high[2] = z;
+        
+        computeCenter();
+    }
+
+    /** Resize the AABBox to encapsulate the passed
+     * xyz-coordinates. 
+     * @param xyz xyz-axis coordinate values
+     * @param offset of the array
+     */
+    public final void resize(float[] xyz, int offset) {
+        resize(xyz[0+offset], xyz[1+offset], xyz[2+offset]);
+    }
+
+    /** Check if the x & y coordinates are bounded/contained
+     *  by this AABBox
+     * @param x  x-axis coordinate value
+     * @param y  y-axis coordinate value
+     * @return true if  x belong to (low.x, high.x) and
+     * y belong to (low.y, high.y)
+     */
+    public final boolean contains(float x, float y) {
+        if(x<low[0] || x>high[0]){
+            return false;
+        }
+        if(y<low[1]|| y>high[1]){
+            return false;
+        }
+        return true;
+    }
+    
+    /** Check if the xyz coordinates are bounded/contained
+     *  by this AABBox.
+     * @param x x-axis coordinate value
+     * @param y y-axis coordinate value
+     * @param z z-axis coordinate value
+     * @return true if  x belong to (low.x, high.x) and
+     * y belong to (low.y, high.y) and  z belong to (low.z, high.z)
+     */
+    public final boolean contains(float x, float y, float z) {
+        if(x<low[0] || x>high[0]){
+            return false;
+        }
+        if(y<low[1]|| y>high[1]){
+            return false;
+        }
+        if(z<low[2] || z>high[2]){
+            return false;
+        }
+        return true;
+    }
+    
+    /** Check if there is a common region between this AABBox and the passed
+     *     2D region irrespective of z range
+     * @param x lower left x-coord
+     * @param y lower left y-coord
+     * @param w width
+     * @param h hight
+     * @return true if this AABBox might have a common region with this 2D region
+     */
+    public final boolean intersects(float x, float y, float w, float h) {
+        if (w <= 0 || h <= 0) {
+            return false;
+        }
+        
+        final float _w = getWidth();
+        final float _h = getHeight();        
+        if (_w <= 0 || _h <= 0) {
+            return false;
+        }
+        
+        final float x0 = getMinX();
+        final float y0 = getMinY();
+        return (x + w > x0 &&
+                y + h > y0 &&
+                x < x0 + _w &&
+                y < y0 + _h);
+    }
+
+    
+    /** Get the size of the Box where the size is represented by the 
+     * length of the vector between low and high.
+     * @return a float representing the size of the AABBox
+     */
+    public final float getSize() {
+        return VectorUtil.computeLength(low, high);
+    }
+
+    /**Get the Center of the AABBox
+     * @return the xyz-coordinates of the center of the AABBox
+     */
+    public final float[] getCenter() {
+        return center;
+    }
+
+    /** Scale the AABBox by a constant
+     * @param size a constant float value
+     */
+    public final void scale(float size) {
+        float[] diffH = new float[3];
+        diffH[0] = high[0] - center[0];
+        diffH[1] = high[1] - center[1];
+        diffH[2] = high[2] - center[2];
+        
+        diffH = VectorUtil.scale(diffH, size);
+        
+        float[] diffL = new float[3];
+        diffL[0] = low[0] - center[0];
+        diffL[1] = low[1] - center[1];
+        diffL[2] = low[2] - center[2];
+        
+        diffL = VectorUtil.scale(diffL, size);
+        
+        high = VectorUtil.vectorAdd(center, diffH);
+        low = VectorUtil.vectorAdd(center, diffL);
+    }
+
+    public final float getMinX() {
+        return low[0];
+    }
+    
+    public final float getMinY() {
+        return low[1];
+    }
+    
+    public final float getWidth(){
+        return high[0] - low[0];
+    }
+    
+    public final float getHeight() {
+        return high[1] - low[1];
+    }
+    
+    public final float getDepth() {
+        return high[2] - low[2];
+    }
+    
+    public final AABBox clone() {
+        return new AABBox(this.low, this.high);
+    }
+    
+    public final boolean equals(Object obj) {
+        if( obj == this ) {
+            return true;
+        }
+        if( null == obj || !(obj instanceof AABBox) ) {
+            return false;
+        }
+        final AABBox other = (AABBox) obj; 
+        return VectorUtil.checkEquality(low, other.low) &&          
+               VectorUtil.checkEquality(high, other.high) ;
+    }
+    
+    public final String toString() {
+        return "[ "+low[0]+"/"+low[1]+"/"+low[1]+" .. "+high[0]+"/"+high[0]+"/"+high[0]+", ctr "+
+                    center[0]+"/"+center[1]+"/"+center[1]+" ]";
+    }
+}
diff --git a/src/jogl/classes/com/jogamp/graph/geom/Outline.java b/src/jogl/classes/com/jogamp/graph/geom/Outline.java
new file mode 100644
index 0000000..5030488
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/graph/geom/Outline.java
@@ -0,0 +1,243 @@
+/**
+ * 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.graph.geom;
+
+import java.util.ArrayList;
+
+import com.jogamp.graph.geom.Vertex;
+import com.jogamp.graph.math.VectorUtil;
+
+
+
+/** Define a single continuous stroke by control vertices.
+ *  The vertices define the shape of the region defined by this 
+ *  outline. The Outline can contain a list of off-curve and on-curve
+ *  vertices which define curved regions.
+ *  
+ *  Note: An outline should be closed to be rendered as a region.
+ *  
+ *  @see OutlineShape, Region
+ */
+public class Outline implements Cloneable, Comparable<Outline> {
+
+    private ArrayList<Vertex> vertices = new ArrayList<Vertex>(3);
+    private boolean closed = false;
+    private AABBox bbox = new AABBox();
+    private boolean dirtyBBox = false;
+
+    /**Create an outline defined by control vertices.
+     * An outline can contain off Curve vertices which define curved
+     * regions in the outline.
+     */
+    public Outline() {        
+    }
+
+    public final int getVertexCount() {
+        return vertices.size();
+    }
+
+    /** Appends a vertex to the outline loop/strip.
+     * @param vertex Vertex to be added
+     * @throws NullPointerException if the  {@link Vertex} element is null 
+     */
+    public final void addVertex(Vertex vertex) throws NullPointerException {
+        addVertex(vertices.size(), vertex);
+    }
+
+    /** Insert the {@link Vertex} element at the given {@code position} to the outline loop/strip.
+     * @param position of the added Vertex
+     * @param vertex Vertex object to be added
+     * @throws NullPointerException if the  {@link Vertex} element is null 
+     * @throws IndexOutOfBoundsException if position is out of range (position < 0 || position > getVertexNumber())
+     */
+    public final void addVertex(int position, Vertex vertex) throws NullPointerException, IndexOutOfBoundsException {
+        if (null == vertex) {
+            throw new NullPointerException("vertex is null");
+        }
+        vertices.add(position, vertex);
+        if(!dirtyBBox) {
+            bbox.resize(vertex.getX(), vertex.getY(), vertex.getZ());
+        }
+    }
+
+    /** Replaces the {@link Vertex} element at the given {@code position}.
+     * <p>Sets the bounding box dirty, hence a next call to {@link #getBounds()} will validate it.</p>
+     * 
+     * @param position of the replaced Vertex
+     * @param vertex replacement Vertex object 
+     * @throws NullPointerException if the  {@link Outline} element is null 
+     * @throws IndexOutOfBoundsException if position is out of range (position < 0 || position >= getVertexNumber())
+     */
+    public final void setVertex(int position, Vertex vertex) throws NullPointerException, IndexOutOfBoundsException {
+        if (null == vertex) {
+            throw new NullPointerException("vertex is null");
+        }
+        vertices.set(position, vertex);
+        dirtyBBox = true;
+    }
+
+    public final Vertex getVertex(int index){
+        return vertices.get(index);
+    }
+
+    public int getVertexIndex(Vertex vertex){
+        return vertices.indexOf(vertex);
+    }
+
+    /** Removes the {@link Vertex} element at the given {@code position}.
+     * <p>Sets the bounding box dirty, hence a next call to {@link #getBounds()} will validate it.</p>
+     * 
+     * @param position of the to be removed Vertex
+     * @throws IndexOutOfBoundsException if position is out of range (position < 0 || position >= getVertexNumber())
+     */
+    public final Vertex removeVertex(int position) throws IndexOutOfBoundsException {
+        dirtyBBox = true;        
+        return vertices.remove(position);
+    }
+
+    public final boolean isEmpty(){
+        return (vertices.size() == 0);
+    }
+
+    public final Vertex getLastVertex(){
+        if(isEmpty()){
+            return null;
+        }
+        return vertices.get(vertices.size()-1);
+    }
+
+    public final ArrayList<Vertex> getVertices() {
+        return vertices;
+    }
+
+    /**
+     * Use the given outline loop/strip.
+     * <p>Validates the bounding box.</p>
+     * 
+     * @param vertices the new outline loop/strip
+     */
+    public final void setVertices(ArrayList<Vertex> vertices) {
+        this.vertices = vertices;
+        validateBoundingBox();
+    }
+
+    public final boolean isClosed() {
+        return closed;
+    }
+
+    /** define if this outline is closed or not.
+     * if set to closed, checks if the last vertex is 
+     * equal to the first vertex. If not Equal adds a
+     * vertex at the end to the list.
+     * @param closed
+     */
+    public final void setClosed(boolean closed) {
+        this.closed = closed;
+        if( closed && !isEmpty() ) {
+            Vertex first = vertices.get(0);
+            Vertex last = getLastVertex();
+            if(!VectorUtil.checkEquality(first.getCoord(), last.getCoord())){
+                Vertex v = first.clone();
+                vertices.add(v);
+            }
+        }
+    }
+
+    /** Compare two outlines with Bounding Box area
+     * as criteria. 
+     * @see java.lang.Comparable#compareTo(java.lang.Object)
+     */
+    public final int compareTo(Outline outline) {
+        float size = getBounds().getSize();
+        float newSize = outline.getBounds().getSize();
+        if(size < newSize){
+            return -1;
+        }
+        else if(size > newSize){
+            return 1;
+        }
+        return 0;
+    }
+
+    private final void validateBoundingBox() {
+        dirtyBBox = false;
+        bbox.reset();
+        for (int i=0; i<vertices.size(); i++) {
+            bbox.resize(vertices.get(i).getCoord(), 0);
+        }
+    }
+
+    public final AABBox getBounds() {
+        if (dirtyBBox) {
+            validateBoundingBox();
+        }
+        return bbox;
+    }    
+
+    /**
+     * @param obj the Object to compare this Outline with
+     * @return true if {@code obj} is an Outline, not null, equals bounds and equal vertices in the same order 
+     */
+    public boolean equals(Object obj) {
+        if( obj == this) {
+            return true;
+        }
+        if( null == obj || !(obj instanceof Outline) ) {
+            return false;
+        }        
+        final Outline o = (Outline) obj;
+        if(getVertexCount() != o.getVertexCount()) {
+            return false;
+        }
+        if( !getBounds().equals( o.getBounds() ) ) {
+            return false;
+        }
+        for (int i=getVertexCount()-1; i>=0; i--) {
+            if( ! getVertex(i).equals( o.getVertex(i) ) ) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    /**
+     * @return deep clone of this Outline
+     */
+    public Outline clone() {
+        Outline o;
+        try {
+            o = (Outline) super.clone();
+        } catch (CloneNotSupportedException e) { throw new InternalError(); }
+        o.bbox = bbox.clone();
+        o.vertices = new ArrayList<Vertex>(vertices.size());
+        for(int i=0; i<vertices.size(); i++) {
+            o.vertices.add(vertices.get(i).clone());
+        }
+        return o;
+    }       
+}
diff --git a/src/jogl/classes/com/jogamp/graph/geom/Triangle.java b/src/jogl/classes/com/jogamp/graph/geom/Triangle.java
new file mode 100644
index 0000000..fb34de2
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/graph/geom/Triangle.java
@@ -0,0 +1,79 @@
+/**
+ * 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.graph.geom;
+
+public class Triangle {
+    private int id = Integer.MAX_VALUE;
+    final private Vertex[] vertices;
+    private boolean[] boundaryEdges = new boolean[3];
+    private boolean[] boundaryVertices = null;
+
+    public Triangle(Vertex ... v123){
+        vertices = v123;
+    }
+
+    public int getId() {
+        return id;
+    }
+
+    public void setId(int id) {
+        this.id = id;
+    }
+
+    public Vertex[] getVertices() {
+        return vertices;
+    }
+    
+    public boolean isEdgesBoundary() {
+        return boundaryEdges[0] || boundaryEdges[1] || boundaryEdges[2];
+    }
+    
+    public boolean isVerticesBoundary() {
+        return boundaryVertices[0] || boundaryVertices[1] || boundaryVertices[2];
+    }
+
+    public void setEdgesBoundary(boolean[] boundary) {
+        this.boundaryEdges = boundary;
+    }
+    
+    public boolean[] getEdgeBoundary() {
+        return boundaryEdges;
+    }
+    
+    public boolean[] getVerticesBoundary() {
+        return boundaryVertices;
+    }
+
+    public void setVerticesBoundary(boolean[] boundaryVertices) {
+        this.boundaryVertices = boundaryVertices;
+    }
+    
+    public String toString() {
+        return "Tri ID: " + id + "\n" +  vertices[0]  + "\n" +  vertices[1] + "\n" +  vertices[2];
+    }
+}
diff --git a/src/jogl/classes/com/jogamp/graph/geom/Vertex.java b/src/jogl/classes/com/jogamp/graph/geom/Vertex.java
new file mode 100644
index 0000000..3080f32
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/graph/geom/Vertex.java
@@ -0,0 +1,91 @@
+/**
+ * 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.graph.geom;
+
+/**
+ * A Vertex with custom memory layout using custom factory. 
+ */
+public interface Vertex extends Cloneable {
+
+    public static interface Factory <T extends Vertex> {
+        T create();
+
+        T create(float x, float y, float z, boolean onCurve);
+
+        T create(float[] coordsBuffer, int offset, int length, boolean onCurve);    
+    }
+    
+    void setCoord(float x, float y, float z);
+
+    /**
+     * @see System#arraycopy(Object, int, Object, int, int) for thrown IndexOutOfBoundsException
+     */
+    void setCoord(float[] coordsBuffer, int offset, int length);
+    
+    float[] getCoord();
+
+    void setX(float x);
+
+    void setY(float y);
+
+    void setZ(float z);
+
+    float getX();
+
+    float getY();
+
+    float getZ();
+
+    boolean isOnCurve();
+
+    void setOnCurve(boolean onCurve);
+
+    int getId();
+    
+    void setId(int id);
+    
+    float[] getTexCoord();
+    
+    void setTexCoord(float s, float t);
+    
+    /**
+     * @see System#arraycopy(Object, int, Object, int, int) for thrown IndexOutOfBoundsException
+     */
+    void setTexCoord(float[] texCoordsBuffer, int offset, int length);
+    
+    /**
+     * @param obj the Object to compare this Vertex with
+     * @return true if {@code obj} is a Vertex and not null, on-curve flag is equal and has same vertex- and tex-coords. 
+     */
+    boolean equals(Object obj);
+    
+    /**
+     * @return deep clone of this Vertex
+     */
+    Vertex clone();
+}
diff --git a/src/jogl/classes/com/jogamp/graph/geom/opengl/SVertex.java b/src/jogl/classes/com/jogamp/graph/geom/opengl/SVertex.java
new file mode 100644
index 0000000..9dade17
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/graph/geom/opengl/SVertex.java
@@ -0,0 +1,174 @@
+/**
+ * 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.graph.geom.opengl;
+
+import com.jogamp.graph.geom.Vertex;
+import com.jogamp.graph.math.VectorUtil;
+
+/** A Simple Vertex Implementation. Where the coordinates, and other attributes are
+ * float based, and the coordinates and texture coordinates are saved in two float arrays.
+ *
+ */
+public class SVertex implements Vertex {
+    private int id = Integer.MAX_VALUE;
+    protected float[] coord = new float[3];
+    protected boolean onCurve;
+    private float[] texCoord = new float[2];
+    
+    static final Factory factory = new Factory();
+    
+    public static Factory factory() { return factory; } 
+    
+    public static class Factory implements Vertex.Factory<SVertex> {
+        public SVertex create() {
+            return new SVertex();
+        }
+
+        public SVertex create(float x, float y, float z, boolean onCurve) {
+            return new SVertex(x, y, z, onCurve);
+        }
+
+        public SVertex create(float[] coordsBuffer, int offset, int length, boolean onCurve) {
+            return new SVertex(coordsBuffer, offset, length, onCurve);
+        }        
+    }
+    
+    public SVertex() {
+    }
+
+    public SVertex(float x, float y, float z, boolean onCurve) {
+        setCoord(x, y, z);
+        setOnCurve(onCurve);
+    }
+    
+    public SVertex(float[] coordsBuffer, int offset, int length, boolean onCurve) {
+        setCoord(coordsBuffer, offset, length);
+        setOnCurve(onCurve);
+    }
+        
+    public SVertex(float[] coordsBuffer, int offset, int length, 
+                   float[] texCoordsBuffer, int offsetTC, int lengthTC, boolean onCurve) {
+        setCoord(coordsBuffer, offset, length);
+        setTexCoord(texCoordsBuffer, offsetTC, lengthTC);
+        setOnCurve(onCurve);
+    }
+    
+    public final void setCoord(float x, float y, float z) {
+        this.coord[0] = x;
+        this.coord[1] = y;
+        this.coord[2] = z;
+    }
+
+    public final void setCoord(float[] coordsBuffer, int offset, int length) {
+        System.arraycopy(coordsBuffer, offset, coord, 0, length);
+    }
+        
+    public final float[] getCoord() {
+        return coord;
+    }
+
+    public final void setX(float x) {
+        this.coord[0] = x;
+    }
+
+    public final void setY(float y) {
+        this.coord[1] = y;
+    }
+
+    public final void setZ(float z) {
+        this.coord[2] = z;
+    }
+
+    public final float getX() {
+        return this.coord[0];
+    }
+
+    public final float getY() {
+        return this.coord[1];
+    }
+
+    public final float getZ() {
+        return this.coord[2];
+    }
+
+    public final boolean isOnCurve() {
+        return onCurve;
+    }
+
+    public final void setOnCurve(boolean onCurve) {
+        this.onCurve = onCurve;
+    }
+
+    public final int getId(){
+        return id;
+    }
+    
+    public final void setId(int id){
+        this.id = id;
+    }
+    
+    public boolean equals(Object obj) {
+        if( obj == this) {
+            return true;
+        }
+        if( null == obj || !(obj instanceof Vertex) ) {
+            return false;
+        }
+        final Vertex v = (Vertex) obj;
+        return this == v || 
+               isOnCurve() == v.isOnCurve() && 
+               VectorUtil.checkEqualityVec2(getTexCoord(), v.getTexCoord()) &&
+               VectorUtil.checkEquality(getCoord(), v.getCoord()) ;
+    }
+    
+    public final float[] getTexCoord() {
+        return texCoord;
+    }
+
+    public final void setTexCoord(float s, float t) {
+        this.texCoord[0] = s;
+        this.texCoord[1] = t;
+    }
+
+    public final void setTexCoord(float[] texCoordsBuffer, int offset, int length) {
+        System.arraycopy(texCoordsBuffer, offset, texCoord, 0, length);
+    }
+        
+    /**
+     * @return deep clone of this Vertex, but keeping the id blank
+     */
+    public SVertex clone(){
+        return new SVertex(this.coord, 0, 3, this.texCoord, 0, 2, this.onCurve);
+    }
+    
+    public String toString() {
+        return "[ID: " + id + ", onCurve: " + onCurve + 
+               ": p " + coord[0] + ", " + coord[1] + ", " + coord[2] +
+               ", t " + texCoord[0] + ", " + texCoord[1] + "]";
+    }
+}
diff --git a/src/jogl/classes/com/jogamp/graph/math/Quaternion.java b/src/jogl/classes/com/jogamp/graph/math/Quaternion.java
new file mode 100755
index 0000000..38638dc
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/graph/math/Quaternion.java
@@ -0,0 +1,382 @@
+/**
+ * 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.graph.math;
+
+import jogamp.graph.math.MathFloat;
+
+public class Quaternion {
+    protected float x,y,z,w;
+
+    public Quaternion(){
+
+    }
+    
+    public Quaternion(float x, float y, float z, float w) {
+        this.x = x;
+        this.y = y;
+        this.z = z;
+        this.w = w;
+    }
+    
+    /** Constructor to create a rotation based quaternion from two vectors
+     * @param vector1
+     * @param vector2
+     */
+    public Quaternion(float[] vector1, float[] vector2) 
+    {
+        float theta = (float)MathFloat.acos(dot(vector1, vector2));
+        float[] cross = cross(vector1,vector2);
+        cross = normalizeVec(cross);
+
+        this.x = (float)MathFloat.sin(theta/2)*cross[0];
+        this.y = (float)MathFloat.sin(theta/2)*cross[1];
+        this.z = (float)MathFloat.sin(theta/2)*cross[2];
+        this.w = (float)MathFloat.cos(theta/2);
+        this.normalize();
+    }
+    
+    /** Transform the rotational quaternion to axis based rotation angles
+     * @return new float[4] with ,theta,Rx,Ry,Rz
+     */
+    public float[] toAxis()
+    {
+        float[] vec = new float[4];
+        float scale = (float)MathFloat.sqrt(x * x + y * y + z * z);
+        vec[0] =(float) MathFloat.acos(w) * 2.0f;
+        vec[1] = x / scale;
+        vec[2] = y / scale;
+        vec[3] = z / scale;
+        return vec;
+    }
+    
+    /** Normalize a vector
+     * @param vector input vector
+     * @return normalized vector
+     */
+    private float[] normalizeVec(float[] vector)
+    {
+        float[] newVector = new float[3];
+
+        float d = MathFloat.sqrt(vector[0]*vector[0] + vector[1]*vector[1] + vector[2]*vector[2]);
+        if(d> 0.0f)
+        {
+            newVector[0] = vector[0]/d;
+            newVector[1] = vector[1]/d;
+            newVector[2] = vector[2]/d;
+        }
+        return newVector;
+    }
+    /** compute the dot product of two points
+     * @param vec1 vector 1
+     * @param vec2 vector 2
+     * @return the dot product as float
+     */
+    private float dot(float[] vec1, float[] vec2)
+    {
+        return (vec1[0]*vec2[0] + vec1[1]*vec2[1] + vec1[2]*vec2[2]);
+    }
+    /** cross product vec1 x vec2
+     * @param vec1 vector 1
+     * @param vec2 vecttor 2
+     * @return the resulting vector
+     */
+    private float[] cross(float[] vec1, float[] vec2)
+    {
+        float[] out = new float[3];
+
+        out[0] = vec2[2]*vec1[1] - vec2[1]*vec1[2];
+        out[1] = vec2[0]*vec1[2] - vec2[2]*vec1[0];
+        out[2] = vec2[1]*vec1[0] - vec2[0]*vec1[1];
+
+        return out;
+    }
+    public float getW() {
+        return w;
+    }
+    public void setW(float w) {
+        this.w = w;
+    }
+    public float getX() {
+        return x;
+    }
+    public void setX(float x) {
+        this.x = x;
+    }
+    public float getY() {
+        return y;
+    }
+    public void setY(float y) {
+        this.y = y;
+    }
+    public float getZ() {
+        return z;
+    }
+    public void setZ(float z) {
+        this.z = z;
+    }
+
+    /** Add a quaternion
+     * @param q quaternion
+     */
+    public void add(Quaternion q)
+    {
+        x+=q.x;
+        y+=q.y;
+        z+=q.z;
+    }
+    
+    /** Subtract a quaternion
+     * @param q quaternion
+     */
+    public void subtract(Quaternion q)
+    {
+        x-=q.x;
+        y-=q.y;
+        z-=q.z;
+    }
+    
+    /** Divide a quaternion by a constant
+     * @param n a float to divide by
+     */
+    public void divide(float n)
+    {
+        x/=n;
+        y/=n;
+        z/=n;
+    }
+    
+    /** Multiply this quaternion by 
+     * the param quaternion
+     * @param q a quaternion to multiply with
+     */
+    public void mult(Quaternion q)
+    {
+        float w1 = w*q.w - (x*q.x + y*q.y + z*q.z);
+
+        float x1 = w*q.z + q.w*z + y*q.z - z*q.y;
+        float y1 = w*q.x + q.w*x + z*q.x - x*q.z;
+        float z1 = w*q.y + q.w*y + x*q.y - y*q.x;
+
+        w = w1;
+        x = x1;
+        y = y1;
+        z = z1; 
+    }
+    
+    /** Multiply a quaternion by a constant
+     * @param n a float constant
+     */
+    public void mult(float n)
+    {
+        x*=n;
+        y*=n;
+        z*=n;
+    }
+    
+    /** Normalize a quaternion required if  
+     *  to be used as a rotational quaternion
+     */
+    public void normalize()
+    {
+        float norme = (float)MathFloat.sqrt(w*w + x*x + y*y + z*z);
+        if (norme == 0.0f)
+        {
+            w = 1.0f; 
+            x = y = z = 0.0f;
+        }
+        else
+        {
+            float recip = 1.0f/norme;
+
+            w *= recip;
+            x *= recip;
+            y *= recip;
+            z *= recip;
+        }
+    }
+    
+    /** Invert the quaternion If rotational, 
+     * will produce a the inverse rotation
+     */
+    public void inverse()
+    {
+        float norm = w*w + x*x + y*y + z*z;
+
+        float recip = 1.0f/norm;
+
+        w *= recip;
+        x = -1*x*recip;
+        y = -1*y*recip;
+        z = -1*z*recip;
+    }
+    
+    /** Transform this quaternion to a
+     * 4x4 column matrix representing the rotation
+     * @return new float[16] column matrix 4x4 
+     */
+    public float[] toMatrix()
+    {
+        float[] matrix = new float[16];
+        matrix[0] = 1.0f - 2*y*y - 2*z*z;
+        matrix[1] = 2*x*y + 2*w*z;
+        matrix[2] = 2*x*z - 2*w*y;
+        matrix[3] = 0;
+
+        matrix[4] = 2*x*y - 2*w*z;
+        matrix[5] = 1.0f - 2*x*x - 2*z*z;
+        matrix[6] = 2*y*z + 2*w*x;
+        matrix[7] = 0;
+
+        matrix[8]  = 2*x*z + 2*w*y;
+        matrix[9]  = 2*y*z - 2*w*x;
+        matrix[10] = 1.0f - 2*x*x - 2*y*y;
+        matrix[11] = 0;
+
+        matrix[12] = 0;
+        matrix[13] = 0;
+        matrix[14] = 0;
+        matrix[15] = 1;
+        return matrix;
+    }
+    
+    /** Set this quaternion from a Sphereical interpolation
+     *  of two param quaternion, used mostly for rotational animation
+     * @param a initial quaternion
+     * @param b target quaternion
+     * @param t float between 0 and 1 representing interp.
+     */
+    public void slerp(Quaternion a,Quaternion b, float t)
+    {
+        float omega, cosom, sinom, sclp, sclq;
+        cosom = a.x*b.x + a.y*b.y + a.z*b.z + a.w*b.w;
+        if ((1.0f+cosom) > MathFloat.E) {
+            if ((1.0f-cosom) > MathFloat.E) {
+                omega = (float)MathFloat.acos(cosom);
+                sinom = (float)MathFloat.sin(omega);
+                sclp = (float)MathFloat.sin((1.0f-t)*omega) / sinom;
+                sclq = (float)MathFloat.sin(t*omega) / sinom;
+            }
+            else {
+                sclp = 1.0f - t;
+                sclq = t;
+            }
+            x = sclp*a.x + sclq*b.x;
+            y = sclp*a.y + sclq*b.y;
+            z = sclp*a.z + sclq*b.z;
+            w = sclp*a.w + sclq*b.w;
+        }
+        else {
+            x =-a.y;
+            y = a.x;
+            z =-a.w;
+            w = a.z;
+            sclp = MathFloat.sin((1.0f-t) * MathFloat.PI * 0.5f);
+            sclq = MathFloat.sin(t * MathFloat.PI * 0.5f);
+            x = sclp*a.x + sclq*b.x;
+            y = sclp*a.y + sclq*b.y;
+            z = sclp*a.z + sclq*b.z;
+        }
+    }
+    
+    /** Check if this quaternion is empty, ie (0,0,0,1)
+     * @return true if empty, false otherwise
+     */
+    public boolean isEmpty()
+    {
+        if (w==1 && x==0 && y==0 && z==0)
+            return true;
+        return false;
+    }
+    
+    /** Check if this quaternion represents an identity
+     * matrix, for rotation.
+     * @return true if it is an identity rep., false otherwise
+     */
+    public boolean isIdentity()
+    {
+        if (w==0 && x==0 && y==0 && z==0)
+            return true;
+        return false;
+    }
+    
+    /** compute the quaternion from a 3x3 column matrix
+     * @param m 3x3 column matrix 
+     */
+    public void setFromMatrix(float[] m) {
+        float T= m[0] + m[4] + m[8] + 1;
+        if (T>0){
+            float S = 0.5f / (float)MathFloat.sqrt(T);
+            w = 0.25f / S;
+            x = ( m[5] - m[7]) * S;
+            y = ( m[6] - m[2]) * S;
+            z = ( m[1] - m[3] ) * S;
+        }
+        else{
+            if ((m[0] > m[4])&(m[0] > m[8])) { 
+                float S = MathFloat.sqrt( 1.0f + m[0] - m[4] - m[8] ) * 2f; // S=4*qx 
+                w = (m[7] - m[5]) / S;
+                x = 0.25f * S;
+                y = (m[3] + m[1]) / S; 
+                z = (m[6] + m[2]) / S; 
+            } 
+            else if (m[4] > m[8]) { 
+                float S = MathFloat.sqrt( 1.0f + m[4] - m[0] - m[8] ) * 2f; // S=4*qy
+                w = (m[6] - m[2]) / S;
+                x = (m[3] + m[1]) / S; 
+                y = 0.25f * S;
+                z = (m[7] + m[5]) / S; 
+            } 
+            else { 
+                float S = MathFloat.sqrt( 1.0f + m[8] - m[0] - m[4] ) * 2f; // S=4*qz
+                w = (m[3] - m[1]) / S;
+                x = (m[6] + m[2]) / S; 
+                y = (m[7] + m[5]) / S; 
+                z = 0.25f * S;
+            } 
+        }
+    }
+    
+    /** Check if the the 3x3 matrix (param) is in fact 
+     * an affine rotational matrix
+     * @param m 3x3 column matrix
+     * @return true if representing a rotational matrix, false otherwise
+     */
+    public boolean isRotationMatrix(float[] m) {
+        double epsilon = 0.01; // margin to allow for rounding errors
+        if (MathFloat.abs(m[0]*m[3] + m[3]*m[4] + m[6]*m[7]) > epsilon) return false;
+        if (MathFloat.abs(m[0]*m[2] + m[3]*m[5] + m[6]*m[8]) > epsilon) return false;
+        if (MathFloat.abs(m[1]*m[2] + m[4]*m[5] + m[7]*m[8]) > epsilon) return false;
+        if (MathFloat.abs(m[0]*m[0] + m[3]*m[3] + m[6]*m[6] - 1) > epsilon) return false;
+        if (MathFloat.abs(m[1]*m[1] + m[4]*m[4] + m[7]*m[7] - 1) > epsilon) return false;
+        if (MathFloat.abs(m[2]*m[2] + m[5]*m[5] + m[8]*m[8] - 1) > epsilon) return false;
+        return (MathFloat.abs(determinant(m)-1) < epsilon);
+    }
+    private float determinant(float[] m) {
+          return m[0]*m[4]*m[8] + m[3]*m[7]*m[2] + m[6]*m[1]*m[5] - m[0]*m[7]*m[5] - m[3]*m[1]*m[8] - m[6]*m[4]*m[2];
+    }
+}
diff --git a/src/jogl/classes/com/jogamp/graph/math/VectorUtil.java b/src/jogl/classes/com/jogamp/graph/math/VectorUtil.java
new file mode 100755
index 0000000..b1f2023
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/graph/math/VectorUtil.java
@@ -0,0 +1,433 @@
+/**
+ * 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.graph.math;
+
+import java.util.ArrayList;
+
+import jogamp.graph.math.MathFloat;
+
+import com.jogamp.graph.geom.Vertex;
+
+public class VectorUtil {
+
+    public enum Winding {
+        CW(-1), CCW(1);
+
+        public final int dir;
+
+        Winding(int dir) {
+            this.dir = dir;
+        }
+    } 
+
+    public static final int COLLINEAR = 0;
+
+    /** compute the dot product of two points
+     * @param vec1 vector 1
+     * @param vec2 vector 2
+     * @return the dot product as float
+     */
+    public static float dot(float[] vec1, float[] vec2)
+    {
+        return (vec1[0]*vec2[0] + vec1[1]*vec2[1] + vec1[2]*vec2[2]);
+    }
+    /** Normalize a vector
+     * @param vector input vector
+     * @return normalized vector
+     */
+    public static float[] normalize(float[] vector)
+    {
+        float[] newVector = new float[3];
+
+        float d = MathFloat.sqrt(vector[0]*vector[0] + vector[1]*vector[1] + vector[2]*vector[2]);
+        if(d> 0.0f)
+        {
+            newVector[0] = vector[0]/d;
+            newVector[1] = vector[1]/d;
+            newVector[2] = vector[2]/d;
+        }
+        return newVector;
+    }
+
+    /** Scales a vector by param
+     * @param vector input vector
+     * @param scale constant to scale by
+     * @return scaled vector
+     */
+    public static float[] scale(float[] vector, float scale)
+    {
+        float[] newVector = new float[3];
+
+        newVector[0] = vector[0]*scale;
+        newVector[1] = vector[1]*scale;
+        newVector[2] = vector[2]*scale;
+        return newVector;
+    }
+
+    /** Adds to vectors
+     * @param v1 vector 1
+     * @param v2 vector 2
+     * @return v1 + v2
+     */
+    public static float[] vectorAdd(float[] v1, float[] v2)
+    {
+        float[] newVector = new float[3];
+
+        newVector[0] = v1[0] + v2[0];
+        newVector[1] = v1[1] + v2[1];
+        newVector[2] = v1[2] + v2[2];
+        return newVector;
+    }
+
+    /** cross product vec1 x vec2
+     * @param vec1 vector 1
+     * @param vec2 vecttor 2
+     * @return the resulting vector
+     */
+    public static float[] cross(float[] vec1, float[] vec2)
+    {
+        float[] out = new float[3];
+
+        out[0] = vec2[2]*vec1[1] - vec2[1]*vec1[2];
+        out[1] = vec2[0]*vec1[2] - vec2[2]*vec1[0];
+        out[2] = vec2[1]*vec1[0] - vec2[0]*vec1[1];
+
+        return out;
+    }
+
+    /** Column Matrix Vector multiplication
+     * @param colMatrix column matrix (4x4)
+     * @param vec vector(x,y,z)
+     * @return result new float[3] 
+     */
+    public static float[] colMatrixVectorMult(float[] colMatrix, float[] vec)
+    {
+        float[] out = new float[3];
+
+        out[0] = vec[0]*colMatrix[0] + vec[1]*colMatrix[4] + vec[2]*colMatrix[8] + colMatrix[12]; 
+        out[1] = vec[0]*colMatrix[1] + vec[1]*colMatrix[5] + vec[2]*colMatrix[9] + colMatrix[13]; 
+        out[2] = vec[0]*colMatrix[2] + vec[1]*colMatrix[6] + vec[2]*colMatrix[10] + colMatrix[14]; 
+
+        return out;
+    }
+
+    /** Matrix Vector multiplication
+     * @param rawMatrix column matrix (4x4)
+     * @param vec vector(x,y,z)
+     * @return result new float[3] 
+     */
+    public static float[] rowMatrixVectorMult(float[] rawMatrix, float[] vec)
+    {
+        float[] out = new float[3];
+
+        out[0] = vec[0]*rawMatrix[0] + vec[1]*rawMatrix[1] + vec[2]*rawMatrix[2] + rawMatrix[3]; 
+        out[1] = vec[0]*rawMatrix[4] + vec[1]*rawMatrix[5] + vec[2]*rawMatrix[6] + rawMatrix[7]; 
+        out[2] = vec[0]*rawMatrix[8] + vec[1]*rawMatrix[9] + vec[2]*rawMatrix[10] + rawMatrix[11]; 
+
+        return out;
+    }
+
+    /** Calculate the midpoint of two values
+     * @param p1 first value
+     * @param p2 second vale
+     * @return midpoint
+     */
+    public static float mid(float p1, float p2)
+    {
+        return (p1+p2)/2.0f;
+    }
+    /** Calculate the midpoint of two points
+     * @param p1 first point
+     * @param p2 second point
+     * @return midpoint
+     */
+    public static float[] mid(float[] p1, float[] p2)
+    {
+        float[] midPoint = new float[3];
+        midPoint[0] = (p1[0] + p2[0])*0.5f;
+        midPoint[1] = (p1[1] + p2[1])*0.5f;
+        midPoint[2] = (p1[2] + p2[2])*0.5f;
+
+        return midPoint;
+    }
+    /** Compute the norm of a vector
+     * @param vec vector
+     * @return vorm
+     */
+    public static float norm(float[] vec)
+    {
+        return MathFloat.sqrt(vec[0]*vec[0] + vec[1]*vec[1] + vec[2]*vec[2]);
+    }
+    /** Compute distance between 2 points
+     * @param p0 a ref point on the line
+     * @param vec vector representing the direction of the line
+     * @param point the point to compute the relative distance of
+     * @return distance float
+     */
+    public static float computeLength(float[] p0, float[] point)
+    {
+        float[] w = new float[]{point[0]-p0[0],point[1]-p0[1],point[2]-p0[2]};
+
+        float distance = MathFloat.sqrt(w[0]*w[0] + w[1]*w[1] + w[2]*w[2]);
+
+        return distance;
+    }
+
+    /**Check equality of 2 vec3 vectors
+     * @param v1 vertex 1
+     * @param v2 vertex 2
+     * @return
+     */
+    public static boolean checkEquality(float[] v1, float[] v2)
+    {
+        if(Float.compare(v1[0], v2[0]) == 0 &&
+                Float.compare(v1[1], v2[1]) == 0 &&
+                Float.compare(v1[2], v2[2]) == 0 )
+            return true;
+        return false;
+    }
+
+    /**Check equality of 2 vec2 vectors
+     * @param v1 vertex 1
+     * @param v2 vertex 2
+     * @return
+     */
+    public static boolean checkEqualityVec2(float[] v1, float[] v2)
+    {
+        if(Float.compare(v1[0], v2[0]) == 0 && 
+                Float.compare(v1[1], v2[1]) == 0)
+            return true;
+        return false;
+    }
+
+    /** Compute the determinant of 3 vectors
+     * @param a vector 1
+     * @param b vector 2
+     * @param c vector 3
+     * @return the determinant value
+     */
+    public static float computeDeterminant(float[] a, float[] b, float[] c)
+    {
+        float area = a[0]*b[1]*c[2] + a[1]*b[2]*c[0] + a[2]*b[0]*c[1] - a[0]*b[2]*c[1] - a[1]*b[0]*c[2] - a[2]*b[1]*c[0];
+        return area;
+    }
+
+    /** Check if three vertices are colliniear
+     * @param v1 vertex 1
+     * @param v2 vertex 2
+     * @param v3 vertex 3
+     * @return true if collinear, false otherwise
+     */
+    public static boolean checkCollinear(float[] v1, float[] v2, float[] v3)
+    {
+        return (computeDeterminant(v1, v2, v3) == VectorUtil.COLLINEAR);
+    }
+
+    /** Compute Vector
+     * @param v1 vertex 1
+     * @param v2 vertex2 2
+     * @return Vector V1V2
+     */
+    public static float[] computeVector(float[] v1, float[] v2)
+    {
+        float[] vector = new float[3];
+        vector[0] = v2[0] - v1[0];
+        vector[1] = v2[1] - v1[1];
+        vector[2] = v2[2] - v1[2];
+        return vector;
+    }
+
+    /** Check if vertices in triangle circumcircle
+     * @param a triangle vertex 1
+     * @param b triangle vertex 2
+     * @param c triangle vertex 3
+     * @param d vertex in question
+     * @return true if the vertex d is inside the circle defined by the 
+     * vertices a, b, c. from paper by Guibas and Stolfi (1985).
+     */
+    public static boolean inCircle(Vertex a, Vertex b, Vertex c, Vertex d){
+        return (a.getX() * a.getX() + a.getY() * a.getY()) * triArea(b, c, d) -
+        (b.getX() * b.getX() + b.getY() * b.getY()) * triArea(a, c, d) +
+        (c.getX() * c.getX() + c.getY() * c.getY()) * triArea(a, b, d) -
+        (d.getX() * d.getX() + d.getY() * d.getY()) * triArea(a, b, c) > 0;
+    }
+
+    /** Computes oriented area of a triangle
+     * @param a first vertex
+     * @param b second vertex
+     * @param c third vertex
+     * @return compute twice the area of the oriented triangle (a,b,c), the area
+     * is positive if the triangle is oriented counterclockwise.
+     */
+    public static float triArea(Vertex a, Vertex b, Vertex c){
+        return (b.getX() - a.getX()) * (c.getY() - a.getY()) - (b.getY() - a.getY())*(c.getX() - a.getX());
+    }
+
+    /** Check if a vertex is in triangle using 
+     * barycentric coordinates computation. 
+     * @param a first triangle vertex
+     * @param b second triangle vertex
+     * @param c third triangle vertex
+     * @param p the vertex in question
+     * @return true if p is in triangle (a, b, c), false otherwise.
+     */
+    public static boolean vertexInTriangle(float[] a, float[]  b, float[]  c, float[]  p){
+        // Compute vectors        
+        float[] ac = computeVector(a, c); //v0
+        float[] ab = computeVector(a, b); //v1
+        float[] ap = computeVector(a, p); //v2
+
+        // Compute dot products
+        float dot00 = dot(ac, ac);
+        float dot01 = dot(ac, ab);
+        float dot02 = dot(ac, ap);
+        float dot11 = dot(ab, ab);
+        float dot12 = dot(ab, ap);
+
+        // Compute barycentric coordinates
+        float invDenom = 1 / (dot00 * dot11 - dot01 * dot01);
+        float u = (dot11 * dot02 - dot01 * dot12) * invDenom;
+        float v = (dot00 * dot12 - dot01 * dot02) * invDenom;
+
+        // Check if point is in triangle
+        return (u >= 0) && (v >= 0) && (u + v < 1);
+    }
+
+    /** Check if points are in ccw order
+     * @param a first vertex
+     * @param b second vertex
+     * @param c third vertex
+     * @return true if the points a,b,c are in a ccw order
+     */
+    public static boolean ccw(Vertex a, Vertex b, Vertex c){
+        return triArea(a,b,c) > 0;
+    }
+
+    /** Compute the winding of given points
+     * @param a first vertex
+     * @param b second vertex
+     * @param c third vertex
+     * @return Winding
+     */
+    public static Winding getWinding(Vertex a, Vertex b, Vertex c) {
+        return triArea(a,b,c) > 0 ? Winding.CCW : Winding.CW ;
+    }
+
+    /** Computes the area of a list of vertices to check if ccw
+     * @param vertices
+     * @return positive area if ccw else negative area value
+     */
+    public static float area(ArrayList<Vertex> vertices) {
+        int n = vertices.size();
+        float area = 0.0f;
+        for (int p = n - 1, q = 0; q < n; p = q++)
+        {
+            float[] pCoord = vertices.get(p).getCoord();
+            float[] qCoord = vertices.get(q).getCoord();
+            area += pCoord[0] * qCoord[1] - qCoord[0] * pCoord[1];
+        }
+        return area;
+    }
+
+    /** Compute the  general winding of the vertices
+     * @param vertices array of Vertices
+     * @return CCW or CW {@link Winding}
+     */
+    public static Winding getWinding(ArrayList<Vertex> vertices) {
+        return area(vertices) >= 0 ? Winding.CCW : Winding.CW ;
+    }
+
+
+    /** Compute intersection between two segments
+     * @param a vertex 1 of first segment
+     * @param b vertex 2 of first segment
+     * @param c vertex 1 of second segment
+     * @param d vertex 2 of second segment
+     * @return the intersection coordinates if the segments intersect, otherwise 
+     * returns null 
+     */
+    public static float[] seg2SegIntersection(Vertex a, Vertex b, Vertex c, Vertex d) {
+        float determinant = (a.getX()-b.getX())*(c.getY()-d.getY()) - (a.getY()-b.getY())*(c.getX()-d.getX());
+
+        if (determinant == 0) 
+            return null;
+
+        float alpha = (a.getX()*b.getY()-a.getY()*b.getX());
+        float beta = (c.getX()*d.getY()-c.getY()*d.getY());
+        float xi = ((c.getX()-d.getX())*alpha-(a.getX()-b.getX())*beta)/determinant;
+        float yi = ((c.getY()-d.getY())*alpha-(a.getY()-b.getY())*beta)/determinant;
+
+        float gamma = (xi - a.getX())/(b.getX() - a.getX());
+        float gamma1 = (xi - c.getX())/(d.getX() - c.getX());
+        if(gamma <= 0 || gamma >= 1) return null;
+        if(gamma1 <= 0 || gamma1 >= 1) return null;
+
+        return new float[]{xi,yi,0};
+    }
+
+    /** Compute intersection between two lines
+     * @param a vertex 1 of first line
+     * @param b vertex 2 of first line
+     * @param c vertex 1 of second line
+     * @param d vertex 2 of second line
+     * @return the intersection coordinates if the lines intersect, otherwise 
+     * returns null 
+     */
+    public static float[] line2lineIntersection(Vertex a, Vertex b, Vertex c, Vertex d) {
+        float determinant = (a.getX()-b.getX())*(c.getY()-d.getY()) - (a.getY()-b.getY())*(c.getX()-d.getX());
+
+        if (determinant == 0) 
+            return null;
+
+        float alpha = (a.getX()*b.getY()-a.getY()*b.getX());
+        float beta = (c.getX()*d.getY()-c.getY()*d.getY());
+        float xi = ((c.getX()-d.getX())*alpha-(a.getX()-b.getX())*beta)/determinant;
+        float yi = ((c.getY()-d.getY())*alpha-(a.getY()-b.getY())*beta)/determinant;
+
+        return new float[]{xi,yi,0};
+    }
+
+    /** Check if a segment intersects with a triangle
+     * @param a vertex 1 of the triangle
+     * @param b vertex 2 of the triangle
+     * @param c vertex 3 of the triangle
+     * @param d vertex 1 of first segment
+     * @param e vertex 2 of first segment
+     * @return true if the segment intersects at least one segment of the triangle, false otherwise
+     */
+    public static boolean tri2SegIntersection(Vertex a, Vertex b, Vertex c, Vertex d, Vertex e){
+        if(seg2SegIntersection(a, b, d, e) != null)
+            return true;
+        if(seg2SegIntersection(b, c, d, e) != null)
+            return true;
+        if(seg2SegIntersection(a, c, d, e) != null)
+            return true;
+
+        return false;
+    }
+}
diff --git a/src/jogl/classes/com/jogamp/graph/package.html b/src/jogl/classes/com/jogamp/graph/package.html
new file mode 100644
index 0000000..f696020
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/graph/package.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+  <title>Public Graph Utility Package</title>
+</head>
+  <body>
+   
+<h2>Public <i>Graph</i> Utility Package</h2>
+   
+<h3>Disclaimer</h3>
+  <p>
+  The API of the namespace <i>com.jogamp.graph.**</i> 
+  is experimental and subject to change until further notice.
+  </p>
+  <p>
+  It's implementation <i>jogamp.graph.**</i> may change at any time
+  as it is natural with all other API implementations.
+  </p>
+  <p>
+  We are currently refining and completing this new API and it's implementation.
+  Feel free to comment and help using our public channels.
+  </p>
+<h3>Revision History<br>
+  </h3>
+   
+<ul>
+<li> Early Draft Review, April 1st 2011</li>
+</ul>
+  <br>
+  <br>
+ <br>
+</body>
+</html>
diff --git a/src/jogl/classes/com/jogamp/opengl/JoglVersion.java b/src/jogl/classes/com/jogamp/opengl/JoglVersion.java
index 34108bc..d162f2b 100644
--- a/src/jogl/classes/com/jogamp/opengl/JoglVersion.java
+++ b/src/jogl/classes/com/jogamp/opengl/JoglVersion.java
@@ -101,6 +101,8 @@ public class JoglVersion extends JogampVersion {
         sb.append(Platform.getNewline());
         sb.append("              ").append(ctx.getPlatformExtensionsString());
         sb.append(Platform.getNewline());
+        sb.append("GLSL          ").append(gl.hasGLSL()).append(", shader-compiler: ").append(gl.isFunctionAvailable("glCompileShader"));
+        sb.append(Platform.getNewline());
         sb.append(VersionUtil.SEPERATOR);
 
         return sb;
@@ -109,7 +111,7 @@ public class JoglVersion extends JogampVersion {
     public static void main(String args[]) {
         System.err.println(VersionUtil.getPlatformInfo());
         System.err.println(GlueGenVersion.getInstance());
-        System.err.println(NativeWindowVersion.getInstance());
+        // System.err.println(NativeWindowVersion.getInstance());
         System.err.println(JoglVersion.getInstance());
     }
 }
diff --git a/src/jogl/classes/com/jogamp/opengl/cg/CgDynamicLibraryBundleInfo.java b/src/jogl/classes/com/jogamp/opengl/cg/CgDynamicLibraryBundleInfo.java
index 5655d1a..9e4d768 100644
--- a/src/jogl/classes/com/jogamp/opengl/cg/CgDynamicLibraryBundleInfo.java
+++ b/src/jogl/classes/com/jogamp/opengl/cg/CgDynamicLibraryBundleInfo.java
@@ -32,9 +32,9 @@ import com.jogamp.common.os.DynamicLibraryBundleInfo;
 import java.util.*;
 
 public class CgDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo {
-    private static List/*<String>*/ glueLibNames;
+    private static List<String> glueLibNames;
     static {
-        glueLibNames = new ArrayList();
+        glueLibNames = new ArrayList<String>();
         // glueLibNames.addAll(getGlueLibNamesPreload());
         glueLibNames.add("jogl_cg");
     }
@@ -54,25 +54,33 @@ public class CgDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo {
     public boolean shallLookupGlobal() { return false; }
 
     /** Tool has none **/
-    public final List getToolGetProcAddressFuncNameList() {
+    public final List<String> getToolGetProcAddressFuncNameList() {
         return null;
     }
 
     /** Tool has none **/
-    public final long toolDynamicLookupFunction(long toolGetProcAddressHandle, String funcName) {
+    public final long toolGetProcAddress(long toolGetProcAddressHandle, String funcName) {
         return 0;
     }
+    
+    public boolean useToolGetProcAdressFirst(String funcName) {
+        return false;
+    }
 
-    public List/*<List<String>>*/ getToolLibNames() {
-        List/*<List>*/ libNamesList = new ArrayList();
-
-        libNamesList.add("Cg");
-        libNamesList.add("CgGL");
+    public List<List<String>> getToolLibNames() {
+        final List<List<String>> libsList = new ArrayList<List<String>>();
+        final List<String> libsCg = new ArrayList<String>();
+        libsCg.add("Cg");
+        libsList.add(libsCg);
+        
+        final List<String> libsCgGL = new ArrayList<String>();
+        libsCgGL.add("CgGL");
+        libsList.add(libsCgGL);
 
-        return libNamesList;
+        return libsList;
     }
 
-    public final List/*<String>*/ getGlueLibNames() {
+    public final List<String> getGlueLibNames() {
         return glueLibNames;
     }
 }
diff --git a/src/jogl/classes/com/jogamp/opengl/util/AWTAnimatorImpl.java b/src/jogl/classes/com/jogamp/opengl/util/AWTAnimatorImpl.java
index 9c77a05..93b75e7 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/AWTAnimatorImpl.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/AWTAnimatorImpl.java
@@ -54,21 +54,21 @@ import javax.media.opengl.GLAutoDrawable;
 class AWTAnimatorImpl implements AnimatorBase.AnimatorImpl {
     // For efficient rendering of Swing components, in particular when
     // they overlap one another
-    private List lightweights    = new ArrayList();
-    private Map  repaintManagers = new IdentityHashMap();
-    private Map  dirtyRegions    = new IdentityHashMap();
+    private List<JComponent> lightweights    = new ArrayList<JComponent>();
+    private Map<RepaintManager,RepaintManager> repaintManagers = new IdentityHashMap<RepaintManager,RepaintManager>();
+    private Map<JComponent,Rectangle>  dirtyRegions    = new IdentityHashMap<JComponent,Rectangle>();
 
-    public void display(ArrayList drawables,
+    public void display(ArrayList<GLAutoDrawable> drawables,
                         boolean ignoreExceptions,
                         boolean printExceptions) {
         for (int i=0; i<drawables.size(); i++) {
-            GLAutoDrawable drawable = (GLAutoDrawable) drawables.get(i);
+            GLAutoDrawable drawable = drawables.get(i);
             if (drawable instanceof JComponent) {
                 // Lightweight components need a more efficient drawing
                 // scheme than simply forcing repainting of each one in
                 // turn since drawing one can force another one to be
                 // drawn in turn
-                lightweights.add(drawable);
+                lightweights.add((JComponent)drawable);
             } else {
                 try {
                     drawable.display();
@@ -98,8 +98,8 @@ class AWTAnimatorImpl implements AnimatorBase.AnimatorImpl {
     // the Swing widgets we're animating
     private Runnable drawWithRepaintManagerRunnable = new Runnable() {
             public void run() {
-                for (Iterator iter = lightweights.iterator(); iter.hasNext(); ) {
-                    JComponent comp = (JComponent) iter.next();
+                for (Iterator<JComponent> iter = lightweights.iterator(); iter.hasNext(); ) {
+                    JComponent comp = iter.next();
                     RepaintManager rm = RepaintManager.currentManager(comp);
                     rm.markCompletelyDirty(comp);
                     repaintManagers.put(rm, rm);
@@ -148,16 +148,16 @@ class AWTAnimatorImpl implements AnimatorBase.AnimatorImpl {
                 }
 
                 // Dirty any needed regions on non-optimizable components
-                for (Iterator iter = dirtyRegions.keySet().iterator(); iter.hasNext(); ) {
-                    JComponent comp = (JComponent) iter.next();
-                    Rectangle  rect = (Rectangle) dirtyRegions.get(comp);
+                for (Iterator<JComponent> iter = dirtyRegions.keySet().iterator(); iter.hasNext(); ) {
+                    JComponent comp = iter.next();
+                    Rectangle  rect = dirtyRegions.get(comp);
                     RepaintManager rm = RepaintManager.currentManager(comp);
                     rm.addDirtyRegion(comp, rect.x, rect.y, rect.width, rect.height);
                 }
 
                 // Draw all dirty regions
-                for (Iterator iter = repaintManagers.keySet().iterator(); iter.hasNext(); ) {
-                    ((RepaintManager) iter.next()).paintDirtyRegions();
+                for (Iterator<RepaintManager> iter = repaintManagers.keySet().iterator(); iter.hasNext(); ) {
+                    iter.next().paintDirtyRegions();
                 }
                 dirtyRegions.clear();
                 repaintManagers.clear();
diff --git a/src/jogl/classes/com/jogamp/opengl/util/Animator.java b/src/jogl/classes/com/jogamp/opengl/util/Animator.java
index 4fbd0e4..16aac95 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/Animator.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/Animator.java
@@ -114,7 +114,7 @@ public class Animator extends AnimatorBase {
         }
     }
 
-    private void setIsAnimatingSynced(boolean v) {
+    private final void setIsAnimatingSynced(boolean v) {
         stateSync.lock();
         try {
             isAnimating = v;
@@ -125,7 +125,7 @@ public class Animator extends AnimatorBase {
 
     class MainLoop implements Runnable {
         public String toString() {
-            return "[started "+isStartedImpl()+", animating "+isAnimatingImpl()+", paused "+isPausedImpl()+", frames "+getTotalFrames()+", drawable "+drawables.size()+"]";
+            return "[started "+isStartedImpl()+", animating "+isAnimatingImpl()+", paused "+isPausedImpl()+", drawable "+drawables.size()+"]";
         }
 
         public void run() {
@@ -134,11 +134,7 @@ public class Animator extends AnimatorBase {
                     if(DEBUG) {
                         System.err.println("Animator start:" + Thread.currentThread() + ": " + toString());
                     }
-
-                    startTime = System.currentTimeMillis();
-                    curTime   = startTime;
-                    totalFrames = 0;
-
+                    fpsCounter.resetFPSCounter();
                     animThread = Thread.currentThread();
                     setIsAnimatingSynced(false); // barrier
                     Animator.this.notifyAll();
@@ -161,9 +157,7 @@ public class Animator extends AnimatorBase {
 
                             if (wasPaused) {
                                 // resume from pause -> reset counter
-                                startTime = System.currentTimeMillis();
-                                curTime = startTime;
-                                totalFrames = 0;
+                                fpsCounter.resetFPSCounter();
                                 if (DEBUG) {
                                     System.err.println("Animator resume:" + Thread.currentThread() + ": " + toString());
                                 }
@@ -269,7 +263,7 @@ public class Animator extends AnimatorBase {
         if (runnable == null) {
             runnable = new MainLoop();
         }
-        resetCounter();
+        fpsCounter.resetFPSCounter();
         String threadName = Thread.currentThread().getName()+"-"+baseName;
         Thread thread;
         if(null==threadGroup) {
diff --git a/src/jogl/classes/com/jogamp/opengl/util/AnimatorBase.java b/src/jogl/classes/com/jogamp/opengl/util/AnimatorBase.java
index 01c2ea6..e84a9bf 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/AnimatorBase.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/AnimatorBase.java
@@ -28,9 +28,14 @@
 
 package com.jogamp.opengl.util;
 
+import com.jogamp.common.util.locks.LockFactory;
 import com.jogamp.common.util.locks.RecursiveLock;
 import jogamp.opengl.Debug;
+import jogamp.opengl.FPSCounterImpl;
+
+import java.io.PrintStream;
 import java.util.ArrayList;
+
 import javax.media.opengl.GLAnimatorControl;
 import javax.media.opengl.GLAutoDrawable;
 import javax.media.opengl.GLProfile;
@@ -50,21 +55,19 @@ public abstract class AnimatorBase implements GLAnimatorControl {
     private static int animatorCount = 0;
 
     public interface AnimatorImpl {
-        void display(ArrayList drawables, boolean ignoreExceptions, boolean printExceptions);
+        void display(ArrayList<GLAutoDrawable> drawables, boolean ignoreExceptions, boolean printExceptions);
         boolean skipWaitForCompletion(Thread thread);
     }
 
-    protected ArrayList/*<GLAutoDrawable>*/ drawables = new ArrayList();
+    protected ArrayList<GLAutoDrawable> drawables = new ArrayList<GLAutoDrawable>();
     protected boolean drawablesEmpty;
     protected AnimatorImpl impl;
     protected String baseName;
     protected Thread animThread;
     protected boolean ignoreExceptions;
     protected boolean printExceptions;
-    protected long startTime;
-    protected long curTime;
-    protected int  totalFrames;
-    protected RecursiveLock stateSync = new RecursiveLock();
+    protected FPSCounterImpl fpsCounter = new FPSCounterImpl();    
+    protected RecursiveLock stateSync = LockFactory.createRecursiveLock();
 
     /** Creates a new, empty Animator. */
     public AnimatorBase() {
@@ -83,7 +86,6 @@ public abstract class AnimatorBase implements GLAnimatorControl {
             baseName = baseName.concat("-"+animatorCount);
             drawablesEmpty = true;
         }
-        resetCounter();
     }
 
     protected abstract String getBaseName(String prefix);
@@ -138,25 +140,48 @@ public abstract class AnimatorBase implements GLAnimatorControl {
         lightweight widgets are continually being redrawn. */
     protected void display() {
         impl.display(drawables, ignoreExceptions, printExceptions);
-        curTime = System.currentTimeMillis();
-        totalFrames++;
+        fpsCounter.tickFPS();
+    }
+
+    public final void setUpdateFPSFrames(int frames, PrintStream out) {
+        fpsCounter.setUpdateFPSFrames(frames, out);
+    }
+    
+    public final void resetFPSCounter() {
+        fpsCounter.resetFPSCounter();
     }
 
-    public long getCurrentTime() {
-        return curTime;
+    public final int getUpdateFPSFrames() {
+        return fpsCounter.getUpdateFPSFrames();
+    }
+    
+    public final long getFPSStartTime()   {
+        return fpsCounter.getFPSStartTime();
     }
 
-    public long getDuration() {
-        return curTime - startTime;
+    public final long getLastFPSUpdateTime() {
+        return fpsCounter.getLastFPSUpdateTime();
     }
 
-    public long getStartTime() {
-        return startTime;
+    public final long getLastFPSPeriod() {
+        return fpsCounter.getLastFPSPeriod();
+    }
+    
+    public final float getLastFPS() {
+        return fpsCounter.getLastFPS();
+    }
+    
+    public final int getTotalFPSFrames() {
+        return fpsCounter.getTotalFPSFrames();
     }
 
-    public int getTotalFrames() {
-        return totalFrames;
+    public final long getTotalFPSDuration() {
+        return fpsCounter.getTotalFPSDuration();
     }
+    
+    public final float getTotalFPS() {
+        return fpsCounter.getTotalFPS();
+    }        
 
     public final Thread getThread() {
         stateSync.lock();
@@ -167,12 +192,6 @@ public abstract class AnimatorBase implements GLAnimatorControl {
         }
     }
 
-    public synchronized void resetCounter() {
-        startTime = System.currentTimeMillis(); // overwrite startTime to real init one
-        curTime   = startTime;
-        totalFrames = 0;
-    }
-
     /** Sets a flag causing this Animator to ignore exceptions produced
     while redrawing the drawables. By default this flag is set to
     false, causing any exception thrown to halt the Animator. */
@@ -189,6 +208,6 @@ public abstract class AnimatorBase implements GLAnimatorControl {
     }
 
     public String toString() {
-        return getClass().getName()+"[started "+isStarted()+", animating "+isAnimating()+", paused "+isPaused()+", frames "+getTotalFrames()+", drawable "+drawables.size()+"]";
+        return getClass().getName()+"[started "+isStarted()+", animating "+isAnimating()+", paused "+isPaused()+", drawable "+drawables.size()+"]";
     }
 }
diff --git a/src/jogl/classes/com/jogamp/opengl/util/DefaultAnimatorImpl.java b/src/jogl/classes/com/jogamp/opengl/util/DefaultAnimatorImpl.java
index d3f9cde..bad268f 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/DefaultAnimatorImpl.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/DefaultAnimatorImpl.java
@@ -41,11 +41,11 @@ import javax.media.opengl.GLAutoDrawable;
     up this behavior if desired. */
 
 class DefaultAnimatorImpl implements AnimatorBase.AnimatorImpl {
-    public void display(ArrayList drawables,
+    public void display(ArrayList<GLAutoDrawable> drawables,
                         boolean ignoreExceptions,
                         boolean printExceptions) {
         for (int i=0; i<drawables.size(); i++) {
-            GLAutoDrawable drawable = (GLAutoDrawable) drawables.get(i);
+            GLAutoDrawable drawable = drawables.get(i);
             try {
                 drawable.display();
             } catch (RuntimeException e) {
diff --git a/src/jogl/classes/com/jogamp/opengl/util/FBObject.java b/src/jogl/classes/com/jogamp/opengl/util/FBObject.java
index 4920ed5..0b60941 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/FBObject.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/FBObject.java
@@ -1,5 +1,6 @@
 /*
  * 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
@@ -36,22 +37,36 @@ package com.jogamp.opengl.util;
 import javax.media.opengl.*;
 
 public class FBObject {
-    private int width, height, attr;
-    private int fb, fbo_tex, depth_rb, stencil_rb, vStatus;
-    private int texInternalFormat, texDataFormat, texDataType;
-
-    public static final int ATTR_DEPTH   = 1 << 0;
-    public static final int ATTR_STENCIL = 1 << 1;
-
-    public FBObject(int width, int height, int attributes) {
+    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.attr = attributes;
+        this.fb = 0;
+        this.depth_rb = 0;
+        this.stencil_rb = 0;
+        this.bound = false;
     }        
-
-
-    public boolean validateStatus(GL gl) {
-        vStatus = getStatus(gl, fb);
+    
+    /**
+     * @return true if the FB status is valid, otherwise false
+     * @see #getStatus()
+     */
+    public boolean isStatusValid() {
         switch(vStatus) {
             case GL.GL_FRAMEBUFFER_COMPLETE:
                 return true;
@@ -65,56 +80,136 @@ public class FBObject {
             //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;
         }
     }
-
-    public static int getStatus(GL gl, int fb) {
-        if(!gl.glIsFramebuffer(fb)) {
-            return -1;
-        }
-        return gl.glCheckFramebufferStatus(gl.GL_FRAMEBUFFER);
-        //return gl.glCheckFramebufferStatus(fb);
+        
+    /** 
+     * @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 String getStatusString(int fbStatus) {
+    
+    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_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");
+                return("GL FBO: incomplete, missing attachment");
             case GL.GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS:
-                return("GL FBO: incomplete,attached images must have same 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");
-                 /*
+                 return("GL FBO: incomplete, attached images must have same format");
             case GL2.GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER:
-                return("GL FBO: incomplete,missing 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_DUPLICATE_ATTACHMENT:
-                return("GL FBO: incomplete, duplicate attachment");
-                */
+                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");
+        }
 
-    public void init(GL gl) {
-        int textureInternalFormat, textureDataFormat, textureDataType;
+        // 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.isGL2()) { 
             textureInternalFormat=GL.GL_RGBA8;
             textureDataFormat=GL2.GL_BGRA;
@@ -128,91 +223,158 @@ public class FBObject {
             textureDataFormat=GL.GL_RGB;
             textureDataType=GL.GL_UNSIGNED_BYTE;
         }
-        init(gl, textureInternalFormat, textureDataFormat, textureDataType);
+        return attachTexture2D(gl, texUnit, textureInternalFormat, textureDataFormat, textureDataType, magFilter, minFilter, wrapS, wrapT);
     }
-
-    public void init(GL gl, int textureInternalFormat, int textureDataFormat, int textureDataType) {
-        texInternalFormat=textureInternalFormat; 
-        texDataFormat=textureDataFormat;
-        texDataType=textureDataType;
-
-        // generate fbo ..
-        int name[] = new int[1];
-
-        gl.glGenFramebuffers(1, name, 0);
-        fb = name[0];
-        System.out.println("fb: "+fb);
-
-        gl.glGenTextures(1, name, 0);
-        fbo_tex = name[0];
-        System.out.println("fbo_tex: "+fbo_tex);
-
-        if(0!=(attr&ATTR_DEPTH)) {
-            gl.glGenRenderbuffers(1, name, 0);
-            depth_rb = name[0];
-            System.out.println("depth_rb: "+depth_rb);
-        } else {
-            depth_rb = 0;
+    
+    /**
+     * 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");
         }
-        if(0!=(attr&ATTR_STENCIL)) {
-            gl.glGenRenderbuffers(1, name, 0);
-            stencil_rb = name[0];
-            System.out.println("stencil_rb: "+stencil_rb);
-        } else {
-            stencil_rb = 0;
+        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);
+        checkNoError(gl, gl.glGetError(), "FBObject Init.texImage2D");  // throws GLException if error        
+        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);            
         }
-
-        // bind fbo ..
-        gl.glBindFramebuffer(GL.GL_FRAMEBUFFER, fb);
-
-        gl.glBindTexture(GL.GL_TEXTURE_2D, fbo_tex);
-        gl.glTexImage2D(GL.GL_TEXTURE_2D, 0, texInternalFormat, width, height, 0,
-                        texDataFormat, texDataType, null);
-        gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MAG_FILTER, GL.GL_NEAREST);
-        gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MIN_FILTER, GL.GL_NEAREST);
-        //gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_S, GL2.GL_CLAMP);
-        //gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_T, GL2.GL_CLAMP);
-
 
         // Set up the color buffer for use as a renderable texture:
         gl.glFramebufferTexture2D(GL.GL_FRAMEBUFFER,
-                                  GL.GL_COLOR_ATTACHMENT0,
-                                  GL.GL_TEXTURE_2D, fbo_tex, 0); 
+                                  GL.GL_COLOR_ATTACHMENT0 + colorattachment_num++,
+                                  GL.GL_TEXTURE_2D, fbo_tex_names[fbo_tex_idx], 0); 
 
-        if(depth_rb!=0) {
-            // Initialize the depth buffer:
-            gl.glBindRenderbuffer(GL.GL_RENDERBUFFER, depth_rb);
-            gl.glRenderbufferStorage(GL.GL_RENDERBUFFER,
-                                        GL.GL_DEPTH_COMPONENT16, 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() ? 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");
         }
-
-        if(stencil_rb!=0) {
-            // Initialize the stencil buffer:
-            gl.glBindRenderbuffer(GL.GL_RENDERBUFFER, stencil_rb);
-            gl.glRenderbufferStorage(GL.GL_RENDERBUFFER,
-                                        GL.GL_STENCIL_INDEX8, width, height);
-            gl.glFramebufferRenderbuffer(GL.GL_FRAMEBUFFER,
-                                            GL.GL_STENCIL_ATTACHMENT,
-                                            GL.GL_RENDERBUFFER, stencil_rb);
+        // 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;            
         }
-
-        // Check the FBO for completeness
-        if(validateStatus(gl)) {
-            System.out.println("Framebuffer " + fb + " is complete");
-        } else {
-            System.out.println("Framebuffer " + fb + " is incomplete: status = 0x" + Integer.toHexString(vStatus) + 
-                               " : " + getStatusString());
+        
+        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+")");
         }
-
-        unbind(gl);
+        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) {
-        unbind(gl);
+        if(bound) {
+            unbind(gl);
+        }
 
         int name[] = new int[1];
 
@@ -226,38 +388,89 @@ public class FBObject {
             gl.glDeleteRenderbuffers(1, name, 0);
             depth_rb=0;
         }
-        if(0!=fbo_tex) {
-            name[0] = fbo_tex;
-            gl.glDeleteTextures(1, name, 0);
-            fbo_tex = 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) {
-        gl.glBindTexture(GL.GL_TEXTURE_2D, fbo_tex);
-        gl.glBindFramebuffer(GL.GL_FRAMEBUFFER, fb); 
+        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) {
-        gl.glBindTexture(GL.GL_TEXTURE_2D, 0);
+        checkBound(gl, true);
         gl.glBindFramebuffer(GL.GL_FRAMEBUFFER, 0);
+        bound = false;
     }
 
-    public void use(GL gl) {
-        gl.glBindTexture(GL.GL_TEXTURE_2D, 0);
-        gl.glBindFramebuffer(GL.GL_FRAMEBUFFER, 0);
-        gl.glBindTexture(GL.GL_TEXTURE_2D, fbo_tex); // to use it ..
+    /** 
+     * 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 ..
     }
 
-    public int getFBName() {
-        return fb;
+    /** 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 int getTextureName() {
-        return fbo_tex;
+    
+    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/FPSAnimator.java b/src/jogl/classes/com/jogamp/opengl/util/FPSAnimator.java
index 741d446..f7fc581 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/FPSAnimator.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/FPSAnimator.java
@@ -116,6 +116,9 @@ public class FPSAnimator extends AnimatorBase {
     }
 
     private void startTask() {
+        if(null != task) {
+            return;
+        }
         long delay = (long) (1000.0f / (float) fps);
         task = new TimerTask() {
             public void run() {
@@ -127,7 +130,7 @@ public class FPSAnimator extends AnimatorBase {
             }
         };
 
-        resetCounter();
+        fpsCounter.resetFPSCounter();
         shouldRun = true;
 
         if (scheduleAtFixedRate) {
@@ -161,11 +164,18 @@ public class FPSAnimator extends AnimatorBase {
         stateSync.lock();
         try {
             shouldRun = false;
-            task.cancel();
-            task = null;
-            timer.cancel();
-            timer = null;
+            if(null != task) {
+                task.cancel();
+                task = null;
+            }
+            if(null != timer) {
+                timer.cancel();
+                timer = null;
+            }
             animThread = null;
+            try {
+                Thread.sleep(20); // ~ 1/60 hz wait, since we can't ctrl stopped threads
+            } catch (InterruptedException e) { }
         } finally {
             stateSync.unlock();
         }
@@ -179,9 +189,14 @@ public class FPSAnimator extends AnimatorBase {
         stateSync.lock();
         try {
             shouldRun = false;
-            task.cancel();
-            task = null;
+            if(null != task) {
+                task.cancel();
+                task = null;
+            }
             animThread = null;
+            try {
+                Thread.sleep(20); // ~ 1/60 hz wait, since we can't ctrl stopped threads
+            } catch (InterruptedException e) { }
         } finally {
             stateSync.unlock();
         }
diff --git a/src/jogl/classes/com/jogamp/opengl/util/FileUtil.java b/src/jogl/classes/com/jogamp/opengl/util/FileUtil.java
deleted file mode 100644
index 6ad0da8..0000000
--- a/src/jogl/classes/com/jogamp/opengl/util/FileUtil.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright (c) 2005 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 com.jogamp.opengl.util;
-
-import java.io.*;
-
-/** Utilities for dealing with files. */
-
-public class FileUtil {
-    private FileUtil() {}
-
-    /**
-     * Returns the lowercase suffix of the given file name (the text
-     * after the last '.' in the file name). Returns null if the file
-     * name has no suffix. Only operates on the given file name;
-     * performs no I/O operations.
-     *
-     * @param file name of the file
-     * @return lowercase suffix of the file name
-     * @throws NullPointerException if file is null
-     */
-
-    public static String getFileSuffix(File file) {
-        return getFileSuffix(file.getName());
-    }
-
-    /**
-     * Returns the lowercase suffix of the given file name (the text
-     * after the last '.' in the file name). Returns null if the file
-     * name has no suffix. Only operates on the given file name;
-     * performs no I/O operations.
-     *
-     * @param filename name of the file
-     * @return lowercase suffix of the file name
-     * @throws NullPointerException if filename is null
-     */
-    public static String getFileSuffix(String filename) {
-        int lastDot = filename.lastIndexOf('.');
-        if (lastDot < 0) {
-            return null;
-        }
-        return toLowerCase(filename.substring(lastDot + 1));
-    }
-
-    private static String toLowerCase(String arg) {
-        if (arg == null) {
-            return null;
-        }
-
-        return arg.toLowerCase();
-    }
-}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataClient.java b/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataClient.java
index 4586d1d..99500ad 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataClient.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataClient.java
@@ -1,92 +1,122 @@
 
 package com.jogamp.opengl.util;
 
-import com.jogamp.common.nio.Buffers;
-import java.security.*;
+import java.nio.Buffer;
+import java.nio.ByteBuffer;
+import java.nio.FloatBuffer;
+import java.nio.IntBuffer;
+import java.nio.ShortBuffer;
 
-import javax.media.opengl.*;
+import javax.media.opengl.GL;
+import javax.media.opengl.GLException;
+import javax.media.opengl.fixedfunc.GLPointerFuncUtil;
 
-import com.jogamp.opengl.util.glsl.*;
+import jogamp.opengl.util.GLArrayHandler;
+import jogamp.opengl.util.GLFixedArrayHandler;
+import jogamp.opengl.util.glsl.GLSLArrayHandler;
 
-import jogamp.opengl.SystemUtil;
+import com.jogamp.common.nio.Buffers;
+import com.jogamp.opengl.util.glsl.ShaderState;
 
-import java.nio.*;
 
 public class GLArrayDataClient extends GLArrayDataWrapper implements GLArrayDataEditable {
 
   /**
-   * The OpenGL ES emulation on the PC probably has a buggy VBO implementation,
-   * where we have to 'refresh' the VertexPointer or VertexAttribArray after each
-   * BindBuffer !
+   * Create a client side buffer object, using a predefined fixed function array index
+   * and starting with a new created Buffer object with initialSize size
    *
-   * This should not be necessary on proper native implementations.
-   */
-  public static final boolean hasVBOBug = AccessController.doPrivileged(new PrivilegedAction() {
-          public Object run() {
-              return SystemUtil.getenv("JOGL_VBO_BUG");
-          }
-      }) != null;
-
-  /**
+   * On profiles GL2 and ES1 the fixed function pipeline behavior is as expected.
+   * On profile ES2 the fixed function emulation will transform these calls to 
+   * EnableVertexAttribArray and VertexAttribPointer calls,
+   * and a predefined vertex attribute variable name will be chosen.
+   * 
+   * The default name mapping will be used, 
+   * see {@link GLPointerFuncUtil#getPredefinedArrayIndexName(int)}.
+   *              
    * @param index The GL array index
-   * @param name  The optional custom name for the GL array index, maybe null.
-   *            If null, the default name mapping will be used, see 'getPredefinedArrayIndexName(int)'.
-   *            This name might be used as the shader attribute name.
    * @param comps The array component number
    * @param dataType The array index GL data type
-   * @param normalized Wheather the data shall be normalized
+   * @param normalized Whether the data shall be normalized
+   * @param initialSize
    *
    * @see javax.media.opengl.GLContext#getPredefinedArrayIndexName(int)
-   */
-  public static GLArrayDataClient createFixed(GL gl, int index, String name, int comps, int dataType, boolean normalized, 
-                                              int initialSize)
+   */  
+  public static GLArrayDataClient createFixed(int index, int comps, int dataType, boolean normalized, int initialSize)
     throws GLException
   {
-      gl.getGLProfile().isValidArrayDataType(index, comps, dataType, false, true);
       GLArrayDataClient adc = new GLArrayDataClient();
       GLArrayHandler glArrayHandler = new GLFixedArrayHandler(adc);
-      adc.init(name, index, comps, dataType, normalized, 0, null, initialSize, false, glArrayHandler, 0, 0);
+      adc.init(null, index, comps, dataType, normalized, 0, null, initialSize, false, glArrayHandler, 0, 0, 0, 0, false);
       return adc;
   }
 
-  public static GLArrayDataClient createFixed(GL gl, int index, String name, int comps, int dataType, boolean normalized, 
-                                              int stride, Buffer buffer)
+  /**
+   * Create a client side buffer object, using a predefined fixed function array index
+   * and starting with a given Buffer object incl it's stride
+   *
+   * On profiles GL2 and ES1 the fixed function pipeline behavior is as expected.
+   * On profile ES2 the fixed function emulation will transform these calls to 
+   * EnableVertexAttribArray and VertexAttribPointer calls,
+   * and a predefined vertex attribute variable name will be chosen.
+   * 
+   * The default name mapping will be used, 
+   * see {@link GLPointerFuncUtil#getPredefinedArrayIndexName(int)}.
+   *              
+   * @param index The GL array index
+   * @param comps The array component number
+   * @param dataType The array index GL data type
+   * @param normalized Whether the data shall be normalized
+   * @param stride
+   * @param buffer the user define data
+   *
+   * @see javax.media.opengl.GLContext#getPredefinedArrayIndexName(int)
+   */  
+  public static GLArrayDataClient createFixed(int index, int comps, int dataType, boolean normalized, int stride, 
+                                              Buffer buffer)
     throws GLException
   {
-      gl.getGLProfile().isValidArrayDataType(index, comps, dataType, false, true);
       GLArrayDataClient adc = new GLArrayDataClient();
       GLArrayHandler glArrayHandler = new GLFixedArrayHandler(adc);
-      adc.init(name, index, comps, dataType, normalized, stride, buffer, comps*comps, false, glArrayHandler, 0, 0);
+      adc.init(null, index, comps, dataType, normalized, stride, buffer, comps*comps, false, glArrayHandler, 0, 0, 0, 0, false);
       return adc;
   }
 
-  public static GLArrayDataClient createGLSL(GL gl, String name, int comps, int dataType, boolean normalized, 
-                                             int initialSize)
+  /**
+   * Create a client side buffer object, using a custom GLSL array attribute name
+   * and starting with a new created Buffer object with initialSize size
+   * @param name  The custom name for the GL attribute. 
+   * @param comps The array component number
+   * @param dataType The array index GL data type
+   * @param normalized Whether the data shall be normalized
+   * @param initialSize
+   */
+  public static GLArrayDataClient createGLSL(String name, int comps, 
+                                             int dataType, boolean normalized, int initialSize)
     throws GLException
   {
-      if(!gl.hasGLSL()) {
-        throw new GLException("GLArrayDataClient.GLSL not supported: "+gl);
-      }
-      gl.getGLProfile().isValidArrayDataType(-1, comps, dataType, true, true);
-
       GLArrayDataClient adc = new GLArrayDataClient();
       GLArrayHandler glArrayHandler = new GLSLArrayHandler(adc);
-      adc.init(name, -1, comps, dataType, normalized, 0, null, initialSize, true, glArrayHandler, 0, 0);
+      adc.init(name, -1, comps, dataType, normalized, 0, null, initialSize, true, glArrayHandler, 0, 0, 0, 0, true);
       return adc;
   }
 
-  public static GLArrayDataClient createGLSL(GL gl, String name, int comps, int dataType, boolean normalized, 
-                                             int stride, Buffer buffer)
+  /**
+   * Create a client side buffer object, using a custom GLSL array attribute name
+   * and starting with a given Buffer object incl it's stride
+   * @param name  The custom name for the GL attribute. 
+   * @param comps The array component number
+   * @param dataType The array index GL data type
+   * @param normalized Whether the data shall be normalized
+   * @param stride
+   * @param buffer the user define data
+   */
+  public static GLArrayDataClient createGLSL(String name, int comps,
+                                             int dataType, boolean normalized, int stride, Buffer buffer)
     throws GLException
   {
-      if(!gl.hasGLSL()) {
-        throw new GLException("GLArrayDataClient.GLSL not supported: "+gl);
-      }
-      gl.getGLProfile().isValidArrayDataType(-1, comps, dataType, true, true);
-
       GLArrayDataClient adc = new GLArrayDataClient();
       GLArrayHandler glArrayHandler = new GLSLArrayHandler(adc);
-      adc.init(name, -1, comps, dataType, normalized, stride, buffer, comps*comps, true, glArrayHandler, 0, 0);
+      adc.init(name, -1, comps, dataType, normalized, stride, buffer, comps*comps, true, glArrayHandler, 0, 0, 0, 0, true);
       return adc;
   }
 
@@ -94,21 +124,21 @@ public class GLArrayDataClient extends GLArrayDataWrapper implements GLArrayData
   // Data read access
   //
 
-  public final boolean isBufferWritten() { return bufferWritten; }
+  public final boolean isVBOWritten() { return bufferWritten; }
 
   public final boolean sealed() { return sealed; }
-
-  public int getBufferUsage() { return -1; }
+  
+  public final boolean enabled() { return bufferEnabled; }
 
   //
   // Data and GL state modification ..
   //
 
-  public final void setBufferWritten(boolean written) { bufferWritten=written; }
+  public final void setVBOWritten(boolean written) { bufferWritten=written; }
 
   public void destroy(GL gl) {
     reset(gl);
-    buffer=null;
+    super.destroy(gl);
   }
 
   public void reset(GL gl) {
@@ -116,32 +146,34 @@ public class GLArrayDataClient extends GLArrayDataWrapper implements GLArrayData
     reset();
   }
 
-  public void seal(GL gl, boolean seal)
-  {
+  public void seal(GL gl, boolean seal) {
     seal(seal);
-    if(sealedGL==seal) return;
-    sealedGL = seal;
-    if(seal) {
-        init_vbo(gl);
-
-        enableBuffer(gl, true);
-    } else {
-        enableBuffer(gl, false);
-    }
+    enableBuffer(gl, seal);
   }
 
   public void enableBuffer(GL gl, boolean enable) {
-    if(enableBufferAlways && enable) {
-        bufferEnabled = false;
-    }
-    if( bufferEnabled != enable && components>0 ) {
+    if( enableBufferAlways || bufferEnabled != enable ) { 
         if(enable) {
             checkSeal(true);
-            if(null!=buffer) {
-                buffer.rewind();
+            // init/generate VBO name if not done yet
+            init_vbo(gl);
+        }
+        final Object ext;
+        if(usesGLSL) {
+            ext = ShaderState.getShaderState(gl);
+            if(null == ext) {
+                throw new GLException("A ShaderState must be bound to the GL context, use 'ShaderState.setShaderState(gl)'");
             }
+        } else {
+            ext = null;
+        }
+        if(enable) {
+            glArrayHandler.syncData(gl, true, ext);
+            glArrayHandler.enableState(gl, true, ext);
+        } else {
+            glArrayHandler.enableState(gl, false, ext);
+            glArrayHandler.syncData(gl, false, ext);
         }
-        glArrayHandler.enableBuffer(gl, enable);
         bufferEnabled = enable;
     }
   }
@@ -167,16 +199,14 @@ public class GLArrayDataClient extends GLArrayDataWrapper implements GLArrayData
   {
     if(sealed==seal) return;
     sealed = seal;
+    bufferWritten=false;
     if(seal) {
-        bufferWritten=false;
         if (null!=buffer) {
             buffer.flip();
         }
-    } else {
-        if (null!=buffer) {
-            buffer.position(buffer.limit());
-            buffer.limit(buffer.capacity());
-        }
+    } else if (null!=buffer) {
+        buffer.position(buffer.limit());
+        buffer.limit(buffer.capacity());
     }
   }
 
@@ -202,7 +232,7 @@ public class GLArrayDataClient extends GLArrayDataWrapper implements GLArrayData
    * The arguments remaining elements must be a multiple of this arrays element stride.
    */
   public void put(Buffer v) {
-    if ( buffer==null || sealed ) return;
+    if ( sealed ) return;
     if(0!=(v.remaining() % strideL)) {
         throw new GLException("Buffer length ("+v.remaining()+") is not a multiple of component-stride:\n\t"+this);
     }
@@ -211,19 +241,19 @@ public class GLArrayDataClient extends GLArrayDataWrapper implements GLArrayData
   }
 
   public void putb(byte v) {
-    if ( buffer==null || sealed ) return;
+    if ( sealed ) return;
     growBufferIfNecessary(1);
     Buffers.putb(buffer, v);
   }
 
   public void puts(short v) {
-    if ( buffer==null || sealed ) return;
+    if ( sealed ) return;
     growBufferIfNecessary(1);
     Buffers.puts(buffer, v);
   }
 
   public void puti(int v) {
-    if ( buffer==null || sealed ) return;
+    if ( sealed ) return;
     growBufferIfNecessary(1);
     Buffers.puti(buffer, v);
   }
@@ -233,7 +263,7 @@ public class GLArrayDataClient extends GLArrayDataWrapper implements GLArrayData
   }
 
   public void putf(float v) {
-    if ( buffer==null || sealed ) return;
+    if ( sealed ) return;
     growBufferIfNecessary(1);
     Buffers.putf(buffer, v);
   }
@@ -243,16 +273,17 @@ public class GLArrayDataClient extends GLArrayDataWrapper implements GLArrayData
                        ", index "+index+
                        ", location "+location+
                        ", isVertexAttribute "+isVertexAttribute+
-                       ", dataType "+dataType+ 
-                       ", bufferClazz "+clazz+ 
-                       ", elements "+getElementNumber()+
+                       ", dataType "+componentType+ 
+                       ", bufferClazz "+componentClazz+ 
+                       ", elements "+getElementCount()+
                        ", components "+components+ 
-                       ", stride "+stride+"u "+strideB+"b "+strideL+"c"+
+                       ", stride "+strideB+"b "+strideL+"c"+
                        ", initialSize "+initialSize+ 
                        ", sealed "+sealed+ 
                        ", bufferEnabled "+bufferEnabled+ 
                        ", bufferWritten "+bufferWritten+ 
-                       ", buffer "+buffer+ 
+                       ", buffer "+buffer+
+                       ", alive "+alive+
                        "]";
   }
 
@@ -260,55 +291,58 @@ public class GLArrayDataClient extends GLArrayDataWrapper implements GLArrayData
 
   protected final boolean growBufferIfNecessary(int spare) {
     if(buffer==null || buffer.remaining()<spare) { 
-        growBuffer(initialSize);
+        growBuffer(Math.max(initialSize, spare));
         return true;
     }
     return false;
   }
 
-  protected final void growBuffer(int additional) {
-    if(sealed || 0==additional || 0==components) return;
+  protected final void growBuffer(int additional) {     
+    if(!alive || sealed) {
+       throw new GLException("Invalid state: "+this); 
+    }
 
     // add the stride delta
     additional += (additional/components)*(strideL-components);
 
-    if(components>0) {
-        int osize = (buffer!=null)?buffer.capacity():0;
-        if(clazz==ByteBuffer.class) {
-            ByteBuffer newBBuffer = Buffers.newDirectByteBuffer( (osize+additional) * components );
-            if(buffer!=null) {
-                buffer.flip();
-                newBBuffer.put((ByteBuffer)buffer);
-            }
-            buffer = newBBuffer;
-        } else if(clazz==ShortBuffer.class) {
-            ShortBuffer newSBuffer = Buffers.newDirectShortBuffer( (osize+additional) * components );
-            if(buffer!=null) {
-                buffer.flip();
-                newSBuffer.put((ShortBuffer)buffer);
-            }
-            buffer = newSBuffer;
-        } else if(clazz==IntBuffer.class) {
-            IntBuffer newIBuffer = Buffers.newDirectIntBuffer( (osize+additional) * components );
-            if(buffer!=null) {
-                buffer.flip();
-                newIBuffer.put((IntBuffer)buffer);
-            }
-            buffer = newIBuffer;
-        } else if(clazz==FloatBuffer.class) {
-            FloatBuffer newFBuffer = Buffers.newDirectFloatBuffer( (osize+additional) * components );
-            if(buffer!=null) {
-                buffer.flip();
-                newFBuffer.put((FloatBuffer)buffer);
-            }
-            buffer = newFBuffer;
-        } else {
-            throw new GLException("Given Buffer Class not supported: "+clazz+":\n\t"+this);
+    int osize = (buffer!=null)?buffer.capacity():0;
+    if(componentClazz==ByteBuffer.class) {
+        ByteBuffer newBBuffer = Buffers.newDirectByteBuffer( (osize+additional) * components );
+        if(buffer!=null) {
+            buffer.flip();
+            newBBuffer.put((ByteBuffer)buffer);
+        }
+        buffer = newBBuffer;
+    } else if(componentClazz==ShortBuffer.class) {
+        ShortBuffer newSBuffer = Buffers.newDirectShortBuffer( (osize+additional) * components );
+        if(buffer!=null) {
+            buffer.flip();
+            newSBuffer.put((ShortBuffer)buffer);
+        }
+        buffer = newSBuffer;
+    } else if(componentClazz==IntBuffer.class) {
+        IntBuffer newIBuffer = Buffers.newDirectIntBuffer( (osize+additional) * components );
+        if(buffer!=null) {
+            buffer.flip();
+            newIBuffer.put((IntBuffer)buffer);
         }
+        buffer = newIBuffer;
+    } else if(componentClazz==FloatBuffer.class) {
+        FloatBuffer newFBuffer = Buffers.newDirectFloatBuffer( (osize+additional) * components );
+        if(buffer!=null) {
+            buffer.flip();
+            newFBuffer.put((FloatBuffer)buffer);
+        }
+        buffer = newFBuffer;
+    } else {
+        throw new GLException("Given Buffer Class not supported: "+componentClazz+":\n\t"+this);
     }
   }
 
   protected final void checkSeal(boolean test) throws GLException {
+    if(!alive) {
+        throw new GLException("Invalid state: "+this); 
+    }    
     if(sealed!=test) {
         if(test) {
             throw new GLException("Not Sealed yet, seal first:\n\t"+this); 
@@ -320,29 +354,36 @@ public class GLArrayDataClient extends GLArrayDataWrapper implements GLArrayData
 
   protected void init(String name, int index, int comps, int dataType, boolean normalized, int stride, Buffer data, 
                       int initialSize, boolean isVertexAttribute, GLArrayHandler handler,
-                      int vboName, long bufferOffset)
+                      int vboName, long vboOffset, int vboUsage, int vboTarget, boolean usesGLSL)
     throws GLException
   {
     super.init(name, index, comps, dataType, normalized, stride, data, isVertexAttribute,
-               vboName, bufferOffset);
+               vboName, vboOffset, vboUsage, vboTarget);
 
     this.initialSize = initialSize;
     this.glArrayHandler = handler;
+    this.usesGLSL = usesGLSL;
     this.sealed=false;
-    this.sealedGL=false;
     this.bufferEnabled=false;
     this.enableBufferAlways=false;
     this.bufferWritten=false;
-    if(null==buffer) {
+    if(null==buffer && initialSize>0) {
         growBuffer(initialSize);
     }
   }
 
-  protected void init_vbo(GL gl) {}
+  private boolean isValidated = false;
+  
+  protected void init_vbo(GL gl) {
+      if(!isValidated ) {
+          isValidated = true;
+          validate(gl.getGLProfile(), true);
+      }      
+  }
 
   protected GLArrayDataClient() { }
 
-  protected boolean sealed, sealedGL;
+  protected boolean sealed;
   protected boolean bufferEnabled;
   protected boolean bufferWritten;
   protected boolean enableBufferAlways;
@@ -350,5 +391,6 @@ public class GLArrayDataClient extends GLArrayDataWrapper implements GLArrayData
   protected int initialSize;
 
   protected GLArrayHandler glArrayHandler;
+  protected boolean usesGLSL;
 }
 
diff --git a/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataEditable.java b/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataEditable.java
index 0f8ed27..0da7d11 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataEditable.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataEditable.java
@@ -14,21 +14,18 @@ import java.nio.*;
 public interface GLArrayDataEditable extends GLArrayData {
 
     public boolean sealed();
+    
+    public boolean enabled();
 
     /**
-     * The VBO buffer usage, if it's an VBO, otherwise -1
+     * Is the buffer written to the VBO ?
      */
-    public int getBufferUsage();
+    public boolean isVBOWritten();
 
     /**
-     * Is the buffer written to the GPU ?
+     * Marks the buffer written to the VBO
      */
-    public boolean isBufferWritten();
-
-    /**
-     * Marks the buffer written to the GPU
-     */
-    public void setBufferWritten(boolean written);
+    public void setVBOWritten(boolean written);
 
     //
     // Data and GL state modification ..
@@ -39,29 +36,27 @@ public interface GLArrayDataEditable extends GLArrayData {
     public void reset(GL gl);
 
     /**
-     * If seal is true, it
-     * disable write operations to the buffer.
-     * Calls flip, ie limit:=position and position:=0.
-     * Also enables the buffer for OpenGL, and passes the data.
-     *
-     * If seal is false, it
-     * enable write operations continuing
-     * at the buffer position, where you left off at seal(true),
-     * ie position:=limit and limit:=capacity.
-     * Also disables the buffer for OpenGL.
+     * Convenience method calling {@link #seal(boolean)} and {@link #enableBuffer(GL, boolean)}.
      *
      * @see #seal(boolean)
+     * @see #enableBuffer(GL, boolean)
+     * 
      */
     public void seal(GL gl, boolean seal);
 
     /**
-     * Enables/disables the buffer, which implies
-     * the client state, binding the VBO
-     * and transfering the data if not done yet.
+     * <p>Enables/disables the buffer, 
+     * sets the client state, binds the VBO if used
+     * and transfers the data if necessary.</p>
+     * 
+     * <p>The action will only be executed,
+     * if the internal enable state differs, 
+     * or 'setEnableAlways' was called with 'true'.</b>
      * 
-     * The above will only be executed,
-     * if the buffer is disabled,
-     * or 'setEnableAlways' was called with 'true'.
+     * <p>It is up to the user to enable/disable the array properly,
+     * ie in case of multiple data sets for the same vertex attribute (VA).
+     * Meaning in such case usage of one set while expecting another one
+     * to be used for the same VA implies decorating each usage with enable/disable.</p>
      *
      * @see #setEnableAlways(boolean)
      */
@@ -72,8 +67,9 @@ public interface GLArrayDataEditable extends GLArrayData {
      *
      * The default is 'false'
      *
-     * This is usefull when you mix up 
-     * GLArrayData usage with conventional GL array calls.
+     * This is useful when you mix up 
+     * GLArrayData usage with conventional GL array calls
+     * or in case of a buggy GL VBO implementation.
      *
      * @see #enableBuffer(GL, boolean)
      */
@@ -86,16 +82,17 @@ public interface GLArrayDataEditable extends GLArrayData {
     public void reset();
 
     /**
-     * If seal is true, it
-     * disable write operations to the buffer.
-     * Calls flip, ie limit:=position and position:=0.
+     * <p>If <i>seal</i> is true, it
+     * disables write operations to the buffer.
+     * Calls flip, ie limit:=position and position:=0.</p>
      *
-     * If seal is false, it
+     * <p>If <i>seal</i> is false, it
      * enable write operations continuing
      * at the buffer position, where you left off at seal(true),
-     * ie position:=limit and limit:=capacity.
+     * ie position:=limit and limit:=capacity.</p>
      *
-     */
+     * @see #seal(boolean)
+     */    
     public void seal(boolean seal);
 
     public void rewind();
diff --git a/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataServer.java b/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataServer.java
index c061e21..d3bb2e3 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataServer.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataServer.java
@@ -1,10 +1,22 @@
 
 package com.jogamp.opengl.util;
 
-import javax.media.opengl.*;
-import java.nio.*;
+import java.nio.Buffer;
+
+import javax.media.opengl.GL;
+import javax.media.opengl.GL2ES2;
+import javax.media.opengl.GLArrayData;
+import javax.media.opengl.GLException;
+import javax.media.opengl.fixedfunc.GLPointerFuncUtil;
+
+import jogamp.opengl.util.GLArrayHandler;
+import jogamp.opengl.util.GLArrayHandlerInterleaved;
+import jogamp.opengl.util.GLDataArrayHandler;
+import jogamp.opengl.util.GLFixedArrayHandler;
+import jogamp.opengl.util.GLFixedArrayHandlerFlat;
+import jogamp.opengl.util.glsl.GLSLArrayHandler;
+import jogamp.opengl.util.glsl.GLSLArrayHandlerFlat;
 
-import com.jogamp.opengl.util.glsl.*;
 
 public class GLArrayDataServer extends GLArrayDataClient implements GLArrayDataEditable {
 
@@ -13,111 +25,278 @@ public class GLArrayDataServer extends GLArrayDataClient implements GLArrayDataE
   //
 
   /**
-   * Create a VBOBuffer object, using a predefined fixed function array index
+   * Create a VBO, using a predefined fixed function array index
    * and starting with a given Buffer object incl it's stride
    *
    * On profiles GL2 and ES1 the fixed function pipeline behavior is as expected.
    * On profile ES2 the fixed function emulation will transform these calls to 
    * EnableVertexAttribArray and VertexAttribPointer calls,
-   * and a predefined vertex attribute variable name will be choosen.
-   *
+   * and a predefined vertex attribute variable name will be chosen.
+   * 
+   * The default name mapping will be used, 
+   * see {@link GLPointerFuncUtil#getPredefinedArrayIndexName(int)}.
+   *              
    * @param index The GL array index
-   * @param name  The optional custom name for the GL array index, maybe null.
-   *            If null, the default name mapping will be used, see 'getPredefinedArrayIndexName(int)'.
-   *            This name might be used as the shader attribute name.
    * @param comps The array component number
    * @param dataType The array index GL data type
-   * @param normalized Wheather the data shall be normalized
+   * @param normalized Whether the data shall be normalized
+   * @param stride
+   * @param buffer the user define data
+   * @param vboUsage {@link GL2ES2#GL_STREAM_DRAW}, {@link GL#GL_STATIC_DRAW} or {@link GL#GL_DYNAMIC_DRAW}
    *
    * @see javax.media.opengl.GLContext#getPredefinedArrayIndexName(int)
    */
-  public static GLArrayDataServer createFixed(GL gl, int index, String name, int comps, int dataType, boolean normalized,
-                                              int stride, Buffer buffer, int vboBufferUsage)
+  public static GLArrayDataServer createFixed(int index, int comps, int dataType, boolean normalized, int stride,
+                                              Buffer buffer, int vboUsage)
     throws GLException
   {
-    gl.getGLProfile().isValidArrayDataType(index, comps, dataType, false, true);
-
     GLArrayDataServer ads = new GLArrayDataServer();
     GLArrayHandler glArrayHandler = new GLFixedArrayHandler(ads);
-    ads.init(gl, name, index, comps, dataType, normalized, stride, buffer, buffer.limit(), false, glArrayHandler,
-             0, 0, vboBufferUsage);
+    ads.init(null, index, comps, dataType, normalized, stride, buffer, buffer.limit(), false, glArrayHandler,
+             0, 0, vboUsage, GL.GL_ARRAY_BUFFER, false);
     return ads;
   }
 
   /**
-   * Create a VBOBuffer object, using a predefined fixed function array index
+   * Create a VBO, using a predefined fixed function array index
    * and starting with a new created Buffer object with initialSize size
    *
    * On profiles GL2 and ES1 the fixed function pipeline behavior is as expected.
    * On profile ES2 the fixed function emulation will transform these calls to 
    * EnableVertexAttribArray and VertexAttribPointer calls,
-   * and a predefined vertex attribute variable name will be choosen.
+   * and a predefined vertex attribute variable name will be chosen.
+   * 
+   * The default name mapping will be used, 
+   * see {@link GLPointerFuncUtil#getPredefinedArrayIndexName(int)}.
+   *              
+   * @param index The GL array index
+   * @param comps The array component number
+   * @param dataType The array index GL data type
+   * @param normalized Whether the data shall be normalized
+   * @param initialSize
+   * @param vboUsage {@link GL2ES2#GL_STREAM_DRAW}, {@link GL#GL_STATIC_DRAW} or {@link GL#GL_DYNAMIC_DRAW}
    *
    * @see javax.media.opengl.GLContext#getPredefinedArrayIndexName(int)
    */
-  public static GLArrayDataServer createFixed(GL gl, int index, String name, int comps, int dataType, boolean normalized, 
-                                              int initialSize, int vboBufferUsage)
+  public static GLArrayDataServer createFixed(int index, int comps, int dataType, boolean normalized, int initialSize, 
+                                              int vboUsage)
     throws GLException
   {
-    gl.getGLProfile().isValidArrayDataType(index, comps, dataType, false, true);
-
     GLArrayDataServer ads = new GLArrayDataServer();
     GLArrayHandler glArrayHandler = new GLFixedArrayHandler(ads);
-    ads.init(gl, name, index, comps, dataType, normalized, 0, null, initialSize, false, glArrayHandler,
-             0, 0, vboBufferUsage);
+    ads.init(null, index, comps, dataType, normalized, 0, null, initialSize, false, glArrayHandler,
+             0, 0, vboUsage, GL.GL_ARRAY_BUFFER, false);
     return ads;
   }
 
   /**
-   * Create a VBOBuffer object, using a custom GLSL array attribute name
+   * Create a VBO, using a custom GLSL array attribute name
    * and starting with a new created Buffer object with initialSize size
-   *
-   * @see javax.media.opengl.GLContext#getPredefinedArrayIndexName(int)
+   * @param name  The custom name for the GL attribute    
+   * @param comps The array component number
+   * @param dataType The array index GL data type
+   * @param normalized Whether the data shall be normalized
+   * @param initialSize
+   * @param vboUsage {@link GL2ES2#GL_STREAM_DRAW}, {@link GL#GL_STATIC_DRAW} or {@link GL#GL_DYNAMIC_DRAW}
    */
-  public static GLArrayDataServer createGLSL(GL gl, String name, int comps, int dataType, boolean normalized,
-                                             int initialSize, int vboBufferUsage) 
+  public static GLArrayDataServer createGLSL(String name, int comps,
+                                             int dataType, boolean normalized, int initialSize, int vboUsage) 
+    throws GLException 
+  {
+    GLArrayDataServer ads = new GLArrayDataServer();
+    GLArrayHandler glArrayHandler = new GLSLArrayHandler(ads);
+    ads.init(name, -1, comps, dataType, normalized, 0, null, initialSize,
+             true, glArrayHandler, 0, 0, vboUsage, GL.GL_ARRAY_BUFFER, true);
+    return ads;
+  }  
+  
+  /**
+   * Create a VBO, using a custom GLSL array attribute name
+   * and starting with a given Buffer object incl it's stride
+   * @param name  The custom name for the GL attribute     
+   * @param comps The array component number
+   * @param dataType The array index GL data type
+   * @param normalized Whether the data shall be normalized
+   * @param stride
+   * @param buffer the user define data
+   * @param vboUsage {@link GL2ES2#GL_STREAM_DRAW}, {@link GL#GL_STATIC_DRAW} or {@link GL#GL_DYNAMIC_DRAW}
+   */
+  public static GLArrayDataServer createGLSL(String name, int comps,
+                                             int dataType, boolean normalized, int stride, Buffer buffer,
+                                             int vboUsage) 
     throws GLException
   {
-    if(!gl.hasGLSL()) {
-        throw new GLException("GLArrayDataServer.GLSL not supported: "+gl);
-    }
-    gl.getGLProfile().isValidArrayDataType(-1, comps, dataType, true, true);
-
     GLArrayDataServer ads = new GLArrayDataServer();
     GLArrayHandler glArrayHandler = new GLSLArrayHandler(ads);
-    ads.init(gl, name, -1, comps, dataType, normalized, 0, null, initialSize, true, glArrayHandler,
-             0, 0, vboBufferUsage);
+    ads.init(name, -1, comps, dataType, normalized, stride, buffer, buffer.limit(), true, glArrayHandler,
+             0, 0, vboUsage, GL.GL_ARRAY_BUFFER, true);
     return ads;
   }
 
   /**
-   * Create a VBOBuffer object, using a custom GLSL array attribute name
-   * and starting with a given Buffer object incl it's stride
-   *
-   * @see javax.media.opengl.GLContext#getPredefinedArrayIndexName(int)
+   * Create a VBO data object for any target w/o render pipeline association, ie {@link GL#GL_ELEMENT_ARRAY_BUFFER}.
+   * 
+   * Hence no index, name for a fixed function pipeline nor vertex attribute is given.
+   * 
+   * @param comps The array component number
+   * @param dataType The array index GL data type
+   * @param stride
+   * @param buffer the user define data
+   * @param vboUsage {@link GL2ES2#GL_STREAM_DRAW}, {@link GL#GL_STATIC_DRAW} or {@link GL#GL_DYNAMIC_DRAW}
+   * @param vboTarget {@link GL#GL_ELEMENT_ARRAY_BUFFER}, ..
+   * {@link GL#glGenBuffers(int, int[], int)
    */
-  public static GLArrayDataServer createGLSL(GL gl, String name, int comps, int dataType, boolean normalized,
-                                             int stride, Buffer buffer, int vboBufferUsage) 
+  public static GLArrayDataServer createData(int comps, int dataType, int stride,
+                                             Buffer buffer, int vboUsage, int vboTarget)
     throws GLException
   {
-    if(!gl.hasGLSL()) {
-        throw new GLException("GLArrayDataServer.GLSL not supported: "+gl);
-    }
-    gl.getGLProfile().isValidArrayDataType(-1, comps, dataType, true, true);
+    GLArrayDataServer ads = new GLArrayDataServer();
+    GLArrayHandler glArrayHandler = new GLDataArrayHandler(ads);
+    ads.init(null, -1, comps, dataType, false, stride, buffer, buffer.limit(), false, glArrayHandler,
+             0, 0, vboUsage, vboTarget, false);
+    return ads;
+  }
+
+  /**
+   * Create a VBO data object for any target w/o render pipeline association, ie {@link GL#GL_ELEMENT_ARRAY_BUFFER}.
+   * 
+   * Hence no index, name for a fixed function pipeline nor vertex attribute is given.
+   * 
+   * @param comps The array component number
+   * @param dataType The array index GL data type
+   * @param initialSize
+   * @param vboUsage {@link GL2ES2#GL_STREAM_DRAW}, {@link GL#GL_STATIC_DRAW} or {@link GL#GL_DYNAMIC_DRAW}
+   * @param vboTarget {@link GL#GL_ELEMENT_ARRAY_BUFFER}, ..
+   */
+  public static GLArrayDataServer createData(int comps, int dataType, int initialSize, 
+                                             int vboUsage, int vboTarget)
+    throws GLException
+  {
+    GLArrayDataServer ads = new GLArrayDataServer();
+    GLArrayHandler glArrayHandler = new GLDataArrayHandler(ads);
+    ads.init(null, -1, comps, dataType, false, 0, null, initialSize, false, glArrayHandler,
+             0, 0, vboUsage, vboTarget, false);
+    return ads;
+  }
 
+  
+  /**
+   * Create a VBO for fixed function interleaved array data
+   * starting with a new created Buffer object with initialSize size.
+   * <p>User needs to <i>configure</i> the interleaved segments via {@link #addFixedSubArray(int, int, int)}.</p>
+   * 
+   * @param comps The total number of all interleaved components.
+   * @param dataType The array index GL data type
+   * @param normalized Whether the data shall be normalized
+   * @param initialSize 
+   * @param vboUsage {@link GL2ES2#GL_STREAM_DRAW}, {@link GL#GL_STATIC_DRAW} or {@link GL#GL_DYNAMIC_DRAW}
+   */
+  public static GLArrayDataServer createFixedInterleaved(int comps, int dataType, boolean normalized, int initialSize, 
+                                              int vboUsage)
+    throws GLException
+  {
     GLArrayDataServer ads = new GLArrayDataServer();
-    GLArrayHandler glArrayHandler = new GLSLArrayHandler(ads);
-    ads.init(gl, name, -1, comps, dataType, normalized, stride, buffer, buffer.limit(), true, glArrayHandler,
-             0, 0, vboBufferUsage);
+    GLArrayHandler glArrayHandler = new GLArrayHandlerInterleaved(ads);
+    ads.init(GLPointerFuncUtil.mgl_InterleaveArray, -1, comps, dataType, false, 0, null, initialSize, false, glArrayHandler,
+             0, 0, vboUsage, GL.GL_ARRAY_BUFFER, false);
     return ads;
   }
 
+  /**
+   * Configure a segment of this fixed function interleaved array (see {@link #createFixedInterleaved(int, int, boolean, int, int)}).
+   * <p>
+   * This method may be called several times as long the sum of interleaved components does not
+   * exceed the total number of components of the created interleaved array.</p>
+   * <p>
+   * The memory of the the interleaved array is being used.</p>
+   * <p>
+   * Must be called before using the array, eg: {@link #seal(boolean)}, {@link #putf(float)}, .. </p>
+   * 
+   * @param index The GL array index, maybe -1 if vboTarget is {@link GL#GL_ELEMENT_ARRAY_BUFFER}
+   * @param comps This interleaved array segment's component number
+   * @param vboTarget {@link GL#GL_ARRAY_BUFFER} or {@link GL#GL_ELEMENT_ARRAY_BUFFER}
+   */
+  public GLArrayData addFixedSubArray(int index, int comps, int vboTarget) {
+      if(interleavedOffset >= getComponentCount() * getComponentSizeInBytes()) {
+          final int iOffC = interleavedOffset / getComponentSizeInBytes();
+          throw new GLException("Interleaved offset > total components ("+iOffC+" > "+getComponentCount()+")");
+      }
+      if(usesGLSL) {
+          throw new GLException("buffer uses GLSL");          
+      }
+      GLArrayDataWrapper ad = GLArrayDataWrapper.createFixed(
+              index, comps, getComponentType(), 
+              getNormalized(), getStride(), getBuffer(), 
+              getVBOName(), interleavedOffset, getVBOUsage(), vboTarget);
+      ad.setVBOEnabled(isVBO());
+      interleavedOffset += comps * getComponentSizeInBytes();
+      if(GL.GL_ARRAY_BUFFER == vboTarget) { 
+          GLArrayHandler handler = new GLFixedArrayHandlerFlat(ad);
+          glArrayHandler.addSubHandler(handler);
+      }
+      return ad;
+  }
+  
+  /**
+   * Create a VBO for GLSL interleaved array data
+   * starting with a new created Buffer object with initialSize size.
+   * <p>User needs to <i>configure</i> the interleaved segments via {@link #addGLSLSubArray(int, int, int)}.</p>
+   * 
+   * @param comps The total number of all interleaved components.
+   * @param dataType The array index GL data type
+   * @param normalized Whether the data shall be normalized
+   * @param initialSize 
+   * @param vboUsage {@link GL2ES2#GL_STREAM_DRAW}, {@link GL#GL_STATIC_DRAW} or {@link GL#GL_DYNAMIC_DRAW}
+   */
+  public static GLArrayDataServer createGLSLInterleaved(int comps, int dataType, boolean normalized, int initialSize, 
+                                              int vboUsage)
+    throws GLException
+  {
+    GLArrayDataServer ads = new GLArrayDataServer();
+    GLArrayHandler glArrayHandler = new GLArrayHandlerInterleaved(ads);
+    ads.init(GLPointerFuncUtil.mgl_InterleaveArray, -1, comps, dataType, false, 0, null, initialSize, false, glArrayHandler,
+             0, 0, vboUsage, GL.GL_ARRAY_BUFFER, true);
+    return ads;
+  }
+  
+  /**
+   * Configure a segment of this GLSL interleaved array (see {@link #createGLSLInterleaved(int, int, boolean, int, int)}).
+   * <p>
+   * This method may be called several times as long the sum of interleaved components does not
+   * exceed the total number of components of the created interleaved array.</p>
+   * <p>
+   * The memory of the the interleaved array is being used.</p>
+   * <p>
+   * Must be called before using the array, eg: {@link #seal(boolean)}, {@link #putf(float)}, .. </p>
+   * @param name  The custom name for the GL attribute, maybe null if vboTarget is {@link GL#GL_ELEMENT_ARRAY_BUFFER}
+   * @param comps This interleaved array segment's component number
+   * @param vboTarget {@link GL#GL_ARRAY_BUFFER} or {@link GL#GL_ELEMENT_ARRAY_BUFFER}
+   */
+  public GLArrayData addGLSLSubArray(String name, int comps, int vboTarget) {
+      if(interleavedOffset >= getComponentCount() * getComponentSizeInBytes()) {
+          final int iOffC = interleavedOffset / getComponentSizeInBytes();
+          throw new GLException("Interleaved offset > total components ("+iOffC+" > "+getComponentCount()+")");
+      }
+      if(!usesGLSL) {
+          throw new GLException("buffer uses fixed function");          
+      }
+      GLArrayDataWrapper ad = GLArrayDataWrapper.createGLSL(
+              name, comps, getComponentType(), 
+              getNormalized(), getStride(), getBuffer(), 
+              getVBOName(), interleavedOffset, getVBOUsage(), vboTarget);     
+      ad.setVBOEnabled(isVBO());
+      interleavedOffset += comps * getComponentSizeInBytes();
+      if(GL.GL_ARRAY_BUFFER == vboTarget) { 
+          GLArrayHandler handler = new GLSLArrayHandlerFlat(ad);
+          glArrayHandler.addSubHandler(handler);
+      }
+      return ad;
+  }
+  
   //
   // Data matters GLArrayData
   //
 
-  public int getBufferUsage() { return vboBufferUsage; }
-
   //
   // Data and GL state modification ..
   //
@@ -141,9 +320,9 @@ public class GLArrayDataServer extends GLArrayDataClient implements GLArrayDataE
    * switch to client side data one
    * Only possible if buffer is defined.
    */
-  public void    setVBOUsage(boolean vboUsage) { 
+  public void    setVBOEnabled(boolean vboUsage) { 
     checkSeal(false);
-    super.setVBOUsage(vboUsage);
+    super.setVBOEnabled(vboUsage);
   }
 
   public String toString() {
@@ -151,20 +330,22 @@ public class GLArrayDataServer extends GLArrayDataClient implements GLArrayDataE
                        ", index "+index+
                        ", location "+location+
                        ", isVertexAttribute "+isVertexAttribute+
-                       ", dataType "+dataType+ 
-                       ", bufferClazz "+clazz+ 
-                       ", elements "+getElementNumber()+
+                       ", dataType "+componentType+ 
+                       ", bufferClazz "+componentClazz+ 
+                       ", elements "+getElementCount()+
                        ", components "+components+ 
-                       ", stride "+stride+"u "+strideB+"b "+strideL+"c"+
-                       ", initialSize "+initialSize+ 
-                       ", vboBufferUsage "+vboBufferUsage+ 
-                       ", vboUsage "+vboUsage+ 
+                       ", stride "+strideB+"b "+strideL+"c"+
+                       ", initialSize "+initialSize+
+                       ", vboEnabled "+vboEnabled+ 
                        ", vboName "+vboName+ 
+                       ", vboUsage 0x"+Integer.toHexString(vboUsage)+ 
+                       ", vboTarget 0x"+Integer.toHexString(vboTarget)+ 
+                       ", vboOffset 0x"+Long.toHexString(vboOffset)+                        
                        ", sealed "+sealed+ 
                        ", bufferEnabled "+bufferEnabled+ 
                        ", bufferWritten "+bufferWritten+ 
                        ", buffer "+buffer+ 
-                       ", offset "+bufferOffset+ 
+                       ", alive "+alive+                       
                        "]";
   }
 
@@ -172,38 +353,27 @@ public class GLArrayDataServer extends GLArrayDataClient implements GLArrayDataE
   // non public matters ..
   //
 
-  protected void init(GL gl, String name, int index, int comps, int dataType, boolean normalized, 
+  protected void init(String name, int index, int comps, int dataType, boolean normalized, 
                       int stride, Buffer data, int initialSize, boolean isVertexAttribute,
                       GLArrayHandler glArrayHandler,
-                      int vboName, long bufferOffset, int vboBufferUsage)
+                      int vboName, long vboOffset, int vboUsage, int vboTarget, boolean usesGLSL)
     throws GLException
   {
     super.init(name, index, comps, dataType, normalized, stride, data, initialSize, isVertexAttribute, glArrayHandler,
-               vboName, bufferOffset);
-
-    vboUsage=true;
-
-    if( ! (gl.isGL2ES2() && vboBufferUsage==GL2ES2.GL_STREAM_DRAW) ) {
-        switch(vboBufferUsage) {
-            case -1: // nop
-            case GL.GL_STATIC_DRAW:
-            case GL.GL_DYNAMIC_DRAW:
-                break;
-            default:
-                throw new GLException("invalid vboBufferUsage: "+vboBufferUsage+":\n\t"+this); 
-        }
-    }
-    this.vboBufferUsage=vboBufferUsage;
+               vboName, vboOffset, vboUsage, vboTarget, usesGLSL);
+
+    vboEnabled=true;
   }
 
   protected void init_vbo(GL gl) {
-    if(vboUsage && vboName==0) {
+    super.init_vbo(gl);
+    if(vboEnabled && vboName==0) {
         int[] tmp = new int[1];
         gl.glGenBuffers(1, tmp, 0);
         vboName = tmp[0];
     }
   }
-
-  protected int vboBufferUsage;
+  
+  private int interleavedOffset = 0;  
 }
 
diff --git a/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataWrapper.java b/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataWrapper.java
index 88a8603..4ca3825 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataWrapper.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataWrapper.java
@@ -2,6 +2,7 @@
 package com.jogamp.opengl.util;
 
 import javax.media.opengl.*;
+import javax.media.opengl.fixedfunc.GLPointerFuncUtil;
 
 import jogamp.opengl.util.glsl.fixedfunc.*;
 
@@ -9,34 +10,85 @@ import java.nio.*;
 
 public class GLArrayDataWrapper implements GLArrayData {
 
-  public static GLArrayDataWrapper createFixed(GL gl, int index, int comps, int dataType, boolean normalized, 
-                                              int stride, Buffer buffer,
-                                              int vboName, long bufferOffset)
+  /**
+   * Create a VBO, using a predefined fixed function array index, wrapping the given data.
+   * 
+   * @param index The GL array index
+   * @param comps The array component number
+   * @param dataType The array index GL data type
+   * @param normalized Whether the data shall be normalized
+   * @param stride
+   * @param buffer the user define data
+   * @param vboName
+   * @param vboOffset
+   * @param vboUsage {@link GL2ES2#GL_STREAM_DRAW}, {@link GL#GL_STATIC_DRAW} or {@link GL#GL_DYNAMIC_DRAW}
+   * @param vboTarget {@link GL#GL_ARRAY_BUFFER} or {@link GL#GL_ELEMENT_ARRAY_BUFFER}
+   * @return the new create instance
+   * 
+   * @throws GLException
+   */
+  public static GLArrayDataWrapper createFixed(int index, int comps, int dataType, boolean normalized, int stride, 
+                                               Buffer buffer, int vboName,
+                                               long vboOffset, int vboUsage, int vboTarget)
     throws GLException
   {
-      gl.getGLProfile().isValidArrayDataType(index, comps, dataType, false, true);
       GLArrayDataWrapper adc = new GLArrayDataWrapper();
       adc.init(null, index, comps, dataType, normalized, stride, buffer, false, 
-               vboName, bufferOffset);
+               vboName, vboOffset, vboUsage, vboTarget);
       return adc;
   }
 
-  public static GLArrayDataWrapper createGLSL(GL gl, String name, int comps, int dataType, boolean normalized, 
-                                             int stride, Buffer buffer,
-                                             int vboName, long bufferOffset)
+  /**
+   * Create a VBO, using a custom GLSL array attribute name, wrapping the given data.
+   * 
+   * @param name  The custom name for the GL attribute, maybe null if gpuBufferTarget is {@link GL#GL_ELEMENT_ARRAY_BUFFER}    
+   * @param comps The array component number
+   * @param dataType The array index GL data type
+   * @param normalized Whether the data shall be normalized
+   * @param stride
+   * @param buffer the user define data
+   * @param vboName
+   * @param vboOffset
+   * @param vboUsage {@link GL2ES2#GL_STREAM_DRAW}, {@link GL#GL_STATIC_DRAW} or {@link GL#GL_DYNAMIC_DRAW}
+   * @param vboTarget {@link GL#GL_ARRAY_BUFFER} or {@link GL#GL_ELEMENT_ARRAY_BUFFER}
+   * @return the new create instance
+   * @throws GLException
+   */
+  public static GLArrayDataWrapper createGLSL(String name, int comps, int dataType, boolean normalized, int stride, 
+                                             Buffer buffer, int vboName,                                             
+                                             long vboOffset, int vboUsage, int vboTarget)
     throws GLException
   {
-      if(!gl.hasGLSL()) {
-        throw new GLException("GLArrayDataWrapper.GLSL not supported: "+gl);
-      }
-      gl.getGLProfile().isValidArrayDataType(-1, comps, dataType, true, true);
-
       GLArrayDataWrapper adc = new GLArrayDataWrapper();
       adc.init(name, -1, comps, dataType, normalized, stride, buffer, true,
-               vboName, bufferOffset);
+              vboName, vboOffset, vboUsage, vboTarget);
       return adc;
   }
 
+  /**
+   * Validates this instance's parameter. Called automatically by {@link GLArrayDataClient} and {@link GLArrayDataServer}.
+   * {@link GLArrayDataWrapper} does not validate it's instance by itself.   
+   * 
+   * @param glp the GLProfile to use
+   * @param throwException whether to throw an exception if this instance has invalid parameter or not
+   * @return true if this instance has invalid parameter, otherwise false
+   */
+  public final boolean validate(GLProfile glp, boolean throwException) {
+    if(!alive) {
+        if(throwException) {
+            throw new GLException("Instance !alive "+this);
+        }
+        return false;        
+    }
+    if(this.isVertexAttribute() && !glp.hasGLSL()) {
+        if(throwException) {
+            throw new GLException("GLSL not supported on "+glp+", "+this);
+        }
+        return false;
+    }
+    return glp.isValidArrayDataType(getIndex(), getComponentCount(), getComponentType(), isVertexAttribute(), throwException);
+  }
+    
   // 
   // Data read access
   //
@@ -51,54 +103,45 @@ public class GLArrayDataWrapper implements GLArrayData {
 
   public final String getName() { return name; }
 
-  public final long getOffset() { return vboUsage?bufferOffset:-1; }
+  public final long getVBOOffset() { return vboEnabled?vboOffset:0; }
 
-  public final int getVBOName() { return vboUsage?vboName:-1; }
+  public final int getVBOName() { return vboEnabled?vboName:0; }
 
-  public final boolean isVBO() { return vboUsage; }
+  public final boolean isVBO() { return vboEnabled; }
 
+  public final int getVBOUsage() { return vboEnabled?vboUsage:0; }
+  
+  public final int getVBOTarget() { return vboEnabled?vboTarget:0; }
+  
   public final Buffer getBuffer() { return buffer; }
 
-  public final int getComponentNumber() { return components; }
+  public final int getComponentCount() { return components; }
 
-  public final int getComponentType() { return dataType; }
+  public final int getComponentType() { return componentType; }
 
-  public final int getComponentSize() {
-    if(clazz==ByteBuffer.class) {
-        return GLBuffers.SIZEOF_BYTE;
-    }
-    if(clazz==ShortBuffer.class) {
-        return GLBuffers.SIZEOF_SHORT;
-    }
-    if(clazz==IntBuffer.class) {
-        return GLBuffers.SIZEOF_INT;
-    }
-    if(clazz==FloatBuffer.class) {
-        return GLBuffers.SIZEOF_FLOAT;
-    }
-    throw new GLException("Given Buffer Class not supported: "+clazz+":\n\t"+this);
-  }
-
-  public final int getElementNumber() {
+  public final int getComponentSizeInBytes() { return componentByteSize; }
+  
+  public final int getElementCount() {
     if(null==buffer) return 0;
     return ( buffer.position()==0 ) ? ( buffer.limit() / components ) : ( buffer.position() / components ) ;
   }
-
+  public final int getSizeInBytes() {
+    if(null==buffer) return 0;
+    return ( buffer.position()==0 ) ? ( buffer.limit() * componentByteSize ) : ( buffer.position() * componentByteSize ) ;      
+  }
+  
   public final boolean getNormalized() { return normalized; }
 
-  public final int getStride() { return stride; }
+  public final int getStride() { return strideB; }
 
-  public final Class getBufferClass() { return clazz; }
+  public final Class getBufferClass() { return componentClazz; }
 
   public void destroy(GL gl) {
-    this.buffer = null;
-    this.components = 0;
-    this.stride=0;
-    this.strideB=0;
-    this.strideL=0;
-    this.vboName=0;
-    this.vboUsage=false;
-    this.bufferOffset=0;
+    buffer = null;
+    vboName=0;
+    vboEnabled=false;
+    vboOffset=0;
+    alive = false;
   }
 
   public String toString() {
@@ -106,15 +149,18 @@ public class GLArrayDataWrapper implements GLArrayData {
                        ", index "+index+
                        ", location "+location+
                        ", isVertexAttribute "+isVertexAttribute+
-                       ", dataType "+dataType+ 
-                       ", bufferClazz "+clazz+ 
-                       ", elements "+getElementNumber()+
+                       ", dataType "+componentType+ 
+                       ", bufferClazz "+componentClazz+ 
+                       ", elements "+getElementCount()+
                        ", components "+components+ 
-                       ", stride "+stride+"u "+strideB+"b "+strideL+"c"+
+                       ", stride "+strideB+"b "+strideL+"c"+
                        ", buffer "+buffer+ 
-                       ", offset "+bufferOffset+ 
-                       ", vboUsage "+vboUsage+ 
+                       ", vboEnabled "+vboEnabled+ 
                        ", vboName "+vboName+ 
+                       ", vboUsage 0x"+Integer.toHexString(vboUsage)+ 
+                       ", vboTarget 0x"+Integer.toHexString(vboTarget)+ 
+                       ", vboOffset 0x"+Long.toHexString(vboOffset)+ 
+                       ", alive "+alive+                       
                        "]";
   }
 
@@ -140,76 +186,140 @@ public class GLArrayDataWrapper implements GLArrayData {
     name = newName;
   }
 
-  public void    setVBOUsage(boolean vboUsage) {
-    this.vboUsage=vboUsage;
+  /**
+   * Enable or disable use of VBO.
+   * Only possible if a VBO buffer name is defined.
+   * @see #setVBOName(int)
+   */  
+  public void setVBOEnabled(boolean vboEnabled) {
+    this.vboEnabled=vboEnabled;
   }
 
+  /**
+   * Set the VBO buffer name, if valid (!= 0) enable use of VBO,
+   * otherwise (==0) disable VBO usage.
+   * 
+   * @see #setVBOEnabled(boolean)
+   */  
   public void    setVBOName(int vboName) {
     this.vboName=vboName;
-    setVBOUsage(vboName>0);
+    setVBOEnabled(0!=vboName);
   }
 
-  protected void init(String name, int index, int comps, int dataType, boolean normalized, int stride, Buffer data, 
+ /**  
+  * @param vboUsage {@link GL2ES2#GL_STREAM_DRAW}, {@link GL#GL_STATIC_DRAW} or {@link GL#GL_DYNAMIC_DRAW}
+  */  
+  public void setVBOUsage(int vboUsage) { 
+      this.vboUsage = vboUsage; 
+  }
+  
+  /**  
+   * @param vboTarget either {@link GL#GL_ARRAY_BUFFER} or {@link GL#GL_ELEMENT_ARRAY_BUFFER}
+   */  
+  public void setVBOTarget(int vboTarget) {
+      this.vboTarget = vboTarget;
+  }  
+
+  protected void init(String name, int index, int components, int componentType, 
+                      boolean normalized, int stride, Buffer data, 
                       boolean isVertexAttribute, 
-                      int vboName, long bufferOffset)
+                      int vboName, long vboOffset, int vboUsage, int vboTarget)
     throws GLException
   {
     this.isVertexAttribute = isVertexAttribute;
     this.index = index;
     this.location = -1;
     // We can't have any dependence on the FixedFuncUtil class here for build bootstrapping reasons
-    this.name = (null==name)?FixedFuncPipeline.getPredefinedArrayIndexName(index):name;
-    if(null==this.name) {
-        throw new GLException("Not a valid GL array index: "+index);
+    
+    if( GL.GL_ELEMENT_ARRAY_BUFFER == vboTarget ) {
+        // ok ..
+    } else if( GL.GL_ARRAY_BUFFER == vboTarget ) {
+        // check name ..
+        this.name = ( null == name ) ? GLPointerFuncUtil.getPredefinedArrayIndexName(index) : name ;
+        if(null == this.name ) {
+            throw new GLException("Not a valid array buffer index: "+index);
+        }        
+    } else if( 0 < vboTarget ) {
+        throw new GLException("Invalid GPUBuffer target: 0x"+Integer.toHexString(vboTarget));
     }
-    this.dataType = dataType;
-    this.clazz = getBufferClass(dataType);
-    switch(dataType) {
+    
+    this.componentType = componentType;
+    componentClazz = getBufferClass(componentType);
+    switch(componentType) {
         case GL.GL_BYTE:
         case GL.GL_UNSIGNED_BYTE:
         case GL.GL_SHORT:
         case GL.GL_UNSIGNED_SHORT:
-        case GL2ES1.GL_FIXED:
+        case GL.GL_FIXED:
             this.normalized = normalized;
             break;
         default:    
             this.normalized = false;
     }
+    componentByteSize = GLBuffers.sizeOfGLType(componentType);
+    if(0 > componentByteSize) {
+        throw new GLException("Given componentType not supported: "+componentType+":\n\t"+this);       
+    }
+    if(0 >= components) {
+        throw new GLException("Invalid number of components: " + components);
+    }
+    this.components = components;
 
-    int bpc = getComponentSize();
-    if(0<stride && stride<comps*bpc) {
-        throw new GLException("stride ("+stride+") lower than component bytes, "+comps+" * "+bpc);
+    if(0<stride && stride<components*componentByteSize) {
+        throw new GLException("stride ("+stride+") lower than component bytes, "+components+" * "+componentByteSize);
     }
-    if(0<stride && stride%bpc!=0) {
-        throw new GLException("stride ("+stride+") not a multiple of bpc "+bpc);
+    if(0<stride && stride%componentByteSize!=0) {
+        throw new GLException("stride ("+stride+") not a multiple of bpc "+componentByteSize);
     }
     this.buffer = data;
-    this.components = comps;
-    this.stride=stride;
-    this.strideB=(0==stride)?comps*bpc:stride;
-    this.strideL=(0==stride)?comps:strideB/bpc;
-    this.vboName=vboName;
-    this.vboUsage=vboName>0;
-    this.bufferOffset=bufferOffset;
+    this.strideB=(0==stride)?components*componentByteSize:stride;
+    this.strideL=strideB/componentByteSize;
+    this.vboName= vboName;
+    this.vboEnabled= 0 != vboName ;
+    this.vboOffset=vboOffset;
+    
+    switch(vboUsage) {
+        case 0: // nop
+        case GL.GL_STATIC_DRAW:
+        case GL.GL_DYNAMIC_DRAW:
+        case GL2ES2.GL_STREAM_DRAW:
+            break;
+        default:
+            throw new GLException("invalid gpuBufferUsage: "+vboUsage+":\n\t"+this); 
+    }
+    switch(vboTarget) {
+        case 0: // nop
+        case GL.GL_ARRAY_BUFFER:
+        case GL.GL_ELEMENT_ARRAY_BUFFER:
+            break;
+        default:
+            throw new GLException("invalid gpuBufferTarget: "+vboTarget+":\n\t"+this);
+    }
+    this.vboUsage=vboUsage;
+    this.vboTarget=vboTarget;    
+    this.alive=true;
   }
 
   protected GLArrayDataWrapper() { }
 
+  protected boolean alive;
   protected int index;
   protected int location;
   protected String name;
   protected int components;
-  protected int dataType;
+  protected int componentType;
+  protected Class componentClazz;
+  protected int componentByteSize;
   protected boolean normalized;
-  protected int stride;  // user given stride
   protected int strideB; // stride in bytes
   protected int strideL; // stride in logical components
-  protected Class clazz;
   protected Buffer buffer;
   protected boolean isVertexAttribute;
 
-  protected long bufferOffset;
+  protected long vboOffset;
   protected int vboName;
-  protected boolean vboUsage;
+  protected boolean vboEnabled;
+  protected int vboUsage;
+  protected int vboTarget;  
 }
 
diff --git a/src/jogl/classes/com/jogamp/opengl/util/GLArrayHandler.java b/src/jogl/classes/com/jogamp/opengl/util/GLArrayHandler.java
deleted file mode 100644
index bfabb5b..0000000
--- a/src/jogl/classes/com/jogamp/opengl/util/GLArrayHandler.java
+++ /dev/null
@@ -1,11 +0,0 @@
-
-package com.jogamp.opengl.util;
-
-import javax.media.opengl.*;
-
-public interface GLArrayHandler {
-
-  public void enableBuffer(GL gl, boolean enable);
-
-}
-
diff --git a/src/jogl/classes/com/jogamp/opengl/util/GLBuffers.java b/src/jogl/classes/com/jogamp/opengl/util/GLBuffers.java
index efe3a76..f2e742c 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/GLBuffers.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/GLBuffers.java
@@ -42,60 +42,145 @@ import com.jogamp.common.nio.Buffers;
 import javax.media.opengl.GL;
 import javax.media.opengl.GL2;
 import javax.media.opengl.GL2ES2;
+import javax.media.opengl.GL2GL3;
+import javax.media.opengl.GLException;
 
 import java.nio.*;
 
 /**
  * Utility routines for dealing with direct buffers.
  * @author Kenneth Russel
+ * @author Sven Gothel
  * @author Michael Bien
  */
 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 (25)         
+     * @return -1 if glType is unhandled, otherwise the actual value > 0 
+     */
     public static final int sizeOfGLType(int glType) {
-        switch (glType) {
-            case GL.GL_UNSIGNED_BYTE:
-                return SIZEOF_BYTE;
+        switch (glType) { // 25
             case GL.GL_BYTE:
+            case GL.GL_UNSIGNED_BYTE:
+            case GL2GL3.GL_UNSIGNED_BYTE_3_3_2:
+            case GL2GL3.GL_UNSIGNED_BYTE_2_3_3_REV:
                 return SIZEOF_BYTE;
-            case GL.GL_UNSIGNED_SHORT:
-                return SIZEOF_SHORT;
+                
             case GL.GL_SHORT:
+            case GL.GL_UNSIGNED_SHORT:
+            case GL.GL_UNSIGNED_SHORT_5_6_5:
+            case GL2GL3.GL_UNSIGNED_SHORT_5_6_5_REV:
+            case GL2GL3.GL_UNSIGNED_SHORT_4_4_4_4:
+            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:
                 return SIZEOF_SHORT;
-            case GL.GL_FLOAT:
-                return SIZEOF_FLOAT;
+                                
             case GL.GL_FIXED:
-                return SIZEOF_INT;
             case GL2ES2.GL_INT:
+            case GL.GL_UNSIGNED_INT:
+            case GL2GL3.GL_UNSIGNED_INT_8_8_8_8:
+            case GL2GL3.GL_UNSIGNED_INT_8_8_8_8_REV:
+            case GL2GL3.GL_UNSIGNED_INT_10_10_10_2:
+            case GL2GL3.GL_UNSIGNED_INT_2_10_10_10_REV:                
+            case GL2GL3.GL_UNSIGNED_INT_24_8:
+            case GL2GL3.GL_UNSIGNED_INT_10F_11F_11F_REV:
+            case GL2GL3.GL_UNSIGNED_INT_5_9_9_9_REV:
                 return SIZEOF_INT;
-            case GL2ES2.GL_UNSIGNED_INT:
-                return SIZEOF_INT;
+                
+            case GL2GL3.GL_FLOAT_32_UNSIGNED_INT_24_8_REV:
+                return SIZEOF_LONG;
+                
+            case GL.GL_FLOAT:
+                return SIZEOF_FLOAT;
+                
             case GL2.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 (25)         
+     * @return null if glType is unhandled, otherwise the new Buffer object 
+     */
     public static final Buffer newDirectGLBuffer(int glType, int numElements) {
         switch (glType) {
-            case GL.GL_UNSIGNED_BYTE:
             case GL.GL_BYTE:
+            case GL.GL_UNSIGNED_BYTE:
+            case GL2GL3.GL_UNSIGNED_BYTE_3_3_2:
+            case GL2GL3.GL_UNSIGNED_BYTE_2_3_3_REV:
                 return newDirectByteBuffer(numElements);
-            case GL.GL_UNSIGNED_SHORT:
+                
             case GL.GL_SHORT:
+            case GL.GL_UNSIGNED_SHORT:
+            case GL.GL_UNSIGNED_SHORT_5_6_5:
+            case GL2GL3.GL_UNSIGNED_SHORT_5_6_5_REV:
+            case GL2GL3.GL_UNSIGNED_SHORT_4_4_4_4:
+            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:
                 return newDirectShortBuffer(numElements);
-            case GL.GL_FLOAT:
-                return newDirectFloatBuffer(numElements);
+                
             case GL.GL_FIXED:
             case GL2ES2.GL_INT:
-            case GL2ES2.GL_UNSIGNED_INT:
+            case GL.GL_UNSIGNED_INT:
+            case GL2GL3.GL_UNSIGNED_INT_8_8_8_8:
+            case GL2GL3.GL_UNSIGNED_INT_8_8_8_8_REV:
+            case GL2GL3.GL_UNSIGNED_INT_10_10_10_2:
+            case GL2GL3.GL_UNSIGNED_INT_2_10_10_10_REV:
+            case GL2GL3.GL_UNSIGNED_INT_24_8:
+            case GL2GL3.GL_UNSIGNED_INT_10F_11F_11F_REV:
+            case GL2GL3.GL_UNSIGNED_INT_5_9_9_9_REV:
                 return newDirectIntBuffer(numElements);
+                
+            case GL2GL3.GL_FLOAT_32_UNSIGNED_INT_24_8_REV:
+                return newDirectLongBuffer(numElements);
+                
+            case GL.GL_FLOAT:
+                return newDirectFloatBuffer(numElements);
+                
             case GL2.GL_DOUBLE:
                 return newDirectDoubleBuffer(numElements);
         }
         return null;
     }
 
+    /**
+     * @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 (25)         
+     * @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) {
         if (parent == null || byteLen == 0) {
             return null;
@@ -104,24 +189,309 @@ public class GLBuffers extends Buffers {
         parent.limit(bytePos + byteLen);
 
         switch (glType) {
-            case GL.GL_UNSIGNED_BYTE:
             case GL.GL_BYTE:
+            case GL.GL_UNSIGNED_BYTE:
+            case GL2GL3.GL_UNSIGNED_BYTE_3_3_2:
+            case GL2GL3.GL_UNSIGNED_BYTE_2_3_3_REV:
                 return parent.slice();
-            case GL.GL_UNSIGNED_SHORT:
+                
             case GL.GL_SHORT:
+            case GL.GL_UNSIGNED_SHORT:
+            case GL.GL_UNSIGNED_SHORT_5_6_5:
+            case GL2GL3.GL_UNSIGNED_SHORT_5_6_5_REV:
+            case GL2GL3.GL_UNSIGNED_SHORT_4_4_4_4:
+            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:
                 return parent.asShortBuffer();
-            case GL.GL_FLOAT:
-                return parent.asFloatBuffer();
+                
             case GL.GL_FIXED:
-            case GL2ES2.GL_INT:
+            case GL2GL3.GL_INT:
             case GL2ES2.GL_UNSIGNED_INT:
+            case GL2GL3.GL_UNSIGNED_INT_8_8_8_8:
+            case GL2GL3.GL_UNSIGNED_INT_8_8_8_8_REV:
+            case GL2GL3.GL_UNSIGNED_INT_10_10_10_2:
+            case GL2GL3.GL_UNSIGNED_INT_2_10_10_10_REV:
+            case GL2GL3.GL_UNSIGNED_INT_24_8:
+            case GL2GL3.GL_UNSIGNED_INT_10F_11F_11F_REV:
+            case GL2GL3.GL_UNSIGNED_INT_5_9_9_9_REV:
                 return parent.asIntBuffer();
+                
+            case GL2GL3.GL_FLOAT_32_UNSIGNED_INT_24_8_REV:
+                return parent.asLongBuffer();
+                
+            case GL.GL_FLOAT:
+                return parent.asFloatBuffer();
+                
             case GL2.GL_DOUBLE:
                 return parent.asDoubleBuffer();
         }
         return null;
     }
 
+    private static final int glGetInteger(GL gl, int pname, int[] tmp) {
+        gl.glGetIntegerv(pname, tmp, 0);
+        return tmp[0];
+    }
+    
+    /** 
+     * Returns the number of bytes required to read/write a memory buffer via OpenGL
+     * using the current GL pixel storage state and the given parameters.
+     * 
+     * <p>This method is security critical, hence it throws an exception (fail-fast)
+     * in case of an invalid alignment. In case we forgot to handle 
+     * proper values, please contact the maintainer.</p> 
+     *   
+     * @param gl the current GL object
+     * 
+     * @param tmp a pass through integer array of size >= 1 used to store temp data (performance)
+     * 
+     * @param bytesPerElement bytes per element
+     * @param width in pixels
+     * @param height in pixels
+     * @param depth in pixels
+     * @param pack true for read mode GPU -> CPU (pack), otherwise false for write mode CPU -> GPU (unpack)  
+     * @return required minimum size of the buffer in bytes
+     * @throws GLException if alignment is invalid. Please contact the maintainer if this is our bug.
+     */
+    public static final int sizeof(GL gl, int tmp[], 
+                                   int bytesPerElement, int width, int height, int depth, 
+                                   boolean pack) {
+        int rowLength = 0;
+        int skipRows = 0;
+        int skipPixels = 0;
+        int alignment = 1;
+        int imageHeight = 0;
+        int skipImages = 0;
+  
+        if (pack) {          
+          alignment = glGetInteger(gl, GL.GL_PACK_ALIGNMENT, tmp);
+          if(gl.isGL2GL3()) {
+              rowLength = glGetInteger(gl, GL2GL3.GL_PACK_ROW_LENGTH, tmp);
+              skipRows = glGetInteger(gl, GL2GL3.GL_PACK_SKIP_ROWS, tmp);              
+              skipPixels = glGetInteger(gl, GL2GL3.GL_PACK_SKIP_PIXELS, tmp);
+              if (depth > 1) {                  
+                  imageHeight = glGetInteger(gl, GL2GL3.GL_PACK_IMAGE_HEIGHT, tmp);                  
+                  skipImages = glGetInteger(gl, GL2GL3.GL_PACK_SKIP_IMAGES, tmp);
+              }
+          }
+        } else {          
+          alignment = glGetInteger(gl, GL.GL_UNPACK_ALIGNMENT, tmp);
+          if(gl.isGL2GL3 ()) {              
+              rowLength = glGetInteger(gl, GL2GL3.GL_UNPACK_ROW_LENGTH, tmp);              
+              skipRows = glGetInteger(gl, GL2GL3.GL_UNPACK_SKIP_ROWS, tmp);              
+              skipPixels = glGetInteger(gl, GL2GL3.GL_UNPACK_SKIP_PIXELS, tmp);
+              if (depth > 1) {                  
+                  imageHeight = glGetInteger(gl, GL2GL3.GL_UNPACK_IMAGE_HEIGHT, tmp);                  
+                  skipImages = glGetInteger(gl, GL2GL3.GL_UNPACK_SKIP_IMAGES, tmp);
+               }
+          }
+        }
+          
+        // Try to deal somewhat correctly with potentially invalid values
+        width       = Math.max(0, width );
+        height      = Math.max(1, height); // min 1D
+        depth       = Math.max(1, depth ); // min 1 * imageSize
+        skipRows    = Math.max(0, skipRows);
+        skipPixels  = Math.max(0, skipPixels);
+        alignment   = Math.max(1, alignment);
+        skipImages  = Math.max(0, skipImages);
+  
+        imageHeight = ( imageHeight > 0 ) ? imageHeight : height;
+        rowLength   = ( rowLength   > 0 ) ? rowLength   : width;
+  
+        int rowLengthInBytes = rowLength  * bytesPerElement;
+        int skipBytes        = skipPixels * bytesPerElement;
+        
+        switch(alignment) {
+            case 1:
+                break;
+            case 2:
+            case 4:
+            case 8: {
+                    // x % 2n == x & (2n - 1)
+                    int remainder = rowLengthInBytes & ( alignment - 1 );
+                    if (remainder > 0) {
+                        rowLengthInBytes += alignment - remainder;
+                    }
+                    remainder = skipBytes & ( alignment - 1 );
+                    if (remainder > 0) {
+                        skipBytes += alignment - remainder;
+                    }
+                } 
+                break;
+            default:
+                throw new GLException("Invalid alignment "+alignment+", must be 2**n (1,2,4,8). Pls notify the maintainer in case this is our bug.");        
+        }
+  
+        /**
+         * skipImages, depth, skipPixels and skipRows are static offsets.
+         *
+         * skipImages and depth are in multiples of image size.
+         *
+         * skipBytes and rowLengthInBytes are aligned
+         * 
+         * rowLengthInBytes is the aligned byte offset 
+         * from line n to line n+1 at the same x-axis position.
+         */
+        return
+            skipBytes +                                                  // aligned skipPixels * bpp
+          ( skipImages + depth  - 1 ) * imageHeight * rowLengthInBytes + // aligned whole images 
+          ( skipRows   + height - 1 ) * rowLengthInBytes +               // aligned lines
+            width                     * bytesPerElement;                 // last line        
+    }
+  
+    /** 
+     * Returns the number of bytes required to read/write a memory buffer via OpenGL
+     * using the current GL pixel storage state and the given parameters.
+     * 
+     * <p>This method is security critical, hence it throws an exception (fail-fast)
+     * in case either the format, type or alignment is unhandled. In case we forgot to handle 
+     * proper values, please contact the maintainer.</p> 
+     *   
+     * @param gl the current GL object
+     * 
+     * @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 (24)
+     *           
+     * @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 (26)         
+     * 
+     * @param width in pixels
+     * @param height in pixels
+     * @param depth in pixels
+     * @param pack true for read mode GPU -> CPU, otherwise false for write mode CPU -> GPU  
+     * @return required minimum size of the buffer in bytes
+     * @throws GLException if format, type or alignment is not handled. Please contact the maintainer if this is our bug.
+     */
+    public static final int sizeof(GL gl, int tmp[], 
+                                   int format, int type, int width, int height, int depth,
+                                   boolean pack) throws GLException {
+        int elements = 0;
+        int esize = 0;
+
+        if (width < 0) return 0;
+        if (height < 0) return 0;
+        if (depth < 0) return 0;
+        
+        switch (format) /* 24 */ {
+            case GL2.GL_COLOR_INDEX:
+            case GL2GL3.GL_STENCIL_INDEX:
+            case GL2GL3.GL_DEPTH_COMPONENT:
+            case GL2GL3.GL_DEPTH_STENCIL:
+            case GL2GL3.GL_RED:
+            case GL2GL3.GL_RED_INTEGER:
+            case GL2GL3.GL_GREEN:
+            case GL2GL3.GL_GREEN_INTEGER:
+            case GL2GL3.GL_BLUE:
+            case GL2GL3.GL_BLUE_INTEGER:
+            case GL.GL_ALPHA:
+            case GL.GL_LUMINANCE:
+              elements = 1;
+              break;
+            case GL.GL_LUMINANCE_ALPHA:
+            case GL2GL3.GL_RG:
+            case GL2GL3.GL_RG_INTEGER:
+              elements = 2;
+              break;
+            case GL.GL_RGB:
+            case GL2GL3.GL_RGB_INTEGER:
+            case GL2GL3.GL_BGR:
+            case GL2GL3.GL_BGR_INTEGER: 
+              elements = 3;
+              break;
+            case GL.GL_RGBA:
+            case GL2GL3.GL_RGBA_INTEGER:
+            case GL2GL3.GL_BGRA:
+            case GL2GL3.GL_BGRA_INTEGER:
+            case GL2.GL_ABGR_EXT:
+              elements = 4;
+              break;
+            /* FIXME ?? 
+             case GL.GL_HILO_NV:
+              elements = 2;
+              break; */              
+            default:
+              throw new GLException("format 0x"+Integer.toHexString(format)+" not supported [yet], pls notify the maintainer in case this is our bug.");
+        }
+                
+        switch (type) /* 26 */ {
+            case GL2.GL_BITMAP:
+              if (GL2.GL_COLOR_INDEX == format || GL2GL3.GL_STENCIL_INDEX == format) {
+                return (depth * (height * ((width+7)/8)));
+              }
+            case GL.GL_BYTE:
+            case GL.GL_UNSIGNED_BYTE:                
+              esize = 1;
+              break;
+            case GL.GL_SHORT:
+            case GL.GL_UNSIGNED_SHORT:
+            case GL.GL_HALF_FLOAT:
+              esize = 2;
+              break;
+            case GL2ES2.GL_INT:
+            case GL.GL_UNSIGNED_INT:
+            case GL.GL_FLOAT:
+              esize = 4;
+              break;
+            case GL2GL3.GL_DOUBLE:
+              esize = 8;
+              break;
+              
+            case GL2GL3.GL_UNSIGNED_BYTE_3_3_2:
+            case GL2GL3.GL_UNSIGNED_BYTE_2_3_3_REV:
+              esize = 1;
+              elements = 1;
+              break;
+            case GL.GL_UNSIGNED_SHORT_5_6_5:
+            case GL2GL3.GL_UNSIGNED_SHORT_5_6_5_REV:
+            case GL2GL3.GL_UNSIGNED_SHORT_4_4_4_4:
+            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:
+              esize = 2;
+              elements = 1;
+              break;
+            case GL2GL3.GL_UNSIGNED_INT_8_8_8_8:
+            case GL2GL3.GL_UNSIGNED_INT_8_8_8_8_REV:
+            case GL2GL3.GL_UNSIGNED_INT_10_10_10_2:
+            case GL2GL3.GL_UNSIGNED_INT_2_10_10_10_REV:
+            case GL2GL3.GL_UNSIGNED_INT_24_8:
+            case GL2GL3.GL_UNSIGNED_INT_10F_11F_11F_REV:
+            case GL2GL3.GL_UNSIGNED_INT_5_9_9_9_REV:
+              esize = 4;
+              elements = 1;
+              break;              
+            case GL2GL3.GL_FLOAT_32_UNSIGNED_INT_24_8_REV:
+              esize = 8;
+              elements = 1;
+              break;              
+                
+            default:
+              throw new GLException("type 0x"+Integer.toHexString(type)+"/"+"format 0x"+Integer.toHexString(format)+" not supported [yet], pls notify the maintainer in case this is our bug.");
+        }
+        
+        return sizeof(gl, tmp, elements * esize, width, height, depth, pack);
+    }
+      
     //----------------------------------------------------------------------
     // Conversion routines
     //
diff --git a/src/jogl/classes/com/jogamp/opengl/util/GLFixedArrayHandler.java b/src/jogl/classes/com/jogamp/opengl/util/GLFixedArrayHandler.java
deleted file mode 100644
index f0f5ea8..0000000
--- a/src/jogl/classes/com/jogamp/opengl/util/GLFixedArrayHandler.java
+++ /dev/null
@@ -1,65 +0,0 @@
-
-package com.jogamp.opengl.util;
-
-import javax.media.opengl.*;
-import javax.media.opengl.fixedfunc.*;
-import com.jogamp.opengl.util.*;
-import java.nio.*;
-
-public class GLFixedArrayHandler implements GLArrayHandler {
-  private GLArrayDataEditable ad;
-
-  public GLFixedArrayHandler(GLArrayDataEditable ad) {
-    this.ad = ad;
-  }
-
-  protected final void passArrayPointer(GLPointerFunc gl) {
-    switch(ad.getIndex()) {
-        case GLPointerFunc.GL_VERTEX_ARRAY:
-            gl.glVertexPointer(ad);
-            break;
-        case GLPointerFunc.GL_NORMAL_ARRAY:
-            gl.glNormalPointer(ad);
-            break;
-        case GLPointerFunc.GL_COLOR_ARRAY:
-            gl.glColorPointer(ad);
-            break;
-        case GLPointerFunc.GL_TEXTURE_COORD_ARRAY:
-            gl.glTexCoordPointer(ad);
-            break;
-        default:
-            throw new GLException("invalid glArrayIndex: "+ad.getIndex()+":\n\t"+ad); 
-    }
-  }
-
-  public void enableBuffer(GL gl, boolean enable) {
-    GLPointerFunc glp = gl.getGL2ES1();
-    if(enable) {
-        glp.glEnableClientState(ad.getIndex());
-
-        Buffer buffer = ad.getBuffer();
-
-        if(ad.isVBO()) {
-            // always bind and refresh the VBO mgr, 
-            // in case more than one gl*Pointer objects are in use
-            gl.glBindBuffer(GL.GL_ARRAY_BUFFER, ad.getVBOName());
-            if(!ad.isBufferWritten()) {
-                if(null!=buffer) {
-                    gl.glBufferData(GL.GL_ARRAY_BUFFER, buffer.limit() * ad.getComponentSize(), buffer, ad.getBufferUsage());
-                }
-                ad.setBufferWritten(true);
-            }
-            passArrayPointer(glp);
-        } else if(null!=buffer) {
-            passArrayPointer(glp);
-            ad.setBufferWritten(true);
-        }
-    } else {
-        if(ad.isVBO()) {
-            gl.glBindBuffer(GL.GL_ARRAY_BUFFER, 0);
-        }
-        glp.glDisableClientState(ad.getIndex());
-    }
-  }
-}
-
diff --git a/src/jogl/classes/com/jogamp/opengl/util/GLPixelStorageModes.java b/src/jogl/classes/com/jogamp/opengl/util/GLPixelStorageModes.java
new file mode 100644
index 0000000..05eb672
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/util/GLPixelStorageModes.java
@@ -0,0 +1,136 @@
+/**
+ * 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.util;
+
+import javax.media.opengl.GL;
+import javax.media.opengl.GL2;
+import javax.media.opengl.GL2ES2;
+import javax.media.opengl.GL2GL3;
+import javax.media.opengl.GLException;
+
+/**
+ * Utility to safely set and restore the pack and unpack pixel storage mode,
+ * regardless of the GLProfile.
+ */
+public class GLPixelStorageModes {
+    private int[] savedGL2GL3Modes = new int[8];
+    private int[] savedAlignment = new int[2];
+    private boolean saved = false;
+
+    /**
+     * Sets the {@link GL2ES2.GL_PACK_ALIGNMENT}. Saves the pixel storage modes if not saved yet.
+     */
+    public final void setPackAlignment(GL gl, int packAlignment) {
+        if(!saved) { save(gl); }
+        gl.glPixelStorei(GL2ES2.GL_PACK_ALIGNMENT, packAlignment);        
+    }
+
+    /**
+     * Sets the {@link GL2ES2.GL_UNPACK_ALIGNMENT}. Saves the pixel storage modes if not saved yet.
+     */
+    public final void setUnpackAlignment(GL gl, int unpackAlignment) {
+        if(!saved) { save(gl); }
+        gl.glPixelStorei(GL2ES2.GL_UNPACK_ALIGNMENT, unpackAlignment);        
+    }
+    
+    /**
+     * Sets the {@link GL2ES2.GL_PACK_ALIGNMENT} and {@link GL2ES2.GL_UNPACK_ALIGNMENT}. 
+     * Saves the pixel storage modes if not saved yet.
+     */
+    public final void setAlignment(GL gl, int packAlignment, int unpackAlignment) {
+        setPackAlignment(gl, packAlignment);
+        setUnpackAlignment(gl, unpackAlignment);
+    }
+    
+    private final void save(GL gl) {
+        if(gl.isGL2GL3()) {  
+            if(gl.isGL2()) {
+                gl.getGL2().glPushClientAttrib(GL2.GL_CLIENT_PIXEL_STORE_BIT);
+            } else {
+                gl.glGetIntegerv(GL2ES2.GL_PACK_ALIGNMENT,     savedAlignment,   0);
+                gl.glGetIntegerv(GL2ES2.GL_UNPACK_ALIGNMENT,   savedAlignment,   1);
+                gl.glGetIntegerv(GL2GL3.GL_PACK_ROW_LENGTH,    savedGL2GL3Modes, 0);
+                gl.glGetIntegerv(GL2GL3.GL_PACK_SKIP_ROWS,     savedGL2GL3Modes, 1);
+                gl.glGetIntegerv(GL2GL3.GL_PACK_SKIP_PIXELS,   savedGL2GL3Modes, 2);
+                gl.glGetIntegerv(GL2GL3.GL_PACK_SWAP_BYTES,    savedGL2GL3Modes, 3);
+                gl.glGetIntegerv(GL2GL3.GL_UNPACK_ROW_LENGTH,  savedGL2GL3Modes, 4);
+                gl.glGetIntegerv(GL2GL3.GL_UNPACK_SKIP_ROWS,   savedGL2GL3Modes, 5);
+                gl.glGetIntegerv(GL2GL3.GL_UNPACK_SKIP_PIXELS, savedGL2GL3Modes, 6);
+                gl.glGetIntegerv(GL2GL3.GL_UNPACK_SWAP_BYTES,  savedGL2GL3Modes, 7);
+            }
+            gl.glPixelStorei(GL2GL3.GL_PACK_ROW_LENGTH, 0);
+            gl.glPixelStorei(GL2GL3.GL_PACK_SKIP_ROWS, 0);
+            gl.glPixelStorei(GL2GL3.GL_PACK_SKIP_PIXELS, 0);
+            gl.glPixelStorei(GL2GL3.GL_PACK_SWAP_BYTES, 0);
+            gl.glPixelStorei(GL2GL3.GL_UNPACK_ROW_LENGTH, 0);
+            gl.glPixelStorei(GL2GL3.GL_UNPACK_SKIP_ROWS, 0);
+            gl.glPixelStorei(GL2GL3.GL_UNPACK_SKIP_PIXELS, 0);
+            gl.glPixelStorei(GL2GL3.GL_UNPACK_SWAP_BYTES, 0);
+        } else {
+            // embedded deals with pack/unpack alignment only
+            gl.glGetIntegerv(GL2ES2.GL_PACK_ALIGNMENT,   savedAlignment, 0);
+            gl.glGetIntegerv(GL2ES2.GL_UNPACK_ALIGNMENT, savedAlignment, 1);
+        }        
+        saved = true;
+    }
+
+    /**
+     * Restores the pixel storage mode.
+     * @throws GLException if not saved via one of the set methods.
+     */
+    public final void restore(GL gl) throws GLException {
+        if(!saved) {
+            throw new GLException("pixel storage modes not saved");
+        }
+        
+        if(gl.isGL2GL3()) {  
+            if(gl.isGL2()) {
+                gl.getGL2().glPopClientAttrib();
+            } else {
+                gl.glPixelStorei(GL2ES2.GL_PACK_ALIGNMENT,     savedAlignment[0]);
+                gl.glPixelStorei(GL2ES2.GL_UNPACK_ALIGNMENT,   savedAlignment[1]);
+                gl.glPixelStorei(GL2GL3.GL_PACK_ROW_LENGTH,    savedGL2GL3Modes[0]);
+                gl.glPixelStorei(GL2GL3.GL_PACK_SKIP_ROWS,     savedGL2GL3Modes[1]);
+                gl.glPixelStorei(GL2GL3.GL_PACK_SKIP_PIXELS,   savedGL2GL3Modes[2]);
+                gl.glPixelStorei(GL2GL3.GL_PACK_SWAP_BYTES,    savedGL2GL3Modes[3]);
+                gl.glPixelStorei(GL2GL3.GL_UNPACK_ROW_LENGTH,  savedGL2GL3Modes[4]);
+                gl.glPixelStorei(GL2GL3.GL_UNPACK_SKIP_ROWS,   savedGL2GL3Modes[5]);
+                gl.glPixelStorei(GL2GL3.GL_UNPACK_SKIP_PIXELS, savedGL2GL3Modes[6]);
+                gl.glPixelStorei(GL2GL3.GL_UNPACK_SWAP_BYTES,  savedGL2GL3Modes[7]);
+            }
+        } else {
+            // embedded deals with pack/unpack alignment only
+            gl.glPixelStorei(GL2ES2.GL_PACK_ALIGNMENT,   savedAlignment[0]);
+            gl.glPixelStorei(GL2ES2.GL_UNPACK_ALIGNMENT, savedAlignment[1]);
+        }        
+        saved = false;
+    }      
+}
+
+
diff --git a/src/jogl/classes/com/jogamp/opengl/util/GLReadBufferUtil.java b/src/jogl/classes/com/jogamp/opengl/util/GLReadBufferUtil.java
new file mode 100644
index 0000000..e5cf7d0
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/opengl/util/GLReadBufferUtil.java
@@ -0,0 +1,181 @@
+/**
+ * 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.util;
+
+import com.jogamp.common.nio.Buffers;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.*;
+import javax.media.opengl.*;
+
+import com.jogamp.opengl.util.texture.Texture;
+import com.jogamp.opengl.util.texture.TextureData;
+import com.jogamp.opengl.util.texture.TextureIO;
+
+/**
+ * Utility to read out the current FB to TextureData, optionally writing the data back to a texture object.
+ * <p>May be used directly to write the TextureData to file (screenshot).</p>
+ */
+public class GLReadBufferUtil {
+    protected final int components, alignment; 
+    protected final Texture readTexture;
+    protected final GLPixelStorageModes psm;
+    
+    protected int readPixelSizeLast = 0;
+    protected ByteBuffer readPixelBuffer = null;
+    protected TextureData readTextureData = null;
+
+    /**
+     * @param alpha true for RGBA readPixels, otherwise RGB readPixels 
+     * @param write2Texture true if readPixel's TextureData shall be written to a 2d Texture
+     */
+    public GLReadBufferUtil(boolean alpha, boolean write2Texture) {
+        components = alpha ? 4 : 3 ;
+        alignment = alpha ? 4 : 1 ; 
+        readTexture = write2Texture ? new Texture(GL.GL_TEXTURE_2D) : null ;
+        psm = new GLPixelStorageModes();
+    }
+    
+    public boolean isValid() {
+      return null!=readTextureData && null!=readPixelBuffer ;
+    }
+    
+    /**
+     * @return the raw pixel ByteBuffer, filled by {@link #readPixels(GLAutoDrawable, boolean)}
+     */
+    public ByteBuffer getPixelBuffer() { return readPixelBuffer; }
+    
+    /**
+     * rewind the raw pixel ByteBuffer
+     */
+    public void rewindPixelBuffer() { if( null != readPixelBuffer ) { readPixelBuffer.rewind(); } }
+
+    /**
+     * @return the resulting TextureData, filled by {@link #readPixels(GLAutoDrawable, boolean)}
+     */
+    public TextureData getTextureData() { return readTextureData; }
+    
+    /**
+     * @return the Texture object filled by {@link #readPixels(GLAutoDrawable, boolean)},
+     *         if this instance writes to a 2d Texture, otherwise null.
+     * @see #GLReadBufferUtil(boolean, boolean)
+     */
+    public Texture getTexture() { return readTexture; }
+
+    /**
+     * Write the TextureData filled by {@link #readPixels(GLAutoDrawable, boolean)} to file
+     */
+    public void write(File dest) {
+        try {
+            TextureIO.write(readTextureData, dest);
+            rewindPixelBuffer();
+        } catch (IOException ex) {
+            throw new RuntimeException("can not write to file: " + dest.getAbsolutePath(), ex);
+        }
+    }
+
+    /**
+     * Read the drawable's pixels to TextureData and Texture, if requested at construction
+     * 
+     * @param gl the current GL object
+     * @param drawable the drawable to read from
+     * @param flip weather to flip the data vertically or not
+     * 
+     * @see #GLReadBufferUtil(boolean, boolean)
+     */
+    public void readPixels(GL gl, GLDrawable drawable, boolean flip) {
+        final int textureInternalFormat, textureDataFormat;
+        final int textureDataType = GL.GL_UNSIGNED_BYTE;
+        if(4 == components) {
+            textureInternalFormat=GL.GL_RGBA;
+            textureDataFormat=GL.GL_RGBA;
+        } else {
+            textureInternalFormat=GL.GL_RGB;
+            textureDataFormat=GL.GL_RGB;
+        }
+        final int readPixelSize = drawable.getWidth() * drawable.getHeight() * components ;
+        boolean newData = false;
+        if(readPixelSize>readPixelSizeLast) {
+            readPixelBuffer = Buffers.newDirectByteBuffer(readPixelSize);
+            readPixelSizeLast = readPixelSize ;
+            try {
+                readTextureData = new TextureData(
+                           gl.getGLProfile(),
+                           textureInternalFormat,
+                           drawable.getWidth(), drawable.getHeight(),
+                           0, 
+                           textureDataFormat,
+                           textureDataType,
+                           false, false, 
+                           flip,
+                           readPixelBuffer,
+                           null /* Flusher */);
+                newData = true;
+            } catch (Exception e) {
+                readTextureData = null;
+                readPixelBuffer = null;
+                readPixelSizeLast = 0;
+                throw new RuntimeException("can not fetch offscreen texture", e);
+            }
+        }
+        if(null!=readPixelBuffer) {
+            psm.setAlignment(gl, alignment, alignment);
+            readPixelBuffer.clear();
+            gl.glReadPixels(0, 0, drawable.getWidth(), drawable.getHeight(), textureDataFormat, textureDataType, readPixelBuffer);
+            readPixelBuffer.rewind();
+            if(null != readTexture) {
+                if(newData) {
+                    readTexture.updateImage(gl, readTextureData);
+                } else {
+                    readTexture.updateSubImage(gl, readTextureData, 0, 
+                                               0, 0, // src offset
+                                               0, 0, // dst offset
+                                               drawable.getWidth(), drawable.getHeight());
+                }
+                readPixelBuffer.rewind();
+            }
+            psm.restore(gl);
+        }
+    }
+
+    public void dispose(GL gl) {  
+        if(null != readTexture) {
+            readTexture.destroy(gl);
+            readTextureData = null;
+        }
+        if(null != readPixelBuffer) {
+            readPixelBuffer.clear();
+            readPixelBuffer = null;
+        }
+        readPixelSizeLast = 0;
+    }
+
+}
+
diff --git a/src/jogl/classes/com/jogamp/opengl/util/ImmModeSink.java b/src/jogl/classes/com/jogamp/opengl/util/ImmModeSink.java
index d9fce6e..681cf7c 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/ImmModeSink.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/ImmModeSink.java
@@ -2,6 +2,8 @@
 package com.jogamp.opengl.util;
 
 import com.jogamp.common.util.*;
+import com.jogamp.opengl.util.glsl.ShaderState;
+
 import javax.media.opengl.*;
 import javax.media.opengl.fixedfunc.*;
 import java.nio.*;
@@ -35,8 +37,8 @@ public class ImmModeSink {
    * a ShaderState must be current, using ShaderState.glUseProgram().
    *
    * @see #draw(GL, boolean)
-   * @see com.jogamp.opengl.util.glsl.ShaderState#glUseProgram(GL2ES2, boolean)
-   * @see com.jogamp.opengl.util.glsl.ShaderState#getCurrent()
+   * @see com.jogamp.opengl.util.glsl.ShaderState#useProgram(GL2ES2, boolean)
+   * @see com.jogamp.opengl.util.glsl.ShaderState#getCurrentShaderState()
    */
   public static ImmModeSink createGLSL(GL gl, int glBufferUsage, int initialSize,
                                        int vComps, int vDataType,
@@ -301,8 +303,8 @@ public class ImmModeSink {
 
         this.sealed=false;
         this.sealedGL=false;
-        this.mode = -1;
-        this.modeOrig = -1;
+        this.mode = 0;
+        this.modeOrig = 0;
         this.bufferEnabled=false;
         this.bufferWritten=false;
     }
@@ -313,7 +315,7 @@ public class ImmModeSink {
     }
 
     protected void checkSeal(boolean test) throws GLException {
-        if(mode<0) {
+        if(0==mode) {
                 throw new GLException("No mode set yet, call glBegin(mode) first:\n\t"+this); 
         }
         if(sealed!=test) {
@@ -640,8 +642,8 @@ public class ImmModeSink {
         }
         rewind();
 
-        this.mode = -1;
-        this.modeOrig = -1;
+        this.mode = 0;
+        this.modeOrig = 0;
         this.sealed=false;
         this.bufferEnabled=false;
         this.bufferWritten=false;
@@ -745,11 +747,11 @@ public class ImmModeSink {
   }
 
   public void enableBufferGLSL(GL gl, boolean enable) {
-    GL2ES2 glsl = gl.getGL2ES2();
-    com.jogamp.opengl.util.glsl.ShaderState st = com.jogamp.opengl.util.glsl.ShaderState.getCurrent();
+    ShaderState st = ShaderState.getShaderState(gl);
     if(null==st) {
-        throw new GLException("No ShaderState current");
-    }
+        throw new GLException("No ShaderState in "+gl);
+    }      
+    GL2ES2 glsl = gl.getGL2ES2();
  
     if(enable) {
         glsl.glBindBuffer(GL.GL_ARRAY_BUFFER, vboName);
@@ -760,35 +762,35 @@ public class ImmModeSink {
         }
 
         if(vComps>0) {
-           st.glEnableVertexAttribArray(glsl, vArrayData.getName());
-           st.glVertexAttribPointer(glsl, vArrayData);
+           st.enableVertexAttribArray(glsl, vArrayData);
+           st.vertexAttribPointer(glsl, vArrayData);
         }
         if(cComps>0) {
-           st.glEnableVertexAttribArray(glsl, cArrayData.getName());
-           st.glVertexAttribPointer(glsl, cArrayData);
+           st.enableVertexAttribArray(glsl, cArrayData);
+           st.vertexAttribPointer(glsl, cArrayData);
         }
         if(nComps>0) {
-           st.glEnableVertexAttribArray(glsl, nArrayData.getName());
-           st.glVertexAttribPointer(glsl, nArrayData);
+           st.enableVertexAttribArray(glsl, nArrayData);
+           st.vertexAttribPointer(glsl, nArrayData);
         }
         if(tComps>0) {
-           st.glEnableVertexAttribArray(glsl, tArrayData.getName());
-           st.glVertexAttribPointer(glsl, tArrayData);
+           st.enableVertexAttribArray(glsl, tArrayData);
+           st.vertexAttribPointer(glsl, tArrayData);
         }
 
         glsl.glBindBuffer(GL.GL_ARRAY_BUFFER, 0);
     } else {
         if(vComps>0) {
-           st.glDisableVertexAttribArray(glsl, vArrayData.getName());
+           st.disableVertexAttribArray(glsl, vArrayData);
         }
         if(cComps>0) {
-           st.glDisableVertexAttribArray(glsl, cArrayData.getName());
+           st.disableVertexAttribArray(glsl, cArrayData);
         }
         if(nComps>0) {
-           st.glDisableVertexAttribArray(glsl, nArrayData.getName());
+           st.disableVertexAttribArray(glsl, nArrayData);
         }
         if(tComps>0) {
-           st.glDisableVertexAttribArray(glsl, tArrayData.getName());
+           st.disableVertexAttribArray(glsl, tArrayData);
         }
     }
   }
@@ -860,26 +862,26 @@ public class ImmModeSink {
         buffer.flip();
 
         if(vComps>0) {
-            vArrayData = GLArrayDataWrapper.createFixed(gl, GLPointerFunc.GL_VERTEX_ARRAY, vComps, vDataType, false,
-                                                        0, vertexArray, 0, vOffset);
+            vArrayData = GLArrayDataWrapper.createFixed(GLPointerFunc.GL_VERTEX_ARRAY, vComps, vDataType, false, 0,
+                                                        vertexArray, 0, vOffset, GL.GL_STATIC_DRAW, GL.GL_ARRAY_BUFFER);
         } else {
             vArrayData = null;
         }
         if(cComps>0) {
-            cArrayData = GLArrayDataWrapper.createFixed(gl, GLPointerFunc.GL_COLOR_ARRAY, cComps, cDataType, false,
-                                                        0, colorArray, 0, cOffset);
+            cArrayData = GLArrayDataWrapper.createFixed(GLPointerFunc.GL_COLOR_ARRAY, cComps, cDataType, false, 0,
+                                                        colorArray, 0, cOffset, GL.GL_STATIC_DRAW, GL.GL_ARRAY_BUFFER);
         } else {
             cArrayData = null;
         }
         if(nComps>0) {
-            nArrayData = GLArrayDataWrapper.createFixed(gl, GLPointerFunc.GL_NORMAL_ARRAY, nComps, nDataType, false,
-                                                        0, normalArray, 0, nOffset);
+            nArrayData = GLArrayDataWrapper.createFixed(GLPointerFunc.GL_NORMAL_ARRAY, nComps, nDataType, false, 0,
+                                                        normalArray, 0, nOffset, GL.GL_STATIC_DRAW, GL.GL_ARRAY_BUFFER);
         } else {
             nArrayData = null;
         }
         if(tComps>0) {
-            tArrayData = GLArrayDataWrapper.createFixed(gl, GLPointerFunc.GL_TEXTURE_COORD_ARRAY, tComps, tDataType, false,
-                                                        0, textCoordArray, 0, tOffset);
+            tArrayData = GLArrayDataWrapper.createFixed(GLPointerFunc.GL_TEXTURE_COORD_ARRAY, tComps, tDataType, false, 0,
+                                                        textCoordArray, 0, tOffset, GL.GL_STATIC_DRAW, GL.GL_ARRAY_BUFFER);
         } else {
             tArrayData = null;
         }
diff --git a/src/jogl/classes/com/jogamp/opengl/util/Locator.java b/src/jogl/classes/com/jogamp/opengl/util/Locator.java
deleted file mode 100644
index c524c08..0000000
--- a/src/jogl/classes/com/jogamp/opengl/util/Locator.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Copyright (c) 2009 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.
- * 
- */
-
-package com.jogamp.opengl.util;
-
-import java.util.*;
-import java.nio.*;
-import java.io.*;
-import java.net.*;
-
-/** Utilities for dealing with resources. */
-
-public class Locator {
-    private Locator() {}
-
-    /**
-     * Locates the resource using 'getResource(String path, ClassLoader cl)',
-     * with this context ClassLoader and the path as is,
-     * as well with the context's package name path plus the path.
-     *
-     * @see #getResource(String, ClassLoader)
-     */
-    public static URL getResource(Class context, String path) {
-        ClassLoader contextCL = (null!=context)?context.getClassLoader():null;
-        URL url = getResource(path, contextCL);
-        if (url == null && null!=context) {
-            // Try again by scoping the path within the class's package
-            String className = context.getName().replace('.', '/');
-            int lastSlash = className.lastIndexOf('/');
-            if (lastSlash >= 0) {
-                String tmpPath = className.substring(0, lastSlash + 1) + path;
-                url = getResource(tmpPath, contextCL);
-            }
-        }
-        return url;
-    }
-
-    /**
-     * Locates the resource using the ClassLoader's facility,
-     * the absolute URL and absolute file.
-     *
-     * @see ClassLoader#getResource(String)
-     * @see ClassLoader#getSystemResource(String)
-     * @see URL#URL(String)
-     * @see File#File(String)
-     */
-    public static URL getResource(String path, ClassLoader cl) {
-        URL url = null;
-        if (cl != null) {
-            url = cl.getResource(path);
-        } else {
-            url = ClassLoader.getSystemResource(path);
-        }
-        if(!urlExists(url)) {
-            url = null;
-            try {
-                url = new URL(path);
-            } catch (MalformedURLException e) { }
-        }
-        if(!urlExists(url)) {
-            url = null;
-            try {
-                File file = new File(path);
-                if(file.exists()) {
-                    url = file.toURL();
-                }
-            } catch (MalformedURLException e) {}
-        }
-        return url;
-    }
-
-    /**
-     * Generates a path for the 'relativeFile' relative to the 'absoluteFileLocation'
-     */
-    public static String getRelativeOf(String absoluteFileLocation, String relativeFile) {
-        File file = new File(absoluteFileLocation);
-        file = file.getParentFile();
-        while (file != null && relativeFile.startsWith("../")) {
-            file = file.getParentFile();
-            relativeFile = relativeFile.substring(3);
-        }
-        if (file != null) {
-            String res = new File(file, relativeFile).getPath();
-	        // Handle things on Windows
-            return res.replace('\\', '/');
-        } else {
-            return relativeFile;
-        }
-    }
-
-    /**
-     * Returns true, if the url exists,
-     * trying to open a connection.
-     */
-    public static boolean urlExists(URL url) {
-        boolean v = false;
-        if(null!=url) {
-            try {
-                URLConnection uc = url.openConnection();
-                v = true;
-            } catch (IOException ioe) { }
-        }
-        return v;
-    }
-
-}
-
diff --git a/src/jogl/classes/com/jogamp/opengl/util/PMVMatrix.java b/src/jogl/classes/com/jogamp/opengl/util/PMVMatrix.java
index 0e1b792..aba6c90 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/PMVMatrix.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/PMVMatrix.java
@@ -48,54 +48,42 @@ public class PMVMatrix implements GLMatrixFunc {
     public PMVMatrix() {
           projectFloat = new ProjectFloat();
 
-          matrixIdent = Buffers.newDirectFloatBuffer(1*16);
-          projectFloat.gluMakeIdentityf(matrixIdent);
-          matrixIdent.rewind();
-
+          // I    Identity
           // T    Texture
           // P    Projection
           // Mv   ModelView
           // Mvi  Modelview-Inverse
           // Mvit Modelview-Inverse-Transpose
-          // Pmv  P * Mv
-          matrixTPMvMvitPmv = Buffers.newDirectFloatBuffer(6*16);     // grouping T + P  + Mv + Mvi + Mvit + Pmv
-          matrixPMvMvitPmv = slice(matrixTPMvMvitPmv, 1*16, 5*16); // grouping     P  + Mv + Mvi + Mvit + Pmv
-          matrixT       = slice(matrixTPMvMvitPmv, 0*16, 1*16);    //          T
-          matrixPMvMvit = slice(matrixTPMvMvitPmv, 1*16, 4*16);    // grouping     P  + Mv + Mvi + Mvit
-          matrixPMvMvi  = slice(matrixTPMvMvitPmv, 1*16, 3*16);    // grouping     P  + Mv + Mvi
-          matrixPMv     = slice(matrixTPMvMvitPmv, 1*16, 2*16);    // grouping     P  + Mv
-          matrixP       = slice(matrixTPMvMvitPmv, 1*16, 1*16);    //              P
-          matrixMv      = slice(matrixTPMvMvitPmv, 2*16, 1*16);    //                   Mv
-          matrixMvi     = slice(matrixTPMvMvitPmv, 3*16, 1*16);    //                        Mvi
-          matrixMvit    = slice(matrixTPMvMvitPmv, 4*16, 1*16);    //                              Mvit
-          matrixPmv     = slice(matrixTPMvMvitPmv, 5*16, 1*16);    //                                     Pmv
-          matrixTPMvMvitPmv.rewind();
-
-          matrixMvit3 = Buffers.newDirectFloatBuffer(3*3);
-
-          localBuf = Buffers.newDirectFloatBuffer(6*16);
-
-          matrixMult=slice(localBuf, 0*16, 16);
-
-          matrixTrans=slice(localBuf, 1*16, 16);
-          projectFloat.gluMakeIdentityf(matrixTrans);
-
-          matrixRot=slice(localBuf, 2*16, 16);
-          projectFloat.gluMakeIdentityf(matrixRot);
-
-          matrixScale=slice(localBuf, 3*16, 16);
-          projectFloat.gluMakeIdentityf(matrixScale);
-
-          matrixOrtho=slice(localBuf, 4*16, 16);
-          projectFloat.gluMakeIdentityf(matrixOrtho);
-
-          matrixFrustum=slice(localBuf, 5*16, 16);
-          projectFloat.gluMakeZero(matrixFrustum);
+          matrixBuffer = Buffers.newDirectByteBuffer(12*16 * Buffers.SIZEOF_FLOAT);
+                                                                   //  I + T + P  + Mv + Mvi + Mvit + Local
+          matrixIdent   = slice2Float(matrixBuffer,  0*16, 1*16);  //  I
+          matrixTex     = slice2Float(matrixBuffer,  1*16, 1*16);  //      T
+          matrixPMvMvit = slice2Float(matrixBuffer,  2*16, 4*16);  //          P  + Mv + Mvi + Mvit
+          matrixPMvMvi  = slice2Float(matrixBuffer,  2*16, 3*16);  //          P  + Mv + Mvi
+          matrixPMv     = slice2Float(matrixBuffer,  2*16, 2*16);  //          P  + Mv
+          matrixP       = slice2Float(matrixBuffer,  2*16, 1*16);  //          P
+          matrixMv      = slice2Float(matrixBuffer,  3*16, 1*16);  //               Mv
+          matrixMvi     = slice2Float(matrixBuffer,  4*16, 1*16);  //                    Mvi
+          matrixMvit    = slice2Float(matrixBuffer,  5*16, 1*16);  //                          Mvit
+          matrixMult    = slice2Float(matrixBuffer,  6*16, 1*16);
+          matrixTrans   = slice2Float(matrixBuffer,  7*16, 1*16);
+          matrixRot     = slice2Float(matrixBuffer,  8*16, 1*16);
+          matrixScale   = slice2Float(matrixBuffer,  9*16, 1*16);
+          matrixOrtho   = slice2Float(matrixBuffer, 10*16, 1*16);
+          matrixFrustum = slice2Float(matrixBuffer, 11*16, 1*16);
+          matrixBuffer.rewind();
+          
+          ProjectFloat.gluMakeIdentityf(matrixIdent);
+          ProjectFloat.gluMakeIdentityf(matrixTrans);
+          ProjectFloat.gluMakeIdentityf(matrixRot);
+          ProjectFloat.gluMakeIdentityf(matrixScale);
+          ProjectFloat.gluMakeIdentityf(matrixOrtho);
+          ProjectFloat.gluMakeZero(matrixFrustum);
 
           vec3f=new float[3];
 
-          matrixPStack = new ArrayList();
-          matrixMvStack= new ArrayList();
+          matrixPStack = new ArrayList<float[]>();
+          matrixMvStack= new ArrayList<float[]>();
 
           // default values and mode
           glMatrixMode(GL_PROJECTION);
@@ -105,6 +93,7 @@ public class PMVMatrix implements GLMatrixFunc {
           glMatrixMode(GL.GL_TEXTURE);
           glLoadIdentity();
           setDirty();
+          update();
     }
 
     public void destroy() {
@@ -112,17 +101,8 @@ public class PMVMatrix implements GLMatrixFunc {
             projectFloat.destroy(); projectFloat=null;
         }
 
-        if(null!=matrixIdent) {
-            matrixIdent.clear(); matrixIdent=null;
-        }
-        if(null!=matrixTPMvMvitPmv) {
-            matrixTPMvMvitPmv.clear(); matrixTPMvMvitPmv=null;
-        }
-        if(null!=matrixMvit3) {
-            matrixMvit3.clear(); matrixMvit3=null;
-        }
-        if(null!=localBuf) {
-            localBuf.clear(); localBuf=null;
+        if(null!=matrixBuffer) {
+            matrixBuffer.clear(); matrixBuffer=null;
         }
 
         if(null!=matrixPStack) {
@@ -139,15 +119,28 @@ public class PMVMatrix implements GLMatrixFunc {
             matrixTStack.clear(); matrixTStack=null;
         }
 
-        matrixTPMvMvitPmv=null; matrixPMvMvit=null; matrixPMvMvitPmv=null; matrixPMvMvi=null; matrixPMv=null; 
-        matrixP=null; matrixT=null; matrixMv=null; matrixMvi=null; matrixMvit=null; matrixPmv=null;
+        matrixBuffer=null; matrixPMvMvit=null; matrixPMvMvi=null; matrixPMv=null; 
+        matrixP=null; matrixTex=null; matrixMv=null; matrixMvi=null; matrixMvit=null;
         matrixMult=null; matrixTrans=null; matrixRot=null; matrixScale=null; matrixOrtho=null; matrixFrustum=null;
     }
 
-    private static FloatBuffer slice(FloatBuffer buf, int pos, int len) {
-        buf.position(pos);
-        buf.limit(pos + len);
-        return buf.slice();
+
+    /**
+     * Slices a ByteBuffer to a FloatBuffer at the given position with the given size
+     * in float-space. Using a ByteBuffer as the source guarantees 
+     * keeping the source native order programmatically.  
+     * This works around <a href="http://code.google.com/p/android/issues/detail?id=16434">Honeycomb / Android 3.0 Issue 16434</a>. 
+     * This bug is resolved at least in Android 3.2.
+     * 
+     * @param buf source ByteBuffer
+     * @param posFloat {@link Buffers#SIZEOF_FLOAT} position
+     * @param lenFloat {@link Buffers#SIZEOF_FLOAT} size 
+     * @return FloatBuffer w/ native byte order as given ByteBuffer
+     */
+    private static FloatBuffer slice2Float(ByteBuffer buf, int posFloat, int lenFloat) {
+        buf.position( posFloat * Buffers.SIZEOF_FLOAT );
+        buf.limit( (posFloat + lenFloat) * Buffers.SIZEOF_FLOAT );
+        return buf.slice().order(buf.order()).asFloatBuffer(); // slice and duplicate may change byte order        
     }
 
     public static final boolean isMatrixModeName(final int matrixModeName) {
@@ -228,17 +221,20 @@ public class PMVMatrix implements GLMatrixFunc {
         return modified!=0;
     }
 
+    /**
+     * Update the derived Mvi, Mvit and Pmv matrices
+     * in case Mv or P has changed.
+     * 
+     * @return
+     */
     public boolean update() {
-        // if(0==modified) return false;
+        if(0==modified) return false;
 
-        // int res = modified;
-        int res = DIRTY_MODELVIEW | DIRTY_PROJECTION ;
+        final int res = modified;
+        // int res = DIRTY_MODELVIEW | DIRTY_PROJECTION ;
         if( (res&DIRTY_MODELVIEW)!=0 ) {
             setMviMvit();
         }
-        if( (res&DIRTY_MODELVIEW)!=0 || (res&DIRTY_PROJECTION)!=0 ) {
-            glMultMatrixf(matrixP, matrixMv, matrixPmv);
-        }
         modified=0;
         return res!=0;
     }
@@ -248,7 +244,7 @@ public class PMVMatrix implements GLMatrixFunc {
     }
 
     public final FloatBuffer glGetTMatrixf() {
-        return matrixT;
+        return matrixTex;
     }
 
     public final FloatBuffer glGetPMatrixf() {
@@ -259,10 +255,6 @@ public class PMVMatrix implements GLMatrixFunc {
         return matrixMv;
     }
 
-    public final FloatBuffer glGetPMvMvitPmvMatrixf() {
-        return matrixPMvMvitPmv;
-    }
-
     public final FloatBuffer glGetPMvMvitMatrixf() {
         return matrixPMvMvit;
     }
@@ -279,14 +271,6 @@ public class PMVMatrix implements GLMatrixFunc {
         return matrixMvi;
     }
 
-    public final FloatBuffer glGetPmvMatrixf() {
-        return matrixPmv;
-    }
-
-    public final FloatBuffer glGetNormalMatrixf() {
-        return matrixMvit3;
-    }
-
    /*
     * @return the current matrix
     */
@@ -304,7 +288,7 @@ public class PMVMatrix implements GLMatrixFunc {
         } else if(matrixName==GL_PROJECTION) {
             return matrixP;
         } else if(matrixName==GL.GL_TEXTURE) {
-            return matrixT;
+            return matrixTex;
         } else {
             throw new GLException("unsupported matrixName: "+matrixName);
         }
@@ -403,9 +387,9 @@ public class PMVMatrix implements GLMatrixFunc {
             matrixP.rewind();
             modified |= DIRTY_PROJECTION ;
         } else if(matrixMode==GL.GL_TEXTURE) {
-            matrixT.clear();
-            matrixT.put(values, offset, len);
-            matrixT.rewind();
+            matrixTex.clear();
+            matrixTex.put(values, offset, len);
+            matrixTex.rewind();
             modified |= DIRTY_TEXTURE ;
         } 
     }
@@ -423,9 +407,9 @@ public class PMVMatrix implements GLMatrixFunc {
             matrixP.rewind();
             modified |= DIRTY_PROJECTION ;
         } else if(matrixMode==GL.GL_TEXTURE) {
-            matrixT.clear();
-            matrixT.put(m);
-            matrixT.rewind();
+            matrixTex.clear();
+            matrixTex.put(m);
+            matrixTex.rewind();
             modified |= DIRTY_TEXTURE ;
         } 
         m.position(spos);
@@ -434,11 +418,11 @@ public class PMVMatrix implements GLMatrixFunc {
     public final void glPopMatrix() {
         float[] stackEntry=null;
         if(matrixMode==GL_MODELVIEW) {
-            stackEntry = (float[])matrixMvStack.remove(0);
+            stackEntry = matrixMvStack.remove(0);
         } else if(matrixMode==GL_PROJECTION) {
-            stackEntry = (float[])matrixPStack.remove(0);
+            stackEntry = matrixPStack.remove(0);
         } else if(matrixMode==GL.GL_TEXTURE) {
-            stackEntry = (float[])matrixTStack.remove(0);
+            stackEntry = matrixTStack.remove(0);
         } 
         glLoadMatrixf(stackEntry, 0);
     }
@@ -454,8 +438,8 @@ public class PMVMatrix implements GLMatrixFunc {
             matrixP.rewind();
             matrixPStack.add(0, stackEntry);
         } else if(matrixMode==GL.GL_TEXTURE) {
-            matrixT.get(stackEntry);
-            matrixT.rewind();
+            matrixTex.get(stackEntry);
+            matrixTex.rewind();
             matrixTStack.add(0, stackEntry);
         }
     }
@@ -474,9 +458,9 @@ public class PMVMatrix implements GLMatrixFunc {
             matrixIdent.rewind();
             modified |= DIRTY_PROJECTION ;
         } else if(matrixMode==GL.GL_TEXTURE) {
-            matrixT.clear();
-            matrixT.put(matrixIdent);
-            matrixT.rewind();
+            matrixTex.clear();
+            matrixTex.put(matrixIdent);
+            matrixTex.rewind();
             matrixIdent.rewind();
             modified |= DIRTY_TEXTURE ;
         } 
@@ -496,10 +480,10 @@ public class PMVMatrix implements GLMatrixFunc {
             matrixP.rewind();
             modified |= DIRTY_PROJECTION ;
         } else if(matrixMode==GL.GL_TEXTURE) {
-            glMultMatrixf(matrixT, m, matrixMult);
-            matrixT.clear();
-            matrixT.put(matrixMult);
-            matrixT.rewind();
+            glMultMatrixf(matrixTex, m, matrixMult);
+            matrixTex.clear();
+            matrixTex.put(matrixMult);
+            matrixTex.rewind();
             modified |= DIRTY_TEXTURE ;
         } 
         matrixMult.rewind();
@@ -519,10 +503,10 @@ public class PMVMatrix implements GLMatrixFunc {
             matrixP.rewind();
             modified |= DIRTY_PROJECTION ;
         } else if(matrixMode==GL.GL_TEXTURE) {
-            glMultMatrixf(matrixT, m, m_offset, matrixMult);
-            matrixT.clear();
-            matrixT.put(matrixMult);
-            matrixT.rewind();
+            glMultMatrixf(matrixTex, m, m_offset, matrixMult);
+            matrixTex.clear();
+            matrixTex.put(matrixMult);
+            matrixTex.rewind();
             modified |= DIRTY_TEXTURE ;
         } 
         matrixMult.rewind();
@@ -541,13 +525,13 @@ public class PMVMatrix implements GLMatrixFunc {
     }
 
     public final void glRotatef(final float angdeg, float x, float y, float z) {
-        float angrad = angdeg   * (float) Math.PI / 180;
+        float angrad = angdeg   * (float) Math.PI / 180.0f;
         float c = (float)Math.cos(angrad);
         float ic= 1.0f - c; 
         float s = (float)Math.sin(angrad);
 
         vec3f[0]=x; vec3f[1]=y; vec3f[2]=z;
-        projectFloat.normalize(vec3f);
+        ProjectFloat.normalize(vec3f);
         x = vec3f[0]; y = vec3f[1]; z = vec3f[2];
 
         // Rotation matrix:
@@ -661,21 +645,13 @@ public class PMVMatrix implements GLMatrixFunc {
                 matrixMvit.put(j+i*4, matrixMvi.get(i+j*4));
             }
         }
-
-        // fetch 3x3
-        for (int i = 0; i < 3; i++) {
-            for (int j = 0; j < 3; j++) {
-                matrixMvit3.put(i+j*3, matrixMvit.get(i+j*4));
-            }
-        }
     }
 
-    protected FloatBuffer matrixIdent;
-    protected FloatBuffer matrixTPMvMvitPmv, matrixPMvMvit, matrixPMvMvitPmv, matrixPMvMvi, matrixPMv, matrixP, matrixT, matrixMv, matrixMvi, matrixMvit, matrixPmv;
-    protected FloatBuffer matrixMvit3;
-    protected FloatBuffer localBuf, matrixMult, matrixTrans, matrixRot, matrixScale, matrixOrtho, matrixFrustum;
+    protected ByteBuffer matrixBuffer;
+    protected FloatBuffer matrixIdent, matrixPMvMvit, matrixPMvMvi, matrixPMv, matrixP, matrixTex, matrixMv, matrixMvi, matrixMvit;
+    protected FloatBuffer matrixMult, matrixTrans, matrixRot, matrixScale, matrixOrtho, matrixFrustum;
     protected float[] vec3f;
-    protected List/*FloatBuffer*/ matrixTStack, matrixPStack, matrixMvStack;
+    protected List<float[]> matrixTStack, matrixPStack, matrixMvStack;
     protected int matrixMode = GL_MODELVIEW;
     protected int modified = 0;
     protected ProjectFloat projectFloat;
diff --git a/src/jogl/classes/com/jogamp/opengl/util/StreamUtil.java b/src/jogl/classes/com/jogamp/opengl/util/StreamUtil.java
deleted file mode 100644
index 4cf8cb1..0000000
--- a/src/jogl/classes/com/jogamp/opengl/util/StreamUtil.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright (c) 2006 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 com.jogamp.opengl.util;
-
-import java.io.*;
-import java.nio.*;
-
-/** Utilities for dealing with streams. */
-
-public class StreamUtil {
-    private StreamUtil() {}
-
-    public static byte[] readAll2Array(InputStream stream) throws IOException {
-        BytesRead bytesRead = readAllImpl(stream);
-        byte[] data = bytesRead.data;
-        if (bytesRead.payloadLen != data.length) {
-            data = new byte[bytesRead.payloadLen];
-            System.arraycopy(bytesRead.data, 0, data, 0, bytesRead.payloadLen);
-        }
-        return data;
-    }
-
-    public static ByteBuffer readAll2Buffer(InputStream stream) throws IOException {
-        BytesRead bytesRead = readAllImpl(stream);
-        return GLBuffers.newDirectByteBuffer(bytesRead.data, 0, bytesRead.payloadLen);
-    }
-
-    private static BytesRead readAllImpl(InputStream stream) throws IOException {
-        // FIXME: Shall we do this here ?
-        if( !(stream instanceof BufferedInputStream) ) {
-            stream = new BufferedInputStream(stream);
-        }
-        int avail = stream.available();
-        byte[] data = new byte[avail];
-        int numRead = 0;
-        int pos = 0;
-        do {
-            if (pos + avail > data.length) {
-                byte[] newData = new byte[pos + avail];
-                System.arraycopy(data, 0, newData, 0, pos);
-                data = newData;
-            }
-            numRead = stream.read(data, pos, avail);
-            if (numRead >= 0) {
-                pos += numRead;
-            }
-            avail = stream.available();
-        } while (avail > 0 && numRead >= 0);
-
-        return new BytesRead(pos, data);
-    }
-
-    private static class BytesRead {
-        BytesRead(int payloadLen, byte[] data) {
-            this.payloadLen=payloadLen;
-            this.data=data;
-        }
-        int payloadLen;
-        byte[] data;
-    }
-}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/awt/Overlay.java b/src/jogl/classes/com/jogamp/opengl/util/awt/Overlay.java
index 1275c93..73d694c 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/awt/Overlay.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/awt/Overlay.java
@@ -42,7 +42,6 @@ package com.jogamp.opengl.util.awt;
 import java.awt.Graphics2D;
 
 import javax.media.opengl.*;
-import com.jogamp.opengl.util.texture.*;
 
 /** Provides a Java 2D overlay on top of an arbitrary GLDrawable,
     making it easier to do things like draw text and images on top of
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 7019d72..fa66673 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/awt/Screenshot.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/awt/Screenshot.java
@@ -36,17 +36,20 @@
 
 package com.jogamp.opengl.util.awt;
 
-import java.awt.image.*;
-import java.io.*;
-import java.nio.*;
-import java.nio.channels.*;
-import javax.imageio.*;
+import java.awt.image.BufferedImage;
+import java.awt.image.DataBufferByte;
+import java.io.File;
+import java.io.IOException;
+import java.nio.ByteBuffer;
 
-import javax.media.opengl.*;
-import javax.media.opengl.glu.*;
-import javax.media.opengl.glu.gl2.*;
+import javax.imageio.ImageIO;
+import javax.media.opengl.GL2;
+import javax.media.opengl.GLException;
+import javax.media.opengl.glu.gl2.GLUgl2;
 
-import com.jogamp.opengl.util.*;
+import com.jogamp.common.util.IOUtil;
+import com.jogamp.opengl.util.GLPixelStorageModes;
+import com.jogamp.opengl.util.TGAWriter;
 
 /** Utilities for taking screenshots of OpenGL applications. */
 
@@ -148,8 +151,8 @@ public class Screenshot {
     GL2 gl = GLUgl2.getCurrentGL2();
 
     // Set up pixel storage modes
-    PixelStorageModes psm = new PixelStorageModes();
-    psm.save(gl);
+    GLPixelStorageModes psm = new GLPixelStorageModes();
+    psm.setPackAlignment(gl, 1);
 
     int readbackType = (alpha ? GL2.GL_ABGR_EXT : GL2.GL_BGR);
 
@@ -255,8 +258,8 @@ public class Screenshot {
     GL2 gl = GLUgl2.getCurrentGL2();
 
     // Set up pixel storage modes
-    PixelStorageModes psm = new PixelStorageModes();
-    psm.save(gl);
+    GLPixelStorageModes psm = new GLPixelStorageModes();
+    psm.setPackAlignment(gl, 1);
 
     // read the BGR values into the image
     gl.glReadPixels(x, y, width, height, readbackType,
@@ -375,7 +378,7 @@ public class Screenshot {
                                  int width,
                                  int height,
                                  boolean alpha) throws IOException, GLException {
-    String fileSuffix = FileUtil.getFileSuffix(file);
+    String fileSuffix = IOUtil.getFileSuffix(file);
     if (alpha && (fileSuffix.equals("jpg") || fileSuffix.equals("jpeg"))) {
       // JPEGs can't deal properly with alpha channels
       alpha = false;
@@ -387,46 +390,10 @@ public class Screenshot {
     }
   }
 
-  private static int glGetInteger(GL2 gl, int pname, int[] tmp) {
-    gl.glGetIntegerv(pname, tmp, 0);
-    return tmp[0];
-  }
-
   private static void checkExtABGR() {
     GL2 gl = GLUgl2.getCurrentGL2();
     if (!gl.isExtensionAvailable("GL_EXT_abgr")) {
       throw new IllegalArgumentException("Saving alpha channel requires GL_EXT_abgr");
     }
-  }
- 
-  static class PixelStorageModes {
-    int packAlignment;
-    int packRowLength;
-    int packSkipRows;
-    int packSkipPixels;
-    int packSwapBytes;
-    int[] tmp = new int[1];
-
-    void save(GL2 gl) {
-      packAlignment  = glGetInteger(gl, GL2.GL_PACK_ALIGNMENT, tmp);
-      packRowLength  = glGetInteger(gl, GL2.GL_PACK_ROW_LENGTH, tmp);
-      packSkipRows   = glGetInteger(gl, GL2.GL_PACK_SKIP_ROWS, tmp);
-      packSkipPixels = glGetInteger(gl, GL2.GL_PACK_SKIP_PIXELS, tmp);
-      packSwapBytes  = glGetInteger(gl, GL2.GL_PACK_SWAP_BYTES, tmp);
-
-      gl.glPixelStorei(GL2.GL_PACK_ALIGNMENT, 1);
-      gl.glPixelStorei(GL2.GL_PACK_ROW_LENGTH, 0);
-      gl.glPixelStorei(GL2.GL_PACK_SKIP_ROWS, 0);
-      gl.glPixelStorei(GL2.GL_PACK_SKIP_PIXELS, 0);
-      gl.glPixelStorei(GL2.GL_PACK_SWAP_BYTES, 0);
-    }
-
-    void restore(GL2 gl) {
-      gl.glPixelStorei(GL2.GL_PACK_ALIGNMENT, packAlignment);
-      gl.glPixelStorei(GL2.GL_PACK_ROW_LENGTH, packRowLength);
-      gl.glPixelStorei(GL2.GL_PACK_SKIP_ROWS, packSkipRows);
-      gl.glPixelStorei(GL2.GL_PACK_SKIP_PIXELS, packSkipPixels);
-      gl.glPixelStorei(GL2.GL_PACK_SWAP_BYTES, packSwapBytes);
-    }
-  }
+  } 
 }
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 8688217..de28dc7 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/awt/TextRenderer.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/awt/TextRenderer.java
@@ -1590,7 +1590,7 @@ public class TextRenderer {
             int lengthInGlyphs = fullRunGlyphVector.getNumGlyphs();
             int i = 0;
             while (i < lengthInGlyphs) {
-            	Character letter = CharacterCache.valueOf(inString.charAt(i));
+                Character letter = CharacterCache.valueOf(inString.charAt(i));
                 GlyphMetrics metrics = (GlyphMetrics) glyphMetricsCache.get(letter);
                 if (metrics == null) {
                     metrics = fullRunGlyphVector.getGlyphMetrics(i);
@@ -1656,7 +1656,7 @@ public class TextRenderer {
         // if the unicode or glyph ID would be out of bounds of the
         // glyph cache.
         private Glyph getGlyph(CharSequence inString,
-        		               GlyphMetrics glyphMetrics,
+                               GlyphMetrics glyphMetrics,
                                int index) {
             char unicodeID = inString.charAt(index);
 
diff --git a/src/jogl/classes/com/jogamp/opengl/util/awt/TextureRenderer.java b/src/jogl/classes/com/jogamp/opengl/util/awt/TextureRenderer.java
index 86dca59..922fc69 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/awt/TextureRenderer.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/awt/TextureRenderer.java
@@ -307,7 +307,7 @@ public class TextureRenderer {
   */
   public void dispose() throws GLException {
     if (texture != null) {
-      texture.dispose();
+      texture.destroy(GLContext.getCurrentGL());
       texture = null;
     }
     if (image != null) {
@@ -576,23 +576,23 @@ public class TextureRenderer {
     gl.glEnable(GL2.GL_BLEND);
     gl.glBlendFunc(GL2.GL_ONE, GL2.GL_ONE_MINUS_SRC_ALPHA);
     Texture texture = getTexture();
-    texture.enable();
-    texture.bind();
+    texture.enable(gl);
+    texture.bind(gl);
     gl.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_TEXTURE_ENV_MODE, GL2.GL_MODULATE);
     // Change polygon color to last saved
     gl.glColor4f(r, g, b, a);
     if (smoothingChanged) {
       smoothingChanged = false;
       if (smoothing) {
-        texture.setTexParameteri(GL2.GL_TEXTURE_MAG_FILTER, GL2.GL_LINEAR);
+        texture.setTexParameteri(gl, GL2.GL_TEXTURE_MAG_FILTER, GL2.GL_LINEAR);
         if (mipmap) {
-          texture.setTexParameteri(GL2.GL_TEXTURE_MIN_FILTER, GL2.GL_LINEAR_MIPMAP_LINEAR);
+          texture.setTexParameteri(gl, GL2.GL_TEXTURE_MIN_FILTER, GL2.GL_LINEAR_MIPMAP_LINEAR);
         } else {
-          texture.setTexParameteri(GL2.GL_TEXTURE_MIN_FILTER, GL2.GL_LINEAR);
+          texture.setTexParameteri(gl, GL2.GL_TEXTURE_MIN_FILTER, GL2.GL_LINEAR);
         }
       } else {
-        texture.setTexParameteri(GL2.GL_TEXTURE_MIN_FILTER, GL2.GL_NEAREST);
-        texture.setTexParameteri(GL2.GL_TEXTURE_MAG_FILTER, GL2.GL_NEAREST);
+        texture.setTexParameteri(gl, GL2.GL_TEXTURE_MIN_FILTER, GL2.GL_NEAREST);
+        texture.setTexParameteri(gl, GL2.GL_TEXTURE_MAG_FILTER, GL2.GL_NEAREST);
       }
     }
   }
@@ -600,7 +600,7 @@ public class TextureRenderer {
   private void endRendering(boolean ortho) {
     GL2 gl = GLContext.getCurrentGL().getGL2();
     Texture texture = getTexture();
-    texture.disable();
+    texture.disable(gl);
     if (ortho) {
       gl.glMatrixMode(GL2.GL_PROJECTION);
       gl.glPopMatrix();
@@ -661,15 +661,16 @@ public class TextureRenderer {
       // OpenGL and Java 2D actually line up correctly for
       // updateSubImage calls, so we don't need to do any argument
       // conversion here (i.e., flipping the Y coordinate).
-      texture.updateSubImage(textureData, 0, x, y, x, y, width, height);
+      texture.updateSubImage(GLContext.getCurrentGL(), textureData, 0, x, y, x, y, width, height);
     }
   }
 
   // Returns true if the texture was newly allocated, false if not
   private boolean ensureTexture() {
+    GL gl = GLContext.getCurrentGL();
     if (mustReallocateTexture) {
       if (texture != null) {
-        texture.dispose();
+        texture.destroy(gl);
         texture = null;
       }
       mustReallocateTexture = false;
@@ -679,7 +680,7 @@ public class TextureRenderer {
       texture = TextureIO.newTexture(textureData);
       if (mipmap && !texture.isUsingAutoMipmapGeneration()) {
         // Only try this once
-        texture.dispose();
+        texture.destroy(gl);
         mipmap = false;
         textureData.setMipmap(false);
         texture = TextureIO.newTexture(textureData);
@@ -687,8 +688,8 @@ public class TextureRenderer {
 
       if (!smoothing) {
         // The TextureIO classes default to GL_LINEAR filtering
-        texture.setTexParameteri(GL2.GL_TEXTURE_MIN_FILTER, GL2.GL_NEAREST);
-        texture.setTexParameteri(GL2.GL_TEXTURE_MAG_FILTER, GL2.GL_NEAREST);
+        texture.setTexParameteri(gl, GL2.GL_TEXTURE_MIN_FILTER, GL2.GL_NEAREST);
+        texture.setTexParameteri(gl, GL2.GL_TEXTURE_MAG_FILTER, GL2.GL_NEAREST);
       }
       return true;
     }
diff --git a/src/jogl/classes/com/jogamp/opengl/util/gl2/GLUT.java b/src/jogl/classes/com/jogamp/opengl/util/gl2/GLUT.java
index 8befc13..010ce66 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/gl2/GLUT.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/gl2/GLUT.java
@@ -163,7 +163,7 @@ public class GLUT {
 
   public void glutSolidCylinder(double radius, double height, int slices, int stacks) {
     GL2 gl = GLUgl2.getCurrentGL2();
-  	
+      
     // Prepare table of points for drawing end caps
     double [] x = new double[slices];
     double [] y = new double[slices];
@@ -174,7 +174,7 @@ public class GLUT {
       x[i] = Math.cos(angle) * radius;
       y[i] = Math.sin(angle) * radius;
     }
-  	
+      
     // Draw bottom cap
     gl.glBegin(GL2.GL_TRIANGLE_FAN);
     gl.glNormal3d(0,0,-1);
@@ -184,7 +184,7 @@ public class GLUT {
     }
     gl.glVertex3d(x[0], y[0], 0);
     gl.glEnd();
-  	
+      
     // Draw top cap
     gl.glBegin(GL2.GL_TRIANGLE_FAN);
     gl.glNormal3d(0,0,1);
@@ -194,7 +194,7 @@ public class GLUT {
     }
     gl.glVertex3d(x[0], y[0], height);
     gl.glEnd();
-  	
+      
     // Draw walls
     quadObjInit(glu);
     glu.gluQuadricDrawStyle(quadObj, GLU.GLU_FILL);
diff --git a/src/jogl/classes/com/jogamp/opengl/util/glsl/GLSLArrayHandler.java b/src/jogl/classes/com/jogamp/opengl/util/glsl/GLSLArrayHandler.java
deleted file mode 100644
index 95a550a..0000000
--- a/src/jogl/classes/com/jogamp/opengl/util/glsl/GLSLArrayHandler.java
+++ /dev/null
@@ -1,85 +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.util.glsl;
-
-import javax.media.opengl.*;
-import com.jogamp.opengl.util.*;
-import java.nio.*;
-
-public class GLSLArrayHandler implements GLArrayHandler {
-  private GLArrayDataEditable ad;
-
-  public GLSLArrayHandler(GLArrayDataEditable ad) {
-    this.ad = ad;
-  }
-
-  protected final void passVertexAttribPointer(GL2ES2 gl, ShaderState st) {
-    st.glVertexAttribPointer(gl, ad);
-  }
-
-  public void enableBuffer(GL gl, boolean enable) {
-    if(!gl.isGL2ES2()) {
-        throw new GLException("GLSLArrayHandler expects a GL2ES2 implementation");
-    }
-    GL2ES2 glsl = gl.getGL2ES2();
-    ShaderState st = ShaderState.getCurrent();
-    if(null==st) {
-        throw new GLException("No ShaderState current");
-    }
-
-    if(enable) {
-        st.glEnableVertexAttribArray(glsl, ad.getName());
-
-        Buffer buffer = ad.getBuffer();
-
-        if(ad.isVBO()) {
-            // always bind and refresh the VBO mgr,
-            // in case more than one gl*Pointer objects are in use
-            glsl.glBindBuffer(GL.GL_ARRAY_BUFFER, ad.getVBOName());
-            if(!ad.isBufferWritten()) {
-                if(null!=buffer) {
-                    glsl.glBufferData(GL.GL_ARRAY_BUFFER, buffer.limit() * ad.getComponentSize(), buffer, ad.getBufferUsage());
-                }
-                ad.setBufferWritten(true);
-            }
-            passVertexAttribPointer(glsl, st);
-        } else if(null!=buffer) {
-            passVertexAttribPointer(glsl, st);
-            ad.setBufferWritten(true);
-        }
-    } else {
-        if(ad.isVBO()) {
-            glsl.glBindBuffer(GL.GL_ARRAY_BUFFER, 0);
-        }
-        st.glDisableVertexAttribArray(glsl, ad.getName());
-    }
-  }
-
-}
-
diff --git a/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderCode.java b/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderCode.java
index 5dd1b5a..cc75b89 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderCode.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderCode.java
@@ -29,8 +29,9 @@
 package com.jogamp.opengl.util.glsl;
 
 import com.jogamp.common.nio.Buffers;
+import com.jogamp.common.util.IOUtil;
+
 import javax.media.opengl.*;
-import com.jogamp.opengl.util.*;
 import jogamp.opengl.Debug;
 
 import java.util.*;
@@ -67,7 +68,7 @@ public class ShaderCode {
 
         if(DEBUG_CODE) {
             System.out.println("Created: "+toString());
-            dumpShaderSource(System.out);
+            // dumpShaderSource(System.out); // already done in readShaderSource
         }
     }
 
@@ -87,7 +88,7 @@ public class ShaderCode {
         id = getNextID();
     }
 
-    public static ShaderCode create(GL2ES2 gl, int type, int number, Class context, String[] sourceFiles) {
+    public static ShaderCode create(GL2ES2 gl, int type, int number, Class<?> context, String[] sourceFiles) {
         if(!ShaderUtil.isShaderCompilerAvailable(gl)) return null;
 
         String[][] shaderSources = null;
@@ -106,7 +107,7 @@ public class ShaderCode {
         return new ShaderCode(type, number, shaderSources);
     }
 
-    public static ShaderCode create(int type, int number, Class context, int binFormat, String binaryFile) {
+    public static ShaderCode create(int type, int number, Class<?> context, int binFormat, String binaryFile) {
         ByteBuffer shaderBinary = null;
         if(null!=binaryFile && 0<=binFormat) {
             shaderBinary = readShaderBinary(context, binaryFile);
@@ -140,7 +141,7 @@ public class ShaderCode {
         }
     }
 
-    public static ShaderCode create(GL2ES2 gl, int type, int number, Class context, 
+    public static ShaderCode create(GL2ES2 gl, int type, int number, Class<?> context, 
                                     String srcRoot, String binRoot, String basename) {
         ShaderCode res = null;
         String srcFileName = null;
@@ -155,9 +156,9 @@ public class ShaderCode {
                 return res;
             }
         }
-        Set binFmts = ShaderUtil.getShaderBinaryFormats(gl);
-        for(Iterator iter=binFmts.iterator(); null==res && iter.hasNext(); ) {
-            int bFmt = ((Integer)(iter.next())).intValue();
+        Set<Integer> binFmts = ShaderUtil.getShaderBinaryFormats(gl);
+        for(Iterator<Integer> iter=binFmts.iterator(); null==res && iter.hasNext(); ) {
+            int bFmt = iter.next().intValue();
             String bFmtPath = getBinarySubPath(bFmt);
             if(null==bFmtPath) continue;
             binFileName = binRoot + '/' + bFmtPath + '/' + basename + "." + getFileSuffix(true, type);
@@ -174,16 +175,8 @@ public class ShaderCode {
 
     /**
      * returns the uniq shader id as an integer
-     * @see #key()
-     */
-    public int        id() { return id.intValue(); }
-
-    /**
-     * returns the uniq shader id as an Integer
-     *
-     * @see #id()
      */
-    public Integer    key() { return id; }
+    public int id() { return id; }
 
     public int        shaderType() { return shaderType; }
     public String     shaderTypeStr() { return shaderTypeStr(shaderType); }
@@ -239,7 +232,7 @@ public class ShaderCode {
         shaderSource=null;
         shaderBinaryFormat=-1;
         shaderType=-1;
-        id=null;
+        id=-1;
     }
 
     public boolean equals(Object obj) {
@@ -250,10 +243,10 @@ public class ShaderCode {
         return false;
     }
     public int hashCode() {
-        return id.intValue();
+        return id;
     }
     public String toString() {
-        StringBuffer buf = new StringBuffer("ShaderCode [id="+id+", type="+shaderTypeStr()+", valid="+valid+", shader: ");
+        StringBuffer buf = new StringBuffer("ShaderCode[id="+id+", type="+shaderTypeStr()+", valid="+valid+", shader: ");
         for(int i=0; i<shader.remaining(); i++) {
             buf.append(" "+shader.get(i));
         }
@@ -290,26 +283,36 @@ public class ShaderCode {
         }
     }
 
-    public static void readShaderSource(ClassLoader context, String path, URL url, StringBuffer result) {
+    private static int readShaderSource(Class<?> context, URL url, StringBuffer result, int lineno) {
         try {
+            if(DEBUG_CODE) {
+                System.err.printf("%3d: // %s\n", lineno, url);
+            }
             BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream()));
             String line = null;
             while ((line = reader.readLine()) != null) {
+                lineno++;
+                if(DEBUG_CODE) {
+                    System.err.printf("%3d: %s\n", lineno, line);
+                }
                 if (line.startsWith("#include ")) {
                     String includeFile = line.substring(9).trim();
+                    URL nextURL = null;
+                    
                     // Try relative path first
-                    String next = Locator.getRelativeOf(path, includeFile);
-                    URL nextURL = Locator.getResource(next, context);
+                    String next = IOUtil.getRelativeOf(url, includeFile);
+                    if(null != next) {
+                        nextURL = IOUtil.getResource(context, next);        
+                    }
                     if (nextURL == null) {
                         // Try absolute path
-                        next = includeFile;
-                        nextURL = Locator.getResource(next, context);
+                        nextURL = IOUtil.getResource(context, includeFile);        
                     }
                     if (nextURL == null) {
                         // Fail
                         throw new FileNotFoundException("Can't find include file " + includeFile);
                     }
-                    readShaderSource(context, next, nextURL, result);
+                    lineno = readShaderSource(context, nextURL, result, lineno);
                 } else {
                     result.append(line + "\n");
                 }
@@ -317,38 +320,38 @@ public class ShaderCode {
         } catch (IOException e) {
             throw new RuntimeException(e);
         }
+        return lineno;
     }
-
-    public static String readShaderSource(Class context, String path) {
-        ClassLoader contextCL = (null!=context)?context.getClassLoader():null;
-        URL url = Locator.getResource(path, contextCL);
-        if (url == null && null!=context) {
-            // Try again by scoping the path within the class's package
-            String className = context.getName().replace('.', '/');
-            int lastSlash = className.lastIndexOf('/');
-            if (lastSlash >= 0) {
-                String tmpPath = className.substring(0, lastSlash + 1) + path;
-                url = Locator.getResource(tmpPath, contextCL);
-                if (url != null) {
-                    path = tmpPath;
-                }
-            }
+    
+    public static void readShaderSource(Class<?> context, URL url, StringBuffer result) {
+        if(DEBUG_CODE) {
+            System.err.println();
+            System.err.println("// -----------------------------------------------------------");
         }
+        readShaderSource(context, url, result, 0);
+        if(DEBUG_CODE) {
+            System.err.println("// -----------------------------------------------------------");
+            System.err.println();
+        }
+    }
+
+    public static String readShaderSource(Class<?> context, String path) {
+        URL url = IOUtil.getResource(context, path);        
         if (url == null) {
             return null;
         }
         StringBuffer result = new StringBuffer();
-        readShaderSource(contextCL, path, url, result);
+        readShaderSource(context, url, result);
         return result.toString();
     }
 
-    public static ByteBuffer readShaderBinary(Class context, String path) {
+    public static ByteBuffer readShaderBinary(Class<?> context, String path) {
         try {
-            URL url = Locator.getResource(context, path);
+            URL url = IOUtil.getResource(context, path);
             if (url == null) {
                 return null;
             }
-            return StreamUtil.readAll2Buffer(new BufferedInputStream(url.openStream()));
+            return IOUtil.copyStream2ByteBuffer( new BufferedInputStream( url.openStream() ) );
         } catch (IOException e) {
             throw new RuntimeException(e);
         }
@@ -363,12 +366,12 @@ public class ShaderCode {
     protected int        shaderBinaryFormat = -1;
     protected IntBuffer  shader = null;
     protected int        shaderType = -1;
-    protected Integer    id = null;
+    protected int        id = -1;
 
     protected boolean valid=false;
 
-    private static synchronized Integer getNextID() {
-        return new Integer(nextID++);
+    private static synchronized int getNextID() {
+        return nextID++;
     }
     protected static int nextID = 1;
 }
diff --git a/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderProgram.java b/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderProgram.java
index 1318582..8dd09ff 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderProgram.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderProgram.java
@@ -30,11 +30,14 @@ package com.jogamp.opengl.util.glsl;
 
 import javax.media.opengl.*;
 
-import java.util.HashMap;
+import com.jogamp.common.os.Platform;
+
+import java.util.HashSet;
 import java.util.Iterator;
 import java.io.PrintStream;
 
 public class ShaderProgram {
+    
     public ShaderProgram() {
         id = getNextID();
     }
@@ -51,16 +54,8 @@ public class ShaderProgram {
 
     /**
      * returns the uniq shader id as an integer
-     * @see #key()
-     */
-    public int        id() { return id.intValue(); }
-
-    /**
-     * returns the uniq shader id as an Integer
-     *
-     * @see #id()
      */
-    public Integer    key() { return id; }
+    public int        id() { return id; }
 
     /**
      * Detaches all shader codes and deletes the program.
@@ -88,17 +83,22 @@ public class ShaderProgram {
      * If releaseShaderToo is true, destroys the shader codes as well.
      */
     public synchronized void release(GL2ES2 gl, boolean releaseShaderToo) {
-        glUseProgram(gl, false);
-        for(Iterator iter=shaderMap.values().iterator(); iter.hasNext(); ) {
-            ShaderCode shaderCode = (ShaderCode) iter.next();
-            ShaderUtil.detachShader(gl, shaderProgram, shaderCode.shader());
+        useProgram(gl, false);
+        for(Iterator<ShaderCode> iter=allShaderCode.iterator(); iter.hasNext(); ) {
+            ShaderCode shaderCode = iter.next();
+            if(attachedShaderCode.remove(shaderCode)) {
+                ShaderUtil.detachShader(gl, shaderProgram, shaderCode.shader());
+            }
             if(releaseShaderToo) {
                 shaderCode.destroy(gl);
             }
         }
-        shaderMap.clear();
-        gl.glDeleteProgram(shaderProgram);
-        shaderProgram=-1;
+        allShaderCode.clear();
+        attachedShaderCode.clear();
+        if(0<=shaderProgram) {
+            gl.glDeleteProgram(shaderProgram);
+            shaderProgram=-1;
+        }
     }
 
     //
@@ -106,35 +106,78 @@ public class ShaderProgram {
     //
 
     /**
-     * Adds a new shader to a this non running program.
-     *
-     * @return false if the program is in use, or the shader already exist,
-     *         otherwise true.
+     * Adds a new shader to this program.
+     * 
+     * <p>This command does not compile and attach the shader,
+     * use {@link #add(GL2ES2, ShaderCode)} for this purpose.</p>
      */
-    public synchronized boolean add(ShaderCode shaderCode) {
-        if(shaderMap.containsKey(shaderCode.key())) return false;
-        shaderMap.put(shaderCode.key(), shaderCode);
-        return true;
+    public synchronized void add(ShaderCode shaderCode) throws GLException {
+        allShaderCode.add(shaderCode);
     }
 
+    public synchronized boolean contains(ShaderCode shaderCode) {
+        return allShaderCode.contains(shaderCode);
+    }
+    
+    /**
+     * Warning slow O(n) operation ..
+     * @param id
+     * @return
+     */
     public synchronized ShaderCode getShader(int id) {
-        return (ShaderCode) shaderMap.get(new Integer(id));
+        for(Iterator<ShaderCode> iter=allShaderCode.iterator(); iter.hasNext(); ) {
+            ShaderCode shaderCode = iter.next();
+            if(shaderCode.id() == id) {
+                return shaderCode;
+            }
+        }
+        return null;
     }
 
     //
-    // Program handling
+    // ShaderCode / Program handling
     //
 
     /**
-     * Replace a shader in a 'running' program.
-     * Refetches all previously bin/get attribute names
-     * and resets all attribute data as well
+     * Creates the empty GL program object using {@link GL2ES2#glCreateProgram()}
+     *  
+     * @param gl
+     */
+    public synchronized final void init(GL2ES2 gl) {
+        if(0>shaderProgram) {
+            shaderProgram = gl.glCreateProgram();
+        }
+    }
+    
+    /**
+     * Adds a new shader to a this non running program.
+     *
+     * <p>Compiles and attaches the shader, if not done yet.</p>
+     * 
+     * @return true if the shader was successfully added, false if compilation failed.
+     */
+    public synchronized boolean add(GL2ES2 gl, ShaderCode shaderCode, PrintStream verboseOut) {
+        init(gl);
+        if( allShaderCode.add(shaderCode) ) {
+            if(!shaderCode.compile(gl, verboseOut)) {
+                return false;
+            }
+            if(attachedShaderCode.add(shaderCode)) {
+                ShaderUtil.attachShader(gl, shaderProgram, shaderCode.shader());
+            }
+        }
+        return true;
+    }
+
+    /**
+     * Replace a shader in a program and re-links the program.
      *
      * @param gl 
-     * @param oldShaderID the to be replace Shader
+     * @param oldShader   the to be replace Shader
      * @param newShader   the new ShaderCode
-     * @param verboseOut  the optional verbose outputstream
-     * @throws GLException is the program is not linked
+     * @param verboseOut  the optional verbose output stream
+     * 
+     * @return true if all steps are valid, shader compilation, attachment and linking; otherwise false.
      *
      * @see ShaderState#glEnableVertexAttribArray
      * @see ShaderState#glDisableVertexAttribArray
@@ -145,46 +188,62 @@ public class ShaderProgram {
      * @see ShaderState#glResetAllVertexAttributes
      * @see ShaderState#glResetAllVertexAttributes
      */
-    public synchronized boolean glReplaceShader(GL2ES2 gl, int oldShaderID, ShaderCode newShader, PrintStream verboseOut) {
-        if(!programLinked) throw new GLException("Program is not linked");
-        boolean shaderWasInUse = programInUse;
-        glUseProgram(gl, false);
+    public synchronized boolean replaceShader(GL2ES2 gl, ShaderCode oldShader, ShaderCode newShader, PrintStream verboseOut) {
+        init(gl);
+        
         if(!newShader.compile(gl, verboseOut)) {
             return false;
-        } 
-        if(oldShaderID>=0) {
-            ShaderCode oldShader = (ShaderCode) shaderMap.remove(new Integer(oldShaderID));
-            if(null!=oldShader) {
+        }
+        
+        boolean shaderWasInUse = inUse();
+        if(shaderWasInUse) {
+            useProgram(gl, false);
+        }
+        
+        if(null != oldShader && allShaderCode.remove(oldShader)) {
+            if(attachedShaderCode.remove(oldShader)) {
                 ShaderUtil.detachShader(gl, shaderProgram, oldShader.shader());
             }
         }
+        
         add(newShader);
-
-        ShaderUtil.attachShader(gl, shaderProgram, newShader.shader());
-        gl.glLinkProgram(shaderProgram);
-        if ( ! ShaderUtil.isProgramValid(gl, shaderProgram, System.err) )  {
-            return false;
+        if(attachedShaderCode.add(newShader)) {
+            ShaderUtil.attachShader(gl, shaderProgram, newShader.shader());
         }
-
-        if(shaderWasInUse) {
-            glUseProgram(gl, true);
+        
+        gl.glLinkProgram(shaderProgram);
+        
+        programLinked = ShaderUtil.isProgramValid(gl, shaderProgram, System.err);
+        if ( programLinked && shaderWasInUse )  {
+            useProgram(gl, true);
         }
-        return true;
+        return programLinked;
     }
 
+    /**
+     * Links the shader code to the program.
+     * 
+     * <p>Compiles and attaches the shader code to the program if not done by yet</p>
+     * 
+     * <p>Within this process, all GL resources (shader and program objects) are created if necessary.</p>
+     *  
+     * @param gl
+     * @param verboseOut
+     * @return true if program was successfully linked and is valid, otherwise false
+     * 
+     * @see #init(GL2ES2)
+     */
     public synchronized boolean link(GL2ES2 gl, PrintStream verboseOut) {
-        if(programLinked) throw new GLException("Program is already linked");
-
-        if(0>shaderProgram) {
-            shaderProgram = gl.glCreateProgram();
-        }
+        init(gl);
 
-        for(Iterator iter=shaderMap.values().iterator(); iter.hasNext(); ) {
-            ShaderCode shaderCode = (ShaderCode) iter.next();
+        for(Iterator<ShaderCode> iter=allShaderCode.iterator(); iter.hasNext(); ) {
+            final ShaderCode shaderCode = iter.next();
             if(!shaderCode.compile(gl, verboseOut)) {
                 return false;
             }
-            ShaderUtil.attachShader(gl, shaderProgram, shaderCode.shader());
+            if(attachedShaderCode.add(shaderCode)) {
+                ShaderUtil.attachShader(gl, shaderProgram, shaderCode.shader());
+            }
         }
 
         // Link the program
@@ -204,40 +263,42 @@ public class ShaderProgram {
     }
 
     public int hashCode() {
-        return id.intValue();
+        return id;
     }
 
-    public String toString() {
-        StringBuffer buf = new StringBuffer();
-        buf.append("ShaderProgram[id="+id);
-        buf.append(", linked="+programLinked+", inUse="+programInUse+", program: "+shaderProgram+", [");
-        for(Iterator iter=shaderMap.values().iterator(); iter.hasNext(); ) {
-            buf.append((ShaderCode) iter.next());
-            buf.append(" ");
+    public StringBuilder toString(StringBuilder sb) {
+        if(null == sb) {
+            sb = new StringBuilder();
         }
-        buf.append("]");
-        return buf.toString();
+        sb.append("ShaderProgram[id=").append(id);
+        sb.append(", linked="+programLinked+", inUse="+programInUse+", program: "+shaderProgram+",");
+        for(Iterator<ShaderCode> iter=allShaderCode.iterator(); iter.hasNext(); ) {
+            sb.append(Platform.getNewline()).append("   ").append(iter.next());
+        }
+        sb.append("]");
+        return sb;
+    }
+        
+    public String toString() {
+        return toString(null).toString();
     }
 
-    protected synchronized void glUseProgram(GL2ES2 gl, boolean on) {
+    public synchronized void useProgram(GL2ES2 gl, boolean on) {
         if(!programLinked) throw new GLException("Program is not linked");
         if(programInUse==on) return;
         gl.glUseProgram(on?shaderProgram:0);
         programInUse = on;
-
-        //Throwable tX = new Throwable("Info: ShaderProgram.glUseProgram: "+on);
-        //tX.printStackTrace();
-
     }
 
     protected boolean programLinked = false;
     protected boolean programInUse = false;
     protected int shaderProgram=-1;
-    protected HashMap shaderMap = new HashMap();
-    protected Integer    id = null;
+    protected HashSet<ShaderCode> allShaderCode = new HashSet<ShaderCode>();
+    protected HashSet<ShaderCode> attachedShaderCode = new HashSet<ShaderCode>();
+    protected int id = -1;
 
-    private static synchronized Integer getNextID() {
-        return new Integer(nextID++);
+    private static synchronized int getNextID() {
+        return nextID++;
     }
     protected static int nextID = 1;
 }
diff --git a/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderState.java b/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderState.java
index 57ae6cf..2ef977e 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderState.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderState.java
@@ -28,17 +28,29 @@
 
 package com.jogamp.opengl.util.glsl;
 
-import javax.media.opengl.*;
-import jogamp.opengl.Debug;
-
+import java.security.AccessController;
+import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
-import java.security.*;
+
+import javax.media.opengl.GL;
+import javax.media.opengl.GL2ES2;
+import javax.media.opengl.GLArrayData;
+import javax.media.opengl.GLContext;
+import javax.media.opengl.GLException;
+import javax.media.opengl.GLUniformData;
+
+import jogamp.opengl.Debug;
+
+import com.jogamp.common.os.Platform;
+import com.jogamp.common.util.IntObjectHashMap;
+import com.jogamp.opengl.util.GLArrayDataEditable;
 
 public class ShaderState {
     public static final boolean DEBUG = Debug.isPropertyDefined("jogl.debug.GLSLState", true, AccessController.getContext());
-
+    private static final String currentStateKey = "jogamp.opengl.glsl.ShaderState" ;
+    
     public ShaderState() {
     }
 
@@ -47,38 +59,126 @@ public class ShaderState {
     public void setVerbose(boolean v) { verbose=v; }
 
     /**
-     * Fetches the current shader state from the thread local storage (TLS)
+     * Fetches the current shader state from this thread (TLS) current GLContext
      *
-     * @see com.jogamp.opengl.util.glsl.ShaderState#glUseProgram(GL2ES2, boolean)
-     * @see com.jogamp.opengl.util.glsl.ShaderState#getCurrent()
+     * @see com.jogamp.opengl.util.glsl.ShaderState#useProgram(GL2ES2, boolean)
+     * @see com.jogamp.opengl.util.glsl.ShaderState#getShaderState(GL)
+     * @see com.jogamp.opengl.util.glsl.ShaderState#setShaderState(GL)
+     * @see com.jogamp.opengl.util.glsl.ShaderState#getCurrentShaderState()
      */
-    public static synchronized ShaderState getCurrent() { 
-        GLContext current = GLContext.getCurrent();
-        if(null==current) {
-            throw new GLException("No context is current on this thread");
-        }
-        return (ShaderState) current.getAttachedObject(ShaderState.class.getName());
+    public static ShaderState getCurrentShaderState() { 
+        return getShaderState(GLContext.getCurrentGL());
+    }
+
+    /**
+     * Gets the shader state attached to the GL object's GLContext
+     *
+     * @param gl the GL object referencing the GLContext
+     * 
+     * @see com.jogamp.opengl.util.glsl.ShaderState#useProgram(GL2ES2, boolean)
+     * @see com.jogamp.opengl.util.glsl.ShaderState#getShaderState(GL)
+     * @see com.jogamp.opengl.util.glsl.ShaderState#setShaderState(GL)
+     * @see com.jogamp.opengl.util.glsl.ShaderState#getCurrentShaderState()
+     */
+    public static ShaderState getShaderState(GL gl) { 
+        return (ShaderState) gl.getContext().getAttachedObject(currentStateKey);
+    }
+
+    /**
+     * Attaches the shader state to the GL object's GLContext
+     *
+     * @param gl the GL object referencing the GLContext
+     * 
+     * @see com.jogamp.opengl.util.glsl.ShaderState#useProgram(GL2ES2, boolean)
+     * @see com.jogamp.opengl.util.glsl.ShaderState#getShaderState(GL)
+     * @see com.jogamp.opengl.util.glsl.ShaderState#setShaderState(GL)
+     * @see com.jogamp.opengl.util.glsl.ShaderState#getCurrentShaderState()
+     */
+    public final ShaderState setShaderState(GL gl) { 
+        return (ShaderState) gl.getContext().attachObject(currentStateKey, this);
+    }
+
+    /**
+     * Returns the attached user object for the given name to this ShaderState.
+     */
+    public final Object getAttachedObject(String name) {
+      return attachedObjectsByString.get(name);
+    }
+
+    /**
+     * Attach user object for the given name to this ShaderState.
+     * Returns the previously set object or null.
+     * 
+     * @return the previous mapped object or null if none
+     */
+    public final Object attachObject(String name, Object obj) {
+      return attachedObjectsByString.put(name, obj);
+    }
+
+    /**
+     * @param name name of the mapped object to detach
+     * 
+     * @return the previous mapped object or null if none
+     */
+    public final Object detachObject(String name) {
+        return attachedObjectsByString.remove(name);
+    }    
+    
+    /**
+     * Returns the attached user object for the given name to this ShaderState.
+     */
+    public final Object getAttachedObject(int name) {
+      return attachedObjectsByInt.get(name);
+    }
+
+    /**
+     * Attach user object for the given name to this ShaderState.
+     * Returns the previously set object or null.
+     */
+    public final Object attachObject(int name, Object obj) {
+      return attachedObjectsByInt.put(name, obj);
     }
 
+    public final Object detachObject(int name) {
+        return attachedObjectsByInt.remove(name);
+    }    
+    
     /**
      * Turns the shader program on or off.<br>
      * Puts this ShaderState to to the thread local storage (TLS),
      * if <code>on</code> is <code>true</code>.
      *
-     * @see com.jogamp.opengl.util.glsl.ShaderState#glUseProgram(GL2ES2, boolean)
-     * @see com.jogamp.opengl.util.glsl.ShaderState#getCurrent()
+     * @throws GLException if no program is attached
+     *
+     * @see com.jogamp.opengl.util.glsl.ShaderState#useProgram(GL2ES2, boolean)
+     * @see com.jogamp.opengl.util.glsl.ShaderState#getShaderState(GL)
+     * @see com.jogamp.opengl.util.glsl.ShaderState#getCurrentShaderState()
      */
-    public synchronized void glUseProgram(GL2ES2 gl, boolean on) {
+    public synchronized void useProgram(GL2ES2 gl, boolean on) throws GLException {
+        if(null==shaderProgram) { throw new GLException("No program is attached"); }        
         if(on) {
-            if(null!=shaderProgram) {
-                shaderProgram.glUseProgram(gl, true);
-            } else {
-                throw new GLException("No program is attached");
+            setShaderState(gl);
+            if(shaderProgram.linked()) {
+                shaderProgram.useProgram(gl, true);
+                if(resetAllShaderData) {
+                    resetAllAttributes(gl);
+                    resetAllUniforms(gl);
+                }
+            } else { 
+                if(resetAllShaderData) {
+                    setAllAttributes(gl);
+                }
+                if(!shaderProgram.link(gl, System.err)) {
+                    throw new GLException("could not link program: "+shaderProgram);
+                }
+                shaderProgram.useProgram(gl, true);
+                if(resetAllShaderData) {
+                    resetAllUniforms(gl);
+                }
             }
-            // update the current ShaderState to the TLS ..
-            gl.getContext().putAttachedObject(ShaderState.class.getName(), this);
-        } else if(null!=shaderProgram) {
-            shaderProgram.glUseProgram(gl, false);
+            resetAllShaderData = false;            
+        } else {
+            shaderProgram.useProgram(gl, false);
         }
     }
 
@@ -93,11 +193,16 @@ public class ShaderState {
     /**
      * Attach or switch a shader program
      *
-     * Attaching a shader program the first time, 
+     * <p>Attaching a shader program the first time, 
      * as well as switching to another program on the fly,
-     * while managing all attribute and uniform data.
+     * while managing all attribute and uniform data.</p>
+     * 
+     * <p>[Re]sets all data and use program in case of a program switch.<br> 
+     * Use program if linked in case of a 1st time attachment.</p>
+     * 
+     * @throws GLException if program was not linked and linking fails
      */
-    public synchronized void attachShaderProgram(GL2ES2 gl, ShaderProgram prog) {
+    public synchronized void attachShaderProgram(GL2ES2 gl, ShaderProgram prog) throws GLException {
         boolean prgInUse = false; // earmarked state
 
         if(DEBUG) {
@@ -118,19 +223,31 @@ public class ShaderState {
                 return;
             }
             prgInUse = shaderProgram.inUse();
-            shaderProgram.glUseProgram(gl, false);
+            
+            if(prgInUse) {
+                // only disable if in use
+                if(null != prog) {
+                    // new program will issue glUseProgram(..)
+                    shaderProgram.programInUse = false;
+                } else {
+                    // no new program - disable
+                    useProgram(gl, false);
+                }
+            }
+            resetAllShaderData = true;
         }
 
         // register new one
         shaderProgram = prog;
 
         if(null!=shaderProgram) {
-            // reinstall all data ..
-            shaderProgram.glUseProgram(gl, true);
-            glResetAllVertexAttributes(gl);
-            glResetAllUniforms(gl);
-            if(!prgInUse) {
-                shaderProgram.glUseProgram(gl, false);
+            // [re]set all data and use program if switching program, 
+            // or  use program if program is linked
+            if(shaderProgram.linked() || resetAllShaderData) {
+                useProgram(gl, true); // may reset all data
+                if(!prgInUse) {
+                    useProgram(gl, false);
+                }
             }
         }
         if(DEBUG) {
@@ -141,25 +258,27 @@ public class ShaderState {
     public ShaderProgram shaderProgram() { return shaderProgram; }
 
     /**
-     * Calls release(gl, true, true)
+     * Calls {@link #release(GL2ES2, boolean, boolean, boolean) release(gl, true, true, true)}
      *
      * @see #glReleaseAllVertexAttributes
      * @see #glReleaseAllUniforms
-     * @see #release(GL2ES2, boolean, boolean)
+     * @see #release(GL2ES2, boolean, boolean, boolean)
      */
     public synchronized void destroy(GL2ES2 gl) {
-        release(gl, true, true);
+        release(gl, true, true, true);
+        attachedObjectsByString.clear();        
+        attachedObjectsByInt.clear();
     }
 
     /**
-     * Calls release(gl, false, false)
+     * Calls {@link #release(GL2ES2, boolean, boolean, boolean) release(gl, false, false, false)}
      *
      * @see #glReleaseAllVertexAttributes
      * @see #glReleaseAllUniforms
-     * @see #release(GL2ES2, boolean, boolean)
+     * @see #release(GL2ES2, boolean, boolean, boolean)
      */
     public synchronized void releaseAllData(GL2ES2 gl) {
-        release(gl, false, false);
+        release(gl, false, false, false);
     }
 
     /**
@@ -167,22 +286,21 @@ public class ShaderState {
      * @see #glReleaseAllUniforms
      * @see ShaderProgram#release(GL2ES2, boolean)
      */
-    public synchronized void release(GL2ES2 gl, boolean releaseProgramToo, boolean releaseShaderToo) {
-        boolean prgInUse = false;
-        if(null!=shaderProgram) {
-            prgInUse = shaderProgram.inUse();
-            if(!prgInUse) {
-                shaderProgram.glUseProgram(gl, true);
-            }
+    public synchronized void release(GL2ES2 gl, boolean destroyBoundAttributes, boolean releaseProgramToo, boolean releaseShaderToo) {
+        if(null!=shaderProgram) {            
+            shaderProgram.useProgram(gl, false);
         }
-        glReleaseAllVertexAttributes(gl);
-        glReleaseAllUniforms(gl);
+        if(destroyBoundAttributes) {
+            for(Iterator<GLArrayData> iter = managedAttributes.iterator(); iter.hasNext(); ) {
+                iter.next().destroy(gl);
+            }            
+        }
+        releaseAllAttributes(gl);
+        releaseAllUniforms(gl);
         if(null!=shaderProgram) {
             if(releaseProgramToo) {
                 shaderProgram.release(gl, releaseShaderToo);
-            } else if(!prgInUse) {
-                shaderProgram.glUseProgram(gl, false);
-            }
+            } 
         }
     }
 
@@ -191,226 +309,375 @@ public class ShaderState {
     //
 
     /**
-     * Binds an attribute to the shader.
-     * This must be done before the program is linked !
-     * n name - 1 idx, where name is a uniq key
+     * Gets the cached location of a shader attribute.
      *
-     * @throws GLException is the program is already linked
+     * @return -1 if there is no such attribute available, 
+     *         otherwise >= 0
      *
-     * @see #glBindAttribLocation
-     * @see javax.media.opengl.GL2ES2#glBindAttribLocation
-     * @see #glGetAttribLocation
-     * @see javax.media.opengl.GL2ES2#glGetAttribLocation
-     * @see #getAttribLocation
+     * @see #bindAttribLocation(GL2ES2, int, String)
+     * @see #bindAttribLocation(GL2ES2, int, GLArrayData)
+     * @see #getAttribLocation(GL2ES2, String)
+     * @see GL2ES2#glGetAttribLocation(int, String)
+     */
+    public int getCachedAttribLocation(String name) {
+        Integer idx = (Integer) activeAttribLocationMap.get(name);
+        return (null!=idx)?idx.intValue():-1;
+    }
+    
+    /**
+     * Get the previous cached vertex attribute data.
+     *
+     * @return the GLArrayData object, null if not previously set.
+     *
+     * @see #ownAttribute(GLArrayData, boolean)
+     *
+     * @see #glEnableVertexAttribArray
+     * @see #glDisableVertexAttribArray
+     * @see #glVertexAttribPointer
+     * @see #getVertexAttribPointer
+     * @see #glReleaseAllVertexAttributes
+     * @see #glResetAllVertexAttributes
      * @see ShaderProgram#glReplaceShader
      */
-    public void glBindAttribLocation(GL2ES2 gl, int index, String name) {
-        if(null==shaderProgram) throw new GLException("No program is attached");
-        if(shaderProgram.linked()) throw new GLException("Program is already linked");
-        Integer idx = new Integer(index);
-        if(!attribMap2Idx.containsKey(name)) {
-            attribMap2Idx.put(name, idx);
-            gl.glBindAttribLocation(shaderProgram.program(), index, name);
+    public GLArrayData getAttribute(String name) {
+        return (GLArrayData) activeAttribDataMap.get(name);
+    }
+    
+    /**
+     * Binds or unbinds the {@link GLArrayData} lifecycle to this ShaderState.
+     *  
+     * <p>If an attribute location is cached (ie {@link #bindAttribLocation(GL2ES2, int, String)})
+     * it is promoted to the {@link GLArrayData} instance.</p>
+     * 
+     * <p>The attribute will be destroyed with {@link #destroy(GL2ES2)} 
+     * and it's location will be reset when switching shader with {@link #attachShaderProgram(GL2ES2, ShaderProgram)}.</p>
+     *  
+     * <p>The data will not be transfered to the GPU, use {@link #vertexAttribPointer(GL2ES2, GLArrayData)} additionally.</p>
+     * 
+     * @param attribute the {@link GLArrayData} which lifecycle shall be managed
+     * @param own true if <i>owning</i> shall be performs, false if <i>disowning</i>.
+     * 
+     * @see #bindAttribLocation(GL2ES2, int, String)
+     * @see #getAttribute(String)
+     */
+    public void ownAttribute(GLArrayData attribute, boolean own) {
+        if(own) {
+            final int location = getCachedAttribLocation(attribute.getName());
+            if(0<=location) {
+                attribute.setLocation(location);
+            }
+            managedAttributes.add(managedAttributes.size(), attribute);
+        } else {
+            managedAttributes.remove(attribute);
         }
     }
+    
+    public boolean ownsAttribute(GLArrayData attribute) {
+        return managedAttributes.contains(attribute);
+    }
+    
+    /**
+     * Binds a shader attribute to a location.
+     * Multiple names can be bound to one location.
+     * The value will be cached and can be retrieved via {@link #getCachedAttribLocation(String)}
+     * before or after linking.
+     *
+     * @throws GLException if no program is attached
+     * @throws GLException if the program is already linked
+     * 
+     * @see javax.media.opengl.GL2ES2#glBindAttribLocation(int, int, String)
+     * @see #getAttribLocation(GL2ES2, String)
+     * @see #getCachedAttribLocation(String)
+     */
+    public void bindAttribLocation(GL2ES2 gl, int location, String name) {
+        if(null==shaderProgram) throw new GLException("No program is attached");
+        if(shaderProgram.linked()) throw new GLException("Program is already linked");        
+        final Integer loc = new Integer(location);
+        activeAttribLocationMap.put(name, loc);
+        gl.glBindAttribLocation(shaderProgram.program(), location, name);
+    }
+
+    /**
+     * Binds a shader {@link GLArrayData} attribute to a location.
+     * Multiple names can be bound to one location.
+     * The value will be cached and can be retrieved via {@link #getCachedAttribLocation(String)}
+     * and {@link #getAttribute(String)}before or after linking.
+     * The {@link GLArrayData}'s location will be set as well.
+     *
+     * @throws GLException if no program is attached
+     * @throws GLException if the program is already linked
+     * 
+     * @see javax.media.opengl.GL2ES2#glBindAttribLocation(int, int, String)
+     * @see #getAttribLocation(GL2ES2, String)
+     * @see #getCachedAttribLocation(String)
+     * @see #getAttribute(String)
+     */
+    public void bindAttribLocation(GL2ES2 gl, int location, GLArrayData data) {
+        bindAttribLocation(gl, location, data.getName());
+        data.setLocation(location);
+        activeAttribDataMap.put(data.getName(), data);
+    }
 
     /**
-     * Gets the index of a shader attribute.
-     * This must be done after the program is linked !
+     * Gets the location of a shader attribute.<br>
+     * Uses either the cached value {@link #getCachedAttribLocation(String)} if valid,
+     * or the GLSL queried via {@link GL2ES2#glGetAttribLocation(int, String)}.<br>
+     * The location will be cached.
      *
      * @return -1 if there is no such attribute available, 
      *         otherwise >= 0
-     * @throws GLException is the program is not linked
+     * @throws GLException if no program is attached
+     * @throws GLException if the program is not linked and no location was cached.
      *
-     * @see #glBindAttribLocation
-     * @see javax.media.opengl.GL2ES2#glBindAttribLocation
-     * @see #glGetAttribLocation
-     * @see javax.media.opengl.GL2ES2#glGetAttribLocation
-     * @see #getAttribLocation
-     * @see ShaderProgram#glReplaceShader
+     * @see #getCachedAttribLocation(String)
+     * @see #bindAttribLocation(GL2ES2, int, GLArrayData)
+     * @see #bindAttribLocation(GL2ES2, int, String)
+     * @see GL2ES2#glGetAttribLocation(int, String)
      */
-    public int glGetAttribLocation(GL2ES2 gl, String name) {
-        if(!shaderProgram.linked()) throw new GLException("Program is not linked");
-        int index = getAttribLocation(name);
-        if(0>index) {
-            index = gl.glGetAttribLocation(shaderProgram.program(), name);
-            if(0<=index) {
-                Integer idx = new Integer(index);
-                attribMap2Idx.put(name, idx);
+    public int getAttribLocation(GL2ES2 gl, String name) {
+        if(null==shaderProgram) throw new GLException("No program is attached");
+        int location = getCachedAttribLocation(name);
+        if(0>location) {
+            if(!shaderProgram.linked()) throw new GLException("Program is not linked");
+            location = gl.glGetAttribLocation(shaderProgram.program(), name);
+            if(0<=location) {
+                Integer idx = new Integer(location);
+                activeAttribLocationMap.put(name, idx);
                 if(DEBUG) {
-                    System.err.println("Info: glGetAttribLocation: "+name+", loc: "+index);
+                    System.err.println("Info: glGetAttribLocation: "+name+", loc: "+location);
                 }
             } else if(verbose) {
-                Throwable tX = new Throwable("Info: glGetAttribLocation failed, no location for: "+name+", index: "+index);
+                Throwable tX = new Throwable("Info: glGetAttribLocation failed, no location for: "+name+", loc: "+location);
                 tX.printStackTrace();
             }
         }
-        return index;
+        return location;
     }
 
-    protected int getAttribLocation(String name) {
-        Integer idx = (Integer) attribMap2Idx.get(name);
-        return (null!=idx)?idx.intValue():-1;
+    /**
+     * Validates and returns the location of a shader attribute.<br>
+     * Uses either the cached value {@link #getCachedAttribLocation(String)} if valid, 
+     * or the GLSL queried via {@link GL2ES2#glGetAttribLocation(int, String)}.<br>
+     * The location will be cached and set in the  
+     * {@link GLArrayData} object.
+     *
+     * @return -1 if there is no such attribute available, 
+     *         otherwise >= 0
+     *         
+     * @throws GLException if no program is attached
+     * @throws GLException if the program is not linked and no location was cached.
+     *
+     * @see #getCachedAttribLocation(String)
+     * @see #bindAttribLocation(GL2ES2, int, GLArrayData)
+     * @see #bindAttribLocation(GL2ES2, int, String)
+     * @see GL2ES2#glGetAttribLocation(int, String)
+     * @see #getAttribute(String)
+     */
+    public int getAttribLocation(GL2ES2 gl, GLArrayData data) {
+        int location = getAttribLocation(gl, data.getName());
+        data.setLocation(location);
+        activeAttribDataMap.put(data.getName(), data);
+        return location;
     }
-
-
+    
     //
     // Enabled Vertex Arrays and its data
     //
 
     /**
-     * Enable a vertex attribute array
+     * @return true if the named attribute is enable
+     */
+    public final boolean isVertexAttribArrayEnabled(String name) {
+        return enabledAttributes.contains(name);
+    }
+    
+    /**
+     * @return true if the {@link GLArrayData} attribute is enable
+     */
+    public final boolean isVertexAttribArrayEnabled(GLArrayData data) {
+        return isVertexAttribArrayEnabled(data.getName());
+    }
+    
+    private boolean enableVertexAttribArray(GL2ES2 gl, String name, int location) {
+        enabledAttributes.add(name);
+        if(0>location) {
+            location = getAttribLocation(gl, name);
+            if(0>location) {
+                if(verbose) {
+                    Throwable tX = new Throwable("Info: glEnableVertexAttribArray failed, no index for: "+name);
+                    tX.printStackTrace();
+                }
+                return false;
+            }
+        }
+        if(DEBUG) {
+            System.err.println("Info: glEnableVertexAttribArray: "+name+", loc: "+location);
+        }
+        gl.glEnableVertexAttribArray(location);
+        return true;
+    }
+    
+    /**
+     * Enables a vertex attribute array.
+     * 
+     * This method retrieves the the location via {@link #getAttribLocation(GL2ES2, GLArrayData)}
+     * hence {@link #enableVertexAttribArray(GL2ES2, GLArrayData)} shall be preferred. 
      *
      * Even if the attribute is not found in the current shader,
-     * it is stored in this state.
+     * it is marked enabled in this state.
      *
      * @return false, if the name is not found, otherwise true
      *
-     * @throws GLException if the program is not in use
-     *
+     * @throws GLException if the program is not linked and no location was cached.
+     * 
      * @see #glEnableVertexAttribArray
      * @see #glDisableVertexAttribArray
      * @see #glVertexAttribPointer
      * @see #getVertexAttribPointer
-     * @see #glReleaseAllVertexAttributes
-     * @see #glResetAllVertexAttributes
-     * @see ShaderProgram#glReplaceShader
      */
-    public boolean glEnableVertexAttribArray(GL2ES2 gl, String name) {
-        if(!shaderProgram.inUse()) throw new GLException("Program is not in use");
-        enabledVertexAttribArraySet.add(name);
-        int index = glGetAttribLocation(gl, name);
-        if(0>index) {
-            if(verbose) {
-                Throwable tX = new Throwable("Info: glEnableVertexAttribArray failed, no index for: "+name);
-                tX.printStackTrace();
-            }
-            return false;
-        }
-        if(DEBUG) {
-            System.err.println("Info: glEnableVertexAttribArray: "+name+", loc: "+index);
-        }
-        gl.glEnableVertexAttribArray(index);
-        return true;
-    }
-
-    public boolean isVertexAttribArrayEnabled(String name) {
-        if(!shaderProgram.inUse()) throw new GLException("Program is not in use");
-        return enabledVertexAttribArraySet.contains(name);
+    public boolean enableVertexAttribArray(GL2ES2 gl, String name) {
+        return enableVertexAttribArray(gl, name, -1);
     }
+    
 
     /**
-     * Disables a vertex attribute array
+     * Enables a vertex attribute array, usually invoked by {@link GLArrayDataEditable#enableBuffer(GL, boolean)}.
      *
+     * This method uses the {@link GLArrayData}'s location if set
+     * and is the preferred alternative to {@link #enableVertexAttribArray(GL2ES2, String)}.
+     * If data location is unset it will be retrieved via {@link #getAttribLocation(GL2ES2, GLArrayData)} set
+     * and cached in this state.
+     *  
      * Even if the attribute is not found in the current shader,
-     * it is removed from this state.
+     * it is marked enabled in this state.
      *
      * @return false, if the name is not found, otherwise true
      *
-     * @throws GLException if the program is not in use
+     * @throws GLException if the program is not linked and no location was cached.
      *
      * @see #glEnableVertexAttribArray
      * @see #glDisableVertexAttribArray
      * @see #glVertexAttribPointer
      * @see #getVertexAttribPointer
-     * @see #glReleaseAllVertexAttributes
-     * @see #glResetAllVertexAttributes
-     * @see ShaderProgram#glReplaceShader
+     * @see GLArrayDataEditable#enableBuffer(GL, boolean)
      */
-    public boolean glDisableVertexAttribArray(GL2ES2 gl, String name) {
-        if(!shaderProgram.inUse()) throw new GLException("Program is not in use");
-        enabledVertexAttribArraySet.remove(name);
-        int index = glGetAttribLocation(gl, name);
-        if(0>index) {
-            if(verbose) {
-                Throwable tX = new Throwable("Info: glDisableVertexAttribArray failed, no index for: "+name);
-                tX.printStackTrace();
+    public boolean enableVertexAttribArray(GL2ES2 gl, GLArrayData data) {
+        if(0 > data.getLocation()) {
+            getAttribLocation(gl, data);
+        } else {
+            // ensure data is the current bound one
+            activeAttribDataMap.put(data.getName(), data);             
+        }
+        return enableVertexAttribArray(gl, data.getName(), data.getLocation());
+    }
+    
+    private boolean disableVertexAttribArray(GL2ES2 gl, String name, int location) {
+        enabledAttributes.remove(name);
+        if(0>location) {
+            location = getAttribLocation(gl, name);
+            if(0>location) {
+                if(verbose) {
+                    Throwable tX = new Throwable("Info: glDisableVertexAttribArray failed, no index for: "+name);
+                    tX.printStackTrace();
+                }
+                return false;
             }
-            return false;
         }
         if(DEBUG) {
             System.err.println("Info: glDisableVertexAttribArray: "+name);
         }
-        gl.glDisableVertexAttribArray(index);
+        gl.glDisableVertexAttribArray(location);
         return true;
     }
-
+    
     /**
-     * Set the vertex attribute data.
-     * Enable the attribute, if it is not enabled yet.
+     * Disables a vertex attribute array
      *
+     * This method retrieves the the location via {@link #getAttribLocation(GL2ES2, GLArrayData)}
+     * hence {@link #disableVertexAttribArray(GL2ES2, GLArrayData)} shall be preferred.
+     *  
      * Even if the attribute is not found in the current shader,
-     * it is stored in this state.
-     *
-     * @param data the GLArrayData's name must match the attributes one,
-     *      it's index will be set with the attribute's location,
-     *      if found.
+     * it is removed from this state enabled list.
      *
      * @return false, if the name is not found, otherwise true
      *
-     * @throws GLException if the program is not in use
+     * @throws GLException if no program is attached
+     * @throws GLException if the program is not linked and no location was cached.
      *
      * @see #glEnableVertexAttribArray
      * @see #glDisableVertexAttribArray
      * @see #glVertexAttribPointer
      * @see #getVertexAttribPointer
-     * @see #glReleaseAllVertexAttributes
-     * @see #glResetAllVertexAttributes
-     * @see ShaderProgram#glReplaceShader
      */
-    public boolean glVertexAttribPointer(GL2ES2 gl, GLArrayData data) {
-        if(!shaderProgram.inUse()) throw new GLException("Program is not in use");
-        if(!enabledVertexAttribArraySet.contains(data.getName())) {
-            if(!glEnableVertexAttribArray(gl, data.getName())) {
-                if(verbose) {
-                    Throwable tX = new Throwable("Info: glVertexAttribPointer: couldn't enable: "+data);
-                    tX.printStackTrace();
-                }
-            }
-        }
-        int index = getAttribLocation(data.getName());
-        if(0>index) {
-            if(verbose) {
-                Throwable tX = new Throwable("Info: glVertexAttribPointer failed, no index for: "+data);
-                tX.printStackTrace();
-            }
-        }
-        data.setLocation(index);
-        vertexAttribMap2Data.put(data.getName(), data);
-        if(0<=index) {
-            // only pass the data, if the attribute exists in the current shader
-            if(DEBUG) {
-                System.err.println("Info: glVertexAttribPointer: "+data);
-            }
-            gl.glVertexAttribPointer(data);
-            return true;
-        }
-        return false;
+    public boolean disableVertexAttribArray(GL2ES2 gl, String name) {
+        return disableVertexAttribArray(gl, name, -1);
     }
 
     /**
-     * Get the vertex attribute data, previously set.
+     * Disables a vertex attribute array
      *
-     * @return the GLArrayData object, null if not previously set.
+     * This method uses the {@link GLArrayData}'s location if set
+     * and is the preferred alternative to {@link #disableVertexAttribArray(GL2ES2, String)}.
+     * If data location is unset it will be retrieved via {@link #getAttribLocation(GL2ES2, GLArrayData)} set
+     * and cached in this state.
+     *  
+     * Even if the attribute is not found in the current shader,
+     * it is removed from this state enabled list.
+     *
+     * @return false, if the name is not found, otherwise true
+     *
+     * @throws GLException if no program is attached
+     * @throws GLException if the program is not linked and no location was cached.
      *
      * @see #glEnableVertexAttribArray
      * @see #glDisableVertexAttribArray
      * @see #glVertexAttribPointer
      * @see #getVertexAttribPointer
-     * @see #glReleaseAllVertexAttributes
-     * @see #glResetAllVertexAttributes
-     * @see ShaderProgram#glReplaceShader
      */
-    public GLArrayData getVertexAttribPointer(String name) {
-        return (GLArrayData) vertexAttribMap2Data.get(name);
+    public boolean disableVertexAttribArray(GL2ES2 gl, GLArrayData data) {
+        if(0 > data.getLocation()) {
+            getAttribLocation(gl, data);
+        }
+        return disableVertexAttribArray(gl, data.getName(), data.getLocation());
+    }
+    
+    /**
+     * Set the {@link GLArrayData} vertex attribute data.
+     * 
+     * This method uses the {@link GLArrayData}'s location if set.
+     * If data location is unset it will be retrieved via {@link #getAttribLocation(GL2ES2, GLArrayData)}, set
+     * and cached in this state.
+     * 
+     * @return false, if the location could not be determined, otherwise true
+     *
+     * @throws GLException if no program is attached
+     * @throws GLException if the program is not linked and no location was cached.
+     * 
+     * @see #glEnableVertexAttribArray
+     * @see #glDisableVertexAttribArray
+     * @see #glVertexAttribPointer
+     * @see #getVertexAttribPointer
+     */
+    public boolean vertexAttribPointer(GL2ES2 gl, GLArrayData data) {
+        int location = data.getLocation();
+        if(0 > location) {
+            location = getAttribLocation(gl, data);
+        } 
+        if(0 <= location) {
+            // only pass the data, if the attribute exists in the current shader
+            if(DEBUG) {
+                System.err.println("Info: glVertexAttribPointer: "+data);
+            }
+            gl.glVertexAttribPointer(data);
+            return true;
+        }
+        return false;
     }
 
     /**
      * Releases all mapped vertex attribute data,
      * disables all enabled attributes and loses all indices
      *
-     * @throws GLException is the program is not in use but the shaderProgram is set
-     *
      * @see #glEnableVertexAttribArray
      * @see #glDisableVertexAttribArray
      * @see #glVertexAttribPointer
@@ -420,23 +687,23 @@ public class ShaderState {
      * @see #glResetAllVertexAttributes
      * @see ShaderProgram#glReplaceShader
      */
-    public void glReleaseAllVertexAttributes(GL2ES2 gl) {
+    public void releaseAllAttributes(GL2ES2 gl) {
         if(null!=shaderProgram) {
-            if(!shaderProgram.inUse()) throw new GLException("Program is not in use");
-            for(Iterator iter = vertexAttribMap2Data.keySet().iterator(); iter.hasNext(); ) {
-                if(!glDisableVertexAttribArray(gl, (String) iter.next())) {
+            for(Iterator<GLArrayData> iter = activeAttribDataMap.values().iterator(); iter.hasNext(); ) {
+                if(!disableVertexAttribArray(gl, iter.next())) {
                     throw new GLException("Internal Error: mapped vertex attribute couldn't be disabled");
                 }
             }
-            for(Iterator iter = enabledVertexAttribArraySet.iterator(); iter.hasNext(); ) {
-                if(!glDisableVertexAttribArray(gl, (String) iter.next())) {
+            for(Iterator<String> iter = enabledAttributes.iterator(); iter.hasNext(); ) {
+                if(!disableVertexAttribArray(gl, iter.next())) {
                     throw new GLException("Internal Error: prev enabled vertex attribute couldn't be disabled");
                 }
             }
         }
-        vertexAttribMap2Data.clear();
-        enabledVertexAttribArraySet.clear();
-        attribMap2Idx.clear();
+        activeAttribDataMap.clear();
+        enabledAttributes.clear();
+        activeAttribLocationMap.clear();
+        managedAttributes.clear();        
     }
         
     /**
@@ -447,8 +714,6 @@ public class ShaderState {
      *
      * This method purpose is more for debugging. 
      *
-     * @throws GLException is the program is not in use but the shaderProgram is set
-     *
      * @see #glEnableVertexAttribArray
      * @see #glDisableVertexAttribArray
      * @see #glVertexAttribPointer
@@ -458,73 +723,92 @@ public class ShaderState {
      * @see #glResetAllVertexAttributes
      * @see ShaderProgram#glReplaceShader
      */
-    public void glDisableAllVertexAttributeArrays(GL2ES2 gl, boolean removeFromState) {
-        if(!shaderProgram.inUse()) throw new GLException("Program is not in use");
-
-        for(Iterator iter = enabledVertexAttribArraySet.iterator(); iter.hasNext(); ) {
-            String name = (String) iter.next();
+    public void disableAllVertexAttributeArrays(GL2ES2 gl, boolean removeFromState) {
+        for(Iterator<String> iter = enabledAttributes.iterator(); iter.hasNext(); ) {
+            final String name = iter.next();
             if(removeFromState) {
-                enabledVertexAttribArraySet.remove(name);
+                enabledAttributes.remove(name);
             }
-            int index = glGetAttribLocation(gl, name);
+            final int index = getAttribLocation(gl, name);
             if(0<=index) {
                 gl.glDisableVertexAttribArray(index);
             }
         }
     }
 
+    private final void relocateAttribute(GL2ES2 gl, GLArrayData attribute) {
+        // get new location ..
+        final String name = attribute.getName();
+        final int loc = getAttribLocation(gl, name);
+        attribute.setLocation(loc);
+
+        if(0<=loc) {
+            if(enabledAttributes.contains(name)) {
+                // enable attrib, VBO and pass location/data
+                gl.glEnableVertexAttribArray(loc);
+            }
+    
+            if( attribute.isVBO() ) {
+                gl.glBindBuffer(GL.GL_ARRAY_BUFFER, attribute.getVBOName());
+            } 
+    
+            gl.glVertexAttribPointer(attribute);
+        }
+    }
+    
     /**
-     * Reset all previously enabled mapped vertex attribute data,
-     * incl enabling them
+     * Reset all previously enabled mapped vertex attribute data.
+     * 
+     * <p>Attribute data is bound to the GL state</p>
+     * <p>Attribute location is bound to the program</p>
+     * 
+     * <p>However, since binding an attribute to a location via {@link #bindAttribLocation(GL2ES2, int, GLArrayData)}
+     * <i>must</i> happen before linking <b>and</b> we try to promote the attributes to the new program,
+     * we have to gather the probably new location etc.</p>
      *
-     * @throws GLException is the program is not in use
+     * @throws GLException is the program is not linked
      *
-     * @see #glEnableVertexAttribArray
-     * @see #glDisableVertexAttribArray
-     * @see #glVertexAttribPointer
-     * @see #getVertexAttribPointer
-     * @see #glReleaseAllVertexAttributes
-     * @see #glResetAllVertexAttributes
-     * @see ShaderProgram#glReplaceShader
+     * @see #attachShaderProgram(GL2ES2, ShaderProgram)
      */
-    public void glResetAllVertexAttributes(GL2ES2 gl) {
-        if(!shaderProgram.inUse()) throw new GLException("Program is not in use");
-        attribMap2Idx.clear();
-
-        /**
-         *
-        for(Iterator iter = enabledVertexAttribArraySet.iterator(); iter.hasNext(); ) {
-            glEnableVertexAttribArray(gl, (String) iter.next());
+    private final void resetAllAttributes(GL2ES2 gl) {
+        if(!shaderProgram.linked()) throw new GLException("Program is not linked");
+        activeAttribLocationMap.clear();
+        
+        for(Iterator<GLArrayData> iter = managedAttributes.iterator(); iter.hasNext(); ) {
+            iter.next().setLocation(-1);
         }
-        for(Iterator iter = vertexAttribMap2Data.values().iterator(); iter.hasNext(); ) {
-            GLArrayData data = (GLArrayData) iter.next();
-
-            ...
-        } */
-
-        for(Iterator iter = enabledVertexAttribArraySet.iterator(); iter.hasNext(); ) {
-            // get new location ..
-            String name = (String) iter.next();
-            int loc = glGetAttribLocation(gl, name);
+        for(Iterator<GLArrayData> iter = activeAttribDataMap.values().iterator(); iter.hasNext(); ) {
+            relocateAttribute(gl, iter.next());
+        }
+    }
 
-            // get & update data ..
-            GLArrayData data = getVertexAttribPointer(name);
-            data.setLocation(loc);
-            vertexAttribMap2Data.put(name, data);
+    private final void setAttribute(GL2ES2 gl, GLArrayData attribute) {
+        // get new location ..
+        final String name = attribute.getName();
+        final int loc = attribute.getLocation();
 
-            if(0>loc) {
-                // not used in shader
-                continue;
+        if(0<=loc) {
+            this.bindAttribLocation(gl, loc, name);
+            
+            if(enabledAttributes.contains(name)) {
+                // enable attrib, VBO and pass location/data
+                gl.glEnableVertexAttribArray(loc);
             }
-
-            // enable attrib, VBO and pass location/data
-            gl.glEnableVertexAttribArray(loc);
-
-            if( data.isVBO() ) {
-                gl.glBindBuffer(GL.GL_ARRAY_BUFFER, data.getVBOName());
+    
+            if( attribute.isVBO() ) {
+                gl.glBindBuffer(GL.GL_ARRAY_BUFFER, attribute.getVBOName());
             } 
-
-            gl.glVertexAttribPointer(data);
+    
+            gl.glVertexAttribPointer(attribute);
+        }
+    }
+    
+    /**
+     * preserves the attribute location .. (program not linked)
+     */
+    private final void setAllAttributes(GL2ES2 gl) {
+        for(Iterator<GLArrayData> iter = activeAttribDataMap.values().iterator(); iter.hasNext(); ) {
+            setAttribute(gl, iter.next());
         }
     }
 
@@ -533,8 +817,51 @@ public class ShaderState {
     //
 
     /**
-     * Gets the index of a shader uniform.
-     * This must be done when the program is in use !
+     * Gets the cached location of the shader uniform.
+     *
+     * @return -1 if there is no such uniform available, 
+     *         otherwise >= 0
+     */
+    public final int getCachedUniformLocation(String name) {
+        Integer idx = (Integer) activeUniformLocationMap.get(name);
+        return (null!=idx)?idx.intValue():-1;
+    }
+
+    /**
+     * Bind the {@link GLUniform} lifecycle to this ShaderState.
+     *  
+     * <p>If a uniform location is cached it is promoted to the {@link GLUniformData} instance.</p>
+     * 
+     * <p>The attribute will be destroyed with {@link #destroy(GL2ES2)} 
+     * and it's location will be reset when switching shader with {@link #attachShaderProgram(GL2ES2, ShaderProgram)}.</p>
+     *  
+     * <p>The data will not be transfered to the GPU, use {@link #uniform(GL2ES2, GLUniformData)} additionally.</p>
+     * 
+     * @param uniform the {@link GLUniformData} which lifecycle shall be managed
+     * 
+     * @see #getUniform(String)
+     */
+    public void ownUniform(GLUniformData uniform) {
+        final int location = getCachedUniformLocation(uniform.getName());
+        if(0<=location) {
+            uniform.setLocation(location);
+        }        
+        activeUniformDataMap.put(uniform.getName(), uniform);
+        managedUniforms.add(uniform);        
+    }
+    
+    public boolean ownsUniform(GLUniformData uniform) {
+        return managedUniforms.contains(uniform);
+    }
+    
+    /**
+     * Gets the location of a shader uniform.<br>
+     * Uses either the cached value {@link #getCachedUniformLocation(String)} if valid,
+     * or the GLSL queried via {@link GL2ES2#glGetUniformLocation(int, String)}.<br>
+     * The location will be cached.
+     * <p>
+     * The current shader program ({@link #attachShaderProgram(GL2ES2, ShaderProgram)}) 
+     * must be in use ({@link #useProgram(GL2ES2, boolean) }) !</p>
      *
      * @return -1 if there is no such attribute available,
      *         otherwise >= 0
@@ -546,27 +873,49 @@ public class ShaderState {
      * @see #getUniformLocation
      * @see ShaderProgram#glReplaceShader
      */
-    protected int glGetUniformLocation(GL2ES2 gl, String name) {
+    public final int getUniformLocation(GL2ES2 gl, String name) {
         if(!shaderProgram.inUse()) throw new GLException("Program is not in use");
-        int index = getUniformLocation(name);
-        if(0>index) {
-            index = gl.glGetUniformLocation(shaderProgram.program(), name);
-            if(0<=index) {
-                Integer idx = new Integer(index);
-                uniformMap2Idx.put(name, idx);
+        int location = getCachedUniformLocation(name);
+        if(0>location) {
+            location = gl.glGetUniformLocation(shaderProgram.program(), name);
+            if(0<=location) {
+                Integer idx = new Integer(location);
+                activeUniformLocationMap.put(name, idx);
             } else if(verbose) {
-                Throwable tX = new Throwable("Info: glUniform failed, no location for: "+name+", index: "+index);
+                Throwable tX = new Throwable("Info: glUniform failed, no location for: "+name+", index: "+location);
                 tX.printStackTrace();
             }
         }
-        return index;
+        return location;
     }
 
-    protected int getUniformLocation(String name) {
-        Integer idx = (Integer) uniformMap2Idx.get(name);
-        return (null!=idx)?idx.intValue():-1;
-    }
+    /**
+     * Validates and returns the location of a shader uniform.<br>
+     * Uses either the cached value {@link #getCachedUniformLocation(String)} if valid,
+     * or the GLSL queried via {@link GL2ES2#glGetUniformLocation(int, String)}.<br>
+     * The location will be cached and set in the  
+     * {@link GLUniformData} object.
+     * <p>
+     * The current shader program ({@link #attachShaderProgram(GL2ES2, ShaderProgram)}) 
+     * must be in use ({@link #useProgram(GL2ES2, boolean) }) !</p>
+     *
+     * @return -1 if there is no such attribute available,
+     *         otherwise >= 0
 
+     * @throws GLException is the program is not linked
+     *
+     * @see #glGetUniformLocation
+     * @see javax.media.opengl.GL2ES2#glGetUniformLocation
+     * @see #getUniformLocation
+     * @see ShaderProgram#glReplaceShader
+     */
+    public int getUniformLocation(GL2ES2 gl, GLUniformData data) {
+        int location = getUniformLocation(gl, data.getName());
+        data.setLocation(location);
+        activeUniformDataMap.put(data.getName(), data);        
+        return location;
+    }
+    
     /**
      * Set the uniform data.
      *
@@ -584,14 +933,16 @@ public class ShaderState {
      *
      * @see #glGetUniformLocation
      * @see javax.media.opengl.GL2ES2#glGetUniformLocation
+     * @see javax.media.opengl.GL2ES2#glUniform
      * @see #getUniformLocation
      * @see ShaderProgram#glReplaceShader
      */
-    public boolean glUniform(GL2ES2 gl, GLUniformData data) {
+    public boolean uniform(GL2ES2 gl, GLUniformData data) {
         if(!shaderProgram.inUse()) throw new GLException("Program is not in use");
-        int location = glGetUniformLocation(gl, data.getName());
-        data.setLocation(location);
-        uniformMap2Data.put(data.getName(), data);
+        int location = data.getLocation();
+        if(0>location) {
+            location = getUniformLocation(gl, data);
+        }
         if(0<=location) {
             // only pass the data, if the uniform exists in the current shader
             if(DEBUG) {
@@ -608,69 +959,98 @@ public class ShaderState {
      * @return the GLUniformData object, null if not previously set.
      */
     public GLUniformData getUniform(String name) {
-        return (GLUniformData) uniformMap2Data.get(name);
+        return activeUniformDataMap.get(name);
     }
 
     /**
      * Releases all mapped uniform data
      * and loses all indices
-     *
-     * @throws GLException is the program is not in use
      */
-    public void glReleaseAllUniforms(GL2ES2 gl) {
-        uniformMap2Data.clear();
-        uniformMap2Idx.clear();
+    public void releaseAllUniforms(GL2ES2 gl) {
+        activeUniformDataMap.clear();
+        activeUniformLocationMap.clear();
+        managedUniforms.clear();
     }
         
     /**
      * Reset all previously mapped uniform data
+     * 
+     * Uniform data and location is bound to the program,
+     * hence both are updated here
      *
      * @throws GLException is the program is not in use
+     * 
+     * @see #attachShaderProgram(GL2ES2, ShaderProgram)
      */
-    public void glResetAllUniforms(GL2ES2 gl) {
-        if(!shaderProgram.inUse()) throw new GLException("Program is not in use");
-        uniformMap2Idx.clear();
-        for(Iterator iter = uniformMap2Data.values().iterator(); iter.hasNext(); ) {
-            glUniform(gl, (GLUniformData) iter.next());
+    private final void resetAllUniforms(GL2ES2 gl) {
+        if(!shaderProgram.inUse()) throw new GLException("Program is not in use");        
+        activeUniformLocationMap.clear();
+        for(Iterator<GLUniformData> iter = managedUniforms.iterator(); iter.hasNext(); ) {
+            iter.next().setLocation(-1);
+        }        
+        for(Iterator<GLUniformData> iter = activeUniformDataMap.values().iterator(); iter.hasNext(); ) {
+            final GLUniformData uniform = iter.next();
+            uniform.setLocation(-1);
+            uniform(gl, uniform);
         }
     }
 
-    public String toString() {
-        StringBuffer buf = new StringBuffer();
-        buf.append("ShaderState[");
-        buf.append(shaderProgram.toString());
-        buf.append(",EnabledStates: [");
-        for(Iterator iter = enabledVertexAttribArraySet.iterator(); iter.hasNext(); ) {
-            buf.append("\n  ");
-            buf.append((String)iter.next());
-        }
-        buf.append("], [");
-        for(Iterator iter = vertexAttribMap2Data.values().iterator(); iter.hasNext(); ) {
-            GLArrayData data = (GLArrayData) iter.next();
-            if(data.getLocation()>=0) {
-                buf.append("\n  ");
-                buf.append(data);
-            }
+    public StringBuilder toString(StringBuilder sb) {
+        if(null==sb) {
+            sb = new StringBuilder();
         }
-        buf.append("], [");
-        for(Iterator iter=uniformMap2Data.values().iterator(); iter.hasNext(); ) {
-            GLUniformData data = (GLUniformData) iter.next();
-            if(data.getLocation()>=0) {
-                buf.append("\n  ");
-                buf.append(data);
-            }
+        
+        sb.append("ShaderState[ ");
+        
+        sb.append(Platform.getNewline()).append(" ");
+        if(null != shaderProgram) {
+            shaderProgram.toString(sb);
+        } else {
+            sb.append("ShaderProgram: null");
+        }
+        sb.append(Platform.getNewline()).append(" enabledAttributes [");
+        for(Iterator<String> iter = enabledAttributes.iterator(); iter.hasNext(); ) {
+            sb.append(Platform.getNewline()).append("  ").append(iter.next());
         }
-        buf.append("]");
-        return buf.toString();
+        sb.append(Platform.getNewline()).append(" ],").append(" activeAttributes [");
+        for(Iterator<GLArrayData> iter = activeAttribDataMap.values().iterator(); iter.hasNext(); ) {
+            sb.append(Platform.getNewline()).append("  ").append(iter.next());
+        }
+        sb.append(Platform.getNewline()).append(" ],").append(" managedAttributes [");
+        for(Iterator<GLArrayData> iter = managedAttributes.iterator(); iter.hasNext(); ) {
+            sb.append(Platform.getNewline()).append("  ").append(iter.next());
+        }
+        sb.append(Platform.getNewline()).append(" ],").append(" activeUniforms [");
+        for(Iterator<GLUniformData> iter=activeUniformDataMap.values().iterator(); iter.hasNext(); ) {
+            sb.append(Platform.getNewline()).append("  ").append(iter.next());
+        }
+        sb.append(Platform.getNewline()).append(" ],").append(" managedUniforms [");
+        for(Iterator<GLUniformData> iter = managedUniforms.iterator(); iter.hasNext(); ) {
+            sb.append(Platform.getNewline()).append("  ").append(iter.next());
+        }
+        sb.append(Platform.getNewline()).append(" ]").append(Platform.getNewline()).append("]");
+        return sb;
     }
-
-    protected boolean verbose = false;
-    protected ShaderProgram shaderProgram=null;
-    protected HashMap attribMap2Idx = new HashMap();
-    protected HashSet enabledVertexAttribArraySet = new HashSet();
-    protected HashMap vertexAttribMap2Data = new HashMap();
-    protected HashMap uniformMap2Idx = new HashMap();
-    protected HashMap uniformMap2Data = new HashMap();
-
+    
+    @Override
+    public String toString() {
+        return toString(null).toString();
+    }
+    
+    private boolean verbose = DEBUG ? true : false;
+    private ShaderProgram shaderProgram=null;
+    
+    private HashSet<String> enabledAttributes = new HashSet<String>();
+    private HashMap<String, Integer> activeAttribLocationMap = new HashMap<String, Integer>();
+    private HashMap<String, GLArrayData> activeAttribDataMap = new HashMap<String, GLArrayData>();
+    private ArrayList<GLArrayData> managedAttributes = new ArrayList<GLArrayData>();
+    
+    private HashMap<String, Integer> activeUniformLocationMap = new HashMap<String, Integer>();
+    private HashMap<String, GLUniformData> activeUniformDataMap = new HashMap<String, GLUniformData>();
+    private ArrayList<GLUniformData> managedUniforms = new ArrayList<GLUniformData>();
+    
+    private HashMap<String, Object> attachedObjectsByString = new HashMap<String, Object>();    
+    private IntObjectHashMap attachedObjectsByInt = new IntObjectHashMap();   
+    private boolean resetAllShaderData = false;
 }
 
diff --git a/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderUtil.java b/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderUtil.java
index c7e8459..747dd5c 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderUtil.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderUtil.java
@@ -39,6 +39,8 @@ import java.util.*;
 
 import javax.media.opengl.*;
 
+import com.jogamp.common.nio.Buffers;
+
 public class ShaderUtil {
     static abstract class Impl {
         public abstract String getShaderInfoLog(GL gl, int shaderObj);
@@ -51,7 +53,7 @@ public class ShaderUtil {
         public abstract boolean isProgramValid(GL gl, int programObj);
         public abstract boolean isProgramValid(GL gl, int programObj, PrintStream verboseOut);
         public abstract void createShader(GL gl, int type, IntBuffer shaders);
-        public abstract Set getShaderBinaryFormats(GL gl);
+        public abstract Set<Integer> getShaderBinaryFormats(GL gl);
         public abstract boolean isShaderCompilerAvailable(GL gl);
         public abstract void shaderSource(GL gl, int shader, java.lang.String[] source);
         public abstract void shaderSource(GL gl, IntBuffer shaders, java.lang.String[][] sources);
@@ -74,7 +76,7 @@ public class ShaderUtil {
         public String getShaderInfoLog(GL _gl, int shaderObj) {
             GL2ES2 gl = _gl.getGL2ES2();
             int[] infoLogLength=new int[1];
-            gl.glGetShaderiv(shaderObj, gl.GL_INFO_LOG_LENGTH, infoLogLength, 0);
+            gl.glGetShaderiv(shaderObj, GL2ES2.GL_INFO_LOG_LENGTH, infoLogLength, 0);
 
             if(infoLogLength[0]==0) {
                 return "(no info log)";
@@ -89,7 +91,7 @@ public class ShaderUtil {
         public String getProgramInfoLog(GL _gl, int programObj) {
             GL2ES2 gl = _gl.getGL2ES2();
             int[] infoLogLength=new int[1];
-            gl.glGetProgramiv(programObj, gl.GL_INFO_LOG_LENGTH, infoLogLength, 0);
+            gl.glGetProgramiv(programObj, GL2ES2.GL_INFO_LOG_LENGTH, infoLogLength, 0);
 
             if(infoLogLength[0]==0) {
                 return "(no info log)";
@@ -143,14 +145,13 @@ public class ShaderUtil {
 
         public boolean isProgramValid(GL _gl, int programObj, PrintStream verboseOut) {
             GL2ES2 gl = _gl.getGL2ES2();
-            int[] ires = new int[1];
             if(!gl.glIsProgram(programObj)) {
                 if(null!=verboseOut) {
                     verboseOut.println("Program name invalid: "+programObj);
                 }
                 return false;
             }
-            if(!isProgramStatusValid(gl, programObj, gl.GL_LINK_STATUS)) {
+            if(!isProgramStatusValid(gl, programObj, GL2ES2.GL_LINK_STATUS)) {
                 if(null!=verboseOut) {
                     verboseOut.println("Program link failed: "+programObj+"\n\t"+ getProgramInfoLog(gl, programObj));
                 }
@@ -159,7 +160,7 @@ public class ShaderUtil {
             if ( !gl.isGLES2() || isShaderCompilerAvailable(gl) ) {
                 // failed on APX2500 (ES2.0, no compiler) for valid programs
                 gl.glValidateProgram(programObj);
-                if(!isProgramStatusValid(gl, programObj, gl.GL_VALIDATE_STATUS)) {
+                if(!isProgramStatusValid(gl, programObj, GL2ES2.GL_VALIDATE_STATUS)) {
                     if(null!=verboseOut) {
                         verboseOut.println("Program validation failed: "+programObj+"\n\t"+ getProgramInfoLog(gl, programObj));
                     }
@@ -177,17 +178,15 @@ public class ShaderUtil {
         }
 
         private Boolean shaderCompilerAvailable = null;
-        private Set shaderBinaryFormats = null;
+        private Set<Integer> shaderBinaryFormats = null;
 
-        public Set getShaderBinaryFormats(GL _gl) {
+        public Set<Integer> getShaderBinaryFormats(GL _gl) {
             GL2ES2 gl = _gl.getGL2ES2();
             if(null==shaderBinaryFormats) {
-                if(gl.getContext()!=GLContext.getCurrent()) {
-                    return new HashSet(0); // bail out
-                }
+                gl.getContext().validateCurrent();
 
                 int[] param = new int[1];
-                shaderBinaryFormats = new HashSet();
+                shaderBinaryFormats = new HashSet<Integer>();
 
                 if (gl.isGLES2()) {
                     gl.glGetIntegerv(GL2ES2.GL_NUM_SHADER_BINARY_FORMATS, param, 0);
@@ -208,10 +207,8 @@ public class ShaderUtil {
         public boolean isShaderCompilerAvailable(GL _gl) {
             GL2ES2 gl = _gl.getGL2ES2();
             if(null==shaderCompilerAvailable) {
-                if(gl.getContext()!=GLContext.getCurrent()) {
-                    return false; // bail out
-                }
-                Set bfs = getShaderBinaryFormats(gl);
+                gl.getContext().validateCurrent();
+                Set<Integer> bfs = getShaderBinaryFormats(gl);
                 if(gl.isGLES2()) {
                     byte[] param = new byte[1];
                     gl.glGetBooleanv(GL2ES2.GL_SHADER_COMPILER, param, 0);
@@ -242,11 +239,11 @@ public class ShaderUtil {
                 throw new GLException("No sources specified");
             }
 
-            int[] lengths = new int[count];
+            IntBuffer lengths = Buffers.newDirectIntBuffer(count);
             for(int i=0; i<count; i++) {
-                lengths[i] = source[i].length();
+                lengths.put(i, source[i].length());
             }
-            gl.glShaderSource(shader, count, source, lengths, 0);
+            gl.glShaderSource(shader, count, source, lengths);
         }
 
         public void shaderSource(GL _gl, IntBuffer shaders, java.lang.String[][] sources)
@@ -370,7 +367,7 @@ public class ShaderUtil {
                 verboseOut.println("createAndCompileShader: CompileShader failed, GL Error: 0x"+Integer.toHexString(err));
             }
 
-            return isShaderStatusValid(gl, shader, gl.GL_COMPILE_STATUS, verboseOut) && err == GL.GL_NO_ERROR;
+            return isShaderStatusValid(gl, shader, GL2ES2.GL_COMPILE_STATUS, verboseOut) && err == GL.GL_NO_ERROR;
         }
 
     }
@@ -415,7 +412,7 @@ public class ShaderUtil {
         getImpl(gl).createShader(gl, type, shaders);
     }
 
-    public static Set getShaderBinaryFormats(GL gl) {
+    public static Set<Integer> getShaderBinaryFormats(GL gl) {
         return getImpl(gl).getShaderBinaryFormats(gl);
     }
 
@@ -466,11 +463,12 @@ public class ShaderUtil {
     private static Impl getImpl(GL _gl) {
         GL2ES2 gl = _gl.getGL2ES2();
         GLContext context = gl.getContext();
-        Impl impl = (Impl) context.getAttachedObject(ShaderUtil.class.getName());
+        Impl impl = (Impl) context.getAttachedObject(implObjectKey);
         if (impl == null) {
             impl = new GL2ES2Impl();
-            context.putAttachedObject(ShaderUtil.class.getName(), impl);
+            context.attachObject(implObjectKey, impl);
         }
         return impl;
     }
+    private static final String implObjectKey = "jogamp.opengl.glsl.ShaderUtilImpl" ;
 }
diff --git a/src/jogl/classes/com/jogamp/opengl/util/glsl/fixedfunc/FixedFuncUtil.java b/src/jogl/classes/com/jogamp/opengl/util/glsl/fixedfunc/FixedFuncUtil.java
index 9d7eecb..d92a7aa 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/glsl/fixedfunc/FixedFuncUtil.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/glsl/fixedfunc/FixedFuncUtil.java
@@ -15,29 +15,31 @@ import jogamp.opengl.util.glsl.fixedfunc.*;
 public class FixedFuncUtil {
     /**
      * @return If gl is a GL2ES1 and force is false, return the type cast object,
-     *         otherwise create a fixed function emulation pipeline with the GL2ES2 impl.
+     *         otherwise create a fixed function emulation pipeline using the given GL2ES2 impl
+     *         and hook it to the GLContext via {@link GLContext#setGL(GL)}.
      * @throws GLException if the GL object is neither GL2ES1 nor GL2ES2
      */
-    public static final GL2ES1 getFixedFuncImpl(GL gl, boolean force) {
-        if(!force && gl.isGL2ES1()) {
-            return gl.getGL2ES1();
-        } else if(gl.isGL2ES2()) {
+    public static final GL2ES1 wrapFixedFuncEmul(GL gl, boolean force) {
+        if(gl.isGL2ES2() && ( !gl.isGL2ES1() || force ) ) {
             GL2ES2 es2 = gl.getGL2ES2();
             FixedFuncHook hook = new FixedFuncHook(es2);
             FixedFuncImpl impl = new FixedFuncImpl(es2, hook);
             gl.getContext().setGL(impl);
             return impl;
+        } else if(gl.isGL2ES1()) {
+            return gl.getGL2ES1();
         }
         throw new GLException("GL Object is neither GL2ES1 nor GL2ES2: "+gl.getContext());
     }
 
     /**
      * @return If gl is a GL2ES1, return the type cast object,
-     *         otherwise create a fixed function emulation pipeline with the GL2ES2 impl.
+     *         otherwise create a fixed function emulation pipeline using the GL2ES2 impl.
+     *         and hook it to the GLContext via {@link GLContext#setGL(GL)}.
      * @throws GLException if the GL object is neither GL2ES1 nor GL2ES2
      */
-    public static final GL2ES1 getFixedFuncImpl(GL gl) {
-        return getFixedFuncImpl(gl, false);
+    public static final GL2ES1 wrapFixedFuncEmul(GL gl) {
+        return wrapFixedFuncEmul(gl, false);
     }
 
     /**
@@ -61,30 +63,30 @@ public class FixedFuncUtil {
      * @see javax.media.opengl.fixedfunc.GLPointerFunc#glTexCoordPointer
      */
     public static String getPredefinedArrayIndexName(int glArrayIndex) {
-        return FixedFuncPipeline.getPredefinedArrayIndexName(glArrayIndex);
+        return GLPointerFuncUtil.getPredefinedArrayIndexName(glArrayIndex);
     }
 
     /**
      * String name for
      * @see javax.media.opengl.GL2#GL_VERTEX_ARRAY
      */
-    public static final String mgl_Vertex = FixedFuncPipeline.mgl_Vertex;
+    public static final String mgl_Vertex = GLPointerFuncUtil.mgl_Vertex;
 
     /**
      * String name for
      * @see javax.media.opengl.GL2#GL_NORMAL_ARRAY
      */
-    public static final String mgl_Normal = FixedFuncPipeline.mgl_Normal;
+    public static final String mgl_Normal = GLPointerFuncUtil.mgl_Normal;
 
     /**
      * String name for
      * @see javax.media.opengl.GL2#GL_COLOR_ARRAY
      */
-    public static final String mgl_Color = FixedFuncPipeline.mgl_Color;
+    public static final String mgl_Color = GLPointerFuncUtil.mgl_Color;
 
     /**
      * String name for
      * @see javax.media.opengl.GL2#GL_TEXTURE_COORD_ARRAY
      */
-    public static final String mgl_MultiTexCoord = FixedFuncPipeline.mgl_MultiTexCoord;
+    public static final String mgl_MultiTexCoord = GLPointerFuncUtil.mgl_MultiTexCoord;
 }
diff --git a/src/jogl/classes/com/jogamp/opengl/util/glsl/sdk/CompileShader.java b/src/jogl/classes/com/jogamp/opengl/util/glsl/sdk/CompileShader.java
index a0eed50..1f79890 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/glsl/sdk/CompileShader.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/glsl/sdk/CompileShader.java
@@ -1,5 +1,7 @@
 package com.jogamp.opengl.util.glsl.sdk;
 
+import com.jogamp.common.util.IOUtil;
+
 import javax.media.opengl.*;
 import com.jogamp.opengl.util.*;
 import com.jogamp.opengl.util.glsl.*;
@@ -51,7 +53,7 @@ public abstract class CompileShader {
         String justName = basename(resourceName);
         outName = justName.substring(0, justName.length() - suffixLen) +
                   ShaderCode.getFileSuffix(true, type);
-        URL resourceURL = Locator.getResource(null, resourceName);
+        URL resourceURL = IOUtil.getResource(null, resourceName);
         String dirName = dirname(resourceURL.getPath());
 
         outName = dirName + File.separator + "bin" + File.separator + 
@@ -63,7 +65,7 @@ public abstract class CompileShader {
     public void processOneShader(String resourceName, String outName, int type)
         throws IOException, UnsupportedEncodingException, InterruptedException
     {
-        URL resourceURL = Locator.getResource(null, resourceName);
+        URL resourceURL = IOUtil.getResource(null, resourceName);
         String dirName = dirname(resourceURL.getPath());
 
         String shader = ShaderCode.readShaderSource(null, resourceName);
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 38f8ff9..b6df365 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/texture/Texture.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/texture/Texture.java
@@ -43,7 +43,6 @@ import javax.media.opengl.*;
 import javax.media.opengl.glu.*;
 import javax.media.nativewindow.NativeWindowFactory;
 import jogamp.opengl.*;
-import com.jogamp.opengl.util.texture.*;
 import com.jogamp.opengl.util.texture.spi.*;
 
 /**
@@ -178,38 +177,33 @@ public class Texture {
     private static final boolean disableNPOT    = Debug.isPropertyDefined("jogl.texture.nonpot", true, localACC);
     private static final boolean disableTexRect = Debug.isPropertyDefined("jogl.texture.notexrect", true, localACC);
 
-    public Texture(TextureData data) throws GLException {
+    public Texture(GL gl, TextureData data) throws GLException {
         texID = 0;
-        updateImage(data);
+        updateImage(gl, data);
     }
 
     // Constructor for use when creating e.g. cube maps, where there is
     // no initial texture data
-    public Texture(int target) throws GLException {
+    public Texture(int target) {
         texID = 0;
         this.target = target;
     }
 
     // Package-private constructor for creating a texture object which wraps
     // an existing texture ID from another package
-    Texture(int textureID,
-	    int target,
-	    int texWidth,
-	    int texHeight,
-	    int imgWidth,
-	    int imgHeight,
-	    boolean mustFlipVertically) {
-	this.texID = textureID;
-	this.target = target;
-	this.mustFlipVertically = mustFlipVertically;
-	this.texWidth = texWidth;
-	this.texHeight = texHeight;
-	setImageSize(imgWidth, imgHeight, target);
+    Texture(int textureID, int target, int texWidth, int texHeight, int imgWidth, int imgHeight,
+            boolean mustFlipVertically) {
+        this.texID = textureID;
+        this.target = target;
+        this.mustFlipVertically = mustFlipVertically;
+        this.texWidth = texWidth;
+        this.texHeight = texHeight;
+        setImageSize(imgWidth, imgHeight, target);
     }
 
     /**
      * Enables this texture's target (e.g., GL_TEXTURE_2D) in the
-     * current GL context's state. This method is a shorthand equivalent
+     * given GL context's state. This method is a shorthand equivalent
      * of the following OpenGL code:
      <pre>
      gl.glEnable(texture.getTarget());
@@ -221,13 +215,13 @@ public class Texture {
      * @throws GLException if no OpenGL context was current or if any
      * OpenGL-related errors occurred
      */
-    public void enable() throws GLException {
-        GLContext.getCurrentGL().glEnable(target);
+    public void enable(GL gl) throws GLException {
+        gl.glEnable(target);
     }
-
+    
     /**
      * Disables this texture's target (e.g., GL_TEXTURE_2D) in the
-     * current GL context's state. This method is a shorthand equivalent
+     * given GL state. This method is a shorthand equivalent
      * of the following OpenGL code:
      <pre>
      gl.glDisable(texture.getTarget());
@@ -235,16 +229,17 @@ 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
      *
      * @throws GLException if no OpenGL context was current or if any
      * OpenGL-related errors occurred
      */
-    public void disable() throws GLException {
-        GLContext.getCurrentGL().glDisable(target); 
+    public void disable(GL gl) throws GLException {
+        gl.glDisable(target); 
     }
-
+    
     /**
-     * Binds this texture to the current GL context. This method is a
+     * Binds this texture to the given GL context. This method is a
      * shorthand equivalent of the following OpenGL code:
      <pre>
      gl.glBindTexture(texture.getTarget(), texture.getTextureObject());
@@ -252,43 +247,29 @@ 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
      *
      * @throws GLException if no OpenGL context was current or if any
      * OpenGL-related errors occurred
      */
-    public void bind() throws GLException {
-        validateTexID(null, true);
-        GLContext.getCurrentGL().glBindTexture(target, texID); 
-    }
-
-    /**
-     * Disposes the native resources used by this texture object.
-     *
-     * @throws GLException if no OpenGL context was current or if any
-     * OpenGL-related errors occurred
-     * @deprecated use destroy(GL)
-     */
-    public void dispose() throws GLException {
-        destroy(GLContext.getCurrentGL());
+    public void bind(GL gl) throws GLException {
+        validateTexID(gl, true);
+        gl.glBindTexture(target, texID); 
     }
-
+    
     /**
-     * Disposes the native resources used by this texture object.
-     *
-     * @throws GLException if any OpenGL-related errors occurred
-     * @deprecated use destroy(GL)
+     * @deprecated use {@link #destroy(GL)}
      */
-    public void dispose(GL gl) throws GLException {
+    public final void dispose(GL gl) throws GLException {
         destroy(gl);
     }
-
     /**
      * Destroys the native resources used by this texture object.
      *
      * @throws GLException if any OpenGL-related errors occurred
      */
     public void destroy(GL gl) throws GLException {
-        if(0<texID) {
+        if(0!=texID) {
             gl.glDeleteTextures(1, new int[] {texID}, 0);
             texID = 0;
         }
@@ -414,11 +395,10 @@ public class Texture {
      * Updates the entire content area of this texture using the data in
      * the given image.
      * 
-     * @throws GLException if no OpenGL context was current or if any
-     * OpenGL-related errors occurred
+     * @throws GLException if any OpenGL-related errors occurred
      */
-    public void updateImage(TextureData data) throws GLException {
-        updateImage(data, 0);
+    public void updateImage(GL gl, TextureData data) throws GLException {
+        updateImage(gl, data, 0);
     }
 
     /**
@@ -438,11 +418,9 @@ public class Texture {
      * using the data in the given image. In general this is intended
      * for construction of cube maps.
      * 
-     * @throws GLException if no OpenGL context was current or if any
-     * OpenGL-related errors occurred
+     * @throws GLException if any OpenGL-related errors occurred
      */
-    public void updateImage(TextureData data, int target) throws GLException {
-        GL gl = GLContext.getCurrentGL();
+    public void updateImage(GL gl, TextureData data, int target) throws GLException {
         validateTexID(gl, true);
 
         imgWidth = data.getWidth();
@@ -593,7 +571,7 @@ public class Texture {
                 gl.glPixelStorei(GL.GL_UNPACK_ALIGNMENT, align[0]); // restore alignment
             }
         } else {
-            checkCompressedTextureExtensions(data);
+            checkCompressedTextureExtensions(gl, data);
             Buffer[] mipmapData = data.getMipmapData();
             if (mipmapData != null) {
                 int width = texWidth;
@@ -610,7 +588,7 @@ public class Texture {
                         gl.glTexImage2D(texTarget, i, data.getInternalFormat(),
                                         width, height, data.getBorder(),
                                         data.getPixelFormat(), data.getPixelType(), null);
-                        updateSubImageImpl(data, texTarget, i, 0, 0, 0, 0, data.getWidth(), data.getHeight());
+                        updateSubImageImpl(gl, data, texTarget, i, 0, 0, 0, 0, data.getWidth(), data.getHeight());
                     }
 
                     width = Math.max(width / 2, 1);
@@ -631,7 +609,7 @@ public class Texture {
                         gl.glCompressedTexImage2D(texTarget, 0, data.getInternalFormat(),
                                                   texWidth, texHeight, data.getBorder(),
                                                   buf.capacity(), buf);
-                        updateSubImageImpl(data, texTarget, 0, 0, 0, 0, 0, data.getWidth(), data.getHeight());
+                        updateSubImageImpl(gl, data, texTarget, 0, 0, 0, 0, 0, data.getWidth(), data.getHeight());
                     }
                 } else {
                     if (data.getMipmap() && haveAutoMipmapGeneration && gl.isGL2ES1()) {
@@ -646,7 +624,7 @@ public class Texture {
                     gl.glTexImage2D(texTarget, 0, data.getInternalFormat(),
                                     texWidth, texHeight, data.getBorder(),
                                     data.getPixelFormat(), data.getPixelType(), null);
-                    updateSubImageImpl(data, texTarget, 0, 0, 0, 0, 0, data.getWidth(), data.getHeight());
+                    updateSubImageImpl(gl, data, texTarget, 0, 0, 0, 0, 0, data.getWidth(), data.getHeight());
                 }
             }
         }
@@ -697,17 +675,16 @@ public class Texture {
      * @param y the y offset (in pixels) relative to the lower-left corner
      * of this texture
      *
-     * @throws GLException if no OpenGL context was current or if any
-     * OpenGL-related errors occurred
+     * @throws GLException if any OpenGL-related errors occurred
      */
-    public void updateSubImage(TextureData data, int mipmapLevel, int x, int y) throws GLException {
+    public void updateSubImage(GL gl, TextureData data, int mipmapLevel, int x, int y) throws GLException {
         if (usingAutoMipmapGeneration && mipmapLevel != 0) {
             // When we're using mipmap generation via GL_GENERATE_MIPMAP, we
             // don't need to update other mipmap levels
             return;
         }
-        bind();
-        updateSubImageImpl(data, target, mipmapLevel, x, y, 0, 0, data.getWidth(), data.getHeight());
+        bind(gl);
+        updateSubImageImpl(gl, data, target, mipmapLevel, x, y, 0, 0, data.getWidth(), data.getHeight());
     }
 
     /**
@@ -740,7 +717,7 @@ public class Texture {
      * @throws GLException if no OpenGL context was current or if any
      * OpenGL-related errors occurred
      */
-    public void updateSubImage(TextureData data, int mipmapLevel,
+    public void updateSubImage(GL gl, TextureData data, int mipmapLevel,
                                int dstx, int dsty,
                                int srcx, int srcy,
                                int width, int height) throws GLException {
@@ -752,8 +729,8 @@ public class Texture {
             // don't need to update other mipmap levels
             return;
         }
-        bind();
-        updateSubImageImpl(data, target, mipmapLevel, dstx, dsty, srcx, srcy, width, height);
+        bind(gl);
+        updateSubImageImpl(gl, data, target, mipmapLevel, dstx, dsty, srcx, srcy, width, height);
     }
 
     /**
@@ -765,10 +742,9 @@ public class Texture {
      * @throws GLException if no OpenGL context was current or if any
      * OpenGL-related errors occurred
      */
-    public void setTexParameterf(int parameterName,
+    public void setTexParameterf(GL gl, int parameterName,
                                  float value) {
-        bind();
-        GL gl = GLContext.getCurrentGL();
+        bind(gl);
         gl.glTexParameterf(target, parameterName, value);
     }
 
@@ -777,13 +753,11 @@ public class Texture {
      * texture's target. Causes this texture to be bound to the current
      * texture state.
      * 
-     * @throws GLException if no OpenGL context was current or if any
-     * OpenGL-related errors occurred
+     * @throws GLException if any OpenGL-related errors occurred
      */
-    public void setTexParameterfv(int parameterName,
+    public void setTexParameterfv(GL gl, int parameterName,
                                   FloatBuffer params) {
-        bind();
-        GL gl = GLContext.getCurrentGL();
+        bind(gl);
         gl.glTexParameterfv(target, parameterName, params);
     }
 
@@ -792,13 +766,11 @@ public class Texture {
      * texture's target. Causes this texture to be bound to the current
      * texture state.
      * 
-     * @throws GLException if no OpenGL context was current or if any
-     * OpenGL-related errors occurred
+     * @throws GLException if any OpenGL-related errors occurred
      */
-    public void setTexParameterfv(int parameterName,
+    public void setTexParameterfv(GL gl, int parameterName,
                                   float[] params, int params_offset) {
-        bind();
-        GL gl = GLContext.getCurrentGL();
+        bind(gl);
         gl.glTexParameterfv(target, parameterName, params, params_offset);
     }
 
@@ -810,13 +782,11 @@ public class Texture {
      * platform and GL_CLAMP if not. Causes this texture to be bound to
      * the current texture state.
      * 
-     * @throws GLException if no OpenGL context was current or if any
-     * OpenGL-related errors occurred
+     * @throws GLException if any OpenGL-related errors occurred
      */
-    public void setTexParameteri(int parameterName,
+    public void setTexParameteri(GL gl, int parameterName,
                                  int value) {
-        bind();
-        GL gl = GLContext.getCurrentGL();
+        bind(gl);
         gl.glTexParameteri(target, parameterName, value);
     }
 
@@ -825,13 +795,11 @@ public class Texture {
      * target. Causes this texture to be bound to the current texture
      * state.
      * 
-     * @throws GLException if no OpenGL context was current or if any
-     * OpenGL-related errors occurred
+     * @throws GLException if any OpenGL-related errors occurred
      */
-    public void setTexParameteriv(int parameterName,
+    public void setTexParameteriv(GL gl, int parameterName,
                                   IntBuffer params) {
-        bind();
-        GL gl = GLContext.getCurrentGL();
+        bind(gl);
         gl.glTexParameteriv(target, parameterName, params);
     }
 
@@ -840,23 +808,21 @@ public class Texture {
      * target. Causes this texture to be bound to the current texture
      * state.
      * 
-     * @throws GLException if no OpenGL context was current or if any
-     * OpenGL-related errors occurred
+     * @throws GLException if any OpenGL-related errors occurred
      */
-    public void setTexParameteriv(int parameterName,
+    public void setTexParameteriv(GL gl, int parameterName,
                                   int[] params, int params_offset) {
-        bind();
-        GL gl = GLContext.getCurrentGL();
+        bind(gl);
         gl.glTexParameteriv(target, parameterName, params, params_offset);
     }
 
     /**
      * Returns the underlying OpenGL texture object for this texture.
      * Most applications will not need to access this, since it is
-     * handled automatically by the bind() and dispose() APIs.
+     * handled automatically by the bind(GL) and destroy(GL) APIs.
      */
-    public int getTextureObject() {
-        validateTexID(null, false);
+    public int getTextureObject(GL gl) {
+        validateTexID(gl, false);
         return texID;
     }
 
@@ -936,10 +902,9 @@ public class Texture {
         }
     }
 
-    private void updateSubImageImpl(TextureData data, int newTarget, int mipmapLevel,
+    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 {
-        GL gl = GLContext.getCurrentGL();
         data.setHaveEXTABGR(gl.isExtensionAvailable("GL_EXT_abgr"));
         data.setHaveGL12(gl.isExtensionAvailable("GL_VERSION_1_2"));
 
@@ -1000,7 +965,7 @@ public class Texture {
             height = texHeight - dsty;
         }
 
-        checkCompressedTextureExtensions(data);
+        checkCompressedTextureExtensions(gl, data);
 
         if (data.isDataCompressed()) {
             gl.glCompressedTexSubImage2D(newTarget, mipmapLevel,
@@ -1052,8 +1017,7 @@ public class Texture {
         }
     }
 
-    private void checkCompressedTextureExtensions(TextureData data) {
-        GL gl = GLContext.getCurrentGL();
+    private void checkCompressedTextureExtensions(GL gl, TextureData data) {
         if (data.isDataCompressed()) {
             switch (data.getInternalFormat()) {
             case GL.GL_COMPRESSED_RGB_S3TC_DXT1_EXT:
@@ -1073,22 +1037,20 @@ public class Texture {
         }
     }
 
-    private void validateTexID(GL gl, boolean throwException) {
-        if( 0 < texID ) return;
-        if(null==gl) {
-            GLContext ctx = GLContext.getCurrent();
-            if(null!=ctx) {
-                gl = ctx.getGL();
-            } else if(throwException) {
-                throw new GLException("No context current, can't create texture ID");
+    private boolean validateTexID(GL gl, boolean throwException) {
+        if( 0 == texID ) {
+            if( null != gl ) {
+                int[] tmp = new int[1];
+                gl.glGenTextures(1, tmp, 0);
+                texID = tmp[0];
+                if ( 0 == texID && throwException ) {
+                    throw new GLException("Create texture ID invalid: texID "+texID+", glerr 0x"+Integer.toHexString(gl.glGetError()));
+                }
+            } else if ( throwException ) {
+                throw new GLException("No GL context given, can't create texture ID");
             }
         }
-
-        if(null!=gl) {
-            int[] tmp = new int[1];
-            gl.glGenTextures(1, tmp, 0);
-            texID = tmp[0];
-        }
+        return 0 != texID;
     }
 
     // Helper routines for disabling certain codepaths
diff --git a/src/jogl/classes/com/jogamp/opengl/util/texture/TextureData.java b/src/jogl/classes/com/jogamp/opengl/util/texture/TextureData.java
index f598422..149a2d4 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/texture/TextureData.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/texture/TextureData.java
@@ -36,10 +36,11 @@
 
 package com.jogamp.opengl.util.texture;
 
-import java.nio.*;
+import java.nio.Buffer;
 
-import javax.media.opengl.*;
-import com.jogamp.opengl.util.*;
+import javax.media.opengl.GLProfile;
+
+import com.jogamp.opengl.util.GLBuffers;
 
 /**
  * Represents the data for an OpenGL texture. This is separated from
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 e86ff16..5be7f92 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/texture/TextureIO.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/texture/TextureIO.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2005 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
@@ -39,16 +40,33 @@
 
 package com.jogamp.opengl.util.texture;
 
-import java.io.*;
-import java.net.*;
-import java.nio.*;
-import java.util.*;
+import java.io.BufferedInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.nio.Buffer;
+import java.nio.ByteBuffer;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.media.opengl.GL;
+import javax.media.opengl.GL2;
+import javax.media.opengl.GLContext;
+import javax.media.opengl.GLException;
+import javax.media.opengl.GLProfile;
 
-import javax.media.opengl.*;
-import javax.media.opengl.glu.*;
 import jogamp.opengl.Debug;
-import com.jogamp.opengl.util.*;
-import com.jogamp.opengl.util.texture.spi.*;
+
+import com.jogamp.common.util.IOUtil;
+import com.jogamp.opengl.util.texture.spi.DDSImage;
+import com.jogamp.opengl.util.texture.spi.NetPbmTextureWriter;
+import com.jogamp.opengl.util.texture.spi.SGIImage;
+import com.jogamp.opengl.util.texture.spi.TGAImage;
+import com.jogamp.opengl.util.texture.spi.TextureProvider;
+import com.jogamp.opengl.util.texture.spi.TextureWriter;
 
 /** <P> Provides input and output facilities for both loading OpenGL
     textures from disk and streams as well as writing textures already
@@ -177,7 +195,7 @@ public class TextureIO {
                                              boolean mipmap,
                                              String fileSuffix) throws IOException {
         if (fileSuffix == null) {
-            fileSuffix = FileUtil.getFileSuffix(file);
+            fileSuffix = IOUtil.getFileSuffix(file);
         }
         return newTextureDataImpl(glp, file, 0, 0, mipmap, fileSuffix);
     }
@@ -234,7 +252,7 @@ public class TextureIO {
                                              boolean mipmap,
                                              String fileSuffix) throws IOException {
         if (fileSuffix == null) {
-            fileSuffix = FileUtil.getFileSuffix(url.getPath());
+            fileSuffix = IOUtil.getFileSuffix(url.getPath());
         }
         return newTextureDataImpl(glp, url, 0, 0, mipmap, fileSuffix);
     }
@@ -288,7 +306,7 @@ public class TextureIO {
         }
 
         if (fileSuffix == null) {
-            fileSuffix = FileUtil.getFileSuffix(file);
+            fileSuffix = IOUtil.getFileSuffix(file);
         }
 
         return newTextureDataImpl(glp, file, internalFormat, pixelFormat, mipmap, fileSuffix);
@@ -380,7 +398,7 @@ public class TextureIO {
         }
 
         if (fileSuffix == null) {
-            fileSuffix = FileUtil.getFileSuffix(url.getPath());
+            fileSuffix = IOUtil.getFileSuffix(url.getPath());
         }
 
         return newTextureDataImpl(glp, url, internalFormat, pixelFormat, mipmap, fileSuffix);
@@ -400,12 +418,25 @@ public class TextureIO {
      * @throws IllegalArgumentException if the passed TextureData was null
      */
     public static Texture newTexture(TextureData data) throws GLException, IllegalArgumentException {
+        return newTexture(GLContext.getCurrentGL(), data);
+    }
+
+    /** 
+     * Creates an OpenGL texture object from the specified TextureData
+     * using the current OpenGL context.
+     *
+     * @param data the texture data to turn into an OpenGL texture
+     * @throws GLException if no OpenGL context is current or if an
+     *                     OpenGL error occurred
+     * @throws IllegalArgumentException if the passed TextureData was null
+     */
+    public static Texture newTexture(GL gl, TextureData data) throws GLException, IllegalArgumentException {
         if (data == null) {
             throw new IllegalArgumentException("Null TextureData");
         }
-        return new Texture(data);
+        return new Texture(gl, data);
     }
-
+    
     /** 
      * Creates an OpenGL texture object from the specified file using
      * the current OpenGL context.
@@ -422,9 +453,10 @@ public class TextureIO {
      *                     OpenGL error occurred
      */
     public static Texture newTexture(File file, boolean mipmap) throws IOException, GLException {
-        GLProfile glp = GLContext.getCurrentGL().getGLProfile();
-        TextureData data = newTextureData(glp, file, mipmap, FileUtil.getFileSuffix(file));
-        Texture texture = newTexture(data);
+        GL gl = GLContext.getCurrentGL();
+        GLProfile glp = gl.getGLProfile();
+        TextureData data = newTextureData(glp, file, mipmap, IOUtil.getFileSuffix(file));
+        Texture texture = newTexture(gl, data);
         data.flush();
         return texture;
     }
@@ -450,9 +482,10 @@ public class TextureIO {
      *                     OpenGL error occurred
      */
     public static Texture newTexture(InputStream stream, boolean mipmap, String fileSuffix) throws IOException, GLException {
-        GLProfile glp = GLContext.getCurrentGL().getGLProfile();
+        GL gl = GLContext.getCurrentGL();
+        GLProfile glp = gl.getGLProfile();
         TextureData data = newTextureData(glp, stream, mipmap, fileSuffix);
-        Texture texture = newTexture(data);
+        Texture texture = newTexture(gl, data);
         data.flush();
         return texture;
     }
@@ -479,28 +512,26 @@ public class TextureIO {
      */
     public static Texture newTexture(URL url, boolean mipmap, String fileSuffix) throws IOException, GLException {
         if (fileSuffix == null) {
-            fileSuffix = FileUtil.getFileSuffix(url.getPath());
+            fileSuffix = IOUtil.getFileSuffix(url.getPath());
         }
-        GLProfile glp = GLContext.getCurrentGL().getGLProfile();
+        GL gl = GLContext.getCurrentGL();
+        GLProfile glp = gl.getGLProfile();
         TextureData data = newTextureData(glp, url, mipmap, fileSuffix);
-        Texture texture = newTexture(data);
+        Texture texture = newTexture(gl, data);
         data.flush();
         return texture;
     }
 
     /** 
      * Creates an OpenGL texture object associated with the given OpenGL
-     * texture target using the current OpenGL context. The texture has
+     * texture target. The texture has
      * no initial data. This is used, for example, to construct cube
      * maps out of multiple TextureData objects.
      *
      * @param target the OpenGL target type, eg GL.GL_TEXTURE_2D, 
      *               GL.GL_TEXTURE_RECTANGLE_ARB
-     *
-     * @throws GLException if no OpenGL context is current or if an
-     *                     OpenGL error occurred
      */
-    public static Texture newTexture(int target) throws GLException {
+    public static Texture newTexture(int target) {
         return new Texture(target);
     }
 
@@ -528,19 +559,19 @@ public class TextureIO {
      *                           texture
      */
     public static Texture newTexture(int textureID,
-				     int target,
-				     int texWidth,
-				     int texHeight,
-				     int imgWidth,
-				     int imgHeight,
-				     boolean mustFlipVertically) {
-	return new Texture(textureID,
-			   target,
-			   texWidth,
-			   texHeight,
-			   imgWidth,
-			   imgHeight,
-			   mustFlipVertically);
+                     int target,
+                     int texWidth,
+                     int texHeight,
+                     int imgWidth,
+                     int imgHeight,
+                     boolean mustFlipVertically) {
+    return new Texture(textureID,
+               target,
+               texWidth,
+               texHeight,
+               imgWidth,
+               imgHeight,
+               mustFlipVertically);
     }
 
     /**
@@ -581,7 +612,7 @@ public class TextureIO {
         }
         GL2 gl = _gl.getGL2();
 
-        texture.bind();
+        texture.bind(gl);
         int internalFormat = glGetTexLevelParameteri(gl, GL.GL_TEXTURE_2D, 0, GL2.GL_TEXTURE_INTERNAL_FORMAT);
         int width  = glGetTexLevelParameteri(gl, GL.GL_TEXTURE_2D, 0, GL2.GL_TEXTURE_WIDTH);
         int height = glGetTexLevelParameteri(gl, GL.GL_TEXTURE_2D, 0, GL2.GL_TEXTURE_HEIGHT);
@@ -865,7 +896,7 @@ public class TextureIO {
                                           boolean mipmap,
                                           String fileSuffix) throws IOException {
             if (DDS.equals(fileSuffix) ||
-                DDS.equals(FileUtil.getFileSuffix(file))) {
+                DDS.equals(IOUtil.getFileSuffix(file))) {
                 DDSImage image = DDSImage.read(file);
                 return newTextureData(glp, image, internalFormat, pixelFormat, mipmap);
             }
@@ -880,7 +911,7 @@ public class TextureIO {
                                           String fileSuffix) throws IOException {
             if (DDS.equals(fileSuffix) ||
                 DDSImage.isDDSImage(stream)) {
-                byte[] data = StreamUtil.readAll2Array(stream);
+                byte[] data = IOUtil.copyStream2ByteArray(stream);
                 ByteBuffer buf = ByteBuffer.wrap(data);
                 DDSImage image = DDSImage.read(buf);
                 return newTextureData(glp, image, internalFormat, pixelFormat, mipmap);
@@ -1001,7 +1032,7 @@ public class TextureIO {
                                       internalFormat,
                                       pixelFormat,
                                       mipmap,
-                                      ((fileSuffix != null) ? fileSuffix : FileUtil.getFileSuffix(file)));
+                                      ((fileSuffix != null) ? fileSuffix : IOUtil.getFileSuffix(file)));
             } finally {
                 inStream.close();
             }
@@ -1100,7 +1131,7 @@ public class TextureIO {
     static class DDSTextureWriter implements TextureWriter {
         public boolean write(File file,
                              TextureData data) throws IOException {
-            if (DDS.equals(FileUtil.getFileSuffix(file))) {
+            if (DDS.equals(IOUtil.getFileSuffix(file))) {
                 // See whether the DDS writer can handle this TextureData
                 int pixelFormat = data.getPixelFormat();
                 int pixelType   = data.getPixelType();
@@ -1149,7 +1180,7 @@ public class TextureIO {
     static class SGITextureWriter implements TextureWriter {
         public boolean write(File file,
                              TextureData data) throws IOException {
-            String fileSuffix = FileUtil.getFileSuffix(file);
+            String fileSuffix = IOUtil.getFileSuffix(file);
             if (SGI.equals(fileSuffix) ||
                 SGI_RGB.equals(fileSuffix)) {
                 // See whether the SGI writer can handle this TextureData
@@ -1193,7 +1224,7 @@ public class TextureIO {
     static class TGATextureWriter implements TextureWriter {
         public boolean write(File file,
                              TextureData data) throws IOException {
-            if (TGA.equals(FileUtil.getFileSuffix(file))) {
+            if (TGA.equals(IOUtil.getFileSuffix(file))) {
                 // See whether the TGA writer can handle this TextureData
                 int pixelFormat = data.getPixelFormat();
                 int pixelType   = data.getPixelType();
diff --git a/src/jogl/classes/com/jogamp/opengl/util/texture/spi/LEDataInputStream.java b/src/jogl/classes/com/jogamp/opengl/util/texture/spi/LEDataInputStream.java
index d5f4959..37dbc54 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/texture/spi/LEDataInputStream.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/texture/spi/LEDataInputStream.java
@@ -37,7 +37,7 @@
  * and developed by Kenneth Bradley Russell and Christopher John Kline.
  */
 
-package	com.jogamp.opengl.util.texture.spi;
+package    com.jogamp.opengl.util.texture.spi;
 
 import java.io.DataInput;
 import java.io.DataInputStream;
@@ -65,16 +65,16 @@ import java.io.IOException;
  * for that functionality. It is not clear if it is ever going to be
  * functionally required to be able to read UTF data in a LittleEndianManner<p>
  *
- * @author	Robin Luiten
- * @version	1.1	15/Dec/1997
+ * @author    Robin Luiten
+ * @version    1.1    15/Dec/1997
  */
 public class LEDataInputStream extends FilterInputStream implements DataInput
 {
     /**
-     * To reuse	some of	the	non	endian dependent methods from
-     * DataInputStreams	methods.
+     * To reuse    some of    the    non    endian dependent methods from
+     * DataInputStreams    methods.
      */
-    DataInputStream	dataIn;
+    DataInputStream    dataIn;
 
     public LEDataInputStream(InputStream in)
     {
@@ -84,29 +84,29 @@ public class LEDataInputStream extends FilterInputStream implements DataInput
 
     public void close() throws IOException
     {
-        dataIn.close();		// better close as we create it.
+        dataIn.close();        // better close as we create it.
         // this will close underlying as well.
     }
 
-    public synchronized	final int read(byte	b[]) throws	IOException
+    public synchronized    final int read(byte    b[]) throws    IOException
     {
         return dataIn.read(b, 0, b.length);
     }
 
-    public synchronized	final int read(byte	b[], int off, int len) throws IOException
+    public synchronized    final int read(byte    b[], int off, int len) throws IOException
     {
-        int	rl = dataIn.read(b,	off, len);
+        int    rl = dataIn.read(b,    off, len);
         return rl;
     }
 
     public final void readFully(byte b[]) throws IOException
     {
-        dataIn.readFully(b,	0, b.length);
+        dataIn.readFully(b,    0, b.length);
     }
 
-    public final void readFully(byte b[], int off, int len)	throws IOException
+    public final void readFully(byte b[], int off, int len)    throws IOException
     {
-        dataIn.readFully(b,	off, len);
+        dataIn.readFully(b,    off, len);
     }
 
     public final int skipBytes(int n) throws IOException
@@ -116,23 +116,23 @@ public class LEDataInputStream extends FilterInputStream implements DataInput
 
     public final boolean readBoolean() throws IOException
     {
-        int	ch = dataIn.read();
+        int    ch = dataIn.read();
         if (ch < 0)
             throw new EOFException();
         return (ch != 0);
     }
 
-    public final byte readByte() throws	IOException
+    public final byte readByte() throws    IOException
     {
-        int	ch = dataIn.read();
+        int    ch = dataIn.read();
         if (ch < 0)
             throw new EOFException();
         return (byte)(ch);
     }
 
-    public final int readUnsignedByte()	throws IOException
+    public final int readUnsignedByte()    throws IOException
     {
-        int	ch = dataIn.read();
+        int    ch = dataIn.read();
         if (ch < 0)
             throw new EOFException();
         return ch;
@@ -140,47 +140,47 @@ public class LEDataInputStream extends FilterInputStream implements DataInput
 
     public final short readShort() throws IOException
     {
-        int	ch1	= dataIn.read();
-        int	ch2	= dataIn.read();
-        if ((ch1 | ch2)	< 0)
+        int    ch1    = dataIn.read();
+        int    ch2    = dataIn.read();
+        if ((ch1 | ch2)    < 0)
             throw new EOFException();
-        return (short)((ch1	<< 0) +	(ch2 <<	8));
+        return (short)((ch1    << 0) +    (ch2 <<    8));
     }
 
-    public final int readUnsignedShort() throws	IOException
+    public final int readUnsignedShort() throws    IOException
     { 
-        int	ch1	= dataIn.read();
-        int	ch2	= dataIn.read();
-        if ((ch1 | ch2)	< 0)
+        int    ch1    = dataIn.read();
+        int    ch2    = dataIn.read();
+        if ((ch1 | ch2)    < 0)
             throw new EOFException();
-        return (ch1	<< 0) +	(ch2 <<	8);
+        return (ch1    << 0) +    (ch2 <<    8);
     }
 
-    public final char readChar() throws	IOException
+    public final char readChar() throws    IOException
     {
-        int	ch1	= dataIn.read();
-        int	ch2	= dataIn.read();
-        if ((ch1 | ch2)	< 0)
+        int    ch1    = dataIn.read();
+        int    ch2    = dataIn.read();
+        if ((ch1 | ch2)    < 0)
             throw new EOFException();
-        return (char)((ch1 << 0) + (ch2	<< 8));
+        return (char)((ch1 << 0) + (ch2    << 8));
     }
 
     public final int readInt() throws IOException
     {
-        int	ch1	= dataIn.read();
-        int	ch2	= dataIn.read();
-        int	ch3	= dataIn.read();
-        int	ch4	= dataIn.read();
-        if ((ch1 | ch2 | ch3 | ch4)	< 0)
+        int    ch1    = dataIn.read();
+        int    ch2    = dataIn.read();
+        int    ch3    = dataIn.read();
+        int    ch4    = dataIn.read();
+        if ((ch1 | ch2 | ch3 | ch4)    < 0)
             throw new EOFException();
-        return ((ch1 <<	0) + (ch2 << 8)	+ (ch3 << 16) +	(ch4 <<	24));
+        return ((ch1 <<    0) + (ch2 << 8)    + (ch3 << 16) +    (ch4 <<    24));
     }
 
-    public final long readLong() throws	IOException
+    public final long readLong() throws    IOException
     {
-        int	i1 = readInt();
-        int	i2 = readInt();
-        return ((long)(i1) & 0xFFFFFFFFL) +	(i2	<< 32);
+        int    i1 = readInt();
+        int    i2 = readInt();
+        return ((long)(i1) & 0xFFFFFFFFL) +    (i2    << 32);
     }
 
     public final float readFloat() throws IOException
@@ -188,7 +188,7 @@ public class LEDataInputStream extends FilterInputStream implements DataInput
         return Float.intBitsToFloat(readInt());
     }
 
-    public final double	readDouble() throws	IOException
+    public final double    readDouble() throws    IOException
     {
         return Double.longBitsToDouble(readLong());
     }
@@ -197,7 +197,7 @@ public class LEDataInputStream extends FilterInputStream implements DataInput
      * dont call this it is not implemented.
      * @return empty new string 
      **/
-    public final String	readLine() throws IOException
+    public final String    readLine() throws IOException
     {
         return new String();
     }
@@ -206,7 +206,7 @@ public class LEDataInputStream extends FilterInputStream implements DataInput
      * dont call this it is not implemented
      * @return empty new string 
      **/
-    public final String	readUTF() throws IOException
+    public final String    readUTF() throws IOException
     {
         return new String();
     }
@@ -215,7 +215,7 @@ public class LEDataInputStream extends FilterInputStream implements DataInput
      * dont call this it is not implemented
      * @return empty new string 
      **/
-    public final static	String readUTF(DataInput in) throws	IOException
+    public final static    String readUTF(DataInput in) throws    IOException
     {
         return new String();
     }
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 499dce7..ae96184 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
@@ -40,13 +40,12 @@
 package com.jogamp.opengl.util.texture.spi;
 
 import java.io.*;
-import java.net.*;
 import java.nio.*;
 
 import javax.media.opengl.*;
-import com.jogamp.opengl.util.*;
+
+import com.jogamp.common.util.IOUtil;
 import com.jogamp.opengl.util.texture.*;
-import com.jogamp.opengl.util.texture.spi.*;
 
 public class NetPbmTextureWriter implements TextureWriter {
     int magic;
@@ -87,17 +86,17 @@ public class NetPbmTextureWriter implements TextureWriter {
 
         // file suffix selection 
         if (0==magic) {
-            if (PPM.equals(FileUtil.getFileSuffix(file))) {
+            if (PPM.equals(IOUtil.getFileSuffix(file))) {
                 magic = 6;
-            } else if (PAM.equals(FileUtil.getFileSuffix(file))) {
+            } else if (PAM.equals(IOUtil.getFileSuffix(file))) {
                 magic = 7;
             } else {
                 return false;
             }
         }
 
-        int pixelFormat = data.getPixelFormat();
-        int pixelType   = data.getPixelType();
+        final int pixelFormat = data.getPixelFormat();
+        final int pixelType   = data.getPixelType();
         if ((pixelFormat == GL.GL_RGB ||
              pixelFormat == GL.GL_RGBA) &&
             (pixelType == GL.GL_BYTE ||
diff --git a/src/jogl/classes/com/jogamp/opengl/util/texture/spi/SGIImage.java b/src/jogl/classes/com/jogamp/opengl/util/texture/spi/SGIImage.java
index bb5040a..c60c91b 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/texture/spi/SGIImage.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/texture/spi/SGIImage.java
@@ -477,7 +477,7 @@ public class SGIImage {
         for (int z = 0; z < zsize; z++) {
             for (int y = ystart; y != yend; y += yincr) {
                 // RLE-compress each row.
-	  
+      
                 int x = 0;
                 byte count = 0;
                 boolean repeat_mode = false;
@@ -485,7 +485,7 @@ public class SGIImage {
                 int start_ptr = ptr;
                 int num_ptr = ptr++;
                 byte repeat_val = 0;
-	  
+      
                 while (x < xsize) {
                     // see if we should switch modes
                     should_switch = false;
@@ -502,7 +502,7 @@ public class SGIImage {
                                 if (DEBUG)
                                     System.err.println("left side was " + ((int) imgref(data, x, y, z, xsize, ysize, zsize)) +
                                                        ", right side was " + (int)imgref(data, x+i, y, z, xsize, ysize, zsize));
-			  
+              
                                 if (imgref(data, x, y, z, xsize, ysize, zsize) !=
                                     imgref(data, x+i, y, z, xsize, ysize, zsize))
                                     should_switch = false;
@@ -530,7 +530,7 @@ public class SGIImage {
                                 repeat_mode = true;
                             repeat_val = imgref(data, x, y, z, xsize, ysize, zsize);
                         }
-		  
+          
                         if (x > 0) {
                             // reset the number pointer
                             num_ptr = ptr++;
@@ -538,7 +538,7 @@ public class SGIImage {
                             count = 0;
                         }
                     }
-		    
+            
                     // if not in repeat mode, copy element to ptr
                     if (!repeat_mode) {
                         rlebuf[ptr++] = imgref(data, x, y, z, xsize, ysize, zsize);
diff --git a/src/jogl/classes/com/jogamp/opengl/util/texture/spi/awt/IIOTextureWriter.java b/src/jogl/classes/com/jogamp/opengl/util/texture/spi/awt/IIOTextureWriter.java
index 4052112..89d0d20 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/texture/spi/awt/IIOTextureWriter.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/texture/spi/awt/IIOTextureWriter.java
@@ -42,12 +42,12 @@ package com.jogamp.opengl.util.texture.spi.awt;
 import java.awt.Graphics;
 import java.awt.image.*;
 import java.io.*;
-import java.net.*;
 import java.nio.*;
 import javax.imageio.*;
 
 import javax.media.opengl.*;
-import com.jogamp.opengl.util.*;
+
+import com.jogamp.common.util.IOUtil;
 import com.jogamp.opengl.util.awt.*;
 import com.jogamp.opengl.util.texture.*;
 import com.jogamp.opengl.util.texture.spi.*;
@@ -101,7 +101,7 @@ public class IIOTextureWriter implements TextureWriter {
             ImageUtil.flipImageVertically(image);
 
             // Happened to notice that writing RGBA images to JPEGS is broken
-            if (TextureIO.JPG.equals(FileUtil.getFileSuffix(file)) &&
+            if (TextureIO.JPG.equals(IOUtil.getFileSuffix(file)) &&
                 image.getType() == BufferedImage.TYPE_4BYTE_ABGR) {
                 BufferedImage tmpImage = new BufferedImage(image.getWidth(), image.getHeight(),
                                                            BufferedImage.TYPE_3BYTE_BGR);
@@ -111,7 +111,7 @@ public class IIOTextureWriter implements TextureWriter {
                 image = tmpImage;
             }
 
-            return ImageIO.write(image, FileUtil.getFileSuffix(file), file);
+            return ImageIO.write(image, IOUtil.getFileSuffix(file), file);
         }
       
         throw new IOException("ImageIO writer doesn't support this pixel format / type (only GL_RGB/A + bytes)");
diff --git a/src/jogl/classes/javax/media/opengl/DefaultGLCapabilitiesChooser.java b/src/jogl/classes/javax/media/opengl/DefaultGLCapabilitiesChooser.java
index 9352ad4..0ad97c3 100644
--- a/src/jogl/classes/javax/media/opengl/DefaultGLCapabilitiesChooser.java
+++ b/src/jogl/classes/javax/media/opengl/DefaultGLCapabilitiesChooser.java
@@ -42,6 +42,8 @@ package javax.media.opengl;
 
 import javax.media.nativewindow.NativeWindowException;
 import jogamp.opengl.Debug;
+
+import java.security.AccessController;
 import java.util.List;
 import javax.media.nativewindow.CapabilitiesImmutable;
 
@@ -84,7 +86,7 @@ import javax.media.nativewindow.CapabilitiesImmutable;
 */
 
 public class DefaultGLCapabilitiesChooser implements GLCapabilitiesChooser {
-  private static final boolean DEBUG = Debug.debug("CapabilitiesChooser");
+  private static final boolean DEBUG = Debug.isPropertyDefined("jogl.debug.CapabilitiesChooser", true, AccessController.getContext());
 
   public int chooseCapabilities(final CapabilitiesImmutable desired,
                                 final List /*<CapabilitiesImmutable>*/ available,
@@ -120,19 +122,25 @@ public class DefaultGLCapabilitiesChooser implements GLCapabilitiesChooser {
 
     // Create score array
     int[] scores = new int[availnum];
-    int NO_SCORE = -9999999;
-    int DOUBLE_BUFFER_MISMATCH_PENALTY = 1000;
-    int STENCIL_MISMATCH_PENALTY = 500;
+    final int NO_SCORE = -9999999;
+    final int DOUBLE_BUFFER_MISMATCH_PENALTY = 1000;
+    final int OPAQUE_MISMATCH_PENALTY = 750;
+    final int STENCIL_MISMATCH_PENALTY = 500;
+    final int MULTISAMPLE_MISMATCH_PENALTY = 500;
     // Pseudo attempt to keep equal rank penalties scale-equivalent
     // (e.g., stencil mismatch is 3 * accum because there are 3 accum
     // components)
-    int COLOR_MISMATCH_PENALTY_SCALE     = 36;
-    int DEPTH_MISMATCH_PENALTY_SCALE     = 6;
-    int ACCUM_MISMATCH_PENALTY_SCALE     = 1;
-    int STENCIL_MISMATCH_PENALTY_SCALE   = 3;
+    final int COLOR_MISMATCH_PENALTY_SCALE     = 36;
+    final int DEPTH_MISMATCH_PENALTY_SCALE     = 6;
+    final int ACCUM_MISMATCH_PENALTY_SCALE     = 1;
+    final int STENCIL_MISMATCH_PENALTY_SCALE   = 3;
+    final int MULTISAMPLE_MISMATCH_PENALTY_SCALE   = 3;
+    
     for (int i = 0; i < scores.length; i++) {
       scores[i] = NO_SCORE;
     }
+    final int gldes_samples = gldes.getSampleBuffers() ? gldes.getNumSamples() : 0;
+    
     // Compute score for each
     for (int i = 0; i < availnum; i++) {
       GLCapabilitiesImmutable cur = (GLCapabilitiesImmutable) available.get(i);
@@ -148,7 +156,10 @@ public class DefaultGLCapabilitiesChooser implements GLCapabilitiesChooser {
       if (gldes.getStereo() != cur.getStereo()) {
         continue;
       }
+      final int cur_samples = 
+              cur.getSampleBuffers() ? cur.getNumSamples() : 0;
       int score = 0;
+              
       // Compute difference in color depth
       // (Note that this decides the direction of all other penalties)
       score += (COLOR_MISMATCH_PENALTY_SCALE *
@@ -163,12 +174,22 @@ public class DefaultGLCapabilitiesChooser implements GLCapabilitiesChooser {
                          (gldes.getAccumRedBits() + gldes.getAccumGreenBits() + gldes.getAccumBlueBits() + gldes.getAccumAlphaBits())));
       // Compute difference in stencil bits
       score += STENCIL_MISMATCH_PENALTY_SCALE * sign(score) * (cur.getStencilBits() - gldes.getStencilBits());
+      // Compute difference in multisampling bits
+      score += MULTISAMPLE_MISMATCH_PENALTY_SCALE * sign(score) * (cur_samples - gldes_samples);
+      // double buffer
       if (cur.getDoubleBuffered() != gldes.getDoubleBuffered()) {
         score += sign(score) * DOUBLE_BUFFER_MISMATCH_PENALTY;
       }
+      // opaque
+      if (cur.isBackgroundOpaque() != gldes.isBackgroundOpaque()) {
+        score += sign(score) * OPAQUE_MISMATCH_PENALTY;
+      }
       if ((gldes.getStencilBits() > 0) && (cur.getStencilBits() == 0)) {
         score += sign(score) * STENCIL_MISMATCH_PENALTY;
       }
+      if ((gldes_samples > 0) && (cur_samples == 0)) {
+        score += sign(score) * MULTISAMPLE_MISMATCH_PENALTY;
+      }
       scores[i] = score;
     }
     // Now prefer hardware-accelerated visuals by pushing scores of
@@ -230,7 +251,7 @@ public class DefaultGLCapabilitiesChooser implements GLCapabilitiesChooser {
       // Don't substitute a positive score for a smaller negative score
       if ((scoreClosestToZero == NO_SCORE) ||
           (Math.abs(score) < Math.abs(scoreClosestToZero) &&
-	   ((sign(scoreClosestToZero) < 0) || (sign(score) > 0)))) {
+       ((sign(scoreClosestToZero) < 0) || (sign(score) > 0)))) {
         scoreClosestToZero = score;
         chosenIndex = i;
       }
diff --git a/src/jogl/classes/javax/media/opengl/FPSCounter.java b/src/jogl/classes/javax/media/opengl/FPSCounter.java
new file mode 100644
index 0000000..9c07b58
--- /dev/null
+++ b/src/jogl/classes/javax/media/opengl/FPSCounter.java
@@ -0,0 +1,117 @@
+/**
+ * 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 javax.media.opengl;
+
+import java.io.PrintStream;
+
+/**
+ * FPSCounter feature.<br>
+ * An implementation initially has the FPSCounter feature disabled.<br>
+ * Use {@link #setUpdateFPSFrames(int, PrintStream)} to enable and disable the FPSCounter feature.
+ */
+public interface FPSCounter {
+    public static final int DEFAULT_FRAMES_PER_INTERVAL = 5*60;
+    
+    /**
+     * @param frames Update interval in frames.<br> At every rendered <i>frames</i> interval the currentTime and fps values are updated. 
+     *        If the <i>frames</i> interval is <= 0, no update will be issued, ie the FPSCounter feature is turned off. You may choose {@link #DEFAULT_FRAMES_PER_INTERVAL}.
+     * @param out optional print stream where the fps values gets printed if not null at every <i>frames</i> interval 
+     */
+    void setUpdateFPSFrames(int frames, PrintStream out);
+    
+    /**
+     * Reset all performance counter (startTime, currentTime, frame number)
+     */
+    void resetFPSCounter();
+    
+    /**
+     * @return update interval in frames
+     * 
+     * @see #setUpdateFPSFrames(int, PrintStream)
+     */
+    int getUpdateFPSFrames();
+    
+    /**
+     * Returns the time of the first display call in milliseconds after enabling this feature via {@link #setUpdateFPSFrames(int, PrintStream)}.<br> 
+     * This value is reset via {@link #resetFPSCounter()}.
+     *
+     * @see #setUpdateFPSFrames(int, PrintStream)
+     * @see #resetFPSCounter()
+     */
+    long getFPSStartTime();
+
+    /**
+     * Returns the time of the last update interval in milliseconds, if this feature is enabled via {@link #setUpdateFPSFrames(int, PrintStream)}.<br>
+     * This value is reset via {@link #resetFPSCounter()}.
+     *
+     * @see #setUpdateFPSFrames(int, PrintStream)
+     * @see #resetFPSCounter()
+     */
+    long getLastFPSUpdateTime();
+
+    /**
+     * @return Duration of the last update interval in milliseconds.
+     *
+     * @see #setUpdateFPSFrames(int, PrintStream)
+     * @see #resetFPSCounter()
+     */
+    long getLastFPSPeriod();
+    
+    /**
+     * @return Last update interval's frames per seconds, {@link #getUpdateFPSFrames()} / {@link #getLastFPSPeriod()}
+     * 
+     * @see #setUpdateFPSFrames(int, PrintStream)
+     * @see #resetFPSCounter()
+     */
+    float getLastFPS(); 
+    
+    /**
+     * @return Number of frame rendered since {@link #getFPSStartTime()} up to {@link #getLastFPSUpdateTime()}
+     *  
+     * @see #setUpdateFPSFrames(int, PrintStream)
+     * @see #resetFPSCounter()
+     */
+    int getTotalFPSFrames();
+
+    /**
+     * @return Total duration in milliseconds, {@link #getLastFPSUpdateTime()} - {@link #getFPSStartTime()}
+     *
+     * @see #setUpdateFPSFrames(int, PrintStream)
+     * @see #resetFPSCounter()
+     */
+    long getTotalFPSDuration();
+
+
+    /**
+     * @return Total frames per seconds, {@link #getTotalFPSFrames()} / {@link #getTotalFPSDuration()} 
+     * 
+     * @see #setUpdateFPSFrames(int, PrintStream)
+     * @see #resetFPSCounter()
+     */
+    float getTotalFPS();       
+}
diff --git a/src/jogl/classes/javax/media/opengl/GLAnimatorControl.java b/src/jogl/classes/javax/media/opengl/GLAnimatorControl.java
index 2c8c7cc..83e9e22 100644
--- a/src/jogl/classes/javax/media/opengl/GLAnimatorControl.java
+++ b/src/jogl/classes/javax/media/opengl/GLAnimatorControl.java
@@ -32,47 +32,7 @@ package javax.media.opengl;
  * An animator control interface, 
  * which implementation may drive a {@link javax.media.opengl.GLAutoDrawable} animation.
  */
-public interface GLAnimatorControl {
-
-    /**
-     * @return Time of the first display call in milliseconds.
-     *         This value is reset if started or resumed.
-     *
-     * @see #start()
-     * @see #resume()
-     */
-    long getStartTime();
-
-    /**
-     * @return Time of the last display call in milliseconds.
-     *         This value is reset if started or resumed.
-     *
-     * @see #start()
-     * @see #resume()
-     */
-    long getCurrentTime();
-
-    /**
-     * @return Duration <code>getCurrentTime() - getStartTime()</code>.
-     *
-     * @see #getStartTime()
-     * @see #getCurrentTime()
-     */
-    long getDuration();
-
-
-    /**
-     * @return Number of frame cycles displayed
-     *         since the first display call, ie <code>getStartTime()</code>.
-     *         This value is reset if started or resumed.
-     *
-     * @see #start()
-     * @see #resume()
-     */
-    int getTotalFrames();
-
-    /** Reset all performance counter (startTime, currentTime, frame number) */
-    public void resetCounter();
+public interface GLAnimatorControl extends FPSCounter {
 
     /**
      * Indicates whether this animator is running, ie. has been started and not stopped.
diff --git a/src/jogl/classes/javax/media/opengl/GLArrayData.java b/src/jogl/classes/javax/media/opengl/GLArrayData.java
index 6c8122f..26f0f6b 100644
--- a/src/jogl/classes/javax/media/opengl/GLArrayData.java
+++ b/src/jogl/classes/javax/media/opengl/GLArrayData.java
@@ -37,7 +37,6 @@ import java.nio.*;
  *
  */
 public interface GLArrayData {
-
     /**
      * Returns true if this data set is intended for a GLSL vertex shader attribute,
      * otherwise false, ie intended for fixed function vertex pointer
@@ -76,35 +75,48 @@ public interface GLArrayData {
      * Sets the determined location of the shader attribute
      * This is usually done within ShaderState.
      *
-     * @see com.jogamp.opengl.util.glsl.ShaderState#glVertexAttribPointer(GL2ES2, GLArrayData)
+     * @see com.jogamp.opengl.util.glsl.ShaderState#vertexAttribPointer(GL2ES2, GLArrayData)
      */
     public void setLocation(int v);
 
     /**
-     * Determines wheather the data is server side (VBO),
+     * Determines whether the data is server side (VBO) and enabled,
      * or a client side array (false).
      */
     public boolean isVBO();
 
     /**
-     * The offset, if it's an VBO, otherwise -1
+     * The VBO buffer offset or 0 if not a VBO
      */
-    public long getOffset();
+    public long getVBOOffset();
 
     /**
-     * The VBO name, if it's an VBO, otherwise -1
+     * The VBO name or 0 if not a VBO
      */
     public int getVBOName();
 
     /**
-     * The Buffer holding the data, may be null in case of VBO
+     * The VBO usage or 0 if not a VBO
+     * @return 0 if not a GPU buffer, otherwise {@link GL2ES2#GL_STREAM_DRAW}, {@link GL#GL_STATIC_DRAW} or {@link GL#GL_DYNAMIC_DRAW}
+     */
+    public int getVBOUsage();
+
+    /**
+     * The VBO target or 0 if not a VBO
+     * @return 0 if not a GPU buffer, otherwise {@link GL#GL_ARRAY_BUFFER} or {@link GL#GL_ELEMENT_ARRAY_BUFFER}
+     */
+    public int getVBOTarget();
+
+    
+    /**
+     * The Buffer holding the data, may be null if a GPU buffer without client bound data
      */
     public Buffer getBuffer();
 
     /**
      * The number of components per element
      */
-    public int getComponentNumber();
+    public int getComponentCount();
 
     /**
      * The component's GL data type, ie. GL_FLOAT
@@ -112,14 +124,21 @@ public interface GLArrayData {
     public int getComponentType();
 
     /**
-     * The components size in bytes
+     * The component's size in bytes
      */
-    public int getComponentSize();
+    public int getComponentSizeInBytes();
 
     /**
-     * Return the number of elements.
+     * The current number of used elements.<br>
+     * In case the buffer's position is 0 (sealed, flipped), it's based on it's limit instead of it's position.
+     */
+    public int getElementCount();
+    
+    /**
+     * The currently used size in bytes.<br>
+     * In case the buffer's position is 0 (sealed, flipped), it's based on it's limit instead of it's position.
      */
-    public int getElementNumber();
+    public int getSizeInBytes();
 
     /**
      * True, if GL shall normalize fixed point data while converting 
@@ -127,10 +146,9 @@ public interface GLArrayData {
      */
     public boolean getNormalized();
 
-    /**
-     * The distance to the next payload,
-     * allowing interleaved arrays.
-     */
+    /** 
+     * @return the byte offset between consecutive components
+     */      
     public int getStride();
 
     public String toString();
diff --git a/src/jogl/classes/javax/media/opengl/GLAutoDrawable.java b/src/jogl/classes/javax/media/opengl/GLAutoDrawable.java
index cf24d10..90290d8 100644
--- a/src/jogl/classes/javax/media/opengl/GLAutoDrawable.java
+++ b/src/jogl/classes/javax/media/opengl/GLAutoDrawable.java
@@ -185,14 +185,14 @@ public interface GLAutoDrawable extends GLDrawable {
    * Enqueues a one-shot {@link javax.media.opengl.GLRunnable},
    * which will be executed with the next {@link #display()} call.</p>
    * <p>
-   * If a {@link javax.media.opengl.GLAnimatorControl} is registered, or if it's not animating, the default situation,<br>
+   * If no {@link javax.media.opengl.GLAnimatorControl} is registered, or if it is not animating, the default situation,<br>
    * or if the current thread is the animator thread,<br>
-   * a {@link #display()} call has to be issued after enqueue the <code>GLRunnable</code>.<br>
-   * No extra synchronization must be performed in case <code>wait</code> is true, since it is executed in the current thread.</p>
+   * a {@link #display()} call is issued after enqueue the <code>GLRunnable</code>.<br>
+   * No extra synchronization is performed in case <code>wait</code> is true, since it is executed in the current thread.</p>
    * <p>
    * If {@link javax.media.opengl.GLAnimatorControl} is registered and is animating,<br>
-   * no call of {@link #display()} must be issued, since the animator thread will performs it.<br>
-   * If <code>wait</code> is true, the implementation must wait until the <code>GLRunnable</code> is executed.<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>
    *
    * @see #setAnimator(javax.media.opengl.GLAnimatorControl)
@@ -255,6 +255,19 @@ public interface GLAutoDrawable extends GLDrawable {
       drawable. See {@link #setAutoSwapBufferMode}. */
   public boolean getAutoSwapBufferMode();
 
+  /**
+   * @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();
+
   /** 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
diff --git a/src/jogl/classes/javax/media/opengl/GLBase.java b/src/jogl/classes/javax/media/opengl/GLBase.java
index 90b320e..f93d443 100644
--- a/src/jogl/classes/javax/media/opengl/GLBase.java
+++ b/src/jogl/classes/javax/media/opengl/GLBase.java
@@ -154,6 +154,13 @@ public interface GLBase {
   public boolean isGL2ES2();
 
   /**
+   * Indicates whether this GL object is compatible with OpenGL ES2.
+   * @return true if this context is an ES2 context or implements 
+   *         the extension <code>GL_ARB_ES2_compatibility</code>, otherwise false 
+   */
+  public boolean isGLES2Compatible();
+
+  /**
    * Indicates whether this GL object conforms to the GL2GL3 compatible profile.
    * @return whether this GL object conforms to the GL2GL3 profile
    */
diff --git a/src/jogl/classes/javax/media/opengl/GLCapabilities.java b/src/jogl/classes/javax/media/opengl/GLCapabilities.java
index 1ae9e40..4d9d088 100644
--- a/src/jogl/classes/javax/media/opengl/GLCapabilities.java
+++ b/src/jogl/classes/javax/media/opengl/GLCapabilities.java
@@ -79,8 +79,9 @@ public class GLCapabilities extends Capabilities implements Cloneable, GLCapabil
 
   /** Creates a GLCapabilities object. All attributes are in a default state.
     * @param glp GLProfile, or null for the default GLProfile
+    * @throws GLException if no profile is given and no default profile is available for the default device.
     */
-  public GLCapabilities(GLProfile glp) {
+  public GLCapabilities(GLProfile glp) throws GLException {
       glProfile = (null!=glp)?glp:GLProfile.getDefault(GLProfile.getDefaultDevice());
   }
 
@@ -210,19 +211,19 @@ public class GLCapabilities extends Capabilities implements Cloneable, GLCapabil
 
   /** 
    * Enables or disables pbuffer usage.<br>
-   * If enabled, onscreen := false.
+   * If enabled this method also invokes {@link #setOnscreen(int) setOnscreen(false)}<br>
    * Defaults to false.
    */
-  public void setPBuffer(boolean onOrOff) {
-    if(onOrOff) {
+  public void setPBuffer(boolean enable) {
+    if(enable) {
       setOnscreen(false);
     }
-    pbuffer = onOrOff;
+    pbuffer = enable;
   }
 
   /**
    * Sets whether the drawable surface supports onscreen.<br>
-   * If enabled, pbuffer := false.<br>
+   * If enabled this method also invokes {@link #setPBuffer(int) setPBuffer(false)}<br>
    * Defaults to true.
   */
   public void setOnscreen(boolean onscreen) {
@@ -238,8 +239,8 @@ public class GLCapabilities extends Capabilities implements Cloneable, GLCapabil
   }
 
   /** Enables or disables double buffering. */
-  public void setDoubleBuffered(boolean onOrOff) {
-    doubleBuffered = onOrOff;
+  public void setDoubleBuffered(boolean enable) {
+    doubleBuffered = enable;
   }
 
   /** Indicates whether stereo is enabled. */
@@ -248,8 +249,8 @@ public class GLCapabilities extends Capabilities implements Cloneable, GLCapabil
   }
   
   /** Enables or disables stereo viewing. */
-  public void setStereo(boolean onOrOff) {
-    stereo = onOrOff;
+  public void setStereo(boolean enable) {
+    stereo = enable;
   }
 
   /** Indicates whether hardware acceleration is enabled. */
@@ -258,8 +259,8 @@ public class GLCapabilities extends Capabilities implements Cloneable, GLCapabil
   }
   
   /** Enables or disables hardware acceleration. */
-  public void setHardwareAccelerated(boolean onOrOff) {
-    hardwareAccelerated = onOrOff;
+  public void setHardwareAccelerated(boolean enable) {
+    hardwareAccelerated = enable;
   }
 
   /** Returns the number of bits requested for the depth buffer. */
@@ -346,11 +347,19 @@ public class GLCapabilities extends Capabilities implements Cloneable, GLCapabil
     this.accumAlphaBits = accumAlphaBits;
   }
 
-  /** Indicates whether sample buffers for full-scene antialiasing
-      (FSAA) should be allocated for this drawable. Defaults to
-      false. */
-  public void setSampleBuffers(boolean onOrOff) {
-    sampleBuffers = onOrOff;
+  /**
+   * Defaults to false.<br>
+   * Indicates whether sample buffers for full-scene antialiasing
+   * (FSAA) should be allocated for this drawable.<br>
+   * Mind that this requires the alpha component.<br>
+   * If enabled this method also invokes {@link #setAlphaBits(int) setAlphaBits(1)}
+   * if {@link #getAlphaBits()} == 0.<br>
+   */
+  public void setSampleBuffers(boolean enable) {
+    sampleBuffers = enable;
+    if(sampleBuffers && getAlphaBits()==0) {
+        setAlphaBits(1);
+    }        
   }
 
   /** Returns whether sample buffers for full-scene antialiasing
@@ -374,8 +383,8 @@ public class GLCapabilities extends Capabilities implements Cloneable, GLCapabil
 
   /** For pbuffers only, indicates whether floating-point buffers
       should be used if available. Defaults to false. */
-  public void setPbufferFloatingPointBuffers(boolean onOrOff) {
-    pbufferFloatingPointBuffers = onOrOff;
+  public void setPbufferFloatingPointBuffers(boolean enable) {
+    pbufferFloatingPointBuffers = enable;
   }
 
   /** For pbuffers only, returns whether floating-point buffers should
@@ -386,8 +395,8 @@ public class GLCapabilities extends Capabilities implements Cloneable, GLCapabil
 
   /** For pbuffers only, indicates whether the render-to-texture
       extension should be used if available.  Defaults to false. */
-  public void setPbufferRenderToTexture(boolean onOrOff) {
-    pbufferRenderToTexture = onOrOff;
+  public void setPbufferRenderToTexture(boolean enable) {
+    pbufferRenderToTexture = enable;
   }
 
   /** For pbuffers only, returns whether the render-to-texture
@@ -399,8 +408,8 @@ public class GLCapabilities extends Capabilities implements Cloneable, GLCapabil
   /** For pbuffers only, indicates whether the
       render-to-texture-rectangle extension should be used if
       available. Defaults to false. */
-  public void setPbufferRenderToTextureRectangle(boolean onOrOff) {
-    pbufferRenderToTextureRectangle = onOrOff;
+  public void setPbufferRenderToTextureRectangle(boolean enable) {
+    pbufferRenderToTextureRectangle = enable;
   }
 
   /** For pbuffers only, returns whether the render-to-texture
diff --git a/src/jogl/classes/javax/media/opengl/GLCapabilitiesImmutable.java b/src/jogl/classes/javax/media/opengl/GLCapabilitiesImmutable.java
index 7224d65..b91ceae 100644
--- a/src/jogl/classes/javax/media/opengl/GLCapabilitiesImmutable.java
+++ b/src/jogl/classes/javax/media/opengl/GLCapabilitiesImmutable.java
@@ -28,7 +28,6 @@
 
 package javax.media.opengl;
 
-import com.jogamp.common.type.WriteCloneable;
 import javax.media.nativewindow.CapabilitiesImmutable;
 
 /**
@@ -37,7 +36,7 @@ import javax.media.nativewindow.CapabilitiesImmutable;
  * @see javax.media.opengl.GLCapabilities
  * @see javax.media.nativewindow.CapabilitiesImmutable
  */
-public interface GLCapabilitiesImmutable extends WriteCloneable, CapabilitiesImmutable {
+public interface GLCapabilitiesImmutable extends CapabilitiesImmutable {
 
     /**
      * Returns the number of bits requested for the accumulation
@@ -137,11 +136,12 @@ public interface GLCapabilitiesImmutable extends WriteCloneable, CapabilitiesImm
      */
     boolean isPBuffer();
 
-    Object cloneMutable();
-
+    @Override
     boolean equals(Object obj);
 
+    @Override
     int hashCode();
 
+    @Override
     String toString();
 }
diff --git a/src/jogl/classes/javax/media/opengl/GLContext.java b/src/jogl/classes/javax/media/opengl/GLContext.java
index b859dee..a3aa369 100644
--- a/src/jogl/classes/javax/media/opengl/GLContext.java
+++ b/src/jogl/classes/javax/media/opengl/GLContext.java
@@ -40,10 +40,17 @@
 
 package javax.media.opengl;
 
+import java.nio.IntBuffer;
+import java.security.AccessControlContext;
+import java.security.AccessController;
 import java.util.HashMap;
 import java.util.HashSet;
 import javax.media.nativewindow.AbstractGraphicsDevice;
+
+import com.jogamp.common.util.IntObjectHashMap;
+
 import jogamp.opengl.Debug;
+import jogamp.opengl.GLContextImpl;
 
 /** Abstraction for an OpenGL rendering context. In order to perform
     OpenGL rendering, a context must be "made current" on the current
@@ -58,8 +65,18 @@ import jogamp.opengl.Debug;
     abstraction provides a stable object which clients can use to
     refer to a given context. */
 public abstract class GLContext {
-  protected static final boolean DEBUG0 = Debug.debug("GLContext");
-
+  
+  /** Reflects property jogl.debug.DebugGL. If true, the debug pipeline is enabled at context creation. */
+  public final static boolean DEBUG_GL;
+  /** Reflects property jogl.debug.TraceGL. If true, the trace pipeline is enabled at context creation. */
+  public final static boolean TRACE_GL;
+  
+  static { 
+      final AccessControlContext acl = AccessController.getContext();
+      DEBUG_GL = Debug.isPropertyDefined("jogl.debug.DebugGL", true, acl);
+      TRACE_GL = Debug.isPropertyDefined("jogl.debug.TraceGL", true, acl);
+  }
+  
   /** 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}. */
@@ -77,19 +94,22 @@ public abstract class GLContext {
   protected static final int CTX_PROFILE_ES     = 1 << 3;
   /** <code>ARB_create_context</code> related: flag forward compatible */
   protected static final int CTX_OPTION_FORWARD = 1 << 4;
-  /** <code>ARB_create_context</code> related: not flag forward compatible */
+  /** <code>ARB_create_context</code> related: flag not forward compatible */
   protected static final int CTX_OPTION_ANY     = 1 << 5;
   /** <code>ARB_create_context</code> related: flag debug */
-  protected static final int CTX_OPTION_DEBUG   = 1 << 6;
+  public static final int CTX_OPTION_DEBUG   = 1 << 6;  
+  /** <code>GL_ARB_ES2_compatibility</code> related: Context is compatible w/ ES2 */
+  protected static final int CTX_PROFILE_ES2_COMPAT = 1 << 8;
 
   /** GLContext {@link com.jogamp.gluegen.runtime.ProcAddressTable} caching related: GL software implementation */
   protected static final int CTX_IMPL_ACCEL_SOFT = 1 << 0;
   /** GLContext {@link com.jogamp.gluegen.runtime.ProcAddressTable} caching related: GL hardware implementation */
   protected static final int CTX_IMPL_ACCEL_HARD = 1 << 1;
 
-  private static ThreadLocal currentContext = new ThreadLocal();
+  private static ThreadLocal<GLContext> currentContext = new ThreadLocal<GLContext>();
 
-  private HashMap/*<int, Object>*/ attachedObjects = new HashMap();
+  private HashMap<String, Object> attachedObjectsByString = new HashMap<String, Object>();
+  private IntObjectHashMap attachedObjectsByInt = new IntObjectHashMap();
 
   /** The underlying native OpenGL context */
   protected long contextHandle;
@@ -108,9 +128,8 @@ public abstract class GLContext {
       ctxMinorVersion=-1;
       ctxOptions=0;
       ctxVersionString=null;
-      if(null!=attachedObjects) {
-        attachedObjects.clear();
-      }
+      attachedObjectsByString.clear();
+      attachedObjectsByInt.clear();
       contextHandle=0;
   }
 
@@ -244,7 +263,7 @@ public abstract class GLContext {
    * is current.
    */
   public static GLContext getCurrent() {
-    return (GLContext) currentContext.get();
+    return currentContext.get();
   }
 
   /**
@@ -255,6 +274,15 @@ public abstract class GLContext {
   }
 
   /**
+   * @throws GLException if this GLContext is not current on this thread
+   */
+  public final void validateCurrent() throws GLException {  
+    if(getCurrent() != this) {
+        throw new GLException("Given GL context not current");
+    }
+  }
+  
+  /**
    * Sets the thread-local variable returned by {@link #getCurrent}
    * and has no other side-effects. For use by third parties adding
    * new GLContext implementations; not for use by end users.
@@ -310,32 +338,40 @@ public abstract class GLContext {
    * Returns the attached user object for the given name to this GLContext.
    */
   public final Object getAttachedObject(int name) {
-    return attachedObjects.get(new Integer(name));
+    return attachedObjectsByInt.get(name);
   }
 
   /**
    * Returns the attached user object for the given name to this GLContext.
    */
   public final Object getAttachedObject(String name) {
-    return attachedObjects.get(name);
+    return attachedObjectsByString.get(name);
   }
 
   /**
    * Sets the attached user object for the given name to this GLContext.
    * Returns the previously set object or null.
    */
-  public final Object putAttachedObject(int name, Object obj) {
-    return attachedObjects.put(new Integer(name), obj);
+  public final Object attachObject(int name, Object obj) {
+    return attachedObjectsByInt.put(name, obj);
   }
 
+  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.
    */
-  public final Object putAttachedObject(String name, Object obj) {
-    return attachedObjects.put(name, obj);
+  public final Object attachObject(String name, Object obj) {
+    return attachedObjectsByString.put(name, obj);
   }
 
+  public final Object detachObject(String name) {
+      return attachedObjectsByString.remove(name);
+  }
+  
   /**
    * Classname, GL, GLDrawable
    */
@@ -391,10 +427,24 @@ public abstract class GLContext {
   public final int getGLVersionMinor() { return ctxMinorVersion; }
   public final boolean isGLCompatibilityProfile() { return ( 0 != ( CTX_PROFILE_COMPAT & ctxOptions ) ); }
   public final boolean isGLCoreProfile()          { return ( 0 != ( CTX_PROFILE_CORE   & ctxOptions ) ); }
-  public final boolean isGLEmbeddedProfile()      { return ( 0 != ( CTX_PROFILE_ES     & ctxOptions ) ); }
   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 Additional context creation flags, supported: {@link GLContext#CTX_OPTION_DEBUG}.
+   */
+  public abstract int getContextCreationFlags();
+
+  /**
+   * @param flags Additional context creation flags, supported: {@link GLContext#CTX_OPTION_DEBUG}.
+   *              Unsupported flags are masked out.
+   *              Only affects this context state if not created yet via {@link #makeCurrent()}.
+   * @see #enableGLDebugMessage(boolean)
+   * @see GLAutoDrawable#setContextCreationFlags(int)
+   */
+  public abstract void setContextCreationFlags(int flags);
+    
   /** 
    * Returns a valid OpenGL version string, ie<br>
    * <pre>
@@ -469,15 +519,15 @@ public abstract class GLContext {
   }
 
   public final boolean isGLES1() {
-      return ctxMajorVersion==1 && 0!=(ctxOptions & CTX_PROFILE_ES);
+      return ctxMajorVersion==1 && 0 != ( ctxOptions & CTX_PROFILE_ES ) ;
   }
 
   public final boolean isGLES2() {
-      return ctxMajorVersion==2 && 0!=(ctxOptions & CTX_PROFILE_ES);
+      return ctxMajorVersion==2 && 0 != ( ctxOptions & CTX_PROFILE_ES ) ;
   }
 
   public final boolean isGLES() {
-      return isGLEmbeddedProfile();
+      return 0 != ( CTX_PROFILE_ES & ctxOptions ) ;
   }
 
   public final boolean isGL2ES1() {
@@ -488,16 +538,156 @@ public abstract class GLContext {
       return isGL2GL3() || isGLES2() ;
   }
 
+  /**
+   * @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_PROFILE_ES2_COMPAT ) ;
+  }
+  
   public final boolean hasGLSL() {
       return isGL2ES2() ;
   }
 
+  public final void setSwapInterval(int interval) {
+    if (!isCurrent()) {
+        throw new GLException("This context is not current. Current context: "+getCurrent()+", this context "+this);
+    }
+    setSwapIntervalImpl(interval);
+  }
+  protected void setSwapIntervalImpl(int interval) { /** nop per default .. **/  }
+  protected int currentSwapInterval = -1; // default: not set yet ..
+  public int getSwapInterval() {
+    return currentSwapInterval;
+  }
+  
+  public final boolean queryMaxSwapGroups(int[] maxGroups, int maxGroups_offset,
+                                          int[] maxBarriers, int maxBarriers_offset) {
+      
+    if (!isCurrent()) {
+        throw new GLException("This context is not current. Current context: "+getCurrent()+", this context "+this);
+    }
+    return queryMaxSwapGroupsImpl(maxGroups, maxGroups_offset, maxBarriers, maxBarriers_offset);
+  }
+  protected boolean queryMaxSwapGroupsImpl(int[] maxGroups, int maxGroups_offset,
+                                          int[] maxBarriers, int maxBarriers_offset) { return false; }
+  public final boolean joinSwapGroup(int group) {
+    if (!isCurrent()) {
+        throw new GLException("This context is not current. Current context: "+getCurrent()+", this context "+this);
+    }
+    return joinSwapGroupImpl(group);
+  }
+  protected boolean joinSwapGroupImpl(int group) { /** nop per default .. **/  return false; }
+  protected int currentSwapGroup = -1; // default: not set yet ..  
+  public int getSwapGroup() {
+      return currentSwapGroup;
+  }
+  public final boolean bindSwapBarrier(int group, int barrier) {
+    if (!isCurrent()) {
+        throw new GLException("This context is not current. Current context: "+getCurrent()+", this context "+this);
+    }
+    return bindSwapBarrierImpl(group, barrier);    
+  }
+  protected boolean bindSwapBarrierImpl(int group, int barrier) { /** nop per default .. **/  return false; }
+
+  
+  /**
+   * @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();
+
+  /**
+   * @return the current synchronous debug behavior via
+   * @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)}, 
+   * 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> 
+   */
+  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> 
+   * 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, 
+   * {@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 #removeGLDebugListener(GLDebugListener)
+   */
+  public abstract void addGLDebugListener(GLDebugListener listener);
+  
+  /**
+   * Remove {@link GLDebugListener}.<br>
+   * 
+   * @param listener {@link GLDebugListener} handling {@GLDebugMessage}s
+   * @see #enableGLDebugMessage(boolean) 
+   * @see #addGLDebugListener(GLDebugListener)
+   */
+  public abstract void removeGLDebugListener(GLDebugListener listener);
+  
+  /**
+   * 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) 
+   */
+  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) 
+   */
+  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)} 
+   * and {@link GL2GL3#glDebugMessageInsertAMD(int, int, int, int, String)} of the GLDebugOutput feature.
+   * @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 },
       /* 2.*/ { 0, 1 },
       /* 3.*/ { 0, 1, 2, 3 },
-      /* 4.*/ { 0, 1 } };
+      /* 4.*/ { 0, 1, 2 } };
 
   public static final int getMaxMajor() {
       return GL_VERSIONS.length-1;
@@ -601,7 +791,7 @@ public abstract class GLContext {
               throw new InternalError("Already set: "+devKey);
           }
           deviceVersionsAvailableSet.add(devKey);
-          if (DEBUG0) {
+          if (GLContextImpl.DEBUG) {
             String msg = getThreadName() + ": !!! createContextARB: SET mappedVersionsAvailableSet "+devKey;
             // Throwable t = new Throwable(msg);
             // t.printStackTrace();
@@ -609,6 +799,11 @@ public abstract class GLContext {
           }
       }
   }
+  
+  protected static void shutdown() {
+      deviceVersionAvailable.clear();
+      deviceVersionsAvailableSet.clear();
+  }
 
   /**
    * Called by {@link jogamp.opengl.GLContextImpl#createContextARBMapVersionsAvailable} not intended to be used by
@@ -726,15 +921,17 @@ public abstract class GLContext {
 
   public static String getGLVersion(int major, int minor, int ctp, String gl_version) {
     boolean needColon = false;
-    StringBuffer sb = new StringBuffer();
+    StringBuilder sb = new StringBuilder();
     sb.append(major);
     sb.append(".");
     sb.append(minor);
     sb.append(" (");
     needColon = appendString(sb, "ES",                    needColon, 0 != ( CTX_PROFILE_ES & ctp ));
+    needColon = appendString(sb, "ES2 compatible",        needColon, 0 != ( CTX_PROFILE_ES2_COMPAT & 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 compatible",    needColon, 0 != ( CTX_OPTION_FORWARD & ctp ));
+    needColon = appendString(sb, "debug",                 needColon, 0 != ( CTX_OPTION_DEBUG & ctp ));    
     needColon = appendString(sb, "any",                   needColon, 0 != ( CTX_OPTION_ANY & ctp ));
     needColon = appendString(sb, "new",                   needColon, 0 != ( CTX_IS_ARB_CREATED & ctp ));
     needColon = appendString(sb, "old",                   needColon, 0 == ( CTX_IS_ARB_CREATED & ctp ));
@@ -761,7 +958,7 @@ public abstract class GLContext {
     return "0x" + Long.toHexString(hex);
   }
 
-  private static boolean appendString(StringBuffer sb, String string, boolean needColon, boolean condition) {
+  private static boolean appendString(StringBuilder sb, String string, boolean needColon, boolean condition) {
     if(condition) {
         if(needColon) {
             sb.append(", ");
diff --git a/src/jogl/classes/javax/media/opengl/GLDebugListener.java b/src/jogl/classes/javax/media/opengl/GLDebugListener.java
new file mode 100644
index 0000000..8887d02
--- /dev/null
+++ b/src/jogl/classes/javax/media/opengl/GLDebugListener.java
@@ -0,0 +1,44 @@
+/**
+ * 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 javax.media.opengl;
+
+/**
+ * Listener for {@link GLDebugMessage}s.
+ * 
+ * <p>One can enable GLDebugOutput via {@link GLContext#enableGLDebugMessage(boolean)}
+ * and add listeners via {@link GLContext#addGLDebugListener(GLDebugListener)}.
+ */
+public interface GLDebugListener {
+    /** 
+     * Handle {@link GLDebugMessage} message sent from native GL implementation.
+     * 
+     * <p>Since this method is invoked directly by the GL implementation, it shall
+     * return as fast as possible.</p>
+     */
+    void messageSent(GLDebugMessage event);    
+}
diff --git a/src/jogl/classes/javax/media/opengl/GLDebugMessage.java b/src/jogl/classes/javax/media/opengl/GLDebugMessage.java
new file mode 100644
index 0000000..3ab0683
--- /dev/null
+++ b/src/jogl/classes/javax/media/opengl/GLDebugMessage.java
@@ -0,0 +1,248 @@
+/**
+ * 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 javax.media.opengl;
+
+import com.jogamp.common.os.Platform;
+
+public class GLDebugMessage {
+    final GLContext source;
+    final long when;    
+    final int dbgSource;
+    final int dbgType;
+    final int dbgId;
+    final int dbgSeverity;
+    final String dbgMsg;
+    
+    /**
+     * @param source The source of the event
+     * @param when The time of the event
+     * @param dbgSource The ARB source
+     * @param dbgType The ARB type
+     * @param dbgId The ARB id
+     * @param dbgSeverity The ARB severity level
+     * @param dbgMsg The debug message
+     */
+    public GLDebugMessage(GLContext source, long when, int dbgSource, int dbgType, int dbgId, int dbgSeverity, String dbgMsg) {
+        this.source = source;
+        this.when = when;
+        this.dbgSource = dbgSource;
+        this.dbgType = dbgType;
+        this.dbgId = dbgId;
+        this.dbgSeverity = dbgSeverity;
+        this.dbgMsg = dbgMsg;
+    }
+    
+    /**
+     * 
+     * @param source
+     * @param when
+     * @param dbgId
+     * @param amdDbgCategory
+     * @param dbgSeverity AMD severity level equals ARB severity level (value and semantic)
+     * @param dbgMsg
+     * @return
+     */
+    public static GLDebugMessage translateAMDEvent(GLContext source, long when, int dbgId, int amdDbgCategory, int dbgSeverity, String dbgMsg) {
+        int dbgSource, dbgType;
+        
+        // AMD category == ARB source/type
+        switch(amdDbgCategory) {
+            case GL2GL3.GL_DEBUG_CATEGORY_API_ERROR_AMD: 
+                dbgSource = GL2GL3.GL_DEBUG_SOURCE_API_ARB;
+                dbgType = GL2GL3.GL_DEBUG_TYPE_ERROR_ARB; 
+                break;
+
+            //
+            // def source / other type
+            //
+                
+            case GL2GL3.GL_DEBUG_CATEGORY_WINDOW_SYSTEM_AMD: 
+                dbgSource = GL2GL3.GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB;
+                dbgType = GL2GL3.GL_DEBUG_TYPE_OTHER_ARB; 
+                break;
+                
+            case GL2GL3.GL_DEBUG_CATEGORY_SHADER_COMPILER_AMD:
+                dbgSource = GL2GL3.GL_DEBUG_SOURCE_SHADER_COMPILER_ARB;
+                dbgType = GL2GL3.GL_DEBUG_TYPE_OTHER_ARB; 
+                break;
+                
+            case GL2GL3.GL_DEBUG_CATEGORY_APPLICATION_AMD:
+                dbgSource = GL2GL3.GL_DEBUG_SOURCE_APPLICATION_ARB;
+                dbgType = GL2GL3.GL_DEBUG_TYPE_OTHER_ARB;
+                break;
+                
+                
+            //
+            // other source / def type
+            //
+                
+            case GL2GL3.GL_DEBUG_CATEGORY_DEPRECATION_AMD:
+                dbgSource = GL2GL3.GL_DEBUG_SOURCE_OTHER_ARB;
+                dbgType = GL2GL3.GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB; 
+                break;
+                
+            case GL2GL3.GL_DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD:
+                dbgSource = GL2GL3.GL_DEBUG_SOURCE_OTHER_ARB;
+                dbgType = GL2GL3.GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB; 
+                break;
+                
+            case GL2GL3.GL_DEBUG_CATEGORY_PERFORMANCE_AMD:
+                dbgSource = GL2GL3.GL_DEBUG_SOURCE_OTHER_ARB;
+                dbgType = GL2GL3.GL_DEBUG_TYPE_PERFORMANCE_ARB; 
+                break;
+                
+            case GL2GL3.GL_DEBUG_CATEGORY_OTHER_AMD: 
+            default:
+                dbgSource = GL2GL3.GL_DEBUG_SOURCE_OTHER_ARB;
+                dbgType = GL2GL3.GL_DEBUG_TYPE_OTHER_ARB;
+        }
+        
+        return new GLDebugMessage(source, when, dbgSource, dbgType, dbgId, dbgSeverity, dbgMsg);        
+    }
+
+    public static int translateARB2AMDCategory(int dbgSource, int dbgType) {
+        switch (dbgSource) {
+            case GL2GL3.GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB:
+                return GL2GL3.GL_DEBUG_CATEGORY_WINDOW_SYSTEM_AMD; 
+                
+            case GL2GL3.GL_DEBUG_SOURCE_SHADER_COMPILER_ARB:
+                return GL2GL3.GL_DEBUG_CATEGORY_SHADER_COMPILER_AMD;
+                
+            case GL2GL3.GL_DEBUG_SOURCE_APPLICATION_ARB:
+                return GL2GL3.GL_DEBUG_CATEGORY_APPLICATION_AMD;
+        }
+        
+        switch(dbgType) {
+            case GL2GL3.GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB:
+                return GL2GL3.GL_DEBUG_CATEGORY_DEPRECATION_AMD;
+                
+            case GL2GL3.GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB:
+                return GL2GL3.GL_DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD;
+                
+            case GL2GL3.GL_DEBUG_TYPE_PERFORMANCE_ARB: 
+                return GL2GL3.GL_DEBUG_CATEGORY_PERFORMANCE_AMD;
+        }
+                
+        return GL2GL3.GL_DEBUG_CATEGORY_OTHER_AMD;        
+    }
+    
+    public GLContext getSource() {
+        return source;
+    }
+
+    public long getWhen() {
+        return when;
+    }
+    
+    public int getDbgSource() {
+        return dbgSource;
+    }
+
+    public int getDbgType() {
+        return dbgType;
+    }
+
+    public int getDbgId() {
+        return dbgId;
+    }
+
+    public int getDbgSeverity() {
+        return dbgSeverity;
+    }
+
+    public String getDbgMsg() {
+        return dbgMsg;
+    }
+    
+    public StringBuilder toString(StringBuilder sb) {
+        final String crtab = Platform.getNewline()+"\t";        
+        if(null==sb) {
+            sb = new StringBuilder();
+        }        
+        sb.append("GLDebugEvent[ id ");
+        toHexString(sb, dbgId)        
+        .append(crtab).append("type ").append(getDbgTypeString(dbgType))
+        .append(crtab).append("severity ").append(getDbgSeverityString(dbgSeverity))
+        .append(crtab).append("source ").append(getDbgSourceString(dbgSource))
+        .append(crtab).append("msg ").append(dbgMsg)
+        .append(crtab).append("when ").append(when);
+        if(null != source) {
+            sb.append(crtab).append("source ").append(source.getGLVersion()).append(" - hash 0x").append(Integer.toHexString(source.hashCode()));
+        }
+        sb.append("]");
+        return sb;        
+    }
+
+    public String toString() {
+        return toString(null).toString();
+    }
+        
+    public static String getDbgSourceString(int dbgSource) {
+        switch(dbgSource) {
+            case GL2GL3.GL_DEBUG_SOURCE_API_ARB: return "GL API";
+            case GL2GL3.GL_DEBUG_SOURCE_SHADER_COMPILER_ARB: return "GLSL or extension compiler";                                          
+            case GL2GL3.GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB: return "Native Windowing binding";                                          
+            case GL2GL3.GL_DEBUG_SOURCE_THIRD_PARTY_ARB: return "Third party";
+            case GL2GL3.GL_DEBUG_SOURCE_APPLICATION_ARB: return "Application";
+            case GL2GL3.GL_DEBUG_SOURCE_OTHER_ARB: return "generic";
+            default: return "Unknown (" + toHexString(dbgSource) + ")";
+        }
+    }
+    
+    public static String getDbgTypeString(int dbgType) {
+        switch(dbgType) {
+            case GL2GL3.GL_DEBUG_TYPE_ERROR_ARB: return "Error";
+            case GL2GL3.GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB: return "Warning: marked for deprecation";                                            
+            case GL2GL3.GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB: return "Warning: undefined behavior";
+            case GL2GL3.GL_DEBUG_TYPE_PERFORMANCE_ARB: return "Warning: implementation dependent performance";   
+            case GL2GL3.GL_DEBUG_TYPE_PORTABILITY_ARB: return "Warning: vendor-specific extension use";   
+            case GL2GL3.GL_DEBUG_TYPE_OTHER_ARB: return "Warning: generic";            
+            default: return "Unknown (" + toHexString(dbgType) + ")";
+        }
+    }
+    
+    public static String getDbgSeverityString(int dbgSeverity) {
+        switch(dbgSeverity) {
+            case GL2GL3.GL_DEBUG_SEVERITY_HIGH_ARB: return "High: dangerous undefined behavior";                                          
+            case GL2GL3.GL_DEBUG_SEVERITY_MEDIUM_ARB: return "Medium: Severe performance/deprecation/other warnings";    
+            case GL2GL3.GL_DEBUG_SEVERITY_LOW_ARB: return "Low: Performance warnings (redundancy/undefined)";        
+            default: return "Unknown (" + toHexString(dbgSeverity) + ")";
+        }
+    }
+    
+    public static StringBuilder toHexString(StringBuilder sb, int i) {
+        if(null==sb) {
+            sb = new StringBuilder();
+        }
+        return sb.append("0x").append(Integer.toHexString(i));
+    }
+    public static String toHexString(int i) {
+        return "0x"+Integer.toHexString(i);
+    }    
+    
+}
diff --git a/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java b/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java
index c433e8b..1282eb1 100644
--- a/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java
+++ b/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java
@@ -90,13 +90,15 @@ import javax.media.nativewindow.ProxySurface;
 
 public abstract class GLDrawableFactory {
 
-  private static final GLDrawableFactory eglFactory;
-  private static final GLDrawableFactory nativeOSFactory;
   private static final String nativeOSType;
   static final String macosxFactoryClassNameCGL = "jogamp.opengl.macosx.cgl.MacOSXCGLDrawableFactory";
   static final String macosxFactoryClassNameAWTCGL = "jogamp.opengl.macosx.cgl.awt.MacOSXAWTCGLDrawableFactory";
+  
+  private static volatile boolean initialized = false;
+  private static GLDrawableFactory eglFactory;
+  private static GLDrawableFactory nativeOSFactory;
 
-  protected static ArrayList/*<GLDrawableFactoryImpl>*/ glDrawableFactories = new ArrayList();
+  protected static ArrayList<GLDrawableFactory> glDrawableFactories = new ArrayList<GLDrawableFactory>();
 
   // Shutdown hook mechanism for the factory
   private static boolean factoryShutdownHookRegistered = false;
@@ -106,15 +108,15 @@ public abstract class GLDrawableFactory {
    * Instantiate singleton factories if available, EGLES1, EGLES2 and the OS native ones.
    */
   static {
-    AccessController.doPrivileged(new PrivilegedAction() {
-        public Object run() {
-            registerFactoryShutdownHook();
-            return null;
-        }
-    });
-
     nativeOSType = NativeWindowFactory.getNativeWindowType(true);
+  }
 
+  protected static final void initialize() {
+    if(initialized) { return; }
+    initialized = true;
+    
+    registerFactoryShutdownHook();
+    
     GLDrawableFactory tmp = null;
     String factoryClassName = Debug.getProperty("jogl.gldrawablefactory.class.name", true, AccessController.getContext());
     ClassLoader cl = GLDrawableFactory.class.getClassLoader();
@@ -197,7 +199,7 @@ public abstract class GLDrawableFactory {
   private static void shutdownImpl() {
     synchronized(glDrawableFactories) {
         for(int i=0; i<glDrawableFactories.size(); i++) {
-            GLDrawableFactory factory = (GLDrawableFactory) glDrawableFactories.get(i);
+            GLDrawableFactory factory = glDrawableFactories.get(i);
             factory.shutdownInstance();
         }
         glDrawableFactories.clear();
@@ -205,17 +207,13 @@ public abstract class GLDrawableFactory {
   }
 
   protected static void shutdown() {
-    AccessController.doPrivileged(new PrivilegedAction() {
-        public Object run() {
-            unregisterFactoryShutdownHook();
-            return null;
-        }
-    });
+    unregisterFactoryShutdownHook();
     shutdownImpl();
+    eglFactory = null;
+    nativeOSFactory = null;    
+    initialized = false;    
   }
 
-  private AbstractGraphicsDevice defaultSharedDevice = null;
-
   protected GLDrawableFactory() {
     synchronized(glDrawableFactories) {
         glDrawableFactories.add(this);
@@ -260,24 +258,22 @@ public abstract class GLDrawableFactory {
   }
 
   /**
-   * Returns true if a shared context is already mapped to the <code>device</code> {@link AbstractGraphicsDevice#getConnection()},
-   * or if a new shared context could be created and mapped. Otherwise return false.<br>
-   * Creation of the shared context is tried only once.
+   * Returns true if a shared context could be created while initialization 
+   * of shared resources for <code>device</code> {@link AbstractGraphicsDevice#getConnection()}.<br>
+   * This does not imply a shared context is mapped, but was available<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.
    */
-  public final boolean getIsSharedContextAvailable(AbstractGraphicsDevice device) {
-      return null != getOrCreateSharedContext(device);
-  }
+  public abstract boolean getWasSharedContextCreated(AbstractGraphicsDevice device);
 
   /**
    * Returns the shared context 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>
+   * either a pre-existing or newly created, or <code>null</code> if creation failed or not supported.<br>
    * Creation of the shared context is tried only once.
    *
    * @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.
    */
-  protected final GLContext getOrCreateSharedContext(AbstractGraphicsDevice device) {
+  public final GLContext getOrCreateSharedContext(AbstractGraphicsDevice device) {
       device = validateDevice(device);
       if(null!=device) {
         return getOrCreateSharedContextImpl(device);
@@ -312,16 +308,15 @@ public abstract class GLDrawableFactory {
 
   protected static GLDrawableFactory getFactoryImpl(String glProfileImplName) throws GLException {
     if ( GLProfile.usesNativeGLES(glProfileImplName) ) {
-        if(null==eglFactory) throw new GLException("EGLDrawableFactory unavailable: "+glProfileImplName);
+        if(null==eglFactory) {
+            throw new GLException("No EGLDrawableFactory available for profile: "+glProfileImplName);
+        }
         return eglFactory;
     }
-    if(null!=nativeOSFactory) {
-        return nativeOSFactory;
+    if(null==nativeOSFactory) {
+        throw new GLException("No native platform GLDrawableFactory available for profile: "+glProfileImplName);
     }
-    if(null!=eglFactory) {
-        return eglFactory;
-    }
-    throw new GLException("No native platform GLDrawableFactory, nor EGLDrawableFactory available: "+glProfileImplName);
+    return nativeOSFactory;
   }
 
   protected static GLDrawableFactory getFactoryImpl(AbstractGraphicsDevice device) throws GLException {
@@ -343,14 +338,14 @@ public abstract class GLDrawableFactory {
    * @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.
    * @return A list of {@link javax.media.opengl.GLCapabilitiesImmutable}'s, maybe empty if none is available.
    */
-  public final List/*GLCapabilitiesImmutable*/ getAvailableCapabilities(AbstractGraphicsDevice device) {
+  public final List<GLCapabilitiesImmutable> getAvailableCapabilities(AbstractGraphicsDevice device) {
       device = validateDevice(device);
       if(null!=device) {
         return getAvailableCapabilitiesImpl(device);
       }
       return null;
   }
-  protected abstract List/*GLCapabilitiesImmutable*/ getAvailableCapabilitiesImpl(AbstractGraphicsDevice device);
+  protected abstract List<GLCapabilitiesImmutable> getAvailableCapabilitiesImpl(AbstractGraphicsDevice device);
 
   //----------------------------------------------------------------------
   // Methods to create high-level objects
diff --git a/src/jogl/classes/javax/media/opengl/GLPipelineFactory.java b/src/jogl/classes/javax/media/opengl/GLPipelineFactory.java
index 926651c..7a12e52 100644
--- a/src/jogl/classes/javax/media/opengl/GLPipelineFactory.java
+++ b/src/jogl/classes/javax/media/opengl/GLPipelineFactory.java
@@ -39,6 +39,8 @@ package javax.media.opengl;
 import java.lang.reflect.*;
 import java.util.StringTokenizer;
 
+import com.jogamp.common.util.ReflectionUtil;
+
 import jogamp.opengl.*;
 
 /**
@@ -70,10 +72,10 @@ public class GLPipelineFactory {
      * @param downstream is always the 1st argument for the upstream constructor
      * @param additionalArgs additional arguments for the upstream constructor
      */
-    public static final GL create(String pipelineClazzBaseName, Class reqInterface, GL downstream, Object[] additionalArgs) {
-        Class downstreamClazz = downstream.getClass();
-        Class upstreamClazz = null;
-        Class interfaceClazz = null;
+    public static final GL create(String pipelineClazzBaseName, Class<?> reqInterface, GL downstream, Object[] additionalArgs) {
+        Class<?> downstreamClazz = downstream.getClass();
+        Class<?> upstreamClazz = null;
+        Class<?> interfaceClazz = null;
 
         if(DEBUG) {
             System.out.println("GLPipelineFactory: Start "+downstreamClazz.getName()+", req. Interface: "+reqInterface+" -> "+pipelineClazzBaseName);
@@ -83,7 +85,7 @@ public class GLPipelineFactory {
         do {
             // For all interfaces: right -> left == child -> parent
             //   It is important that this matches with the gluegen cfg file's 'Implements' clause !
-            Class[] clazzes = downstreamClazz.getInterfaces();
+            Class<?>[] clazzes = downstreamClazz.getInterfaces();
             for(int i=clazzes.length-1; null==upstreamClazz && i>=0; i--) {
                 if(DEBUG) {
                     System.out.println("GLPipelineFactory: Try "+downstreamClazz.getName()+" Interface["+i+"]: "+clazzes[i].getName());
@@ -124,7 +126,7 @@ public class GLPipelineFactory {
             System.out.println("GLPipelineFactory: Got : "+ upstreamClazz.getName()+", base interface: "+interfaceClazz.getName());
         }
 
-        Class[] cstrArgTypes = new Class[ 1 + ( ( null==additionalArgs ) ? 0 : additionalArgs.length ) ] ;
+        Class<?>[] cstrArgTypes = new Class<?>[ 1 + ( ( null==additionalArgs ) ? 0 : additionalArgs.length ) ] ;
         {
             int i = 0;
             cstrArgTypes[i++] = interfaceClazz;
@@ -132,13 +134,8 @@ public class GLPipelineFactory {
                 cstrArgTypes[i++] = additionalArgs[j].getClass();
             }
         }
-        Constructor cstr = null;
-        try {
-            cstr = upstreamClazz.getDeclaredConstructor( cstrArgTypes );
-        } catch(NoSuchMethodException nsme) {
-          throw new GLException("Couldn't find pipeline constructor: " + upstreamClazz.getName() + 
-                                " ( "+getArgsClassNameList(downstreamClazz, additionalArgs) +" )");
-        }
+        // throws exception if cstr not found!
+        Constructor<?> cstr = ReflectionUtil.getConstructor(upstreamClazz, cstrArgTypes);
         Object instance = null;
         try { 
             Object[] cstrArgs = new Object[ 1 + ( ( null==additionalArgs ) ? 0 : additionalArgs.length ) ] ;
@@ -161,7 +158,7 @@ public class GLPipelineFactory {
         return (GL) instance;
     }
 
-    private static final String getArgsClassNameList(Class arg0, Object[] args) {
+    private static final String getArgsClassNameList(Class<?> arg0, Object[] args) {
         StringBuffer sb = new StringBuffer();
         sb.append(arg0.getName());
         if(args!=null) {
@@ -173,7 +170,7 @@ public class GLPipelineFactory {
         return sb.toString();
     }
 
-    private static final Class getUpstreamClazz(Class downstreamClazz, String pipelineClazzBaseName) {
+    private static final Class<?> getUpstreamClazz(Class<?> downstreamClazz, String pipelineClazzBaseName) {
         String downstreamClazzName = downstreamClazz.getName();
 
         StringTokenizer st = new StringTokenizer(downstreamClazzName, ".");
@@ -183,7 +180,7 @@ public class GLPipelineFactory {
         }
         String upstreamClazzName = pipelineClazzBaseName+downstreamClazzBaseName;
 
-        Class upstreamClazz = null;
+        Class<?> upstreamClazz = null;
         try {
             upstreamClazz = Class.forName(upstreamClazzName, true, GLPipelineFactory.class.getClassLoader());
         } catch (Throwable e) { e.printStackTrace(); }
diff --git a/src/jogl/classes/javax/media/opengl/GLProfile.java b/src/jogl/classes/javax/media/opengl/GLProfile.java
index 17313f7..7367d58 100644
--- a/src/jogl/classes/javax/media/opengl/GLProfile.java
+++ b/src/jogl/classes/javax/media/opengl/GLProfile.java
@@ -43,9 +43,11 @@ import jogamp.opengl.GLDynamicLookupHelper;
 import jogamp.opengl.DesktopGLDynamicLookupHelper;
 
 import com.jogamp.common.GlueGenVersion;
-import com.jogamp.common.jvm.JVMUtil;
+import com.jogamp.common.jvm.JNILibLoaderBase;
+import com.jogamp.common.os.Platform;
 import com.jogamp.common.util.ReflectionUtil;
 import com.jogamp.common.util.VersionUtil;
+import com.jogamp.common.util.cache.TempJarCache;
 import com.jogamp.nativewindow.NativeWindowVersion;
 import com.jogamp.opengl.JoglVersion;
 
@@ -98,11 +100,6 @@ public class GLProfile {
      * hence without the possibility to enable native multithreading.<br>
      * This is not the recommended way, since it may has a performance impact, but it allows you to run code without explicit initialization.</P>
      * <P>
-     * In case no explicit initialization was invoked and the implicit initialization didn't happen,<br>
-     * you may encounter the following exception:
-     * <pre>
-     *      javax.media.opengl.GLException: No default profile available
-     * </pre></P>
      *
      * @param firstUIActionOnProcess Should be <code>true</code> if called before the first UI action of the running program,
      * otherwise <code>false</code>.
@@ -112,8 +109,15 @@ public class GLProfile {
             initialized = true;
             // run the whole static initialization privileged to speed up,
             // since this skips checking further access
-            AccessController.doPrivileged(new PrivilegedAction() {
+            AccessController.doPrivileged(new PrivilegedAction<Object>() {
                 public Object run() {
+                    if(TempJarCache.isInitialized()) {
+                       String[] atomicNativeJarBaseNames = new String[] { "nativewindow", "jogl", null };
+                       if( ReflectionUtil.isClassAvailable("com.jogamp.newt.NewtFactory", GLProfile.class.getClassLoader()) ) {
+                           atomicNativeJarBaseNames[2] = "newt";
+                       }
+                       JNILibLoaderBase.addNativeJarLibs(GLProfile.class, "jogl.all", "jogl-all", atomicNativeJarBaseNames);
+                    }
                     initProfilesForDefaultDevices(firstUIActionOnProcess);
                     return null;
                 }
@@ -124,8 +128,10 @@ public class GLProfile {
     /**
      * Trigger eager initialization of GLProfiles for the given device,
      * in case it isn't done yet.
+     * 
+     * @throws GLException if no profile for the given device is available.
      */
-    public static void initProfiles(AbstractGraphicsDevice device) {
+    public static void initProfiles(AbstractGraphicsDevice device) throws GLException {
         getProfileMap(device);
     }
 
@@ -140,6 +146,7 @@ public class GLProfile {
         if(initialized) {
             initialized = false;
             GLDrawableFactory.shutdown();
+            GLContext.shutdown();
         }
     }
 
@@ -147,87 +154,41 @@ public class GLProfile {
     // Query platform available OpenGL implementation
     //
 
-    public static boolean isGL4bcAvailable(AbstractGraphicsDevice device)   {
-        return null != getProfileMap(device).get(GL4bc);
-    }
-
-    public static boolean isGL4Available(AbstractGraphicsDevice device)     {
-        return null != getProfileMap(device).get(GL4);
-    }
-
-    public static boolean isGL3bcAvailable(AbstractGraphicsDevice device) {
-        return null != getProfileMap(device).get(GL3bc);
-    }
-
-    public static boolean isGL3Available(AbstractGraphicsDevice device) {
-        return null != getProfileMap(device).get(GL3);
-    }
-
-    public static boolean isGL2Available(AbstractGraphicsDevice device) {
-        return null != getProfileMap(device).get(GL2);
-    }
-
-    public static boolean isGLES2Available(AbstractGraphicsDevice device) {
-        return null != getProfileMap(device).get(GLES2);
-    }
-
-    public static boolean isGLES1Available(AbstractGraphicsDevice device) {
-        return null != getProfileMap(device).get(GLES1);
-    }
-
-    public static boolean isGL2ES1Available(AbstractGraphicsDevice device) {
-        return null != getProfileMap(device).get(GL2ES1);
-    }
-
-    public static boolean isGL2ES2Available(AbstractGraphicsDevice device) {
-        return null != getProfileMap(device).get(GL2ES2);
-    }
-
-    /** Uses the default device */
-    public static boolean isGL4bcAvailable()   {
-        return isGL4bcAvailable(null);
-    }
-
-    /** Uses the default device */
-    public static boolean isGL4Available()     {
-        return isGL4Available(null);
-    }
-
-    /** Uses the default device */
-    public static boolean isGL3bcAvailable() {
-        return isGL3bcAvailable(null);
-    }
-
-    /** Uses the default device */
-    public static boolean isGL3Available() {
-        return isGL3Available(null);
-    }
-
-    /** Uses the default device */
-    public static boolean isGL2Available() {
-        return isGL2Available(null);
-    }
-
-    /** Uses the default device */
-    public static boolean isGLES2Available() {
-        return isGLES2Available(null);
-    }
-
-    /** Uses the default device */
-    public static boolean isGLES1Available() {
-        return isGLES1Available(null);
+    /** 
+     * Returns the availability of a profile on a device.
+     * 
+     * @param device a valid AbstractGraphicsDevice, or <code>null</null> for the default device.
+     * @param profile a valid GLProfile name ({@link #GL4bc}, {@link #GL4}, {@link #GL2}, ..), 
+     *        or <code>[ null, GL ]</code> for the default profile.
+     * @return true if the profile is available for the device, otherwise false.
+     */
+    public static boolean isAvailable(AbstractGraphicsDevice device, String profile) {
+        try {
+            return null != getProfileMap(device).get(profile);
+        } catch (GLException gle) { /* profiles for device n/a */ }
+        return false;
     }
 
-    /** Uses the default device */
-    public static boolean isGL2ES1Available() {
-        return isGL2ES1Available(null);
+    /** 
+     * Returns the availability of a profile on the default device.
+     * 
+     * @param profile a valid GLProfile name ({@link #GL4bc}, {@link #GL4}, {@link #GL2}, ..), 
+     *        or <code>[ null, GL ]</code> for the default profile.
+     * @return true if the profile is available for the default device, otherwise false.
+     */
+    public static boolean isAvailable(String profile) {
+        return isAvailable(null, profile);
     }
-
-    /** Uses the default device */
-    public static boolean isGL2ES2Available() {
-        return isGL2ES2Available(null);
+    
+    /** 
+     * Returns the availability of any profile on the default device.
+     * 
+     * @return true if any profile is available for the default device, otherwise false.
+     */
+    public static boolean isAnyAvailable() {
+        return isAvailable(null, null);
     }
-
+    
     public static String glAvailabilityToString(AbstractGraphicsDevice device) {
         boolean avail;
         StringBuffer sb = new StringBuffer();
@@ -239,67 +200,77 @@ public class GLProfile {
         }
 
         sb.append("GLAvailability[Native[GL4bc ");
-        avail=isGL4bcAvailable(device);
+        avail=isAvailable(device, GL4bc);
         sb.append(avail);
         if(avail) {
             glAvailabilityToString(device, sb, 4, GLContext.CTX_PROFILE_COMPAT);
         }
 
         sb.append(", GL4 ");
-        avail=isGL4Available(device);
+        avail=isAvailable(device, GL4);
         sb.append(avail);
         if(avail) {
             glAvailabilityToString(device, sb, 4, GLContext.CTX_PROFILE_CORE);
         }
 
         sb.append(", GL3bc ");
-        avail=isGL3bcAvailable(device);
+        avail=isAvailable(device, GL3bc);
         sb.append(avail);
         if(avail) {
             glAvailabilityToString(device, sb, 3, GLContext.CTX_PROFILE_COMPAT);
         }
 
         sb.append(", GL3 ");
-        avail=isGL3Available(device);
+        avail=isAvailable(device, GL3);
         sb.append(avail);
         if(avail) {
             glAvailabilityToString(device, sb, 3, GLContext.CTX_PROFILE_CORE);
         }
 
         sb.append(", GL2 ");
-        avail=isGL2Available(device);
+        avail=isAvailable(device, GL2);
         sb.append(avail);
         if(avail) {
             glAvailabilityToString(device, sb, 2, GLContext.CTX_PROFILE_COMPAT);
         }
 
         sb.append(", GL2ES1 ");
-        sb.append(isGL2ES1Available(device));
+        sb.append(isAvailable(device, GL2ES1));
 
         sb.append(", GLES1 ");
-        avail=isGLES1Available(device);
+        avail=isAvailable(device, GLES1);
         sb.append(avail);
         if(avail) {
             glAvailabilityToString(device, sb, 1, GLContext.CTX_PROFILE_ES);
         }
 
         sb.append(", GL2ES2 ");
-        sb.append(isGL2ES2Available(device));
+        sb.append(isAvailable(device, GL2ES2));
 
         sb.append(", GLES2 ");
-        avail=isGLES2Available(device);
+        avail=isAvailable(device, GLES2);
         sb.append(avail);
         if(avail) {
             glAvailabilityToString(device, sb, 2, GLContext.CTX_PROFILE_ES);
         }
 
         sb.append("], Profiles[");
-        for(Iterator i=getProfileMap(device).values().iterator(); i.hasNext(); ) {
-            sb.append(((GLProfile)i.next()).toString());
-            sb.append(", ");
+        HashMap<String /*GLProfile_name*/, GLProfile> profileMap = null;
+        try {
+            profileMap = getProfileMap(device);
+        } catch (GLException gle) { /* profiles for device n/a */ }
+        if(null != profileMap) {
+            for(Iterator<GLProfile> i=profileMap.values().iterator(); i.hasNext(); ) {
+                sb.append(i.next().toString());
+                sb.append(", ");
+            }
+            sb.append(", default ");
+            try {
+                sb.append(getDefault(device));
+            } catch (GLException gle) {
+                sb.append("n/a");
+            }
         }
-        sb.append(", default ");
-        sb.append(getDefault(device));
         sb.append("]]");
 
         return sb.toString();
@@ -353,22 +324,23 @@ public class GLProfile {
      * All GL Profiles in the order of default detection.
      * Desktop compatibility profiles (the one with fixed function pipeline) comes first
      * from highest to lowest version.
+     * <p> This includes the generic subset profiles GL2GL3, GL2ES2 and GL2ES1.</p>
      *
      * <ul>
      *  <li> GL4bc
      *  <li> GL3bc
      *  <li> GL2
-     *  <li> GL2GL3
      *  <li> GL4
      *  <li> GL3
-     *  <li> GL2ES2
+     *  <li> GL2GL3
      *  <li> GLES2
-     *  <li> GL2ES1
+     *  <li> GL2ES2
      *  <li> GLES1
+     *  <li> GL2ES1
      * </ul>
      *
      */
-    public static final String[] GL_PROFILE_LIST_ALL = new String[] { GL4bc, GL3bc, GL2, GL2GL3, GL4, GL3, GL2ES2, GLES2, GL2ES1, GLES1 };
+    public static final String[] GL_PROFILE_LIST_ALL = new String[] { GL4bc, GL3bc, GL2, GL4, GL3, GL2GL3, GLES2, GL2ES2, GLES1, GL2ES1 };
 
     /**
      * Order of maximum profiles.
@@ -379,17 +351,30 @@ public class GLProfile {
      *  <li> GL3bc
      *  <li> GL3
      *  <li> GL2
-     *  <li> GL2GL3
-     *  <li> GL2ES2
      *  <li> GLES2
-     *  <li> GL2ES1
      *  <li> GLES1
      * </ul>
      *
      */
-    public static final String[] GL_PROFILE_LIST_MAX = new String[] { GL4bc, GL4, GL3bc, GL3, GL2, GL2GL3, GL2ES2, GLES2, GL2ES1, GLES1 };
+    public static final String[] GL_PROFILE_LIST_MAX = new String[] { GL4bc, GL4, GL3bc, GL3, GL2, GLES2, GLES1 };
 
     /**
+     * Order of minimum profiles.
+     *
+     * <ul>
+     *  <li> GLES1
+     *  <li> GLES2
+     *  <li> GL2
+     *  <li> GL3
+     *  <li> GL3bc
+     *  <li> GL4
+     *  <li> GL4bc
+     * </ul>
+     *
+     */
+    public static final String[] GL_PROFILE_LIST_MIN = new String[] { GLES1, GLES2, GL2, GL3, GL3bc, GL4, GL4bc };
+    
+    /**
      * Order of minimum original desktop profiles.
      *
      * <ul>
@@ -402,7 +387,7 @@ public class GLProfile {
      *
      */
     public static final String[] GL_PROFILE_LIST_MIN_DESKTOP = new String[] { GL2, GL3bc, GL4bc, GL3, GL4 };
-
+    
     /**
      * Order of maximum fixed function profiles
      *
@@ -410,56 +395,40 @@ public class GLProfile {
      *  <li> GL4bc
      *  <li> GL3bc
      *  <li> GL2
-     *  <li> GL2ES1
      *  <li> GLES1
      * </ul>
      *
      */
-    public static final String[] GL_PROFILE_LIST_MAX_FIXEDFUNC = new String[] { GL4bc, GL3bc, GL2, GL2ES1, GLES1 };
+    public static final String[] GL_PROFILE_LIST_MAX_FIXEDFUNC = new String[] { GL4bc, GL3bc, GL2, GLES1 };
 
     /**
      * Order of maximum programmable shader profiles
      *
      * <ul>
-     *  <li> GL4
      *  <li> GL4bc
-     *  <li> GL3
+     *  <li> GL4
      *  <li> GL3bc
+     *  <li> GL3
      *  <li> GL2
-     *  <li> GL2ES2
      *  <li> GLES2
      * </ul>
      *
      */
-    public static final String[] GL_PROFILE_LIST_MAX_PROGSHADER   = new String[] { GL4bc, GL4, GL3bc, GL3, GL2, GL2ES2, GLES2 };
+    public static final String[] GL_PROFILE_LIST_MAX_PROGSHADER   = new String[] { GL4bc, GL4, GL3bc, GL3, GL2, GLES2 };
 
     /**
      * All GL2ES2 Profiles in the order of default detection.
      *
-     * <ul>
-     *  <li> GL2ES2
-     *  <li> GL2
-     *  <li> GL3
-     *  <li> GL4
-     *  <li> GLES2
-     * </ul>
-     *
+     * @see #GL_PROFILE_LIST_MAX_PROGSHADER
      */
-    public static final String[] GL_PROFILE_LIST_GL2ES2 = new String[] { GL2ES2, GL4, GL3, GL2, GLES2 };
+    public static final String[] GL_PROFILE_LIST_GL2ES2 = GL_PROFILE_LIST_MAX_PROGSHADER;
 
     /**
      * All GL2ES1 Profiles in the order of default detection.
      *
-     * <ul>
-     *  <li> GL2ES1
-     *  <li> GL2
-     *  <li> GL3bc
-     *  <li> GL4bc
-     *  <li> GLES1
-     * </ul>
-     *
+     * @see #GL_PROFILE_LIST_MAX_FIXEDFUNC
      */
-    public static final String[] GL_PROFILE_LIST_GL2ES1 = new String[] { GL2ES1, GL4bc, GL3bc, GL2, GLES1 };
+    public static final String[] GL_PROFILE_LIST_GL2ES1 = GL_PROFILE_LIST_MAX_FIXEDFUNC;
 
     /**
      * All GLES Profiles in the order of default detection.
@@ -474,6 +443,7 @@ public class GLProfile {
 
     /** Returns a default GLProfile object, reflecting the best for the running platform.
      * It selects the first of the set {@link GLProfile#GL_PROFILE_LIST_ALL}
+     * @throws GLException if no profile is available for the device.
      * @see #GL_PROFILE_LIST_ALL
      */
     public static GLProfile getDefault(AbstractGraphicsDevice device) {
@@ -481,7 +451,9 @@ public class GLProfile {
         return glp;
     }
 
-    /** Uses the default device */
+    /** Uses the default device 
+     * @throws GLException if no profile is available for the default device.
+     */
     public static GLProfile getDefault() {
         return getDefault(defaultDevice);
     }
@@ -490,7 +462,7 @@ public class GLProfile {
      * Returns the highest profile.
      * It selects the first of the set: {@link GLProfile#GL_PROFILE_LIST_MAX}
      *
-     * @throws GLException if no implementation for the given profile is found.
+     * @throws GLException if no profile is available for the device.
      * @see #GL_PROFILE_LIST_MAX
      */
     public static GLProfile getMaximum(AbstractGraphicsDevice device)
@@ -499,7 +471,10 @@ public class GLProfile {
         return get(device, GL_PROFILE_LIST_MAX);
     }
 
-    /** Uses the default device */
+    /** Uses the default device 
+     * @throws GLException if no profile is available for the default device.
+     * @see #GL_PROFILE_LIST_MAX
+     */
     public static GLProfile getMaximum()
         throws GLException
     {
@@ -507,23 +482,26 @@ public class GLProfile {
     }
 
     /**
-     * Returns the lowest desktop profile.
-     * It selects the first of the set: {@link GLProfile#GL_PROFILE_LIST_MIN_DESKTOP}
+     * Returns the lowest profile.
+     * It selects the first of the set: {@link GLProfile#GL_PROFILE_LIST_MIN}
      *
-     * @throws GLException if no implementation for the given profile is found.
-     * @see #GL_PROFILE_LIST_MIN_DESKTOP
+     * @throws GLException if no desktop profile is available for the device.
+     * @see #GL_PROFILE_LIST_MIN
      */
-    public static GLProfile getMinDesktop(AbstractGraphicsDevice device)
+    public static GLProfile getMinimum(AbstractGraphicsDevice device)
         throws GLException
     {
-        return get(device, GL_PROFILE_LIST_MIN_DESKTOP);
+        return get(device, GL_PROFILE_LIST_MIN);
     }
 
-    /** Uses the default device */
-    public static GLProfile getMinDesktop()
+    /** Uses the default device 
+     * @throws GLException if no desktop profile is available for the default device.
+     * @see #GL_PROFILE_LIST_MIN
+     */
+    public static GLProfile getMinimum()
         throws GLException
     {
-        return get(GL_PROFILE_LIST_MIN_DESKTOP);
+        return get(GL_PROFILE_LIST_MIN);
     }
 
 
@@ -531,7 +509,7 @@ public class GLProfile {
      * Returns the highest profile, implementing the fixed function pipeline.
      * It selects the first of the set: {@link GLProfile#GL_PROFILE_LIST_MAX_FIXEDFUNC}
      *
-     * @throws GLException if no implementation for the given profile is found.
+     * @throws GLException if no fixed function profile is available for the device.
      * @see #GL_PROFILE_LIST_MAX_FIXEDFUNC
      */
     public static GLProfile getMaxFixedFunc(AbstractGraphicsDevice device)
@@ -540,7 +518,10 @@ public class GLProfile {
         return get(device, GL_PROFILE_LIST_MAX_FIXEDFUNC);
     }
 
-    /** Uses the default device */
+    /** Uses the default device 
+     * @throws GLException if no fixed function profile is available for the default device.
+     * @see #GL_PROFILE_LIST_MAX_FIXEDFUNC
+     */
     public static GLProfile getMaxFixedFunc()
         throws GLException
     {
@@ -551,7 +532,7 @@ public class GLProfile {
      * Returns the highest profile, implementing the programmable shader pipeline.
      * It selects the first of the set: {@link GLProfile#GL_PROFILE_LIST_MAX_PROGSHADER}
      *
-     * @throws GLException if no implementation for the given profile is found.
+     * @throws GLException if no programmable profile is available for the device.
      * @see #GL_PROFILE_LIST_MAX_PROGSHADER
      */
     public static GLProfile getMaxProgrammable(AbstractGraphicsDevice device)
@@ -560,7 +541,10 @@ public class GLProfile {
         return get(device, GL_PROFILE_LIST_MAX_PROGSHADER);
     }
 
-    /** Uses the default device */
+    /** Uses the default device 
+     * @throws GLException if no programmable profile is available for the default device.
+     * @see #GL_PROFILE_LIST_MAX_PROGSHADER
+     */
     public static GLProfile getMaxProgrammable()
         throws GLException
     {
@@ -568,10 +552,10 @@ public class GLProfile {
     }
 
     /**
-     * Returns a profile, implementing the interface GL2ES1.
-     * It selects the first of the set: {@link GLProfile#GL_PROFILE_LIST_GL2ES1}
-     *
-     * @throws GLException if no implementation for the given profile is found.
+     * Returns an available GL2ES1 compatible profile.
+     * It returns the first available of the set: {@link GLProfile#GL_PROFILE_LIST_GL2ES1}.
+     * 
+     * @throws GLException if no GL2ES1 compatible profile is available for the device.
      * @see #GL_PROFILE_LIST_GL2ES1
      */
     public static GLProfile getGL2ES1(AbstractGraphicsDevice device)
@@ -580,7 +564,13 @@ public class GLProfile {
         return get(device, GL_PROFILE_LIST_GL2ES1);
     }
 
-    /** Uses the default device */
+    /**
+     * Returns an available GL2ES1 compatible profile.
+     * It returns the first available of the set: {@link GLProfile#GL_PROFILE_LIST_GL2ES1}.
+     * 
+     * @throws GLException if no GL2ES1 compatible profile is available for the default device.
+     * @see #GL_PROFILE_LIST_GL2ES1
+     */
     public static GLProfile getGL2ES1()
         throws GLException
     {
@@ -588,10 +578,10 @@ public class GLProfile {
     }
 
     /**
-     * Returns a profile, implementing the interface GL2ES2.
-     * It selects the first of the set: {@link GLProfile#GL_PROFILE_LIST_GL2ES2}
+     * Returns an available GL2ES2 compatible profile.
+     * It returns the first available of the set: {@link GLProfile#GL_PROFILE_LIST_GL2ES2}.
      *
-     * @throws GLException if no implementation for the given profile is found.
+     * @throws GLException if no GL2ES2 compatible profile is available for the device.
      * @see #GL_PROFILE_LIST_GL2ES2
      */
     public static GLProfile getGL2ES2(AbstractGraphicsDevice device)
@@ -600,7 +590,13 @@ public class GLProfile {
         return get(device, GL_PROFILE_LIST_GL2ES2);
     }
 
-    /** Uses the default device */
+    /** 
+     * Returns an available GL2ES2 compatible profile
+     * It returns the first available of the set: {@link GLProfile#GL_PROFILE_LIST_GL2ES2}.
+     *
+     * @throws GLException if no GL2ES2 compatible profile is available for the default device.
+     * @see #GL_PROFILE_LIST_GL2ES2
+     */
     public static GLProfile getGL2ES2()
         throws GLException
     {
@@ -612,7 +608,10 @@ public class GLProfile {
      * A generic value of <code>null</code> or <code>GL</code> will result in
      * the default profile.
      *
-     * @throws GLException if no implementation for the given profile is found.
+     * @param device a valid AbstractGraphicsDevice, or <code>null</null> for the default device.
+     * @param profile a valid GLProfile name ({@link #GL4bc}, {@link #GL4}, {@link #GL2}, ..), 
+     *        or <code>[ null, GL ]</code> for the default profile.
+     * @throws GLException if the requested profile is not available for the device.
      */
     public static GLProfile get(AbstractGraphicsDevice device, String profile)
         throws GLException
@@ -620,10 +619,19 @@ public class GLProfile {
         if(null==profile || profile.equals("GL")) {
             profile = GL_DEFAULT;
         }
-        return (GLProfile) getProfileMap(device).get(profile);
+        final HashMap<String /*GLProfile_name*/, GLProfile> glpMap = getProfileMap(device);
+        final GLProfile glp = glpMap.get(profile);
+        if(null == glp) {
+            throw new GLException("Profile "+profile+" is not available on "+device+", but: "+glpMap.values());
+        }
+        return glp;
     }
 
-    /** Uses the default device */
+    /** Uses the default device 
+     * @param profile a valid GLProfile name ({@link #GL4bc}, {@link #GL4}, {@link #GL2}, ..), 
+     *        or <code>[ null, GL ]</code> for the default profile.
+     * @throws GLException if the requested profile is not available for the default device.
+     */
     public static GLProfile get(String profile)
         throws GLException
     {
@@ -634,15 +642,17 @@ public class GLProfile {
      * Returns the first profile from the given list,
      * where an implementation is available.
      *
-     * @throws GLException if no implementation for the given profile is found.
+     * @param device a valid AbstractGraphicsDevice, or <code>null</null> for the default device.
+     * @param profiles array of valid GLProfile name ({@link #GL4bc}, {@link #GL4}, {@link #GL2}, ..) 
+     * @throws GLException if the non of the requested profiles is available for the device.
      */
     public static GLProfile get(AbstractGraphicsDevice device, String[] profiles)
         throws GLException
     {
-        HashMap map = getProfileMap(device);
+        HashMap<String /*GLProfile_name*/, GLProfile> map = getProfileMap(device);
         for(int i=0; i<profiles.length; i++) {
             String profile = profiles[i];
-            GLProfile glProfile = (GLProfile) map.get(profile);
+            GLProfile glProfile = map.get(profile);
             if(null!=glProfile) {
                 return glProfile;
             }
@@ -650,7 +660,10 @@ public class GLProfile {
         throw new GLException("Profiles "+array2String(profiles)+" not available on device "+device);
     }
 
-    /** Uses the default device */
+    /** Uses the default device 
+     * @param profiles array of valid GLProfile name ({@link #GL4bc}, {@link #GL4}, {@link #GL2}, ..) 
+     * @throws GLException if the non of the requested profiles is available for the default device.
+     */
     public static GLProfile get(String[] profiles)
         throws GLException
     {
@@ -974,6 +987,7 @@ public class GLProfile {
                     }
                     return false;
             }
+            /** unable to validate .. could be any valid type/component combination
             switch(comps) {
                 case 0:
                 case 1:
@@ -983,10 +997,10 @@ public class GLProfile {
                     break;
                 default: 
                     if(throwException) {
-                        throw new GLException("Illegal component number for "+arrayName+" on profile GLES1: "+comps);
+                        throw new GLException("Illegal component number for "+arrayName+" on profile GLES2: "+comps);
                     }
                     return false;
-            }
+            } */
         } else if( isGL2ES2() ) {
             if(isVertexAttribPointer) {
                 switch(type) {
@@ -1138,13 +1152,14 @@ public class GLProfile {
     }
 
     static {
-        JVMUtil.initSingleton();
+        Platform.initSingleton();
     }
 
     private static /*final*/ boolean isAWTAvailable;
 
-    private static /*final*/ boolean hasDesktopGL;    
+    private static /*final*/ boolean hasDesktopGLFactory;    
     private static /*final*/ boolean hasGL234Impl;
+    private static /*final*/ boolean hasEGLFactory;
     private static /*final*/ boolean hasGLES2Impl;
     private static /*final*/ boolean hasGLES1Impl;
 
@@ -1158,7 +1173,6 @@ public class GLProfile {
 
     /**
      * Tries the profiles implementation and native libraries.
-     * Throws an GLException if no profile could be found at all.
      */
     private static void initProfilesForDefaultDevices(boolean firstUIActionOnProcess) {
         NativeWindowFactory.initSingleton(firstUIActionOnProcess);
@@ -1177,8 +1191,13 @@ public class GLProfile {
         isAWTAvailable = NativeWindowFactory.isAWTAvailable() &&
                          ReflectionUtil.isClassAvailable("javax.media.opengl.awt.GLCanvas", classloader) ; // JOGL
 
+        // depends on hasDesktopGLFactory
         hasGL234Impl   = ReflectionUtil.isClassAvailable("jogamp.opengl.gl4.GL4bcImpl", classloader);
         
+        // depends on hasEGLFactory
+        hasGLES1Impl   = ReflectionUtil.isClassAvailable("jogamp.opengl.es1.GLES1Impl", classloader);
+        hasGLES2Impl   = ReflectionUtil.isClassAvailable("jogamp.opengl.es2.GLES2Impl", classloader);
+        
         //
         // Iteration of desktop GL availability detection
         // utilizing the detected GL version in the shared context.
@@ -1186,6 +1205,8 @@ public class GLProfile {
         // - Instantiate GLDrawableFactory incl its shared dummy drawable/context,
         //   which will register at GLContext ..
         //
+        GLDrawableFactory.initialize();
+        
         Throwable t=null;
         // if successfull it has a shared dummy drawable and context created
         try {
@@ -1193,7 +1214,7 @@ public class GLProfile {
             if(null != desktopFactory) {
                 DesktopGLDynamicLookupHelper glLookupHelper = (DesktopGLDynamicLookupHelper) desktopFactory.getGLDynamicLookupHelper(0);
                 if(null!=glLookupHelper) {
-                    hasDesktopGL = glLookupHelper.hasGLBinding();
+                    hasDesktopGLFactory = glLookupHelper.isLibComplete() && hasGL234Impl;
                 }
             }
         } catch (LinkageError le) {
@@ -1213,7 +1234,7 @@ public class GLProfile {
         }
 
         if(null == desktopFactory) {
-            hasDesktopGL   = false;
+            hasDesktopGLFactory   = false;
             hasGL234Impl   = false;
         } else {
             defaultDesktopDevice = desktopFactory.getDefaultDevice();
@@ -1225,13 +1246,15 @@ public class GLProfile {
             try {
                 eglFactory = (GLDrawableFactoryImpl) GLDrawableFactory.getFactoryImpl(GLES2);
                 if(null != eglFactory) {
+                    hasEGLFactory = true;
                     GLDynamicLookupHelper eglLookupHelper = eglFactory.getGLDynamicLookupHelper(2);
+                    // update hasGLES1Impl, hasGLES2Impl based on EGL
                     if(null!=eglLookupHelper) {
-                        hasGLES2Impl = eglLookupHelper.isLibComplete();
+                        hasGLES2Impl = eglLookupHelper.isLibComplete() && hasGLES2Impl;
                     }
                     eglLookupHelper = eglFactory.getGLDynamicLookupHelper(1);
                     if(null!=eglLookupHelper) {
-                        hasGLES1Impl = eglLookupHelper.isLibComplete();
+                        hasGLES1Impl = eglLookupHelper.isLibComplete() && hasGLES1Impl;
                     }
                 }
             } catch (LinkageError le) {
@@ -1263,24 +1286,22 @@ public class GLProfile {
             }
         }
 
-        boolean addedAnyProfile = initProfilesForDevice(defaultDesktopDevice) ||
-                                  initProfilesForDevice(defaultEGLDevice);
-        
+        final boolean addedDesktopProfile = initProfilesForDevice(defaultDesktopDevice);
+        final boolean addedEGLProfile = initProfilesForDevice(defaultEGLDevice);
+        final boolean addedAnyProfile = addedDesktopProfile || addedEGLProfile ;
+
         if(DEBUG) {
+            System.err.println("GLProfile.init addedAnyProfile(d/e) "+addedAnyProfile+" ("+addedDesktopProfile+"/"+addedEGLProfile+")");
             System.err.println("GLProfile.init isAWTAvailable       "+isAWTAvailable);
-            System.err.println("GLProfile.init has desktopFactory   "+(null!=desktopFactory));
-            System.err.println("GLProfile.init hasDesktopGL         "+hasDesktopGL);
+            System.err.println("GLProfile.init hasDesktopGLFactory  "+hasDesktopGLFactory);
             System.err.println("GLProfile.init hasGL234Impl         "+hasGL234Impl);
-            System.err.println("GLProfile.init has eglFactory       "+(null!=eglFactory));
+            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 defaultDesktopDevice "+defaultDesktopDevice);
             System.err.println("GLProfile.init defaultEGLDevice     "+defaultEGLDevice);
             System.err.println("GLProfile.init defaultDevice        "+defaultDevice);
-        }
-        
-        if(!addedAnyProfile) {
-            throw new GLException("No profile available: "+array2String(GL_PROFILE_LIST_ALL)+", "+ glAvailabilityToString());
+            System.err.println("GLProfile.init: "+array2String(GL_PROFILE_LIST_ALL)+", "+ glAvailabilityToString());
         }
     }
 
@@ -1295,12 +1316,12 @@ public class GLProfile {
         GLDrawableFactory factory = GLDrawableFactory.getFactoryImpl(device);
         factory.enterThreadCriticalZone();
         try {
-            return initProfilesForDeviceImpl(device);
+            return initProfilesForDeviceCritical(device);
         } finally {
             factory.leaveThreadCriticalZone();
         }
     }
-    private static synchronized boolean initProfilesForDeviceImpl(AbstractGraphicsDevice device) {
+    private static synchronized boolean initProfilesForDeviceCritical(AbstractGraphicsDevice device) {
         boolean isSet = GLContext.getAvailableGLVersionsSet(device);
 
         if(DEBUG) {
@@ -1310,19 +1331,21 @@ public class GLProfile {
             // System.err.println(msg);
         }
         if(isSet) {
-            return null != GLProfile.getDefault(device);
+            return GLProfile.isAvailable(device, GL_DEFAULT);
         }
 
         boolean addedDesktopProfile = false;
         boolean addedEGLProfile = false;
-
-        if( hasDesktopGL && desktopFactory.getIsDeviceCompatible(device)) {
+        boolean deviceIsDesktopCompatible = false;
+        boolean deviceIsEGLCompatible = false;
+        
+        if( hasDesktopGLFactory && ( deviceIsDesktopCompatible = desktopFactory.getIsDeviceCompatible(device)) ) {
             // 1st pretend we have all Desktop and EGL profiles ..
-            computeProfileMap(device, true /* desktopCtxUndef*/, true  /* eglCtxUndef */);
+            computeProfileMap(device, true /* desktopCtxUndef*/, true  /* esCtxUndef */);
 
             // Triggers eager initialization of share context in GLDrawableFactory for the device,
             // hence querying all available GLProfiles
-            boolean desktopSharedCtxAvail = desktopFactory.getIsSharedContextAvailable(device);
+            boolean desktopSharedCtxAvail = desktopFactory.getWasSharedContextCreated(device);
             if (DEBUG) {
                 System.err.println("GLProfile.initProfilesForDevice: "+device+": desktop Shared Ctx "+desktopSharedCtxAvail);
             }
@@ -1333,14 +1356,15 @@ public class GLProfile {
                                                 2, GLContext.CTX_PROFILE_COMPAT,
                                                 1, 5, GLContext.CTX_PROFILE_COMPAT|GLContext.CTX_OPTION_ANY);
             }
-            addedDesktopProfile = computeProfileMap(device, false /* desktopCtxUndef*/, false /* eglCtxUndef */);
-        } else if( null!=eglFactory && ( hasGLES2Impl || hasGLES1Impl ) && eglFactory.getIsDeviceCompatible(device)) {
+            addedDesktopProfile = computeProfileMap(device, false /* desktopCtxUndef*/, false /* esCtxUndef */);
+        } else if( hasEGLFactory && ( hasGLES2Impl || hasGLES1Impl ) && 
+                   ( deviceIsEGLCompatible = eglFactory.getIsDeviceCompatible(device)) ) {
             // 1st pretend we have all EGL profiles ..
-            computeProfileMap(device, false /* desktopCtxUndef*/, true /* eglCtxUndef */);
+            computeProfileMap(device, false /* desktopCtxUndef*/, true /* esCtxUndef */);
 
             // Triggers eager initialization of share context in GLDrawableFactory for the device,
             // hence querying all available GLProfiles
-            boolean eglSharedCtxAvail = eglFactory.getIsSharedContextAvailable(device);
+            boolean eglSharedCtxAvail = eglFactory.getWasSharedContextCreated(device);
             if (DEBUG) {
                 System.err.println("GLProfile.initProfilesForDevice: "+device+": egl Shared Ctx "+eglSharedCtxAvail);
             }
@@ -1358,11 +1382,17 @@ public class GLProfile {
                                                 1, GLContext.CTX_PROFILE_ES,
                                                 1, 0, GLContext.CTX_PROFILE_ES|GLContext.CTX_OPTION_ANY);
             }
-            addedEGLProfile = computeProfileMap(device, false /* desktopCtxUndef*/, false /* eglCtxUndef */);
+            addedEGLProfile = computeProfileMap(device, false /* desktopCtxUndef*/, false /* esCtxUndef */);
         } else {
-            setProfileMap(device, new HashMap()); // empty
+            setProfileMap(device, new HashMap<String /*GLProfile_name*/, GLProfile>()); // empty
             if(DEBUG) {
-                System.err.println("GLProfile: EGLFactory - Device is not available: "+device);
+                System.err.println("GLProfile: device could not be initialized: "+device);
+                System.err.println("GLProfile: compatible w/ desktop: "+deviceIsDesktopCompatible+
+                                            ", egl "+deviceIsEGLCompatible);
+                System.err.println("GLProfile: desktoplFactory      "+desktopFactory);
+                System.err.println("GLProfile: eglFactory           "+eglFactory);
+                System.err.println("GLProfile: hasGLES1Impl         "+hasGLES1Impl);
+                System.err.println("GLProfile: hasGLES2Impl         "+hasGLES2Impl);
             }
         }
 
@@ -1375,13 +1405,13 @@ public class GLProfile {
             System.err.println("GLProfile.initProfilesForDevice: "+device.getConnection()+": "+glAvailabilityToString(device));
             if(addedDesktopProfile) {
                 dumpGLInfo(desktopFactory, device);
-                List/*<GLCapabilitiesImmutable>*/ availCaps = desktopFactory.getAvailableCapabilities(device);
+                List<GLCapabilitiesImmutable> availCaps = desktopFactory.getAvailableCapabilities(device);
                 for(int i=0; i<availCaps.size(); i++) {
                     System.err.println(availCaps.get(i));
                 }
             } else if(addedEGLProfile) {
                 dumpGLInfo(eglFactory, device);
-                List/*<GLCapabilitiesImmutable>*/ availCaps = eglFactory.getAvailableCapabilities(device);
+                List<GLCapabilitiesImmutable> availCaps = eglFactory.getAvailableCapabilities(device);
                 for(int i=0; i<availCaps.size(); i++) {
                     System.err.println(availCaps.get(i));
                 }
@@ -1453,15 +1483,15 @@ public class GLProfile {
         sb.append("]");
     }
 
-    private static boolean computeProfileMap(AbstractGraphicsDevice device, boolean desktopCtxUndef, boolean eglCtxUndef) {
+    private static boolean computeProfileMap(AbstractGraphicsDevice device, boolean desktopCtxUndef, boolean esCtxUndef) {
         if (DEBUG) {
-            System.err.println("GLProfile.init map "+device.getConnection()+", desktopCtxUndef "+desktopCtxUndef+", eglCtxUndef "+eglCtxUndef);
+            System.err.println("GLProfile.init map "+device.getConnection()+", desktopCtxUndef "+desktopCtxUndef+", esCtxUndef "+esCtxUndef);
         }
         GLProfile defaultGLProfile = null;
-        HashMap/*<String, GLProfile>*/ _mappedProfiles = new HashMap(GL_PROFILE_LIST_ALL.length + 1 /* default */);
+        HashMap<String, GLProfile> _mappedProfiles = new HashMap<String, GLProfile>(GL_PROFILE_LIST_ALL.length + 1 /* default */);
         for(int i=0; i<GL_PROFILE_LIST_ALL.length; i++) {
             String profile = GL_PROFILE_LIST_ALL[i];
-            String profileImpl = computeProfileImpl(device, profile, desktopCtxUndef, eglCtxUndef);
+            String profileImpl = computeProfileImpl(device, profile, desktopCtxUndef, esCtxUndef);
             if(null!=profileImpl) {
                 GLProfile glProfile = new GLProfile(profile, profileImpl);
                 _mappedProfiles.put(profile, glProfile);
@@ -1490,45 +1520,49 @@ public class GLProfile {
     /**
      * Returns the profile implementation
      */
-    private static String computeProfileImpl(AbstractGraphicsDevice device, String profile, boolean desktopCtxUndef, boolean eglCtxUndef) {
+    private static String computeProfileImpl(AbstractGraphicsDevice device, String profile, boolean desktopCtxUndef, boolean esCtxUndef) {
         if (GL2ES1.equals(profile)) {
             if(hasGL234Impl) {
-                if(desktopCtxUndef || GLContext.isGL2Available(device)) {
-                    return GL2;
+                if(GLContext.isGL4bcAvailable(device)) {
+                    return GL4bc;
                 } else if(GLContext.isGL3bcAvailable(device)) {
                     return GL3bc;
-                } else if(GLContext.isGL4bcAvailable(device)) {
-                    return GL4bc;
+                } else if(desktopCtxUndef || GLContext.isGL2Available(device)) {
+                    return GL2;
                 }
             }
-            if(hasGLES1Impl && ( eglCtxUndef || GLContext.isGLES1Available(device))) {
+            if(hasGLES1Impl && ( esCtxUndef || GLContext.isGLES1Available(device))) {
                 return GLES1;
             }
         } else if (GL2ES2.equals(profile)) {
             if(hasGL234Impl) {
-                if(desktopCtxUndef || GLContext.isGL2Available(device)) {
-                    return GL2;
-                } else if(GLContext.isGL3Available(device)) {
-                    return GL3;
+                if(GLContext.isGL4bcAvailable(device)) {
+                    return GL4bc;
                 } else if(GLContext.isGL4Available(device)) {
                     return GL4;
+                } else if(GLContext.isGL3bcAvailable(device)) {
+                    return GL3bc;
+                } else if(GLContext.isGL3Available(device)) {
+                    return GL3;
+                } else if(desktopCtxUndef || GLContext.isGL2Available(device)) {
+                    return GL2;
                 }
             }
-            if(hasGLES2Impl && ( eglCtxUndef || GLContext.isGLES2Available(device))) {
+            if(hasGLES2Impl && ( esCtxUndef || GLContext.isGLES2Available(device))) {
                 return GLES2;
             }
         } else if(GL2GL3.equals(profile)) {
             if(hasGL234Impl) {
-                if(desktopCtxUndef || GLContext.isGL2Available(device)) {
-                    return GL2;
+                if(GLContext.isGL4bcAvailable(device)) {
+                    return GL4bc;
+                } else if(GLContext.isGL4Available(device)) {
+                    return GL4;
                 } else if(GLContext.isGL3bcAvailable(device)) {
                     return GL3bc;
-                } else if(GLContext.isGL4bcAvailable(device)) {
-                    return GL4bc;
                 } else if(GLContext.isGL3Available(device)) {
                     return GL3;
-                } else if(GLContext.isGL4Available(device)) {
-                    return GL4;
+                } else if(desktopCtxUndef || GLContext.isGL2Available(device)) {
+                    return GL2;
                 }
             }
         } else if(GL4bc.equals(profile) && hasGL234Impl && ( desktopCtxUndef || GLContext.isGL4bcAvailable(device))) {
@@ -1541,9 +1575,9 @@ public class GLProfile {
             return GL3;
         } else if(GL2.equals(profile) && hasGL234Impl && ( desktopCtxUndef || GLContext.isGL2Available(device))) {
             return GL2;
-        } else if(GLES2.equals(profile) && hasGLES2Impl && ( eglCtxUndef || GLContext.isGLES2Available(device))) {
+        } else if(GLES2.equals(profile) && hasGLES2Impl && ( esCtxUndef || GLContext.isGLES2Available(device))) {
             return GLES2;
-        } else if(GLES1.equals(profile) && hasGLES1Impl && ( eglCtxUndef || GLContext.isGLES1Available(device))) {
+        } else if(GLES1.equals(profile) && hasGLES1Impl && ( esCtxUndef || GLContext.isGLES1Available(device))) {
             return GLES1;
         }
         return null;
@@ -1565,7 +1599,8 @@ public class GLProfile {
         }
     }
 
-    private static /*final*/ HashMap/*<device_connection, HashMap<GL-String, GLProfile>*/ deviceConn2ProfileMap = new HashMap();
+    private static /*final*/ HashMap<String /*device_connection*/, HashMap<String /*GLProfile_name*/, GLProfile>> deviceConn2ProfileMap = 
+                new HashMap<String /*device_connection*/, HashMap<String /*GLProfile_name*/, GLProfile>>();
 
     /**
      * This implementation support lazy initialization, while avoiding recursion/deadlocks.<br>
@@ -1574,17 +1609,20 @@ public class GLProfile {
      *  - initialization<br<
      *
      * @param device the key 'device -> GLProfiles-Map'
-     * @return the GLProfile HashMap
+     * @return the GLProfile HashMap if exists, otherwise null 
+     * @throws GLException if no profile for the given device is available.
      */
-    private static HashMap getProfileMap(AbstractGraphicsDevice device) {
+    private static HashMap<String /*GLProfile_name*/, GLProfile> getProfileMap(AbstractGraphicsDevice device) throws GLException {
         validateInitialization();
         if(null==device) {
             device = defaultDevice;
         }
         String deviceKey = device.getUniqueID();
-        HashMap map = (HashMap) deviceConn2ProfileMap.get(deviceKey);
-        if(null==map) {
-            initProfilesForDevice(device);
+        HashMap<String /*GLProfile_name*/, GLProfile> map = deviceConn2ProfileMap.get(deviceKey);
+        if( null == map ) {
+            if( !initProfilesForDevice(device) ) {
+                throw new GLException("No Profile available for "+device);
+            }
             if( null == deviceConn2ProfileMap.get(deviceKey) ) {
                 throw new InternalError("initProfilesForDevice(..) didn't issue setProfileMap(..) on "+device);
             }
@@ -1592,7 +1630,7 @@ public class GLProfile {
         return map;
     }
 
-    private static void setProfileMap(AbstractGraphicsDevice device, HashMap/*<GL-String, GLProfile>*/mappedProfiles) {
+    private static void setProfileMap(AbstractGraphicsDevice device, HashMap<String /*GLProfile_name*/, GLProfile> mappedProfiles) {
         validateInitialization();
         synchronized ( deviceConn2ProfileMap ) {
             deviceConn2ProfileMap.put(device.getUniqueID(), mappedProfiles);
diff --git a/src/jogl/classes/javax/media/opengl/GLRunnable.java b/src/jogl/classes/javax/media/opengl/GLRunnable.java
index de0f5df..cbd086c 100644
--- a/src/jogl/classes/javax/media/opengl/GLRunnable.java
+++ b/src/jogl/classes/javax/media/opengl/GLRunnable.java
@@ -41,7 +41,11 @@ public interface GLRunnable {
     /**
      * Called by the drawable to initiate one-shot OpenGL commands by the
      * client, like {@link GLEventListener#display(GLAutoDrawable)}.
+     * 
+     * @param drawable the associated drawable the implementation shall use
+     * @return false if impl invalidates the back buffers, hence {@link GLAutoDrawable#display()} will 
+     *         issue another {@link GLEventListener#display(GLAutoDrawable)} call. Otherwise true.
      */
-    void run(GLAutoDrawable drawable);
+    boolean run(GLAutoDrawable drawable);
 }
 
diff --git a/src/jogl/classes/javax/media/opengl/GLUniformData.java b/src/jogl/classes/javax/media/opengl/GLUniformData.java
index 9b0d5f1..5c9388b 100644
--- a/src/jogl/classes/javax/media/opengl/GLUniformData.java
+++ b/src/jogl/classes/javax/media/opengl/GLUniformData.java
@@ -59,10 +59,10 @@ public class GLUniformData {
         init(name, rows, columns, data);
     }
 
-    public void setData(int data) { init(new Integer(data)); }
-    public void setData(float data) { init(new Float(data)); }
-    public void setData(IntBuffer data) { init(data); }
-    public void setData(FloatBuffer data) { init(data); }
+    public GLUniformData setData(int data) { init(new Integer(data)); return this; }
+    public GLUniformData setData(float data) { init(new Float(data)); return this; }
+    public GLUniformData setData(IntBuffer data) { init(data); return this; }
+    public GLUniformData setData(FloatBuffer data) { init(data); return this; }
 
     public int       intValue()   { return ((Integer)data).intValue(); };
     public float     floatValue() { return ((Float)data).floatValue(); };
@@ -105,8 +105,8 @@ public class GLUniformData {
 
     private void init(Object data) {
         if(data instanceof Buffer) {
-            int sz = rows*columns;
-            Buffer buffer = (Buffer)data;
+            final int sz = rows*columns;
+            final Buffer buffer = (Buffer)data;
             if(buffer.limit()<sz || 0!=buffer.limit()%sz) {
                 throw new GLException("data buffer size invalid: new buffer limit: "+buffer.limit()+"\n\t"+this);
             }
@@ -127,7 +127,7 @@ public class GLUniformData {
     /**
      * Sets the determined location of the shader uniform.
      */
-    public void setLocation(int location) { this.location=location; }
+    public GLUniformData setLocation(int location) { this.location=location; return this; }
 
     public Object getObject() {
         return data;
diff --git a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java
index 086a173..48c1c54 100644
--- a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java
+++ b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java
@@ -86,11 +86,11 @@ import javax.media.opengl.GLProfile;
 import javax.media.opengl.GLRunnable;
 import javax.media.opengl.Threading;
 
-import com.jogamp.nativewindow.NativeWindowVersion;
 import com.jogamp.common.GlueGenVersion;
 import com.jogamp.common.util.VersionUtil;
 import com.jogamp.opengl.JoglVersion;
 
+import com.jogamp.common.util.locks.LockFactory;
 import com.jogamp.common.util.locks.RecursiveLock;
 import jogamp.opengl.Debug;
 import jogamp.opengl.GLContextImpl;
@@ -135,6 +135,7 @@ import jogamp.opengl.ThreadingImpl;
  * </ul>
  */
 
+ at SuppressWarnings("serial")
 public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosingProtocol {
 
   private static final boolean DEBUG;
@@ -152,7 +153,8 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
   // copy of the cstr args, mainly for recreation
   private GLCapabilitiesImmutable capsReqUser;
   private GLCapabilitiesChooser chooser;
-  private GLContext shareWith;  
+  private GLContext shareWith;
+  private int additionalCtxCreationFlags = 0;  
   private GraphicsDevice device;
 
   private AWTWindowClosingProtocol awtWindowClosingProtocol =
@@ -164,17 +166,20 @@ 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. */
-  public GLCanvas() {
+      mechanism, on the default screen device. 
+   * @throws GLException if no default profile is available for the default desktop device.
+   */
+  public GLCanvas() throws GLException {
     this(null);
   }
 
   /** Creates a new GLCanvas component with the requested set of
       OpenGL capabilities, using the default OpenGL capabilities
       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)
    */
-  public GLCanvas(GLCapabilitiesImmutable capsReqUser) {
+  public GLCanvas(GLCapabilitiesImmutable capsReqUser) throws GLException {
     this(capsReqUser, null, null, null);
   }
 
@@ -183,9 +188,12 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
       selection mechanism, on the default screen device.
    *  This constructor variant also supports using a shared GLContext.
    *
+   * @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) {
+  public GLCanvas(GLCapabilitiesImmutable capsReqUser, GLContext shareWith) 
+          throws GLException 
+  {
     this(capsReqUser, null, shareWith, null);
   }
 
@@ -203,11 +211,15 @@ 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) {
+                  GraphicsDevice device) 
+      throws GLException 
+  {
     /*
      * Determination of the native window is made in 'super.addNotify()',
      * which creates the native peer using AWT's GraphicsConfiguration.
@@ -488,7 +500,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
     }
   }
 
-  RecursiveLock drawableSync = new RecursiveLock();
+  RecursiveLock drawableSync = LockFactory.createRecursiveLock();
 
   /** Overridden to track when this component is added to a container.
       Subclasses which override this method must call
@@ -497,6 +509,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
 
       <B>Overrides:</B>
       <DL><DD><CODE>addNotify</CODE> in class <CODE>java.awt.Component</CODE></DD></DL> */
+    @SuppressWarnings("deprecation")
     @Override
   public void addNotify() {
     if(DEBUG) {
@@ -525,6 +538,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
                            .createGLDrawable(NativeWindowFactory.getNativeWindow(this, awtConfig));
             context = (GLContextImpl) drawable.createContext(shareWith);
             context.setSynchronized(true);
+            context.setContextCreationFlags(additionalCtxCreationFlags);            
         }
 
         // before native peer is valid: X11
@@ -582,6 +596,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
       about this.</p>
       <B>Overrides:</B>
       <DL><DD><CODE>removeNotify</CODE> in class <CODE>java.awt.Component</CODE></DD></DL> */
+    @SuppressWarnings("deprecation")
     @Override
   public void removeNotify() {
     if(DEBUG) {
@@ -617,6 +632,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
 
       <B>Overrides:</B>
       <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) {
     super.reshape(x, y, width, height);
@@ -660,6 +676,9 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
 
   public void setContext(GLContext ctx) {
     context=(GLContextImpl)ctx;
+    if(null != context) {
+        context.setContextCreationFlags(additionalCtxCreationFlags);
+    }
   }
 
   public GLContext getContext() {
@@ -696,6 +715,14 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
     maybeDoSingleThreadedWorkaround(swapBuffersOnEventDispatchThreadAction, swapBuffersAction);
   }
 
+  public void setContextCreationFlags(int flags) {
+    additionalCtxCreationFlags = flags;
+  }
+      
+  public int getContextCreationFlags() {
+    return additionalCtxCreationFlags;                
+  }
+          
   public GLProfile getGLProfile() {
     return capsReqUser.getGLProfile();
   }
@@ -710,7 +737,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
 
   public GLCapabilitiesImmutable getRequestedGLCapabilities() {
     if (awtConfig == null) {
-        throw new GLException("No AWTGraphicsConfiguration: "+this);
+        return capsReqUser;
     }
 
     return (GLCapabilitiesImmutable)awtConfig.getRequestedCapabilities();
@@ -745,12 +772,15 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
 
   @Override
   public String toString() {
+    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\tRealized "+isRealized()+
                           ",\n\tFactory   "+getFactory()+
                           ",\n\thandle    0x"+Long.toHexString(getHandle())+
-                          ",\n\tDrawable size "+drawable.getWidth()+"x"+drawable.getHeight()+
+                          ",\n\tDrawable size "+dw+"x"+dh+
                           ",\n\tAWT pos "+getX()+"/"+getY()+", size "+getWidth()+"x"+getHeight()+
                           ",\n\tvisible "+isVisible()+
                           ",\n\t"+awtConfig+"]";
@@ -910,10 +940,10 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
   private void disableBackgroundErase() {
     if (!disableBackgroundEraseInitialized) {
       try {
-        AccessController.doPrivileged(new PrivilegedAction() {
+        AccessController.doPrivileged(new PrivilegedAction<Object>() {
             public Object run() {
               try {
-                Class clazz = getToolkit().getClass();
+                Class<?> clazz = getToolkit().getClass();
                 while (clazz != null && disableBackgroundEraseMethod == null) {
                   try {
                     disableBackgroundEraseMethod =
@@ -981,7 +1011,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
                                                                                                              chooser, aScreen);
     } else {
         try {
-            final ArrayList bucket = new ArrayList(1);
+            final ArrayList<AWTGraphicsConfiguration> bucket = new ArrayList<AWTGraphicsConfiguration>(1);
             EventQueue.invokeAndWait(new Runnable() {
                 public void run() {
                     AWTGraphicsConfiguration c = (AWTGraphicsConfiguration)
@@ -991,7 +1021,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
                     bucket.add(c);
                 }
             });
-            config = ( bucket.size() > 0 ) ? (AWTGraphicsConfiguration)bucket.get(0) : null ;
+            config = ( bucket.size() > 0 ) ? bucket.get(0) : null ;
         } catch (InvocationTargetException e) {
             throw new GLException(e.getTargetException());
         } catch (InterruptedException e) {
@@ -1012,11 +1042,12 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
   public static void main(String args[]) {
     System.err.println(VersionUtil.getPlatformInfo());
     System.err.println(GlueGenVersion.getInstance());
-    System.err.println(NativeWindowVersion.getInstance());
+    // System.err.println(NativeWindowVersion.getInstance());
     System.err.println(JoglVersion.getInstance());
 
+    GLProfile.initSingleton(false);
     GLDrawableFactory factory = GLDrawableFactory.getDesktopFactory();
-    List/*<GLCapabilitiesImmutable>*/ availCaps = factory.getAvailableCapabilities(null);
+    List<GLCapabilitiesImmutable> availCaps = factory.getAvailableCapabilities(null);
     for(int i=0; i<availCaps.size(); i++) {
         System.err.println(availCaps.get(i));
     }
diff --git a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
index d58ad03..92be62b 100644
--- a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
+++ b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
@@ -136,6 +136,8 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
   private GLDrawableFactoryImpl factory;
   private GLCapabilitiesChooser chooser;
   private GLContext             shareWith;
+  private int additionalCtxCreationFlags = 0;
+  
   // Width of the actual GLJPanel
   private int panelWidth   = 0;
   private int panelHeight  = 0;
@@ -197,15 +199,19 @@ 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. */
-  public GLJPanel() {
+      mechanism. 
+   * @throws GLException if no default profile is available for the default desktop device.
+   */
+  public GLJPanel() throws GLException {
     this(null);
   }
 
   /** Creates a new GLJPanel component with the requested set of
       OpenGL capabilities, using the default OpenGL capabilities
-      selection mechanism. */
-  public GLJPanel(GLCapabilitiesImmutable userCapsRequest) {
+      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 {
     this(userCapsRequest, null, null);
   }
 
@@ -222,8 +228,11 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
       <P>
       Note: Sharing cannot be enabled using J2D OpenGL FBO sharing,
       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) {
+  public GLJPanel(GLCapabilitiesImmutable userCapsRequest, GLCapabilitiesChooser chooser, GLContext shareWith) 
+          throws GLException 
+  {
     super();
 
     // Works around problems on many vendors' cards; we don't need a
@@ -233,7 +242,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
         if (userCapsRequest != null) {
             caps = (GLCapabilities) userCapsRequest.cloneMutable();
         } else {
-            caps = new GLCapabilities(null);
+            caps = new GLCapabilities(GLProfile.getDefault(GLProfile.getDefaultDesktopDevice()));
         }
         caps.setDoubleBuffered(false);
         offscreenCaps = caps;
@@ -271,8 +280,6 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
       if(null!=animator) {
         if(regenerate) {
             animatorPaused = animator.pause();
-        } else {
-            animator.remove(this);
         }
       }
 
@@ -488,6 +495,9 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
     if (backend == null) {
       return;
     }
+    if(null != ctx) {
+        ctx.setContextCreationFlags(additionalCtxCreationFlags);
+    }
     backend.setContext(ctx);
   }
 
@@ -531,7 +541,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
     // Swing portion of the GLJPanel in any of the rendering paths.
     return true;
   }
-
+  
   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
@@ -540,6 +550,14 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
     // Swing portion of the GLJPanel in any of the rendering paths.
   }
 
+  public void setContextCreationFlags(int flags) {
+    additionalCtxCreationFlags = flags;
+  }
+      
+  public int getContextCreationFlags() {
+    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
@@ -1023,6 +1041,8 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
                                                 Math.max(1, panelHeight));
       offscreenContext = (GLContextImpl) offscreenDrawable.createContext(shareWith);
       offscreenContext.setSynchronized(true);
+      offscreenContext.setContextCreationFlags(additionalCtxCreationFlags);
+      
       isInitialized = true;
     }
 
@@ -1108,6 +1128,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
                                           pbufferWidth,
                                           pbufferHeight,
                                           shareWith);
+        pbuffer.setContextCreationFlags(additionalCtxCreationFlags);        
         pbuffer.addGLEventListener(updater);
         isInitialized = true;
       } catch (GLException e) {
diff --git a/src/jogl/classes/javax/media/opengl/fixedfunc/GLLightingFunc.java b/src/jogl/classes/javax/media/opengl/fixedfunc/GLLightingFunc.java
index 5563ea9..001f4f0 100644
--- a/src/jogl/classes/javax/media/opengl/fixedfunc/GLLightingFunc.java
+++ b/src/jogl/classes/javax/media/opengl/fixedfunc/GLLightingFunc.java
@@ -1,13 +1,34 @@
 /*
  * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
+ * 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 javax.media.opengl.fixedfunc;
 
-import java.nio.*;
-
-import javax.media.opengl.*;
-
 public interface GLLightingFunc {
   public static final int GL_LIGHT0 = 0x4000;
   public static final int GL_LIGHT1 = 0x4001;
diff --git a/src/jogl/classes/javax/media/opengl/fixedfunc/GLMatrixFunc.java b/src/jogl/classes/javax/media/opengl/fixedfunc/GLMatrixFunc.java
index b899f3c..a34d490 100644
--- a/src/jogl/classes/javax/media/opengl/fixedfunc/GLMatrixFunc.java
+++ b/src/jogl/classes/javax/media/opengl/fixedfunc/GLMatrixFunc.java
@@ -1,5 +1,30 @@
 /*
  * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
+ * 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 javax.media.opengl.fixedfunc;
diff --git a/src/jogl/classes/javax/media/opengl/fixedfunc/GLPointerFunc.java b/src/jogl/classes/javax/media/opengl/fixedfunc/GLPointerFunc.java
index ed7bef5..786835f 100644
--- a/src/jogl/classes/javax/media/opengl/fixedfunc/GLPointerFunc.java
+++ b/src/jogl/classes/javax/media/opengl/fixedfunc/GLPointerFunc.java
@@ -1,11 +1,34 @@
 /*
  * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
+ * 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 javax.media.opengl.fixedfunc;
 
-import java.nio.*;
-
 import javax.media.opengl.*;
 
 public interface GLPointerFunc { 
diff --git a/src/jogl/classes/javax/media/opengl/fixedfunc/GLPointerFuncUtil.java b/src/jogl/classes/javax/media/opengl/fixedfunc/GLPointerFuncUtil.java
new file mode 100644
index 0000000..e52154c
--- /dev/null
+++ b/src/jogl/classes/javax/media/opengl/fixedfunc/GLPointerFuncUtil.java
@@ -0,0 +1,55 @@
+/*
+ * 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 javax.media.opengl.fixedfunc;
+
+public class GLPointerFuncUtil { 
+    public static final String mgl_Vertex = "mgl_Vertex";
+    public static final String mgl_Normal = "mgl_Normal";
+    public static final String mgl_Color = "mgl_Color";
+    public static final String mgl_MultiTexCoord = "mgl_MultiTexCoord" ;
+    public static final String mgl_InterleaveArray = "mgl_InterleaveArray" ; // magic name for interleaved arrays w/ sub-arrays
+
+    /**
+     * @param glArrayIndex the fixed function array index
+     * @return default fixed function array name 
+     */
+    public static String getPredefinedArrayIndexName(int glArrayIndex) {
+        switch(glArrayIndex) {
+            case GLPointerFunc.GL_VERTEX_ARRAY:
+                return mgl_Vertex;
+            case GLPointerFunc.GL_NORMAL_ARRAY:
+                return mgl_Normal;
+            case GLPointerFunc.GL_COLOR_ARRAY:
+                return mgl_Color;
+            case GLPointerFunc.GL_TEXTURE_COORD_ARRAY:
+                return mgl_MultiTexCoord;
+        }
+        return null;
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/RegionFactory.java b/src/jogl/classes/jogamp/graph/curve/opengl/RegionFactory.java
new file mode 100755
index 0000000..e73b0cb
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/RegionFactory.java
@@ -0,0 +1,74 @@
+/**
+ * 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.graph.curve.opengl;
+
+import com.jogamp.graph.curve.Region;
+import com.jogamp.graph.curve.opengl.GLRegion;
+
+/** RegionFactory to create a Context specific Region implementation. 
+ *  
+ * @see GLRegion
+ */
+public class RegionFactory {
+    
+    /**
+     * Create a Region using the passed render mode
+     * 
+     * <p> In case {@link Region#VBAA_RENDERING_BIT} is being requested the default texture unit
+     * {@link Region#TWO_PASS_DEFAULT_TEXTURE_UNIT} is being used.</p>
+     * 
+     * @param rs the RenderState to be used
+     * @param renderModes bit-field of modes, e.g. {@link Region#VARIABLE_CURVE_WEIGHT_BIT}, {@link Region#VBAA_RENDERING_BIT} 
+     */
+    public static GLRegion create(int renderModes) {
+        if( 0 != ( Region.VBAA_RENDERING_BIT & renderModes ) ){
+            return new VBORegion2PES2(renderModes, Region.TWO_PASS_DEFAULT_TEXTURE_UNIT);
+        }
+        else{
+            return new VBORegionSPES2(renderModes);
+        }
+    }
+        
+    /** Create a Single Pass Region using the passed render mode
+     * @param renderModes bit-field of modes, e.g. {@link Region#VARIABLE_CURVE_WEIGHT_BIT}, 
+     * {@link Region#VBAA_RENDERING_BIT}
+     * @return
+     */
+    public static GLRegion createSinglePass(int renderModes) {
+        return new VBORegionSPES2(renderModes);
+    }
+    
+    /** Create a Two Pass (VBAA) Region using the passed render mode
+     * @param renderModes bit-field of modes, e.g. {@link Region#VARIABLE_CURVE_WEIGHT_BIT}, 
+     * {@link Region#VBAA_RENDERING_BIT}
+     * @return
+     */
+    public static GLRegion createTwoPass(int renderModes, int textureUnit) {
+        return new VBORegion2PES2(renderModes, textureUnit);
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/RegionRendererImpl01.java b/src/jogl/classes/jogamp/graph/curve/opengl/RegionRendererImpl01.java
new file mode 100755
index 0000000..0217a63
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/RegionRendererImpl01.java
@@ -0,0 +1,93 @@
+/**
+ * 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.graph.curve.opengl;
+
+import javax.media.opengl.GL2ES2;
+import javax.media.opengl.GLException;
+
+import jogamp.graph.curve.opengl.shader.AttributeNames;
+
+import com.jogamp.graph.curve.Region;
+import com.jogamp.graph.curve.opengl.GLRegion;
+import com.jogamp.graph.curve.opengl.RegionRenderer;
+import com.jogamp.graph.curve.opengl.RenderState;
+import com.jogamp.opengl.util.glsl.ShaderCode;
+import com.jogamp.opengl.util.glsl.ShaderProgram;
+import com.jogamp.opengl.util.glsl.ShaderState;
+
+public class RegionRendererImpl01 extends RegionRenderer {
+    public RegionRendererImpl01(RenderState rs, int renderModes) {
+        super(rs, renderModes);
+        
+    }
+    
+    @Override
+    protected String getFragmentShaderName(GL2ES2 gl) {
+        final String type = Region.isNonUniformWeight(renderModes) ? "02" : "01" ;
+        final String pass = Region.isVBAA(renderModes) ? "b" : "a" ;
+        return "curverenderer" + type + pass + getShaderGLVersionSuffix(gl);
+    }
+    
+    protected boolean initShaderProgram(GL2ES2 gl) {
+        final ShaderState st = rs.getShaderState();
+        
+        ShaderCode rsVp = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, 1, RegionRendererImpl01.class,
+                "shader", "shader/bin", getVertexShaderName(gl));
+        ShaderCode rsFp = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, 1, RegionRendererImpl01.class,
+                "shader", "shader/bin", getFragmentShaderName(gl));
+    
+        ShaderProgram sp = new ShaderProgram();
+        sp.add(rsVp);
+        sp.add(rsFp);
+
+        sp.init(gl);
+        st.attachShaderProgram(gl, sp);        
+        st.bindAttribLocation(gl, AttributeNames.VERTEX_ATTR_IDX, AttributeNames.VERTEX_ATTR_NAME);
+        st.bindAttribLocation(gl, AttributeNames.TEXCOORD_ATTR_IDX, AttributeNames.TEXCOORD_ATTR_NAME);        
+        
+        if(!sp.link(gl, System.err)) {
+            throw new GLException("RegionRenderer: Couldn't link program: "+sp);
+        }    
+        st.useProgram(gl, true);
+    
+        if(DEBUG) {
+            System.err.println("RegionRendererImpl01 initialized: " + Thread.currentThread()+" "+st);
+        }
+        return true;
+    }
+
+    @Override
+    protected void destroyImpl(GL2ES2 gl) {
+        super.destroyImpl(gl);
+    }
+
+    @Override
+    protected void drawImpl(GL2ES2 gl, Region region, float[] position, int texSize) {
+        ((GLRegion)region).draw(gl, rs, vp_width, vp_height, texSize);
+    }    
+}
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/RenderStateImpl.java b/src/jogl/classes/jogamp/graph/curve/opengl/RenderStateImpl.java
new file mode 100644
index 0000000..51356ca
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/RenderStateImpl.java
@@ -0,0 +1,74 @@
+/**
+ * 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.graph.curve.opengl;
+
+import java.nio.FloatBuffer;
+
+import javax.media.opengl.GLUniformData;
+
+import jogamp.graph.curve.opengl.shader.UniformNames;
+
+import com.jogamp.graph.curve.opengl.RenderState;
+import com.jogamp.graph.geom.Vertex;
+import com.jogamp.opengl.util.PMVMatrix;
+import com.jogamp.opengl.util.glsl.ShaderState;
+
+public class RenderStateImpl extends RenderState {    
+    /**
+     * weight is equivalent to the 
+     * global off-curve vertex weight.
+     * TODO: change to per vertex
+     */
+    private final GLUniformData gcu_Weight;
+    private final GLUniformData gcu_Alpha;
+    private final GLUniformData gcu_ColorStatic;
+
+    public RenderStateImpl(ShaderState st, Vertex.Factory<? extends Vertex> pointFactory, PMVMatrix pmvMatrix) {
+        super(st, pointFactory, pmvMatrix);
+        
+        gcu_Weight = new GLUniformData(UniformNames.gcu_Weight, 1.0f);
+        st.ownUniform(gcu_PMVMatrix);
+        gcu_Alpha = new GLUniformData(UniformNames.gcu_Alpha, 1.0f);
+        st.ownUniform(gcu_Alpha);
+        gcu_ColorStatic = new GLUniformData(UniformNames.gcu_ColorStatic, 3, FloatBuffer.allocate(3));
+        st.ownUniform(gcu_ColorStatic);
+//        gcu_Strength = new GLUniformData(UniformNames.gcu_Strength, 3.0f);
+//        st.ownUniform(gcu_Strength);
+    }
+    
+    public RenderStateImpl(ShaderState st, Vertex.Factory<? extends Vertex> pointFactory) {
+        this(st, pointFactory, new PMVMatrix());
+    }
+    
+    public final GLUniformData getWeight() { return gcu_Weight; }
+    public final GLUniformData getAlpha() { return gcu_Alpha; }
+    public final GLUniformData getColorStatic() { return gcu_ColorStatic; }
+    //public final GLUniformData getStrength() { return gcu_Strength; }
+    
+    
+}
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/TextRendererImpl01.java b/src/jogl/classes/jogamp/graph/curve/opengl/TextRendererImpl01.java
new file mode 100644
index 0000000..5ed3529
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/TextRendererImpl01.java
@@ -0,0 +1,96 @@
+/**
+ * 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.graph.curve.opengl;
+
+import javax.media.opengl.GL2ES2;
+import javax.media.opengl.GLException;
+
+import jogamp.graph.curve.opengl.shader.AttributeNames;
+import jogamp.graph.curve.text.GlyphString;
+
+import com.jogamp.graph.curve.opengl.RenderState;
+import com.jogamp.graph.curve.opengl.TextRenderer;
+import com.jogamp.graph.font.Font;
+import com.jogamp.opengl.util.glsl.ShaderCode;
+import com.jogamp.opengl.util.glsl.ShaderProgram;
+import com.jogamp.opengl.util.glsl.ShaderState;
+
+public class TextRendererImpl01 extends TextRenderer {    
+    public TextRendererImpl01(RenderState rs, int type) {
+        super(rs, type);                     
+    }
+    
+    @Override
+    protected boolean initShaderProgram(GL2ES2 gl){
+        final ShaderState st = rs.getShaderState();
+
+        ShaderCode rsVp = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, 1, TextRendererImpl01.class,
+                "shader", "shader/bin", getVertexShaderName(gl));
+        ShaderCode rsFp = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, 1, TextRendererImpl01.class,
+                "shader", "shader/bin", getFragmentShaderName(gl));
+        
+        ShaderProgram sp = new ShaderProgram();
+        sp.add(rsVp);
+        sp.add(rsFp);
+        
+        sp.init(gl);
+        st.attachShaderProgram(gl, sp);        
+        st.bindAttribLocation(gl, AttributeNames.VERTEX_ATTR_IDX, AttributeNames.VERTEX_ATTR_NAME);
+        st.bindAttribLocation(gl, AttributeNames.TEXCOORD_ATTR_IDX, AttributeNames.TEXCOORD_ATTR_NAME);        
+        
+        if(!sp.link(gl, System.err)) {
+            throw new GLException("TextRendererImpl01: Couldn't link program: "+sp);
+        }
+        st.useProgram(gl, true);
+
+        if(DEBUG) {
+            System.err.println("TextRendererImpl01 initialized: " + Thread.currentThread()+" "+st);
+        }        
+        return true;
+    }
+    
+    @Override
+    protected void destroyImpl(GL2ES2 gl) {
+        super.destroyImpl(gl);
+    }
+    
+    @Override
+    public void drawString3D(GL2ES2 gl, Font font, String str, float[] position, int fontSize, int texSize) {
+        if(!isInitialized()){
+            throw new GLException("TextRendererImpl01: not initialized!");
+        }
+        GlyphString glyphString = getCachedGlyphString(font, str, fontSize);
+        if(null == glyphString) {
+            glyphString = createString(gl, font, fontSize, str);
+            addCachedGlyphString(gl, font, str, fontSize, glyphString);
+        }
+        
+        glyphString.renderString3D(gl, rs, vp_width, vp_height, texSize);
+    }
+    
+}
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PES2.java b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PES2.java
new file mode 100644
index 0000000..758d0e9
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PES2.java
@@ -0,0 +1,328 @@
+/**
+ * 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.graph.curve.opengl;
+
+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;
+
+import jogamp.graph.curve.opengl.shader.AttributeNames;
+import jogamp.graph.curve.opengl.shader.UniformNames;
+
+import com.jogamp.common.nio.Buffers;
+import com.jogamp.graph.geom.Triangle;
+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.util.GLArrayDataServer;
+import com.jogamp.opengl.util.PMVMatrix;
+import com.jogamp.opengl.util.glsl.ShaderState;
+
+public class VBORegion2PES2  extends GLRegion {
+    private GLArrayDataServer verticeTxtAttr;
+    private GLArrayDataServer texCoordTxtAttr;
+    private GLArrayDataServer indicesTxt;
+    private GLArrayDataServer verticeFboAttr;
+    private GLArrayDataServer texCoordFboAttr;
+    private GLArrayDataServer indicesFbo;
+    
+    
+    private FBObject fbo;
+    private PMVMatrix fboPMVMatrix;
+    GLUniformData mgl_fboPMVMatrix;
+    
+    private int tex_width_c = 0;
+    private int tex_height_c = 0;
+    GLUniformData mgl_ActiveTexture; 
+    GLUniformData mgl_TextureSize; // if GLSL < 1.30
+    
+    public VBORegion2PES2(int renderModes, int textureEngine) {
+        super(renderModes);
+        fboPMVMatrix = new PMVMatrix();
+        mgl_fboPMVMatrix = new GLUniformData(UniformNames.gcu_PMVMatrix, 4, 4, fboPMVMatrix.glGetPMvMatrixf());        
+        mgl_ActiveTexture = new GLUniformData(UniformNames.gcu_TextureUnit, textureEngine);        
+    }
+    
+    public void update(GL2ES2 gl, RenderState rs) {
+        if(!isDirty()) {
+            return; 
+        }
+
+        if(null == indicesFbo) {
+            final int initialSize = 256;
+            final ShaderState st = rs.getShaderState();
+            
+            indicesFbo = GLArrayDataServer.createData(3, GL2ES2.GL_SHORT, initialSize, GL.GL_STATIC_DRAW, GL.GL_ELEMENT_ARRAY_BUFFER);                
+            indicesFbo.puts((short) 0); indicesFbo.puts((short) 1); indicesFbo.puts((short) 3);
+            indicesFbo.puts((short) 1); indicesFbo.puts((short) 2); indicesFbo.puts((short) 3);
+            indicesFbo.seal(true);
+            
+            texCoordFboAttr = GLArrayDataServer.createGLSL(AttributeNames.TEXCOORD_ATTR_NAME, 2, GL2ES2.GL_FLOAT, 
+                                                           false, initialSize, GL.GL_STATIC_DRAW);
+            st.ownAttribute(texCoordFboAttr, true);
+            texCoordFboAttr.putf(5); texCoordFboAttr.putf(5);        
+            texCoordFboAttr.putf(5); texCoordFboAttr.putf(6);        
+            texCoordFboAttr.putf(6); texCoordFboAttr.putf(6);        
+            texCoordFboAttr.putf(6); texCoordFboAttr.putf(5);        
+            texCoordFboAttr.seal(true);
+            
+            verticeFboAttr = GLArrayDataServer.createGLSL(AttributeNames.VERTEX_ATTR_NAME, 3, GL2ES2.GL_FLOAT, 
+                                                          false, initialSize, GL.GL_STATIC_DRAW); 
+            st.ownAttribute(verticeFboAttr, true);
+            
+            
+            indicesTxt = GLArrayDataServer.createData(3, GL2ES2.GL_SHORT, initialSize, GL.GL_STATIC_DRAW, GL.GL_ELEMENT_ARRAY_BUFFER);                
+            
+            verticeTxtAttr = GLArrayDataServer.createGLSL(AttributeNames.VERTEX_ATTR_NAME, 3, GL2ES2.GL_FLOAT, 
+                                                          false, initialSize, GL.GL_STATIC_DRAW);
+            st.ownAttribute(verticeTxtAttr, true);
+            
+            texCoordTxtAttr = GLArrayDataServer.createGLSL(AttributeNames.TEXCOORD_ATTR_NAME, 2, GL2ES2.GL_FLOAT, 
+                                                           false, initialSize, GL.GL_STATIC_DRAW);
+            st.ownAttribute(texCoordTxtAttr, true);
+            
+            if(DEBUG_INSTANCE) {
+                System.err.println("VBORegion2PES2 Create: " + this);
+            }                    
+        }
+        // process triangles
+        indicesTxt.seal(gl, false);
+        indicesTxt.rewind();        
+        for(int i=0; i<triangles.size(); i++) {
+            final Triangle t = triangles.get(i);
+            final Vertex[] t_vertices = t.getVertices();
+            
+            if(t_vertices[0].getId() == Integer.MAX_VALUE){
+                t_vertices[0].setId(numVertices++);
+                t_vertices[1].setId(numVertices++);
+                t_vertices[2].setId(numVertices++);
+                
+                vertices.add(t_vertices[0]);
+                vertices.add(t_vertices[1]);
+                vertices.add(t_vertices[2]);
+                
+                indicesTxt.puts((short) t_vertices[0].getId());
+                indicesTxt.puts((short) t_vertices[1].getId());
+                indicesTxt.puts((short) t_vertices[2].getId());
+            } else {
+                indicesTxt.puts((short) t_vertices[0].getId());
+                indicesTxt.puts((short) t_vertices[1].getId());
+                indicesTxt.puts((short) t_vertices[2].getId());                
+            }
+        }
+        indicesTxt.seal(gl, true);
+        indicesTxt.enableBuffer(gl, false);
+
+        // process vertices and update bbox
+        box.reset();
+        verticeTxtAttr.seal(gl, false);
+        verticeTxtAttr.rewind();
+        texCoordTxtAttr.seal(gl, false);
+        texCoordTxtAttr.rewind();
+        for(int i=0; i<vertices.size(); i++) {
+            final Vertex v = vertices.get(i);
+            verticeTxtAttr.putf(v.getX());
+            verticeTxtAttr.putf(v.getY());
+            verticeTxtAttr.putf(v.getZ());            
+            box.resize(v.getX(), v.getY(), v.getZ());            
+            
+            final float[] tex = v.getTexCoord();
+            texCoordTxtAttr.putf(tex[0]);
+            texCoordTxtAttr.putf(tex[1]);            
+        }
+        texCoordTxtAttr.seal(gl, true);
+        texCoordTxtAttr.enableBuffer(gl, false);
+        verticeTxtAttr.seal(gl, true);     
+        verticeTxtAttr.enableBuffer(gl, false);
+        
+        // update all bbox related data
+        verticeFboAttr.seal(gl, false);
+        verticeFboAttr.rewind();        
+        verticeFboAttr.putf(box.getLow()[0]);  verticeFboAttr.putf(box.getLow()[1]);  verticeFboAttr.putf(box.getLow()[2]);        
+        verticeFboAttr.putf(box.getLow()[0]);  verticeFboAttr.putf(box.getHigh()[1]); verticeFboAttr.putf(box.getLow()[2]);            
+        verticeFboAttr.putf(box.getHigh()[0]); verticeFboAttr.putf(box.getHigh()[1]); verticeFboAttr.putf(box.getLow()[2]);                
+        verticeFboAttr.putf(box.getHigh()[0]); verticeFboAttr.putf(box.getLow()[1]);  verticeFboAttr.putf(box.getLow()[2]);        
+        verticeFboAttr.seal(gl, true);     
+        verticeFboAttr.enableBuffer(gl, false);
+        
+        fboPMVMatrix.glMatrixMode(GLMatrixFunc.GL_PROJECTION);
+        fboPMVMatrix.glLoadIdentity();
+        fboPMVMatrix.glOrthof(box.getLow()[0], box.getHigh()[0], box.getLow()[1], box.getHigh()[1], -1, 1);
+        
+        // push data 2 GPU ..
+        indicesFbo.seal(gl, true);
+        indicesFbo.enableBuffer(gl, false);
+        
+        setDirty(false);
+        
+        // the buffers were disabled, since due to real/fbo switching and other vbo usage
+    }
+    
+    protected void drawImpl(GL2ES2 gl, RenderState rs, int vp_width, int vp_height, int width) {
+        if(vp_width <=0 || vp_height <= 0 || width <= 0){
+            renderRegion(gl);
+        } else {
+            if(width != tex_width_c) {
+                renderRegion2FBO(gl, rs, width);                
+            }
+            // System.out.println("Scale: " + matrix.glGetMatrixf().get(1+4*3) +" " + matrix.glGetMatrixf().get(2+4*3));
+            renderFBO(gl, rs, vp_width, vp_height);
+        }
+    }
+    
+    private void renderFBO(GL2ES2 gl, RenderState rs, int width, int hight) {
+        final ShaderState st = rs.getShaderState();
+        
+        gl.glViewport(0, 0, width, hight);        
+        st.uniform(gl, mgl_ActiveTexture);        
+        fbo.use(gl, 0);                        
+        verticeFboAttr.enableBuffer(gl, true);       
+        texCoordFboAttr.enableBuffer(gl, true);
+        indicesFbo.enableBuffer(gl, true);
+        
+        gl.glDrawElements(GL2ES2.GL_TRIANGLES, indicesFbo.getElementCount() * indicesFbo.getComponentCount(), GL2ES2.GL_UNSIGNED_SHORT, 0);         
+        
+        verticeFboAttr.enableBuffer(gl, false);       
+        texCoordFboAttr.enableBuffer(gl, false);
+        indicesFbo.enableBuffer(gl, false);        
+        fbo.unuse(gl);
+        
+        // setback: gl.glActiveTexture(currentActiveTextureEngine[0]);
+    }
+    
+    private void renderRegion2FBO(GL2ES2 gl, RenderState rs, int tex_width) {
+        final ShaderState st = rs.getShaderState();
+        
+        tex_width_c = tex_width;        
+        tex_height_c = (int) ( ( ( tex_width_c * box.getHeight() ) / box.getWidth() ) + 0.5f );
+        
+        // System.out.println("FBO Size: "+tex_width+" -> "+tex_height_c+"x"+tex_width_c);
+        // 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;
+        }
+        
+        if(null == fbo) {        
+            fbo = new FBObject(tex_width_c, tex_height_c);
+            fbo.init(gl); 
+            // 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);
+            }
+        } else {
+            fbo.bind(gl);
+        }
+        
+        //render texture
+        gl.glViewport(0, 0, tex_width_c, tex_height_c);
+        st.uniform(gl, mgl_fboPMVMatrix); // use orthogonal matrix
+        
+        gl.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
+        gl.glClear(GL2ES2.GL_COLOR_BUFFER_BIT | GL2ES2.GL_DEPTH_BUFFER_BIT);
+        renderRegion(gl);
+        fbo.unbind(gl);
+        
+        st.uniform(gl, rs.getPMVMatrix()); // switch back to real PMV matrix
+        
+        // if( !gl.isGL3() ) {
+            // GLSL < 1.30
+            if(null == mgl_TextureSize) {
+                mgl_TextureSize = new GLUniformData(UniformNames.gcu_TextureSize, 2, Buffers.newDirectFloatBuffer(2));
+            }
+            final FloatBuffer texSize = (FloatBuffer) mgl_TextureSize.getBuffer();
+            texSize.put(0, (float)fbo.getWidth());
+            texSize.put(1, (float)fbo.getHeight());
+            st.uniform(gl, mgl_TextureSize);
+        //}                        
+    }
+    
+    private void renderRegion(GL2ES2 gl) {
+        verticeTxtAttr.enableBuffer(gl, true);       
+        texCoordTxtAttr.enableBuffer(gl, true);
+        indicesTxt.enableBuffer(gl, true);        
+        
+        gl.glDrawElements(GL2ES2.GL_TRIANGLES, indicesTxt.getElementCount() * indicesTxt.getComponentCount(), GL2ES2.GL_UNSIGNED_SHORT, 0);        
+        
+        verticeTxtAttr.enableBuffer(gl, false);       
+        texCoordTxtAttr.enableBuffer(gl, false);
+        indicesTxt.enableBuffer(gl, false);        
+    }
+    
+    public void destroy(GL2ES2 gl, RenderState rs) {
+        if(DEBUG_INSTANCE) {
+            System.err.println("VBORegion2PES2 Destroy: " + this);
+        }
+        final ShaderState st = rs.getShaderState();
+        if(null != fbo) {
+            fbo.destroy(gl);
+            fbo = null;
+        }        
+        if(null != verticeTxtAttr) {
+            st.ownAttribute(verticeTxtAttr, false);
+            verticeTxtAttr.destroy(gl);
+            verticeTxtAttr = null;
+        }
+        if(null != texCoordTxtAttr) {
+            st.ownAttribute(texCoordTxtAttr, false);
+            texCoordTxtAttr.destroy(gl);
+            texCoordTxtAttr = null;
+        }
+        if(null != indicesTxt) {
+            indicesTxt.destroy(gl);
+            indicesTxt = null;
+        }
+        if(null != verticeFboAttr) {
+            st.ownAttribute(verticeFboAttr, false);
+            verticeFboAttr.destroy(gl);
+            verticeFboAttr = null;
+        }
+        if(null != texCoordFboAttr) {
+            st.ownAttribute(texCoordFboAttr, false);
+            texCoordFboAttr.destroy(gl);
+            texCoordFboAttr = null;
+        }
+        if(null != indicesFbo) {
+            indicesFbo.destroy(gl);
+            indicesFbo = null;
+        }
+        triangles.clear();
+        vertices.clear();        
+    }       
+}
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java
new file mode 100644
index 0000000..2167138
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java
@@ -0,0 +1,160 @@
+/**
+ * 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.graph.curve.opengl;
+
+import javax.media.opengl.GL;
+import javax.media.opengl.GL2ES2;
+
+import jogamp.graph.curve.opengl.shader.AttributeNames;
+
+import com.jogamp.graph.curve.opengl.GLRegion;
+import com.jogamp.graph.curve.opengl.RenderState;
+import com.jogamp.graph.geom.Vertex;
+import com.jogamp.graph.geom.Triangle;
+import com.jogamp.opengl.util.GLArrayDataServer;
+import com.jogamp.opengl.util.glsl.ShaderState;
+
+public class VBORegionSPES2 extends GLRegion {
+    private GLArrayDataServer verticeAttr = null;
+    private GLArrayDataServer texCoordAttr = null;
+    private GLArrayDataServer indices = null;
+
+    protected VBORegionSPES2(int renderModes) { 
+        super(renderModes);
+    }
+
+    protected void update(GL2ES2 gl, RenderState rs) {
+        if(!isDirty()) {
+            return; 
+        }
+
+        if(null == indices) {
+            final int initialSize = 256;
+            final ShaderState st = rs.getShaderState();
+
+            indices = GLArrayDataServer.createData(3, GL2ES2.GL_SHORT, initialSize, GL.GL_STATIC_DRAW, GL.GL_ELEMENT_ARRAY_BUFFER);
+
+            verticeAttr = GLArrayDataServer.createGLSL(AttributeNames.VERTEX_ATTR_NAME, 3, GL2ES2.GL_FLOAT, 
+                    false, initialSize, GL.GL_STATIC_DRAW);         
+            st.ownAttribute(verticeAttr, true);
+
+            texCoordAttr = GLArrayDataServer.createGLSL(AttributeNames.TEXCOORD_ATTR_NAME, 2, GL2ES2.GL_FLOAT, 
+                    false, initialSize, GL.GL_STATIC_DRAW);
+            st.ownAttribute(texCoordAttr, true);
+
+            if(DEBUG_INSTANCE) {
+                System.err.println("VBORegionSPES2 Create: " + this);
+            }
+        }
+
+        // process triangles
+        indices.seal(gl, false);
+        indices.rewind();        
+        for(int i=0; i<triangles.size(); i++) {
+            final Triangle t = triangles.get(i);
+            final Vertex[] t_vertices = t.getVertices();
+
+            if(t_vertices[0].getId() == Integer.MAX_VALUE){
+                t_vertices[0].setId(numVertices++);
+                t_vertices[1].setId(numVertices++);
+                t_vertices[2].setId(numVertices++);
+
+                vertices.add(t_vertices[0]);
+                vertices.add(t_vertices[1]);
+                vertices.add(t_vertices[2]);
+
+                indices.puts((short) t_vertices[0].getId());
+                indices.puts((short) t_vertices[1].getId());
+                indices.puts((short) t_vertices[2].getId());
+            } else {
+                indices.puts((short) t_vertices[0].getId());
+                indices.puts((short) t_vertices[1].getId());
+                indices.puts((short) t_vertices[2].getId());
+            }
+        }
+        indices.seal(gl, true);
+        indices.enableBuffer(gl, false);
+
+        // process vertices and update bbox
+        box.reset();
+        verticeAttr.seal(gl, false); 
+        verticeAttr.rewind();
+        texCoordAttr.seal(gl, false);
+        texCoordAttr.rewind();
+        for(int i=0; i<vertices.size(); i++) {
+            final Vertex v = vertices.get(i);
+            verticeAttr.putf(v.getX());
+            verticeAttr.putf(v.getY());
+            verticeAttr.putf(v.getZ());            
+            box.resize(v.getX(), v.getY(), v.getZ());
+
+            final float[] tex = v.getTexCoord();
+            texCoordAttr.putf(tex[0]);
+            texCoordAttr.putf(tex[1]);
+        }
+        verticeAttr.seal(gl, true);        
+        verticeAttr.enableBuffer(gl, false);
+        texCoordAttr.seal(gl, true);
+        texCoordAttr.enableBuffer(gl, false);
+
+        setDirty(false);
+    }
+
+    protected void drawImpl(GL2ES2 gl, RenderState rs, int vp_width, int vp_height, int width) {
+        verticeAttr.enableBuffer(gl, true);       
+        texCoordAttr.enableBuffer(gl, true);
+        indices.enableBuffer(gl, true);
+
+        gl.glDrawElements(GL2ES2.GL_TRIANGLES, indices.getElementCount() * indices.getComponentCount(), GL2ES2.GL_UNSIGNED_SHORT, 0);         
+
+        verticeAttr.enableBuffer(gl, false);       
+        texCoordAttr.enableBuffer(gl, false);
+        indices.enableBuffer(gl, false);
+    }    
+
+    public final void destroy(GL2ES2 gl, RenderState rs) {
+        if(DEBUG_INSTANCE) {
+            System.err.println("VBORegionSPES2 Destroy: " + this);
+        }        
+        final ShaderState st = rs.getShaderState();
+        if(null != verticeAttr) {
+            st.ownAttribute(verticeAttr, false);
+            verticeAttr.destroy(gl);
+            verticeAttr = null;
+        }
+        if(null != texCoordAttr) {
+            st.ownAttribute(texCoordAttr, false);
+            texCoordAttr.destroy(gl);
+            texCoordAttr = null;
+        }
+        if(null != indices) {
+            indices.destroy(gl);
+            indices = null;
+        }
+    }    
+}
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/shader/AttributeNames.java b/src/jogl/classes/jogamp/graph/curve/opengl/shader/AttributeNames.java
new file mode 100644
index 0000000..8a109c3
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/shader/AttributeNames.java
@@ -0,0 +1,45 @@
+/**
+ * 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 jogamp.graph.curve.opengl.shader;
+
+public class AttributeNames {
+    /** The vertices index in an OGL object
+     */
+    public static final int VERTEX_ATTR_IDX = 0; // FIXME: AMD needs this to be location 0 ? hu ?
+    public static final String VERTEX_ATTR_NAME = "gca_Vertices";
+
+    /** The Texture Coord index in an OGL object
+     */
+    public static final int TEXCOORD_ATTR_IDX = 1;
+    public static final String TEXCOORD_ATTR_NAME = "gca_TexCoords";
+    
+    /** The color index in an OGL object
+     */
+    public static final int COLOR_ATTR_IDX = 2;
+    public static final String COLOR_ATTR_NAME = "gca_Colors";    
+}
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/shader/UniformNames.java b/src/jogl/classes/jogamp/graph/curve/opengl/shader/UniformNames.java
new file mode 100644
index 0000000..ab6e0dc
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/shader/UniformNames.java
@@ -0,0 +1,10 @@
+package jogamp.graph.curve.opengl.shader;
+
+public class UniformNames {
+    public static final String gcu_PMVMatrix = "gcu_PMVMatrix"; // gcu_PMVMatrix[3]; // P, Mv, and Mvi
+    public static final String gcu_ColorStatic = "gcu_ColorStatic";
+    public static final String gcu_Alpha = "gcu_Alpha"; 
+    public static final String gcu_Weight = "gcu_Weight";
+    public static final String gcu_TextureUnit = "gcu_TextureUnit";
+    public static final String gcu_TextureSize = "gcu_TextureSize";
+}
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/shader/attributes.glsl b/src/jogl/classes/jogamp/graph/curve/opengl/shader/attributes.glsl
new file mode 100644
index 0000000..108247c
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/shader/attributes.glsl
@@ -0,0 +1,11 @@
+
+#ifndef attributes_glsl
+#define attributes_glsl
+
+// attribute vec3    gca_Vertices;
+attribute vec4    gca_Vertices;
+attribute vec2    gca_TexCoords;
+//attribute vec4    gca_Colors;
+//attribute vec3    gca_Normals;
+
+#endif // attributes_glsl
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-es2-merged.vp b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-es2-merged.vp
new file mode 100644
index 0000000..530b24f
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-es2-merged.vp
@@ -0,0 +1,19 @@
+//Copyright 2010 JogAmp Community. All rights reserved.
+
+#ifdef GL_ES
+  precision lowp float;
+  precision lowp int;
+#endif
+
+uniform mat4    gcu_PMVMatrix[3]; // P, Mv, and Mvi
+varying vec2    gcv_TexCoord;
+
+attribute vec4    gca_Vertices;
+attribute vec2    gca_TexCoords;
+
+
+void main(void)
+{
+  gl_Position = gcu_PMVMatrix[0] * gcu_PMVMatrix[1] * gca_Vertices;
+  gcv_TexCoord = gca_TexCoords;
+}
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-es2.vp b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-es2.vp
new file mode 100644
index 0000000..15ce8cc
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-es2.vp
@@ -0,0 +1,9 @@
+//Copyright 2010 JogAmp Community. All rights reserved.
+
+#version 100
+
+precision mediump float;
+precision mediump int;
+
+#include curverenderer01-xxx.vp
+
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-gl2.vp b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-gl2.vp
new file mode 100644
index 0000000..1ac33e8
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-gl2.vp
@@ -0,0 +1,6 @@
+//Copyright 2010 JogAmp Community. All rights reserved.
+
+#version 110
+
+#include curverenderer01-xxx.vp
+
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-xxx.vp b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-xxx.vp
new file mode 100644
index 0000000..64a6835
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-xxx.vp
@@ -0,0 +1,12 @@
+//Copyright 2010 JogAmp Community. All rights reserved.
+
+#include uniforms.glsl
+#include attributes.glsl
+#include varyings.glsl
+
+void main(void)
+{
+  // gl_Position = gcu_PMVMatrix[0] * gcu_PMVMatrix[1] * vec4(gca_Vertices, 1);
+  gl_Position = gcu_PMVMatrix[0] * gcu_PMVMatrix[1] * gca_Vertices;
+  gcv_TexCoord = gca_TexCoords;
+}
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01a-es2-merged.fp b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01a-es2-merged.fp
new file mode 100644
index 0000000..da32df5
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01a-es2-merged.fp
@@ -0,0 +1,52 @@
+//Copyright 2010 JogAmp Community. All rights reserved.
+
+#ifdef GL_ES
+  precision lowp float;
+  precision lowp int;
+#endif
+
+uniform mat4    gcu_PMVMatrix[3]; // P, Mv, and Mvi
+uniform vec3    gcu_ColorStatic;
+uniform float   gcu_Alpha;
+
+varying vec2    gcv_TexCoord;
+
+const vec3 b_color = vec3(1.0, 1.0, 1.0);
+
+void main (void)
+{
+    vec2 rtex = vec2(abs(gcv_TexCoord.x),abs(gcv_TexCoord.y));
+    vec3 c = gcu_ColorStatic;
+    
+    float alpha = 0.0;
+    
+    if((gcv_TexCoord.x == 0.0) && (gcv_TexCoord.y == 0.0)) {
+         alpha = gcu_Alpha;
+    }
+    else if ((gcv_TexCoord.x > 0.0) && (rtex.y > 0.0 || rtex.x == 1.0)) {
+        vec2 dtx = dFdx(rtex);
+        vec2 dty = dFdy(rtex);
+          
+        rtex.y -= 0.1;
+          
+        if(rtex.y < 0.0) {
+          rtex.y = 0.0;
+        }
+          
+        vec2 f = vec2((dtx.y - dtx.x + 2.0*rtex.x*dtx.x), (dty.y - dty.x + 2.0*rtex.x*dty.x));
+        float position = rtex.y - (rtex.x * (1.0 - rtex.x));
+        float d = position/(length(f));
+
+        float a = (0.5 - d * sign(gcv_TexCoord.y));  
+        
+        if (a >= 1.0)  { 
+            alpha = gcu_Alpha;
+        } else if (a <= 0.0) {
+            alpha=0.0;
+        } else {           
+            alpha = gcu_Alpha * a;
+        }
+    }
+    
+    gl_FragColor = vec4(c, alpha);
+}
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01a-es2.fp b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01a-es2.fp
new file mode 100644
index 0000000..e693891
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01a-es2.fp
@@ -0,0 +1,13 @@
+//Copyright 2010 JogAmp Community. All rights reserved.
+
+#version 100
+
+// we require dFdx/dFdy
+// #extension OES_standard_derivatives : require
+#extension GL_OES_standard_derivatives : enable
+
+precision mediump float;
+precision mediump int;
+
+#include curverenderer01a-xxx.fp
+
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01a-gl2.fp b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01a-gl2.fp
new file mode 100644
index 0000000..d187fea
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01a-gl2.fp
@@ -0,0 +1,6 @@
+//Copyright 2010 JogAmp Community. All rights reserved.
+
+#version 110
+
+#include curverenderer01a-xxx.fp
+
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01a-xxx.fp b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01a-xxx.fp
new file mode 100644
index 0000000..f3a88ad
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01a-xxx.fp
@@ -0,0 +1,42 @@
+//Copyright 2010 JogAmp Community. All rights reserved.
+
+//
+// 1-pass shader w/o weight
+//
+
+#include uniforms.glsl
+#include varyings.glsl
+
+void main (void)
+{
+    vec2 rtex = vec2(abs(gcv_TexCoord.x),abs(gcv_TexCoord.y));
+    vec3 c = gcu_ColorStatic.rgb;
+    
+    float alpha = 0.0;
+    
+    if((gcv_TexCoord.x == 0.0) && (gcv_TexCoord.y == 0.0)) {
+         alpha = gcu_Alpha;
+    }
+    else if ((gcv_TexCoord.x > 0.0) && (rtex.y > 0.0 || rtex.x == 1.0)) {
+        rtex.y -= 0.1;
+          
+        if(rtex.y < 0.0 && gcv_TexCoord.y < 0.0) {
+            // discard; // freezes NV tegra2 compiler
+            alpha = 0.0;
+        } else {
+            rtex.y = max(rtex.y, 0.0);
+
+            vec2 dtx = dFdx(rtex);
+            vec2 dty = dFdy(rtex);
+              
+            vec2 f = vec2((dtx.y - dtx.x + 2.0*rtex.x*dtx.x), (dty.y - dty.x + 2.0*rtex.x*dty.x));
+            float position = rtex.y - (rtex.x * (1.0 - rtex.x));
+
+            // FIXME: will we ever set gcu_Alpha != 1.0 ? If not, a==alpha!
+            float a = clamp(0.5 - ( position/length(f) ) * sign(gcv_TexCoord.y), 0.0, 1.0);
+            alpha = gcu_Alpha * a;
+        }
+    }
+    
+    gl_FragColor = vec4(c, alpha);
+}
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01b-es2.fp b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01b-es2.fp
new file mode 100644
index 0000000..2e70963
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01b-es2.fp
@@ -0,0 +1,14 @@
+//Copyright 2010 JogAmp Community. All rights reserved.
+
+#version 100
+
+// we require dFdx/dFdy
+// #extension OES_standard_derivatives : require
+#extension GL_OES_standard_derivatives : enable
+
+precision mediump float;
+precision mediump int;
+precision mediump sampler2D;
+
+#include curverenderer01b-xxx.fp
+
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01b-gl2.fp b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01b-gl2.fp
new file mode 100644
index 0000000..01e08ff
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01b-gl2.fp
@@ -0,0 +1,6 @@
+//Copyright 2010 JogAmp Community. All rights reserved.
+
+#version 110
+
+#include curverenderer01b-xxx.fp
+
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01b-xxx.fp b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01b-xxx.fp
new file mode 100644
index 0000000..879e41e
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01b-xxx.fp
@@ -0,0 +1,82 @@
+//Copyright 2010 JogAmp Community. All rights reserved.
+
+//
+// 2-pass shader w/o weight
+//
+
+#include uniforms.glsl
+#include varyings.glsl
+
+const vec4 tex_weights = vec4(0.075, 0.06, 0.045, 0.025);
+
+void main (void)
+{
+    vec2 rtex = vec2(abs(gcv_TexCoord.x),abs(gcv_TexCoord.y));
+    vec3 c = gcu_ColorStatic.rgb;
+
+    float alpha = 0.0;
+    float enable = 1.0;
+    
+    if((gcv_TexCoord.x == 0.0) && (gcv_TexCoord.y == 0.0)) {
+         alpha = gcu_Alpha;
+    }
+    else if((gcv_TexCoord.x >= 5.0)) {
+        vec2 dfx = dFdx(gcv_TexCoord);
+        vec2 dfy = dFdy(gcv_TexCoord);
+        
+        vec2 size = 1.0/gcu_TextureSize;
+
+        rtex -= 5.0;
+        vec4 t = texture2D(gcu_TextureUnit, rtex)* 0.18;
+
+        t += texture2D(gcu_TextureUnit, rtex + size*(vec2(1, 0)))*tex_weights.x;
+        t += texture2D(gcu_TextureUnit, rtex - size*(vec2(1, 0)))*tex_weights.x;
+        t += texture2D(gcu_TextureUnit, rtex + size*(vec2(0, 1)))*tex_weights.x;
+        t += texture2D(gcu_TextureUnit, rtex - size*(vec2(0, 1)))*tex_weights.x;
+        
+        t += texture2D(gcu_TextureUnit, rtex + 2.0*size*(vec2(1, 0)))*tex_weights.y;
+        t += texture2D(gcu_TextureUnit, rtex - 2.0*size*(vec2(1, 0)))*tex_weights.y;
+        t += texture2D(gcu_TextureUnit, rtex + 2.0*size*(vec2(0, 1)))*tex_weights.y; 
+        t += texture2D(gcu_TextureUnit, rtex - 2.0*size*(vec2(0, 1)))*tex_weights.y;
+        
+        t += texture2D(gcu_TextureUnit, rtex + 3.0*size*(vec2(1, 0)))*tex_weights.z;
+        t += texture2D(gcu_TextureUnit, rtex - 3.0*size*(vec2(1, 0)))*tex_weights.z;
+        t += texture2D(gcu_TextureUnit, rtex + 3.0*size*(vec2(0, 1)))*tex_weights.z;
+        t += texture2D(gcu_TextureUnit, rtex - 3.0*size*(vec2(0, 1)))*tex_weights.z;
+        
+        t += texture2D(gcu_TextureUnit, rtex + 4.0*size*(vec2(1, 0)))*tex_weights.w;
+        t += texture2D(gcu_TextureUnit, rtex - 4.0*size*(vec2(1, 0)))*tex_weights.w;
+        t += texture2D(gcu_TextureUnit, rtex + 4.0*size*(vec2(0, 1)))*tex_weights.w;
+        t += texture2D(gcu_TextureUnit, rtex - 4.0*size*(vec2(0, 1)))*tex_weights.w;
+        
+        /** discard freezes NV tegra2 compiler
+        if(t.w == 0.0){
+            discard;
+        } */
+        
+        c = t.xyz;
+        alpha = gcu_Alpha * t.w;
+    }
+    else if ((gcv_TexCoord.x > 0.0) && (rtex.y > 0.0 || rtex.x == 1.0)) {
+        rtex.y -= 0.1;
+          
+        if(rtex.y < 0.0 && gcv_TexCoord.y < 0.0) {
+            // discard; // freezes NV tegra2 compiler
+            alpha = 0.0;
+        } else {
+            rtex.y = max(rtex.y, 0.0);
+
+            vec2 dtx = dFdx(rtex);
+            vec2 dty = dFdy(rtex);
+              
+            vec2 f = vec2((dtx.y - dtx.x + 2.0*rtex.x*dtx.x), (dty.y - dty.x + 2.0*rtex.x*dty.x));
+            float position = rtex.y - (rtex.x * (1.0 - rtex.x));
+
+            // FIXME: will we ever set gcu_Alpha != 1.0 ? If not, a==alpha!
+            float a = clamp(0.5 - ( position/length(f) ) * sign(gcv_TexCoord.y), 0.0, 1.0);
+            alpha = gcu_Alpha * a;
+        }
+    }
+
+    gl_FragColor = vec4(c, alpha);
+}
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer02a-es2.fp b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer02a-es2.fp
new file mode 100644
index 0000000..b524203
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer02a-es2.fp
@@ -0,0 +1,14 @@
+//Copyright 2010 JogAmp Community. All rights reserved.
+
+#version 100
+
+// we require dFdx/dFdy
+// #extension OES_standard_derivatives : require
+#extension GL_OES_standard_derivatives : enable
+
+precision mediump float;
+precision mediump int;
+precision mediump sampler2D;
+
+#include curverenderer02a-xxx.fp
+
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer02a-gl2.fp b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer02a-gl2.fp
new file mode 100644
index 0000000..01715da
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer02a-gl2.fp
@@ -0,0 +1,6 @@
+//Copyright 2010 JogAmp Community. All rights reserved.
+
+#version 110
+
+#include curverenderer02a-xxx.fp
+
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer02a-xxx.fp b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer02a-xxx.fp
new file mode 100644
index 0000000..d31bafb
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer02a-xxx.fp
@@ -0,0 +1,48 @@
+//Copyright 2010 JogAmp Community. All rights reserved.
+ 
+//
+// 1-pass shader w/ weight
+//
+
+#include uniforms.glsl
+#include varyings.glsl
+
+void main (void)
+{
+    vec2 rtex = vec2(abs(gcv_TexCoord.x),abs(gcv_TexCoord.y));
+    vec3 c = gcu_ColorStatic.rgb;
+    
+    float alpha = 0.0;
+    
+    if((gcv_TexCoord.x == 0.0) && (gcv_TexCoord.y == 0.0)) {
+         alpha = gcu_Alpha;
+    }
+    else if ((gcv_TexCoord.x > 0.0) && (rtex.y > 0.0 || rtex.x == 1.0)) {
+        rtex.y -= 0.1;
+        
+        if(rtex.y < 0.0 && gcv_TexCoord.y < 0.0) {
+            // discard; // freezes NV tegra2 compiler
+            alpha = 0.0;
+        } else {
+            rtex.y = max(rtex.y, 0.0);
+
+            vec2 dtx = dFdx(rtex);
+            vec2 dty = dFdy(rtex);
+              
+            float w = gcu_Weight;
+            float pd = ((2.0 - (2.0*w))*rtex.x*rtex.x) + 2.0*(w-1.0)*rtex.x + 1.0;
+            float position = rtex.y - ((w*rtex.x*(1.0 - rtex.x))/pd);
+
+            float aph = 2.0 - 2.0*w;
+            
+            float gd = (aph*rtex.x*rtex.x + 2.0*rtex.x + 1.0)*(aph*rtex.x*rtex.x + 2.0*rtex.x + 1.0);
+            vec2 f = vec2((dtx.y - (w*dtx.x*(1.0 - 2.0*rtex.x))/gd), (dty.y - (w*dty.x*(1.0 - 2.0*rtex.x))/gd));
+
+            // FIXME: will we ever set gcu_Alpha != 1.0 ? If not, a==alpha!
+            float a = clamp(0.5 - ( position/length(f) ) * sign(gcv_TexCoord.y), 0.0, 1.0);
+            alpha = gcu_Alpha * a;
+        }
+    }
+
+    gl_FragColor = vec4(c, alpha);
+}
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer02b-es2.fp b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer02b-es2.fp
new file mode 100644
index 0000000..e0486dd
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer02b-es2.fp
@@ -0,0 +1,14 @@
+//Copyright 2010 JogAmp Community. All rights reserved.
+
+#version 100
+
+// we require dFdx/dFdy
+// #extension OES_standard_derivatives : require
+#extension GL_OES_standard_derivatives : enable
+
+precision mediump float;
+precision mediump int;
+precision mediump sampler2D;
+
+#include curverenderer02b-xxx.fp
+
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer02b-gl2.fp b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer02b-gl2.fp
new file mode 100644
index 0000000..b1cc721
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer02b-gl2.fp
@@ -0,0 +1,6 @@
+//Copyright 2010 JogAmp Community. All rights reserved.
+
+#version 110
+
+#include curverenderer02b-xxx.fp
+
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer02b-xxx.fp b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer02b-xxx.fp
new file mode 100644
index 0000000..be73849
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer02b-xxx.fp
@@ -0,0 +1,88 @@
+//Copyright 2010 JogAmp Community. All rights reserved.
+ 
+//
+// 2-pass shader w/ weight
+//
+
+#include uniforms.glsl
+#include varyings.glsl
+
+const vec4 tex_weights = vec4(0.075, 0.06, 0.045, 0.025);
+
+void main (void)
+{
+    vec2 rtex = vec2(abs(gcv_TexCoord.x),abs(gcv_TexCoord.y));
+    vec3 c = gcu_ColorStatic.rgb;
+    
+    float alpha = 0.0;
+    
+    if((gcv_TexCoord.x == 0.0) && (gcv_TexCoord.y == 0.0)) {
+         alpha = gcu_Alpha;
+    }
+    else if((gcv_TexCoord.x >= 5.0)) {
+        vec2 dfx = dFdx(gcv_TexCoord);
+        vec2 dfy = dFdy(gcv_TexCoord);
+        
+        vec2 size = 1.0/gcu_TextureSize;
+
+        rtex -= 5.0;
+        vec4 t = texture2D(gcu_TextureUnit, rtex)* 0.18;
+
+        t += texture2D(gcu_TextureUnit, rtex + size*(vec2(1, 0)))*tex_weights.x;
+        t += texture2D(gcu_TextureUnit, rtex - size*(vec2(1, 0)))*tex_weights.x;
+        t += texture2D(gcu_TextureUnit, rtex + size*(vec2(0, 1)))*tex_weights.x;
+        t += texture2D(gcu_TextureUnit, rtex - size*(vec2(0, 1)))*tex_weights.x;
+        
+        t += texture2D(gcu_TextureUnit, rtex + 2.0*size*(vec2(1, 0)))*tex_weights.y;
+        t += texture2D(gcu_TextureUnit, rtex - 2.0*size*(vec2(1, 0)))*tex_weights.y;
+        t += texture2D(gcu_TextureUnit, rtex + 2.0*size*(vec2(0, 1)))*tex_weights.y; 
+        t += texture2D(gcu_TextureUnit, rtex - 2.0*size*(vec2(0, 1)))*tex_weights.y;
+        
+        t += texture2D(gcu_TextureUnit, rtex + 3.0*size*(vec2(1, 0)))*tex_weights.z;
+        t += texture2D(gcu_TextureUnit, rtex - 3.0*size*(vec2(1, 0)))*tex_weights.z;
+        t += texture2D(gcu_TextureUnit, rtex + 3.0*size*(vec2(0, 1)))*tex_weights.z;
+        t += texture2D(gcu_TextureUnit, rtex - 3.0*size*(vec2(0, 1)))*tex_weights.z;
+        
+        t += texture2D(gcu_TextureUnit, rtex + 4.0*size*(vec2(1, 0)))*tex_weights.w;
+        t += texture2D(gcu_TextureUnit, rtex - 4.0*size*(vec2(1, 0)))*tex_weights.w;
+        t += texture2D(gcu_TextureUnit, rtex + 4.0*size*(vec2(0, 1)))*tex_weights.w;
+        t += texture2D(gcu_TextureUnit, rtex - 4.0*size*(vec2(0, 1)))*tex_weights.w;
+        
+        /** discard freezes NV tegra2 compiler
+        if(t.w == 0.0) {
+            discard;
+        } */
+        
+        c = t.xyz;
+        alpha = gcu_Alpha * t.w;
+    }
+    ///////////////////////////////////////////////////////////
+    else if ((gcv_TexCoord.x > 0.0) && (rtex.y > 0.0 || rtex.x == 1.0)) {
+        rtex.y -= 0.1;
+        
+        if(rtex.y < 0.0 && gcv_TexCoord.y < 0.0) {
+            // discard; // freezes NV tegra2 compiler
+            alpha = 0.0;
+        } else {
+            rtex.y = max(rtex.y, 0.0);
+
+            vec2 dtx = dFdx(rtex);
+            vec2 dty = dFdy(rtex);
+              
+            float w = gcu_Weight;
+            float pd = ((2.0 - (2.0*w))*rtex.x*rtex.x) + 2.0*(w-1.0)*rtex.x + 1.0;
+            float position = rtex.y - ((w*rtex.x*(1.0 - rtex.x))/pd);
+
+            float aph = 2.0 - 2.0*w;
+            
+            float gd = (aph*rtex.x*rtex.x + 2.0*rtex.x + 1.0)*(aph*rtex.x*rtex.x + 2.0*rtex.x + 1.0);
+            vec2 f = vec2((dtx.y - (w*dtx.x*(1.0 - 2.0*rtex.x))/gd), (dty.y - (w*dty.x*(1.0 - 2.0*rtex.x))/gd));
+
+            // FIXME: will we ever set gcu_Alpha != 1.0 ? If not, a==alpha!
+            float a = clamp(0.5 - ( position/length(f) ) * sign(gcv_TexCoord.y), 0.0, 1.0);
+            alpha = gcu_Alpha * a;
+        }
+    }
+
+    gl_FragColor = vec4(c, alpha);
+}
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/shader/uniforms.glsl b/src/jogl/classes/jogamp/graph/curve/opengl/shader/uniforms.glsl
new file mode 100644
index 0000000..5bbd5de
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/shader/uniforms.glsl
@@ -0,0 +1,22 @@
+
+#ifndef uniforms_glsl
+#define uniforms_glsl
+
+uniform mat4    gcu_PMVMatrix[3]; // P, Mv, and Mvi
+uniform vec3    gcu_ColorStatic;
+uniform float   gcu_Alpha;
+uniform float   gcu_Weight;
+uniform sampler2D      gcu_TextureUnit;
+
+// #if __VERSION__ < 130
+uniform vec2    gcu_TextureSize;
+// #endif
+
+// const   int     MAX_TEXTURE_UNITS = 8; // <= gl_MaxTextureImageUnits 
+// const   int     MAX_LIGHTS = 8; 
+// uniform mat3   gcu_NormalMatrix; // transpose(inverse(ModelView)).3x3
+// uniform int     gcu_ColorEnabled;
+// uniform int     gcu_TexCoordEnabled[MAX_TEXTURE_UNITS];
+// uniform int     gcu_CullFace;
+
+#endif // uniforms_glsl
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/shader/varyings.glsl b/src/jogl/classes/jogamp/graph/curve/opengl/shader/varyings.glsl
new file mode 100644
index 0000000..7a9bc5a
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/shader/varyings.glsl
@@ -0,0 +1,9 @@
+
+#ifndef varyings_glsl
+#define varyings_glsl
+
+//varying vec4    gcv_FrontColor;
+varying vec2    gcv_TexCoord;
+
+#endif // varyings_glsl
+
diff --git a/src/jogl/classes/jogamp/graph/curve/tess/CDTriangulator2D.java b/src/jogl/classes/jogamp/graph/curve/tess/CDTriangulator2D.java
new file mode 100644
index 0000000..10b6d68
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/curve/tess/CDTriangulator2D.java
@@ -0,0 +1,203 @@
+/**
+ * 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.graph.curve.tess;
+
+import java.util.ArrayList;
+
+
+import com.jogamp.graph.curve.tess.Triangulator;
+import com.jogamp.graph.geom.Outline;
+import com.jogamp.graph.geom.Triangle;
+import com.jogamp.graph.geom.Vertex;
+import com.jogamp.graph.math.VectorUtil;
+
+import jogamp.opengl.Debug;
+
+/** Constrained Delaunay Triangulation 
+ * implementation of a list of Outlines that define a set of
+ * Closed Regions with optional n holes.
+ * 
+ */
+public class CDTriangulator2D implements Triangulator{
+
+    protected static final boolean DEBUG = Debug.debug("Triangulation");
+    
+    private float sharpness = 0.5f;
+    private ArrayList<Loop> loops;
+    private ArrayList<Vertex> vertices;
+    
+    private ArrayList<Triangle> triangles;
+    private int maxTriID = 0;
+
+    
+    /** Constructor for a new Delaunay triangulator
+     */
+    public CDTriangulator2D() {
+        reset();
+    }
+    
+    /** Reset the triangulation to initial state
+     *  Clearing cached data
+     */
+    public void reset() {
+        maxTriID = 0;
+        vertices = new ArrayList<Vertex>();
+        triangles = new ArrayList<Triangle>(3);
+        loops = new ArrayList<Loop>();
+    }
+    
+    public void addCurve(Outline polyline) {
+        Loop loop = null;
+        
+        if(!loops.isEmpty()) {
+            loop = getContainerLoop(polyline);
+        }
+        
+        if(loop == null) {
+            GraphOutline outline = new GraphOutline(polyline);
+            GraphOutline innerPoly = extractBoundaryTriangles(outline, false);
+            vertices.addAll(polyline.getVertices());
+            loop = new Loop(innerPoly, VectorUtil.Winding.CCW);
+            loops.add(loop);
+        } else {
+            GraphOutline outline = new GraphOutline(polyline);
+            GraphOutline innerPoly = extractBoundaryTriangles(outline, true);
+            vertices.addAll(innerPoly.getVertices());
+            loop.addConstraintCurve(innerPoly);
+        }
+    }
+    
+    public ArrayList<Triangle> generate() {    
+        for(int i=0;i<loops.size();i++) {
+            Loop loop = loops.get(i);
+            int numTries = 0;
+            int size = loop.computeLoopSize();
+            while(!loop.isSimplex()){
+                Triangle tri = null;
+                if(numTries > size){
+                    tri = loop.cut(false);
+                }
+                else{
+                    tri = loop.cut(true);
+                }
+                numTries++;
+
+                if(tri != null) {
+                    numTries = 0;
+                    size--;
+                    tri.setId(maxTriID++);
+                    triangles.add(tri);
+                    if(DEBUG){
+                        System.err.println(tri);
+                    }
+                }
+                if(numTries > size*2){
+                    if(DEBUG){
+                        System.err.println("Triangulation not complete!");
+                    }
+                    break;
+                }
+            }
+            Triangle tri = loop.cut(true);
+            if(tri != null)
+                triangles.add(tri);
+        }
+        return triangles;
+    }
+
+    private GraphOutline extractBoundaryTriangles(GraphOutline outline, boolean hole) {
+        GraphOutline innerOutline = new GraphOutline();
+        ArrayList<GraphVertex> outVertices = outline.getGraphPoint();
+        int size = outVertices.size();
+        for(int i=0; i < size; i++) {
+            GraphVertex currentVertex = outVertices.get(i);
+            GraphVertex gv0 = outVertices.get((i+size-1)%size);
+            GraphVertex gv2 = outVertices.get((i+1)%size);
+            GraphVertex gv1 = currentVertex;
+            
+            if(!currentVertex.getPoint().isOnCurve()) {
+                Vertex v0 = gv0.getPoint().clone();
+                Vertex v2 = gv2.getPoint().clone();
+                Vertex v1 = gv1.getPoint().clone();
+                
+                gv0.setBoundaryContained(true);
+                gv1.setBoundaryContained(true);
+                gv2.setBoundaryContained(true);
+                
+                final Triangle t;
+                final boolean holeLike;
+                if(VectorUtil.ccw(v0,v1,v2)) {
+                    holeLike = false;
+                    t = new Triangle(v0, v1, v2);
+                } else {
+                    holeLike = true;
+                    t = new Triangle(v2, v1, v0);
+                }
+                t.setId(maxTriID++);
+                triangles.add(t);
+                if(DEBUG){
+                    System.err.println(t);
+                }
+                if( hole || holeLike ) {
+                    v0.setTexCoord(0, -0.1f);
+                    v2.setTexCoord(1, -0.1f);
+                    v1.setTexCoord(0.5f, -1*sharpness -0.1f);
+                    innerOutline.addVertex(currentVertex);
+                } else {
+                    v0.setTexCoord(0, 0.1f);
+                    v2.setTexCoord(1, 0.1f);
+                    v1.setTexCoord(0.5f, sharpness+0.1f);
+                }
+            }
+            else {
+                if(!gv2.getPoint().isOnCurve() || !gv0.getPoint().isOnCurve()){
+                    currentVertex.setBoundaryContained(true);
+                }
+                innerOutline.addVertex(currentVertex);
+            }
+        }
+        return innerOutline;
+    }
+    
+    private Loop getContainerLoop(Outline polyline) {
+        ArrayList<Vertex> vertices = polyline.getVertices();
+        for(int i=0; i < loops.size(); i++) {
+            Loop loop = loops.get(i);
+            boolean inside = false;
+            for(int j=0; j < vertices.size(); j++) {
+                Vertex v = vertices.get(j);
+                inside |= loop.checkInside(v);
+            }
+            if(inside) {
+                return loop;
+            }
+        }
+        return null;
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/curve/tess/GraphOutline.java b/src/jogl/classes/jogamp/graph/curve/tess/GraphOutline.java
new file mode 100644
index 0000000..c8251af
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/curve/tess/GraphOutline.java
@@ -0,0 +1,72 @@
+/**
+ * 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.graph.curve.tess;
+
+import java.util.ArrayList;
+
+import com.jogamp.graph.geom.Outline;
+import com.jogamp.graph.geom.Vertex;
+
+public class GraphOutline {
+    final private Outline outline;
+    final private ArrayList<GraphVertex> controlpoints = new ArrayList<GraphVertex>(3);
+    
+    public GraphOutline(){
+        this.outline = new Outline();
+    }
+    
+    /**Create a control polyline of control vertices
+     * the curve pieces can be identified by onCurve flag 
+     * of each cp the control polyline is open by default
+     */
+    public GraphOutline(Outline ol){
+        this.outline = ol;
+        ArrayList<Vertex> vertices = this.outline.getVertices();
+        for(int i = 0; i< vertices.size(); i++){
+            this.controlpoints.add(new GraphVertex(vertices.get(i)));
+        }
+    }
+
+    public Outline getOutline() {
+        return outline;
+    }
+
+    public ArrayList<GraphVertex> getGraphPoint() {
+        return controlpoints;
+    }
+    
+    public ArrayList<Vertex> getVertices() {
+        return outline.getVertices();
+    }
+
+    public void addVertex(GraphVertex v) {
+        controlpoints.add(v);
+        outline.addVertex(v.getPoint());
+    }
+    
+}
diff --git a/src/jogl/classes/jogamp/graph/curve/tess/GraphVertex.java b/src/jogl/classes/jogamp/graph/curve/tess/GraphVertex.java
new file mode 100644
index 0000000..52d02ba
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/curve/tess/GraphVertex.java
@@ -0,0 +1,123 @@
+/**
+ * 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.graph.curve.tess;
+
+import java.util.ArrayList;
+
+import com.jogamp.graph.geom.Vertex;
+
+public class GraphVertex {
+    private Vertex point;
+    private ArrayList<HEdge> edges = null;
+    private boolean boundaryContained = false;
+    
+    public GraphVertex(Vertex point) {
+        this.point = point;
+    }
+
+    public Vertex getPoint() {
+        return point;
+    }
+    
+    public float getX(){
+        return point.getX();
+    }
+    
+    public float getY(){
+        return point.getY();
+    }
+    
+    public float getZ(){
+        return point.getZ();
+    }
+    public float[] getCoord() {
+        return point.getCoord();
+    }
+
+    public void setPoint(Vertex point) {
+        this.point = point;
+    }
+
+    public ArrayList<HEdge> getEdges() {
+        return edges;
+    }
+
+    public void setEdges(ArrayList<HEdge> edges) {
+        this.edges = edges;
+    }
+    
+    public void addEdge(HEdge edge){
+        if(edges == null){
+            edges = new ArrayList<HEdge>();
+        }
+        edges.add(edge);
+    }
+    public void removeEdge(HEdge edge){
+        if(edges == null)
+            return;
+        edges.remove(edge);
+        if(edges.size() == 0){
+            edges = null;
+        }
+    }
+    public HEdge findNextEdge(GraphVertex nextVert){
+        for(int i=0; i<edges.size(); i++) {
+            HEdge e = edges.get(i);
+            if(e.getNext().getGraphPoint() == nextVert){
+                return e;
+            }
+        }
+        return null;
+    }
+    public HEdge findBoundEdge(){
+        for(int i=0; i<edges.size(); i++) {
+            HEdge e = edges.get(i);
+            if((e.getType() == HEdge.BOUNDARY) || (e.getType() == HEdge.HOLE)){
+                return e;
+            }
+        }
+        return null;
+    }
+    public HEdge findPrevEdge(GraphVertex prevVert){
+        for(int i=0; i<edges.size(); i++) {
+            HEdge e = edges.get(i);
+            if(e.getPrev().getGraphPoint() == prevVert){
+                return e;
+            }
+        }
+        return null;
+    }
+    
+    public boolean isBoundaryContained() {
+        return boundaryContained;
+    }
+
+    public void setBoundaryContained(boolean boundaryContained) {
+        this.boundaryContained = boundaryContained;
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/curve/tess/HEdge.java b/src/jogl/classes/jogamp/graph/curve/tess/HEdge.java
new file mode 100644
index 0000000..4d29a81
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/curve/tess/HEdge.java
@@ -0,0 +1,130 @@
+/**
+ * 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.graph.curve.tess;
+
+import com.jogamp.graph.geom.Vertex;
+import com.jogamp.graph.geom.Triangle;
+
+
+public class HEdge {
+    public static int BOUNDARY = 3;
+    public static int INNER = 1;
+    public static int HOLE = 2;
+    
+    private GraphVertex vert;
+    private HEdge prev = null;
+    private HEdge next = null;
+    private HEdge sibling = null;
+    private int type = BOUNDARY;
+    private Triangle triangle = null;
+    
+    public HEdge(GraphVertex vert, int type) {
+        this.vert = vert;
+        this.type = type;
+    }
+
+    public HEdge(GraphVertex vert, HEdge prev, HEdge next, HEdge sibling, int type) {
+        this.vert = vert;
+        this.prev = prev;
+        this.next = next;
+        this.sibling = sibling;
+        this.type = type;
+    }
+
+    public HEdge(GraphVertex vert, HEdge prev, HEdge next, HEdge sibling, int type, Triangle triangle) {
+        this.vert = vert;
+        this.prev = prev;
+        this.next = next;
+        this.sibling = sibling;
+        this.type = type;
+        this.triangle = triangle;
+    }
+
+    public GraphVertex getGraphPoint() {
+        return vert;
+    }
+
+    public void setVert(GraphVertex vert) {
+        this.vert = vert;
+    }
+
+    public HEdge getPrev() {
+        return prev;
+    }
+
+    public void setPrev(HEdge prev) {
+        this.prev = prev;
+    }
+
+    public HEdge getNext() {
+        return next;
+    }
+
+    public void setNext(HEdge next) {
+        this.next = next;
+    }
+
+    public HEdge getSibling() {
+        return sibling;
+    }
+
+    public void setSibling(HEdge sibling) {
+        this.sibling = sibling;
+    }
+
+    public int getType() {
+        return type;
+    }
+
+    public void setType(int type) {
+        this.type = type;
+    }
+
+    public Triangle getTriangle() {
+        return triangle;
+    }
+
+    public void setTriangle(Triangle triangle) {
+        this.triangle = triangle;
+    }
+    
+    public static <T extends Vertex> void connect(HEdge first, HEdge next){
+        first.setNext(next);
+        next.setPrev(first);
+    }
+    
+    public static <T extends Vertex> void makeSiblings(HEdge first, HEdge second){
+        first.setSibling(second);
+        second.setSibling(first);
+    }
+    
+    public boolean vertexOnCurveVertex(){
+        return vert.getPoint().isOnCurve();
+    }
+    
+}
diff --git a/src/jogl/classes/jogamp/graph/curve/tess/Loop.java b/src/jogl/classes/jogamp/graph/curve/tess/Loop.java
new file mode 100644
index 0000000..b4b796b
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/curve/tess/Loop.java
@@ -0,0 +1,332 @@
+/**
+ * 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.graph.curve.tess;
+
+import java.util.ArrayList;
+
+
+import com.jogamp.graph.geom.AABBox;
+import com.jogamp.graph.geom.Vertex;
+import com.jogamp.graph.geom.Triangle;
+import com.jogamp.graph.math.VectorUtil;
+
+public class Loop {
+    private HEdge root = null;
+    private AABBox box = new AABBox();
+    private GraphOutline initialOutline = null;
+
+    public Loop(GraphOutline polyline, VectorUtil.Winding winding){
+        initialOutline = polyline;
+        this.root = initFromPolyline(initialOutline, winding);
+    }
+
+    public HEdge getHEdge(){
+        return root;
+    }
+
+    public Triangle cut(boolean delaunay){
+        if(isSimplex()){
+            Triangle t = new Triangle(root.getGraphPoint().getPoint(), root.getNext().getGraphPoint().getPoint(), 
+                    root.getNext().getNext().getGraphPoint().getPoint());
+            t.setVerticesBoundary(checkVerticesBoundary(root));
+            return t;
+        }
+        HEdge prev = root.getPrev();
+        HEdge next1 = root.getNext();
+
+        HEdge next2 = findClosestValidNeighbor(next1.getNext(), delaunay);
+        if(next2 == null){
+            root = root.getNext();
+            return null;
+        }
+
+        GraphVertex v1 = root.getGraphPoint();
+        GraphVertex v2 = next1.getGraphPoint();
+        GraphVertex v3 = next2.getGraphPoint();
+
+        HEdge v3Edge = new HEdge(v3, HEdge.INNER);
+
+        HEdge.connect(v3Edge, root);
+        HEdge.connect(next1, v3Edge);
+
+        HEdge v3EdgeSib = v3Edge.getSibling();
+        if(v3EdgeSib == null){
+            v3EdgeSib = new HEdge(v3Edge.getNext().getGraphPoint(), HEdge.INNER);
+            HEdge.makeSiblings(v3Edge, v3EdgeSib);
+        }
+
+        HEdge.connect(prev, v3EdgeSib);
+        HEdge.connect(v3EdgeSib, next2);
+
+        Triangle t = createTriangle(v1.getPoint(), v2.getPoint(), v3.getPoint(), root);
+        this.root = next2;
+        return t;
+    }
+
+    public boolean isSimplex(){
+        return (root.getNext().getNext().getNext() == root);
+    }
+
+    /**Create a connected list of half edges (loop)
+     * from the boundary profile
+     * @param reqWinding requested winding of edges (CCW or CW)
+     */
+    private HEdge initFromPolyline(GraphOutline outline, VectorUtil.Winding reqWinding){
+        ArrayList<GraphVertex> vertices = outline.getGraphPoint();
+
+        if(vertices.size()<3) {
+            throw new IllegalArgumentException("outline's vertices < 3: " + vertices.size());
+        }
+        final VectorUtil.Winding hasWinding = VectorUtil.getWinding(
+                                 vertices.get(0).getPoint(), 
+                                 vertices.get(1).getPoint(),
+                                 vertices.get(2).getPoint());
+        //FIXME: handle case when vertices come inverted - Rami
+        // skips inversion CW -> CCW
+        final boolean invert =  hasWinding != reqWinding &&
+                                reqWinding == VectorUtil.Winding.CW;
+       
+        final int max;
+        final int edgeType = reqWinding == VectorUtil.Winding.CCW ? HEdge.BOUNDARY : HEdge.HOLE ;
+        int index;
+        HEdge firstEdge = null;
+        HEdge lastEdge = null;
+        
+        if(!invert) {
+            max = vertices.size();
+            index = 0;
+        } else {
+            max = -1;
+            index = vertices.size() -1;
+        }
+
+        while(index != max){
+            GraphVertex v1 = vertices.get(index);
+            box.resize(v1.getX(), v1.getY(), v1.getZ());
+
+            HEdge edge = new HEdge(v1, edgeType);
+
+            v1.addEdge(edge);
+            if(lastEdge != null) {
+                lastEdge.setNext(edge);
+                edge.setPrev(lastEdge);
+            } else {
+                firstEdge = edge;
+            }
+
+            if(!invert) {
+                if(index == vertices.size()-1) {
+                    edge.setNext(firstEdge);
+                    firstEdge.setPrev(edge);
+                }
+                index++;
+            } else {
+                if (index == 0) {
+                    edge.setNext(firstEdge);
+                    firstEdge.setPrev(edge);
+                }
+                index--;
+            }
+            lastEdge = edge;
+        }
+        return firstEdge;
+    }
+
+    public void addConstraintCurve(GraphOutline polyline) {
+        //        GraphOutline outline = new GraphOutline(polyline);
+        /**needed to generate vertex references.*/
+        initFromPolyline(polyline, VectorUtil.Winding.CW); 
+
+        GraphVertex v3 = locateClosestVertex(polyline);
+        HEdge v3Edge = v3.findBoundEdge();
+        HEdge v3EdgeP = v3Edge.getPrev();
+        HEdge crossEdge = new HEdge(root.getGraphPoint(), HEdge.INNER);
+
+        HEdge.connect(root.getPrev(), crossEdge);
+        HEdge.connect(crossEdge, v3Edge);
+
+        HEdge crossEdgeSib = crossEdge.getSibling();
+        if(crossEdgeSib == null) {
+            crossEdgeSib = new HEdge(crossEdge.getNext().getGraphPoint(), HEdge.INNER);
+            HEdge.makeSiblings(crossEdge, crossEdgeSib);
+        }
+
+        HEdge.connect(v3EdgeP, crossEdgeSib);
+        HEdge.connect(crossEdgeSib, root);
+    }
+
+    /** Locates the vertex and update the loops root 
+     * to have (root + vertex) as closest pair 
+     * @param polyline the control polyline 
+     * to search for closestvertices
+     * @return the vertex that is closest to the newly set root Hedge.
+     */
+    private GraphVertex locateClosestVertex(GraphOutline polyline) {
+        HEdge closestE = null;
+        GraphVertex closestV = null;
+
+        float minDistance = Float.MAX_VALUE;
+        boolean inValid = false;
+        ArrayList<GraphVertex> initVertices = initialOutline.getGraphPoint();
+        ArrayList<GraphVertex> vertices = polyline.getGraphPoint();
+
+        for(int i=0; i< initVertices.size()-1; i++){
+            GraphVertex v = initVertices.get(i);
+            GraphVertex nextV = initVertices.get(i+1);
+            for(int pos=0; pos<vertices.size(); pos++) {
+                GraphVertex cand = vertices.get(pos);
+                float distance = VectorUtil.computeLength(v.getCoord(), cand.getCoord());
+                if(distance < minDistance){
+                    for (GraphVertex vert:vertices){
+                        if(vert == v || vert == nextV || vert == cand)
+                            continue;
+                        inValid = VectorUtil.inCircle(v.getPoint(), nextV.getPoint(), 
+                                cand.getPoint(), vert.getPoint());
+                        if(inValid){
+                            break;
+                        }
+                    }
+                    if(!inValid){
+                        closestV = cand;
+                        minDistance = distance;
+                        closestE = v.findBoundEdge();
+                    }
+                }
+
+            }
+        }
+
+        if(closestE != null){
+            root = closestE;
+        }
+
+        return closestV;
+    }
+
+    private HEdge findClosestValidNeighbor(HEdge edge, boolean delaunay) {
+        HEdge next = root.getNext();
+
+        if(!VectorUtil.ccw(root.getGraphPoint().getPoint(), next.getGraphPoint().getPoint(),
+                edge.getGraphPoint().getPoint())){
+            return null;
+        }
+
+        HEdge candEdge = edge;
+        boolean inValid = false;
+
+        if(delaunay){
+            Vertex cand = candEdge.getGraphPoint().getPoint();
+            HEdge e = candEdge.getNext();
+            while (e != candEdge){
+                if(e.getGraphPoint() == root.getGraphPoint() 
+                        || e.getGraphPoint() == next.getGraphPoint() 
+                        || e.getGraphPoint().getPoint() == cand){
+                    e = e.getNext();
+                    continue;
+                }
+                inValid = VectorUtil.inCircle(root.getGraphPoint().getPoint(), next.getGraphPoint().getPoint(),
+                        cand, e.getGraphPoint().getPoint());
+                if(inValid){
+                    break;
+                }
+                e = e.getNext();
+            }
+        }
+        if(!inValid){
+            return candEdge;
+        }
+        return null;
+    }
+
+    /** Create a triangle from the param vertices only if
+     * the triangle is valid. IE not outside region.
+     * @param v1 vertex 1
+     * @param v2 vertex 2
+     * @param v3 vertex 3
+     * @param root and edge of this triangle
+     * @return the triangle iff it satisfies, null otherwise
+     */
+    private Triangle createTriangle(Vertex v1, Vertex v2, Vertex v3, HEdge rootT){
+        Triangle t = new Triangle(v1, v2, v3);
+        t.setVerticesBoundary(checkVerticesBoundary(rootT));
+        return t;
+    }
+
+    private boolean[] checkVerticesBoundary(HEdge rootT) {
+        boolean[] boundary = new boolean[3];
+        HEdge e1 = rootT;
+        HEdge e2 = rootT.getNext();
+        HEdge e3 = rootT.getNext().getNext();
+
+        if(e1.getGraphPoint().isBoundaryContained()){
+                boundary[0] = true;
+        }
+        if(e2.getGraphPoint().isBoundaryContained()){
+                boundary[1] = true;
+        }
+        if(e3.getGraphPoint().isBoundaryContained()){
+                boundary[2] = true;
+        }
+        return boundary;
+    }
+
+    public boolean checkInside(Vertex v) {
+        if(!box.contains(v.getX(), v.getY(), v.getZ())){
+            return false;
+        }
+
+        boolean inside = false;
+        HEdge current = root;
+        HEdge next = root.getNext();
+        do {
+            Vertex v2 = current.getGraphPoint().getPoint();
+            Vertex v1 = next.getGraphPoint().getPoint();
+
+            if ( ((v1.getY() > v.getY()) != (v2.getY() > v.getY())) &&
+                  (v.getX() < (v2.getX() - v1.getX()) * (v.getY() - v1.getY()) / (v2.getY() - v1.getY()) + v1.getX()) ){
+                inside = !inside;
+            }
+            
+            current = next;
+            next = current.getNext();
+            
+        } while(current != root);
+        
+        return inside;
+    }
+    
+    public int computeLoopSize(){
+        int size = 0;
+        HEdge e = root;
+        do{
+            size++;
+            e = e.getNext();
+        }while(e != root);
+        return size;
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/curve/text/GlyphShape.java b/src/jogl/classes/jogamp/graph/curve/text/GlyphShape.java
new file mode 100644
index 0000000..5781486
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/curve/text/GlyphShape.java
@@ -0,0 +1,99 @@
+/**
+ * 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.graph.curve.text;
+
+import java.util.ArrayList;
+
+import com.jogamp.graph.geom.Vertex;
+import com.jogamp.graph.geom.Triangle;
+import com.jogamp.graph.geom.Vertex.Factory;
+
+import com.jogamp.graph.curve.OutlineShape;
+import com.jogamp.graph.math.Quaternion;
+
+public class GlyphShape {
+    
+    private Quaternion quat= null;
+    private OutlineShape shape = null;
+    
+    /** Create a new Glyph shape
+     * based on Parametric curve control polyline
+     */
+    public GlyphShape(Vertex.Factory<? extends Vertex> factory){
+        shape = new OutlineShape(factory);
+    }
+    
+    /** Create a new GlyphShape from a {@link OutlineShape}
+     * @param factory vertex impl factory {@link Factory}
+     * @param shape {@link OutlineShape} representation of the Glyph
+     */
+    public GlyphShape(Vertex.Factory<? extends Vertex> factory, OutlineShape shape){
+        this(factory);
+        this.shape = shape;
+        this.shape.transformOutlines(OutlineShape.VerticesState.QUADRATIC_NURBS);
+    }
+    
+    public final Vertex.Factory<? extends Vertex> vertexFactory() { return shape.vertexFactory(); }
+    
+    public OutlineShape getShape() {
+        return shape;
+    }
+    
+    public int getNumVertices() {
+        return shape.getVertices().size();
+    }
+    
+    /** Get the rotational Quaternion attached to this Shape
+     * @return the Quaternion Object
+     */
+    public Quaternion getQuat() {
+        return quat;
+    }
+    
+    /** Set the Quaternion that shall defien the rotation
+     * of this shape.
+     * @param quat
+     */
+    public void setQuat(Quaternion quat) {
+        this.quat = quat;
+    }
+    
+    /** Triangluate the glyph shape
+     * @return ArrayList of triangles which define this shape
+     */
+    public ArrayList<Triangle> triangulate(){
+        return shape.triangulate();
+    }
+
+    /** Get the list of Vertices of this Object
+     * @return arrayList of Vertices
+     */
+    public ArrayList<Vertex> getVertices(){
+        return shape.getVertices();
+    }    
+}
diff --git a/src/jogl/classes/jogamp/graph/curve/text/GlyphString.java b/src/jogl/classes/jogamp/graph/curve/text/GlyphString.java
new file mode 100644
index 0000000..2fa7084
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/curve/text/GlyphString.java
@@ -0,0 +1,206 @@
+/**
+ * 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.graph.curve.text;
+
+import java.util.ArrayList;
+
+import com.jogamp.graph.font.Font;
+import com.jogamp.graph.geom.AABBox;
+import com.jogamp.graph.geom.Vertex;
+import com.jogamp.graph.geom.Triangle;
+import com.jogamp.graph.geom.Vertex.Factory;
+import com.jogamp.graph.geom.opengl.SVertex;
+
+import javax.media.opengl.GL2ES2;
+
+import jogamp.graph.curve.opengl.RegionFactory;
+import jogamp.graph.font.FontInt;
+
+import com.jogamp.graph.curve.OutlineShape;
+import com.jogamp.graph.curve.Region;
+import com.jogamp.graph.curve.opengl.GLRegion;
+import com.jogamp.graph.curve.opengl.RenderState;
+
+public class GlyphString {
+    /** Static font size for all default font OutlineShape generations via {@link #createString(OutlineShape, Factory, Font, String)}.
+     * <p>The actual font size shall be accomplished by the GL PMV matrix.</p>
+     */
+    public static final int STATIC_FONT_SIZE = 10;
+    
+    private ArrayList<GlyphShape> glyphs = new ArrayList<GlyphShape>();
+    private CharSequence str;
+    private String fontname;
+    private GLRegion region;
+    
+    private SVertex origin = new SVertex();
+
+    /**
+     * <p>Uses {@link #STATIC_FONT_SIZE}.</p>
+     * <p>No caching is performed.</p>
+     * 
+     * @param shape is not null, add all {@link GlyphShape}'s {@link Outline} to this instance.
+     * @param vertexFactory vertex impl factory {@link Factory}
+     * @param font the target {@link Font} 
+     * @param str string text
+     * @return the created {@link GlyphString} instance
+     */
+    public static GlyphString createString(OutlineShape shape, Factory<? extends Vertex> vertexFactory, Font font, String str) {
+        return createString(shape, vertexFactory, font, STATIC_FONT_SIZE, str); 
+    }
+    
+    /**
+     * <p>No caching is performed.</p>
+     * 
+     * @param shape is not null, add all {@link GlyphShape}'s {@link Outline} to this instance.
+     * @param vertexFactory vertex impl factory {@link Factory}
+     * @param font the target {@link Font} 
+     * @param size font size
+     * @param str string text
+     * @return the created {@link GlyphString} instance
+     */
+    public static GlyphString createString(OutlineShape shape, Factory<? extends Vertex> vertexFactory, Font font, int fontSize, String str) {
+    	ArrayList<OutlineShape> shapes = ((FontInt)font).getOutlineShapes(str, fontSize, vertexFactory);
+        
+        GlyphString glyphString = new GlyphString(font.getName(Font.NAME_UNIQUNAME), str);
+        glyphString.createfromOutlineShapes(vertexFactory, shapes);
+        if(null != shape) {
+            for(int i=0; i<glyphString.glyphs.size(); i++) {
+                shape.addOutlineShape(glyphString.glyphs.get(i).getShape());
+            }    
+        }
+        return glyphString;
+    }
+    
+    /** Create a new GlyphString object
+     * @param fontname the name of the font that this String is
+     * associated with
+     * @param str the string object
+     */
+    public GlyphString(String fontname, CharSequence str){
+        this.fontname = fontname;
+        this.str = str;
+    }
+    
+    public void addGlyphShape(GlyphShape glyph){
+        glyphs.add(glyph);
+    }
+    
+    public CharSequence getString(){
+        return str;
+    }
+
+    /**Creates the Curve based Glyphs from a list of {@link OutlineShape} 
+     * @param vertexFactory vertex impl factory {@link Factory}
+     * @param shapes list of {@link OutlineShape} 
+     */
+    public void createfromOutlineShapes(Factory<? extends Vertex> vertexFactory, ArrayList<OutlineShape> shapes) {
+        final int numGlyps = shapes.size();
+        for (int index=0;index<numGlyps;index++){
+            if(shapes.get(index) == null){
+                continue;
+            }
+            GlyphShape glyphShape = new GlyphShape(vertexFactory, shapes.get(index));
+            
+            if(glyphShape.getNumVertices() < 3) {
+                continue;
+            }            
+            addGlyphShape(glyphShape);
+        }
+    }
+    
+    
+    /** Generate a OGL Region to represent this Object.
+     * @param gl the current gl object
+     * @param rs the current attached RenderState
+     * @param renderModes bit-field of modes, e.g. {@link Region#VARIABLE_CURVE_WEIGHT_BIT}, {@link Region#VBAA_RENDERING_BIT} 
+     */
+    public GLRegion createRegion(GL2ES2 gl, int renderModes){
+        region = RegionFactory.create(renderModes);
+        // region.setFlipped(true);
+        
+        int numVertices = region.getNumVertices();
+        
+        for(int i=0; i< glyphs.size(); i++) {
+            final GlyphShape glyph = glyphs.get(i);
+            ArrayList<Triangle> gtris = glyph.triangulate();
+            region.addTriangles(gtris);
+            
+            final ArrayList<Vertex> gVertices = glyph.getVertices();
+            for(int j=0; j<gVertices.size(); j++) {
+                final Vertex gVert = gVertices.get(j);
+                gVert.setId(numVertices++);
+                region.addVertex(gVert);
+            }
+        }
+        return region;
+    }
+    
+    /** Generate a Hashcode for this object 
+     * @return a string defining the hashcode
+     */
+    public String getTextHashCode(){
+        return "" + fontname.hashCode() + str.hashCode();
+    }
+
+    /** Render the Object based using the associated Region
+     *  previously generated.
+     */
+    public void renderString3D(GL2ES2 gl) {
+        region.draw(gl, null, 0, 0, 0);
+    }
+    /** Render the Object based using the associated Region
+     *  previously generated.
+     */
+    public void renderString3D(GL2ES2 gl, RenderState rs, int vp_width, int vp_height, int size) {
+        region.draw(gl, rs, vp_width, vp_height, size);
+    }
+    
+    /** Get the Origin of this GlyphString
+     * @return 
+     */
+    public Vertex getOrigin() {
+        return origin;
+    }
+
+    /** Destroy the associated OGL objects
+     * @param rs the current attached RenderState
+     */
+    public void destroy(GL2ES2 gl, RenderState rs) {
+        if(null != gl && null != rs) {
+            region.destroy(gl, rs);
+            region = null;
+        } else if(null != region) {
+            throw new InternalError("destroy called w/o GL context, but has a region");
+        }
+        glyphs.clear();
+    }
+    
+    public AABBox getBounds(){
+        return region.getBounds();
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/font/FontConstructor.java b/src/jogl/classes/jogamp/graph/font/FontConstructor.java
new file mode 100644
index 0000000..721b207
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/FontConstructor.java
@@ -0,0 +1,39 @@
+/**
+ * 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 jogamp.graph.font;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+
+import com.jogamp.graph.font.Font;
+
+public interface FontConstructor {
+    Font create(File file) throws IOException ;
+    Font create(URL url) throws IOException ;
+}
diff --git a/src/jogl/classes/jogamp/graph/font/FontInt.java b/src/jogl/classes/jogamp/graph/font/FontInt.java
new file mode 100644
index 0000000..37660bb
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/FontInt.java
@@ -0,0 +1,53 @@
+/**
+ * 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 jogamp.graph.font;
+
+import java.util.ArrayList;
+
+import jogamp.graph.geom.plane.Path2D;
+
+import com.jogamp.graph.curve.OutlineShape;
+import com.jogamp.graph.font.Font;
+import com.jogamp.graph.geom.Vertex;
+import com.jogamp.graph.geom.Vertex.Factory;
+
+public interface FontInt extends Font {
+
+    public interface Glyph extends Font.Glyph {
+        // reserved special glyph IDs 
+        // http://scripts.sil.org/cms/scripts/page.php?item_id=IWS-Chapter08#ba57949e
+        public static final int ID_UNKNOWN = 0;
+        public static final int ID_CR = 2;
+        public static final int ID_SPACE = 3;
+                
+        public Path2D getPath();  // unscaled path
+        public Path2D getPath(float pixelSize);         
+    }
+
+    public ArrayList<OutlineShape> getOutlineShapes(CharSequence string, float pixelSize, Factory<? extends Vertex> vertexFactory);
+}
diff --git a/src/jogl/classes/jogamp/graph/font/JavaFontLoader.java b/src/jogl/classes/jogamp/graph/font/JavaFontLoader.java
new file mode 100644
index 0000000..6b82606
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/JavaFontLoader.java
@@ -0,0 +1,155 @@
+/**
+ * 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 jogamp.graph.font;
+
+import java.io.File;
+import java.io.IOException;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
+import javax.media.opengl.GLException;
+
+import com.jogamp.common.util.IntObjectHashMap;
+import com.jogamp.graph.font.Font;
+import com.jogamp.graph.font.FontSet;
+import com.jogamp.graph.font.FontFactory;
+
+public class JavaFontLoader implements FontSet {
+    
+    final static FontSet fontLoader = new JavaFontLoader();
+
+    public static FontSet get() {
+        return fontLoader;
+    }
+    
+    final static String availableFontFileNames[] =
+    {
+        /* 00 */ "LucidaBrightRegular.ttf",
+        /* 01 */ "LucidaBrightItalic.ttf",
+        /* 02 */ "LucidaBrightDemiBold.ttf",
+        /* 03 */ "LucidaBrightDemiItalic.ttf",
+        /* 04 */ "LucidaSansRegular.ttf",
+        /* 05 */ "LucidaSansDemiBold.ttf",
+        /* 06 */ "LucidaTypewriterRegular.ttf",
+        /* 07 */ "LucidaTypewriterBold.ttf",
+    };
+        
+    final String javaFontPath;
+    
+    private JavaFontLoader() {
+        final String javaHome = AccessController.doPrivileged(new PrivilegedAction<String>() {
+            public String run() {
+                return System.getProperty("java.home");
+            }
+        });
+        if(null != javaHome) {
+            javaFontPath = javaHome + "/lib/fonts/";
+        } else {
+            javaFontPath = null;
+        }
+    }
+
+    // FIXME: Add cache size to limit memory usage 
+    static final IntObjectHashMap fontMap = new IntObjectHashMap();
+    
+    static boolean is(int bits, int bit) {
+        return 0 != ( bits & bit ) ;
+    }
+    
+    public Font getDefault() {
+        return get(FAMILY_REGULAR, 0) ; // Sans Serif Regular 
+    }
+    
+    public Font get(int family, int style)    {
+        Font font = (Font)fontMap.get( ( family << 8 ) | style );
+        if (font != null) {
+            return font;
+        }
+
+        // 1st process Sans Serif (2 fonts)
+        if( is(style, STYLE_SERIF) ) {                
+            if( is(style, STYLE_BOLD) ) {                
+                font = abspath(availableFontFileNames[5], family, style);
+            } else {
+                font = abspath(availableFontFileNames[4], family, style);
+            }
+            if(null != font) {
+                fontMap.put( ( family << 8 ) | style, font );
+            }
+            return font;
+        }
+        
+        // Serif Fonts ..
+        switch (family) {
+            case FAMILY_LIGHT:
+            case FAMILY_MEDIUM:
+            case FAMILY_CONDENSED:
+            case FAMILY_REGULAR:
+                if( is(style, STYLE_BOLD) ) {                
+                    if( is(style, STYLE_ITALIC) ) {                
+                        font = abspath(availableFontFileNames[3], family, style);
+                    } else {
+                        font = abspath(availableFontFileNames[2], family, style);
+                    }
+                } else if( is(style, STYLE_ITALIC) ) {                
+                    font = abspath(availableFontFileNames[1], family, style);
+                } else {
+                    font = abspath(availableFontFileNames[0], family, style);
+                }
+                break;
+                
+            case FAMILY_MONOSPACED:
+                if( is(style, STYLE_BOLD) ) {                
+                    font = abspath(availableFontFileNames[7], family, style);
+                } else {
+                    font = abspath(availableFontFileNames[6], family, style);
+                }
+                break;                
+        }
+
+        return font;
+    }
+    
+    Font abspath(String fname, int family, int style) {
+        if(null == javaFontPath) {
+            throw new GLException("java font path undefined");
+        }
+        final String err = "Problem loading font "+fname+", file "+javaFontPath+fname ;
+                
+        try {
+            final Font f = FontFactory.get( new File(javaFontPath+fname) );
+            if(null != f) {
+                fontMap.put( ( family << 8 ) | style, f );
+                return f;
+            }
+            throw new GLException(err);            
+        } catch (IOException ioe) {
+            throw new GLException(err, ioe);            
+        }
+    }    
+}
diff --git a/src/jogl/classes/jogamp/graph/font/UbuntuFontLoader.java b/src/jogl/classes/jogamp/graph/font/UbuntuFontLoader.java
new file mode 100644
index 0000000..572955f
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/UbuntuFontLoader.java
@@ -0,0 +1,139 @@
+/**
+ * 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 jogamp.graph.font;
+
+import java.io.IOException;
+import javax.media.opengl.GLException;
+
+import com.jogamp.common.util.IntObjectHashMap;
+import com.jogamp.common.util.IOUtil;
+
+import com.jogamp.graph.font.Font;
+import com.jogamp.graph.font.FontSet;
+import com.jogamp.graph.font.FontFactory;
+import java.net.URL;
+
+public class UbuntuFontLoader implements FontSet {
+    
+    final static FontSet fontLoader = new UbuntuFontLoader();
+
+    public static FontSet get() {
+        return fontLoader;
+    }
+    
+    final static String availableFontFileNames[] =
+    {
+        /* 00 */ "Ubuntu-R.ttf",   // regular
+        /* 01 */ "Ubuntu-RI.ttf",  // regular italic
+        /* 02 */ "Ubuntu-B.ttf",   // bold     
+        /* 03 */ "Ubuntu-BI.ttf",  // bold italic
+        /* 04 */ "Ubuntu-L.ttf",   // light
+        /* 05 */ "Ubuntu-LI.ttf",  // light italic
+        /* 06 */ "Ubuntu-M.ttf",   // medium
+        /* 07 */ "Ubuntu-MI.ttf",  // medium italic
+
+    };
+        
+    final static String relPath = "fonts/ubuntu/" ;    
+    
+    private UbuntuFontLoader() {
+    }
+
+    // FIXME: Add cache size to limit memory usage 
+    static final IntObjectHashMap fontMap = new IntObjectHashMap();
+        
+    static boolean is(int bits, int bit) {
+        return 0 != ( bits & bit ) ;
+    }
+    
+    public Font getDefault() {
+        return get(FAMILY_REGULAR, 0) ; // Sans Serif Regular 
+    }
+    
+    public Font get(int family, int style)
+    {
+        Font font = (Font)fontMap.get( ( family << 8 ) | style );
+        if (font != null) {
+            return font;
+        }
+
+        switch (family) {
+            case FAMILY_MONOSPACED:
+            case FAMILY_CONDENSED:
+            case FAMILY_REGULAR:
+                if( is(style, STYLE_BOLD) ) {
+                    if( is(style, STYLE_ITALIC) ) {
+                        font = abspath(availableFontFileNames[3], family, style);
+                    } else {
+                        font = abspath(availableFontFileNames[2], family, style);
+                    }
+                } else if( is(style, STYLE_ITALIC) ) {
+                    font = abspath(availableFontFileNames[1], family, style);
+                } else {
+                    font = abspath(availableFontFileNames[0], family, style);
+                }
+                break;
+                
+            case FAMILY_LIGHT:
+                if( is(style, STYLE_ITALIC) ) {
+                    font = abspath(availableFontFileNames[5], family, style);
+                } else {
+                    font = abspath(availableFontFileNames[4], family, style);
+                }
+                break;
+                
+            case FAMILY_MEDIUM:
+                if( is(style, STYLE_ITALIC) ) {
+                    font = abspath(availableFontFileNames[6], family, style);
+                } else {
+                    font = abspath(availableFontFileNames[7], family, style);
+                }
+                break;                
+        }
+
+        return font;
+    }
+        
+    Font abspath(String fname, int family, int style) {
+        final String err = "Problem loading font "+fname+", stream "+relPath+fname;
+        try {
+            URL url = IOUtil.getResource(UbuntuFontLoader.class, relPath+fname);
+            if(null == url) {
+                throw new GLException(err);
+            }
+            final Font f= FontFactory.get ( url ) ;
+            if(null != f) {
+                fontMap.put( ( family << 8 ) | style, f );
+                return f;
+            }        
+            throw new GLException(err);
+        } catch(IOException ioe) {
+            throw new GLException(err, ioe);            
+        }
+    }           
+}
diff --git a/src/jogl/classes/jogamp/graph/font/fonts/ubuntu/CONTRIBUTING.txt b/src/jogl/classes/jogamp/graph/font/fonts/ubuntu/CONTRIBUTING.txt
new file mode 100644
index 0000000..15bdc0c
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/fonts/ubuntu/CONTRIBUTING.txt
@@ -0,0 +1,21 @@
+The Ubuntu Font Family is very long-term endeavour, and the first time
+that a professionally-designed font has been funded specifically with
+the intent of being an on-going community expanded project:
+
+  http://font.ubuntu.com/
+
+Development of the Ubuntu Font Family is undertaken on Launchpad:
+
+  http://launchpad.net/ubuntu-font-family/
+
+and this is where milestones, bug management and releases are handled.
+
+Contributions are welcomed.  Your work will be used on millions of
+computers every single day!  Following the initial bootstrapping of
+Latin, Cyrillic, Greek, Arabic and Hebrew expansion will be undertaken
+by font designers from the font design and Ubuntu communities.
+
+To ensure that the Ubuntu Font Family can be re-licensed to future
+widely-used libre font licences, copyright assignment is being required:
+
+  https://launchpad.net/~uff-contributors
diff --git a/src/jogl/classes/jogamp/graph/font/fonts/ubuntu/FONTLOG.txt b/src/jogl/classes/jogamp/graph/font/fonts/ubuntu/FONTLOG.txt
new file mode 100644
index 0000000..cf0e4c1
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/fonts/ubuntu/FONTLOG.txt
@@ -0,0 +1,211 @@
+This is the FONTLOG file for the Ubuntu Font Family and attempts to follow
+the recommendations at:  http://scripts.sil.org/OFL-FAQ_web#43cecb44
+
+
+Overview
+
+The new Ubuntu Font Family was started to enable the personality of
+Ubuntu to be seen and felt in every menu, button and dialog.
+The typeface is sans-serif, uses OpenType features and is manually
+hinted for clarity on desktop and mobile computing screens.
+
+The scope of the Ubuntu Font Family includes all the languages used by
+the various Ubuntu users around the world in tune with Ubuntu's
+philosophy which states that every user should be able to use their
+software in the language of their choice. So the Ubuntu Font Family
+project will be extended to cover many more written languages.
+
+
+History
+
+The Ubuntu Font Family has been creating during 2010.  As of December 2010
+coverage is provided for Latin, Cyrillic and Greek across Regular, Italic,
+Bold and Bold-Italic.
+
+
+ChangeLog
+
+2010-03-08 (Paul Sladen) Ubuntu Font Family version 0.71.2
+
+  * (Production) Adjust Medium WeightClass to 500 (Md, MdIt) (LP: #730912)
+
+2010-03-07 (Paul Sladen) Ubuntu Font Family version 0.71.1
+
+  * (Design) Add Capitalised version of glyphs and kern. (Lt, LtIt,
+    Md, MdIt) DM (LP: #677446)
+  * (Design) Re-space and tighen Regular and Italic by amount specified
+    by Mark Shuttleworth (minus 4 FUnits). (Rg, It) (LP: #677149)
+  * (Design) Design: Latin (U+0192) made straight more like l/c f with
+    tail (LP: #670768)
+  * (Design) (U+01B3) should have hook on right, as the lowercase
+    (U+01B4) (LP: #681026)
+  * (Design) Tail of Light Italic germandbls, longs and lowercase 'f'
+    to match Italic/BoldItalic (LP: #623925)
+  * (Production) Update <case> feature (Lt, LtIt, Md, MdIt). DM
+    (LP: #676538, #676539)
+  * (Production) Remove Bulgarian locl feature for Italics. (LP: #708578)
+  * (Production) Update Description information with new string:
+      "The Ubuntu Font Family are libre fonts funded by Canonical Ltd
+      on behalf of the Ubuntu project. The font design work and
+      technical implementation is being undertaken by Dalton Maag. The
+      typeface is sans-serif, uses OpenType features and is manually
+      hinted for clarity on desktop and mobile computing screens. The
+      scope of the Ubuntu Font Family includes all the languages used
+      by the various Ubuntu users around the world in tune with
+      Ubuntu's philosophy which states that every user should be able
+      to use their software in the language of their choice. The
+      project is ongoing, and we expect the family will be extended to
+      cover many written languages in the coming years."
+    (Rg, It, Bd, BdIt, Lt, LtIt, Md, MdIt) (LP: #690590)
+  * (Production) Pixel per em indicator added at U+F000 (Lt, LtIt, Md,
+    MdIt) (LP: #615787)
+  * (Production) Version number indicator added at U+EFFD (Lt, LtIt, Md,
+    MdIt) (LP: #640623)
+  * (Production) fstype bit set to 0 - Editable (Lt, LtIt, Md, MdIt)
+    (LP: #648406)
+  * (Production) Localisation of name table has been removed because
+    of problems with Mac OS/X interpretation of localisation. DM
+    (LP: #730785)
+  * (Hinting) Regular '?' dot non-circular (has incorrect control
+    value). (LP: #654336)
+  * (Hinting) Too much space after latin capital 'G' in 13pt
+    regular. Now reduced. (LP: #683437)
+  * (Hinting) Balance Indian Rupee at 18,19pt (LP: #662177)
+  * (Hinting) Make Regular '£' less ambiguous at 13-15 ppm (LP: #685562)
+  * (Hinting) Regular capital 'W' made symmetrical at 31 ppem (LP: #686168)
+
+2010-12-14 (Paul Sladen) Ubuntu Font Family version 0.70.1
+
+  Packaging, rebuilt from '2010-12-08 UbuntuFontsSourceFiles_070.zip':
+  * (Midstream) Fstype bit != 0 (LP: #648406)
+  * (Midstream) Add unit test to validate fstype bits (LP: #648406)
+  * (Midstream) Add unit test to validate licence
+
+2010-12-14 (Paul Sladen) Ubuntu Font Family version 0.70
+
+  Release notes 0.70:
+  * (Design) Add Capitalised version of glyphs and kern. (Rg, It, Bd,
+    BdIt) DM (LP: #676538, #677446)
+  * (Design) Give acute and grave a slight upright move to more match
+    the Hungarian double acute angle. (Rg, It, Bd, BdIt) (LP: #656647)
+  * (Design) Shift Bold Italic accent glyphs to be consistent with the
+    Italic. (BdIt only) DM (LP: #677449)
+  * (Design) Check spacing and kerning of dcaron, lcaron and
+    tcaron. (Rg, It, Bd, BdIt) (LP: #664722)
+  * (Design) Add positive kerning to () {} [] to open out the
+    combinations so they are less like a closed box. (Rg, It, Bd,
+    BdIt) (LP: #671228)
+  * (Design) Change design of acute.asc and check highest points (Bd
+    and BdIt only) DM
+  * (Production) Update <case> feature. DM (LP: #676538, #676539)
+  * (Production) Remove Romanian locl feature. (Rg, It, Bd, BdIt)
+    (LP: #635615)
+  * (Production) Update Copyright information with new
+    strings. "Copyright 2010 Canonical Ltd. Licensed under the Ubuntu
+    Font Licence 1.0" Trademark string "Ubuntu and Canonical are
+    registered trademarks of Canonical Ltd." (Rg, It, Bd, BdIt) DM
+    (LP: #677450)
+  * (Design) Check aligning of hyphen, math signs em, en, check braces
+    and other brackets. 16/11 (LP: #676465)
+  * (Production) Pixel per em indicator added at U+F000 (Rg, It, Bd,
+    BdIt) (LP: #615787)
+  * (Production) Version number indicator added at U+EFFD (Rg, It, Bd,
+    BdIt) (LP: #640623)
+  * (Production) fstype bit set to 0 - Editable (Rg, It, Bd, BdIt)
+    (LP: #648406)
+
+2010-10-05 (Paul Sladen) Ubuntu Font Family version 0.69
+
+  [Dalton Maag]
+  * Italic,
+    - Hinting on lowercase Italic l amended 19ppm (LP: #632451)
+    - Hinting on lowercase Italic u amended 12ppm (LP: #626376)
+
+  * Regular, Italic, Bold, BoldItalic
+    - New Rupee Sign added @ U+20B9 (LP: #645987)
+    - Ubuntu Roundel added @ U+E0FF (LP: #651606)
+
+  [Paul Sladen]
+  * All
+    - Removed "!ubu" GSUB.calt ligature for U+E0FF (LP: #651606)
+
+
+Acknowledgements
+
+If you make modifications be sure to add your name (N), email (E),
+web-address (if you have one) (W) and description (D). This list is in
+alphabetical order.
+
+N: Amélie Bonet
+W: http://ameliebonet.com/
+D: Type design with Dalton Maag, particularly Ubuntu Mono
+
+N: Ron Carpenter
+N: Vincent Connare
+N: Lukas Paltram
+W: http://www.daltonmaag.com/
+D: Type design and engineering with Dalton Maag
+
+N: Dave Crossland
+E: dave at understandingfonts.com
+W: http://understandingfonts.com/
+D: Documentation and libre licensing guidance
+
+N: Iain Farrell
+W: http://www.flickr.com/photos/iain
+D: Ubuntu Font Family delivery for the Ubuntu UX team
+
+N: Shiraaz Gabru
+W: http://www.daltonmaag.com/
+D: Ubuntu Font Family project management at Dalton Maag
+
+N: Marcus Haslam
+W: http://design.canonical.com/author/marcus-haslam/
+D: Creative inspiration
+
+N: Ben Laenen
+D: Inspiration behind the pixels-per-em (PPEM) readout debugging glyph at U+F000
+   (for this font the concept was re-implemented from scratch by Dalton-Maag)
+
+N: Bruno Maag
+W: http://www.daltonmaag.com/
+D: Stylistic direction of the Ubuntu Font Family, as head of Dalton Maag
+
+N: Ivanka Majic
+W: http://www.ivankamajic.com/
+D: Guiding the UX team and Cyrillic feedback
+
+N: David Marshall
+N: Malcolm Wooden
+W: http://www.daltonmaag.com/
+D: Font Engineering and technical direction
+
+N: Rodrigo Rivas
+D: Indian Rupee Sign glyph
+
+N: Mark Shuttleworth
+E: mark at ubuntu.com
+W: http://www.markshuttleworth.com/
+D: Executive quality-control and funding
+
+N: Paul Sladen
+E: ubuntu at paul.sladen.org
+W: http://www.paul.sladen.org/
+D: Bug triaging, packaging
+
+N: Nicolas Spalinger
+W: http://planet.open-fonts.org
+D: Continuous guidance on libre/open font licensing, best practises in source
+   tree layout, release and packaging (pkg-fonts Debian team)
+
+N: Kenneth Wimer
+D: Initial PPA packaging
+
+* Canonical Ltd is the primary commercial sponsor of the Ubuntu and
+  Kubuntu operating systems
+* Dalton Maag are a custom type foundry headed by Bruno Maag
+
+For further documentation, information on contributors, source code
+downloads and those involved with the Ubuntu Font Family, visit:
+
+  http://font.ubuntu.com/
diff --git a/src/jogl/classes/jogamp/graph/font/fonts/ubuntu/LICENCE-FAQ.txt b/src/jogl/classes/jogamp/graph/font/fonts/ubuntu/LICENCE-FAQ.txt
new file mode 100644
index 0000000..776a25e
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/fonts/ubuntu/LICENCE-FAQ.txt
@@ -0,0 +1,177 @@
+                        Ubuntu Font Family Licensing FAQ
+
+  Stylistic Foundations
+
+   The Ubuntu Font Family is the first time that a libre typeface has been
+   designed professionally and explicitly with the intent of developing a
+   public and long-term community-based development process.
+
+   When developing an open project, it is generally necessary to have firm
+   foundations: a font needs to maintain harmony within itself even across
+   many type designers and writing systems. For the [1]Ubuntu Font Family,
+   the process has been guided with the type foundry Dalton Maag setting
+   the project up with firm stylistic foundation covering several
+   left-to-right scripts: Latin, Greek and Cyrillic; and right-to-left
+   scripts: Arabic and Hebrew (due in 2011).
+
+   With this starting point the community will, under the supervision of
+   [2]Canonical and [3]Dalton Maag, be able to build on the existing font
+   sources to expand their character coverage. Ultimately everybody will
+   be able to use the Ubuntu Font Family in their own written languages
+   across the whole of Unicode (and this will take some time!).
+
+  Licensing
+
+   The licence chosen by any free software project is one of the
+   foundational decisions that sets out how derivatives and contributions
+   can occur, and in turn what kind of community will form around the
+   project.
+
+   Using a licence that is compatible with other popular licences is a
+   powerful constraint because of the [4]network effects: the freedom to
+   share improvements between projects allows free software to reach
+   high-quality over time. Licence-proliferation leads to many
+   incompatible licences, undermining the network effect, the freedom to
+   share and ultimately making the libre movement that Ubuntu is a part of
+   less effective. For all kinds of software, writing a new licence is not
+   to be taken lightly and is a choice that needs to be thoroughly
+   justified if this path is taken.
+
+   Today it is not clear to Canonical what the best licence for a font
+   project like the Ubuntu Font Family is: one that starts life designed
+   by professionals and continues with the full range of community
+   development, from highly commercial work in new directions to curious
+   beginners' experimental contributions. The fast and steady pace of the
+   Ubuntu release cycle means that an interim libre licence has been
+   necessary to enable the consideration of the font family as part of
+   Ubuntu 10.10 operating system release.
+
+   Before taking any decision on licensing, Canonical as sponsor and
+   backer of the project has reviewed the many existing licenses used for
+   libre/open fonts and engaged the stewards of the most popular licenses
+   in detailed discussions. The current interim licence is the first step
+   in progressing the state-of-the-art in licensing for libre/open font
+   development.
+
+   The public discussion must now involve everyone in the (comparatively
+   new) area of the libre/open font community; including font users,
+   software freedom advocates, open source supporters and existing libre
+   font developers. Most importantly, the minds and wishes of professional
+   type designers considering entering the free software business
+   community must be taken on board.
+
+   Conversations and discussion has taken place, privately, with
+   individuals from the following groups (generally speaking personally on
+   behalf of themselves, rather than their affiliations):
+     * [5]SIL International
+     * [6]Open Font Library
+     * [7]Software Freedom Law Center
+     * [8]Google Font API
+
+    Document embedding
+
+   One issue highlighted early on in the survey of existing font licences
+   is that of document embedding. Almost all font licences, both free and
+   unfree, permit embedding a font into a document to a certain degree.
+   Embedding a font with other works that make up a document creates a
+   "combined work" and copyleft would normally require the whole document
+   to be distributed under the terms of the font licence. As beautiful as
+   the font might be, such a licence makes a font too restrictive for
+   useful general purpose digital publishing.
+
+   The situation is not entirely unique to fonts and is encountered also
+   with tools such as GNU Bison: a vanilla GNU GPL licence would require
+   anything generated with Bison to be made available under the terms of
+   the GPL as well. To avoid this, Bison is [9]published with an
+   additional permission to the GPL which allows the output of Bison to be
+   made available under any licence.
+
+   The conflict between licensing of fonts and licensing of documents, is
+   addressed in two popular libre font licences, the SIL OFL and GNU GPL:
+     * [10]SIL Open Font Licence: When OFL fonts are embedded in a
+       document, the OFL's terms do not apply to that document. (See
+       [11]OFL-FAQ for details.
+     * [12]GPL Font Exception: The situation is resolved by granting an
+       additional permission to allow documents to not be covered by the
+       GPL. (The exception is being reviewed).
+
+   The Ubuntu Font Family must also resolve this conflict, ensuring that
+   if the font is embedded and then extracted it is once again clearly
+   under the terms of its libre licence.
+
+    Long-term licensing
+
+   Those individuals involved, especially from Ubuntu and Canonical, are
+   interested in finding a long-term libre licence that finds broad favour
+   across the whole libre/open font community. The deliberation during the
+   past months has been on how to licence the Ubuntu Font Family in the
+   short-term, while knowingly encouraging everyone to pursue a long-term
+   goal.
+     * [13]Copyright assignment will be required so that the Ubuntu Font
+       Family's licensing can be progressively expanded to one (or more)
+       licences, as best practice continues to evolve within the
+       libre/open font community.
+     * Canonical will support and fund legal work on libre font licensing.
+       It is recognised that the cost and time commitments required are
+       likely to be significant. We invite other capable parties to join
+       in supporting this activity.
+
+   The GPL version 3 (GPLv3) will be used for Ubuntu Font Family build
+   scripts and the CC-BY-SA for associated documentation and non-font
+   content: all items which do not end up embedded in general works and
+   documents.
+
+Ubuntu Font Licence
+
+   For the short-term only, the initial licence is the [14]Ubuntu Font
+   License (UFL). This is loosely inspired from the work on the SIL
+   OFL 1.1, and seeks to clarify the issues that arose during discussions
+   and legal review, from the perspective of the backers, Canonical Ltd.
+   Those already using established licensing models such as the GPL, OFL
+   or Creative Commons licensing should have no worries about continuing
+   to use them. The Ubuntu Font Licence (UFL) and the SIL Open Font
+   Licence (SIL OFL) are not identical and should not be confused with
+   each other. Please read the terms precisely. The UFL is only intended
+   as an interim license, and the overriding aim is to support the
+   creation of a more suitable and generic libre font licence. As soon as
+   such a licence is developed, the Ubuntu Font Family will migrate to
+   it—made possible by copyright assignment in the interium. Between the
+   OFL 1.1, and the UFL 1.0, the following changes are made to produce the
+   Ubuntu Font Licence:
+     * Clarification:
+
+    1. Document embedding (see [15]embedding section above).
+    2. Apply at point of distribution, instead of receipt
+    3. Author vs. copyright holder disambiguation (type designers are
+       authors, with the copyright holder normally being the funder)
+    4. Define "Propagate" (for internationalisation, similar to the GPLv3)
+    5. Define "Substantially Changed"
+    6. Trademarks are explicitly not transferred
+    7. Refine renaming requirement
+
+     Streamlining:
+    8. Remove "not to be sold separately" clause
+    9. Remove "Reserved Font Name(s)" declaration
+
+   A visual demonstration of how these points were implemented can be
+   found in the accompanying coloured diff between SIL OFL 1.1 and the
+   Ubuntu Font Licence 1.0: [16]ofl-1.1-ufl-1.0.diff.html
+
+References
+
+   1. http://font.ubuntu.com/
+   2. http://www.canonical.com/
+   3. http://www.daltonmaag.com/
+   4. http://en.wikipedia.org/wiki/Network_effect
+   5. http://scripts.sil.org/
+   6. http://openfontlibrary.org/
+   7. http://www.softwarefreedom.org/
+   8. http://code.google.com/webfonts
+   9. http://www.gnu.org/licenses/gpl-faq.html#CanIUseGPLToolsForNF
+  10. http://scripts.sil.org/OFL_web
+  11. http://scripts.sil.org/OFL-FAQ_web
+  12. http://www.gnu.org/licenses/gpl-faq.html#FontException
+  13. https://launchpad.net/~uff-contributors
+  14. http://font.ubuntu.com/ufl/ubuntu-font-licence-1.0.txt
+  15. http://font.ubuntu.com/ufl/FAQ.html#embedding
+  16. http://font.ubuntu.com/ufl/ofl-1.1-ufl-1.0.diff.html
diff --git a/src/jogl/classes/jogamp/graph/font/fonts/ubuntu/LICENCE.txt b/src/jogl/classes/jogamp/graph/font/fonts/ubuntu/LICENCE.txt
new file mode 100644
index 0000000..ae78a8f
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/fonts/ubuntu/LICENCE.txt
@@ -0,0 +1,96 @@
+-------------------------------
+UBUNTU FONT LICENCE Version 1.0
+-------------------------------
+
+PREAMBLE
+This licence allows the licensed fonts to be used, studied, modified and
+redistributed freely. The fonts, including any derivative works, can be
+bundled, embedded, and redistributed provided the terms of this licence
+are met. The fonts and derivatives, however, cannot be released under
+any other licence. The requirement for fonts to remain under this
+licence does not require any document created using the fonts or their
+derivatives to be published under this licence, as long as the primary
+purpose of the document is not to be a vehicle for the distribution of
+the fonts.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this licence and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Original Version" refers to the collection of Font Software components
+as received under this licence.
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to
+a new environment.
+
+"Copyright Holder(s)" refers to all individuals and companies who have a
+copyright ownership of the Font Software.
+
+"Substantially Changed" refers to Modified Versions which can be easily
+identified as dissimilar to the Font Software by users of the Font
+Software comparing the Original Version with the Modified Version.
+
+To "Propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification and with or without charging
+a redistribution fee), making available to the public, and in some
+countries other activities as well.
+
+PERMISSION & CONDITIONS
+This licence does not grant any rights under trademark law and all such
+rights are reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of the Font Software, to propagate the Font Software, subject to
+the below conditions:
+
+1) Each copy of the Font Software must contain the above copyright
+notice and this licence. These can be included either as stand-alone
+text files, human-readable headers or in the appropriate machine-
+readable metadata fields within text or binary files as long as those
+fields can be easily viewed by the user.
+
+2) The font name complies with the following:
+(a) The Original Version must retain its name, unmodified.
+(b) Modified Versions which are Substantially Changed must be renamed to
+avoid use of the name of the Original Version or similar names entirely.
+(c) Modified Versions which are not Substantially Changed must be
+renamed to both (i) retain the name of the Original Version and (ii) add
+additional naming elements to distinguish the Modified Version from the
+Original Version. The name of such Modified Versions must be the name of
+the Original Version, with "derivative X" where X represents the name of
+the new work, appended to that name.
+
+3) The name(s) of the Copyright Holder(s) and any contributor to the
+Font Software shall not be used to promote, endorse or advertise any
+Modified Version, except (i) as required by this licence, (ii) to
+acknowledge the contribution(s) of the Copyright Holder(s) or (iii) with
+their explicit written permission.
+
+4) The Font Software, modified or unmodified, in part or in whole, must
+be distributed entirely under this licence, and must not be distributed
+under any other licence. The requirement for fonts to remain under this
+licence does not affect any document created using the Font Software,
+except any version of the Font Software extracted from a document
+created using the Font Software may only be distributed under this
+licence.
+
+TERMINATION
+This licence becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER
+DEALINGS IN THE FONT SOFTWARE.
diff --git a/src/jogl/classes/jogamp/graph/font/fonts/ubuntu/README.txt b/src/jogl/classes/jogamp/graph/font/fonts/ubuntu/README.txt
new file mode 100644
index 0000000..292d4ad
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/fonts/ubuntu/README.txt
@@ -0,0 +1,15 @@
+ ----------------------
+  Ubuntu Font Family
+ ======================
+
+The Ubuntu Font Family are a set of matching new libre/open fonts in
+development during 2010--2011. The development is being funded by
+Canonical Ltd on behalf the wider Free Software community and the
+Ubuntu project.  The technical font design work and implementation is
+being undertaken by Dalton Maag.
+
+Both the final font Truetype/OpenType files and the design files used
+to produce the font family are distributed under an open licence and
+you are expressly encouraged to experiment, modify, share and improve.
+
+  http://font.ubuntu.com/
diff --git a/src/jogl/classes/jogamp/graph/font/fonts/ubuntu/TRADEMARKS.txt b/src/jogl/classes/jogamp/graph/font/fonts/ubuntu/TRADEMARKS.txt
new file mode 100644
index 0000000..d34265b
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/fonts/ubuntu/TRADEMARKS.txt
@@ -0,0 +1,4 @@
+Ubuntu and Canonical are registered trademarks of Canonical Ltd.
+
+The licence accompanying these works does not grant any rights
+under trademark law and all such rights are reserved.
diff --git a/src/jogl/classes/jogamp/graph/font/fonts/ubuntu/Ubuntu-B.ttf b/src/jogl/classes/jogamp/graph/font/fonts/ubuntu/Ubuntu-B.ttf
new file mode 100644
index 0000000..7639344
Binary files /dev/null and b/src/jogl/classes/jogamp/graph/font/fonts/ubuntu/Ubuntu-B.ttf differ
diff --git a/src/jogl/classes/jogamp/graph/font/fonts/ubuntu/Ubuntu-BI.ttf b/src/jogl/classes/jogamp/graph/font/fonts/ubuntu/Ubuntu-BI.ttf
new file mode 100644
index 0000000..337b8a8
Binary files /dev/null and b/src/jogl/classes/jogamp/graph/font/fonts/ubuntu/Ubuntu-BI.ttf differ
diff --git a/src/jogl/classes/jogamp/graph/font/fonts/ubuntu/Ubuntu-L.ttf b/src/jogl/classes/jogamp/graph/font/fonts/ubuntu/Ubuntu-L.ttf
new file mode 100644
index 0000000..c3b0fa4
Binary files /dev/null and b/src/jogl/classes/jogamp/graph/font/fonts/ubuntu/Ubuntu-L.ttf differ
diff --git a/src/jogl/classes/jogamp/graph/font/fonts/ubuntu/Ubuntu-LI.ttf b/src/jogl/classes/jogamp/graph/font/fonts/ubuntu/Ubuntu-LI.ttf
new file mode 100644
index 0000000..d65e8ea
Binary files /dev/null and b/src/jogl/classes/jogamp/graph/font/fonts/ubuntu/Ubuntu-LI.ttf differ
diff --git a/src/jogl/classes/jogamp/graph/font/fonts/ubuntu/Ubuntu-M.ttf b/src/jogl/classes/jogamp/graph/font/fonts/ubuntu/Ubuntu-M.ttf
new file mode 100644
index 0000000..387ef03
Binary files /dev/null and b/src/jogl/classes/jogamp/graph/font/fonts/ubuntu/Ubuntu-M.ttf differ
diff --git a/src/jogl/classes/jogamp/graph/font/fonts/ubuntu/Ubuntu-MI.ttf b/src/jogl/classes/jogamp/graph/font/fonts/ubuntu/Ubuntu-MI.ttf
new file mode 100644
index 0000000..5b92fcb
Binary files /dev/null and b/src/jogl/classes/jogamp/graph/font/fonts/ubuntu/Ubuntu-MI.ttf differ
diff --git a/src/jogl/classes/jogamp/graph/font/fonts/ubuntu/Ubuntu-R.ttf b/src/jogl/classes/jogamp/graph/font/fonts/ubuntu/Ubuntu-R.ttf
new file mode 100644
index 0000000..a464464
Binary files /dev/null and b/src/jogl/classes/jogamp/graph/font/fonts/ubuntu/Ubuntu-R.ttf differ
diff --git a/src/jogl/classes/jogamp/graph/font/fonts/ubuntu/Ubuntu-RI.ttf b/src/jogl/classes/jogamp/graph/font/fonts/ubuntu/Ubuntu-RI.ttf
new file mode 100644
index 0000000..0e09559
Binary files /dev/null and b/src/jogl/classes/jogamp/graph/font/fonts/ubuntu/Ubuntu-RI.ttf differ
diff --git a/src/jogl/classes/jogamp/graph/font/fonts/ubuntu/copyright.txt b/src/jogl/classes/jogamp/graph/font/fonts/ubuntu/copyright.txt
new file mode 100644
index 0000000..3a45d71
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/fonts/ubuntu/copyright.txt
@@ -0,0 +1,5 @@
+Copyright 2010 Canonical Ltd.
+
+This Font Software is licensed under the Ubuntu Font Licence, Version
+1.0.  https://launchpad.net/ubuntu-font-licence
+
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java b/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java
new file mode 100644
index 0000000..8806f53
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java
@@ -0,0 +1,296 @@
+/**
+ * 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 jogamp.graph.font.typecast;
+
+import java.util.ArrayList;
+
+import jogamp.graph.font.FontInt;
+import jogamp.graph.font.typecast.ot.OTFont;
+import jogamp.graph.font.typecast.ot.OTFontCollection;
+import jogamp.graph.font.typecast.ot.table.CmapFormat;
+import jogamp.graph.font.typecast.ot.table.CmapIndexEntry;
+import jogamp.graph.font.typecast.ot.table.CmapTable;
+import jogamp.graph.font.typecast.ot.table.HdmxTable;
+import jogamp.graph.font.typecast.ot.table.ID;
+import jogamp.graph.geom.plane.AffineTransform;
+import jogamp.graph.geom.plane.Path2D;
+
+import com.jogamp.common.util.IntObjectHashMap;
+import com.jogamp.graph.curve.OutlineShape;
+import com.jogamp.graph.font.Font;
+import com.jogamp.graph.font.FontFactory;
+import com.jogamp.graph.geom.AABBox;
+import com.jogamp.graph.geom.Vertex;
+import com.jogamp.graph.geom.Vertex.Factory;
+
+class TypecastFont implements FontInt {
+    static final boolean DEBUG = false;
+    
+    final OTFontCollection fontset;
+    final OTFont font;
+    TypecastHMetrics metrics;
+    final CmapFormat cmapFormat;
+    int cmapentries;
+    
+    // FIXME: Add cache size to limit memory usage ??    
+    IntObjectHashMap char2Glyph; 
+
+    public TypecastFont(OTFontCollection fontset) {
+        this.fontset = fontset;
+        this.font = fontset.getFont(0);
+        
+        // FIXME: Generic attempt to find the best CmapTable,
+        // which is assumed to be the one with the most entries (stupid 'eh?)
+        CmapTable cmapTable = font.getCmapTable();
+        CmapFormat[] _cmapFormatP = { null, null, null, null };
+        int platform = -1;
+        int platformLength = -1;
+        int encoding = -1;
+        for(int i=0; i<cmapTable.getNumTables(); i++) {
+            CmapIndexEntry cmapIdxEntry = cmapTable.getCmapIndexEntry(i);
+            int pidx = cmapIdxEntry.getPlatformId();
+            CmapFormat cf = cmapIdxEntry.getFormat();
+            if(DEBUG) {
+                System.err.println("CmapFormat["+i+"]: platform " + pidx + 
+                                   ", encoding "+cmapIdxEntry.getEncodingId() + ": "+cf);
+            }
+            if( _cmapFormatP[pidx] == null || 
+                _cmapFormatP[pidx].getLength() < cf.getLength() ) {
+                _cmapFormatP[pidx] = cf;
+                if( cf.getLength() > platformLength ) {
+                    platformLength = cf.getLength() ; 
+                    platform = pidx;
+                    encoding = cmapIdxEntry.getEncodingId();
+                }
+            }
+        }
+        if(0 <= platform) {
+            cmapFormat = _cmapFormatP[platform];
+            if(DEBUG) {
+                System.err.println("Selected CmapFormat: platform " + platform + 
+                                   ", encoding "+encoding + ": "+cmapFormat);
+            }
+        } else {        
+            CmapFormat _cmapFormat = null;
+            /*if(null == _cmapFormat) {
+                platform = ID.platformMacintosh;
+                encoding = ID.encodingASCII;
+                _cmapFormat = cmapTable.getCmapFormat(platform, encoding);
+            } */
+            if(null == _cmapFormat) {
+                // default unicode
+                platform = ID.platformMicrosoft;
+                encoding = ID.encodingUnicode;
+                _cmapFormat = cmapTable.getCmapFormat((short)platform, (short)encoding);
+            }
+            if(null == _cmapFormat) {
+                // maybe a symbol font ?
+                platform = ID.platformMicrosoft;
+                encoding = ID.encodingSymbol;
+                _cmapFormat = cmapTable.getCmapFormat((short)platform, (short)encoding);
+            }
+            if(null == _cmapFormat) {
+                throw new RuntimeException("Cannot find a suitable cmap table for font "+font);
+            }
+            cmapFormat = _cmapFormat;
+            if(DEBUG) {
+                System.err.println("Selected CmapFormat (2): platform " + platform + ", encoding "+encoding + ": "+cmapFormat);
+            }
+        }
+
+        cmapentries = 0;
+        for (int i = 0; i < cmapFormat.getRangeCount(); ++i) {
+            CmapFormat.Range range = cmapFormat.getRange(i);
+            cmapentries += range.getEndCode() - range.getStartCode() + 1; // end included 
+        }        
+        if(DEBUG) {
+            System.err.println("font direction hint: "+font.getHeadTable().getFontDirectionHint());
+            System.err.println("num glyphs: "+font.getNumGlyphs());
+            System.err.println("num cmap entries: "+cmapentries);
+            System.err.println("num cmap ranges: "+cmapFormat.getRangeCount());
+        
+            for (int i = 0; i < cmapFormat.getRangeCount(); ++i) {
+                CmapFormat.Range range = cmapFormat.getRange(i);
+                for (int j = range.getStartCode(); j <= range.getEndCode(); ++j) {
+                    final int code = cmapFormat.mapCharCode(j);
+                    if(code < 15) {
+                        System.err.println(" char: " + (int)j + " ( " + (char)j +" ) -> " + code);
+                    }
+                }
+            }
+        }
+        char2Glyph = new IntObjectHashMap(cmapentries + cmapentries/4);
+    }
+    
+    public StringBuilder getName(StringBuilder sb, int nameIndex) {
+        return font.getName(nameIndex, sb);
+    }
+    public String getName(int nameIndex) {
+        return getName(null, nameIndex).toString();
+    }
+    public StringBuilder getAllNames(StringBuilder sb, String separator) {
+        return font.getAllNames(sb, separator);
+    }
+    public StringBuilder getFullFamilyName(StringBuilder sb) {
+        sb = getName(sb, Font.NAME_FAMILY).append("-");
+        getName(sb, Font.NAME_SUBFAMILY);
+        return sb;
+    }    
+
+    public Metrics getMetrics() {
+        if (metrics == null) {
+            metrics = new TypecastHMetrics(this);
+        }
+        return metrics;
+    }
+
+    public Glyph getGlyph(char symbol) {
+        TypecastGlyph result = (TypecastGlyph) char2Glyph.get(symbol);        
+        if (null == result) {
+            // final short code = (short) char2Code.get(symbol);
+            short code = (short) cmapFormat.mapCharCode(symbol);
+            if(0 == code && 0 != symbol) {
+                // reserved special glyph IDs by convention
+                switch(symbol) {
+                    case ' ':  code = Glyph.ID_SPACE; break;
+                    case '\n': code = Glyph.ID_CR; break;
+                    default:   code = Glyph.ID_UNKNOWN;
+                }
+            }
+            
+            jogamp.graph.font.typecast.ot.OTGlyph glyph = font.getGlyph(code);
+            if(null == glyph) {
+                glyph = font.getGlyph(Glyph.ID_UNKNOWN);
+            }
+            if(null == glyph) {
+                throw new RuntimeException("Could not retrieve glyph for symbol: <"+symbol+"> "+(int)symbol+" -> glyph id "+code);
+            }
+            Path2D path = TypecastRenderer.buildPath(glyph);
+            result = new TypecastGlyph(this, symbol, code, glyph.getBBox(), glyph.getAdvanceWidth(), path);
+            if(DEBUG) {
+                System.err.println("New glyph: " + (int)symbol + " ( " + (char)symbol +" ) -> " + code + ", contours " + glyph.getPointCount() + ": " + path);
+            }
+            final HdmxTable hdmx = font.getHdmxTable();            
+            if (null!= result && null != hdmx) {
+                /*if(DEBUG) {
+                    System.err.println("hdmx "+hdmx);
+                }*/
+                for (int i=0; i<hdmx.getNumberOfRecords(); i++)
+                {
+                    final HdmxTable.DeviceRecord dr = hdmx.getRecord(i); 
+                    result.addAdvance(dr.getWidth(code), dr.getPixelSize());
+                    /* if(DEBUG) {
+                        System.err.println("hdmx advance : pixelsize = "+dr.getWidth(code)+" : "+ dr.getPixelSize());
+                    } */
+                }
+            }            
+            char2Glyph.put(symbol, result);
+        }
+        return result;
+    }
+   
+    public ArrayList<OutlineShape> getOutlineShapes(CharSequence string, float pixelSize, Factory<? extends Vertex> vertexFactory) {
+    	AffineTransform transform = new AffineTransform(vertexFactory);
+    	return TypecastRenderer.getOutlineShapes(this, string, pixelSize, transform, vertexFactory);
+    }
+
+    public float getStringWidth(CharSequence string, float pixelSize) {
+        float width = 0;
+        final int len = string.length();
+        for (int i=0; i< len; i++)
+        {
+            char character = string.charAt(i);
+            if (character == '\n') {
+                width = 0;
+            } else {
+                Glyph glyph = getGlyph(character);
+                width += glyph.getAdvance(pixelSize, false);
+            }
+        }
+
+        return (int)(width + 0.5f);        
+    }
+
+    public float getStringHeight(CharSequence string, float pixelSize) {
+        int height = 0;
+
+        for (int i=0; i<string.length(); i++)
+        {
+            char character = string.charAt(i);
+            if (character != ' ')
+            {
+                Glyph glyph = getGlyph(character);
+                AABBox bbox = glyph.getBBox(pixelSize);
+                height = (int)Math.ceil(Math.max(bbox.getHeight(), height));
+            }
+        }
+        return height;        
+    }
+
+    public AABBox getStringBounds(CharSequence string, float pixelSize) {
+        if (string == null) {
+            return new AABBox();
+        }
+        final Metrics metrics = getMetrics();
+        final float lineGap = metrics.getLineGap(pixelSize);
+        final float ascent = metrics.getAscent(pixelSize);
+        final float descent = metrics.getDescent(pixelSize);
+        final float advanceY = lineGap - descent + ascent;
+        float totalHeight = 0;
+        float totalWidth = 0;
+        float curLineWidth = 0;
+        for (int i=0; i<string.length(); i++) {
+            char character = string.charAt(i);
+            if (character == '\n') {
+                totalWidth = Math.max(curLineWidth, totalWidth);
+                curLineWidth = 0;
+                totalHeight -= advanceY;
+                continue;
+            }
+            Glyph glyph = getGlyph(character);
+            curLineWidth += glyph.getAdvance(pixelSize, true);
+        }
+        if (curLineWidth > 0) {
+            totalHeight -= advanceY;
+            totalWidth = Math.max(curLineWidth, totalWidth);
+        }
+        return new AABBox(0, 0, 0, totalWidth, totalHeight,0);        
+    }
+
+    final public int getNumGlyphs() {
+        return font.getNumGlyphs();
+    }
+    
+    public boolean isPrintableChar( char c ) {
+        return FontFactory.isPrintableChar(c);
+    }
+    
+    public String toString() {
+        return getFullFamilyName(null).toString();
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/TypecastFontConstructor.java b/src/jogl/classes/jogamp/graph/font/typecast/TypecastFontConstructor.java
new file mode 100644
index 0000000..a9e5524
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/TypecastFontConstructor.java
@@ -0,0 +1,84 @@
+/**
+ * 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 jogamp.graph.font.typecast;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
+import javax.media.opengl.GLException;
+
+import jogamp.graph.font.FontConstructor;
+import jogamp.graph.font.typecast.ot.OTFontCollection;
+
+import com.jogamp.common.util.IOUtil;
+import com.jogamp.graph.font.Font;
+
+public class TypecastFontConstructor implements FontConstructor  {
+
+    public Font create(final File ffile) throws IOException {
+        return AccessController.doPrivileged(new PrivilegedAction<Font>() {
+            public Font run() {
+                OTFontCollection fontset;        
+                try {
+                    fontset = OTFontCollection.create(ffile);
+                    return new TypecastFont(fontset);
+                } catch (IOException e) {
+                    e.printStackTrace();
+                }
+                return null;
+            }
+        });        
+    }
+    
+    public Font create(final URL furl) throws IOException {
+        return AccessController.doPrivileged(new PrivilegedAction<Font>() {
+            public Font run() {
+                File tf = null;
+                int len=0;
+                Font f = null;
+                try {         
+                    tf = IOUtil.createTempFile( "joglfont", ".ttf");
+                    len = IOUtil.copyURL2File(furl, tf);
+                    if(len==0) {
+                        tf.delete();
+                        throw new GLException("Font of stream "+furl+" was zero bytes");
+                    }
+                    f = create(tf);
+                    tf.delete();
+                } catch (IOException e) {
+                    e.printStackTrace();
+                }
+                return f;
+            }
+        });        
+    }
+    
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/TypecastGlyph.java b/src/jogl/classes/jogamp/graph/font/typecast/TypecastGlyph.java
new file mode 100644
index 0000000..f20b7d1
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/TypecastGlyph.java
@@ -0,0 +1,232 @@
+/**
+ * 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 jogamp.graph.font.typecast;
+
+import java.util.HashMap;
+
+import jogamp.graph.font.FontInt;
+import jogamp.graph.geom.plane.AffineTransform;
+import jogamp.graph.geom.plane.Path2D;
+
+import com.jogamp.graph.font.Font;
+import com.jogamp.graph.geom.AABBox;
+
+public class TypecastGlyph implements FontInt.Glyph {
+    public class Advance
+    {
+        final Font      font;
+        final float     advance; 
+        HashMap<Float, Float> size2advance = new HashMap<Float, Float>(); 
+        
+        public Advance(Font font, float advance)
+        {
+            this.font = font;
+            this.advance = advance;
+        }
+        
+        public void reset() {
+            size2advance.clear();
+        }
+        
+        public float getScale(float pixelSize)
+        {
+            return this.font.getMetrics().getScale(pixelSize);
+        }
+        
+        public void add(float advance, float size)
+        {
+            size2advance.put(size, advance);
+        }
+        
+        public float get(float size, boolean useFrationalMetrics)
+        {
+            Float fo = size2advance.get(size);
+            if(null == fo) {            
+                float value = (this.advance * getScale(size));
+                if (useFrationalMetrics == false) {
+                    //value = (float)Math.ceil(value);
+                    // value = (int)value;
+                    value = (int) ( value + 0.5f ) ; // TODO: check 
+                }
+                size2advance.put(size, value);
+                return value;
+            }
+            return fo.floatValue();
+        }
+        
+        public String toString()
+        {
+            return "\nAdvance:"+
+                "\n  advance: "+this.advance+
+                "\n advances: \n"+size2advance;
+        }
+    }
+    
+    public class Metrics
+    {
+        AABBox    bbox;
+        Advance advance;
+        
+        public Metrics(Font font, AABBox bbox, float advance)
+        {
+            this.bbox = bbox;
+            this.advance = new Advance(font, advance);
+        }
+        
+        public void reset() {
+            advance.reset();
+        }
+        
+        public float getScale(float pixelSize)
+        {
+            return this.advance.getScale(pixelSize);
+        }
+        
+        public AABBox getBBox()
+        {
+            return this.bbox;
+        }
+        
+        public void addAdvance(float advance, float size)
+        {
+            this.advance.add(advance, size);
+        }
+        
+        public float getAdvance(float size, boolean useFrationalMetrics)
+        {
+            return this.advance.get(size, useFrationalMetrics);
+        }
+        
+        public String toString()
+        {
+            return "\nMetrics:"+
+                "\n  bbox: "+this.bbox+
+                this.advance;
+        }
+    }    
+
+    public static final short INVALID_ID    = (short)((1 << 16) - 1);
+    public static final short MAX_ID        = (short)((1 << 16) - 2);
+    
+    private final Font font;
+        
+    char        symbol;
+    short       id;
+    int         advance;
+    Metrics     metrics;
+    
+    protected Path2D path; // in EM units
+    protected Path2D pathSized;
+    protected float numberSized;
+    
+    protected TypecastGlyph(Font font, char symbol) {
+        this.font = font;
+        this.symbol = symbol;
+    }
+    
+    protected TypecastGlyph(Font font,
+                            char symbol, short id, AABBox bbox, int advance, Path2D path) {
+        this.font = font;
+        this.symbol = symbol;
+        this.advance = advance;
+        
+        init(id, bbox, advance);
+        
+        this.path = path;
+        this.pathSized = null;
+        this.numberSized = 0.0f;
+    }
+    
+    void init(short id, AABBox bbox, int advance) {
+        this.id = id;
+        this.advance = advance;
+        this.metrics = new Metrics(this.font, bbox, this.advance);
+    }
+    
+    public void reset(Path2D path) {
+        this.path = path;
+        this.metrics.reset();
+    }
+    
+    public Font getFont() {
+        return this.font;
+    }
+    
+    public char getSymbol() {
+        return this.symbol;
+    }
+    
+    AABBox getBBoxUnsized() {
+        return this.metrics.getBBox();
+    }
+    
+    public AABBox getBBox() {
+        return this.metrics.getBBox();
+    }
+    
+    public Metrics getMetrics() {
+        return this.metrics;
+    }
+    
+    public short getID() {
+        return this.id;
+    }
+    
+    public float getScale(float pixelSize) {
+        return this.metrics.getScale(pixelSize);
+    }
+    
+    public AABBox getBBox(float pixelSize) {
+        final float size = getScale(pixelSize);
+        AABBox newBox = getBBox().clone();
+        newBox.scale(size);
+        return newBox;        
+    }
+    
+    protected void addAdvance(float advance, float size) {
+        this.metrics.addAdvance(advance, size);
+    }
+    
+    public float getAdvance(float pixelSize, boolean useFrationalMetrics) {
+        return this.metrics.getAdvance(pixelSize, useFrationalMetrics);
+    }
+    
+    public Path2D getPath() {
+        return this.path;
+    }
+        
+    public Path2D getPath(float pixelSize) {
+        final float size = getScale(pixelSize);
+        
+        if (this.numberSized != size) {
+            this.numberSized = size;
+            this.pathSized = AffineTransform.getScaleInstance(null, size, size).createTransformedShape(getPath());
+        }        
+        return this.pathSized;
+    }    
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/TypecastHMetrics.java b/src/jogl/classes/jogamp/graph/font/typecast/TypecastHMetrics.java
new file mode 100644
index 0000000..0dd7a61
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/TypecastHMetrics.java
@@ -0,0 +1,84 @@
+/**
+ * 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 jogamp.graph.font.typecast;
+
+import jogamp.graph.font.typecast.ot.table.HeadTable;
+import jogamp.graph.font.typecast.ot.table.HheaTable;
+
+import com.jogamp.graph.font.Font.Metrics;
+import com.jogamp.graph.geom.AABBox;
+
+class TypecastHMetrics implements Metrics {
+    private final TypecastFont fontImpl;
+    
+    // HeadTable
+    private final HeadTable headTable;
+    private final float unitsPerEM_Inv;
+    private final AABBox bbox;
+    // HheaTable
+    private final HheaTable hheaTable;
+    // VheaTable (for horizontal fonts)
+    // private final VheaTable vheaTable;
+    
+    public TypecastHMetrics(TypecastFont fontImpl) {
+        this.fontImpl = fontImpl;
+        headTable = this.fontImpl.font.getHeadTable();
+        hheaTable = this.fontImpl.font.getHheaTable();        
+        // vheaTable = this.fontImpl.font.getVheaTable();
+        unitsPerEM_Inv = 1.0f / ( (float) headTable.getUnitsPerEm() );
+        
+        int maxWidth = headTable.getXMax() - headTable.getXMin();
+        int maxHeight = headTable.getYMax() - headTable.getYMin();              
+        float lowx= headTable.getXMin();
+        float lowy = -(headTable.getYMin()+maxHeight);
+        float highx = lowx + maxWidth;
+        float highy = lowy + maxHeight;
+        bbox = new AABBox(lowx, lowy, 0, highx, highy, 0); // invert
+    }
+        
+    public final float getAscent(float pixelSize) {
+        return getScale(pixelSize) * -hheaTable.getAscender(); // invert
+    }
+    public final float getDescent(float pixelSize) {
+        return getScale(pixelSize) * -hheaTable.getDescender(); // invert
+    }
+    public final float getLineGap(float pixelSize) {
+        return getScale(pixelSize) * -hheaTable.getLineGap(); // invert
+    }
+    public final float getMaxExtend(float pixelSize) {
+        return getScale(pixelSize) * hheaTable.getXMaxExtent();
+    }
+    public final float getScale(float pixelSize) {
+        return pixelSize * unitsPerEM_Inv;
+    }
+    public final AABBox getBBox(float pixelSize) {
+        AABBox res = new AABBox(bbox.getLow(), bbox.getHigh());
+        res.scale(getScale(pixelSize));        
+        return res;
+    }
+}
\ No newline at end of file
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/TypecastRenderer.java b/src/jogl/classes/jogamp/graph/font/typecast/TypecastRenderer.java
new file mode 100644
index 0000000..b3ee9c9
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/TypecastRenderer.java
@@ -0,0 +1,220 @@
+/**
+ * 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 jogamp.graph.font.typecast;
+
+import java.util.ArrayList;
+
+import jogamp.graph.font.typecast.ot.OTGlyph;
+import jogamp.graph.font.typecast.ot.Point;
+import jogamp.graph.geom.plane.AffineTransform;
+import jogamp.graph.geom.plane.Path2D;
+import jogamp.graph.geom.plane.PathIterator;
+
+import com.jogamp.graph.curve.OutlineShape;
+import com.jogamp.graph.font.Font;
+import com.jogamp.graph.geom.Vertex;
+import com.jogamp.graph.geom.Vertex.Factory;
+
+/**
+ * Factory to build a {@link com.jogamp.graph.geom.Path2D Path2D} from 
+ * {@link jogamp.graph.font.typecast.ot.OTGlyph Glyph}s. 
+ */
+public class TypecastRenderer {
+
+    private static void getPaths(TypecastFont font, 
+            CharSequence string, float pixelSize, AffineTransform transform, Path2D[] p)
+    {        
+        if (string == null) {
+            return;
+        }
+        Font.Metrics metrics = font.getMetrics();
+        float advanceTotal = 0;
+        float lineGap = metrics.getLineGap(pixelSize) ;
+        float ascent = metrics.getAscent(pixelSize) ;
+        float descent = metrics.getDescent(pixelSize) ;
+        if (transform == null) {
+            transform = new AffineTransform();
+        }
+        AffineTransform t = new AffineTransform();
+
+        float advanceY = lineGap - descent + ascent;
+        float y = 0;
+        for (int i=0; i<string.length(); i++)
+        {
+            p[i] = new Path2D();
+            p[i].reset();
+            t.setTransform(transform);
+            char character = string.charAt(i);
+            if (character == '\n') {
+                y += advanceY;
+                advanceTotal = 0;
+                continue;
+            } else if (character == ' ') {
+                advanceTotal += font.font.getHmtxTable().getAdvanceWidth(TypecastGlyph.ID_SPACE) * metrics.getScale(pixelSize);
+                continue;
+            }        
+            TypecastGlyph glyph = (TypecastGlyph) font.getGlyph(character);
+            Path2D gp = glyph.getPath();
+            float scale = metrics.getScale(pixelSize);
+            t.translate(advanceTotal, y);
+            t.scale(scale, scale);
+            p[i].append(gp.iterator(t), false);
+            advanceTotal += glyph.getAdvance(pixelSize, true); 
+        }
+    }
+
+    public static ArrayList<OutlineShape> getOutlineShapes(TypecastFont font, CharSequence string, float pixelSize, AffineTransform transform, Factory<? extends Vertex> vertexFactory) {
+        Path2D[] paths = new Path2D[string.length()];
+        getPaths(font, string, pixelSize, transform, paths);
+
+        ArrayList<OutlineShape> shapes = new ArrayList<OutlineShape>();
+        final int numGlyps = paths.length;
+        for (int index=0;index<numGlyps;index++) {
+            if(paths[index] == null){
+                continue;
+            }
+            OutlineShape shape = new OutlineShape(vertexFactory);
+            shapes.add(shape);
+            PathIterator iterator = paths[index].iterator(transform);
+            if(null != iterator){
+                while(!iterator.isDone()){
+                    float[] coords = new float[6];
+                    int segmentType = iterator.currentSegment(coords);
+                    addPathVertexToOutline(shape, vertexFactory, coords, segmentType);
+                    iterator.next();
+                }
+            }
+        }
+        return shapes;
+    }
+    private static void addPathVertexToOutline(OutlineShape shape, Factory<? extends Vertex> vertexFactory, float[] coords, int segmentType){
+        switch(segmentType) {
+        case PathIterator.SEG_MOVETO:
+            shape.closeLastOutline();
+            shape.addEmptyOutline();
+            shape.addVertex(0, vertexFactory.create(coords, 0, 2, true));            
+            break;
+        case PathIterator.SEG_LINETO:
+            shape.addVertex(0, vertexFactory.create(coords, 0, 2, true));            
+            break;
+        case PathIterator.SEG_QUADTO:
+            shape.addVertex(0, vertexFactory.create(coords, 0, 2, false));
+            shape.addVertex(0, vertexFactory.create(coords, 2, 2, true));            
+            break;
+        case PathIterator.SEG_CUBICTO:
+            shape.addVertex(0, vertexFactory.create(coords, 0, 2, false));
+            shape.addVertex(0, vertexFactory.create(coords, 2, 2, false));
+            shape.addVertex(0, vertexFactory.create(coords, 4, 2, true));            
+            break;
+        case PathIterator.SEG_CLOSE:
+            shape.closeLastOutline();
+            break;
+        default:
+            throw new IllegalArgumentException("Unhandled Segment Type: "+segmentType);
+        }
+    }
+
+    /**
+     * Build a {@link com.jogamp.graph.geom.Path2D Path2D} from a
+     * {@link jogamp.graph.font.typecast.ot.OTGlyph Glyph}.  This glyph path can then
+     * be transformed and rendered.
+     */
+    public static Path2D buildPath(OTGlyph glyph) {
+
+        if (glyph == null) {
+            return null;
+        }
+
+        Path2D glyphPath = new Path2D();
+
+        // Iterate through all of the points in the glyph.  Each time we find a
+        // contour end point, add the point range to the path.
+        int firstIndex = 0;
+        int count = 0;
+        for (int i = 0; i < glyph.getPointCount(); i++) {
+            count++;
+            if (glyph.getPoint(i).endOfContour) {
+                addContourToPath(glyphPath, glyph, firstIndex, count);
+                firstIndex = i + 1;
+                count = 0;
+            }
+        }
+        return glyphPath;
+    }
+
+    private static void addContourToPath(Path2D gp, OTGlyph glyph, int startIndex, int count) {
+        int offset = 0;
+        while (offset < count) {
+            Point point = glyph.getPoint(startIndex + offset%count);
+            Point point_plus1 = glyph.getPoint(startIndex + (offset+1)%count);
+            Point point_plus2 = glyph.getPoint(startIndex + (offset+2)%count);
+            if(offset == 0)
+            {
+                gp.moveTo(point.x, point.y);
+            }
+
+            if (point.onCurve) {
+                if (point_plus1.onCurve) {
+                    // s = new Line2D.Float(point.x, point.y, point_plus1.x, point_plus1.y);
+                    gp.lineTo( point_plus1.x, point_plus1.y );
+                    offset++;                    
+                } else {
+                    if (point_plus2.onCurve) {
+                        // s = new QuadCurve2D.Float( point.x, point.y, point_plus1.x, point_plus1.y, point_plus2.x, point_plus2.y);
+                        gp.quadTo(point_plus1.x, point_plus1.y, point_plus2.x, point_plus2.y);
+                        offset+=2;                    
+                    } else {
+                        // s = new QuadCurve2D.Float(point.x,point.y,point_plus1.x,point_plus1.y,
+                        //                           midValue(point_plus1.x, point_plus2.x), midValue(point_plus1.y, point_plus2.y));
+                        gp.quadTo(point_plus1.x, point_plus1.y, midValue(point_plus1.x, point_plus2.x), midValue(point_plus1.y, point_plus2.y));
+                        offset+=2;
+                    }
+                }
+            } else {
+                if (point_plus1.onCurve) {
+                    // s = new QuadCurve2D.Float(midValue(point_minus1.x, point.x), midValue(point_minus1.y, point.y),
+                    //                           point.x, point.y, point_plus1.x, point_plus1.y);
+                    //gp.curve3(point_plus1.x, point_plus1.y, point.x, point.y);
+                    gp.quadTo(point.x, point.y, point_plus1.x, point_plus1.y);
+                    offset++;
+
+                } else {
+                    // s = new QuadCurve2D.Float(midValue(point_minus1.x, point.x), midValue(point_minus1.y, point.y), point.x, point.y,
+                    //                           midValue(point.x, point_plus1.x), midValue(point.y, point_plus1.y));
+                    //gp.curve3(midValue(point.x, point_plus1.x), midValue(point.y, point_plus1.y), point.x, point.y);
+                    gp.quadTo(point.x, point.y, midValue(point.x, point_plus1.x), midValue(point.y, point_plus1.y));
+                    offset++;                    
+                }
+            }
+        }
+    }
+
+    private static int midValue(int a, int b) {
+        return a + (b - a)/2;
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/Disassembler.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/Disassembler.java
new file mode 100644
index 0000000..0ac5f0b
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/Disassembler.java
@@ -0,0 +1,109 @@
+/*****************************************************************************
+ * Copyright (C) The Apache Software Foundation. All rights reserved.        *
+ * ------------------------------------------------------------------------- * 
+ * This software is published under the terms of the Apache Software License * 
+ * version 1.1, a copy of which has been included with this distribution in  * 
+ * the LICENSE file.                                                         * 
+ *****************************************************************************/
+
+package jogamp.graph.font.typecast.ot;
+
+/**
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ * @version $Id: Disassembler.java,v 1.1.1.1 2004-12-05 23:14:25 davidsch Exp $
+ */
+public class Disassembler {
+
+    /**
+     * Advance the instruction pointer to the next executable opcode.
+     * This will be the next byte, unless the current opcode is a push
+     * instruction, in which case it will be the byte immediately beyond
+     * the last data byte.
+     * @param ip The current instruction pointer
+     * @return The new instruction pointer
+     */
+    public static int advanceIP(short[] instructions, int ip) {
+
+        // The high word specifies font, cvt, or glyph program
+        int i = ip & 0xffff;
+        int dataCount;
+        ip++;
+        if (Mnemonic.NPUSHB == instructions[i]) {
+            // Next byte is the data byte count
+            dataCount = instructions[++i];
+            ip += dataCount + 1;
+        } else if (Mnemonic.NPUSHW == instructions[i]) {
+            // Next byte is the data word count
+            dataCount = instructions[++i];
+            ip += dataCount*2 + 1;
+        } else if (Mnemonic.PUSHB == (instructions[i] & 0xf8)) {
+            dataCount = (short)((instructions[i] & 0x07) + 1);
+            ip += dataCount;
+        } else if (Mnemonic.PUSHW == (instructions[i] & 0xf8)) {
+            dataCount = (short)((instructions[i] & 0x07) + 1);
+            ip += dataCount*2;
+        }
+        return ip;
+    }
+
+    public static short getPushCount(short[] instructions, int ip) {
+        short instr = instructions[ip & 0xffff];
+        if ((Mnemonic.NPUSHB == instr) || (Mnemonic.NPUSHW == instr)) {
+            return instructions[(ip & 0xffff) + 1];
+        } else if ((Mnemonic.PUSHB == (instr & 0xf8)) || (Mnemonic.PUSHW == (instr & 0xf8))) {
+            return (short)((instr & 0x07) + 1);
+        }
+        return 0;
+    }
+
+    public static int[] getPushData(short[] instructions, int ip) {
+        int count = getPushCount(instructions, ip);
+        int[] data = new int[count];
+        int i = ip & 0xffff;
+        short instr = instructions[i];
+        if (Mnemonic.NPUSHB == instr) {
+            for (int j = 0; j < count; j++) {
+                data[j] = instructions[i + j + 2];
+            }
+        } else if (Mnemonic.PUSHB == (instr & 0xf8)) {
+            for (int j = 0; j < count; j++) {
+                data[j] = instructions[i + j + 1];
+            }
+        } else if (Mnemonic.NPUSHW == instr) {
+            for (int j = 0; j < count; j++) {
+                data[j] = (instructions[i + j*2 + 2] << 8) | instructions[i + j*2 + 3];
+            }
+        } else if (Mnemonic.PUSHW == (instr & 0xf8)) {
+            for (int j = 0; j < count; j++) {
+                data[j] = (instructions[i + j*2 + 1] << 8) | instructions[i + j*2 + 2];
+            }
+        }
+        return data;
+    }
+
+     public static String disassemble(short[] instructions, int leadingSpaces) {
+        StringBuffer sb = new StringBuffer();
+        int ip = 0;
+        while (ip < instructions.length) {
+            for (int i = 0; i < leadingSpaces; i++) {
+                sb.append(" ");
+            }
+            sb.append(ip).append(": ");
+            sb.append(Mnemonic.getMnemonic(instructions[ip]));
+            if (getPushCount(instructions, ip) > 0) {
+                int[] data = getPushData(instructions, ip);
+                for(int j = 0; j < data.length; j++) {
+                    if ((instructions[ip] == Mnemonic.PUSHW) ||
+                        (instructions[ip] == Mnemonic.NPUSHW)) {
+                        sb.append(" ").append((short) data[j]);
+                    } else {
+                        sb.append(" ").append(data[j]);
+                    }
+                }
+            }
+            sb.append("\n");
+            ip = advanceIP(instructions, ip);
+        }
+        return sb.toString();
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/Fixed.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/Fixed.java
new file mode 100644
index 0000000..ece0aae
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/Fixed.java
@@ -0,0 +1,852 @@
+/*
+ * $Id: Fixed.java,v 1.1.1.1 2004-12-05 23:14:26 davidsch Exp $
+ *
+ * Typecast - The Font Development Environment
+ *
+ * Copyright (c) 2004 David Schweinsberg
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package jogamp.graph.font.typecast.ot;
+
+/**
+ * Functions for working with signed 16.16 fixed values
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ * @version $Id: Fixed.java,v 1.1.1.1 2004-12-05 23:14:26 davidsch Exp $
+ */
+public class Fixed {
+
+    // Tangent LUT
+    static private int[] t = {
+        0x0,
+        0x1,
+        0x3,
+        0x4,
+        0x6,
+        0x7,
+        0x9,
+        0xb,
+        0xc,
+        0xe,
+        0xf,
+        0x11,
+        0x12,
+        0x14,
+        0x16,
+        0x17,
+        0x19,
+        0x1a,
+        0x1c,
+        0x1d,
+        0x1f,
+        0x21,
+        0x22,
+        0x24,
+        0x25,
+        0x27,
+        0x29,
+        0x2a,
+        0x2c,
+        0x2e,
+        0x2f,
+        0x31,
+        0x32,
+        0x34,
+        0x36,
+        0x37,
+        0x39,
+        0x3b,
+        0x3c,
+        0x3e,
+        0x40,
+        0x41,
+        0x43,
+        0x45,
+        0x46,
+        0x48,
+        0x4a,
+        0x4b,
+        0x4d,
+        0x4f,
+        0x51,
+        0x52,
+        0x54,
+        0x56,
+        0x58,
+        0x59,
+        0x5b,
+        0x5d,
+        0x5f,
+        0x60,
+        0x62,
+        0x64,
+        0x66,
+        0x68,
+        0x6a,
+        0x6b,
+        0x6d,
+        0x6f,
+        0x71,
+        0x73,
+        0x75,
+        0x77,
+        0x79,
+        0x7b,
+        0x7c,
+        0x7e,
+        0x80,
+        0x82,
+        0x84,
+        0x86,
+        0x88,
+        0x8a,
+        0x8c,
+        0x8e,
+        0x91,
+        0x93,
+        0x95,
+        0x97,
+        0x99,
+        0x9b,
+        0x9d,
+        0x9f,
+        0xa2,
+        0xa4,
+        0xa6,
+        0xa8,
+        0xab,
+        0xad,
+        0xaf,
+        0xb1,
+        0xb4,
+        0xb6,
+        0xb9,
+        0xbb,
+        0xbd,
+        0xc0,
+        0xc2,
+        0xc5,
+        0xc7,
+        0xca,
+        0xcc,
+        0xcf,
+        0xd2,
+        0xd4,
+        0xd7,
+        0xda,
+        0xdc,
+        0xdf,
+        0xe2,
+        0xe5,
+        0xe8,
+        0xea,
+        0xed,
+        0xf0,
+        0xf3,
+        0xf6,
+        0xf9,
+        0xfc,
+        0x100,
+        0x103,
+        0x106,
+        0x109,
+        0x10c,
+        0x110,
+        0x113,
+        0x116,
+        0x11a,
+        0x11d,
+        0x121,
+        0x125,
+        0x128,
+        0x12c,
+        0x130,
+        0x134,
+        0x137,
+        0x13b,
+        0x13f,
+        0x143,
+        0x148,
+        0x14c,
+        0x150,
+        0x154,
+        0x159,
+        0x15d,
+        0x162,
+        0x166,
+        0x16b,
+        0x170,
+        0x175,
+        0x17a,
+        0x17f,
+        0x184,
+        0x189,
+        0x18e,
+        0x194,
+        0x199,
+        0x19f,
+        0x1a5,
+        0x1ab,
+        0x1b1,
+        0x1b7,
+        0x1bd,
+        0x1c3,
+        0x1ca,
+        0x1d1,
+        0x1d7,
+        0x1de,
+        0x1e6,
+        0x1ed,
+        0x1f4,
+        0x1fc,
+        0x204,
+        0x20c,
+        0x214,
+        0x21d,
+        0x225,
+        0x22e,
+        0x238,
+        0x241,
+        0x24b,
+        0x255,
+        0x25f,
+        0x26a,
+        0x274,
+        0x280,
+        0x28b,
+        0x297,
+        0x2a3,
+        0x2b0,
+        0x2bd,
+        0x2cb,
+        0x2d9,
+        0x2e8,
+        0x2f7,
+        0x306,
+        0x317,
+        0x328,
+        0x339,
+        0x34b,
+        0x35e,
+        0x372,
+        0x387,
+        0x39d,
+        0x3b3,
+        0x3cb,
+        0x3e4,
+        0x3fe,
+        0x419,
+        0x435,
+        0x454,
+        0x474,
+        0x495,
+        0x4b9,
+        0x4de,
+        0x506,
+        0x531,
+        0x55e,
+        0x58f,
+        0x5c3,
+        0x5fb,
+        0x637,
+        0x677,
+        0x6bd,
+        0x709,
+        0x75c,
+        0x7b7,
+        0x81b,
+        0x889,
+        0x904,
+        0x98d,
+        0xa27,
+        0xad5,
+        0xb9c,
+        0xc82,
+        0xd8e,
+        0xecb,
+        0x1046,
+        0x1217,
+        0x145a,
+        0x1744,
+        0x1b26,
+        0x2095,
+        0x28bc,
+        0x3651,
+        0x517b,
+        0xa2f8
+    };
+
+    // Sine LUT
+    static private int[] s = {
+        0x0,
+        0x1,
+        0x3,
+        0x4,
+        0x6,
+        0x7,
+        0x9,
+        0xa,
+        0xc,
+        0xe,
+        0xf,
+        0x11,
+        0x12,
+        0x14,
+        0x15,
+        0x17,
+        0x19,
+        0x1a,
+        0x1c,
+        0x1d,
+        0x1f,
+        0x20,
+        0x22,
+        0x24,
+        0x25,
+        0x27,
+        0x28,
+        0x2a,
+        0x2b,
+        0x2d,
+        0x2e,
+        0x30,
+        0x31,
+        0x33,
+        0x35,
+        0x36,
+        0x38,
+        0x39,
+        0x3b,
+        0x3c,
+        0x3e,
+        0x3f,
+        0x41,
+        0x42,
+        0x44,
+        0x45,
+        0x47,
+        0x48,
+        0x4a,
+        0x4b,
+        0x4d,
+        0x4e,
+        0x50,
+        0x51,
+        0x53,
+        0x54,
+        0x56,
+        0x57,
+        0x59,
+        0x5a,
+        0x5c,
+        0x5d,
+        0x5f,
+        0x60,
+        0x61,
+        0x63,
+        0x64,
+        0x66,
+        0x67,
+        0x69,
+        0x6a,
+        0x6c,
+        0x6d,
+        0x6e,
+        0x70,
+        0x71,
+        0x73,
+        0x74,
+        0x75,
+        0x77,
+        0x78,
+        0x7a,
+        0x7b,
+        0x7c,
+        0x7e,
+        0x7f,
+        0x80,
+        0x82,
+        0x83,
+        0x84,
+        0x86,
+        0x87,
+        0x88,
+        0x8a,
+        0x8b,
+        0x8c,
+        0x8e,
+        0x8f,
+        0x90,
+        0x92,
+        0x93,
+        0x94,
+        0x95,
+        0x97,
+        0x98,
+        0x99,
+        0x9b,
+        0x9c,
+        0x9d,
+        0x9e,
+        0x9f,
+        0xa1,
+        0xa2,
+        0xa3,
+        0xa4,
+        0xa6,
+        0xa7,
+        0xa8,
+        0xa9,
+        0xaa,
+        0xab,
+        0xad,
+        0xae,
+        0xaf,
+        0xb0,
+        0xb1,
+        0xb2,
+        0xb3,
+        0xb5,
+        0xb6,
+        0xb7,
+        0xb8,
+        0xb9,
+        0xba,
+        0xbb,
+        0xbc,
+        0xbd,
+        0xbe,
+        0xbf,
+        0xc0,
+        0xc1,
+        0xc2,
+        0xc3,
+        0xc4,
+        0xc5,
+        0xc6,
+        0xc7,
+        0xc8,
+        0xc9,
+        0xca,
+        0xcb,
+        0xcc,
+        0xcd,
+        0xce,
+        0xcf,
+        0xd0,
+        0xd1,
+        0xd2,
+        0xd3,
+        0xd3,
+        0xd4,
+        0xd5,
+        0xd6,
+        0xd7,
+        0xd8,
+        0xd9,
+        0xd9,
+        0xda,
+        0xdb,
+        0xdc,
+        0xdd,
+        0xdd,
+        0xde,
+        0xdf,
+        0xe0,
+        0xe1,
+        0xe1,
+        0xe2,
+        0xe3,
+        0xe3,
+        0xe4,
+        0xe5,
+        0xe6,
+        0xe6,
+        0xe7,
+        0xe8,
+        0xe8,
+        0xe9,
+        0xea,
+        0xea,
+        0xeb,
+        0xeb,
+        0xec,
+        0xed,
+        0xed,
+        0xee,
+        0xee,
+        0xef,
+        0xef,
+        0xf0,
+        0xf1,
+        0xf1,
+        0xf2,
+        0xf2,
+        0xf3,
+        0xf3,
+        0xf4,
+        0xf4,
+        0xf4,
+        0xf5,
+        0xf5,
+        0xf6,
+        0xf6,
+        0xf7,
+        0xf7,
+        0xf7,
+        0xf8,
+        0xf8,
+        0xf9,
+        0xf9,
+        0xf9,
+        0xfa,
+        0xfa,
+        0xfa,
+        0xfb,
+        0xfb,
+        0xfb,
+        0xfb,
+        0xfc,
+        0xfc,
+        0xfc,
+        0xfc,
+        0xfd,
+        0xfd,
+        0xfd,
+        0xfd,
+        0xfe,
+        0xfe,
+        0xfe,
+        0xfe,
+        0xfe,
+        0xfe,
+        0xff,
+        0xff,
+        0xff,
+        0xff,
+        0xff,
+        0xff,
+        0xff,
+        0xff,
+        0xff,
+        0xff,
+        0xff,
+        0xff,
+        0xff,
+        0xff
+    };
+
+    // Cosine LUT
+    static private int[] c = {
+        0x100,
+        0xff,
+        0xff,
+        0xff,
+        0xff,
+        0xff,
+        0xff,
+        0xff,
+        0xff,
+        0xff,
+        0xff,
+        0xff,
+        0xff,
+        0xff,
+        0xff,
+        0xfe,
+        0xfe,
+        0xfe,
+        0xfe,
+        0xfe,
+        0xfe,
+        0xfd,
+        0xfd,
+        0xfd,
+        0xfd,
+        0xfc,
+        0xfc,
+        0xfc,
+        0xfc,
+        0xfb,
+        0xfb,
+        0xfb,
+        0xfb,
+        0xfa,
+        0xfa,
+        0xfa,
+        0xf9,
+        0xf9,
+        0xf9,
+        0xf8,
+        0xf8,
+        0xf7,
+        0xf7,
+        0xf7,
+        0xf6,
+        0xf6,
+        0xf5,
+        0xf5,
+        0xf4,
+        0xf4,
+        0xf4,
+        0xf3,
+        0xf3,
+        0xf2,
+        0xf2,
+        0xf1,
+        0xf1,
+        0xf0,
+        0xef,
+        0xef,
+        0xee,
+        0xee,
+        0xed,
+        0xed,
+        0xec,
+        0xeb,
+        0xeb,
+        0xea,
+        0xea,
+        0xe9,
+        0xe8,
+        0xe8,
+        0xe7,
+        0xe6,
+        0xe6,
+        0xe5,
+        0xe4,
+        0xe3,
+        0xe3,
+        0xe2,
+        0xe1,
+        0xe1,
+        0xe0,
+        0xdf,
+        0xde,
+        0xdd,
+        0xdd,
+        0xdc,
+        0xdb,
+        0xda,
+        0xd9,
+        0xd9,
+        0xd8,
+        0xd7,
+        0xd6,
+        0xd5,
+        0xd4,
+        0xd3,
+        0xd3,
+        0xd2,
+        0xd1,
+        0xd0,
+        0xcf,
+        0xce,
+        0xcd,
+        0xcc,
+        0xcb,
+        0xca,
+        0xc9,
+        0xc8,
+        0xc7,
+        0xc6,
+        0xc5,
+        0xc4,
+        0xc3,
+        0xc2,
+        0xc1,
+        0xc0,
+        0xbf,
+        0xbe,
+        0xbd,
+        0xbc,
+        0xbb,
+        0xba,
+        0xb9,
+        0xb8,
+        0xb7,
+        0xb6,
+        0xb5,
+        0xb3,
+        0xb2,
+        0xb1,
+        0xb0,
+        0xaf,
+        0xae,
+        0xad,
+        0xab,
+        0xaa,
+        0xa9,
+        0xa8,
+        0xa7,
+        0xa6,
+        0xa4,
+        0xa3,
+        0xa2,
+        0xa1,
+        0x9f,
+        0x9e,
+        0x9d,
+        0x9c,
+        0x9b,
+        0x99,
+        0x98,
+        0x97,
+        0x95,
+        0x94,
+        0x93,
+        0x92,
+        0x90,
+        0x8f,
+        0x8e,
+        0x8c,
+        0x8b,
+        0x8a,
+        0x88,
+        0x87,
+        0x86,
+        0x84,
+        0x83,
+        0x82,
+        0x80,
+        0x7f,
+        0x7e,
+        0x7c,
+        0x7b,
+        0x7a,
+        0x78,
+        0x77,
+        0x75,
+        0x74,
+        0x73,
+        0x71,
+        0x70,
+        0x6e,
+        0x6d,
+        0x6c,
+        0x6a,
+        0x69,
+        0x67,
+        0x66,
+        0x64,
+        0x63,
+        0x61,
+        0x60,
+        0x5f,
+        0x5d,
+        0x5c,
+        0x5a,
+        0x59,
+        0x57,
+        0x56,
+        0x54,
+        0x53,
+        0x51,
+        0x50,
+        0x4e,
+        0x4d,
+        0x4b,
+        0x4a,
+        0x48,
+        0x47,
+        0x45,
+        0x44,
+        0x42,
+        0x41,
+        0x3f,
+        0x3e,
+        0x3c,
+        0x3b,
+        0x39,
+        0x38,
+        0x36,
+        0x35,
+        0x33,
+        0x31,
+        0x30,
+        0x2e,
+        0x2d,
+        0x2b,
+        0x2a,
+        0x28,
+        0x27,
+        0x25,
+        0x24,
+        0x22,
+        0x20,
+        0x1f,
+        0x1d,
+        0x1c,
+        0x1a,
+        0x19,
+        0x17,
+        0x15,
+        0x14,
+        0x12,
+        0x11,
+        0xf,
+        0xe,
+        0xc,
+        0xa,
+        0x9,
+        0x7,
+        0x6,
+        0x4,
+        0x3,
+        0x1
+    };
+
+    /**
+     * Yet to be implemented.
+     * @param num Input
+     * @return Output
+     */
+    public static int arctan( int num ) {
+        return 0;
+    }
+
+    /**
+     * 26.6 fixed number square root function.
+     * Simple (brain-dead) divide & conqure algorithm.
+     * @param num The 26.6 fixed number in question
+     * @return The resulting square root
+     */
+    public static int squareRoot(int num) {
+        int n = num;
+        int divisor = num;
+        int nSquared;
+
+        while (divisor != 0) {
+            divisor /= 2;
+            nSquared = (n * n) >> 6;
+            if (nSquared == num) {
+                break;
+            } else if (nSquared > num) {
+                n -= divisor;
+            } else {
+                n += divisor;
+            }
+        }
+        return n;
+    }
+    
+    public static float floatValue(long fixed) {
+        return (fixed >> 16) + (float)(fixed & 0xffff) / 0x10000;
+    }
+    
+    public static float roundedFloatValue(long fixed, int decimalPlaces) {
+        int factor = 10 * decimalPlaces;
+        return (float)((int)(floatValue(fixed) * factor)) / factor;
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/Mnemonic.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/Mnemonic.java
new file mode 100644
index 0000000..6b3dc1f
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/Mnemonic.java
@@ -0,0 +1,397 @@
+/*****************************************************************************
+ * Copyright (C) The Apache Software Foundation. All rights reserved.        *
+ * ------------------------------------------------------------------------- * 
+ * This software is published under the terms of the Apache Software License * 
+ * version 1.1, a copy of which has been included with this distribution in  * 
+ * the LICENSE file.                                                         * 
+ *****************************************************************************/
+
+package jogamp.graph.font.typecast.ot;
+
+/**
+ * The Mnemonic representations of the TrueType instruction set.
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ * @version $Id: Mnemonic.java,v 1.1.1.1 2004-12-05 23:14:30 davidsch Exp $
+ */
+public class Mnemonic {
+
+    public static final short SVTCA = 0x00;  // [a]
+    public static final short SPVTCA = 0x02; // [a]
+    public static final short SFVTCA = 0x04; // [a]
+    public static final short SPVTL = 0x06;  // [a]
+    public static final short SFVTL = 0x08;  // [a]
+    public static final short SPVFS = 0x0A;
+    public static final short SFVFS = 0x0B;
+    public static final short GPV = 0x0C;
+    public static final short GFV = 0x0D;
+    public static final short SFVTPV = 0x0E;
+    public static final short ISECT = 0x0F;
+    public static final short SRP0 = 0x10;
+    public static final short SRP1 = 0x11;
+    public static final short SRP2 = 0x12;
+    public static final short SZP0 = 0x13;
+    public static final short SZP1 = 0x14;
+    public static final short SZP2 = 0x15;
+    public static final short SZPS = 0x16;
+    public static final short SLOOP = 0x17;
+    public static final short RTG = 0x18;
+    public static final short RTHG = 0x19;
+    public static final short SMD = 0x1A;
+    public static final short ELSE = 0x1B;
+    public static final short JMPR = 0x1C;
+    public static final short SCVTCI = 0x1D;
+    public static final short SSWCI = 0x1E;
+    public static final short SSW = 0x1F;
+    public static final short DUP = 0x20;
+    public static final short POP = 0x21;
+    public static final short CLEAR = 0x22;
+    public static final short SWAP = 0x23;
+    public static final short DEPTH = 0x24;
+    public static final short CINDEX = 0x25;
+    public static final short MINDEX = 0x26;
+    public static final short ALIGNPTS = 0x27;
+    public static final short UTP = 0x29;
+    public static final short LOOPCALL = 0x2A;
+    public static final short CALL = 0x2B;
+    public static final short FDEF = 0x2C;
+    public static final short ENDF = 0x2D;
+    public static final short MDAP = 0x2E;  // [a]
+    public static final short IUP = 0x30;   // [a]
+    public static final short SHP = 0x32;
+    public static final short SHC = 0x34;   // [a]
+    public static final short SHZ = 0x36;   // [a]
+    public static final short SHPIX = 0x38;
+    public static final short IP = 0x39;
+    public static final short MSIRP = 0x3A; // [a]
+    public static final short ALIGNRP = 0x3C;
+    public static final short RTDG = 0x3D;
+    public static final short MIAP = 0x3E;  // [a]
+    public static final short NPUSHB = 0x40;
+    public static final short NPUSHW = 0x41;
+    public static final short WS = 0x42;
+    public static final short RS = 0x43;
+    public static final short WCVTP = 0x44;
+    public static final short RCVT = 0x45;
+    public static final short GC = 0x46;    // [a]
+    public static final short SCFS = 0x48;
+    public static final short MD = 0x49;    // [a]
+    public static final short MPPEM = 0x4B;
+    public static final short MPS = 0x4C;
+    public static final short FLIPON = 0x4D;
+    public static final short FLIPOFF = 0x4E;
+    public static final short DEBUG = 0x4F;
+    public static final short LT = 0x50;
+    public static final short LTEQ = 0x51;
+    public static final short GT = 0x52;
+    public static final short GTEQ = 0x53;
+    public static final short EQ = 0x54;
+    public static final short NEQ = 0x55;
+    public static final short ODD = 0x56;
+    public static final short EVEN = 0x57;
+    public static final short IF = 0x58;
+    public static final short EIF = 0x59;
+    public static final short AND = 0x5A;
+    public static final short OR = 0x5B;
+    public static final short NOT = 0x5C;
+    public static final short DELTAP1 = 0x5D;
+    public static final short SDB = 0x5E;
+    public static final short SDS = 0x5F;
+    public static final short ADD = 0x60;
+    public static final short SUB = 0x61;
+    public static final short DIV = 0x62;
+    public static final short MUL = 0x63;
+    public static final short ABS = 0x64;
+    public static final short NEG = 0x65;
+    public static final short FLOOR = 0x66;
+    public static final short CEILING = 0x67;
+    public static final short ROUND = 0x68;  // [ab]
+    public static final short NROUND = 0x6C; // [ab]
+    public static final short WCVTF = 0x70;
+    public static final short DELTAP2 = 0x71;
+    public static final short DELTAP3 = 0x72;
+    public static final short DELTAC1 = 0x73;
+    public static final short DELTAC2 = 0x74;
+    public static final short DELTAC3 = 0x75;
+    public static final short SROUND = 0x76;
+    public static final short S45ROUND = 0x77;
+    public static final short JROT = 0x78;
+    public static final short JROF = 0x79;
+    public static final short ROFF = 0x7A;
+    public static final short RUTG = 0x7C;
+    public static final short RDTG = 0x7D;
+    public static final short SANGW = 0x7E;
+    public static final short AA = 0x7F;
+    public static final short FLIPPT = 0x80;
+    public static final short FLIPRGON = 0x81;
+    public static final short FLIPRGOFF = 0x82;
+    public static final short SCANCTRL = 0x85;
+    public static final short SDPVTL = 0x86; // [a]
+    public static final short GETINFO = 0x88;
+    public static final short IDEF = 0x89;
+    public static final short ROLL = 0x8A;
+    public static final short MAX = 0x8B;
+    public static final short MIN = 0x8C;
+    public static final short SCANTYPE = 0x8D;
+    public static final short INSTCTRL = 0x8E;
+    public static final short PUSHB = 0xB0; // [abc]
+    public static final short PUSHW = 0xB8; // [abc]
+    public static final short MDRP = 0xC0;  // [abcde]
+    public static final short MIRP = 0xE0;  // [abcde]
+
+    /**
+     * Gets the mnemonic text for the specified opcode
+     * @param opcode The opcode for which the mnemonic is required
+     * @return The mnemonic, with a description
+     */
+    public static String getMnemonic(short opcode) {
+        if (opcode >= MIRP) return "MIRP["+((opcode&16)==0?"nrp0,":"srp0,")+((opcode&8)==0?"nmd,":"md,")+((opcode&4)==0?"nrd,":"rd,")+(opcode&3)+"]";
+        else if (opcode >= MDRP) return "MDRP["+((opcode&16)==0?"nrp0,":"srp0,")+((opcode&8)==0?"nmd,":"md,")+((opcode&4)==0?"nrd,":"rd,")+(opcode&3)+"]";
+        else if (opcode >= PUSHW) return "PUSHW["+((opcode&7)+1)+"]";
+        else if (opcode >= PUSHB) return "PUSHB["+((opcode&7)+1)+"]";
+        else if (opcode >= INSTCTRL) return "INSTCTRL";
+        else if (opcode >= SCANTYPE) return "SCANTYPE";
+        else if (opcode >= MIN) return "MIN";
+        else if (opcode >= MAX) return "MAX";
+        else if (opcode >= ROLL) return "ROLL";
+        else if (opcode >= IDEF) return "IDEF";
+        else if (opcode >= GETINFO) return "GETINFO";
+        else if (opcode >= SDPVTL) return "SDPVTL["+(opcode&1)+"]";
+        else if (opcode >= SCANCTRL) return "SCANCTRL";
+        else if (opcode >= FLIPRGOFF) return "FLIPRGOFF";
+        else if (opcode >= FLIPRGON) return "FLIPRGON";
+        else if (opcode >= FLIPPT) return "FLIPPT";
+        else if (opcode >= AA) return "AA";
+        else if (opcode >= SANGW) return "SANGW";
+        else if (opcode >= RDTG) return "RDTG";
+        else if (opcode >= RUTG) return "RUTG";
+        else if (opcode >= ROFF) return "ROFF";
+        else if (opcode >= JROF) return "JROF";
+        else if (opcode >= JROT) return "JROT";
+        else if (opcode >= S45ROUND) return "S45ROUND";
+        else if (opcode >= SROUND) return "SROUND";
+        else if (opcode >= DELTAC3) return "DELTAC3";
+        else if (opcode >= DELTAC2) return "DELTAC2";
+        else if (opcode >= DELTAC1) return "DELTAC1";
+        else if (opcode >= DELTAP3) return "DELTAP3";
+        else if (opcode >= DELTAP2) return "DELTAP2";
+        else if (opcode >= WCVTF) return "WCVTF";
+        else if (opcode >= NROUND) return "NROUND["+(opcode&3)+"]";
+        else if (opcode >= ROUND) return "ROUND["+(opcode&3)+"]";
+        else if (opcode >= CEILING) return "CEILING";
+        else if (opcode >= FLOOR) return "FLOOR";
+        else if (opcode >= NEG) return "NEG";
+        else if (opcode >= ABS) return "ABS";
+        else if (opcode >= MUL) return "MUL";
+        else if (opcode >= DIV) return "DIV";
+        else if (opcode >= SUB) return "SUB";
+        else if (opcode >= ADD) return "ADD";
+        else if (opcode >= SDS) return "SDS";
+        else if (opcode >= SDB) return "SDB";
+        else if (opcode >= DELTAP1) return "DELTAP1";
+        else if (opcode >= NOT) return "NOT";
+        else if (opcode >= OR) return "OR";
+        else if (opcode >= AND) return "AND";
+        else if (opcode >= EIF) return "EIF";
+        else if (opcode >= IF) return "IF";
+        else if (opcode >= EVEN) return "EVEN";
+        else if (opcode >= ODD) return "ODD";
+        else if (opcode >= NEQ) return "NEQ";
+        else if (opcode >= EQ) return "EQ";
+        else if (opcode >= GTEQ) return "GTEQ";
+        else if (opcode >= GT) return "GT";
+        else if (opcode >= LTEQ) return "LTEQ";
+        else if (opcode >= LT) return "LT";
+        else if (opcode >= DEBUG) return "DEBUG";
+        else if (opcode >= FLIPOFF) return "FLIPOFF";
+        else if (opcode >= FLIPON) return "FLIPON";
+        else if (opcode >= MPS) return "MPS";
+        else if (opcode >= MPPEM) return "MPPEM";
+        else if (opcode >= MD) return "MD["+(opcode&1)+"]";
+        else if (opcode >= SCFS) return "SCFS";
+        else if (opcode >= GC) return "GC["+(opcode&1)+"]";
+        else if (opcode >= RCVT) return "RCVT";
+        else if (opcode >= WCVTP) return "WCVTP";
+        else if (opcode >= RS) return "RS";
+        else if (opcode >= WS) return "WS";
+        else if (opcode >= NPUSHW) return "NPUSHW";
+        else if (opcode >= NPUSHB) return "NPUSHB";
+        else if (opcode >= MIAP) return "MIAP["+((opcode&1)==0?"nrd+nci":"rd+ci")+"]";
+        else if (opcode >= RTDG) return "RTDG";
+        else if (opcode >= ALIGNRP) return "ALIGNRP";
+        else if (opcode >= MSIRP) return "MSIRP["+(opcode&1)+"]";
+        else if (opcode >= IP) return "IP";
+        else if (opcode >= SHPIX) return "SHPIX";
+        else if (opcode >= SHZ) return "SHZ["+(opcode&1)+"]";
+        else if (opcode >= SHC) return "SHC["+(opcode&1)+"]";
+        else if (opcode >= SHP) return "SHP";
+        else if (opcode >= IUP) return "IUP["+((opcode&1)==0?"y":"x")+"]";
+        else if (opcode >= MDAP) return "MDAP["+((opcode&1)==0?"nrd":"rd")+"]";
+        else if (opcode >= ENDF) return "ENDF";
+        else if (opcode >= FDEF) return "FDEF";
+        else if (opcode >= CALL) return "CALL";
+        else if (opcode >= LOOPCALL) return "LOOPCALL";
+        else if (opcode >= UTP) return "UTP";
+        else if (opcode >= ALIGNPTS) return "ALIGNPTS";
+        else if (opcode >= MINDEX) return "MINDEX";
+        else if (opcode >= CINDEX) return "CINDEX";
+        else if (opcode >= DEPTH) return "DEPTH";
+        else if (opcode >= SWAP) return "SWAP";
+        else if (opcode >= CLEAR) return "CLEAR";
+        else if (opcode >= POP) return "POP";
+        else if (opcode >= DUP) return "DUP";
+        else if (opcode >= SSW) return "SSW";
+        else if (opcode >= SSWCI) return "SSWCI";
+        else if (opcode >= SCVTCI) return "SCVTCI";
+        else if (opcode >= JMPR) return "JMPR";
+        else if (opcode >= ELSE) return "ELSE";
+        else if (opcode >= SMD) return "SMD";
+        else if (opcode >= RTHG) return "RTHG";
+        else if (opcode >= RTG) return "RTG";
+        else if (opcode >= SLOOP) return "SLOOP";
+        else if (opcode >= SZPS) return "SZPS";
+        else if (opcode >= SZP2) return "SZP2";
+        else if (opcode >= SZP1) return "SZP1";
+        else if (opcode >= SZP0) return "SZP0";
+        else if (opcode >= SRP2) return "SRP2";
+        else if (opcode >= SRP1) return "SRP1";
+        else if (opcode >= SRP0) return "SRP0";
+        else if (opcode >= ISECT) return "ISECT";
+        else if (opcode >= SFVTPV) return "SFVTPV";
+        else if (opcode >= GFV) return "GFV";
+        else if (opcode >= GPV) return "GPV";
+        else if (opcode >= SFVFS) return "SFVFS";
+        else if (opcode >= SPVFS) return "SPVFS";
+        else if (opcode >= SFVTL) return "SFVTL["+((opcode&1)==0?"y-axis":"x-axis")+"]";
+        else if (opcode >= SPVTL) return "SPVTL["+((opcode&1)==0?"y-axis":"x-axis")+"]";
+        else if (opcode >= SFVTCA) return "SFVTCA["+((opcode&1)==0?"y-axis":"x-axis")+"]";
+        else if (opcode >= SPVTCA) return "SPVTCA["+((opcode&1)==0?"y-axis":"x-axis")+"]";
+        else if (opcode >= SVTCA) return "SVTCA["+((opcode&1)==0?"y-axis":"x-axis")+"]";
+        else return "????";
+    }
+
+    public static String getComment(short opcode) {
+        if (opcode >= MIRP) return "MIRP["+((opcode&16)==0?"nrp0,":"srp0,")+((opcode&8)==0?"nmd,":"md,")+((opcode&4)==0?"nrd,":"rd,")+(opcode&3)+"]\t\tMove Indirect Relative Point";
+        else if (opcode >= MDRP) return "MDRP["+((opcode&16)==0?"nrp0,":"srp0,")+((opcode&8)==0?"nmd,":"md,")+((opcode&4)==0?"nrd,":"rd,")+(opcode&3)+"]\t\tMove Direct Relative Point";
+        else if (opcode >= PUSHW) return "PUSHW["+((opcode&7)+1)+"]";
+        else if (opcode >= PUSHB) return "PUSHB["+((opcode&7)+1)+"]";
+        else if (opcode >= INSTCTRL) return "INSTCTRL\tINSTruction Execution ConTRol";
+        else if (opcode >= SCANTYPE) return "SCANTYPE\tSCANTYPE";
+        else if (opcode >= MIN) return "MIN\t\tMINimum of top two stack elements";
+        else if (opcode >= MAX) return "MAX\t\tMAXimum of top two stack elements";
+        else if (opcode >= ROLL) return "ROLL\t\tROLL the top three stack elements";
+        else if (opcode >= IDEF) return "IDEF\t\tInstruction DEFinition";
+        else if (opcode >= GETINFO) return "GETINFO\tGET INFOrmation";
+        else if (opcode >= SDPVTL) return "SDPVTL["+(opcode&1)+"]\tSet Dual Projection_Vector To Line";
+        else if (opcode >= SCANCTRL) return "SCANCTRL\tSCAN conversion ConTRoL";
+        else if (opcode >= FLIPRGOFF) return "FLIPRGOFF\tFLIP RanGe OFF";
+        else if (opcode >= FLIPRGON) return "FLIPRGON\tFLIP RanGe ON";
+        else if (opcode >= FLIPPT) return "FLIPPT\tFLIP PoinT";
+        else if (opcode >= AA) return "AA";
+        else if (opcode >= SANGW) return "SANGW\t\tSet Angle _Weight";
+        else if (opcode >= RDTG) return "RDTG\t\tRound Down To Grid";
+        else if (opcode >= RUTG) return "RUTG\t\tRound Up To Grid";
+        else if (opcode >= ROFF) return "ROFF\t\tRound OFF";
+        else if (opcode >= JROF) return "JROF\t\tJump Relative On False";
+        else if (opcode >= JROT) return "JROT\t\tJump Relative On True";
+        else if (opcode >= S45ROUND) return "S45ROUND\tSuper ROUND 45 degrees";
+        else if (opcode >= SROUND) return "SROUND\tSuper ROUND";
+        else if (opcode >= DELTAC3) return "DELTAC3\tDELTA exception C3";
+        else if (opcode >= DELTAC2) return "DELTAC2\tDELTA exception C2";
+        else if (opcode >= DELTAC1) return "DELTAC1\tDELTA exception C1";
+        else if (opcode >= DELTAP3) return "DELTAP3\tDELTA exception P3";
+        else if (opcode >= DELTAP2) return "DELTAP2\tDELTA exception P2";
+        else if (opcode >= WCVTF) return "WCVTF\t\tWrite Control Value Table in FUnits";
+        else if (opcode >= NROUND) return "NROUND["+(opcode&3)+"]";
+        else if (opcode >= ROUND) return "ROUND["+(opcode&3)+"]";
+        else if (opcode >= CEILING) return "CEILING\tCEILING";
+        else if (opcode >= FLOOR) return "FLOOR\t\tFLOOR";
+        else if (opcode >= NEG) return "NEG\t\tNEGate";
+        else if (opcode >= ABS) return "ABS\t\tABSolute value";
+        else if (opcode >= MUL) return "MUL\t\tMULtiply";
+        else if (opcode >= DIV) return "DIV\t\tDIVide";
+        else if (opcode >= SUB) return "SUB\t\tSUBtract";
+        else if (opcode >= ADD) return "ADD\t\tADD";
+        else if (opcode >= SDS) return "SDS\t\tSet Delta_Shift in the graphics state";
+        else if (opcode >= SDB) return "SDB\t\tSet Delta_Base in the graphics state";
+        else if (opcode >= DELTAP1) return "DELTAP1\tDELTA exception P1";
+        else if (opcode >= NOT) return "NOT\t\tlogical NOT";
+        else if (opcode >= OR) return "OR\t\t\tlogical OR";
+        else if (opcode >= AND) return "AND\t\tlogical AND";
+        else if (opcode >= EIF) return "EIF\t\tEnd IF";
+        else if (opcode >= IF) return "IF\t\t\tIF test";
+        else if (opcode >= EVEN) return "EVEN";
+        else if (opcode >= ODD) return "ODD";
+        else if (opcode >= NEQ) return "NEQ\t\tNot EQual";
+        else if (opcode >= EQ) return "EQ\t\t\tEQual";
+        else if (opcode >= GTEQ) return "GTEQ\t\tGreater Than or Equal";
+        else if (opcode >= GT) return "GT\t\t\tGreater Than";
+        else if (opcode >= LTEQ) return "LTEQ\t\tLess Than or Equal";
+        else if (opcode >= LT) return "LT\t\t\tLess Than";
+        else if (opcode >= DEBUG) return "DEBUG";
+        else if (opcode >= FLIPOFF) return "FLIPOFF\tSet the auto_flip Boolean to OFF";
+        else if (opcode >= FLIPON) return "FLIPON\tSet the auto_flip Boolean to ON";
+        else if (opcode >= MPS) return "MPS\t\tMeasure Point Size";
+        else if (opcode >= MPPEM) return "MPPEM\t\tMeasure Pixels Per EM";
+        else if (opcode >= MD) return "MD["+(opcode&1)+"]\t\t\tMeasure Distance";
+        else if (opcode >= SCFS) return "SCFS\t\tSets Coordinate From the Stack using projection_vector and freedom_vector";
+        else if (opcode >= GC) return "GC["+(opcode&1)+"]\t\t\tGet Coordinate projected onto the projection_vector";
+        else if (opcode >= RCVT) return "RCVT\t\tRead Control Value Table";
+        else if (opcode >= WCVTP) return "WCVTP\t\tWrite Control Value Table in Pixel units";
+        else if (opcode >= RS) return "RS\t\t\tRead Store";
+        else if (opcode >= WS) return "WS\t\t\tWrite Store";
+        else if (opcode >= NPUSHW) return "NPUSHW";
+        else if (opcode >= NPUSHB) return "NPUSHB";
+        else if (opcode >= MIAP) return "MIAP["+((opcode&1)==0?"nrd+nci":"rd+ci")+"]\t\tMove Indirect Absolute Point";
+        else if (opcode >= RTDG) return "RTDG\t\tRound To Double Grid";
+        else if (opcode >= ALIGNRP) return "ALIGNRP\tALIGN Relative Point";
+        else if (opcode >= MSIRP) return "MSIRP["+(opcode&1)+"]\t\tMove Stack Indirect Relative Point";
+        else if (opcode >= IP) return "IP\t\t\tInterpolate Point by the last relative stretch";
+        else if (opcode >= SHPIX) return "SHPIX\t\tSHift point by a PIXel amount";
+        else if (opcode >= SHZ) return "SHZ["+(opcode&1)+"]\t\tSHift Zone by the last pt";
+        else if (opcode >= SHC) return "SHC["+(opcode&1)+"]\t\tSHift Contour by the last point";
+        else if (opcode >= SHP) return "SHP\t\tSHift Point by the last point";
+        else if (opcode >= IUP) return "IUP["+((opcode&1)==0?"y":"x")+"]\t\tInterpolate Untouched Points through the outline";
+        else if (opcode >= MDAP) return "MDAP["+((opcode&1)==0?"nrd":"rd")+"]\t\tMove Direct Absolute Point";
+        else if (opcode >= ENDF) return "ENDF\t\tEND Function definition";
+        else if (opcode >= FDEF) return "FDEF\t\tFunction DEFinition ";
+        else if (opcode >= CALL) return "CALL\t\tCALL function";
+        else if (opcode >= LOOPCALL) return "LOOPCALL\tLOOP and CALL function";
+        else if (opcode >= UTP) return "UTP\t\tUnTouch Point";
+        else if (opcode >= ALIGNPTS) return "ALIGNPTS\tALIGN Points";
+        else if (opcode >= MINDEX) return "MINDEX\tMove the INDEXed element to the top of the stack";
+        else if (opcode >= CINDEX) return "CINDEX\tCopy the INDEXed element to the top of the stack";
+        else if (opcode >= DEPTH) return "DEPTH\t\tReturns the DEPTH of the stack";
+        else if (opcode >= SWAP) return "SWAP\t\tSWAP the top two elements on the stack";
+        else if (opcode >= CLEAR) return "CLEAR\t\tClear the entire stack";
+        else if (opcode >= POP) return "POP\t\tPOP top stack element";
+        else if (opcode >= DUP) return "DUP\t\tDuplicate top stack element";
+        else if (opcode >= SSW) return "SSW\t\tSet Single-width";
+        else if (opcode >= SSWCI) return "SSWCI\t\tSet Single_Width_Cut_In";
+        else if (opcode >= SCVTCI) return "SCVTCI\tSet Control Value Table Cut In";
+        else if (opcode >= JMPR) return "JMPR\t\tJuMP";
+        else if (opcode >= ELSE) return "ELSE";
+        else if (opcode >= SMD) return "SMD\t\tSet Minimum_ Distance";
+        else if (opcode >= RTHG) return "RTHG\t\tRound To Half Grid";
+        else if (opcode >= RTG) return "RTG\t\tRound To Grid";
+        else if (opcode >= SLOOP) return "SLOOP\t\tSet LOOP variable";
+        else if (opcode >= SZPS) return "SZPS\t\tSet Zone PointerS";
+        else if (opcode >= SZP2) return "SZP2\t\tSet Zone Pointer 2";
+        else if (opcode >= SZP1) return "SZP1\t\tSet Zone Pointer 1";
+        else if (opcode >= SZP0) return "SZP0\t\tSet Zone Pointer 0";
+        else if (opcode >= SRP2) return "SRP2\t\tSet Reference Point 2";
+        else if (opcode >= SRP1) return "SRP1\t\tSet Reference Point 1";
+        else if (opcode >= SRP0) return "SRP0\t\tSet Reference Point 0";
+        else if (opcode >= ISECT) return "ISECT\t\tmoves point p to the InterSECTion of two lines";
+        else if (opcode >= SFVTPV) return "SFVTPV\tSet Freedom_Vector To Projection Vector";
+        else if (opcode >= GFV) return "GFV\t\tGet Freedom_Vector";
+        else if (opcode >= GPV) return "GPV\t\tGet Projection_Vector";
+        else if (opcode >= SFVFS) return "SFVFS\t\tSet Freedom_Vector From Stack";
+        else if (opcode >= SPVFS) return "SPVFS\t\tSet Projection_Vector From Stack";
+        else if (opcode >= SFVTL) return "SFVTL["+((opcode&1)==0?"y-axis":"x-axis")+"]\t\tSet Freedom_Vector To Line";
+        else if (opcode >= SPVTL) return "SPVTL["+((opcode&1)==0?"y-axis":"x-axis")+"]\t\tSet Projection_Vector To Line";
+        else if (opcode >= SFVTCA) return "SFVTCA["+((opcode&1)==0?"y-axis":"x-axis")+"]\tSet Freedom_Vector to Coordinate Axis";
+        else if (opcode >= SPVTCA) return "SPVTCA["+((opcode&1)==0?"y-axis":"x-axis")+"]\tSet Projection_Vector To Coordinate Axis";
+        else if (opcode >= SVTCA) return "SVTCA["+((opcode&1)==0?"y-axis":"x-axis")+"]\t\tSet freedom and projection Vectors To Coordinate Axis";
+        else return "????";
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/OTFont.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/OTFont.java
new file mode 100644
index 0000000..8c14b73
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/OTFont.java
@@ -0,0 +1,293 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, 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.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Batik" and  "Apache Software Foundation" must  not  be
+    used to  endorse or promote  products derived from  this software without
+    prior written permission. For written permission, please contact
+    apache at apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, 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.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package jogamp.graph.font.typecast.ot;
+
+import java.io.DataInputStream;
+import java.io.IOException;
+
+import jogamp.graph.font.typecast.ot.table.CmapTable;
+import jogamp.graph.font.typecast.ot.table.DirectoryEntry;
+import jogamp.graph.font.typecast.ot.table.GlyfDescript;
+import jogamp.graph.font.typecast.ot.table.GlyfTable;
+import jogamp.graph.font.typecast.ot.table.HdmxTable;
+import jogamp.graph.font.typecast.ot.table.HeadTable;
+import jogamp.graph.font.typecast.ot.table.HheaTable;
+import jogamp.graph.font.typecast.ot.table.HmtxTable;
+import jogamp.graph.font.typecast.ot.table.LocaTable;
+import jogamp.graph.font.typecast.ot.table.MaxpTable;
+import jogamp.graph.font.typecast.ot.table.NameTable;
+import jogamp.graph.font.typecast.ot.table.Os2Table;
+import jogamp.graph.font.typecast.ot.table.PostTable;
+import jogamp.graph.font.typecast.ot.table.Table;
+import jogamp.graph.font.typecast.ot.table.TableDirectory;
+import jogamp.graph.font.typecast.ot.table.TableFactory;
+import jogamp.graph.font.typecast.ot.table.VheaTable;
+
+
+/**
+ * The TrueType font.
+ * @version $Id: OTFont.java,v 1.6 2007-01-31 01:49:18 davidsch Exp $
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>, Sven Gothel
+ */
+public class OTFont {
+
+    private OTFontCollection _fc;
+    private TableDirectory _tableDirectory = null;
+    private Table[] _tables;
+    private Os2Table _os2;
+    private CmapTable _cmap;
+    private GlyfTable _glyf;
+    private HeadTable _head;
+    private HheaTable _hhea;
+    private HdmxTable _hdmx;
+    private HmtxTable _hmtx;
+    private LocaTable _loca;
+    private MaxpTable _maxp;
+    private NameTable _name;
+    private PostTable _post;
+    private VheaTable _vhea;
+
+    /**
+     * Constructor
+     */
+    public OTFont(OTFontCollection fc) {
+        _fc = fc;
+    }
+    public StringBuilder getName(int nameIndex, StringBuilder sb) {
+        if(null == sb) {
+            sb = new StringBuilder();
+        }        
+        return _name.getRecordsRecordString(sb, nameIndex);
+    }
+    
+    public StringBuilder getAllNames(StringBuilder sb, String separator) {
+        if(null != _name) {
+            if(null == sb) {
+                sb = new StringBuilder();
+            }
+            for(int i=0; i<_name.getNumberOfNameRecords(); i++) {
+                _name.getRecord(i).getRecordString(sb).append(separator);
+            }
+        }
+        return sb;  
+    }
+    
+    public Table getTable(int tableType) {
+        for (int i = 0; i < _tables.length; i++) {
+            if ((_tables[i] != null) && (_tables[i].getType() == tableType)) {
+                return _tables[i];
+            }
+        }
+        return null;
+    }
+
+    public Os2Table getOS2Table() {
+        return _os2;
+    }
+    
+    public CmapTable getCmapTable() {
+        return _cmap;
+    }
+    
+    public HeadTable getHeadTable() {
+        return _head;
+    }
+    
+    public HheaTable getHheaTable() {
+        return _hhea;
+    }
+    
+    public HdmxTable getHdmxTable() {
+        return _hdmx;
+    }
+    
+    public HmtxTable getHmtxTable() {
+        return _hmtx;
+    }
+    
+    public LocaTable getLocaTable() {
+        return _loca;
+    }
+    
+    public MaxpTable getMaxpTable() {
+        return _maxp;
+    }
+
+    public NameTable getNameTable() {
+        return _name;
+    }
+
+    public PostTable getPostTable() {
+        return _post;
+    }
+
+    public VheaTable getVheaTable() {
+        return _vhea;
+    }
+
+    public int getAscent() {
+        return _hhea.getAscender();
+    }
+
+    public int getDescent() {
+        return _hhea.getDescender();
+    }
+
+    public int getNumGlyphs() {
+        return _maxp.getNumGlyphs();
+    }
+
+    public OTGlyph getGlyph(int i) {
+        
+        final GlyfDescript _glyfDescr = _glyf.getDescription(i); 
+        return (null != _glyfDescr)
+            ? new OTGlyph(
+                _glyfDescr,
+                _hmtx.getLeftSideBearing(i),
+                _hmtx.getAdvanceWidth(i))
+            : null;
+    }
+    
+    public TableDirectory getTableDirectory() {
+        return _tableDirectory;
+    }
+    
+    private Table readTable(
+            DataInputStream dis,
+            int tablesOrigin,
+            int tag) throws IOException {
+        dis.reset();
+        DirectoryEntry entry = _tableDirectory.getEntryByTag(tag);
+        if (entry == null) {
+            return null;
+        }
+        dis.skip(tablesOrigin + entry.getOffset());
+        return TableFactory.create(_fc, this, entry, dis);
+    }
+
+    /**
+     * @param dis OpenType/TrueType font file data.
+     * @param directoryOffset The Table Directory offset within the file.  For a
+     * regular TTF/OTF file this will be zero, but for a TTC (Font Collection)
+     * the offset is retrieved from the TTC header.  For a Mac font resource,
+     * offset is retrieved from the resource headers.
+     * @param tablesOrigin The point the table offsets are calculated from.
+     * Once again, in a regular TTF file, this will be zero.  In a TTC is is
+     * also zero, but within a Mac resource, it is the beggining of the
+     * individual font resource data.
+     */
+    protected void read(
+            DataInputStream dis,
+            int directoryOffset,
+            int tablesOrigin) throws IOException {
+        
+        // Load the table directory
+        dis.reset();
+        dis.skip(directoryOffset);
+        _tableDirectory = new TableDirectory(dis);
+        _tables = new Table[_tableDirectory.getNumTables()];
+        
+        // Load some prerequisite tables
+        _head = (HeadTable) readTable(dis, tablesOrigin, Table.head);
+        _hhea = (HheaTable) readTable(dis, tablesOrigin, Table.hhea);
+        _maxp = (MaxpTable) readTable(dis, tablesOrigin, Table.maxp);
+        _loca = (LocaTable) readTable(dis, tablesOrigin, Table.loca);
+        _vhea = (VheaTable) readTable(dis, tablesOrigin, Table.vhea);
+
+        int index = 0;
+        _tables[index++] = _head;
+        _tables[index++] = _hhea;
+        _tables[index++] = _maxp;
+        if (_loca != null) {
+            _tables[index++] = _loca;
+        }
+        if (_vhea != null) {
+            _tables[index++] = _vhea;
+        }
+        
+        // Load all other tables
+        for (int i = 0; i < _tableDirectory.getNumTables(); i++) {
+            DirectoryEntry entry = _tableDirectory.getEntry(i);
+            if (entry.getTag() == Table.head
+                    || entry.getTag() == Table.hhea
+                    || entry.getTag() == Table.maxp
+                    || entry.getTag() == Table.loca
+                    || entry.getTag() == Table.vhea) {
+                continue;
+            }
+            dis.reset();
+            dis.skip(tablesOrigin + entry.getOffset());
+            _tables[index] = TableFactory.create(_fc, this, entry, dis);
+            ++index;
+        }
+
+        // Get references to commonly used tables (these happen to be all the
+        // required tables)
+        _cmap = (CmapTable) getTable(Table.cmap);
+        _hdmx = (HdmxTable) getTable(Table.hdmx);
+        _hmtx = (HmtxTable) getTable(Table.hmtx);
+        _name = (NameTable) getTable(Table.name);
+        _os2 = (Os2Table) getTable(Table.OS_2);
+        _post = (PostTable) getTable(Table.post);
+
+        // If this is a TrueType outline, then we'll have at least the
+        // 'glyf' table (along with the 'loca' table)
+        _glyf = (GlyfTable) getTable(Table.glyf);
+    }
+
+    public String toString() {
+        if (_tableDirectory != null) {
+            return _tableDirectory.toString();
+        } else {
+            return "Empty font";
+        }
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/OTFontCollection.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/OTFontCollection.java
new file mode 100644
index 0000000..53a8890
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/OTFontCollection.java
@@ -0,0 +1,170 @@
+/*
+ * $Id: OTFontCollection.java,v 1.6 2010-08-10 11:38:11 davidsch Exp $
+ *
+ * Typecast - The Font Development Environment
+ *
+ * Copyright (c) 2004 David Schweinsberg
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package jogamp.graph.font.typecast.ot;
+
+import java.io.File;
+import java.io.BufferedInputStream;
+import java.io.DataInputStream;
+import java.io.FileInputStream;
+import java.io.IOException;
+
+import java.util.ArrayList;
+
+import jogamp.graph.font.typecast.ot.mac.ResourceHeader;
+import jogamp.graph.font.typecast.ot.mac.ResourceMap;
+import jogamp.graph.font.typecast.ot.mac.ResourceReference;
+import jogamp.graph.font.typecast.ot.mac.ResourceType;
+import jogamp.graph.font.typecast.ot.table.DirectoryEntry;
+import jogamp.graph.font.typecast.ot.table.TTCHeader;
+import jogamp.graph.font.typecast.ot.table.Table;
+
+
+/**
+ *
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ * @version $Id: OTFontCollection.java,v 1.6 2010-08-10 11:38:11 davidsch Exp $
+ */
+public class OTFontCollection {
+
+    private String _pathName;
+    private String _fileName;
+    private TTCHeader _ttcHeader;
+    private OTFont[] _fonts;
+    private ArrayList<Table> _tables = new ArrayList<Table>();
+    private boolean _resourceFork = false;
+
+    /** Creates new FontCollection */
+    protected OTFontCollection() {
+    }
+
+    /**
+     * @param file The OpenType font file
+     */
+    public static OTFontCollection create(File file) throws IOException {
+        OTFontCollection fc = new OTFontCollection();
+        fc.read(file);
+        return fc;
+    }
+
+    public String getPathName() {
+        return _pathName;
+    }
+
+    public String getFileName() {
+        return _fileName;
+    }
+
+    public OTFont getFont(int i) {
+        return _fonts[i];
+    }
+    
+    public int getFontCount() {
+        return _fonts.length;
+    }
+    
+    public TTCHeader getTtcHeader() {
+        return _ttcHeader;
+    }
+
+    public Table getTable(DirectoryEntry de) {
+        for (int i = 0; i < _tables.size(); i++) {
+            Table table = _tables.get(i);
+            if ((table.getDirectoryEntry().getTag() == de.getTag()) &&
+                (table.getDirectoryEntry().getOffset() == de.getOffset())) {
+                return table;
+            }
+        }
+        return null;
+    }
+
+    public void addTable(Table table) {
+        _tables.add(table);
+    }
+
+    /**
+     * @param file The OpenType font file
+     */
+    protected void read(File file) throws IOException {
+        _pathName = file.getPath();
+        _fileName = file.getName();
+
+        if (!file.exists()) {
+            throw new IOException();
+        }
+
+        // Do we need to modify the path name to deal with font resources
+        // in a Mac resource fork?
+        if (file.length() == 0) {
+            file = new File(file, "..namedfork/rsrc");
+            if (!file.exists()) {
+                throw new IOException();
+            }
+            _resourceFork = true;
+        }
+
+        DataInputStream dis = new DataInputStream(
+            new BufferedInputStream(
+                new FileInputStream(file), (int) file.length()));
+        dis.mark((int) file.length());
+
+        if (_resourceFork || _pathName.endsWith(".dfont")) {
+
+            // This is a Macintosh font suitcase resource
+            ResourceHeader resourceHeader = new ResourceHeader(dis);
+
+            // Seek to the map offset and read the map
+            dis.reset();
+            dis.skip(resourceHeader.getMapOffset());
+            ResourceMap map = new ResourceMap(dis);
+
+            // Get the 'sfnt' resources
+            ResourceType resourceType = map.getResourceType("sfnt");
+
+            // Load the font data
+            _fonts = new OTFont[resourceType.getCount()];
+            for (int i = 0; i < resourceType.getCount(); i++) {
+                ResourceReference resourceReference = resourceType.getReference(i);
+                _fonts[i] = new OTFont(this);
+                int offset = resourceHeader.getDataOffset() +
+                        resourceReference.getDataOffset() + 4;
+                _fonts[i].read(dis, offset, offset);
+            }
+
+        } else if (TTCHeader.isTTC(dis)) {
+
+            // This is a TrueType font collection
+            dis.reset();
+            _ttcHeader = new TTCHeader(dis);
+            _fonts = new OTFont[_ttcHeader.getDirectoryCount()];
+            for (int i = 0; i < _ttcHeader.getDirectoryCount(); i++) {
+                _fonts[i] = new OTFont(this);
+                _fonts[i].read(dis, _ttcHeader.getTableDirectory(i), 0);
+            }
+        } else {
+
+            // This is a standalone font file
+            _fonts = new OTFont[1];
+            _fonts[0] = new OTFont(this);
+            _fonts[0].read(dis, 0, 0);
+        }
+        dis.close();
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/OTGlyph.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/OTGlyph.java
new file mode 100644
index 0000000..5c00424
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/OTGlyph.java
@@ -0,0 +1,169 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, 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.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Batik" and  "Apache Software Foundation" must  not  be
+    used to  endorse or promote  products derived from  this software without
+    prior written permission. For written permission, please contact
+    apache at apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, 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.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package jogamp.graph.font.typecast.ot;
+
+import jogamp.graph.font.typecast.ot.table.Charstring;
+import jogamp.graph.font.typecast.ot.table.CharstringType2;
+import jogamp.graph.font.typecast.ot.table.GlyfDescript;
+import jogamp.graph.font.typecast.ot.table.GlyphDescription;
+import jogamp.graph.font.typecast.t2.T2Interpreter;
+
+import com.jogamp.graph.geom.AABBox;
+
+
+
+/**
+ * An individual glyph within a font.
+ * @version $Id: Glyph.java,v 1.3 2007-02-21 12:23:54 davidsch Exp $
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>, Sven Gothel
+ */
+public class OTGlyph {
+
+    protected short _leftSideBearing;
+    protected int _advanceWidth;
+    private Point[] _points;
+    AABBox _bbox;
+
+    /**
+     * Construct a Glyph from a TrueType outline described by
+     * a GlyphDescription.
+     * @param cs The Charstring describing the glyph.
+     * @param lsb The Left Side Bearing.
+     * @param advance The advance width.
+     */
+    public OTGlyph(GlyphDescription gd, short lsb, int advance) {
+        _leftSideBearing = lsb;
+        _advanceWidth = advance;
+        describe(gd);
+    }
+
+    /**
+     * Construct a Glyph from a PostScript outline described by a Charstring.
+     * @param cs The Charstring describing the glyph.
+     * @param lsb The Left Side Bearing.
+     * @param advance The advance width.
+     */
+    public OTGlyph(Charstring cs, short lsb, int advance) {
+        _leftSideBearing = lsb;
+        _advanceWidth = advance;
+        if (cs instanceof CharstringType2) {
+            T2Interpreter t2i = new T2Interpreter();
+            _points = t2i.execute((CharstringType2) cs);
+        } else {
+            //throw unsupported charstring type
+        }
+    }
+
+    public AABBox getBBox() { 
+        return _bbox; 
+    }
+    
+    public int getAdvanceWidth() {
+        return _advanceWidth;
+    }
+
+    public short getLeftSideBearing() {
+        return _leftSideBearing;
+    }
+
+    public Point getPoint(int i) {
+        return _points[i];
+    }
+
+    public int getPointCount() {
+        return _points.length;
+    }
+
+    /**
+     * Resets the glyph to the TrueType table settings
+     */
+    public void reset() {
+    }
+
+    /**
+     * @param factor a 16.16 fixed value
+     */
+    public void scale(int factor) {
+        for (int i = 0; i < _points.length; i++) {
+            //points[i].x = ( points[i].x * factor ) >> 6;
+            //points[i].y = ( points[i].y * factor ) >> 6;
+            _points[i].x = ((_points[i].x<<10) * factor) >> 26;
+            _points[i].y = ((_points[i].y<<10) * factor) >> 26;
+        }
+        _leftSideBearing = (short)(( _leftSideBearing * factor) >> 6);
+        _advanceWidth = (_advanceWidth * factor) >> 6;
+    }
+
+    /**
+     * Set the points of a glyph from the GlyphDescription
+     */
+    private void describe(GlyphDescription gd) {
+        int endPtIndex = 0;
+        _points = new Point[gd.getPointCount() /* + 2 */ ];
+        for (int i = 0; i < gd.getPointCount(); i++) {
+            boolean endPt = gd.getEndPtOfContours(endPtIndex) == i;
+            if (endPt) {
+                endPtIndex++;
+            }
+            _points[i] = new Point(
+                    gd.getXCoordinate(i),
+                    gd.getYCoordinate(i),
+                    (gd.getFlags(i) & GlyfDescript.onCurve) != 0,
+                    endPt);
+        }
+
+        // Append the origin and advanceWidth points (n & n+1)
+        // _points[gd.getPointCount()] = new Point(0, 0, true, true);
+        // _points[gd.getPointCount()+1] = new Point(_advanceWidth, 0, true, true);
+        
+        _bbox = new AABBox(gd.getXMinimum(), gd.getYMinimum(), 0, gd.getXMaximum(), gd.getYMaximum(), 0);
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/Point.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/Point.java
new file mode 100644
index 0000000..f1a090d
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/Point.java
@@ -0,0 +1,29 @@
+/*****************************************************************************
+ * Copyright (C) The Apache Software Foundation. All rights reserved.        *
+ * ------------------------------------------------------------------------- *
+ * This software is published under the terms of the Apache Software License *
+ * version 1.1, a copy of which has been included with this distribution in  *
+ * the LICENSE file.                                                         *
+ *****************************************************************************/
+
+package jogamp.graph.font.typecast.ot;
+
+/**
+ * @version $Id: Point.java,v 1.1.1.1 2004-12-05 23:14:31 davidsch Exp $
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ */
+public class Point {
+
+    public int x = 0;
+    public int y = 0;
+    public boolean onCurve = true;
+    public boolean endOfContour = false;
+    public boolean touched = false;
+
+    public Point(int x, int y, boolean onCurve, boolean endOfContour) {
+        this.x = x;
+        this.y = y;
+        this.onCurve = onCurve;
+        this.endOfContour = endOfContour;
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/mac/ResourceData.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/mac/ResourceData.java
new file mode 100644
index 0000000..433ff60
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/mac/ResourceData.java
@@ -0,0 +1,45 @@
+/*
+ * $Id: ResourceData.java,v 1.1.1.1 2004-12-05 23:14:31 davidsch Exp $
+ *
+ * Typecast - The Font Development Environment
+ *
+ * Copyright (c) 2004 David Schweinsberg
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package jogamp.graph.font.typecast.ot.mac;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+/**
+ *
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ * @version $Id: ResourceData.java,v 1.1.1.1 2004-12-05 23:14:31 davidsch Exp $
+ */
+public class ResourceData {
+
+    private byte[] data;
+    
+    /** Creates new ResourceData */
+    public ResourceData(DataInput di) throws IOException {
+        int dataLen = di.readInt();
+        data = new byte[dataLen];
+        di.readFully(data);
+    }
+
+    public byte[] getData() {
+        return data;
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/mac/ResourceFile.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/mac/ResourceFile.java
new file mode 100644
index 0000000..2ada22c
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/mac/ResourceFile.java
@@ -0,0 +1,77 @@
+/*
+ * $Id: ResourceFile.java,v 1.2 2007-01-29 04:01:53 davidsch Exp $
+ *
+ * Typecast - The Font Development Environment
+ *
+ * Copyright (c) 2004 David Schweinsberg
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package jogamp.graph.font.typecast.ot.mac;
+
+import java.io.IOException;
+import java.io.RandomAccessFile;
+
+/**
+ * Mac resource loading test.
+ * TODO: incorporate this into the test suite.
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ * @version $Id: ResourceFile.java,v 1.2 2007-01-29 04:01:53 davidsch Exp $
+ */
+public class ResourceFile {
+
+    private ResourceHeader header;
+    private ResourceMap map;
+    
+    /** Creates new Resource */
+    public ResourceFile(RandomAccessFile raf) throws IOException {
+
+        // Read header at the beginning of the file
+        raf.seek(0);
+        header = new ResourceHeader(raf);
+        
+        // Seek to the map offset and read the map
+        raf.seek(header.getMapOffset());
+        map = new ResourceMap(raf);
+    }
+
+    public ResourceMap getResourceMap() {
+        return map;
+    }
+
+    public static void main(String[] args) {
+        try {
+            //RandomAccessFile raf = new RandomAccessFile("/Library/Fonts/GillSans.dfont", "r");
+            
+            // Tests loading a font from a resource fork on Mac OS X
+            RandomAccessFile raf = new RandomAccessFile("/Library/Fonts/Georgia/..namedfork/rsrc", "r");
+            ResourceFile resource = new ResourceFile(raf);
+            for (int i = 0; i < resource.getResourceMap().getResourceTypeCount(); i++) {
+                System.out.println(resource.getResourceMap().getResourceType(i).getTypeAsString());
+            }
+            
+            // Get the first 'sfnt' resource
+            ResourceType type = resource.getResourceMap().getResourceType("sfnt");
+            ResourceReference reference = type.getReference(0);
+            
+            type = resource.getResourceMap().getResourceType("FOND");
+            for (int i = 0; i < type.getCount(); ++i) {
+                reference = type.getReference(i);
+                System.out.println(reference.getName());
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/mac/ResourceHeader.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/mac/ResourceHeader.java
new file mode 100644
index 0000000..8f52246
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/mac/ResourceHeader.java
@@ -0,0 +1,61 @@
+/*
+ * $Id: ResourceHeader.java,v 1.1.1.1 2004-12-05 23:14:32 davidsch Exp $
+ *
+ * Typecast - The Font Development Environment
+ *
+ * Copyright (c) 2004 David Schweinsberg
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package jogamp.graph.font.typecast.ot.mac;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+/**
+ *
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ * @version $Id: ResourceHeader.java,v 1.1.1.1 2004-12-05 23:14:32 davidsch Exp $
+ */
+public class ResourceHeader {
+
+    private int dataOffset;
+    private int mapOffset;
+    private int dataLen;
+    private int mapLen;
+
+    /** Creates new ResourceHeader */
+    public ResourceHeader(DataInput di) throws IOException {
+        dataOffset = di.readInt();
+        mapOffset = di.readInt();
+        dataLen = di.readInt();
+        mapLen = di.readInt();
+    }
+
+    public int getDataOffset() {
+        return dataOffset;
+    }
+    
+    public int getMapOffset() {
+        return mapOffset;
+    }
+    
+    public int getDataLength() {
+        return dataLen;
+    }
+    
+    public int getMapLength() {
+        return mapLen;
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/mac/ResourceMap.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/mac/ResourceMap.java
new file mode 100644
index 0000000..96ba060
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/mac/ResourceMap.java
@@ -0,0 +1,83 @@
+/*
+ * $Id: ResourceMap.java,v 1.1.1.1 2004-12-05 23:14:32 davidsch Exp $
+ *
+ * Typecast - The Font Development Environment
+ *
+ * Copyright (c) 2004 David Schweinsberg
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package jogamp.graph.font.typecast.ot.mac;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+/**
+ *
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ * @version $Id: ResourceMap.java,v 1.1.1.1 2004-12-05 23:14:32 davidsch Exp $
+ */
+public class ResourceMap {
+
+    private byte[] headerCopy = new byte[16];
+    private int nextResourceMap;
+    private int fileReferenceNumber;
+    private int attributes;
+    private ResourceType[] types;
+    
+    /** Creates new ResourceMap */
+    public ResourceMap(DataInput di) throws IOException {
+        di.readFully(headerCopy);
+        nextResourceMap = di.readInt();
+        fileReferenceNumber = di.readUnsignedShort();
+        attributes = di.readUnsignedShort();
+        int typeOffset = di.readUnsignedShort();
+        int nameOffset = di.readUnsignedShort();
+        int typeCount = di.readUnsignedShort() + 1;
+        
+        // Read types
+        types = new ResourceType[typeCount];
+        for (int i = 0; i < typeCount; i++) {
+            types[i] = new ResourceType(di);
+        }
+        
+        // Read the references
+        for (int i = 0; i < typeCount; i++) {
+            types[i].readRefs(di);
+        }
+        
+        // Read the names
+        for (int i = 0; i < typeCount; i++) {
+            types[i].readNames(di);
+        }
+    }
+
+    public ResourceType getResourceType(String typeName) {
+        for (int i = 0; i < types.length; i++) {
+            String s = types[i].getTypeAsString();
+            if (types[i].getTypeAsString().equals(typeName)) {
+                return types[i];
+            }
+        }
+        return null;
+    }
+
+    public ResourceType getResourceType(int i) {
+        return types[i];
+    }
+    
+    public int getResourceTypeCount() {
+        return types.length;
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/mac/ResourceReference.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/mac/ResourceReference.java
new file mode 100644
index 0000000..fd7ec46
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/mac/ResourceReference.java
@@ -0,0 +1,81 @@
+/*
+ * $Id: ResourceReference.java,v 1.1.1.1 2004-12-05 23:14:32 davidsch Exp $
+ *
+ * Typecast - The Font Development Environment
+ *
+ * Copyright (c) 2004 David Schweinsberg
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package jogamp.graph.font.typecast.ot.mac;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+/**
+ *
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ * @version $Id: ResourceReference.java,v 1.1.1.1 2004-12-05 23:14:32 davidsch Exp $
+ */
+public class ResourceReference {
+
+    private int id;
+    private short nameOffset;
+    private short attributes;
+    private int dataOffset;
+    private int handle;
+    private String name;
+    
+    /** Creates new ResourceReference */
+    protected ResourceReference(DataInput di) throws IOException {
+        id = di.readUnsignedShort();
+        nameOffset = di.readShort();
+        attributes = (short) di.readUnsignedByte();
+        dataOffset = (di.readUnsignedByte()<<16) | di.readUnsignedShort();
+        handle = di.readInt();
+    }
+
+    protected void readName(DataInput di) throws IOException {
+        if (nameOffset > -1) {
+            int len = di.readUnsignedByte();
+            byte[] buf = new byte[len];
+            di.readFully(buf);
+            name = new String(buf);
+        }
+    }
+
+    public int getId() {
+        return id;
+    }
+    
+    public short getNameOffset() {
+        return nameOffset;
+    }
+    
+    public short getAttributes() {
+        return attributes;
+    }
+    
+    public int getDataOffset() {
+        return dataOffset;
+    }
+    
+    public int getHandle() {
+        return handle;
+    }
+    
+    public String getName() {
+        return name;
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/mac/ResourceType.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/mac/ResourceType.java
new file mode 100644
index 0000000..969aa96
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/mac/ResourceType.java
@@ -0,0 +1,82 @@
+/*
+ * $Id: ResourceType.java,v 1.1.1.1 2004-12-05 23:14:33 davidsch Exp $
+ *
+ * Typecast - The Font Development Environment
+ *
+ * Copyright (c) 2004 David Schweinsberg
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package jogamp.graph.font.typecast.ot.mac;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+/**
+ *
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ * @version $Id: ResourceType.java,v 1.1.1.1 2004-12-05 23:14:33 davidsch Exp $
+ */
+public class ResourceType {
+
+    private int type;
+    private int count;
+    private int offset;
+    private ResourceReference[] references;
+    
+    /** Creates new ResourceType */
+    protected ResourceType(DataInput di) throws IOException {
+        type = di.readInt();
+        count = di.readUnsignedShort() + 1;
+        offset = di.readUnsignedShort();
+        references = new ResourceReference[count];
+    }
+    
+    protected void readRefs(DataInput di) throws IOException {
+        for (int i = 0; i < count; i++) {
+            references[i] = new ResourceReference(di);
+        }
+    }
+
+    protected void readNames(DataInput di) throws IOException {
+        for (int i = 0; i < count; i++) {
+            references[i].readName(di);
+        }
+    }
+
+    public int getType() {
+        return type;
+    }
+    
+    public String getTypeAsString() {
+        return new StringBuffer()
+            .append((char)((type>>24)&0xff))
+            .append((char)((type>>16)&0xff))
+            .append((char)((type>>8)&0xff))
+            .append((char)((type)&0xff))
+            .toString();
+    }
+    
+    public int getCount() {
+        return count;
+    }
+    
+    public int getOffset() {
+        return offset;
+    }
+
+    public ResourceReference getReference(int i) {
+        return references[i];
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/BaseTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/BaseTable.java
new file mode 100644
index 0000000..659b0cd
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/BaseTable.java
@@ -0,0 +1,435 @@
+/*
+ * $Id: BaseTable.java,v 1.3 2007-02-08 04:31:31 davidsch Exp $
+ *
+ * Typecast - The Font Development Environment
+ *
+ * Copyright (c) 2004-2007 David Schweinsberg
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.ByteArrayInputStream;
+import java.io.DataInput;
+import java.io.DataInputStream;
+import java.io.IOException;
+
+/**
+ * Baseline Table
+ * @version $Id: BaseTable.java,v 1.3 2007-02-08 04:31:31 davidsch Exp $
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ */
+public class BaseTable implements Table {
+    
+    private abstract class BaseCoord {
+
+        public abstract int getBaseCoordFormat();
+        
+        public abstract short getCoordinate();
+    }
+    
+    private class BaseCoordFormat1 extends BaseCoord {
+
+        private short _coordinate;
+        
+        protected BaseCoordFormat1(DataInput di) throws IOException {
+            _coordinate = di.readShort();
+        }
+
+        public int getBaseCoordFormat() {
+            return 1;
+        }
+        
+        public short getCoordinate() {
+            return _coordinate;
+        }
+        
+    }
+    
+    private class BaseCoordFormat2 extends BaseCoord {
+
+        private short _coordinate;
+        private int _referenceGlyph;
+        private int _baseCoordPoint;
+        
+        protected BaseCoordFormat2(DataInput di) throws IOException {
+            _coordinate = di.readShort();
+            _referenceGlyph = di.readUnsignedShort();
+            _baseCoordPoint = di.readUnsignedShort();
+        }
+
+        public int getBaseCoordFormat() {
+            return 2;
+        }
+        
+        public short getCoordinate() {
+            return _coordinate;
+        }
+        
+    }
+    
+    private class BaseCoordFormat3 extends BaseCoord {
+
+        private short _coordinate;
+        private int _deviceTableOffset;
+        
+        protected BaseCoordFormat3(DataInput di) throws IOException {
+            _coordinate = di.readShort();
+            _deviceTableOffset = di.readUnsignedShort();
+        }
+
+        public int getBaseCoordFormat() {
+            return 2;
+        }
+        
+        public short getCoordinate() {
+            return _coordinate;
+        }
+        
+    }
+    
+    private class FeatMinMaxRecord {
+        
+        private int _tag;
+        private int _minCoordOffset;
+        private int _maxCoordOffset;
+        
+        protected FeatMinMaxRecord(DataInput di) throws IOException {
+            _tag = di.readInt();
+            _minCoordOffset = di.readUnsignedShort();
+            _maxCoordOffset = di.readUnsignedShort();
+        }
+    }
+    
+    private class MinMax {
+        
+        private int _minCoordOffset;
+        private int _maxCoordOffset;
+        private int _featMinMaxCount;
+        private FeatMinMaxRecord[] _featMinMaxRecord;
+        
+        protected MinMax(int minMaxOffset) throws IOException {
+            DataInput di = getDataInputForOffset(minMaxOffset);
+            _minCoordOffset = di.readUnsignedShort();
+            _maxCoordOffset = di.readUnsignedShort();
+            _featMinMaxCount = di.readUnsignedShort();
+            _featMinMaxRecord = new FeatMinMaxRecord[_featMinMaxCount];
+            for (int i = 0; i < _featMinMaxCount; ++i) {
+                _featMinMaxRecord[i] = new FeatMinMaxRecord(di);
+            }
+        }
+    }
+    
+    private class BaseValues {
+        
+        private int _defaultIndex;
+        private int _baseCoordCount;
+        private int[] _baseCoordOffset;
+        private BaseCoord[] _baseCoords;
+        
+        protected BaseValues(int baseValuesOffset) throws IOException {
+            DataInput di = getDataInputForOffset(baseValuesOffset);
+            _defaultIndex = di.readUnsignedShort();
+            _baseCoordCount = di.readUnsignedShort();
+            _baseCoordOffset = new int[_baseCoordCount];
+            for (int i = 0; i < _baseCoordCount; ++i) {
+                _baseCoordOffset[i] = di.readUnsignedShort();
+            }
+            _baseCoords = new BaseCoord[_baseCoordCount];
+            for (int i = 0; i < _baseCoordCount; ++i) {
+                int format = di.readUnsignedShort();
+                switch (format) {
+                    case 1:
+                        _baseCoords[i] = new BaseCoordFormat1(di);
+                        break;
+                    case 2:
+                        _baseCoords[i] = new BaseCoordFormat2(di);
+                        break;
+                    case 3:
+                        _baseCoords[i] = new BaseCoordFormat3(di);
+                        break;
+                }
+            }
+        }
+    }
+    
+    private class BaseLangSysRecord {
+        
+        private int _baseLangSysTag;
+        private int _minMaxOffset;
+        
+        protected BaseLangSysRecord(DataInput di) throws IOException {
+            _baseLangSysTag = di.readInt();
+            _minMaxOffset = di.readUnsignedShort();
+        }
+
+        public int getBaseLangSysTag() {
+            return _baseLangSysTag;
+        }
+        
+        public int getMinMaxOffset() {
+            return _minMaxOffset;
+        }
+    }
+    
+    private class BaseScript {
+        
+        private int _thisOffset;
+        private int _baseValuesOffset;
+        private int _defaultMinMaxOffset;
+        private int _baseLangSysCount;
+        private BaseLangSysRecord[] _baseLangSysRecord;
+        private BaseValues _baseValues;
+        private MinMax[] _minMax;
+        
+        protected BaseScript(int baseScriptOffset) throws IOException {
+            _thisOffset = baseScriptOffset;
+            DataInput di = getDataInputForOffset(baseScriptOffset);
+            _baseValuesOffset = di.readUnsignedShort();
+            _defaultMinMaxOffset = di.readUnsignedShort();
+            _baseLangSysCount = di.readUnsignedShort();
+            _baseLangSysRecord = new BaseLangSysRecord[_baseLangSysCount];
+            for (int i = 0; i < _baseLangSysCount; ++i) {
+                _baseLangSysRecord[i] = new BaseLangSysRecord(di);
+            }
+            if (_baseValuesOffset > 0) {
+                _baseValues = new BaseValues(baseScriptOffset + _baseValuesOffset);
+            }
+            for (int i = 0; i < _baseLangSysCount; ++i) {
+                _minMax[i] = new MinMax(baseScriptOffset + _baseLangSysRecord[i].getMinMaxOffset());
+            }
+        }
+
+        public String toString() {
+            StringBuffer sb = new StringBuffer()
+                .append("\nBaseScript BaseScriptT").append(Integer.toHexString(_thisOffset))
+                .append("\nBaseValuesT").append(Integer.toHexString(_thisOffset + _baseValuesOffset))
+                .append("\nMinMaxT").append(Integer.toHexString(_thisOffset + _defaultMinMaxOffset))
+                .append("\n").append(Integer.toHexString(_baseLangSysCount));
+//            for (int i = 0; i < _baseLangSysCount; ++i) {
+//                sb.append("\n                          ; BaseScriptRecord[").append(i);
+//                sb.append("]\n'").append(tagAsString(_baseScriptRecord[i].getBaseScriptTag())).append("'");
+//                sb.append("\nBaseScriptT").append(Integer.toHexString(_thisOffset + _baseScriptRecord[i].getBaseScriptOffset()));
+//            }
+//            for (int i = 0; i < _baseScriptCount; ++i) {
+//                sb.append("\n").append(_baseScripts[i].toString());
+//            }
+            if (_baseValues != null) {
+                sb.append("\n").append(_baseValues.toString());
+            }
+            return sb.toString();
+        }
+    }
+    
+    private class BaseScriptRecord {
+        
+        private int _baseScriptTag;
+        private int _baseScriptOffset;
+
+        protected BaseScriptRecord(DataInput di) throws IOException {
+            _baseScriptTag = di.readInt();
+            _baseScriptOffset = di.readUnsignedShort();
+        }
+
+        public int getBaseScriptTag() {
+            return _baseScriptTag;
+        }
+        
+        public int getBaseScriptOffset() {
+            return _baseScriptOffset;
+        }
+    }
+    
+    private class BaseScriptList {
+        
+        private int _thisOffset;
+        private int _baseScriptCount;
+        private BaseScriptRecord[] _baseScriptRecord;
+        private BaseScript[] _baseScripts;
+ 
+        protected BaseScriptList(int baseScriptListOffset) throws IOException {
+            _thisOffset = baseScriptListOffset;
+            DataInput di = getDataInputForOffset(baseScriptListOffset);
+            _baseScriptCount = di.readUnsignedShort();
+            _baseScriptRecord = new BaseScriptRecord[_baseScriptCount];
+            for (int i = 0; i < _baseScriptCount; ++i) {
+                _baseScriptRecord[i] = new BaseScriptRecord(di);
+            }
+            _baseScripts = new BaseScript[_baseScriptCount];
+            for (int i = 0; i < _baseScriptCount; ++i) {
+                _baseScripts[i] = new BaseScript(
+                        baseScriptListOffset + _baseScriptRecord[i].getBaseScriptOffset());
+            }
+        }
+
+        public String toString() {
+            StringBuffer sb = new StringBuffer()
+                .append("\nBaseScriptList BaseScriptListT").append(Integer.toHexString(_thisOffset))
+                .append("\n").append(Integer.toHexString(_baseScriptCount));
+            for (int i = 0; i < _baseScriptCount; ++i) {
+                sb.append("\n                          ; BaseScriptRecord[").append(i);
+                sb.append("]\n'").append(tagAsString(_baseScriptRecord[i].getBaseScriptTag())).append("'");
+                sb.append("\nBaseScriptT").append(Integer.toHexString(_thisOffset + _baseScriptRecord[i].getBaseScriptOffset()));
+            }
+            for (int i = 0; i < _baseScriptCount; ++i) {
+                sb.append("\n").append(_baseScripts[i].toString());
+            }
+            return sb.toString();
+        }
+     }
+    
+    private class BaseTagList {
+        
+        private int _thisOffset;
+        private int _baseTagCount;
+        private int[] _baselineTag;
+        
+        protected BaseTagList(int baseTagListOffset) throws IOException {
+            _thisOffset = baseTagListOffset;
+            DataInput di = getDataInputForOffset(baseTagListOffset);
+            _baseTagCount = di.readUnsignedShort();
+            _baselineTag = new int[_baseTagCount];
+            for (int i = 0; i < _baseTagCount; ++i) {
+                _baselineTag[i] = di.readInt();
+            }
+        }
+
+        public String toString() {
+            StringBuffer sb = new StringBuffer()
+                .append("\nBaseTagList BaseTagListT").append(Integer.toHexString(_thisOffset))
+                .append("\n").append(Integer.toHexString(_baseTagCount));
+            for (int i = 0; i < _baseTagCount; ++i) {
+                sb.append("\n'").append(tagAsString(_baselineTag[i])).append("'");
+            }
+            return sb.toString();
+        }
+    }
+    
+    private class Axis {
+        
+        private int _thisOffset;
+        private int _baseTagListOffset;
+        private int _baseScriptListOffset;
+        private BaseTagList _baseTagList;
+        private BaseScriptList _baseScriptList;
+
+        protected Axis(int axisOffset) throws IOException {
+            _thisOffset = axisOffset;
+            DataInput di = getDataInputForOffset(axisOffset);
+            _baseTagListOffset = di.readUnsignedShort();
+            _baseScriptListOffset = di.readUnsignedShort();
+            if (_baseTagListOffset != 0) {
+                _baseTagList = new BaseTagList(axisOffset + _baseTagListOffset);
+            }
+            if (_baseScriptListOffset != 0) {
+                _baseScriptList = new BaseScriptList(
+                        axisOffset + _baseScriptListOffset);
+            }
+        }
+
+        public String toString() {
+            return new StringBuffer()
+                .append("\nAxis AxisT").append(Integer.toHexString(_thisOffset))
+                .append("\nBaseTagListT").append(Integer.toHexString(_thisOffset + _baseTagListOffset))
+                .append("\nBaseScriptListT").append(Integer.toHexString(_thisOffset + _baseScriptListOffset))
+                .append("\n").append(_baseTagList)
+                .append("\n").append(_baseScriptList)
+                .toString();
+        }
+    }
+    
+    private DirectoryEntry _de;
+    private int _version;
+    private int _horizAxisOffset;
+    private int _vertAxisOffset;
+    private Axis _horizAxis;
+    private Axis _vertAxis;
+    private byte[] _buf;
+
+    /** Creates a new instance of BaseTable */
+    protected BaseTable(DirectoryEntry de, DataInput di) throws IOException {
+        _de = (DirectoryEntry) de.clone();
+
+        // Load entire table into a buffer, and create another input stream
+        _buf = new byte[de.getLength()];
+        di.readFully(_buf);
+        DataInput di2 = getDataInputForOffset(0);
+
+        _version = di2.readInt();
+        _horizAxisOffset = di2.readUnsignedShort();
+        _vertAxisOffset = di2.readUnsignedShort();
+        if (_horizAxisOffset != 0) {
+            _horizAxis = new Axis(_horizAxisOffset);
+        }
+        if (_vertAxisOffset != 0) {
+            _vertAxis = new Axis(_vertAxisOffset);
+        }
+        
+        // Let go of the buffer
+        _buf = null;
+    }
+    
+    private DataInput getDataInputForOffset(int offset) {
+        return new DataInputStream(new ByteArrayInputStream(
+                _buf, offset,
+                _de.getLength() - offset));
+    }
+    
+//    private String valueAsShortHex(int value) {
+//        return String.format("%1$4x", value);
+//    }
+//    
+//    private String valueAsLongHex(int value) {
+//        return String.format("%1$8x", value);
+//    }
+    
+    static protected String tagAsString(int tag) {
+        char[] c = new char[4];
+        c[0] = (char)((tag >> 24) & 0xff);
+        c[1] = (char)((tag >> 16) & 0xff);
+        c[2] = (char)((tag >> 8) & 0xff);
+        c[3] = (char)(tag & 0xff);
+        return String.valueOf(c);
+    }
+    
+    public int getType() {
+        return BASE;
+    }
+
+    public String toString() {
+        StringBuffer sb = new StringBuffer()
+            .append("; 'BASE' Table - Baseline\n;-------------------------------------\n\n")
+            .append("BASEHeader BASEHeaderT").append(Integer.toHexString(0))
+            .append("\n").append(Integer.toHexString(_version))
+            .append("\nAxisT").append(Integer.toHexString(_horizAxisOffset))
+            .append("\nAxisT").append(Integer.toHexString(_vertAxisOffset));
+        if (_horizAxis != null) {
+            sb.append("\n").append(_horizAxis.toString());
+        }
+        if (_vertAxis != null) {
+            sb.append("\n").append(_vertAxis.toString());
+        }
+        return sb.toString();
+    }
+    
+    /**
+     * Get a directory entry for this table.  This uniquely identifies the
+     * table in collections where there may be more than one instance of a
+     * particular table.
+     * @return A directory entry
+     */
+    public DirectoryEntry getDirectoryEntry() {
+        return _de;
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CffStandardStrings.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CffStandardStrings.java
new file mode 100644
index 0000000..bf6bd6a
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CffStandardStrings.java
@@ -0,0 +1,424 @@
+/*
+ * $Id: CffStandardStrings.java,v 1.1 2007-02-05 12:41:52 davidsch Exp $
+ *
+ * Typecast - The Font Development Environment
+ *
+ * Copyright (c) 2004-2007 David Schweinsberg
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package jogamp.graph.font.typecast.ot.table;
+
+/**
+ * Compact Font Format Standard Strings.  As per Appendix A of the Adobe
+ * CFF specification.
+ * @version $Id: CffStandardStrings.java,v 1.1 2007-02-05 12:41:52 davidsch Exp $
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ */
+public class CffStandardStrings {
+
+    public static final String[] standardStrings = {
+        ".notdef",
+        "space",
+        "exclam",
+        "quotedbl",
+        "numbersign",
+        "dollar",
+        "percent",
+        "ampersand",
+        "quoteright",
+        "parenleft",
+        "parenright",
+        "asterisk",
+        "plus",
+        "comma",
+        "hyphen",
+        "period",
+        "slash",
+        "zero",
+        "one",
+        "two",
+        "three",
+        "four",
+        "five",
+        "six",
+        "seven",
+        "eight",
+        "nine",
+        "colon",
+        "semicolon",
+        "less",
+        "equal",
+        "greater",
+        "question",
+        "at",
+        "A",
+        "B",
+        "C",
+        "D",
+        "E",
+        "F",
+        "G",
+        "H",
+        "I",
+        "J",
+        "K",
+        "L",
+        "M",
+        "N",
+        "O",
+        "P",
+        "Q",
+        "R",
+        "S",
+        "T",
+        "U",
+        "V",
+        "W",
+        "X",
+        "Y",
+        "Z",
+        "bracketleft",
+        "backslash",
+        "bracketright",
+        "asciicircum",
+        "underscore",
+        "quoteleft",
+        "a",
+        "b",
+        "c",
+        "d",
+        "e",
+        "f",
+        "g",
+        "h",
+        "i",
+        "j",
+        "k",
+        "l",
+        "m",
+        "n",
+        "o",
+        "p",
+        "q",
+        "r",
+        "s",
+        "t",
+        "u",
+        "v",
+        "w",
+        "x",
+        "y",
+        "z",
+        "braceleft",
+        "bar",
+        "braceright",
+        "asciitilde",
+        "exclamdown",
+        "cent",
+        "sterling",
+        "fraction",
+        "yen",
+        "florin",
+        "section",
+        "currency",
+        "quotesingle",
+        "quotedblleft",
+        "guillemotleft",
+        "guilsinglleft",
+        "guilsinglright",
+        "fi",
+        "fl",
+        "endash",
+        "dagger",
+        "daggerdbl",
+        "periodcentered",
+        "paragraph",
+        "bullet",
+        "quotesinglbase",
+        "quotedblbase",
+        "quotedblright",
+        "guillemotright",
+        "ellipsis",
+        "perthousand",
+        "questiondown",
+        "grave",
+        "acute",
+        "circumflex",
+        "tilde",
+        "macron",
+        "breve",
+        "dotaccent",
+        "dieresis",
+        "ring",
+        "cedilla",
+        "hungarumlaut",
+        "ogonek",
+        "caron",
+        "emdash",
+        "AE",
+        "ordfeminine",
+        "Lslash",
+        "Oslash",
+        "OE",
+        "ordmasculine",
+        "ae",
+        "dotlessi",
+        "lslash",
+        "oslash",
+        "oe",
+        "germandbls",
+        "onesuperior",
+        "logicalnot",
+        "mu",
+        "trademark",
+        "Eth",
+        "onehalf",
+        "plusminus",
+        "Thorn",
+        "onequarter",
+        "divide",
+        "brokenbar",
+        "degree",
+        "thorn",
+        "threequarters",
+        "twosuperior",
+        "registered",
+        "minus",
+        "eth",
+        "multiply",
+        "threesuperior",
+        "copyright",
+        "Aacute",
+        "Acircumflex",
+        "Adieresis",
+        "Agrave",
+        "Aring",
+        "Atilde",
+        "Ccedilla",
+        "Eacute",
+        "Ecircumflex",
+        "Edieresis",
+        "Egrave",
+        "Iacute",
+        "Icircumflex",
+        "Idieresis",
+        "Igrave",
+        "Ntilde",
+        "Oacute",
+        "Ocircumflex",
+        "Odieresis",
+        "Ograve",
+        "Otilde",
+        "Scaron",
+        "Uacute",
+        "Ucircumflex",
+        "Udieresis",
+        "Ugrave",
+        "Yacute",
+        "Ydieresis",
+        "Zcaron",
+        "aacute",
+        "acircumflex",
+        "adieresis",
+        "agrave",
+        "aring",
+        "atilde",
+        "ccedilla",
+        "eacute",
+        "ecircumflex",
+        "edieresis",
+        "egrave",
+        "iacute",
+        "icircumflex",
+        "idieresis",
+        "igrave",
+        "ntilde",
+        "oacute",
+        "ocircumflex",
+        "odieresis",
+        "ograve",
+        "otilde",
+        "scaron",
+        "uacute",
+        "ucircumflex",
+        "udieresis",
+        "ugrave",
+        "yacute",
+        "ydieresis",
+        "zcaron",
+        "exclamsmall",
+        "Hungarumlautsmall",
+        "dollaroldstyle",
+        "dollarsuperior",
+        "ampersandsmall",
+        "Acutesmall",
+        "parenleftsuperior",
+        "parenrightsuperior",
+        "twodotenleader",
+        "onedotenleader",
+        "zerooldstyle",
+        "oneoldstyle",
+        "twooldstyle",
+        "threeoldstyle",
+        "fouroldstyle",
+        "fiveoldstyle",
+        "sixoldstyle",
+        "sevenoldstyle",
+        "eightoldstyle",
+        "nineoldstyle",
+        "commasuperior",
+        "threequartersemdash",
+        "periodsuperior",
+        "questionsmall",
+        "asuperior",
+        "bsuperior",
+        "centsuperior",
+        "dsuperior",
+        "esuperior",
+        "isuperior",
+        "lsuperior",
+        "msuperior",
+        "nsuperior",
+        "osuperior",
+        "rsuperior",
+        "ssuperior",
+        "tsuperior",
+        "ff",
+        "ffi",
+        "ffl",
+        "parenleftinferior",
+        "parenrightinferior",
+        "Circumflexsmall",
+        "hyphensuperior",
+        "Gravesmall",
+        "Asmall",
+        "Bsmall",
+        "Csmall",
+        "Dsmall",
+        "Esmall",
+        "Fsmall",
+        "Gsmall",
+        "Hsmall",
+        "Ismall",
+        "Jsmall",
+        "Ksmall",
+        "Lsmall",
+        "Msmall",
+        "Nsmall",
+        "Osmall",
+        "Psmall",
+        "Qsmall",
+        "Rsmall",
+        "Ssmall",
+        "Tsmall",
+        "Usmall",
+        "Vsmall",
+        "Wsmall",
+        "Xsmall",
+        "Ysmall",
+        "Zsmall",
+        "colonmonetary",
+        "onefitted",
+        "rupiah",
+        "Tildesmall",
+        "exclamdownsmall",
+        "centoldstyle",
+        "Lslashsmall",
+        "Scaronsmall",
+        "Zcaronsmall",
+        "Dieresissmall",
+        "Brevesmall",
+        "Caronsmall",
+        "Dotaccentsmall",
+        "Macronsmall",
+        "figuredash",
+        "hypheninferior",
+        "Ogoneksmall",
+        "Ringsmall",
+        "Cedillasmall",
+        "questiondownsmall",
+        "oneeighth",
+        "threeeighths",
+        "fiveeighths",
+        "seveneighths",
+        "onethird",
+        "twothirds",
+        "zerosuperior",
+        "foursuperior",
+        "fivesuperior",
+        "sixsuperior",
+        "sevensuperior",
+        "eightsuperior",
+        "ninesuperior",
+        "zeroinferior",
+        "oneinferior",
+        "twoinferior",
+        "threeinferior",
+        "fourinferior",
+        "fiveinferior",
+        "sixinferior",
+        "seveninferior",
+        "eightinferior",
+        "nineinferior",
+        "centinferior",
+        "dollarinferior",
+        "periodinferior",
+        "commainferior",
+        "Agravesmall",
+        "Aacutesmall",
+        "Acircumflexsmall",
+        "Atildesmall",
+        "Adieresissmall",
+        "Aringsmall",
+        "AEsmall",
+        "Ccedillasmall",
+        "Egravesmall",
+        "Eacutesmall",
+        "Ecircumflexsmall",
+        "Edieresissmall",
+        "Igravesmall",
+        "Iacutesmall",
+        "Icircumflexsmall",
+        "Idieresissmall",
+        "Ethsmall",
+        "Ntildesmall",
+        "Ogravesmall",
+        "Oacutesmall",
+        "Ocircumflexsmall",
+        "Otildesmall",
+        "Odieresissmall",
+        "OEsmall",
+        "Oslashsmall",
+        "Ugravesmall",
+        "Uacutesmall",
+        "Ucircumflexsmall",
+        "Udieresissmall",
+        "Yacutesmall",
+        "Thornsmall",
+        "Ydieresissmall",
+        "001.000",
+        "001.001",
+        "001.002",
+        "001.003",
+        "Black",
+        "Bold",
+        "Book",
+        "Light",
+        "Medium",
+        "Regular",
+        "Roman",
+        "Semibold"
+    };
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CffTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CffTable.java
new file mode 100644
index 0000000..0c54c27
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CffTable.java
@@ -0,0 +1,620 @@
+/*
+ * $Id: CffTable.java,v 1.4 2007-07-26 11:15:06 davidsch Exp $
+ *
+ * Typecast - The Font Development Environment
+ *
+ * Copyright (c) 2004-2007 David Schweinsberg
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.ByteArrayInputStream;
+import java.io.DataInput;
+import java.io.DataInputStream;
+import java.io.IOException;
+
+import java.util.ArrayList;
+import java.util.Dictionary;
+import java.util.Enumeration;
+import java.util.Hashtable;
+
+/**
+ * Compact Font Format Table
+ * @version $Id: CffTable.java,v 1.4 2007-07-26 11:15:06 davidsch Exp $
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ */
+public class CffTable implements Table {
+    
+    public class Dict {
+        
+        private Dictionary<Integer, Object> _entries = new Hashtable<Integer, Object>();
+        private int[] _data;
+        private int _index;
+        
+        protected Dict(int[] data, int offset, int length) {
+            _data = data;
+            _index = offset;
+            while (_index < offset + length) {
+                addKeyAndValueEntry();
+            }
+        }
+        
+        public Object getValue(int key) {
+            return _entries.get(key);
+        }
+        
+        private boolean addKeyAndValueEntry() {
+            ArrayList<Object> operands = new ArrayList<Object>();
+            Object operand = null;
+            while (isOperandAtIndex()) {
+                operand = nextOperand();
+                operands.add(operand);
+            }
+            int operator = _data[_index++];
+            if (operator == 12) {
+                operator <<= 8;
+                operator |= _data[_index++];
+            }
+            if (operands.size() == 1) {
+                _entries.put(operator, operand);
+            } else {
+                _entries.put(operator, operands);
+            }
+            return true;
+        }
+        
+        private boolean isOperandAtIndex() {
+            int b0 = _data[_index];
+            if ((32 <= b0 && b0 <= 254)
+                    || b0 == 28
+                    || b0 == 29
+                    || b0 == 30) {
+                return true;
+            }
+            return false;
+        }
+
+        private boolean isOperatorAtIndex() {
+            int b0 = _data[_index];
+            if (0 <= b0 && b0 <= 21) {
+                return true;
+            }
+            return false;
+        }
+
+        private Object nextOperand() {
+            int b0 = _data[_index];
+            if (32 <= b0 && b0 <= 246) {
+                
+                // 1 byte integer
+                ++_index;
+                return new Integer(b0 - 139);
+            } else if (247 <= b0 && b0 <= 250) {
+                
+                // 2 byte integer
+                int b1 = _data[_index + 1];
+                _index += 2;
+                return new Integer((b0 - 247) * 256 + b1 + 108);
+            } else if (251 <= b0 && b0 <= 254) {
+                
+                // 2 byte integer
+                int b1 = _data[_index + 1];
+                _index += 2;
+                return new Integer(-(b0 - 251) * 256 - b1 - 108);
+            } else if (b0 == 28) {
+                
+                // 3 byte integer
+                int b1 = _data[_index + 1];
+                int b2 = _data[_index + 2];
+                _index += 3;
+                return new Integer(b1 << 8 | b2);
+            } else if (b0 == 29) {
+                
+                // 5 byte integer
+                int b1 = _data[_index + 1];
+                int b2 = _data[_index + 2];
+                int b3 = _data[_index + 3];
+                int b4 = _data[_index + 4];
+                _index += 5;
+                return new Integer(b1 << 24 | b2 << 16 | b3 << 8 | b4);
+            } else if (b0 == 30) {
+                
+                // Real number
+                StringBuffer fString = new StringBuffer();
+                int nibble1 = 0;
+                int nibble2 = 0;
+                ++_index;
+                while ((nibble1 != 0xf) && (nibble2 != 0xf)) {
+                    nibble1 = _data[_index] >> 4;
+                    nibble2 = _data[_index] & 0xf;
+                    ++_index;
+                    fString.append(decodeRealNibble(nibble1));
+                    fString.append(decodeRealNibble(nibble2));
+                }                
+                return new Float(fString.toString());
+            } else {
+                return null;
+            }
+        }
+        
+        private String decodeRealNibble(int nibble) {
+            if (nibble < 0xa) {
+                return Integer.toString(nibble);
+            } else if (nibble == 0xa) {
+                return ".";
+            } else if (nibble == 0xb) {
+                return "E";
+            } else if (nibble == 0xc) {
+                return "E-";
+            } else if (nibble == 0xe) {
+                return "-";
+            }
+            return "";
+        }
+        
+        public String toString() {
+            StringBuffer sb = new StringBuffer();
+            Enumeration<Integer> keys = _entries.keys();
+            while (keys.hasMoreElements()) {
+                Integer key = keys.nextElement();
+                if ((key.intValue() & 0xc00) == 0xc00) {
+                    sb.append("12 ").append(key.intValue() & 0xff).append(": ");
+                } else {
+                    sb.append(key.toString()).append(": ");
+                }
+                sb.append(_entries.get(key).toString()).append("\n");
+            }
+            return sb.toString();
+        }
+    }
+    
+    public class Index {
+        
+        private int _count;
+        private int _offSize;
+        private int[] _offset;
+        private int[] _data;
+        
+        protected Index(DataInput di) throws IOException {
+            _count = di.readUnsignedShort();
+            _offset = new int[_count + 1];
+            _offSize = di.readUnsignedByte();
+            for (int i = 0; i < _count + 1; ++i) {
+                int thisOffset = 0;
+                for (int j = 0; j < _offSize; ++j) {
+                    thisOffset |= di.readUnsignedByte() << ((_offSize - j - 1) * 8);
+                }
+                _offset[i] = thisOffset;
+            }
+            _data = new int[getDataLength()];
+            for (int i = 0; i < getDataLength(); ++i) {
+                _data[i] = di.readUnsignedByte();
+            }
+        }
+        
+        public int getCount() {
+            return _count;
+        }
+        
+        public int getOffset(int index) {
+            return _offset[index];
+        }
+        
+        public int getDataLength() {
+            return _offset[_offset.length - 1] - 1;
+        }
+        
+        public int[] getData() {
+            return _data;
+        }
+
+        public String toString() {
+            StringBuffer sb = new StringBuffer();
+            sb.append("DICT\n");
+            sb.append("count: ").append(_count).append("\n");
+            sb.append("offSize: ").append(_offSize).append("\n");
+            for (int i = 0; i < _count + 1; ++i) {
+                sb.append("offset[").append(i).append("]: ").append(_offset[i]).append("\n");
+            }
+            sb.append("data:");
+            for (int i = 0; i < _data.length; ++i) {
+                if (i % 8 == 0) {
+                    sb.append("\n");
+                } else {
+                    sb.append(" ");
+                }
+                sb.append(_data[i]);
+            }
+            sb.append("\n");
+            return sb.toString();
+        }
+    }
+    
+    public class TopDictIndex extends Index {
+
+        protected TopDictIndex(DataInput di) throws IOException {
+            super(di);
+        }
+        
+        public Dict getTopDict(int index) {
+            int offset = getOffset(index) - 1;
+            int len = getOffset(index + 1) - offset - 1;
+            return new Dict(getData(), offset, len);
+        }
+
+        public String toString() {
+            StringBuffer sb = new StringBuffer();
+            for (int i = 0; i < getCount(); ++i) {
+                sb.append(getTopDict(i).toString()).append("\n");
+            }
+            return sb.toString();
+        }
+    }
+    
+    public class NameIndex extends Index {
+
+        protected NameIndex(DataInput di) throws IOException {
+            super(di);
+        }
+        
+        public String getName(int index) {
+            String name = null;
+            int offset = getOffset(index) - 1;
+            int len = getOffset(index + 1) - offset - 1;
+
+            // Ensure the name hasn't been deleted
+            if (getData()[offset] != 0) {
+                StringBuffer sb = new StringBuffer();
+                for (int i = offset; i < offset + len; ++i) {
+                    sb.append((char) getData()[i]);
+                }
+                name = sb.toString();
+            } else {
+                name = "DELETED NAME";
+            }
+            return name;
+        }
+        
+        public String toString() {
+            StringBuffer sb = new StringBuffer();
+            for (int i = 0; i < getCount(); ++i) {
+                sb.append(getName(i)).append("\n");
+            }
+            return sb.toString();
+        }
+    }
+
+    public class StringIndex extends Index {
+
+        protected StringIndex(DataInput di) throws IOException {
+            super(di);
+        }
+        
+        public String getString(int index) {
+            if (index < CffStandardStrings.standardStrings.length) {
+                return CffStandardStrings.standardStrings[index];
+            } else {
+                index -= CffStandardStrings.standardStrings.length;
+                if (index >= getCount()) {
+                    return null;
+                }
+                int offset = getOffset(index) - 1;
+                int len = getOffset(index + 1) - offset - 1;
+
+                StringBuffer sb = new StringBuffer();
+                for (int i = offset; i < offset + len; ++i) {
+                    sb.append((char) getData()[i]);
+                }
+                return sb.toString();
+            }
+        }
+        
+        public String toString() {
+            int nonStandardBase = CffStandardStrings.standardStrings.length;
+            StringBuffer sb = new StringBuffer();
+            for (int i = 0; i < getCount(); ++i) {
+                sb.append(nonStandardBase + i).append(": ");
+                sb.append(getString(nonStandardBase + i)).append("\n");
+            }
+            return sb.toString();
+        }
+    }
+    
+    private class CharsetRange {
+        
+        private int _first;
+        private int _left;
+        
+        public int getFirst() {
+            return _first;
+        }
+
+        protected void setFirst(int first) {
+            _first = first;
+        }
+        
+        public int getLeft() {
+            return _left;
+        }
+
+        protected void setLeft(int left) {
+            _left = left;
+        }
+    }
+
+    private class CharsetRange1 extends CharsetRange {
+        
+        protected CharsetRange1(DataInput di) throws IOException {
+            setFirst(di.readUnsignedShort());
+            setLeft(di.readUnsignedByte());
+        }
+    }
+    
+    private class CharsetRange2 extends CharsetRange {
+        
+        protected CharsetRange2(DataInput di) throws IOException {
+            setFirst(di.readUnsignedShort());
+            setLeft(di.readUnsignedShort());
+        }
+    }
+    
+    private abstract class Charset {
+        
+        public abstract int getFormat();
+        
+        public abstract int getSID(int gid);
+    }
+    
+    private class CharsetFormat0 extends Charset {
+        
+        private int[] _glyph;
+        
+        protected CharsetFormat0(DataInput di, int glyphCount) throws IOException {
+            _glyph = new int[glyphCount - 1];  // minus 1 because .notdef is omitted
+            for (int i = 0; i < glyphCount - 1; ++i) {
+                _glyph[i] = di.readUnsignedShort();
+            }
+        }
+        
+        public int getFormat() {
+            return 0;
+        }
+
+        public int getSID(int gid) {
+            if (gid == 0) {
+                return 0;
+            }
+            return _glyph[gid - 1];
+        }
+    }
+    
+    private class CharsetFormat1 extends Charset {
+        
+        private ArrayList<CharsetRange> _charsetRanges = new ArrayList<CharsetRange>();
+        
+        protected CharsetFormat1(DataInput di, int glyphCount) throws IOException {
+            int glyphsCovered = glyphCount - 1;  // minus 1 because .notdef is omitted
+            while (glyphsCovered > 0) {
+                CharsetRange range = new CharsetRange1(di);
+                _charsetRanges.add(range);
+                glyphsCovered -= range.getLeft() + 1;
+            }
+        }
+
+        public int getFormat() {
+            return 1;
+        }
+
+        public int getSID(int gid) {
+            if (gid == 0) {
+                return 0;
+            }
+            
+            // Count through the ranges to find the one of interest
+            int count = 0;
+            for (CharsetRange range : _charsetRanges) {
+                count += range.getLeft();
+                if (gid < count) {
+                    int sid = gid - count + range.getFirst();
+                    return sid;
+                }
+            }
+            return 0;
+        }
+    }
+
+    private class CharsetFormat2 extends Charset {
+        
+        private ArrayList<CharsetRange> _charsetRanges = new ArrayList<CharsetRange>();
+        
+        protected CharsetFormat2(DataInput di, int glyphCount) throws IOException {
+            int glyphsCovered = glyphCount - 1;  // minus 1 because .notdef is omitted
+            while (glyphsCovered > 0) {
+                CharsetRange range = new CharsetRange2(di);
+                _charsetRanges.add(range);
+                glyphsCovered -= range.getLeft() + 1;
+            }
+        }
+
+        public int getFormat() {
+            return 2;
+        }
+
+        public int getSID(int gid) {
+            if (gid == 0) {
+                return 0;
+            }
+            
+            // Count through the ranges to find the one of interest
+            int count = 0;
+            for (CharsetRange range : _charsetRanges) {
+                if (gid < range.getLeft() + count) {
+                    int sid = gid - count + range.getFirst() - 1;
+                    return sid;
+                }
+                count += range.getLeft();
+            }
+            return 0;
+        }
+    }
+    
+    private DirectoryEntry _de;
+    private int _major;
+    private int _minor;
+    private int _hdrSize;
+    private int _offSize;
+    private NameIndex _nameIndex;
+    private TopDictIndex _topDictIndex;
+    private StringIndex _stringIndex;
+    private Index _globalSubrIndex;
+    private Index _charStringsIndexArray[];
+    private Charset[] _charsets;
+    private Charstring[][] _charstringsArray;
+
+    private byte[] _buf;
+
+    /** Creates a new instance of CffTable */
+    protected CffTable(DirectoryEntry de, DataInput di) throws IOException {
+        _de = (DirectoryEntry) de.clone();
+
+        // Load entire table into a buffer, and create another input stream
+        _buf = new byte[de.getLength()];
+        di.readFully(_buf);
+        DataInput di2 = getDataInputForOffset(0);
+
+        // Header
+        _major = di2.readUnsignedByte();
+        _minor = di2.readUnsignedByte();
+        _hdrSize = di2.readUnsignedByte();
+        _offSize = di2.readUnsignedByte();
+        
+        // Name INDEX
+        di2 = getDataInputForOffset(_hdrSize);
+        _nameIndex = new NameIndex(di2);
+        
+        // Top DICT INDEX
+        _topDictIndex = new TopDictIndex(di2);
+
+        // String INDEX
+        _stringIndex = new StringIndex(di2);
+        
+        // Global Subr INDEX
+        _globalSubrIndex = new Index(di2);
+        
+        // Encodings go here -- but since this is an OpenType font will this
+        // not always be a CIDFont?  In which case there are no encodings
+        // within the CFF data.
+        
+        // Load each of the fonts
+        _charStringsIndexArray = new Index[_topDictIndex.getCount()];
+        _charsets = new Charset[_topDictIndex.getCount()];
+        _charstringsArray = new Charstring[_topDictIndex.getCount()][];
+        for (int i = 0; i < _topDictIndex.getCount(); ++i) {
+
+            // Charstrings INDEX
+            // We load this before Charsets because we may need to know the number
+            // of glyphs
+            Integer charStringsOffset = (Integer) _topDictIndex.getTopDict(i).getValue(17);
+            di2 = getDataInputForOffset(charStringsOffset);
+            _charStringsIndexArray[i] = new Index(di2);
+            int glyphCount = _charStringsIndexArray[i].getCount();
+        
+            // Charsets
+            Integer charsetOffset = (Integer) _topDictIndex.getTopDict(i).getValue(15);
+            di2 = getDataInputForOffset(charsetOffset);
+            int format = di2.readUnsignedByte();
+            switch (format) {
+                case 0:
+                    _charsets[i] = new CharsetFormat0(di2, glyphCount);
+                    break;
+                case 1:
+                    _charsets[i] = new CharsetFormat1(di2, glyphCount);
+                    break;
+                case 2:
+                    _charsets[i] = new CharsetFormat2(di2, glyphCount);
+                    break;
+            }
+
+            // Create the charstrings
+            _charstringsArray[i] = new Charstring[glyphCount];
+            for (int j = 0; j < glyphCount; ++j) {
+                int offset = _charStringsIndexArray[i].getOffset(j) - 1;
+                int len = _charStringsIndexArray[i].getOffset(j + 1) - offset - 1;
+                _charstringsArray[i][j] = new CharstringType2(
+                        i,
+                        _stringIndex.getString(_charsets[i].getSID(j)),
+                        _charStringsIndexArray[i].getData(),
+                        offset,
+                        len,
+                        null,
+                        null);
+            }
+        }
+    }
+    
+    private DataInput getDataInputForOffset(int offset) {
+        return new DataInputStream(new ByteArrayInputStream(
+                _buf, offset,
+                _de.getLength() - offset));
+    }
+
+    public NameIndex getNameIndex() {
+        return _nameIndex;
+    }
+    
+    public Charset getCharset(int fontIndex) {
+        return _charsets[fontIndex];
+    }
+
+    public Charstring getCharstring(int fontIndex, int gid) {
+        return _charstringsArray[fontIndex][gid];
+    }
+    
+    public int getCharstringCount(int fontIndex) {
+        return _charstringsArray[fontIndex].length;
+    }
+
+    public int getType() {
+        return CFF;
+    }
+
+    public String toString() {
+        StringBuffer sb = new StringBuffer();
+        sb.append("'CFF' Table - Compact Font Format\n---------------------------------\n");
+        sb.append("\nName INDEX\n");
+        sb.append(_nameIndex.toString());
+        sb.append("\nTop DICT INDEX\n");
+        sb.append(_topDictIndex.toString());
+        sb.append("\nString INDEX\n");
+        sb.append(_stringIndex.toString());
+        sb.append("\nGlobal Subr INDEX\n");
+        sb.append(_globalSubrIndex.toString());
+        for (int i = 0; i < _charStringsIndexArray.length; ++i) {
+            sb.append("\nCharStrings INDEX ").append(i).append("\n");
+            sb.append(_charStringsIndexArray[i].toString());
+        }
+        return sb.toString();
+    }
+    
+    /**
+     * Get a directory entry for this table.  This uniquely identifies the
+     * table in collections where there may be more than one instance of a
+     * particular table.
+     * @return A directory entry
+     */
+    public DirectoryEntry getDirectoryEntry() {
+        return _de;
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Charstring.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Charstring.java
new file mode 100644
index 0000000..d411d1e
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Charstring.java
@@ -0,0 +1,33 @@
+/*
+ * $Id: Charstring.java,v 1.2 2007-02-21 12:25:19 davidsch Exp $
+ *
+ * Typecast - The Font Development Environment
+ *
+ * Copyright (c) 2004-2007 David Schweinsberg
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package jogamp.graph.font.typecast.ot.table;
+
+/**
+ * CFF Charstring
+ * @version $Id: Charstring.java,v 1.2 2007-02-21 12:25:19 davidsch Exp $
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ */
+public abstract class Charstring {
+
+    public abstract int getIndex();
+    
+    public abstract String getName();
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CharstringType2.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CharstringType2.java
new file mode 100644
index 0000000..bed0ba4
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CharstringType2.java
@@ -0,0 +1,235 @@
+/*
+ * $Id: CharstringType2.java,v 1.4 2007-07-26 11:13:44 davidsch Exp $
+ *
+ * Typecast - The Font Development Environment
+ *
+ * Copyright (c) 2004-2007 David Schweinsberg
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package jogamp.graph.font.typecast.ot.table;
+
+import jogamp.graph.font.typecast.ot.table.CffTable;
+
+/**
+ * CFF Type 2 Charstring
+ * @version $Id: CharstringType2.java,v 1.4 2007-07-26 11:13:44 davidsch Exp $
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ */
+public class CharstringType2 extends Charstring {
+    
+    private static final String[] _oneByteOperators = {
+        "-Reserved-",
+        "hstem",
+        "-Reserved-",
+        "vstem",
+        "vmoveto",
+        "rlineto",
+        "hlineto",
+        "vlineto",
+        "rrcurveto",
+        "-Reserved-",
+        "callsubr",
+        "return",
+        "escape",
+        "-Reserved-",
+        "endchar",
+        "-Reserved-",
+        "-Reserved-",
+        "-Reserved-",
+        "hstemhm",
+        "hintmask",
+        "cntrmask",
+        "rmoveto",
+        "hmoveto",
+        "vstemhm",
+        "rcurveline",
+        "rlinecurve",
+        "vvcurveto",
+        "hhcurveto",
+        "shortint",
+        "callgsubr",
+        "vhcurveto",
+        "hvcurveto"
+    };
+
+    private static final String[] _twoByteOperators = {
+        "-Reserved- (dotsection)",
+        "-Reserved-",
+        "-Reserved-",
+        "and",
+        "or",
+        "not",
+        "-Reserved-",
+        "-Reserved-",
+        "-Reserved-",
+        "abs",
+        "add",
+        "sub",
+        "div",
+        "-Reserved-",
+        "neg",
+        "eq",
+        "-Reserved-",
+        "-Reserved-",
+        "drop",
+        "-Reserved-",
+        "put",
+        "get",
+        "ifelse",
+        "random",
+        "mul",
+        "-Reserved-",
+        "sqrt",
+        "dup",
+        "exch",
+        "index",
+        "roll",
+        "-Reserved-",
+        "-Reserved-",
+        "-Reserved-",
+        "hflex",
+        "flex",
+        "hflex1",
+        "flex1",
+        "-Reserved-"
+    };
+    
+    private int _index;
+    private String _name;
+    private int[] _data;
+    private int _offset;
+    private int _length;
+    private CffTable.Index _localSubrIndex;
+    private CffTable.Index _globalSubrIndex;
+    private int _ip;
+
+    /** Creates a new instance of CharstringType2 */
+    protected CharstringType2(
+            int index,
+            String name,
+            int[] data,
+            int offset,
+            int length,
+            CffTable.Index localSubrIndex,
+            CffTable.Index globalSubrIndex) {
+        _index = index;
+        _name = name;
+        _data = data;
+        _offset = offset;
+        _length = length;
+        _localSubrIndex = localSubrIndex;
+        _globalSubrIndex = globalSubrIndex;
+    }
+    
+    public int getIndex() {
+        return _index;
+    }
+
+    public String getName() {
+        return _name;
+    }
+    
+    private void disassemble(StringBuffer sb) {
+        Number operand = null;
+        while (isOperandAtIndex()) {
+            operand = nextOperand();
+            sb.append(operand).append(" ");
+        }
+        int operator = nextByte();
+        String mnemonic;
+        if (operator == 12) {
+            operator = nextByte();
+            
+            // Check we're not exceeding the upper limit of our mnemonics
+            if (operator > 38) {
+                operator = 38;
+            }
+            mnemonic = _twoByteOperators[operator];
+        } else {
+            mnemonic = _oneByteOperators[operator];
+        }
+        sb.append(mnemonic);
+    }
+    
+    public void resetIP() {
+        _ip = _offset;
+    }
+
+    public boolean isOperandAtIndex() {
+        int b0 = _data[_ip];
+        if ((32 <= b0 && b0 <= 255) || b0 == 28) {
+            return true;
+        }
+        return false;
+    }
+
+    public Number nextOperand() {
+        int b0 = _data[_ip];
+        if (32 <= b0 && b0 <= 246) {
+
+            // 1 byte integer
+            ++_ip;
+            return new Integer(b0 - 139);
+        } else if (247 <= b0 && b0 <= 250) {
+
+            // 2 byte integer
+            int b1 = _data[_ip + 1];
+            _ip += 2;
+            return new Integer((b0 - 247) * 256 + b1 + 108);
+        } else if (251 <= b0 && b0 <= 254) {
+
+            // 2 byte integer
+            int b1 = _data[_ip + 1];
+            _ip += 2;
+            return new Integer(-(b0 - 251) * 256 - b1 - 108);
+        } else if (b0 == 28) {
+
+            // 3 byte integer
+            int b1 = _data[_ip + 1];
+            int b2 = _data[_ip + 2];
+            _ip += 3;
+            return new Integer(b1 << 8 | b2);
+        } else if (b0 == 255) {
+
+            // 16-bit signed integer with 16 bits of fraction
+            int b1 = (byte) _data[_ip + 1];
+            int b2 = _data[_ip + 2];
+            int b3 = _data[_ip + 3];
+            int b4 = _data[_ip + 4];
+            _ip += 5;
+            return new Float((b1 << 8 | b2) + ((b3 << 8 | b4) / 65536.0));
+        } else {
+            return null;
+        }
+    }
+    
+    public int nextByte() {
+        return _data[_ip++];
+    }
+    
+    public boolean moreBytes() {
+        return _ip < _offset + _length;
+    }
+    
+    public String toString() {
+        StringBuffer sb = new StringBuffer();
+        resetIP();
+        while (moreBytes()) {
+            disassemble(sb);
+            sb.append("\n");
+        }
+        return sb.toString();
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/ClassDef.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/ClassDef.java
new file mode 100644
index 0000000..4c2f3de
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/ClassDef.java
@@ -0,0 +1,33 @@
+/*****************************************************************************
+ * Copyright (C) The Apache Software Foundation. All rights reserved.        *
+ * ------------------------------------------------------------------------- * 
+ * This software is published under the terms of the Apache Software License * 
+ * version 1.1, a copy of which has been included with this distribution in  * 
+ * the LICENSE file.                                                         * 
+ *****************************************************************************/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.IOException;
+import java.io.RandomAccessFile;
+
+/**
+ *
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ * @version $Id: ClassDef.java,v 1.1.1.1 2004-12-05 23:14:33 davidsch Exp $
+ */
+public abstract class ClassDef {
+
+    public abstract int getFormat();
+
+    protected static ClassDef read(RandomAccessFile raf) throws IOException {
+        ClassDef c = null;
+        int format = raf.readUnsignedShort();
+        if (format == 1) {
+            c = new ClassDefFormat1(raf);
+        } else if (format == 2) {
+            c = new ClassDefFormat2(raf);
+        }
+        return c;
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/ClassDefFormat1.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/ClassDefFormat1.java
new file mode 100644
index 0000000..0c99ad6
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/ClassDefFormat1.java
@@ -0,0 +1,39 @@
+/*****************************************************************************
+ * Copyright (C) The Apache Software Foundation. All rights reserved.        *
+ * ------------------------------------------------------------------------- * 
+ * This software is published under the terms of the Apache Software License * 
+ * version 1.1, a copy of which has been included with this distribution in  * 
+ * the LICENSE file.                                                         * 
+ *****************************************************************************/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.IOException;
+import java.io.RandomAccessFile;
+
+/**
+ *
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ * @version $Id: ClassDefFormat1.java,v 1.1.1.1 2004-12-05 23:14:33 davidsch Exp $
+ */
+public class ClassDefFormat1 extends ClassDef {
+
+    private int startGlyph;
+    private int glyphCount;
+    private int[] classValues;
+
+    /** Creates new ClassDefFormat1 */
+    public ClassDefFormat1(RandomAccessFile raf) throws IOException {
+        startGlyph = raf.readUnsignedShort();
+        glyphCount = raf.readUnsignedShort();
+        classValues = new int[glyphCount];
+        for (int i = 0; i < glyphCount; i++) {
+            classValues[i] = raf.readUnsignedShort();
+        }
+    }
+
+    public int getFormat() {
+        return 1;
+    }
+
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/ClassDefFormat2.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/ClassDefFormat2.java
new file mode 100644
index 0000000..5b7c4d6
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/ClassDefFormat2.java
@@ -0,0 +1,37 @@
+/*****************************************************************************
+ * Copyright (C) The Apache Software Foundation. All rights reserved.        *
+ * ------------------------------------------------------------------------- * 
+ * This software is published under the terms of the Apache Software License * 
+ * version 1.1, a copy of which has been included with this distribution in  * 
+ * the LICENSE file.                                                         * 
+ *****************************************************************************/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.IOException;
+import java.io.RandomAccessFile;
+
+/**
+ *
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ * @version $Id: ClassDefFormat2.java,v 1.1.1.1 2004-12-05 23:14:33 davidsch Exp $
+ */
+public class ClassDefFormat2 extends ClassDef {
+
+    private int classRangeCount;
+    private RangeRecord[] classRangeRecords;
+
+    /** Creates new ClassDefFormat2 */
+    public ClassDefFormat2(RandomAccessFile raf) throws IOException {
+        classRangeCount = raf.readUnsignedShort();
+        classRangeRecords = new RangeRecord[classRangeCount];
+        for (int i = 0; i < classRangeCount; i++) {
+            classRangeRecords[i] = new RangeRecord(raf);
+        }
+    }
+
+    public int getFormat() {
+        return 2;
+    }
+
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat.java
new file mode 100644
index 0000000..45e21df
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat.java
@@ -0,0 +1,134 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, 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.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Batik" and  "Apache Software Foundation" must  not  be
+    used to  endorse or promote  products derived from  this software without
+    prior written permission. For written permission, please contact
+    apache at apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, 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.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+/**
+ * @version $Id: CmapFormat.java,v 1.3 2004-12-21 16:56:35 davidsch Exp $
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ */
+public abstract class CmapFormat {
+    
+    public class Range {
+        
+        private int _startCode;
+        private int _endCode;
+        
+        protected Range(int startCode, int endCode) {
+            _startCode = startCode;
+            _endCode = endCode;
+        }
+        
+        public int getStartCode() {
+            return _startCode;
+        }
+        
+        public int getEndCode() {
+            return _endCode;
+        }
+    }
+
+    protected int _format;
+    protected int _length;
+    protected int _language;
+
+    protected CmapFormat(DataInput di) throws IOException {
+        _length = di.readUnsignedShort();
+        _language = di.readUnsignedShort();
+    }
+
+    protected static CmapFormat create(int format, DataInput di)
+    throws IOException {
+        switch(format) {
+            case 0:
+                return new CmapFormat0(di);
+            case 2:
+                return new CmapFormat2(di);
+            case 4:
+                return new CmapFormat4(di);
+            case 6:
+                return new CmapFormat6(di);
+            default:
+                return new CmapFormatUnknown(format, di);
+        }
+    }
+
+    public int getFormat() {
+        return _format;
+    }
+
+    public int getLength() {
+        return _length;
+    }
+
+    public int getLanguage() {
+        return _language;
+    }
+
+    public abstract int getRangeCount();
+    
+    public abstract Range getRange(int index)
+        throws ArrayIndexOutOfBoundsException;
+
+    public abstract int mapCharCode(int charCode);
+    
+    public String toString() {
+        return new StringBuffer()
+        .append("format: ")
+        .append(_format)
+        .append(", length: ")
+        .append(_length)
+        .append(", language: ")
+        .append(_language).toString();
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat0.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat0.java
new file mode 100644
index 0000000..e374f82
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat0.java
@@ -0,0 +1,92 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, 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.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Batik" and  "Apache Software Foundation" must  not  be
+    used to  endorse or promote  products derived from  this software without
+    prior written permission. For written permission, please contact
+    apache at apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, 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.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+/**
+ * Simple Macintosh cmap table, mapping only the ASCII character set to glyphs.
+ *
+ * @version $Id: CmapFormat0.java,v 1.2 2004-12-21 10:22:55 davidsch Exp $
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ */
+public class CmapFormat0 extends CmapFormat {
+
+    private int[] _glyphIdArray = new int[256];
+
+    protected CmapFormat0(DataInput di) throws IOException {
+        super(di);
+        _format = 0;
+        for (int i = 0; i < 256; i++) {
+            _glyphIdArray[i] = di.readUnsignedByte();
+        }
+    }
+
+    public int getRangeCount() {
+        return 1;
+    }
+    
+    public Range getRange(int index) throws ArrayIndexOutOfBoundsException {
+        if (index != 0) {
+            throw new ArrayIndexOutOfBoundsException();
+        }
+        return new Range(0, 255);
+    }
+
+    public int mapCharCode(int charCode) {
+        if (0 <= charCode && charCode < 256) {
+            return _glyphIdArray[charCode];
+        } else {
+            return 0;
+        }
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat2.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat2.java
new file mode 100644
index 0000000..319d8c0
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat2.java
@@ -0,0 +1,173 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, 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.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Batik" and  "Apache Software Foundation" must  not  be
+    used to  endorse or promote  products derived from  this software without
+    prior written permission. For written permission, please contact
+    apache at apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, 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.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+/**
+ * High-byte mapping through table cmap format.
+ * @version $Id: CmapFormat2.java,v 1.3 2004-12-21 16:56:54 davidsch Exp $
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ */
+public class CmapFormat2 extends CmapFormat {
+
+    private class SubHeader {
+        int _firstCode;
+        int _entryCount;
+        short _idDelta;
+        int _idRangeOffset;
+        int _arrayIndex;
+    }
+    
+    private int[] _subHeaderKeys = new int[256];
+    private SubHeader[] _subHeaders;
+    private int[] _glyphIndexArray;
+
+    protected CmapFormat2(DataInput di) throws IOException {
+        super(di);
+        _format = 2;
+        
+        int pos = 6;
+        
+        // Read the subheader keys, noting the highest value, as this will
+        // determine the number of subheaders to read.
+        int highest = 0;
+        for (int i = 0; i < 256; ++i) {
+            _subHeaderKeys[i] = di.readUnsignedShort();
+            highest = Math.max(highest, _subHeaderKeys[i]);
+            pos += 2;
+        }
+        int subHeaderCount = highest / 8 + 1;
+        _subHeaders = new SubHeader[subHeaderCount];
+        
+        // Read the subheaders, once again noting the highest glyphIndexArray
+        // index range.
+        int indexArrayOffset = 8 * subHeaderCount + 518;
+        highest = 0;
+        for (int i = 0; i < _subHeaders.length; ++i) {
+            SubHeader sh = new SubHeader();
+            sh._firstCode = di.readUnsignedShort();
+            sh._entryCount = di.readUnsignedShort();
+            sh._idDelta = di.readShort();
+            sh._idRangeOffset = di.readUnsignedShort();
+            
+            // Calculate the offset into the _glyphIndexArray
+            pos += 8;
+            sh._arrayIndex =
+                    (pos - 2 + sh._idRangeOffset - indexArrayOffset) / 2;
+            
+            // What is the highest range within the glyphIndexArray?
+            highest = Math.max(highest, sh._arrayIndex + sh._entryCount);
+            
+            _subHeaders[i] = sh;
+        }
+        
+        // Read the glyphIndexArray
+        _glyphIndexArray = new int[highest];
+        for (int i = 0; i < _glyphIndexArray.length; ++i) {
+            _glyphIndexArray[i] = di.readUnsignedShort();
+        }
+    }
+
+    public int getRangeCount() {
+        return _subHeaders.length;
+    }
+    
+    public Range getRange(int index) throws ArrayIndexOutOfBoundsException {
+        if (index < 0 || index >= _subHeaders.length) {
+            throw new ArrayIndexOutOfBoundsException();
+        }
+        
+        // Find the high-byte (if any)
+        int highByte = 0;
+        if (index != 0) {
+            for (int i = 0; i < 256; ++i) {
+                if (_subHeaderKeys[i] / 8 == index) {
+                    highByte = i << 8;
+                    break;
+                }
+            }
+        }
+        
+        return new Range(
+                highByte | _subHeaders[index]._firstCode,
+                highByte | (_subHeaders[index]._firstCode +
+                    _subHeaders[index]._entryCount - 1));
+    }
+
+    public int mapCharCode(int charCode) {
+        
+        // Get the appropriate subheader
+        int index = 0;
+        int highByte = charCode >> 8;
+        if (highByte != 0) {
+            index = _subHeaderKeys[highByte] / 8;
+        }
+        SubHeader sh = _subHeaders[index];
+        
+        // Is the charCode out-of-range?
+        int lowByte = charCode & 0xff;
+        if (lowByte < sh._firstCode ||
+                lowByte >= (sh._firstCode + sh._entryCount)) {
+            return 0;
+        }
+        
+        // Now calculate the glyph index
+        int glyphIndex =
+                _glyphIndexArray[sh._arrayIndex + (lowByte - sh._firstCode)];
+        if (glyphIndex != 0) {
+            glyphIndex += sh._idDelta;
+            glyphIndex %= 65536;
+        }
+        return glyphIndex;
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat4.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat4.java
new file mode 100644
index 0000000..d2baf2b
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat4.java
@@ -0,0 +1,165 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, 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.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Batik" and  "Apache Software Foundation" must  not  be
+    used to  endorse or promote  products derived from  this software without
+    prior written permission. For written permission, please contact
+    apache at apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, 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.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+/**
+ * @version $Id: CmapFormat4.java,v 1.3 2004-12-21 16:57:23 davidsch Exp $
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ */
+public class CmapFormat4 extends CmapFormat {
+
+    private int _segCountX2;
+    private int _searchRange;
+    private int _entrySelector;
+    private int _rangeShift;
+    private int[] _endCode;
+    private int[] _startCode;
+    private int[] _idDelta;
+    private int[] _idRangeOffset;
+    private int[] _glyphIdArray;
+    private int _segCount;
+
+    protected CmapFormat4(DataInput di) throws IOException {
+        super(di); // 6
+        _format = 4;
+        _segCountX2 = di.readUnsignedShort(); // +2 (8)
+        _segCount = _segCountX2 / 2;
+        _endCode = new int[_segCount];
+        _startCode = new int[_segCount];
+        _idDelta = new int[_segCount];
+        _idRangeOffset = new int[_segCount];
+        _searchRange = di.readUnsignedShort(); // +2 (10)
+        _entrySelector = di.readUnsignedShort(); // +2 (12)
+        _rangeShift = di.readUnsignedShort(); // +2 (14)
+        for (int i = 0; i < _segCount; i++) {
+            _endCode[i] = di.readUnsignedShort();
+        } // + 2*segCount (2*segCount + 14)
+        di.readUnsignedShort(); // reservePad  +2 (2*segCount + 16)
+        for (int i = 0; i < _segCount; i++) {
+            _startCode[i] = di.readUnsignedShort();
+        } // + 2*segCount (4*segCount + 16)
+        for (int i = 0; i < _segCount; i++) {
+            _idDelta[i] = di.readUnsignedShort();
+        } // + 2*segCount (6*segCount + 16)
+        for (int i = 0; i < _segCount; i++) {
+            _idRangeOffset[i] = di.readUnsignedShort();
+        } // + 2*segCount (8*segCount + 16)
+
+        // Whatever remains of this header belongs in glyphIdArray
+        int count = (_length - (8*_segCount + 16)) / 2;
+        _glyphIdArray = new int[count];
+        for (int i = 0; i < count; i++) {
+            _glyphIdArray[i] = di.readUnsignedShort();
+        } // + 2*count (8*segCount + 2*count + 18)
+        
+        // Are there any padding bytes we need to consume?
+//        int leftover = length - (8*segCount + 2*count + 18);
+//        if (leftover > 0) {
+//            di.skipBytes(leftover);
+//        }
+    }
+
+    public int getRangeCount() {
+        return _segCount;
+    }
+    
+    public Range getRange(int index) throws ArrayIndexOutOfBoundsException {
+        if (index < 0 || index >= _segCount) {
+            throw new ArrayIndexOutOfBoundsException();
+        }
+        return new Range(_startCode[index], _endCode[index]);
+    }
+
+    public int mapCharCode(int charCode) {
+        try {
+            for (int i = 0; i < _segCount; i++) {
+                if (_endCode[i] >= charCode) {
+                    if (_startCode[i] <= charCode) {
+                        if (_idRangeOffset[i] > 0) {
+                            return _glyphIdArray[_idRangeOffset[i]/2 + (charCode - _startCode[i]) - (_segCount - i)];
+                        } else {
+                            return (_idDelta[i] + charCode) % 65536;
+                        }
+                    } else {
+                        break;
+                    }
+                }
+            }
+        } catch (ArrayIndexOutOfBoundsException e) {
+            System.err.println("error: Array out of bounds - " + e.getMessage());
+        }
+        return 0;
+    }
+
+    public String toString() {
+        return new StringBuffer()
+            .append(super.toString())
+            .append(", segCountX2: ")
+            .append(_segCountX2)
+            .append(", searchRange: ")
+            .append(_searchRange)
+            .append(", entrySelector: ")
+            .append(_entrySelector)
+            .append(", rangeShift: ")
+            .append(_rangeShift)
+            .append(", endCode: ")
+            .append(_endCode)
+            .append(", startCode: ")
+            .append(_endCode)
+            .append(", idDelta: ")
+            .append(_idDelta)
+            .append(", idRangeOffset: ")
+            .append(_idRangeOffset).toString();
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat6.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat6.java
new file mode 100644
index 0000000..a58531d
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat6.java
@@ -0,0 +1,87 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, 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.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Batik" and  "Apache Software Foundation" must  not  be
+    used to  endorse or promote  products derived from  this software without
+    prior written permission. For written permission, please contact
+    apache at apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, 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.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+/**
+ * TODO: To be implemented
+ * @version $Id: CmapFormat6.java,v 1.2 2004-12-21 10:22:56 davidsch Exp $
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ */
+public class CmapFormat6 extends CmapFormat {
+
+    private short _firstCode;
+    private short _entryCount;
+    private short[] _glyphIdArray;
+
+    protected CmapFormat6(DataInput di) throws IOException {
+        super(di);
+        _format = 6;
+        
+        // HACK: As this is not yet implemented, we need to skip over the bytes
+        // we should be consuming
+        //di.skipBytes(_length - 4);
+    }
+
+    public int getRangeCount() {
+        return 0;
+    }
+    
+    public Range getRange(int index) throws ArrayIndexOutOfBoundsException {
+        throw new ArrayIndexOutOfBoundsException();
+    }
+
+    public int mapCharCode(int charCode) {
+        return 0;
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormatUnknown.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormatUnknown.java
new file mode 100644
index 0000000..83366b5
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormatUnknown.java
@@ -0,0 +1,54 @@
+/*
+ * $Id: CmapFormatUnknown.java,v 1.1 2004-12-21 10:21:23 davidsch Exp $
+ *
+ * Typecast - The Font Development Environment
+ *
+ * Copyright (c) 2004 David Schweinsberg
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+/**
+ * When we encounter a cmap format we don't understand, we can use this class
+ * to hold the bare minimum information about it.
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ * @version $Id: CmapFormatUnknown.java,v 1.1 2004-12-21 10:21:23 davidsch Exp $
+ */
+public class CmapFormatUnknown extends CmapFormat {
+    
+    /** Creates a new instance of CmapFormatUnknown */
+    protected CmapFormatUnknown(int format, DataInput di) throws IOException {
+        super(di);
+        _format = format;
+        
+        // We don't know how to handle this data, so we'll just skip over it
+        di.skipBytes(_length - 4);
+    }
+
+    public int getRangeCount() {
+        return 0;
+    }
+    
+    public Range getRange(int index) throws ArrayIndexOutOfBoundsException {
+        throw new ArrayIndexOutOfBoundsException();
+    }
+
+    public int mapCharCode(int charCode) {
+        return 0;
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapIndexEntry.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapIndexEntry.java
new file mode 100644
index 0000000..df18a7f
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapIndexEntry.java
@@ -0,0 +1,117 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, 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.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Batik" and  "Apache Software Foundation" must  not  be
+    used to  endorse or promote  products derived from  this software without
+    prior written permission. For written permission, please contact
+    apache at apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, 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.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+/**
+ * @version $Id: CmapIndexEntry.java,v 1.2 2004-12-21 10:22:56 davidsch Exp $
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ */
+public class CmapIndexEntry implements Comparable {
+
+    private int _platformId;
+    private int _encodingId;
+    private int _offset;
+    private CmapFormat _format;
+
+    protected CmapIndexEntry(DataInput di) throws IOException {
+        _platformId = di.readUnsignedShort();
+        _encodingId = di.readUnsignedShort();
+        _offset = di.readInt();
+    }
+
+    public int getPlatformId() {
+        return _platformId;
+    }
+
+    public int getEncodingId() {
+        return _encodingId;
+    }
+
+    public int getOffset() {
+        return _offset;
+    }
+
+    public CmapFormat getFormat() {
+        return _format;
+    }
+    
+    public void setFormat(CmapFormat format) {
+        _format = format;
+    }
+
+    public String toString() {
+        return new StringBuffer()
+            .append("platform id: ")
+            .append(_platformId)
+            .append(" (")
+            .append(ID.getPlatformName((short) _platformId))
+            .append("), encoding id: ")
+            .append(_encodingId)
+            .append(" (")
+            .append(ID.getEncodingName((short) _platformId, (short) _encodingId))
+            .append("), offset: ")
+            .append(_offset).toString();
+    }
+
+    public int compareTo(java.lang.Object obj) {
+        CmapIndexEntry entry = (CmapIndexEntry) obj;
+        if (getOffset() < entry.getOffset()) {
+            return -1;
+        } else if (getOffset() > entry.getOffset()) {
+            return 1;
+        } else {
+            return 0;
+        }
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapTable.java
new file mode 100644
index 0000000..b93de50
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapTable.java
@@ -0,0 +1,161 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, 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.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Batik" and  "Apache Software Foundation" must  not  be
+    used to  endorse or promote  products derived from  this software without
+    prior written permission. For written permission, please contact
+    apache at apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, 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.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+import java.util.Arrays;
+
+/**
+ * @version $Id: CmapTable.java,v 1.3 2004-12-21 10:22:56 davidsch Exp $
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ */
+public class CmapTable implements Table {
+
+    private DirectoryEntry _de;
+    private int _version;
+    private int _numTables;
+    private CmapIndexEntry[] _entries;
+
+    protected CmapTable(DirectoryEntry de, DataInput di) throws IOException {
+        _de = (DirectoryEntry) de.clone();
+        _version = di.readUnsignedShort();
+        _numTables = di.readUnsignedShort();
+        long bytesRead = 4;
+        _entries = new CmapIndexEntry[_numTables];
+
+        // Get each of the index entries
+        for (int i = 0; i < _numTables; i++) {
+            _entries[i] = new CmapIndexEntry(di);
+            bytesRead += 8;
+        }
+
+        // Sort into their order of offset
+        Arrays.sort(_entries);
+
+        // Get each of the tables
+        int lastOffset = 0;
+        CmapFormat lastFormat = null;
+        for (int i = 0; i < _numTables; i++) {
+            if (_entries[i].getOffset() == lastOffset) {
+
+                // This is a multiple entry
+                _entries[i].setFormat(lastFormat);
+                continue;
+            } else if (_entries[i].getOffset() > bytesRead) {
+                di.skipBytes(_entries[i].getOffset() - (int) bytesRead);
+            } else if (_entries[i].getOffset() != bytesRead) {
+                
+                // Something is amiss
+                throw new IOException();
+            }
+            int formatType = di.readUnsignedShort();
+            lastFormat = CmapFormat.create(formatType, di);
+            lastOffset = _entries[i].getOffset();
+            _entries[i].setFormat(lastFormat);
+            bytesRead += lastFormat.getLength();
+        }
+    }
+
+    public int getVersion() {
+        return _version;
+    }
+    
+    public int getNumTables() {
+        return _numTables;
+    }
+    
+    public CmapIndexEntry getCmapIndexEntry(int i) {
+        return _entries[i];
+    }
+    
+    public CmapFormat getCmapFormat(short platformId, short encodingId) {
+
+        // Find the requested format
+        for (int i = 0; i < _numTables; i++) {
+            if (_entries[i].getPlatformId() == platformId
+                    && _entries[i].getEncodingId() == encodingId) {
+                return _entries[i].getFormat();
+            }
+        }
+        return null;
+    }
+
+    public int getType() {
+        return cmap;
+    }
+
+    public String toString() {
+        StringBuffer sb = new StringBuffer().append("cmap\n");
+
+        // Get each of the index entries
+        for (int i = 0; i < _numTables; i++) {
+            sb.append("\t").append(_entries[i].toString()).append("\n");
+        }
+
+        // Get each of the tables
+//        for (int i = 0; i < numTables; i++) {
+//            sb.append("\t").append(formats[i].toString()).append("\n");
+//        }
+        return sb.toString();
+    }
+    
+    /**
+     * Get a directory entry for this table.  This uniquely identifies the
+     * table in collections where there may be more than one instance of a
+     * particular table.
+     * @return A directory entry
+     */
+    public DirectoryEntry getDirectoryEntry() {
+        return _de;
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Coverage.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Coverage.java
new file mode 100644
index 0000000..e85fadb
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Coverage.java
@@ -0,0 +1,83 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, 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.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Batik" and  "Apache Software Foundation" must  not  be
+    used to  endorse or promote  products derived from  this software without
+    prior written permission. For written permission, please contact
+    apache at apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, 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.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+/**
+ *
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ * @version $Id: Coverage.java,v 1.3 2007-01-24 09:43:30 davidsch Exp $
+ */
+public abstract class Coverage {
+
+    public abstract int getFormat();
+
+    /**
+     * @param glyphId The ID of the glyph to find.
+     * @return The index of the glyph within the coverage, or -1 if the glyph
+     * can't be found.
+     */
+    public abstract int findGlyph(int glyphId);
+    
+    protected static Coverage read(DataInput di) throws IOException {
+        Coverage c = null;
+        int format = di.readUnsignedShort();
+        if (format == 1) {
+            c = new CoverageFormat1(di);
+        } else if (format == 2) {
+            c = new CoverageFormat2(di);
+        }
+        return c;
+    }
+
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CoverageFormat1.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CoverageFormat1.java
new file mode 100644
index 0000000..712da54
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CoverageFormat1.java
@@ -0,0 +1,88 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, 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.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Batik" and  "Apache Software Foundation" must  not  be
+    used to  endorse or promote  products derived from  this software without
+    prior written permission. For written permission, please contact
+    apache at apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, 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.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+/**
+ *
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ * @version $Id: CoverageFormat1.java,v 1.2 2007-01-24 09:43:30 davidsch Exp $
+ */
+public class CoverageFormat1 extends Coverage {
+
+    private int _glyphCount;
+    private int[] _glyphIds;
+
+    /** Creates new CoverageFormat1 */
+    protected CoverageFormat1(DataInput di) throws IOException {
+        _glyphCount = di.readUnsignedShort();
+        _glyphIds = new int[_glyphCount];
+        for (int i = 0; i < _glyphCount; i++) {
+            _glyphIds[i] = di.readUnsignedShort();
+        }
+    }
+
+    public int getFormat() {
+        return 1;
+    }
+
+    public int findGlyph(int glyphId) {
+        for (int i = 0; i < _glyphCount; i++) {
+            if (_glyphIds[i] == glyphId) {
+                return i;
+            }
+        }
+        return -1;
+    }
+
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CoverageFormat2.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CoverageFormat2.java
new file mode 100644
index 0000000..7196ed5
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CoverageFormat2.java
@@ -0,0 +1,89 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, 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.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Batik" and  "Apache Software Foundation" must  not  be
+    used to  endorse or promote  products derived from  this software without
+    prior written permission. For written permission, please contact
+    apache at apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, 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.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+/**
+ *
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ * @version $Id: CoverageFormat2.java,v 1.2 2007-01-24 09:43:30 davidsch Exp $
+ */
+public class CoverageFormat2 extends Coverage {
+
+    private int _rangeCount;
+    private RangeRecord[] _rangeRecords;
+
+    /** Creates new CoverageFormat2 */
+    protected CoverageFormat2(DataInput di) throws IOException {
+        _rangeCount = di.readUnsignedShort();
+        _rangeRecords = new RangeRecord[_rangeCount];
+        for (int i = 0; i < _rangeCount; i++) {
+            _rangeRecords[i] = new RangeRecord(di);
+        }
+    }
+
+    public int getFormat() {
+        return 2;
+    }
+
+    public int findGlyph(int glyphId) {
+        for (int i = 0; i < _rangeCount; i++) {
+            int n = _rangeRecords[i].getCoverageIndex(glyphId);
+            if (n > -1) {
+                return n;
+            }
+        }
+        return -1;
+    }
+
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CvtTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CvtTable.java
new file mode 100644
index 0000000..189d080
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CvtTable.java
@@ -0,0 +1,61 @@
+/*****************************************************************************
+ * Copyright (C) The Apache Software Foundation. All rights reserved.        *
+ * ------------------------------------------------------------------------- * 
+ * This software is published under the terms of the Apache Software License * 
+ * version 1.1, a copy of which has been included with this distribution in  * 
+ * the LICENSE file.                                                         * 
+ *****************************************************************************/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+/**
+ * @version $Id: CvtTable.java,v 1.1.1.1 2004-12-05 23:14:36 davidsch Exp $
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ */
+public class CvtTable implements Table {
+
+    private DirectoryEntry de;
+    private short[] values;
+
+    protected CvtTable(DirectoryEntry de, DataInput di) throws IOException {
+        this.de = (DirectoryEntry) de.clone();
+        int len = de.getLength() / 2;
+        values = new short[len];
+        for (int i = 0; i < len; i++) {
+            values[i] = di.readShort();
+        }
+    }
+
+    public int getType() {
+        return cvt;
+    }
+
+    public short[] getValues() {
+        return values;
+    }
+
+    public String toString() {
+        StringBuffer sb = new StringBuffer();
+        sb.append("'cvt ' Table - Control Value Table\n----------------------------------\n");
+        sb.append("Size = ").append(0).append(" bytes, ").append(values.length).append(" entries\n");
+        sb.append("        Values\n        ------\n");
+        for (int i = 0; i < values.length; i++) {
+            sb.append("        ").append(i).append(": ").append(values[i]).append("\n");
+        }
+        return sb.toString();
+    }
+    
+    /**
+     * Get a directory entry for this table.  This uniquely identifies the
+     * table in collections where there may be more than one instance of a
+     * particular table.
+     * @return A directory entry
+     */
+    public DirectoryEntry getDirectoryEntry() {
+        return de;
+    }
+    
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Device.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Device.java
new file mode 100644
index 0000000..6b4af69
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Device.java
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ * Copyright (C) The Apache Software Foundation. All rights reserved.        *
+ * ------------------------------------------------------------------------- * 
+ * This software is published under the terms of the Apache Software License * 
+ * version 1.1, a copy of which has been included with this distribution in  * 
+ * the LICENSE file.                                                         * 
+ *****************************************************************************/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.IOException;
+import java.io.RandomAccessFile;
+
+/**
+ *
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ * @version $Id: Device.java,v 1.1.1.1 2004-12-05 23:14:37 davidsch Exp $
+ */
+public class Device extends Object {
+
+    private int startSize;
+    private int endSize;
+    private int deltaFormat;
+    private int[] deltaValues;
+
+    /** Creates new Device */
+    public Device(RandomAccessFile raf) throws IOException {
+        startSize = raf.readUnsignedShort();
+        endSize = raf.readUnsignedShort();
+        deltaFormat = raf.readUnsignedShort();
+        int size = startSize - endSize;
+        switch (deltaFormat) {
+        case 1:
+            size = (size % 8 == 0) ? size / 8 : size / 8 + 1;
+            break;
+        case 2:
+            size = (size % 4 == 0) ? size / 4 : size / 4 + 1;
+            break;
+        case 3:
+            size = (size % 2 == 0) ? size / 2 : size / 2 + 1;
+            break;
+        }
+        deltaValues = new int[size];
+        for (int i = 0; i < size; i++) {
+            deltaValues[i] = raf.readUnsignedShort();
+        }
+    }
+
+
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/DirectoryEntry.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/DirectoryEntry.java
new file mode 100644
index 0000000..d2f93de
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/DirectoryEntry.java
@@ -0,0 +1,115 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, 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.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Batik" and  "Apache Software Foundation" must  not  be
+    used to  endorse or promote  products derived from  this software without
+    prior written permission. For written permission, please contact
+    apache at apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, 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.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+/**
+ * @version $Id: DirectoryEntry.java,v 1.2 2004-12-09 23:46:21 davidsch Exp $
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ */
+public class DirectoryEntry implements Cloneable {
+
+    private int _tag;
+    private int _checksum;
+    private int _offset;
+    private int _length;
+
+    protected DirectoryEntry(DataInput di) throws IOException {
+        _tag = di.readInt();
+        _checksum = di.readInt();
+        _offset = di.readInt();
+        _length = di.readInt();
+    }
+    
+    public Object clone() {
+        try {
+            return super.clone();
+        } catch (CloneNotSupportedException e) {
+            return null;
+        }
+    }
+
+    public int getChecksum() {
+        return _checksum;
+    }
+
+    public int getLength() {
+        return _length;
+    }
+
+    public int getOffset() {
+        return _offset;
+    }
+
+    public int getTag() {
+        return _tag;
+    }
+
+    public String getTagAsString() {
+        return new StringBuffer()
+            .append((char)((_tag>>24)&0xff))
+            .append((char)((_tag>>16)&0xff))
+            .append((char)((_tag>>8)&0xff))
+            .append((char)((_tag)&0xff))
+            .toString();
+    }
+    
+    public String toString() {
+        return new StringBuffer()
+            .append("'").append(getTagAsString())
+            .append("' - chksm = 0x").append(Integer.toHexString(_checksum))
+            .append(", off = 0x").append(Integer.toHexString(_offset))
+            .append(", len = ").append(_length)
+            .toString();
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/DsigEntry.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/DsigEntry.java
new file mode 100644
index 0000000..4b41f45
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/DsigEntry.java
@@ -0,0 +1,43 @@
+/*****************************************************************************
+ * Copyright (C) The Apache Software Foundation. All rights reserved.        *
+ * ------------------------------------------------------------------------- * 
+ * This software is published under the terms of the Apache Software License * 
+ * version 1.1, a copy of which has been included with this distribution in  * 
+ * the LICENSE file.                                                         * 
+ *****************************************************************************/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.IOException;
+import java.io.DataInput;
+
+/**
+ *
+ * @version $Id: DsigEntry.java,v 1.1.1.1 2004-12-05 23:14:37 davidsch Exp $
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ */
+public class DsigEntry {
+
+    private int format;
+    private int length;
+    private int offset;
+    
+    /** Creates new DsigEntry */
+    protected DsigEntry(DataInput di) throws IOException {
+        format = di.readInt();
+        length = di.readInt();
+        offset = di.readInt();
+    }
+
+    public int getFormat() {
+        return format;
+    }
+    
+    public int getLength() {
+        return length;
+    }
+    
+    public int getOffset() {
+        return offset;
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/DsigTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/DsigTable.java
new file mode 100644
index 0000000..34f321e
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/DsigTable.java
@@ -0,0 +1,69 @@
+/*****************************************************************************
+ * Copyright (C) The Apache Software Foundation. All rights reserved.        *
+ * ------------------------------------------------------------------------- * 
+ * This software is published under the terms of the Apache Software License * 
+ * version 1.1, a copy of which has been included with this distribution in  * 
+ * the LICENSE file.                                                         * 
+ *****************************************************************************/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.IOException;
+import java.io.DataInput;
+
+/**
+ *
+ * @version $Id: DsigTable.java,v 1.1.1.1 2004-12-05 23:14:37 davidsch Exp $
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ */
+public class DsigTable implements Table {
+
+    private DirectoryEntry de;
+    private int version;
+    private int numSigs;
+    private int flag;
+    private DsigEntry[] dsigEntry;
+    private SignatureBlock[] sigBlocks;
+
+    /** Creates new DsigTable */
+    protected DsigTable(DirectoryEntry de, DataInput di) throws IOException {
+        this.de = (DirectoryEntry) de.clone();
+        version = di.readInt();
+        numSigs = di.readUnsignedShort();
+        flag = di.readUnsignedShort();
+        dsigEntry = new DsigEntry[numSigs];
+        sigBlocks = new SignatureBlock[numSigs];
+        for (int i = 0; i < numSigs; i++) {
+            dsigEntry[i] = new DsigEntry(di);
+        }
+        for (int i = 0; i < numSigs; i++) {
+            sigBlocks[i] = new SignatureBlock(di);
+        }
+    }
+
+    /**
+     * Get the table type, as a table directory value.
+     * @return The table type
+     */
+    public int getType() {
+        return DSIG;
+    }
+    
+    /**
+     * Get a directory entry for this table.  This uniquely identifies the
+     * table in collections where there may be more than one instance of a
+     * particular table.
+     * @return A directory entry
+     */
+    public DirectoryEntry getDirectoryEntry() {
+        return de;
+    }
+    
+    public String toString() {
+        StringBuffer sb = new StringBuffer().append("DSIG\n");
+        for (int i = 0; i < numSigs; i++) {
+            sb.append(sigBlocks[i].toString());
+        }
+        return sb.toString();
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Feature.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Feature.java
new file mode 100644
index 0000000..ee27896
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Feature.java
@@ -0,0 +1,85 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, 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.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Batik" and  "Apache Software Foundation" must  not  be
+    used to  endorse or promote  products derived from  this software without
+    prior written permission. For written permission, please contact
+    apache at apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, 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.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+/**
+ *
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ * @version $Id: Feature.java,v 1.2 2007-01-24 09:47:46 davidsch Exp $
+ */
+public class Feature {
+
+    private int _featureParams;
+    private int _lookupCount;
+    private int[] _lookupListIndex;
+
+    /** Creates new Feature */
+    protected Feature(DataInput di) throws IOException {
+        _featureParams = di.readUnsignedShort();
+        _lookupCount = di.readUnsignedShort();
+        _lookupListIndex = new int[_lookupCount];
+        for (int i = 0; i < _lookupCount; i++) {
+            _lookupListIndex[i] = di.readUnsignedShort();
+        }
+    }
+
+    public int getLookupCount() {
+        return _lookupCount;
+    }
+
+    public int getLookupListIndex(int i) {
+        return _lookupListIndex[i];
+    }
+
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/FeatureList.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/FeatureList.java
new file mode 100644
index 0000000..3cfb54a
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/FeatureList.java
@@ -0,0 +1,118 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, 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.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Batik" and  "Apache Software Foundation" must  not  be
+    used to  endorse or promote  products derived from  this software without
+    prior written permission. For written permission, please contact
+    apache at apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, 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.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInputStream;
+import java.io.IOException;
+
+/**
+ *
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ * @version $Id: FeatureList.java,v 1.3 2007-01-24 09:54:44 davidsch Exp $
+ */
+public class FeatureList {
+
+    private int _featureCount;
+    private FeatureRecord[] _featureRecords;
+    private Feature[] _features;
+
+    /** Creates new FeatureList */
+    public FeatureList(DataInputStream dis, int offset) throws IOException {
+        
+        // Ensure we're in the right place
+        dis.reset();
+        dis.skipBytes(offset);
+        
+        // Start reading
+        _featureCount = dis.readUnsignedShort();
+        _featureRecords = new FeatureRecord[_featureCount];
+        _features = new Feature[_featureCount];
+        for (int i = 0; i < _featureCount; i++) {
+            _featureRecords[i] = new FeatureRecord(dis);
+        }
+        for (int i = 0; i < _featureCount; i++) {
+            dis.reset();
+            dis.skipBytes(offset + _featureRecords[i].getOffset());
+            _features[i] = new Feature(dis);
+        }
+    }
+
+    public int getFeatureCount() {
+        return _featureCount;
+    }
+    
+    public FeatureRecord getFeatureRecord(int i) {
+        return _featureRecords[i];
+    }
+    
+    public Feature getFeature(int i) {
+        return _features[i];
+    }
+
+    public Feature findFeature(LangSys langSys, String tag) {
+        if (tag.length() != 4) {
+            return null;
+        }
+        int tagVal = ((tag.charAt(0)<<24)
+            | (tag.charAt(1)<<16)
+            | (tag.charAt(2)<<8)
+            | tag.charAt(3));
+        for (int i = 0; i < _featureCount; i++) {
+            if (_featureRecords[i].getTag() == tagVal) {
+                if (langSys.isFeatureIndexed(i)) {
+                    return _features[i];
+                }
+            }
+        }
+        return null;
+    }
+
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/FeatureRecord.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/FeatureRecord.java
new file mode 100644
index 0000000..49a8ef9
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/FeatureRecord.java
@@ -0,0 +1,88 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, 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.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Batik" and  "Apache Software Foundation" must  not  be
+    used to  endorse or promote  products derived from  this software without
+    prior written permission. For written permission, please contact
+    apache at apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, 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.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+/**
+ *
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ * @version $Id: FeatureRecord.java,v 1.2 2007-01-24 09:47:48 davidsch Exp $
+ */
+public class FeatureRecord {
+
+    private int _tag;
+    private int _offset;
+
+    /** Creates new FeatureRecord */
+    protected FeatureRecord(DataInput di) throws IOException {
+        _tag = di.readInt();
+        _offset = di.readUnsignedShort();
+    }
+
+    public int getTag() {
+        return _tag;
+    }
+    
+    public int getOffset() {
+        return _offset;
+    }
+
+    public String getTagAsString() {
+        return new StringBuffer()
+            .append((char)((_tag>>24)&0xff))
+            .append((char)((_tag>>16)&0xff))
+            .append((char)((_tag>>8)&0xff))
+            .append((char)((_tag)&0xff))
+            .toString();
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/FeatureTags.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/FeatureTags.java
new file mode 100644
index 0000000..a5584a2
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/FeatureTags.java
@@ -0,0 +1,63 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, 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.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Batik" and  "Apache Software Foundation" must  not  be
+    used to  endorse or promote  products derived from  this software without
+    prior written permission. For written permission, please contact
+    apache at apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, 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.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package jogamp.graph.font.typecast.ot.table;
+
+/**
+ * Definition of Feature tags
+ *
+ * @version $Id: FeatureTags.java,v 1.2 2007-01-24 09:47:48 davidsch Exp $
+ * @author <a href="mailto:vincent.hardy at eng.sun.com">Vincent Hardy</a>
+ */
+public interface FeatureTags {
+    public static final String FEATURE_TAG_INIT = "init";
+    public static final String FEATURE_TAG_MEDI = "medi";
+    public static final String FEATURE_TAG_FINA = "fina";
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/FpgmTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/FpgmTable.java
new file mode 100644
index 0000000..9a60001
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/FpgmTable.java
@@ -0,0 +1,47 @@
+/*****************************************************************************
+ * Copyright (C) The Apache Software Foundation. All rights reserved.        *
+ * ------------------------------------------------------------------------- * 
+ * This software is published under the terms of the Apache Software License * 
+ * version 1.1, a copy of which has been included with this distribution in  * 
+ * the LICENSE file.                                                         * 
+ *****************************************************************************/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+import jogamp.graph.font.typecast.ot.Disassembler;
+
+/**
+ * @version $Id: FpgmTable.java,v 1.1.1.1 2004-12-05 23:14:38 davidsch Exp $
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ */
+public class FpgmTable extends Program implements Table {
+
+    private DirectoryEntry de;
+
+    protected FpgmTable(DirectoryEntry de, DataInput di) throws IOException {
+        this.de = (DirectoryEntry) de.clone();
+        readInstructions(di, de.getLength());
+    }
+
+    public int getType() {
+        return fpgm;
+    }
+
+    public String toString() {
+        return Disassembler.disassemble(getInstructions(), 0);
+    }
+    
+    /**
+     * Get a directory entry for this table.  This uniquely identifies the
+     * table in collections where there may be more than one instance of a
+     * particular table.
+     * @return A directory entry
+     */
+    public DirectoryEntry getDirectoryEntry() {
+        return de;
+    }
+    
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GaspRange.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GaspRange.java
new file mode 100644
index 0000000..fe7e9f6
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GaspRange.java
@@ -0,0 +1,45 @@
+/*****************************************************************************
+ * Copyright (C) The Apache Software Foundation. All rights reserved.        *
+ * ------------------------------------------------------------------------- * 
+ * This software is published under the terms of the Apache Software License * 
+ * version 1.1, a copy of which has been included with this distribution in  * 
+ * the LICENSE file.                                                         * 
+ *****************************************************************************/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+/**
+ *
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ * @version $Id: GaspRange.java,v 1.1.1.1 2004-12-05 23:14:38 davidsch Exp $
+ */
+public class GaspRange {
+
+    public static final int GASP_GRIDFIT = 1;
+    public static final int GASP_DOGRAY = 2;
+    
+    private int rangeMaxPPEM;
+    private int rangeGaspBehavior;
+    
+    /** Creates new GaspRange */
+    protected GaspRange(DataInput di) throws IOException {
+        rangeMaxPPEM = di.readUnsignedShort();
+        rangeGaspBehavior = di.readUnsignedShort();
+    }
+
+    public String toString() {
+        StringBuffer sb = new StringBuffer();
+        sb.append("  rangeMaxPPEM:        ").append(rangeMaxPPEM)
+            .append("\n  rangeGaspBehavior:   0x").append(rangeGaspBehavior);
+        if ((rangeGaspBehavior & GASP_GRIDFIT) != 0) {
+            sb.append("- GASP_GRIDFIT ");
+        }
+        if ((rangeGaspBehavior & GASP_DOGRAY) != 0) {
+            sb.append("- GASP_DOGRAY");
+        }
+        return sb.toString();
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GaspTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GaspTable.java
new file mode 100644
index 0000000..611ee16
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GaspTable.java
@@ -0,0 +1,63 @@
+/*****************************************************************************
+ * Copyright (C) The Apache Software Foundation. All rights reserved.        *
+ * ------------------------------------------------------------------------- * 
+ * This software is published under the terms of the Apache Software License * 
+ * version 1.1, a copy of which has been included with this distribution in  * 
+ * the LICENSE file.                                                         * 
+ *****************************************************************************/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+/**
+ *
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ * @version $Id: GaspTable.java,v 1.1.1.1 2004-12-05 23:14:39 davidsch Exp $
+ */
+public class GaspTable implements Table {
+
+    private DirectoryEntry de;
+    private int version;
+    private int numRanges;
+    private GaspRange[] gaspRange;
+    
+    /** Creates new GaspTable */
+    protected GaspTable(DirectoryEntry de, DataInput di) throws IOException {
+        this.de = (DirectoryEntry) de.clone();
+        version = di.readUnsignedShort();
+        numRanges = di.readUnsignedShort();
+        gaspRange = new GaspRange[numRanges];
+        for (int i = 0; i < numRanges; i++) {
+            gaspRange[i] = new GaspRange(di);
+        }
+    }
+
+    public int getType() {
+        return gasp;
+    }
+
+    public String toString() {
+        StringBuffer sb = new StringBuffer();
+        sb.append("'gasp' Table - Grid-fitting And Scan-conversion Procedure\n---------------------------------------------------------");
+        sb.append("\n  'gasp' version:      ").append(version);
+        sb.append("\n  numRanges:           ").append(numRanges);
+        for (int i = 0; i < numRanges; i++) {
+            sb.append("\n\n  gasp Range ").append(i).append("\n");
+            sb.append(gaspRange[i].toString());
+        }
+        return sb.toString();
+    }
+    
+    /**
+     * Get a directory entry for this table.  This uniquely identifies the
+     * table in collections where there may be more than one instance of a
+     * particular table.
+     * @return A directory entry
+     */
+    public DirectoryEntry getDirectoryEntry() {
+        return de;
+    }
+    
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfCompositeComp.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfCompositeComp.java
new file mode 100644
index 0000000..e5c8687
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfCompositeComp.java
@@ -0,0 +1,200 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, 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.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Batik" and  "Apache Software Foundation" must  not  be
+    used to  endorse or promote  products derived from  this software without
+    prior written permission. For written permission, please contact
+    apache at apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, 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.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+/**
+ * @version $Id: GlyfCompositeComp.java,v 1.3 2010-08-10 11:41:55 davidsch Exp $
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ */
+public class GlyfCompositeComp {
+
+    public static final short ARG_1_AND_2_ARE_WORDS = 0x0001;
+    public static final short ARGS_ARE_XY_VALUES = 0x0002;
+    public static final short ROUND_XY_TO_GRID = 0x0004;
+    public static final short WE_HAVE_A_SCALE = 0x0008;
+    public static final short MORE_COMPONENTS = 0x0020;
+    public static final short WE_HAVE_AN_X_AND_Y_SCALE = 0x0040;
+    public static final short WE_HAVE_A_TWO_BY_TWO = 0x0080;
+    public static final short WE_HAVE_INSTRUCTIONS = 0x0100;
+    public static final short USE_MY_METRICS = 0x0200;
+
+    private int _firstIndex;
+    private int _firstContour;
+    private short _argument1;
+    private short _argument2;
+    private int _flags;
+    private int _glyphIndex;
+    private double _xscale = 1.0;
+    private double _yscale = 1.0;
+    private double _scale01 = 0.0;
+    private double _scale10 = 0.0;
+    private int _xtranslate = 0;
+    private int _ytranslate = 0;
+    private int _point1 = 0;
+    private int _point2 = 0;
+
+    protected GlyfCompositeComp(int firstIndex, int firstContour, DataInput di)
+    throws IOException {
+        _firstIndex = firstIndex;
+        _firstContour = firstContour;
+        _flags = di.readUnsignedShort();
+        _glyphIndex = di.readUnsignedShort();
+
+        // Get the arguments as just their raw values
+        if ((_flags & ARG_1_AND_2_ARE_WORDS) != 0) {
+            _argument1 = di.readShort();
+            _argument2 = di.readShort();
+        } else {
+            _argument1 = (short) di.readByte();
+            _argument2 = (short) di.readByte();
+        }
+
+        // Assign the arguments according to the flags
+        if ((_flags & ARGS_ARE_XY_VALUES) != 0) {
+            _xtranslate = _argument1;
+            _ytranslate = _argument2;
+        } else {
+            _point1 = _argument1;
+            _point2 = _argument2;
+        }
+
+        // Get the scale values (if any)
+        if ((_flags & WE_HAVE_A_SCALE) != 0) {
+            int i = di.readShort();
+            _xscale = _yscale = (double) i / (double) 0x4000;
+        } else if ((_flags & WE_HAVE_AN_X_AND_Y_SCALE) != 0) {
+            short i = di.readShort();
+            _xscale = (double) i / (double) 0x4000;
+            i = di.readShort();
+            _yscale = (double) i / (double) 0x4000;
+        } else if ((_flags & WE_HAVE_A_TWO_BY_TWO) != 0) {
+            int i = di.readShort();
+            _xscale = (double) i / (double) 0x4000;
+            i = di.readShort();
+            _scale01 = (double) i / (double) 0x4000;
+            i = di.readShort();
+            _scale10 = (double) i / (double) 0x4000;
+            i = di.readShort();
+            _yscale = (double) i / (double) 0x4000;
+        }
+    }
+
+    public int getFirstIndex() {
+        return _firstIndex;
+    }
+
+    public int getFirstContour() {
+        return _firstContour;
+    }
+
+    public short getArgument1() {
+        return _argument1;
+    }
+
+    public short getArgument2() {
+        return _argument2;
+    }
+
+    public int getFlags() {
+        return _flags;
+    }
+
+    public int getGlyphIndex() {
+        return _glyphIndex;
+    }
+
+    public double getScale01() {
+        return _scale01;
+    }
+
+    public double getScale10() {
+        return _scale10;
+    }
+
+    public double getXScale() {
+        return _xscale;
+    }
+
+    public double getYScale() {
+        return _yscale;
+    }
+
+    public int getXTranslate() {
+        return _xtranslate;
+    }
+
+    public int getYTranslate() {
+        return _ytranslate;
+    }
+
+    /**
+     * Transforms an x-coordinate of a point for this component.
+     * @param x The x-coordinate of the point to transform
+     * @param y The y-coordinate of the point to transform
+     * @return The transformed x-coordinate
+     */
+    public int scaleX(int x, int y) {
+        return (int)((double) x * _xscale + (double) y * _scale10);
+    }
+
+    /**
+     * Transforms a y-coordinate of a point for this component.
+     * @param x The x-coordinate of the point to transform
+     * @param y The y-coordinate of the point to transform
+     * @return The transformed y-coordinate
+     */
+    public int scaleY(int x, int y) {
+        return (int)((double) x * _scale01 + (double) y * _yscale);
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfCompositeDescript.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfCompositeDescript.java
new file mode 100644
index 0000000..4cf2541
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfCompositeDescript.java
@@ -0,0 +1,202 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, 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.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Batik" and  "Apache Software Foundation" must  not  be
+    used to  endorse or promote  products derived from  this software without
+    prior written permission. For written permission, please contact
+    apache at apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, 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.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+import java.util.ArrayList;
+
+/**
+ * Glyph description for composite glyphs.  Composite glyphs are made up of one
+ * or more simple glyphs, usually with some sort of transformation applied to
+ * each.
+ *
+ * @version $Id: GlyfCompositeDescript.java,v 1.5 2007-01-25 08:43:18 davidsch Exp $
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ */
+public class GlyfCompositeDescript extends GlyfDescript {
+
+    private ArrayList<GlyfCompositeComp> _components =
+        new ArrayList<GlyfCompositeComp>();
+
+    public GlyfCompositeDescript(
+            GlyfTable parentTable,
+            int glyphIndex,
+            DataInput di) throws IOException {
+        super(parentTable, glyphIndex, (short) -1, di);
+        
+        // Get all of the composite components
+        GlyfCompositeComp comp;
+        int firstIndex = 0;
+        int firstContour = 0;
+        try {
+            do {
+                _components.add(comp = new GlyfCompositeComp(firstIndex, firstContour, di));
+                GlyfDescript desc = parentTable.getDescription(comp.getGlyphIndex());
+                if (desc != null) {
+                    firstIndex += desc.getPointCount();
+                    firstContour += desc.getContourCount();
+                }
+            } while ((comp.getFlags() & GlyfCompositeComp.MORE_COMPONENTS) != 0);
+
+            // Are there hinting intructions to read?
+            if ((comp.getFlags() & GlyfCompositeComp.WE_HAVE_INSTRUCTIONS) != 0) {
+                readInstructions(di, di.readShort());
+            }
+        } catch (IOException e) {
+            throw e;
+//        } catch (Exception e) {
+//            int foo = 0;
+        }
+    }
+
+    public int getEndPtOfContours(int i) {
+        GlyfCompositeComp c = getCompositeCompEndPt(i);
+        if (c != null) {
+            GlyphDescription gd = _parentTable.getDescription(c.getGlyphIndex());
+            return gd.getEndPtOfContours(i - c.getFirstContour()) + c.getFirstIndex();
+        }
+        return 0;
+    }
+
+    public byte getFlags(int i) {
+        GlyfCompositeComp c = getCompositeComp(i);
+        if (c != null) {
+            GlyphDescription gd = _parentTable.getDescription(c.getGlyphIndex());
+            return gd.getFlags(i - c.getFirstIndex());
+        }
+        return 0;
+    }
+
+    public short getXCoordinate(int i) {
+        GlyfCompositeComp c = getCompositeComp(i);
+        if (c != null) {
+            GlyphDescription gd = _parentTable.getDescription(c.getGlyphIndex());
+            int n = i - c.getFirstIndex();
+            int x = gd.getXCoordinate(n);
+            int y = gd.getYCoordinate(n);
+            short x1 = (short) c.scaleX(x, y);
+            x1 += c.getXTranslate();
+            return x1;
+        }
+        return 0;
+    }
+
+    public short getYCoordinate(int i) {
+        GlyfCompositeComp c = getCompositeComp(i);
+        if (c != null) {
+            GlyphDescription gd = _parentTable.getDescription(c.getGlyphIndex());
+            int n = i - c.getFirstIndex();
+            int x = gd.getXCoordinate(n);
+            int y = gd.getYCoordinate(n);
+            short y1 = (short) c.scaleY(x, y);
+            y1 += c.getYTranslate();
+            return y1;
+        }
+        return 0;
+    }
+
+    public boolean isComposite() {
+        return true;
+    }
+
+    public int getPointCount() {
+        GlyfCompositeComp c = _components.get(_components.size()-1);
+        GlyphDescription gd = _parentTable.getDescription(c.getGlyphIndex());
+        if (gd != null) {
+            return c.getFirstIndex() + gd.getPointCount();
+        } else {
+            return 0;
+        }
+    }
+
+    public int getContourCount() {
+        GlyfCompositeComp c = _components.get(_components.size()-1);
+        return c.getFirstContour() + _parentTable.getDescription(c.getGlyphIndex()).getContourCount();
+    }
+
+    public int getComponentIndex(int i) {
+        return _components.get(i).getFirstIndex();
+    }
+
+    public int getComponentCount() {
+        return _components.size();
+    }
+
+    public GlyfCompositeComp getComponent(int i) {
+        return _components.get(i);
+    }
+
+    protected GlyfCompositeComp getCompositeComp(int i) {
+        GlyfCompositeComp c;
+        for (int n = 0; n < _components.size(); n++) {
+            c = _components.get(n);
+            GlyphDescription gd = _parentTable.getDescription(c.getGlyphIndex());
+            if (c.getFirstIndex() <= i && i < (c.getFirstIndex() + gd.getPointCount())) {
+                return c;
+            }
+        }
+        return null;
+    }
+
+    protected GlyfCompositeComp getCompositeCompEndPt(int i) {
+        GlyfCompositeComp c;
+        for (int j = 0; j < _components.size(); j++) {
+            c = _components.get(j);
+            GlyphDescription gd = _parentTable.getDescription(c.getGlyphIndex());
+            if (c.getFirstContour() <= i && i < (c.getFirstContour() + gd.getContourCount())) {
+                return c;
+            }
+        }
+        return null;
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfDescript.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfDescript.java
new file mode 100644
index 0000000..3fc113f
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfDescript.java
@@ -0,0 +1,124 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, 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.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Batik" and  "Apache Software Foundation" must  not  be
+    used to  endorse or promote  products derived from  this software without
+    prior written permission. For written permission, please contact
+    apache at apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, 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.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+/**
+ * @version $Id: GlyfDescript.java,v 1.3 2007-01-24 09:47:48 davidsch Exp $
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ */
+public abstract class GlyfDescript extends Program implements GlyphDescription {
+
+    // flags
+    public static final byte onCurve = 0x01;
+    public static final byte xShortVector = 0x02;
+    public static final byte yShortVector = 0x04;
+    public static final byte repeat = 0x08;
+    public static final byte xDual = 0x10;
+    public static final byte yDual = 0x20;
+
+    protected GlyfTable _parentTable;
+    private int _glyphIndex;
+    private int _numberOfContours;
+    private short _xMin;
+    private short _yMin;
+    private short _xMax;
+    private short _yMax;
+
+    protected GlyfDescript(
+            GlyfTable parentTable,
+            int glyphIndex,
+            short numberOfContours,
+            DataInput di) throws IOException {
+        _parentTable = parentTable;
+        _numberOfContours = numberOfContours;
+        _xMin = di.readShort();
+        _yMin = di.readShort();
+        _xMax = di.readShort();
+        _yMax = di.readShort();
+    }
+
+    public int getNumberOfContours() {
+        return _numberOfContours;
+    }
+
+    public int getGlyphIndex() {
+        return _glyphIndex;
+    }
+
+    public short getXMaximum() {
+        return _xMax;
+    }
+
+    public short getXMinimum() {
+        return _xMin;
+    }
+
+    public short getYMaximum() {
+        return _yMax;
+    }
+
+    public short getYMinimum() {
+        return _yMin;
+    }
+    
+    public String toString() {
+        return new StringBuffer()
+            .append("          numberOfContours: ").append(_numberOfContours)
+            .append("\n          xMin:             ").append(_xMin)
+            .append("\n          yMin:             ").append(_yMin)
+            .append("\n          xMax:             ").append(_xMax)
+            .append("\n          yMax:             ").append(_yMax)
+            .toString();
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfSimpleDescript.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfSimpleDescript.java
new file mode 100644
index 0000000..c5c7671
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfSimpleDescript.java
@@ -0,0 +1,246 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, 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.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Batik" and  "Apache Software Foundation" must  not  be
+    used to  endorse or promote  products derived from  this software without
+    prior written permission. For written permission, please contact
+    apache at apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, 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.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+import jogamp.graph.font.typecast.ot.Disassembler;
+
+/**
+ * @version $Id: GlyfSimpleDescript.java,v 1.3 2007-01-24 09:47:47 davidsch Exp $
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ */
+public class GlyfSimpleDescript extends GlyfDescript {
+
+    private int[] _endPtsOfContours;
+    private byte[] _flags;
+    private short[] _xCoordinates;
+    private short[] _yCoordinates;
+    private int _count;
+
+    public GlyfSimpleDescript(
+            GlyfTable parentTable,
+            int glyphIndex,
+            short numberOfContours,
+            DataInput di) throws IOException {
+        super(parentTable, glyphIndex, numberOfContours, di);
+        
+        // Simple glyph description
+        _endPtsOfContours = new int[numberOfContours];
+        for (int i = 0; i < numberOfContours; i++) {
+            _endPtsOfContours[i] = di.readShort();
+        }
+
+        // The last end point index reveals the total number of points
+        _count = _endPtsOfContours[numberOfContours-1] + 1;
+        _flags = new byte[_count];
+        _xCoordinates = new short[_count];
+        _yCoordinates = new short[_count];
+
+        int instructionCount = di.readShort();
+        readInstructions(di, instructionCount);
+        readFlags(_count, di);
+        readCoords(_count, di);
+    }
+
+    public int getEndPtOfContours(int i) {
+        return _endPtsOfContours[i];
+    }
+
+    public byte getFlags(int i) {
+        return _flags[i];
+    }
+
+    public short getXCoordinate(int i) {
+        return _xCoordinates[i];
+    }
+
+    public short getYCoordinate(int i) {
+        return _yCoordinates[i];
+    }
+
+    public boolean isComposite() {
+        return false;
+    }
+
+    public int getPointCount() {
+        return _count;
+    }
+
+    public int getContourCount() {
+        return getNumberOfContours();
+    }
+    /*
+    public int getComponentIndex(int c) {
+    return 0;
+    }
+
+    public int getComponentCount() {
+    return 1;
+    }
+     */
+    /**
+     * The table is stored as relative values, but we'll store them as absolutes
+     */
+    private void readCoords(int count, DataInput di) throws IOException {
+        short x = 0;
+        short y = 0;
+        for (int i = 0; i < count; i++) {
+            if ((_flags[i] & xDual) != 0) {
+                if ((_flags[i] & xShortVector) != 0) {
+                    x += (short) di.readUnsignedByte();
+                }
+            } else {
+                if ((_flags[i] & xShortVector) != 0) {
+                    x += (short) -((short) di.readUnsignedByte());
+                } else {
+                    x += di.readShort();
+                }
+            }
+            _xCoordinates[i] = x;
+        }
+
+        for (int i = 0; i < count; i++) {
+            if ((_flags[i] & yDual) != 0) {
+                if ((_flags[i] & yShortVector) != 0) {
+                    y += (short) di.readUnsignedByte();
+                }
+            } else {
+                if ((_flags[i] & yShortVector) != 0) {
+                    y += (short) -((short) di.readUnsignedByte());
+                } else {
+                    y += di.readShort();
+                }
+            }
+            _yCoordinates[i] = y;
+        }
+    }
+
+    /**
+     * The flags are run-length encoded
+     */
+    private void readFlags(int flagCount, DataInput di) throws IOException {
+        try {
+            for (int index = 0; index < flagCount; index++) {
+                _flags[index] = di.readByte();
+                if ((_flags[index] & repeat) != 0) {
+                    int repeats = di.readByte();
+                    for (int i = 1; i <= repeats; i++) {
+                        _flags[index + i] = _flags[index];
+                    }
+                    index += repeats;
+                }
+            }
+        } catch (ArrayIndexOutOfBoundsException e) {
+            System.out.println("error: array index out of bounds");
+        }
+    }
+    
+    public String toString() {
+        StringBuffer sb = new StringBuffer();
+        sb.append(super.toString());
+        sb.append("\n\n        EndPoints\n        ---------");
+        for (int i = 0; i < _endPtsOfContours.length; i++) {
+            sb.append("\n          ").append(i).append(": ").append(_endPtsOfContours[i]);
+        }
+        sb.append("\n\n          Length of Instructions: ");
+        sb.append(getInstructions().length).append("\n");
+        sb.append(Disassembler.disassemble(getInstructions(), 8));
+        sb.append("\n        Flags\n        -----");
+        for (int i = 0; i < _flags.length; i++) {
+            sb.append("\n          ").append(i).append(":  ");
+            if ((_flags[i] & 0x20) != 0) {
+                sb.append("YDual ");
+            } else {
+                sb.append("      ");
+            }
+            if ((_flags[i] & 0x10) != 0) {
+                sb.append("XDual ");
+            } else {
+                sb.append("      ");
+            }
+            if ((_flags[i] & 0x08) != 0) {
+                sb.append("Repeat ");
+            } else {
+                sb.append("       ");
+            }
+            if ((_flags[i] & 0x04) != 0) {
+                sb.append("Y-Short ");
+            } else {
+                sb.append("        ");
+            }
+            if ((_flags[i] & 0x02) != 0) {
+                sb.append("X-Short ");
+            } else {
+                sb.append("        ");
+            }
+            if ((_flags[i] & 0x01) != 0) {
+                sb.append("On");
+            } else {
+                sb.append("  ");
+            }
+        }
+        sb.append("\n\n        Coordinates\n        -----------");
+        short oldX = 0;
+        short oldY = 0;
+        for (int i = 0; i < _xCoordinates.length; i++) {
+            sb.append("\n          ").append(i)
+                .append(": Rel (").append(_xCoordinates[i] - oldX)
+                .append(", ").append(_yCoordinates[i] - oldY)
+                .append(")  ->  Abs (").append(_xCoordinates[i])
+                .append(", ").append(_yCoordinates[i]).append(")");
+            oldX = _xCoordinates[i];
+            oldY = _yCoordinates[i];
+        }
+        return sb.toString();
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfTable.java
new file mode 100644
index 0000000..22fdd88
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfTable.java
@@ -0,0 +1,132 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, 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.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Batik" and  "Apache Software Foundation" must  not  be
+    used to  endorse or promote  products derived from  this software without
+    prior written permission. For written permission, please contact
+    apache at apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, 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.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.ByteArrayInputStream;
+import java.io.DataInput;
+import java.io.DataInputStream;
+import java.io.IOException;
+
+/**
+ * @version $Id: GlyfTable.java,v 1.6 2010-08-10 11:46:30 davidsch Exp $
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ */
+public class GlyfTable implements Table {
+
+    private DirectoryEntry _de;
+    private GlyfDescript[] _descript;
+
+    protected GlyfTable(
+            DirectoryEntry de,
+            DataInput di,
+            MaxpTable maxp,
+            LocaTable loca) throws IOException {
+        _de = (DirectoryEntry) de.clone();
+        _descript = new GlyfDescript[maxp.getNumGlyphs()];
+        
+        // Buffer the whole table so we can randomly access it
+        byte[] buf = new byte[de.getLength()];
+        di.readFully(buf);
+        ByteArrayInputStream bais = new ByteArrayInputStream(buf);
+        
+        // Process all the simple glyphs
+        for (int i = 0; i < maxp.getNumGlyphs(); i++) {
+            int len = loca.getOffset(i + 1) - loca.getOffset(i);
+            if (len > 0) {
+                bais.reset();
+                bais.skip(loca.getOffset(i));
+                DataInputStream dis = new DataInputStream(bais);
+                short numberOfContours = dis.readShort();
+                if (numberOfContours >= 0) {
+                    _descript[i] = new GlyfSimpleDescript(this, i, numberOfContours, dis);
+                }
+            } else {
+                _descript[i] = null;
+            }
+        }
+
+        // Now do all the composite glyphs
+        for (int i = 0; i < maxp.getNumGlyphs(); i++) {
+            int len = loca.getOffset(i + 1) - loca.getOffset(i);
+            if (len > 0) {
+                bais.reset();
+                bais.skip(loca.getOffset(i));
+                DataInputStream dis = new DataInputStream(bais);
+                short numberOfContours = dis.readShort();
+                if (numberOfContours < 0) {
+                    _descript[i] = new GlyfCompositeDescript(this, i, dis);
+                }
+            }
+        }
+    }
+
+    public GlyfDescript getDescription(int i) {
+        if (i < _descript.length) {
+            return _descript[i];
+        } else {
+            return null;
+        }
+    }
+
+    public int getType() {
+        return glyf;
+    }
+    
+    /**
+     * Get a directory entry for this table.  This uniquely identifies the
+     * table in collections where there may be more than one instance of a
+     * particular table.
+     * @return A directory entry
+     */
+    public DirectoryEntry getDirectoryEntry() {
+        return _de;
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyphDescription.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyphDescription.java
new file mode 100644
index 0000000..106e179
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyphDescription.java
@@ -0,0 +1,86 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, 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.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Batik" and  "Apache Software Foundation" must  not  be
+    used to  endorse or promote  products derived from  this software without
+    prior written permission. For written permission, please contact
+    apache at apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, 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.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package jogamp.graph.font.typecast.ot.table;
+
+/**
+ * Specifies access to glyph description classes, simple and composite.
+ * @version $Id: GlyphDescription.java,v 1.3 2007-01-24 09:47:45 davidsch Exp $
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ */
+public interface GlyphDescription {
+    
+    public int getGlyphIndex();
+    
+    public int getEndPtOfContours(int i);
+    
+    public byte getFlags(int i);
+    
+    public short getXCoordinate(int i);
+    
+    public short getYCoordinate(int i);
+    
+    public short getXMaximum();
+    
+    public short getXMinimum();
+    
+    public short getYMaximum();
+    
+    public short getYMinimum();
+    
+    public boolean isComposite();
+    
+    public int getPointCount();
+    
+    public int getContourCount();
+
+    //  public int getComponentIndex(int c);
+    //  public int getComponentCount();
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GposTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GposTable.java
new file mode 100644
index 0000000..91a6236
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GposTable.java
@@ -0,0 +1,66 @@
+/*
+ * $Id: GposTable.java,v 1.2 2007-01-24 09:47:47 davidsch Exp $
+ *
+ * Typecast - The Font Development Environment
+ *
+ * Copyright (c) 2004 David Schweinsberg
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+/**
+ * TODO: To be implemented
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ * @version $Id: GposTable.java,v 1.2 2007-01-24 09:47:47 davidsch Exp $
+ */
+public class GposTable implements Table {
+
+    private DirectoryEntry _de;
+
+    protected GposTable(DirectoryEntry de, DataInput di) throws IOException {
+        _de = (DirectoryEntry) de.clone();
+
+        // GPOS Header
+        int version = di.readInt();
+        int scriptList = di.readInt();
+        int featureList = di.readInt();
+        int lookupList = di.readInt();
+    }
+
+    /** Get the table type, as a table directory value.
+     * @return The table type
+     */
+    public int getType() {
+        return GPOS;
+    }
+    
+    public String toString() {
+        return "GPOS";
+    }
+
+    /**
+     * Get a directory entry for this table.  This uniquely identifies the
+     * table in collections where there may be more than one instance of a
+     * particular table.
+     * @return A directory entry
+     */
+    public DirectoryEntry getDirectoryEntry() {
+        return _de;
+    }
+    
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GsubTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GsubTable.java
new file mode 100644
index 0000000..c002de3
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GsubTable.java
@@ -0,0 +1,181 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, 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.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Batik" and  "Apache Software Foundation" must  not  be
+    used to  endorse or promote  products derived from  this software without
+    prior written permission. For written permission, please contact
+    apache at apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, 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.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.ByteArrayInputStream;
+import java.io.DataInput;
+import java.io.DataInputStream;
+import java.io.IOException;
+
+/**
+ *
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ * @version $Id: GsubTable.java,v 1.3 2007-01-24 09:47:46 davidsch Exp $
+ */
+public class GsubTable implements Table, LookupSubtableFactory {
+
+    private DirectoryEntry _de;
+    private ScriptList _scriptList;
+    private FeatureList _featureList;
+    private LookupList _lookupList;
+    
+    protected GsubTable(DirectoryEntry de, DataInput di) throws IOException {
+        _de = (DirectoryEntry) de.clone();
+        
+        // Load into a temporary buffer, and create another input stream
+        byte[] buf = new byte[de.getLength()];
+        di.readFully(buf);
+        DataInputStream dis = new DataInputStream(new ByteArrayInputStream(buf));
+
+        // GSUB Header
+        int version = dis.readInt();
+        int scriptListOffset = dis.readUnsignedShort();
+        int featureListOffset = dis.readUnsignedShort();
+        int lookupListOffset = dis.readUnsignedShort();
+
+        // Script List
+        _scriptList = new ScriptList(dis, scriptListOffset);
+
+        // Feature List
+        _featureList = new FeatureList(dis, featureListOffset);
+        
+        // Lookup List
+        _lookupList = new LookupList(dis, lookupListOffset, this);
+    }
+
+    /**
+     * 1 - Single - Replace one glyph with one glyph 
+     * 2 - Multiple - Replace one glyph with more than one glyph 
+     * 3 - Alternate - Replace one glyph with one of many glyphs 
+     * 4 - Ligature - Replace multiple glyphs with one glyph 
+     * 5 - Context - Replace one or more glyphs in context 
+     * 6 - Chaining - Context Replace one or more glyphs in chained context
+     */
+    public LookupSubtable read(
+            int type,
+            DataInputStream dis,
+            int offset) throws IOException {
+        LookupSubtable s = null;
+        switch (type) {
+        case 1:
+            s = SingleSubst.read(dis, offset);
+            break;
+        case 2:
+//            s = MultipleSubst.read(dis, offset);
+            break;
+        case 3:
+//            s = AlternateSubst.read(dis, offset);
+            break;
+        case 4:
+            s = LigatureSubst.read(dis, offset);
+            break;
+        case 5:
+//            s = ContextSubst.read(dis, offset);
+            break;
+        case 6:
+//            s = ChainingSubst.read(dis, offset);
+            break;
+        }
+        return s;
+    }
+
+    /** Get the table type, as a table directory value.
+     * @return The table type
+     */
+    public int getType() {
+        return GSUB;
+    }
+
+    public ScriptList getScriptList() {
+        return _scriptList;
+    }
+
+    public FeatureList getFeatureList() {
+        return _featureList;
+    }
+
+    public LookupList getLookupList() {
+        return _lookupList;
+    }
+
+    public String toString() {
+        return "GSUB";
+    }
+
+    public static String lookupTypeAsString(int type) {
+        switch (type) {
+        case 1:
+            return "Single";
+        case 2:
+            return "Multiple";
+        case 3:
+            return "Alternate";
+        case 4:
+            return "Ligature";
+        case 5:
+            return "Context";
+        case 6:
+            return "Chaining";
+        }
+        return "Unknown";
+    }
+    
+    /**
+     * Get a directory entry for this table.  This uniquely identifies the
+     * table in collections where there may be more than one instance of a
+     * particular table.
+     * @return A directory entry
+     */
+    public DirectoryEntry getDirectoryEntry() {
+        return _de;
+    }
+    
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HdmxTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HdmxTable.java
new file mode 100644
index 0000000..64ac9d6
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HdmxTable.java
@@ -0,0 +1,130 @@
+/*
+ * $Id: HdmxTable.java,v 1.2 2007-07-26 11:12:30 davidsch Exp $
+ *
+ * Typecast - The Font Development Environment
+ *
+ * Copyright (c) 2004-2007 David Schweinsberg
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+/**
+ * The Horizontal Device Metrics table for TrueType outlines.  This stores
+ * integer advance widths scaled to specific pixel sizes.
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ * @version $Id: HdmxTable.java,v 1.2 2007-07-26 11:12:30 davidsch Exp $
+ */
+public class HdmxTable implements Table {
+    
+    public class DeviceRecord {
+        
+        private short _pixelSize;
+        private short _maxWidth;
+        private short[] _widths;
+
+        protected DeviceRecord(int numGlyphs, DataInput di) throws IOException {
+            _pixelSize = di.readByte();
+            _maxWidth = di.readByte();
+            _widths = new short[numGlyphs];
+            for (int i = 0; i < numGlyphs; ++i) {
+                _widths[i] = di.readByte();
+            }
+        }
+
+        public short getPixelSize() {
+            return _pixelSize;
+        }
+        
+        public short getMaxWidth() {
+            return _maxWidth;
+        }
+        
+        public short[] getWidths() {
+            return _widths;
+        }
+
+        public short getWidth(int glyphidx) {
+            return _widths[glyphidx];
+        }
+        
+    }
+    
+    private DirectoryEntry _de;
+    private int _version;
+    private short _numRecords;
+    private int _sizeDeviceRecords;
+    private DeviceRecord[] _records;
+
+    /** Creates a new instance of HdmxTable */
+    protected HdmxTable(DirectoryEntry de, DataInput di, MaxpTable maxp)
+    throws IOException {
+        _de = (DirectoryEntry) de.clone();
+        _version = di.readUnsignedShort();
+        _numRecords = di.readShort();
+        _sizeDeviceRecords = di.readInt();
+        _records = new DeviceRecord[_numRecords];
+        
+        // Read the device records
+        for (int i = 0; i < _numRecords; ++i) {
+            _records[i] = new DeviceRecord(maxp.getNumGlyphs(), di);
+        }
+    }
+
+    public int getNumberOfRecords() {
+        return _numRecords;
+    }
+    
+    public DeviceRecord getRecord(int i) {
+        return _records[i];
+    }
+    
+    public int getType() {
+        return hdmx;
+    }
+    
+    public String toString() {
+        StringBuffer sb = new StringBuffer();
+        sb.append("'hdmx' Table - Horizontal Device Metrics\n----------------------------------------\n");
+        sb.append("Size = ").append(_de.getLength()).append(" bytes\n")
+            .append("\t'hdmx' version:         ").append(_version).append("\n")
+            .append("\t# device records:       ").append(_numRecords).append("\n")
+            .append("\tRecord length:          ").append(_sizeDeviceRecords).append("\n");
+        for (int i = 0; i < _numRecords; ++i) {
+            sb.append("\tDevRec ").append(i)
+                .append(": ppem = ").append(_records[i].getPixelSize())
+                .append(", maxWid = ").append(_records[i].getMaxWidth())
+                .append("\n");
+            for (int j = 0; j < _records[i].getWidths().length; ++j) {
+                sb.append("    ").append(j).append(".   ")
+                    .append(_records[i].getWidths()[j]).append("\n");
+            }
+            sb.append("\n\n");
+        }
+        return sb.toString();
+    }
+
+    /**
+     * Get a directory entry for this table.  This uniquely identifies the
+     * table in collections where there may be more than one instance of a
+     * particular table.
+     * @return A directory entry
+     */
+    public DirectoryEntry getDirectoryEntry() {
+        return _de;
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HeadTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HeadTable.java
new file mode 100644
index 0000000..122a50f
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HeadTable.java
@@ -0,0 +1,206 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, 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.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Batik" and  "Apache Software Foundation" must  not  be
+    used to  endorse or promote  products derived from  this software without
+    prior written permission. For written permission, please contact
+    apache at apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, 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.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+import jogamp.graph.font.typecast.ot.Fixed;
+
+
+/**
+ * @version $Id: HeadTable.java,v 1.2 2004-12-21 10:23:20 davidsch Exp $
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ */
+public class HeadTable implements Table {
+
+    private DirectoryEntry _de;
+    private int _versionNumber;
+    private int _fontRevision;
+    private int _checkSumAdjustment;
+    private int _magicNumber;
+    private short _flags;
+    private short _unitsPerEm;
+    private long _created;
+    private long _modified;
+    private short _xMin;
+    private short _yMin;
+    private short _xMax;
+    private short _yMax;
+    private short _macStyle;
+    private short _lowestRecPPEM;
+    private short _fontDirectionHint;
+    private short _indexToLocFormat;
+    private short _glyphDataFormat;
+
+    protected HeadTable(DirectoryEntry de, DataInput di) throws IOException {
+        this._de = (DirectoryEntry) de.clone();
+        _versionNumber = di.readInt();
+        _fontRevision = di.readInt();
+        _checkSumAdjustment = di.readInt();
+        _magicNumber = di.readInt();
+        _flags = di.readShort();
+        _unitsPerEm = di.readShort();
+        _created = di.readLong();
+        _modified = di.readLong();
+        _xMin = di.readShort();
+        _yMin = di.readShort();
+        _xMax = di.readShort();
+        _yMax = di.readShort();
+        _macStyle = di.readShort();
+        _lowestRecPPEM = di.readShort();
+        _fontDirectionHint = di.readShort();
+        _indexToLocFormat = di.readShort();
+        _glyphDataFormat = di.readShort();
+    }
+
+    public int getCheckSumAdjustment() {
+        return _checkSumAdjustment;
+    }
+
+    public long getCreated() {
+        return _created;
+    }
+
+    public short getFlags() {
+        return _flags;
+    }
+
+    public short getFontDirectionHint() {
+        return _fontDirectionHint;
+    }
+
+    public int getFontRevision(){
+        return _fontRevision;
+    }
+
+    public short getGlyphDataFormat() {
+        return _glyphDataFormat;
+    }
+
+    public short getIndexToLocFormat() {
+        return _indexToLocFormat;
+    }
+
+    public short getLowestRecPPEM() {
+        return _lowestRecPPEM;
+    }
+
+    public short getMacStyle() {
+        return _macStyle;
+    }
+
+    public long getModified() {
+        return _modified;
+    }
+
+    public int getType() {
+        return head;
+    }
+
+    public short getUnitsPerEm() {
+        return _unitsPerEm;
+    }
+
+    public int getVersionNumber() {
+        return _versionNumber;
+    }
+
+    public short getXMax() {
+        return _xMax;
+    }
+
+    public short getXMin() {
+        return _xMin;
+    }
+
+    public short getYMax() {
+        return _yMax;
+    }
+
+    public short getYMin() {
+        return _yMin;
+    }
+
+    public String toString() {
+        return new StringBuffer()
+            .append("'head' Table - Font Header\n--------------------------")
+            .append("\n  'head' version:      ").append(Fixed.floatValue(_versionNumber))
+            .append("\n  fontRevision:        ").append(Fixed.roundedFloatValue(_fontRevision, 8))
+            .append("\n  checkSumAdjustment:  0x").append(Integer.toHexString(_checkSumAdjustment).toUpperCase())
+            .append("\n  magicNumber:         0x").append(Integer.toHexString(_magicNumber).toUpperCase())
+            .append("\n  flags:               0x").append(Integer.toHexString(_flags).toUpperCase())
+            .append("\n  unitsPerEm:          ").append(_unitsPerEm)
+            .append("\n  created:             ").append(_created)
+            .append("\n  modified:            ").append(_modified)
+            .append("\n  xMin:                ").append(_xMin)
+            .append("\n  yMin:                ").append(_yMin)
+            .append("\n  xMax:                ").append(_xMax)
+            .append("\n  yMax:                ").append(_yMax)
+            .append("\n  macStyle bits:       ").append(Integer.toHexString(_macStyle).toUpperCase())
+            .append("\n  lowestRecPPEM:       ").append(_lowestRecPPEM)
+            .append("\n  fontDirectionHint:   ").append(_fontDirectionHint)
+            .append("\n  indexToLocFormat:    ").append(_indexToLocFormat)
+            .append("\n  glyphDataFormat:     ").append(_glyphDataFormat)
+            .toString();
+    }
+    
+    /**
+     * Get a directory entry for this table.  This uniquely identifies the
+     * table in collections where there may be more than one instance of a
+     * particular table.
+     * @return A directory entry
+     */
+    public DirectoryEntry getDirectoryEntry() {
+        return _de;
+    }
+    
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HheaTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HheaTable.java
new file mode 100644
index 0000000..6cafab4
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HheaTable.java
@@ -0,0 +1,136 @@
+/*****************************************************************************
+ * Copyright (C) The Apache Software Foundation. All rights reserved.        *
+ * ------------------------------------------------------------------------- * 
+ * This software is published under the terms of the Apache Software License * 
+ * version 1.1, a copy of which has been included with this distribution in  * 
+ * the LICENSE file.                                                         * 
+ *****************************************************************************/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+import jogamp.graph.font.typecast.ot.Fixed;
+
+/**
+ * @version $Id: HheaTable.java,v 1.2 2010-08-10 11:44:02 davidsch Exp $
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ */
+public class HheaTable implements Table {
+
+    private DirectoryEntry de;
+    private int version;
+    private short ascender;
+    private short descender;
+    private short lineGap;
+    private short advanceWidthMax;
+    private short minLeftSideBearing;
+    private short minRightSideBearing;
+    private short xMaxExtent;
+    private short caretSlopeRise;
+    private short caretSlopeRun;
+    private short metricDataFormat;
+    private int numberOfHMetrics;
+
+    protected HheaTable(DirectoryEntry de, DataInput di) throws IOException {
+        this.de = (DirectoryEntry) de.clone();
+        version = di.readInt();
+        ascender = di.readShort();
+        descender = di.readShort();
+        lineGap = di.readShort();
+        advanceWidthMax = di.readShort();
+        minLeftSideBearing = di.readShort();
+        minRightSideBearing = di.readShort();
+        xMaxExtent = di.readShort();
+        caretSlopeRise = di.readShort();
+        caretSlopeRun = di.readShort();
+        for (int i = 0; i < 5; i++) {
+            di.readShort();
+        }
+        metricDataFormat = di.readShort();
+        numberOfHMetrics = di.readUnsignedShort();
+    }
+
+    public short getAdvanceWidthMax() {
+        return advanceWidthMax;
+    }
+
+    public short getAscender() {
+        return ascender;
+    }
+
+    public short getCaretSlopeRise() {
+        return caretSlopeRise;
+    }
+
+    public short getCaretSlopeRun() {
+        return caretSlopeRun;
+    }
+
+    public short getDescender() {
+        return descender;
+    }
+
+    public short getLineGap() {
+        return lineGap;
+    }
+
+    public short getMetricDataFormat() {
+        return metricDataFormat;
+    }
+
+    public short getMinLeftSideBearing() {
+        return minLeftSideBearing;
+    }
+
+    public short getMinRightSideBearing() {
+        return minRightSideBearing;
+    }
+
+    public int getNumberOfHMetrics() {
+        return numberOfHMetrics;
+    }
+
+    public int getType() {
+        return hhea;
+    }
+
+    public short getXMaxExtent() {
+        return xMaxExtent;
+    }
+
+    public String toString() {
+        return new StringBuffer()
+            .append("'hhea' Table - Horizontal Header\n--------------------------------")
+            .append("\n        'hhea' version:       ").append(Fixed.floatValue(version))
+            .append("\n        yAscender:            ").append(ascender)
+            .append("\n        yDescender:           ").append(descender)
+            .append("\n        yLineGap:             ").append(lineGap)
+            .append("\n        advanceWidthMax:      ").append(advanceWidthMax)
+            .append("\n        minLeftSideBearing:   ").append(minLeftSideBearing)
+            .append("\n        minRightSideBearing:  ").append(minRightSideBearing)
+            .append("\n        xMaxExtent:           ").append(xMaxExtent)
+            .append("\n        horizCaretSlopeNum:   ").append(caretSlopeRise)
+            .append("\n        horizCaretSlopeDenom: ").append(caretSlopeRun)
+            .append("\n        reserved0:            0")
+            .append("\n        reserved1:            0")
+            .append("\n        reserved2:            0")
+            .append("\n        reserved3:            0")
+            .append("\n        reserved4:            0")
+            .append("\n        metricDataFormat:     ").append(metricDataFormat)
+            .append("\n        numOf_LongHorMetrics: ").append(numberOfHMetrics)
+            .toString();
+    }
+    
+    /**
+     * Get a directory entry for this table.  This uniquely identifies the
+     * table in collections where there may be more than one instance of a
+     * particular table.
+     * @return A directory entry
+     */
+    public DirectoryEntry getDirectoryEntry() {
+        return de;
+    }
+    
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HmtxTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HmtxTable.java
new file mode 100644
index 0000000..c2e892e
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HmtxTable.java
@@ -0,0 +1,141 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, 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.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Batik" and  "Apache Software Foundation" must  not  be
+    used to  endorse or promote  products derived from  this software without
+    prior written permission. For written permission, please contact
+    apache at apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, 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.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+/**
+ * @version $Id: HmtxTable.java,v 1.5 2007-07-26 11:11:48 davidsch Exp $
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ */
+public class HmtxTable implements Table {
+
+    private DirectoryEntry _de;
+    private int[] _hMetrics = null;
+    private short[] _leftSideBearing = null;
+
+    protected HmtxTable(
+            DirectoryEntry de,
+            DataInput di,
+            HheaTable hhea,
+            MaxpTable maxp) throws IOException {
+        _de = (DirectoryEntry) de.clone();
+        _hMetrics = new int[hhea.getNumberOfHMetrics()];
+        for (int i = 0; i < hhea.getNumberOfHMetrics(); ++i) {
+            _hMetrics[i] =
+                    di.readUnsignedByte()<<24
+                    | di.readUnsignedByte()<<16
+                    | di.readUnsignedByte()<<8
+                    | di.readUnsignedByte();
+        }
+        int lsbCount = maxp.getNumGlyphs() - hhea.getNumberOfHMetrics();
+        _leftSideBearing = new short[lsbCount];
+        for (int i = 0; i < lsbCount; ++i) {
+            _leftSideBearing[i] = di.readShort();
+        }
+    }
+
+    public int getAdvanceWidth(int i) {
+        if (_hMetrics == null) {
+            return 0;
+        }
+        if (i < _hMetrics.length) {
+            return _hMetrics[i] >> 16;
+        } else {
+            return _hMetrics[_hMetrics.length - 1] >> 16;
+        }
+    }
+
+    public short getLeftSideBearing(int i) {
+        if (_hMetrics == null) {
+            return 0;
+        }
+        if (i < _hMetrics.length) {
+            return (short)(_hMetrics[i] & 0xffff);
+        } else {
+            return _leftSideBearing[i - _hMetrics.length];
+        }
+    }
+
+    public int getType() {
+        return hmtx;
+    }
+
+    public String toString() {
+        StringBuffer sb = new StringBuffer();
+        sb.append("'hmtx' Table - Horizontal Metrics\n---------------------------------\n");
+        sb.append("Size = ").append(_de.getLength()).append(" bytes, ")
+            .append(_hMetrics.length).append(" entries\n");
+        for (int i = 0; i < _hMetrics.length; i++) {
+            sb.append("        ").append(i)
+                .append(". advWid: ").append(getAdvanceWidth(i))
+                .append(", LSdBear: ").append(getLeftSideBearing(i))
+                .append("\n");
+        }
+        for (int i = 0; i < _leftSideBearing.length; i++) {
+            sb.append("        LSdBear ").append(i + _hMetrics.length)
+                .append(": ").append(_leftSideBearing[i])
+                .append("\n");
+        }
+        return sb.toString();
+    }
+
+    /**
+     * Get a directory entry for this table.  This uniquely identifies the
+     * table in collections where there may be more than one instance of a
+     * particular table.
+     * @return A directory entry
+     */
+    public DirectoryEntry getDirectoryEntry() {
+        return _de;
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/ID.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/ID.java
new file mode 100644
index 0000000..9fd66e7
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/ID.java
@@ -0,0 +1,399 @@
+/*
+ * $Id: ID.java,v 1.1.1.1 2004-12-05 23:14:47 davidsch Exp $
+ *
+ * Typecast - The Font Development Environment
+ *
+ * Copyright (c) 2004 David Schweinsberg
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package jogamp.graph.font.typecast.ot.table;
+
+/**
+ *
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ * @version $Id: ID.java,v 1.1.1.1 2004-12-05 23:14:47 davidsch Exp $
+ */
+public abstract class ID {
+
+    // Platform IDs
+    public static final short platformUnicode = 0;
+    public static final short platformMacintosh = 1;
+    public static final short platformISO = 2;
+    public static final short platformMicrosoft = 3;
+
+    // Unicode Encoding IDs
+    public static final short encodingUnicode10Semantics = 0;
+    public static final short encodingUnicode11Semantics = 1;
+    public static final short encodingISO10646Semantics = 2;
+    public static final short encodingUnicode20Semantics = 3;
+    
+    // Microsoft Encoding IDs
+//    public static final short encodingUndefined = 0;
+//    public static final short encodingUGL = 1;
+    public static final short encodingSymbol = 0;
+    public static final short encodingUnicode = 1;
+    public static final short encodingShiftJIS = 2;
+    public static final short encodingPRC = 3;
+    public static final short encodingBig5 = 4;
+    public static final short encodingWansung = 5;
+    public static final short encodingJohab = 6;
+    public static final short encodingUCS4 = 10;
+
+    // Macintosh Encoding IDs
+    public static final short encodingRoman = 0;
+    public static final short encodingJapanese = 1;
+    public static final short encodingChinese = 2;
+    public static final short encodingKorean = 3;
+    public static final short encodingArabic = 4;
+    public static final short encodingHebrew = 5;
+    public static final short encodingGreek = 6;
+    public static final short encodingRussian = 7;
+    public static final short encodingRSymbol = 8;
+    public static final short encodingDevanagari = 9;
+    public static final short encodingGurmukhi = 10;
+    public static final short encodingGujarati = 11;
+    public static final short encodingOriya = 12;
+    public static final short encodingBengali = 13;
+    public static final short encodingTamil = 14;
+    public static final short encodingTelugu = 15;
+    public static final short encodingKannada = 16;
+    public static final short encodingMalayalam = 17;
+    public static final short encodingSinhalese = 18;
+    public static final short encodingBurmese = 19;
+    public static final short encodingKhmer = 20;
+    public static final short encodingThai = 21;
+    public static final short encodingLaotian = 22;
+    public static final short encodingGeorgian = 23;
+    public static final short encodingArmenian = 24;
+    public static final short encodingMaldivian = 25;
+    public static final short encodingTibetan = 26;
+    public static final short encodingMongolian = 27;
+    public static final short encodingGeez = 28;
+    public static final short encodingSlavic = 29;
+    public static final short encodingVietnamese = 30;
+    public static final short encodingSindhi = 31;
+    public static final short encodingUninterp = 32;
+
+    // ISO Encoding IDs
+    public static final short encodingASCII = 0;
+    public static final short encodingISO10646 = 1;
+    public static final short encodingISO8859_1 = 2;
+
+    // Microsoft Language IDs
+    public static final short languageSQI = 0x041c;
+    public static final short languageEUQ = 0x042d;
+    public static final short languageBEL = 0x0423;
+    public static final short languageBGR = 0x0402;
+    public static final short languageCAT = 0x0403;
+    public static final short languageSHL = 0x041a;
+    public static final short languageCSY = 0x0405;
+    public static final short languageDAN = 0x0406;
+    public static final short languageNLD = 0x0413;
+    public static final short languageNLB = 0x0813;
+    public static final short languageENU = 0x0409;
+    public static final short languageENG = 0x0809;
+    public static final short languageENA = 0x0c09;
+    public static final short languageENC = 0x1009;
+    public static final short languageENZ = 0x1409;
+    public static final short languageENI = 0x1809;
+    public static final short languageETI = 0x0425;
+    public static final short languageFIN = 0x040b;
+    public static final short languageFRA = 0x040c;
+    public static final short languageFRB = 0x080c;
+    public static final short languageFRC = 0x0c0c;
+    public static final short languageFRS = 0x100c;
+    public static final short languageFRL = 0x140c;
+    public static final short languageDEU = 0x0407;
+    public static final short languageDES = 0x0807;
+    public static final short languageDEA = 0x0c07;
+    public static final short languageDEL = 0x1007;
+    public static final short languageDEC = 0x1407;
+    public static final short languageELL = 0x0408;
+    public static final short languageHUN = 0x040e;
+    public static final short languageISL = 0x040f;
+    public static final short languageITA = 0x0410;
+    public static final short languageITS = 0x0810;
+    public static final short languageLVI = 0x0426;
+    public static final short languageLTH = 0x0427;
+    public static final short languageNOR = 0x0414;
+    public static final short languageNON = 0x0814;
+    public static final short languagePLK = 0x0415;
+    public static final short languagePTB = 0x0416;
+    public static final short languagePTG = 0x0816;
+    public static final short languageROM = 0x0418;
+    public static final short languageRUS = 0x0419;
+    public static final short languageSKY = 0x041b;
+    public static final short languageSLV = 0x0424;
+    public static final short languageESP = 0x040a;
+    public static final short languageESM = 0x080a;
+    public static final short languageESN = 0x0c0a;
+    public static final short languageSVE = 0x041d;
+    public static final short languageTRK = 0x041f;
+    public static final short languageUKR = 0x0422;
+
+    // Macintosh Language IDs
+    public static final short languageEnglish = 0;
+    public static final short languageFrench = 1;
+    public static final short languageGerman = 2;
+    public static final short languageItalian = 3;
+    public static final short languageDutch = 4;
+    public static final short languageSwedish = 5;
+    public static final short languageSpanish = 6;
+    public static final short languageDanish = 7;
+    public static final short languagePortuguese = 8;
+    public static final short languageNorwegian = 9;
+    public static final short languageHebrew = 10;
+    public static final short languageJapanese = 11;
+    public static final short languageArabic = 12;
+    public static final short languageFinnish = 13;
+    public static final short languageGreek = 14;
+    public static final short languageIcelandic = 15;
+    public static final short languageMaltese = 16;
+    public static final short languageTurkish = 17;
+    public static final short languageYugoslavian = 18;
+    public static final short languageChinese = 19;
+    public static final short languageUrdu = 20;
+    public static final short languageHindi = 21;
+    public static final short languageThai = 22;
+
+    // Name IDs
+    public static final short nameCopyrightNotice = 0;
+    public static final short nameFontFamilyName = 1;
+    public static final short nameFontSubfamilyName = 2;
+    public static final short nameUniqueFontIdentifier = 3;
+    public static final short nameFullFontName = 4;
+    public static final short nameVersionString = 5;
+    public static final short namePostscriptName = 6;
+    public static final short nameTrademark = 7;
+    public static final short nameManufacturerName = 8;
+    public static final short nameDesigner = 9;
+    public static final short nameDescription = 10;
+    public static final short nameURLVendor = 11;
+    public static final short nameURLDesigner = 12;
+    public static final short nameLicenseDescription = 13;
+    public static final short nameLicenseInfoURL = 14;
+    public static final short namePreferredFamily = 16;
+    public static final short namePreferredSubfamily = 17;
+    public static final short nameCompatibleFull = 18;
+    public static final short nameSampleText = 19;
+    public static final short namePostScriptCIDFindfontName = 20;
+
+    public static String getPlatformName(short platformId) {
+        switch (platformId) {
+            case platformUnicode:   return "Unicode";
+            case platformMacintosh: return "Macintosh";
+            case platformISO:       return "ISO";
+            case platformMicrosoft: return "Microsoft";
+            default:                return "Custom";
+        }
+    }
+
+    public static String getEncodingName(short platformId, short encodingId) {
+
+        if (platformId == platformUnicode) {
+            
+            // Unicode specific encodings
+            switch (encodingId) {
+                case encodingUnicode10Semantics: return "Unicode 1.0 semantics";
+                case encodingUnicode11Semantics: return "Unicode 1.1 semantics";
+                case encodingISO10646Semantics:  return "ISO 10646:1993 semantics";
+                case encodingUnicode20Semantics: return "Unicode 2.0 and onwards semantics";
+                default:                         return "";
+            }
+
+        } else if (platformId == platformMacintosh) {
+
+            // Macintosh specific encodings
+            switch (encodingId) {
+                case encodingRoman:      return "Roman";
+                case encodingJapanese:   return "Japanese";
+                case encodingChinese:    return "Chinese";
+                case encodingKorean:     return "Korean";
+                case encodingArabic:     return "Arabi";
+                case encodingHebrew:     return "Hebrew";
+                case encodingGreek:      return "Greek";
+                case encodingRussian:    return "Russian";
+                case encodingRSymbol:    return "RSymbol";
+                case encodingDevanagari: return "Devanagari";
+                case encodingGurmukhi:   return "Gurmukhi";
+                case encodingGujarati:   return "Gujarati";
+                case encodingOriya:      return "Oriya";
+                case encodingBengali:    return "Bengali";
+                case encodingTamil:      return "Tamil";
+                case encodingTelugu:     return "Telugu";
+                case encodingKannada:    return "Kannada";
+                case encodingMalayalam:  return "Malayalam";
+                case encodingSinhalese:  return "Sinhalese";
+                case encodingBurmese:    return "Burmese";
+                case encodingKhmer:      return "Khmer";
+                case encodingThai:       return "Thai";
+                case encodingLaotian:    return "Laotian";
+                case encodingGeorgian:   return "Georgian";
+                case encodingArmenian:   return "Armenian";
+                case encodingMaldivian:  return "Maldivian";
+                case encodingTibetan:    return "Tibetan";
+                case encodingMongolian:  return "Mongolian";
+                case encodingGeez:       return "Geez";
+                case encodingSlavic:     return "Slavic";
+                case encodingVietnamese: return "Vietnamese";
+                case encodingSindhi:     return "Sindhi";
+                case encodingUninterp:   return "Uninterpreted";
+                default:                 return "";
+            }
+
+        } else if (platformId == platformISO) {
+
+            // ISO specific encodings
+            switch (encodingId) {
+                case encodingASCII:     return "7-bit ASCII";
+                case encodingISO10646:  return "ISO 10646";
+                case encodingISO8859_1: return "ISO 8859-1";
+                default:                return "";
+            }
+
+        } else if (platformId == platformMicrosoft) {
+
+            // Windows specific encodings
+            switch (encodingId) {
+                case encodingSymbol:   return "Symbol";
+                case encodingUnicode:  return "Unicode";
+                case encodingShiftJIS: return "ShiftJIS";
+                case encodingPRC:      return "PRC";
+                case encodingBig5:     return "Big5";
+                case encodingWansung:  return "Wansung";
+                case encodingJohab:    return "Johab";
+                case 7:                return "Reserved";
+                case 8:                return "Reserved";
+                case 9:                return "Reserved";
+                case encodingUCS4:     return "UCS-4";
+                default:               return "";
+            }
+        }
+        return "";
+    }
+
+    public static String getLanguageName(short platformId, short languageId) {
+
+        if (platformId == platformMacintosh) {
+            switch (languageId) {
+                case languageEnglish: return "English";
+                case languageFrench: return "French";
+                case languageGerman:  return "German";
+                case languageItalian: return "Italian";
+                case languageDutch: return "Dutch";
+                case languageSwedish: return "Swedish";
+                case languageSpanish: return "Spanish";
+                case languageDanish: return "Danish";
+                case languagePortuguese: return "Portuguese";
+                case languageNorwegian: return "Norwegian";
+                case languageHebrew: return "Hebrew";
+                case languageJapanese: return "Japanese";
+                case languageArabic: return "Arabic";
+                case languageFinnish: return "Finnish";
+                case languageGreek: return "Greek";
+                case languageIcelandic: return "Icelandic";
+                case languageMaltese: return "Maltese";
+                case languageTurkish: return "Turkish";
+                case languageYugoslavian: return "Yugoslavian";
+                case languageChinese: return "Chinese";
+                case languageUrdu: return "Urdu";
+                case languageHindi: return "Hindi";
+                case languageThai: return "Thai";
+                default: return "";
+            }
+        } else if (platformId == platformMicrosoft) {
+            switch (languageId) {
+                case languageSQI: return "Albanian (Albania)";
+                case languageEUQ: return "Basque (Basque)";
+                case languageBEL: return "Byelorussian (Byelorussia)";
+                case languageBGR: return "Bulgarian (Bulgaria)";
+                case languageCAT: return "Catalan (Catalan)";
+                case languageSHL: return "Croatian (Croatian)";
+                case languageCSY: return "Czech (Czech)";
+                case languageDAN: return "Danish (Danish)";
+                case languageNLD: return "Dutch (Dutch (Standard))";
+                case languageNLB: return "Dutch (Belgian (Flemish))";
+                case languageENU: return "English (American)";
+                case languageENG: return "English (British)";
+                case languageENA: return "English (Australian)";
+                case languageENC: return "English (Canadian)";
+                case languageENZ: return "English (New Zealand)";
+                case languageENI: return "English (Ireland)";
+                case languageETI: return "Estonian (Estonia)";
+                case languageFIN: return "Finnish (Finnish)";
+                case languageFRA: return "French (French (Standard))";
+                case languageFRB: return "French (Belgian)";
+                case languageFRC: return "French (Canadian)";
+                case languageFRS: return "French (Swiss)";
+                case languageFRL: return "French (Luxembourg)";
+                case languageDEU: return "German (German (Standard))";
+                case languageDES: return "German (Swiss)";
+                case languageDEA: return "German (Austrian)";
+                case languageDEL: return "German (Luxembourg)";
+                case languageDEC: return "German (Liechtenstein)";
+                case languageELL: return "Greek (Greek)";
+                case languageHUN: return "Hungarian (Hungarian)";
+                case languageISL: return "Icelandic (Icelandic)";
+                case languageITA: return "Italian (Italian (Standard))";
+                case languageITS: return "Italian (Swiss)";
+                case languageLVI: return "Latvian (Latvia)";
+                case languageLTH: return "Lithuanian (Lithuania)";
+                case languageNOR: return "Norwegian (Norwegian (Bokmal))";
+                case languageNON: return "Norwegian (Norwegian (Nynorsk))";
+                case languagePLK: return "Polish (Polish)";
+                case languagePTB: return "Portuguese (Portuguese (Brazilian))";
+                case languagePTG: return "Portuguese (Portuguese (Standard))";
+                case languageROM: return "Romanian (Romania)";
+                case languageRUS: return "Russian (Russian)";
+                case languageSKY: return "Slovak (Slovak)";
+                case languageSLV: return "Slovenian (Slovenia)";
+                case languageESP: return "Spanish (Spanish (Traditional Sort))";
+                case languageESM: return "Spanish (Mexican)";
+                case languageESN: return "Spanish (Spanish (Modern Sort))";
+                case languageSVE: return "Swedish (Swedish)";
+                case languageTRK: return "Turkish (Turkish)";
+                case languageUKR: return "Ukrainian (Ukraine)";
+                default: return "";
+            }
+        }
+        return "";
+    }
+
+    public static String getNameName(short nameId) {
+        switch (nameId) {
+            case nameCopyrightNotice: return "Copyright notice";
+            case nameFontFamilyName: return "Font Family name";
+            case nameFontSubfamilyName: return "Font Subfamily name";
+            case nameUniqueFontIdentifier: return "Unique font identifier";
+            case nameFullFontName: return "Full font name";
+            case nameVersionString: return "Version string";
+            case namePostscriptName: return "Postscript name";
+            case nameTrademark: return "Trademark";
+            case nameManufacturerName: return "Manufacturer Name";
+            case nameDesigner: return "Designer";
+            case nameDescription: return "Description";
+            case nameURLVendor: return "URL Vendor";
+            case nameURLDesigner: return "URL Designer";
+            case nameLicenseDescription: return "License Description";
+            case nameLicenseInfoURL: return "License Info URL";
+            case namePreferredFamily: return "Preferred Family";
+            case namePreferredSubfamily: return "Preferred Subfamily";
+            case nameCompatibleFull: return "Compatible Full";
+            case nameSampleText: return "Sample text";
+            case namePostScriptCIDFindfontName: return "PostScript CID findfont name";
+            default: return "";
+        }
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/KernSubtable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/KernSubtable.java
new file mode 100644
index 0000000..7a4cccb
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/KernSubtable.java
@@ -0,0 +1,49 @@
+/*****************************************************************************
+ * Copyright (C) The Apache Software Foundation. All rights reserved.        *
+ * ------------------------------------------------------------------------- * 
+ * This software is published under the terms of the Apache Software License * 
+ * version 1.1, a copy of which has been included with this distribution in  * 
+ * the LICENSE file.                                                         * 
+ *****************************************************************************/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+/**
+ *
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ * @version $Id: KernSubtable.java,v 1.1.1.1 2004-12-05 23:14:47 davidsch Exp $
+ */
+public abstract class KernSubtable {
+
+    /** Creates new KernSubtable */
+    protected KernSubtable() {
+    }
+    
+    public abstract int getKerningPairCount();
+
+    public abstract KerningPair getKerningPair(int i);
+
+    public static KernSubtable read(DataInput di) throws IOException {
+        KernSubtable table = null;
+        int version = di.readUnsignedShort();
+        int length = di.readUnsignedShort();
+        int coverage = di.readUnsignedShort();
+        int format = coverage >> 8;
+        
+        switch (format) {
+        case 0:
+            table = new KernSubtableFormat0(di);
+            break;
+        case 2:
+            table = new KernSubtableFormat2(di);
+            break;
+        default:
+            break;
+        }
+        return table;
+    }
+
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/KernSubtableFormat0.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/KernSubtableFormat0.java
new file mode 100644
index 0000000..b55bef6
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/KernSubtableFormat0.java
@@ -0,0 +1,47 @@
+/*****************************************************************************
+ * Copyright (C) The Apache Software Foundation. All rights reserved.        *
+ * ------------------------------------------------------------------------- * 
+ * This software is published under the terms of the Apache Software License * 
+ * version 1.1, a copy of which has been included with this distribution in  * 
+ * the LICENSE file.                                                         * 
+ *****************************************************************************/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+/**
+ *
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ * @version $Id: KernSubtableFormat0.java,v 1.1.1.1 2004-12-05 23:14:48 davidsch Exp $
+ */
+public class KernSubtableFormat0 extends KernSubtable {
+    
+    private int nPairs;
+    private int searchRange;
+    private int entrySelector;
+    private int rangeShift;
+    private KerningPair[] kerningPairs;
+
+    /** Creates new KernSubtableFormat0 */
+    protected KernSubtableFormat0(DataInput di) throws IOException {
+        nPairs = di.readUnsignedShort();
+        searchRange = di.readUnsignedShort();
+        entrySelector = di.readUnsignedShort();
+        rangeShift = di.readUnsignedShort();
+        kerningPairs = new KerningPair[nPairs];
+        for (int i = 0; i < nPairs; i++) {
+            kerningPairs[i] = new KerningPair(di);
+        }
+    }
+
+    public int getKerningPairCount() {
+        return nPairs;
+    }
+
+    public KerningPair getKerningPair(int i) {
+        return kerningPairs[i];
+    }
+
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/KernSubtableFormat2.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/KernSubtableFormat2.java
new file mode 100644
index 0000000..60d584c
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/KernSubtableFormat2.java
@@ -0,0 +1,42 @@
+/*****************************************************************************
+ * Copyright (C) The Apache Software Foundation. All rights reserved.        *
+ * ------------------------------------------------------------------------- * 
+ * This software is published under the terms of the Apache Software License * 
+ * version 1.1, a copy of which has been included with this distribution in  * 
+ * the LICENSE file.                                                         * 
+ *****************************************************************************/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+/**
+ *
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ * @version $Id: KernSubtableFormat2.java,v 1.1.1.1 2004-12-05 23:14:48 davidsch Exp $
+ */
+public class KernSubtableFormat2 extends KernSubtable {
+
+    private int rowWidth;
+    private int leftClassTable;
+    private int rightClassTable;
+    private int array;
+
+    /** Creates new KernSubtableFormat2 */
+    protected KernSubtableFormat2(DataInput di) throws IOException {
+        rowWidth = di.readUnsignedShort();
+        leftClassTable = di.readUnsignedShort();
+        rightClassTable = di.readUnsignedShort();
+        array = di.readUnsignedShort();
+    }
+
+    public int getKerningPairCount() {
+        return 0;
+    }
+
+    public KerningPair getKerningPair(int i) {
+        return null;
+    }
+
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/KernTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/KernTable.java
new file mode 100644
index 0000000..70aee70
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/KernTable.java
@@ -0,0 +1,62 @@
+/*****************************************************************************
+ * Copyright (C) The Apache Software Foundation. All rights reserved.        *
+ * ------------------------------------------------------------------------- * 
+ * This software is published under the terms of the Apache Software License * 
+ * version 1.1, a copy of which has been included with this distribution in  * 
+ * the LICENSE file.                                                         * 
+ *****************************************************************************/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+/**
+ *
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ * @version $Id: KernTable.java,v 1.1.1.1 2004-12-05 23:14:48 davidsch Exp $
+ */
+public class KernTable implements Table {
+    
+    private DirectoryEntry de;
+    private int version;
+    private int nTables;
+    private KernSubtable[] tables;
+
+    /** Creates new KernTable */
+    protected KernTable(DirectoryEntry de, DataInput di) throws IOException {
+        this.de = (DirectoryEntry) de.clone();
+        version = di.readUnsignedShort();
+        nTables = di.readUnsignedShort();
+        tables = new KernSubtable[nTables];
+        for (int i = 0; i < nTables; i++) {
+            tables[i] = KernSubtable.read(di);
+        }
+    }
+
+    public int getSubtableCount() {
+        return nTables;
+    }
+    
+    public KernSubtable getSubtable(int i) {
+        return tables[i];
+    }
+
+    /** Get the table type, as a table directory value.
+     * @return The table type
+     */
+    public int getType() {
+        return kern;
+    }
+
+    /**
+     * Get a directory entry for this table.  This uniquely identifies the
+     * table in collections where there may be more than one instance of a
+     * particular table.
+     * @return A directory entry
+     */
+    public DirectoryEntry getDirectoryEntry() {
+        return de;
+    }
+    
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/KerningPair.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/KerningPair.java
new file mode 100644
index 0000000..ce7cebc
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/KerningPair.java
@@ -0,0 +1,44 @@
+/*****************************************************************************
+ * Copyright (C) The Apache Software Foundation. All rights reserved.        *
+ * ------------------------------------------------------------------------- * 
+ * This software is published under the terms of the Apache Software License * 
+ * version 1.1, a copy of which has been included with this distribution in  * 
+ * the LICENSE file.                                                         * 
+ *****************************************************************************/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+/**
+ *
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ * @version $Id: KerningPair.java,v 1.1.1.1 2004-12-05 23:14:47 davidsch Exp $
+ */
+public class KerningPair {
+
+    private int left;
+    private int right;
+    private short value;
+
+    /** Creates new KerningPair */
+    protected KerningPair(DataInput di) throws IOException {
+        left = di.readUnsignedShort();
+        right = di.readUnsignedShort();
+        value = di.readShort();
+    }
+
+    public int getLeft() {
+        return left;
+    }
+
+    public int getRight() {
+        return right;
+    }
+
+    public short getValue() {
+        return value;
+    }
+
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LangSys.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LangSys.java
new file mode 100644
index 0000000..6759208
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LangSys.java
@@ -0,0 +1,105 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, 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.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Batik" and  "Apache Software Foundation" must  not  be
+    used to  endorse or promote  products derived from  this software without
+    prior written permission. For written permission, please contact
+    apache at apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, 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.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+/**
+ *
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ * @version $Id: LangSys.java,v 1.2 2007-01-24 09:47:47 davidsch Exp $
+ */
+public class LangSys {
+
+    private int _lookupOrder;
+    private int _reqFeatureIndex;
+    private int _featureCount;
+    private int[] _featureIndex;
+    
+    /** Creates new LangSys */
+    protected LangSys(DataInput di) throws IOException {
+        _lookupOrder = di.readUnsignedShort();
+        _reqFeatureIndex = di.readUnsignedShort();
+        _featureCount = di.readUnsignedShort();
+        _featureIndex = new int[_featureCount];
+        for (int i = 0; i < _featureCount; i++) {
+            _featureIndex[i] = di.readUnsignedShort();
+        }
+    }
+    
+    public int getLookupOrder() {
+        return _lookupOrder;
+    }
+    
+    public int getReqFeatureIndex() {
+        return _reqFeatureIndex;
+    }
+    
+    public int getFeatureCount() {
+        return _featureCount;
+    }
+    
+    public int getFeatureIndex(int i) {
+        return _featureIndex[i];
+    }
+
+    protected boolean isFeatureIndexed(int n) {
+        for (int i = 0; i < _featureCount; i++) {
+            if (_featureIndex[i] == n) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+}
+
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LangSysRecord.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LangSysRecord.java
new file mode 100644
index 0000000..5777bd6
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LangSysRecord.java
@@ -0,0 +1,88 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, 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.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Batik" and  "Apache Software Foundation" must  not  be
+    used to  endorse or promote  products derived from  this software without
+    prior written permission. For written permission, please contact
+    apache at apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, 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.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+/**
+ *
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ * @version $Id: LangSysRecord.java,v 1.2 2007-01-24 09:47:48 davidsch Exp $
+ */
+public class LangSysRecord {
+
+    private int _tag;
+    private int _offset;
+    
+    /** Creates new LangSysRecord */
+    public LangSysRecord(DataInput di) throws IOException {
+        _tag = di.readInt();
+        _offset = di.readUnsignedShort();
+    }
+
+    public int getTag() {
+        return _tag;
+    }
+
+    public int getOffset() {
+        return _offset;
+    }
+
+    public String getTagAsString() {
+        return new StringBuffer()
+            .append((char)((_tag>>24)&0xff))
+            .append((char)((_tag>>16)&0xff))
+            .append((char)((_tag>>8)&0xff))
+            .append((char)((_tag)&0xff))
+            .toString();
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Ligature.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Ligature.java
new file mode 100644
index 0000000..d3e2ad5
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Ligature.java
@@ -0,0 +1,85 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, 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.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Batik" and  "Apache Software Foundation" must  not  be
+    used to  endorse or promote  products derived from  this software without
+    prior written permission. For written permission, please contact
+    apache at apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, 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.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+/**
+ *
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ * @version $Id: Ligature.java,v 1.2 2007-01-24 09:47:48 davidsch Exp $
+ */
+public class Ligature {
+
+    private int _ligGlyph;
+    private int _compCount;
+    private int[] _components;
+
+    /** Creates new Ligature */
+    public Ligature(DataInput di) throws IOException {
+        _ligGlyph = di.readUnsignedShort();
+        _compCount = di.readUnsignedShort();
+        _components = new int[_compCount - 1];
+        for (int i = 0; i < _compCount - 1; i++) {
+            _components[i] = di.readUnsignedShort();
+        }
+    }
+    
+    public int getGlyphCount() {
+        return _compCount;
+    }
+    
+    public int getGlyphId(int i) {
+        return (i == 0) ? _ligGlyph : _components[i-1];
+    }
+
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LigatureSet.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LigatureSet.java
new file mode 100644
index 0000000..e261f3a
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LigatureSet.java
@@ -0,0 +1,85 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, 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.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Batik" and  "Apache Software Foundation" must  not  be
+    used to  endorse or promote  products derived from  this software without
+    prior written permission. For written permission, please contact
+    apache at apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, 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.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInputStream;
+import java.io.IOException;
+
+/**
+ *
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ * @version $Id: LigatureSet.java,v 1.2 2007-01-24 09:47:46 davidsch Exp $
+ */
+public class LigatureSet {
+
+    private int _ligatureCount;
+    private int[] _ligatureOffsets;
+    private Ligature[] _ligatures;
+
+    /** Creates new LigatureSet */
+    public LigatureSet(DataInputStream dis, int offset) throws IOException {
+        dis.reset();
+        dis.skipBytes(offset);
+        _ligatureCount = dis.readUnsignedShort();
+        _ligatureOffsets = new int[_ligatureCount];
+        _ligatures = new Ligature[_ligatureCount];
+        for (int i = 0; i < _ligatureCount; i++) {
+            _ligatureOffsets[i] = dis.readUnsignedShort();
+        }
+        for (int i = 0; i < _ligatureCount; i++) {
+            dis.reset();
+            dis.skipBytes(offset + _ligatureOffsets[i]);
+            _ligatures[i] = new Ligature(dis);
+        }
+    }
+
+}
+
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LigatureSubst.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LigatureSubst.java
new file mode 100644
index 0000000..c0570cd
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LigatureSubst.java
@@ -0,0 +1,73 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, 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.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Batik" and  "Apache Software Foundation" must  not  be
+    used to  endorse or promote  products derived from  this software without
+    prior written permission. For written permission, please contact
+    apache at apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, 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.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInputStream;
+import java.io.IOException;
+
+/**
+ *
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ * @version $Id: LigatureSubst.java,v 1.2 2007-01-24 09:47:48 davidsch Exp $
+ */
+public abstract class LigatureSubst extends LookupSubtable {
+
+    public static LigatureSubst read(DataInputStream dis, int offset) throws IOException {
+        dis.reset();
+        dis.skipBytes(offset);
+        int format = dis.readUnsignedShort();
+        if (format == 1) {
+            return new LigatureSubstFormat1(dis, offset);
+        }
+        return null;
+    }
+
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LigatureSubstFormat1.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LigatureSubstFormat1.java
new file mode 100644
index 0000000..a0f4266
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LigatureSubstFormat1.java
@@ -0,0 +1,95 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, 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.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Batik" and  "Apache Software Foundation" must  not  be
+    used to  endorse or promote  products derived from  this software without
+    prior written permission. For written permission, please contact
+    apache at apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, 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.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInputStream;
+import java.io.IOException;
+
+/**
+ *
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ * @version $Id: LigatureSubstFormat1.java,v 1.2 2007-01-24 09:47:47 davidsch Exp $
+ */
+public class LigatureSubstFormat1 extends LigatureSubst {
+
+    private int _coverageOffset;
+    private int _ligSetCount;
+    private int[] _ligatureSetOffsets;
+    private Coverage _coverage;
+    private LigatureSet[] _ligatureSets;
+
+    /** Creates new LigatureSubstFormat1 */
+    protected LigatureSubstFormat1(
+            DataInputStream dis,
+            int offset) throws IOException {
+        _coverageOffset = dis.readUnsignedShort();
+        _ligSetCount = dis.readUnsignedShort();
+        _ligatureSetOffsets = new int[_ligSetCount];
+        _ligatureSets = new LigatureSet[_ligSetCount];
+        for (int i = 0; i < _ligSetCount; i++) {
+            _ligatureSetOffsets[i] = dis.readUnsignedShort();
+        }
+        dis.reset();
+        dis.skipBytes(offset + _coverageOffset);
+        _coverage = Coverage.read(dis);
+        for (int i = 0; i < _ligSetCount; i++) {
+            _ligatureSets[i] = new LigatureSet(dis, offset + _ligatureSetOffsets[i]);
+        }
+    }
+
+    public int getFormat() {
+        return 1;
+    }
+
+    public String getTypeAsString() {
+        return "LigatureSubstFormat1";
+    }    
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LocaTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LocaTable.java
new file mode 100644
index 0000000..8187708
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LocaTable.java
@@ -0,0 +1,77 @@
+/*****************************************************************************
+ * Copyright (C) The Apache Software Foundation. All rights reserved.        *
+ * ------------------------------------------------------------------------- * 
+ * This software is published under the terms of the Apache Software License * 
+ * version 1.1, a copy of which has been included with this distribution in  * 
+ * the LICENSE file.                                                         * 
+ *****************************************************************************/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+/**
+ * @version $Id: LocaTable.java,v 1.4 2010-08-10 11:45:43 davidsch Exp $
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ */
+public class LocaTable implements Table {
+
+    private DirectoryEntry _de;
+    private int[] _offsets = null;
+    private short _factor = 0;
+
+    protected LocaTable(
+            DirectoryEntry de,
+            DataInput di,
+            HeadTable head,
+            MaxpTable maxp) throws IOException {
+        _de = (DirectoryEntry) de.clone();
+        _offsets = new int[maxp.getNumGlyphs() + 1];
+        boolean shortEntries = head.getIndexToLocFormat() == 0;
+        if (shortEntries) {
+            _factor = 2;
+            for (int i = 0; i <= maxp.getNumGlyphs(); i++) {
+                _offsets[i] = di.readUnsignedShort();
+            }
+        } else {
+            _factor = 1;
+            for (int i = 0; i <= maxp.getNumGlyphs(); i++) {
+                _offsets[i] = di.readInt();
+            }
+        }
+    }
+
+    public int getOffset(int i) {
+        if (_offsets == null) {
+            return 0;
+        }
+        return _offsets[i] * _factor;
+    }
+
+    public int getType() {
+        return loca;
+    }
+
+    public String toString() {
+        StringBuffer sb = new StringBuffer();
+        sb.append("'loca' Table - Index To Location Table\n--------------------------------------\n")
+            .append("Size = ").append(_de.getLength()).append(" bytes, ")
+            .append(_offsets.length).append(" entries\n");
+        for (int i = 0; i < _offsets.length; i++) {
+            sb.append("        Idx ").append(i)
+                .append(" -> glyfOff 0x").append(getOffset(i)).append("\n");
+        }
+        return sb.toString();
+    }
+    
+    /**
+     * Get a directory entry for this table.  This uniquely identifies the
+     * table in collections where there may be more than one instance of a
+     * particular table.
+     * @return A directory entry
+     */
+    public DirectoryEntry getDirectoryEntry() {
+        return _de;
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Lookup.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Lookup.java
new file mode 100644
index 0000000..2899c24
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Lookup.java
@@ -0,0 +1,110 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, 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.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Batik" and  "Apache Software Foundation" must  not  be
+    used to  endorse or promote  products derived from  this software without
+    prior written permission. For written permission, please contact
+    apache at apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, 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.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInputStream;
+import java.io.IOException;
+
+/**
+ *
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ * @version $Id: Lookup.java,v 1.2 2007-01-24 09:47:47 davidsch Exp $
+ */
+public class Lookup {
+
+    // LookupFlag bit enumeration
+    public static final int IGNORE_BASE_GLYPHS = 0x0002;
+    public static final int IGNORE_BASE_LIGATURES = 0x0004;
+    public static final int IGNORE_BASE_MARKS = 0x0008;
+    public static final int MARK_ATTACHMENT_TYPE = 0xFF00;
+
+    private int _type;
+    private int _flag;
+    private int _subTableCount;
+    private int[] _subTableOffsets;
+    private LookupSubtable[] _subTables;
+
+    /** Creates new Lookup */
+    public Lookup(LookupSubtableFactory factory, DataInputStream dis, int offset)
+    throws IOException {
+
+        // Ensure we're in the right place
+        dis.reset();
+        dis.skipBytes(offset);
+        
+        // Start reading
+        _type = dis.readUnsignedShort();
+        _flag = dis.readUnsignedShort();
+        _subTableCount = dis.readUnsignedShort();
+        _subTableOffsets = new int[_subTableCount];
+        _subTables = new LookupSubtable[_subTableCount];
+        for (int i = 0; i < _subTableCount; i++) {
+            _subTableOffsets[i] = dis.readUnsignedShort();
+        }
+        for (int i = 0; i < _subTableCount; i++) {
+            _subTables[i] = factory.read(_type, dis, offset + _subTableOffsets[i]);
+        }
+    }
+
+    public int getType() {
+        return _type;
+    }
+
+    public int getSubtableCount() {
+        return _subTableCount;
+    }
+
+    public LookupSubtable getSubtable(int i) {
+        return _subTables[i];
+    }
+
+}
+
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LookupList.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LookupList.java
new file mode 100644
index 0000000..a3b71b6
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LookupList.java
@@ -0,0 +1,108 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, 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.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Batik" and  "Apache Software Foundation" must  not  be
+    used to  endorse or promote  products derived from  this software without
+    prior written permission. For written permission, please contact
+    apache at apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, 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.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInputStream;
+import java.io.IOException;
+
+/**
+ *
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ * @version $Id: LookupList.java,v 1.2 2007-01-24 09:47:47 davidsch Exp $
+ */
+public class LookupList {
+
+    private int _lookupCount;
+    private int[] _lookupOffsets;
+    private Lookup[] _lookups;
+
+    /** Creates new LookupList */
+    public LookupList(DataInputStream dis, int offset, LookupSubtableFactory factory)
+    throws IOException {
+        
+        // Ensure we're in the right place
+        dis.reset();
+        dis.skipBytes(offset);
+        
+        // Start reading
+        _lookupCount = dis.readUnsignedShort();
+        _lookupOffsets = new int[_lookupCount];
+        _lookups = new Lookup[_lookupCount];
+        for (int i = 0; i < _lookupCount; i++) {
+            _lookupOffsets[i] = dis.readUnsignedShort();
+        }
+        for (int i = 0; i < _lookupCount; i++) {
+            _lookups[i] = new Lookup(factory, dis, offset + _lookupOffsets[i]);
+        }
+    }
+
+    public int getLookupCount() {
+        return _lookupCount;
+    }
+    
+    public int getLookupOffset(int i) {
+        return _lookupOffsets[i];
+    }
+    
+    public Lookup getLookup(int i) {
+        return _lookups[i];
+    }
+
+    public Lookup getLookup(Feature feature, int index) {
+        if (feature.getLookupCount() > index) {
+            int i = feature.getLookupListIndex(index);
+            return _lookups[i];
+        }
+        return null;
+    }
+
+}
+
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LookupSubtable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LookupSubtable.java
new file mode 100644
index 0000000..1d19038
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LookupSubtable.java
@@ -0,0 +1,60 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, 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.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Batik" and  "Apache Software Foundation" must  not  be
+    used to  endorse or promote  products derived from  this software without
+    prior written permission. For written permission, please contact
+    apache at apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, 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.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package jogamp.graph.font.typecast.ot.table;
+
+/**
+ *
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ * @version $Id: LookupSubtable.java,v 1.2 2007-01-24 09:47:45 davidsch Exp $
+ */
+public abstract class LookupSubtable {
+    public abstract String getTypeAsString();
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LookupSubtableFactory.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LookupSubtableFactory.java
new file mode 100644
index 0000000..cb4d28d
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LookupSubtableFactory.java
@@ -0,0 +1,64 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, 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.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Batik" and  "Apache Software Foundation" must  not  be
+    used to  endorse or promote  products derived from  this software without
+    prior written permission. For written permission, please contact
+    apache at apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, 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.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+ 
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInputStream;
+import java.io.IOException;
+
+/** 
+ *
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ * @version $Id: LookupSubtableFactory.java,v 1.2 2007-01-24 09:47:46 davidsch Exp $
+ */
+public interface LookupSubtableFactory {
+    public LookupSubtable read(int type, DataInputStream dis, int offset)
+    throws IOException;
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LtshTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LtshTable.java
new file mode 100644
index 0000000..2cba7ba
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LtshTable.java
@@ -0,0 +1,68 @@
+/*****************************************************************************
+ * Copyright (C) The Apache Software Foundation. All rights reserved.        *
+ * ------------------------------------------------------------------------- * 
+ * This software is published under the terms of the Apache Software License * 
+ * version 1.1, a copy of which has been included with this distribution in  * 
+ * the LICENSE file.                                                         * 
+ *****************************************************************************/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+/**
+ *
+ * @version $Id: LtshTable.java,v 1.1.1.1 2004-12-05 23:14:51 davidsch Exp $
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ */
+public class LtshTable implements Table {
+
+    private DirectoryEntry de;
+    private int version;
+    private int numGlyphs;
+    private int[] yPels;
+    
+    /** Creates new LtshTable */
+    protected LtshTable(DirectoryEntry de, DataInput di) throws IOException {
+        this.de = (DirectoryEntry) de.clone();
+        version = di.readUnsignedShort();
+        numGlyphs = di.readUnsignedShort();
+        yPels = new int[numGlyphs];
+        for (int i = 0; i < numGlyphs; i++) {
+            yPels[i] = di.readUnsignedByte();
+        }
+    }
+
+    /**
+     * Get the table type, as a table directory value.
+     * @return The table type
+     */
+    public int getType() {
+        return LTSH;
+    }
+    
+    public String toString() {
+        StringBuffer sb = new StringBuffer();
+        sb.append("'LTSH' Table - Linear Threshold Table\n-------------------------------------")
+            .append("\n 'LTSH' Version:       ").append(version)
+            .append("\n Number of Glyphs:     ").append(numGlyphs)
+            .append("\n\n   Glyph #   Threshold\n   -------   ---------\n");
+        for (int i = 0; i < numGlyphs; i++) {
+            sb.append("   ").append(i).append(".        ").append(yPels[i])
+                .append("\n");
+        }
+        return sb.toString();
+    }
+    
+    /**
+     * Get a directory entry for this table.  This uniquely identifies the
+     * table in collections where there may be more than one instance of a
+     * particular table.
+     * @return A directory entry
+     */
+    public DirectoryEntry getDirectoryEntry() {
+        return de;
+    }
+    
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/MaxpTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/MaxpTable.java
new file mode 100644
index 0000000..16b9f82
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/MaxpTable.java
@@ -0,0 +1,163 @@
+/*****************************************************************************
+ * Copyright (C) The Apache Software Foundation. All rights reserved.        *
+ * ------------------------------------------------------------------------- * 
+ * This software is published under the terms of the Apache Software License * 
+ * version 1.1, a copy of which has been included with this distribution in  * 
+ * the LICENSE file.                                                         * 
+ *****************************************************************************/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+import jogamp.graph.font.typecast.ot.Fixed;
+
+/**
+ * @version $Id: MaxpTable.java,v 1.1.1.1 2004-12-05 23:14:52 davidsch Exp $
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ */
+public class MaxpTable implements Table {
+
+    private DirectoryEntry de;
+    private int versionNumber;
+    private int numGlyphs;
+    private int maxPoints;
+    private int maxContours;
+    private int maxCompositePoints;
+    private int maxCompositeContours;
+    private int maxZones;
+    private int maxTwilightPoints;
+    private int maxStorage;
+    private int maxFunctionDefs;
+    private int maxInstructionDefs;
+    private int maxStackElements;
+    private int maxSizeOfInstructions;
+    private int maxComponentElements;
+    private int maxComponentDepth;
+
+    protected MaxpTable(DirectoryEntry de, DataInput di) throws IOException {
+        this.de = (DirectoryEntry) de.clone();
+        versionNumber = di.readInt();
+        
+        // CFF fonts use version 0.5, TrueType fonts use version 1.0
+        if (versionNumber == 0x00005000) {
+            numGlyphs = di.readUnsignedShort();
+        } else if (versionNumber == 0x00010000) {
+            numGlyphs = di.readUnsignedShort();
+            maxPoints = di.readUnsignedShort();
+            maxContours = di.readUnsignedShort();
+            maxCompositePoints = di.readUnsignedShort();
+            maxCompositeContours = di.readUnsignedShort();
+            maxZones = di.readUnsignedShort();
+            maxTwilightPoints = di.readUnsignedShort();
+            maxStorage = di.readUnsignedShort();
+            maxFunctionDefs = di.readUnsignedShort();
+            maxInstructionDefs = di.readUnsignedShort();
+            maxStackElements = di.readUnsignedShort();
+            maxSizeOfInstructions = di.readUnsignedShort();
+            maxComponentElements = di.readUnsignedShort();
+            maxComponentDepth = di.readUnsignedShort();
+        }
+    }
+
+    public int getVersionNumber() {
+        return versionNumber;
+    }
+
+    public int getMaxComponentDepth() {
+        return maxComponentDepth;
+    }
+
+    public int getMaxComponentElements() {
+        return maxComponentElements;
+    }
+
+    public int getMaxCompositeContours() {
+        return maxCompositeContours;
+    }
+
+    public int getMaxCompositePoints() {
+        return maxCompositePoints;
+    }
+
+    public int getMaxContours() {
+        return maxContours;
+    }
+
+    public int getMaxFunctionDefs() {
+        return maxFunctionDefs;
+    }
+
+    public int getMaxInstructionDefs() {
+        return maxInstructionDefs;
+    }
+
+    public int getMaxPoints() {
+        return maxPoints;
+    }
+
+    public int getMaxSizeOfInstructions() {
+        return maxSizeOfInstructions;
+    }
+
+    public int getMaxStackElements() {
+        return maxStackElements;
+    }
+
+    public int getMaxStorage() {
+        return maxStorage;
+    }
+
+    public int getMaxTwilightPoints() {
+        return maxTwilightPoints;
+    }
+
+    public int getMaxZones() {
+        return maxZones;
+    }
+
+    public int getNumGlyphs() {
+        return numGlyphs;
+    }
+
+    public int getType() {
+        return maxp;
+    }
+
+    public String toString() {
+        StringBuffer sb = new StringBuffer();
+        sb.append("'maxp' Table - Maximum Profile\n------------------------------")
+            .append("\n        'maxp' version:         ").append(Fixed.floatValue(versionNumber))
+            .append("\n        numGlyphs:              ").append(numGlyphs);
+        if (versionNumber == 0x00010000) {
+            sb.append("\n        maxPoints:              ").append(maxPoints)
+                .append("\n        maxContours:            ").append(maxContours)
+                .append("\n        maxCompositePoints:     ").append(maxCompositePoints)
+                .append("\n        maxCompositeContours:   ").append(maxCompositeContours)
+                .append("\n        maxZones:               ").append(maxZones)
+                .append("\n        maxTwilightPoints:      ").append(maxTwilightPoints)
+                .append("\n        maxStorage:             ").append(maxStorage)
+                .append("\n        maxFunctionDefs:        ").append(maxFunctionDefs)
+                .append("\n        maxInstructionDefs:     ").append(maxInstructionDefs)
+                .append("\n        maxStackElements:       ").append(maxStackElements)
+                .append("\n        maxSizeOfInstructions:  ").append(maxSizeOfInstructions)
+                .append("\n        maxComponentElements:   ").append(maxComponentElements)
+                .append("\n        maxComponentDepth:      ").append(maxComponentDepth);
+        } else {
+            sb.append("\n");
+        }
+        return sb.toString();
+    }
+    
+    /**
+     * Get a directory entry for this table.  This uniquely identifies the
+     * table in collections where there may be more than one instance of a
+     * particular table.
+     * @return A directory entry
+     */
+    public DirectoryEntry getDirectoryEntry() {
+        return de;
+    }
+    
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/NameRecord.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/NameRecord.java
new file mode 100644
index 0000000..cd13e9b
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/NameRecord.java
@@ -0,0 +1,146 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, 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.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Batik" and  "Apache Software Foundation" must  not  be
+    used to  endorse or promote  products derived from  this software without
+    prior written permission. For written permission, please contact
+    apache at apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, 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.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+/**
+ * @version $Id: NameRecord.java,v 1.2 2004-12-09 23:47:23 davidsch Exp $
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ */
+public class NameRecord {
+
+    private short _platformId;
+    private short _encodingId;
+    private short _languageId;
+    private short _nameId;
+    private short _stringLength;
+    private short _stringOffset;
+    private String _record;
+
+    protected NameRecord(DataInput di) throws IOException {
+        _platformId = di.readShort();
+        _encodingId = di.readShort();
+        _languageId = di.readShort();
+        _nameId = di.readShort();
+        _stringLength = di.readShort();
+        _stringOffset = di.readShort();
+    }
+    
+    public short getEncodingId() {
+        return _encodingId;
+    }
+    
+    public short getLanguageId() {
+        return _languageId;
+    }
+    
+    public short getNameId() {
+        return _nameId;
+    }
+    
+    public short getPlatformId() {
+        return _platformId;
+    }
+
+    public StringBuilder getRecordString(StringBuilder sb) {
+        sb.append(_record);
+        return sb;
+    }
+
+    protected void loadString(DataInput di) throws IOException {
+        StringBuffer sb = new StringBuffer();
+        di.skipBytes(_stringOffset);
+        if (_platformId == ID.platformUnicode) {
+            
+            // Unicode (big-endian)
+            for (int i = 0; i < _stringLength/2; i++) {
+                sb.append(di.readChar());
+            }
+        } else if (_platformId == ID.platformMacintosh) {
+
+            // Macintosh encoding, ASCII
+            for (int i = 0; i < _stringLength; i++) {
+                sb.append((char) di.readByte());
+            }
+        } else if (_platformId == ID.platformISO) {
+            
+            // ISO encoding, ASCII
+            for (int i = 0; i < _stringLength; i++) {
+                sb.append((char) di.readByte());
+            }
+        } else if (_platformId == ID.platformMicrosoft) {
+            
+            // Microsoft encoding, Unicode
+            char c;
+            for (int i = 0; i < _stringLength/2; i++) {
+                c = di.readChar();
+                sb.append(c);
+            }
+        }
+        _record = sb.toString();
+    }
+
+    public String toString() {
+        StringBuffer sb = new StringBuffer();
+        
+        sb.append("             Platform ID:       ").append(_platformId)
+            .append("\n             Specific ID:       ").append(_encodingId)
+            .append("\n             Language ID:       ").append(_languageId)
+            .append("\n             Name ID:           ").append(_nameId)
+            .append("\n             Length:            ").append(_stringLength)
+            .append("\n             Offset:            ").append(_stringOffset)
+            .append("\n\n").append(_record);
+        
+        return sb.toString();
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/NameTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/NameTable.java
new file mode 100644
index 0000000..6daf2ad
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/NameTable.java
@@ -0,0 +1,147 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, 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.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Batik" and  "Apache Software Foundation" must  not  be
+    used to  endorse or promote  products derived from  this software without
+    prior written permission. For written permission, please contact
+    apache at apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, 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.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInput;
+import java.io.DataInputStream;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+
+/**
+ * The naming table allows multilingual strings to be associated with the
+ * OpenType font file.  These strings can represent copyright notices, font
+ * names, family names, style names, and so on.
+ * @version $Id: NameTable.java,v 1.2 2004-12-09 23:47:23 davidsch Exp $
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ */
+public class NameTable implements Table {
+    private DirectoryEntry _de;
+    private short _formatSelector;
+    private short _numberOfNameRecords;
+    private short _stringStorageOffset;
+    private NameRecord[] _records;
+    
+    protected NameTable(DirectoryEntry de, DataInput di) throws IOException {
+        _de = (DirectoryEntry) de.clone();
+        _formatSelector = di.readShort();
+        _numberOfNameRecords = di.readShort();
+        _stringStorageOffset = di.readShort();
+        _records = new NameRecord[_numberOfNameRecords];
+        
+        // Load the records, which contain the encoding information and string
+        // offsets
+        for (int i = 0; i < _numberOfNameRecords; i++) {
+            _records[i] = new NameRecord(di);
+        }
+        
+        // Load the string data into a buffer so the records can copy out the
+        // bits they are interested in
+        byte[] buffer = new byte[_de.getLength() - _stringStorageOffset];
+        di.readFully(buffer);
+        
+        // Now let the records get their hands on them
+        for (int i = 0; i < _numberOfNameRecords; i++) {
+            _records[i].loadString(
+                    new DataInputStream(new ByteArrayInputStream(buffer)));
+        }
+    }
+
+    public short getNumberOfNameRecords() {
+        return _numberOfNameRecords;
+    }
+
+    
+    public NameRecord getRecord(int i) {
+        if(_numberOfNameRecords > i) {
+            return _records[i];
+        }
+        return null;
+    }
+
+    public StringBuilder getRecordsRecordString(StringBuilder sb, int i) {
+        if(_numberOfNameRecords > i) {
+            _records[i].getRecordString(sb);
+        } else {
+            sb.append(Table.notAvailable);
+        }
+        return sb;
+    }
+
+    public StringBuilder getNamedRecordString(StringBuilder sb, short nameId) {
+        // Search for the first instance of this name ID
+        boolean done = false;
+        for (int i = 0; !done && i < _numberOfNameRecords; i++) {
+            if (_records[i].getNameId() == nameId) {
+                _records[i].getRecordString(sb);
+                done = true;
+            }
+        }
+        if(!done) {
+            sb.append(Table.notAvailable);
+        }
+        return sb;
+    }
+
+    public int getType() {
+        return name;
+    }
+    
+    /**
+     * Get a directory entry for this table.  This uniquely identifies the
+     * table in collections where there may be more than one instance of a
+     * particular table.
+     * @return A directory entry
+     */
+    public DirectoryEntry getDirectoryEntry() {
+        return _de;
+    }
+    
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Os2Table.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Os2Table.java
new file mode 100644
index 0000000..f33dd27
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Os2Table.java
@@ -0,0 +1,357 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, 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.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Batik" and  "Apache Software Foundation" must  not  be
+    used to  endorse or promote  products derived from  this software without
+    prior written permission. For written permission, please contact
+    apache at apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, 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.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+/**
+ * @version $Id: Os2Table.java,v 1.2 2004-12-09 23:46:21 davidsch Exp $
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ */
+public class Os2Table implements Table {
+
+    private DirectoryEntry _de;
+    private int _version;
+    private short _xAvgCharWidth;
+    private int _usWeightClass;
+    private int _usWidthClass;
+    private short _fsType;
+    private short _ySubscriptXSize;
+    private short _ySubscriptYSize;
+    private short _ySubscriptXOffset;
+    private short _ySubscriptYOffset;
+    private short _ySuperscriptXSize;
+    private short _ySuperscriptYSize;
+    private short _ySuperscriptXOffset;
+    private short _ySuperscriptYOffset;
+    private short _yStrikeoutSize;
+    private short _yStrikeoutPosition;
+    private short _sFamilyClass;
+    private Panose _panose;
+    private int _ulUnicodeRange1;
+    private int _ulUnicodeRange2;
+    private int _ulUnicodeRange3;
+    private int _ulUnicodeRange4;
+    private int _achVendorID;
+    private short _fsSelection;
+    private int _usFirstCharIndex;
+    private int _usLastCharIndex;
+    private short _sTypoAscender;
+    private short _sTypoDescender;
+    private short _sTypoLineGap;
+    private int _usWinAscent;
+    private int _usWinDescent;
+    private int _ulCodePageRange1;
+    private int _ulCodePageRange2;
+    private short _sxHeight;
+    private short _sCapHeight;
+    private int _usDefaultChar;
+    private int _usBreakChar;
+    private int _usMaxContext;
+
+    protected Os2Table(DirectoryEntry de, DataInput di) throws IOException {
+        this._de = (DirectoryEntry) de.clone();
+        _version = di.readUnsignedShort();
+        _xAvgCharWidth = di.readShort();
+        _usWeightClass = di.readUnsignedShort();
+        _usWidthClass = di.readUnsignedShort();
+        _fsType = di.readShort();
+        _ySubscriptXSize = di.readShort();
+        _ySubscriptYSize = di.readShort();
+        _ySubscriptXOffset = di.readShort();
+        _ySubscriptYOffset = di.readShort();
+        _ySuperscriptXSize = di.readShort();
+        _ySuperscriptYSize = di.readShort();
+        _ySuperscriptXOffset = di.readShort();
+        _ySuperscriptYOffset = di.readShort();
+        _yStrikeoutSize = di.readShort();
+        _yStrikeoutPosition = di.readShort();
+        _sFamilyClass = di.readShort();
+        byte[] buf = new byte[10];
+        di.readFully(buf);
+        _panose = new Panose(buf);
+        _ulUnicodeRange1 = di.readInt();
+        _ulUnicodeRange2 = di.readInt();
+        _ulUnicodeRange3 = di.readInt();
+        _ulUnicodeRange4 = di.readInt();
+        _achVendorID = di.readInt();
+        _fsSelection = di.readShort();
+        _usFirstCharIndex = di.readUnsignedShort();
+        _usLastCharIndex = di.readUnsignedShort();
+        _sTypoAscender = di.readShort();
+        _sTypoDescender = di.readShort();
+        _sTypoLineGap = di.readShort();
+        _usWinAscent = di.readUnsignedShort();
+        _usWinDescent = di.readUnsignedShort();
+        _ulCodePageRange1 = di.readInt();
+        _ulCodePageRange2 = di.readInt();
+        
+        // OpenType 1.3
+        if (_version == 2) {
+            _sxHeight = di.readShort();
+            _sCapHeight = di.readShort();
+            _usDefaultChar = di.readUnsignedShort();
+            _usBreakChar = di.readUnsignedShort();
+            _usMaxContext = di.readUnsignedShort();
+        }
+    }
+
+    public int getVersion() {
+        return _version;
+    }
+
+    public short getAvgCharWidth() {
+        return _xAvgCharWidth;
+    }
+
+    public int getWeightClass() {
+        return _usWeightClass;
+    }
+
+    public int getWidthClass() {
+        return _usWidthClass;
+    }
+
+    public short getLicenseType() {
+        return _fsType;
+    }
+
+    public short getSubscriptXSize() {
+        return _ySubscriptXSize;
+    }
+
+    public short getSubscriptYSize() {
+        return _ySubscriptYSize;
+    }
+
+    public short getSubscriptXOffset() {
+        return _ySubscriptXOffset;
+    }
+
+    public short getSubscriptYOffset() {
+        return _ySubscriptYOffset;
+    }
+
+    public short getSuperscriptXSize() {
+        return _ySuperscriptXSize;
+    }
+
+    public short getSuperscriptYSize() {
+        return _ySuperscriptYSize;
+    }
+
+    public short getSuperscriptXOffset() {
+        return _ySuperscriptXOffset;
+    }
+
+    public short getSuperscriptYOffset() {
+        return _ySuperscriptYOffset;
+    }
+
+    public short getStrikeoutSize() {
+        return _yStrikeoutSize;
+    }
+
+    public short getStrikeoutPosition() {
+        return _yStrikeoutPosition;
+    }
+
+    public short getFamilyClass() {
+        return _sFamilyClass;
+    }
+
+    public Panose getPanose() {
+        return _panose;
+    }
+
+    public int getUnicodeRange1() {
+        return _ulUnicodeRange1;
+    }
+
+    public int getUnicodeRange2() {
+        return _ulUnicodeRange2;
+    }
+
+    public int getUnicodeRange3() {
+        return _ulUnicodeRange3;
+    }
+
+    public int getUnicodeRange4() {
+        return _ulUnicodeRange4;
+    }
+
+    public int getVendorID() {
+        return _achVendorID;
+    }
+
+    public short getSelection() {
+        return _fsSelection;
+    }
+
+    public int getFirstCharIndex() {
+        return _usFirstCharIndex;
+    }
+
+    public int getLastCharIndex() {
+        return _usLastCharIndex;
+    }
+
+    public short getTypoAscender() {
+        return _sTypoAscender;
+    }
+
+    public short getTypoDescender() {
+        return _sTypoDescender;
+    }
+
+    public short getTypoLineGap() {
+        return _sTypoLineGap;
+    }
+
+    public int getWinAscent() {
+        return _usWinAscent;
+    }
+
+    public int getWinDescent() {
+        return _usWinDescent;
+    }
+
+    public int getCodePageRange1() {
+        return _ulCodePageRange1;
+    }
+
+    public int getCodePageRange2() {
+        return _ulCodePageRange2;
+    }
+
+    public short getXHeight() {
+        return _sxHeight;
+    }
+    
+    public short getCapHeight() {
+        return _sCapHeight;
+    }
+    
+    public int getDefaultChar() {
+        return _usDefaultChar;
+    }
+    
+    public int getBreakChar() {
+        return _usBreakChar;
+    }
+    
+    public int getMaxContext() {
+        return _usMaxContext;
+    }
+
+    public int getType() {
+        return OS_2;
+    }
+
+    public String toString() {
+        return new StringBuffer()
+            .append("'OS/2' Table - OS/2 and Windows Metrics\n---------------------------------------")
+            .append("\n  'OS/2' version:      ").append(_version)
+            .append("\n  xAvgCharWidth:       ").append(_xAvgCharWidth)
+            .append("\n  usWeightClass:       ").append(_usWeightClass)
+            .append("\n  usWidthClass:        ").append(_usWidthClass)
+            .append("\n  fsType:              0x").append(Integer.toHexString(_fsType).toUpperCase())
+            .append("\n  ySubscriptXSize:     ").append(_ySubscriptXSize)
+            .append("\n  ySubscriptYSize:     ").append(_ySubscriptYSize)
+            .append("\n  ySubscriptXOffset:   ").append(_ySubscriptXOffset)
+            .append("\n  ySubscriptYOffset:   ").append(_ySubscriptYOffset)
+            .append("\n  ySuperscriptXSize:   ").append(_ySuperscriptXSize)
+            .append("\n  ySuperscriptYSize:   ").append(_ySuperscriptYSize)
+            .append("\n  ySuperscriptXOffset: ").append(_ySuperscriptXOffset)
+            .append("\n  ySuperscriptYOffset: ").append(_ySuperscriptYOffset)
+            .append("\n  yStrikeoutSize:      ").append(_yStrikeoutSize)
+            .append("\n  yStrikeoutPosition:  ").append(_yStrikeoutPosition)
+            .append("\n  sFamilyClass:        ").append(_sFamilyClass>>8)
+            .append("    subclass = ").append(_sFamilyClass&0xff)
+            .append("\n  PANOSE:              ").append(_panose.toString())
+            .append("\n  Unicode Range 1( Bits 0 - 31 ): ").append(Integer.toHexString(_ulUnicodeRange1).toUpperCase())
+            .append("\n  Unicode Range 2( Bits 32- 63 ): ").append(Integer.toHexString(_ulUnicodeRange2).toUpperCase())
+            .append("\n  Unicode Range 3( Bits 64- 95 ): ").append(Integer.toHexString(_ulUnicodeRange3).toUpperCase())
+            .append("\n  Unicode Range 4( Bits 96-127 ): ").append(Integer.toHexString(_ulUnicodeRange4).toUpperCase())
+            .append("\n  achVendID:           '").append(getVendorIDAsString())
+            .append("'\n  fsSelection:         0x").append(Integer.toHexString(_fsSelection).toUpperCase())
+            .append("\n  usFirstCharIndex:    0x").append(Integer.toHexString(_usFirstCharIndex).toUpperCase())
+            .append("\n  usLastCharIndex:     0x").append(Integer.toHexString(_usLastCharIndex).toUpperCase())
+            .append("\n  sTypoAscender:       ").append(_sTypoAscender)
+            .append("\n  sTypoDescender:      ").append(_sTypoDescender)
+            .append("\n  sTypoLineGap:        ").append(_sTypoLineGap)
+            .append("\n  usWinAscent:         ").append(_usWinAscent)
+            .append("\n  usWinDescent:        ").append(_usWinDescent)
+            .append("\n  CodePage Range 1( Bits 0 - 31 ): ").append(Integer.toHexString(_ulCodePageRange1).toUpperCase())
+            .append("\n  CodePage Range 2( Bits 32- 63 ): ").append(Integer.toHexString(_ulCodePageRange2).toUpperCase())
+            .toString();
+    }
+    
+    private String getVendorIDAsString() {
+        return new StringBuffer()
+            .append((char)((_achVendorID>>24)&0xff))
+            .append((char)((_achVendorID>>16)&0xff))
+            .append((char)((_achVendorID>>8)&0xff))
+            .append((char)((_achVendorID)&0xff))
+            .toString();
+    }
+    
+    /**
+     * Get a directory entry for this table.  This uniquely identifies the
+     * table in collections where there may be more than one instance of a
+     * particular table.
+     * @return A directory entry
+     */
+    public DirectoryEntry getDirectoryEntry() {
+        return _de;
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Panose.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Panose.java
new file mode 100644
index 0000000..84e6707
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Panose.java
@@ -0,0 +1,96 @@
+/*****************************************************************************
+ * Copyright (C) The Apache Software Foundation. All rights reserved.        *
+ * ------------------------------------------------------------------------- * 
+ * This software is published under the terms of the Apache Software License * 
+ * version 1.1, a copy of which has been included with this distribution in  * 
+ * the LICENSE file.                                                         * 
+ *****************************************************************************/
+
+package jogamp.graph.font.typecast.ot.table;
+
+/**
+ * @version $Id: Panose.java,v 1.1.1.1 2004-12-05 23:14:54 davidsch Exp $
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ */
+public class Panose {
+
+  byte bFamilyType = 0;
+  byte bSerifStyle = 0;
+  byte bWeight = 0;
+  byte bProportion = 0;
+  byte bContrast = 0;
+  byte bStrokeVariation = 0;
+  byte bArmStyle = 0;
+  byte bLetterform = 0;
+  byte bMidline = 0;
+  byte bXHeight = 0;
+
+  /** Creates new Panose */
+  public Panose(byte[] panose) {
+    bFamilyType = panose[0];
+    bSerifStyle = panose[1];
+    bWeight = panose[2];
+    bProportion = panose[3];
+    bContrast = panose[4];
+    bStrokeVariation = panose[5];
+    bArmStyle = panose[6];
+    bLetterform = panose[7];
+    bMidline = panose[8];
+    bXHeight = panose[9];
+  }
+
+  public byte getFamilyType() {
+    return bFamilyType;
+  }
+  
+  public byte getSerifStyle() {
+    return bSerifStyle;
+  }
+  
+  public byte getWeight() {
+    return bWeight;
+  }
+
+  public byte getProportion() {
+    return bProportion;
+  }
+  
+  public byte getContrast() {
+    return bContrast;
+  }
+  
+  public byte getStrokeVariation() {
+    return bStrokeVariation;
+  }
+  
+  public byte getArmStyle() {
+    return bArmStyle;
+  }
+  
+  public byte getLetterForm() {
+    return bLetterform;
+  }
+  
+  public byte getMidline() {
+    return bMidline;
+  }
+  
+  public byte getXHeight() {
+    return bXHeight;
+  }
+  
+  public String toString() {
+    StringBuffer sb = new StringBuffer();
+    sb.append(String.valueOf(bFamilyType)).append(" ")
+      .append(String.valueOf(bSerifStyle)).append(" ")
+      .append(String.valueOf(bWeight)).append(" ")
+      .append(String.valueOf(bProportion)).append(" ")
+      .append(String.valueOf(bContrast)).append(" ")
+      .append(String.valueOf(bStrokeVariation)).append(" ")
+      .append(String.valueOf(bArmStyle)).append(" ")
+      .append(String.valueOf(bLetterform)).append(" ")
+      .append(String.valueOf(bMidline)).append(" ")
+      .append(String.valueOf(bXHeight));
+    return sb.toString();
+  }
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/PcltTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/PcltTable.java
new file mode 100644
index 0000000..792b8a8
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/PcltTable.java
@@ -0,0 +1,105 @@
+/*****************************************************************************
+ * Copyright (C) The Apache Software Foundation. All rights reserved.        *
+ * ------------------------------------------------------------------------- * 
+ * This software is published under the terms of the Apache Software License * 
+ * version 1.1, a copy of which has been included with this distribution in  * 
+ * the LICENSE file.                                                         * 
+ *****************************************************************************/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+/**
+ *
+ * @version $Id: PcltTable.java,v 1.1.1.1 2004-12-05 23:14:54 davidsch Exp $
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ */
+public class PcltTable implements Table {
+
+    private DirectoryEntry de;
+    private int version;
+    private long fontNumber;
+    private int pitch;
+    private int xHeight;
+    private int style;
+    private int typeFamily;
+    private int capHeight;
+    private int symbolSet;
+    private char[] typeface = new char[16];
+    private short[] characterComplement = new short[8];
+    private char[] fileName = new char[6];
+    private short strokeWeight;
+    private short widthType;
+    private byte serifStyle;
+    private byte reserved;
+
+    /** Creates new PcltTable */
+    protected PcltTable(DirectoryEntry de, DataInput di) throws IOException {
+        this.de = (DirectoryEntry) de.clone();
+        version = di.readInt();
+        fontNumber = di.readInt();
+        pitch = di.readUnsignedShort();
+        xHeight = di.readUnsignedShort();
+        style = di.readUnsignedShort();
+        typeFamily = di.readUnsignedShort();
+        capHeight = di.readUnsignedShort();
+        symbolSet = di.readUnsignedShort();
+        for (int i = 0; i < 16; i++) {
+            typeface[i] = (char) di.readUnsignedByte();
+        }
+        for (int i = 0; i < 8; i++) {
+            characterComplement[i] = (short) di.readUnsignedByte();
+        }
+        for (int i = 0; i < 6; i++) {
+            fileName[i] = (char) di.readUnsignedByte();
+        }
+        strokeWeight = (short) di.readUnsignedByte();
+        widthType = (short) di.readUnsignedByte();
+        serifStyle = di.readByte();
+        reserved = di.readByte();
+    }
+
+    /**
+     * Get the table type, as a table directory value.
+     * @return The table type
+     */
+    public int getType() {
+        return PCLT;
+    }
+    
+    public String toString() {
+        return new StringBuffer()
+            .append("'PCLT' Table - Printer Command Language Table\n---------------------------------------------")
+            .append("\n        version:             0x").append(Integer.toHexString(version).toUpperCase())
+            .append("\n        fontNumber:          ").append(fontNumber).append(" (0x").append(Long.toHexString(fontNumber).toUpperCase())
+            .append(")\n        pitch:               ").append(pitch)
+            .append("\n        xHeight:             ").append(xHeight)
+            .append("\n        style:               0x").append(style)
+            .append("\n        typeFamily:          0x").append(typeFamily>>12)
+            .append(" ").append(typeFamily & 0xfff)
+            .append("\n        capHeight:           ").append(capHeight)
+            .append("\n        symbolSet:           ").append(symbolSet)
+            .append("\n        typeFace:            ").append(new String(typeface))
+            .append("\n        characterComplement  0x")
+            .append(Integer.toHexString(characterComplement[0]).toUpperCase())
+            .append("\n        fileName:            ").append(new String(fileName))
+            .append("\n        strokeWeight:        ").append(strokeWeight)
+            .append("\n        widthType:           ").append(widthType)
+            .append("\n        serifStyle:          ").append(serifStyle)
+            .append("\n        reserved:            ").append(reserved)
+            .toString();
+    }
+    
+    /**
+     * Get a directory entry for this table.  This uniquely identifies the
+     * table in collections where there may be more than one instance of a
+     * particular table.
+     * @return A directory entry
+     */
+    public DirectoryEntry getDirectoryEntry() {
+        return de;
+    }
+    
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/PostTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/PostTable.java
new file mode 100644
index 0000000..4804c35
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/PostTable.java
@@ -0,0 +1,423 @@
+/*****************************************************************************
+ * Copyright (C) The Apache Software Foundation. All rights reserved.        *
+ * ------------------------------------------------------------------------- * 
+ * This software is published under the terms of the Apache Software License * 
+ * version 1.1, a copy of which has been included with this distribution in  * 
+ * the LICENSE file.                                                         * 
+ *****************************************************************************/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+import jogamp.graph.font.typecast.ot.Fixed;
+
+/**
+ *
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ * @version $Id: PostTable.java,v 1.1.1.1 2004-12-05 23:14:56 davidsch Exp $
+ */
+public class PostTable implements Table {
+
+    /**
+     * TODO: Mac Glyph names for 210 & 257
+     */
+    private static final String[] macGlyphName = {
+        ".notdef",      // 0
+        "null",         // 1
+        "CR",           // 2
+        "space",        // 3
+        "exclam",       // 4
+        "quotedbl",     // 5
+        "numbersign",   // 6
+        "dollar",       // 7
+        "percent",      // 8
+        "ampersand",    // 9
+        "quotesingle",  // 10
+        "parenleft",    // 11
+        "parenright",   // 12
+        "asterisk",     // 13
+        "plus",         // 14
+        "comma",        // 15
+        "hyphen",       // 16
+        "period",       // 17
+        "slash",        // 18
+        "zero",         // 19
+        "one",          // 20
+        "two",          // 21
+        "three",        // 22
+        "four",         // 23
+        "five",         // 24
+        "six",          // 25
+        "seven",        // 26
+        "eight",        // 27
+        "nine",         // 28
+        "colon",        // 29
+        "semicolon",    // 30
+        "less",         // 31
+        "equal",        // 32
+        "greater",      // 33
+        "question",     // 34
+        "at",           // 35
+        "A",            // 36
+        "B",            // 37
+        "C",            // 38
+        "D",            // 39
+        "E",            // 40
+        "F",            // 41
+        "G",            // 42
+        "H",            // 43
+        "I",            // 44
+        "J",            // 45
+        "K",            // 46
+        "L",            // 47
+        "M",            // 48
+        "N",            // 49
+        "O",            // 50
+        "P",            // 51
+        "Q",            // 52
+        "R",            // 53
+        "S",            // 54
+        "T",            // 55
+        "U",            // 56
+        "V",            // 57
+        "W",            // 58
+        "X",            // 59
+        "Y",            // 60
+        "Z",            // 61
+        "bracketleft",  // 62
+        "backslash",    // 63
+        "bracketright", // 64
+        "asciicircum",  // 65
+        "underscore",   // 66
+        "grave",        // 67
+        "a",            // 68
+        "b",            // 69
+        "c",            // 70
+        "d",            // 71
+        "e",            // 72
+        "f",            // 73
+        "g",            // 74
+        "h",            // 75
+        "i",            // 76
+        "j",            // 77
+        "k",            // 78
+        "l",            // 79
+        "m",            // 80
+        "n",            // 81
+        "o",            // 82
+        "p",            // 83
+        "q",            // 84
+        "r",            // 85
+        "s",            // 86
+        "t",            // 87
+        "u",            // 88
+        "v",            // 89
+        "w",            // 90
+        "x",            // 91
+        "y",            // 92
+        "z",            // 93
+        "braceleft",    // 94
+        "bar",          // 95
+        "braceright",   // 96
+        "asciitilde",   // 97
+        "Adieresis",    // 98
+        "Aring",        // 99
+        "Ccedilla",     // 100
+        "Eacute",       // 101
+        "Ntilde",       // 102
+        "Odieresis",    // 103
+        "Udieresis",    // 104
+        "aacute",       // 105
+        "agrave",       // 106
+        "acircumflex",  // 107
+        "adieresis",    // 108
+        "atilde",       // 109
+        "aring",        // 110
+        "ccedilla",     // 111
+        "eacute",       // 112
+        "egrave",       // 113
+        "ecircumflex",  // 114
+        "edieresis",    // 115
+        "iacute",       // 116
+        "igrave",       // 117
+        "icircumflex",  // 118
+        "idieresis",    // 119
+        "ntilde",       // 120
+        "oacute",       // 121
+        "ograve",       // 122
+        "ocircumflex",  // 123
+        "odieresis",    // 124
+        "otilde",       // 125
+        "uacute",       // 126
+        "ugrave",       // 127
+        "ucircumflex",  // 128
+        "udieresis",    // 129
+        "dagger",       // 130
+        "degree",       // 131
+        "cent",         // 132
+        "sterling",     // 133
+        "section",      // 134
+        "bullet",       // 135
+        "paragraph",    // 136
+        "germandbls",   // 137
+        "registered",   // 138
+        "copyright",    // 139
+        "trademark",    // 140
+        "acute",        // 141
+        "dieresis",     // 142
+        "notequal",     // 143
+        "AE",           // 144
+        "Oslash",       // 145
+        "infinity",     // 146
+        "plusminus",    // 147
+        "lessequal",    // 148
+        "greaterequal", // 149
+        "yen",          // 150
+    "mu",           // 151
+        "partialdiff",  // 152
+        "summation",    // 153
+        "product",      // 154
+    "pi",           // 155
+        "integral'",    // 156
+        "ordfeminine",  // 157
+        "ordmasculine", // 158
+    "Omega",        // 159
+        "ae",           // 160
+        "oslash",       // 161
+        "questiondown", // 162
+        "exclamdown",   // 163
+        "logicalnot",   // 164
+        "radical",      // 165
+        "florin",       // 166
+        "approxequal",  // 167
+        "increment",    // 168
+        "guillemotleft",// 169
+        "guillemotright",//170
+        "ellipsis",     // 171
+        "nbspace",      // 172
+        "Agrave",       // 173
+        "Atilde",       // 174
+        "Otilde",       // 175
+        "OE",           // 176
+        "oe",           // 177
+        "endash",       // 178
+        "emdash",       // 179
+        "quotedblleft", // 180
+        "quotedblright",// 181
+        "quoteleft",    // 182
+        "quoteright",   // 183
+        "divide",       // 184
+        "lozenge",      // 185
+        "ydieresis",    // 186
+        "Ydieresis",    // 187
+        "fraction",     // 188
+        "currency",     // 189
+        "guilsinglleft",// 190
+        "guilsinglright",//191
+        "fi",           // 192
+        "fl",           // 193
+        "daggerdbl",    // 194
+        "middot",       // 195
+        "quotesinglbase",//196
+        "quotedblbase", // 197
+        "perthousand",  // 198
+        "Acircumflex",  // 199
+        "Ecircumflex",  // 200
+        "Aacute",       // 201
+        "Edieresis",    // 202
+        "Egrave",       // 203
+        "Iacute",       // 204
+        "Icircumflex",  // 205
+        "Idieresis",    // 206
+        "Igrave",       // 207
+        "Oacute",       // 208
+        "Ocircumflex",  // 209
+        "",             // 210
+        "Ograve",       // 211
+        "Uacute",       // 212
+        "Ucircumflex",  // 213
+        "Ugrave",       // 214
+        "dotlessi",     // 215
+        "circumflex",   // 216
+        "tilde",        // 217
+        "overscore",    // 218
+        "breve",        // 219
+        "dotaccent",    // 220
+        "ring",         // 221
+        "cedilla",      // 222
+        "hungarumlaut", // 223
+        "ogonek",       // 224
+        "caron",        // 225
+        "Lslash",       // 226
+        "lslash",       // 227
+        "Scaron",       // 228
+        "scaron",       // 229
+        "Zcaron",       // 230
+        "zcaron",       // 231
+        "brokenbar",    // 232
+        "Eth",          // 233
+        "eth",          // 234
+        "Yacute",       // 235
+        "yacute",       // 236
+        "Thorn",        // 237
+        "thorn",        // 238
+        "minus",        // 239
+        "multiply",     // 240
+        "onesuperior",  // 241
+        "twosuperior",  // 242
+        "threesuperior",// 243
+        "onehalf",      // 244
+        "onequarter",   // 245
+        "threequarters",// 246
+        "franc",        // 247
+        "Gbreve",       // 248
+        "gbreve",       // 249
+        "Idot",         // 250
+        "Scedilla",     // 251
+        "scedilla",     // 252
+        "Cacute",       // 253
+        "cacute",       // 254
+        "Ccaron",       // 255
+        "ccaron",       // 256
+        ""              // 257
+    };
+
+    private DirectoryEntry de;
+    private int version;
+    private int italicAngle;
+    private short underlinePosition;
+    private short underlineThickness;
+    private int isFixedPitch;
+    private int minMemType42;
+    private int maxMemType42;
+    private int minMemType1;
+    private int maxMemType1;
+    
+    // v2
+    private int numGlyphs;
+    private int[] glyphNameIndex;
+    private String[] psGlyphName;
+
+    /** Creates new PostTable */
+    protected PostTable(DirectoryEntry de, DataInput di) throws IOException {
+        this.de = (DirectoryEntry) de.clone();
+        version = di.readInt();
+        italicAngle = di.readInt();
+        underlinePosition = di.readShort();
+        underlineThickness = di.readShort();
+        isFixedPitch = di.readInt();
+        minMemType42 = di.readInt();
+        maxMemType42 = di.readInt();
+        minMemType1 = di.readInt();
+        maxMemType1 = di.readInt();
+        
+        if (version == 0x00020000) {
+            numGlyphs = di.readUnsignedShort();
+            glyphNameIndex = new int[numGlyphs];
+            for (int i = 0; i < numGlyphs; i++) {
+                glyphNameIndex[i] = di.readUnsignedShort();
+            }
+            int h = highestGlyphNameIndex();
+            if (h > 257) {
+                h -= 257;
+                psGlyphName = new String[h];
+                for (int i = 0; i < h; i++) {
+                    int len = di.readUnsignedByte();
+                    byte[] buf = new byte[len];
+                    di.readFully(buf);
+                    psGlyphName[i] = new String(buf);
+                }
+            }
+        } else if (version == 0x00025000) {
+        } else if (version == 0x00030000) {
+        }
+    }
+
+    public int getVersion() {
+        return version;
+    }
+
+    private int highestGlyphNameIndex() {
+        int high = 0;
+        for (int i = 0; i < numGlyphs; i++) {
+            if (high < glyphNameIndex[i]) {
+                high = glyphNameIndex[i];
+            }
+        }
+        return high;
+    }
+
+    public String getGlyphName(int i) {
+        if (version == 0x00020000) {
+            return (glyphNameIndex[i] > 257)
+                ? psGlyphName[glyphNameIndex[i] - 258]
+                : macGlyphName[glyphNameIndex[i]];
+        } else {
+            return null;
+        }
+    }
+
+    private boolean isMacGlyphName(int i) {
+        if (version == 0x00020000) {
+            return glyphNameIndex[i] <= 257;
+        } else {
+            return false;
+        }
+    }
+    
+    /** Get the table type, as a table directory value.
+     * @return The table type
+     */
+    public int getType() {
+        return post;
+    }
+
+    public String toString() {
+        StringBuffer sb = new StringBuffer();
+        sb.append("'post' Table - PostScript Metrics\n---------------------------------\n")
+            .append("\n        'post' version:        ").append(Fixed.floatValue(version))
+            .append("\n        italicAngle:           ").append(Fixed.floatValue(italicAngle))
+            .append("\n        underlinePosition:     ").append(underlinePosition)
+            .append("\n        underlineThickness:    ").append(underlineThickness)
+            .append("\n        isFixedPitch:          ").append(isFixedPitch)
+            .append("\n        minMemType42:          ").append(minMemType42)
+            .append("\n        maxMemType42:          ").append(maxMemType42)
+            .append("\n        minMemType1:           ").append(minMemType1)
+            .append("\n        maxMemType1:           ").append(maxMemType1);
+
+        if (version == 0x00020000) {
+            sb.append("\n\n        Format 2.0:  Non-Standard (for PostScript) TrueType Glyph Set.\n");
+            sb.append("        numGlyphs:      ").append(numGlyphs).append("\n");
+            for (int i = 0; i < numGlyphs; i++) {
+                sb.append("        Glyf ").append(i).append(" -> ");
+                if (isMacGlyphName(i)) {
+                    sb.append("Mac Glyph # ").append(glyphNameIndex[i])
+                        .append(", '").append(macGlyphName[glyphNameIndex[i]]).append("'\n");
+                } else {
+                    sb.append("PSGlyf Name # ").append(glyphNameIndex[i] - 257)
+                        .append(", name= '").append(psGlyphName[glyphNameIndex[i] - 258]).append("'\n");
+                }
+            }
+            sb.append("\n        Full List of PSGlyf Names\n        ------------------------\n");
+            for (int i = 0; i < psGlyphName.length; i++) {
+                sb.append("        PSGlyf Name # ").append(i + 1)
+                    .append(": ").append(psGlyphName[i])
+                    .append("\n");
+            }
+        }
+        return sb.toString();
+    }
+    
+    /**
+     * Get a directory entry for this table.  This uniquely identifies the
+     * table in collections where there may be more than one instance of a
+     * particular table.
+     * @return A directory entry
+     */
+    public DirectoryEntry getDirectoryEntry() {
+        return de;
+    }
+    
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/PrepTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/PrepTable.java
new file mode 100644
index 0000000..aac10c5
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/PrepTable.java
@@ -0,0 +1,47 @@
+/*****************************************************************************
+ * Copyright (C) The Apache Software Foundation. All rights reserved.        *
+ * ------------------------------------------------------------------------- * 
+ * This software is published under the terms of the Apache Software License * 
+ * version 1.1, a copy of which has been included with this distribution in  * 
+ * the LICENSE file.                                                         * 
+ *****************************************************************************/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+import jogamp.graph.font.typecast.ot.Disassembler;
+
+/**
+ * @version $Id: PrepTable.java,v 1.1.1.1 2004-12-05 23:14:57 davidsch Exp $
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ */
+public class PrepTable extends Program implements Table {
+
+    private DirectoryEntry de;
+
+    public PrepTable(DirectoryEntry de, DataInput di) throws IOException {
+        this.de = (DirectoryEntry) de.clone();
+        readInstructions(di, de.getLength());
+    }
+
+    public int getType() {
+        return prep;
+    }
+
+    public String toString() {
+        return Disassembler.disassemble(getInstructions(), 0);
+    }
+    
+    /**
+     * Get a directory entry for this table.  This uniquely identifies the
+     * table in collections where there may be more than one instance of a
+     * particular table.
+     * @return A directory entry
+     */
+    public DirectoryEntry getDirectoryEntry() {
+        return de;
+    }
+    
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Program.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Program.java
new file mode 100644
index 0000000..28c148c
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Program.java
@@ -0,0 +1,40 @@
+/*****************************************************************************
+ * Copyright (C) The Apache Software Foundation. All rights reserved.        *
+ * ------------------------------------------------------------------------- * 
+ * This software is published under the terms of the Apache Software License * 
+ * version 1.1, a copy of which has been included with this distribution in  * 
+ * the LICENSE file.                                                         * 
+ *****************************************************************************/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+/**
+ * @version $Id: Program.java,v 1.1.1.1 2004-12-05 23:14:57 davidsch Exp $
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ */
+public abstract class Program {
+
+    private short[] instructions;
+
+    public short[] getInstructions() {
+        return instructions;
+    }
+
+    protected void readInstructions(DataInput di, int count) throws IOException {
+        instructions = new short[count];
+        for (int i = 0; i < count; i++) {
+            instructions[i] = (short) di.readUnsignedByte();
+        }
+    }
+/*
+    protected void readInstructions(ByteArrayInputStream bais, int count) {
+        instructions = new short[count];
+        for (int i = 0; i < count; i++) {
+            instructions[i] = (short) bais.read();
+        }
+    }
+*/
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/RangeRecord.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/RangeRecord.java
new file mode 100644
index 0000000..72d703b
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/RangeRecord.java
@@ -0,0 +1,87 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, 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.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Batik" and  "Apache Software Foundation" must  not  be
+    used to  endorse or promote  products derived from  this software without
+    prior written permission. For written permission, please contact
+    apache at apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, 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.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+/**
+ * Coverage Index (GlyphID) = StartCoverageIndex + GlyphID - Start GlyphID
+ *
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ * @version $Id: RangeRecord.java,v 1.2 2007-01-24 09:47:47 davidsch Exp $
+ */
+public class RangeRecord {
+
+    private int _start;
+    private int _end;
+    private int _startCoverageIndex;
+
+    /** Creates new RangeRecord */
+    public RangeRecord(DataInput di) throws IOException {
+        _start = di.readUnsignedShort();
+        _end = di.readUnsignedShort();
+        _startCoverageIndex = di.readUnsignedShort();
+    }
+
+    public boolean isInRange(int glyphId) {
+        return (_start <= glyphId && glyphId <= _end);
+    }
+    
+    public int getCoverageIndex(int glyphId) {
+        if (isInRange(glyphId)) {
+            return _startCoverageIndex + glyphId - _start;
+        }
+        return -1;
+    }
+
+}
+
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Script.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Script.java
new file mode 100644
index 0000000..eb534b5
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Script.java
@@ -0,0 +1,118 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, 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.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Batik" and  "Apache Software Foundation" must  not  be
+    used to  endorse or promote  products derived from  this software without
+    prior written permission. For written permission, please contact
+    apache at apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, 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.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInputStream;
+import java.io.IOException;
+
+/**
+ *
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ * @version $Id: Script.java,v 1.2 2007-01-24 09:47:47 davidsch Exp $
+ */
+public class Script {
+
+    private int _defaultLangSysOffset;
+    private int _langSysCount;
+    private LangSysRecord[] _langSysRecords;
+    private LangSys _defaultLangSys;
+    private LangSys[] _langSys;
+    
+    /** Creates new ScriptTable */
+    protected Script(DataInputStream dis, int offset) throws IOException {
+
+        // Ensure we're in the right place
+        dis.reset();
+        dis.skipBytes(offset);
+        
+        // Start reading
+        _defaultLangSysOffset = dis.readUnsignedShort();
+        _langSysCount = dis.readUnsignedShort();
+        if (_langSysCount > 0) {
+            _langSysRecords = new LangSysRecord[_langSysCount];
+            for (int i = 0; i < _langSysCount; i++) {
+                _langSysRecords[i] = new LangSysRecord(dis);
+            }
+        }
+
+        // Read the LangSys tables
+        if (_langSysCount > 0) {
+            _langSys = new LangSys[_langSysCount];
+            for (int i = 0; i < _langSysCount; i++) {
+                dis.reset();
+                dis.skipBytes(offset + _langSysRecords[i].getOffset());
+                _langSys[i] = new LangSys(dis);
+            }
+        }
+        if (_defaultLangSysOffset > 0) {
+            dis.reset();
+            dis.skipBytes(offset + _defaultLangSysOffset);
+            _defaultLangSys = new LangSys(dis);
+        }
+    }
+
+    public int getLangSysCount() {
+        return _langSysCount;
+    }
+    
+    public LangSysRecord getLangSysRecord(int i) {
+        return _langSysRecords[i];
+    }
+
+    public LangSys getDefaultLangSys() {
+        return _defaultLangSys;
+    }
+
+    public LangSys getLangSys(int i) {
+        return _langSys[i];
+    }
+}
+
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/ScriptList.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/ScriptList.java
new file mode 100644
index 0000000..4af62b0
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/ScriptList.java
@@ -0,0 +1,115 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, 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.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Batik" and  "Apache Software Foundation" must  not  be
+    used to  endorse or promote  products derived from  this software without
+    prior written permission. For written permission, please contact
+    apache at apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, 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.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInputStream;
+import java.io.IOException;
+
+/**
+ *
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ * @version $Id: ScriptList.java,v 1.3 2007-01-24 09:54:44 davidsch Exp $
+ */
+public class ScriptList {
+
+    private int _scriptCount = 0;
+    private ScriptRecord[] _scriptRecords;
+    private Script[] _scripts;
+    
+    /** Creates new ScriptList */
+    protected ScriptList(DataInputStream dis, int offset) throws IOException {
+        
+        // Ensure we're in the right place
+        dis.reset();
+        dis.skipBytes(offset);
+        
+        // Start reading
+        _scriptCount = dis.readUnsignedShort();
+        _scriptRecords = new ScriptRecord[_scriptCount];
+        _scripts = new Script[_scriptCount];
+        for (int i = 0; i < _scriptCount; i++) {
+            _scriptRecords[i] = new ScriptRecord(dis);
+        }
+        for (int i = 0; i < _scriptCount; i++) {
+            _scripts[i] = new Script(dis, offset + _scriptRecords[i].getOffset());
+        }
+    }
+
+    public int getScriptCount() {
+        return _scriptCount;
+    }
+    
+    public ScriptRecord getScriptRecord(int i) {
+        return _scriptRecords[i];
+    }
+    
+    public Script getScript(int i) {
+        return _scripts[i];
+    }
+    
+    public Script findScript(String tag) {
+        if (tag.length() != 4) {
+            return null;
+        }
+        int tagVal = ((tag.charAt(0)<<24)
+            | (tag.charAt(1)<<16)
+            | (tag.charAt(2)<<8)
+            | tag.charAt(3));
+        for (int i = 0; i < _scriptCount; i++) {
+            if (_scriptRecords[i].getTag() == tagVal) {
+                return _scripts[i];
+            }
+        }
+        return null;
+    }
+
+}
+
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/ScriptRecord.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/ScriptRecord.java
new file mode 100644
index 0000000..34a43d2
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/ScriptRecord.java
@@ -0,0 +1,88 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, 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.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Batik" and  "Apache Software Foundation" must  not  be
+    used to  endorse or promote  products derived from  this software without
+    prior written permission. For written permission, please contact
+    apache at apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, 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.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+/**
+ *
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ * @version $Id: ScriptRecord.java,v 1.2 2007-01-24 09:47:46 davidsch Exp $
+ */
+public class ScriptRecord {
+
+    private int _tag;
+    private int _offset;
+    
+    /** Creates new ScriptRecord */
+    protected ScriptRecord(DataInput di) throws IOException {
+        _tag = di.readInt();
+        _offset = di.readUnsignedShort();
+    }
+
+    public int getTag() {
+        return _tag;
+    }
+    
+    public int getOffset() {
+        return _offset;
+    }
+
+    public String getTagAsString() {
+        return new StringBuffer()
+            .append((char)((_tag>>24)&0xff))
+            .append((char)((_tag>>16)&0xff))
+            .append((char)((_tag>>8)&0xff))
+            .append((char)((_tag)&0xff))
+            .toString();
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/ScriptTags.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/ScriptTags.java
new file mode 100644
index 0000000..a5e196e
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/ScriptTags.java
@@ -0,0 +1,61 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, 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.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Batik" and  "Apache Software Foundation" must  not  be
+    used to  endorse or promote  products derived from  this software without
+    prior written permission. For written permission, please contact
+    apache at apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, 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.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package jogamp.graph.font.typecast.ot.table;
+
+/**
+ * Definition of Script tags
+ *
+ * @version $Id: ScriptTags.java,v 1.2 2007-01-24 09:47:46 davidsch Exp $
+ * @author <a href="mailto:vincent.hardy at eng.sun.com">Vincent Hardy</a>
+ */
+public interface ScriptTags {
+    public static final String SCRIPT_TAG_ARAB = "arab";
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/SignatureBlock.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/SignatureBlock.java
new file mode 100644
index 0000000..156d3fd
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/SignatureBlock.java
@@ -0,0 +1,46 @@
+/*****************************************************************************
+ * Copyright (C) The Apache Software Foundation. All rights reserved.        *
+ * ------------------------------------------------------------------------- * 
+ * This software is published under the terms of the Apache Software License * 
+ * version 1.1, a copy of which has been included with this distribution in  * 
+ * the LICENSE file.                                                         * 
+ *****************************************************************************/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.IOException;
+import java.io.DataInput;
+
+/**
+ *
+ * @version $Id: SignatureBlock.java,v 1.1.1.1 2004-12-05 23:14:58 davidsch Exp $
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ */
+public class SignatureBlock {
+
+    private int reserved1;
+    private int reserved2;
+    private int signatureLen;
+    private byte[] signature;
+    
+    /** Creates new SignatureBlock */
+    protected SignatureBlock(DataInput di) throws IOException {
+        reserved1 = di.readUnsignedShort();
+        reserved2 = di.readUnsignedShort();
+        signatureLen = di.readInt();
+        signature = new byte[signatureLen];
+        di.readFully(signature);
+    }
+
+    public String toString() {
+        StringBuffer sb = new StringBuffer();
+        for (int i = 0; i < signatureLen; i += 16) {
+            if (signatureLen - i >= 16) {
+                sb.append(new String(signature, i, 16)).append("\n");
+            } else {
+                sb.append(new String(signature, i, signatureLen - i)).append("\n");
+            }
+        }
+        return sb.toString();
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/SingleSubst.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/SingleSubst.java
new file mode 100644
index 0000000..8c56a74
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/SingleSubst.java
@@ -0,0 +1,81 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, 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.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Batik" and  "Apache Software Foundation" must  not  be
+    used to  endorse or promote  products derived from  this software without
+    prior written permission. For written permission, please contact
+    apache at apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, 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.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInputStream;
+import java.io.IOException;
+
+/**
+ *
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ * @version $Id: SingleSubst.java,v 1.2 2007-01-24 09:47:46 davidsch Exp $
+ */
+public abstract class SingleSubst extends LookupSubtable {
+
+    public abstract int getFormat();
+
+    public abstract int substitute(int glyphId);
+    
+    public static SingleSubst read(DataInputStream dis, int offset) throws IOException {
+        SingleSubst s = null;
+        dis.reset();
+        dis.skipBytes(offset);
+        int format = dis.readUnsignedShort();
+        if (format == 1) {
+            s = new SingleSubstFormat1(dis, offset);
+        } else if (format == 2) {
+            s = new SingleSubstFormat2(dis, offset);
+        }
+        return s;
+    }
+
+}
+
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/SingleSubstFormat1.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/SingleSubstFormat1.java
new file mode 100644
index 0000000..99b85f3
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/SingleSubstFormat1.java
@@ -0,0 +1,92 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, 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.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Batik" and  "Apache Software Foundation" must  not  be
+    used to  endorse or promote  products derived from  this software without
+    prior written permission. For written permission, please contact
+    apache at apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, 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.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInputStream;
+import java.io.IOException;
+
+/**
+ *
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ * @version $Id: SingleSubstFormat1.java,v 1.2 2007-01-24 09:47:45 davidsch Exp $
+ */
+public class SingleSubstFormat1 extends SingleSubst {
+
+    private int _coverageOffset;
+    private short _deltaGlyphID;
+    private Coverage _coverage;
+
+    /** Creates new SingleSubstFormat1 */
+    protected SingleSubstFormat1(DataInputStream dis, int offset) throws IOException {
+        _coverageOffset = dis.readUnsignedShort();
+        _deltaGlyphID = dis.readShort();
+        dis.reset();
+        dis.skipBytes(offset + _coverageOffset);
+        _coverage = Coverage.read(dis);
+    }
+
+    public int getFormat() {
+        return 1;
+    }
+
+    public int substitute(int glyphId) {
+        int i = _coverage.findGlyph(glyphId);
+        if (i > -1) {
+            return glyphId + _deltaGlyphID;
+        }
+        return glyphId;
+    }
+    
+    public String getTypeAsString() {
+        return "SingleSubstFormat1";
+    }
+}
+
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/SingleSubstFormat2.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/SingleSubstFormat2.java
new file mode 100644
index 0000000..cd3b6d1
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/SingleSubstFormat2.java
@@ -0,0 +1,97 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, 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.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Batik" and  "Apache Software Foundation" must  not  be
+    used to  endorse or promote  products derived from  this software without
+    prior written permission. For written permission, please contact
+    apache at apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, 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.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInputStream;
+import java.io.IOException;
+
+/**
+ *
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ * @version $Id: SingleSubstFormat2.java,v 1.2 2007-01-24 09:47:48 davidsch Exp $
+ */
+public class SingleSubstFormat2 extends SingleSubst {
+
+    private int _coverageOffset;
+    private int _glyphCount;
+    private int[] _substitutes;
+    private Coverage _coverage;
+
+    /** Creates new SingleSubstFormat2 */
+    protected SingleSubstFormat2(DataInputStream dis, int offset) throws IOException {
+        _coverageOffset = dis.readUnsignedShort();
+        _glyphCount = dis.readUnsignedShort();
+        _substitutes = new int[_glyphCount];
+        for (int i = 0; i < _glyphCount; i++) {
+            _substitutes[i] = dis.readUnsignedShort();
+        }
+        dis.reset();
+        dis.skipBytes(offset + _coverageOffset);
+        _coverage = Coverage.read(dis);
+    }
+
+    public int getFormat() {
+        return 2;
+    }
+
+    public int substitute(int glyphId) {
+        int i = _coverage.findGlyph(glyphId);
+        if (i > -1) {
+            return _substitutes[i];
+        }
+        return glyphId;
+    }
+
+    public String getTypeAsString() {
+        return "SingleSubstFormat2";
+    }    
+}
+
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/TTCHeader.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/TTCHeader.java
new file mode 100644
index 0000000..b801517
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/TTCHeader.java
@@ -0,0 +1,59 @@
+/*****************************************************************************
+ * Copyright (C) The Apache Software Foundation. All rights reserved.        *
+ * ------------------------------------------------------------------------- * 
+ * This software is published under the terms of the Apache Software License * 
+ * version 1.1, a copy of which has been included with this distribution in  * 
+ * the LICENSE file.                                                         * 
+ *****************************************************************************/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+/**
+ *
+ * @version $Id: TTCHeader.java,v 1.1.1.1 2004-12-05 23:15:01 davidsch Exp $
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ */
+public class TTCHeader {
+    
+    public static final int ttcf = 0x74746366;
+
+    private int ttcTag;
+    private int version;
+    private int directoryCount;
+    private int[] tableDirectory;
+    private int dsigTag;
+    private int dsigLength;
+    private int dsigOffset;
+
+    /** Creates new TTCHeader */
+    public TTCHeader(DataInput di) throws IOException {
+        ttcTag = di.readInt();
+        version = di.readInt();
+        directoryCount = di.readInt();
+        tableDirectory = new int[directoryCount];
+        for (int i = 0; i < directoryCount; i++) {
+            tableDirectory[i] = di.readInt();
+        }
+        if (version == 0x00010000) {
+            dsigTag = di.readInt();
+        }
+        dsigLength = di.readInt();
+        dsigOffset = di.readInt();
+    }
+
+    public int getDirectoryCount() {
+        return directoryCount;
+    }
+    
+    public int getTableDirectory(int i) {
+        return tableDirectory[i];
+    }
+
+    public static boolean isTTC(DataInput di) throws IOException {
+        int ttcTag = di.readInt();
+        return ttcTag == ttcf;
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Table.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Table.java
new file mode 100644
index 0000000..624f47b
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Table.java
@@ -0,0 +1,69 @@
+/*****************************************************************************
+ * Copyright (C) The Apache Software Foundation. All rights reserved.        *
+ * ------------------------------------------------------------------------- * 
+ * This software is published under the terms of the Apache Software License * 
+ * version 1.1, a copy of which has been included with this distribution in  * 
+ * the LICENSE file.                                                         * 
+ *****************************************************************************/
+
+package jogamp.graph.font.typecast.ot.table;
+
+/**
+ * @version $Id: Table.java,v 1.1.1.1 2004-12-05 23:14:59 davidsch Exp $
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ */
+public interface Table {
+
+    // Table constants
+    public static final int BASE = 0x42415345; // Baseline data [OpenType]
+    public static final int CFF  = 0x43464620; // PostScript font program (compact font format) [PostScript]
+    public static final int DSIG = 0x44534947; // Digital signature
+    public static final int EBDT = 0x45424454; // Embedded bitmap data
+    public static final int EBLC = 0x45424c43; // Embedded bitmap location data
+    public static final int EBSC = 0x45425343; // Embedded bitmap scaling data
+    public static final int GDEF = 0x47444546; // Glyph definition data [OpenType]
+    public static final int GPOS = 0x47504f53; // Glyph positioning data [OpenType]
+    public static final int GSUB = 0x47535542; // Glyph substitution data [OpenType]
+    public static final int JSTF = 0x4a535446; // Justification data [OpenType]
+    public static final int LTSH = 0x4c545348; // Linear threshold table
+    public static final int MMFX = 0x4d4d4658; // Multiple master font metrics [PostScript]
+    public static final int MMSD = 0x4d4d5344; // Multiple master supplementary data [PostScript]
+    public static final int OS_2 = 0x4f532f32; // OS/2 and Windows specific metrics [r]
+    public static final int PCLT = 0x50434c54; // PCL5
+    public static final int VDMX = 0x56444d58; // Vertical Device Metrics table
+    public static final int cmap = 0x636d6170; // character to glyph mapping [r]
+    public static final int cvt  = 0x63767420; // Control Value Table
+    public static final int fpgm = 0x6670676d; // font program
+    public static final int fvar = 0x66766172; // Apple's font variations table [PostScript]
+    public static final int gasp = 0x67617370; // grid-fitting and scan conversion procedure (grayscale)
+    public static final int glyf = 0x676c7966; // glyph data [r]
+    public static final int hdmx = 0x68646d78; // horizontal device metrics
+    public static final int head = 0x68656164; // font header [r]
+    public static final int hhea = 0x68686561; // horizontal header [r]
+    public static final int hmtx = 0x686d7478; // horizontal metrics [r]
+    public static final int kern = 0x6b65726e; // kerning
+    public static final int loca = 0x6c6f6361; // index to location [r]
+    public static final int maxp = 0x6d617870; // maximum profile [r]
+    public static final int name = 0x6e616d65; // naming table [r]
+    public static final int prep = 0x70726570; // CVT Program
+    public static final int post = 0x706f7374; // PostScript information [r]
+    public static final int vhea = 0x76686561; // Vertical Metrics header
+    public static final int vmtx = 0x766d7478; // Vertical Metrics
+
+    public static final String notAvailable = "n/a";
+    
+    /**
+     * Get the table type, as a table directory value.
+     * @return The table type
+     */
+    public int getType();
+
+    /**
+     * Get a directory entry for this table.  This uniquely identifies the
+     * table in collections where there may be more than one instance of a
+     * particular table.
+     * @return A directory entry
+     */
+    public DirectoryEntry getDirectoryEntry();
+    
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/TableDirectory.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/TableDirectory.java
new file mode 100644
index 0000000..cf9f1bd
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/TableDirectory.java
@@ -0,0 +1,130 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, 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.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Batik" and  "Apache Software Foundation" must  not  be
+    used to  endorse or promote  products derived from  this software without
+    prior written permission. For written permission, please contact
+    apache at apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, 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.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+import jogamp.graph.font.typecast.ot.Fixed;
+
+/**
+ * @version $Id: TableDirectory.java,v 1.2 2004-12-09 23:46:21 davidsch Exp $
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ */
+public class TableDirectory {
+
+    private int _version = 0;
+    private short _numTables = 0;
+    private short _searchRange = 0;
+    private short _entrySelector = 0;
+    private short _rangeShift = 0;
+    private DirectoryEntry[] _entries;
+
+    public TableDirectory(DataInput di) throws IOException {
+        _version = di.readInt();
+        _numTables = di.readShort();
+        _searchRange = di.readShort();
+        _entrySelector = di.readShort();
+        _rangeShift = di.readShort();
+        _entries = new DirectoryEntry[_numTables];
+        for (int i = 0; i < _numTables; i++) {
+            _entries[i] = new DirectoryEntry(di);
+        }
+    }
+
+    public DirectoryEntry getEntry(int index) {
+        return _entries[index];
+    }
+
+    public DirectoryEntry getEntryByTag(int tag) {
+        for (int i = 0; i < _numTables; i++) {
+            if (_entries[i].getTag() == tag) {
+                return _entries[i];
+            }
+        }
+        return null;
+    }
+
+    public short getEntrySelector() {
+        return _entrySelector;
+    }
+
+    public short getNumTables() {
+        return _numTables;
+    }
+
+    public short getRangeShift() {
+        return _rangeShift;
+    }
+
+    public short getSearchRange() {
+        return _searchRange;
+    }
+
+    public int getVersion() {
+        return _version;
+    }
+    
+    public String toString() {
+        StringBuffer sb = new StringBuffer()
+            .append("Offset Table\n------ -----")
+            .append("\n  sfnt version:     ").append(Fixed.floatValue(_version))
+            .append("\n  numTables =       ").append(_numTables)
+            .append("\n  searchRange =     ").append(_searchRange)
+            .append("\n  entrySelector =   ").append(_entrySelector)
+            .append("\n  rangeShift =      ").append(_rangeShift)
+            .append("\n\n");
+        for (int i = 0; i < _numTables; i++) {
+            sb.append(i).append(". ").append(_entries[i].toString()).append("\n");
+        }
+        return sb.toString();
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/TableException.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/TableException.java
new file mode 100644
index 0000000..7749ea8
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/TableException.java
@@ -0,0 +1,46 @@
+/*
+ * $Id: TableException.java,v 1.1.1.1 2004-12-05 23:15:00 davidsch Exp $
+ *
+ * Typecast - The Font Development Environment
+ *
+ * Copyright (c) 2004 David Schweinsberg
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package jogamp.graph.font.typecast.ot.table;
+
+/**
+ *
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ * @version $Id: TableException.java,v 1.1.1.1 2004-12-05 23:15:00 davidsch Exp $
+ */
+public class TableException extends java.lang.Exception {
+    
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * Creates a new instance of <code>TableException</code> without detail message.
+     */
+    public TableException() {
+    }
+    
+    
+    /**
+     * Constructs an instance of <code>TableException</code> with the specified detail message.
+     * @param msg the detail message.
+     */
+    public TableException(String msg) {
+        super(msg);
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/TableFactory.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/TableFactory.java
new file mode 100644
index 0000000..998ce08
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/TableFactory.java
@@ -0,0 +1,185 @@
+/*
+
+ ============================================================================
+                   The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, 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.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+    include  the following  acknowledgment:  "This product includes  software
+    developed  by the  Apache Software Foundation  (http://www.apache.org/)."
+    Alternately, this  acknowledgment may  appear in the software itself,  if
+    and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Batik" and  "Apache Software Foundation" must  not  be
+    used to  endorse or promote  products derived from  this software without
+    prior written permission. For written permission, please contact
+    apache at apache.org.
+
+ 5. Products  derived from this software may not  be called "Apache", nor may
+    "Apache" appear  in their name,  without prior written permission  of the
+    Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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  THE
+ APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
+ DING, 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.
+
+ This software  consists of voluntary contributions made  by many individuals
+ on  behalf of the Apache Software  Foundation. For more  information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
+ 
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInputStream;
+import java.io.IOException;
+
+import jogamp.graph.font.typecast.ot.OTFont;
+import jogamp.graph.font.typecast.ot.OTFontCollection;
+
+/** 
+ *
+ * @version $Id: TableFactory.java,v 1.7 2007-02-05 12:39:51 davidsch Exp $
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ */
+public class TableFactory {
+
+    public static Table create(
+            OTFontCollection fc,
+            OTFont font,
+            DirectoryEntry de,
+            DataInputStream dis) throws IOException {
+        Table t = null;
+        
+        // First, if we have a font collection, look for the table there
+        if (fc != null) {
+            t = fc.getTable(de);
+            if (t != null) {
+                return t;
+            }
+        }
+        
+        // Create the table
+        switch (de.getTag()) {
+        case Table.BASE:
+            t = new BaseTable(de, dis);
+            break;
+        case Table.CFF:
+            t = new CffTable(de, dis);
+            break;
+        case Table.DSIG:
+            t = new DsigTable(de, dis);
+            break;
+        case Table.EBDT:
+            break;
+        case Table.EBLC:
+            break;
+        case Table.EBSC:
+            break;
+        case Table.GDEF:
+            break;
+        case Table.GPOS:
+            t = new GposTable(de, dis);
+            break;
+        case Table.GSUB:
+            t = new GsubTable(de, dis);
+            break;
+        case Table.JSTF:
+            break;
+        case Table.LTSH:
+            t = new LtshTable(de, dis);
+            break;
+        case Table.MMFX:
+            break;
+        case Table.MMSD:
+            break;
+        case Table.OS_2:
+            t = new Os2Table(de, dis);
+            break;
+        case Table.PCLT:
+            t = new PcltTable(de, dis);
+            break;
+        case Table.VDMX:
+            t = new VdmxTable(de, dis);
+            break;
+        case Table.cmap:
+            t = new CmapTable(de, dis);
+            break;
+        case Table.cvt:
+            t = new CvtTable(de, dis);
+            break;
+        case Table.fpgm:
+            t = new FpgmTable(de, dis);
+            break;
+        case Table.fvar:
+            break;
+        case Table.gasp:
+            t = new GaspTable(de, dis);
+            break;
+        case Table.glyf:
+            t = new GlyfTable(de, dis, font.getMaxpTable(), font.getLocaTable());
+            break;
+        case Table.hdmx:
+            t = new HdmxTable(de, dis, font.getMaxpTable());
+            break;
+        case Table.head:
+            t = new HeadTable(de, dis);
+            break;
+        case Table.hhea:
+            t = new HheaTable(de, dis);
+            break;
+        case Table.hmtx:
+            t = new HmtxTable(de, dis, font.getHheaTable(), font.getMaxpTable());
+            break;
+        case Table.kern:
+            t = new KernTable(de, dis);
+            break;
+        case Table.loca:
+            t = new LocaTable(de, dis, font.getHeadTable(), font.getMaxpTable());
+            break;
+        case Table.maxp:
+            t = new MaxpTable(de, dis);
+            break;
+        case Table.name:
+            t = new NameTable(de, dis);
+            break;
+        case Table.prep:
+            t = new PrepTable(de, dis);
+            break;
+        case Table.post:
+            t = new PostTable(de, dis);
+            break;
+        case Table.vhea:
+            t = new VheaTable(de, dis);
+            break;
+        case Table.vmtx:
+            t = new VmtxTable(de, dis, font.getVheaTable(), font.getMaxpTable());
+            break;
+        }
+        
+        // If we have a font collection, add this table to it
+        if ((fc != null) && (t != null)) {
+            fc.addTable(t);
+        }
+        return t;
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/VdmxTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/VdmxTable.java
new file mode 100644
index 0000000..641f3ef
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/VdmxTable.java
@@ -0,0 +1,197 @@
+/*
+ * $Id: VdmxTable.java,v 1.1 2007-01-30 05:25:35 davidsch Exp $
+ *
+ * Typecast - The Font Development Environment
+ *
+ * Copyright (c) 2004-2007 David Schweinsberg
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+/**
+ * The Vertical Device Metrics table for TrueType outlines.
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ * @version $Id: VdmxTable.java,v 1.1 2007-01-30 05:25:35 davidsch Exp $
+ */
+public class VdmxTable implements Table {
+
+    private class Ratio {
+        
+        private byte _bCharSet;
+        private byte _xRatio;
+        private byte _yStartRatio;
+        private byte _yEndRatio;
+        
+        protected Ratio(DataInput di) throws IOException {
+            _bCharSet = di.readByte();
+            _xRatio = di.readByte();
+            _yStartRatio = di.readByte();
+            _yEndRatio = di.readByte();
+        }
+
+        public byte getBCharSet() {
+            return _bCharSet;
+        }
+        
+        public byte getXRatio() {
+            return _xRatio;
+        }
+        
+        public byte getYStartRatio() {
+            return _yStartRatio;
+        }
+        
+        public byte getYEndRatio() {
+            return _yEndRatio;
+        }
+    }
+    
+    private class VTableRecord {
+        
+        private int _yPelHeight;
+        private short _yMax;
+        private short _yMin;
+        
+        protected VTableRecord(DataInput di) throws IOException {
+            _yPelHeight = di.readUnsignedShort();
+            _yMax = di.readShort();
+            _yMin = di.readShort();
+        }
+
+        public int getYPelHeight() {
+            return _yPelHeight;
+        }
+        
+        public short getYMax() {
+            return _yMax;
+        }
+        
+        public short getYMin() {
+            return _yMin;
+        }
+    }
+    
+    private class Group {
+        
+        private int _recs;
+        private int _startsz;
+        private int _endsz;
+        private VTableRecord[] _entry;
+        
+        protected Group(DataInput di) throws IOException {
+            _recs = di.readUnsignedShort();
+            _startsz = di.readUnsignedByte();
+            _endsz = di.readUnsignedByte();
+            _entry = new VTableRecord[_recs];
+            for (int i = 0; i < _recs; ++i) {
+                _entry[i] = new VTableRecord(di);
+            }
+        }
+
+        public int getRecs() {
+            return _recs;
+        }
+        
+        public int getStartSZ() {
+            return _startsz;
+        }
+        
+        public int getEndSZ() {
+            return _endsz;
+        }
+        
+        public VTableRecord[] getEntry() {
+            return _entry;
+        }
+    }
+    
+    private DirectoryEntry _de;
+    private int _version;
+    private int _numRecs;
+    private int _numRatios;
+    private Ratio[] _ratRange;
+    private int _offset[];
+    private Group[] _groups;
+    
+    /** Creates a new instance of VdmxTable */
+    protected VdmxTable(DirectoryEntry de, DataInput di) throws IOException {
+        _de = (DirectoryEntry) de.clone();
+        _version = di.readUnsignedShort();
+        _numRecs = di.readUnsignedShort();
+        _numRatios = di.readUnsignedShort();
+        _ratRange = new Ratio[_numRatios];
+        for (int i = 0; i < _numRatios; ++i) {
+            _ratRange[i] = new Ratio(di);
+        }
+        _offset = new int[_numRatios];
+        for (int i = 0; i < _numRatios; ++i) {
+            _offset[i] = di.readUnsignedShort();
+        }
+        _groups = new Group[_numRecs];
+        for (int i = 0; i < _numRecs; ++i) {
+            _groups[i] = new Group(di);
+        }
+    }
+    
+    public int getType() {
+        return VDMX;
+    }
+    
+    public String toString() {
+        StringBuffer sb = new StringBuffer();
+        sb.append("'VDMX' Table - Precomputed Vertical Device Metrics\n")
+            .append("--------------------------------------------------\n")
+            .append("  Version:                 ").append(_version).append("\n")
+            .append("  Number of Hgt Records:   ").append(_numRecs).append("\n")
+            .append("  Number of Ratio Records: ").append(_numRatios).append("\n");
+        for (int i = 0; i < _numRatios; ++i) {
+            sb.append("\n    Ratio Record #").append(i + 1).append("\n")
+                .append("\tCharSetId     ").append(_ratRange[i].getBCharSet()).append("\n")
+                .append("\txRatio        ").append(_ratRange[i].getXRatio()).append("\n")
+                .append("\tyStartRatio   ").append(_ratRange[i].getYStartRatio()).append("\n")
+                .append("\tyEndRatio     ").append(_ratRange[i].getYEndRatio()).append("\n")
+                .append("\tRecord Offset ").append(_offset[i]).append("\n");
+        }
+        sb.append("\n   VDMX Height Record Groups\n")
+            .append("   -------------------------\n");
+        for (int i = 0; i < _numRecs; ++i) {
+            Group group = _groups[i];
+            sb.append("   ").append(i + 1)
+                .append(".   Number of Hgt Records  ").append(group.getRecs()).append("\n")
+                .append("        Starting Y Pel Height  ").append(group.getStartSZ()).append("\n")
+                .append("        Ending Y Pel Height    ").append(group.getEndSZ()).append("\n");
+            for (int j = 0; j < group.getRecs(); ++j) {
+                sb.append("\n            ").append(j + 1)
+                    .append(". Pel Height= ").append(group.getEntry()[j].getYPelHeight()).append("\n")
+                    .append("               yMax=       ").append(group.getEntry()[j].getYMax()).append("\n")
+                    .append("               yMin=       ").append(group.getEntry()[j].getYMin()).append("\n");
+            }
+        }
+        return sb.toString();
+    }
+
+    /**
+     * Get a directory entry for this table.  This uniquely identifies the
+     * table in collections where there may be more than one instance of a
+     * particular table.
+     * @return A directory entry
+     */
+    public DirectoryEntry getDirectoryEntry() {
+        return _de;
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/VheaTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/VheaTable.java
new file mode 100644
index 0000000..0fc8bea
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/VheaTable.java
@@ -0,0 +1,148 @@
+/*
+ * $Id: VheaTable.java,v 1.1 2007-01-31 01:17:40 davidsch Exp $
+ *
+ * Typecast - The Font Development Environment
+ *
+ * Copyright (c) 2004-2007 David Schweinsberg
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+import jogamp.graph.font.typecast.ot.Fixed;
+
+/**
+ * Vertical Header Table
+ * @version $Id: VheaTable.java,v 1.1 2007-01-31 01:17:40 davidsch Exp $
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ */
+public class VheaTable implements Table {
+
+    private DirectoryEntry _de;
+    private int _version;
+    private short _ascent;
+    private short _descent;
+    private short _lineGap;
+    private short _advanceHeightMax;
+    private short _minTopSideBearing;
+    private short _minBottomSideBearing;
+    private short _yMaxExtent;
+    private short _caretSlopeRise;
+    private short _caretSlopeRun;
+    private short _metricDataFormat;
+    private int _numberOfLongVerMetrics;
+
+    protected VheaTable(DirectoryEntry de, DataInput di) throws IOException {
+        _de = (DirectoryEntry) de.clone();
+        _version = di.readInt();
+        _ascent = di.readShort();
+        _descent = di.readShort();
+        _lineGap = di.readShort();
+        _advanceHeightMax = di.readShort();
+        _minTopSideBearing = di.readShort();
+        _minBottomSideBearing = di.readShort();
+        _yMaxExtent = di.readShort();
+        _caretSlopeRise = di.readShort();
+        _caretSlopeRun = di.readShort();
+        for (int i = 0; i < 5; ++i) {
+            di.readShort();
+        }
+        _metricDataFormat = di.readShort();
+        _numberOfLongVerMetrics = di.readUnsignedShort();
+    }
+
+    public short getAdvanceHeightMax() {
+        return _advanceHeightMax;
+    }
+
+    public short getAscent() {
+        return _ascent;
+    }
+
+    public short getCaretSlopeRise() {
+        return _caretSlopeRise;
+    }
+
+    public short getCaretSlopeRun() {
+        return _caretSlopeRun;
+    }
+
+    public short getDescent() {
+        return _descent;
+    }
+
+    public short getLineGap() {
+        return _lineGap;
+    }
+
+    public short getMetricDataFormat() {
+        return _metricDataFormat;
+    }
+
+    public short getMinTopSideBearing() {
+        return _minTopSideBearing;
+    }
+
+    public short getMinBottomSideBearing() {
+        return _minBottomSideBearing;
+    }
+
+    public int getNumberOfLongVerMetrics() {
+        return _numberOfLongVerMetrics;
+    }
+
+    public int getType() {
+        return vhea;
+    }
+
+    public short getYMaxExtent() {
+        return _yMaxExtent;
+    }
+
+    public String toString() {
+        return new StringBuffer()
+            .append("'vhea' Table - Vertical Header\n------------------------------")
+            .append("\n        'vhea' version:       ").append(Fixed.floatValue(_version))
+            .append("\n        xAscender:            ").append(_ascent)
+            .append("\n        xDescender:           ").append(_descent)
+            .append("\n        xLineGap:             ").append(_lineGap)
+            .append("\n        advanceHeightMax:     ").append(_advanceHeightMax)
+            .append("\n        minTopSideBearing:    ").append(_minTopSideBearing)
+            .append("\n        minBottomSideBearing: ").append(_minBottomSideBearing)
+            .append("\n        yMaxExtent:           ").append(_yMaxExtent)
+            .append("\n        horizCaretSlopeNum:   ").append(_caretSlopeRise)
+            .append("\n        horizCaretSlopeDenom: ").append(_caretSlopeRun)
+            .append("\n        reserved0:            0")
+            .append("\n        reserved1:            0")
+            .append("\n        reserved2:            0")
+            .append("\n        reserved3:            0")
+            .append("\n        reserved4:            0")
+            .append("\n        metricDataFormat:     ").append(_metricDataFormat)
+            .append("\n        numOf_LongVerMetrics: ").append(_numberOfLongVerMetrics)
+            .toString();
+    }
+    
+    /**
+     * Get a directory entry for this table.  This uniquely identifies the
+     * table in collections where there may be more than one instance of a
+     * particular table.
+     * @return A directory entry
+     */
+    public DirectoryEntry getDirectoryEntry() {
+        return _de;
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/VmtxTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/VmtxTable.java
new file mode 100644
index 0000000..dcd1cd7
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/VmtxTable.java
@@ -0,0 +1,112 @@
+/*
+ * $Id: VmtxTable.java,v 1.1 2007-01-31 01:18:04 davidsch Exp $
+ *
+ * Typecast - The Font Development Environment
+ *
+ * Copyright (c) 2004-2007 David Schweinsberg
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package jogamp.graph.font.typecast.ot.table;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+/**
+ * Vertical Metrics Table
+ * @version $Id: VmtxTable.java,v 1.1 2007-01-31 01:18:04 davidsch Exp $
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ */
+public class VmtxTable implements Table {
+
+    private DirectoryEntry _de;
+    private int[] _vMetrics = null;
+    private short[] _topSideBearing = null;
+
+    protected VmtxTable(
+            DirectoryEntry de,
+            DataInput di,
+            VheaTable vhea,
+            MaxpTable maxp) throws IOException {
+        _de = (DirectoryEntry) de.clone();
+        _vMetrics = new int[vhea.getNumberOfLongVerMetrics()];
+        for (int i = 0; i < vhea.getNumberOfLongVerMetrics(); ++i) {
+            _vMetrics[i] =
+                    di.readUnsignedByte()<<24
+                    | di.readUnsignedByte()<<16
+                    | di.readUnsignedByte()<<8
+                    | di.readUnsignedByte();
+        }
+        int tsbCount = maxp.getNumGlyphs() - vhea.getNumberOfLongVerMetrics();
+        _topSideBearing = new short[tsbCount];
+        for (int i = 0; i < tsbCount; ++i) {
+            _topSideBearing[i] = di.readShort();
+        }
+    }
+
+    public int getAdvanceHeight(int i) {
+        if (_vMetrics == null) {
+            return 0;
+        }
+        if (i < _vMetrics.length) {
+            return _vMetrics[i] >> 16;
+        } else {
+            return _vMetrics[_vMetrics.length - 1] >> 16;
+        }
+    }
+
+    public short getTopSideBearing(int i) {
+        if (_vMetrics == null) {
+            return 0;
+        }
+        if (i < _vMetrics.length) {
+            return (short)(_vMetrics[i] & 0xffff);
+        } else {
+            return _topSideBearing[i - _vMetrics.length];
+        }
+    }
+
+    public int getType() {
+        return vmtx;
+    }
+
+    public String toString() {
+        StringBuffer sb = new StringBuffer();
+        sb.append("'vmtx' Table - Vertical Metrics\n-------------------------------\n");
+        sb.append("Size = ").append(_de.getLength()).append(" bytes, ")
+            .append(_vMetrics.length).append(" entries\n");
+        for (int i = 0; i < _vMetrics.length; i++) {
+            sb.append("        ").append(i)
+                .append(". advHeight: ").append(getAdvanceHeight(i))
+                .append(", TSdBear: ").append(getTopSideBearing(i))
+                .append("\n");
+        }
+        for (int i = 0; i < _topSideBearing.length; i++) {
+            sb.append("        TSdBear ").append(i + _vMetrics.length)
+                .append(": ").append(_topSideBearing[i])
+                .append("\n");
+        }
+        return sb.toString();
+    }
+
+    /**
+     * Get a directory entry for this table.  This uniquely identifies the
+     * table in collections where there may be more than one instance of a
+     * particular table.
+     * @return A directory entry
+     */
+    public DirectoryEntry getDirectoryEntry() {
+        return _de;
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/t2/T2Interpreter.java b/src/jogl/classes/jogamp/graph/font/typecast/t2/T2Interpreter.java
new file mode 100644
index 0000000..a05bd3b
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/t2/T2Interpreter.java
@@ -0,0 +1,1044 @@
+/*
+ * $Id: T2Interpreter.java,v 1.2 2007-07-26 11:10:18 davidsch Exp $
+ *
+ * Typecast - The Font Development Environment
+ *
+ * Copyright (c) 2004-2007 David Schweinsberg
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package jogamp.graph.font.typecast.t2;
+
+import java.util.ArrayList;
+
+import jogamp.graph.font.typecast.ot.Point;
+import jogamp.graph.font.typecast.ot.table.CharstringType2;
+
+
+
+/**
+ * Type 2 Charstring Interpreter.  Operator descriptions are quoted from
+ * Adobe's Type 2 Charstring Format document -- 5117.Type2.pdf.
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ * @version $Id: T2Interpreter.java,v 1.2 2007-07-26 11:10:18 davidsch Exp $
+ */
+public class T2Interpreter {
+    
+    private static final int ARGUMENT_STACK_LIMIT = 48;
+    private static final int SUBR_STACK_LIMIT = 10;
+    private static final int TRANSIENT_ARRAY_ELEMENT_COUNT = 32;
+    
+    private Number[] _argStack = new Number[ARGUMENT_STACK_LIMIT];
+    private int _argStackIndex = 0;
+    private int[] _subrStack = new int[SUBR_STACK_LIMIT];
+    private int _subrStackIndex = 0;
+    private Number[] _transientArray = new Number[TRANSIENT_ARRAY_ELEMENT_COUNT];
+    
+    private ArrayList<Point> _points;
+
+    /** Creates a new instance of T2Interpreter */
+    public T2Interpreter() {
+    }
+    
+    /**
+     * Moves the current point to a position at the relative coordinates
+     * (dx1, dy1).
+     */
+    private void _rmoveto() {
+        int dy1 = popArg().intValue();
+        int dx1 = popArg().intValue();
+        clearArg();
+        Point lastPoint = getLastPoint();
+        moveTo(lastPoint.x + dx1, lastPoint.y + dy1);
+    }
+
+    /**
+     * Moves the current point dx1 units in the horizontal direction.
+     */
+    private void _hmoveto() {
+        int dx1 = popArg().intValue();
+        clearArg();
+        Point lastPoint = getLastPoint();
+        moveTo(lastPoint.x + dx1, lastPoint.y);
+    }
+    
+    /**
+     * Moves the current point dy1 units in the vertical direction.
+     */
+    private void _vmoveto() {
+        int dy1 = popArg().intValue();
+        clearArg();
+        Point lastPoint = getLastPoint();
+        moveTo(lastPoint.x, lastPoint.y + dy1);
+    }
+    
+    /**
+     * Appends a line from the current point to a position at the
+     * relative coordinates dxa, dya. Additional rlineto operations are
+     * performed for all subsequent argument pairs. The number of
+     * lines is determined from the number of arguments on the stack.
+     */
+    private void _rlineto() {
+        int count = getArgCount() / 2;
+        int[] dx = new int[count];
+        int[] dy = new int[count];
+        for (int i = 0; i < count; ++i) {
+            dy[count - i - 1] = popArg().intValue();
+            dx[count - i - 1] = popArg().intValue();
+        }
+        for (int i = 0; i < count; ++i) {
+            Point lastPoint = getLastPoint();
+            lineTo(lastPoint.x + dx[i], lastPoint.y + dy[i]);
+        }
+        clearArg();
+    }
+    
+    /**
+     * Appends a horizontal line of length dx1 to the current point.
+     * With an odd number of arguments, subsequent argument pairs
+     * are interpreted as alternating values of dy and dx, for which
+     * additional lineto operators draw alternating vertical and
+     * horizontal lines. With an even number of arguments, the
+     * arguments are interpreted as alternating horizontal and
+     * vertical lines. The number of lines is determined from the
+     * number of arguments on the stack.
+     */
+    private void _hlineto() {
+        int count = getArgCount();
+        Number[] nums = new Number[count];
+        for (int i = 0; i < count; ++i) {
+            nums[count - i - 1] = popArg();
+        }
+        for (int i = 0; i < count; ++i) {
+            Point lastPoint = getLastPoint();
+            if (i % 2 == 0) {
+                lineTo(lastPoint.x + nums[i].intValue(), lastPoint.y);
+            } else {
+                lineTo(lastPoint.x, lastPoint.y + nums[i].intValue());
+            }
+        }
+        clearArg();
+    }
+    
+    /**
+     * Appends a vertical line of length dy1 to the current point. With
+     * an odd number of arguments, subsequent argument pairs are
+     * interpreted as alternating values of dx and dy, for which
+     * additional lineto operators draw alternating horizontal and
+     * vertical lines. With an even number of arguments, the
+     * arguments are interpreted as alternating vertical and
+     * horizontal lines. The number of lines is determined from the
+     * number of arguments on the stack.
+     */
+    private void _vlineto() {
+        int count = getArgCount();
+        Number[] nums = new Number[count];
+        for (int i = 0; i < count; ++i) {
+            nums[count - i - 1] = popArg();
+        }
+        for (int i = 0; i < count; ++i) {
+            Point lastPoint = getLastPoint();
+            if (i % 2 == 0) {
+                lineTo(lastPoint.x, lastPoint.y + nums[i].intValue());
+            } else {
+                lineTo(lastPoint.x + nums[i].intValue(), lastPoint.y);
+            }
+        }
+        clearArg();
+    }
+    
+    /**
+     * Appends a Bezier curve, defined by dxa...dyc, to the current
+     * point. For each subsequent set of six arguments, an additional
+     * curve is appended to the current point. The number of curve
+     * segments is determined from the number of arguments on the
+     * number stack and is limited only by the size of the number
+     * stack.
+     */
+    private void _rrcurveto() {
+        int count = getArgCount() / 6;
+        int[] dxa = new int[count];
+        int[] dya = new int[count];
+        int[] dxb = new int[count];
+        int[] dyb = new int[count];
+        int[] dxc = new int[count];
+        int[] dyc = new int[count];
+        for (int i = 0; i < count; ++i) {
+            dyc[count - i - 1] = popArg().intValue();
+            dxc[count - i - 1] = popArg().intValue();
+            dyb[count - i - 1] = popArg().intValue();
+            dxb[count - i - 1] = popArg().intValue();
+            dya[count - i - 1] = popArg().intValue();
+            dxa[count - i - 1] = popArg().intValue();
+        }
+        for (int i = 0; i < count; ++i) {
+            Point lastPoint = getLastPoint();
+            int xa = lastPoint.x + dxa[i];
+            int ya = lastPoint.y + dya[i];
+            int xb = xa + dxb[i];
+            int yb = ya + dyb[i];
+            int xc = xb + dxc[i];
+            int yc = yb + dyc[i];
+            curveTo(xa, ya, xb, yb, xc, yc);
+        }
+        clearArg();
+    }
+    
+    /**
+     * Appends one or more Bezier curves, as described by the
+     * dxa...dxc set of arguments, to the current point. For each curve,
+     * if there are 4 arguments, the curve starts and ends horizontal.
+     * The first curve need not start horizontal (the odd argument
+     * case). Note the argument order for the odd argument case.
+     */
+    private void _hhcurveto() {
+        int count = getArgCount() / 4;
+        int dy1 = 0;
+        int[] dxa = new int[count];
+        int[] dxb = new int[count];
+        int[] dyb = new int[count];
+        int[] dxc = new int[count];
+        for (int i = 0; i < count; ++i) {
+            dxc[count - i - 1] = popArg().intValue();
+            dyb[count - i - 1] = popArg().intValue();
+            dxb[count - i - 1] = popArg().intValue();
+            dxa[count - i - 1] = popArg().intValue();
+        }
+        if (getArgCount() == 1) {
+            dy1 = popArg().intValue();
+        }
+        for (int i = 0; i < count; ++i) {
+            Point lastPoint = getLastPoint();
+            int xa = lastPoint.x + dxa[i];
+            int ya = lastPoint.y + (i == 0 ? dy1 : 0);
+            int xb = xa + dxb[i];
+            int yb = ya + dyb[i];
+            int xc = xb + dxc[i];
+            int yc = yb;
+            curveTo(xa, ya, xb, yb, xc, yc);
+        }
+        clearArg();
+    }
+    
+    /**
+     * Appends one or more Bezier curves to the current point. The
+     * tangent for the first Bezier must be horizontal, and the second
+     * must be vertical (except as noted below).
+     * If there is a multiple of four arguments, the curve starts
+     * horizontal and ends vertical. Note that the curves alternate
+     * between start horizontal, end vertical, and start vertical, and
+     * end horizontal. The last curve (the odd argument case) need not
+     * end horizontal/vertical.
+     */
+    private void _hvcurveto() {
+        if (getArgCount() % 8 <= 1) {
+            int count = getArgCount() / 8;
+            int[] dxa = new int[count];
+            int[] dxb = new int[count];
+            int[] dyb = new int[count];
+            int[] dyc = new int[count];
+            int[] dyd = new int[count];
+            int[] dxe = new int[count];
+            int[] dye = new int[count];
+            int[] dxf = new int[count];
+            int dyf = 0;
+            if (getArgCount() % 8 == 1) {
+                dyf = popArg().intValue();
+            }
+            for (int i = 0; i < count; ++i) {
+                dxf[count - i - 1] = popArg().intValue();
+                dye[count - i - 1] = popArg().intValue();
+                dxe[count - i - 1] = popArg().intValue();
+                dyd[count - i - 1] = popArg().intValue();
+                dyc[count - i - 1] = popArg().intValue();
+                dyb[count - i - 1] = popArg().intValue();
+                dxb[count - i - 1] = popArg().intValue();
+                dxa[count - i - 1] = popArg().intValue();
+            }
+            for (int i = 0; i < count; ++i) {
+                Point lastPoint = getLastPoint();
+                int xa = lastPoint.x + dxa[i];
+                int ya = lastPoint.y;
+                int xb = xa + dxb[i];
+                int yb = ya + dyb[i];
+                int xc = xb;
+                int yc = yb + dyc[i];
+                int xd = xc;
+                int yd = yc + dyd[i];
+                int xe = xd + dxe[i];
+                int ye = yd + dye[i];
+                int xf = xe + dxf[i];
+                int yf = ye + dyf;
+                curveTo(xa, ya, xb, yb, xc, yc);
+                curveTo(xd, yd, xe, ye, xf, yf);
+            }
+        } else {
+            int count = getArgCount() / 8;
+            int[] dya = new int[count];
+            int[] dxb = new int[count];
+            int[] dyb = new int[count];
+            int[] dxc = new int[count];
+            int[] dxd = new int[count];
+            int[] dxe = new int[count];
+            int[] dye = new int[count];
+            int[] dyf = new int[count];
+            int dxf = 0;
+            if (getArgCount() % 8 == 1) {
+                dxf = popArg().intValue();
+            }
+            for (int i = 0; i < count; ++i) {
+                dyf[count - i - 1] = popArg().intValue();
+                dye[count - i - 1] = popArg().intValue();
+                dxe[count - i - 1] = popArg().intValue();
+                dxd[count - i - 1] = popArg().intValue();
+                dxc[count - i - 1] = popArg().intValue();
+                dyb[count - i - 1] = popArg().intValue();
+                dxb[count - i - 1] = popArg().intValue();
+                dya[count - i - 1] = popArg().intValue();
+            }
+            int dy3 = popArg().intValue();
+            int dy2 = popArg().intValue();
+            int dx2 = popArg().intValue();
+            int dx1 = popArg().intValue();
+            for (int i = 0; i < count; ++i) {
+                Point lastPoint = getLastPoint();
+                int xa = lastPoint.x;
+                int ya = lastPoint.y + dya[i];
+                int xb = xa + dxb[i];
+                int yb = ya + dyb[i];
+                int xc = xb + dxc[i];
+                int yc = yb;
+                int xd = xc + dxd[i];
+                int yd = yc;
+                int xe = xd + dxe[i];
+                int ye = yd + dye[i];
+                int xf = xe + dxf;
+                int yf = ye + dyf[i];
+                curveTo(xa, ya, xb, yb, xc, yc);
+                curveTo(xd, yd, xe, ye, xf, yf);
+                
+                // What on earth do we do with dx1, dx2, dy2 and dy3?
+            }
+        }
+        clearArg();
+    }
+    
+    /**
+     * Is equivalent to one rrcurveto for each set of six arguments
+     * dxa...dyc, followed by exactly one rlineto using the dxd, dyd
+     * arguments. The number of curves is determined from the count
+     * on the argument stack.
+     */
+    private void _rcurveline() {
+        int count = (getArgCount() - 2) / 6;
+        int[] dxa = new int[count];
+        int[] dya = new int[count];
+        int[] dxb = new int[count];
+        int[] dyb = new int[count];
+        int[] dxc = new int[count];
+        int[] dyc = new int[count];
+        int dyd = popArg().intValue();
+        int dxd = popArg().intValue();
+        for (int i = 0; i < count; ++i) {
+            dyc[count - i - 1] = popArg().intValue();
+            dxc[count - i - 1] = popArg().intValue();
+            dyb[count - i - 1] = popArg().intValue();
+            dxb[count - i - 1] = popArg().intValue();
+            dya[count - i - 1] = popArg().intValue();
+            dxa[count - i - 1] = popArg().intValue();
+        }
+        int xc = 0;
+        int yc = 0;
+        for (int i = 0; i < count; ++i) {
+            Point lastPoint = getLastPoint();
+            int xa = lastPoint.x + dxa[i];
+            int ya = lastPoint.y + dya[i];
+            int xb = xa + dxb[i];
+            int yb = ya + dyb[i];
+            xc = xb + dxc[i];
+            yc = yb + dyc[i];
+            curveTo(xa, ya, xb, yb, xc, yc);
+        }
+        lineTo(xc + dxd, yc + dyd);
+        clearArg();
+    }
+    
+    /**
+     * Is equivalent to one rlineto for each pair of arguments beyond
+     * the six arguments dxb...dyd needed for the one rrcurveto
+     * command. The number of lines is determined from the count of
+     * items on the argument stack.
+     */
+    private void _rlinecurve() {
+        int count = (getArgCount() - 6) / 2;
+        int[] dxa = new int[count];
+        int[] dya = new int[count];
+        int dyd = popArg().intValue();
+        int dxd = popArg().intValue();
+        int dyc = popArg().intValue();
+        int dxc = popArg().intValue();
+        int dyb = popArg().intValue();
+        int dxb = popArg().intValue();
+        for (int i = 0; i < count; ++i) {
+            dya[count - i - 1] = popArg().intValue();
+            dxa[count - i - 1] = popArg().intValue();
+        }
+        int xa = 0;
+        int ya = 0;
+        for (int i = 0; i < count; ++i) {
+            Point lastPoint = getLastPoint();
+            xa = lastPoint.x + dxa[i];
+            ya = lastPoint.y + dya[i];
+            lineTo(xa, ya);
+        }
+        int xb = xa + dxb;
+        int yb = ya + dyb;
+        int xc = xb + dxc;
+        int yc = yb + dyc;
+        int xd = xc + dxd;
+        int yd = yc + dyd;
+        curveTo(xb, yb, xc, yc, xd, yd);
+        clearArg();
+    }
+    
+    /**
+     * Appends one or more Bezier curves to the current point, where
+     * the first tangent is vertical and the second tangent is horizontal.
+     * This command is the complement of hvcurveto; see the
+     * description of hvcurveto for more information.
+     */
+    private void _vhcurveto() {
+        if (getArgCount() % 8 <= 1) {
+            int count = getArgCount() / 8;
+            int[] dya = new int[count];
+            int[] dxb = new int[count];
+            int[] dyb = new int[count];
+            int[] dxc = new int[count];
+            int[] dxd = new int[count];
+            int[] dxe = new int[count];
+            int[] dye = new int[count];
+            int[] dyf = new int[count];
+            int dxf = 0;
+            if (getArgCount() % 8 == 1) {
+                dxf = popArg().intValue();
+            }
+            for (int i = 0; i < count; ++i) {
+                dyf[count - i - 1] = popArg().intValue();
+                dye[count - i - 1] = popArg().intValue();
+                dxe[count - i - 1] = popArg().intValue();
+                dxd[count - i - 1] = popArg().intValue();
+                dxc[count - i - 1] = popArg().intValue();
+                dyb[count - i - 1] = popArg().intValue();
+                dxb[count - i - 1] = popArg().intValue();
+                dya[count - i - 1] = popArg().intValue();
+            }
+            for (int i = 0; i < count; ++i) {
+                Point lastPoint = getLastPoint();
+                int xa = lastPoint.x;
+                int ya = lastPoint.y + dya[i];
+                int xb = xa + dxb[i];
+                int yb = ya + dyb[i];
+                int xc = xb + dxc[i];
+                int yc = yb;
+                int xd = xc + dxd[i];
+                int yd = yc;
+                int xe = xd + dxe[i];
+                int ye = yd + dye[i];
+                int xf = xe + dxf;
+                int yf = ye + dyf[i];
+                curveTo(xa, ya, xb, yb, xc, yc);
+                curveTo(xd, yd, xe, ye, xf, yf);
+            }
+        } else {
+            int foo = 0;
+        }
+        clearArg();
+    }
+    
+    /**
+     * Appends one or more curves to the current point. If the argument
+     * count is a multiple of four, the curve starts and ends vertical. If
+     * the argument count is odd, the first curve does not begin with a
+     * vertical tangent.
+     */
+    private void _vvcurveto() {
+        
+        clearArg();
+    }
+    
+    /**
+     * Causes two B�zier curves, as described by the arguments (as
+     * shown in Figure 2 below), to be rendered as a straight line when
+     * the flex depth is less than fd /100 device pixels, and as curved lines
+     * when the flex depth is greater than or equal to fd/100 device
+     * pixels.
+     */
+    private void _flex() {
+        
+        clearArg();
+    }
+    
+    /**
+     * Causes the two curves described by the arguments dx1...dx6 to
+     * be rendered as a straight line when the flex depth is less than
+     * 0.5 (that is, fd is 50) device pixels, and as curved lines when the
+     * flex depth is greater than or equal to 0.5 device pixels.
+     */
+    private void _hflex() {
+        
+        clearArg();
+    }
+    
+    /**
+     * Causes the two curves described by the arguments to be
+     * rendered as a straight line when the flex depth is less than 0.5
+     * device pixels, and as curved lines when the flex depth is greater
+     * than or equal to 0.5 device pixels.
+     */
+    private void _hflex1() {
+        
+        clearArg();
+    }
+    
+    /**
+     * Causes the two curves described by the arguments to be
+     * rendered as a straight line when the flex depth is less than 0.5
+     * device pixels, and as curved lines when the flex depth is greater
+     * than or equal to 0.5 device pixels.
+     */
+    private void _flex1() {
+        
+        clearArg();
+    }
+    
+    /**
+     * Finishes a charstring outline definition, and must be the
+     * last operator in a character�s outline.
+     */
+    private void _endchar() {
+        endContour();
+        clearArg();
+    }
+    
+    private void _hstem() {
+        
+        clearArg();
+    }
+    
+    private void _vstem() {
+        
+        clearArg();
+    }
+    
+    private void _hstemhm() {
+        
+        clearArg();
+    }
+    
+    private void _vstemhm() {
+        
+        clearArg();
+    }
+    
+    private void _hintmask() {
+        
+        clearArg();
+    }
+    
+    private void _cntrmask() {
+        
+        clearArg();
+    }
+    
+    /**
+     * Returns the absolute value of num.
+     */
+    private void _abs() {
+        double num = popArg().doubleValue();
+        pushArg(Math.abs(num));
+    }
+    
+    /**
+     * Returns the sum of the two numbers num1 and num2.
+     */
+    private void _add() {
+        double num2 = popArg().doubleValue();
+        double num1 = popArg().doubleValue();
+        pushArg(num1 + num2);
+    }
+    
+    /**
+     * Returns the result of subtracting num2 from num1.
+     */
+    private void _sub() {
+        double num2 = popArg().doubleValue();
+        double num1 = popArg().doubleValue();
+        pushArg(num1 - num2);
+    }
+    
+    /**
+     * Returns the quotient of num1 divided by num2. The result is
+     * undefined if overflow occurs and is zero for underflow.
+     */
+    private void _div() {
+        double num2 = popArg().doubleValue();
+        double num1 = popArg().doubleValue();
+        pushArg(num1 / num2);
+    }
+    
+    /**
+     * Returns the negative of num.
+     */
+    private void _neg() {
+        double num = popArg().doubleValue();
+        pushArg(-num);
+    }
+    
+    /**
+     * Returns a pseudo random number num2 in the range (0,1], that
+     * is, greater than zero and less than or equal to one.
+     */
+    private void _random() {
+        pushArg(1.0 - Math.random());
+    }
+    
+    /**
+     * Returns the product of num1 and num2. If overflow occurs, the
+     * result is undefined, and zero is returned for underflow.
+     */
+    private void _mul() {
+        double num2 = popArg().doubleValue();
+        double num1 = popArg().doubleValue();
+        pushArg(num1 * num2);
+    }
+    
+    /**
+     * Returns the square root of num. If num is negative, the result is
+     * undefined.
+     */
+    private void _sqrt() {
+        double num = popArg().doubleValue();
+        pushArg(Math.sqrt(num));
+    }
+    
+    /**
+     * Removes the top element num from the Type 2 argument stack.
+     */
+    private void _drop() {
+        popArg();
+    }
+    
+    /**
+     * Exchanges the top two elements on the argument stack.
+     */
+    private void _exch() {
+        Number num2 = popArg();
+        Number num1 = popArg();
+        pushArg(num2);
+        pushArg(num1);
+    }
+    
+    /**
+     * Retrieves the element i from the top of the argument stack and
+     * pushes a copy of that element onto that stack. If i is negative,
+     * the top element is copied. If i is greater than X, the operation is
+     * undefined.
+     */
+    private void _index() {
+        int i = popArg().intValue();
+        Number[] nums = new Number[i];
+        for (int j = 0; j < i; ++j) {
+            nums[j] = popArg();
+        }
+        for (int j = i - 1; j >= 0; --j) {
+            pushArg(nums[j]);
+        }
+        pushArg(nums[i]);
+    }
+    
+    /**
+     * Performs a circular shift of the elements num(N�1) ... num0 on
+     * the argument stack by the amount J. Positive J indicates upward
+     * motion of the stack; negative J indicates downward motion.
+     * The value N must be a non-negative integer, otherwise the
+     * operation is undefined.
+     */
+    private void _roll() {
+        int j = popArg().intValue();
+        int n = popArg().intValue();
+        Number[] nums = new Number[n];
+        for (int i = 0; i < n; ++i) {
+            nums[i] = popArg();
+        }
+        for (int i = n - 1; i >= 0; --i) {
+            pushArg(nums[(n + i + j) % n]);
+        }
+    }
+    
+    /**
+     * Duplicates the top element on the argument stack.
+     */
+    private void _dup() {
+        Number any = popArg();
+        pushArg(any);
+        pushArg(any);
+    }
+    
+    /**
+     * Stores val into the transient array at the location given by i.
+     */
+    private void _put() {
+        int i = popArg().intValue();
+        Number val = popArg();
+        _transientArray[i] = val;
+    }
+    
+    /**
+     * Retrieves the value stored in the transient array at the location
+     * given by i and pushes the value onto the argument stack. If get
+     * is executed prior to put for i during execution of the current
+     * charstring, the value returned is undefined.
+     */
+    private void _get() {
+        int i = popArg().intValue();
+        pushArg(_transientArray[i]);
+    }
+    
+    /**
+     * Puts a 1 on the stack if num1 and num2 are both non-zero, and
+     * puts a 0 on the stack if either argument is zero.
+     */
+    private void _and() {
+        double num2 = popArg().doubleValue();
+        double num1 = popArg().doubleValue();
+        pushArg((num1!=0.0) && (num2!=0.0) ? 1 : 0);
+    }
+    
+    /**
+     * Puts a 1 on the stack if either num1 or num2 are non-zero, and
+     * puts a 0 on the stack if both arguments are zero.
+     */
+    private void _or() {
+        double num2 = popArg().doubleValue();
+        double num1 = popArg().doubleValue();
+        pushArg((num1!=0.0) || (num2!=0.0) ? 1 : 0);
+    }
+    
+    /**
+     * Returns a 0 if num1 is non-zero; returns a 1 if num1 is zero.
+     */
+    private void _not() {
+        double num1 = popArg().doubleValue();
+        pushArg((num1!=0.0) ? 0 : 1);
+    }
+    
+    /**
+     * Puts a 1 on the stack if num1 equals num2, otherwise a 0 (zero)
+     * is put on the stack.
+     */
+    private void _eq() {
+        double num2 = popArg().doubleValue();
+        double num1 = popArg().doubleValue();
+        pushArg(num1 == num2 ? 1 : 0);
+    }
+    
+    /**
+     * Leaves the value s1 on the stack if v1 ? v2, or leaves s2 on the
+     * stack if v1 > v2. The value of s1 and s2 is usually the biased
+     * number of a subroutine.
+     */
+    private void _ifelse() {
+        double v2 = popArg().doubleValue();
+        double v1 = popArg().doubleValue();
+        Number s2 = popArg();
+        Number s1 = popArg();
+        pushArg(v1 <= v2 ? s1 : s2);
+    }
+    
+    /**
+     * Calls a charstring subroutine with index subr# (actually the subr
+     * number plus the subroutine bias number, as described in section
+     * 2.3) in the Subrs array. Each element of the Subrs array is a
+     * charstring encoded like any other charstring. Arguments
+     * pushed on the Type 2 argument stack prior to calling the
+     * subroutine, and results pushed on this stack by the subroutine,
+     * act according to the manner in which the subroutine is coded.
+     * Calling an undefined subr (gsubr) has undefined results.
+     */
+    private void _callsubr() {
+        
+    }
+    
+    /**
+     * Operates in the same manner as callsubr except that it calls a
+     * global subroutine.
+     */
+    private void _callgsubr() {
+        
+    }
+    
+    /**
+     * Returns from either a local or global charstring subroutine, and
+     * continues execution after the corresponding call(g)subr.
+     */
+    private void _return() {
+        
+    }
+    
+    public Point[] execute(CharstringType2 cs) {
+        _points = new ArrayList<Point>();
+        cs.resetIP();
+        while (cs.moreBytes()) {
+            while (cs.isOperandAtIndex()) {
+                pushArg(cs.nextOperand());
+            }
+            int operator = cs.nextByte();
+            if (operator == 12) {
+                operator = cs.nextByte();
+
+                // Two-byte operators
+                switch (operator) {
+                case T2Mnemonic.AND:
+                    _and();
+                    break;
+                case T2Mnemonic.OR:
+                    _or();
+                    break;
+                case T2Mnemonic.NOT:
+                    _not();
+                    break;
+                case T2Mnemonic.ABS:
+                    _abs();
+                    break;
+                case T2Mnemonic.ADD:
+                    _add();
+                    break;
+                case T2Mnemonic.SUB:
+                    _sub();
+                    break;
+                case T2Mnemonic.DIV:
+                    _div();
+                    break;
+                case T2Mnemonic.NEG:
+                    _neg();
+                    break;
+                case T2Mnemonic.EQ:
+                    _eq();
+                    break;
+                case T2Mnemonic.DROP:
+                    _drop();
+                    break;
+                case T2Mnemonic.PUT:
+                    _put();
+                    break;
+                case T2Mnemonic.GET:
+                    _get();
+                    break;
+                case T2Mnemonic.IFELSE:
+                    _ifelse();
+                    break;
+                case T2Mnemonic.RANDOM:
+                    _random();
+                    break;
+                case T2Mnemonic.MUL:
+                    _mul();
+                    break;
+                case T2Mnemonic.SQRT:
+                    _sqrt();
+                    break;
+                case T2Mnemonic.DUP:
+                    _dup();
+                    break;
+                case T2Mnemonic.EXCH:
+                    _exch();
+                    break;
+                case T2Mnemonic.INDEX:
+                    _index();
+                    break;
+                case T2Mnemonic.ROLL:
+                    _roll();
+                    break;
+                case T2Mnemonic.HFLEX:
+                    _hflex();
+                    break;
+                case T2Mnemonic.FLEX:
+                    _flex();
+                    break;
+                case T2Mnemonic.HFLEX1:
+                    _hflex1();
+                    break;
+                case T2Mnemonic.FLEX1:
+                    _flex1();
+                    break;
+                default:
+                    //throw new Exception();
+                    return null;
+                }
+            } else {
+
+                // One-byte operators
+                switch (operator) {
+                case T2Mnemonic.HSTEM:
+                    _hstem();
+                    break;
+                case T2Mnemonic.VSTEM:
+                    _vstem();
+                    break;
+                case T2Mnemonic.VMOVETO:
+                    _vmoveto();
+                    break;
+                case T2Mnemonic.RLINETO:
+                    _rlineto();
+                    break;
+                case T2Mnemonic.HLINETO:
+                    _hlineto();
+                    break;
+                case T2Mnemonic.VLINETO:
+                    _vlineto();
+                    break;
+                case T2Mnemonic.RRCURVETO:
+                    _rrcurveto();
+                    break;
+                case T2Mnemonic.CALLSUBR:
+                    _callsubr();
+                    break;
+                case T2Mnemonic.RETURN:
+                    _return();
+                    break;
+                case T2Mnemonic.ENDCHAR:
+                    _endchar();
+                    break;
+                case T2Mnemonic.HSTEMHM:
+                    _hstemhm();
+                    break;
+                case T2Mnemonic.HINTMASK:
+                    _hintmask();
+                    break;
+                case T2Mnemonic.CNTRMASK:
+                    _cntrmask();
+                    break;
+                case T2Mnemonic.RMOVETO:
+                    _rmoveto();
+                    break;
+                case T2Mnemonic.HMOVETO:
+                    _hmoveto();
+                    break;
+                case T2Mnemonic.VSTEMHM:
+                    _vstemhm();
+                    break;
+                case T2Mnemonic.RCURVELINE:
+                    _rcurveline();
+                    break;
+                case T2Mnemonic.RLINECURVE:
+                    _rlinecurve();
+                    break;
+                case T2Mnemonic.VVCURVETO:
+                    _vvcurveto();
+                    break;
+                case T2Mnemonic.HHCURVETO:
+                    _hhcurveto();
+                    break;
+                case T2Mnemonic.CALLGSUBR:
+                    _callgsubr();
+                    break;
+                case T2Mnemonic.VHCURVETO:
+                    _vhcurveto();
+                    break;
+                case T2Mnemonic.HVCURVETO:
+                    _hvcurveto();
+                    break;
+                default:
+                    //throw new Exception();
+                    return null;
+                }
+            }
+        }
+        Point[] pointArray = new Point[_points.size()];
+        _points.toArray(pointArray);
+        return pointArray;
+    }
+
+    /**
+     * The number of arguments on the argument stack
+     */
+    private int getArgCount() {
+        return _argStackIndex;
+    }
+    
+    /**
+     * Pop a value off the argument stack
+     */
+    private Number popArg() {
+        return _argStack[--_argStackIndex];
+    }
+
+    /**
+     * Push a value on to the argument stack
+     */
+    private void pushArg(Number n) {
+        _argStack[_argStackIndex++] = n;
+    }
+    
+    /**
+     * Pop a value off the subroutine stack
+     */
+    private int popSubr() {
+        return _subrStack[--_subrStackIndex];
+    }
+
+    /**
+     * Push a value on to the subroutine stack
+     */
+    private void pushSubr(int n) {
+        _subrStack[_subrStackIndex++] = n;
+    }
+    
+    /**
+     * Clear the argument stack
+     */
+    private void clearArg() {
+        _argStackIndex = 0;
+    }
+    
+    private Point getLastPoint() {
+        int size = _points.size();
+        if (size > 0) {
+            return _points.get(size - 1);
+        } else {
+            return new Point(0, 0, true, false);
+        }
+    }
+    
+    private void moveTo(int x, int y) {
+        endContour();
+        _points.add(new Point(x, y, true, false));
+    }
+    
+    private void lineTo(int x, int y) {
+        _points.add(new Point(x, y, true, false));
+    }
+    
+    private void curveTo(int cx1, int cy1, int cx2, int cy2, int x, int y) {
+        _points.add(new Point(cx1, cy1, false, false));
+        _points.add(new Point(cx2, cy2, false, false));
+        _points.add(new Point(x, y, true, false));
+    }
+    
+    private void endContour() {
+        Point lastPoint = getLastPoint();
+        if (lastPoint != null) {
+            lastPoint.endOfContour = true;
+        }
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/t2/T2Mnemonic.java b/src/jogl/classes/jogamp/graph/font/typecast/t2/T2Mnemonic.java
new file mode 100644
index 0000000..6e7589c
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/t2/T2Mnemonic.java
@@ -0,0 +1,86 @@
+/*
+ * $Id: T2Mnemonic.java,v 1.1 2007-02-21 12:30:48 davidsch Exp $
+ *
+ * Typecast - The Font Development Environment
+ *
+ * Copyright (c) 2004-2007 David Schweinsberg
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package jogamp.graph.font.typecast.t2;
+
+/**
+ * The Mnemonic representations of the Type 2 charstring instruction set.
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ * @version $Id: T2Mnemonic.java,v 1.1 2007-02-21 12:30:48 davidsch Exp $
+ */
+public class T2Mnemonic {
+
+    /**
+     * One byte operators
+     */
+    public static final short HSTEM = 0x01;
+    public static final short VSTEM = 0x03;
+    public static final short VMOVETO = 0x04;
+    public static final short RLINETO = 0x05;
+    public static final short HLINETO = 0x06;
+    public static final short VLINETO = 0x07;
+    public static final short RRCURVETO = 0x08;
+    public static final short CALLSUBR = 0x0a;
+    public static final short RETURN = 0x0b;
+    public static final short ESCAPE = 0x0c;
+    public static final short ENDCHAR = 0x0e;
+    public static final short HSTEMHM = 0x12;
+    public static final short HINTMASK = 0x13;
+    public static final short CNTRMASK = 0x14;
+    public static final short RMOVETO = 0x15;
+    public static final short HMOVETO = 0x16;
+    public static final short VSTEMHM = 0x17;
+    public static final short RCURVELINE = 0x18;
+    public static final short RLINECURVE = 0x19;
+    public static final short VVCURVETO = 0x1a;
+    public static final short HHCURVETO = 0x1b;
+    public static final short CALLGSUBR = 0x1d;
+    public static final short VHCURVETO = 0x1e;
+    public static final short HVCURVETO = 0x1f;
+
+    /**
+     * Two byte operators
+     */
+    public static final short DOTSECTION = 0x00;
+    public static final short AND = 0x03;
+    public static final short OR = 0x04;
+    public static final short NOT = 0x05;
+    public static final short ABS = 0x09;
+    public static final short ADD = 0x0a;
+    public static final short SUB = 0x0b;
+    public static final short DIV = 0x0c;
+    public static final short NEG = 0x0e;
+    public static final short EQ = 0x0f;
+    public static final short DROP = 0x12;
+    public static final short PUT = 0x14;
+    public static final short GET = 0x15;
+    public static final short IFELSE = 0x16;
+    public static final short RANDOM = 0x17;
+    public static final short MUL = 0x18;
+    public static final short SQRT = 0x1a;
+    public static final short DUP = 0x1b;
+    public static final short EXCH = 0x1c;
+    public static final short INDEX = 0x1d;
+    public static final short ROLL = 0x1e;
+    public static final short HFLEX = 0x22;
+    public static final short FLEX = 0x23;
+    public static final short HFLEX1 = 0x24;
+    public static final short FLEX1 = 0x25;
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/tt/engine/GraphicsState.java b/src/jogl/classes/jogamp/graph/font/typecast/tt/engine/GraphicsState.java
new file mode 100644
index 0000000..b8605ac
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/tt/engine/GraphicsState.java
@@ -0,0 +1,50 @@
+/*
+ * $Id: GraphicsState.java,v 1.1.1.1 2004-12-05 23:15:01 davidsch Exp $
+ *
+ * Typecast - The Font Development Environment
+ *
+ * Copyright (c) 2004 David Schweinsberg
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package jogamp.graph.font.typecast.tt.engine;
+
+/**
+ * Maintains the graphics state whilst interpreting hinting instructions.
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ * @version $Id: GraphicsState.java,v 1.1.1.1 2004-12-05 23:15:01 davidsch Exp $
+ */
+class GraphicsState {
+
+    public boolean auto_flip = true;
+    public int control_value_cut_in = 0;
+    public int delta_base = 9;
+    public int delta_shift = 3;
+    public int dual_projection_vectors;
+    public int[] freedom_vector = new int[2];
+    public int zp0 = 1;
+    public int zp1 = 1;
+    public int zp2 = 1;
+    public int instruction_control = 0;
+    public int loop = 1;
+    public int minimum_distance = 1;
+    public int[] projection_vector = new int[2];
+    public int round_state = 1;
+    public int rp0 = 0;
+    public int rp1 = 0;
+    public int rp2 = 0;
+    public int scan_control = 0;
+    public int single_width_cut_in = 0;
+    public int single_width_value = 0;
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/tt/engine/Interpreter.java b/src/jogl/classes/jogamp/graph/font/typecast/tt/engine/Interpreter.java
new file mode 100644
index 0000000..a659a70
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/tt/engine/Interpreter.java
@@ -0,0 +1,1357 @@
+/*
+ * $Id: Interpreter.java,v 1.1.1.1 2004-12-05 23:15:05 davidsch Exp $
+ *
+ * Typecast - The Font Development Environment
+ *
+ * Copyright (c) 2004 David Schweinsberg
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package jogamp.graph.font.typecast.tt.engine;
+
+import jogamp.graph.font.typecast.ot.Mnemonic;
+import jogamp.graph.font.typecast.ot.Point;
+
+/**
+ * The interpreter shall remain ignorant of the table structure - the table
+ * data will be extracted by supporting classes, whether it be the Parser
+ * or some other.
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ * @version $Id: Interpreter.java,v 1.1.1.1 2004-12-05 23:15:05 davidsch Exp $
+ */
+public class Interpreter {
+
+    private Parser parser = null;
+    private GraphicsState gs = new GraphicsState();
+    private Point[][] zone = new Point[2][];
+    private int[] stack = null;
+    private int[] store = null;
+    private int[] cvt = new int[256];
+    private int[] functionMap = null;
+    private int stackIndex = 0;
+    private boolean inFuncDef = false;
+
+    public Interpreter(int stackMax, int storeMax, int funcMax) {
+        zone[0] = new Point[256];
+        zone[1] = new Point[256];
+        stack = new int[stackMax];
+        store = new int[storeMax];
+        functionMap = new int[funcMax];
+    }
+
+    /**
+     * ABSolute value
+     */
+    private void _abs() {
+        int n = pop();
+        if (n >= 0) {
+            push(n);
+        } else {
+            push(-n);
+        }
+    }
+
+    /**
+     * ADD
+     */
+    private void _add() {
+        int n1 = pop();
+        int n2 = pop();
+        push(n2 + n1);
+    }
+
+    private void _alignpts() {
+        pop();
+        pop();
+    }
+
+    /**
+     *
+     *
+     * USES: loop
+     */
+    private void _alignrp() {
+        while (gs.loop-- > 0) {
+            pop();
+        }
+        gs.loop = 1;
+    }
+
+    /**
+     * logical AND
+     */
+    private void _and() {
+        int e2 = pop();
+        int e1 = pop();
+        push(((e1 != 0) && (e2 != 0)) ? 1 : 0);
+    }
+
+    /**
+     * CALL function
+     */
+    private void _call() {
+        execute(functionMap[pop()]);
+    }
+
+    /**
+     * CEILING
+     */
+    private void _ceiling() {
+        int n = pop();
+        if (n >= 0) {
+            push((n & 0xffc0) + (((n & 0x3f) != 0) ? 0x40 : 0));
+        } else {
+            push(n & 0xffc0);
+        }
+    }
+
+    /**
+     * Copy the INDEXed element to the top of the stack
+     */
+    private void _cindex() {
+        push(stack[stackIndex - pop()]);
+    }
+
+    /**
+     * CLEAR the entire stack
+     */
+    private void _clear() {
+        stackIndex = 0;
+    }
+
+    private void _debug() {
+        pop();
+    }
+
+    /**
+     * DELTA exception C1
+     */
+    private void _deltac1() {
+        int n = pop();
+        for (int i = 0; i < n; i++) {
+            pop();    // pn
+            pop();    // argn
+        }
+    }
+
+    /**
+     * DELTA exception C2
+     */
+    private void _deltac2() {
+        int n = pop();
+        for (int i = 0; i < n; i++) {
+            pop();    // pn
+            pop();    // argn
+        }
+    }
+
+    /**
+     * DELTA exception C3
+     */
+    private void _deltac3() {
+        int n = pop();
+        for (int i = 0; i < n; i++) {
+            pop();    // pn
+            pop();    // argn
+        }
+    }
+
+    /**
+     * DELTA exception P1
+     */
+    private void _deltap1() {
+        int n = pop();
+        for (int i = 0; i < n; i++) {
+            pop();    // pn
+            pop();    // argn
+        }
+    }
+
+    /**
+     * DELTA exception P2
+     */
+    private void _deltap2() {
+        int n = pop();
+        for (int i = 0; i < n; i++) {
+            pop();    // pn
+            pop();    // argn
+        }
+    }
+
+    /**
+     * DELTA exception P3
+     */
+    private void _deltap3() {
+        int n = pop();
+        for (int i = 0; i < n; i++) {
+            pop();    // pn
+            pop();    // argn
+        }
+    }
+
+    /**
+     * Returns the DEPTH of the stack
+     */
+    private void _depth() {
+        push(stackIndex);
+    }
+
+    /**
+     * DIVide
+     */
+    private void _div() {
+        int n1 = pop();
+        int n2 = pop();
+        push((n2 / n1) >> 6);
+    }
+
+    /**
+     * DUPlicate top stack element
+     */
+    private void _dup() {
+        int n = pop();
+        push(n);
+        push(n);
+    }
+
+    /**
+     * ELSE
+     */
+    private int _else(int instructionIndex) {
+        return parser.handleElse(instructionIndex);
+    }
+
+    /**
+     * EQual
+     */
+    private void _eq() {
+        int e2 = pop();
+        int e1 = pop();
+        push((e1 == e2) ? 1 : 0);
+    }
+
+    private void _even() {
+        pop();
+        push(0);
+    }
+
+    /**
+     * Function DEFinition
+     */
+    private void _fdef(int instructionIndex) {
+        functionMap[pop()] = instructionIndex;
+        inFuncDef = true;
+    }
+
+    /**
+     * Set the auto_FLIP boolean to OFF
+     */
+    private void _flipoff() {
+        gs.auto_flip = false;
+    }
+
+    /**
+     * Set the auto_FLIP boolean to ON
+     */
+    private void _flipon() {
+        gs.auto_flip = true;
+    }
+
+    /**
+     * FLIP PoinT
+     *
+     * USES: loop
+     */
+    private void _flippt() {
+        while(gs.loop-- > 0) {
+            int index = pop();
+            zone[gs.zp0][index].onCurve = !zone[gs.zp0][index].onCurve;
+        }
+        gs.loop = 1;
+    }
+
+    /**
+     * FLIP RanGe OFF
+     */
+    private void _fliprgoff() {
+        int end = pop();
+        int start = pop();
+        for (int i = start; i <= end; i++) {
+            zone[1][i].onCurve = false;
+        }
+    }
+
+    /**
+     * FLIP RanGe ON
+     */
+    private void _fliprgon() {
+        int end = pop();
+        int start = pop();
+        for (int i = start; i <= end; i++) {
+            zone[1][i].onCurve = true;
+        }
+    }
+
+    /**
+     * FLOOR
+     */
+    private void _floor() {
+        int n = pop();
+        if (n >= 0) {
+            push(n & 0xffc0);
+        } else {
+            push((n & 0xffc0) - (((n & 0x3f) != 0) ? 0x40 : 0));
+        }
+    }
+
+    private void _gc(short param) {
+        pop();
+        push(0);
+    }
+
+    private void _getinfo() {
+        pop();
+        push(0);
+    }
+
+    /**
+     * Get Freedom_Vector
+     */
+    private void _gfv() {
+        push(gs.freedom_vector[0]);
+        push(gs.freedom_vector[1]);
+    }
+
+    /**
+     * Get Projection_Vector
+     */
+    private void _gpv() {
+        push(gs.projection_vector[0]);
+        push(gs.projection_vector[1]);
+    }
+
+    /**
+     * Greater Than
+     */
+    private void _gt() {
+        int e2 = pop();
+        int e1 = pop();
+        push((e1 > e2) ? 1 : 0);
+    }
+
+    /**
+     * Greater Than or EQual
+     */
+    private void _gteq() {
+        int e2 = pop();
+        int e1 = pop();
+        push((e1 >= e2) ? 1 : 0);
+    }
+
+    /**
+     * Instruction DEFinition
+     */
+    private void _idef() {
+        pop();
+        inFuncDef = true;
+    }
+
+    /**
+     * IF test
+     */
+    private int _if(int instructionIndex) {
+        return parser.handleIf(pop() != 0, instructionIndex);
+    }
+
+    /**
+     * INSTruction Execution ConTRol
+     *
+     * INSTCTRL[]
+     *
+     * Code Range
+     * 0x8E
+     *
+     * Pops
+     * s: selector flag (int32)
+     * value: USHORT (padded to 32 bits) used to set value of instruction_control.
+     *
+     * Pushes
+     * -
+     *
+     * Sets
+     * instruction_control
+     *
+     * Sets the instruction control state variable making it possible to turn on or off
+     * the execution of instructions and to regulate use of parameters set in the CVT
+     * program. INSTCTRL[ ] can only be executed in the CVT program.
+     *
+     * This instruction clears and sets various control flags in the rasterizer. The
+     * selector flag determines valid values for the value argument. The value determines
+     * the new setting of the raterizer control flag. In version 1.0 there are only two
+     * flags in use:
+     *
+     * Selector flag 1 is used to inhibit grid-fitting. If s=1, valid values for the
+     * value argument are 0 (FALSE) and 1 (TRUE). If the value argument is set to TRUE
+     * (v=1), any instructions associated with glyphs will not be executed. For example,
+     * to inhibit grid-fitting when a glyph is being rotated or stretched, use the
+     * following sequence on the preprogram:
+     *
+     * PUSHB[000] 6    ; ask GETINFO to check for stretching or rotation
+     * GETINFO[]        ; will push TRUE if glyph is stretched or rotated
+     * IF[]                ; tests value at top of stack
+     * PUSHB[000] 1    ; value for INSTCTRL
+     * PUSHB[000] 1    ; selector for INSTCTRL
+     * INSTRCTRL[]        ; based on selector and value will turn grid-fitting off
+     * EIF[]
+     *
+     * Selector flag 2 is used to establish that any parameters set in the CVT program
+     * should be ignored when instructions associated with glyphs are executed. These
+     * include, for example, the values for scantype and the CVT cut-in. If s=1, valid
+     * values for the value argument are 0 (FALSE) and 2 (TRUE). If the value argument is
+     * set to TRUE (v=2), the default values of those parameters will be used regardless
+     * of any changes that may have been made in those values by the preprogram. If the
+     * value argument is set to FALSE (v=0), parameter values changed by the CVT program
+     * will be used in glyph instructions.
+     */
+    private void _instctrl() {
+        int s = pop();
+        int v = pop();
+        if (s == 1) {
+            gs.instruction_control |= v;
+        } else if (s == 2) {
+            gs.instruction_control |= v;
+        }
+    }
+
+    private void _ip() {
+        pop();
+    }
+
+    private void _isect() {
+        pop();
+        pop();
+        pop();
+        pop();
+        pop();
+    }
+
+    private void _iup(short param) {
+    }
+
+    /**
+     * JuMP Relative
+     */
+    private int _jmpr(int instructionIndex) {
+        return instructionIndex += pop() - 1;
+    }
+
+    /**
+     * Jump Relative On False
+     */
+    private int _jrof(int instructionIndex) {
+        boolean test = pop() != 0;
+        int offset = pop();
+        if (!test) {
+            instructionIndex += offset - 1;
+        }
+        return instructionIndex;
+    }
+
+    /**
+     * Jump Relative On True
+     */
+    private int _jrot(int instructionIndex) {
+        boolean test = pop() != 0;
+        int offset = pop();
+        if (test) {
+            instructionIndex += offset - 1;
+        }
+        return instructionIndex;
+    }
+
+    /**
+     * LOOP and CALL function
+     */
+    private void _loopcall() {
+        int index = pop();
+        int count = pop();
+        for (int i = 0; i < count; i++) {
+            execute(functionMap[i]);
+        }
+    }
+
+    /**
+     * Less Than
+     */
+    private void _lt() {
+        int e2 = pop();
+        int e1 = pop();
+        push((e1 < e2) ? 1 : 0);
+    }
+
+    /**
+     * Less Than or EQual
+     */
+    private void _lteq() {
+        int e2 = pop();
+        int e1 = pop();
+        push((e1 <= e2) ? 1 : 0);
+    }
+
+    /**
+     * MAXimum of top two stack elements
+     */
+    private void _max() {
+        int n1 = pop();
+        int n2 = pop();
+        push((n1 > n2) ? n1 : n2);
+    }
+
+    private void _md(short param) {
+        pop();
+        pop();
+        push(0);
+    }
+
+    private void _mdap(short param) {
+        pop();
+    }
+
+    private void _mdrp(short param) {
+        pop();
+    }
+
+    private void _miap(short param) {
+        pop();
+        pop();
+    }
+    /**
+     * MINimum of top two stack elements
+     */
+    private void _min() {
+        int n1 = pop();
+        int n2 = pop();
+        push((n1 < n2) ? n1 : n2);
+    }
+
+    /**
+     * Move the INDEXed element to the top of the stack
+     */
+    private void _mindex() {
+        // Move the indexed element to stackIndex, and shift the others down
+        int k = pop();
+        int e = stack[stackIndex - k];
+        for (int i = stackIndex - k; i < stackIndex - 1; i++) {
+            stack[i] = stack[i+1];
+        }
+        stack[stackIndex - 1] = e;
+    }
+
+    private void _mirp(short param) {
+        pop();
+        pop();
+    }
+
+    private void _mppem() {
+        push(0);
+    }
+
+    private void _mps() {
+        push(0);
+    }
+    
+    private void _msirp(short param) {
+        pop();
+        pop();
+    }
+
+    /**
+     * MULtiply
+     */
+    private void _mul() {
+        int n1 = pop();
+        int n2 = pop();
+        push((n1 * n2) >> 6);
+    }
+
+    /**
+     * NEGate
+     */
+    private void _neg() {
+        push(-pop());
+    }
+
+    /**
+     * Not EQual
+     */
+    private void _neq() {
+        int e2 = pop();
+        int e1 = pop();
+        push((e1 != e2) ? 1 : 0);
+    }
+
+    /**
+     * logical NOT
+     */
+    private void _not() {
+        push((pop() != 0) ? 0 : 1);
+    }
+
+    private void _nround(short param) {
+        pop();
+        push(0);
+    }
+
+    private void _odd() {
+        pop();
+        push(0);
+    }
+
+    /**
+     * logical OR
+     */
+    private void _or() {
+        int e2 = pop();
+        int e1 = pop();
+        push(((e1 != 0) || (e2 != 0)) ? 1 : 0);
+    }
+
+    /**
+     * PUSH N Bytes
+     * PUSH N Words
+     * PUSH Bytes
+     * PUSH Words
+     */
+    private void _push(int[] data) {
+        for (int j = 0; j < data.length; j++) {
+            push(data[j]);
+        }
+    }
+
+    /**
+     * Read Control Value Table
+     */
+    private void _rcvt() {
+        push(cvt[pop()]);
+    }
+
+    /**
+     * Round Down To Grid
+     */
+    private void _rdtg() {
+        gs.round_state = 3;
+    }
+
+    /**
+     * Round OFF
+     */
+    private void _roff() {
+        gs.round_state = 5;
+    }
+
+    /**
+     * ROLL the top three stack elements
+     */
+    private void _roll() {
+        int a = pop();
+        int b = pop();
+        int c = pop();
+        push(b);
+        push(a);
+        push(c);
+    }
+
+    private void _round(short param) {
+        pop();
+        push(0);
+    }
+
+    /**
+     * Read Store
+     */
+    private void _rs() {
+        push(store[pop()]);
+    }
+
+    /**
+     * Round To Double Grid
+     */
+    private void _rtdg() {
+        gs.round_state = 2;
+    }
+
+    /**
+     * Round To Grid
+     */
+    private void _rtg() {
+        gs.round_state = 1;
+    }
+
+    /**
+     * Round To Half Grid
+     */
+    private void _rthg() {
+        gs.round_state = 0;
+    }
+
+    /**
+     * Round Up To Grid
+     */
+    private void _rutg() {
+        gs.round_state = 4;
+    }
+
+    private void _s45round() {
+        pop();
+    }
+
+    /**
+     * SCAN conversion ConTRoL
+     *
+     * SCANCTRL[ ]
+     *
+     * Code Range
+     * 0x85
+     *
+     * Pops
+     * n: flags indicating when to turn on dropout control mode (16 bit word padded
+     * to 32 bits)
+     *
+     * Pushes
+     * -
+     *
+     * Sets
+     * scan_control
+     *
+     * SCANCTRL is used to set the value of the Graphics State variable scan_control
+     * which in turn determines whether the scan converter will activate dropout
+     * control for this glyph. Use of the dropout control mode is determined by three
+     * conditions:
+     *
+     * Is the glyph rotated?
+     *
+     * Is the glyph stretched?
+     *
+     * Is the current setting for ppem less than a specified threshold?
+     *
+     * The interpreter pops a word from the stack and looks at the lower 16 bits.
+     *
+     * Bits 0-7 represent the threshold value for ppem. A value of FF in bits 0-7
+     * means invoke dropout_control for all sizes. A value of 0 in bits 0-7 means
+     * never invoke dropout_control.
+     *
+     * Bits 8-13 are used to turn on dropout_control in cases where the specified
+     * conditions are met. Bits 8, 9 and 10 are used to turn on the dropout_control
+     * mode (assuming other conditions do not block it). Bits 11, 12, and 13 are
+     * used to turn off the dropout mode unless other conditions force it. Bits 14
+     * and 15 are reserved for future use.
+     *
+     * Bit   Meaning if set
+     * ---   --------------
+     *   8   Set dropout_control to TRUE if other conditions do not block and ppem
+     *       is less than or equal to the threshold value.
+     *
+     *   9   Set dropout_control to TRUE if other conditions do not block and the
+     *       glyph is rotated.
+     *
+     *  10   Set dropout_control to TRUE if other conditions do not block and the
+     *       glyph is stretched.
+     *
+     *  11   Set dropout_control to FALSE unless ppem is less than or equal to the
+     *       threshold value.
+     *
+     *  12   Set dropout_control to FALSE unless the glyph is rotated.
+     *
+     *  13   Set dropout_control to FALSE unless the glyph is stretched.
+     *
+     *  14   Reserved for future use.
+     *
+     *  15   Reserved for future use.
+     *
+     * For example
+     * 0x0000 No dropout control is invoked
+     * 0x01FF Always do dropout control
+     * 0x0A10 Do dropout control if the glyph is rotated and has less than 16
+     *        pixels per-em
+     *
+     * The scan converter can operate in either a "normal" mode or in a "fix dropout"
+     * mode depending on the value of a set of enabling and disabling flags.
+     */
+    private void _scanctrl() {
+        gs.scan_control = pop();
+    }
+
+    /**
+     * SCANTYPE
+     *
+     * SCANTYPE[]
+     *
+     * Code Range
+     * 0x8D
+     *
+     * Pops
+     * n: 16 bit integer
+     *
+     * Pushes
+     * -
+     *
+     * Sets
+     * scan_control
+     *
+     * Pops a 16-bit integer whose value is used to determine which rules the scan
+     * converter will use. If the value of the argument is 0, the fast scan converter
+     * will be used. If the value of the integer is 1 or 2, simple dropout control will
+     * be used. If the value of the integer is 4 or 5, smart dropout control will be
+     * used. More specifically,
+     *
+     *   if n=0 rules 1, 2, and 3 are invoked (simple dropout control scan conversion
+     *   including stubs)
+     *
+     *   if n=1 rules 1, 2, and 4 are invoked (simple dropout control scan conversion
+     *   excluding stubs)
+     *
+     *   if n=2 rules 1 and 2 only are invoked (fast scan conversion; dropout control
+     *   turned off)
+     *
+     *   if n=3 same as n = 2
+     *
+     *   if n = 4 rules 1, 2, and 5 are invoked (smart dropout control scan conversion
+     *   including stubs)
+     *
+     *   if n = 5 rules 1, 2, and 6 are invoked (smart dropout control scan conversion
+     *   excluding stubs)
+     *
+     *   if n = 6 same as n = 2
+     *
+     *   if n = 7 same as n = 2
+     *
+     * The scan conversion rules are shown here:
+     *
+     * Rule 1
+     * If a pixel's center falls within the glyph outline, that pixel is turned on.
+     *
+     * Rule 2
+     * If a contour falls exactly on a pixel's center, that pixel is turned on.
+     *
+     * Rule 3
+     * If a scan line between two adjacent pixel centers (either vertical or
+     * horizontal) is intersected by both an on-Transition contour and an off-Transition
+     * contour and neither of the pixels was already turned on by rules 1 and 2, turn on
+     * the left-most pixel (horizontal scan line) or the bottom-most pixel (vertical scan
+     * line). This is "Simple" dropout control.
+     *
+     * Rule 4
+     * Apply Rule 3 only if the two contours continue to intersect other scan lines in
+     * both directions. That is, do not turn on pixels for 'stubs.' The scanline segments
+     * that form a square with the intersected scan line segment are examined to verify
+     * that they are intersected by two contours. It is possible that these could be
+     * different contours than the ones intersecting the dropout scan line segment. This
+     * is very unlikely but may have to be controlled with grid-fitting in some exotic
+     * glyphs.
+     *
+     * Rule 5
+     * If a scan line between two adjacent pixel centers (either vertical or horizontal)
+     * is intersected by both an on-Transition contour and an off-Transition contour and
+     * neither of the pixels was already turned on by rules 1 and 2, turn on the pixel
+     * which is closer to the midpoint between the on-Transition contour and off-
+     * Transition contour. This is "Smart" dropout control.
+     *
+     * Rule 6
+     * Apply Rule 5 only if the two contours continue to intersect other scan lines in
+     * both directions. That is, do not turn on pixels for 'stubs.'
+     *
+     * New fonts wishing to use the new modes of the ScanType instruction, but still
+     * wishing to work correctly on old rasterizers that don't recognize the new modes
+     * should:
+     *
+     * First execute a ScanType instruction using an old mode which will give the best
+     * approximation to the desired new mode (e.g. Simple Stubs for Smart Stubs), and
+     * then
+     *
+     * Immediately execute another ScanType instruction with the desired new mode.
+     */
+    private void _scantype() {
+        pop();
+    }
+
+    private void _scfs() {
+        pop();
+        pop();
+    }
+
+    /**
+     * Set Control Value Table Cut In
+     */
+    private void _scvtci() {
+        gs.control_value_cut_in = pop();
+    }
+
+    /**
+     * Set Delta_Base in the graphics state
+     */
+    private void _sdb() {
+        gs.delta_base = pop();
+    }
+
+    /**
+     * Set Dual Projection_Vector To Line
+     */
+    private void _sdpvtl(short param) {
+        pop();
+        pop();
+    }
+
+    /**
+     * Set Delta_Shift in the graphics state
+     */
+    private void _sds() {
+        gs.delta_shift = pop();
+    }
+
+    /**
+     * Set Freedom_Vector From Stack
+     */
+    private void _sfvfs() {
+        gs.freedom_vector[1] = pop();    // y
+        gs.freedom_vector[0] = pop();    // x
+    }
+
+    /*
+     * Set Freedom_Vector to Coordinate Axis
+     */
+    private void _sfvtca(short param) {
+        if (param == 1) {
+            gs.freedom_vector[0] = 0x4000;
+            gs.freedom_vector[1] = 0x0000;
+        } else {
+            gs.freedom_vector[0] = 0x0000;
+            gs.freedom_vector[1] = 0x4000;
+        }
+    }
+
+    /*
+     * Set Freedom_Vector To Line
+     */
+    private void _sfvtl(short param) {
+        pop();
+        pop();
+        if (param == 1) {
+            gs.freedom_vector[0] = 0x0000;
+            gs.freedom_vector[1] = 0x0000;
+        } else {
+            gs.freedom_vector[0] = 0x0000;
+            gs.freedom_vector[1] = 0x0000;
+        }
+    }
+
+    /**
+     * Set Freedom_Vector To Projection Vector
+     */
+    private void _sfvtpv() {
+        gs.freedom_vector[0] = gs.projection_vector[0];
+        gs.freedom_vector[1] = gs.projection_vector[1];
+    }
+
+    private void _shc(short param) {
+        pop();
+    }
+
+    /**
+     * SHift Point by the last point
+     *
+     * USES: loop
+     */
+    private void _shp(short param) {
+        while(gs.loop-- > 0) {
+            pop();
+            if(param == 0) {
+            } else {
+            }
+        }
+        gs.loop = 1;
+    }
+
+    /**
+     * SHift Point by a PIXel amount
+     *
+     * USES: loop
+     */
+    private void _shpix() {
+        pop();    // amount
+        while (gs.loop-- > 0) {
+            pop();    // p
+        }
+        gs.loop = 1;
+    }
+
+    private void _shz(short param) {
+        pop();
+    }
+
+    /**
+     * Set LOOP variable
+     */
+    private void _sloop() {
+        gs.loop = pop();
+    }
+
+    /**
+     * Set Minimum_Distance
+     */
+    private void _smd() {
+        gs.minimum_distance = pop();
+    }
+
+    /**
+     * Set Projection_Vector From Stack
+     */
+    private void _spvfs() {
+        gs.projection_vector[1] = pop();    // y
+        gs.projection_vector[0] = pop();    // x
+    }
+
+    /*
+     * Set Projection_Vector To Coordinate Axis
+     */
+    private void _spvtca(short param) {
+        if (param == 1) {
+            gs.projection_vector[0] = 0x4000;
+            gs.projection_vector[1] = 0x0000;
+        } else {
+            gs.projection_vector[0] = 0x0000;
+            gs.projection_vector[1] = 0x4000;
+        }
+    }
+
+    /**
+     * Set Projection_Vector To Line
+     */
+    private void _spvtl(short param) {
+
+        // We'll get a copy of the line and normalize it -
+        // divide the x- and y-coords by the vector's dot product.
+        Point p1 = zone[gs.zp2][pop()];
+        Point p2 = zone[gs.zp1][pop()];
+        int x = p2.x - p1.x;
+        int y = p2.y - p1.y;
+        if(param == 1) {
+            gs.projection_vector[0] = 0x0000;
+            gs.projection_vector[1] = 0x0000;
+        } else {
+            gs.projection_vector[0] = 0x0000;
+            gs.projection_vector[1] = 0x0000;
+        }
+    }
+
+    private void _sround() {
+        pop();
+    }
+
+    /**
+     * Set Reference Point 0
+     */
+    private void _srp0() {
+        gs.rp0 = pop();
+    }
+
+    /**
+     * Set Reference Point 1
+     */
+    private void _srp1() {
+        gs.rp1 = pop();
+    }
+
+    /**
+     * Set Reference Point 2
+     */
+    private void _srp2() {
+        gs.rp2 = pop();
+    }
+
+    /**
+     * Set Single-Width
+     */
+    private void _ssw() {
+        gs.single_width_value = pop();
+    }
+
+    /**
+     * Set Single_Width_Cut_In
+     */
+    private void _sswci() {
+        gs.single_width_cut_in = pop();
+    }
+
+    /**
+     * SUBtract
+     */
+    private void _sub() {
+        int n1 = pop();
+        int n2 = pop();
+        push(n2 - n1);
+    }
+
+    /**
+     * Set freedom and projection Vectors To Coordinate Axis
+     */
+    private void _svtca(short param) {
+        if (param == 1) {
+            gs.projection_vector[0] = 0x4000;
+            gs.projection_vector[1] = 0x0000;
+            gs.freedom_vector[0] = 0x4000;
+            gs.freedom_vector[1] = 0x0000;
+        } else {
+            gs.projection_vector[0] = 0x0000;
+            gs.projection_vector[1] = 0x4000;
+            gs.freedom_vector[0] = 0x0000;
+            gs.freedom_vector[1] = 0x4000;
+        }
+    }
+
+    /**
+     * SWAP the top two elements on the stack
+     */
+    private void _swap() {
+        int n1 = pop();
+        int n2 = pop();
+        push(n1);
+        push(n2);
+    }
+
+    /**
+     * Set Zone Pointer 0
+     */
+    private void _szp0() {
+        gs.zp0 = pop();
+    }
+
+    /**
+     * Set Zone Pointer 1
+     */
+    private void _szp1() {
+        gs.zp1 = pop();
+    }
+
+    /**
+     * Set Zone Pointer 2
+     */
+    private void _szp2() {
+        gs.zp2 = pop();
+    }
+
+    /**
+     * Set Zone PointerS
+     */
+    private void _szps() {
+        gs.zp0 = gs.zp1 = gs.zp2 = pop();
+    }
+
+    private void _utp() {
+        pop();
+    }
+
+    /**
+     * Write Control Value Table in FUnits
+     */
+    private void _wcvtf() {
+        int value = pop();
+        // Conversion of value goes here
+        cvt[pop()] = value;
+    }
+
+    /**
+     * Write Control Value Table in Pixel units
+     */
+    private void _wcvtp() {
+        int value = pop();
+        // Conversion of value goes here
+        cvt[pop()] = value;
+    }
+
+    /**
+     * Write Store
+     */
+    private void _ws() {
+        store[pop()] = pop();
+    }
+
+    public void execute(int ip) {
+        while (ip < ((ip & 0xffff0000) | parser.getISLength(ip >> 16))) {
+            short opcode = parser.getOpcode(ip);
+            if (inFuncDef) {
+                
+                // We're within a function definition, so don't execute the code
+                if (opcode == Mnemonic.ENDF) {
+                    inFuncDef = false;
+                }
+                ip = parser.advanceIP(ip);
+                continue;
+            }
+            if (opcode >= Mnemonic.MIRP) _mirp((short)(opcode & 31));
+            else if (opcode >= Mnemonic.MDRP) _mdrp((short)(opcode & 31));
+            else if (opcode >= Mnemonic.PUSHW) _push(parser.getPushData(ip));
+            else if (opcode >= Mnemonic.PUSHB) _push(parser.getPushData(ip));
+            else if (opcode >= Mnemonic.INSTCTRL) _instctrl();
+            else if (opcode >= Mnemonic.SCANTYPE) _scantype();
+            else if (opcode >= Mnemonic.MIN) _min();
+            else if (opcode >= Mnemonic.MAX) _max();
+            else if (opcode >= Mnemonic.ROLL) _roll();
+            else if (opcode >= Mnemonic.IDEF) _idef();
+            else if (opcode >= Mnemonic.GETINFO) _getinfo();
+            else if (opcode >= Mnemonic.SDPVTL) _sdpvtl((short)(opcode & 1));
+            else if (opcode >= Mnemonic.SCANCTRL) _scanctrl();
+            else if (opcode >= Mnemonic.FLIPRGOFF) _fliprgoff();
+            else if (opcode >= Mnemonic.FLIPRGON) _fliprgon();
+            else if (opcode >= Mnemonic.FLIPPT) _flippt();
+            else if (opcode >= Mnemonic.AA); // AA (ignored)
+            else if (opcode >= Mnemonic.SANGW); // SANGW (ignored)
+            else if (opcode >= Mnemonic.RDTG) _rdtg();
+            else if (opcode >= Mnemonic.RUTG) _rutg();
+            else if (opcode >= Mnemonic.ROFF) _roff();
+            else if (opcode >= Mnemonic.JROF) ip = _jrof(ip);
+            else if (opcode >= Mnemonic.JROT) ip = _jrot(ip);
+            else if (opcode >= Mnemonic.S45ROUND) _s45round();
+            else if (opcode >= Mnemonic.SROUND) _sround();
+            else if (opcode >= Mnemonic.DELTAC3) _deltac3();
+            else if (opcode >= Mnemonic.DELTAC2) _deltac2();
+            else if (opcode >= Mnemonic.DELTAC1) _deltac1();
+            else if (opcode >= Mnemonic.DELTAP3) _deltap3();
+            else if (opcode >= Mnemonic.DELTAP2) _deltap2();
+            else if (opcode >= Mnemonic.WCVTF) _wcvtf();
+            else if (opcode >= Mnemonic.NROUND) _nround((short)(opcode & 3));
+            else if (opcode >= Mnemonic.ROUND) _round((short)(opcode & 3));
+            else if (opcode >= Mnemonic.CEILING) _ceiling();
+            else if (opcode >= Mnemonic.FLOOR) _floor();
+            else if (opcode >= Mnemonic.NEG) _neg();
+            else if (opcode >= Mnemonic.ABS) _abs();
+            else if (opcode >= Mnemonic.MUL) _mul();
+            else if (opcode >= Mnemonic.DIV) _div();
+            else if (opcode >= Mnemonic.SUB) _sub();
+            else if (opcode >= Mnemonic.ADD) _add();
+            else if (opcode >= Mnemonic.SDS) _sds();
+            else if (opcode >= Mnemonic.SDB) _sdb();
+            else if (opcode >= Mnemonic.DELTAP1) _deltap1();
+            else if (opcode >= Mnemonic.NOT) _not();
+            else if (opcode >= Mnemonic.OR) _or();
+            else if (opcode >= Mnemonic.AND) _and();
+            else if (opcode >= Mnemonic.EIF); // EIF
+            else if (opcode >= Mnemonic.IF) ip = _if(ip);
+            else if (opcode >= Mnemonic.EVEN) _even();
+            else if (opcode >= Mnemonic.ODD) _odd();
+            else if (opcode >= Mnemonic.NEQ) _neq();
+            else if (opcode >= Mnemonic.EQ) _eq();
+            else if (opcode >= Mnemonic.GTEQ) _gteq();
+            else if (opcode >= Mnemonic.GT) _gt();
+            else if (opcode >= Mnemonic.LTEQ) _lteq();
+            else if (opcode >= Mnemonic.LT) _lt();
+            else if (opcode >= Mnemonic.DEBUG) _debug();
+            else if (opcode >= Mnemonic.FLIPOFF) _flipoff();
+            else if (opcode >= Mnemonic.FLIPON) _flipon();
+            else if (opcode >= Mnemonic.MPS) _mps();
+            else if (opcode >= Mnemonic.MPPEM) _mppem();
+            else if (opcode >= Mnemonic.MD) _md((short)(opcode & 1));
+            else if (opcode >= Mnemonic.SCFS) _scfs();
+            else if (opcode >= Mnemonic.GC) _gc((short)(opcode & 1));
+            else if (opcode >= Mnemonic.RCVT) _rcvt();
+            else if (opcode >= Mnemonic.WCVTP) _wcvtp();
+            else if (opcode >= Mnemonic.RS) _rs();
+            else if (opcode >= Mnemonic.WS) _ws();
+            else if (opcode >= Mnemonic.NPUSHW) _push(parser.getPushData(ip));
+            else if (opcode >= Mnemonic.NPUSHB) _push(parser.getPushData(ip));
+            else if (opcode >= Mnemonic.MIAP) _miap((short)(opcode & 1));
+            else if (opcode >= Mnemonic.RTDG) _rtdg();
+            else if (opcode >= Mnemonic.ALIGNRP) _alignrp();
+            else if (opcode >= Mnemonic.IP) _ip();
+            else if (opcode >= Mnemonic.MSIRP) _msirp((short)(opcode & 1));
+            else if (opcode >= Mnemonic.SHPIX) _shpix();
+            else if (opcode >= Mnemonic.SHZ) _shz((short)(opcode & 1));
+            else if (opcode >= Mnemonic.SHC) _shc((short)(opcode & 1));
+            else if (opcode >= Mnemonic.SHP) _shp((short)(opcode & 1));
+            else if (opcode >= Mnemonic.IUP) _iup((short)(opcode & 1));
+            else if (opcode >= Mnemonic.MDAP) _mdap((short)(opcode & 1));
+            else if (opcode >= Mnemonic.ENDF) return;
+            else if (opcode >= Mnemonic.FDEF) _fdef(ip + 1);
+            else if (opcode >= Mnemonic.CALL) _call();
+            else if (opcode >= Mnemonic.LOOPCALL) _loopcall();
+            else if (opcode >= Mnemonic.UTP) _utp();
+            else if (opcode >= Mnemonic.ALIGNPTS) _alignpts();
+            else if (opcode >= Mnemonic.MINDEX) _mindex();
+            else if (opcode >= Mnemonic.CINDEX) _cindex();
+            else if (opcode >= Mnemonic.DEPTH) _depth();
+            else if (opcode >= Mnemonic.SWAP) _swap();
+            else if (opcode >= Mnemonic.CLEAR) _clear();
+            else if (opcode >= Mnemonic.POP) pop();
+            else if (opcode >= Mnemonic.DUP) _dup();
+            else if (opcode >= Mnemonic.SSW) _ssw();
+            else if (opcode >= Mnemonic.SSWCI) _sswci();
+            else if (opcode >= Mnemonic.SCVTCI) _scvtci();
+            else if (opcode >= Mnemonic.JMPR) ip = _jmpr(ip);
+            else if (opcode >= Mnemonic.ELSE) ip = _else(ip);
+            else if (opcode >= Mnemonic.SMD) _smd();
+            else if (opcode >= Mnemonic.RTHG) _rthg();
+            else if (opcode >= Mnemonic.RTG) _rtg();
+            else if (opcode >= Mnemonic.SLOOP) _sloop();
+            else if (opcode >= Mnemonic.SZPS) _szps();
+            else if (opcode >= Mnemonic.SZP2) _szp2();
+            else if (opcode >= Mnemonic.SZP1) _szp1();
+            else if (opcode >= Mnemonic.SZP0) _szp0();
+            else if (opcode >= Mnemonic.SRP2) _srp2();
+            else if (opcode >= Mnemonic.SRP1) _srp1();
+            else if (opcode >= Mnemonic.SRP0) _srp0();
+            else if (opcode >= Mnemonic.ISECT) _isect();
+            else if (opcode >= Mnemonic.SFVTPV) _sfvtpv();
+            else if (opcode >= Mnemonic.GFV) _gfv();
+            else if (opcode >= Mnemonic.GPV) _gpv();
+            else if (opcode >= Mnemonic.SFVFS) _sfvfs();
+            else if (opcode >= Mnemonic.SPVFS) _spvfs();
+            else if (opcode >= Mnemonic.SFVTL) _sfvtl((short)(opcode & 1));
+            else if (opcode >= Mnemonic.SPVTL) _spvtl((short)(opcode & 1));
+            else if (opcode >= Mnemonic.SFVTCA) _sfvtca((short)(opcode & 1));
+            else if (opcode >= Mnemonic.SPVTCA) _spvtca((short)(opcode & 1));
+            else if (opcode >= Mnemonic.SVTCA) _svtca((short)(opcode & 1));
+            ip = parser.advanceIP(ip);
+        }
+    }
+
+    public Point[][] getZones() {
+        return zone;
+    }
+
+    private int pop() {
+        return stack[--stackIndex];
+    }
+
+    private void push(int i) {
+        stack[stackIndex++] = i;
+    }
+
+    public void runCvtProgram() {
+        execute(0x00010000);
+    }
+
+    public void runFontProgram() {
+        execute(0);
+    }
+
+    public void runGlyphProgram() {
+        // instruction_control can be set to stop glyphs grid-fitting
+        if ((gs.instruction_control & 1) == 0) {
+            execute(0x00020000);
+        }
+    }
+
+    public void setParser(Parser p) {
+        parser = p;
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/tt/engine/Parser.java b/src/jogl/classes/jogamp/graph/font/typecast/tt/engine/Parser.java
new file mode 100644
index 0000000..71260b8
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/font/typecast/tt/engine/Parser.java
@@ -0,0 +1,192 @@
+/*
+ * $Id: Parser.java,v 1.1.1.1 2004-12-05 23:15:06 davidsch Exp $
+ *
+ * Typecast - The Font Development Environment
+ *
+ * Copyright (c) 2004 David Schweinsberg
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package jogamp.graph.font.typecast.tt.engine;
+
+import jogamp.graph.font.typecast.ot.Mnemonic;
+
+/**
+ * @author <a href="mailto:davidsch at dev.java.net">David Schweinsberg</a>
+ * @version $Id: Parser.java,v 1.1.1.1 2004-12-05 23:15:06 davidsch Exp $
+ */
+public class Parser {
+
+    private short[][] instructions = new short[3][];
+
+    /**
+     * Advance the instruction pointer to the next executable opcode.
+     * This will be the next byte, unless the current opcode is a push
+     * instruction, in which case it will be the byte immediately beyond
+     * the last data byte.
+     * @param ip The current instruction pointer
+     * @return The new instruction pointer
+     */
+    public int advanceIP(int ip) {
+
+        // The high word specifies font, cvt, or glyph program
+        int prog = ip >> 16;
+        int i = ip & 0xffff;
+        int dataCount;
+        ip++;
+        if (Mnemonic.NPUSHB == instructions[prog][i]) {
+            // Next byte is the data byte count
+            dataCount = instructions[prog][++i];
+            ip += dataCount + 1;
+        } else if (Mnemonic.NPUSHW == instructions[prog][i]) {
+            // Next byte is the data word count
+            dataCount = instructions[prog][++i];
+            ip += dataCount*2 + 1;
+        } else if (Mnemonic.PUSHB == (instructions[prog][i] & 0xf8)) {
+            dataCount = (short)((instructions[prog][i] & 0x07) + 1);
+            ip += dataCount;
+        } else if (Mnemonic.PUSHW == (instructions[prog][i] & 0xf8)) {
+            dataCount = (short)((instructions[prog][i] & 0x07) + 1);
+            ip += dataCount*2;
+        }
+        return ip;
+    }
+
+    public int getISLength(int prog) {
+        return instructions[prog].length;
+    }
+
+    public short getOpcode(int ip) {
+        return instructions[ip >> 16][ip & 0xffff];
+    }
+
+    public short getPushCount(int ip) {
+        short instr = instructions[ip >> 16][ip & 0xffff];
+        if ((Mnemonic.NPUSHB == instr) || (Mnemonic.NPUSHW == instr)) {
+            return instructions[ip >> 16][(ip & 0xffff) + 1];
+        } else if ((Mnemonic.PUSHB == (instr & 0xf8)) || (Mnemonic.PUSHW == (instr & 0xf8))) {
+            return (short)((instr & 0x07) + 1);
+        }
+        return 0;
+    }
+
+    public int[] getPushData(int ip) {
+        int count = getPushCount(ip);
+        int[] data = new int[count];
+        int prog = ip >> 16;
+        int i = ip & 0xffff;
+        short instr = instructions[prog][i];
+        if (Mnemonic.NPUSHB == instr) {
+            for (int j = 0; j < count; j++) {
+                data[j] = instructions[prog][i + j + 2];
+            }
+        } else if (Mnemonic.PUSHB == (instr & 0xf8)) {
+            for (int j = 0; j < count; j++) {
+                data[j] = instructions[prog][i + j + 1];
+            }
+        } else if (Mnemonic.NPUSHW == instr) {
+            for (int j = 0; j < count; j++) {
+                data[j] = (instructions[prog][i + j*2 + 2] << 8) | instructions[prog][i + j*2 + 3];
+            }
+        } else if (Mnemonic.PUSHW == (instr & 0xf8)) {
+            for (int j = 0; j < count; j++) {
+                data[j] = (instructions[prog][i + j*2 + 1] << 8) | instructions[prog][i + j*2 + 2];
+            }
+        }
+        return data;
+    }
+
+    public int handleElse(int ip) {
+        while (instructions[ip >> 16][ip & 0xffff] != Mnemonic.EIF) {
+            ip = advanceIP(ip);
+        }
+        return ip;
+    }
+
+    public int handleIf(boolean test, int ip) {
+        if (test == false) {
+            // The TrueType spec says that we merely jump to the *next* ELSE or EIF
+            // instruction in the instruction stream.  So therefore no nesting!
+            // Looking at actual code, IF-ELSE-EIF can be nested!
+            while ((instructions[ip >> 16][ip & 0xffff] != Mnemonic.ELSE)
+                    && (instructions[ip >> 16][ip & 0xffff] != Mnemonic.EIF)) {
+                ip = advanceIP(ip);
+            }
+        }
+        return ip;
+    }
+
+    /**
+     * This program is run everytime we scale the font
+     */
+    public void setCvtProgram(short[] program) {
+        instructions[1] = program;
+    }
+
+    /**
+     * This program is only run once
+     */
+    public void setFontProgram(short[] program) {
+        instructions[0] = program;
+    }
+
+    /**
+     * This program is run everytime we scale the glyph
+     */
+    public void setGlyphProgram(short[] program) {
+        instructions[2] = program;
+    }
+
+    public String toString() {
+        StringBuffer sb = new StringBuffer();
+        int ip = 0;
+        while (ip < instructions[0].length) {
+            sb.append(Mnemonic.getMnemonic(getOpcode(ip)));
+            if (getPushCount(ip) > 0) {
+                int[] data = getPushData(ip);
+                for(int j = 0; j < data.length; j++)
+                sb.append(" ").append(data[j]);
+            }
+            sb.append("\n");
+            ip = advanceIP(ip);
+        }
+        sb.append("\n");
+        ip = 0x10000;
+        while (ip < (0x10000 | instructions[1].length)) {
+            sb.append(Mnemonic.getMnemonic(getOpcode(ip)));
+            if(getPushCount(ip) > 0) {
+                int[] data = getPushData(ip);
+                for (int j = 0; j < data.length; j++) {
+                    sb.append(" ").append(data[j]);
+                }
+            }
+            sb.append("\n");
+            ip = advanceIP(ip);
+        }
+        sb.append("\n");
+        ip = 0x20000;
+        while (ip < (0x20000 | instructions[2].length)) {
+            sb.append(Mnemonic.getMnemonic(getOpcode(ip)));
+            if (getPushCount(ip) > 0) {
+                int[] data = getPushData(ip);
+                for (int j = 0; j < data.length; j++) {
+                    sb.append(" ").append(data[j]);
+                }
+            }
+            sb.append("\n");
+            ip = advanceIP(ip);
+        }
+        return sb.toString();
+    }
+}
diff --git a/src/jogl/classes/jogamp/graph/geom/plane/AffineTransform.java b/src/jogl/classes/jogamp/graph/geom/plane/AffineTransform.java
new file mode 100644
index 0000000..fc086eb
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/geom/plane/AffineTransform.java
@@ -0,0 +1,580 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+/**
+ * @author Denis M. Kishenko
+ */
+package jogamp.graph.geom.plane;
+
+import java.io.IOException;
+import java.io.Serializable;
+
+import jogamp.graph.math.MathFloat;
+// import jogamp.opengl.util.HashCode;
+
+import com.jogamp.graph.geom.Vertex;
+import com.jogamp.graph.geom.Vertex.Factory;
+
+public class AffineTransform implements Cloneable, Serializable {
+
+    private static final long serialVersionUID = 1330973210523860834L;
+
+    static final String determinantIsZero = "Determinant is zero";
+    
+    public static final int TYPE_IDENTITY = 0;
+    public static final int TYPE_TRANSLATION = 1;
+    public static final int TYPE_UNIFORM_SCALE = 2;
+    public static final int TYPE_GENERAL_SCALE = 4;
+    public static final int TYPE_QUADRANT_ROTATION = 8;
+    public static final int TYPE_GENERAL_ROTATION = 16;
+    public static final int TYPE_GENERAL_TRANSFORM = 32;
+    public static final int TYPE_FLIP = 64;
+    public static final int TYPE_MASK_SCALE = TYPE_UNIFORM_SCALE | TYPE_GENERAL_SCALE;
+    public static final int TYPE_MASK_ROTATION = TYPE_QUADRANT_ROTATION | TYPE_GENERAL_ROTATION;
+
+    /**
+     * The <code>TYPE_UNKNOWN</code> is an initial type value
+     */
+    static final int TYPE_UNKNOWN = -1;
+    
+    /**
+     * The min value equivalent to zero. If absolute value less then ZERO it considered as zero.  
+     */
+    static final float ZERO = (float) 1E-10;
+   
+    private final Vertex.Factory<? extends Vertex> pointFactory;
+    
+    /**
+     * The values of transformation matrix
+     */
+    float m00;
+    float m10;
+    float m01;
+    float m11;
+    float m02;
+    float m12;
+
+    /**
+     * The transformation <code>type</code> 
+     */
+    transient int type;
+
+    public AffineTransform() {
+        pointFactory = null;
+        type = TYPE_IDENTITY;
+        m00 = m11 = 1.0f;
+        m10 = m01 = m02 = m12 = 0.0f;
+    }
+
+    public AffineTransform(Factory<? extends Vertex> factory) {
+        pointFactory = factory;
+        type = TYPE_IDENTITY;
+        m00 = m11 = 1.0f;
+        m10 = m01 = m02 = m12 = 0.0f;
+    }
+
+    public AffineTransform(AffineTransform t) {
+        this.pointFactory = t.pointFactory;
+        this.type = t.type;
+        this.m00 = t.m00;
+        this.m10 = t.m10;
+        this.m01 = t.m01;
+        this.m11 = t.m11;
+        this.m02 = t.m02;
+        this.m12 = t.m12;
+    }
+
+    public AffineTransform(Vertex.Factory<? extends Vertex> factory, float m00, float m10, float m01, float m11, float m02, float m12) {
+        pointFactory = factory;
+        this.type = TYPE_UNKNOWN;
+        this.m00 = m00;
+        this.m10 = m10;
+        this.m01 = m01;
+        this.m11 = m11;
+        this.m02 = m02;
+        this.m12 = m12;
+    }
+
+    public AffineTransform(Vertex.Factory<? extends Vertex> factory, float[] matrix) {
+        pointFactory = factory;
+        this.type = TYPE_UNKNOWN;
+        m00 = matrix[0];
+        m10 = matrix[1];
+        m01 = matrix[2];
+        m11 = matrix[3];
+        if (matrix.length > 4) {
+            m02 = matrix[4];
+            m12 = matrix[5];
+        }
+    }
+
+    /*
+     * Method returns type of affine transformation.
+     * 
+     * Transform matrix is
+     *   m00 m01 m02
+     *   m10 m11 m12
+     * 
+     * According analytic geometry new basis vectors are (m00, m01) and (m10, m11), 
+     * translation vector is (m02, m12). Original basis vectors are (1, 0) and (0, 1). 
+     * Type transformations classification:  
+     *   TYPE_IDENTITY - new basis equals original one and zero translation
+     *   TYPE_TRANSLATION - translation vector isn't zero  
+     *   TYPE_UNIFORM_SCALE - vectors length of new basis equals
+     *   TYPE_GENERAL_SCALE - vectors length of new basis doesn't equal 
+     *   TYPE_FLIP - new basis vector orientation differ from original one
+     *   TYPE_QUADRANT_ROTATION - new basis is rotated by 90, 180, 270, or 360 degrees     
+     *   TYPE_GENERAL_ROTATION - new basis is rotated by arbitrary angle
+     *   TYPE_GENERAL_TRANSFORM - transformation can't be inversed
+     */
+    public int getType() {
+        if (type != TYPE_UNKNOWN) {
+            return type;
+        }
+
+        int type = 0;
+
+        if (m00 * m01 + m10 * m11 != 0.0) {
+            type |= TYPE_GENERAL_TRANSFORM;
+            return type;
+        }
+
+        if (m02 != 0.0 || m12 != 0.0) {
+            type |= TYPE_TRANSLATION;
+        } else
+            if (m00 == 1.0 && m11 == 1.0 && m01 == 0.0 && m10 == 0.0) {
+                type = TYPE_IDENTITY;
+                return type;
+            }
+
+        if (m00 * m11 - m01 * m10 < 0.0) {
+            type |= TYPE_FLIP;
+        }
+
+        float dx = m00 * m00 + m10 * m10;
+        float dy = m01 * m01 + m11 * m11;
+        if (dx != dy) {
+            type |= TYPE_GENERAL_SCALE;
+        } else
+            if (dx != 1.0) {
+                type |= TYPE_UNIFORM_SCALE;
+            }
+
+        if ((m00 == 0.0 && m11 == 0.0) ||
+            (m10 == 0.0 && m01 == 0.0 && (m00 < 0.0 || m11 < 0.0)))
+        {
+            type |= TYPE_QUADRANT_ROTATION;
+        } else
+            if (m01 != 0.0 || m10 != 0.0) {
+                type |= TYPE_GENERAL_ROTATION;
+            }
+
+        return type;
+    }
+
+    public float getScaleX() {
+        return m00;
+    }
+
+    public float getScaleY() {
+        return m11;
+    }
+
+    public float getShearX() {
+        return m01;
+    }
+
+    public float getShearY() {
+        return m10;
+    }
+
+    public float getTranslateX() {
+        return m02;
+    }
+
+    public float getTranslateY() {
+        return m12;
+    }
+
+    public boolean isIdentity() {
+        return getType() == TYPE_IDENTITY;
+    }
+
+    public void getMatrix(float[] matrix) {
+        matrix[0] = m00;
+        matrix[1] = m10;
+        matrix[2] = m01;
+        matrix[3] = m11;
+        if (matrix.length > 4) {
+            matrix[4] = m02;
+            matrix[5] = m12;
+        }
+    }
+
+    public float getDeterminant() {
+        return m00 * m11 - m01 * m10;
+    }
+
+    public void setTransform(float m00, float m10, float m01, float m11, float m02, float m12) {
+        this.type = TYPE_UNKNOWN;
+        this.m00 = m00;
+        this.m10 = m10;
+        this.m01 = m01;
+        this.m11 = m11;
+        this.m02 = m02;
+        this.m12 = m12;
+    }
+
+    public void setTransform(AffineTransform t) {
+        type = t.type;
+        setTransform(t.m00, t.m10, t.m01, t.m11, t.m02, t.m12);
+    }
+
+    public void setToIdentity() {
+        type = TYPE_IDENTITY;
+        m00 = m11 = 1.0f;
+        m10 = m01 = m02 = m12 = 0.0f;
+    }
+
+    public void setToTranslation(float mx, float my) {
+        m00 = m11 = 1.0f;
+        m01 = m10 = 0.0f;
+        m02 = mx;
+        m12 = my;
+        if (mx == 0.0f && my == 0.0f) {
+            type = TYPE_IDENTITY;
+        } else {
+            type = TYPE_TRANSLATION;
+        }
+    }
+
+    public void setToScale(float scx, float scy) {
+        m00 = scx;
+        m11 = scy;
+        m10 = m01 = m02 = m12 = 0.0f;
+        if (scx != 1.0f || scy != 1.0f) {
+            type = TYPE_UNKNOWN;
+        } else {
+            type = TYPE_IDENTITY;
+        }
+    }
+
+    public void setToShear(float shx, float shy) {
+        m00 = m11 = 1.0f;
+        m02 = m12 = 0.0f;
+        m01 = shx;
+        m10 = shy;
+        if (shx != 0.0f || shy != 0.0f) {
+            type = TYPE_UNKNOWN;
+        } else {
+            type = TYPE_IDENTITY;
+        }
+    }
+
+    public void setToRotation(float angle) {
+        float sin = MathFloat.sin(angle);
+        float cos = MathFloat.cos(angle);
+        if (MathFloat.abs(cos) < ZERO) {
+            cos = 0.0f;
+            sin = sin > 0.0f ? 1.0f : -1.0f;
+        } else
+            if (MathFloat.abs(sin) < ZERO) {
+                sin = 0.0f;
+                cos = cos > 0.0f ? 1.0f : -1.0f;
+            }
+        m00 = m11 = cos;
+        m01 = -sin;
+        m10 = sin;
+        m02 = m12 = 0.0f;
+        type = TYPE_UNKNOWN;
+    }
+
+    public void setToRotation(float angle, float px, float py) {
+        setToRotation(angle);
+        m02 = px * (1.0f - m00) + py * m10;
+        m12 = py * (1.0f - m00) - px * m10;
+        type = TYPE_UNKNOWN;
+    }
+
+    public static <T extends Vertex> AffineTransform getTranslateInstance(Vertex.Factory<? extends Vertex> factory, float mx, float my) {
+        AffineTransform t = new AffineTransform(factory);
+        t.setToTranslation(mx, my);
+        return t;
+    }
+
+    public static <T extends Vertex> AffineTransform getScaleInstance(Vertex.Factory<? extends Vertex> factory, float scx, float scY) {
+        AffineTransform t = new AffineTransform(factory);
+        t.setToScale(scx, scY);
+        return t;
+    }
+
+    public static <T extends Vertex> AffineTransform getShearInstance(Vertex.Factory<? extends Vertex> factory, float shx, float shy) {
+        AffineTransform t = new AffineTransform(factory);        
+        t.setToShear(shx, shy);
+        return t;
+    }
+
+    public static <T extends Vertex> AffineTransform getRotateInstance(Vertex.Factory<? extends Vertex> factory, float angle) {
+        AffineTransform t = new AffineTransform(factory);
+        t.setToRotation(angle);
+        return t;
+    }
+
+    public static <T extends Vertex> AffineTransform getRotateInstance(Vertex.Factory<? extends Vertex> factory, float angle, float x, float y) {
+        AffineTransform t = new AffineTransform(factory);
+        t.setToRotation(angle, x, y);
+        return t;
+    }
+
+    public void translate(float mx, float my) {
+        concatenate(AffineTransform.getTranslateInstance(pointFactory, mx, my));
+    }
+
+    public void scale(float scx, float scy) {
+        concatenate(AffineTransform.getScaleInstance(pointFactory, scx, scy));
+    }
+
+    public void shear(float shx, float shy) {
+        concatenate(AffineTransform.getShearInstance(pointFactory, shx, shy));
+    }
+
+    public void rotate(float angle) {
+        concatenate(AffineTransform.getRotateInstance(pointFactory, angle));
+    }
+
+    public void rotate(float angle, float px, float py) {
+        concatenate(AffineTransform.getRotateInstance(pointFactory, angle, px, py));
+    }
+
+    /** 
+     * Multiply matrix of two AffineTransform objects.
+     * The first argument's {@link Vertex.Factory} is being used.
+     * 
+     * @param t1 - the AffineTransform object is a multiplicand
+     * @param t2 - the AffineTransform object is a multiplier
+     * @return an AffineTransform object that is a result of t1 multiplied by matrix t2. 
+     */
+    AffineTransform multiply(AffineTransform t1, AffineTransform t2) {
+        return new AffineTransform(t1.pointFactory,
+                t1.m00 * t2.m00 + t1.m10 * t2.m01,          // m00
+                t1.m00 * t2.m10 + t1.m10 * t2.m11,          // m01
+                t1.m01 * t2.m00 + t1.m11 * t2.m01,          // m10
+                t1.m01 * t2.m10 + t1.m11 * t2.m11,          // m11
+                t1.m02 * t2.m00 + t1.m12 * t2.m01 + t2.m02, // m02
+                t1.m02 * t2.m10 + t1.m12 * t2.m11 + t2.m12);// m12
+    }
+
+    public void concatenate(AffineTransform t) {
+        setTransform(multiply(t, this));
+    }
+
+    public void preConcatenate(AffineTransform t) {
+        setTransform(multiply(this, t));
+    }
+
+    public AffineTransform createInverse() throws NoninvertibleTransformException {
+        float det = getDeterminant();
+        if (MathFloat.abs(det) < ZERO) {
+            throw new NoninvertibleTransformException(determinantIsZero);
+        }
+        return new AffineTransform(
+                this.pointFactory,
+                 m11 / det, // m00
+                -m10 / det, // m10
+                -m01 / det, // m01
+                 m00 / det, // m11
+                (m01 * m12 - m11 * m02) / det, // m02
+                (m10 * m02 - m00 * m12) / det  // m12
+        );
+    }
+
+    public Vertex transform(Vertex src, Vertex dst) {
+        if (dst == null) {
+            dst = pointFactory.create();
+        }
+
+        float x = src.getX();
+        float y = src.getY();
+
+        dst.setCoord(x * m00 + y * m01 + m02, x * m10 + y * m11 + m12, 0f);
+        return dst;
+    }
+
+    public void transform(Vertex[] src, int srcOff, Vertex[] dst, int dstOff, int length) {
+        while (--length >= 0) {
+            Vertex srcPoint = src[srcOff++]; 
+            float x = srcPoint.getX();
+            float y = srcPoint.getY();
+            Vertex dstPoint = dst[dstOff];
+            if (dstPoint == null) {
+                throw new IllegalArgumentException("dst["+dstOff+"] is null");
+            }
+            dstPoint.setCoord(x * m00 + y * m01 + m02, x * m10 + y * m11 + m12, 0f);
+            dst[dstOff++] = dstPoint;
+        }
+    }
+    
+    public void transform(float[] src, int srcOff, float[] dst, int dstOff, int length) {
+        int step = 2;
+        if (src == dst && srcOff < dstOff && dstOff < srcOff + length * 2) {
+            srcOff = srcOff + length * 2 - 2;
+            dstOff = dstOff + length * 2 - 2;
+            step = -2;
+        }
+        while (--length >= 0) {
+            float x = src[srcOff + 0];
+            float y = src[srcOff + 1];
+            dst[dstOff + 0] = x * m00 + y * m01 + m02;
+            dst[dstOff + 1] = x * m10 + y * m11 + m12;
+            srcOff += step;
+            dstOff += step;
+        }
+    }
+    
+    public Vertex deltaTransform(Vertex src, Vertex dst) {
+        if (dst == null) {
+            dst = pointFactory.create();
+        }
+
+        float x = src.getX();
+        float y = src.getY();
+
+        dst.setCoord(x * m00 + y * m01, x * m10 + y * m11, 0f);
+        return dst;
+    }
+
+    public void deltaTransform(float[] src, int srcOff, float[] dst, int dstOff, int length) {
+        while (--length >= 0) {
+            float x = src[srcOff++];
+            float y = src[srcOff++];
+            dst[dstOff++] = x * m00 + y * m01;
+            dst[dstOff++] = x * m10 + y * m11;
+        }
+    }
+
+    public Vertex inverseTransform(Vertex src, Vertex dst) throws NoninvertibleTransformException {
+        float det = getDeterminant();
+        if (MathFloat.abs(det) < ZERO) {
+            throw new NoninvertibleTransformException(determinantIsZero);
+        }
+        if (dst == null) {
+            dst = pointFactory.create();
+        }
+
+        float x = src.getX() - m02;
+        float y = src.getY() - m12;
+
+        dst.setCoord((x * m11 - y * m01) / det, (y * m00 - x * m10) / det, 0f);
+        return dst;
+    }
+
+    public void inverseTransform(float[] src, int srcOff, float[] dst, int dstOff, int length)
+        throws NoninvertibleTransformException
+    {
+        float det = getDeterminant();
+        if (MathFloat.abs(det) < ZERO) {
+            throw new NoninvertibleTransformException(determinantIsZero);            
+        }
+
+        while (--length >= 0) {
+            float x = src[srcOff++] - m02;
+            float y = src[srcOff++] - m12;
+            dst[dstOff++] = (x * m11 - y * m01) / det;
+            dst[dstOff++] = (y * m00 - x * m10) / det;
+        }
+    }
+
+    public Path2D createTransformedShape(Path2D src) {
+        if (src == null) {
+            return null;
+        }
+        if (src instanceof Path2D) {
+            return ((Path2D)src).createTransformedShape(this);
+        }
+        PathIterator path = src.iterator(this);
+        Path2D dst = new Path2D(path.getWindingRule());
+        dst.append(path, false);
+        return dst;
+    }
+
+    @Override
+    public String toString() {
+        return
+            getClass().getName() +
+            "[[" + m00 + ", " + m01 + ", " + m02 + "], [" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+                + m10 + ", " + m11 + ", " + m12 + "]]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+    }
+
+    @Override
+    public AffineTransform clone() {
+        try {
+            return (AffineTransform) super.clone();
+        } catch (CloneNotSupportedException e) {
+            throw new InternalError();
+        }
+    }
+
+    /** @Override
+    public int hashCode() {
+        HashCode hash = new HashCode();
+        hash.append(m00);
+        hash.append(m01);
+        hash.append(m02);
+        hash.append(m10);
+        hash.append(m11);
+        hash.append(m12);
+        return hash.hashCode();
+    } */
+
+    @Override
+    public boolean equals(Object obj) {
+        if (obj == this) {
+            return true;
+        }
+        if (obj instanceof AffineTransform) {
+            AffineTransform t = (AffineTransform)obj;
+            return
+                m00 == t.m00 && m01 == t.m01 &&
+                m02 == t.m02 && m10 == t.m10 &&
+                m11 == t.m11 && m12 == t.m12;
+        }
+        return false;
+    }
+
+    
+    /**
+     * Write AffineTrasform object to the output steam.
+     * @param stream - the output stream
+     * @throws IOException - if there are I/O errors while writing to the output strem
+     */
+    private void writeObject(java.io.ObjectOutputStream stream) throws IOException {
+        stream.defaultWriteObject();
+    }
+
+    
+    /**
+     * Read AffineTransform object from the input stream
+     * @param stream - the input steam
+     * @throws IOException - if there are I/O errors while reading from the input strem
+     * @throws ClassNotFoundException - if class could not be found 
+     */
+    private void readObject(java.io.ObjectInputStream stream) throws IOException, ClassNotFoundException {
+        stream.defaultReadObject();
+        type = TYPE_UNKNOWN;
+    }
+
+}
+
diff --git a/src/jogl/classes/jogamp/graph/geom/plane/IllegalPathStateException.java b/src/jogl/classes/jogamp/graph/geom/plane/IllegalPathStateException.java
new file mode 100644
index 0000000..55211b3
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/geom/plane/IllegalPathStateException.java
@@ -0,0 +1,34 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+/**
+ * @author Denis M. Kishenko
+ */
+package jogamp.graph.geom.plane;
+
+public class IllegalPathStateException extends RuntimeException {
+
+    private static final long serialVersionUID = -5158084205220481094L;
+
+    public IllegalPathStateException() {
+    }
+
+    public IllegalPathStateException(String s) {
+        super(s);
+    }
+
+}
+
diff --git a/src/jogl/classes/jogamp/graph/geom/plane/NoninvertibleTransformException.java b/src/jogl/classes/jogamp/graph/geom/plane/NoninvertibleTransformException.java
new file mode 100644
index 0000000..398a03f
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/geom/plane/NoninvertibleTransformException.java
@@ -0,0 +1,31 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+/**
+ * @author Denis M. Kishenko
+ */
+package jogamp.graph.geom.plane;
+
+public class NoninvertibleTransformException extends java.lang.Exception {
+
+    private static final long serialVersionUID = 6137225240503990466L;
+
+    public NoninvertibleTransformException(String s) {
+        super(s);
+    }
+
+}
+
diff --git a/src/jogl/classes/jogamp/graph/geom/plane/Path2D.java b/src/jogl/classes/jogamp/graph/geom/plane/Path2D.java
new file mode 100644
index 0000000..8082fe4
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/geom/plane/Path2D.java
@@ -0,0 +1,431 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+/**
+ * @author Denis M. Kishenko
+ */
+package jogamp.graph.geom.plane;
+
+import java.util.NoSuchElementException;
+
+import com.jogamp.graph.geom.AABBox;
+import com.jogamp.graph.geom.Vertex;
+import com.jogamp.graph.geom.opengl.SVertex;
+
+import jogamp.graph.math.plane.Crossing;
+
+public final class Path2D implements Cloneable {
+
+    public static final int WIND_EVEN_ODD = PathIterator.WIND_EVEN_ODD;
+    public static final int WIND_NON_ZERO = PathIterator.WIND_NON_ZERO;
+
+    static final String invalidWindingRuleValue = "Invalid winding rule value";
+    static final String iteratorOutOfBounds = "Iterator out of bounds";
+    
+    /**
+     * The buffers size
+     */
+    private static final int BUFFER_SIZE = 10;
+    
+    /**
+     * The buffers capacity
+     */
+    private static final int BUFFER_CAPACITY = 10;
+
+    /**
+     * The point's types buffer
+     */
+    byte[] types;
+    
+    /**
+     * The points buffer
+     */
+    float[] points;
+    
+    /**
+     * The point's type buffer size
+     */
+    int typeSize;
+    
+    /**
+     * The points buffer size
+     */
+    int pointSize;
+    
+    /**
+     * The path rule 
+     */
+    int rule;
+
+    /**
+     * The space amount in points buffer for different segmenet's types
+     */
+    static int pointShift[] = {
+            2,  // MOVETO
+            2,  // LINETO
+            4,  // QUADTO
+            6,  // CUBICTO
+            0}; // CLOSE
+
+    /*
+     * GeneralPath path iterator 
+     */
+    class Iterator implements PathIterator {
+
+        /**
+         * The current cursor position in types buffer
+         */
+        int typeIndex;
+        
+        /**
+         * The current cursor position in points buffer
+         */
+        int pointIndex;
+        
+        /**
+         * The source GeneralPath object
+         */
+        Path2D p;
+        
+        /**
+         * The path iterator transformation
+         */
+        AffineTransform t;
+
+        /**
+         * Constructs a new GeneralPath.Iterator for given general path
+         * @param path - the source GeneralPath object
+         */
+        Iterator(Path2D path) {
+            this(path, null);
+        }
+
+        /**
+         * Constructs a new GeneralPath.Iterator for given general path and transformation
+         * @param path - the source GeneralPath object
+         * @param at - the AffineTransform object to apply rectangle path
+         */
+        Iterator(Path2D path, AffineTransform at) {
+            this.p = path;
+            this.t = at;
+        }
+
+        public int getWindingRule() {
+            return p.getWindingRule();
+        }
+
+        public boolean isDone() {
+            return typeIndex >= p.typeSize;
+        }
+
+        public void next() {
+            typeIndex++;
+        }
+
+        public int currentSegment(float[] coords) {
+            if (isDone()) {
+                throw new NoSuchElementException(iteratorOutOfBounds);
+            }
+            int type = p.types[typeIndex];
+            int count = Path2D.pointShift[type];
+            System.arraycopy(p.points, pointIndex, coords, 0, count);
+            if (t != null) {
+                t.transform(coords, 0, coords, 0, count / 2);
+            }
+            pointIndex += count;
+            return type;
+        }
+
+    }
+
+    public Path2D() {
+        this(WIND_NON_ZERO, BUFFER_SIZE);
+    }
+
+    public Path2D(int rule) {
+        this(rule, BUFFER_SIZE);
+    }
+
+    public Path2D(int rule, int initialCapacity) {
+        setWindingRule(rule);
+        types = new byte[initialCapacity];
+        points = new float[initialCapacity * 2];
+    }
+
+    public Path2D(Path2D path) {
+        this(WIND_NON_ZERO, BUFFER_SIZE);
+        PathIterator p = path.iterator(null);
+        setWindingRule(p.getWindingRule());
+        append(p, false);
+    }
+
+    public void setWindingRule(int rule) {
+        if (rule != WIND_EVEN_ODD && rule != WIND_NON_ZERO) {
+            throw new NoSuchElementException(invalidWindingRuleValue);
+        }
+        this.rule = rule;
+    }
+
+    public int getWindingRule() {
+        return rule;
+    }
+
+    /**
+     * Checks points and types buffer size to add pointCount points. If necessary realloc buffers to enlarge size.   
+     * @param pointCount - the point count to be added in buffer
+     */
+    void checkBuf(int pointCount, boolean checkMove) {
+        if (checkMove && typeSize == 0) {
+            throw new IllegalPathStateException("First segment should be SEG_MOVETO type");
+        }
+        if (typeSize == types.length) {
+            byte tmp[] = new byte[typeSize + BUFFER_CAPACITY];
+            System.arraycopy(types, 0, tmp, 0, typeSize);
+            types = tmp;
+        }
+        if (pointSize + pointCount > points.length) {
+            float tmp[] = new float[pointSize + Math.max(BUFFER_CAPACITY * 2, pointCount)];
+            System.arraycopy(points, 0, tmp, 0, pointSize);
+            points = tmp;
+        }
+    }
+
+    public void moveTo(float x, float y) {
+        if (typeSize > 0 && types[typeSize - 1] == PathIterator.SEG_MOVETO) {
+            points[pointSize - 2] = x;
+            points[pointSize - 1] = y;
+        } else {
+            checkBuf(2, false);
+            types[typeSize++] = PathIterator.SEG_MOVETO;
+            points[pointSize++] = x;
+            points[pointSize++] = y;
+        }
+    }
+
+    public void lineTo(float x, float y) {
+        checkBuf(2, true);
+        types[typeSize++] = PathIterator.SEG_LINETO;
+        points[pointSize++] = x;
+        points[pointSize++] = y;
+    }
+
+    public void quadTo(float x1, float y1, float x2, float y2) {
+        checkBuf(4, true);
+        types[typeSize++] = PathIterator.SEG_QUADTO;
+        points[pointSize++] = x1;
+        points[pointSize++] = y1;
+        points[pointSize++] = x2;
+        points[pointSize++] = y2;
+    }
+
+    public void curveTo(float x1, float y1, float x2, float y2, float x3, float y3) {
+        checkBuf(6, true);
+        types[typeSize++] = PathIterator.SEG_CUBICTO;
+        points[pointSize++] = x1;
+        points[pointSize++] = y1;
+        points[pointSize++] = x2;
+        points[pointSize++] = y2;
+        points[pointSize++] = x3;
+        points[pointSize++] = y3;
+    }
+
+    final public int size() {
+        return typeSize;
+    }
+    
+    final public boolean isClosed() {
+        return typeSize > 0 && types[typeSize - 1] == PathIterator.SEG_CLOSE ;
+    }
+    
+    public void closePath() {
+        if (!isClosed()) {
+            checkBuf(0, true);
+            types[typeSize++] = PathIterator.SEG_CLOSE;
+        }
+    }
+    
+    public String toString() {
+        return "[size "+size()+", closed "+isClosed()+"]";
+    }
+
+    public void append(Path2D path, boolean connect) {
+        PathIterator p = path.iterator(null);
+        append(p, connect);
+    }
+
+    public void append(PathIterator path, boolean connect) {
+        while (!path.isDone()) {
+            final float coords[] = new float[6];
+            final int segmentType = path.currentSegment(coords);
+            switch (segmentType) {
+                case PathIterator.SEG_MOVETO:
+                    if (!connect || typeSize == 0) {
+                        moveTo(coords[0], coords[1]);
+                        break;
+                    }
+                    if (types[typeSize - 1] != PathIterator.SEG_CLOSE &&
+                        points[pointSize - 2] == coords[0] &&
+                        points[pointSize - 1] == coords[1])
+                    {
+                        break;
+                    }
+                // NO BREAK;
+                case PathIterator.SEG_LINETO:
+                    lineTo(coords[0], coords[1]);
+                    break;
+                case PathIterator.SEG_QUADTO:
+                    quadTo(coords[0], coords[1], coords[2], coords[3]);
+                    break;
+                case PathIterator.SEG_CUBICTO:
+                    curveTo(coords[0], coords[1], coords[2], coords[3], coords[4], coords[5]);
+                    break;
+                case PathIterator.SEG_CLOSE:
+                    closePath();
+                    break;
+                default:
+                    throw new IllegalArgumentException("Unhandled Segment Type: "+segmentType);                
+            }
+            path.next();
+            connect = false;
+        }
+    }
+
+    public SVertex getCurrentPoint() {
+        if (typeSize == 0) {
+            return null;
+        }
+        int j = pointSize - 2;
+        if (types[typeSize - 1] == PathIterator.SEG_CLOSE) {
+
+            for (int i = typeSize - 2; i > 0; i--) {
+                int type = types[i];
+                if (type == PathIterator.SEG_MOVETO) {
+                    break;
+                }
+                j -= pointShift[type];
+            }
+        }
+        return new SVertex(points[j], points[j + 1], 0f, true);
+    }
+
+    public void reset() {
+        typeSize = 0;
+        pointSize = 0;
+    }
+
+    public void transform(AffineTransform t) {
+        t.transform(points, 0, points, 0, pointSize / 2);
+    }
+
+    public Path2D createTransformedShape(AffineTransform t) {
+        Path2D p = (Path2D)clone();
+        if (t != null) {
+            p.transform(t);
+        }
+        return p;
+    }
+
+    public final synchronized AABBox getBounds2D() {
+        float rx1, ry1, rx2, ry2;
+        if (pointSize == 0) {
+            rx1 = ry1 = rx2 = ry2 = 0.0f;
+        } else {
+            int i = pointSize - 1;
+            ry1 = ry2 = points[i--];
+            rx1 = rx2 = points[i--];
+            while (i > 0) {
+                float y = points[i--];
+                float x = points[i--];
+                if (x < rx1) {
+                    rx1 = x;
+                } else
+                    if (x > rx2) {
+                        rx2 = x;
+                    }
+                if (y < ry1) {
+                    ry1 = y;
+                } else
+                    if (y > ry2) {
+                        ry2 = y;
+                    }
+            }
+        }
+        return new AABBox(rx1, ry1, 0f, rx2, ry2, 0f);
+    }
+
+    /**
+     * Checks cross count according to path rule to define is it point inside shape or not. 
+     * @param cross - the point cross count
+     * @return true if point is inside path, or false otherwise 
+     */
+    boolean isInside(int cross) {
+        if (rule == WIND_NON_ZERO) {
+            return Crossing.isInsideNonZero(cross);
+        }
+        return Crossing.isInsideEvenOdd(cross);
+    }
+
+    public boolean contains(float px, float py) {
+        return isInside(Crossing.crossShape(this, px, py));
+    }
+
+    public boolean contains(float rx, float ry, float rw, float rh) {
+        int cross = Crossing.intersectShape(this, rx, ry, rw, rh);
+        return cross != Crossing.CROSSING && isInside(cross);
+    }
+
+    public boolean intersects(float rx, float ry, float rw, float rh) {
+        int cross = Crossing.intersectShape(this, rx, ry, rw, rh);
+        return cross == Crossing.CROSSING || isInside(cross);
+    }
+
+    public boolean contains(Vertex p) {
+        return contains(p.getX(), p.getY());
+    }
+
+    public boolean contains(AABBox r) {
+        return contains(r);
+    }
+
+    public boolean intersects(AABBox r) {
+        return intersects(r.getMinX(), r.getMinY(), r.getWidth(), r.getHeight());
+    }
+
+    public PathIterator iterator() {
+        return new Iterator(this);        
+    }
+       
+    public PathIterator iterator(AffineTransform t) {
+        return new Iterator(this, t);
+    }
+
+    /* public PathIterator getPathIterator(AffineTransform t, float flatness) {
+        return new FlatteningPathIterator(getPathIterator(t), flatness);
+    } */
+
+    @Override
+    public Object clone() {
+        try {
+            Path2D p = (Path2D) super.clone();
+            p.types = types.clone();
+            p.points = points.clone();
+            return p;
+        } catch (CloneNotSupportedException e) {
+            throw new InternalError();
+        }
+    }
+}
+
diff --git a/src/jogl/classes/jogamp/graph/geom/plane/PathIterator.java b/src/jogl/classes/jogamp/graph/geom/plane/PathIterator.java
new file mode 100644
index 0000000..8868a8c
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/geom/plane/PathIterator.java
@@ -0,0 +1,42 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+/**
+ * @author Denis M. Kishenko
+ */
+package jogamp.graph.geom.plane;
+
+public interface PathIterator {
+
+    public static final int WIND_EVEN_ODD = 0;
+    public static final int WIND_NON_ZERO = 1;
+
+    public static final int SEG_MOVETO  = 0;
+    public static final int SEG_LINETO  = 1;
+    public static final int SEG_QUADTO  = 2;
+    public static final int SEG_CUBICTO = 3;
+    public static final int SEG_CLOSE   = 4;
+
+    public int getWindingRule();
+
+    public boolean isDone();
+
+    public void next();
+
+    public int currentSegment(float[] coords);
+
+}
+
diff --git a/src/jogl/classes/jogamp/graph/math/MathFloat.java b/src/jogl/classes/jogamp/graph/math/MathFloat.java
new file mode 100644
index 0000000..0b8d69e
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/math/MathFloat.java
@@ -0,0 +1,45 @@
+/**
+ * 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 jogamp.graph.math;
+
+public class MathFloat {
+
+    public static final float E = 2.7182818284590452354f;
+
+    public static final float PI = 3.14159265358979323846f;
+    
+    public static float abs(float a) { return (float) java.lang.Math.abs(a);  }
+    public static float pow(float a, float b) { return (float) java.lang.Math.pow(a, b);  }
+    
+    public static float sin(float a) { return (float) java.lang.Math.sin(a);  }
+    public static float cos(float a) { return (float) java.lang.Math.cos(a);  }
+    public static float acos(float a) { return (float) java.lang.Math.acos(a);  }
+    
+    public static float sqrt(float a) { return (float) java.lang.Math.sqrt(a);  }
+    
+}
diff --git a/src/jogl/classes/jogamp/graph/math/plane/Crossing.java b/src/jogl/classes/jogamp/graph/math/plane/Crossing.java
new file mode 100644
index 0000000..9be5978
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/math/plane/Crossing.java
@@ -0,0 +1,903 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+/**
+ * @author Denis M. Kishenko
+ */
+package jogamp.graph.math.plane;
+
+import jogamp.graph.geom.plane.Path2D;
+import jogamp.graph.geom.plane.PathIterator;
+import jogamp.graph.math.MathFloat;
+
+
+public class Crossing {
+
+    /**
+     * Allowable tolerance for bounds comparison
+     */
+    static final float DELTA = (float) 1E-5;
+    
+    /**
+     * If roots have distance less then <code>ROOT_DELTA</code> they are double
+     */
+    static final float ROOT_DELTA = (float) 1E-10;
+    
+    /**
+     * Rectangle cross segment
+     */
+    public static final int CROSSING = 255;
+    
+    /**
+     * Unknown crossing result
+     */
+    static final int UNKNOWN = 254;
+
+    /**
+     * Solves quadratic equation
+     * @param eqn - the coefficients of the equation
+     * @param res - the roots of the equation
+     * @return a number of roots
+     */
+    public static int solveQuad(float eqn[], float res[]) {
+        float a = eqn[2];
+        float b = eqn[1];
+        float c = eqn[0];
+        int rc = 0;
+        if (a == 0.0) {
+            if (b == 0.0) {
+                return -1;
+            }
+            res[rc++] = -c / b;
+        } else {
+            float d = b * b - 4.0f * a * c;
+            // d < 0.0
+            if (d < 0.0) {
+                return 0;
+            }
+            d = MathFloat.sqrt(d);
+            res[rc++] = (- b + d) / (a * 2.0f);
+            // d != 0.0
+            if (d != 0.0) {
+                res[rc++] = (- b - d) / (a * 2.0f);
+            }
+        }
+        return fixRoots(res, rc);
+    }
+
+    /**
+     * Solves cubic equation
+     * @param eqn - the coefficients of the equation
+     * @param res - the roots of the equation
+     * @return a number of roots
+     */
+    public static int solveCubic(float eqn[], float res[]) {
+        float d = eqn[3];
+        if (d == 0) {
+            return solveQuad(eqn, res);
+        }
+        float a = eqn[2] / d;
+        float b = eqn[1] / d;
+        float c = eqn[0] / d;
+        int rc = 0;
+
+        float Q = (a * a - 3.0f * b) / 9.0f;
+        float R = (2.0f * a * a * a - 9.0f * a * b + 27.0f * c) / 54.0f;
+        float Q3 = Q * Q * Q;
+        float R2 = R * R;
+        float n = - a / 3.0f;
+
+        if (R2 < Q3) {
+            float t = MathFloat.acos(R / MathFloat.sqrt(Q3)) / 3.0f;
+            float p = 2.0f * MathFloat.PI / 3.0f;
+            float m = -2.0f * MathFloat.sqrt(Q);
+            res[rc++] = m * MathFloat.cos(t) + n;
+            res[rc++] = m * MathFloat.cos(t + p) + n;
+            res[rc++] = m * MathFloat.cos(t - p) + n;
+        } else {
+//          Debug.println("R2 >= Q3 (" + R2 + "/" + Q3 + ")");
+            float A = MathFloat.pow(MathFloat.abs(R) + MathFloat.sqrt(R2 - Q3), 1.0f / 3.0f);
+            if (R > 0.0) {
+                A = -A;
+            }
+//          if (A == 0.0) {
+            if (-ROOT_DELTA < A && A < ROOT_DELTA) {
+                res[rc++] = n;
+            } else {
+                float B = Q / A;
+                res[rc++] = A + B + n;
+//              if (R2 == Q3) {
+                float delta = R2 - Q3;
+                if (-ROOT_DELTA < delta && delta < ROOT_DELTA) {
+                    res[rc++] = - (A + B) / 2.0f + n;
+                }
+            }
+
+        }
+        return fixRoots(res, rc);
+    }
+
+    /**
+     * Excludes float roots. Roots are float if they lies enough close with each other. 
+     * @param res - the roots 
+     * @param rc - the roots count
+     * @return new roots count
+     */
+    static int fixRoots(float res[], int rc) {
+        int tc = 0;
+        for(int i = 0; i < rc; i++) {
+            out: {
+                for(int j = i + 1; j < rc; j++) {
+                    if (isZero(res[i] - res[j])) {
+                        break out;
+                    }
+                }
+                res[tc++] = res[i];
+            }
+        }
+        return tc;
+    }
+
+    /**
+     * QuadCurve class provides basic functionality to find curve crossing and calculating bounds
+     */
+    public static class QuadCurve {
+
+        float ax, ay, bx, by;
+        float Ax, Ay, Bx, By;
+
+        public QuadCurve(float x1, float y1, float cx, float cy, float x2, float y2) {
+            ax = x2 - x1;
+            ay = y2 - y1;
+            bx = cx - x1;
+            by = cy - y1;
+
+            Bx = bx + bx;   // Bx = 2.0 * bx
+            Ax = ax - Bx;   // Ax = ax - 2.0 * bx
+
+            By = by + by;   // By = 2.0 * by
+            Ay = ay - By;   // Ay = ay - 2.0 * by
+        }
+
+        int cross(float res[], int rc, float py1, float py2) {
+            int cross = 0;
+
+            for (int i = 0; i < rc; i++) {
+                float t = res[i];
+
+                // CURVE-OUTSIDE
+                if (t < -DELTA || t > 1 + DELTA) {
+                    continue;
+                }
+                // CURVE-START
+                if (t < DELTA) {
+                    if (py1 < 0.0 && (bx != 0.0 ? bx : ax - bx) < 0.0) {
+                        cross--;
+                    }
+                    continue;
+                }
+                // CURVE-END
+                if (t > 1 - DELTA) {
+                    if (py1 < ay && (ax != bx ? ax - bx : bx) > 0.0) {
+                        cross++;
+                    }
+                    continue;
+                }
+                // CURVE-INSIDE
+                float ry = t * (t * Ay + By);
+                // ry = t * t * Ay + t * By
+                if (ry > py2) {
+                    float rxt = t * Ax + bx;
+                    // rxt = 2.0 * t * Ax + Bx = 2.0 * t * Ax + 2.0 * bx
+                    if (rxt > -DELTA && rxt < DELTA) {
+                        continue;
+                    }
+                    cross += rxt > 0.0 ? 1 : -1;
+                }
+            } // for
+
+            return cross;
+        }
+
+        int solvePoint(float res[], float px) {
+            float eqn[] = {-px, Bx, Ax};
+            return solveQuad(eqn, res);
+        }
+
+        int solveExtrem(float res[]) {
+            int rc = 0;
+            if (Ax != 0.0) {
+                res[rc++] = - Bx / (Ax + Ax);
+            }
+            if (Ay != 0.0) {
+                res[rc++] = - By / (Ay + Ay);
+            }
+            return rc;
+        }
+
+        int addBound(float bound[], int bc, float res[], int rc, float minX, float maxX, boolean changeId, int id) {
+            for(int i = 0; i < rc; i++) {
+                float t = res[i];
+                if (t > -DELTA && t < 1 + DELTA) {
+                    float rx = t * (t * Ax + Bx);
+                    if (minX <= rx && rx <= maxX) {
+                        bound[bc++] = t;
+                        bound[bc++] = rx;
+                        bound[bc++] = t * (t * Ay + By);
+                        bound[bc++] = id;
+                        if (changeId) {
+                            id++;
+                        }
+                    }
+                }
+            }
+            return bc;
+        }
+
+    }
+
+    /**
+     * CubicCurve class provides basic functionality to find curve crossing and calculating bounds
+     */
+    public static class CubicCurve {
+
+        float ax, ay, bx, by, cx, cy;
+        float Ax, Ay, Bx, By, Cx, Cy;
+        float Ax3, Bx2;
+
+        public CubicCurve(float x1, float y1, float cx1, float cy1, float cx2, float cy2, float x2, float y2) {
+            ax = x2 - x1;
+            ay = y2 - y1;
+            bx = cx1 - x1;
+            by = cy1 - y1;
+            cx = cx2 - x1;
+            cy = cy2 - y1;
+
+            Cx = bx + bx + bx;           // Cx = 3.0 * bx
+            Bx = cx + cx + cx - Cx - Cx; // Bx = 3.0 * cx - 6.0 * bx
+            Ax = ax - Bx - Cx;           // Ax = ax - 3.0 * cx + 3.0 * bx
+
+            Cy = by + by + by;           // Cy = 3.0 * by
+            By = cy + cy + cy - Cy - Cy; // By = 3.0 * cy - 6.0 * by
+            Ay = ay - By - Cy;           // Ay = ay - 3.0 * cy + 3.0 * by
+
+            Ax3 = Ax + Ax + Ax;
+            Bx2 = Bx + Bx;
+        }
+
+        int cross(float res[], int rc, float py1, float py2) {
+            int cross = 0;
+            for (int i = 0; i < rc; i++) {
+                float t = res[i];
+
+                // CURVE-OUTSIDE
+                if (t < -DELTA || t > 1 + DELTA) {
+                    continue;
+                }
+                // CURVE-START
+                if (t < DELTA) {
+                    if (py1 < 0.0 && (bx != 0.0 ? bx : (cx != bx ? cx - bx : ax - cx)) < 0.0) {
+                        cross--;
+                    }
+                    continue;
+                }
+                // CURVE-END
+                if (t > 1 - DELTA) {
+                    if (py1 < ay && (ax != cx ? ax - cx : (cx != bx ? cx - bx : bx)) > 0.0) {
+                        cross++;
+                    }
+                    continue;
+                }
+                // CURVE-INSIDE
+                float ry = t * (t * (t * Ay + By) + Cy);
+                // ry = t * t * t * Ay + t * t * By + t * Cy
+                if (ry > py2) {
+                    float rxt = t * (t * Ax3 + Bx2) + Cx;
+                    // rxt = 3.0 * t * t * Ax + 2.0 * t * Bx + Cx
+                    if (rxt > -DELTA && rxt < DELTA) {
+                        rxt = t * (Ax3 + Ax3) + Bx2;
+                        // rxt = 6.0 * t * Ax + 2.0 * Bx
+                        if (rxt < -DELTA || rxt > DELTA) {
+                            // Inflection point
+                            continue;
+                        }
+                        rxt = ax;
+                    }
+                    cross += rxt > 0.0 ? 1 : -1;
+                }
+            } //for
+
+            return cross;
+        }
+
+        int solvePoint(float res[], float px) {
+            float eqn[] = {-px, Cx, Bx, Ax};
+            return solveCubic(eqn, res);
+        }
+
+        int solveExtremX(float res[]) {
+            float eqn[] = {Cx, Bx2, Ax3};
+            return solveQuad(eqn, res);
+        }
+
+        int solveExtremY(float res[]) {
+            float eqn[] = {Cy, By + By, Ay + Ay + Ay};
+            return solveQuad(eqn, res);
+        }
+
+        int addBound(float bound[], int bc, float res[], int rc, float minX, float maxX, boolean changeId, int id) {
+            for(int i = 0; i < rc; i++) {
+                float t = res[i];
+                if (t > -DELTA && t < 1 + DELTA) {
+                    float rx = t * (t * (t * Ax + Bx) + Cx);
+                    if (minX <= rx && rx <= maxX) {
+                        bound[bc++] = t;
+                        bound[bc++] = rx;
+                        bound[bc++] = t * (t * (t * Ay + By) + Cy);
+                        bound[bc++] = id;
+                        if (changeId) {
+                            id++;
+                        }
+                    }
+                }
+            }
+            return bc;
+        }
+
+    }
+
+    /**
+     * Returns how many times ray from point (x,y) cross line.
+     */
+    public static int crossLine(float x1, float y1, float x2, float y2, float x, float y) {
+
+        // LEFT/RIGHT/UP/EMPTY
+        if ((x < x1 && x < x2) ||
+            (x > x1 && x > x2) ||
+            (y > y1 && y > y2) ||
+            (x1 == x2))
+        {
+            return 0;
+        }
+
+        // DOWN
+        if (y < y1 && y < y2) {
+        } else {
+            // INSIDE
+            if ((y2 - y1) * (x - x1) / (x2 - x1) <= y - y1) {
+                // INSIDE-UP
+                return 0;
+            }
+        }
+
+        // START
+        if (x == x1) {
+            return x1 < x2 ? 0 : -1;        
+        }
+        
+        // END
+        if (x == x2) {
+            return x1 < x2 ? 1 : 0;        
+        }
+
+        // INSIDE-DOWN
+        return x1 < x2 ? 1 : -1;
+    }
+
+    /**
+     * Returns how many times ray from point (x,y) cross quard curve
+     */
+    public static int crossQuad(float x1, float y1, float cx, float cy, float x2, float y2, float x, float y) {
+
+        // LEFT/RIGHT/UP/EMPTY
+        if ((x < x1 && x < cx && x < x2) ||
+            (x > x1 && x > cx && x > x2) ||
+            (y > y1 && y > cy && y > y2) ||
+            (x1 == cx && cx == x2))
+        {
+            return 0;
+        }
+
+        // DOWN
+        if (y < y1 && y < cy && y < y2 && x != x1 && x != x2) {
+            if (x1 < x2) {
+                return x1 < x && x < x2 ? 1 : 0;
+            }
+            return x2 < x && x < x1 ? -1 : 0;
+        }
+
+        // INSIDE
+        QuadCurve c = new QuadCurve(x1, y1, cx, cy, x2, y2);
+        float px = x - x1;
+        float py = y - y1;
+        float res[] = new float[3];
+        int rc = c.solvePoint(res, px);
+
+        return c.cross(res, rc, py, py);
+    }
+
+    /**
+     * Returns how many times ray from point (x,y) cross cubic curve
+     */
+    public static int crossCubic(float x1, float y1, float cx1, float cy1, float cx2, float cy2, float x2, float y2, float x, float y) {
+
+        // LEFT/RIGHT/UP/EMPTY
+        if ((x < x1 && x < cx1 && x < cx2 && x < x2) ||
+            (x > x1 && x > cx1 && x > cx2 && x > x2) ||
+            (y > y1 && y > cy1 && y > cy2 && y > y2) ||
+            (x1 == cx1 && cx1 == cx2 && cx2 == x2))
+        {
+            return 0;
+        }
+
+        // DOWN
+        if (y < y1 && y < cy1 && y < cy2 && y < y2 && x != x1 && x != x2) {
+            if (x1 < x2) {
+                return x1 < x && x < x2 ? 1 : 0;
+            }
+            return x2 < x && x < x1 ? -1 : 0;
+        }
+
+        // INSIDE
+        CubicCurve c = new CubicCurve(x1, y1, cx1, cy1, cx2, cy2, x2, y2);
+        float px = x - x1;
+        float py = y - y1;
+        float res[] = new float[3];
+        int rc = c.solvePoint(res, px);
+        return c.cross(res, rc, py, py);
+    }
+
+    /**
+     * Returns how many times ray from point (x,y) cross path
+     */
+    public static int crossPath(PathIterator p, float x, float y) {
+        int cross = 0;
+        float mx, my, cx, cy;
+        mx = my = cx = cy = 0.0f;
+        final float coords[] = new float[6];
+
+        while (!p.isDone()) {
+            final int segmentType = p.currentSegment(coords);
+            switch (segmentType) {
+                case PathIterator.SEG_MOVETO:
+                    if (cx != mx || cy != my) {
+                        cross += crossLine(cx, cy, mx, my, x, y);
+                    }
+                    mx = cx = coords[0];
+                    my = cy = coords[1];
+                    break;
+                case PathIterator.SEG_LINETO:
+                    cross += crossLine(cx, cy, cx = coords[0], cy = coords[1], x, y);
+                    break;
+                case PathIterator.SEG_QUADTO:
+                    cross += crossQuad(cx, cy, coords[0], coords[1], cx = coords[2], cy = coords[3], x, y);
+                    break;
+                case PathIterator.SEG_CUBICTO:
+                    cross += crossCubic(cx, cy, coords[0], coords[1], coords[2], coords[3], cx = coords[4], cy = coords[5], x, y);
+                    break;
+                case PathIterator.SEG_CLOSE:
+                    if (cy != my || cx != mx) {
+                        cross += crossLine(cx, cy, cx = mx, cy = my, x, y);
+                    }
+                    break;
+                default:
+                    throw new IllegalArgumentException("Unhandled Segment Type: "+segmentType);                
+            }
+            
+            // checks if the point (x,y) is the vertex of shape with PathIterator p           
+            if (x == cx && y == cy) {
+                cross = 0;
+                cy = my;
+                break;
+            }
+            p.next();
+        }
+        if (cy != my) {
+            cross += crossLine(cx, cy, mx, my, x, y);
+        }
+        return cross;
+    }
+
+    /**
+     * Returns how many times ray from point (x,y) cross shape
+     */
+    public static int crossShape(Path2D s, float x, float y) {
+        if (!s.getBounds2D().contains(x, y)) {
+            return 0;
+        }
+        return crossPath(s.iterator(null), x, y);
+    }
+
+    /**
+     * Returns true if value enough small
+     */
+    public static boolean isZero(float val) {
+        return -DELTA < val && val < DELTA;
+    }
+
+    /**
+     * Sort bound array
+     */
+    static void sortBound(float bound[], int bc) {
+        for(int i = 0; i < bc - 4; i += 4) {
+            int k = i;
+            for(int j = i + 4; j < bc; j += 4) {
+                if (bound[k] > bound[j]) {
+                    k = j;
+                }
+            }
+            if (k != i) {
+                float tmp = bound[i];
+                bound[i] = bound[k];
+                bound[k] = tmp;
+                tmp = bound[i + 1];
+                bound[i + 1] = bound[k + 1];
+                bound[k + 1] = tmp;
+                tmp = bound[i + 2];
+                bound[i + 2] = bound[k + 2];
+                bound[k + 2] = tmp;
+                tmp = bound[i + 3];
+                bound[i + 3] = bound[k + 3];
+                bound[k + 3] = tmp;
+            }
+        }
+    }
+    
+    /**
+     * Returns are bounds intersect or not intersect rectangle 
+     */
+    static int crossBound(float bound[], int bc, float py1, float py2) {
+
+        // LEFT/RIGHT
+        if (bc == 0) {
+            return 0;
+        }
+
+        // Check Y coordinate
+        int up = 0;
+        int down = 0;
+        for(int i = 2; i < bc; i += 4) {
+            if (bound[i] < py1) {
+                up++;
+                continue;
+            }
+            if (bound[i] > py2) {
+                down++;
+                continue;
+            }
+            return CROSSING;
+        }
+
+        // UP
+        if (down == 0) {
+            return 0;
+        }
+
+        if (up != 0) {
+            // bc >= 2
+            sortBound(bound, bc);
+            boolean sign = bound[2] > py2;
+            for(int i = 6; i < bc; i += 4) {
+                boolean sign2 = bound[i] > py2;
+                if (sign != sign2 && bound[i + 1] != bound[i - 3]) {
+                    return CROSSING;
+                }
+                sign = sign2;
+            }
+        }
+        return UNKNOWN;
+    }
+
+    /**
+     * Returns how many times rectangle stripe cross line or the are intersect
+     */
+    public static int intersectLine(float x1, float y1, float x2, float y2, float rx1, float ry1, float rx2, float ry2) {
+
+        // LEFT/RIGHT/UP
+        if ((rx2 < x1 && rx2 < x2) ||
+            (rx1 > x1 && rx1 > x2) ||
+            (ry1 > y1 && ry1 > y2))
+        {
+            return 0;
+        }
+
+        // DOWN
+        if (ry2 < y1 && ry2 < y2) {
+        } else {
+
+            // INSIDE
+            if (x1 == x2) {
+                return CROSSING;
+            }
+
+            // Build bound
+            float bx1, bx2;
+            if (x1 < x2) {
+                bx1 = x1 < rx1 ? rx1 : x1;
+                bx2 = x2 < rx2 ? x2 : rx2;
+            } else {
+                bx1 = x2 < rx1 ? rx1 : x2;
+                bx2 = x1 < rx2 ? x1 : rx2;
+            }
+            float k = (y2 - y1) / (x2 - x1);
+            float by1 = k * (bx1 - x1) + y1;
+            float by2 = k * (bx2 - x1) + y1;
+
+            // BOUND-UP
+            if (by1 < ry1 && by2 < ry1) {
+                return 0;
+            }
+
+            // BOUND-DOWN
+            if (by1 > ry2 && by2 > ry2) {
+            } else {
+                return CROSSING;
+            }
+        }
+
+        // EMPTY
+        if (x1 == x2) {
+            return 0;
+        }
+
+        // CURVE-START
+        if (rx1 == x1) {
+            return x1 < x2 ? 0 : -1;
+        }
+
+        // CURVE-END
+        if (rx1 == x2) {
+            return x1 < x2 ? 1 : 0;
+        }
+
+        if (x1 < x2) {
+            return x1 < rx1 && rx1 < x2 ? 1 : 0;
+        }
+        return x2 < rx1 && rx1 < x1 ? -1 : 0;
+
+    }
+
+    /**
+     * Returns how many times rectangle stripe cross quad curve or the are intersect
+     */
+    public static int intersectQuad(float x1, float y1, float cx, float cy, float x2, float y2, float rx1, float ry1, float rx2, float ry2) {
+
+        // LEFT/RIGHT/UP ------------------------------------------------------
+        if ((rx2 < x1 && rx2 < cx && rx2 < x2) ||
+            (rx1 > x1 && rx1 > cx && rx1 > x2) ||
+            (ry1 > y1 && ry1 > cy && ry1 > y2))
+        {
+            return 0;
+        }
+
+        // DOWN ---------------------------------------------------------------
+        if (ry2 < y1 && ry2 < cy && ry2 < y2 && rx1 != x1 && rx1 != x2) {
+            if (x1 < x2) {
+                return x1 < rx1 && rx1 < x2 ? 1 : 0;
+            }
+            return x2 < rx1 && rx1 < x1 ? -1 : 0;
+        }
+
+        // INSIDE -------------------------------------------------------------
+        QuadCurve c = new QuadCurve(x1, y1, cx, cy, x2, y2);
+        float px1 = rx1 - x1;
+        float py1 = ry1 - y1;
+        float px2 = rx2 - x1;
+        float py2 = ry2 - y1;
+
+        float res1[] = new float[3];
+        float res2[] = new float[3];
+        int rc1 = c.solvePoint(res1, px1);
+        int rc2 = c.solvePoint(res2, px2);
+
+        // INSIDE-LEFT/RIGHT
+        if (rc1 == 0 && rc2 == 0) {
+            return 0;
+        }
+
+        // Build bound --------------------------------------------------------
+        float minX = px1 - DELTA;
+        float maxX = px2 + DELTA;
+        float bound[] = new float[28];
+        int bc = 0;
+        // Add roots
+        bc = c.addBound(bound, bc, res1, rc1, minX, maxX, false, 0);
+        bc = c.addBound(bound, bc, res2, rc2, minX, maxX, false, 1);
+        // Add extremal points`
+        rc2 = c.solveExtrem(res2);
+        bc = c.addBound(bound, bc, res2, rc2, minX, maxX, true, 2);
+        // Add start and end
+        if (rx1 < x1 && x1 < rx2) {
+            bound[bc++] = 0.0f;
+            bound[bc++] = 0.0f;
+            bound[bc++] = 0.0f;
+            bound[bc++] = 4;
+        }
+        if (rx1 < x2 && x2 < rx2) {
+            bound[bc++] = 1.0f;
+            bound[bc++] = c.ax;
+            bound[bc++] = c.ay;
+            bound[bc++] = 5;
+        }
+        // End build bound ----------------------------------------------------
+
+        int cross = crossBound(bound, bc, py1, py2);
+        if (cross != UNKNOWN) {
+            return cross;
+        }
+        return c.cross(res1, rc1, py1, py2);
+    }
+
+    /**
+     * Returns how many times rectangle stripe cross cubic curve or the are intersect
+     */
+    public static int intersectCubic(float x1, float y1, float cx1, float cy1, float cx2, float cy2, float x2, float y2, float rx1, float ry1, float rx2, float ry2) {
+
+        // LEFT/RIGHT/UP
+        if ((rx2 < x1 && rx2 < cx1 && rx2 < cx2 && rx2 < x2) ||
+            (rx1 > x1 && rx1 > cx1 && rx1 > cx2 && rx1 > x2) ||
+            (ry1 > y1 && ry1 > cy1 && ry1 > cy2 && ry1 > y2))
+        {
+            return 0;
+        }
+
+        // DOWN
+        if (ry2 < y1 && ry2 < cy1 && ry2 < cy2 && ry2 < y2 && rx1 != x1 && rx1 != x2) {
+            if (x1 < x2) {
+                return x1 < rx1 && rx1 < x2 ? 1 : 0;
+            }
+            return x2 < rx1 && rx1 < x1 ? -1 : 0;
+        }
+
+        // INSIDE
+        CubicCurve c = new CubicCurve(x1, y1, cx1, cy1, cx2, cy2, x2, y2);
+        float px1 = rx1 - x1;
+        float py1 = ry1 - y1;
+        float px2 = rx2 - x1;
+        float py2 = ry2 - y1;
+
+        float res1[] = new float[3];
+        float res2[] = new float[3];
+        int rc1 = c.solvePoint(res1, px1);
+        int rc2 = c.solvePoint(res2, px2);
+
+        // LEFT/RIGHT
+        if (rc1 == 0 && rc2 == 0) {
+            return 0;
+        }
+
+        float minX = px1 - DELTA;
+        float maxX = px2 + DELTA;
+
+        // Build bound --------------------------------------------------------
+        float bound[] = new float[40];
+        int bc = 0;
+        // Add roots
+        bc = c.addBound(bound, bc, res1, rc1, minX, maxX, false, 0);
+        bc = c.addBound(bound, bc, res2, rc2, minX, maxX, false, 1);
+        // Add extrimal points
+        rc2 = c.solveExtremX(res2);
+        bc = c.addBound(bound, bc, res2, rc2, minX, maxX, true, 2);
+        rc2 = c.solveExtremY(res2);
+        bc = c.addBound(bound, bc, res2, rc2, minX, maxX, true, 4);
+        // Add start and end
+        if (rx1 < x1 && x1 < rx2) {
+            bound[bc++] = 0.0f;
+            bound[bc++] = 0.0f;
+            bound[bc++] = 0.0f;
+            bound[bc++] = 6;
+        }
+        if (rx1 < x2 && x2 < rx2) {
+            bound[bc++] = 1.0f;
+            bound[bc++] = c.ax;
+            bound[bc++] = c.ay;
+            bound[bc++] = 7;
+        }
+        // End build bound ----------------------------------------------------
+
+        int cross = crossBound(bound, bc, py1, py2);
+        if (cross != UNKNOWN) {
+            return cross;
+        }
+        return c.cross(res1, rc1, py1, py2);
+    }
+
+    /**
+     * Returns how many times rectangle stripe cross path or the are intersect
+     */
+    public static int intersectPath(PathIterator p, float x, float y, float w, float h) {
+
+        int cross = 0;
+        int count;
+        float mx, my, cx, cy;
+        mx = my = cx = cy = 0.0f;
+        final float coords[] = new float[6];
+
+        float rx1 = x;
+        float ry1 = y;
+        float rx2 = x + w;
+        float ry2 = y + h;
+
+        while (!p.isDone()) {
+            count = 0;
+            final int segmentType = p.currentSegment(coords);
+            switch (segmentType) {
+                case PathIterator.SEG_MOVETO:
+                    if (cx != mx || cy != my) {
+                        count = intersectLine(cx, cy, mx, my, rx1, ry1, rx2, ry2);
+                    }
+                    mx = cx = coords[0];
+                    my = cy = coords[1];
+                    break;
+                case PathIterator.SEG_LINETO:
+                    count = intersectLine(cx, cy, cx = coords[0], cy = coords[1], rx1, ry1, rx2, ry2);
+                    break;
+                case PathIterator.SEG_QUADTO:
+                    count = intersectQuad(cx, cy, coords[0], coords[1], cx = coords[2], cy = coords[3], rx1, ry1, rx2, ry2);
+                    break;
+                case PathIterator.SEG_CUBICTO:
+                    count = intersectCubic(cx, cy, coords[0], coords[1], coords[2], coords[3], cx = coords[4], cy = coords[5], rx1, ry1, rx2, ry2);
+                    break;
+                case PathIterator.SEG_CLOSE:
+                    if (cy != my || cx != mx) {
+                        count = intersectLine(cx, cy, mx, my, rx1, ry1, rx2, ry2);
+                    }
+                    cx = mx;
+                    cy = my;
+                    break;
+                default:
+                    throw new IllegalArgumentException("Unhandled Segment Type: "+segmentType);
+            }
+            if (count == CROSSING) {
+                return CROSSING;
+            }
+            cross += count;
+            p.next();
+        }
+        if (cy != my) {
+            count = intersectLine(cx, cy, mx, my, rx1, ry1, rx2, ry2);
+            if (count == CROSSING) {
+                return CROSSING;
+            }
+            cross += count;
+        }
+        return cross;
+    }
+
+    /**
+     * Returns how many times rectangle stripe cross shape or the are intersect
+     */
+    public static int intersectShape(Path2D s, float x, float y, float w, float h) {
+        if (!s.getBounds2D().intersects(x, y, w, h)) {
+            return 0;
+        }
+        return intersectPath(s.iterator(null), x, y, w, h);
+    }
+
+    /**
+     * Returns true if cross count correspond inside location for non zero path rule
+     */
+    public static boolean isInsideNonZero(int cross) {
+        return cross != 0;
+    }
+
+    /**
+     * Returns true if cross count correspond inside location for even-odd path rule
+     */
+    public static boolean isInsideEvenOdd(int cross) {
+        return (cross & 1) != 0;
+    }
+}
diff --git a/src/jogl/classes/jogamp/opengl/DesktopGLDynamicLibraryBundleInfo.java b/src/jogl/classes/jogamp/opengl/DesktopGLDynamicLibraryBundleInfo.java
index dc33541..c0a75da 100644
--- a/src/jogl/classes/jogamp/opengl/DesktopGLDynamicLibraryBundleInfo.java
+++ b/src/jogl/classes/jogamp/opengl/DesktopGLDynamicLibraryBundleInfo.java
@@ -32,27 +32,25 @@ import java.util.List;
 import java.util.ArrayList;
 
 public abstract class DesktopGLDynamicLibraryBundleInfo extends GLDynamicLibraryBundleInfo {
-    private static int posGlueLibGLDESKTOP;
-    private static List/*<String>*/ glueLibNames;
+    private static List<String> glueLibNames;
     static {
-        glueLibNames = new ArrayList();
+        glueLibNames = new ArrayList<String>();
 
         glueLibNames.addAll(getGlueLibNamesPreload());
-
-        posGlueLibGLDESKTOP = glueLibNames.size();
         glueLibNames.add("jogl_desktop");
     }
 
-    public static final int getGlueLibPosGLDESKTOP() { 
-        return posGlueLibGLDESKTOP; 
-    }
-
     public DesktopGLDynamicLibraryBundleInfo() {
         super();
     }
 
-    public final List/*<String>*/ getGlueLibNames() {
+    public final List<String> getGlueLibNames() {
         return glueLibNames;
     }
+    
+    public boolean useToolGetProcAdressFirst(String funcName) {
+        return true;
+    }
+    
 }
 
diff --git a/src/jogl/classes/jogamp/opengl/DesktopGLDynamicLookupHelper.java b/src/jogl/classes/jogamp/opengl/DesktopGLDynamicLookupHelper.java
index 4879c61..2d2d1c5 100644
--- a/src/jogl/classes/jogamp/opengl/DesktopGLDynamicLookupHelper.java
+++ b/src/jogl/classes/jogamp/opengl/DesktopGLDynamicLookupHelper.java
@@ -39,10 +39,6 @@ public class DesktopGLDynamicLookupHelper extends GLDynamicLookupHelper {
 
     public DesktopGLDynamicLibraryBundleInfo getDesktopGLBundleInfo() { return (DesktopGLDynamicLibraryBundleInfo) getBundleInfo(); }
 
-    public boolean hasGLBinding() {
-        return isToolLibLoaded() && isGlueLibLoaded(DesktopGLDynamicLibraryBundleInfo.getGlueLibPosGLDESKTOP());
-    }
-
     public synchronized boolean loadGLULibrary() {
         /** hacky code .. where all platform GLU libs are tried ..*/
         if(null==gluLib) {
diff --git a/src/jogl/classes/jogamp/opengl/ExtensionAvailabilityCache.java b/src/jogl/classes/jogamp/opengl/ExtensionAvailabilityCache.java
index b5223a5..a35137f 100644
--- a/src/jogl/classes/jogamp/opengl/ExtensionAvailabilityCache.java
+++ b/src/jogl/classes/jogamp/opengl/ExtensionAvailabilityCache.java
@@ -41,6 +41,7 @@
 package jogamp.opengl;
 
 import javax.media.opengl.*;
+
 import java.util.*;
 
 /**
@@ -132,9 +133,9 @@ final class ExtensionAvailabilityCache {
       if(useGetStringi) {
         GL2GL3 gl2gl3 = gl.getGL2GL3();
         int[] numExtensions = { 0 } ;
-        gl2gl3.glGetIntegerv(gl2gl3.GL_NUM_EXTENSIONS, numExtensions, 0);
+        gl2gl3.glGetIntegerv(GL2GL3.GL_NUM_EXTENSIONS, numExtensions, 0);
         for (int i = 0; i < numExtensions[0]; i++) {
-            sb.append(gl2gl3.glGetStringi(gl2gl3.GL_EXTENSIONS, i));
+            sb.append(gl2gl3.glGetStringi(GL.GL_EXTENSIONS, i));
             if(i < numExtensions[0]) {
                 sb.append(" ");
             }
@@ -151,8 +152,21 @@ final class ExtensionAvailabilityCache {
         sb.append(gl.glGetString(GL.GL_EXTENSIONS));
       }
       glExtensions = sb.toString();
-      glXExtensions = context.getPlatformExtensionsString();
-
+      
+      // Platform Extensions
+      {         
+          // unify platform extension .. might have duplicates
+          HashSet<String> platformSet = new HashSet<String>(50);
+          StringTokenizer tok = new StringTokenizer(context.getPlatformExtensionsStringImpl().toString());
+          while (tok.hasMoreTokens()) {
+              platformSet.add(tok.nextToken().trim());              
+          }
+          final StringBuffer sb2 = new StringBuffer();
+          for(Iterator<String> iter = platformSet.iterator(); iter.hasNext(); ) {
+              sb2.append(iter.next()).append(" ");
+          }
+          glXExtensions = sb2.toString();
+      }
       sb.append(" ");
       sb.append(glXExtensions);
 
@@ -173,14 +187,16 @@ final class ExtensionAvailabilityCache {
         System.err.println(getThreadName() + ":ExtensionAvailabilityCache: ALL EXTENSIONS: "+availableExtensionCache.size());
       }
 
-      int major[] = new int[] { context.getGLVersionMajor() };
-      int minor[] = new int[] { context.getGLVersionMinor() };
-      while (GLContext.isValidGLVersion(major[0], minor[0])) {
-        availableExtensionCache.add("GL_VERSION_" + major[0] + "_" + minor[0]);
-        if (DEBUG) {
-            System.err.println(getThreadName() + ":ExtensionAvailabilityCache: Added GL_VERSION_" + major[0] + "_" + minor[0] + " to known extensions");
-        }
-        if(!GLContext.decrementGLVersion(major, minor)) break;
+      if(!context.isGLES()) {
+          int major[] = new int[] { context.getGLVersionMajor() };
+          int minor[] = new int[] { context.getGLVersionMinor() };
+          while (GLContext.isValidGLVersion(major[0], minor[0])) {
+            availableExtensionCache.add("GL_VERSION_" + major[0] + "_" + minor[0]);
+            if (DEBUG) {
+                System.err.println(getThreadName() + ":ExtensionAvailabilityCache: Added GL_VERSION_" + major[0] + "_" + minor[0] + " to known extensions");
+            }
+            if(!GLContext.decrementGLVersion(major, minor)) break;
+          }
       }
 
       // put a dummy var in here so that the cache is no longer empty even if
@@ -208,7 +224,7 @@ final class ExtensionAvailabilityCache {
   private boolean initialized = false;
   private String glExtensions = null;
   private String glXExtensions = null;
-  private HashSet availableExtensionCache = new HashSet(50);
+  private HashSet<String> availableExtensionCache = new HashSet<String>(50);
   private GLContextImpl context;
 
   static String getThreadName() {
diff --git a/src/jogl/classes/jogamp/opengl/FPSCounterImpl.java b/src/jogl/classes/jogamp/opengl/FPSCounterImpl.java
new file mode 100644
index 0000000..96d62fb
--- /dev/null
+++ b/src/jogl/classes/jogamp/opengl/FPSCounterImpl.java
@@ -0,0 +1,137 @@
+/**
+ * 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 jogamp.opengl;
+
+import java.io.PrintStream;
+import javax.media.opengl.FPSCounter;
+
+/**
+ * Default implementation of FPSCounter to be used for FPSCounter implementing renderer.
+ */
+public class FPSCounterImpl implements FPSCounter {
+    private int fpsUpdateFramesInterval;
+    private PrintStream fpsOutputStream ;
+    private long fpsStartTime, fpsLastUpdateTime, fpsLastPeriod, fpsTotalDuration;
+    private int  fpsTotalFrames;
+    private float fpsLast, fpsTotal;
+    
+    /** Creates a disabled instance */
+    public FPSCounterImpl() {
+        setUpdateFPSFrames(0, null);
+    }
+    
+    /**
+     * Increases total frame count and updates values if feature is enabled and
+     * update interval is reached.<br>
+     * 
+     * Shall be called by actual FPSCounter implementing renderer, after display a new frame.
+     *  
+     */
+    public final synchronized void tickFPS() {
+        fpsTotalFrames++;
+        if(fpsUpdateFramesInterval>0 && fpsTotalFrames%fpsUpdateFramesInterval == 0) {
+            final long now = System.currentTimeMillis();
+            fpsLastPeriod = now - fpsLastUpdateTime;
+            fpsLastPeriod = Math.max(fpsLastPeriod, 1); // div 0 
+            fpsLast = ( (float)fpsUpdateFramesInterval * 1000f ) / ( (float) fpsLastPeriod ) ; 
+            
+            fpsTotalDuration = now - fpsStartTime;
+            fpsTotalDuration = Math.max(fpsTotalDuration, 1); // div 0
+            fpsTotal= ( (float)fpsTotalFrames * 1000f ) / ( (float) fpsTotalDuration ) ;
+            
+            if(null != fpsOutputStream) {
+                fpsOutputStream.println(toString());
+            }
+            
+            fpsLastUpdateTime = now;
+        }
+    }
+    
+    public StringBuilder toString(StringBuilder sb) {
+        if(null==sb) {
+            sb = new StringBuilder();
+        }
+        String fpsLastS = String.valueOf(fpsLast);
+        fpsLastS = fpsLastS.substring(0, fpsLastS.indexOf('.') + 2);
+        String fpsTotalS = String.valueOf(fpsTotal);
+        fpsTotalS = fpsTotalS.substring(0, fpsTotalS.indexOf('.') + 2);                
+        sb.append(fpsTotalDuration/1000 +" s: "+ fpsUpdateFramesInterval+" f / "+ fpsLastPeriod+" ms, " + fpsLastS+" fps, "+ fpsLastPeriod/fpsUpdateFramesInterval+" ms/f; "+
+                  "total: "+ fpsTotalFrames+" f, "+ fpsTotalS+ " fps, "+ fpsTotalDuration/fpsTotalFrames+" ms/f");
+        return sb;
+    }
+    
+    public String toString() {
+        return toString(null).toString();
+    }
+    
+    public final synchronized void setUpdateFPSFrames(int frames, PrintStream out) {
+        fpsUpdateFramesInterval = frames;
+        fpsOutputStream = out;
+        resetFPSCounter();
+    }
+    
+    public final synchronized void resetFPSCounter() {
+        fpsStartTime = System.currentTimeMillis(); // overwrite startTime to real init one
+        fpsLastUpdateTime   = fpsStartTime;
+        fpsLastPeriod = 0;
+        fpsTotalFrames = 0;
+        fpsLast = 0f; fpsTotal = 0f;
+    }
+
+    public final synchronized int getUpdateFPSFrames() {
+        return fpsUpdateFramesInterval;
+    }
+    
+    public final synchronized long getFPSStartTime()   { 
+        return fpsStartTime; 
+    }
+
+    public final synchronized long getLastFPSUpdateTime() {
+        return fpsLastUpdateTime;
+    }
+
+    public final synchronized long getLastFPSPeriod() {
+        return fpsLastPeriod;
+    }
+    
+    public final synchronized float getLastFPS() {
+        return fpsLast;
+    }
+    
+    public final synchronized int getTotalFPSFrames() { 
+        return fpsTotalFrames; 
+    }
+
+    public final synchronized long getTotalFPSDuration() { 
+        return fpsTotalDuration; 
+    }
+    
+    public final synchronized float getTotalFPS() {
+        return fpsTotal;
+    }        
+}
diff --git a/src/jogl/classes/jogamp/opengl/GLBufferSizeTracker.java b/src/jogl/classes/jogamp/opengl/GLBufferSizeTracker.java
index 15e3aff..78ab7cc 100644
--- a/src/jogl/classes/jogamp/opengl/GLBufferSizeTracker.java
+++ b/src/jogl/classes/jogamp/opengl/GLBufferSizeTracker.java
@@ -95,29 +95,18 @@ public class GLBufferSizeTracker {
   // pattern of buffer objects indicates that the fact that this map
   // never shrinks is probably not that bad.
   private IntLongHashMap bufferSizeMap;
-
-  protected static final boolean DEBUG = Debug.debug("GLStatusTracker");
+  protected static final boolean DEBUG = Debug.isPropertyDefined("jogl.debug.GLBufferSizeTracker", true);
 
   public GLBufferSizeTracker() {
       bufferSizeMap = new IntLongHashMap();
-      bufferSizeMap.setKeyNotFoundValue(-1);
+      bufferSizeMap.setKeyNotFoundValue(0xFFFFFFFFFFFFFFFFL);
   }
 
-  public void setBufferSize(GLBufferStateTracker bufferStateTracker,
-                            int target, GL caller, long size) {
+  public final void setBufferSize(GLBufferStateTracker bufferStateTracker,
+                                  int target, GL caller, long size) {
     // Need to do some similar queries to getBufferSize below
     int buffer = bufferStateTracker.getBoundBufferObject(target, caller);
-    boolean valid = bufferStateTracker.isBoundBufferObjectKnown(target);
-    if (valid) {
-      if (buffer == 0) {
-        // FIXME: this really should not happen if we know what's
-        // going on. Very likely there is an OpenGL error in the
-        // application if we get here. Could silently return 0, but it
-        // seems better to get an early warning that something is
-        // wrong.
-        throw new GLException("Error: no OpenGL buffer object appears to be bound to target 0x" +
-                              Integer.toHexString(target));
-      }
+    if (buffer != 0) {
       setDirectStateBufferSize(buffer, caller, size);
     }
     // We don't know the current buffer state. Note that the buffer
@@ -126,27 +115,17 @@ public class GLBufferSizeTracker {
     // left to do except drop this piece of information on the floor.
   }
 
-  public void setDirectStateBufferSize(int buffer, GL caller, long size) {
+  public final void setDirectStateBufferSize(int buffer, GL caller, long size) {
       bufferSizeMap.put(buffer, size);
   }
 
-  public long getBufferSize(GLBufferStateTracker bufferStateTracker,
+  public final long getBufferSize(GLBufferStateTracker bufferStateTracker,
                            int target,
                            GL caller) {
     // See whether we know what buffer is currently bound to the given
     // state
-    int buffer = bufferStateTracker.getBoundBufferObject(target, caller);
-    boolean valid = bufferStateTracker.isBoundBufferObjectKnown(target);
-    if (valid) {
-      if (0 == buffer) {
-        // FIXME: this really should not happen if we know what's
-        // going on. Very likely there is an OpenGL error in the
-        // application if we get here. Could silently return 0, but it
-        // seems better to get an early warning that something is
-        // wrong.
-        throw new GLException("Error: no OpenGL buffer object appears to be bound to target 0x" +
-                              Integer.toHexString(target));
-      }
+    final int buffer = bufferStateTracker.getBoundBufferObject(target, caller);
+    if (0 != buffer) {
       return getBufferSizeImpl(target, buffer, caller);
     }
     // We don't know what's going on in this case; query the GL for an answer
@@ -160,16 +139,16 @@ public class GLBufferSizeTracker {
     return (long) tmp[0];
   }
 
-  public long getDirectStateBufferSize(int buffer, GL caller) {
+  public final long getDirectStateBufferSize(int buffer, GL caller) {
       return getBufferSizeImpl(0, buffer, caller);
   }
 
-  private long getBufferSizeImpl(int target, int buffer, GL caller) {
+  private final long getBufferSizeImpl(int target, int buffer, GL caller) {
       // See whether we know the size of this buffer object; at this
       // point we almost certainly should if the application is
       // written correctly
       long sz = bufferSizeMap.get(buffer);
-      if (0 > sz) {
+      if (0xFFFFFFFFFFFFFFFFL == sz) {
         // For robustness, try to query this value from the GL as we used to
         // FIXME: both functions return 'int' types, which is not suitable,
         // since buffer lenght is 64bit ?
@@ -208,7 +187,7 @@ public class GLBufferSizeTracker {
   // destruction if we don't know whether there are other currently-
   // created contexts that might be keeping the buffer objects alive
   // that we're dealing with
-  public void clearCachedBufferSizes() {
+  public final void clearCachedBufferSizes() {
     bufferSizeMap.clear();
   }
 }
diff --git a/src/jogl/classes/jogamp/opengl/GLBufferStateTracker.java b/src/jogl/classes/jogamp/opengl/GLBufferStateTracker.java
index d028bf9..92e27cb 100644
--- a/src/jogl/classes/jogamp/opengl/GLBufferStateTracker.java
+++ b/src/jogl/classes/jogamp/opengl/GLBufferStateTracker.java
@@ -76,8 +76,7 @@ import com.jogamp.common.util.IntIntHashMap;
  */
 
 public class GLBufferStateTracker {
-  protected static final boolean DEBUG = GLBufferSizeTracker.DEBUG;
-
+  protected static final boolean DEBUG = Debug.isPropertyDefined("jogl.debug.GLBufferStateTracker", true);
   // Maps binding targets to buffer objects. A null value indicates
   // that the binding is unknown. A zero value indicates that it is
   // known that no buffer is bound to the target, according to the 
@@ -89,26 +88,33 @@ public class GLBufferStateTracker {
 
   public GLBufferStateTracker() {
     bindingMap = new IntIntHashMap();
-    bindingMap.setKeyNotFoundValue(-1);
+    bindingMap.setKeyNotFoundValue(0xFFFFFFFF);
 
     // Start with known unbound targets for known keys
-    bindingMap.put(GL.GL_ARRAY_BUFFER,         0);
-    bindingMap.put(GL.GL_ELEMENT_ARRAY_BUFFER, 0);
-    bindingMap.put(GL2.GL_PIXEL_PACK_BUFFER,   0);
-    bindingMap.put(GL2.GL_PIXEL_UNPACK_BUFFER, 0);
+    setBoundBufferObject(GL.GL_ARRAY_BUFFER,         0);
+    setBoundBufferObject(GL.GL_ELEMENT_ARRAY_BUFFER, 0);
+    setBoundBufferObject(GL2.GL_PIXEL_PACK_BUFFER,   0);
+    setBoundBufferObject(GL2.GL_PIXEL_UNPACK_BUFFER, 0);
   }
 
-  public void setBoundBufferObject(int target, int buffer) {
-    bindingMap.put(target, buffer);
+  public final void setBoundBufferObject(int target, int value) {
+    bindingMap.put(target, value);
+    if (DEBUG) {
+      System.err.println();
+      System.err.println("GLBufferStateTracker.setBoundBufferObject() target 0x" + 
+                         Integer.toHexString(target) + " -> mapped bound buffer 0x" +
+                         Integer.toHexString(value));
+      // Thread.dumpStack();
+    }
   }
 
   /** Note: returns an unspecified value if the binding for the
       specified target (e.g. GL_ARRAY_BUFFER) is currently unknown.
       You must use isBoundBufferObjectKnown() to see whether the
       return value is valid. */
-  public int getBoundBufferObject(int target, GL caller) {
+  public final int getBoundBufferObject(int target, GL caller) {
     int value = bindingMap.get(target);
-    if (0 > value) {
+    if (0xFFFFFFFF == value) {
       // User probably either called glPushClientAttrib /
       // glPopClientAttrib or is querying an unknown target. See
       // whether we know how to fetch this state.
@@ -123,27 +129,27 @@ public class GLBufferStateTracker {
       }
       if (gotQueryTarget) {
         caller.glGetIntegerv(queryTarget, bufTmp, 0);
+        value = bufTmp[0];
         if (DEBUG) {
-          System.err.println("GLBufferStateTracker.getBoundBufferObject(): queried bound buffer " +
-                             bufTmp[0] +
-                             " for query target 0x" + Integer.toHexString(queryTarget));
+          System.err.println();
+          System.err.println("GLBufferStateTracker.getBoundBufferObject() [queried value]: target 0x" + 
+                             Integer.toHexString(target) + " / query 0x"+Integer.toHexString(queryTarget)+
+                             " -> mapped bound buffer 0x" + Integer.toHexString(value));
         }
-        setBoundBufferObject(target, bufTmp[0]);
-        return bufTmp[0];
+        setBoundBufferObject(target, value);
+        return value;
       }
       return 0;
     }
+    if (DEBUG) {
+      System.err.println();
+      System.err.println("GLBufferStateTracker.getBoundBufferObject() [mapped value]: target 0x" + 
+                         Integer.toHexString(target) + " -> mapped bound buffer 0x" +
+                         Integer.toHexString(value));
+    }
     return value;
   }
 
-  /** Indicates whether the binding state for the specified target is
-      currently known, ie it could be bound or not but it must be tracked.<br>
-      Should be called after getBoundBufferObject()
-      because that method may change the answer for a given target. */
-  public boolean isBoundBufferObjectKnown(int target) {
-    return 0 < bindingMap.get(target) ;
-  }
-
   /** Clears out the known/unknown state of the various buffer object
       binding states. These will be refreshed later on an as-needed
       basis. This is called by the implementations of
@@ -151,7 +157,12 @@ public class GLBufferStateTracker {
       from GLContext.makeCurrent() in the future to possibly increase
       the robustness of these caches in the face of external native
       code manipulating OpenGL state. */
-  public void clearBufferObjectState() {
+  public final void clearBufferObjectState() {
     bindingMap.clear();
+        if (DEBUG) {
+          System.err.println();
+          System.err.println("GLBufferStateTracker.clearBufferObjectState()");
+          //Thread.dumpStack();
+        }
   }
 }
diff --git a/src/jogl/classes/jogamp/opengl/GLContextImpl.java b/src/jogl/classes/jogamp/opengl/GLContextImpl.java
index d5059eb..99693aa 100644
--- a/src/jogl/classes/jogamp/opengl/GLContextImpl.java
+++ b/src/jogl/classes/jogamp/opengl/GLContextImpl.java
@@ -41,11 +41,14 @@
 package jogamp.opengl;
 
 import java.nio.ByteBuffer;
+import java.nio.IntBuffer;
 import java.util.HashMap;
 import java.util.Map;
 
 import com.jogamp.common.os.DynamicLookupHelper;
 import com.jogamp.common.util.ReflectionUtil;
+import com.jogamp.common.util.locks.LockFactory;
+import com.jogamp.common.util.locks.RecursiveLock;
 import com.jogamp.gluegen.runtime.FunctionAddressResolver;
 import com.jogamp.gluegen.runtime.ProcAddressTable;
 import com.jogamp.gluegen.runtime.opengl.GLExtensionNames;
@@ -55,16 +58,21 @@ 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.GLCapabilitiesImmutable;
 import javax.media.opengl.GLContext;
+import javax.media.opengl.GLDebugListener;
+import javax.media.opengl.GLDebugMessage;
 import javax.media.opengl.GLDrawable;
 import javax.media.opengl.GLException;
+import javax.media.opengl.GLPipelineFactory;
 import javax.media.opengl.GLProfile;
 
 public abstract class GLContextImpl extends GLContext {
-  protected static final boolean DEBUG = Debug.debug("GLContext");
-
-  protected GLContextLock lock = new GLContextLock();
+  public static final boolean DEBUG = Debug.debug("GLContext");
+    
+  // RecursiveLock maintains a queue of waiting Threads, ensuring the longest waiting thread will be notified at unlock.  
+  protected RecursiveLock lock = LockFactory.createRecursiveLock();
 
   /**
    * Context full qualified name: display_type + display_connection + major + minor + ctp.
@@ -72,6 +80,8 @@ 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,22 +94,23 @@ public abstract class GLContextImpl extends GLContext {
   private GLBufferSizeTracker bufferSizeTracker; // Singleton - Set by GLContextShareSet
   private GLBufferStateTracker bufferStateTracker = new GLBufferStateTracker();
   private GLStateTracker glStateTracker = new GLStateTracker();
-
+  private GLDebugMessageHandler glDebugHandler = null;
+  
   protected GLDrawableImpl drawable;
   protected GLDrawableImpl drawableRead;
 
   protected GL gl;
 
   protected static final Object mappedContextTypeObjectLock;
-  protected static final HashMap mappedExtensionAvailabilityCache;
-  protected static final HashMap mappedGLProcAddress;
-  protected static final HashMap mappedGLXProcAddress;
+  protected static final HashMap<String, ExtensionAvailabilityCache> mappedExtensionAvailabilityCache;
+  protected static final HashMap<String, ProcAddressTable> mappedGLProcAddress;
+  protected static final HashMap<String, ProcAddressTable> mappedGLXProcAddress;
 
   static {
       mappedContextTypeObjectLock = new Object();
-      mappedExtensionAvailabilityCache = new HashMap();
-      mappedGLProcAddress = new HashMap();
-      mappedGLXProcAddress = new HashMap();
+      mappedExtensionAvailabilityCache = new HashMap<String, ExtensionAvailabilityCache>();
+      mappedGLProcAddress = new HashMap<String, ProcAddressTable>();
+      mappedGLXProcAddress = new HashMap<String, ProcAddressTable>();
   }
 
   public GLContextImpl(GLDrawableImpl drawable, GLContext shareWith) {
@@ -112,8 +123,11 @@ public abstract class GLContextImpl extends GLContext {
 
     this.drawable = drawable;
     this.drawableRead = drawable;
+    
+    this.glDebugHandler = new GLDebugMessageHandler(this);
   }
 
+  @Override
   protected void resetStates() {
       // Because we don't know how many other contexts we might be
       // sharing with (and it seems too complicated to implement the
@@ -136,6 +150,7 @@ public abstract class GLContextImpl extends GLContext {
       glProcAddressTable = null;
       gl = null;
       contextFQN = null;
+      additionalCtxCreationFlags = 0;
 
       super.resetStates();
   }
@@ -144,7 +159,7 @@ public abstract class GLContextImpl extends GLContext {
     if(null!=read && drawable!=read && !isGLReadDrawableAvailable()) {
         throw new GLException("GL Read Drawable not available");
     }
-    boolean lockHeld = lock.isHeld();
+    boolean lockHeld = lock.isOwner();
     if(lockHeld) {
         release();
     }
@@ -184,19 +199,36 @@ public abstract class GLContextImpl extends GLContext {
   // This is only needed for Mac OS X on-screen contexts
   protected void update() throws GLException { }
 
+  boolean lockFailFast = true;
+  Object lockFailFastSync = new Object();
+  
   public boolean isSynchronized() {
-    return !lock.getFailFastMode();
+    synchronized (lockFailFastSync) {
+        return !lockFailFast;
+    }
   }
 
   public void setSynchronized(boolean isSynchronized) {
-    lock.setFailFastMode(!isSynchronized);
+    synchronized (lockFailFastSync) {
+        lockFailFast = !isSynchronized;
+    }
   }
 
+  private final void lockConsiderFailFast()  {
+      synchronized (lockFailFastSync) {
+          if(lockFailFast && lock.isLockedByOtherThread()) {
+                throw new GLException("Error: Attempt to make context current on thread " + Thread.currentThread() +
+                                      " which is already current on thread " + lock.getOwner());
+          }
+      }
+      lock.lock();
+  }
+    
   public abstract Object getPlatformGLExtensions();
 
   // Note: the surface is locked within [makeCurrent .. swap .. release]
   public void release() throws GLException {
-    if (!lock.isHeld()) {
+    if ( !lock.isOwner() ) {
       throw new GLException("Context not current on current thread");
     }
     setCurrent(null);
@@ -212,14 +244,17 @@ public abstract class GLContextImpl extends GLContext {
   protected abstract void releaseImpl() throws GLException;
 
   public final void destroy() {
-    if (lock.isHeld()) {
-        // release current context 
+    if ( lock.isOwner() ) {
+        // release current context
+        if(null != glDebugHandler) {
+            glDebugHandler.enable(false);
+        }
         release();
     }
 
     // Must hold the lock around the destroy operation to make sure we
     // don't destroy the context out from under another thread rendering to it
-    lock.lock();
+    lockConsiderFailFast();
     try {
       /* FIXME: refactor dependence on Java 2D / JOGL bridge
       if (tracker != null) {
@@ -247,6 +282,7 @@ public abstract class GLContextImpl extends GLContext {
           try {
               destroyImpl();
               contextHandle = 0;
+              glDebugHandler = null;
               GLContextShareSet.contextDestroyed(this);
           } finally {
               drawable.unlockSurface();
@@ -344,9 +380,13 @@ public abstract class GLContextImpl extends GLContext {
         if (null == getGLDrawable().getChosenGLCapabilities()) {
             throw new GLException("drawable has no chosen GLCapabilities: "+getGLDrawable());
         }
+        if(DEBUG_GL) {
+            // only impacts w/ createContextARB(..)
+            additionalCtxCreationFlags |= GLContext.CTX_OPTION_DEBUG ;
+        }
     }
 
-    lock.lock();
+    lockConsiderFailFast();
     int res = 0;
     try {
       res = makeCurrentLocking();
@@ -365,12 +405,24 @@ public abstract class GLContextImpl extends GLContext {
     if (res == CONTEXT_NOT_CURRENT) {
       lock.unlock();
     } 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 
         getGLDrawable().getGLProfile().verifyEquality(gl.getGLProfile());
+        
+        glDebugHandler.init( isGL2GL3() && isGLDebugEnabled() );
+
+        if(DEBUG_GL) {
+            gl = gl.getContext().setGL( GLPipelineFactory.create("javax.media.opengl.Debug", null, gl, null) );
+            if(glDebugHandler.isEnabled()) {
+                glDebugHandler.addListener(new GLDebugMessageHandler.StdErrGLDebugListener(true));
+            }
+        }
+        if(TRACE_GL) {
+            gl = gl.getContext().setGL( GLPipelineFactory.create("javax.media.opengl.Trace", null, gl, new Object[] { System.err } ) );
+        }               
       }
-      setCurrent(this);
 
       /* FIXME: refactor dependence on Java 2D / JOGL bridge
 
@@ -386,10 +438,10 @@ public abstract class GLContextImpl extends GLContext {
 
   // Note: the surface is locked within [makeCurrent .. swap .. release]
   protected final int makeCurrentLocking() throws GLException {
-    boolean exceptionOccurred = false;
+    boolean shallUnlockSurface = false;
     int lockRes = drawable.lockSurface();
     try {
-      if (NativeSurface.LOCK_SURFACE_NOT_READY == lockRes) {
+      if (NativeSurface.LOCK_SURFACE_NOT_READY >= lockRes) {
         return CONTEXT_NOT_CURRENT;
       }
       try {
@@ -412,6 +464,7 @@ public abstract class GLContextImpl extends GLContext {
                 }
             }
             if(!newCreated) {
+                shallUnlockSurface = true;
                 return CONTEXT_NOT_CURRENT;
             }
             GLContextShareSet.contextCreated(this);
@@ -419,11 +472,11 @@ public abstract class GLContextImpl extends GLContext {
           makeCurrentImpl(newCreated);
           return newCreated ? CONTEXT_CURRENT_NEW : CONTEXT_CURRENT ;
       } catch (RuntimeException e) {
-        exceptionOccurred = true;
+        shallUnlockSurface = true;
         throw e;
       }
     } finally {
-      if (exceptionOccurred) {
+      if (shallUnlockSurface) {
         drawable.unlockSurface();
       }
     }
@@ -493,13 +546,13 @@ public abstract class GLContextImpl extends GLContext {
    * @see #createContextARBImpl
    * @see #destroyContextARBImpl
    */
-  protected final long createContextARB(long share, boolean direct,
-                                        int major[], int minor[], int ctp[]) 
+  protected final long createContextARB(long share, boolean direct) 
   {
     AbstractGraphicsConfiguration config = drawable.getNativeSurface().getGraphicsConfiguration().getNativeGraphicsConfiguration();
     AbstractGraphicsDevice device = config.getScreen().getDevice();
     GLCapabilitiesImmutable glCaps = (GLCapabilitiesImmutable) config.getChosenCapabilities();
     GLProfile glp = glCaps.getGLProfile();
+    GLProfile glpImpl = GLProfile.get(glp.getImplName());
 
     if (DEBUG) {
       System.err.println(getThreadName() + ": !!! createContextARB: mappedVersionsAvailableSet("+device.getConnection()+"): "+
@@ -511,15 +564,15 @@ public abstract class GLContextImpl extends GLContext {
     }
 
     int reqMajor;
-    if(glp.isGL4()) {
+    if(glpImpl.isGL4()) {
         reqMajor=4;
-    } else if (glp.isGL3()) {
+    } else if (glpImpl.isGL3()) {
         reqMajor=3;
-    } else /* if (glp.isGL2()) */ {
+    } else /* if (glpImpl.isGL2()) */ {
         reqMajor=2;
     }
 
-    boolean compat = glp.isGL2(); // incl GL3bc and GL4bc
+    boolean compat = glpImpl.isGL2(); // incl GL3bc and GL4bc
     int _major[] = { 0 };
     int _minor[] = { 0 };
     int _ctp[] = { 0 };
@@ -527,9 +580,10 @@ public abstract class GLContextImpl extends GLContext {
 
     if( GLContext.getAvailableGLVersion(device, reqMajor, compat?CTX_PROFILE_COMPAT:CTX_PROFILE_CORE,
                                         _major, _minor, _ctp)) {
+        _ctp[0] |= additionalCtxCreationFlags;
         _ctx = createContextARBImpl(share, direct, _ctp[0], _major[0], _minor[0]);
         if(0!=_ctx) {
-            setGLFunctionAvailability(true, _major[0], _minor[0], _ctp[0]);
+            setGLFunctionAvailability(true, true, _major[0], _minor[0], _ctp[0]);
         }
     }
     return _ctx;
@@ -537,19 +591,17 @@ public abstract class GLContextImpl extends GLContext {
 
   private final void mapGLVersions(AbstractGraphicsDevice device) {    
     synchronized (GLContext.deviceVersionAvailable) {
-        createContextARBMapVersionsAvailable(4, false /* core   */);  // GL4
         createContextARBMapVersionsAvailable(4, true  /* compat */);  // GL4bc
-        createContextARBMapVersionsAvailable(3, false /* core   */);  // GL3
+        createContextARBMapVersionsAvailable(4, false /* core   */);  // GL4
         createContextARBMapVersionsAvailable(3, true  /* compat */);  // GL3bc
+        createContextARBMapVersionsAvailable(3, false /* core   */);  // GL3
         createContextARBMapVersionsAvailable(2, true  /* compat */);  // GL2
         GLContext.setAvailableGLVersionsSet(device);
+        resetStates();
     }
   }
 
-  private final void createContextARBMapVersionsAvailable(int reqMajor, boolean compat)
-  {
-    resetStates();
-
+  private final void createContextARBMapVersionsAvailable(int reqMajor, boolean compat) {
     long _context;
     int reqProfile = compat ? CTX_PROFILE_COMPAT : CTX_PROFILE_CORE ;
     int ctp = CTX_IS_ARB_CREATED | CTX_PROFILE_CORE | CTX_OPTION_ANY; // default
@@ -603,10 +655,12 @@ public abstract class GLContextImpl extends GLContext {
     }
     if(0!=_context) {
         AbstractGraphicsDevice device = drawable.getNativeSurface().getGraphicsConfiguration().getNativeGraphicsConfiguration().getScreen().getDevice();
+        if( isExtensionAvailable("GL_ARB_ES2_compatibility") ) {
+            ctp |= CTX_PROFILE_ES2_COMPAT;
+        }
         GLContext.mapAvailableGLVersion(device, reqMajor, reqProfile, major[0], minor[0], ctp);
-        setGLFunctionAvailability(true, major[0], minor[0], ctp);
+        setGLFunctionAvailability(true, true, major[0], minor[0], ctp);
         destroyContextARBImpl(_context);
-        resetStates();
         if (DEBUG) {
           System.err.println(getThreadName() + ": !!! createContextARBMapVersionsAvailable HAVE: "+
                   GLContext.getAvailableGLVersionAsString(device, reqMajor, reqProfile));
@@ -633,7 +687,23 @@ public abstract class GLContextImpl extends GLContext {
         }
         _context = createContextARBImpl(share, direct, ctxOptionFlags, major[0], minor[0]);
 
-        if(0==_context) {
+        boolean ok = 0!=_context;
+        
+        if(ok && major[0]>=3) {
+            int[] hasMajor = new int[1]; int[] hasMinor = new int[1];
+            setGLFunctionAvailability(true, false, major[0], minor[0], ctxOptionFlags);
+            gl.glGetIntegerv(GL3.GL_MAJOR_VERSION, hasMajor, 0);
+            gl.glGetIntegerv(GL3.GL_MINOR_VERSION, hasMinor, 0);
+            ok = hasMajor[0]>major[0] || ( hasMajor[0]==major[0] && hasMinor[0]>=minor[0] ) ;
+            if(!ok) {
+                destroyContextARBImpl(_context);
+                _context = 0;
+            }
+            if (DEBUG) {
+                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;
         }
     }
@@ -695,7 +765,7 @@ public abstract class GLContextImpl extends GLContext {
   // Helpers for various context implementations
   //
 
-  private Object createInstance(GLProfile glp, String suffix, Class[] cstrArgTypes, Object[] cstrArgs) {
+  private Object createInstance(GLProfile glp, String suffix, Class<?>[] cstrArgTypes, Object[] cstrArgs) {
     return ReflectionUtil.createInstance(glp.getGLImplBaseClassName()+suffix, cstrArgTypes, cstrArgs, getClass().getClassLoader());
   }
 
@@ -706,7 +776,7 @@ 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 } );
-
+    
     /* FIXME: refactor dependence on Java 2D / JOGL bridge
     if (tracker != null) {
       gl.setObjectTracker(tracker);
@@ -739,51 +809,37 @@ public abstract class GLContextImpl extends GLContext {
 
   public abstract ByteBuffer glAllocateMemoryNV(int arg0, float arg1, float arg2, float arg3);
 
-  public final void setSwapInterval(final int interval) {
-    GLContext current = getCurrent();
-    if (current != this) {
-        throw new GLException("This context is not current. Current context: "+current+
-                              ", this context "+this);
-    }
-    setSwapIntervalImpl(interval);
-  }
-  protected void setSwapIntervalImpl(final int interval) { /** nop per default .. **/  }
-  protected int currentSwapInterval = -1; // default: not set yet ..
-  public int getSwapInterval() {
-    return currentSwapInterval;
-  }
-
   /** Maps the given "platform-independent" function name to a real function
       name. Currently this is only used to map "glAllocateMemoryNV" and
       associated routines to wglAllocateMemoryNV / glXAllocateMemoryNV. */
-  protected String mapToRealGLFunctionName(String glFunctionName) {
-    Map/*<String, String>*/ map = getFunctionNameMap();
-    String lookup = ( null != map ) ? (String) map.get(glFunctionName) : null;
+  protected final String mapToRealGLFunctionName(String glFunctionName) {
+    Map<String, String> map = getFunctionNameMap();
+    String lookup = ( null != map ) ? map.get(glFunctionName) : null;
     if (lookup != null) {
       return lookup;
     }
     return glFunctionName;
   }
-  protected abstract Map/*<String, String>*/ getFunctionNameMap() ;
+  protected abstract Map<String, String> getFunctionNameMap() ;
 
   /** 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." 
    */
-  protected String mapToRealGLExtensionName(String glExtensionName) {
-    Map/*<String, String>*/ map = getExtensionNameMap();
-    String lookup = ( null != map ) ? (String) map.get(glExtensionName) : null;
+  protected final String mapToRealGLExtensionName(String glExtensionName) {
+    Map<String, String> map = getExtensionNameMap();
+    String lookup = ( null != map ) ? map.get(glExtensionName) : null;
     if (lookup != null) {
       return lookup;
     }
     return glExtensionName;
   }
-  protected abstract Map/*<String, String>*/ getExtensionNameMap() ;
+  protected abstract Map<String, String> getExtensionNameMap() ;
 
   /** Helper routine which resets a ProcAddressTable generated by the
       GLEmitter by looking up anew all of its function pointers. */
-  protected void resetProcAddressTable(ProcAddressTable table) {
+  protected final void resetProcAddressTable(ProcAddressTable table) {
     table.reset(getDrawableImpl().getGLDynamicLookupHelper() );
   }
 
@@ -798,19 +854,20 @@ public abstract class GLContextImpl extends GLContext {
    *
    * @param force force the setting, even if is already being set.
    *              This might be useful if you change the OpenGL implementation.
+   * @param cached whether this version's data shall be cached or not
    * @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
    */
-  protected final void setGLFunctionAvailability(boolean force, int major, int minor, int ctxProfileBits) {
+  protected final void setGLFunctionAvailability(boolean force, boolean cached, int major, int minor, int ctxProfileBits) {
     if(null!=this.gl && null!=glProcAddressTable && !force) {
         return; // already done and not forced
     }
-    if(null==this.gl || force) {
+    
+    if(null==this.gl || !verifyInstance(gl.getGLProfile(), "Impl", this.gl)) {
         setGL(createGL(getGLDrawable().getGLProfile()));
     }
 
@@ -827,13 +884,9 @@ public abstract class GLContextImpl extends GLContext {
     //
     // UpdateGLProcAddressTable functionality
     //
-    if(null==this.gl) {
-        throw new GLException("setGLFunctionAvailability not called yet");
-    }
-
     ProcAddressTable table = null;
     synchronized(mappedContextTypeObjectLock) {
-        table = (ProcAddressTable) mappedGLProcAddress.get( contextFQN );
+        table = mappedGLProcAddress.get( contextFQN );
         if(null != table && !verifyInstance(gl.getGLProfile(), "ProcAddressTable", table)) {
             throw new InternalError("GLContext GL ProcAddressTable mapped key("+contextFQN+") -> "+
                   table.getClass().getName()+" not matching "+gl.getGLProfile().getGLImplBaseClassName());
@@ -851,10 +904,12 @@ public abstract class GLContextImpl extends GLContext {
                                                                  new Object[] { new GLProcAddressResolver() } );
         }
         resetProcAddressTable(getGLProcAddressTable());
-        synchronized(mappedContextTypeObjectLock) {
-            mappedGLProcAddress.put(contextFQN, getGLProcAddressTable());
-            if(DEBUG) {
-                System.err.println(getThreadName() + ": !!! GLContext GL ProcAddressTable mapping key("+contextFQN+") -> "+getGLProcAddressTable().hashCode());
+        if(cached) {
+            synchronized(mappedContextTypeObjectLock) {
+                mappedGLProcAddress.put(contextFQN, getGLProcAddressTable());
+                if(DEBUG) {
+                    System.err.println(getThreadName() + ": !!! GLContext GL ProcAddressTable mapping key("+contextFQN+") -> "+getGLProcAddressTable().hashCode());
+                }
             }
         }
     }
@@ -864,32 +919,32 @@ public abstract class GLContextImpl extends GLContext {
     //
     setContextVersion(major, minor, ctxProfileBits);
 
-    //
-    // Update ExtensionAvailabilityCache
-    //
-    ExtensionAvailabilityCache eCache;
-    synchronized(mappedContextTypeObjectLock) {
-        eCache = (ExtensionAvailabilityCache) mappedExtensionAvailabilityCache.get( contextFQN );
-    }
-    if(null !=  eCache) {
-        extensionAvailability = eCache;
-        if(DEBUG) {
-            System.err.println(getThreadName() + ": !!! GLContext GL ExtensionAvailabilityCache reusing key("+contextFQN+") -> "+eCache.hashCode());
-        }
-    } else {
-        if(null==extensionAvailability) {
-            extensionAvailability = new ExtensionAvailabilityCache(this);
-        }
-        extensionAvailability.reset();
+    if(cached) {
+        //
+        // Update ExtensionAvailabilityCache
+        //
+        ExtensionAvailabilityCache eCache;
         synchronized(mappedContextTypeObjectLock) {
-            mappedExtensionAvailabilityCache.put(contextFQN, extensionAvailability);
+            eCache = mappedExtensionAvailabilityCache.get( contextFQN );
+        }
+        if(null !=  eCache) {
+            extensionAvailability = eCache;
             if(DEBUG) {
-                System.err.println(getThreadName() + ": !!! GLContext GL ExtensionAvailabilityCache mapping key("+contextFQN+") -> "+extensionAvailability.hashCode());
+                System.err.println(getThreadName() + ": !!! GLContext GL ExtensionAvailabilityCache reusing key("+contextFQN+") -> "+eCache.hashCode());
+            }
+        } else {
+            if(null==extensionAvailability) {
+                extensionAvailability = new ExtensionAvailabilityCache(this);
+            }
+            extensionAvailability.reset();
+            synchronized(mappedContextTypeObjectLock) {
+                mappedExtensionAvailabilityCache.put(contextFQN, extensionAvailability);
+                if(DEBUG) {
+                    System.err.println(getThreadName() + ": !!! GLContext GL ExtensionAvailabilityCache mapping key("+contextFQN+") -> "+extensionAvailability.hashCode());
+                }
             }
         }
     }
-
-    hasNativeES2Methods = isGLES2() || isExtensionAvailable("GL_ARB_ES2_compatibility") ;
   }
 
   /**
@@ -897,10 +952,8 @@ public abstract class GLContextImpl extends GLContext {
    */
   protected abstract void updateGLXProcAddressTable();
 
-  protected boolean hasNativeES2Methods = false;
-
-  public final boolean hasNativeES2Methods() { return hasNativeES2Methods; }
-
+  protected abstract StringBuffer getPlatformExtensionsStringImpl();
+  
   /**
    * Returns true if the specified OpenGL core- or extension-function can be
    * successfully called using this GL context given the current host (OpenGL
@@ -912,7 +965,7 @@ public abstract class GLContextImpl extends GLContext {
    * "glPolygonOffsetEXT" or "glPolygonOffset" to check if the {@link
    * javax.media.opengl.GL#glPolygonOffset(float,float)} is available).
    */
-  public boolean isFunctionAvailable(String glFunctionName) {
+  public final boolean isFunctionAvailable(String glFunctionName) {
     // Check GL 1st (cached)
     ProcAddressTable pTable = getGLProcAddressTable(); // null if ctx not created once
     if(null!=pTable) {
@@ -967,14 +1020,14 @@ public abstract class GLContextImpl extends GLContext {
       return false;
   }
 
-  public String getPlatformExtensionsString() {
+  public final String getPlatformExtensionsString() {
       if(null!=extensionAvailability) {
         return extensionAvailability.getPlatformExtensionsString();
       }
       return null;
   }
 
-  public String getGLExtensionsString() {
+  public final String getGLExtensionsString() {
       if(null!=extensionAvailability) {
         return extensionAvailability.getGLExtensionsString();
       }
@@ -1038,7 +1091,80 @@ public abstract class GLContextImpl extends GLContext {
   //
 
   public boolean hasWaiters() {
-    return lock.hasWaiters();
+    return lock.getQueueLength()>0;
+  }
+  
+  //---------------------------------------------------------------------------
+  // GL_ARB_debug_output, GL_AMD_debug_output helpers
+  //
+
+  public final String getGLDebugMessageExtension() {
+      return glDebugHandler.getExtension();
   }
 
+  public final boolean isGLDebugMessageEnabled() {
+      return glDebugHandler.isEnabled();
+  }
+  
+  public final int getContextCreationFlags() {
+      return additionalCtxCreationFlags;                
+  }
+
+  public final void setContextCreationFlags(int flags) {
+      if(!isCreated()) {
+          additionalCtxCreationFlags = flags & GLContext.CTX_OPTION_DEBUG;
+      }
+  }
+  
+  public final boolean isGLDebugSynchronous() { return glDebugHandler.isSynchronous(); }     
+  
+  public final void setGLDebugSynchronous(boolean synchronous) {
+      glDebugHandler.setSynchronous(synchronous);
+  }
+  
+  public final void enableGLDebugMessage(boolean enable) throws GLException {
+      if(!isCreated()) {
+          if(enable) {
+              additionalCtxCreationFlags |=  GLContext.CTX_OPTION_DEBUG;
+          } else {
+              additionalCtxCreationFlags &= ~GLContext.CTX_OPTION_DEBUG;
+          }
+      } else if(0 != (additionalCtxCreationFlags & GLContext.CTX_OPTION_DEBUG) &&
+                null != getGLDebugMessageExtension()) {
+          glDebugHandler.enable(enable);
+      }
+  }
+  
+  public final void addGLDebugListener(GLDebugListener listener) { 
+      glDebugHandler.addListener(listener);
+  }
+  
+  public final void removeGLDebugListener(GLDebugListener listener) {
+      glDebugHandler.removeListener(listener);
+  }    
+  
+  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);
+      }      
+  }
+  
+  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);
+      } else if(glDebugHandler.isExtensionAMD()) {
+          gl.getGL2GL3().glDebugMessageEnableAMD(GLDebugMessage.translateARB2AMDCategory(source, type), severity, count, ids, ids_offset, enabled);
+      }
+  }
+  
+  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);
+      }      
+  }
 }
diff --git a/src/jogl/classes/jogamp/opengl/GLContextLock.java b/src/jogl/classes/jogamp/opengl/GLContextLock.java
deleted file mode 100644
index f725508..0000000
--- a/src/jogl/classes/jogamp/opengl/GLContextLock.java
+++ /dev/null
@@ -1,157 +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;
-
-import javax.media.opengl.*;
-
-/** Implements the makeCurrent / release locking behavior of the
-    GLContext class. When "fail fast mode" is enabled, attempts to
-    lock the same GLContextLock on more than one thread cause
-    GLException to be raised. This lock is not recursive. Attempts to
-    lock it more than once on a given thread will cause GLException to
-    be raised. */
-
-public class GLContextLock {
-  protected static final boolean DEBUG = GLContextImpl.DEBUG;
-
-  static class SyncData {
-      boolean failFastMode = true;
-      Thread owner = null;
-      int waiters = 0;
-      Exception lockedStack = null; // only enabled if DEBUG
-  }
-  private SyncData sdata = new SyncData(); // synchronized (flow/mem)  mutable access
-
-  /** Locks this GLContextLock on the current thread. If fail fast
-      mode is enabled and the GLContextLock is already owned by
-      another thread, throws GLException. */
-  public final void lock() throws GLException {
-    synchronized(sdata) {
-      Thread current = Thread.currentThread();
-      if (sdata.owner == null) {
-        sdata.owner = current;
-        if(DEBUG) {
-            sdata.lockedStack = new Exception("Error: Previously made current (1) by "+sdata.owner+", lock: "+this);
-        }
-      } else if (sdata.owner != current) {
-        while (sdata.owner != null) {
-          if (sdata.failFastMode) {
-            if(null!=sdata.lockedStack) {
-                sdata.lockedStack.printStackTrace();
-            }
-            throw new GLException("Error: Attempt to make context current on thread " + current +
-                                  " which is already current on thread " + sdata.owner);
-          } else {
-            try {
-              ++sdata.waiters;
-              sdata.wait();
-            } catch (InterruptedException e) {
-              throw new GLException(e);
-            } finally {
-              --sdata.waiters;
-            }
-          }
-        }
-        sdata.owner = current;
-        if(DEBUG) {
-            sdata.lockedStack = new Exception("Previously made current (2) by "+sdata.owner+", lock: "+this);
-        }
-      } else {
-        throw new GLException("Attempt to make the same context current twice on thread " + current);
-      }
-    }
-  }
-
-  /** Unlocks this GLContextLock. */
-  public final void unlock() throws GLException {
-    synchronized (sdata) {
-      Thread current = Thread.currentThread();
-      if (sdata.owner == current) {
-        sdata.owner = null;
-        sdata.lockedStack = null;
-        // Assuming notify() implementation weaks up the longest waiting thread, to avoid starvation. 
-        // Otherwise we would need to have a Thread queue implemented, using sleep(timeout) and interrupt.
-        sdata.notify();
-      } else {
-        if (sdata.owner != null) {
-          throw new GLException("Attempt by thread " + current +
-                                " to release context owned by thread " + sdata.owner);
-        } else {
-          throw new GLException("Attempt by thread " + current +
-                                " to release unowned context");
-        }
-      }
-    }
-  }
-
-  /** Indicates whether this lock is held by the current thread. */
-  public final boolean isHeld() {
-    synchronized(sdata) {
-      return (Thread.currentThread() == sdata.owner);
-    }
-  }
-
-  public final void setFailFastMode(boolean onOrOff) {
-    synchronized(sdata) {
-        sdata.failFastMode = onOrOff;
-    }
-  }
-
-  public final boolean getFailFastMode() {
-    synchronized(sdata) {
-        return sdata.failFastMode;
-    }
-  }
-
-  public final boolean hasWaiters() {
-    synchronized(sdata) {
-        return (0 != sdata.waiters);
-    }
-  }
-
-  /** holding the owners stack trace when lock is acquired and DEBUG is true */
-  public final Exception getLockedStack() {
-    synchronized(sdata) {
-        return sdata.lockedStack;
-    }
-  }
-
-}
diff --git a/src/jogl/classes/jogamp/opengl/GLDebugMessageHandler.java b/src/jogl/classes/jogamp/opengl/GLDebugMessageHandler.java
new file mode 100644
index 0000000..8ca0c01
--- /dev/null
+++ b/src/jogl/classes/jogamp/opengl/GLDebugMessageHandler.java
@@ -0,0 +1,316 @@
+/**
+ * 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 jogamp.opengl;
+
+import java.util.ArrayList;
+
+import javax.media.nativewindow.NativeWindowException;
+import javax.media.opengl.GL2GL3;
+import javax.media.opengl.GLDebugListener;
+import javax.media.opengl.GLDebugMessage;
+import javax.media.opengl.GLException;
+
+import com.jogamp.gluegen.runtime.ProcAddressTable;
+import jogamp.opengl.gl4.GL4bcProcAddressTable;
+
+/**
+ * The GLDebugMessageHandler, handling <i>GL_ARB_debug_output</i> or <i>GL_AMD_debug_output</i>
+ * debug messages.<br>
+ * 
+ * <p>An instance must be bound to the current thread's GLContext to achieve thread safety.</p>
+ * 
+ * <p>A native callback function is registered at {@link #enable(boolean) enable(true)}, 
+ * which forwards received messages to the added {@link GLDebugListener} directly. 
+ * Hence the {@link GLDebugListener#messageSent(GLDebugMessage)} implementation shall
+ * return as fast as possible.</p>
+ * 
+ * <p>In case no <i>GL_ARB_debug_output</i> is available, but <i>GL_AMD_debug_output</i>,
+ * 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;
+    private static final int EXT_AMD = 2;    
+    
+    static {
+        if ( !initIDs0() ) {
+            throw new NativeWindowException("Failed to initialize GLDebugMessageHandler jmethodIDs");
+        }        
+    }
+            
+    private final GLContextImpl ctx;    
+    private final ListenerSyncedImplStub<GLDebugListener> listenerImpl;
+    
+    // licefycle: init - EOL
+    private String extName;
+    private int extType;
+    private long glDebugMessageCallbackProcAddress;
+    private boolean extAvailable; 
+    private boolean synchronous;
+    
+    // licefycle: enable - disable/EOL
+    private long handle;
+    
+    /**
+     * @param ctx the associated GLContext
+     * @param glDebugExtension chosen extension to use
+     */
+    public GLDebugMessageHandler(GLContextImpl ctx) {        
+        this.ctx = ctx;
+        this.listenerImpl = new ListenerSyncedImplStub<GLDebugListener>();        
+        this.glDebugMessageCallbackProcAddress = 0;
+        this.extName = null;
+        this.extType = 0;
+        this.extAvailable = false; 
+        this.handle = 0;
+        this.synchronous = true;
+    }
+    
+    public void init(boolean enable) {
+        if(DEBUG) {
+            System.err.println("GLDebugMessageHandler.init("+enable+")");
+        }
+        init();
+        if(isAvailable()) {
+            enableImpl(enable);
+        } else if(DEBUG) {
+            System.err.println("GLDebugMessageHandler.init("+enable+") .. n/a");
+        }
+    }
+    
+    public void init() {
+        ctx.validateCurrent();
+        if( isAvailable()) {
+            return;
+        }
+        
+        if( !ctx.isGLDebugEnabled() ) {
+            if(DEBUG) {
+                System.err.println("GLDebugMessageHandler: GL DEBUG not set in ARB ctx options: "+ctx.getGLVersion());
+            }
+            return;            
+        }
+        
+        if( ctx.isExtensionAvailable(GL_ARB_debug_output) ) {
+            extName = GL_ARB_debug_output;
+            extType = EXT_ARB;
+        } else if( ctx.isExtensionAvailable(GL_AMD_debug_output) ) {
+            extName = GL_AMD_debug_output;
+            extType = EXT_AMD;
+        }
+        if(DEBUG) {
+            System.err.println("GLDebugMessageHandler: Using extension: <"+extName+">");
+        }
+        
+        if(0 == extType) {
+            if(DEBUG) {
+                System.err.println("GLDebugMessageHandler: No extension available! "+ctx.getGLVersion());
+            }
+            return;
+        }
+                
+        final ProcAddressTable procAddressTable = ctx.getGLProcAddressTable();
+        if( procAddressTable instanceof GL4bcProcAddressTable) {
+            final GL4bcProcAddressTable desktopProcAddressTable = (GL4bcProcAddressTable)procAddressTable;
+            switch(extType) {
+                case EXT_ARB: 
+                    glDebugMessageCallbackProcAddress = desktopProcAddressTable._addressof_glDebugMessageCallbackARB;
+                    break;
+                case EXT_AMD: 
+                    glDebugMessageCallbackProcAddress = desktopProcAddressTable._addressof_glDebugMessageCallbackAMD;
+                    break;
+            }
+        } else {
+            if(DEBUG) {
+                System.err.println("Non desktop context not supported");    
+            }            
+        }
+        extAvailable = 0 < extType && null != extName && 0 != glDebugMessageCallbackProcAddress;
+        
+        if(DEBUG) {
+            System.err.println("GLDebugMessageHandler: extAvailable: "+extAvailable+", glDebugMessageCallback* : 0x"+Long.toHexString(glDebugMessageCallbackProcAddress));
+        }
+        
+        if(!extAvailable) {
+            glDebugMessageCallbackProcAddress = 0;
+        }
+        
+        handle = 0;
+    }
+
+    public final boolean isAvailable() { return extAvailable; }
+    
+    /**
+     * @return The extension implementing the GLDebugMessage feature, 
+     *         either {@link #GL_ARB_debug_output} or {@link #GL_AMD_debug_output}. 
+     *         If unavailable <i>null</i> is returned. 
+     */
+    public final String getExtension() {
+        return extName;
+    }
+    
+    public final boolean isExtensionARB() {
+        return extName == GL_ARB_debug_output;
+    }
+    
+    public final boolean isExtensionAMD() {
+        return extName == GL_AMD_debug_output;
+    }
+    
+    /**
+     * @see javax.media.opengl.GLContext#isGLDebugSynchronous() 
+     */
+    public final boolean isSynchronous() { return synchronous; }
+    
+    /**
+     * @see javax.media.opengl.GLContext#setGLDebugSynchronous(boolean) 
+     */
+    public final void setSynchronous(boolean synchronous) {
+        this.synchronous = synchronous;
+        if(isEnabled() && isExtensionARB()) {
+            setSynchronousImpl();
+        }
+    }    
+    private final void setSynchronousImpl() {
+        if(isExtensionARB()) {
+            if(synchronous) {
+                ctx.getGL().glEnable(GL2GL3.GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB);
+            } else {
+                ctx.getGL().glDisable(GL2GL3.GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB);
+            }        
+            if(DEBUG) {
+                System.err.println("GLDebugMessageHandler: synchronous "+synchronous);
+            }
+        }
+    }
+    
+    /**
+     * @see javax.media.opengl.GLContext#enableGLDebugMessage(boolean) 
+     */
+    public final void enable(boolean enable) throws GLException {
+        ctx.validateCurrent();
+        if(!isAvailable()) {
+            return;
+        }
+        enableImpl(enable);
+    }        
+    final void enableImpl(boolean enable) throws GLException {
+        setSynchronousImpl();
+        if(enable) {
+            if(0 == handle) {
+                handle = register0(glDebugMessageCallbackProcAddress, extType);
+                if(0 == handle) {
+                    throw new GLException("Failed to register via \"glDebugMessageCallback*\" using "+extName);
+                }
+            }
+        } else {
+            if(0 != handle) {
+                unregister0(glDebugMessageCallbackProcAddress, handle);
+                handle = 0;
+            }                    
+        }
+        if(DEBUG) {
+            System.err.println("GLDebugMessageHandler: enable("+enable+") -> 0x" + Long.toHexString(handle));
+        }
+    }
+    
+    public final boolean isEnabled() { return 0 != handle; }
+
+    public final int listenerSize() { 
+        return listenerImpl.size(); 
+    }
+    
+    public final void addListener(GLDebugListener listener) {
+        listenerImpl.addListener(-1, listener);
+    }
+
+    public final void addListener(int index, GLDebugListener listener) {
+        listenerImpl.addListener(index, listener);
+    }
+  
+    public final void removeListener(GLDebugListener listener) {
+        listenerImpl.removeListener(listener);
+    }
+    
+    private final void sendMessage(GLDebugMessage msg) {
+        synchronized(listenerImpl) {
+            if(DEBUG) {
+                System.err.println("GLDebugMessageHandler: "+msg);
+            }
+            final ArrayList<GLDebugListener> listeners = listenerImpl.getListeners();
+            for(int i=0; i<listeners.size(); i++) {
+                listeners.get(i).messageSent(msg);
+            }
+        }
+    }
+    
+    public static class StdErrGLDebugListener implements GLDebugListener {
+        boolean threadDump;
+        
+        public StdErrGLDebugListener(boolean threadDump) {
+            this.threadDump = threadDump;
+        }
+        public void messageSent(GLDebugMessage event) {
+            System.err.println(event);
+            if(threadDump) {
+                Thread.dumpStack();
+            }
+        }        
+    }
+    
+    //
+    // native -> java
+    //
+    
+    protected final void glDebugMessageARB(int source, int type, int id, int severity, String msg) {
+        final GLDebugMessage event = new GLDebugMessage(ctx, System.currentTimeMillis(), source, type, id, severity, msg);
+        sendMessage(event);
+    }
+
+    protected final void glDebugMessageAMD(int id, int category, int severity, String msg) {
+        final GLDebugMessage event = GLDebugMessage.translateAMDEvent(ctx, System.currentTimeMillis(), id, category, severity, msg);
+        sendMessage(event);
+    }
+        
+    //
+    // java -> native
+    // 
+    
+    private static native boolean initIDs0();
+    private native long register0(long glDebugMessageCallbackProcAddress, int extType);
+    private native void unregister0(long glDebugMessageCallbackProcAddress, long handle);
+}
+
+
diff --git a/src/jogl/classes/jogamp/opengl/GLDrawableFactoryImpl.java b/src/jogl/classes/jogamp/opengl/GLDrawableFactoryImpl.java
index e04ced6..704f714 100644
--- a/src/jogl/classes/jogamp/opengl/GLDrawableFactoryImpl.java
+++ b/src/jogl/classes/jogamp/opengl/GLDrawableFactoryImpl.java
@@ -44,6 +44,8 @@ import java.nio.*;
 import javax.media.nativewindow.*;
 import javax.media.opengl.*;
 
+import com.jogamp.common.util.VersionNumber;
+
 /** Extends GLDrawableFactory with a few methods for handling
     typically software-accelerated offscreen rendering (Device
     Independent Bitmaps on Windows, pixmaps on X11). Direct access to
@@ -51,6 +53,11 @@ import javax.media.opengl.*;
     they may be instantiated by the GLJPanel implementation. */
 public abstract class GLDrawableFactoryImpl extends GLDrawableFactory {
   protected static final boolean DEBUG = GLDrawableImpl.DEBUG;
+  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);
 
   protected GLDrawableFactoryImpl() {
     super();
diff --git a/src/jogl/classes/jogamp/opengl/GLDrawableHelper.java b/src/jogl/classes/jogamp/opengl/GLDrawableHelper.java
index d079a1b..5d91a5e 100644
--- a/src/jogl/classes/jogamp/opengl/GLDrawableHelper.java
+++ b/src/jogl/classes/jogamp/opengl/GLDrawableHelper.java
@@ -50,12 +50,11 @@ public class GLDrawableHelper {
   protected static final boolean DEBUG = GLDrawableImpl.DEBUG;
   private static final boolean VERBOSE = Debug.verbose();
   private Object listenersLock = new Object();
-  private List listeners;
-  private volatile boolean listenersIter; // avoid java.util.ConcurrentModificationException
-  private Set listenersToBeInit;
+  private ArrayList<GLEventListener> listeners;
+  private HashSet<GLEventListener> listenersToBeInit;
   private boolean autoSwapBufferMode;
   private Object glRunnablesLock = new Object();
-  private ArrayList glRunnables;
+  private ArrayList<GLRunnable> glRunnables;
   private GLAnimatorControl animatorCtrl;
 
   public GLDrawableHelper() {
@@ -64,13 +63,12 @@ public class GLDrawableHelper {
 
   public final void reset() {
     synchronized(listenersLock) {
-        listeners = new ArrayList();
-        listenersIter = false;
-        listenersToBeInit = new HashSet();
+        listeners = new ArrayList<GLEventListener>();
+        listenersToBeInit = new HashSet<GLEventListener>();
     }
     autoSwapBufferMode = true;
     synchronized(glRunnablesLock) {
-        glRunnables = new ArrayList();
+        glRunnables = new ArrayList<GLRunnable>();
     }
     animatorCtrl = null;
   }
@@ -81,7 +79,6 @@ public class GLDrawableHelper {
     sb.append("GLAnimatorControl: "+animatorCtrl+", ");
     synchronized(listenersLock) {
         sb.append("GLEventListeners num "+listeners.size()+" [");
-        listenersIter = true;
         for (int i=0; i < listeners.size(); i++) {
           Object l = listeners.get(i);
           sb.append(l);
@@ -89,7 +86,6 @@ public class GLDrawableHelper {
           sb.append( !listenersToBeInit.contains(l) );
           sb.append("], ");
         }
-        listenersIter = false;
     }
     sb.append("]");
     return sb.toString();
@@ -107,29 +103,13 @@ public class GLDrawableHelper {
         // GLEventListener may be added after context is created,
         // hence we earmark initialization for the next display call.
         listenersToBeInit.add(listener);
-        if(!listenersIter) {
-            // fast path
-            listeners.add(index, listener);
-        } else {
-            // copy mode in case this is issued while iterating, eg via init, display, ..
-            List newListeners = (List) ((ArrayList) listeners).clone();
-            newListeners.add(index, listener);
-            listeners = newListeners;
-        }
+        listeners.add(index, listener);
     }
   }
   
   public final void removeGLEventListener(GLEventListener listener) {
     synchronized(listenersLock) {
-        if(!listenersIter) {
-            // fast path
-            listeners.remove(listener);
-        } else {
-            // copy mode in case this is issued while iterating, eg via init, display, ..
-            List newListeners = (List) ((ArrayList) listeners).clone();
-            newListeners.remove(listener);
-            listeners = newListeners;
-        }
+        listeners.remove(listener);
         listenersToBeInit.remove(listener);
     }
   }
@@ -141,12 +121,9 @@ public class GLDrawableHelper {
    */
   public final void dispose(GLAutoDrawable drawable) {
     synchronized(listenersLock) {
-        listenersIter = true;
         for (int i=0; i < listeners.size(); i++) {
-          GLEventListener listener = (GLEventListener) listeners.get(i) ;
-          listener.dispose(drawable);
+          listeners.get(i).dispose(drawable);
         }
-        listenersIter = false;
     }
   }
 
@@ -163,9 +140,8 @@ public class GLDrawableHelper {
 
   public final void init(GLAutoDrawable drawable) {
     synchronized(listenersLock) {
-        listenersIter = true;
         for (int i=0; i < listeners.size(); i++) {
-          GLEventListener listener = (GLEventListener) listeners.get(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),
@@ -176,23 +152,25 @@ public class GLDrawableHelper {
             throw new GLException("GLEventListener "+listener+" already initialized: "+drawable);
           }
         }
-        listenersIter = false;
     }
   }
 
   public final void display(GLAutoDrawable drawable) {
-    synchronized(listenersLock) {
-        listenersIter = true;
-        for (int i=0; i < listeners.size(); i++) {
-          GLEventListener listener = (GLEventListener) 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 ) ; 
-          listener.display(drawable);
-        }
-        listenersIter = false;
+    displayImpl(drawable);
+    if(!execGLRunnables(drawable)) {
+        displayImpl(drawable);  
     }
-    execGLRunnables(drawable);
+  }
+  private void displayImpl(GLAutoDrawable drawable) {
+      synchronized(listenersLock) {
+          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 ) ; 
+            listener.display(drawable);
+          }
+      }
   }
 
   private void reshape(GLEventListener listener, GLAutoDrawable drawable,
@@ -205,30 +183,31 @@ public class GLDrawableHelper {
 
   public final void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
     synchronized(listenersLock) {
-        listenersIter = true;
         for (int i=0; i < listeners.size(); i++) {
           reshape((GLEventListener) listeners.get(i), drawable, x, y, width, height, 0==i);
         }
-        listenersIter = false;
     }
   }
 
-  private void execGLRunnables(GLAutoDrawable drawable) {
+  private boolean execGLRunnables(GLAutoDrawable drawable) {
+    boolean res = true;
     if(glRunnables.size()>0) {
         // swap one-shot list asap
-        ArrayList _glRunnables = null;
+        ArrayList<GLRunnable> _glRunnables = null;
         synchronized(glRunnablesLock) {
             if(glRunnables.size()>0) {
                 _glRunnables = glRunnables;
-                glRunnables = new ArrayList();
+                glRunnables = new ArrayList<GLRunnable>();
             }
         }
+        
         if(null!=_glRunnables) {
             for (int i=0; i < _glRunnables.size(); i++) {
-              ((GLRunnable) _glRunnables.get(i)).run(drawable);
+              res = _glRunnables.get(i).run(drawable) && res;
             }
         }
     }
+    return res;
   }
 
   public final void setAnimator(GLAnimatorControl animator) throws GLException {
@@ -299,7 +278,7 @@ public class GLDrawableHelper {
     return autoSwapBufferMode;
   }
 
-  private static final ThreadLocal perThreadInitAction = new ThreadLocal();
+  private static final ThreadLocal<Runnable> perThreadInitAction = new ThreadLocal<Runnable>();
 
   /** Principal helper method which runs a Runnable with the context
       made current. This could have been made part of GLContext, but a
@@ -337,8 +316,9 @@ public class GLDrawableHelper {
 
     // Support for recursive makeCurrent() calls as well as calling
     // other drawables' display() methods from within another one's
+    // FIXME: re-evaluate due to possible expensive TLS access ? 
     GLContext lastContext    = GLContext.getCurrent();
-    Runnable  lastInitAction = (Runnable) perThreadInitAction.get();
+    Runnable  lastInitAction = perThreadInitAction.get();
     if (lastContext != null) {
       lastContext.release();
     }
diff --git a/src/jogl/classes/jogamp/opengl/GLDrawableImpl.java b/src/jogl/classes/jogamp/opengl/GLDrawableImpl.java
index af14e5f..15db80c 100644
--- a/src/jogl/classes/jogamp/opengl/GLDrawableImpl.java
+++ b/src/jogl/classes/jogamp/opengl/GLDrawableImpl.java
@@ -87,7 +87,6 @@ public abstract class GLDrawableImpl implements GLDrawable {
                 return;
             }
             try {
-                AbstractGraphicsDevice aDevice = getNativeSurface().getGraphicsConfiguration().getScreen().getDevice();
                 if (NativeSurface.LOCK_SURFACE_CHANGED == lockRes) {
                     updateHandle();
                 }
diff --git a/src/jogl/classes/jogamp/opengl/GLDynamicLibraryBundleInfo.java b/src/jogl/classes/jogamp/opengl/GLDynamicLibraryBundleInfo.java
index bedf431..4334841 100644
--- a/src/jogl/classes/jogamp/opengl/GLDynamicLibraryBundleInfo.java
+++ b/src/jogl/classes/jogamp/opengl/GLDynamicLibraryBundleInfo.java
@@ -32,9 +32,9 @@ import com.jogamp.common.os.DynamicLibraryBundleInfo;
 import java.util.*;
 
 public abstract class GLDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo {
-    static List/*<String>*/ glueLibNamesPreload;
+    static List<String> glueLibNamesPreload;
     static {
-        glueLibNamesPreload = new ArrayList();
+        glueLibNamesPreload = new ArrayList<String>();
         glueLibNamesPreload.add("nativewindow_x11");
     }
 
@@ -47,7 +47,7 @@ public abstract class GLDynamicLibraryBundleInfo implements DynamicLibraryBundle
     /** default **/
     public boolean shallLookupGlobal() { return false; }
 
-    public static List/*<String>*/ getGlueLibNamesPreload() {
+    public static List<String> getGlueLibNamesPreload() {
         return glueLibNamesPreload;
     }
 }
diff --git a/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationFactory.java b/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationFactory.java
index e51e997..6fe9f08 100644
--- a/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationFactory.java
+++ b/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationFactory.java
@@ -49,9 +49,9 @@ public abstract class GLGraphicsConfigurationFactory extends GraphicsConfigurati
             return -1; // none available
         }
 
-        if(null == chooser && 0 <= recommendedIndex) {
+        if(null == chooser && 0 <= recommendedIndex && capsRequested.isBackgroundOpaque()) {
             if (DEBUG) {
-                System.err.println("chooseCapabilities: Using recommendedIndex: idx " + recommendedIndex);
+                System.err.println("chooseCapabilities: Using recommendedIndex (opaque): idx " + recommendedIndex);
             }
             return recommendedIndex;
         }
diff --git a/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationUtil.java b/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationUtil.java
index 066ea81..cc7a578 100644
--- a/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationUtil.java
+++ b/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationUtil.java
@@ -138,10 +138,24 @@ public class GLGraphicsConfigurationUtil {
             // fix caps ..
             GLCapabilities caps2 = (GLCapabilities) capsRequested.cloneMutable();
             caps2.setDoubleBuffered(false); // FIXME DBLBUFOFFSCRN
+            caps2.setOnscreen(false);
             caps2.setPBuffer(true);
             return caps2;
         }
         return capsRequested;
     }
 
+    public static GLCapabilitiesImmutable fixOpaqueGLCapabilities(GLCapabilitiesImmutable capsRequested, boolean isOpaque)
+    {
+        GLCapabilities caps2 = null;
+        
+        if( capsRequested.isBackgroundOpaque() != isOpaque) {
+            // fix caps ..
+            caps2 = (GLCapabilities) capsRequested.cloneMutable();
+            caps2.setBackgroundOpaque(isOpaque);
+            return caps2;
+        }
+        return capsRequested;
+    }
+    
 }
diff --git a/src/jogl/classes/jogamp/opengl/GLPbufferImpl.java b/src/jogl/classes/jogamp/opengl/GLPbufferImpl.java
index 671390f..d667fa5 100644
--- a/src/jogl/classes/jogamp/opengl/GLPbufferImpl.java
+++ b/src/jogl/classes/jogamp/opengl/GLPbufferImpl.java
@@ -40,6 +40,7 @@
 
 package jogamp.opengl;
 
+import com.jogamp.common.util.locks.LockFactory;
 import com.jogamp.common.util.locks.RecursiveLock;
 import javax.media.nativewindow.NativeSurface;
 import javax.media.opengl.GL;
@@ -64,6 +65,7 @@ public class GLPbufferImpl implements GLPbuffer {
   private GLContextImpl context;
   private GLDrawableHelper drawableHelper = new GLDrawableHelper();
   private int floatMode;
+  private int additionalCtxCreationFlags = 0;
 
   public GLPbufferImpl(GLDrawableImpl pbufferDrawable,
                        GLContext parentContext) {
@@ -177,6 +179,9 @@ public class GLPbufferImpl implements GLPbuffer {
 
   public void setContext(GLContext ctx) {
     context=(GLContextImpl)ctx;
+    if(null != context) {
+        context.setContextCreationFlags(additionalCtxCreationFlags);
+    }    
   }
 
   public GLContext getContext() {
@@ -207,6 +212,17 @@ public class GLPbufferImpl implements GLPbuffer {
     invokeGL(swapBuffersAction);
   }
 
+  public void setContextCreationFlags(int flags) {
+    additionalCtxCreationFlags = flags;
+    if(null != context) {
+        context.setContextCreationFlags(additionalCtxCreationFlags);
+    }        
+  }
+      
+  public int getContextCreationFlags() {
+    return additionalCtxCreationFlags;                
+  }
+            
   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
@@ -240,7 +256,7 @@ public class GLPbufferImpl implements GLPbuffer {
     return pbufferDrawable.getGLProfile();
   }
 
-  private RecursiveLock recurLock = new RecursiveLock();
+  private RecursiveLock recurLock = LockFactory.createRecursiveLock();
 
   public int lockSurface() throws GLException {
     recurLock.lock();
@@ -255,10 +271,6 @@ public class GLPbufferImpl implements GLPbuffer {
     return recurLock.isLocked();
   }
 
-  public Throwable getLockedStack() {
-    return recurLock.getLockedStack();
-  }
-
   public int getFloatingPointMode() {
     if (floatMode == 0) {
       throw new GLException("Pbuffer not initialized, or floating-point support not requested");
diff --git a/src/jogl/classes/jogamp/opengl/GLRunnableTask.java b/src/jogl/classes/jogamp/opengl/GLRunnableTask.java
index e5b66b9..448f684 100644
--- a/src/jogl/classes/jogamp/opengl/GLRunnableTask.java
+++ b/src/jogl/classes/jogamp/opengl/GLRunnableTask.java
@@ -50,10 +50,11 @@ public class GLRunnableTask implements GLRunnable {
         isExecuted = false;
     }
 
-    public void run(GLAutoDrawable drawable) {
+    public boolean run(GLAutoDrawable drawable) {
+        boolean res = true;
         if(null == notifyObject) {
             try {
-                runnable.run(drawable);
+                res = runnable.run(drawable);
             } catch (Throwable t) {
                 runnableException = t;
                 if(catchExceptions) {
@@ -67,7 +68,7 @@ public class GLRunnableTask implements GLRunnable {
         } else {
             synchronized (notifyObject) {
                 try {
-                    runnable.run(drawable);
+                    res = runnable.run(drawable);
                 } catch (Throwable t) {
                     runnableException = t;
                     if(catchExceptions) {
@@ -81,6 +82,7 @@ public class GLRunnableTask implements GLRunnable {
                 }
             }
         }
+        return res;
     }
 
     public boolean isExecuted() { return isExecuted; }
diff --git a/src/jogl/classes/jogamp/opengl/GLStateTracker.java b/src/jogl/classes/jogamp/opengl/GLStateTracker.java
index 22874c0..391f96a 100644
--- a/src/jogl/classes/jogamp/opengl/GLStateTracker.java
+++ b/src/jogl/classes/jogamp/opengl/GLStateTracker.java
@@ -39,10 +39,10 @@
 
 package jogamp.opengl;
 
-import java.util.List;
-import java.util.ArrayList;
 import javax.media.opengl.*;
 import com.jogamp.common.util.IntIntHashMap;
+import java.nio.IntBuffer;
+import java.util.ArrayList;
 
 /**
  * Tracks as closely as possible OpenGL states.
@@ -50,55 +50,70 @@ import com.jogamp.common.util.IntIntHashMap;
  * <p>
  * Currently supported states: PixelStorei
  */
-
 public class GLStateTracker {
-  private static final boolean DEBUG = Debug.debug("GLStateTracker");
-
+    
+  /** Minimum value of MAX_CLIENT_ATTRIB_STACK_DEPTH */  
+  public static final int MIN_CLIENT_ATTRIB_STACK_DEPTH = 16;
+  
+  /** static size of pixel state map */
+  static final int PIXEL_STATE_MAP_SIZE = 16;
+  /** avoid rehash of static size pixel state map */
+  static final int PIXEL_STATE_MAP_CAPACITY = 32;
+  
   private volatile boolean enabled = true;
 
   private IntIntHashMap pixelStateMap;
+  private final ArrayList<SavedState> stack;
+  
+  private static class SavedState {
 
-  static class SavedState {
-    SavedState() {
-        this.pixelStateMap = null;
-    }
-    void putPixelStateMap(IntIntHashMap pixelStateMap) {
-        this.pixelStateMap = new IntIntHashMap();
-        this.pixelStateMap.setKeyNotFoundValue(-1);
-        this.pixelStateMap.putAll(pixelStateMap);
+    /**
+     * Empty pixel-store state
+     */ 
+    private IntIntHashMap pixelStateMap;
+    
+    /**
+     * set (client) pixel-store state, deep copy
+     */ 
+    private final void setPixelStateMap(IntIntHashMap pixelStateMap) {
+        this.pixelStateMap = (IntIntHashMap) pixelStateMap.clone();
     }
-    IntIntHashMap getPixelStateMap() { return pixelStateMap; }
+    
+    /**
+     * get (client) pixel-store state, return reference
+     */ 
+    private final IntIntHashMap getPixelStateMap() { return pixelStateMap; }
 
-    private IntIntHashMap pixelStateMap;
-    // private Map otherStateMap;
   }
-  private List/*<SavedState>*/ stack = new ArrayList();
+  
 
-  public GLStateTracker() {
-    pixelStateMap = new IntIntHashMap();
-    pixelStateMap.setKeyNotFoundValue(-1);
+  public GLStateTracker() {    
+    pixelStateMap = new IntIntHashMap(PIXEL_STATE_MAP_CAPACITY, 0.75f);
+    pixelStateMap.setKeyNotFoundValue(0xFFFFFFFF);
     resetStates();
+    
+    stack = new ArrayList<SavedState>(MIN_CLIENT_ATTRIB_STACK_DEPTH);
   }
 
-  public void clearStates(boolean enable) {
+  public final void clearStates(boolean enable) {
     enabled = enable;    
     pixelStateMap.clear();
   }
 
-  public void setEnabled(boolean on) {
+  public final void setEnabled(boolean on) {
     enabled = on;    
   }
 
-  public boolean isEnabled() {
+  public final boolean isEnabled() {
     return enabled;
   }
 
   /** @return true if found in our map, otherwise false, 
    *  which forces the caller to query GL. */
-  public boolean getInt(int pname, int[] params, int params_offset) {
+  public final boolean getInt(int pname, int[] params, int params_offset) {
     if(enabled) {
         int value = pixelStateMap.get(pname);
-        if(0 <= value) {
+        if(0xFFFFFFFF != value) {
             params[params_offset] = value;
             return true;
         }
@@ -108,10 +123,10 @@ public class GLStateTracker {
 
   /** @return true if found in our map, otherwise false, 
    *  which forces the caller to query GL. */
-  public boolean getInt(int pname, java.nio.IntBuffer params, int dummy) {
+  public final boolean getInt(int pname, IntBuffer params, int dummy) {
     if(enabled) {
         int value = pixelStateMap.get(pname);
-        if(0 <= value) {
+        if(0xFFFFFFFF != value) {
             params.put(params.position(), value);
             return true;
         }
@@ -119,47 +134,48 @@ public class GLStateTracker {
     return false;
   }
 
-  public void setInt(int pname, int param) {
+  public final void setInt(int pname, int param) {
     if(enabled) {
         pixelStateMap.put(pname, param);
     }
   }
 
-  public void pushAttrib(int flags) {
+  public final void pushAttrib(int flags) {
     if(enabled) {
-        SavedState state = new SavedState();
+        SavedState state = new SavedState(); // empty-slot
         if( 0 != (flags&GL2.GL_CLIENT_PIXEL_STORE_BIT) ) {
-            state.putPixelStateMap(pixelStateMap);
+            // save client pixel-store state
+            state.setPixelStateMap(pixelStateMap);
         }
-        stack.add(0, state);
+        stack.add(stack.size(), state); // push
     }
   }
 
-  public void popAttrib() {
+  public final void popAttrib() {
     if(enabled) {
-        if(stack.size()==0) {
+        if(stack.isEmpty()) {
             throw new GLException("stack contains no elements");
         }
-        SavedState state = (SavedState) stack.remove(0);
+        SavedState state = stack.remove(stack.size()-1); // pop
+        
         if(null==state) {
             throw new GLException("null stack element (remaining stack size "+stack.size()+")");
         }
 
-        IntIntHashMap pixelStateMapNew = new IntIntHashMap();
-        pixelStateMapNew.setKeyNotFoundValue(-1);
         if ( null != state.getPixelStateMap() ) {
-            pixelStateMapNew.putAll(state.getPixelStateMap());
-        }
-        pixelStateMap = pixelStateMapNew;
+            // use pulled client pixel-store state from stack
+            pixelStateMap = state.getPixelStateMap();
+        } // else: empty-slot, not pushed by GL_CLIENT_PIXEL_STORE_BIT        
     }
   }
 
-  public void resetStates() {
+  private final void resetStates() {
     pixelStateMap.clear();
 
+    // 16 values -> PIXEL_STATE_MAP_SIZE
     pixelStateMap.put(GL.GL_PACK_ALIGNMENT,          4);
-    pixelStateMap.put(GL2GL3.GL_PACK_SWAP_BYTES,     0 /* GL_FALSE */);
-    pixelStateMap.put(GL2GL3.GL_PACK_LSB_FIRST,      0 /* GL_FALSE */);
+    pixelStateMap.put(GL2GL3.GL_PACK_SWAP_BYTES,     GL.GL_FALSE);
+    pixelStateMap.put(GL2GL3.GL_PACK_LSB_FIRST,      GL.GL_FALSE);
     pixelStateMap.put(GL2GL3.GL_PACK_ROW_LENGTH,     0);
     pixelStateMap.put(GL2GL3.GL_PACK_SKIP_ROWS,      0);
     pixelStateMap.put(GL2GL3.GL_PACK_SKIP_PIXELS,    0);
@@ -167,8 +183,8 @@ public class GLStateTracker {
     pixelStateMap.put(GL2GL3.GL_PACK_SKIP_IMAGES,    0);
 
     pixelStateMap.put(GL.GL_UNPACK_ALIGNMENT,        4);
-    pixelStateMap.put(GL2GL3.GL_UNPACK_SWAP_BYTES,   0 /* GL_FALSE */);
-    pixelStateMap.put(GL2GL3.GL_UNPACK_LSB_FIRST,    0 /* GL_FALSE */);
+    pixelStateMap.put(GL2GL3.GL_UNPACK_SWAP_BYTES,   GL.GL_FALSE);
+    pixelStateMap.put(GL2GL3.GL_UNPACK_LSB_FIRST,    GL.GL_FALSE);
     pixelStateMap.put(GL2GL3.GL_UNPACK_ROW_LENGTH,   0);
     pixelStateMap.put(GL2GL3.GL_UNPACK_SKIP_ROWS,    0);
     pixelStateMap.put(GL2GL3.GL_UNPACK_SKIP_PIXELS,  0);
diff --git a/src/jogl/classes/jogamp/opengl/ListenerSyncedImplStub.java b/src/jogl/classes/jogamp/opengl/ListenerSyncedImplStub.java
new file mode 100644
index 0000000..1cde551
--- /dev/null
+++ b/src/jogl/classes/jogamp/opengl/ListenerSyncedImplStub.java
@@ -0,0 +1,79 @@
+/**
+ * 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 jogamp.opengl;
+
+import java.util.ArrayList;
+
+/**
+ * Simple locked listener implementation stub to be used for listener handler,
+ * synchronized on it's instance.
+ * 
+ * <p>Utilizing simple locking via synchronized.</p>
+ * 
+ * @param <E> The listener type
+ */
+public class ListenerSyncedImplStub<E> {
+  private ArrayList<E> listeners;
+
+  public ListenerSyncedImplStub() {
+    reset();
+  }
+
+  public synchronized final void reset() {
+    listeners = new ArrayList<E>();
+  }
+  
+  public synchronized final void destroy() {
+    listeners.clear();
+    listeners = null;
+  }
+
+  public synchronized final int size() {
+    return listeners.size();
+  }
+  
+  public synchronized final void addListener(E listener) {
+    addListener(-1, listener);
+  }
+
+  public synchronized final void addListener(int index, E listener) {
+    if(0>index) {
+        index = listeners.size();
+    }
+    listeners.add(index, listener);
+  }
+  
+  public synchronized final void removeListener(E listener) {
+    listeners.remove(listener);
+  }
+
+  public final ArrayList<E> getListeners() {
+      return listeners;
+  }  
+}
diff --git a/src/jogl/classes/jogamp/opengl/MemoryObject.java b/src/jogl/classes/jogamp/opengl/MemoryObject.java
index 71a6b49..8b2cf0c 100644
--- a/src/jogl/classes/jogamp/opengl/MemoryObject.java
+++ b/src/jogl/classes/jogamp/opengl/MemoryObject.java
@@ -106,35 +106,15 @@ public class MemoryObject {
     }
 
     /**
-     * Verifies the hash map operation, ie
-     * <ul>
-     *  <li>slow add: if !map.contains(obj0), the values are verified (slow)</li>
-     *  <li>fast get: if map.contains(obj0), the mapped value is compared with equals (fast) </li>
-     * </ul>
-     * In case the above verification fails, a RuntimeException is thrown.<br>
-     * In such case the calculation of the hash value should either be tuned,<br>
-     * or we just cannot use hash mapping.<br>
-     *
-     * @param map the identity HashMap mapping MemoryObject to MemoryObject
-     * @param obj0 the MemoryObject to get or add in the map
-     * @return either the already mapped one where <code>obj0</code> != <code>return</code>,
-     *         or the added <code>obj0</code> == <code>return</code>.
-     * @throws RuntimeException if hash collision occurs
+     * @param map the identity HashMap, MemoryObject to MemoryObject
+     * @param obj0 the MemoryObject
+     * @return either the already mapped MemoryObject - not changing the map, or the newly mapped one.
      */
     public static MemoryObject getOrAddSafe(HashMap/*<MemoryObject,MemoryObject>*/ map, MemoryObject obj0) {
         MemoryObject obj1 = (MemoryObject) map.get(obj0); // get identity (fast)
         if(null == obj1) {
-            // verify hash collision (slow)
-            if( map.values().contains(obj0) ) {
-                throw new RuntimeException("Hash collision, hash !exist, but in values: "+obj0);
-            }
             map.put(obj0, obj0);
             obj1 = obj0;
-        } else {
-            // verify hash collision (ok)
-            if( !obj1.equals(obj0) ) {
-                throw new RuntimeException("Hash collision, hash equals, but objects not: query "+obj0+" != contained "+obj1);
-            }
         }
         return obj1;
     }
diff --git a/src/jogl/classes/jogamp/opengl/SharedResourceRunner.java b/src/jogl/classes/jogamp/opengl/SharedResourceRunner.java
index 3866799..2c396e2 100644
--- a/src/jogl/classes/jogamp/opengl/SharedResourceRunner.java
+++ b/src/jogl/classes/jogamp/opengl/SharedResourceRunner.java
@@ -83,43 +83,40 @@ public class SharedResourceRunner implements Runnable {
         this.impl = impl;
     }
 
-    public SharedResourceRunner.Resource getShared(AbstractGraphicsDevice device) {
-        String connection = device.getConnection();
-        return impl.mapGet(connection);
-    }
-
     public SharedResourceRunner.Resource getOrCreateShared(AbstractGraphicsDevice device) {
-        String connection = device.getConnection();
-        SharedResourceRunner.Resource sr = impl.mapGet(connection);
-
-        if (null == sr && !getDeviceTried(connection)) {
-            addDeviceTried(connection);
-            if (DEBUG) {
-                System.err.println("getOrCreateShared() " + connection + ": trying");
-            }
-            doAndWait(connection, null);
+        SharedResourceRunner.Resource sr = null;
+        if(null != device) {
+            String connection = device.getConnection();
             sr = impl.mapGet(connection);
-            if (DEBUG) {
-                Throwable t = new Throwable("getOrCreateSharedl() " + connection + ": done");
-                t.printStackTrace();
+            if (null == sr && !getDeviceTried(connection)) {
+                addDeviceTried(connection);
+                if (DEBUG) {
+                    System.err.println("getOrCreateShared() " + connection + ": trying");
+                }
+                doAndWait(connection, null);
+                sr = impl.mapGet(connection);
+                if (DEBUG) {
+                    System.err.println("getOrCreateShared() " + connection + ": "+ ( ( null != sr ) ? "success" : "failed" ) );               
+                }
             }
         }
         return sr;
     }
 
     public SharedResourceRunner.Resource releaseShared(AbstractGraphicsDevice device) {
-        String connection = device.getConnection();
-        SharedResourceRunner.Resource sr = impl.mapGet(connection);
-
-        if (null != sr) {
-            removeDeviceTried(connection);
-            if (DEBUG) {
-                System.err.println("releaseShared() " + connection + ": trying");
-            }
-            doAndWait(null, connection);
-            if (DEBUG) {
-                Throwable t = new Throwable("releaseSharedl() " + connection + ": done");
-                t.printStackTrace();
+        SharedResourceRunner.Resource sr = null;
+        if(null != device) {
+            String connection = device.getConnection();
+            sr = impl.mapGet(connection);    
+            if (null != sr) {
+                removeDeviceTried(connection);
+                if (DEBUG) {
+                    System.err.println("releaseShared() " + connection + ": trying");
+                }
+                doAndWait(null, connection);
+                if (DEBUG) {
+                    System.err.println("releaseShared() " + connection + ": done");
+                }
             }
         }
         return sr;
@@ -203,7 +200,12 @@ public class SharedResourceRunner implements Runnable {
                         if (DEBUG) {
                             System.err.println(threadName + " create Shared for: " + initConnection);
                         }
-                        Resource sr = impl.createSharedResource(initConnection);
+                        Resource sr = null;
+                        try {
+                            sr = impl.createSharedResource(initConnection);
+                        } catch (Exception e) {
+                            e.printStackTrace();
+                        }
                         if (null != sr) {
                             impl.mapPut(initConnection, sr);
                         }
@@ -212,10 +214,15 @@ public class SharedResourceRunner implements Runnable {
                         if (DEBUG) {
                             System.err.println(threadName + " release Shared for: " + releaseConnection);
                         }
-                        Resource sr = impl.mapPut(releaseConnection, null);
+                        Resource sr = impl.mapGet(releaseConnection);
                         if (null != sr) {
-                            impl.releaseSharedResource(sr);
-                        }
+                            try {
+                                impl.releaseSharedResource(sr);
+                                impl.mapPut(releaseConnection, null);
+                            } catch (Exception e) {
+                                e.printStackTrace();
+                            }
+                        }                        
                     }
                 }
                 initConnection = null;
diff --git a/src/jogl/classes/jogamp/opengl/awt/VersionApplet.java b/src/jogl/classes/jogamp/opengl/awt/VersionApplet.java
new file mode 100644
index 0000000..5856bf3
--- /dev/null
+++ b/src/jogl/classes/jogamp/opengl/awt/VersionApplet.java
@@ -0,0 +1,168 @@
+package jogamp.opengl.awt;
+
+import java.applet.Applet;
+import java.awt.BorderLayout;
+import java.awt.Container;
+import java.awt.Frame;
+import java.awt.GridLayout;
+import java.awt.TextArea;
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+
+import java.util.List;
+
+import javax.media.opengl.GLProfile;
+import javax.media.opengl.awt.GLCanvas;
+import javax.media.opengl.GL;
+import javax.media.opengl.GLAutoDrawable;
+import javax.media.opengl.GLCapabilities;
+import javax.media.opengl.GLCapabilitiesImmutable;
+import javax.media.opengl.GLDrawableFactory;
+import javax.media.opengl.GLEventListener;
+
+import com.jogamp.common.GlueGenVersion;
+import com.jogamp.common.os.Platform;
+import com.jogamp.common.util.VersionUtil;
+import com.jogamp.opengl.JoglVersion;
+
+ at SuppressWarnings("serial")
+public class VersionApplet extends Applet {
+  TextArea tareaVersion;
+  TextArea tareaCaps;
+  GLCanvas canvas;
+
+  public static void main(String[] args) {
+    Frame frame = new Frame("JOGL Version Applet");
+    frame.setSize(800, 600);
+    frame.setLayout(new BorderLayout());
+
+    VersionApplet va = new VersionApplet();
+    frame.addWindowListener(new ClosingWindowAdapter(frame, va));
+
+    va.init();
+    frame.add(va, BorderLayout.CENTER);
+    frame.validate();
+        
+    frame.setVisible(true);
+    va.start();
+  }
+
+  static class ClosingWindowAdapter extends WindowAdapter {
+    Frame f;
+    VersionApplet va;
+    public ClosingWindowAdapter(Frame f, VersionApplet va) {
+        this.f = f;
+        this.va = va;
+    }
+    public void windowClosing(WindowEvent ev) {
+        f.setVisible(false);
+        va.stop();
+        va.destroy();
+        f.remove(va);
+        f.dispose();
+        System.exit(0);
+    }
+  }
+
+  private synchronized void my_init() {
+    if(null != canvas) { return; }
+
+    GLProfile glp = GLProfile.getDefault();
+    GLCapabilities glcaps = new GLCapabilities(glp);
+
+    setLayout(new BorderLayout());
+    String s;
+
+    tareaVersion = new TextArea(120, 60);
+    s = VersionUtil.getPlatformInfo().toString();
+    System.err.println(s);
+    tareaVersion.append(s);
+
+    s = GlueGenVersion.getInstance().toString();
+    System.err.println(s);
+    tareaVersion.append(s);
+
+    /*
+    s = NativeWindowVersion.getInstance().toString();
+    System.err.println(s);
+    tareaVersion.append(NativeWindowVersion.getInstance().toString()); 
+    */
+
+    s = JoglVersion.getInstance().toString();
+    System.err.println(s);
+    tareaVersion.append(s);
+
+    tareaCaps = new TextArea(120, 20);
+    GLDrawableFactory factory = GLDrawableFactory.getFactory(glp);
+    List<GLCapabilitiesImmutable> availCaps = factory.getAvailableCapabilities(null);
+    for(int i=0; i<availCaps.size(); i++) {
+        s = ((GLCapabilitiesImmutable) availCaps.get(i)).toString();
+        System.err.println(s);
+        tareaCaps.append(s);
+        tareaCaps.append(Platform.getNewline());
+    }
+
+    Container grid = new Container();
+    grid.setLayout(new GridLayout(2, 1));
+    grid.add(tareaVersion);
+    grid.add(tareaCaps);
+    add(grid, BorderLayout.CENTER);
+
+    canvas = new GLCanvas(glcaps);
+    canvas.addGLEventListener(new GLInfo());
+    canvas.setSize(10, 10);
+    add(canvas, BorderLayout.SOUTH);
+    validate();
+  }
+
+  private synchronized void my_release() {
+      if(null!=canvas) {
+          remove(canvas);
+          canvas.destroy();
+          canvas = null;
+          remove(tareaVersion);
+          tareaVersion=null;
+      }
+  }
+
+  public void init() {
+    System.err.println("VersionApplet: init() - begin");
+    my_init();
+    System.err.println("VersionApplet: init() - end");
+  }
+
+  public void start() {
+    System.err.println("VersionApplet: start() - begin");
+    System.err.println("VersionApplet: start() - end");
+  }
+
+  public void stop() {
+    System.err.println("VersionApplet: stop() - begin");
+    System.err.println("VersionApplet: stop() - end");
+  }
+
+  public void destroy() {
+    System.err.println("VersionApplet: destroy() - start");
+    my_release();
+    System.err.println("VersionApplet: destroy() - end");
+  }
+
+  class GLInfo implements GLEventListener {
+    public void init(GLAutoDrawable drawable) {
+        GL gl = drawable.getGL();
+        String s = JoglVersion.getGLInfo(gl, null).toString();
+        System.err.println(s);
+        tareaVersion.append(s);
+    }
+
+    public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
+    }
+
+    public void display(GLAutoDrawable drawable) {
+    }
+
+    public void dispose(GLAutoDrawable drawable) {
+    }
+  }
+
+}
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLContext.java b/src/jogl/classes/jogamp/opengl/egl/EGLContext.java
index 864b958..2deae65 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLContext.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLContext.java
@@ -37,17 +37,19 @@ package jogamp.opengl.egl;
 
 import javax.media.opengl.*;
 import jogamp.opengl.*;
+
 import com.jogamp.gluegen.runtime.ProcAddressTable;
 import com.jogamp.gluegen.runtime.opengl.GLProcAddressResolver;
 import java.nio.*;
 import java.util.*;
+
 import javax.media.nativewindow.AbstractGraphicsConfiguration;
 import javax.media.nativewindow.AbstractGraphicsDevice;
 
 public abstract class EGLContext extends GLContextImpl {
     private boolean eglQueryStringInitialized;
     private boolean eglQueryStringAvailable;
-    private EGLExt eglExt;
+    private EGLExt _eglExt;
     // Table that holds the addresses of the native C-language entry points for
     // EGL extension functions.
     private EGLExtProcAddressTable eglExtProcAddressTable;
@@ -57,15 +59,23 @@ public abstract class EGLContext extends GLContextImpl {
         super(drawable, shareWith);
     }
 
+    @Override
+    protected void resetStates() {
+        eglQueryStringInitialized = false;
+        eglQueryStringAvailable = false;
+        // no inner state _eglExt = null;
+        super.resetStates();
+    }
+    
     public Object getPlatformGLExtensions() {
       return getEGLExt();
     }
 
     public EGLExt getEGLExt() {
-      if (eglExt == null) {
-        eglExt = new EGLExtImpl(this);
+      if (_eglExt == null) {
+        _eglExt = new EGLExtImpl(this);
       }
-      return eglExt;
+      return _eglExt;
     }
 
     public final ProcAddressTable getPlatformExtProcAddressTable() {
@@ -76,9 +86,9 @@ public abstract class EGLContext extends GLContextImpl {
         return eglExtProcAddressTable;
     }
 
-    protected Map/*<String, String>*/ getFunctionNameMap() { return null; }
+    protected Map<String, String> getFunctionNameMap() { return null; }
 
-    protected Map/*<String, String>*/ getExtensionNameMap() { return null; }
+    protected Map<String, String> getExtensionNameMap() { return null; }
 
     public final boolean isGLReadDrawableAvailable() {
         return true;
@@ -170,8 +180,8 @@ public abstract class EGLContext extends GLContextImpl {
         }
         contextHandle = EGL.eglCreateContext(eglDisplay, eglConfig, shareWith, contextAttrs, 0);
         if (contextHandle == 0) {
-            throw new GLException("Error creating OpenGL context: eglDisplay 0x"+Long.toHexString(eglDisplay)+
-                                  ", "+glProfile+", error 0x"+Integer.toHexString(EGL.eglGetError()));
+            throw new GLException("Error creating OpenGL context: eglDisplay "+toHexString(eglDisplay)+
+                                  ", eglConfig "+config+", "+glProfile+", shareWith "+toHexString(shareWith)+", error "+toHexString(EGL.eglGetError()));
         }
         GLContextShareSet.contextCreated(this);
         if (DEBUG) {
@@ -189,26 +199,34 @@ public abstract class EGLContext extends GLContextImpl {
             throw new GLException("Error making context 0x" +
                                   Long.toHexString(contextHandle) + " current: error code " + EGL.eglGetError());
         }
-        setGLFunctionAvailability(true, glProfile.usesNativeGLES2()?2:1, 0, CTX_PROFILE_ES|CTX_OPTION_ANY);
+        int ctp = CTX_PROFILE_ES|CTX_OPTION_ANY;
+        int major;
+        if(glProfile.usesNativeGLES2()) {
+            ctp |= CTX_PROFILE_ES2_COMPAT;
+            major = 2;
+        } else {            
+            major = 1;
+        }
+        setGLFunctionAvailability(true, true, major, 0, ctp);
         return true;
     }
 
     protected final void updateGLXProcAddressTable() {
-        AbstractGraphicsConfiguration aconfig = drawable.getNativeSurface().getGraphicsConfiguration().getNativeGraphicsConfiguration();
-        AbstractGraphicsDevice adevice = aconfig.getScreen().getDevice();
-        String key = adevice.getUniqueID();
+        final AbstractGraphicsConfiguration aconfig = drawable.getNativeSurface().getGraphicsConfiguration().getNativeGraphicsConfiguration();
+        final AbstractGraphicsDevice adevice = aconfig.getScreen().getDevice();
+        final String key = "EGL-"+adevice.getUniqueID();
         if (DEBUG) {
           System.err.println(getThreadName() + ": !!! Initializing EGLextension address table: "+key);
         }
         eglQueryStringInitialized = false;
         eglQueryStringAvailable = false;
 
-        EGLExtProcAddressTable table = null;
+        ProcAddressTable table = null;
         synchronized(mappedContextTypeObjectLock) {
-            table = (EGLExtProcAddressTable) mappedGLXProcAddress.get( key );
+            table = mappedGLXProcAddress.get( key );
         }
         if(null != table) {
-            eglExtProcAddressTable = table;
+            eglExtProcAddressTable = (EGLExtProcAddressTable) table;
             if(DEBUG) {
                 System.err.println(getThreadName() + ": !!! GLContext EGL ProcAddressTable reusing key("+key+") -> "+table.hashCode());
             }
@@ -228,22 +246,22 @@ public abstract class EGLContext extends GLContextImpl {
         }
     }
   
-    public synchronized String getPlatformExtensionsString() {
+    protected final StringBuffer getPlatformExtensionsStringImpl() {
+        StringBuffer sb = new StringBuffer();        
         if (!eglQueryStringInitialized) {
           eglQueryStringAvailable =
             getDrawableImpl().getGLDynamicLookupHelper().dynamicLookupFunction("eglQueryString") != 0;
           eglQueryStringInitialized = true;
         }
         if (eglQueryStringAvailable) {
-            String ret = EGL.eglQueryString(((EGLDrawable)drawable).getDisplay(), 
-                                            EGL.EGL_EXTENSIONS);
+            final String ret = EGL.eglQueryString(((EGLDrawable)drawable).getDisplay(), 
+                                                  EGL.EGL_EXTENSIONS);
             if (DEBUG) {
               System.err.println("!!! EGL extensions: " + ret);
             }
-            return ret;
-        } else {
-          return "";
+            sb.append(ret);
         }
+        return sb;
     }
 
     protected void setSwapIntervalImpl(int interval) {
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLDrawable.java b/src/jogl/classes/jogamp/opengl/egl/EGLDrawable.java
index 7ffbf90..a9cc403 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLDrawable.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLDrawable.java
@@ -84,16 +84,16 @@ public abstract class EGLDrawable extends GLDrawableImpl {
         }
 
         if(DEBUG) {
-            System.err.println("createSurface using eglDisplay 0x"+Long.toHexString(eglDisplay)+", "+eglConfig);
+            System.err.println("createSurface using eglDisplay "+toHexString(eglDisplay)+", "+eglConfig);
         }
 
         eglSurface = createSurface(eglDisplay, eglConfig.getNativeConfig(), surface.getSurfaceHandle());
         if (EGL.EGL_NO_SURFACE==eglSurface) {
-            throw new GLException("Creation of window surface failed: "+eglConfig+", error 0x"+Integer.toHexString(EGL.eglGetError()));
+            throw new GLException("Creation of window surface failed: "+eglConfig+", error "+toHexString(EGL.eglGetError()));
         }
 
         if(DEBUG) {
-            System.err.println("setSurface using component: handle 0x"+Long.toHexString(surface.getSurfaceHandle())+" -> 0x"+Long.toHexString(eglSurface));
+            System.err.println("setSurface using component: handle "+toHexString(surface.getSurfaceHandle())+" -> "+toHexString(eglSurface));
         }
     }
 
@@ -103,7 +103,7 @@ public abstract class EGLDrawable extends GLDrawableImpl {
             AbstractGraphicsDevice aDevice = aConfig.getScreen().getDevice();
             if(aDevice instanceof EGLGraphicsDevice) {
                 if(DEBUG) {
-                    System.err.println("EGLDrawable.setRealized: using existing EGL config: "+this);
+                    System.err.println("EGLDrawable.setRealized(true): using existing EGL config - START");
                 }
                 // just fetch the data .. trust but verify ..
                 eglDisplay = aDevice.getHandle();
@@ -122,14 +122,11 @@ public abstract class EGLDrawable extends GLDrawableImpl {
                         // surface holds static EGLSurface
                         eglSurface = surface.getSurfaceHandle();
                         if(DEBUG) {
-                            System.err.println("setSurface re-using component's EGLSurface: handle 0x"+Long.toHexString(eglSurface));
+                            System.err.println("setSurface re-using component's EGLSurface: handle "+toHexString(eglSurface));
                         }
                     } else {
                         // EGLSurface is ours ..
                         ownEGLSurface=true;
-                        
-                        eglConfig.updateGraphicsConfiguration();
-
                         recreateSurface();
                     }
                 } else {
@@ -137,7 +134,7 @@ public abstract class EGLDrawable extends GLDrawableImpl {
                 }
             } else {
                 if(DEBUG) {
-                    System.err.println("EGLDrawable.setRealized: creating new EGL config: "+this);
+                    System.err.println("EGLDrawable.setRealized(true): creating new EGL config - START");
                 }
                 // create a new EGL config ..
                 ownEGLDisplay=true;
@@ -153,24 +150,24 @@ public abstract class EGLDrawable extends GLDrawableImpl {
                 eglDisplay = EGL.eglGetDisplay(nDisplay);
                 if (eglDisplay == EGL.EGL_NO_DISPLAY) {
                     if(DEBUG) {
-                        System.err.println("eglDisplay("+Long.toHexString(nDisplay)+" <surfaceHandle>): failed, using EGL_DEFAULT_DISPLAY");
+                        System.err.println("eglDisplay("+toHexString(nDisplay)+" <surfaceHandle>): failed, using EGL_DEFAULT_DISPLAY");
                     }
                     nDisplay = EGL.EGL_DEFAULT_DISPLAY;
                     eglDisplay = EGL.eglGetDisplay(nDisplay);
                 }
                 if (eglDisplay == EGL.EGL_NO_DISPLAY) {
-                    throw new GLException("Failed to created EGL display: nhandle 0x"+Long.toHexString(nDisplay)+", "+aDevice+", error 0x"+Integer.toHexString(EGL.eglGetError()));
+                    throw new GLException("Failed to created EGL display: nhandle "+toHexString(nDisplay)+", "+aDevice+", error "+toHexString(EGL.eglGetError()));
                 } else if(DEBUG) {
-                    System.err.println("eglDisplay("+Long.toHexString(nDisplay)+"): 0x"+Long.toHexString(eglDisplay));
+                    System.err.println("eglDisplay("+toHexString(nDisplay)+"): "+toHexString(eglDisplay));
                 }
                 if (!EGL.eglInitialize(eglDisplay, null, null)) {
-                    throw new GLException("eglInitialize failed"+", error 0x"+Integer.toHexString(EGL.eglGetError()));
+                    throw new GLException("eglInitialize failed"+", error "+Integer.toHexString(EGL.eglGetError()));
                 }
                 EGLGraphicsDevice e = new EGLGraphicsDevice(eglDisplay, AbstractGraphicsDevice.DEFAULT_CONNECTION, AbstractGraphicsDevice.DEFAULT_UNIT);
                 DefaultGraphicsScreen s = new DefaultGraphicsScreen(e, aConfig.getScreen().getIndex());
-                // yes, use the already choosen/requested Capabilities (x11,win32,..)
-                GLCapabilitiesImmutable capsChosen = (GLCapabilitiesImmutable) aConfig.getChosenCapabilities();
-                GLCapabilitiesImmutable capsRequested = (GLCapabilitiesImmutable) aConfig.getRequestedCapabilities();
+                // yes, use the already chosen/requested Capabilities (x11,win32,..)
+                final GLCapabilitiesImmutable capsRequested = (GLCapabilitiesImmutable) aConfig.getRequestedCapabilities();
+                final GLCapabilitiesImmutable capsChosen = (GLCapabilitiesImmutable) aConfig.getChosenCapabilities();
                 eglConfig = (EGLGraphicsConfiguration) GraphicsConfigurationFactory.getFactory(e).chooseGraphicsConfiguration(
                         capsChosen, capsRequested, null, s);
                 if (null == eglConfig) {
@@ -180,7 +177,13 @@ public abstract class EGLDrawable extends GLDrawableImpl {
                 }
                 recreateSurface();
             }
+            if(DEBUG) {
+                System.err.println("EGLDrawable.setRealized(true): END: ownDisplay "+ownEGLDisplay+", ownSurface "+ownEGLSurface+" - "+this);
+            }
         } else if (ownEGLSurface && eglSurface != EGL.EGL_NO_SURFACE) {
+            if(DEBUG) {
+                System.err.println("EGLDrawable.setRealized(false): ownDisplay "+ownEGLDisplay+", ownSurface "+ownEGLSurface);
+            }
             // Destroy the window surface
             if (!EGL.eglDestroySurface(eglDisplay, eglSurface)) {
                 throw new GLException("Error destroying window surface (eglDestroySurface)");
@@ -224,7 +227,7 @@ public abstract class EGLDrawable extends GLDrawableImpl {
         return getClass().getName()+"[realized "+isRealized()+
                     ",\n\tfactory    "+getFactory()+
                     ",\n\tsurface    "+getNativeSurface()+
-                    ",\n\teglSurface  0x"+Long.toHexString(eglSurface)+
+                    ",\n\teglSurface "+toHexString(eglSurface)+
                     ",\n\teglConfig  "+eglConfig+
                     ",\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 b6599de..fb9c930 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java
@@ -42,6 +42,7 @@ import javax.media.opengl.*;
 
 import com.jogamp.common.JogampRuntimeException;
 import com.jogamp.common.util.*;
+
 import jogamp.opengl.*;
 import jogamp.nativewindow.WrappedSurface;
 
@@ -49,7 +50,6 @@ import java.util.HashMap;
 import java.util.List;
 
 public class EGLDrawableFactory extends GLDrawableFactoryImpl {
-  
     private static final GLDynamicLookupHelper eglES1DynamicLookupHelper;
     private static final GLDynamicLookupHelper eglES2DynamicLookupHelper;
 
@@ -103,15 +103,27 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl {
 
     static class SharedResource {
       private EGLGraphicsDevice device;
-      //private EGLDrawable drawable;
-      //private EGLContext context;
-
-      SharedResource(EGLGraphicsDevice dev /*, EGLDrawable draw, EGLContext ctx */) {
+      // private EGLDrawable drawable;
+      // private EGLContext contextES1;
+      // private EGLContext contextES2;
+      private boolean wasES1ContextCreated;
+      private boolean wasES2ContextCreated;
+
+      SharedResource(EGLGraphicsDevice dev, boolean wasContextES1Created, boolean wasContextES2Created 
+                     /*EGLDrawable draw, EGLContext ctxES1, EGLContext ctxES2 */) {
           device = dev;
           // drawable = draw;
-          // context = ctx;
+          // contextES1 = ctxES1;
+          // contextES2 = ctxES2;
+          this.wasES1ContextCreated = wasContextES1Created;
+          this.wasES2ContextCreated = wasContextES2Created;
       }
-      EGLGraphicsDevice getDevice() { return device; }
+      final EGLGraphicsDevice getDevice() { return device; }
+      // final EGLDrawable getDrawable() { return drawable; }
+      // final EGLContext getContextES1() { return contextES1; }
+      // final EGLContext getContextES2() { return contextES2; }
+      final boolean wasES1ContextAvailable() { return wasES1ContextCreated; }
+      final boolean wasES2ContextAvailable() { return wasES2ContextCreated; }
     }
     HashMap/*<connection, SharedResource>*/ sharedMap = new HashMap();
     EGLGraphicsDevice defaultDevice;
@@ -121,46 +133,84 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl {
     }
 
     public final boolean getIsDeviceCompatible(AbstractGraphicsDevice device) {
-      if(device instanceof EGLGraphicsDevice) {
-          return true;
-      }
-      return false;
+      return true; // via mappings (X11/WGL/.. -> EGL) we shall be able to handle all types.
     }
 
-    private SharedResource getOrCreateShared(AbstractGraphicsDevice device) {
-        String connection = device.getConnection();
+    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) {
+            final EGLContext context = (EGLContext) drawable.createContext(null);
+            if (null != context) {
+                context.setSynchronized(true);
+                try {
+                    context.makeCurrent(); // could cause exception
+                    madeCurrent = context.isCurrent();
+                } catch (GLException gle) {
+                    if (DEBUG) {
+                        System.err.println("EGLDrawableFactory.createShared: INFO: makeCurrent failed");
+                        gle.printStackTrace();
+                    }                    
+                } finally {
+                    context.destroy();
+                }
+            }
+            drawable.destroy();
+        }
+        return madeCurrent;
+    }
+    
+    private SharedResource getOrCreateShared(AbstractGraphicsDevice adevice) {
+        String connection = adevice.getConnection();
         SharedResource sr;
         synchronized(sharedMap) {
             sr = (SharedResource) sharedMap.get(connection);
         }
-        if(null==sr) {
+        if(null==sr) {   
             long eglDisplay = EGL.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("eglDisplay(EGL_DEFAULT_DISPLAY): 0x"+Long.toHexString(eglDisplay));
+                System.err.println("EGLDrawableFactory.createShared: eglDisplay(EGL_DEFAULT_DISPLAY): 0x"+Long.toHexString(eglDisplay));
             }
             if (!EGL.eglInitialize(eglDisplay, null, null)) {
                 throw new GLException("eglInitialize failed"+", error 0x"+Integer.toHexString(EGL.eglGetError()));
             }
-            EGLGraphicsDevice sharedDevice = new EGLGraphicsDevice(eglDisplay, connection, device.getUnitID());
-            sr = new SharedResource(sharedDevice);
+            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 (DEBUG) {
-              System.err.println("!!! SharedDevice: "+sharedDevice);
-            }
+                System.err.println("EGLDrawableFactory.createShared: device:  " + sharedDevice);
+                System.err.println("EGLDrawableFactory.createShared: context ES1: " + madeCurrentES1);
+                System.err.println("EGLDrawableFactory.createShared: context ES2: " + madeCurrentES2);
+            }                        
         }
         return sr;
     }
 
-
+    public final boolean getWasSharedContextCreated(AbstractGraphicsDevice device) {
+        SharedResource sr = getOrCreateShared(device);
+        if(null!=sr) {
+            return sr.wasES1ContextAvailable() || sr.wasES2ContextAvailable();
+        }
+        return false;        
+    }
+    
     protected final GLContext getOrCreateSharedContextImpl(AbstractGraphicsDevice device) {
-        // FIXME: not implemented .. needs a dummy EGL surface - NEEDED ?
-        return null;
+        return null; // n/a for EGL .. since we don't keep the resources
     }
-
+    
     protected AbstractGraphicsDevice getOrCreateSharedDeviceImpl(AbstractGraphicsDevice device) {
         SharedResource sr = getOrCreateShared(device);
         if(null!=sr) {
@@ -191,7 +241,7 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl {
 
     protected final void shutdownInstance() {}
 
-    protected List/*GLCapabilitiesImmutable*/ getAvailableCapabilitiesImpl(AbstractGraphicsDevice device) {
+    protected List<GLCapabilitiesImmutable> getAvailableCapabilitiesImpl(AbstractGraphicsDevice device) {
         return EGLGraphicsConfigurationFactory.getAvailableCapabilities(this, device);
     }
 
@@ -209,7 +259,7 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl {
         AbstractGraphicsConfiguration config = target.getGraphicsConfiguration().getNativeGraphicsConfiguration();
         GLCapabilitiesImmutable caps = (GLCapabilitiesImmutable) config.getChosenCapabilities();
         if(!caps.isPBuffer()) {
-            throw new GLException("Not yet implemented");
+            throw new GLException("Non pbuffer not yet implemented");
         }
         // PBuffer GLDrawable Creation
         return new EGLPbufferDrawable(this, target);
@@ -225,10 +275,14 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl {
         return ns;
     }
 
-    protected ProxySurface createProxySurfaceImpl(AbstractGraphicsDevice device, long windowHandle, GLCapabilitiesImmutable capsRequested, GLCapabilitiesChooser chooser) {    
-        WrappedSurface ns = new WrappedSurface(EGLGraphicsConfigurationFactory.createOffscreenGraphicsConfiguration(device, capsRequested, capsRequested, chooser), windowHandle);
+    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, -1);
+        WrappedSurface ns = new WrappedSurface(cfg, windowHandle);
         return ns;
-    }    
+    }
     
     protected GLContext createExternalGLContextImpl() {
         AbstractGraphicsScreen absScreen = DefaultGraphicsScreen.createDefault(NativeWindowFactory.TYPE_EGL);
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLDynamicLibraryBundleInfo.java b/src/jogl/classes/jogamp/opengl/egl/EGLDynamicLibraryBundleInfo.java
index 22d39fd..33154b0 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLDynamicLibraryBundleInfo.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLDynamicLibraryBundleInfo.java
@@ -28,12 +28,17 @@
  
 package jogamp.opengl.egl;
 
+import com.jogamp.common.os.AndroidVersion;
 import com.jogamp.common.os.DynamicLookupHelper;
 import com.jogamp.common.os.NativeLibrary;
+import com.jogamp.common.os.Platform;
+
 import java.util.*;
+
 import javax.media.nativewindow.*;
 import javax.media.opengl.*;
 import jogamp.opengl.*;
+
 import java.security.*;
 
 /**
@@ -43,6 +48,12 @@ import java.security.*;
  * Currently two implementations exist, one for ES1 and one for ES2.
  */
 public abstract class EGLDynamicLibraryBundleInfo extends GLDynamicLibraryBundleInfo {
+    static List<String> glueLibNames;
+    static {
+        glueLibNames = new ArrayList<String>();
+        glueLibNames.addAll(GLDynamicLibraryBundleInfo.getGlueLibNamesPreload());
+        glueLibNames.add("jogl_mobile");
+    }
 
     protected EGLDynamicLibraryBundleInfo() {
         super();
@@ -50,24 +61,45 @@ public abstract class EGLDynamicLibraryBundleInfo extends GLDynamicLibraryBundle
 
     /** Might be a desktop GL library, and might need to allow symbol access to subsequent libs */
     public boolean shallLinkGlobal() { return true; }
-
-    public final List getToolGetProcAddressFuncNameList() {
-        List res = new ArrayList();
+    
+    public boolean shallLookupGlobal() {
+        if ( AndroidVersion.isAvailable ) {
+            // Android requires global symbol lookup
+            return true;
+        }
+        // default behavior for other platforms
+        return false;
+    }
+    
+    public final List<String> getToolGetProcAddressFuncNameList() {
+        List<String> res = new ArrayList<String>();
         res.add("eglGetProcAddress");
         return res;
     }
 
-    public final long toolDynamicLookupFunction(long toolGetProcAddressHandle, String funcName) {
+    public final long toolGetProcAddress(long toolGetProcAddressHandle, String funcName) {
         return EGL.eglGetProcAddress(toolGetProcAddressHandle, funcName);
     }
 
-    protected List/*<String>*/ getEGLLibNamesList() {
-        List/*<String>*/ eglLibNames = new ArrayList();
-        // EGL
-        eglLibNames.add("EGL");
+    public final boolean useToolGetProcAdressFirst(String funcName) {
+        return false; // JAU / FIXME funcName.startsWith("egl");
+    }
+    
+    protected List<String> getEGLLibNamesList() {
+        List<String> eglLibNames = new ArrayList<String>();
+        
+        // try default generic names first 
+        eglLibNames.add("EGL");        
         // for windows distributions using the 'unlike' lib prefix, 
         // where our tool does not add it.
         eglLibNames.add("libEGL");
+        // this is the default EGL lib name, according to the spec 
+        eglLibNames.add("libEGL.so.1");
+        
         return eglLibNames;
     }
+    
+    public final List<String> getGlueLibNames() {
+        return glueLibNames;
+    }    
 }
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLES1DynamicLibraryBundleInfo.java b/src/jogl/classes/jogamp/opengl/egl/EGLES1DynamicLibraryBundleInfo.java
index a62c847..3b0fc59 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLES1DynamicLibraryBundleInfo.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLES1DynamicLibraryBundleInfo.java
@@ -29,45 +29,42 @@
 package jogamp.opengl.egl;
 
 import java.util.*;
+
+import com.jogamp.common.os.Platform;
+
 import jogamp.opengl.*;
 
 public class EGLES1DynamicLibraryBundleInfo extends EGLDynamicLibraryBundleInfo {
-    static List/*<String>*/ glueLibNames;
-    static {
-        glueLibNames = new ArrayList();
-        glueLibNames.addAll(GLDynamicLibraryBundleInfo.getGlueLibNamesPreload());
-        glueLibNames.add("jogl_es1");
-    }
-
     protected EGLES1DynamicLibraryBundleInfo() {
         super();
     }
 
-    public List getToolLibNames() {
-        List/*<List>*/ libNames = new ArrayList();
+    public List<List<String>> getToolLibNames() {
+        final List<List<String>> libsList = new ArrayList<List<String>>();
+        {
+            final List<String> libsGL = new ArrayList<String>();
+            
+            // GLESv2
+            libsGL.add("GLESv1_CM");
+            libsGL.add("libGLESv1_CM.so");
+            // this is the default lib name, according to the spec 
+            libsGL.add("libGLESv1_CM.so.2");
 
-        List/*<String>*/ glesLibNames = new ArrayList();
-        glesLibNames.add("GLES_CM");
-        glesLibNames.add("GLES_CL");
-        glesLibNames.add("GLESv1_CM");
-        // for windows distributions using the 'unlike' lib prefix, 
-        // where our tool does not add it.
-        glesLibNames.add("libGLES_CM");
-        glesLibNames.add("libGLES_CL");
-        glesLibNames.add("libGLESv1_CM");
-        // last but not least, we may even use the desktop GL library,
-        // which would be eg Mesa + Gallium EGL ..
-        glesLibNames.add("libGL.so.1");
-        glesLibNames.add("libGL.so");
-        glesLibNames.add("GL");
-
-        libNames.add(glesLibNames);
-        libNames.add(getEGLLibNamesList());
-        return libNames;
-    }
-
-    public List/*<String>*/ getGlueLibNames() {
-        return glueLibNames;
-    }
+            // alternative names
+            libsGL.add("GLES_CM");
+            libsGL.add("GLES_CL");
+            
+            // for windows distributions using the 'unlike' lib prefix, 
+            // where our tool does not add it.
+            libsGL.add("libGLESv1_CM");
+            libsGL.add("libGLES_CM");
+            libsGL.add("libGLES_CL");
+            
+            libsList.add(libsGL);
+        }
+        libsList.add(getEGLLibNamesList());
+        
+        return libsList;
+    }    
 }
 
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLES2DynamicLibraryBundleInfo.java b/src/jogl/classes/jogamp/opengl/egl/EGLES2DynamicLibraryBundleInfo.java
index 0477fc2..28c480b 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLES2DynamicLibraryBundleInfo.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLES2DynamicLibraryBundleInfo.java
@@ -29,45 +29,43 @@
 package jogamp.opengl.egl;
 
 import java.util.*;
+
+import com.jogamp.common.os.Platform;
+
 import jogamp.opengl.*;
 
 public class EGLES2DynamicLibraryBundleInfo extends EGLDynamicLibraryBundleInfo {
-    static List/*<String>*/ glueLibNames;
-    static {
-        glueLibNames = new ArrayList();
-        glueLibNames.addAll(GLDynamicLibraryBundleInfo.getGlueLibNamesPreload());
-        glueLibNames.add("jogl_es2");
-    }
-  
     protected EGLES2DynamicLibraryBundleInfo() {
         super();
     }
 
-    public List getToolLibNames() {
-        List/*<List>*/ libNames = new ArrayList();
+    public List<List<String>> getToolLibNames() {
+        final List<List<String>> libsList = new ArrayList<List<String>>();
+        {
+            final List<String> libsGL = new ArrayList<String>();
+            
+            // GLESv2
+            libsGL.add("GLESv2");
+            libsGL.add("libGLESv2.so");
+            // this is the default lib name, according to the spec 
+            libsGL.add("libGLESv2.so.2");
 
-        List/*<String>*/ glesLibNames = new ArrayList();
-        glesLibNames.add("GLES20");
-        glesLibNames.add("GLESv2");
-        glesLibNames.add("GLESv2_CM");
-        // for windows distributions using the 'unlike' lib prefix
-        // where our tool does not add it.
-        glesLibNames.add("libGLES20"); 
-        glesLibNames.add("libGLESv2");
-        glesLibNames.add("libGLESv2_CM");
-        // last but not least, we may even use the desktop GL library,
-        // which would be eg Mesa + Gallium EGL ..
-        glesLibNames.add("libGL.so.1");
-        glesLibNames.add("libGL.so");
-        glesLibNames.add("GL");
+            // alternative names
+            libsGL.add("GLES20");
+            libsGL.add("GLESv2_CM");
 
-        libNames.add(glesLibNames);
-        libNames.add(getEGLLibNamesList());
-        return libNames;
-    }
-
-    public List/*<String>*/ getGlueLibNames() {
-        return glueLibNames;
-    }
+            // for windows distributions using the 'unlike' lib prefix
+            // where our tool does not add it.
+            libsGL.add("libGLESv2");
+            libsGL.add("libGLESv2_CM");
+            libsGL.add("libGLES20"); 
+    
+            libsList.add(libsGL);
+        }
+        libsList.add(getEGLLibNamesList());
+        
+        return libsList;
+    }    
+    
 }
 
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLExternalContext.java b/src/jogl/classes/jogamp/opengl/egl/EGLExternalContext.java
index dd06dc1..389daa7 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLExternalContext.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLExternalContext.java
@@ -45,7 +45,7 @@ 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|CTX_OPTION_ANY);
+        setGLFunctionAvailability(false, true, 0, 0, CTX_IS_ARB_CREATED|CTX_PROFILE_ES|CTX_OPTION_ANY);
         getGLStateTracker().setEnabled(false); // external context usage can't track state in Java
     }
 
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLGLCapabilities.java b/src/jogl/classes/jogamp/opengl/egl/EGLGLCapabilities.java
index cead035..8a423c6 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLGLCapabilities.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLGLCapabilities.java
@@ -34,9 +34,11 @@ import javax.media.opengl.GLException;
 import javax.media.opengl.GLProfile;
 
 public class EGLGLCapabilities extends GLCapabilities {
-  long eglcfg;
-  int  eglcfgid;
-
+  final long eglcfg;
+  final int  eglcfgid;
+  final int renderableType;  
+  int nativeVisualID;
+  
   /** Comparing EGLConfig ID only */
   public static class EglCfgIDComparator implements Comparator {
 
@@ -65,10 +67,24 @@ public class EGLGLCapabilities extends GLCapabilities {
       }
   }
 
-  public EGLGLCapabilities(long eglcfg, int eglcfgid, GLProfile glp) {
-      super(glp);
+  /**
+   * 
+   * @param eglcfg
+   * @param eglcfgid
+   * @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, GLProfile glp, int renderableType) {
+      super( ( null != glp ) ? glp : getCompatible(renderableType) );
       this.eglcfg = eglcfg;
       this.eglcfgid = eglcfgid;
+      if(!isCompatible(glp, renderableType)) {
+          throw new GLException("Incompatible "+glp+
+                                " with EGL-RenderableType["+renderableTypeToString(null, renderableType)+"]");
+      }
+      this.renderableType = renderableType;
   }
 
   public Object cloneMutable() {
@@ -85,12 +101,68 @@ public class EGLGLCapabilities extends GLCapabilities {
 
   final public long getEGLConfig() { return eglcfg; }
   final public int getEGLConfigID() { return eglcfgid; }
+  final public int getRenderableType() { return renderableType; }
+  final public void setNativeVisualID(int vid) { nativeVisualID=vid; }
+  final public int getNativeVisualID() { return nativeVisualID; }
+  
+  public static boolean isCompatible(GLProfile glp, int renderableType) {
+    if(null == glp) {
+        return true;
+    }
+    if(0 != (renderableType & EGL.EGL_OPENGL_ES_BIT) && glp.usesNativeGLES1()) {
+        return true;
+    }
+    if(0 != (renderableType & EGL.EGL_OPENGL_ES2_BIT) && glp.usesNativeGLES2()) {
+        return true;
+    }
+    if(0 != (renderableType & EGL.EGL_OPENGL_BIT) && !glp.usesNativeGLES()) {
+        return true;
+    }
+    return false;
+  }
+
+  public static GLProfile getCompatible(int renderableType) {
+    if(0 != (renderableType & EGL.EGL_OPENGL_ES2_BIT) && GLProfile.isAvailable(GLProfile.GLES2)) {
+        return GLProfile.get(GLProfile.GLES2);
+    }
+    if(0 != (renderableType & EGL.EGL_OPENGL_ES_BIT) && GLProfile.isAvailable(GLProfile.GLES1)) {
+        return GLProfile.get(GLProfile.GLES1);
+    }
+    if(0 != (renderableType & EGL.EGL_OPENGL_BIT)) {
+        return GLProfile.getDefault();
+    }
+    return null;
+  }
+  
+  public static StringBuffer renderableTypeToString(StringBuffer sink, int renderableType) {
+    if(null == sink) {
+        sink = new StringBuffer();
+    }
+    boolean first=true;
+    if(0 != (renderableType & EGL.EGL_OPENGL_BIT)) {
+        sink.append("GL"); first=false;
+    }
+    if(0 != (renderableType & EGL.EGL_OPENGL_ES_BIT)) {
+        if(!first) sink.append(", "); sink.append("GLES1");  first=false;
+    }
+    if(0 != (renderableType & EGL.EGL_OPENGL_ES2_BIT)) {
+        if(!first) sink.append(", "); sink.append("GLES2");  first=false;
+    }
+    if(0 != (renderableType & EGL.EGL_OPENVG_API)) {
+        if(!first) sink.append(", "); sink.append("VG");  first=false;
+    }
+    return sink;      
+  }
   
   public StringBuffer toString(StringBuffer sink) {
     if(null == sink) {
         sink = new StringBuffer();
     }
     sink.append("0x").append(Long.toHexString(eglcfgid)).append(": ");
-    return super.toString(sink);
+    sink.append("vid 0x").append(Integer.toHexString(nativeVisualID)).append(", ");
+    super.toString(sink);
+    sink.append(", [");
+    renderableTypeToString(sink, renderableType);
+    return sink.append("]");
   }
 }
\ No newline at end of file
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfiguration.java b/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfiguration.java
index 4d8f2ac..14e67a2 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfiguration.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfiguration.java
@@ -36,10 +36,13 @@
 
 package jogamp.opengl.egl;
 
+import java.nio.IntBuffer;
 import java.util.ArrayList;
 import javax.media.nativewindow.*;
 import javax.media.nativewindow.egl.*;
 import javax.media.opengl.*;
+
+import com.jogamp.common.nio.Buffers;
 import com.jogamp.common.nio.PointerBuffer;
 import jogamp.opengl.*;
 
@@ -72,6 +75,7 @@ public class EGLGraphicsConfiguration extends DefaultGraphicsConfiguration imple
         GLProfile glp = capsRequested.getGLProfile();
         long cfg = EGLConfigId2EGLConfig(glp, dpy, cfgID);
         EGLGLCapabilities caps = EGLConfig2Capabilities(glp, dpy, cfg, false, capsRequested.isOnscreen(), capsRequested.isPBuffer());
+        caps = (EGLGLCapabilities) GLGraphicsConfigurationUtil.fixOpaqueGLCapabilities(caps, capsRequested.isBackgroundOpaque()); // FIXME: valid to override EGL transparency ?
         return new EGLGraphicsConfiguration(absScreen, caps, capsRequested, new DefaultGLCapabilitiesChooser());
     }
 
@@ -79,7 +83,7 @@ public class EGLGraphicsConfiguration extends DefaultGraphicsConfiguration imple
     public Object clone() {
         return super.clone();
     }
-
+        
     void updateGraphicsConfiguration() {
         EGLGraphicsConfiguration newConfig = (EGLGraphicsConfiguration)
             GraphicsConfigurationFactory.getFactory(getScreen().getDevice()).chooseGraphicsConfiguration(
@@ -88,7 +92,7 @@ public class EGLGraphicsConfiguration extends DefaultGraphicsConfiguration imple
             // FIXME: setScreen( ... );
             setChosenCapabilities(newConfig.getChosenCapabilities());
             if(DEBUG) {
-                System.err.println("!!! updateGraphicsConfiguration: "+this);
+                System.err.println("!!! updateGraphicsConfiguration(1): "+this);
             }
         }
     }
@@ -134,7 +138,7 @@ public class EGLGraphicsConfiguration extends DefaultGraphicsConfiguration imple
     }
 
     public static EGLGLCapabilities EGLConfig2Capabilities(GLProfile glp, long display, long config,
-                                                                 boolean relaxed, boolean onscreen, boolean usePBuffer) {
+                                                           boolean relaxed, boolean onscreen, boolean usePBuffer) {
         ArrayList bucket = new ArrayList();
         final int winattrmask = GLGraphicsConfigurationUtil.getWinAttributeBits(onscreen, usePBuffer);
         if( EGLConfig2Capabilities(bucket, glp, display, config, winattrmask) ) {
@@ -155,57 +159,80 @@ public class EGLGraphicsConfiguration extends DefaultGraphicsConfiguration imple
             return false;
         }
 
-        int[] val = new int[1];
-
+        final IntBuffer val = Buffers.newDirectIntBuffer(1);
+        final int cfgID;
+        final int rType;
+        
         // get the configID
-        if(!EGL.eglGetConfigAttrib(display, config, EGL.EGL_CONFIG_ID, val, 0)) {
+        if(!EGL.eglGetConfigAttrib(display, config, EGL.EGL_CONFIG_ID, val)) {
             if(DEBUG) {
                 // FIXME: this happens on a ATI PC Emulation ..
                 System.err.println("EGL couldn't retrieve ConfigID for config "+toHexString(config)+", error "+toHexString(EGL.eglGetError()));
             }
             return false;
         }
-        GLCapabilities caps = new EGLGLCapabilities(config, val[0], glp);
-
-        // Read the actual configuration into the choosen caps
-        if(EGL.eglGetConfigAttrib(display, config, EGL.EGL_RED_SIZE, val, 0)) {
-            caps.setRedBits(val[0]);
+        cfgID = val.get(0);
+        
+        if(!EGL.eglGetConfigAttrib(display, config, EGL.EGL_RENDERABLE_TYPE, val)) {
+            if(DEBUG) {
+                System.err.println("EGL couldn't retrieve EGL_RENDERABLE_TYPE for config "+toHexString(config)+", error "+toHexString(EGL.eglGetError()));
+            }
+            return false;
         }
-        if(EGL.eglGetConfigAttrib(display, config, EGL.EGL_GREEN_SIZE, val, 0)) {
-            caps.setGreenBits(val[0]);
+        rType = val.get(0);
+        
+        EGLGLCapabilities caps = null;        
+        try {
+            caps = new EGLGLCapabilities(config, cfgID, glp, rType);
+        } catch (GLException gle) {
+            if(DEBUG) {
+                System.err.println("config "+toHexString(config)+": "+gle);
+            }
+            return false;
+        }        
+                
+        // Read the actual configuration into the chosen caps
+        if(EGL.eglGetConfigAttrib(display, config, EGL.EGL_NATIVE_VISUAL_ID, val)) {
+            caps.setNativeVisualID(val.get(0));
+        }                
+        if(EGL.eglGetConfigAttrib(display, config, EGL.EGL_RED_SIZE, val)) {
+            caps.setRedBits(val.get(0));
         }
-        if(EGL.eglGetConfigAttrib(display, config, EGL.EGL_BLUE_SIZE, val, 0)) {
-            caps.setBlueBits(val[0]);
+        if(EGL.eglGetConfigAttrib(display, config, EGL.EGL_GREEN_SIZE, val)) {
+            caps.setGreenBits(val.get(0));
         }
-        if(EGL.eglGetConfigAttrib(display, config, EGL.EGL_ALPHA_SIZE, val, 0)) {
-            caps.setAlphaBits(val[0]);
+        if(EGL.eglGetConfigAttrib(display, config, EGL.EGL_BLUE_SIZE, val)) {
+            caps.setBlueBits(val.get(0));
         }
-        if(EGL.eglGetConfigAttrib(display, config, EGL.EGL_STENCIL_SIZE, val, 0)) {
-            caps.setStencilBits(val[0]);
+        if(EGL.eglGetConfigAttrib(display, config, EGL.EGL_ALPHA_SIZE, val)) {
+            caps.setAlphaBits(val.get(0));
         }
-        if(EGL.eglGetConfigAttrib(display, config, EGL.EGL_DEPTH_SIZE, val, 0)) {
-            caps.setDepthBits(val[0]);
+        if(EGL.eglGetConfigAttrib(display, config, EGL.EGL_STENCIL_SIZE, val)) {
+            caps.setStencilBits(val.get(0));
         }
-        if(EGL.eglGetConfigAttrib(display, config, EGL.EGL_SAMPLES, val, 0)) {
-            caps.setSampleBuffers(val[0]>0?true:false);
-            caps.setNumSamples(val[0]);
+        if(EGL.eglGetConfigAttrib(display, config, EGL.EGL_DEPTH_SIZE, val)) {
+            caps.setDepthBits(val.get(0));
         }
-        if(EGL.eglGetConfigAttrib(display, config, EGL.EGL_TRANSPARENT_TYPE, val, 0)) {
-            caps.setBackgroundOpaque(val[0] != EGL.EGL_TRANSPARENT_RGB);
+        if(EGL.eglGetConfigAttrib(display, config, EGL.EGL_SAMPLES, val)) {
+            caps.setSampleBuffers(val.get(0)>0?true:false);
+            caps.setNumSamples(val.get(0));
+        }
+        if(EGL.eglGetConfigAttrib(display, config, EGL.EGL_TRANSPARENT_TYPE, val)) {
+            caps.setBackgroundOpaque(val.get(0) != EGL.EGL_TRANSPARENT_RGB);
         }
         if(!caps.isBackgroundOpaque()) {
-            if(EGL.eglGetConfigAttrib(display, config, EGL.EGL_TRANSPARENT_RED_VALUE, val, 0)) {
-                caps.setTransparentRedValue(val[0]==EGL.EGL_DONT_CARE?-1:val[0]);
+            if(EGL.eglGetConfigAttrib(display, config, EGL.EGL_TRANSPARENT_RED_VALUE, val)) {
+                caps.setTransparentRedValue(val.get(0)==EGL.EGL_DONT_CARE?-1:val.get(0));
             }
-            if(EGL.eglGetConfigAttrib(display, config, EGL.EGL_TRANSPARENT_GREEN_VALUE, val, 0)) {
-                caps.setTransparentGreenValue(val[0]==EGL.EGL_DONT_CARE?-1:val[0]);
+            if(EGL.eglGetConfigAttrib(display, config, EGL.EGL_TRANSPARENT_GREEN_VALUE, val)) {
+                caps.setTransparentGreenValue(val.get(0)==EGL.EGL_DONT_CARE?-1:val.get(0));
             }
-            if(EGL.eglGetConfigAttrib(display, config, EGL.EGL_TRANSPARENT_BLUE_VALUE, val, 0)) {
-                caps.setTransparentBlueValue(val[0]==EGL.EGL_DONT_CARE?-1:val[0]);
+            if(EGL.eglGetConfigAttrib(display, config, EGL.EGL_TRANSPARENT_BLUE_VALUE, val)) {
+                caps.setTransparentBlueValue(val.get(0)==EGL.EGL_DONT_CARE?-1:val.get(0));
             }
             /** Not defined in EGL 
-            if(EGL.eglGetConfigAttrib(display, config, EGL.EGL_TRANSPARENT_ALPHA_VALUE, val, 0)) {
-                caps.setTransparentAlphaValue(val[0]==EGL.EGL_DONT_CARE?-1:val[0]);
+            if(EGL.eglGetConfigAttrib(display, config, EGL.EGL_TRANSPARENT_ALPHA_VALUE, val)) {
+                caps.setTransparentAlphaValue(val.get(0)==EGL.EGL_DONT_CARE?-1:val.get(0));
             } */
         }
         return GLGraphicsConfigurationUtil.addGLCapabilitiesPermutations(capsBucket, caps, drawableTypeBits );
@@ -260,12 +287,10 @@ public class EGLGraphicsConfiguration extends DefaultGraphicsConfiguration imple
         }
 
         // 26 
-
         attrs[idx++] = EGL.EGL_RENDERABLE_TYPE;
         if(caps.getGLProfile().usesNativeGLES1()) {
             attrs[idx++] = EGL.EGL_OPENGL_ES_BIT;
-        }
-        else if(caps.getGLProfile().usesNativeGLES2()) {
+        } else if(caps.getGLProfile().usesNativeGLES2()) {
             attrs[idx++] = EGL.EGL_OPENGL_ES2_BIT;
         } else {
             attrs[idx++] = EGL.EGL_OPENGL_BIT;
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfigurationFactory.java b/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfigurationFactory.java
index 78c0da6..8c1cf88 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfigurationFactory.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfigurationFactory.java
@@ -49,13 +49,16 @@ import javax.media.opengl.GLException;
 import javax.media.opengl.GLProfile;
 import javax.media.opengl.GLDrawableFactory;
 
+import com.jogamp.common.nio.Buffers;
 import com.jogamp.common.nio.PointerBuffer;
+
 import jogamp.opengl.GLGraphicsConfigurationFactory;
 import jogamp.opengl.GLGraphicsConfigurationUtil;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 import java.io.PrintStream;
+import java.nio.IntBuffer;
 
 
 /** Subclass of GraphicsConfigurationFactory used when non-AWT tookits
@@ -64,7 +67,6 @@ import java.io.PrintStream;
     GraphicsDevice and GraphicsConfiguration abstractions. */
 
 public class EGLGraphicsConfigurationFactory extends GLGraphicsConfigurationFactory {
-    protected static final boolean DEBUG = GraphicsConfigurationFactory.DEBUG || jogamp.opengl.Debug.debug("EGL");
     static EGLGLCapabilities.EglCfgIDComparator EglCfgIDComparator = new EGLGLCapabilities.EglCfgIDComparator();
 
     EGLGraphicsConfigurationFactory() {
@@ -95,10 +97,10 @@ public class EGLGraphicsConfigurationFactory extends GLGraphicsConfigurationFact
         return chooseGraphicsConfigurationStatic((GLCapabilitiesImmutable) capsChosen,
                                                  (GLCapabilitiesImmutable) capsRequested,
                                                  (GLCapabilitiesChooser) chooser,
-                                                 absScreen);
+                                                 absScreen, -1);
     }
 
-    protected static List/*<EGLGLCapabilities>*/ getAvailableCapabilities(EGLDrawableFactory factory, AbstractGraphicsDevice device) {
+    protected static List<GLCapabilitiesImmutable> getAvailableCapabilities(EGLDrawableFactory factory, AbstractGraphicsDevice device) {
         EGLDrawableFactory.SharedResource sharedResource = factory.getOrCreateSharedResource(device);
         if(null == sharedResource) {
             throw new GLException("Shared resource for device n/a: "+device);
@@ -107,25 +109,23 @@ public class EGLGraphicsConfigurationFactory extends GLGraphicsConfigurationFact
         long eglDisplay = eglDevice.getHandle();
 
         List/*<EGLGLCapabilities>*/ availableCaps = null;
-        int[] maxConfigs = new int[1];
+        IntBuffer numConfigs = Buffers.newDirectIntBuffer(1);
 
-        if(!EGL.eglGetConfigs(eglDisplay, null, 0, maxConfigs, 0)) {
+        if(!EGL.eglGetConfigs(eglDisplay, null, 0, numConfigs)) {
             throw new GLException("Graphics configuration get maxConfigs (eglGetConfigs) call failed, error "+toHexString(EGL.eglGetError()));
         }
-        if(0 == maxConfigs[0]) {
+        if(0 == numConfigs.get(0)) {
             throw new GLException("Graphics configuration get maxConfigs (eglGetConfigs) no configs");
         }
 
-        PointerBuffer configs = PointerBuffer.allocateDirect(maxConfigs[0]);
-        int[] numConfigs = new int[1];
+        PointerBuffer configs = PointerBuffer.allocateDirect(numConfigs.get(0));
 
-        if(!EGL.eglGetConfigs(eglDisplay, configs, configs.capacity(), numConfigs, 0)) {
+        if(!EGL.eglGetConfigs(eglDisplay, configs, configs.capacity(), numConfigs)) {
             throw new GLException("Graphics configuration get all configs (eglGetConfigs) call failed, error "+toHexString(EGL.eglGetError()));
         }
-        if (numConfigs[0] > 0) {
-            GLProfile glp = GLProfile.getDefault(device);
-            availableCaps = eglConfigs2GLCaps(glp, eglDisplay, configs, numConfigs[0], GLGraphicsConfigurationUtil.ALL_BITS);
-            if( null != availableCaps ) {
+        if (numConfigs.get(0) > 0) {
+            availableCaps = eglConfigs2GLCaps(null, eglDisplay, configs, numConfigs.get(0), GLGraphicsConfigurationUtil.ALL_BITS);
+            if( null != availableCaps && availableCaps.size() > 1) {
                 Collections.sort(availableCaps, EglCfgIDComparator);
             }
         }
@@ -133,10 +133,10 @@ public class EGLGraphicsConfigurationFactory extends GLGraphicsConfigurationFact
         return availableCaps;
     }
 
-    private static EGLGraphicsConfiguration chooseGraphicsConfigurationStatic(GLCapabilitiesImmutable capsChosen,
-                                                                              GLCapabilitiesImmutable capsReq,
-                                                                              GLCapabilitiesChooser chooser,
-                                                                              AbstractGraphicsScreen absScreen) {
+    public static EGLGraphicsConfiguration chooseGraphicsConfigurationStatic(GLCapabilitiesImmutable capsChosen,
+                                                                             GLCapabilitiesImmutable capsReq,
+                                                                             GLCapabilitiesChooser chooser,
+                                                                             AbstractGraphicsScreen absScreen, int nativeVisualID) {
         if (capsChosen == null) {
             capsChosen = new GLCapabilities(null);
         }
@@ -160,7 +160,7 @@ public class EGLGraphicsConfigurationFactory extends GLGraphicsConfigurationFact
 
         GLProfile glp = capsChosen.getGLProfile();
 
-        EGLGraphicsConfiguration res = eglChooseConfig(eglDisplay, capsChosen, capsReq, chooser, absScreen);
+        EGLGraphicsConfiguration res = eglChooseConfig(eglDisplay, capsChosen, capsReq, chooser, absScreen, nativeVisualID);
         if(null!=res) {
             return res;
         }
@@ -181,7 +181,7 @@ public class EGLGraphicsConfigurationFactory extends GLGraphicsConfigurationFact
         if(DEBUG) {
             System.err.println("trying fixed caps (1): "+fixedCaps);
         }
-        res = eglChooseConfig(eglDisplay, fixedCaps, capsReq, chooser, absScreen);
+        res = eglChooseConfig(eglDisplay, fixedCaps, capsReq, chooser, absScreen, nativeVisualID);
         if(null!=res) {
             return res;
         }
@@ -196,7 +196,7 @@ public class EGLGraphicsConfigurationFactory extends GLGraphicsConfigurationFact
         if(DEBUG) {
             System.err.println("trying fixed caps (2): "+fixedCaps);
         }
-        res = eglChooseConfig(eglDisplay, fixedCaps, capsReq, chooser, absScreen);
+        res = eglChooseConfig(eglDisplay, fixedCaps, capsReq, chooser, absScreen, nativeVisualID);
         if(null!=res) {
             return res;
         }
@@ -213,7 +213,7 @@ public class EGLGraphicsConfigurationFactory extends GLGraphicsConfigurationFact
         if(DEBUG) {
             System.err.println("trying fixed caps (3): "+fixedCaps);
         }
-        res = eglChooseConfig(eglDisplay, fixedCaps, capsReq, chooser, absScreen);
+        res = eglChooseConfig(eglDisplay, fixedCaps, capsReq, chooser, absScreen, nativeVisualID);
         if(null!=res) {
             return res;
         }
@@ -223,51 +223,52 @@ public class EGLGraphicsConfigurationFactory extends GLGraphicsConfigurationFact
     static EGLGraphicsConfiguration eglChooseConfig(long eglDisplay, 
                                                     GLCapabilitiesImmutable capsChosen, GLCapabilitiesImmutable capsRequested,
                                                     GLCapabilitiesChooser chooser,
-                                                    AbstractGraphicsScreen absScreen) {
-        GLProfile glp = capsChosen.getGLProfile();
-        boolean onscreen = capsChosen.isOnscreen();
-        boolean usePBuffer = capsChosen.isPBuffer();
-        List/*<EGLGLCapabilities>*/ availableCaps = null;
+                                                    AbstractGraphicsScreen absScreen,
+                                                    int nativeVisualID) {
+        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;
         int recommendedIndex = -1;
         long recommendedEGLConfig = -1;
-        int[] maxConfigs = new int[1];
+        IntBuffer numConfigs = Buffers.newDirectIntBuffer(1);
 
-        if(!EGL.eglGetConfigs(eglDisplay, null, 0, maxConfigs, 0)) {
-            throw new GLException("Graphics configuration get maxConfigs (eglGetConfigs) call failed, error "+toHexString(EGL.eglGetError()));
+        if(!EGL.eglGetConfigs(eglDisplay, null, 0, numConfigs)) {
+            throw new GLException("EGLGraphicsConfiguration.eglChooseConfig: Get maxConfigs (eglGetConfigs) call failed, error "+toHexString(EGL.eglGetError()));
         }
-        if(0 == maxConfigs[0]) {
-            throw new GLException("Graphics configuration get maxConfigs (eglGetConfigs) no configs");
+        if(0 == numConfigs.get(0)) {
+            throw new GLException("EGLGraphicsConfiguration.eglChooseConfig: Get maxConfigs (eglGetConfigs) no configs");
         }
         if (DEBUG) {
-            System.err.println("!!! eglChooseConfig maxConfigs: "+maxConfigs[0]);
+            System.err.println("EGLGraphicsConfiguration.eglChooseConfig: eglChooseConfig maxConfigs: "+numConfigs.get(0));
+            System.err.println("EGLGraphicsConfiguration.eglChooseConfig: eglDisplay "+toHexString(eglDisplay)+", "+capsChosen);
         }
 
-        int[] attrs = EGLGraphicsConfiguration.GLCapabilities2AttribList(capsChosen);
-        PointerBuffer configs = PointerBuffer.allocateDirect(maxConfigs[0]);
-        int[] numConfigs = new int[1];
+        final IntBuffer attrs = Buffers.newDirectIntBuffer(EGLGraphicsConfiguration.GLCapabilities2AttribList(capsChosen));
+        PointerBuffer configs = PointerBuffer.allocateDirect(numConfigs.get(0));
 
-        // 1st choice: get GLCapabilities based on users GLCapabilities setting recommendedIndex as preferred choice
-        if (!EGL.eglChooseConfig(eglDisplay,
-                                 attrs, 0,
-                                 configs, configs.capacity(),
-                                 numConfigs, 0)) {
-            throw new GLException("Graphics configuration selection (eglChooseConfig) failed for "+capsChosen+", error "+toHexString(EGL.eglGetError()));
-        }
-        if (numConfigs[0] > 0) {
-            availableCaps = eglConfigs2GLCaps(glp, eglDisplay, configs, numConfigs[0], winattrmask);
+        // 1st choice: get GLCapabilities based on users GLCapabilities 
+        //             setting recommendedIndex as preferred choice
+        // skipped if nativeVisualID is given
+        if( 0<=nativeVisualID || !EGL.eglChooseConfig(eglDisplay, attrs, configs, configs.capacity(), numConfigs) ) {
+            if(DEBUG) {
+                System.err.println("EGLGraphicsConfiguration.eglChooseConfig: #1 eglChooseConfig: false");
+            }
+        } else  if (numConfigs.get(0) > 0) {
+            availableCaps = eglConfigs2GLCaps(glp, eglDisplay, configs, numConfigs.get(0), winattrmask);
             if(availableCaps.size() > 0) {
                 recommendedEGLConfig =  configs.get(0);
                 recommendedIndex = 0;
                 if (DEBUG) {
-                    System.err.println("!!! eglChooseConfig recommended fbcfg " + toHexString(recommendedEGLConfig) + ", idx " + recommendedIndex);
-                    System.err.println("!!! user  caps " + capsChosen);
-                    System.err.println("!!! fbcfg caps " + availableCaps.get(recommendedIndex));
+                    System.err.println("EGLGraphicsConfiguration.eglChooseConfig: #1 eglChooseConfig: recommended fbcfg " + toHexString(recommendedEGLConfig) + ", idx " + recommendedIndex);
+                    System.err.println("EGLGraphicsConfiguration.eglChooseConfig: #1 fbcfg caps " + availableCaps.get(recommendedIndex));
                 }
             } else if (DEBUG) {
-                System.err.println("!!! eglChooseConfig no caps for recommended fbcfg " + toHexString(configs.get(0)));
-                System.err.println("!!! user  caps " + capsChosen);
+                System.err.println("EGLGraphicsConfiguration.eglChooseConfig: #1 eglChooseConfig: no caps for recommended fbcfg " + toHexString(configs.get(0)));
             }
+        } else if (DEBUG) {
+            System.err.println("EGLGraphicsConfiguration.eglChooseConfig: #1 eglChooseConfig: no configs");
         }
 
         // 2nd choice: get all GLCapabilities available, no preferred recommendedIndex available
@@ -276,31 +277,60 @@ public class EGLGraphicsConfigurationFactory extends GLGraphicsConfigurationFact
             recommendedEGLConfig = -1;
             recommendedIndex = -1;
 
-            if(!EGL.eglGetConfigs(eglDisplay, configs, configs.capacity(), numConfigs, 0)) {
-                throw new GLException("Graphics configuration get all configs (eglGetConfigs) call failed, error "+toHexString(EGL.eglGetError()));
+            if(!EGL.eglGetConfigs(eglDisplay, configs, configs.capacity(), numConfigs)) {
+                throw new GLException("EGLGraphicsConfiguration.eglChooseConfig: #2 Get all configs (eglGetConfigs) call failed, error "+toHexString(EGL.eglGetError()));
             }
-            if (numConfigs[0] > 0) {
-                availableCaps = eglConfigs2GLCaps(glp, eglDisplay, configs, numConfigs[0], winattrmask);
+            if (numConfigs.get(0) > 0) {
+                availableCaps = eglConfigs2GLCaps(glp, eglDisplay, configs, numConfigs.get(0), winattrmask);
             }
         }
 
         if( null == availableCaps || 0 == availableCaps.size() ) {
             if(DEBUG) {
                 // FIXME: this happens on a ATI PC Emulation ..
-                System.err.println("Graphics configuration 1st choice and 2nd choice failed - no configs");
+                System.err.println("EGLGraphicsConfiguration.eglChooseConfig: #2 Graphics configuration 1st choice and 2nd choice failed - no configs");
             }
             return null;
         }
+        
+        if(DEBUG) {
+            System.err.println("EGLGraphicsConfiguration.eglChooseConfig: got configs: "+availableCaps.size());
+            for(int i=0; i<availableCaps.size(); i++) {
+                System.err.println(i+": "+availableCaps.get(i));
+            }
+        }
+
+        if(0<=nativeVisualID) {
+            List/*<EGLGLCapabilities>*/ removedCaps = new ArrayList();
+            for(int i=0; i<availableCaps.size(); ) {
+                EGLGLCapabilities ecap = (EGLGLCapabilities) availableCaps.get(i);
+                if(ecap.getNativeVisualID()!=nativeVisualID) {
+                    removedCaps.add(availableCaps.remove(i));
+                } else {
+                    i++;
+                }
+            }
+            if(0==availableCaps.size()) {
+                availableCaps = removedCaps;
+                if(DEBUG) {
+                    System.err.println("EGLGraphicsConfiguration.eglChooseConfig: post filter nativeVisualID ("+nativeVisualID+") no config found, revert to all");
+                }
+            } else if(DEBUG) {
+                System.err.println("EGLGraphicsConfiguration.eglChooseConfig: post filter nativeVisualID ("+nativeVisualID+") got configs: "+availableCaps.size());
+            }
+        }
 
-        int chosenIndex = chooseCapabilities(chooser, capsChosen, availableCaps, recommendedIndex);
+        final int chosenIndex = chooseCapabilities(chooser, capsChosen, availableCaps, recommendedIndex);
         if ( 0 > chosenIndex ) {
             if (DEBUG) {
-                Thread.dumpStack();
+                System.err.println("EGLGraphicsConfiguration.eglChooseConfig: #2 chooseCapabilities failed");
             }
             return null;
         }
-        EGLGLCapabilities chosenCaps = (EGLGLCapabilities) availableCaps.get(chosenIndex);
-
+        final EGLGLCapabilities chosenCaps = (EGLGLCapabilities) availableCaps.get(chosenIndex);
+        if (DEBUG) {
+            System.err.println("EGLGraphicsConfiguration.eglChooseConfig: X chosen :"+chosenIndex+", eglConfig: "+toHexString(chosenCaps.getEGLConfig())+", "+chosenCaps);
+        }
         return new EGLGraphicsConfiguration(absScreen, chosenCaps, capsRequested, chooser);
     }
 
@@ -331,7 +361,7 @@ public class EGLGraphicsConfigurationFactory extends GLGraphicsConfigurationFact
         }
 
         DefaultGraphicsScreen screen = new DefaultGraphicsScreen(device, 0);
-        EGLGraphicsConfiguration eglConfig = chooseGraphicsConfigurationStatic(capsChosen, capsReq, chooser, screen);
+        EGLGraphicsConfiguration eglConfig = chooseGraphicsConfigurationStatic(capsChosen, capsReq, chooser, screen, -1);
         if (null == eglConfig) {
             throw new GLException("Couldn't create EGLGraphicsConfiguration from "+screen);
         } else if(DEBUG) {
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLOnscreenDrawable.java b/src/jogl/classes/jogamp/opengl/egl/EGLOnscreenDrawable.java
index 4359f2a..7d5e044 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLOnscreenDrawable.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLOnscreenDrawable.java
@@ -57,7 +57,12 @@ public class EGLOnscreenDrawable extends EGLDrawable {
     }
 
     protected void swapBuffersImpl() {
-        EGL.eglSwapBuffers(eglDisplay, eglSurface);
+        if(!EGL.eglSwapBuffers(eglDisplay, eglSurface)) {
+            if(DEBUG) {
+                System.err.println("eglSwapBuffers failed:");
+                Thread.dumpStack();
+            }
+        }
     }
 
 }
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLPbufferDrawable.java b/src/jogl/classes/jogamp/opengl/egl/EGLPbufferDrawable.java
index 6cbd1ee..5fb32e6 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLPbufferDrawable.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLPbufferDrawable.java
@@ -46,13 +46,14 @@ import javax.media.opengl.GLCapabilitiesImmutable;
 import javax.media.opengl.GLContext;
 import javax.media.opengl.GLException;
 
+import jogamp.opengl.x11.glx.GLX;
+
 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);
-        ownEGLDisplay = true;
 
         // get choosen ones ..
         GLCapabilitiesImmutable caps = (GLCapabilitiesImmutable)
@@ -76,6 +77,10 @@ public class EGLPbufferDrawable extends EGLDrawable {
 
     }
 
+    protected void destroyImpl() {
+        setRealized(false);
+    }
+    
     protected long createSurface(long eglDpy, long eglNativeCfg, long surfaceHandle) {
         NativeSurface nw = getNativeSurface();
         int[] attrs = EGLGraphicsConfiguration.CreatePBufferSurfaceAttribList(nw.getWidth(), nw.getHeight(), texFormat);
diff --git a/src/jogl/classes/jogamp/opengl/glu/GLUquadricImpl.java b/src/jogl/classes/jogamp/opengl/glu/GLUquadricImpl.java
index 5eb73cd..3f8a765 100644
--- a/src/jogl/classes/jogamp/opengl/glu/GLUquadricImpl.java
+++ b/src/jogl/classes/jogamp/opengl/glu/GLUquadricImpl.java
@@ -223,7 +223,7 @@ public class GLUquadricImpl implements GLUquadric {
    * GLU.LINE:       Quadrics are rendered as a set of lines.
    *
    * GLU.SILHOUETTE: Quadrics are rendered as a set of lines, except that edges
-   * 		   separating coplanar faces will not be drawn.
+   *            separating coplanar faces will not be drawn.
    *
    * GLU.POINT:       Quadrics are rendered as a set of points.
    * 
@@ -234,8 +234,8 @@ public class GLUquadricImpl implements GLUquadric {
   }
 
   /**
-   * specifies what kind	of normals are desired for quadrics.
-   * The legal values	are as follows:
+   * specifies what kind    of normals are desired for quadrics.
+   * The legal values    are as follows:
    *
    * GLU.NONE:     No normals are generated.
    *
@@ -252,7 +252,7 @@ public class GLUquadricImpl implements GLUquadric {
 
   /**
    * specifies what kind of orientation is desired for.
-   * The orientation	values are as follows:
+   * The orientation    values are as follows:
    *
    * GLU.OUTSIDE:  Quadrics are drawn with normals pointing outward.
    *
@@ -495,10 +495,10 @@ public class GLUquadricImpl implements GLUquadric {
         glNormal3f(gl, 0.0f, 0.0f, -1.0f);
       }
     }
-	
+    
     da = 2.0f * PI / slices;
     dr = (outerRadius - innerRadius) /  loops;
-	
+    
     switch (drawStyle) {
     case GLU.GLU_FILL:
       {
@@ -916,7 +916,7 @@ public class GLUquadricImpl implements GLUquadric {
   }
 
   /**
-   * draws a sphere of the given	radius centered	around the origin.
+   * draws a sphere of the given    radius centered    around the origin.
    * The sphere is subdivided around the z axis into slices and along the z axis
    * into stacks (similar to lines of longitude and latitude).
    *
@@ -1188,7 +1188,7 @@ public class GLUquadricImpl implements GLUquadric {
    */
   private void normal3f(GL gl, float x, float y, float z) {
     float mag;
-	
+    
     mag = (float)Math.sqrt(x * x + y * y + z * z);
     if (mag > 0.00001F) {
       x /= mag;
diff --git a/src/jogl/classes/jogamp/opengl/glu/gl2/nurbs/GL2CurveEvaluator.java b/src/jogl/classes/jogamp/opengl/glu/gl2/nurbs/GL2CurveEvaluator.java
index 043edac..2ef4468 100644
--- a/src/jogl/classes/jogamp/opengl/glu/gl2/nurbs/GL2CurveEvaluator.java
+++ b/src/jogl/classes/jogamp/opengl/glu/gl2/nurbs/GL2CurveEvaluator.java
@@ -131,7 +131,7 @@ class GL2CurveEvaluator implements CurveEvaluator {
                     CArrayOfFloats ps) {
     if (output_triangles) {
       // TODO code for callback (output_triangles probably indicates callback)
-      //				System.out.println("TODO curveevaluator.map1f-output_triangles");
+      //                System.out.println("TODO curveevaluator.map1f-output_triangles");
     } else {
       gl.glMap1f(type, ulo, uhi, stride, order, ps.getArray(), ps
                  .getPointer());
@@ -166,10 +166,10 @@ class GL2CurveEvaluator implements CurveEvaluator {
    */
   public void mapgrid1f(int nu, float u1, float u2) {
     if (output_triangles) {
-      //				System.out.println("TODO curveevaluator.mapgrid1f");
+      //                System.out.println("TODO curveevaluator.mapgrid1f");
     } else
       gl.glMapGrid1f(nu, u1, u2);
-    //			// System.out.println("upravit NU");
+    //            // System.out.println("upravit NU");
     // gl.glMapGrid1f(50,u1,u2);
   }
 
@@ -189,7 +189,7 @@ class GL2CurveEvaluator implements CurveEvaluator {
     */
     if (output_triangles) {
       // TODO code for callback
-      //			System.out.println("TODO openglcurveevaluator.mapmesh1f output_triangles");
+      //            System.out.println("TODO openglcurveevaluator.mapmesh1f output_triangles");
     } else {
       switch (style) {
       case Backend.N_MESHFILL:
diff --git a/src/jogl/classes/jogamp/opengl/glu/gl2/nurbs/GL2SurfaceEvaluator.java b/src/jogl/classes/jogamp/opengl/glu/gl2/nurbs/GL2SurfaceEvaluator.java
index bc63994..155c4f9 100644
--- a/src/jogl/classes/jogamp/opengl/glu/gl2/nurbs/GL2SurfaceEvaluator.java
+++ b/src/jogl/classes/jogamp/opengl/glu/gl2/nurbs/GL2SurfaceEvaluator.java
@@ -76,10 +76,10 @@ class GL2SurfaceEvaluator implements SurfaceEvaluator {
 
     if (output_triangles) {
       // TODO outp triangles surfaceevaluator bgnmap2f
-      //			System.out.println("TODO surfaceevaluator.bgnmap2f output triangles");
+      //            System.out.println("TODO surfaceevaluator.bgnmap2f output triangles");
     } else {
       gl.glPushAttrib(GL2.GL_EVAL_BIT);
-      //				System.out.println("TODO surfaceevaluator.bgnmap2f glgetintegerv");
+      //                System.out.println("TODO surfaceevaluator.bgnmap2f glgetintegerv");
     }
 
   }
@@ -112,7 +112,7 @@ class GL2SurfaceEvaluator implements SurfaceEvaluator {
   public void endmap2f() {
     // TODO Auto-generated method stub
     if (output_triangles) {
-      //			System.out.println("TODO surfaceevaluator.endmap2f output triangles");
+      //            System.out.println("TODO surfaceevaluator.endmap2f output triangles");
     } else {
       gl.glPopAttrib();
       // TODO use LOD
@@ -142,7 +142,7 @@ class GL2SurfaceEvaluator implements SurfaceEvaluator {
   public void mapgrid2f(int nu, float u0, float u1, int nv, float v0, float v1) {
 
     if (output_triangles) {
-      //			System.out.println("TODO openglsurfaceavaluator.mapgrid2f output_triangles");
+      //            System.out.println("TODO openglsurfaceavaluator.mapgrid2f output_triangles");
     } else {
       gl.glMapGrid2d(nu, u0, u1, nv, v0, v1);
     }
@@ -159,7 +159,7 @@ class GL2SurfaceEvaluator implements SurfaceEvaluator {
    */
   public void mapmesh2f(int style, int umin, int umax, int vmin, int vmax) {
     if (output_triangles) {
-      //			System.out.println("TODO openglsurfaceavaluator.mapmesh2f output_triangles");
+      //            System.out.println("TODO openglsurfaceavaluator.mapmesh2f output_triangles");
     } else {
       /* //DEBUG - draw control points
          this.poradi++;
@@ -199,7 +199,7 @@ class GL2SurfaceEvaluator implements SurfaceEvaluator {
                     float vlo, float vhi, int vstride, int vorder, CArrayOfFloats pts) {
     // TODO Auto-generated method stub
     if (output_triangles) {
-      //			System.out.println("TODO openglsurfaceevaluator.map2f output_triangles");
+      //            System.out.println("TODO openglsurfaceevaluator.map2f output_triangles");
     } else {
       gl.glMap2f(type, ulo, uhi, ustride, uorder, vlo, vhi, vstride,
                  vorder, pts.getArray(), pts.getPointer());
diff --git a/src/jogl/classes/jogamp/opengl/glu/gl2/nurbs/GLUgl2nurbsImpl.java b/src/jogl/classes/jogamp/opengl/glu/gl2/nurbs/GLUgl2nurbsImpl.java
index bd0eaf7..58b5654 100644
--- a/src/jogl/classes/jogamp/opengl/glu/gl2/nurbs/GLUgl2nurbsImpl.java
+++ b/src/jogl/classes/jogamp/opengl/glu/gl2/nurbs/GLUgl2nurbsImpl.java
@@ -442,7 +442,7 @@ public class GLUgl2nurbsImpl implements GLUnurbs {
 
     // TODO errval ??
     if (numTrims > 0) {
-      //				System.out.println("TODO glunurbs.do_endsurface - numtrims > 0");
+      //                System.out.println("TODO glunurbs.do_endsurface - numtrims > 0");
     }
 
     subdivider.beginQuilts(new GL2Backend());
@@ -461,7 +461,7 @@ public class GLUgl2nurbsImpl implements GLUnurbs {
    */
   public void do_endcurve() {
     // DONE
-    //			// System.out.println("do_endcurve");
+    //            // System.out.println("do_endcurve");
     if (inCurve <= 0) {
       do_nurbserror(7);
       return;
@@ -509,7 +509,7 @@ public class GLUgl2nurbsImpl implements GLUnurbs {
    */
   private void do_nurbserror(int i) {
     // TODO nurberror
-    //			System.out.println("TODO nurbserror " + i);
+    //            System.out.println("TODO nurbserror " + i);
   }
 
   /**
@@ -527,7 +527,7 @@ public class GLUgl2nurbsImpl implements GLUnurbs {
    */
   private void loadGLMatrices() {
     // TODO Auto-generated method stub
-    //			System.out.println("TODO glunurbs.loadGLMatrices");
+    //            System.out.println("TODO glunurbs.loadGLMatrices");
   }
 
   /**
@@ -783,7 +783,7 @@ public class GLUgl2nurbsImpl implements GLUnurbs {
     // DONE
     O_surface o_surface = new O_surface();
     // TODO nuid
-    //			System.out.println("TODO glunurbs.bgnsurface nuid");
+    //            System.out.println("TODO glunurbs.bgnsurface nuid");
     thread("do_bgnsurface", o_surface);
   }
 
@@ -800,7 +800,7 @@ public class GLUgl2nurbsImpl implements GLUnurbs {
    */
   private void endtrim() {
     // TODO Auto-generated method stub
-    //			System.out.println("TODO glunurbs.endtrim");
+    //            System.out.println("TODO glunurbs.endtrim");
   }
 
   /**
diff --git a/src/jogl/classes/jogamp/opengl/glu/nurbs/ArcSdirSorter.java b/src/jogl/classes/jogamp/opengl/glu/nurbs/ArcSdirSorter.java
index 0d04d4c..f4ad701 100644
--- a/src/jogl/classes/jogamp/opengl/glu/nurbs/ArcSdirSorter.java
+++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/ArcSdirSorter.java
@@ -47,7 +47,7 @@ public class ArcSdirSorter {
    */ 
   public ArcSdirSorter(Subdivider subdivider) {
     //TODO
-    //			System.out.println("TODO arcsdirsorter.constructor");
+    //            System.out.println("TODO arcsdirsorter.constructor");
   }
 
   /**
@@ -57,7 +57,7 @@ public class ArcSdirSorter {
    */
   public void qsort(CArrayOfArcs list, int count) {
     // TODO
-    //			System.out.println("TODO arcsdirsorter.qsort");
+    //            System.out.println("TODO arcsdirsorter.qsort");
   }
 
 }
diff --git a/src/jogl/classes/jogamp/opengl/glu/nurbs/ArcTdirSorter.java b/src/jogl/classes/jogamp/opengl/glu/nurbs/ArcTdirSorter.java
index bee98b8..be72c53 100644
--- a/src/jogl/classes/jogamp/opengl/glu/nurbs/ArcTdirSorter.java
+++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/ArcTdirSorter.java
@@ -46,7 +46,7 @@ public class ArcTdirSorter {
    */ 
   public ArcTdirSorter(Subdivider subdivider) {
     // TODO Auto-generated constructor stub
-    //			System.out.println("TODO arcTsorter.konstruktor");
+    //            System.out.println("TODO arcTsorter.konstruktor");
   }
   /**
    * Sorts list of arcs
@@ -55,6 +55,6 @@ public class ArcTdirSorter {
    */
   public void qsort(CArrayOfArcs list, int count) {
     // TODO Auto-generated method stub
-    //			System.out.println("TODO arcTsorter.qsort");
+    //            System.out.println("TODO arcTsorter.qsort");
   }
 }
diff --git a/src/jogl/classes/jogamp/opengl/glu/nurbs/ArcTesselator.java b/src/jogl/classes/jogamp/opengl/glu/nurbs/ArcTesselator.java
index 2e4d3eb..bd63114 100644
--- a/src/jogl/classes/jogamp/opengl/glu/nurbs/ArcTesselator.java
+++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/ArcTesselator.java
@@ -72,7 +72,7 @@ public class ArcTesselator {
    */
   public void pwl_right(Arc newright, float s, float t1, float t2, float f) {
     // TODO Auto-generated method stub
-    //			System.out.println("TODO arctesselator.pwl_right");
+    //            System.out.println("TODO arctesselator.pwl_right");
   }
 
   /**
@@ -85,6 +85,6 @@ public class ArcTesselator {
    */
   public void pwl_left(Arc newright, float s, float t2, float t1, float f) {
     // TODO Auto-generated method stub
-    //			System.out.println("TODO arctesselator.pwl_left");
+    //            System.out.println("TODO arctesselator.pwl_left");
   }
 }
diff --git a/src/jogl/classes/jogamp/opengl/glu/nurbs/Backend.java b/src/jogl/classes/jogamp/opengl/glu/nurbs/Backend.java
index 4959f80..610a195 100644
--- a/src/jogl/classes/jogamp/opengl/glu/nurbs/Backend.java
+++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/Backend.java
@@ -188,7 +188,7 @@ public abstract class Backend {
    * @param m step in v direction
    */
   public void surfmesh(int u, int v, int n, int m) {
-    //			System.out.println("TODO backend.surfmesh wireframequads");
+    //            System.out.println("TODO backend.surfmesh wireframequads");
     // TODO wireframequads
     surfaceEvaluator.mapmesh2f(NurbsConsts.N_MESHFILL, u, u + n, v, v + m);
   }
diff --git a/src/jogl/classes/jogamp/opengl/glu/nurbs/Curve.java b/src/jogl/classes/jogamp/opengl/glu/nurbs/Curve.java
index b0ff4e6..7867817 100644
--- a/src/jogl/classes/jogamp/opengl/glu/nurbs/Curve.java
+++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/Curve.java
@@ -135,7 +135,7 @@ public class Curve {
                             stride);
     }
     if (cullval == Subdivider.CULL_ACCEPT) {
-      //				System.out.println("TODO curve.Curve-cullval");
+      //                System.out.println("TODO curve.Curve-cullval");
       // mapdesc.xformCulling(ps,qs.get().order,qs.get().stride,cpts,stride);
     }
 
@@ -145,13 +145,13 @@ public class Curve {
     range[2] = range[1] - range[0];
     // TODO it is necessary to solve problem with "this" pointer here 
     if (range[0] != pta[0]) {
-      //				System.out.println("TODO curve.Curve-range0");
+      //                System.out.println("TODO curve.Curve-range0");
       // Curve lower=new Curve(this,pta,0);
       // lower.next=next;
       // this=lower;
     }
     if (range[1] != ptb[0]) {
-      //				System.out.println("TODO curve.Curve-range1");
+      //                System.out.println("TODO curve.Curve-range1");
       // Curve lower=new Curve(this,ptb,0);
     }
   }
@@ -162,7 +162,7 @@ public class Curve {
    */
   public int cullCheck() {
     if (cullval == Subdivider.CULL_ACCEPT) {
-      //				System.out.println("TODO curve.cullval");
+      //                System.out.println("TODO curve.cullval");
       // cullval=mapdesc.cullCheck(cpts,order,stride);
     }
     // TODO compute cullval and return the computed value
@@ -189,16 +189,16 @@ public class Curve {
       int val = 0;
       // mapdesc.project(spts,stride,tmp,tstride,order);
 
-      //				System.out.println("TODO curve.getsptepsize mapdesc.project");
+      //                System.out.println("TODO curve.getsptepsize mapdesc.project");
 
       if (val == 0) {
         setstepsize(mapdesc.maxrate);
       } else {
         float t = mapdesc.getProperty(NurbsConsts.N_PIXEL_TOLERANCE);
         if (mapdesc.isParametricDistanceSampling()) {
-          //						System.out.println("TODO curve.getstepsize - parametric");
+          //                        System.out.println("TODO curve.getstepsize - parametric");
         } else if (mapdesc.isPathLengthSampling()) {
-          //						System.out.println("TODO curve.getstepsize - pathlength");
+          //                        System.out.println("TODO curve.getstepsize - pathlength");
         } else {
           setstepsize(mapdesc.maxrate);
         }
diff --git a/src/jogl/classes/jogamp/opengl/glu/nurbs/DisplayList.java b/src/jogl/classes/jogamp/opengl/glu/nurbs/DisplayList.java
index 5c80ffd..d9d0126 100644
--- a/src/jogl/classes/jogamp/opengl/glu/nurbs/DisplayList.java
+++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/DisplayList.java
@@ -51,6 +51,6 @@ public class DisplayList {
    */
   public void append(Object src, Method m, Object arg) {
     // TODO Auto-generated method stub
-    //			System.out.println("TODO displaylist append");
+    //            System.out.println("TODO displaylist append");
   }
 }
diff --git a/src/jogl/classes/jogamp/opengl/glu/nurbs/Knotspec.java b/src/jogl/classes/jogamp/opengl/glu/nurbs/Knotspec.java
index 4f97b12..114832a 100644
--- a/src/jogl/classes/jogamp/opengl/glu/nurbs/Knotspec.java
+++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/Knotspec.java
@@ -366,7 +366,7 @@ public class Knotspec {
       break;
     default:
       // TODO break with copying in general case
-      //				System.out.println("TODO knotspec.pt_io_copy");
+      //                System.out.println("TODO knotspec.pt_io_copy");
       break;
     }
 
@@ -388,7 +388,7 @@ public class Knotspec {
         if (istransformed) {
           p.raisePointerBy(postoffset);
           for (CArrayOfFloats pend = new CArrayOfFloats(p.getArray(),
-							p.getPointer() + postwidth); p.getPointer() != pend
+                            p.getPointer() + postwidth); p.getPointer() != pend
                  .getPointer(); p.raisePointerBy(poststride))
             next.transform(p);
 
@@ -409,7 +409,7 @@ public class Knotspec {
         if (istransformed) {
           p.raisePointerBy(postoffset);
           for (CArrayOfFloats pend = new CArrayOfFloats(p.getArray(),
-							p.getPointer() + postwidth); p.getPointer() != pend
+                            p.getPointer() + postwidth); p.getPointer() != pend
                  .getPointer(); p.raisePointerBy(poststride)) {
             kspectotrans.insert(p);
           }
@@ -549,8 +549,8 @@ public class Knotspec {
                                 * z.getRelative(0)));
       break;
     default:
-      //no need of default - see previous method and its case statement				
-      //				System.out.println("TODO pt_oo_sum default");
+      //no need of default - see previous method and its case statement                
+      //                System.out.println("TODO pt_oo_sum default");
       break;
     }
   }
diff --git a/src/jogl/classes/jogamp/opengl/glu/nurbs/Knotvector.java b/src/jogl/classes/jogamp/opengl/glu/nurbs/Knotvector.java
index 89389de..aac4dfc 100644
--- a/src/jogl/classes/jogamp/opengl/glu/nurbs/Knotvector.java
+++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/Knotvector.java
@@ -160,7 +160,7 @@ public class Knotvector {
    */
   public void show(String msg) {
     // TODO Auto-generated method stub
-    //			System.out.println("TODO knotvector.show");
+    //            System.out.println("TODO knotvector.show");
 
   }
 
diff --git a/src/jogl/classes/jogamp/opengl/glu/nurbs/Mapdesc.java b/src/jogl/classes/jogamp/opengl/glu/nurbs/Mapdesc.java
index 8fab114..bd5d2db 100644
--- a/src/jogl/classes/jogamp/opengl/glu/nurbs/Mapdesc.java
+++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/Mapdesc.java
@@ -349,7 +349,7 @@ public class Mapdesc {
    */
   public float getProperty(int tag) {
     // TODO Auto-generated method stub
-    //			System.out.println("TODO mapdesc.getproperty");
+    //            System.out.println("TODO mapdesc.getproperty");
     return 0;
   }
 
@@ -428,10 +428,10 @@ public class Mapdesc {
    * @param outstride output number of control points' coordinates
    */
   private void xFormMat(float[][] mat, CArrayOfFloats pts, int order,
-			int stride, float[] cp, int outstride) {
+            int stride, float[] cp, int outstride) {
     // TODO Auto-generated method stub
 
-    //		System.out.println("TODO mapdsc.xformmat ; change cp from float[] to carrayoffloats");
+    //        System.out.println("TODO mapdsc.xformmat ; change cp from float[] to carrayoffloats");
 
     if (isrational > 0) {
 
diff --git a/src/jogl/classes/jogamp/opengl/glu/nurbs/Patch.java b/src/jogl/classes/jogamp/opengl/glu/nurbs/Patch.java
index 51c43fc..a44f245 100644
--- a/src/jogl/classes/jogamp/opengl/glu/nurbs/Patch.java
+++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/Patch.java
@@ -49,6 +49,6 @@ public class Patch {
    * @param patch
    */
   public Patch(Quilt q, float[] pta, float[] ptb, Patch patch) {
-    //			System.out.println("TODO patch.constructor");
+    //            System.out.println("TODO patch.constructor");
   }
 }
diff --git a/src/jogl/classes/jogamp/opengl/glu/nurbs/Patchlist.java b/src/jogl/classes/jogamp/opengl/glu/nurbs/Patchlist.java
index f60a0cc..f1e499a 100644
--- a/src/jogl/classes/jogamp/opengl/glu/nurbs/Patchlist.java
+++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/Patchlist.java
@@ -82,7 +82,7 @@ public class Patchlist {
    */
   public Patchlist(Patchlist patchlist, int param, float mid) {
     // TODO Auto-generated constructor stub
-    //			System.out.println("TODO patchlist.konstruktor 2");
+    //            System.out.println("TODO patchlist.konstruktor 2");
   }
 
   /**
@@ -91,7 +91,7 @@ public class Patchlist {
    */
   public int cullCheck() {
     // TODO Auto-generated method stub
-    //			System.out.println("TODO patchlist.cullcheck");
+    //            System.out.println("TODO patchlist.cullcheck");
     return 0;
   }
 
@@ -99,7 +99,7 @@ public class Patchlist {
    * Empty method
    */
   public void getstepsize() {
-    //			System.out.println("TODO patchlist.getsptepsize");
+    //            System.out.println("TODO patchlist.getsptepsize");
     // TODO Auto-generated method stub
 
   }
@@ -110,7 +110,7 @@ public class Patchlist {
    */
   public boolean needsSamplingSubdivision() {
     // TODO Auto-generated method stub
-    //			System.out.println("patchlist.needsSamplingSubdivision");
+    //            System.out.println("patchlist.needsSamplingSubdivision");
     return false;
   }
 
@@ -121,7 +121,7 @@ public class Patchlist {
    */
   public boolean needsSubdivision(int i) {
     // TODO Auto-generated method stub
-    //			System.out.println("TODO patchlist.needsSubdivision");
+    //            System.out.println("TODO patchlist.needsSubdivision");
     return false;
   }
 
@@ -131,7 +131,7 @@ public class Patchlist {
    */
   public boolean needsNonSamplingSubdivision() {
     // TODO Auto-generated method stub
-    //			System.out.println("TODO patchlist.needsNonSamplingSubdivision");
+    //            System.out.println("TODO patchlist.needsNonSamplingSubdivision");
     return false;
   }
 
@@ -140,6 +140,6 @@ public class Patchlist {
    */
   public void bbox() {
     // TODO Auto-generated method stub
-    //			System.out.println("TODO patchlist.bbox");
+    //            System.out.println("TODO patchlist.bbox");
   }
 }
diff --git a/src/jogl/classes/jogamp/opengl/glu/nurbs/Quilt.java b/src/jogl/classes/jogamp/opengl/glu/nurbs/Quilt.java
index 6d732a4..6bea492 100644
--- a/src/jogl/classes/jogamp/opengl/glu/nurbs/Quilt.java
+++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/Quilt.java
@@ -248,7 +248,7 @@ public class Quilt {
    */
   public int isCulled() {
     if (mapdesc.isCulling()) {
-      //				System.out.println("TODO quilt.isculled mapdesc.isculling");
+      //                System.out.println("TODO quilt.isculled mapdesc.isculling");
       return 0;
     } else {
       return Subdivider.CULL_ACCEPT;
@@ -277,6 +277,6 @@ public class Quilt {
    */
   public void findRates(Flist sbrkpts, Flist tbrkpts, float[] rate) {
     // TODO Auto-generated method stub
-    //			System.out.println("TODO quilt.findrates");
+    //            System.out.println("TODO quilt.findrates");
   }
 }
diff --git a/src/jogl/classes/jogamp/opengl/glu/nurbs/README.txt b/src/jogl/classes/jogamp/opengl/glu/nurbs/README.txt
index 89630c7..7f80e56 100644
--- a/src/jogl/classes/jogamp/opengl/glu/nurbs/README.txt
+++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/README.txt
@@ -1,59 +1,59 @@
 Unimplemented functionality
-	- tesselation and callbacks
-	- trimming
-	- setting NURBS properties (-> sampling etc.)
+    - tesselation and callbacks
+    - trimming
+    - setting NURBS properties (-> sampling etc.)
 Differences from C++ source
-	- no pooling
-	- pointers to arrays are replaced by CArrayOf... classes and their methods
+    - no pooling
+    - pointers to arrays are replaced by CArrayOf... classes and their methods
 Unimplemented or incomplete "calltree top" methods (according to glu.def in Mesa 6.5)
-	gluBeginTrim
-	gluDeleteNurbsRenderer - won't be needed
-	gluEndTrim
-	gluGetNurbsProperty
-	gluLoadSamplingMatrices
-	gluNurbsCallback
-	gluNurbsCallbackData
-	gluNurbsCallbackDataEXT
-	gluNurbsCurve - TODO type switch
-	gluNurbsProperty
-	gluPwlCurve
-	gluQuadricCallback - not a NURBS method
+    gluBeginTrim
+    gluDeleteNurbsRenderer - won't be needed
+    gluEndTrim
+    gluGetNurbsProperty
+    gluLoadSamplingMatrices
+    gluNurbsCallback
+    gluNurbsCallbackData
+    gluNurbsCallbackDataEXT
+    gluNurbsCurve - TODO type switch
+    gluNurbsProperty
+    gluPwlCurve
+    gluQuadricCallback - not a NURBS method
 As of files
-	- Arc[ST]dirSorter.java - unimplemented (part of tesselation)
-	- Backend.java:194 - wireframe quads - part of tesselation/callback
-	- Curve.java:141-204 - culling
-	- DisplayList.java:57 - append to DL - not sure whether it will be needed
-	- GLUnurbs.java	:443,484 - error values
-			:445 - trimming
-			:512 - error handling (callback)
-			:530 - loadGLmatrices
-			:786 - nuid - nurbs object id - won't be needed I think
-			:803 - end trim
-	- GLUwNURBS.java:68,176 - NUBRS properties
-	- Knotspec.java	:371 - copying in general case (more than 4 coords)
-			:517 - copying with more than 4 coords
-			:556 - pt_oo_sum default
-	- Knotvector.java:165 - show method (probably debugging)
-	- Mapdesc.java	:354 - get property
-			:435 - xFormMat - change param cp to CArrayOfFloats; probably sampling functionality
-	- Maplist.java:68 - clear ?
-	- OpenGLCurveEvaluator.java	:132 - tess./callback code
-					:168 - mapgrid1f
-					:190 - tess./callback code (output triangles)
-	- OpenGLSurfaceEvaluator.java	:77 . tess./callback code
-					:81 - glGetIntegerValue
-					:114 - tess./callback code
-					:117 - Level of detail
-					:144,161,201 - tess./callback code - output triangles
-	- Patch.java:55 - constructor stuff ?
-	- Patchlist.java:55 - constructor stuff ?
-			:97 - cull check
-			:105 - step size
-			:115 - need of sampling subdivision
-			:126 - need of subdivision
-			:137 - need of non sampling subd.
-			:146 - bbox (??)
-	-Quilt.java	:254 - culling
-			:282 - rates
-	-Subdivider.java - all TODOs - it's stuff about trimming probably
-			 :545 - jumpbuffer - not sure purpose it exactly served in original source
+    - Arc[ST]dirSorter.java - unimplemented (part of tesselation)
+    - Backend.java:194 - wireframe quads - part of tesselation/callback
+    - Curve.java:141-204 - culling
+    - DisplayList.java:57 - append to DL - not sure whether it will be needed
+    - GLUnurbs.java    :443,484 - error values
+            :445 - trimming
+            :512 - error handling (callback)
+            :530 - loadGLmatrices
+            :786 - nuid - nurbs object id - won't be needed I think
+            :803 - end trim
+    - GLUwNURBS.java:68,176 - NUBRS properties
+    - Knotspec.java    :371 - copying in general case (more than 4 coords)
+            :517 - copying with more than 4 coords
+            :556 - pt_oo_sum default
+    - Knotvector.java:165 - show method (probably debugging)
+    - Mapdesc.java    :354 - get property
+            :435 - xFormMat - change param cp to CArrayOfFloats; probably sampling functionality
+    - Maplist.java:68 - clear ?
+    - OpenGLCurveEvaluator.java    :132 - tess./callback code
+                    :168 - mapgrid1f
+                    :190 - tess./callback code (output triangles)
+    - OpenGLSurfaceEvaluator.java    :77 . tess./callback code
+                    :81 - glGetIntegerValue
+                    :114 - tess./callback code
+                    :117 - Level of detail
+                    :144,161,201 - tess./callback code - output triangles
+    - Patch.java:55 - constructor stuff ?
+    - Patchlist.java:55 - constructor stuff ?
+            :97 - cull check
+            :105 - step size
+            :115 - need of sampling subdivision
+            :126 - need of subdivision
+            :137 - need of non sampling subd.
+            :146 - bbox (??)
+    -Quilt.java    :254 - culling
+            :282 - rates
+    -Subdivider.java - all TODOs - it's stuff about trimming probably
+             :545 - jumpbuffer - not sure purpose it exactly served in original source
diff --git a/src/jogl/classes/jogamp/opengl/glu/nurbs/Subdivider.java b/src/jogl/classes/jogamp/opengl/glu/nurbs/Subdivider.java
index 3378dba..37774f8 100644
--- a/src/jogl/classes/jogamp/opengl/glu/nurbs/Subdivider.java
+++ b/src/jogl/classes/jogamp/opengl/glu/nurbs/Subdivider.java
@@ -187,7 +187,7 @@ public class Subdivider {
     renderhints.init();
 
     if (qlist == null) {
-      //				System.out.println("qlist is null");
+      //                System.out.println("qlist is null");
       return;
     }
 
@@ -217,7 +217,7 @@ public class Subdivider {
     } else {
       float[] rate = new float[2];
       qlist.findRates(spbrkpts, tpbrkpts, rate);
-      //				System.out.println("subdivider.drawsurfaces decompose");
+      //                System.out.println("subdivider.drawsurfaces decompose");
     }
 
     backend.bgnsurf(renderhints.wiretris, renderhints.wirequads);
@@ -268,7 +268,7 @@ public class Subdivider {
    */
   private void freejarcs(Bin initialbin2) {
     // TODO Auto-generated method stub
-    //			System.out.println("TODO subdivider.freejarcs");
+    //            System.out.println("TODO subdivider.freejarcs");
   }
 
   /**
@@ -319,7 +319,7 @@ public class Subdivider {
         }
       }
     } else{
-      //				System.out.println("Source is empty - subdivider.splitins");
+      //                System.out.println("Source is empty - subdivider.splitins");
     }
   }
 
@@ -331,7 +331,7 @@ public class Subdivider {
    */
   private void splitInT(Bin source, int start, int end) {
     // TODO Auto-generated method stub
-    //			System.out.println("TODO subdivider.splitint");
+    //            System.out.println("TODO subdivider.splitint");
 
     if (source.isnonempty()) {
       if (start != end) {
@@ -485,7 +485,7 @@ public class Subdivider {
    */
   private void monosplitInS(Bin source, int start, int end) {
     // TODO Auto-generated method stub
-    //			System.out.println("TODO subdivider.monosplitins");
+    //            System.out.println("TODO subdivider.monosplitins");
   }
 
   /**
@@ -494,7 +494,7 @@ public class Subdivider {
    */
   private void findIrregularS(Bin source) {
     // TODO Auto-generated method stub
-    //			System.out.println("TODO subdivider.findIrregularS");
+    //            System.out.println("TODO subdivider.findIrregularS");
   }
 
   /**
@@ -502,7 +502,7 @@ public class Subdivider {
    */
   private void setArcTypePwl() {
     // TODO Auto-generated method stub
-    //			System.out.println("TODO subdivider.setarctypepwl");
+    //            System.out.println("TODO subdivider.setarctypepwl");
   }
 
   /**
@@ -512,7 +512,7 @@ public class Subdivider {
    */
   private void tesselation(Bin source, Patchlist patchlist) {
     // TODO Auto-generated method stub
-    //			System.out.println("TODO subdivider.tesselation");
+    //            System.out.println("TODO subdivider.tesselation");
   }
 
   /**
@@ -520,7 +520,7 @@ public class Subdivider {
    */
   private void setDegenerate() {
     // TODO Auto-generated method stub
-    //			System.out.println("TODO subdivider.setdegenerate");
+    //            System.out.println("TODO subdivider.setdegenerate");
   }
 
   /**
@@ -611,7 +611,7 @@ public class Subdivider {
    */
   private void join_t(Bin left, Bin right, Arc arc, Arc relative) {
     // TODO Auto-generated method stub
-    //			System.out.println("TODO subdivider.join_t");
+    //            System.out.println("TODO subdivider.join_t");
   }
 
   /**
@@ -621,7 +621,7 @@ public class Subdivider {
    */
   private void check_t(Arc arc, Arc relative) {
     // TODO Auto-generated method stub
-    //			System.out.println("TODO subdivider.check_t");
+    //            System.out.println("TODO subdivider.check_t");
   }
 
   /**
@@ -670,7 +670,7 @@ public class Subdivider {
    */
   private void link(Arc jarc1, Arc jarc2, Arc newright, Arc newleft) {
     // TODO Auto-generated method stub
-    //			System.out.println("TODO subdivider.link");
+    //            System.out.println("TODO subdivider.link");
   }
 
   /**
@@ -679,7 +679,7 @@ public class Subdivider {
    */
   private boolean isBezierArcType() {
     // TODO Auto-generated method stub
-    //			System.out.println("TODO subdivider.isbezierarc");
+    //            System.out.println("TODO subdivider.isbezierarc");
     return true;
   }
 
@@ -690,7 +690,7 @@ public class Subdivider {
    */
   private void simplelink(Arc jarc1, Arc jarc2) {
     // TODO Auto-generated method stub
-    //			System.out.println("TODO subdivider.simplelink");
+    //            System.out.println("TODO subdivider.simplelink");
   }
 
   /**
@@ -700,7 +700,7 @@ public class Subdivider {
    */
   private void check_s(Arc arc, Arc relative) {
     // TODO Auto-generated method stub
-    //			System.out.println("TODO subdivider.check_s");
+    //            System.out.println("TODO subdivider.check_s");
 
   }
 
@@ -756,7 +756,7 @@ public class Subdivider {
       } else {
         if (hdiff > 0) {
           // TODO rest
-          //						System.out.println("TODO subdivider.partition rest of else");
+          //                        System.out.println("TODO subdivider.partition rest of else");
         } else if (hdiff == 0) {
           tailonleft.addarc(jarc);
         } else {
@@ -788,7 +788,7 @@ public class Subdivider {
   private void classify_tailonright_t(Bin tailonright, Bin intersections,
                                       Bin right, float value) {
     // TODO Auto-generated method stub
-    //			System.out.println("TODO subdivider.classify_tailonright_t");
+    //            System.out.println("TODO subdivider.classify_tailonright_t");
 
   }
 
@@ -862,7 +862,7 @@ public class Subdivider {
    */
   private boolean ccwTurn_sr(Arc prev, Arc j) {
     // TODO Auto-generated method stub
-    //			System.out.println("TODO ccwTurn_sr");
+    //            System.out.println("TODO ccwTurn_sr");
     return false;
   }
 
@@ -876,7 +876,7 @@ public class Subdivider {
   private void classify_headonright_t(Bin headonright, Bin intersections,
                                       Bin right, float value) {
     // TODO Auto-generated method stub
-    //			System.out.println("TODO subdivider.classify_headonright_t");
+    //            System.out.println("TODO subdivider.classify_headonright_t");
   }
 
   /**
@@ -889,7 +889,7 @@ public class Subdivider {
   private void classify_tailonleft_t(Bin tailonleft, Bin intersections,
                                      Bin left, float value) {
     // TODO Auto-generated method stub
-    //			System.out.println("TODO subdivider.classify_tailonleft_t");
+    //            System.out.println("TODO subdivider.classify_tailonleft_t");
   }
 
   /**
@@ -930,7 +930,7 @@ public class Subdivider {
    */
   private boolean ccwTurn_tl(Arc prev, Arc j) {
     // TODO Auto-generated method stub
-    //			System.out.println("TODO subdivider.ccwTurn_tl");
+    //            System.out.println("TODO subdivider.ccwTurn_tl");
     return false;
   }
 
@@ -1004,7 +1004,7 @@ public class Subdivider {
    */
   private boolean ccwTurn_sl(Arc prev, Arc j) {
     // TODO Auto-generated method stub
-    //			System.out.println("TODO subdivider.ccwTurn_sl");
+    //            System.out.println("TODO subdivider.ccwTurn_sl");
     return false;
   }
 
@@ -1018,7 +1018,7 @@ public class Subdivider {
    */
   private int arc_split(Arc jarc, int param, float value, int i) {
     // TODO Auto-generated method stub
-    //			System.out.println("TODO subdivider.arc_split");
+    //            System.out.println("TODO subdivider.arc_split");
     return 0;
   }
 
@@ -1045,7 +1045,7 @@ public class Subdivider {
    */
   private void outline(Bin source) {
     // TODO Auto-generated method stub
-    //			System.out.println("TODO subdivider.outline");
+    //            System.out.println("TODO subdivider.outline");
   }
 
   /**
@@ -1128,7 +1128,7 @@ public class Subdivider {
 
     if (curvelist.needsSamplingSubdivision() && (subdivisions > 0)) {
       // TODO kód
-      //				System.out.println("TODO subdivider-needsSamplingSubdivision");
+      //                System.out.println("TODO subdivider-needsSamplingSubdivision");
     } else {
       int nu = (int) (1 + curvelist.range[2] / curvelist.stepsize);
       backend.curvgrid(curvelist.range[0], curvelist.range[1], nu);
diff --git a/src/jogl/classes/jogamp/opengl/glu/tessellator/ActiveRegion.java b/src/jogl/classes/jogamp/opengl/glu/tessellator/ActiveRegion.java
index 13c226a..17f5830 100644
--- a/src/jogl/classes/jogamp/opengl/glu/tessellator/ActiveRegion.java
+++ b/src/jogl/classes/jogamp/opengl/glu/tessellator/ActiveRegion.java
@@ -54,16 +54,16 @@ package jogamp.opengl.glu.tessellator;
 
 
 class ActiveRegion {
-    GLUhalfEdge eUp;		/* upper edge, directed right to left */
-    DictNode nodeUp;	/* dictionary node corresponding to eUp */
-    int windingNumber;	/* used to determine which regions are
+    GLUhalfEdge eUp;        /* upper edge, directed right to left */
+    DictNode nodeUp;    /* dictionary node corresponding to eUp */
+    int windingNumber;    /* used to determine which regions are
                                  * inside the polygon */
-    boolean inside;		/* is this region inside the polygon? */
-    boolean sentinel;	/* marks fake edges at t = +/-infinity */
-    boolean dirty;		/* marks regions where the upper or lower
+    boolean inside;        /* is this region inside the polygon? */
+    boolean sentinel;    /* marks fake edges at t = +/-infinity */
+    boolean dirty;        /* marks regions where the upper or lower
                                  * edge has changed, but we haven't checked
                                  * whether they intersect yet */
-    boolean fixUpperEdge;	/* marks temporary edges introduced when
+    boolean fixUpperEdge;    /* marks temporary edges introduced when
                                  * we process a "right vertex" (one without
                                  * any edges leaving to the right) */
 }
diff --git a/src/jogl/classes/jogamp/opengl/glu/tessellator/GLUface.java b/src/jogl/classes/jogamp/opengl/glu/tessellator/GLUface.java
index b15bf71..892722d 100644
--- a/src/jogl/classes/jogamp/opengl/glu/tessellator/GLUface.java
+++ b/src/jogl/classes/jogamp/opengl/glu/tessellator/GLUface.java
@@ -53,13 +53,13 @@
 package jogamp.opengl.glu.tessellator;
 
 class GLUface {
-    public GLUface next;		/* next face (never NULL) */
-    public GLUface prev;		/* previous face (never NULL) */
-    public GLUhalfEdge anEdge;	/* a half edge with this left face */
-    public Object data;		/* room for client's data */
+    public GLUface next;        /* next face (never NULL) */
+    public GLUface prev;        /* previous face (never NULL) */
+    public GLUhalfEdge anEdge;    /* a half edge with this left face */
+    public Object data;        /* room for client's data */
 
     /* Internal data (keep hidden) */
-    public GLUface trail;		/* "stack" for conversion to strips */
-    public boolean marked;		/* flag for conversion to strips */
-    public boolean inside;		/* this face is in the polygon interior */
+    public GLUface trail;        /* "stack" for conversion to strips */
+    public boolean marked;        /* flag for conversion to strips */
+    public boolean inside;        /* this face is in the polygon interior */
 }
diff --git a/src/jogl/classes/jogamp/opengl/glu/tessellator/GLUhalfEdge.java b/src/jogl/classes/jogamp/opengl/glu/tessellator/GLUhalfEdge.java
index 385a438..29944f9 100644
--- a/src/jogl/classes/jogamp/opengl/glu/tessellator/GLUhalfEdge.java
+++ b/src/jogl/classes/jogamp/opengl/glu/tessellator/GLUhalfEdge.java
@@ -53,16 +53,16 @@
 package jogamp.opengl.glu.tessellator;
 
 class GLUhalfEdge {
-    public GLUhalfEdge next;		/* doubly-linked list (prev==Sym->next) */
-    public GLUhalfEdge Sym;		/* same edge, opposite direction */
-    public GLUhalfEdge Onext;		/* next edge CCW around origin */
-    public GLUhalfEdge Lnext;		/* next edge CCW around left face */
-    public GLUvertex Org;		/* origin vertex (Overtex too long) */
-    public jogamp.opengl.glu.tessellator.GLUface Lface;		/* left face */
+    public GLUhalfEdge next;        /* doubly-linked list (prev==Sym->next) */
+    public GLUhalfEdge Sym;        /* same edge, opposite direction */
+    public GLUhalfEdge Onext;        /* next edge CCW around origin */
+    public GLUhalfEdge Lnext;        /* next edge CCW around left face */
+    public GLUvertex Org;        /* origin vertex (Overtex too long) */
+    public jogamp.opengl.glu.tessellator.GLUface Lface;        /* left face */
 
     /* Internal data (keep hidden) */
-    public jogamp.opengl.glu.tessellator.ActiveRegion activeRegion;	/* a region with this upper edge (sweep.c) */
-    public int winding;	/* change in winding number when crossing */
+    public jogamp.opengl.glu.tessellator.ActiveRegion activeRegion;    /* a region with this upper edge (sweep.c) */
+    public int winding;    /* change in winding number when crossing */
     public boolean first;
 
     public GLUhalfEdge(boolean first) {
diff --git a/src/jogl/classes/jogamp/opengl/glu/tessellator/GLUmesh.java b/src/jogl/classes/jogamp/opengl/glu/tessellator/GLUmesh.java
index dfdf5be..10af743 100644
--- a/src/jogl/classes/jogamp/opengl/glu/tessellator/GLUmesh.java
+++ b/src/jogl/classes/jogamp/opengl/glu/tessellator/GLUmesh.java
@@ -53,8 +53,8 @@
 package jogamp.opengl.glu.tessellator;
 
 class GLUmesh {
-    GLUvertex vHead = new GLUvertex();		/* dummy header for vertex list */
-    jogamp.opengl.glu.tessellator.GLUface fHead = new GLUface();		/* dummy header for face list */
-    jogamp.opengl.glu.tessellator.GLUhalfEdge eHead = new GLUhalfEdge(true);		/* dummy header for edge list */
-    jogamp.opengl.glu.tessellator.GLUhalfEdge eHeadSym = new GLUhalfEdge(false);	/* and its symmetric counterpart */
+    GLUvertex vHead = new GLUvertex();        /* dummy header for vertex list */
+    jogamp.opengl.glu.tessellator.GLUface fHead = new GLUface();        /* dummy header for face list */
+    jogamp.opengl.glu.tessellator.GLUhalfEdge eHead = new GLUhalfEdge(true);        /* dummy header for edge list */
+    jogamp.opengl.glu.tessellator.GLUhalfEdge eHeadSym = new GLUhalfEdge(false);    /* and its symmetric counterpart */
 }
diff --git a/src/jogl/classes/jogamp/opengl/glu/tessellator/GLUtessellatorImpl.java b/src/jogl/classes/jogamp/opengl/glu/tessellator/GLUtessellatorImpl.java
index 182820b..d594cb3 100644
--- a/src/jogl/classes/jogamp/opengl/glu/tessellator/GLUtessellatorImpl.java
+++ b/src/jogl/classes/jogamp/opengl/glu/tessellator/GLUtessellatorImpl.java
@@ -59,32 +59,32 @@ import javax.media.opengl.glu.*;
 public class GLUtessellatorImpl implements GLUtessellator {
     public static final int TESS_MAX_CACHE = 100;
 
-    private int state;		/* what begin/end calls have we seen? */
+    private int state;        /* what begin/end calls have we seen? */
 
-    private GLUhalfEdge lastEdge;	/* lastEdge->Org is the most recent vertex */
-    GLUmesh mesh;		/* stores the input contours, and eventually
+    private GLUhalfEdge lastEdge;    /* lastEdge->Org is the most recent vertex */
+    GLUmesh mesh;        /* stores the input contours, and eventually
                                    the tessellation itself */
 
     /*** state needed for projecting onto the sweep plane ***/
 
-    double[] normal = new double[3];	/* user-specified normal (if provided) */
-    double[] sUnit = new double[3];	/* unit vector in s-direction (debugging) */
-    double[] tUnit = new double[3];	/* unit vector in t-direction (debugging) */
+    double[] normal = new double[3];    /* user-specified normal (if provided) */
+    double[] sUnit = new double[3];    /* unit vector in s-direction (debugging) */
+    double[] tUnit = new double[3];    /* unit vector in t-direction (debugging) */
 
     /*** state needed for the line sweep ***/
 
-    private double relTolerance;	/* tolerance for merging features */
-    int windingRule;	/* rule for determining polygon interior */
-    boolean fatalError;	/* fatal error: needed combine callback */
+    private double relTolerance;    /* tolerance for merging features */
+    int windingRule;    /* rule for determining polygon interior */
+    boolean fatalError;    /* fatal error: needed combine callback */
 
-    Dict dict;		/* edge dictionary for sweep line */
-    PriorityQ pq;		/* priority queue of vertex events */
-    GLUvertex event;		/* current sweep event being processed */
+    Dict dict;        /* edge dictionary for sweep line */
+    PriorityQ pq;        /* priority queue of vertex events */
+    GLUvertex event;        /* current sweep event being processed */
 
     /*** state needed for rendering callbacks (see render.c) ***/
 
-    boolean flagBoundary;	/* mark boundary edges (use EdgeFlag) */
-    boolean boundaryOnly;	/* Extract contours, not triangles */
+    boolean flagBoundary;    /* mark boundary edges (use EdgeFlag) */
+    boolean boundaryOnly;    /* Extract contours, not triangles */
     boolean avoidDegenerateTris; /* JOGL-specific hint to try to improve triangulation
                                     by avoiding producing degenerate (zero-area) triangles;
                                     has not been tested exhaustively and is therefore an option */
@@ -96,12 +96,12 @@ public class GLUtessellatorImpl implements GLUtessellator {
 
     /*** state needed to cache single-contour polygons for renderCache() */
 
-    private boolean flushCacheOnNextVertex;		/* empty cache on next vertex() call */
-    int cacheCount;		/* number of cached vertices */
-    CachedVertex[] cache = new CachedVertex[TESS_MAX_CACHE];	/* the vertex data */
+    private boolean flushCacheOnNextVertex;        /* empty cache on next vertex() call */
+    int cacheCount;        /* number of cached vertices */
+    CachedVertex[] cache = new CachedVertex[TESS_MAX_CACHE];    /* the vertex data */
 
     /*** rendering callbacks that also pass polygon data  ***/
-    private Object polygonData;		/* client data for current polygon */
+    private Object polygonData;        /* client data for current polygon */
 
     private GLUtessellatorCallback callBegin;
     private GLUtessellatorCallback callEdgeFlag;
@@ -120,10 +120,10 @@ public class GLUtessellatorImpl implements GLUtessellator {
     private GLUtessellatorCallback callCombineData;
 
     private static final double GLU_TESS_DEFAULT_TOLERANCE = 0.0;
-//    private static final int GLU_TESS_MESH = 100112;	/* void (*)(GLUmesh *mesh)	    */
+//    private static final int GLU_TESS_MESH = 100112;    /* void (*)(GLUmesh *mesh)        */
     private static GLUtessellatorCallback NULL_CB = new GLUtessellatorCallbackAdapter();
 
-//    #define MAX_FAST_ALLOC	(MAX(sizeof(EdgePair), \
+//    #define MAX_FAST_ALLOC    (MAX(sizeof(EdgePair), \
 //                 MAX(sizeof(GLUvertex),sizeof(GLUface))))
 
     private GLUtessellatorImpl() {
@@ -220,7 +220,7 @@ public class GLUtessellatorImpl implements GLUtessellator {
 
             case GLU.GLU_TESS_WINDING_RULE:
                 int windingRule = (int) value;
-                if (windingRule != value) break;	/* not an integer */
+                if (windingRule != value) break;    /* not an integer */
 
                 switch (windingRule) {
                     case GLU.GLU_TESS_WINDING_ODD:
@@ -523,7 +523,7 @@ public class GLUtessellatorImpl implements GLUtessellator {
  * Each interior region is guaranteed be monotone.
  */
             if (!Sweep.__gl_computeInterior(this)) {
-                throw new RuntimeException();	/* could've used a label */
+                throw new RuntimeException();    /* could've used a label */
             }
 
             mesh = this.mesh;
@@ -539,7 +539,7 @@ public class GLUtessellatorImpl implements GLUtessellator {
                 } else {
                     rc = TessMono.__gl_meshTessellateInterior(mesh, avoidDegenerateTris);
                 }
-                if (!rc) throw new RuntimeException();	/* could've used a label */
+                if (!rc) throw new RuntimeException();    /* could've used a label */
 
                 Mesh.__gl_meshCheckMesh(mesh);
 
@@ -552,7 +552,7 @@ public class GLUtessellatorImpl implements GLUtessellator {
                     if (boundaryOnly) {
                         Render.__gl_renderBoundary(this, mesh);  /* output boundary contours */
                     } else {
-                        Render.__gl_renderMesh(this, mesh);	   /* output strips and fans */
+                        Render.__gl_renderMesh(this, mesh);       /* output strips and fans */
                     }
                 }
 //                if (callMesh != NULL_CB) {
@@ -564,7 +564,7 @@ public class GLUtessellatorImpl implements GLUtessellator {
 //                 * faces in the first place.
 //                 */
 //                    TessMono.__gl_meshDiscardExterior(mesh);
-//                    callMesh.mesh(mesh);		/* user wants the mesh itself */
+//                    callMesh.mesh(mesh);        /* user wants the mesh itself */
 //                    mesh = null;
 //                    polygonData = null;
 //                    return;
diff --git a/src/jogl/classes/jogamp/opengl/glu/tessellator/GLUvertex.java b/src/jogl/classes/jogamp/opengl/glu/tessellator/GLUvertex.java
index c30d759..ecc91c2 100644
--- a/src/jogl/classes/jogamp/opengl/glu/tessellator/GLUvertex.java
+++ b/src/jogl/classes/jogamp/opengl/glu/tessellator/GLUvertex.java
@@ -53,13 +53,13 @@
 package jogamp.opengl.glu.tessellator;
 
 class GLUvertex {
-    public GLUvertex next;		/* next vertex (never NULL) */
-    public GLUvertex prev;		/* previous vertex (never NULL) */
-    public jogamp.opengl.glu.tessellator.GLUhalfEdge anEdge;	/* a half-edge with this origin */
-    public Object data;		/* client's data */
+    public GLUvertex next;        /* next vertex (never NULL) */
+    public GLUvertex prev;        /* previous vertex (never NULL) */
+    public jogamp.opengl.glu.tessellator.GLUhalfEdge anEdge;    /* a half-edge with this origin */
+    public Object data;        /* client's data */
 
     /* Internal data (keep hidden) */
-    public double[] coords = new double[3];	/* vertex location in 3D */
-    public double s, t;		/* projection onto the sweep plane */
-    public int pqHandle;	/* to allow deletion from priority queue */
+    public double[] coords = new double[3];    /* vertex location in 3D */
+    public double s, t;        /* projection onto the sweep plane */
+    public int pqHandle;    /* to allow deletion from priority queue */
 }
diff --git a/src/jogl/classes/jogamp/opengl/glu/tessellator/Mesh.java b/src/jogl/classes/jogamp/opengl/glu/tessellator/Mesh.java
index 942dfe8..eb48aa5 100644
--- a/src/jogl/classes/jogamp/opengl/glu/tessellator/Mesh.java
+++ b/src/jogl/classes/jogamp/opengl/glu/tessellator/Mesh.java
@@ -281,8 +281,8 @@ class Mesh {
 
 /* __gl_meshSplice( eOrg, eDst ) is the basic operation for changing the
  * mesh connectivity and topology.  It changes the mesh so that
- *	eOrg->Onext <- OLD( eDst->Onext )
- *	eDst->Onext <- OLD( eOrg->Onext )
+ *    eOrg->Onext <- OLD( eDst->Onext )
+ *    eDst->Onext <- OLD( eOrg->Onext )
  * where OLD(...) means the value before the meshSplice operation.
  *
  * This can have two effects on the vertex structure:
@@ -453,9 +453,9 @@ class Mesh {
 
         /* Set the vertex and face information */
         eOrg.Sym.Org = eNew.Org;
-        eNew.Sym.Org.anEdge = eNew.Sym;	/* may have pointed to eOrg.Sym */
+        eNew.Sym.Org.anEdge = eNew.Sym;    /* may have pointed to eOrg.Sym */
         eNew.Sym.Lface = eOrg.Sym.Lface;
-        eNew.winding = eOrg.winding;	/* copy old winding information */
+        eNew.winding = eOrg.winding;    /* copy old winding information */
         eNew.Sym.winding = eOrg.Sym.winding;
 
         return eNew;
diff --git a/src/jogl/classes/jogamp/opengl/glu/tessellator/Normal.java b/src/jogl/classes/jogamp/opengl/glu/tessellator/Normal.java
index 7d5acd9..196e6cf 100644
--- a/src/jogl/classes/jogamp/opengl/glu/tessellator/Normal.java
+++ b/src/jogl/classes/jogamp/opengl/glu/tessellator/Normal.java
@@ -60,7 +60,7 @@ class Normal {
     }
 
     static boolean SLANTED_SWEEP = false;
-    static double S_UNIT_X;	/* Pre-normalized */
+    static double S_UNIT_X;    /* Pre-normalized */
     static double S_UNIT_Y;
     private static final boolean TRUE_PROJECT = false;
 
@@ -75,7 +75,7 @@ class Normal {
  * direction to be something unusual (ie. not parallel to one of the
  * coordinate axes).
  */
-            S_UNIT_X = 0.50941539564955385;	/* Pre-normalized */
+            S_UNIT_X = 0.50941539564955385;    /* Pre-normalized */
             S_UNIT_Y = 0.86052074622010633;
         } else {
             S_UNIT_X = 1.0;
diff --git a/src/jogl/classes/jogamp/opengl/glu/tessellator/PriorityQHeap.java b/src/jogl/classes/jogamp/opengl/glu/tessellator/PriorityQHeap.java
index 899df2e..474056c 100644
--- a/src/jogl/classes/jogamp/opengl/glu/tessellator/PriorityQHeap.java
+++ b/src/jogl/classes/jogamp/opengl/glu/tessellator/PriorityQHeap.java
@@ -76,7 +76,7 @@ class PriorityQHeap extends jogamp.opengl.glu.tessellator.PriorityQ {
         freeList = 0;
         this.leq = leq;
 
-        nodes[1].handle = 1;	/* so that Minimum() returns NULL */
+        nodes[1].handle = 1;    /* so that Minimum() returns NULL */
         handles[1].key = null;
     }
 
@@ -171,7 +171,7 @@ class PriorityQHeap extends jogamp.opengl.glu.tessellator.PriorityQ {
             }
             nodes = pqNodes;
             if (nodes == null) {
-                nodes = saveNodes;	/* restore ptr to free upon return */
+                nodes = saveNodes;    /* restore ptr to free upon return */
                 return Integer.MAX_VALUE;
             }
 
diff --git a/src/jogl/classes/jogamp/opengl/glu/tessellator/PriorityQSort.java b/src/jogl/classes/jogamp/opengl/glu/tessellator/PriorityQSort.java
index f37f98a..f9e0225 100644
--- a/src/jogl/classes/jogamp/opengl/glu/tessellator/PriorityQSort.java
+++ b/src/jogl/classes/jogamp/opengl/glu/tessellator/PriorityQSort.java
@@ -152,7 +152,7 @@ class PriorityQSort extends jogamp.opengl.glu.tessellator.PriorityQ {
                     } while (LT(leq, keys[order[j]], keys[piv]));
                     Swap(order, i, j);
                 } while (i < j);
-                Swap(order, i, j);	/* Undo last swap */
+                Swap(order, i, j);    /* Undo last swap */
                 if (i - p < r - j) {
                     stack[top].p = j + 1;
                     stack[top].r = r;
@@ -176,7 +176,7 @@ class PriorityQSort extends jogamp.opengl.glu.tessellator.PriorityQ {
         }
         max = size;
         initialized = true;
-        heap.pqInit();	/* always succeeds */
+        heap.pqInit();    /* always succeeds */
 
 /*        #ifndef NDEBUG
         p = order;
@@ -208,7 +208,7 @@ class PriorityQSort extends jogamp.opengl.glu.tessellator.PriorityQ {
             System.arraycopy( keys, 0, pqKeys, 0, keys.length );
             keys = pqKeys;
             if (keys == null) {
-                keys = saveKey;	/* restore ptr to free upon return */
+                keys = saveKey;    /* restore ptr to free upon return */
                 return Integer.MAX_VALUE;
             }
         }
diff --git a/src/jogl/classes/jogamp/opengl/glu/tessellator/Render.java b/src/jogl/classes/jogamp/opengl/glu/tessellator/Render.java
index 34b7ee5..1801e1c 100644
--- a/src/jogl/classes/jogamp/opengl/glu/tessellator/Render.java
+++ b/src/jogl/classes/jogamp/opengl/glu/tessellator/Render.java
@@ -79,8 +79,8 @@ class Render {
             this.render = render;
         }
 
-        long size;		/* number of triangles used */
-        jogamp.opengl.glu.tessellator.GLUhalfEdge eStart;	/* edge where this primitive starts */
+        long size;        /* number of triangles used */
+        jogamp.opengl.glu.tessellator.GLUhalfEdge eStart;    /* edge where this primitive starts */
         renderCallBack render;
     };
 
@@ -295,7 +295,7 @@ class Render {
          */
         jogamp.opengl.glu.tessellator.GLUhalfEdge e;
         int newState;
-        int edgeState = -1;	/* force edge state output for first vertex */
+        int edgeState = -1;    /* force edge state output for first vertex */
 
         tess.callBeginOrBeginData(GL.GL_TRIANGLES);
 
diff --git a/src/jogl/classes/jogamp/opengl/glu/tessellator/Sweep.java b/src/jogl/classes/jogamp/opengl/glu/tessellator/Sweep.java
index 95eb5dd..b4a400c 100644
--- a/src/jogl/classes/jogamp/opengl/glu/tessellator/Sweep.java
+++ b/src/jogl/classes/jogamp/opengl/glu/tessellator/Sweep.java
@@ -300,7 +300,7 @@ class Sweep {
         regPrev = regFirst;
         ePrev = regFirst.eUp;
         while (regPrev != regLast) {
-            regPrev.fixUpperEdge = false;	/* placement was OK */
+            regPrev.fixUpperEdge = false;    /* placement was OK */
             reg = RegionBelow(regPrev);
             e = reg.eUp;
             if (e.Org != ePrev.Org) {
@@ -327,7 +327,7 @@ class Sweep {
                 if (!Mesh.__gl_meshSplice(e.Sym.Lnext, e)) throw new RuntimeException();
                 if (!Mesh.__gl_meshSplice(ePrev, e)) throw new RuntimeException();
             }
-            FinishRegion(tess, regPrev);	/* may change reg.eUp */
+            FinishRegion(tess, regPrev);    /* may change reg.eUp */
             ePrev = reg.eUp;
             regPrev = reg;
         }
@@ -627,11 +627,11 @@ class Sweep {
         assert (orgUp != tess.event && orgLo != tess.event);
         assert (!regUp.fixUpperEdge && !regLo.fixUpperEdge);
 
-        if (orgUp == orgLo) return false;	/* right endpoints are the same */
+        if (orgUp == orgLo) return false;    /* right endpoints are the same */
 
         tMinUp = Math.min(orgUp.t, dstUp.t);
         tMaxLo = Math.max(orgLo.t, dstLo.t);
-        if (tMinUp > tMaxLo) return false;	/* t ranges do not overlap */
+        if (tMinUp > tMaxLo) return false;    /* t ranges do not overlap */
 
         if (Geom.VertLeq(orgUp, orgLo)) {
             if (Geom.EdgeSign(dstLo, orgUp, orgLo) > 0) return false;
@@ -743,7 +743,7 @@ class Sweep {
         eUp.Org.t = isect.t;
         eUp.Org.pqHandle = tess.pq.pqInsert(eUp.Org); /* __gl_pqSortInsert */
         if (eUp.Org.pqHandle == Long.MAX_VALUE) {
-            tess.pq.pqDeletePriorityQ();	/* __gl_pqSortDeletePriorityQ */
+            tess.pq.pqDeletePriorityQ();    /* __gl_pqSortDeletePriorityQ */
             tess.pq = null;
             throw new RuntimeException();
         }
@@ -959,7 +959,7 @@ class Sweep {
                 regUp.fixUpperEdge = false;
             }
             if (!Mesh.__gl_meshSplice(vEvent.anEdge, e)) throw new RuntimeException();
-            SweepEvent(tess, vEvent);	/* recurse */
+            SweepEvent(tess, vEvent);    /* recurse */
             return;
         }
 
@@ -1001,9 +1001,9 @@ class Sweep {
  *
  * - the degenerate case: if vEvent is close enough to U or L, we
  *   merge vEvent into that edge chain.  The subcases are:
- *	- merging with the rightmost vertex of U or L
- *	- merging with the active edge of U or L
- *	- merging with an already-processed portion of U or L
+ *    - merging with the rightmost vertex of U or L
+ *    - merging with the active edge of U or L
+ *    - merging with an already-processed portion of U or L
  */ {
         ActiveRegion regUp, regLo, reg;
         GLUhalfEdge eUp, eLo, eNew;
@@ -1063,7 +1063,7 @@ class Sweep {
         ActiveRegion regUp, reg;
         GLUhalfEdge e, eTopLeft, eBottomLeft;
 
-        tess.event = vEvent;		/* for access in EdgeLeq() */
+        tess.event = vEvent;        /* for access in EdgeLeq() */
         DebugEvent(tess);
 
         /* Check if this vertex is the right endpoint of an edge that is
@@ -1130,7 +1130,7 @@ class Sweep {
         e.Org.t = t;
         e.Sym.Org.s = -SENTINEL_COORD;
         e.Sym.Org.t = t;
-        tess.event = e.Sym.Org;		/* initialize it */
+        tess.event = e.Sym.Org;        /* initialize it */
 
         reg.eUp = e;
         reg.windingNumber = 0;
@@ -1180,7 +1180,7 @@ class Sweep {
             DeleteRegion(tess, reg);
 /*    __gl_meshDelete( reg.eUp );*/
         }
-        Dict.dictDeleteDict(tess.dict);	/* __gl_dictListDeleteDict */
+        Dict.dictDeleteDict(tess.dict);    /* __gl_dictListDeleteDict */
     }
 
 
@@ -1199,7 +1199,7 @@ class Sweep {
             if (Geom.VertEq(e.Org, e.Sym.Org) && e.Lnext.Lnext != e) {
                 /* Zero-length edge, contour has at least 3 edges */
 
-                SpliceMergeVertices(tess, eLnext, e);	/* deletes e.Org */
+                SpliceMergeVertices(tess, eLnext, e);    /* deletes e.Org */
                 if (!Mesh.__gl_meshDelete(e)) throw new RuntimeException(); /* e is a self-loop */
                 e = eLnext;
                 eLnext = e.Lnext;
@@ -1243,7 +1243,7 @@ class Sweep {
             if (v.pqHandle == Long.MAX_VALUE) break;
         }
         if (v != vHead || !pq.pqInit()) { /* __gl_pqSortInit */
-            tess.pq.pqDeletePriorityQ();	/* __gl_pqSortDeletePriorityQ */
+            tess.pq.pqDeletePriorityQ();    /* __gl_pqSortDeletePriorityQ */
             tess.pq = null;
             return false;
         }
@@ -1306,7 +1306,7 @@ class Sweep {
          * all the vertices in a priority queue.  Events are processed in
          * lexicographic order, ie.
          *
-         *	e1 < e2  iff  e1.x < e2.x || (e1.x == e2.x && e1.y < e2.y)
+         *    e1 < e2  iff  e1.x < e2.x || (e1.x == e2.x && e1.y < e2.y)
          */
         RemoveDegenerateEdges(tess);
         if (!InitPriorityQ(tess)) return false; /* if error */
diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java
index 0858897..6d6b79b 100644
--- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java
+++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java
@@ -49,9 +49,9 @@ import com.jogamp.gluegen.runtime.ProcAddressTable;
 import com.jogamp.gluegen.runtime.opengl.GLProcAddressResolver;
 
 public abstract class MacOSXCGLContext extends GLContextImpl
-{	
+{    
   protected boolean isNSContext;
-  private CGLExt cglExt;
+  private CGLExt _cglExt;
   // Table that holds the addresses of the native C-language entry points for
   // CGL extension functions.
   private CGLExtProcAddressTable cglExtProcAddressTable;
@@ -61,6 +61,13 @@ public abstract class MacOSXCGLContext extends GLContextImpl
     super(drawable, shareWith);
   }
   
+  @Override
+  protected void resetStates() {
+    isNSContext = false;
+    // no inner state _cglExt = null;
+    super.resetStates();
+  }
+
   public Object getPlatformGLExtensions() {
     return getCGLExt();
   }
@@ -68,10 +75,10 @@ public abstract class MacOSXCGLContext extends GLContextImpl
   protected boolean isNSContext() { return isNSContext; }
 
   public CGLExt getCGLExt() {
-    if (cglExt == null) {
-      cglExt = new CGLExtImpl(this);
+    if (_cglExt == null) {
+      _cglExt = new CGLExtImpl(this);
     }
-    return cglExt;
+    return _cglExt;
   }
 
   public final ProcAddressTable getPlatformExtProcAddressTable() {
@@ -82,9 +89,9 @@ public abstract class MacOSXCGLContext extends GLContextImpl
     return cglExtProcAddressTable;
   }
 
-  protected Map/*<String, String>*/ getFunctionNameMap() { return null; }
+  protected Map<String, String> getFunctionNameMap() { return null; }
 
-  protected Map/*<String, String>*/ getExtensionNameMap() { return null; }
+  protected Map<String, String> getExtensionNameMap() { return null; }
 
   protected long createContextARBImpl(long share, boolean direct, int ctp, int major, int minor) {
       return 0; // FIXME
@@ -136,6 +143,7 @@ public abstract class MacOSXCGLContext extends GLContextImpl
       contextHandle = CGL.createContext(share,
                                     drawable.getHandle(),
                                     pixelFormat,
+                                    capabilities.isBackgroundOpaque(),
                                     viewNotReady, 0);
       if (contextHandle == 0) {
         if (viewNotReady[0] == 1) {
@@ -154,6 +162,7 @@ public abstract class MacOSXCGLContext extends GLContextImpl
       }
 
       GLCapabilitiesImmutable caps = MacOSXCGLGraphicsConfiguration.NSPixelFormat2GLCapabilities(glProfile, pixelFormat);
+      caps = GLGraphicsConfigurationUtil.fixOpaqueGLCapabilities(caps, capabilities.isBackgroundOpaque());
       config.setChosenCapabilities(caps);
     } finally {
       CGL.deletePixelFormat(pixelFormat);
@@ -162,7 +171,7 @@ public abstract class MacOSXCGLContext extends GLContextImpl
       throw new GLException("Error making Context (NS) current");
     }
     isNSContext = true;
-    setGLFunctionAvailability(true, 0, 0, CTX_PROFILE_COMPAT|CTX_OPTION_ANY);
+    setGLFunctionAvailability(true, true, 0, 0, CTX_PROFILE_COMPAT|CTX_OPTION_ANY);
     GLContextShareSet.contextCreated(this);
     return true;
   }
@@ -178,7 +187,7 @@ public abstract class MacOSXCGLContext extends GLContextImpl
         }
     }
   }
-	
+    
   protected void releaseImpl() throws GLException {
     if ( isNSContext ) {
         if (!CGL.clearCurrentContext(contextHandle)) {
@@ -188,7 +197,7 @@ public abstract class MacOSXCGLContext extends GLContextImpl
         CGL.CGLReleaseContext(contextHandle);
     }
   }
-	
+    
   protected void destroyImpl() throws GLException {
     if ( !isNSContext ) {
       if (CGL.kCGLNoError != CGL.CGLDestroyContext(contextHandle)) {
@@ -224,18 +233,18 @@ public abstract class MacOSXCGLContext extends GLContextImpl
   }
 
   protected final void updateGLXProcAddressTable() {
-    AbstractGraphicsConfiguration aconfig = drawable.getNativeSurface().getGraphicsConfiguration().getNativeGraphicsConfiguration();
-    AbstractGraphicsDevice adevice = aconfig.getScreen().getDevice();
-    String key = adevice.getUniqueID();
+    final AbstractGraphicsConfiguration aconfig = drawable.getNativeSurface().getGraphicsConfiguration().getNativeGraphicsConfiguration();
+    final AbstractGraphicsDevice adevice = aconfig.getScreen().getDevice();
+    final String key = "MacOSX-"+adevice.getUniqueID();
     if (DEBUG) {
       System.err.println(getThreadName() + ": !!! Initializing CGL extension address table: "+key);
     }
-    CGLExtProcAddressTable table = null;
+    ProcAddressTable table = null;
     synchronized(mappedContextTypeObjectLock) {
-        table = (CGLExtProcAddressTable) mappedGLXProcAddress.get( key );
+        table = mappedGLXProcAddress.get( key );
     }
     if(null != table) {
-        cglExtProcAddressTable = table;
+        cglExtProcAddressTable = (CGLExtProcAddressTable) table;
         if(DEBUG) {
             System.err.println(getThreadName() + ": !!! GLContext CGL ProcAddressTable reusing key("+key+") -> "+table.hashCode());
         }
@@ -254,12 +263,11 @@ public abstract class MacOSXCGLContext extends GLContextImpl
         }
     }
   }
-	
-  public String getPlatformExtensionsString()
-  {
-    return "";
+    
+  protected final StringBuffer getPlatformExtensionsStringImpl() {
+    return new StringBuffer();
   }
-	
+    
   protected void swapBuffers() {
     DefaultGraphicsConfiguration config = (DefaultGraphicsConfiguration) drawable.getNativeSurface().getGraphicsConfiguration().getNativeGraphicsConfiguration();
     GLCapabilitiesImmutable caps = (GLCapabilitiesImmutable)config.getChosenCapabilities();
diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawableFactory.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawableFactory.java
index 6ce7934..9023245 100644
--- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawableFactory.java
+++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawableFactory.java
@@ -116,9 +116,14 @@ public class MacOSXCGLDrawableFactory extends GLDrawableFactoryImpl {
       return false;
   }
 
+  public final boolean getWasSharedContextCreated(AbstractGraphicsDevice device) {
+      // FIXME: not implemented .. needs a dummy OSX surface
+      return false;
+  }
+  
   protected final GLContext getOrCreateSharedContextImpl(AbstractGraphicsDevice device) {
-        // FIXME: not implemented .. needs a dummy OSX surface
-        return null;
+      // FIXME: not implemented .. needs a dummy OSX surface
+      return null;
   }
 
   protected AbstractGraphicsDevice getOrCreateSharedDeviceImpl(AbstractGraphicsDevice device) {
@@ -127,8 +132,8 @@ public class MacOSXCGLDrawableFactory extends GLDrawableFactoryImpl {
 
   protected final void shutdownInstance() {}
 
-  protected List/*GLCapabilitiesImmutable*/ getAvailableCapabilitiesImpl(AbstractGraphicsDevice device) {
-      return new ArrayList(0);
+  protected List<GLCapabilitiesImmutable> getAvailableCapabilitiesImpl(AbstractGraphicsDevice device) {
+      return new ArrayList<GLCapabilitiesImmutable>(0);
   }
 
   protected GLDrawableImpl createOnscreenDrawableImpl(NativeSurface target) {
diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDynamicLibraryBundleInfo.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDynamicLibraryBundleInfo.java
index 94d790c..a5d3579 100644
--- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDynamicLibraryBundleInfo.java
+++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDynamicLibraryBundleInfo.java
@@ -29,32 +29,23 @@
 package jogamp.opengl.macosx.cgl;
 
 import jogamp.opengl.*;
-import com.jogamp.common.os.DynamicLookupHelper;
-import com.jogamp.common.os.NativeLibrary;
-import com.jogamp.common.os.Platform;
 import java.util.*;
-import java.security.*;
-import javax.media.opengl.GLException;
 
 public class MacOSXCGLDynamicLibraryBundleInfo extends DesktopGLDynamicLibraryBundleInfo  {
     protected MacOSXCGLDynamicLibraryBundleInfo() {
         super();
     }
 
-    public List getToolLibNames() {
-        List/*<List>*/ libNamesList = new ArrayList();
-
-        List/*<String>*/ glesLibNames = new ArrayList();
-
-        glesLibNames.add("/System/Library/Frameworks/OpenGL.framework/Libraries/libGL.dylib");
-        glesLibNames.add("GL");
-
-        libNamesList.add(glesLibNames);
-
-        return libNamesList;
+    public List<List<String>> getToolLibNames() {
+        final List<List<String>> libsList = new ArrayList<List<String>>();
+        final List<String> libsGL = new ArrayList<String>();
+        libsGL.add("/System/Library/Frameworks/OpenGL.framework/Libraries/libGL.dylib");
+        libsGL.add("GL");
+        libsList.add(libsGL);        
+        return libsList;
     }
-
-    public final List getToolGetProcAddressFuncNameList() {
+    
+    public final List<String> getToolGetProcAddressFuncNameList() {
         return null; 
         /** OSX manual says: NSImage use is discouraged
         List res = new ArrayList();
@@ -62,7 +53,7 @@ public class MacOSXCGLDynamicLibraryBundleInfo extends DesktopGLDynamicLibraryBu
         return res; */
     }
 
-    public final long toolDynamicLookupFunction(long toolGetProcAddressHandle, String funcName) {
+    public final long toolGetProcAddress(long toolGetProcAddressHandle, String funcName) {
         return 0;
         /** OSX manual says: NSImage use is discouraged
             return CGL.getProcAddress(glFuncName); // manual implementation 
diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXExternalCGLContext.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXExternalCGLContext.java
index 6303f2e..4786725 100644
--- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXExternalCGLContext.java
+++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXExternalCGLContext.java
@@ -55,7 +55,7 @@ public class MacOSXExternalCGLContext extends MacOSXCGLContext {
     this.isNSContext = isNSContext;
     this.contextHandle = handle;
     GLContextShareSet.contextCreated(this);
-    setGLFunctionAvailability(false, 0, 0, CTX_PROFILE_COMPAT|CTX_OPTION_ANY);
+    setGLFunctionAvailability(false, true, 0, 0, CTX_PROFILE_COMPAT|CTX_OPTION_ANY);
     getGLStateTracker().setEnabled(false); // external context usage can't track state in Java
   }
 
diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXOffscreenCGLContext.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXOffscreenCGLContext.java
index 6dba110..949963f 100644
--- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXOffscreenCGLContext.java
+++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXOffscreenCGLContext.java
@@ -48,7 +48,7 @@ public class MacOSXOffscreenCGLContext extends MacOSXPbufferCGLContext
                                   GLContext shareWith) {
     super(drawable, shareWith);
   }
-	
+    
   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;
diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXPbufferCGLContext.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXPbufferCGLContext.java
index 6eda3f0..75b5450 100644
--- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXPbufferCGLContext.java
+++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXPbufferCGLContext.java
@@ -138,7 +138,7 @@ public class MacOSXPbufferCGLContext extends MacOSXCGLContext {
     DefaultGraphicsConfiguration config = (DefaultGraphicsConfiguration) drawable.getNativeSurface().getGraphicsConfiguration().getNativeGraphicsConfiguration();
     GLCapabilitiesImmutable capabilities = (GLCapabilitiesImmutable)config.getChosenCapabilities();
     if (capabilities.getPbufferFloatingPointBuffers() &&
-	!isTigerOrLater) {
+    !isTigerOrLater) {
       throw new GLException("Floating-point pbuffers supported only on OS X 10.4 or later");
     }
     // Change our OpenGL mode to match that of any share context before we create ourselves
@@ -156,7 +156,7 @@ public class MacOSXPbufferCGLContext extends MacOSXCGLContext {
     if(!isNSContext()) { // FIXME: ??
         throw new GLException("Not a NS Context");
     }
-    setGLFunctionAvailability(true, 0, 0, CTX_PROFILE_COMPAT|CTX_OPTION_ANY);
+    setGLFunctionAvailability(true, true, 0, 0, CTX_PROFILE_COMPAT|CTX_OPTION_ANY);
     return true;
   }
 
diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/awt/MacOSXJava2DCGLContext.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/awt/MacOSXJava2DCGLContext.java
index c5372bb..8f64e0a 100644
--- a/src/jogl/classes/jogamp/opengl/macosx/cgl/awt/MacOSXJava2DCGLContext.java
+++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/awt/MacOSXJava2DCGLContext.java
@@ -104,7 +104,7 @@ public class MacOSXJava2DCGLContext extends MacOSXCGLContext implements Java2DGL
     if (ctx == 0) {
       return false;
     }
-    setGLFunctionAvailability(true, 0, 0, CTX_PROFILE_COMPAT|CTX_OPTION_ANY); // use GL_VERSION
+    setGLFunctionAvailability(true, true, 0, 0, CTX_PROFILE_COMPAT|CTX_OPTION_ANY); // use GL_VERSION
     // FIXME: think about GLContext sharing
     contextHandle = ctx;
     isNSContext = true;
diff --git a/src/jogl/classes/jogamp/opengl/util/GLArrayHandler.java b/src/jogl/classes/jogamp/opengl/util/GLArrayHandler.java
new file mode 100644
index 0000000..4a570d3
--- /dev/null
+++ b/src/jogl/classes/jogamp/opengl/util/GLArrayHandler.java
@@ -0,0 +1,69 @@
+/**
+ * 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.util;
+
+import javax.media.opengl.*;
+
+/**
+ * Handles consistency of buffer data and array state.
+ * Implementations shall consider buffer types (VBO, ..), interleaved, etc.
+ * They also need to consider array state types, i.e. fixed function or GLSL.
+ */
+public interface GLArrayHandler {
+
+  /**
+   * Implementation shall associate the data with the array
+   * and synchronize the data with the GPU.
+   * 
+   * @param gl current GL object
+   * @param enable true if array data shall be valid, otherwise false.
+   * @param ext extension object allowing passing of an implementation detail 
+   */
+  public void syncData(GL gl, boolean enable, Object ext);
+  
+  /**
+   * Implementation shall enable or disable the array state.
+   * 
+   * @param gl current GL object
+   * @param enable true if array shall be enabled, otherwise false.
+   * @param ext extension object allowing passing of an implementation detail 
+   */
+  public void enableState(GL gl, boolean enable, Object ext);
+  
+  /**
+   * Supporting interleaved arrays, where sub handlers may handle 
+   * the array state and the <i>master</i> handler the buffer consistency.
+   *   
+   * @param handler the sub handler
+   * @throws UnsupportedOperationException if this array handler does not support interleaved arrays
+   */
+  public void addSubHandler(GLArrayHandler handler) throws UnsupportedOperationException;
+
+}
+
diff --git a/src/jogl/classes/jogamp/opengl/util/GLArrayHandlerInterleaved.java b/src/jogl/classes/jogamp/opengl/util/GLArrayHandlerInterleaved.java
new file mode 100644
index 0000000..8e813a7
--- /dev/null
+++ b/src/jogl/classes/jogamp/opengl/util/GLArrayHandlerInterleaved.java
@@ -0,0 +1,92 @@
+/**
+ * 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.util;
+
+
+import java.nio.Buffer;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.media.opengl.GL;
+
+import com.jogamp.opengl.util.GLArrayDataEditable;
+
+/**
+ * Interleaved fixed function arrays, i.e. where this buffer data 
+ * represents many arrays. 
+ */
+public class GLArrayHandlerInterleaved implements GLArrayHandler {
+  private GLArrayDataEditable ad;
+  private List<GLArrayHandler> subArrays = new ArrayList<GLArrayHandler>();
+
+  public GLArrayHandlerInterleaved(GLArrayDataEditable ad) {
+    this.ad = ad;
+  }
+  
+  public final void addSubHandler(GLArrayHandler handler) {
+      subArrays.add(handler);
+  }
+
+  private final void syncSubData(GL gl, boolean enable, Object ext) {
+      for(int i=0; i<subArrays.size(); i++) {
+          subArrays.get(i).syncData(gl, enable, ext);
+      }      
+  }  
+  
+  public final void syncData(GL gl, boolean enable, Object ext) {
+    if(enable) {
+        final Buffer buffer = ad.getBuffer();
+
+        if(ad.isVBO()) {
+            // always bind and refresh the VBO mgr, 
+            // in case more than one gl*Pointer objects are in use
+            gl.glBindBuffer(ad.getVBOTarget(), ad.getVBOName());
+            if(!ad.isVBOWritten()) {
+                if(null!=buffer) {
+                    gl.glBufferData(ad.getVBOTarget(), buffer.limit() * ad.getComponentSizeInBytes(), buffer, ad.getVBOUsage());
+                }
+                ad.setVBOWritten(true);
+            }
+        }
+        syncSubData(gl, true, ext);
+    } else {
+        syncSubData(gl, false, ext);
+        if(ad.isVBO()) {
+            gl.glBindBuffer(ad.getVBOTarget(), 0);
+        }
+    }
+  }
+  
+  public final void enableState(GL gl, boolean enable, Object ext) {
+    for(int i=0; i<subArrays.size(); i++) {
+        subArrays.get(i).enableState(gl, enable, ext);
+    }      
+  }
+}
+
diff --git a/src/jogl/classes/jogamp/opengl/util/GLDataArrayHandler.java b/src/jogl/classes/jogamp/opengl/util/GLDataArrayHandler.java
new file mode 100644
index 0000000..c91d6c9
--- /dev/null
+++ b/src/jogl/classes/jogamp/opengl/util/GLDataArrayHandler.java
@@ -0,0 +1,78 @@
+/**
+ * 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.util;
+
+import javax.media.opengl.*;
+
+import com.jogamp.opengl.util.*;
+
+import java.nio.*;
+
+/**
+ * Used for pure VBO data arrays, i.e. where the buffer data 
+ * does not represents a specific array name. 
+ */
+public class GLDataArrayHandler implements GLArrayHandler {
+  private GLArrayDataEditable ad;
+
+  public GLDataArrayHandler(GLArrayDataEditable ad) {
+    this.ad = ad;
+  }
+
+  public final void addSubHandler(GLArrayHandler handler) {
+      throw new UnsupportedOperationException();
+  }
+  
+  public final void syncData(GL gl, boolean enable, Object ext) {
+    if(!ad.isVBO()) {
+        // makes no sense otherwise
+        throw new GLException("GLDataArrayHandler can only handle VBOs.");
+    }
+    if(enable) {
+        Buffer buffer = ad.getBuffer();
+
+        // always bind and refresh the VBO mgr, 
+        // in case more than one gl*Pointer objects are in use
+        gl.glBindBuffer(ad.getVBOTarget(), ad.getVBOName());
+        if(!ad.isVBOWritten()) {
+            if(null!=buffer) {
+                gl.glBufferData(ad.getVBOTarget(), buffer.limit() * ad.getComponentSizeInBytes(), buffer, ad.getVBOUsage());
+            }
+            ad.setVBOWritten(true);
+        }
+    } else {
+        gl.glBindBuffer(ad.getVBOTarget(), 0);
+    }      
+  }
+  
+  public final void enableState(GL gl, boolean enable, Object ext) { 
+      // no array association
+  }
+}
+
diff --git a/src/jogl/classes/jogamp/opengl/util/GLFixedArrayHandler.java b/src/jogl/classes/jogamp/opengl/util/GLFixedArrayHandler.java
new file mode 100644
index 0000000..8963b79
--- /dev/null
+++ b/src/jogl/classes/jogamp/opengl/util/GLFixedArrayHandler.java
@@ -0,0 +1,98 @@
+/**
+ * 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.util;
+
+import javax.media.opengl.*;
+import javax.media.opengl.fixedfunc.*;
+
+import com.jogamp.opengl.util.GLArrayDataEditable;
+
+import java.nio.*;
+
+/**
+ * Used for 1:1 fixed function arrays, i.e. where the buffer data 
+ * represents this array only. 
+ */
+public class GLFixedArrayHandler implements GLArrayHandler {
+  private GLArrayDataEditable ad;
+
+  public GLFixedArrayHandler(GLArrayDataEditable ad) {
+    this.ad = ad;
+  }
+
+  public final void addSubHandler(GLArrayHandler handler) {
+      throw new UnsupportedOperationException();
+  }
+  
+  public final void syncData(GL gl, boolean enable, Object ext) {
+    if(enable) {
+        final Buffer buffer = ad.getBuffer();
+        if(ad.isVBO()) {
+            // always bind and refresh the VBO mgr, 
+            // in case more than one gl*Pointer objects are in use
+            gl.glBindBuffer(ad.getVBOTarget(), ad.getVBOName());
+            if(!ad.isVBOWritten()) {
+                if(null!=buffer) {
+                    gl.glBufferData(ad.getVBOTarget(), buffer.limit() * ad.getComponentSizeInBytes(), buffer, ad.getVBOUsage());
+                }
+                ad.setVBOWritten(true);
+            }
+        }
+        final GLPointerFunc glp = gl.getGL2ES1();
+        switch(ad.getIndex()) {
+            case GLPointerFunc.GL_VERTEX_ARRAY:
+                glp.glVertexPointer(ad);
+                break;
+            case GLPointerFunc.GL_NORMAL_ARRAY:
+                glp.glNormalPointer(ad);
+                break;
+            case GLPointerFunc.GL_COLOR_ARRAY:
+                glp.glColorPointer(ad);
+                break;
+            case GLPointerFunc.GL_TEXTURE_COORD_ARRAY:
+                glp.glTexCoordPointer(ad);
+                break;
+            default:
+                throw new GLException("invalid glArrayIndex: "+ad.getIndex()+":\n\t"+ad); 
+        }
+    } else if(ad.isVBO()) {
+        gl.glBindBuffer(ad.getVBOTarget(), 0);
+    }
+  }
+  
+  public final void enableState(GL gl, boolean enable, Object ext) {
+    final GLPointerFunc glp = gl.getGL2ES1();
+    if(enable) {
+        glp.glEnableClientState(ad.getIndex());        
+    } else {
+        glp.glDisableClientState(ad.getIndex());
+    }
+  }
+}
+
diff --git a/src/jogl/classes/jogamp/opengl/util/GLFixedArrayHandlerFlat.java b/src/jogl/classes/jogamp/opengl/util/GLFixedArrayHandlerFlat.java
new file mode 100644
index 0000000..81c782d
--- /dev/null
+++ b/src/jogl/classes/jogamp/opengl/util/GLFixedArrayHandlerFlat.java
@@ -0,0 +1,83 @@
+/**
+ * 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 jogamp.opengl.util;
+
+import javax.media.opengl.GL;
+import javax.media.opengl.GLArrayData;
+import javax.media.opengl.GLException;
+import javax.media.opengl.fixedfunc.GLPointerFunc;
+
+
+/**
+ * Used for interleaved fixed function arrays, i.e. where the buffer data itself is handled 
+ * separately and interleaves many arrays.
+ */
+public class GLFixedArrayHandlerFlat implements GLArrayHandler {
+  private GLArrayData ad;
+
+  public GLFixedArrayHandlerFlat(GLArrayData ad) {
+    this.ad = ad;
+  }
+
+  public final void addSubHandler(GLArrayHandler handler) {
+      throw new UnsupportedOperationException();
+  }
+  
+  public final void syncData(GL gl, boolean enable, Object ext) {
+    if(enable) {
+        final GLPointerFunc glp = gl.getGL2ES1();
+        switch(ad.getIndex()) {
+            case GLPointerFunc.GL_VERTEX_ARRAY:
+                glp.glVertexPointer(ad);
+                break;
+            case GLPointerFunc.GL_NORMAL_ARRAY:
+                glp.glNormalPointer(ad);
+                break;
+            case GLPointerFunc.GL_COLOR_ARRAY:
+                glp.glColorPointer(ad);
+                break;
+            case GLPointerFunc.GL_TEXTURE_COORD_ARRAY:
+                glp.glTexCoordPointer(ad);
+                break;
+            default:
+                throw new GLException("invalid glArrayIndex: "+ad.getIndex()+":\n\t"+ad); 
+        }
+    }
+  }
+
+  public final void enableState(GL gl, boolean enable, Object ext) {
+    final GLPointerFunc glp = gl.getGL2ES1();
+    if(enable) {
+        glp.glEnableClientState(ad.getIndex());        
+    } else {
+        glp.glDisableClientState(ad.getIndex());
+    }
+  }
+}
+
diff --git a/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandler.java b/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandler.java
new file mode 100644
index 0000000..96bb02b
--- /dev/null
+++ b/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandler.java
@@ -0,0 +1,115 @@
+/**
+ * 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.util.glsl;
+
+import java.nio.Buffer;
+
+import javax.media.opengl.GL;
+import javax.media.opengl.GL2ES2;
+
+import jogamp.opengl.util.GLArrayHandler;
+
+import com.jogamp.opengl.util.GLArrayDataEditable;
+import com.jogamp.opengl.util.glsl.ShaderState;
+
+/**
+ * Used for 1:1 GLSL arrays, i.e. where the buffer data 
+ * represents this array only. 
+ */
+public class GLSLArrayHandler implements GLArrayHandler {
+  private GLArrayDataEditable ad;
+
+  public GLSLArrayHandler(GLArrayDataEditable ad) {
+    this.ad = ad;
+  }
+
+  public final void addSubHandler(GLArrayHandler handler) {
+      throw new UnsupportedOperationException();
+  }
+  
+  public final void syncData(GL gl, boolean enable, Object ext) {
+    final GL2ES2 glsl = gl.getGL2ES2();
+    final ShaderState st = (ShaderState) ext;
+    
+    if(enable) {
+        final Buffer buffer = ad.getBuffer();
+        /*
+         * This would be the non optimized code path:
+         * 
+        if(ad.isVBO()) {
+            glsl.glBindBuffer(ad.getVBOTarget(), ad.getVBOName());
+            if(!ad.isVBOWritten()) {
+                if(null!=buffer) {
+                    glsl.glBufferData(ad.getVBOTarget(), ad.getSizeInBytes(), buffer, ad.getVBOUsage());
+                }
+                ad.setVBOWritten(true);
+            }
+        }
+        st.vertexAttribPointer(glsl, ad);
+        */
+        if(ad.isVBO()) {
+            // bind and refresh the VBO / vertex-attr only if necessary
+            if(!ad.isVBOWritten()) {
+                glsl.glBindBuffer(ad.getVBOTarget(), ad.getVBOName());
+                if(null!=buffer) {
+                    glsl.glBufferData(ad.getVBOTarget(), ad.getSizeInBytes(), buffer, ad.getVBOUsage());
+                }
+                ad.setVBOWritten(true);
+                st.vertexAttribPointer(glsl, ad);
+            } else if(st.getAttribLocation(glsl, ad) >= 0) {
+                // didn't experience a performance hit on this query ..
+                // (using ShaderState's location query above to validate the location)
+                final int[] qi = new int[1];
+                glsl.glGetVertexAttribiv(ad.getLocation(), GL2ES2.GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING, qi, 0);
+                if(ad.getVBOName() != qi[0]) {
+                    glsl.glBindBuffer(ad.getVBOTarget(), ad.getVBOName());
+                    st.vertexAttribPointer(glsl, ad);
+                }
+            }
+        } else if(null!=buffer) {
+            st.vertexAttribPointer(glsl, ad);
+        }
+    } else if(ad.isVBO()) {
+        glsl.glBindBuffer(ad.getVBOTarget(), 0);
+    }      
+  }
+  
+  public final void enableState(GL gl, boolean enable, Object ext) {
+    final GL2ES2 glsl = gl.getGL2ES2();
+    final ShaderState st = (ShaderState) ext;
+    
+    if(enable) {
+        st.enableVertexAttribArray(glsl, ad);
+    } else {
+        st.disableVertexAttribArray(glsl, ad);
+    }
+  }
+
+}
+
diff --git a/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandlerFlat.java b/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandlerFlat.java
new file mode 100644
index 0000000..0d6da7b
--- /dev/null
+++ b/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandlerFlat.java
@@ -0,0 +1,72 @@
+/**
+ * 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 jogamp.opengl.util.glsl;
+
+import javax.media.opengl.GL;
+import javax.media.opengl.GL2ES2;
+import javax.media.opengl.GLArrayData;
+
+import jogamp.opengl.util.GLArrayHandler;
+
+import com.jogamp.opengl.util.glsl.ShaderState;
+
+/**
+ * Used for interleaved GLSL arrays, i.e. where the buffer data itself is handled 
+ * separately and interleaves many arrays.
+ */
+public class GLSLArrayHandlerFlat implements GLArrayHandler {
+  private GLArrayData ad;
+
+  public GLSLArrayHandlerFlat(GLArrayData ad) {
+    this.ad = ad;
+  }
+
+  public final void addSubHandler(GLArrayHandler handler) {
+      throw new UnsupportedOperationException();
+  }
+  
+  public final void syncData(GL gl, boolean enable, Object ext) {
+    final ShaderState st = (ShaderState) ext;
+    if(enable) {
+        st.vertexAttribPointer(gl.getGL2ES2(), ad);
+    }
+  }
+
+  public final void enableState(GL gl, boolean enable, Object ext) {
+    final GL2ES2 glsl = gl.getGL2ES2();
+    final ShaderState st = (ShaderState) ext;
+    
+    if(enable) {
+        st.enableVertexAttribArray(glsl, ad);
+    } else {
+        st.disableVertexAttribArray(glsl, ad);
+    }
+  }  
+}
+
diff --git a/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/FixedFuncHook.java b/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/FixedFuncHook.java
index 4e5afc6..fe4db89 100644
--- a/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/FixedFuncHook.java
+++ b/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/FixedFuncHook.java
@@ -1,5 +1,30 @@
 /*
  * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
+ * 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.util.glsl.fixedfunc;
@@ -214,15 +239,15 @@ public class FixedFuncHook implements GLLightingFunc, GLMatrixFunc, GLPointerFun
     }
 
     public void glVertexPointer(int size, int type, int stride, java.nio.Buffer pointer) {
-      glVertexPointer(GLArrayDataWrapper.createFixed(gl, GL_VERTEX_ARRAY, size, type, false, stride, pointer, 0, 0));
+      glVertexPointer(GLArrayDataWrapper.createFixed(GL_VERTEX_ARRAY, size, type, false, stride, pointer, 0, 0, 0, GL.GL_ARRAY_BUFFER));
     }
     public void glVertexPointer(int size, int type, int stride, long pointer_buffer_offset) {
       int vboName = gl.glGetBoundBuffer(GL.GL_ARRAY_BUFFER);
       if(vboName==0) {
         throw new GLException("no GL_ARRAY_BUFFER VBO bound");
       }
-      glVertexPointer(GLArrayDataWrapper.createFixed(gl, GL_VERTEX_ARRAY, size, type, false, 
-                                                     stride, null, vboName, pointer_buffer_offset));
+      glVertexPointer(GLArrayDataWrapper.createFixed(GL_VERTEX_ARRAY, size, type, false, stride, 
+                                                     null, vboName, pointer_buffer_offset, GL.GL_STATIC_DRAW, GL.GL_ARRAY_BUFFER));
     }
 
     public void glColorPointer(GLArrayData array) {
@@ -241,20 +266,20 @@ public class FixedFuncHook implements GLLightingFunc, GLMatrixFunc, GLPointerFun
       fixedFunction.glColorPointer(gl, array);
     }
     public void glColorPointer(int size, int type, int stride, java.nio.Buffer pointer) {
-      glColorPointer(GLArrayDataWrapper.createFixed(gl, GL_COLOR_ARRAY, size, type, false, 
-                                                    stride, pointer, 0, 0));
+      glColorPointer(GLArrayDataWrapper.createFixed(GL_COLOR_ARRAY, size, type, false, stride, 
+                                                    pointer, 0, 0, 0, GL.GL_ARRAY_BUFFER));
     }
     public void glColorPointer(int size, int type, int stride, long pointer_buffer_offset) {
       int vboName = gl.glGetBoundBuffer(GL.GL_ARRAY_BUFFER);
       if(vboName==0) {
         throw new GLException("no GL_ARRAY_BUFFER VBO bound");
       }
-      glColorPointer(GLArrayDataWrapper.createFixed(gl, GL_COLOR_ARRAY, size, type, false, 
-                                                   stride, null, vboName, pointer_buffer_offset));
+      glColorPointer(GLArrayDataWrapper.createFixed(GL_COLOR_ARRAY, size, type, false, stride, 
+                                                   null, vboName, pointer_buffer_offset, GL.GL_STATIC_DRAW, GL.GL_ARRAY_BUFFER));
     }
 
     public void glNormalPointer(GLArrayData array) {
-      if(array.getComponentNumber()!=3) {
+      if(array.getComponentCount()!=3) {
         throw new GLException("Only 3 components per normal allowed");
       }
       if(array.isVBO()) {
@@ -272,16 +297,16 @@ public class FixedFuncHook implements GLLightingFunc, GLMatrixFunc, GLPointerFun
       fixedFunction.glNormalPointer(gl, array);
     }
     public void glNormalPointer(int type, int stride, java.nio.Buffer pointer) {
-      glNormalPointer(GLArrayDataWrapper.createFixed(gl, GL_NORMAL_ARRAY, 3, type, false, 
-                                                     stride, pointer, 0, 0));
+      glNormalPointer(GLArrayDataWrapper.createFixed(GL_NORMAL_ARRAY, 3, type, false, stride, 
+                                                     pointer, 0, 0, 0, GL.GL_ARRAY_BUFFER));
     }
     public void glNormalPointer(int type, int stride, long pointer_buffer_offset) {
       int vboName = gl.glGetBoundBuffer(GL.GL_ARRAY_BUFFER);
       if(vboName==0) {
         throw new GLException("no GL_ARRAY_BUFFER VBO bound");
       }
-      glNormalPointer(GLArrayDataWrapper.createFixed(gl, GL_NORMAL_ARRAY, 3, type, false, 
-                                                     stride, null, vboName, pointer_buffer_offset));
+      glNormalPointer(GLArrayDataWrapper.createFixed(GL_NORMAL_ARRAY, 3, type, false, stride, 
+                                                     null, vboName, pointer_buffer_offset, GL.GL_STATIC_DRAW, GL.GL_ARRAY_BUFFER));
     }
 
     public void glTexCoordPointer(GLArrayData array) {
@@ -301,7 +326,7 @@ public class FixedFuncHook implements GLLightingFunc, GLMatrixFunc, GLPointerFun
     }
     public void glTexCoordPointer(int size, int type, int stride, java.nio.Buffer pointer) {
       glTexCoordPointer(
-        GLArrayDataWrapper.createFixed(gl, GL_TEXTURE_COORD_ARRAY, size, type, false, stride, pointer, 0,0));
+        GLArrayDataWrapper.createFixed(GL_TEXTURE_COORD_ARRAY, size, type, false, stride, pointer, 0, 0, 0, GL.GL_ARRAY_BUFFER));
     }
     public void glTexCoordPointer(int size, int type, int stride, long pointer_buffer_offset) {
       int vboName = gl.glGetBoundBuffer(GL.GL_ARRAY_BUFFER);
@@ -309,8 +334,8 @@ public class FixedFuncHook implements GLLightingFunc, GLMatrixFunc, GLPointerFun
         throw new GLException("no GL_ARRAY_BUFFER VBO bound");
       }
       glTexCoordPointer(
-        GLArrayDataWrapper.createFixed(gl, GL_TEXTURE_COORD_ARRAY, size, type, false, 
-                                       stride, null, vboName, pointer_buffer_offset) );
+        GLArrayDataWrapper.createFixed(GL_TEXTURE_COORD_ARRAY, size, type, false, stride, 
+                                       null, vboName, pointer_buffer_offset, GL.GL_STATIC_DRAW, GL.GL_ARRAY_BUFFER) );
     }
 
     public final String toString() {
diff --git a/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/FixedFuncPipeline.java b/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/FixedFuncPipeline.java
index b77cf46..7bc0c54 100644
--- a/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/FixedFuncPipeline.java
+++ b/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/FixedFuncPipeline.java
@@ -1,3 +1,31 @@
+/*
+ * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
+ * 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.util.glsl.fixedfunc;
 
@@ -12,26 +40,6 @@ public class FixedFuncPipeline {
     public static final int MAX_TEXTURE_UNITS = 8;
     public static final int MAX_LIGHTS        = 8;
 
-    // We can't have any dependencies on the FixedFuncUtil class for build bootstrapping reasons
-    public static final String mgl_Vertex = "mgl_Vertex";
-    public static final String mgl_Normal = "mgl_Normal";
-    public static final String mgl_Color = "mgl_Color";
-    public static final String mgl_MultiTexCoord = "mgl_MultiTexCoord" ;
-
-    public static String getPredefinedArrayIndexName(int glArrayIndex) {
-        switch(glArrayIndex) {
-            case GLPointerFunc.GL_VERTEX_ARRAY:
-                return mgl_Vertex;
-            case GLPointerFunc.GL_NORMAL_ARRAY:
-                return mgl_Normal;
-            case GLPointerFunc.GL_COLOR_ARRAY:
-                return mgl_Color;
-            case GLPointerFunc.GL_TEXTURE_COORD_ARRAY:
-                return mgl_MultiTexCoord;
-        }
-        return null;
-    }
-
     public FixedFuncPipeline(GL2ES2 gl, PMVMatrix pmvMatrix) {
         init(gl, pmvMatrix, FixedFuncPipeline.class, shaderSrcRootDef, shaderBinRootDef, 
              vertexColorFileDef, vertexColorLightFileDef, fragmentColorFileDef, fragmentColorTextureFileDef);
@@ -62,7 +70,7 @@ public class FixedFuncPipeline {
     }
 
     public String getArrayIndexName(int glArrayIndex) {
-      String name = getPredefinedArrayIndexName(glArrayIndex); 
+      String name = GLPointerFuncUtil.getPredefinedArrayIndexName(glArrayIndex); 
       switch(glArrayIndex) {
           case GLPointerFunc.GL_VERTEX_ARRAY:
           case GLPointerFunc.GL_NORMAL_ARRAY:
@@ -83,9 +91,9 @@ public class FixedFuncPipeline {
     }
 
     public void glEnableClientState(GL2ES2 gl, int glArrayIndex) {
-        shaderState.glUseProgram(gl, true);
+        shaderState.useProgram(gl, true);
 
-        shaderState.glEnableVertexAttribArray(gl, getArrayIndexName(glArrayIndex));
+        shaderState.enableVertexAttribArray(gl, getArrayIndexName(glArrayIndex));
         // textureCoordsEnabled |=  (1 << activeTextureUnit);
         if ( textureCoordsEnabled.get(activeTextureUnit) != 1 ) {
             textureCoordsEnabled.put(activeTextureUnit, 1);
@@ -94,9 +102,9 @@ public class FixedFuncPipeline {
     }
 
     public void glDisableClientState(GL2ES2 gl, int glArrayIndex) {
-        shaderState.glUseProgram(gl, true);
+        shaderState.useProgram(gl, true);
 
-        shaderState.glDisableVertexAttribArray(gl, getArrayIndexName(glArrayIndex));
+        shaderState.disableVertexAttribArray(gl, getArrayIndexName(glArrayIndex));
         // textureCoordsEnabled &= ~(1 << activeTextureUnit);
         if ( textureCoordsEnabled.get(activeTextureUnit) != 0 ) {
             textureCoordsEnabled.put(activeTextureUnit, 0);
@@ -105,37 +113,37 @@ public class FixedFuncPipeline {
     }
 
     public void glVertexPointer(GL2ES2 gl, GLArrayData data) {
-        shaderState.glUseProgram(gl, true);
-        shaderState.glVertexAttribPointer(gl, data);
+        shaderState.useProgram(gl, true);
+        shaderState.vertexAttribPointer(gl, data);
     }
 
     public void glColorPointer(GL2ES2 gl, GLArrayData data) {
-        shaderState.glUseProgram(gl, true);
-        shaderState.glVertexAttribPointer(gl, data);
+        shaderState.useProgram(gl, true);
+        shaderState.vertexAttribPointer(gl, data);
     }
 
     public void glColor4fv(GL2ES2 gl, FloatBuffer data ) {
-        shaderState.glUseProgram(gl, true);
+        shaderState.useProgram(gl, true);
         GLUniformData ud = shaderState.getUniform(mgl_ColorStatic);
         if(null!=ud) {
             ud.setData(data);
-            shaderState.glUniform(gl, ud);
+            shaderState.uniform(gl, ud);
         }
     }
 
     public void glNormalPointer(GL2ES2 gl, GLArrayData data) {
-        shaderState.glUseProgram(gl, true);
-        shaderState.glVertexAttribPointer(gl, data);
+        shaderState.useProgram(gl, true);
+        shaderState.vertexAttribPointer(gl, data);
     }
 
     public void glTexCoordPointer(GL2ES2 gl, GLArrayData data) {
-        shaderState.glUseProgram(gl, true);
+        shaderState.useProgram(gl, true);
         data.setName( getArrayIndexName(data.getIndex()) );
-        shaderState.glVertexAttribPointer(gl, data);
+        shaderState.vertexAttribPointer(gl, data);
     }
 
     public void glLightfv(GL2ES2 gl, int light, int pname, java.nio.FloatBuffer params) {
-        shaderState.glUseProgram(gl, true);
+        shaderState.useProgram(gl, true);
         light -=GLLightingFunc.GL_LIGHT0;
         if(0 <= light && light < MAX_LIGHTS) {
             GLUniformData ud = null;
@@ -178,7 +186,7 @@ public class FixedFuncPipeline {
             }
             if(null!=ud) {
                 ud.setData(params);
-                shaderState.glUniform(gl, ud);
+                shaderState.uniform(gl, ud);
             }
         } else if(verbose) {
             System.err.println("glLightfv light not within [0.."+MAX_LIGHTS+"]: "+light);
@@ -186,7 +194,7 @@ public class FixedFuncPipeline {
     }
 
     public void glMaterialfv(GL2ES2 gl, int face, int pname, java.nio.FloatBuffer params) {
-        shaderState.glUseProgram(gl, true);
+        shaderState.useProgram(gl, true);
 
         switch (face) {
             case GL.GL_FRONT:
@@ -228,33 +236,33 @@ public class FixedFuncPipeline {
         }
         if(null!=ud) {
             ud.setData(params);
-            shaderState.glUniform(gl, ud);
+            shaderState.uniform(gl, ud);
         }
     }
 
     public void glShadeModel(GL2ES2 gl, int mode) {
-        shaderState.glUseProgram(gl, true);
+        shaderState.useProgram(gl, true);
         GLUniformData ud = shaderState.getUniform(mgl_ShadeModel);
         if(null!=ud) {
             ud.setData(mode);
-            shaderState.glUniform(gl, ud);
+            shaderState.uniform(gl, ud);
         }
     }
 
     public void glActiveTexture(GL2ES2 gl, int textureUnit) {
         textureUnit -= GL.GL_TEXTURE0;
         if(0 <= textureUnit && textureUnit<MAX_TEXTURE_UNITS) {
-            shaderState.glUseProgram(gl, true);
+            shaderState.useProgram(gl, true);
             GLUniformData ud;
             ud = shaderState.getUniform(mgl_ActiveTexture);
             if(null!=ud) {
                 ud.setData(textureUnit);
-                shaderState.glUniform(gl, ud);
+                shaderState.uniform(gl, ud);
             }
             ud = shaderState.getUniform(mgl_ActiveTextureIdx);
             if(null!=ud) {
                 ud.setData(textureUnit);
-                shaderState.glUniform(gl, ud);
+                shaderState.uniform(gl, ud);
             }
             activeTextureUnit = textureUnit;
         } else {
@@ -310,35 +318,30 @@ public class FixedFuncPipeline {
     }
 
     public void validate(GL2ES2 gl) {
-        shaderState.glUseProgram(gl, true);
+        shaderState.useProgram(gl, true);
         GLUniformData ud;
         if(pmvMatrix.update()) {
             ud = shaderState.getUniform(mgl_PMVMatrix);
             if(null!=ud) {
                 // same data object ..
-                shaderState.glUniform(gl, ud);
+                shaderState.uniform(gl, ud);
             } else {
                 throw new GLException("Failed to update: mgl_PMVMatrix");
             }
-            ud = shaderState.getUniform(mgl_NormalMatrix);
-            if(null!=ud) {
-                // same data object ..
-                shaderState.glUniform(gl, ud);
-            }
         }
         ud = shaderState.getUniform(mgl_ColorEnabled);
         if(null!=ud) {
-            int ca = (shaderState.isVertexAttribArrayEnabled(mgl_Color)==true)?1:0;
+            int ca = (shaderState.isVertexAttribArrayEnabled(GLPointerFuncUtil.mgl_Color)==true)?1:0;
             if(ca!=ud.intValue()) {
                 ud.setData(ca);
-                shaderState.glUniform(gl, ud);
+                shaderState.uniform(gl, ud);
             }
         }
         ud = shaderState.getUniform(mgl_CullFace);
         if(null!=ud) {
             if(cullFace!=ud.intValue()) {
                 ud.setData(cullFace);
-                shaderState.glUniform(gl, ud);
+                shaderState.uniform(gl, ud);
             }
         }
 
@@ -346,7 +349,7 @@ public class FixedFuncPipeline {
             ud = shaderState.getUniform(mgl_LightsEnabled);
             if(null!=ud) {
                 // same data object 
-                shaderState.glUniform(gl, ud);
+                shaderState.uniform(gl, ud);
             }
             lightsEnabledDirty=false;
         }
@@ -355,7 +358,7 @@ public class FixedFuncPipeline {
             ud = shaderState.getUniform(mgl_TexCoordEnabled);
             if(null!=ud) {
                 // same data object 
-                shaderState.glUniform(gl, ud);
+                shaderState.uniform(gl, ud);
             }
             textureCoordsEnabledDirty=false;
         }
@@ -447,43 +450,40 @@ public class FixedFuncPipeline {
         }
 
         shaderState.attachShaderProgram(gl, shaderProgramColor);
-        shaderState.glUseProgram(gl, true);
+        shaderState.useProgram(gl, true);
 
         // mandatory ..
-        if(!shaderState.glUniform(gl, new GLUniformData(mgl_PMVMatrix, 4, 4, pmvMatrix.glGetPMvMviMatrixf()))) {
+        if(!shaderState.uniform(gl, new GLUniformData(mgl_PMVMatrix, 4, 4, pmvMatrix.glGetPMvMvitMatrixf()))) {
             throw new GLException("Error setting PMVMatrix in shader: "+this);
         }
 
-        // optional parameter ..
-        shaderState.glUniform(gl, new GLUniformData(mgl_NormalMatrix, 3, 3, pmvMatrix.glGetNormalMatrixf()));
-
-        shaderState.glUniform(gl, new GLUniformData(mgl_ColorEnabled,  0));
-        shaderState.glUniform(gl, new GLUniformData(mgl_ColorStatic, 4, zero4f));
-        shaderState.glUniform(gl, new GLUniformData(mgl_TexCoordEnabled,  1, textureCoordsEnabled));
-        shaderState.glUniform(gl, new GLUniformData(mgl_ActiveTexture, activeTextureUnit));
-        shaderState.glUniform(gl, new GLUniformData(mgl_ActiveTextureIdx, activeTextureUnit));
-        shaderState.glUniform(gl, new GLUniformData(mgl_ShadeModel, 0));
-        shaderState.glUniform(gl, new GLUniformData(mgl_CullFace, cullFace));
+        shaderState.uniform(gl, new GLUniformData(mgl_ColorEnabled,  0));
+        shaderState.uniform(gl, new GLUniformData(mgl_ColorStatic, 4, zero4f));
+        shaderState.uniform(gl, new GLUniformData(mgl_TexCoordEnabled,  1, textureCoordsEnabled));
+        shaderState.uniform(gl, new GLUniformData(mgl_ActiveTexture, activeTextureUnit));
+        shaderState.uniform(gl, new GLUniformData(mgl_ActiveTextureIdx, activeTextureUnit));
+        shaderState.uniform(gl, new GLUniformData(mgl_ShadeModel, 0));
+        shaderState.uniform(gl, new GLUniformData(mgl_CullFace, cullFace));
         for(int i=0; i<MAX_LIGHTS; i++) {
-            shaderState.glUniform(gl, new GLUniformData(mgl_LightSource+"["+i+"].ambient", 4, defAmbient));
-            shaderState.glUniform(gl, new GLUniformData(mgl_LightSource+"["+i+"].diffuse", 4, defDiffuse));
-            shaderState.glUniform(gl, new GLUniformData(mgl_LightSource+"["+i+"].specular", 4, defSpecular));
-            shaderState.glUniform(gl, new GLUniformData(mgl_LightSource+"["+i+"].position", 4, defPosition));
-            shaderState.glUniform(gl, new GLUniformData(mgl_LightSource+"["+i+"].spotDirection", 3, defSpotDir));
-            shaderState.glUniform(gl, new GLUniformData(mgl_LightSource+"["+i+"].spotExponent", defSpotExponent));
-            shaderState.glUniform(gl, new GLUniformData(mgl_LightSource+"["+i+"].spotCutoff", defSpotCutoff));
-            shaderState.glUniform(gl, new GLUniformData(mgl_LightSource+"["+i+"].constantAttenuation", defConstantAtten));
-            shaderState.glUniform(gl, new GLUniformData(mgl_LightSource+"["+i+"].linearAttenuation", defLinearAtten));
-            shaderState.glUniform(gl, new GLUniformData(mgl_LightSource+"["+i+"].quadraticAttenuation", defQuadraticAtten));
+            shaderState.uniform(gl, new GLUniformData(mgl_LightSource+"["+i+"].ambient", 4, defAmbient));
+            shaderState.uniform(gl, new GLUniformData(mgl_LightSource+"["+i+"].diffuse", 4, defDiffuse));
+            shaderState.uniform(gl, new GLUniformData(mgl_LightSource+"["+i+"].specular", 4, defSpecular));
+            shaderState.uniform(gl, new GLUniformData(mgl_LightSource+"["+i+"].position", 4, defPosition));
+            shaderState.uniform(gl, new GLUniformData(mgl_LightSource+"["+i+"].spotDirection", 3, defSpotDir));
+            shaderState.uniform(gl, new GLUniformData(mgl_LightSource+"["+i+"].spotExponent", defSpotExponent));
+            shaderState.uniform(gl, new GLUniformData(mgl_LightSource+"["+i+"].spotCutoff", defSpotCutoff));
+            shaderState.uniform(gl, new GLUniformData(mgl_LightSource+"["+i+"].constantAttenuation", defConstantAtten));
+            shaderState.uniform(gl, new GLUniformData(mgl_LightSource+"["+i+"].linearAttenuation", defLinearAtten));
+            shaderState.uniform(gl, new GLUniformData(mgl_LightSource+"["+i+"].quadraticAttenuation", defQuadraticAtten));
         }
-        shaderState.glUniform(gl, new GLUniformData(mgl_LightsEnabled,  1, lightsEnabled));
-        shaderState.glUniform(gl, new GLUniformData(mgl_FrontMaterial+".ambient", 4, defMatAmbient));
-        shaderState.glUniform(gl, new GLUniformData(mgl_FrontMaterial+".diffuse", 4, defMatDiffuse));
-        shaderState.glUniform(gl, new GLUniformData(mgl_FrontMaterial+".specular", 4, defMatSpecular));
-        shaderState.glUniform(gl, new GLUniformData(mgl_FrontMaterial+".emission", 4, defMatEmission));
-        shaderState.glUniform(gl, new GLUniformData(mgl_FrontMaterial+".shininess", defMatShininess));
-
-        shaderState.glUseProgram(gl, false);
+        shaderState.uniform(gl, new GLUniformData(mgl_LightsEnabled,  1, lightsEnabled));
+        shaderState.uniform(gl, new GLUniformData(mgl_FrontMaterial+".ambient", 4, defMatAmbient));
+        shaderState.uniform(gl, new GLUniformData(mgl_FrontMaterial+".diffuse", 4, defMatDiffuse));
+        shaderState.uniform(gl, new GLUniformData(mgl_FrontMaterial+".specular", 4, defMatSpecular));
+        shaderState.uniform(gl, new GLUniformData(mgl_FrontMaterial+".emission", 4, defMatEmission));
+        shaderState.uniform(gl, new GLUniformData(mgl_FrontMaterial+".shininess", defMatShininess));
+
+        shaderState.useProgram(gl, false);
     }
 
     protected static final boolean DEBUG=false;
@@ -508,8 +508,7 @@ public class FixedFuncPipeline {
     protected ShaderProgram shaderProgramColorTextureLight;
 
     // uniforms ..
-    protected static final String mgl_PMVMatrix        = "mgl_PMVMatrix";       // m4fv[3]
-    protected static final String mgl_NormalMatrix     = "mgl_NormalMatrix";    // m4fv
+    protected static final String mgl_PMVMatrix        = "mgl_PMVMatrix";       // m4fv[4] - P, Mv, Mvi and Mvit
     protected static final String mgl_ColorEnabled     = "mgl_ColorEnabled";    //  1i
     protected static final String mgl_ColorStatic      = "mgl_ColorStatic";     //  4fv
 
diff --git a/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/shaders/FixedFuncColorLight.vp b/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/shaders/FixedFuncColorLight.vp
index ce203cf..7ce1eed 100644
--- a/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/shaders/FixedFuncColorLight.vp
+++ b/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/shaders/FixedFuncColorLight.vp
@@ -19,7 +19,7 @@ void main(void)
 
   position  = mgl_PMVMatrix[1] * mgl_Vertex; // vertex eye position 
 
-  normal = normalize(mgl_NormalMatrix * mgl_Normal); 
+  normal = normalize(mgl_PMVMatrix[3] * mgl_Normal).xyz; 
   // cameraPosition:      (mgl_PMVMatrix[2] * vec4(0,0,0,1.0)).xyz                   
   cameraDir  = normalize( (mgl_PMVMatrix[2] * vec4(0,0,0,1.0)).xyz - mgl_Vertex.xyz ); 
 
@@ -50,7 +50,7 @@ void main(void)
       }
     }
   }
-  ambient  += mgl_FrontMaterial.ambient;
+  ambient  *= mgl_FrontMaterial.ambient;
   diffuse  *= mgl_FrontMaterial.diffuse;
   specular *= mgl_FrontMaterial.specular;
 
diff --git a/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/shaders/mgl_attribute.glsl b/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/shaders/mgl_attribute.glsl
index b09bdb0..09a11ec 100644
--- a/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/shaders/mgl_attribute.glsl
+++ b/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/shaders/mgl_attribute.glsl
@@ -5,7 +5,7 @@
 #include es_precision.glsl
 
 attribute HIGHP vec4    mgl_Vertex;
-attribute HIGHP vec3    mgl_Normal;
+attribute HIGHP vec4    mgl_Normal;
 attribute HIGHP vec4    mgl_Color;
 attribute HIGHP vec4    mgl_MultiTexCoord0;
 attribute HIGHP vec4    mgl_MultiTexCoord1;
diff --git a/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/shaders/mgl_uniform.glsl b/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/shaders/mgl_uniform.glsl
index d8b3c7f..4c4000d 100644
--- a/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/shaders/mgl_uniform.glsl
+++ b/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/shaders/mgl_uniform.glsl
@@ -6,8 +6,7 @@
 
 #include mgl_const.glsl
 
-uniform   HIGHP mat4    mgl_PMVMatrix[3]; // P, Mv, and Mvi
-uniform   HIGHP mat3    mgl_NormalMatrix; // transpose(inverse(ModelView)).3x3
+uniform HIGHP   mat4    mgl_PMVMatrix[4]; // P, Mv, Mvi and Mvit (transpose(inverse(ModelView)) == normalMatrix)
 uniform LOWP    int     mgl_ColorEnabled;
 uniform HIGHP   vec4    mgl_ColorStatic;
 uniform LOWP    int     mgl_TexCoordEnabled[MAX_TEXTURE_UNITS];
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WGLGLCapabilities.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WGLGLCapabilities.java
index a23c5a0..adfdddd 100644
--- a/src/jogl/classes/jogamp/opengl/windows/wgl/WGLGLCapabilities.java
+++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WGLGLCapabilities.java
@@ -38,8 +38,8 @@ import javax.media.opengl.GLException;
 import javax.media.opengl.GLProfile;
 
 public class WGLGLCapabilities extends GLCapabilities {
-  PIXELFORMATDESCRIPTOR pfd;
-  int pfdID;
+  final PIXELFORMATDESCRIPTOR pfd;
+  final int pfdID;
   int arb_pixelformat; // -1 PFD, 0 NOP, 1 ARB
 
   /** Comparing pfd id only */
@@ -140,11 +140,16 @@ public class WGLGLCapabilities extends GLCapabilities {
                   break;
 
               case WGLExt.WGL_PIXEL_TYPE_ARB:
-                  // Fail softly with unknown results here
-                  if (iresults[i] == WGLExt.WGL_TYPE_RGBA_ARB ||
-                      iresults[i] == WGLExt.WGL_TYPE_RGBA_FLOAT_ARB) {
+                  if(iresults[i] == WGLExt.WGL_TYPE_COLORINDEX_ARB) {
+                      return false; // color index not supported
+                  }
+
+                  if (iresults[i] == WGLExt.WGL_TYPE_RGBA_FLOAT_ARB) {
                       setPbufferFloatingPointBuffers(true);
                   }
+                  
+                  // normal RGBA FB: WGLExt.WGL_TYPE_RGBA_ARB
+                  // ignore unknown results here
                   break;
 
               case WGLExt.WGL_FLOAT_COMPONENTS_NV:
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsExternalWGLContext.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsExternalWGLContext.java
index 0e2575b..c3588fd 100644
--- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsExternalWGLContext.java
+++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsExternalWGLContext.java
@@ -65,7 +65,7 @@ public class WindowsExternalWGLContext extends WindowsWGLContext {
       System.err.println(getThreadName() + ": !!! Created external OpenGL context " + toHexString(ctx) + " for " + this);
     }
     GLContextShareSet.contextCreated(this);
-    setGLFunctionAvailability(false, 0, 0, CTX_PROFILE_COMPAT|CTX_OPTION_ANY);  // use GL_VERSION
+    setGLFunctionAvailability(false, true, 0, 0, CTX_PROFILE_COMPAT|CTX_OPTION_ANY);  // use GL_VERSION
     getGLStateTracker().setEnabled(false); // external context usage can't track state in Java
   }
 
@@ -92,11 +92,12 @@ public class WindowsExternalWGLContext extends WindowsWGLContext {
         // Workaround: Use a fake default configuration
         final int werr = GDI.GetLastError();
         cfg = WindowsWGLGraphicsConfigurationFactory.createDefaultGraphicsConfiguration(new GLCapabilities(GLProfile.getDefault()), aScreen);
+        cfg.markExternal();
         if(DEBUG) {
             System.err.println("WindowsExternalWGLContext invalid hdc/pfd werr "+werr+", using default cfg: " + cfg);
         }
     } else {
-        cfg = WindowsWGLGraphicsConfiguration.createFromCurrent(factory, hdc, pfdID, glp, aScreen, true);
+        cfg = WindowsWGLGraphicsConfiguration.createFromExternal(factory, hdc, pfdID, glp, aScreen, true);
         if(DEBUG) {
             System.err.println("WindowsExternalWGLContext valid hdc/pfd, retrieved cfg: " + cfg);
         }
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsExternalWGLDrawable.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsExternalWGLDrawable.java
index 7666ae3..ede5047 100644
--- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsExternalWGLDrawable.java
+++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsExternalWGLDrawable.java
@@ -69,7 +69,7 @@ public class WindowsExternalWGLDrawable extends WindowsWGLDrawable {
     }
 
     AbstractGraphicsScreen aScreen = DefaultGraphicsScreen.createDefault(NativeWindowFactory.TYPE_WINDOWS);
-    WindowsWGLGraphicsConfiguration cfg = WindowsWGLGraphicsConfiguration.createFromCurrent(factory, hdc, pfdID, glp, aScreen, true);
+    WindowsWGLGraphicsConfiguration cfg = WindowsWGLGraphicsConfiguration.createFromExternal(factory, hdc, pfdID, glp, aScreen, true);
     return new WindowsExternalWGLDrawable(factory, new WrappedSurface(cfg, hdc));
   }
 
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLContext.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLContext.java
index 94017e7..b95b7ed 100644
--- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLContext.java
+++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLContext.java
@@ -46,6 +46,7 @@ import java.util.Map;
 
 import javax.media.nativewindow.AbstractGraphicsConfiguration;
 import javax.media.nativewindow.AbstractGraphicsDevice;
+import javax.media.nativewindow.NativeSurface;
 import javax.media.opengl.GLContext;
 import javax.media.opengl.GLException;
 import javax.media.opengl.GLCapabilitiesImmutable;
@@ -58,23 +59,25 @@ import jogamp.opengl.GLContextShareSet;
 import jogamp.opengl.GLDrawableImpl;
 
 public class WindowsWGLContext extends GLContextImpl {
-  static final Map/*<String, String>*/ functionNameMap;
-  static final Map/*<String, String>*/ extensionNameMap;
+  static final Map<String, String> functionNameMap;
+  static final Map<String, String> extensionNameMap;
   private boolean wglGetExtensionsStringEXTInitialized;
   private boolean wglGetExtensionsStringEXTAvailable;
   private boolean wglGLReadDrawableAvailableSet;
   private boolean wglGLReadDrawableAvailable;
-  private WGLExt wglExt;
+  private WGLExt _wglExt;
   // Table that holds the addresses of the native C-language entry points for
   // WGL extension functions.
   private WGLExtProcAddressTable wglExtProcAddressTable;
+  private int hasSwapIntervalSGI = 0;
+  private int hasSwapGroupNV = 0;
 
   static {
-    functionNameMap = new HashMap();
+    functionNameMap = new HashMap<String, String>();
     functionNameMap.put("glAllocateMemoryNV", "wglAllocateMemoryNV");
     functionNameMap.put("glFreeMemoryNV", "wglFreeMemoryNV");
 
-    extensionNameMap = new HashMap();
+    extensionNameMap = new HashMap<String, String>();
     extensionNameMap.put("GL_ARB_pbuffer", "WGL_ARB_pbuffer");
     extensionNameMap.put("GL_ARB_pixel_format", "WGL_ARB_pixel_format");
   }
@@ -85,13 +88,17 @@ public class WindowsWGLContext extends GLContextImpl {
     super(drawable, shareWith);
   }
 
-  protected void resetState() {
+  @Override
+  protected void resetStates() {
     wglGetExtensionsStringEXTInitialized=false;
     wglGetExtensionsStringEXTAvailable=false;
     wglGLReadDrawableAvailableSet=false;
     wglGLReadDrawableAvailable=false;
     // no inner state _wglExt=null;
     wglExtProcAddressTable=null;
+    hasSwapIntervalSGI = 0;
+    hasSwapGroupNV = 0;    
+    super.resetStates();    
   }
   
   public Object getPlatformGLExtensions() {
@@ -102,10 +109,10 @@ public class WindowsWGLContext extends GLContextImpl {
     if( null == getWGLExtProcAddressTable()) {
         throw new InternalError("Null WGLExtProcAddressTable");
     }
-    if (wglExt == null) {
-      wglExt = new WGLExtImpl(this);
+    if (_wglExt == null) {
+      _wglExt = new WGLExtImpl(this);
     }
-    return wglExt;
+    return _wglExt;
   }
 
   public final boolean isGLReadDrawableAvailable() {
@@ -141,8 +148,8 @@ public class WindowsWGLContext extends GLContextImpl {
     int werr = ( !ok ) ? GDI.GetLastError() : GDI.ERROR_SUCCESS;
     if(DEBUG && !ok) {
         Throwable t = new Throwable ("Info: wglMakeContextCurrent draw "+
-                this.toHexString(hDrawDC) + ", read " + this.toHexString(hReadDC) +
-                ", ctx " + this.toHexString(ctx) + ", werr " + werr);
+                GLContext.toHexString(hDrawDC) + ", read " + GLContext.toHexString(hReadDC) +
+                ", ctx " + GLContext.toHexString(ctx) + ", werr " + werr);
         t.printStackTrace();
     }
     if(!ok && 0==hDrawDC && 0==hReadDC) {
@@ -161,9 +168,9 @@ public class WindowsWGLContext extends GLContextImpl {
     return wglExtProcAddressTable;
   }
 
-  protected Map/*<String, String>*/ getFunctionNameMap() { return functionNameMap; }
+  protected Map<String, String> getFunctionNameMap() { return functionNameMap; }
 
-  protected Map/*<String, String>*/ getExtensionNameMap() { return extensionNameMap; }
+  protected Map<String, String> getExtensionNameMap() { return extensionNameMap; }
 
   protected void destroyContextARBImpl(long context) {
     WGL.wglMakeCurrent(0, 0);
@@ -273,14 +280,11 @@ public class WindowsWGLContext extends GLContextImpl {
       }
     }
 
-    int minor[] = new int[1];
-    int major[] = new int[1];
-    int ctp[] = new int[1];
     boolean createContextARBTried = false;
 
     // utilize the shared context's GLXExt in case it was using the ARB method and it already exists
     if( null!=sharedContext && sharedContext.isCreatedWithARBMethod() ) {
-        contextHandle = createContextARB(share, true, major, minor, ctp);
+        contextHandle = createContextARB(share, true);
         createContextARBTried = true;
         if (DEBUG && 0!=contextHandle) {
             System.err.println(getThreadName() + ": createImpl: OK (ARB, using sharedContext) share "+share);
@@ -298,7 +302,7 @@ public class WindowsWGLContext extends GLContextImpl {
         if (!WGL.wglMakeCurrent(drawable.getHandle(), temp_ctx)) {
             throw new GLException("Error making temp context current: 0x" + toHexString(temp_ctx) + ", werr: "+GDI.GetLastError());
         }
-        setGLFunctionAvailability(true, 0, 0, CTX_PROFILE_COMPAT|CTX_OPTION_ANY);  // use GL_VERSION
+        setGLFunctionAvailability(true, true, 0, 0, CTX_PROFILE_COMPAT|CTX_OPTION_ANY);  // use GL_VERSION
         boolean isCreateContextAttribsARBAvailable = isFunctionAvailable("wglCreateContextAttribsARB");
         WGL.wglMakeCurrent(0, 0); // release temp context
 
@@ -306,7 +310,7 @@ public class WindowsWGLContext extends GLContextImpl {
             if(isCreateContextAttribsARBAvailable &&
                isExtensionAvailable("WGL_ARB_create_context") ) {
                 // initial ARB context creation
-                contextHandle = createContextARB(share, true, major, minor, ctp);
+                contextHandle = createContextARB(share, true);
                 createContextARBTried=true;
                 if (DEBUG) {
                     if(0!=contextHandle) {
@@ -334,10 +338,10 @@ public class WindowsWGLContext extends GLContextImpl {
         if(glCaps.getGLProfile().isGL3()) {
           WGL.wglMakeCurrent(0, 0);
           WGL.wglDeleteContext(temp_ctx);
-          throw new GLException("WindowsWGLContext.createContext failed, but context > GL2 requested "+getGLVersion(major[0], minor[0], ctp[0], "@creation")+", ");
+          throw new GLException("WindowsWGLContext.createContext failed, but context > GL2 requested "+getGLVersion()+", ");
         }
         if(DEBUG) {
-          System.err.println("WindowsWGLContext.createContext failed, fall back to !ARB context "+getGLVersion(major[0], minor[0], ctp[0], "@creation"));
+          System.err.println("WindowsWGLContext.createContext failed, fall back to !ARB context "+getGLVersion());
         }
 
         // continue with temp context for GL < 3.0
@@ -394,9 +398,9 @@ public class WindowsWGLContext extends GLContextImpl {
   }
 
   protected final void updateGLXProcAddressTable() {
-    AbstractGraphicsConfiguration aconfig = drawable.getNativeSurface().getGraphicsConfiguration().getNativeGraphicsConfiguration();
-    AbstractGraphicsDevice adevice = aconfig.getScreen().getDevice();
-    String key = adevice.getUniqueID();
+    final AbstractGraphicsConfiguration aconfig = drawable.getNativeSurface().getGraphicsConfiguration().getNativeGraphicsConfiguration();
+    final AbstractGraphicsDevice adevice = aconfig.getScreen().getDevice();
+    final String key = "WGL-"+adevice.getUniqueID();
     if (DEBUG) {
       System.err.println(getThreadName() + ": !!! Initializing WGL extension address table: "+key);
     }
@@ -405,12 +409,12 @@ public class WindowsWGLContext extends GLContextImpl {
     wglGLReadDrawableAvailableSet=false;
     wglGLReadDrawableAvailable=false;
 
-    WGLExtProcAddressTable table = null;
+    ProcAddressTable table = null;
     synchronized(mappedContextTypeObjectLock) {
-        table = (WGLExtProcAddressTable) mappedGLXProcAddress.get( key );
+        table = mappedGLXProcAddress.get( key );
     }
     if(null != table) {
-        wglExtProcAddressTable = table;
+        wglExtProcAddressTable = (WGLExtProcAddressTable) table;
         if(DEBUG) {
             System.err.println(getThreadName() + ": !!! GLContext WGL ProcAddressTable reusing key("+key+") -> "+table.hashCode());
         }
@@ -430,27 +434,95 @@ public class WindowsWGLContext extends GLContextImpl {
     }
   }
   
-  public String getPlatformExtensionsString() {
+  protected final StringBuffer getPlatformExtensionsStringImpl() {
+    StringBuffer sb = new StringBuffer();
+    
     if (!wglGetExtensionsStringEXTInitialized) {
       wglGetExtensionsStringEXTAvailable = (WGL.wglGetProcAddress("wglGetExtensionsStringEXT") != 0);
       wglGetExtensionsStringEXTInitialized = true;
     }
     if (wglGetExtensionsStringEXTAvailable) {
-      return getWGLExt().wglGetExtensionsStringEXT();
-    } else {
-      return "";
+      sb.append(getWGLExt().wglGetExtensionsStringEXT());
     }
+    return sb;
   }
-
+  
+  @Override
   protected void setSwapIntervalImpl(int interval) {
     WGLExt wglExt = getWGLExt();
-    if (wglExt.isExtensionAvailable("WGL_EXT_swap_control")) {
-      if ( wglExt.wglSwapIntervalEXT(interval) ) {
-        currentSwapInterval = interval ;
-      }
+    if(0==hasSwapIntervalSGI) {
+        try {
+            hasSwapIntervalSGI = wglExt.isExtensionAvailable("WGL_EXT_swap_control")?1:-1;
+        } catch (Throwable t) { hasSwapIntervalSGI=1; }
+    }
+    if (hasSwapIntervalSGI>0) {
+        try {
+            if ( wglExt.wglSwapIntervalEXT(interval) ) {
+                currentSwapInterval = interval ;
+            }
+        } catch (Throwable t) { hasSwapIntervalSGI=-1; }
     }
   }
-
+  
+  private final int initSwapGroupImpl(WGLExt wglExt) {
+      if(0==hasSwapGroupNV) {
+        try {
+            hasSwapGroupNV = wglExt.isExtensionAvailable("WGL_NV_swap_group")?1:-1;
+        } catch (Throwable t) { hasSwapGroupNV=1; }
+        if(DEBUG) {
+            System.err.println("initSwapGroupImpl: hasSwapGroupNV: "+hasSwapGroupNV);
+        }
+      }
+      return hasSwapGroupNV;
+  }
+  
+  @Override
+  protected final boolean queryMaxSwapGroupsImpl(int[] maxGroups, int maxGroups_offset,
+                                                 int[] maxBarriers, int maxBarriers_offset) {
+      boolean res = false;
+      WGLExt wglExt = getWGLExt();
+      if (initSwapGroupImpl(wglExt)>0) {
+        final NativeSurface ns = drawable.getNativeSurface();
+        try {
+            if( wglExt.wglQueryMaxSwapGroupsNV(ns.getDisplayHandle(), 
+                                               maxGroups, maxGroups_offset,
+                                               maxBarriers, maxBarriers_offset) ) {
+                res = true;
+            }
+        } catch (Throwable t) { hasSwapGroupNV=-1; }
+      }
+      return res;
+  }
+  
+  @Override
+  protected final boolean joinSwapGroupImpl(int group) {
+      boolean res = false;
+      WGLExt wglExt = getWGLExt();
+      if (initSwapGroupImpl(wglExt)>0) {
+        try {
+            if( wglExt.wglJoinSwapGroupNV(drawable.getHandle(), group) ) {
+                currentSwapGroup = group;
+                res = true;
+            }
+        } catch (Throwable t) { hasSwapGroupNV=-1; }
+      }
+      return res;
+  }
+  
+  @Override
+  protected final boolean bindSwapBarrierImpl(int group, int barrier) {
+      boolean res = false;
+      WGLExt wglExt = getWGLExt();
+      if (initSwapGroupImpl(wglExt)>0) {
+        try {
+            if( wglExt.wglBindSwapBarrierNV(group, barrier) ) {
+                res = true;
+            }
+        } catch (Throwable t) { hasSwapGroupNV=-1; }
+      }
+      return res;  
+  }
+  
   public ByteBuffer glAllocateMemoryNV(int arg0, float arg1, float arg2, float arg3) {
     return getWGLExt().wglAllocateMemoryNV(arg0, arg1, arg2, arg3);
   }
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java
index 3cbef25..b7941c3 100644
--- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java
+++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java
@@ -55,6 +55,7 @@ import javax.media.nativewindow.ProxySurface;
 import javax.media.nativewindow.NativeWindowFactory;
 import javax.media.nativewindow.windows.WindowsGraphicsDevice;
 import javax.media.nativewindow.AbstractGraphicsConfiguration;
+import javax.media.opengl.GL;
 import javax.media.opengl.GLCapabilitiesImmutable;
 import javax.media.opengl.GLCapabilitiesChooser;
 import javax.media.opengl.GLContext;
@@ -64,8 +65,10 @@ import javax.media.opengl.GLProfile;
 
 import com.jogamp.common.JogampRuntimeException;
 import com.jogamp.common.nio.PointerBuffer;
+import com.jogamp.common.os.Platform;
 import com.jogamp.common.util.ReflectionUtil;
-import javax.media.opengl.GLCapabilities;
+import com.jogamp.common.util.VersionNumber;
+
 import jogamp.nativewindow.WrappedSurface;
 import jogamp.nativewindow.windows.GDI;
 import jogamp.nativewindow.windows.GDISurface;
@@ -164,6 +167,12 @@ 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 class SharedResource implements SharedResourceRunner.Resource {
       private WindowsGraphicsDevice device;
       private AbstractGraphicsScreen screen;
@@ -173,9 +182,13 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl {
       private boolean hasARBMultisample;
       private boolean hasARBPBuffer;
       private boolean hasARBReadDrawable;
+      private String vendor;
+      private boolean isVendorATI;
+      private boolean isVendorNVIDIA;
+      private boolean needsCurrenContext4ARBPFDQueries;
 
       SharedResource(WindowsGraphicsDevice dev, AbstractGraphicsScreen scrn, WindowsDummyWGLDrawable draw, WindowsWGLContext ctx,
-                     boolean arbPixelFormat, boolean arbMultisample, boolean arbPBuffer, boolean arbReadDrawable) {
+                     boolean arbPixelFormat, boolean arbMultisample, boolean arbPBuffer, boolean arbReadDrawable, String glVendor) {
           device = dev;
           screen = scrn;
           drawable = draw;
@@ -184,7 +197,27 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl {
           hasARBMultisample = arbMultisample;
           hasARBPBuffer = arbPBuffer;
           hasARBReadDrawable = arbReadDrawable;
+          vendor = glVendor;
+          if(null != vendor) {
+              isVendorNVIDIA = vendor.startsWith("NVIDIA") ;
+              isVendorATI = vendor.startsWith("ATI") ;
+          }
+          
+            if ( isVendorATI() ) {
+              final VersionNumber winVersion = new VersionNumber(Platform.getOSVersion(), ".");
+              final boolean isWinXPOrLess = winVersion.compareTo(winXPVersionNumber) <= 0;
+              if(DEBUG) {
+                  System.err.println("needsCurrenContext4ARBPFDQueries: "+winVersion+" <= "+winXPVersionNumber+" = "+isWinXPOrLess+" - "+Platform.getOSVersion());
+              }
+              needsCurrenContext4ARBPFDQueries = isWinXPOrLess;
+            } else { 
+            if(DEBUG) {
+                  System.err.println("needsCurrenContext4ARBPFDQueries: false");
+              }
+              needsCurrenContext4ARBPFDQueries = false;
+          }                   
       }
+      
       final public AbstractGraphicsDevice getDevice() { return device; }
       final public AbstractGraphicsScreen getScreen() { return screen; }
       final public WindowsWGLDrawable getDrawable() { return drawable; }
@@ -194,6 +227,20 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl {
       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! 
+       */
+      final boolean needsCurrentContext4ARBPFDQueries() { return needsCurrenContext4ARBPFDQueries; }      
   }
 
   class SharedResourceImplementation implements SharedResourceRunner.Implementation {
@@ -226,7 +273,7 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl {
                 if (null == absScreen) {
                     throw new GLException("Couldn't create shared screen for device: "+sharedDevice+", idx 0");
                 }
-                GLProfile glp = GLProfile.getMinDesktop(sharedDevice);
+                GLProfile glp = GLProfile.get(sharedDevice, GLProfile.GL_PROFILE_LIST_MIN_DESKTOP);
                 if (null == glp) {
                     throw new GLException("Couldn't get default GLProfile for device: "+sharedDevice);
                 }
@@ -245,6 +292,7 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl {
                 boolean hasARBMultisample;
                 boolean hasARBPBuffer;
                 boolean hasARBReadDrawableAvailable;
+                String vendor;
                 sharedContext.makeCurrent();
                 try {
                     hasARBPixelFormat = sharedContext.isExtensionAvailable(WGL_ARB_pixel_format);
@@ -252,6 +300,7 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl {
                     hasARBPBuffer = sharedContext.isExtensionAvailable(GL_ARB_pbuffer);
                     hasARBReadDrawableAvailable = sharedContext.isExtensionAvailable(WGL_ARB_make_current_read) &&
                                             sharedContext.isFunctionAvailable(wglMakeContextCurrent);
+                    vendor = sharedContext.getGL().glGetString(GL.GL_VENDOR);
                 } finally {
                     sharedContext.release();
                 }
@@ -263,10 +312,11 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl {
                     System.err.println("!!! multisample:   " + hasARBMultisample);
                     System.err.println("!!! pbuffer:       " + hasARBPBuffer);
                     System.err.println("!!! readDrawable:  " + hasARBReadDrawableAvailable);
+                    System.err.println("!!! vendor:        " + vendor);
                 }
                 return new SharedResource(sharedDevice, absScreen, sharedDrawable, sharedContext, 
                                           hasARBPixelFormat, hasARBMultisample,
-                                          hasARBPBuffer, hasARBReadDrawableAvailable);
+                                          hasARBPBuffer, hasARBReadDrawableAvailable, vendor);
             } catch (Throwable t) {
                 throw new GLException("WindowsWGLDrawableFactory - Could not initialize shared resources for "+connection, t);
             } finally {
@@ -319,21 +369,18 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl {
   final static String GL_ARB_pbuffer = "GL_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";
 
-  protected final GLContext getSharedContextImpl(AbstractGraphicsDevice device) {
-    SharedResourceRunner.Resource sr = sharedResourceRunner.getShared(device);
+  public final boolean getWasSharedContextCreated(AbstractGraphicsDevice device) {
+    SharedResourceRunner.Resource sr = sharedResourceRunner.getOrCreateShared(device);
     if(null!=sr) {
-      return sr.getContext();
+      return null != sr.getContext();
     }
-    return null;
-  }
-
-  protected final boolean hasSharedContextImpl(AbstractGraphicsDevice device) {
-      return null != getSharedContextImpl(device);
+    return false;
   }
-
+  
   protected final GLContext getOrCreateSharedContextImpl(AbstractGraphicsDevice device) {
     SharedResourceRunner.Resource sr = sharedResourceRunner.getOrCreateShared(device);
     if(null!=sr) {
@@ -367,7 +414,7 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl {
     RegisteredClassFactory.shutdownSharedClasses();
   }
 
-  protected List/*GLCapabilitiesImmutable*/ getAvailableCapabilitiesImpl(AbstractGraphicsDevice device) {
+  protected List<GLCapabilitiesImmutable> getAvailableCapabilitiesImpl(AbstractGraphicsDevice device) {
     return WindowsWGLGraphicsConfigurationFactory.getAvailableCapabilities(this, device);
   }
 
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDynamicLibraryBundleInfo.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDynamicLibraryBundleInfo.java
index 0fb7f45..ea7dc81 100644
--- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDynamicLibraryBundleInfo.java
+++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDynamicLibraryBundleInfo.java
@@ -36,22 +36,21 @@ public class WindowsWGLDynamicLibraryBundleInfo extends DesktopGLDynamicLibraryB
         super();
     }
 
-    public List getToolLibNames() {
-        List/*<String>*/ libNamesList = new ArrayList();
-
-        libNamesList.add("OpenGL32");
-
-        return libNamesList;
+    public List<List<String>> getToolLibNames() {
+        final List<List<String>> libsList = new ArrayList<List<String>>();
+        final List<String> libsGL = new ArrayList<String>();
+        libsGL.add("OpenGL32");
+        libsList.add(libsGL);        
+        return libsList;
     }
-
-
-    public final List getToolGetProcAddressFuncNameList() {
-        List res = new ArrayList();
+    
+    public final List<String> getToolGetProcAddressFuncNameList() {
+        List<String> res = new ArrayList<String>();
         res.add("wglGetProcAddress");
         return res;
     }
 
-    public final long toolDynamicLookupFunction(long toolGetProcAddressHandle, String funcName) {
+    public final long toolGetProcAddress(long toolGetProcAddressHandle, String funcName) {
         return WGL.wglGetProcAddress(toolGetProcAddressHandle, funcName);
     }
 }
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration.java
index ae07646..9899065 100644
--- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration.java
+++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration.java
@@ -48,9 +48,10 @@ import javax.media.opengl.GLException;
 import javax.media.opengl.GLPbuffer;
 import javax.media.opengl.GLProfile;
 
+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 DefaultGraphicsConfiguration implements Cloneable {
@@ -61,14 +62,15 @@ public class WindowsWGLGraphicsConfiguration extends DefaultGraphicsConfiguratio
     protected static final int MAX_ATTRIBS  = 256;
 
     private GLCapabilitiesChooser chooser;
-    private boolean isChosen = false;
+    private boolean isDetermined = false;
+    private boolean isExternal = false;
 
     WindowsWGLGraphicsConfiguration(AbstractGraphicsScreen screen, 
                                     GLCapabilitiesImmutable capsChosen, GLCapabilitiesImmutable capsRequested,
                                     GLCapabilitiesChooser chooser) {
         super(screen, capsChosen, capsRequested);
         this.chooser=chooser;
-        this.isChosen = false;
+        this.isDetermined = false;
     }
 
     WindowsWGLGraphicsConfiguration(AbstractGraphicsScreen screen,
@@ -79,7 +81,7 @@ public class WindowsWGLGraphicsConfiguration extends DefaultGraphicsConfiguratio
     }
 
 
-    static WindowsWGLGraphicsConfiguration createFromCurrent(GLDrawableFactory _factory, long hdc, int pfdID,
+    static WindowsWGLGraphicsConfiguration createFromExternal(GLDrawableFactory _factory, long hdc, int pfdID,
                                                              GLProfile glp, AbstractGraphicsScreen screen, boolean onscreen)
     {
         if(_factory==null) {
@@ -111,7 +113,9 @@ public class WindowsWGLGraphicsConfiguration extends DefaultGraphicsConfiguratio
                                   ", pfdID "+pfdID+", onscreen "+onscreen+", hasARB "+hasARB);
         }
 
-        return new WindowsWGLGraphicsConfiguration(screen, caps, caps);
+        WindowsWGLGraphicsConfiguration cfg = new WindowsWGLGraphicsConfiguration(screen, caps, caps);
+        cfg.markExternal();
+        return cfg;
     }
 
     public Object clone() {
@@ -128,6 +132,7 @@ public class WindowsWGLGraphicsConfiguration extends DefaultGraphicsConfiguratio
      * @param pfIDs optional pool of preselected PixelFormat IDs, maybe null for unrestricted selection
      *
      * @see #isDetermined()
+     * @see #isExternal()
      */
     public final void updateGraphicsConfiguration(GLDrawableFactory factory, NativeSurface ns, int[] pfIDs) {
         WindowsWGLGraphicsConfigurationFactory.updateGraphicsConfiguration(chooser, factory, ns, pfIDs);
@@ -148,18 +153,76 @@ public class WindowsWGLGraphicsConfiguration extends DefaultGraphicsConfiguratio
         WindowsWGLGraphicsConfigurationFactory.preselectGraphicsConfiguration(chooser, factory, device, this, pfdIDs);
     }
 
+    /**
+     * Sets the hdc's PixelFormat, this configuration's capabilities and marks it as determined.
+     */
+    final void setPixelFormat(long hdc, WGLGLCapabilities caps) {
+        if (0 == hdc) {
+            throw new GLException("Error: HDC is null");
+        }
+    
+        if (!GDI.SetPixelFormat(hdc, caps.getPFDID(), caps.getPFD())) {
+            throw new GLException("Unable to set pixel format " + caps +
+                                  " for device context " + toHexString(hdc) +
+                                  ": error code " + GDI.GetLastError());
+        }
+        if(!caps.isBackgroundOpaque()) {
+            final long hwnd = GDI.WindowFromDC(hdc);
+            DWM_BLURBEHIND bb = DWM_BLURBEHIND.create();
+            bb.setDwFlags(GDI.DWM_BB_ENABLE);
+            bb.setFEnable(1);
+            boolean ok = GDI.DwmEnableBlurBehindWindow(hwnd, bb);
+            if(ok) {
+                MARGINS m = MARGINS.create();
+                m.setCxLeftWidth(-1);
+                m.setCxRightWidth(-1);
+                m.setCyBottomHeight(-1);
+                m.setCyTopHeight(-1);
+                ok = GDI.DwmExtendFrameIntoClientArea(hwnd, m);
+            }
+            if(DEBUG) {
+                System.err.println("!!! translucency enabled on wnd: 0x"+Long.toHexString(hwnd)+" - ok: "+ok);
+            }
+        }
+        if (DEBUG) {
+            System.err.println("!!! setPixelFormat (ARB): hdc "+toHexString(hdc) +", "+caps);
+        }
+        setCapsPFD(caps);
+    }
+    
+    /**
+     * Only sets this configuration's capabilities and marks it as determined,
+     * the actual pixelformat is not set.
+     */
     final void setCapsPFD(WGLGLCapabilities caps) {
         setChosenCapabilities(caps);
-        this.isChosen=true;
+        this.isDetermined = true;
         if (DEBUG) {
             System.err.println("*** setCapsPFD: "+caps);
         }
     }
 
-    public final boolean isDetermined() { return isChosen; }
-    public final PIXELFORMATDESCRIPTOR getPixelFormat()   { return isChosen ? ((WGLGLCapabilities)capabilitiesChosen).getPFD() : null; }
-    public final int getPixelFormatID() { return isChosen ? ((WGLGLCapabilities)capabilitiesChosen).getPFDID() : 0; }
-    public final boolean isChoosenByARB() { return isChosen ? ((WGLGLCapabilities)capabilitiesChosen).isSetByARB() : false; }
+    /**
+     * External configuration's HDC pixelformat shall not be modified
+     */
+    public final boolean isExternal() { return isExternal; }
+    
+    final void markExternal() {
+        this.isExternal=true;
+    }
+    
+    /**
+     * Determined configuration states set target capabilties via {@link #setCapsPFD(WGLGLCapabilities)},
+     * but does not imply a set pixelformat.
+     * 
+     * @see #setPixelFormat(long, WGLGLCapabilities) 
+     * @see #setCapsPFD(WGLGLCapabilities)
+     */
+    public final boolean isDetermined() { return isDetermined; }
+    
+    public final PIXELFORMATDESCRIPTOR getPixelFormat()   { return isDetermined ? ((WGLGLCapabilities)capabilitiesChosen).getPFD() : null; }
+    public final int getPixelFormatID() { return isDetermined ? ((WGLGLCapabilities)capabilitiesChosen).getPFDID() : 0; }
+    public final boolean isChoosenByARB() { return isDetermined ? ((WGLGLCapabilities)capabilitiesChosen).isSetByARB() : false; }
 
     static int fillAttribsForGeneralWGLARBQuery(WindowsWGLDrawableFactory.SharedResource sharedResource, int[] iattributes) {
         int niattribs = 0;
@@ -187,15 +250,18 @@ public class WindowsWGLGraphicsConfiguration extends DefaultGraphicsConfiguratio
             iattributes[niattribs++] = WGLExt.WGL_SAMPLE_BUFFERS_ARB;
             iattributes[niattribs++] = WGLExt.WGL_SAMPLES_ARB;
         }
+            
         if(sharedResource.hasARBPBuffer()) {
-            // pbo float buffer
-            iattributes[niattribs++] = WGLExt.WGL_PIXEL_TYPE_ARB;      // ati
-            iattributes[niattribs++] = WGLExt.WGL_FLOAT_COMPONENTS_NV; // nvidia
+            WindowsWGLContext sharedCtx = sharedResource.getContext();
+            if(null != sharedCtx && sharedCtx.isExtensionAvailable(WindowsWGLDrawableFactory.WGL_NV_float_buffer)) {
+                // pbo float buffer
+                iattributes[niattribs++] = WGLExt.WGL_FLOAT_COMPONENTS_NV; // nvidia
+            }
         }
 
         return niattribs;
     }
-
+    
     static boolean wglARBPFIDValid(WindowsWGLContext sharedCtx, long hdc, int pfdID) {
         int[] in = new int[1];
         int[] out = new int[1];
@@ -253,10 +319,10 @@ public class WindowsWGLGraphicsConfiguration extends DefaultGraphicsConfiguratio
             throw new GLException("wglARBPFID2GLCapabilities: Error getting pixel format attributes for pixel format " + pfdID + 
                                   " of device context " + toHexString(hdc) + ", werr " + GDI.GetLastError());
         }
-        ArrayList bucket = new ArrayList(1);
+        ArrayList<WGLGLCapabilities> bucket = new ArrayList<WGLGLCapabilities>(1);
         final int winattrbits = GLGraphicsConfigurationUtil.getWinAttributeBits(onscreen, usePBuffer);
         if(AttribList2GLCapabilities(bucket, glp, hdc, pfdID, iattributes, niattribs, iresults, winattrbits)) {
-            return (WGLGLCapabilities) bucket.get(0);
+            return bucket.get(0);
         }
         return null;
     }
@@ -330,7 +396,7 @@ public class WindowsWGLGraphicsConfiguration extends DefaultGraphicsConfiguratio
         int[] iresults    = new int [2*MAX_ATTRIBS];
         int niattribs = fillAttribsForGeneralWGLARBQuery(sharedResource, iattributes);
 
-        ArrayList bucket = new ArrayList();
+        ArrayList<GLCapabilitiesImmutable> bucket = new ArrayList<GLCapabilitiesImmutable>();
 
         for(int i = 0; i<numFormats; i++) {
             if ( pfdIDs[i] >= 1 &&
@@ -432,6 +498,7 @@ public class WindowsWGLGraphicsConfiguration extends DefaultGraphicsConfiguratio
         boolean rect     = caps.getPbufferRenderToTextureRectangle();
         boolean useFloat = caps.getPbufferFloatingPointBuffers();
         boolean ati      = false;
+        boolean nvidia   = false;
         if (pbuffer && sharedResource.hasARBPBuffer()) {
           // Check some invariants and set up some state
           if (rect && !rtt) {
@@ -446,21 +513,21 @@ public class WindowsWGLGraphicsConfiguration extends DefaultGraphicsConfiguratio
           }
 
           if (useFloat) {
-            if (!sharedCtx.isExtensionAvailable("WGL_ATI_pixel_format_float") &&
-                !sharedCtx.isExtensionAvailable("WGL_NV_float_buffer")) {
-              throw new GLException("Floating-point pbuffers not supported by this hardware");
-            }
-
             // Prefer NVidia extension over ATI
-            if (sharedCtx.isExtensionAvailable("WGL_NV_float_buffer")) {
-              ati = false;
+            nvidia = sharedCtx.isExtensionAvailable(WindowsWGLDrawableFactory.WGL_NV_float_buffer);
+            if(nvidia) {
               floatMode[0] = GLPbuffer.NV_FLOAT;
             } else {
-              ati = true;
-              floatMode[0] = GLPbuffer.ATI_FLOAT;
+                ati = sharedCtx.isExtensionAvailable("WGL_ATI_pixel_format_float");
+                if(ati) {
+                    floatMode[0] = GLPbuffer.ATI_FLOAT;
+                } else {
+                    throw new GLException("Floating-point pbuffers not supported by this hardware");                    
+                }
             }
+            
             if (DEBUG) {
-              System.err.println("Using " + (ati ? "ATI" : "NVidia") + " floating-point extension");
+              System.err.println("Using " + (ati ? "ATI" : ( nvidia ? "NVidia" : "NONE" ) ) + " floating-point extension");
             }
           }
 
@@ -483,7 +550,7 @@ public class WindowsWGLGraphicsConfiguration extends DefaultGraphicsConfiguratio
             }
           }
 
-          if (useFloat && !ati) {
+          if (useFloat && nvidia) {
             iattributes[niattribs++] = WGLExt.WGL_FLOAT_COMPONENTS_NV;
             iattributes[niattribs++] = GL.GL_TRUE;
           }
@@ -491,6 +558,7 @@ public class WindowsWGLGraphicsConfiguration extends DefaultGraphicsConfiguratio
           if (rtt) {
             if (useFloat) {
               assert(!ati);
+              assert(nvidia);
               if (!rect) {
                 throw new GLException("Render-to-floating-point-texture only supported on NVidia hardware with render-to-texture-rectangle");
               }
@@ -530,7 +598,7 @@ public class WindowsWGLGraphicsConfiguration extends DefaultGraphicsConfiguratio
         return val;
     }
 
-    static boolean AttribList2GLCapabilities( ArrayList capsBucket,
+    static boolean AttribList2GLCapabilities( ArrayList<? extends GLCapabilitiesImmutable> capsBucket,
                                               final GLProfile glp, final long hdc, final int pfdID, final int[] iattribs,
                                               final int niattribs,
                                               final int[] iresults, final int winattrmask) {
@@ -542,7 +610,7 @@ public class WindowsWGLGraphicsConfiguration extends DefaultGraphicsConfiguratio
         }
         PIXELFORMATDESCRIPTOR pfd = createPixelFormatDescriptor();
 
-        if (GDI.DescribePixelFormat(hdc, pfdID, pfd.size(), pfd) == 0) {
+        if (GDI.DescribePixelFormat(hdc, pfdID, PIXELFORMATDESCRIPTOR.size(), pfd) == 0) {
             // remove displayable bits, since pfdID is non displayable
             drawableTypeBits = drawableTypeBits & ~(GLGraphicsConfigurationUtil.WINDOW_BIT | GLGraphicsConfigurationUtil.BITMAP_BIT);
             if( 0 == drawableTypeBits ) {
@@ -589,14 +657,14 @@ public class WindowsWGLGraphicsConfiguration extends DefaultGraphicsConfiguratio
 
     static WGLGLCapabilities PFD2GLCapabilities(GLProfile glp, long hdc, int pfdID, boolean onscreen) {
         final int winattrmask = GLGraphicsConfigurationUtil.getWinAttributeBits(onscreen, false);
-        ArrayList capsBucket = new ArrayList(1);
+        ArrayList<WGLGLCapabilities> capsBucket = new ArrayList<WGLGLCapabilities>(1);
         if( PFD2GLCapabilities(capsBucket, glp, hdc, pfdID, winattrmask) ) {
-            return (WGLGLCapabilities) capsBucket.get(0);
+            return capsBucket.get(0);
         }
         return null;
     }
 
-    static boolean  PFD2GLCapabilities(ArrayList capsBucket, final GLProfile glp, final long hdc, final int pfdID, final int winattrmask) {
+    static boolean  PFD2GLCapabilities(ArrayList<? extends 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 fdf10a5..a485f8c 100644
--- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java
+++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java
@@ -44,6 +44,7 @@ import javax.media.nativewindow.NativeSurface;
 import javax.media.nativewindow.NativeWindowFactory;
 import javax.media.opengl.GLCapabilitiesImmutable;
 import javax.media.opengl.GLCapabilitiesChooser;
+import javax.media.opengl.GLContext;
 import javax.media.opengl.GLDrawableFactory;
 import javax.media.opengl.GLException;
 import javax.media.opengl.GLProfile;
@@ -52,7 +53,6 @@ import jogamp.nativewindow.windows.GDI;
 import jogamp.nativewindow.windows.PIXELFORMATDESCRIPTOR;
 import jogamp.opengl.GLGraphicsConfigurationFactory;
 import jogamp.opengl.GLGraphicsConfigurationUtil;
-import jogamp.opengl.SharedResourceRunner;
 
 import java.util.ArrayList;
 import java.util.Collections;
@@ -105,16 +105,23 @@ public class WindowsWGLGraphicsConfigurationFactory extends GLGraphicsConfigurat
         return new WindowsWGLGraphicsConfiguration( absScreen, capsChosen, capsReq, (GLCapabilitiesChooser)chooser );
     }
 
-    protected static List/*<WGLGLCapabilities>*/ getAvailableCapabilities(WindowsWGLDrawableFactory factory, AbstractGraphicsDevice device) {
+    protected static List<GLCapabilitiesImmutable> getAvailableCapabilities(WindowsWGLDrawableFactory factory, AbstractGraphicsDevice device) {
         WindowsWGLDrawableFactory.SharedResource sharedResource = factory.getOrCreateSharedResource(device);
         if(null == sharedResource) {
             throw new GLException("Shared resource for device n/a: "+device);
         }
         WindowsWGLDrawable sharedDrawable = sharedResource.getDrawable();
         GLCapabilitiesImmutable capsChosen = sharedDrawable.getChosenGLCapabilities();
-        List availableCaps = null;
-
-        sharedDrawable.lockSurface();
+        WindowsWGLContext sharedContext = sharedResource.getContext();
+        List/*<GLCapabilitiesImmutable>*/ availableCaps = null;
+        
+        if ( sharedResource.needsCurrentContext4ARBPFDQueries() ) {
+            if(GLContext.CONTEXT_NOT_CURRENT == sharedContext.makeCurrent()) {
+                throw new GLException("Could not make Shared Context current: "+device);
+            }
+        } else {
+            sharedDrawable.lockSurface();
+        }
         try {
             long hdc = sharedDrawable.getHandle();
             if (0 == hdc) {
@@ -123,28 +130,32 @@ public class WindowsWGLGraphicsConfigurationFactory extends GLGraphicsConfigurat
             if (sharedResource.hasARBPixelFormat()) {
                 availableCaps = getAvailableGLCapabilitiesARB(hdc, sharedResource, capsChosen.getGLProfile());
             }
-            if( null == availableCaps || 0 == availableCaps.size() ) {
+            if( null == availableCaps || availableCaps.isEmpty() ) {
                 availableCaps = getAvailableGLCapabilitiesGDI(hdc, capsChosen.getGLProfile());
             }
         } finally {
-            sharedDrawable.unlockSurface();
+            if ( sharedResource.needsCurrentContext4ARBPFDQueries() ) {
+                sharedContext.release();    
+            } else {
+                sharedDrawable.unlockSurface();
+            }            
         }
 
-        if( null != availableCaps ) {
+        if( null != availableCaps && availableCaps.size() > 1 ) {
             Collections.sort(availableCaps, PfdIDComparator);
         }
         return availableCaps;
     }
 
-    static List/*<WGLGLCapabilities>*/ getAvailableGLCapabilitiesARB(long hdc, WindowsWGLDrawableFactory.SharedResource sharedResource, GLProfile glProfile) {
+    static List/*<GLCapabilitiesImmutable>*/ getAvailableGLCapabilitiesARB(long hdc, WindowsWGLDrawableFactory.SharedResource sharedResource, GLProfile glProfile) {
         int[] pformats = WindowsWGLGraphicsConfiguration.wglAllARBPFIDs(sharedResource.getContext(), hdc);
         return WindowsWGLGraphicsConfiguration.wglARBPFIDs2AllGLCapabilities(sharedResource, hdc, pformats, glProfile);
     }
 
-    static List/*<WGLGLCapabilities>*/ getAvailableGLCapabilitiesGDI(long hdc, GLProfile glProfile) {
+    static List/*<GLCapabilitiesImmutable>*/ getAvailableGLCapabilitiesGDI(long hdc, GLProfile glProfile) {
         int[] pformats = WindowsWGLGraphicsConfiguration.wglAllGDIPFIDs(hdc);
         int numFormats = pformats.length;
-        ArrayList bucket = new ArrayList(numFormats);
+        ArrayList<GLCapabilitiesImmutable> bucket = new ArrayList<GLCapabilitiesImmutable>(numFormats);
         for (int i = 0; i < numFormats; i++) {
             WindowsWGLGraphicsConfiguration.PFD2GLCapabilities(bucket, glProfile, hdc, pformats[i], GLGraphicsConfigurationUtil.ALL_BITS);
         }
@@ -180,24 +191,25 @@ public class WindowsWGLGraphicsConfigurationFactory extends GLGraphicsConfigurat
             }
             WindowsWGLGraphicsConfiguration config = (WindowsWGLGraphicsConfiguration) ns.getGraphicsConfiguration().getNativeGraphicsConfiguration();
 
-            if(!config.isDetermined()) {
-                updateGraphicsConfiguration(config, chooser, factory, hdc, false, pfdIDs);
-            } else {
-                // set PFD if not set yet
-                int pfdID = -1;
-                boolean set = false;
-                if ( 1 > ( pfdID = GDI.GetPixelFormat(hdc) ) ) {
-                    if (!GDI.SetPixelFormat(hdc, config.getPixelFormatID(), config.getPixelFormat())) {
-                        throw new GLException("Unable to set pixel format " + config.getPixelFormatID() +
-                                              " for device context " + toHexString(hdc) +
-                                              ": error code " + GDI.GetLastError());
+            if( !config.isExternal() ) {
+                if( !config.isDetermined() ) {
+                    updateGraphicsConfiguration(config, chooser, factory, hdc, false, pfdIDs);
+                } else {
+                    // set PFD if not set yet
+                    int pfdID = -1;
+                    boolean set = false;
+                    if ( 1 > ( pfdID = GDI.GetPixelFormat(hdc) ) ) {
+                        if (!GDI.SetPixelFormat(hdc, config.getPixelFormatID(), config.getPixelFormat())) {
+                            throw new GLException("Unable to set pixel format " + config.getPixelFormatID() +
+                                                  " for device context " + toHexString(hdc) +
+                                                  ": error code " + GDI.GetLastError());
+                        }
+                        set = true;                        
+                    }
+                    if (DEBUG) {
+                        System.err.println("!!! setPixelFormat (post): hdc "+toHexString(hdc) +", "+pfdID+" -> "+config.getPixelFormatID()+", set: "+set);
+                        Thread.dumpStack();
                     }
-                    set = true;
-                    pfdID = config.getPixelFormatID();
-                }
-                if (DEBUG) {
-                    System.err.println("!!! setPixelFormat (post): hdc "+toHexString(hdc) +", "+config.getPixelFormatID()+" -> "+pfdID+", set: "+set);
-                    Thread.dumpStack();
                 }
             }
         } finally {
@@ -247,8 +259,23 @@ public class WindowsWGLGraphicsConfigurationFactory extends GLGraphicsConfigurat
             }
             System.err.println("!!! user chosen caps " + config.getChosenCapabilities());
         }
-        if( !updateGraphicsConfigurationARB(hdc, extHDC, config, chooser, (WindowsWGLDrawableFactory)factory, pfdIDs) ) {
-            updateGraphicsConfigurationGDI(hdc, extHDC, config, chooser, pfdIDs);
+        AbstractGraphicsDevice device = config.getScreen().getDevice();
+        WindowsWGLDrawableFactory.SharedResource sharedResource = ((WindowsWGLDrawableFactory)factory).getOrCreateSharedResource(device);
+        WindowsWGLContext sharedContext = null;
+        if (null != sharedResource && sharedResource.needsCurrentContext4ARBPFDQueries()) {
+            sharedContext = sharedResource.getContext();
+            if(GLContext.CONTEXT_NOT_CURRENT == sharedContext.makeCurrent()) {
+                throw new GLException("Could not make Shared Context current: "+device);
+            }
+        }
+        try {
+            if( !updateGraphicsConfigurationARB(hdc, extHDC, config, chooser, (WindowsWGLDrawableFactory)factory, pfdIDs) ) {
+                updateGraphicsConfigurationGDI(hdc, extHDC, config, chooser, pfdIDs);
+            }
+        } finally {
+            if (null != sharedContext) {
+                sharedContext.release();
+            }
         }
     }
 
@@ -271,9 +298,14 @@ public class WindowsWGLGraphicsConfigurationFactory extends GLGraphicsConfigurat
         }
 
         GLCapabilitiesImmutable capsChosen = (GLCapabilitiesImmutable) config.getChosenCapabilities();
+        boolean isOpaque = capsChosen.isBackgroundOpaque() && GDI.DwmIsCompositionEnabled();
         boolean onscreen = capsChosen.isOnscreen();
         boolean usePBuffer = capsChosen.isPBuffer();
         GLProfile glProfile = capsChosen.getGLProfile();
+        
+        if(DEBUG) {
+            System.err.println("!!! translucency requested: "+(!capsChosen.isBackgroundOpaque())+", compositioning enabled: "+GDI.DwmIsCompositionEnabled()+" -> translucency "+(!isOpaque));
+        }
 
         WGLGLCapabilities pixelFormatCaps = null; // chosen or preset PFD ID's caps
         boolean pixelFormatSet = false; // indicates a preset PFD ID [caps]
@@ -289,6 +321,7 @@ public class WindowsWGLGraphicsConfigurationFactory extends GLGraphicsConfigurat
             }
             pixelFormatSet = true;
             pixelFormatCaps = WindowsWGLGraphicsConfiguration.wglARBPFID2GLCapabilities(sharedResource, hdc, presetPFDID, glProfile, onscreen, usePBuffer);
+            pixelFormatCaps = (WGLGLCapabilities) GLGraphicsConfigurationUtil.fixOpaqueGLCapabilities(pixelFormatCaps, isOpaque);
         } else {
             int recommendedIndex = -1; // recommended index
 
@@ -364,8 +397,9 @@ public class WindowsWGLGraphicsConfigurationFactory extends GLGraphicsConfigurat
             if( null == pixelFormatCaps) {
                 throw new GLException("Null Capabilities with "+
                                       " chosen pfdID: native recommended "+ (recommendedIndex+1) +
-                                      " chosen "+pixelFormatCaps.getPFDID());
+                                      " chosen idx "+chosenIndex);
             }
+            pixelFormatCaps = (WGLGLCapabilities) GLGraphicsConfigurationUtil.fixOpaqueGLCapabilities(pixelFormatCaps, isOpaque);
             if (DEBUG) {
                 System.err.println("!!! chosen pfdID (ARB): native recommended "+ (recommendedIndex+1) +
                                    " chosen "+pixelFormatCaps);
@@ -373,16 +407,10 @@ public class WindowsWGLGraphicsConfigurationFactory extends GLGraphicsConfigurat
         }
 
         if ( !extHDC && !pixelFormatSet ) {
-            if (!GDI.SetPixelFormat(hdc, pixelFormatCaps.getPFDID(), pixelFormatCaps.getPFD())) {
-                throw new GLException("Unable to set pixel format " + pixelFormatCaps.getPFDID() +
-                                      " for device context " + toHexString(hdc) +
-                                      ": error code " + GDI.GetLastError());
-            }
-            if (DEBUG) {
-                System.err.println("!!! setPixelFormat (ARB): hdc "+toHexString(hdc) +", "+config.getPixelFormatID()+" -> "+pixelFormatCaps.getPFDID());
-            }
+            config.setPixelFormat(hdc, pixelFormatCaps);
+        } else {
+            config.setCapsPFD(pixelFormatCaps);
         }
-        config.setCapsPFD(pixelFormatCaps);
         return true;
     }
 
@@ -398,7 +426,7 @@ public class WindowsWGLGraphicsConfigurationFactory extends GLGraphicsConfigurat
         boolean onscreen = capsChosen.isOnscreen();
         GLProfile glProfile = capsChosen.getGLProfile();
 
-        ArrayList/*<WGLGLCapabilities>*/ availableCaps = new ArrayList();
+        ArrayList<WGLGLCapabilities> availableCaps = new ArrayList<WGLGLCapabilities>();
         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]
@@ -447,7 +475,7 @@ public class WindowsWGLGraphicsConfigurationFactory extends GLGraphicsConfigurat
                 }
                 return false;
             }
-            pixelFormatCaps = (WGLGLCapabilities) availableCaps.get(chosenIndex);
+            pixelFormatCaps = availableCaps.get(chosenIndex);
             if (DEBUG) {
                 System.err.println("!!! chosen pfdID (GDI): native recommended "+ (recommendedIndex+1) +
                                    ", caps " + pixelFormatCaps);
@@ -455,16 +483,10 @@ public class WindowsWGLGraphicsConfigurationFactory extends GLGraphicsConfigurat
         }
 
         if ( !extHDC && !pixelFormatSet ) {
-            if (!GDI.SetPixelFormat(hdc, pixelFormatCaps.getPFDID(), pixelFormatCaps.getPFD())) {
-                throw new GLException("Unable to set pixel format " + pixelFormatCaps.getPFDID() +
-                                      " for device context " + toHexString(hdc) +
-                                      ": error code " + GDI.GetLastError());
-            }
-            if (DEBUG) {
-                System.err.println("!!! setPixelFormat (GDI): hdc "+toHexString(hdc) +", "+config.getPixelFormatID()+" -> " + pixelFormatCaps.getPFDID());
-            }
+            config.setPixelFormat(hdc, pixelFormatCaps);
+        } else {
+            config.setCapsPFD(pixelFormatCaps);
         }
-        config.setCapsPFD(pixelFormatCaps);
         return true;
     }
 }
diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11ExternalGLXContext.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11ExternalGLXContext.java
index c488fe5..d0d9929 100644
--- a/src/jogl/classes/jogamp/opengl/x11/glx/X11ExternalGLXContext.java
+++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11ExternalGLXContext.java
@@ -53,7 +53,7 @@ public class X11ExternalGLXContext extends X11GLXContext {
     super(drawable, null);
     this.contextHandle = ctx;
     GLContextShareSet.contextCreated(this);
-    setGLFunctionAvailability(false, 0, 0, CTX_PROFILE_COMPAT|CTX_OPTION_ANY);
+    setGLFunctionAvailability(false, true, 0, 0, CTX_PROFILE_COMPAT|CTX_OPTION_ANY);
     getGLStateTracker().setEnabled(false); // external context usage can't track state in Java
   }
 
@@ -75,7 +75,20 @@ public class X11ExternalGLXContext extends X11GLXContext {
     X11GraphicsScreen x11Screen = (X11GraphicsScreen) X11GraphicsScreen.createScreenDevice(display, val[0]);
 
     GLX.glXQueryContext(display, ctx, GLX.GLX_FBCONFIG_ID, val, 0);
-    X11GLXGraphicsConfiguration cfg = X11GLXGraphicsConfiguration.create(glp, x11Screen, val[0]);
+    X11GLXGraphicsConfiguration cfg = null;
+    // sometimes glXQueryContext on an external context gives us a framebuffer config ID
+    // 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]) ) {
+        GLCapabilities glcapsDefault = new GLCapabilities(GLProfile.getDefault());
+        cfg = X11GLXGraphicsConfigurationFactory.chooseGraphicsConfigurationStatic(glcapsDefault, glcapsDefault, null, x11Screen);
+        if(DEBUG) {
+            System.err.println("X11ExternalGLXContext invalid FBCONFIG_ID "+val[0]+", using default cfg: " + cfg);
+        }
+    } else {
+        cfg = X11GLXGraphicsConfiguration.create(glp, x11Screen, val[0]);
+    }
 
     WrappedSurface ns = new WrappedSurface(cfg);
     ns.setSurfaceHandle(drawable);
diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLCapabilities.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLCapabilities.java
index 5455976..f4f0119 100644
--- a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLCapabilities.java
+++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLCapabilities.java
@@ -35,20 +35,20 @@ import javax.media.opengl.GLProfile;
 import java.util.Comparator;
 
 public class X11GLCapabilities extends GLCapabilities {
-  XVisualInfo xVisualInfo; // maybe null if !onscreen
-  long fbcfg;
-  int  fbcfgid;
+  final XVisualInfo xVisualInfo; // maybe null if !onscreen
+  final long fbcfg;
+  final int  fbcfgid;
 
   /** Comparing xvisual id only */
   public static class XVisualIDComparator implements Comparator {
 
       public int compare(Object o1, Object o2) {
         if ( ! ( o1 instanceof X11GLCapabilities ) ) {
-            Class c = (null != o1) ? o1.getClass() : null ;
+            Class<?> c = (null != o1) ? o1.getClass() : null ;
             throw new ClassCastException("arg1 not a X11GLCapabilities object: " + c);
         }
         if ( ! ( o2 instanceof X11GLCapabilities ) ) {
-            Class c = (null != o2) ? o2.getClass() : null ;
+            Class<?> c = (null != o2) ? o2.getClass() : null ;
             throw new ClassCastException("arg2 not a X11GLCapabilities object: " + c);
         }
 
diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java
index 7d7614c..26ad41f 100644
--- a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java
+++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java
@@ -47,6 +47,7 @@ import javax.media.opengl.*;
 import javax.media.nativewindow.*;
 import javax.media.nativewindow.x11.X11GraphicsDevice;
 
+import com.jogamp.common.nio.Buffers;
 import com.jogamp.common.util.VersionNumber;
 import jogamp.opengl.*;
 import com.jogamp.gluegen.runtime.ProcAddressTable;
@@ -56,17 +57,17 @@ import jogamp.nativewindow.x11.X11Util;
 public abstract class X11GLXContext extends GLContextImpl {
   protected static final boolean TRACE_CONTEXT_CURRENT = false; // true;
 
-  private static final Map/*<String, String>*/ functionNameMap;
-  private static final Map/*<String, String>*/ extensionNameMap;
+  private static final Map<String, String> functionNameMap;
+  private static final Map<String, String> extensionNameMap;
   private VersionNumber glXVersion;
+  private boolean glXVersionOneOneCapable;
   private boolean glXVersionOneThreeCapable;
-  private boolean glXQueryExtensionsStringInitialized;
-  private boolean glXQueryExtensionsStringAvailable;
-  private GLXExt glXExt;
+  private GLXExt _glXExt;
   // Table that holds the addresses of the native C-language entry points for
   // GLX extension functions.
   private GLXExtProcAddressTable glXExtProcAddressTable;
   private int hasSwapIntervalSGI = 0;
+  private int hasSwapGroupNV = 0;
 
   // This indicates whether the context we have created is indirect
   // and therefore requires the toolkit to be locked around all GL
@@ -74,11 +75,11 @@ public abstract class X11GLXContext extends GLContextImpl {
   protected boolean isDirect;
 
   static {
-    functionNameMap = new HashMap();
+    functionNameMap = new HashMap<String, String>();
     functionNameMap.put("glAllocateMemoryNV", "glXAllocateMemoryNV");
     functionNameMap.put("glFreeMemoryNV", "glXFreeMemoryNV");
 
-    extensionNameMap = new HashMap();
+    extensionNameMap = new HashMap<String, String>();
     extensionNameMap.put("GL_ARB_pbuffer",      "GLX_SGIX_pbuffer");
     extensionNameMap.put("GL_ARB_pixel_format", "GLX_SGIX_pbuffer"); // good enough
   }
@@ -88,15 +89,17 @@ public abstract class X11GLXContext extends GLContextImpl {
     super(drawable, shareWith);
   }
   
-  protected void resetState() {
+  @Override
+  protected void resetStates() {
     glXVersion = null;
+    glXVersionOneOneCapable = false;
     glXVersionOneThreeCapable = false;
-    glXQueryExtensionsStringInitialized=false;
-    glXQueryExtensionsStringAvailable=false;
-    // no inner state glXExt=null;
+    // no inner state _glXExt=null;
     glXExtProcAddressTable = null;
     hasSwapIntervalSGI = 0;
+    hasSwapGroupNV = 0;
     isDirect = false;
+    super.resetStates();
   }
 
   public final ProcAddressTable getPlatformExtProcAddressTable() {
@@ -112,26 +115,32 @@ public abstract class X11GLXContext extends GLContextImpl {
   }
 
   public GLXExt getGLXExt() {
-    if (glXExt == null) {
-      glXExt = new GLXExtImpl(this);
+    if (_glXExt == null) {
+      _glXExt = new GLXExtImpl(this);
     }
-    return glXExt;
+    return _glXExt;
   }
 
-  protected Map/*<String, String>*/ getFunctionNameMap() { return functionNameMap; }
+  protected Map<String, String> getFunctionNameMap() { return functionNameMap; }
 
-  protected Map/*<String, String>*/ getExtensionNameMap() { return extensionNameMap; }
+  protected Map<String, String> getExtensionNameMap() { return extensionNameMap; }
 
-  public final boolean isGLXVersionGreaterEqualOneThree() {
+  private final void initGLXVersion() {
     if(null == glXVersion) {
-        X11GLXDrawableFactory factory = (X11GLXDrawableFactory)drawable.getFactoryImpl();
-
         X11GLXGraphicsConfiguration config = (X11GLXGraphicsConfiguration)drawable.getNativeSurface().getGraphicsConfiguration().getNativeGraphicsConfiguration();
         X11GraphicsDevice device = (X11GraphicsDevice) config.getScreen().getDevice();
 
-        glXVersion = factory.getGLXVersion(device);
-        glXVersionOneThreeCapable = ( null != glXVersion ) ? glXVersion.compareTo(X11GLXDrawableFactory.versionOneThree) >= 0 : false ;
-    }
+        glXVersion = X11GLXDrawableFactory.getGLXVersion(device);
+        glXVersionOneOneCapable   = ( null != glXVersion ) ? glXVersion.compareTo(GLDrawableFactoryImpl.versionOneOne) >= 0 : false ;
+        glXVersionOneThreeCapable = ( null != glXVersion ) ? glXVersion.compareTo(GLDrawableFactoryImpl.versionOneThree) >= 0 : false ;
+    }      
+  }
+  public final boolean isGLXVersionGreaterEqualOneOne() {
+    initGLXVersion();
+    return glXVersionOneOneCapable;
+  }
+  public final boolean isGLXVersionGreaterEqualOneThree() {
+    initGLXVersion();
     return glXVersionOneThreeCapable;
   }
 
@@ -177,6 +186,19 @@ public abstract class X11GLXContext extends GLContextImpl {
     GLX.glXDestroyContext(display, ctx);
   }
 
+  private static final int ctx_arb_attribs_idx_major = 0;
+  private static final int ctx_arb_attribs_idx_minor = 2;
+  private static final int ctx_arb_attribs_idx_flags = 6;
+  private static final int ctx_arb_attribs_idx_profile = 8;
+  private static final int ctx_arb_attribs_rom[] = {
+        /*  0 */ GLX.GLX_CONTEXT_MAJOR_VERSION_ARB, 0,
+        /*  2 */ GLX.GLX_CONTEXT_MINOR_VERSION_ARB, 0,
+        /*  4 */ GLX.GLX_RENDER_TYPE,               GLX.GLX_RGBA_TYPE, // default
+        /*  6 */ GLX.GLX_CONTEXT_FLAGS_ARB,         0,
+        /*  8 */ 0,                                 0,
+        /* 10 */ 0
+    };
+    
   protected long createContextARBImpl(long share, boolean direct, int ctp, int major, int minor) {
     updateGLXProcAddressTable();
     GLXExt _glXExt = getGLXExt();
@@ -193,35 +215,28 @@ public abstract class X11GLXContext extends GLContextImpl {
 
     long ctx=0;
 
-    final int idx_flags = 6;
-    final int idx_profile = 8;
-
-    int attribs[] = {
-        /*  0 */ GLX.GLX_CONTEXT_MAJOR_VERSION_ARB, major,
-        /*  2 */ GLX.GLX_CONTEXT_MINOR_VERSION_ARB, minor,
-        /*  4 */ GLX.GLX_RENDER_TYPE,               GLX.GLX_RGBA_TYPE, // default
-        /*  6 */ GLX.GLX_CONTEXT_FLAGS_ARB,         0,
-        /*  8 */ 0,                                 0,
-        /* 10 */ 0
-    };
-
+    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  ) {
-        // FIXME: Verify with a None drawable binding (default framebuffer)
-        attribs[idx_profile+0]  = GLX.GLX_CONTEXT_PROFILE_MASK_ARB;
+        attribs.put(ctx_arb_attribs_idx_profile + 0, GLX.GLX_CONTEXT_PROFILE_MASK_ARB);
         if( ctBwdCompat ) {
-            attribs[idx_profile+1]  = GLX.GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB;
+            attribs.put(ctx_arb_attribs_idx_profile + 1, GLX.GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB);
         } else {
-            attribs[idx_profile+1]  = GLX.GLX_CONTEXT_CORE_PROFILE_BIT_ARB;
+            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);
         if( !ctBwdCompat && ctFwdCompat ) {
-            attribs[idx_flags+1] |= GLX.GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB;
+            flags |= GLX.GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB;
         }
         if( ctDebug) {
-            attribs[idx_flags+1] |= GLX.GLX_CONTEXT_DEBUG_BIT_ARB;
+            flags |= GLX.GLX_CONTEXT_DEBUG_BIT_ARB;
         }
+        attribs.put(ctx_arb_attribs_idx_flags + 1, flags);
     }
 
     X11GLXGraphicsConfiguration config = (X11GLXGraphicsConfiguration)drawable.getNativeSurface().getGraphicsConfiguration().getNativeGraphicsConfiguration();
@@ -232,7 +247,7 @@ public abstract class X11GLXContext extends GLContextImpl {
         // critical path, a remote display might not support this command,
         // hence we need to catch the X11 Error within this block.
         X11Util.XSync(display, false);
-        ctx = _glXExt.glXCreateContextAttribsARB(display, config.getFBConfig(), share, direct, attribs, 0);
+        ctx = _glXExt.glXCreateContextAttribsARB(display, config.getFBConfig(), share, direct, attribs);
         X11Util.XSync(display, false);
     } catch (RuntimeException re) {
         if(DEBUG) {
@@ -297,7 +312,6 @@ public abstract class X11GLXContext extends GLContextImpl {
 
     GLCapabilitiesImmutable glCaps = (GLCapabilitiesImmutable) config.getChosenCapabilities();
     GLProfile glp = glCaps.getGLProfile();
-    isVendorATI = factory.isGLXVendorATI(device);
 
     if(config.getFBConfigID()<0) {
         // not able to use FBConfig
@@ -311,7 +325,7 @@ public abstract class X11GLXContext extends GLContextImpl {
         if (!glXMakeContextCurrent(display, drawable.getHandle(), drawableRead.getHandle(), contextHandle)) {
           throw new GLException("Error making temp context(0) current: display "+toHexString(display)+", context "+toHexString(contextHandle)+", drawable "+drawable);
         }
-        setGLFunctionAvailability(true, 0, 0, CTX_PROFILE_COMPAT|CTX_OPTION_ANY); // use GL_VERSION
+        setGLFunctionAvailability(true, true, 0, 0, CTX_PROFILE_COMPAT|CTX_OPTION_ANY); // use GL_VERSION
         isDirect = GLX.glXIsDirect(display, contextHandle);
         if (DEBUG) {
             System.err.println(getThreadName() + ": createContextImpl: OK (old-1) share "+share+", direct "+isDirect+"/"+direct);
@@ -319,14 +333,11 @@ public abstract class X11GLXContext extends GLContextImpl {
         return true;
     }
 
-    int minor[] = new int[1];
-    int major[] = new int[1];
-    int ctp[] = new int[1];
     boolean createContextARBTried = false;
 
     // utilize the shared context's GLXExt in case it was using the ARB method and it already exists
     if(null!=sharedContext && sharedContext.isCreatedWithARBMethod()) {
-        contextHandle = createContextARB(share, direct, major, minor, ctp);
+        contextHandle = createContextARB(share, direct);
         createContextARBTried = true;
         if (DEBUG && 0!=contextHandle) {
             System.err.println(getThreadName() + ": createContextImpl: OK (ARB, using sharedContext) share "+share);
@@ -344,7 +355,7 @@ public abstract class X11GLXContext extends GLContextImpl {
         if (!glXMakeContextCurrent(display, drawable.getHandle(), drawableRead.getHandle(), temp_ctx)) {
           throw new GLException("Error making temp context(1) current: display "+toHexString(display)+", context "+toHexString(temp_ctx)+", drawable "+drawable);
         }
-        setGLFunctionAvailability(true, 0, 0, CTX_PROFILE_COMPAT|CTX_OPTION_ANY); // use GL_VERSION
+        setGLFunctionAvailability(true, true, 0, 0, CTX_PROFILE_COMPAT|CTX_OPTION_ANY); // use GL_VERSION
         boolean isCreateContextAttribsARBAvailable = isFunctionAvailable("glXCreateContextAttribsARB");
         glXMakeContextCurrent(display, 0, 0, 0); // release temp context
 
@@ -352,7 +363,7 @@ public abstract class X11GLXContext extends GLContextImpl {
             if ( isCreateContextAttribsARBAvailable &&
                  isExtensionAvailable("GLX_ARB_create_context") ) {
                 // initial ARB context creation
-                contextHandle = createContextARB(share, direct, major, minor, ctp);
+                contextHandle = createContextARB(share, direct);
                 createContextARBTried=true;
                 if (DEBUG) {
                     if(0!=contextHandle) {
@@ -379,10 +390,10 @@ public abstract class X11GLXContext extends GLContextImpl {
         if(glp.isGL3()) {
           glXMakeContextCurrent(display, 0, 0, 0);
           GLX.glXDestroyContext(display, temp_ctx);
-          throw new GLException("X11GLXContext.createContextImpl failed, but context > GL2 requested "+getGLVersion(major[0], minor[0], ctp[0], "@creation")+", ");
+          throw new GLException("X11GLXContext.createContextImpl failed, but context > GL2 requested "+getGLVersion()+", ");
         }
         if(DEBUG) {
-          System.err.println("X11GLXContext.createContextImpl failed, fall back to !ARB context "+getGLVersion(major[0], minor[0], ctp[0], "@creation"));
+          System.err.println("X11GLXContext.createContextImpl failed, fall back to !ARB context "+getGLVersion());
         }
 
         // continue with temp context for GL <= 3.0
@@ -463,21 +474,18 @@ public abstract class X11GLXContext extends GLContextImpl {
   }
 
   protected final void updateGLXProcAddressTable() {
-    AbstractGraphicsConfiguration aconfig = drawable.getNativeSurface().getGraphicsConfiguration().getNativeGraphicsConfiguration();
-    AbstractGraphicsDevice adevice = aconfig.getScreen().getDevice();
-    String key = adevice.getUniqueID();
+    final AbstractGraphicsConfiguration aconfig = drawable.getNativeSurface().getGraphicsConfiguration().getNativeGraphicsConfiguration();
+    final AbstractGraphicsDevice adevice = aconfig.getScreen().getDevice();
+    final String key = "GLX-"+adevice.getUniqueID();
     if (DEBUG) {
       System.err.println(getThreadName() + ": !!! Initializing GLX extension address table: "+key);
     }
-    glXQueryExtensionsStringInitialized = false;
-    glXQueryExtensionsStringAvailable = false;
-
-    GLXExtProcAddressTable table = null;
+    ProcAddressTable table = null;
     synchronized(mappedContextTypeObjectLock) {
-        table = (GLXExtProcAddressTable) mappedGLXProcAddress.get( key );
+        table = mappedGLXProcAddress.get( key );
     }
     if(null != table) {
-        glXExtProcAddressTable = table;
+        glXExtProcAddressTable = (GLXExtProcAddressTable) table;
         if(DEBUG) {
             System.err.println(getThreadName() + ": !!! GLContext GLX ProcAddressTable reusing key("+key+") -> "+table.hashCode());
         }
@@ -496,22 +504,36 @@ public abstract class X11GLXContext extends GLContextImpl {
     }
   }
 
-  public synchronized String getPlatformExtensionsString() {
-    if (!glXQueryExtensionsStringInitialized) {
-      glXQueryExtensionsStringAvailable =
-        getDrawableImpl().getGLDynamicLookupHelper().dynamicLookupFunction("glXQueryExtensionsString") != 0;
-      glXQueryExtensionsStringInitialized = true;
+  protected final StringBuffer getPlatformExtensionsStringImpl() {
+    StringBuffer sb = new StringBuffer();
+    if (DEBUG) {
+      System.err.println("!!! GLX Version "+glXVersion);
     }
-    if (glXQueryExtensionsStringAvailable) {
-        NativeSurface ns = drawable.getNativeSurface();
-        String ret = GLX.glXQueryExtensionsString(ns.getDisplayHandle(), ns.getScreenIndex());
-        if (DEBUG) {
-          System.err.println("!!! GLX extensions: " + ret);
+    if(isGLXVersionGreaterEqualOneOne()) {
+        final NativeSurface ns = drawable.getNativeSurface();
+        {
+            final String ret = GLX.glXGetClientString(ns.getDisplayHandle(), GLX.GLX_EXTENSIONS);
+            if (DEBUG) {
+              System.err.println("!!! GLX extensions (glXGetClientString): " + ret);
+            }
+            sb.append(ret).append(" ");
+        }
+        {
+            final String ret = GLX.glXQueryExtensionsString(ns.getDisplayHandle(), ns.getScreenIndex());
+            if (DEBUG) {
+              System.err.println("!!! GLX extensions (glXQueryExtensionsString): " + ret);
+            }
+            sb.append(ret).append(" ");
+        }
+        {
+            final String ret = GLX.glXQueryServerString(ns.getDisplayHandle(), ns.getScreenIndex(), GLX.GLX_EXTENSIONS);
+            if (DEBUG) {
+              System.err.println("!!! GLX extensions (glXQueryServerString): " + ret);
+            }
+            sb.append(ret).append(" ");
         }
-        return ret;
-    } else {
-      return "";
     }
+    return sb;
   }
 
   public boolean isExtensionAvailable(String glExtensionName) {
@@ -523,6 +545,7 @@ public abstract class X11GLXContext extends GLContextImpl {
     return super.isExtensionAvailable(glExtensionName);
   }
 
+  @Override
   protected void setSwapIntervalImpl(int interval) {
     X11GLXGraphicsConfiguration config = (X11GLXGraphicsConfiguration)drawable.getNativeSurface().getGraphicsConfiguration().getNativeGraphicsConfiguration();
     GLCapabilitiesImmutable glCaps = (GLCapabilitiesImmutable) config.getChosenCapabilities();
@@ -543,6 +566,66 @@ public abstract class X11GLXContext extends GLContextImpl {
     }
   }
 
+  private final int initSwapGroupImpl(GLXExt glXExt) {
+      if(0==hasSwapGroupNV) {
+        try {
+            hasSwapGroupNV = glXExt.isExtensionAvailable("GLX_NV_swap_group")?1:-1;
+        } catch (Throwable t) { hasSwapGroupNV=1; }
+        if(DEBUG) {
+            System.err.println("initSwapGroupImpl: hasSwapGroupNV: "+hasSwapGroupNV);
+        }
+      }
+      return hasSwapGroupNV;
+  }
+  
+  @Override
+  protected final boolean queryMaxSwapGroupsImpl(int[] maxGroups, int maxGroups_offset,
+                                                 int[] maxBarriers, int maxBarriers_offset) {
+      boolean res = false;
+      GLXExt glXExt = getGLXExt();
+      if (initSwapGroupImpl(glXExt)>0) {
+        final NativeSurface ns = drawable.getNativeSurface();
+        try {
+            if( glXExt.glXQueryMaxSwapGroupsNV(ns.getDisplayHandle(), ns.getScreenIndex(), 
+                                               maxGroups, maxGroups_offset,
+                                               maxBarriers, maxBarriers_offset) ) {
+                res = true;
+            }
+        } catch (Throwable t) { hasSwapGroupNV=-1; }
+      }
+      return res;
+  }
+  
+  @Override
+  protected final boolean joinSwapGroupImpl(int group) {
+      boolean res = false;
+      GLXExt glXExt = getGLXExt();
+      if (initSwapGroupImpl(glXExt)>0) {
+        try {
+            if( glXExt.glXJoinSwapGroupNV(drawable.getNativeSurface().getDisplayHandle(), drawable.getHandle(), group) ) {
+                currentSwapGroup = group;
+                res = true;
+            }
+        } catch (Throwable t) { hasSwapGroupNV=-1; }
+      }
+      return res;
+  }
+  
+  @Override
+  protected final boolean bindSwapBarrierImpl(int group, int barrier) {
+      boolean res = false;
+      GLXExt glXExt = getGLXExt();
+      if (initSwapGroupImpl(glXExt)>0) {
+        try {
+            if( glXExt.glXBindSwapBarrierNV(drawable.getNativeSurface().getDisplayHandle(), group, barrier) ) {
+                res = true;
+            }
+        } catch (Throwable t) { hasSwapGroupNV=-1; }
+      }
+      return res;  
+  }
+
+  @Override
   public ByteBuffer glAllocateMemoryNV(int arg0, float arg1, float arg2, float arg3) {
     return getGLXExt().glXAllocateMemoryNV(arg0, arg1, arg2, arg3);
   }
@@ -581,7 +664,4 @@ public abstract class X11GLXContext extends GLContextImpl {
   //----------------------------------------------------------------------
   // Internals only below this point
   //
-
-  private boolean isVendorATI = false;
-
 }
diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java
index 8203a44..51316dc 100644
--- a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java
+++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java
@@ -47,6 +47,7 @@ import javax.media.nativewindow.x11.*;
 import javax.media.opengl.*;
 
 import jogamp.opengl.*;
+
 import com.jogamp.common.JogampRuntimeException;
 import com.jogamp.common.util.*;
 import jogamp.nativewindow.WrappedSurface;
@@ -55,7 +56,6 @@ import jogamp.nativewindow.x11.*;
 public class X11GLXDrawableFactory extends GLDrawableFactoryImpl {
   
   private static final DesktopGLDynamicLookupHelper x11GLXDynamicLookupHelper;
-  static final VersionNumber versionOneThree = new VersionNumber(1, 3, 0);
 
   static {
     DesktopGLDynamicLookupHelper tmp = null;
@@ -171,17 +171,18 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl {
         }
 
         public SharedResourceRunner.Resource createSharedResource(String connection) {
-            X11GraphicsDevice sharedDevice = new X11GraphicsDevice(X11Util.createDisplay(connection), AbstractGraphicsDevice.DEFAULT_UNIT);
+            X11GraphicsDevice sharedDevice = new X11GraphicsDevice(X11Util.openDisplay(connection), AbstractGraphicsDevice.DEFAULT_UNIT);
             sharedDevice.setCloseDisplay(true);
             sharedDevice.lock();
             try {
                 String glXVendorName = GLXUtil.getVendorName(sharedDevice.getHandle());
+                if(X11Util.ATI_HAS_XCLOSEDISPLAY_BUG && GLXUtil.isVendorATI(glXVendorName)) {
+                    X11Util.setMarkAllDisplaysUnclosable(true);
+                    X11Util.markDisplayUncloseable(sharedDevice.getHandle());
+                }
                 X11GraphicsScreen sharedScreen = new X11GraphicsScreen(sharedDevice, 0);
 
-                if (null == sharedScreen) {
-                    throw new GLException("Couldn't create shared screen for device: "+sharedDevice+", idx 0");
-                }
-                GLProfile glp = GLProfile.getMinDesktop(sharedDevice);
+                GLProfile glp = GLProfile.get(sharedDevice, GLProfile.GL_PROFILE_LIST_MIN_DESKTOP);
                 if (null == glp) {
                     throw new GLException("Couldn't get default GLProfile for device: "+sharedDevice);
                 }
@@ -212,7 +213,7 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl {
                 }
                 return new SharedResource(sharedDevice, sharedScreen, sharedDrawable, sharedContext, glXVersion, glXVendorName);
             } catch (Throwable t) {
-                throw new GLException("WindowsWGLDrawableFactory - Could not initialize shared resources for "+connection, t);
+                throw new GLException("X11GLXDrawableFactory - Could not initialize shared resources for "+connection, t);
             } finally {
                 sharedDevice.unlock();
             }
@@ -260,6 +261,14 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl {
       return false;
   }
 
+  public final boolean getWasSharedContextCreated(AbstractGraphicsDevice device) {
+    SharedResourceRunner.Resource sr = sharedResourceRunner.getOrCreateShared(device);
+    if(null!=sr) {
+      return null != sr.getContext();
+    }
+    return false;
+  }
+  
   protected final GLContext getOrCreateSharedContextImpl(AbstractGraphicsDevice device) {
     SharedResourceRunner.Resource sr = sharedResourceRunner.getOrCreateShared(device);
     if(null!=sr) {
@@ -289,27 +298,36 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl {
   }
 
   public final String getGLXVendorName(AbstractGraphicsDevice device) {
-    SharedResourceRunner.Resource sr = sharedResourceRunner.getOrCreateShared(device);
-    if(null!=sr) {
-      return ((SharedResource)sr).getGLXVendorName();
+    if(null != device) {
+        SharedResourceRunner.Resource sr = sharedResourceRunner.getOrCreateShared(device);
+        if(null!=sr) {
+          return ((SharedResource)sr).getGLXVendorName();
+        }
+        return GLXUtil.getVendorName(device.getHandle());
     }
-    return GLXUtil.getVendorName(device.getHandle());
+    return null;
   }
 
   public final boolean isGLXVendorATI(AbstractGraphicsDevice device) {
-    SharedResourceRunner.Resource sr = sharedResourceRunner.getOrCreateShared(device);
-    if(null!=sr) {
-      return ((SharedResource)sr).isGLXVendorATI();
+    if(null != device) {
+        SharedResourceRunner.Resource sr = sharedResourceRunner.getOrCreateShared(device);
+        if(null!=sr) {
+          return ((SharedResource)sr).isGLXVendorATI();
+        }
+        return GLXUtil.isVendorATI(device.getHandle());
     }
-    return GLXUtil.isVendorATI(device.getHandle());
+    return false;
   }
 
   public final boolean isGLXVendorNVIDIA(AbstractGraphicsDevice device) {
-    SharedResourceRunner.Resource sr = sharedResourceRunner.getOrCreateShared(device);
-    if(null!=sr) {
-      return ((SharedResource)sr).isGLXVendorNVIDIA();
+    if(null != device) {
+        SharedResourceRunner.Resource sr = sharedResourceRunner.getOrCreateShared(device);
+        if(null!=sr) {
+          return ((SharedResource)sr).isGLXVendorNVIDIA();
+        }
+        return GLXUtil.isVendorNVIDIA(device.getHandle());
     }
-    return GLXUtil.isVendorNVIDIA(device.getHandle());
+    return false;
   }
 
   protected final void shutdownInstance() {
@@ -320,7 +338,7 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl {
     X11Util.shutdown( false, DEBUG );
   }
 
-  protected List/*GLCapabilitiesImmutable*/ getAvailableCapabilitiesImpl(AbstractGraphicsDevice device) {
+  protected List<GLCapabilitiesImmutable> getAvailableCapabilitiesImpl(AbstractGraphicsDevice device) {
     return X11GLXGraphicsConfigurationFactory.getAvailableCapabilities(this, device);
   }
 
@@ -366,13 +384,15 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl {
   }
 
   public final boolean isGLXVersionGreaterEqualOneThree(AbstractGraphicsDevice device) {
-    SharedResource sr = (SharedResource) sharedResourceRunner.getOrCreateShared(device);
-    if(null!=sr) {
-      return sr.isGLXVersionGreaterEqualOneThree();
-    }
-    if( device instanceof X11GraphicsDevice ) {
-      VersionNumber v = getGLXVersion( (X11GraphicsDevice) device);
-      return ( null != v ) ? v.compareTo(versionOneThree) >= 0 : false ;
+    if(null != device) {  
+        SharedResource sr = (SharedResource) sharedResourceRunner.getOrCreateShared(device);
+        if(null!=sr) {
+          return sr.isGLXVersionGreaterEqualOneThree();
+        }
+        if( device instanceof X11GraphicsDevice ) {
+          VersionNumber v = getGLXVersion( (X11GraphicsDevice) device);
+          return ( null != v ) ? v.compareTo(versionOneThree) >= 0 : false ;
+        }
     }
     return false;
   }
diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDynamicLibraryBundleInfo.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDynamicLibraryBundleInfo.java
index 51b6144..eb6c17c 100644
--- a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDynamicLibraryBundleInfo.java
+++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDynamicLibraryBundleInfo.java
@@ -36,31 +36,29 @@ public class X11GLXDynamicLibraryBundleInfo extends DesktopGLDynamicLibraryBundl
         super();
     }
 
-    public List getToolLibNames() {
-        List/*<List>*/ libNamesList = new ArrayList();
-
-        List/*<String>*/ glesLibNames = new ArrayList();
-
+    public List<List<String>> getToolLibNames() {
+        final List<List<String>> libsList = new ArrayList<List<String>>();
+        final List<String> libsGL = new ArrayList<String>();
+        
         // Be aware that on DRI systems, eg ATI fglrx, etc, 
         // you have to set LIBGL_DRIVERS_PATH env variable.
         // Eg on Ubuntu 64bit systems this is:
         //    export LIBGL_DRIVERS_PATH=/usr/lib/fglrx/dri:/usr/lib32/fglrx/dri
         //
 
-        // this is the default GL lib name, according to the spec
-        glesLibNames.add("libGL.so.1");
+        // this is the default lib name, according to the spec
+        libsGL.add("libGL.so.1");
 
         // try this one as well, if spec fails
-        glesLibNames.add("libGL.so");
+        libsGL.add("libGL.so");
 
         // last but not least .. the generic one
-        glesLibNames.add("GL");
-
-        libNamesList.add(glesLibNames);
-
-        return libNamesList;
-    }
-
+        libsGL.add("GL");
+        
+        libsList.add(libsGL);        
+        return libsList;
+    }    
+    
     /** 
      * This respects old DRI requirements:<br>
      * <pre>
@@ -69,14 +67,14 @@ public class X11GLXDynamicLibraryBundleInfo extends DesktopGLDynamicLibraryBundl
      */
     public boolean shallLinkGlobal() { return true; }
 
-    public final List getToolGetProcAddressFuncNameList() {
-        List res = new ArrayList();
+    public final List<String> getToolGetProcAddressFuncNameList() {
+        List<String> res = new ArrayList<String>();
         res.add("glXGetProcAddressARB");
         res.add("glXGetProcAddress");
         return res;
     }
 
-    public final long toolDynamicLookupFunction(long toolGetProcAddressHandle, String funcName) {
+    public final long toolGetProcAddress(long toolGetProcAddressHandle, String funcName) {
         return GLX.glXGetProcAddress(toolGetProcAddressHandle, funcName);
     }
 }
diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfiguration.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfiguration.java
index c3d4563..68b8135 100644
--- a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfiguration.java
+++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfiguration.java
@@ -138,6 +138,8 @@ public class X11GLXGraphicsConfiguration extends X11GraphicsConfiguration implem
             res[idx++] = GLX.GLX_STEREO;
             res[idx++] = caps.getStereo()?GL.GL_TRUE:GL.GL_FALSE;
             res[idx++] = GLX.GLX_TRANSPARENT_TYPE;
+            res[idx++] = GLX.GLX_NONE;
+            /**
             res[idx++] = caps.isBackgroundOpaque()?GLX.GLX_NONE:GLX.GLX_TRANSPARENT_RGB;
             if(!caps.isBackgroundOpaque()) {
                 res[idx++] = GLX.GLX_TRANSPARENT_RED_VALUE;
@@ -148,7 +150,7 @@ public class X11GLXGraphicsConfiguration extends X11GraphicsConfiguration implem
                 res[idx++] = caps.getTransparentBlueValue()>=0?caps.getTransparentBlueValue():(int)GLX.GLX_DONT_CARE;
                 res[idx++] = GLX.GLX_TRANSPARENT_ALPHA_VALUE;
                 res[idx++] = caps.getTransparentAlphaValue()>=0?caps.getTransparentAlphaValue():(int)GLX.GLX_DONT_CARE;
-            }
+            } */
         } else {
             if (caps.getDoubleBuffered()) {
               res[idx++] = GLX.GLX_DOUBLEBUFFER;
@@ -207,6 +209,11 @@ public class X11GLXGraphicsConfiguration extends X11GraphicsConfiguration implem
   }
 
   // FBConfig
+    
+  static boolean GLXFBConfigIDValid(long display, int screen, int fbcfgid) {      
+    long fbcfg = X11GLXGraphicsConfiguration.glXFBConfigID2FBConfig(display, screen, fbcfgid);
+    return (0 != fbcfg) ? X11GLXGraphicsConfiguration.GLXFBConfigValid( display, fbcfg ) : false ;
+  }
 
   static boolean GLXFBConfigValid(long display, long fbcfg) {
     int[] tmp = new int[1];
@@ -247,6 +254,14 @@ public class X11GLXGraphicsConfiguration extends X11GraphicsConfiguration implem
     return null;
   }
 
+  static XRenderDirectFormat XVisual2XRenderMask(long dpy, long visual) {
+    XRenderPictFormat renderPictFmt = X11Lib.XRenderFindVisualFormat(dpy, visual);
+    if(null == renderPictFmt) {
+        return null;
+    }
+    return renderPictFmt.getDirect();
+  }
+
   static boolean GLXFBConfig2GLCapabilities(ArrayList capsBucket,
                                             GLProfile glp, long display, long fbcfg,
                                             int winattrmask, boolean isMultisampleAvailable) {
@@ -271,6 +286,9 @@ public class X11GLXGraphicsConfiguration extends X11GraphicsConfiguration implem
     if(GLX.GLX_BAD_ATTRIBUTE == GLX.glXGetFBConfigAttrib(display, fbcfg, GLX.GLX_RENDER_TYPE, tmp, 0)) {
       return false;
     }
+    if( 0 == ( GLX.GLX_RGBA_BIT & tmp[0] ) ) {
+      return false; // no RGBA -> color index not supported
+    }
 
     GLCapabilities res = new X11GLCapabilities(visualInfo, fbcfg, fbcfgid, glp);
     res.setDoubleBuffered(glXGetFBConfig(display, fbcfg, GLX.GLX_DOUBLEBUFFER,     tmp, 0) != 0);
@@ -290,20 +308,18 @@ public class X11GLXGraphicsConfiguration extends X11GraphicsConfiguration implem
       res.setSampleBuffers(glXGetFBConfig(display, fbcfg, GLX.GLX_SAMPLE_BUFFERS, tmp, 0) != 0);
       res.setNumSamples   (glXGetFBConfig(display, fbcfg, GLX.GLX_SAMPLES,        tmp, 0));
     }
-    res.setBackgroundOpaque(glXGetFBConfig(display, fbcfg, GLX.GLX_TRANSPARENT_TYPE, tmp, 0) == GLX.GLX_NONE);
-    if(!res.isBackgroundOpaque()) {
-        glXGetFBConfig(display, fbcfg, GLX.GLX_TRANSPARENT_RED_VALUE,  tmp, 0);
-        res.setTransparentRedValue(tmp[0]==GLX.GLX_DONT_CARE?-1:tmp[0]);
-
-        glXGetFBConfig(display, fbcfg, GLX.GLX_TRANSPARENT_GREEN_VALUE,  tmp, 0);
-        res.setTransparentGreenValue(tmp[0]==GLX.GLX_DONT_CARE?-1:tmp[0]);
-
-        glXGetFBConfig(display, fbcfg, GLX.GLX_TRANSPARENT_BLUE_VALUE,  tmp, 0);
-        res.setTransparentBlueValue(tmp[0]==GLX.GLX_DONT_CARE?-1:tmp[0]);
-
-        glXGetFBConfig(display, fbcfg, GLX.GLX_TRANSPARENT_ALPHA_VALUE,  tmp, 0);
-        res.setTransparentAlphaValue(tmp[0]==GLX.GLX_DONT_CARE?-1:tmp[0]);
+    final XRenderDirectFormat xrmask = ( null != visualInfo ) ? 
+                                         XVisual2XRenderMask( display, visualInfo.getVisual() ) : 
+                                         null ;
+    final int alphaMask = ( null != xrmask ) ? xrmask.getAlphaMask() : 0;
+    res.setBackgroundOpaque( 0 >= alphaMask );
+    if( !res.isBackgroundOpaque() ) {
+        res.setTransparentRedValue(xrmask.getRedMask());
+        res.setTransparentGreenValue(xrmask.getGreenMask());
+        res.setTransparentBlueValue(xrmask.getBlueMask());
+        res.setTransparentAlphaValue(alphaMask);
     }
+    
     try { 
         res.setPbufferFloatingPointBuffers(glXGetFBConfig(display, fbcfg, GLXExt.GLX_FLOAT_COMPONENTS_NV, tmp, 0) != GL.GL_FALSE);
     } catch (Exception e) {}
@@ -412,6 +428,17 @@ public class X11GLXGraphicsConfiguration extends X11GraphicsConfiguration implem
       res.setSampleBuffers(glXGetConfig(display, info, GLX.GLX_SAMPLE_BUFFERS, tmp, 0) != 0);
       res.setNumSamples   (glXGetConfig(display, info, GLX.GLX_SAMPLES,        tmp, 0));
     }
+    final XRenderDirectFormat xrmask = ( null != info ) ? 
+                                         XVisual2XRenderMask( display, info.getVisual() ) : 
+                                         null ;
+    final int alphaMask = ( null != xrmask ) ? xrmask.getAlphaMask() : 0;
+    res.setBackgroundOpaque( 0 >= alphaMask );
+    if( !res.isBackgroundOpaque() ) {
+        res.setTransparentRedValue(xrmask.getRedMask());
+        res.setTransparentGreenValue(xrmask.getGreenMask());
+        res.setTransparentBlueValue(xrmask.getBlueMask());
+        res.setTransparentAlphaValue(alphaMask);
+    }
 
     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 319a52c..0f8b948 100644
--- a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfigurationFactory.java
+++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfigurationFactory.java
@@ -96,7 +96,7 @@ public class X11GLXGraphicsConfigurationFactory extends GLGraphicsConfigurationF
                                                  (GLCapabilitiesChooser)chooser, (X11GraphicsScreen)absScreen);
     }
 
-    protected static List/*<X11GLCapabilities>*/ getAvailableCapabilities(X11GLXDrawableFactory factory, AbstractGraphicsDevice device) {
+    protected static List<GLCapabilitiesImmutable> getAvailableCapabilities(X11GLXDrawableFactory factory, AbstractGraphicsDevice device) {
         X11GLXDrawableFactory.SharedResource sharedResource = factory.getOrCreateSharedResource(device);
         if(null == sharedResource) {
             throw new GLException("Shared resource for device n/a: "+device);
@@ -106,21 +106,21 @@ public class X11GLXGraphicsConfigurationFactory extends GLGraphicsConfigurationF
         GLCapabilitiesImmutable capsChosen = sharedDrawable.getChosenGLCapabilities();
         GLProfile glp = capsChosen.getGLProfile();
 
-        List/*GLCapabilitiesImmutable*/ availableCaps = null;
+        List<GLCapabilitiesImmutable> availableCaps = null;
 
         if( sharedResource.isGLXVersionGreaterEqualOneThree() ) {
             availableCaps = getAvailableGLCapabilitiesFBConfig(sharedScreen, glp);
         }
-        if( null == availableCaps || 0 == availableCaps.size() ) {
+        if( null == availableCaps || availableCaps.isEmpty() ) {
             availableCaps = getAvailableGLCapabilitiesXVisual(sharedScreen, glp);
         }
-        if( null != availableCaps ) {
+        if( null != availableCaps && availableCaps.size() > 1 ) {
             Collections.sort(availableCaps, XVisualIDComparator);
         }
         return availableCaps;
     }
 
-    static List/*<X11GLCapabilities>*/ getAvailableGLCapabilitiesFBConfig(X11GraphicsScreen x11Screen, GLProfile glProfile) {
+    static List<GLCapabilitiesImmutable> getAvailableGLCapabilitiesFBConfig(X11GraphicsScreen x11Screen, GLProfile glProfile) {
         PointerBuffer fbcfgsL = null;
 
         // Utilizing FBConfig
@@ -131,7 +131,7 @@ public class X11GLXGraphicsConfigurationFactory extends GLGraphicsConfigurationF
         int screen = x11Screen.getIndex();
         boolean isMultisampleAvailable = GLXUtil.isMultisampleAvailable(display);
         int[] count = { -1 };
-        ArrayList availableCaps = new ArrayList();
+        ArrayList<GLCapabilitiesImmutable> availableCaps = new ArrayList<GLCapabilitiesImmutable>();
 
         fbcfgsL = GLX.glXChooseFBConfig(display, screen, null, 0, count, 0);
         if (fbcfgsL == null || fbcfgsL.limit()<=0) {
@@ -150,7 +150,7 @@ public class X11GLXGraphicsConfigurationFactory extends GLGraphicsConfigurationF
         return availableCaps;
     }
 
-    static List/*<X11GLCapabilities>*/ getAvailableGLCapabilitiesXVisual(X11GraphicsScreen x11Screen, GLProfile glProfile) {
+    static List<GLCapabilitiesImmutable> getAvailableGLCapabilitiesXVisual(X11GraphicsScreen x11Screen, GLProfile glProfile) {
         AbstractGraphicsDevice absDevice = x11Screen.getDevice();
         long display = absDevice.getHandle();
 
@@ -164,7 +164,7 @@ public class X11GLXGraphicsConfigurationFactory extends GLGraphicsConfigurationF
         if (infos == null || infos.length<1) {
             throw new GLException("Error while enumerating available XVisualInfos");
         }
-        ArrayList availableCaps = new ArrayList();
+        ArrayList<GLCapabilitiesImmutable> availableCaps = new ArrayList<GLCapabilitiesImmutable>();
         for (int i = 0; i < infos.length; i++) {
             if( !X11GLXGraphicsConfiguration.XVisualInfo2GLCapabilities(availableCaps, glProfile, display, infos[i], GLGraphicsConfigurationUtil.ALL_BITS, isMultisampleAvailable) ) {
                 if(DEBUG) {
@@ -218,7 +218,7 @@ public class X11GLXGraphicsConfigurationFactory extends GLGraphicsConfigurationF
         int screen = x11Screen.getIndex();
 
         long fbcfg = X11GLXGraphicsConfiguration.glXFBConfigID2FBConfig(display, screen, fbID);
-        if( !X11GLXGraphicsConfiguration.GLXFBConfigValid( display, fbcfg ) ) {
+        if( 0 == fbcfg || !X11GLXGraphicsConfiguration.GLXFBConfigValid( display, fbcfg ) ) {
             if(DEBUG) {
                 System.err.println("X11GLXGraphicsConfiguration.chooseGraphicsConfigurationFBConfig: Failed - GLX FBConfig invalid: ("+x11Screen+","+toHexString(fbID)+"): fbcfg: "+toHexString(fbcfg));
             }
@@ -232,7 +232,6 @@ public class X11GLXGraphicsConfigurationFactory extends GLGraphicsConfigurationF
                                                                                    GLCapabilitiesImmutable capsReq,
                                                                                    GLCapabilitiesChooser chooser,
                                                                                    X11GraphicsScreen x11Screen) {
-        long recommendedFBConfig = -1;
         int recommendedIndex = -1;
         PointerBuffer fbcfgsL = null;
         GLProfile glProfile = capsChosen.getGLProfile();
@@ -262,12 +261,11 @@ public class X11GLXGraphicsConfigurationFactory extends GLGraphicsConfigurationF
                 }
             }
             if(availableCaps.size() > 0) {
-                recommendedFBConfig = fbcfgsL.get(0);
-                recommendedIndex=0;
+                recommendedIndex = capsChosen.isBackgroundOpaque() ? 0 : -1; // only use recommended idx if not translucent
                 if (DEBUG) {
-                    System.err.println("!!! glXChooseFBConfig recommended fbcfg " + toHexString(recommendedFBConfig) + ", idx " + recommendedIndex);
+                    System.err.println("!!! glXChooseFBConfig recommended fbcfg " + toHexString(fbcfgsL.get(0)) + ", idx " + recommendedIndex);
                     System.err.println("!!! user  caps " + capsChosen);
-                    System.err.println("!!! fbcfg caps " + availableCaps.get(recommendedIndex));
+                    System.err.println("!!! fbcfg caps " + availableCaps.get(0));
                 }
             } else if (DEBUG) {
                 System.err.println("!!! glXChooseFBConfig no caps for recommended fbcfg " + toHexString(fbcfgsL.get(0)));
@@ -278,7 +276,6 @@ public class X11GLXGraphicsConfigurationFactory extends GLGraphicsConfigurationF
         // 2nd choice: get all GLCapabilities available, no preferred recommendedIndex available
         if( 0 == availableCaps.size() ) {
             // reset ..
-            recommendedFBConfig = -1;
             recommendedIndex = -1;
 
             fbcfgsL = GLX.glXChooseFBConfig(display, screen, null, 0, count, 0);
@@ -355,8 +352,8 @@ public class X11GLXGraphicsConfigurationFactory extends GLGraphicsConfigurationF
                     System.err.println("X11GLXGraphicsConfiguration.getAvailableGLCapabilitiesXVisual: XVisual invalid: ("+x11Screen+"): fbcfg: "+toHexString(infos[i].getVisualid()));
                 }
             } else {
-                // Attempt to find the visual chosenIndex by glXChooseVisual
-                if (recommendedVis != null && recommendedVis.getVisualid() == infos[i].getVisualid()) {
+                // Attempt to find the visual chosenIndex by glXChooseVisual, if not translucent
+                if (capsChosen.isBackgroundOpaque() && recommendedVis != null && recommendedVis.getVisualid() == infos[i].getVisualid()) {
                     recommendedIndex = availableCaps.size() - 1;
                 }
             }
diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11OnscreenGLXDrawable.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11OnscreenGLXDrawable.java
index 9e6ef91..8ef6423 100644
--- a/src/jogl/classes/jogamp/opengl/x11/glx/X11OnscreenGLXDrawable.java
+++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11OnscreenGLXDrawable.java
@@ -55,15 +55,17 @@ public class X11OnscreenGLXDrawable extends X11GLXDrawable {
     useGLXWindow=false;
   }
 
+  @SuppressWarnings("unused")
   public long getHandle() {
-    if(useGLXWindow) {
+    if(USE_GLXWINDOW && useGLXWindow) {
         return glXWindow; 
     } 
     return getNativeSurface().getSurfaceHandle();
   }
 
+  @SuppressWarnings("unused")
   protected void destroyHandle() {
-    if(0!=glXWindow) {
+    if(USE_GLXWINDOW && 0!=glXWindow) {
         GLX.glXDestroyWindow(getNativeSurface().getDisplayHandle(), glXWindow);
         glXWindow = 0;
         useGLXWindow=false;
diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/awt/X11AWTGLXGraphicsConfigurationFactory.java b/src/jogl/classes/jogamp/opengl/x11/glx/awt/X11AWTGLXGraphicsConfigurationFactory.java
index ee7dd28..9ee20d8 100644
--- a/src/jogl/classes/jogamp/opengl/x11/glx/awt/X11AWTGLXGraphicsConfigurationFactory.java
+++ b/src/jogl/classes/jogamp/opengl/x11/glx/awt/X11AWTGLXGraphicsConfigurationFactory.java
@@ -86,22 +86,24 @@ public class X11AWTGLXGraphicsConfigurationFactory extends GLGraphicsConfigurati
         long displayHandle = X11SunJDKReflection.graphicsDeviceGetDisplay(device);
         boolean owner = false;
         if(0==displayHandle) {
-            displayHandle = X11Util.createDisplay(null);
+            displayHandle = X11Util.openDisplay(null);
             owner = true;
             if(DEBUG) {
-                System.err.println(Thread.currentThread().getName() + " - X11AWTGLXGraphicsConfigurationFactory: using a thread local X11 display");
+                System.err.println(Thread.currentThread().getName() + " - X11AWTGLXGraphicsConfigurationFactory: create local X11 display");
             }
         } else {
-            if(DEBUG) {
-                System.err.println(Thread.currentThread().getName() + " - X11AWTGLXGraphicsConfigurationFactory: using AWT X11 display 0x"+Long.toHexString(displayHandle));
-            }
             /**
-             * Using the AWT display handle works fine with NVidia and AMD drivers today 2011-02-22,
-             * hence no need for our own display instance anymore.
-               String name = X11Util.XDisplayString(displayHandle);
-               displayHandle = X11Util.createDisplay(name);
-               owner = true;
+             * Using the AWT display handle works fine with NVidia.
+             * However we experienced different results w/ AMD drivers, 
+             * some work, but some behave erratic. 
+             * I.e. hangs in XQueryExtension(..) via X11GraphicsScreen.
              */
+            final String displayName = X11Util.XDisplayString(displayHandle);
+            if(DEBUG) {
+                System.err.println(Thread.currentThread().getName() + " - X11AWTGLXGraphicsConfigurationFactory: create X11 display @ "+displayName+" / 0x"+Long.toHexString(displayHandle));
+            }
+            displayHandle = X11Util.openDisplay(displayName);
+            owner = true;
         }
         ((AWTGraphicsDevice)awtScreen.getDevice()).setSubType(NativeWindowFactory.TYPE_X11, displayHandle);
         X11GraphicsDevice x11Device = new X11GraphicsDevice(displayHandle, AbstractGraphicsDevice.DEFAULT_UNIT);
diff --git a/src/jogl/native/GLDebugMessageHandler.c b/src/jogl/native/GLDebugMessageHandler.c
new file mode 100644
index 0000000..509c6f6
--- /dev/null
+++ b/src/jogl/native/GLDebugMessageHandler.c
@@ -0,0 +1,206 @@
+
+#include <stdio.h> /* android */
+#include <stdlib.h>
+#include <stdarg.h>
+
+#include "jogamp_opengl_GLDebugMessageHandler.h"
+#include "JoglCommon.h"
+
+#include <GL/gl.h>
+#include <GL/glext.h>
+
+// #define VERBOSE_ON 1
+
+#ifdef VERBOSE_ON
+    #define DBG_PRINT(...) fprintf(stderr, __VA_ARGS__); fflush(stderr) 
+#else
+    #define DBG_PRINT(...)
+#endif
+
+
+static jmethodID glDebugMessageARB = NULL; // int source, int type, int id, int severity, String msg
+static jmethodID glDebugMessageAMD = NULL; // int id, int category, int severity, String msg
+
+typedef void (GLAPIENTRY* _local_PFNGLDEBUGMESSAGECALLBACKARBPROC) (GLDEBUGPROCARB callback, const GLvoid *userParam);
+typedef void (GLAPIENTRY* _local_GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,GLvoid *userParam);
+
+typedef void (GLAPIENTRY* _local_PFNGLDEBUGMESSAGECALLBACKAMDPROC) (GLDEBUGPROCAMD callback, const GLvoid *userParam);
+typedef void (GLAPIENTRY* _local_GLDEBUGPROCAMD)(GLuint id,GLenum category,GLenum severity,GLsizei length,const GLchar *message,GLvoid *userParam);
+
+/*
+ * Class:     jogamp_opengl_GLDebugMessageHandler
+ * Method:    initIDs0
+ * Signature: (V)Z
+ */
+JNIEXPORT jboolean JNICALL Java_jogamp_opengl_GLDebugMessageHandler_initIDs0
+  (JNIEnv *env, jclass clazz)
+{
+    JoglCommon_init(env);
+
+    glDebugMessageARB = (*env)->GetMethodID(env, clazz, "glDebugMessageARB", "(IIIILjava/lang/String;)V");
+    glDebugMessageAMD = (*env)->GetMethodID(env, clazz, "glDebugMessageAMD", "(IIILjava/lang/String;)V");
+
+    if ( NULL == glDebugMessageARB || NULL == glDebugMessageAMD ) {
+        return JNI_FALSE;
+    }
+    return JNI_TRUE;
+}
+
+typedef struct {
+    JavaVM *vm;
+    int version;
+    JNIEnv *env;
+    jobject obj;
+    int extType;
+} DebugHandlerType;
+    
+
+// GLDEBUGARB(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,GLvoid *userParam);
+static void GLDebugMessageARBCallback(GLenum source, GLenum type, GLuint id, GLenum severity, 
+                                      GLsizei length, const GLchar *message, GLvoid *userParam) {
+    DebugHandlerType * handle = (DebugHandlerType*) (intptr_t) userParam;
+    JavaVM *vm = handle->vm;
+    int version = handle->version;
+    jobject obj = handle->obj;
+    JNIEnv *curEnv = NULL;
+    JNIEnv *newEnv = NULL;
+    int envRes ;
+    DBG_PRINT("GLDebugMessageARBCallback: 01 - %s\n", message);
+
+    // retrieve this thread's JNIEnv curEnv - or detect it's detached
+    envRes = (*vm)->GetEnv(vm, (void **) &curEnv, version) ;
+    if( JNI_EDETACHED == envRes ) {
+        // detached thread - attach to JVM
+        if( JNI_OK != ( envRes = (*vm)->AttachCurrentThread(vm, (void**) &newEnv, NULL) ) ) {
+            fprintf(stderr, "GLDebugMessageARBCallback: can't attach thread: %d\n", envRes);
+            return;
+        }
+        curEnv = newEnv;
+        DBG_PRINT("GLDebugMessageARBCallback: 02 - attached .. \n");
+    } else if( JNI_OK != envRes ) {
+        // oops ..
+        fprintf(stderr, "GLDebugMessageARBCallback: can't GetEnv: %d\n", envRes);
+        return;
+    }
+    (*curEnv)->CallVoidMethod(curEnv, obj, glDebugMessageARB, 
+                              (jint) source, (jint) type, (jint) id, (jint) severity, 
+                              (*curEnv)->NewStringUTF(curEnv, message));
+    if( NULL != newEnv ) {
+        // detached attached thread
+        (*vm)->DetachCurrentThread(vm);
+        DBG_PRINT("GLDebugMessageARBCallback: 04 - detached .. \n");
+    }
+    DBG_PRINT("GLDebugMessageARBCallback: 0X\n");
+    /**
+     * On Java 32bit on 64bit Windows and w/ GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB disables,
+     * the unit test com.jogamp.opengl.test.junit.jogl.acore.TestGLDebug00NEWT crashes after this point.
+     */
+}
+
+// GLDEBUGAMD(GLuint id,GLenum category,GLenum severity,GLsizei length,const GLchar *message,GLvoid *userParam);
+static void GLDebugMessageAMDCallback(GLuint id, GLenum category, GLenum severity, 
+                                      GLsizei length, const GLchar *message, GLvoid *userParam) {
+    DebugHandlerType * handle = (DebugHandlerType*) (intptr_t) userParam;
+    JavaVM *vm = handle->vm;
+    int version = handle->version;
+    jobject obj = handle->obj;
+    JNIEnv *curEnv = NULL;
+    JNIEnv *newEnv = NULL;
+    int envRes ;
+
+    // retrieve this thread's JNIEnv curEnv - or detect it's detached
+    envRes = (*vm)->GetEnv(vm, (void **) &curEnv, version) ;
+    if( JNI_EDETACHED == envRes ) {
+        // detached thread - attach to JVM
+        if( JNI_OK != ( envRes = (*vm)->AttachCurrentThread(vm, (void**) &newEnv, NULL) ) ) {
+            fprintf(stderr, "GLDebugMessageAMDCallback: can't attach thread: %d\n", envRes);
+            return;
+        }
+        curEnv = newEnv;
+    } else if( JNI_OK != envRes ) {
+        // oops ..
+        fprintf(stderr, "GLDebugMessageAMDCallback: can't GetEnv: %d\n", envRes);
+        return;
+    }
+    (*curEnv)->CallVoidMethod(curEnv, obj, glDebugMessageAMD, 
+                              (jint) id, (jint) category, (jint) severity, 
+                              (*curEnv)->NewStringUTF(curEnv, message));
+    if( NULL != newEnv ) {
+        // detached attached thread
+        (*vm)->DetachCurrentThread(vm);
+    }
+    /**
+     * On Java 32bit on 64bit Windows,
+     * the unit test com.jogamp.opengl.test.junit.jogl.acore.TestGLDebug00NEWT crashes after this point.
+     */
+}
+
+
+/*
+ * Class:     jogamp_opengl_GLDebugMessageHandler
+ * Method:    register0
+ * Signature: (JI)J
+ */
+JNIEXPORT jlong JNICALL Java_jogamp_opengl_GLDebugMessageHandler_register0
+  (JNIEnv *env, jobject obj, jlong procAddress, jint extType)
+{
+    JavaVM *vm;
+    DebugHandlerType * handle = malloc(sizeof(DebugHandlerType));
+    if(0 != (*env)->GetJavaVM(env, &vm)) {
+        vm = NULL;
+        JoglCommon_throwNewRuntimeException(env, "GetJavaVM failed");
+    }
+    handle->vm = vm;
+    handle->version = (*env)->GetVersion(env);
+    handle->env = env;
+    handle->obj = (*env)->NewGlobalRef(env, obj);
+    handle->extType = extType;
+
+    if(jogamp_opengl_GLDebugMessageHandler_EXT_ARB == extType) {
+        _local_PFNGLDEBUGMESSAGECALLBACKARBPROC ptr_glDebugMessageCallbackARB;
+        ptr_glDebugMessageCallbackARB = (_local_PFNGLDEBUGMESSAGECALLBACKARBPROC) (intptr_t) procAddress;
+        ptr_glDebugMessageCallbackARB((_local_GLDEBUGPROCARB)GLDebugMessageARBCallback, handle);
+    } else if(jogamp_opengl_GLDebugMessageHandler_EXT_AMD == extType) {
+        _local_PFNGLDEBUGMESSAGECALLBACKAMDPROC ptr_glDebugMessageCallbackAMD;
+        ptr_glDebugMessageCallbackAMD = (_local_PFNGLDEBUGMESSAGECALLBACKAMDPROC) (intptr_t) procAddress;
+        ptr_glDebugMessageCallbackAMD((_local_GLDEBUGPROCAMD)GLDebugMessageAMDCallback, handle);
+    } else {
+        JoglCommon_throwNewRuntimeException(env, "unsupported extension type %d", extType);
+    }
+
+    return (jlong) (intptr_t) handle;
+}
+
+/*
+ * Class:     jogamp_opengl_GLDebugMessageHandler
+ * Method:    unregister0
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_jogamp_opengl_GLDebugMessageHandler_unregister0
+  (JNIEnv *env, jobject obj, jlong procAddress, jlong jhandle)
+{
+    DebugHandlerType * handle = (DebugHandlerType*) (intptr_t) jhandle;
+
+    if(env != handle->env) {
+        JoglCommon_throwNewRuntimeException(env, "wrong handle (env doesn't match)");
+    }
+    if(JNI_FALSE == (*env)->IsSameObject(env, obj, handle->obj)) {
+        JoglCommon_throwNewRuntimeException(env, "wrong handle (obj doesn't match)");
+    }
+
+    if(jogamp_opengl_GLDebugMessageHandler_EXT_ARB == handle->extType) {
+        _local_PFNGLDEBUGMESSAGECALLBACKARBPROC ptr_glDebugMessageCallbackARB;
+        ptr_glDebugMessageCallbackARB = (_local_PFNGLDEBUGMESSAGECALLBACKARBPROC) (intptr_t) procAddress;
+        ptr_glDebugMessageCallbackARB((_local_GLDEBUGPROCARB)NULL, NULL);
+    } else if(jogamp_opengl_GLDebugMessageHandler_EXT_AMD == handle->extType) {
+        _local_PFNGLDEBUGMESSAGECALLBACKAMDPROC ptr_glDebugMessageCallbackAMD;
+        ptr_glDebugMessageCallbackAMD = (_local_PFNGLDEBUGMESSAGECALLBACKAMDPROC) (intptr_t) procAddress;
+        ptr_glDebugMessageCallbackAMD((_local_GLDEBUGPROCAMD)NULL, NULL);
+    } else {
+        JoglCommon_throwNewRuntimeException(env, "unsupported extension type %d", handle->extType);
+    }
+
+    (*env)->DeleteGlobalRef(env, handle->obj);
+    free(handle);
+}
+
diff --git a/src/jogl/native/JoglCommon.c b/src/jogl/native/JoglCommon.c
new file mode 100644
index 0000000..16f60e4
--- /dev/null
+++ b/src/jogl/native/JoglCommon.c
@@ -0,0 +1,55 @@
+
+#include "JoglCommon.h"
+
+static const char * const ClazzNameRuntimeException = "java/lang/RuntimeException";
+static jclass    runtimeExceptionClz=NULL;
+
+void JoglCommon_FatalError(JNIEnv *env, const char* msg, ...)
+{
+    char buffer[512];
+    va_list ap;
+
+    va_start(ap, msg);
+    vsnprintf(buffer, sizeof(buffer), msg, ap);
+    va_end(ap);
+
+    fprintf(stderr, "%s\n", buffer);
+    (*env)->FatalError(env, buffer);
+}
+
+void JoglCommon_throwNewRuntimeException(JNIEnv *env, const char* msg, ...)
+{
+    char buffer[512];
+    va_list ap;
+
+    va_start(ap, msg);
+    vsnprintf(buffer, sizeof(buffer), msg, ap);
+    va_end(ap);
+
+    (*env)->ThrowNew(env, runtimeExceptionClz, buffer);
+}
+
+void JoglCommon_init(JNIEnv *env) {
+    if(NULL==runtimeExceptionClz) {
+        jclass c = (*env)->FindClass(env, ClazzNameRuntimeException);
+        if(NULL==c) {
+            JoglCommon_FatalError(env, "JOGL: can't find %s", ClazzNameRuntimeException);
+        }
+        runtimeExceptionClz = (jclass)(*env)->NewGlobalRef(env, c);
+        (*env)->DeleteLocalRef(env, c);
+        if(NULL==runtimeExceptionClz) {
+            JoglCommon_FatalError(env, "JOGL: can't use %s", ClazzNameRuntimeException);
+        }
+    }
+}
+
+jchar* JoglCommon_GetNullTerminatedStringChars(JNIEnv* env, jstring str)
+{
+    jchar* strChars = NULL;
+    strChars = calloc((*env)->GetStringLength(env, str) + 1, sizeof(jchar));
+    if (strChars != NULL) {
+        (*env)->GetStringRegion(env, str, 0, (*env)->GetStringLength(env, str), strChars);
+    }
+    return strChars;
+}
+
diff --git a/src/jogl/native/JoglCommon.h b/src/jogl/native/JoglCommon.h
new file mode 100644
index 0000000..d82b445
--- /dev/null
+++ b/src/jogl/native/JoglCommon.h
@@ -0,0 +1,15 @@
+
+#ifndef JOGL_COMMON_H
+#define JOGL_COMMON_H 1
+
+#include <jni.h>
+#include <stdlib.h>
+
+void JoglCommon_init(JNIEnv *env);
+
+jchar* JoglCommon_GetNullTerminatedStringChars(JNIEnv* env, jstring str);
+
+void JoglCommon_FatalError(JNIEnv *env, const char* msg, ...);
+void JoglCommon_throwNewRuntimeException(JNIEnv *env, const char* msg, ...);
+
+#endif
diff --git a/src/jogl/native/macosx/ContextUpdater.h b/src/jogl/native/macosx/ContextUpdater.h
index e8b757f..f8ce93d 100644
--- a/src/jogl/native/macosx/ContextUpdater.h
+++ b/src/jogl/native/macosx/ContextUpdater.h
@@ -15,11 +15,11 @@ This notification is sent whenever an NSView that has an attached NSSurface chan
 //#define DEBUG_GL_LOCKS
 
 #ifdef DEBUG_GL_LOCKS
-	#define LOCK_GL(func, line) [ContextUpdater lockInFunction:func atLine:line];
-	#define UNLOCK_GL(func, line) [ContextUpdater unlockInFunction:func atLine:line];
+    #define LOCK_GL(func, line) [ContextUpdater lockInFunction:func atLine:line];
+    #define UNLOCK_GL(func, line) [ContextUpdater unlockInFunction:func atLine:line];
 #else
-	#define LOCK_GL(func, line) [ContextUpdater lock];
-	#define UNLOCK_GL(func, line) [ContextUpdater unlock];
+    #define LOCK_GL(func, line) [ContextUpdater lock];
+    #define UNLOCK_GL(func, line) [ContextUpdater unlock];
 #endif
 
 // gznote: OpenGL NOT thread safe - need to sync on update and paints
diff --git a/src/jogl/native/macosx/ContextUpdater.m b/src/jogl/native/macosx/ContextUpdater.m
index 587782c..8596977 100644
--- a/src/jogl/native/macosx/ContextUpdater.m
+++ b/src/jogl/native/macosx/ContextUpdater.m
@@ -10,74 +10,74 @@ static pthread_mutex_t resourceLock = PTHREAD_MUTEX_INITIALIZER;
 
 static void printLockDebugInfo(char *message, char *func, int line)
 {
-	fprintf(stderr, "%s in function: \"%s\" at line: %d\n", message, func, line);
-	fflush(stderr);
+    fprintf(stderr, "%s in function: \"%s\" at line: %d\n", message, func, line);
+    fflush(stderr);
 }
 
 + (void) lock
 {
-	if (theContext != NULL)
-	{
-		pthread_mutex_lock(&resourceLock);
-	}
+    if (theContext != NULL)
+    {
+        pthread_mutex_lock(&resourceLock);
+    }
 }
 
 + (void) lockInFunction:(char *)func atLine:(int)line
 {
-	if (theContext != NULL)
-	{
-		printLockDebugInfo("locked  ", func, line);
-		[self lock];
-	}
+    if (theContext != NULL)
+    {
+        printLockDebugInfo("locked  ", func, line);
+        [self lock];
+    }
 }
 
 + (void) unlock
 {
-	if (theContext != NULL)
-	{
-		pthread_mutex_unlock(&resourceLock);
-	}
+    if (theContext != NULL)
+    {
+        pthread_mutex_unlock(&resourceLock);
+    }
 }
 
 + (void) unlockInFunction:(char *)func atLine:(int)line
 {
-	if (theContext != NULL)
-	{
-		printLockDebugInfo("unlocked", func, line);
-		[self unlock];
-	}
+    if (theContext != NULL)
+    {
+        printLockDebugInfo("unlocked", func, line);
+        [self unlock];
+    }
 }
 
 - (void) registerFor:(NSOpenGLContext *)context with: (NSView *)view
 {
-	if (view != NULL)
-	{
-		[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(update:) name:NSViewGlobalFrameDidChangeNotification object: view];
-		theContext = context;
-	}
+    if (view != NULL)
+    {
+        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(update:) name:NSViewGlobalFrameDidChangeNotification object: view];
+        theContext = context;
+    }
 }
 
 - (void) update:(NSNotification *)notification
 {
-	[ContextUpdater lock];
-	
-	[theContext update];
-	
-	[ContextUpdater unlock];
+    [ContextUpdater lock];
+    
+    [theContext update];
+    
+    [ContextUpdater unlock];
 }
 
 - (id) init
-{	
-	theContext = NULL;
-	
-	return [super init];
+{    
+    theContext = NULL;
+    
+    return [super init];
 }
 
 - (void) dealloc
 {
-	[[NSNotificationCenter defaultCenter] removeObserver:self];
-	
-	[super dealloc];
+    [[NSNotificationCenter defaultCenter] removeObserver:self];
+    
+    [super dealloc];
 }
 
 @end
\ No newline at end of file
diff --git a/src/jogl/native/macosx/MacOSXWindowSystemInterface.m b/src/jogl/native/macosx/MacOSXWindowSystemInterface.m
index cbfea6d..5973ca4 100644
--- a/src/jogl/native/macosx/MacOSXWindowSystemInterface.m
+++ b/src/jogl/native/macosx/MacOSXWindowSystemInterface.m
@@ -5,7 +5,7 @@
 #include <AvailabilityMacros.h>
 
 #ifndef MAC_OS_X_VERSION_10_3
-	#error building JOGL requires Mac OS X 10.3 or greater
+    #error building JOGL requires Mac OS X 10.3 or greater
 #endif
 
 #ifndef MAC_OS_X_VERSION_10_4
@@ -44,45 +44,45 @@
 
 struct _RendererInfo
 {
-	long id;				// kCGLRPRendererID
-	long displayMask;		// kCGLRPDisplayMask
-	
-	long accelerated;		// kCGLRPAccelerated
-	
-	long window;			// kCGLRPWindow
-	long fullscreen;		// kCGLRPFullScreen
-	long multiscreen;		// kCGLRPMultiScreen
-	long offscreen;			// kCGLRPOffScreen
-	long floatPixels;		// see kCGLRPColorModes
-	long stereo;			// kCGLRPBufferModes
-	
-	long auxBuffers;		// kCGLRPMaxAuxBuffers
-	long sampleBuffers;		// kCGLRPMaxSampleBuffers
-	long samples;			// kCGLRPMaxSamples
-	long samplesModes;		// kCGLRPSampleModes
-	long multiSample;		// see kCGLRPSampleModes
-	long superSample;		// see kCGLRPSampleModes
-	long alphaSample;		// kCGLRPSampleAlpha
-	
-	long colorModes;		// kCGLRPColorModes
-	long colorRGBSizeMAX;
-	long colorASizeMAX;
-	long colorFloatRGBSizeMAX;
-	long colorFloatASizeMAX;
-	long colorFloatRGBSizeMIN;
-	long colorFloatASizeMIN;
-	long colorModesCount;
-	long colorFloatModesCount;
-	long depthModes;		// kCGLRPDepthModes
-	long depthSizeMAX;
-	long depthModesCount;
-	long stencilModes;		// kCGLRPStencilModes
-	long stencilSizeMAX;
-	long stencilModesCount;
-	long accumModes;		// kCGLRPAccumModes
-	long accumRGBSizeMAX;
-	long accumASizeMAX;
-	long accumModesCount;
+    long id;                // kCGLRPRendererID
+    long displayMask;        // kCGLRPDisplayMask
+    
+    long accelerated;        // kCGLRPAccelerated
+    
+    long window;            // kCGLRPWindow
+    long fullscreen;        // kCGLRPFullScreen
+    long multiscreen;        // kCGLRPMultiScreen
+    long offscreen;            // kCGLRPOffScreen
+    long floatPixels;        // see kCGLRPColorModes
+    long stereo;            // kCGLRPBufferModes
+    
+    long auxBuffers;        // kCGLRPMaxAuxBuffers
+    long sampleBuffers;        // kCGLRPMaxSampleBuffers
+    long samples;            // kCGLRPMaxSamples
+    long samplesModes;        // kCGLRPSampleModes
+    long multiSample;        // see kCGLRPSampleModes
+    long superSample;        // see kCGLRPSampleModes
+    long alphaSample;        // kCGLRPSampleAlpha
+    
+    long colorModes;        // kCGLRPColorModes
+    long colorRGBSizeMAX;
+    long colorASizeMAX;
+    long colorFloatRGBSizeMAX;
+    long colorFloatASizeMAX;
+    long colorFloatRGBSizeMIN;
+    long colorFloatASizeMIN;
+    long colorModesCount;
+    long colorFloatModesCount;
+    long depthModes;        // kCGLRPDepthModes
+    long depthSizeMAX;
+    long depthModesCount;
+    long stencilModes;        // kCGLRPStencilModes
+    long stencilSizeMAX;
+    long stencilModesCount;
+    long accumModes;        // kCGLRPAccumModes
+    long accumRGBSizeMAX;
+    long accumASizeMAX;
+    long accumModesCount;
 }
 typedef RendererInfo;
 
@@ -90,263 +90,263 @@ RendererInfo *gRenderers = NULL;
 long gRenderersCount = 0;
 
 long depthModes[] = {
-					kCGL0Bit,
-					kCGL1Bit,
-					kCGL2Bit,
-					kCGL3Bit,
-					kCGL4Bit,
-					kCGL5Bit,
-					kCGL6Bit,
-					kCGL8Bit,
-					kCGL10Bit,
-					kCGL12Bit,
-					kCGL16Bit,
-					kCGL24Bit,
-					kCGL32Bit,
-					kCGL48Bit,
-					kCGL64Bit,
-					kCGL96Bit,
-					kCGL128Bit,
-					0
-					};
+                    kCGL0Bit,
+                    kCGL1Bit,
+                    kCGL2Bit,
+                    kCGL3Bit,
+                    kCGL4Bit,
+                    kCGL5Bit,
+                    kCGL6Bit,
+                    kCGL8Bit,
+                    kCGL10Bit,
+                    kCGL12Bit,
+                    kCGL16Bit,
+                    kCGL24Bit,
+                    kCGL32Bit,
+                    kCGL48Bit,
+                    kCGL64Bit,
+                    kCGL96Bit,
+                    kCGL128Bit,
+                    0
+                    };
 long depthModesBits[] = {0, 1, 2, 3, 4, 5, 6, 8, 10, 12, 16, 24, 32, 48, 64, 96, 128};
 long colorModes[] = {
-					kCGLRGB444Bit,
-					kCGLARGB4444Bit,
-					kCGLRGB444A8Bit,
-					kCGLRGB555Bit,
-					kCGLARGB1555Bit,
-					kCGLRGB555A8Bit,
-					kCGLRGB565Bit,
-					kCGLRGB565A8Bit,
-					kCGLRGB888Bit,
-					kCGLARGB8888Bit,
-					kCGLRGB888A8Bit,
-					kCGLRGB101010Bit,
-					kCGLARGB2101010Bit,
-					kCGLRGB101010_A8Bit,
-					kCGLRGB121212Bit,
-					kCGLARGB12121212Bit,
-					kCGLRGB161616Bit,
-					kCGLRGBA16161616Bit,
-					kCGLRGBFloat64Bit,
-					kCGLRGBAFloat64Bit,
-					kCGLRGBFloat128Bit,
-					kCGLRGBAFloat128Bit,
-					kCGLRGBFloat256Bit,
-					kCGLRGBAFloat256Bit,
-					0
-					};
-long colorModesBitsRGB[] =	{4, 4, 4, 5, 5, 5, 5, 5, 8, 8, 8, 10, 10, 10, 12, 12, 16, 16, 16, 16, 32, 32, 64, 64};
-long colorModesBitsA[] =	{0, 4, 8, 0, 1, 8, 0, 8, 0, 8, 8,  0,  2,  8,  0, 12,  0, 16,  0, 16,  0, 32,  0, 64};
+                    kCGLRGB444Bit,
+                    kCGLARGB4444Bit,
+                    kCGLRGB444A8Bit,
+                    kCGLRGB555Bit,
+                    kCGLARGB1555Bit,
+                    kCGLRGB555A8Bit,
+                    kCGLRGB565Bit,
+                    kCGLRGB565A8Bit,
+                    kCGLRGB888Bit,
+                    kCGLARGB8888Bit,
+                    kCGLRGB888A8Bit,
+                    kCGLRGB101010Bit,
+                    kCGLARGB2101010Bit,
+                    kCGLRGB101010_A8Bit,
+                    kCGLRGB121212Bit,
+                    kCGLARGB12121212Bit,
+                    kCGLRGB161616Bit,
+                    kCGLRGBA16161616Bit,
+                    kCGLRGBFloat64Bit,
+                    kCGLRGBAFloat64Bit,
+                    kCGLRGBFloat128Bit,
+                    kCGLRGBAFloat128Bit,
+                    kCGLRGBFloat256Bit,
+                    kCGLRGBAFloat256Bit,
+                    0
+                    };
+long colorModesBitsRGB[] =    {4, 4, 4, 5, 5, 5, 5, 5, 8, 8, 8, 10, 10, 10, 12, 12, 16, 16, 16, 16, 32, 32, 64, 64};
+long colorModesBitsA[] =    {0, 4, 8, 0, 1, 8, 0, 8, 0, 8, 8,  0,  2,  8,  0, 12,  0, 16,  0, 16,  0, 32,  0, 64};
 
 void getRendererInfo()
 {
-	if (gRenderersCount == 0)
-	{		
-		CGLRendererInfoObj info;
-		CGLError err = CGLQueryRendererInfo(CGDisplayIDToOpenGLDisplayMask(kCGDirectMainDisplay), &info, &gRenderersCount);
-		if (err == 0 /* kCGLNoError */)
-		{
-			// how many renderers are available?
-			CGLDescribeRenderer(info, 0, kCGLRPRendererCount, &gRenderersCount);
-			
-			// allocate our global renderers info
-			gRenderers = (RendererInfo*)malloc(gRenderersCount*sizeof(RendererInfo));
-			memset(gRenderers, 0x00, gRenderersCount*sizeof(RendererInfo));
-			
-			// iterate through the renderers checking for their features
-			long j;
-			for (j=0; j<gRenderersCount; j++)
-			{
-				RendererInfo *renderer = &gRenderers[j];
-				int i;
-				
-				CGLDescribeRenderer(info, j, kCGLRPRendererID, &(renderer->id));
-				CGLDescribeRenderer(info, j, kCGLRPDisplayMask, &(renderer->displayMask));
-				
-				CGLDescribeRenderer(info, j, kCGLRPAccelerated, &(renderer->accelerated));
-				
-				CGLDescribeRenderer(info, j, kCGLRPWindow, &(renderer->window));
-				CGLDescribeRenderer(info, j, kCGLRPFullScreen, &(renderer->fullscreen));
-				CGLDescribeRenderer(info, j, kCGLRPMultiScreen, &(renderer->multiscreen));
-				CGLDescribeRenderer(info, j, kCGLRPOffScreen, &(renderer->offscreen));
-				CGLDescribeRenderer(info, j, kCGLRPColorModes, &(renderer->floatPixels));
-				if ((renderer->floatPixels >= kCGLRGBFloat64Bit) != 0)
-				{
-					renderer->floatPixels = 1;
-				}
-				else
-				{
-					renderer->floatPixels = 0;
-				}
-				CGLDescribeRenderer(info, j, kCGLRPBufferModes, &(renderer->stereo));
-				if ((renderer->stereo & kCGLStereoscopicBit) != 0)
-				{
-					renderer->stereo = 1;
-				}
-				else
-				{
-					renderer->stereo = 0;
-				}
-				
-				CGLDescribeRenderer(info, j, kCGLRPMaxAuxBuffers, &(renderer->auxBuffers));
-				CGLDescribeRenderer(info, j, kCGLRPMaxSampleBuffers, &(renderer->sampleBuffers));
-				CGLDescribeRenderer(info, j, kCGLRPMaxSamples, &(renderer->samples));
-				// The following queries are only legal on 10.4
-				// FIXME: should figure out a way to enable them dynamically
+    if (gRenderersCount == 0)
+    {        
+        CGLRendererInfoObj info;
+        CGLError err = CGLQueryRendererInfo(CGDisplayIDToOpenGLDisplayMask(kCGDirectMainDisplay), &info, &gRenderersCount);
+        if (err == 0 /* kCGLNoError */)
+        {
+            // how many renderers are available?
+            CGLDescribeRenderer(info, 0, kCGLRPRendererCount, &gRenderersCount);
+            
+            // allocate our global renderers info
+            gRenderers = (RendererInfo*)malloc(gRenderersCount*sizeof(RendererInfo));
+            memset(gRenderers, 0x00, gRenderersCount*sizeof(RendererInfo));
+            
+            // iterate through the renderers checking for their features
+            long j;
+            for (j=0; j<gRenderersCount; j++)
+            {
+                RendererInfo *renderer = &gRenderers[j];
+                int i;
+                
+                CGLDescribeRenderer(info, j, kCGLRPRendererID, &(renderer->id));
+                CGLDescribeRenderer(info, j, kCGLRPDisplayMask, &(renderer->displayMask));
+                
+                CGLDescribeRenderer(info, j, kCGLRPAccelerated, &(renderer->accelerated));
+                
+                CGLDescribeRenderer(info, j, kCGLRPWindow, &(renderer->window));
+                CGLDescribeRenderer(info, j, kCGLRPFullScreen, &(renderer->fullscreen));
+                CGLDescribeRenderer(info, j, kCGLRPMultiScreen, &(renderer->multiscreen));
+                CGLDescribeRenderer(info, j, kCGLRPOffScreen, &(renderer->offscreen));
+                CGLDescribeRenderer(info, j, kCGLRPColorModes, &(renderer->floatPixels));
+                if ((renderer->floatPixels >= kCGLRGBFloat64Bit) != 0)
+                {
+                    renderer->floatPixels = 1;
+                }
+                else
+                {
+                    renderer->floatPixels = 0;
+                }
+                CGLDescribeRenderer(info, j, kCGLRPBufferModes, &(renderer->stereo));
+                if ((renderer->stereo & kCGLStereoscopicBit) != 0)
+                {
+                    renderer->stereo = 1;
+                }
+                else
+                {
+                    renderer->stereo = 0;
+                }
+                
+                CGLDescribeRenderer(info, j, kCGLRPMaxAuxBuffers, &(renderer->auxBuffers));
+                CGLDescribeRenderer(info, j, kCGLRPMaxSampleBuffers, &(renderer->sampleBuffers));
+                CGLDescribeRenderer(info, j, kCGLRPMaxSamples, &(renderer->samples));
+                // The following queries are only legal on 10.4
+                // FIXME: should figure out a way to enable them dynamically
 #ifdef kCGLRPSampleModes
-				CGLDescribeRenderer(info, j, kCGLRPSampleModes, &(renderer->samplesModes));
-				if ((renderer->samplesModes & kCGLSupersampleBit) != 0)
-				{
-					renderer->multiSample = 1;
-				}
-				if ((renderer->samplesModes & kCGLMultisampleBit) != 0)
-				{
-					renderer->superSample = 1;
-				}
-				CGLDescribeRenderer(info, j, kCGLRPSampleAlpha, &(renderer->alphaSample));
+                CGLDescribeRenderer(info, j, kCGLRPSampleModes, &(renderer->samplesModes));
+                if ((renderer->samplesModes & kCGLSupersampleBit) != 0)
+                {
+                    renderer->multiSample = 1;
+                }
+                if ((renderer->samplesModes & kCGLMultisampleBit) != 0)
+                {
+                    renderer->superSample = 1;
+                }
+                CGLDescribeRenderer(info, j, kCGLRPSampleAlpha, &(renderer->alphaSample));
 #endif
-				CGLDescribeRenderer(info, j, kCGLRPColorModes, &(renderer->colorModes));
-				i=0;
-				int floatPixelFormatInitialized = 0;
-				while (colorModes[i] != 0)
-				{
-					if ((renderer->colorModes & colorModes[i]) != 0)
-					{
-						// non-float color model
-						if (colorModes[i] < kCGLRGBFloat64Bit)
-						{
-							// look for max color and alpha values - prefer color models that have alpha
-							if ((colorModesBitsRGB[i] >= renderer->colorRGBSizeMAX) && (colorModesBitsA[i] >= renderer->colorASizeMAX))
-							{
-								renderer->colorRGBSizeMAX = colorModesBitsRGB[i];
-								renderer->colorASizeMAX = colorModesBitsA[i];
-							}
-							renderer->colorModesCount++;
-						}
-						// float-color model
-						if (colorModes[i] >= kCGLRGBFloat64Bit)
-						{
-							if (floatPixelFormatInitialized == 0)
-							{
-								floatPixelFormatInitialized = 1;
-								
-								renderer->colorFloatASizeMAX = colorModesBitsA[i];
-								renderer->colorFloatRGBSizeMAX = colorModesBitsRGB[i];
-								renderer->colorFloatASizeMIN = colorModesBitsA[i];
-								renderer->colorFloatRGBSizeMIN = colorModesBitsRGB[i];
-							}
-							// look for max color and alpha values - prefer color models that have alpha
-							if ((colorModesBitsRGB[i] >= renderer->colorFloatRGBSizeMAX) && (colorModesBitsA[i] >= renderer->colorFloatASizeMAX))
-							{
-								renderer->colorFloatRGBSizeMAX = colorModesBitsRGB[i];
-								renderer->colorFloatASizeMAX = colorModesBitsA[i];
-							}
-							// find min color
-							if (colorModesBitsA[i] < renderer->colorFloatASizeMIN)
-							{
-								renderer->colorFloatASizeMIN = colorModesBitsA[i];
-							}
-							// find min alpha color
-							if (colorModesBitsA[i] < renderer->colorFloatRGBSizeMIN)
-							{
-								renderer->colorFloatRGBSizeMIN = colorModesBitsRGB[i];
-							}
-							renderer->colorFloatModesCount++;
-						}
-					}
-					i++;
-				}
-				CGLDescribeRenderer(info, j, kCGLRPDepthModes, &(renderer->depthModes));
-				i=0;
-				while (depthModes[i] != 0)
-				{
-					if ((renderer->depthModes & depthModes[i]) != 0)
-					{
-						renderer->depthSizeMAX = depthModesBits[i];
-						renderer->depthModesCount++;
-					}
-					i++;
-				}
-				CGLDescribeRenderer(info, j, kCGLRPStencilModes, &(renderer->stencilModes));
-				i=0;
-				while (depthModes[i] != 0)
-				{
-					if ((renderer->stencilModes & depthModes[i]) != 0)
-					{
-						renderer->stencilSizeMAX = depthModesBits[i];
-						renderer->stencilModesCount++;
-					}
-					i++;
-				}
-				CGLDescribeRenderer(info, j, kCGLRPAccumModes, &(renderer->accumModes));
-				i=0;
-				while (colorModes[i] != 0)
-				{
-					if ((renderer->accumModes & colorModes[i]) != 0)
-					{
-						if ((colorModesBitsRGB[i] >= renderer->accumRGBSizeMAX) && (colorModesBitsA[i] >= renderer->accumASizeMAX))
-						{
-							renderer->accumRGBSizeMAX = colorModesBitsRGB[i];
-							renderer->accumASizeMAX = colorModesBitsA[i];
-						}
-						renderer->accumModesCount++;
-					}
-					i++;
-				}
-			}
-		}
-		CGLDestroyRendererInfo (info);
-	}
-	
+                CGLDescribeRenderer(info, j, kCGLRPColorModes, &(renderer->colorModes));
+                i=0;
+                int floatPixelFormatInitialized = 0;
+                while (colorModes[i] != 0)
+                {
+                    if ((renderer->colorModes & colorModes[i]) != 0)
+                    {
+                        // non-float color model
+                        if (colorModes[i] < kCGLRGBFloat64Bit)
+                        {
+                            // look for max color and alpha values - prefer color models that have alpha
+                            if ((colorModesBitsRGB[i] >= renderer->colorRGBSizeMAX) && (colorModesBitsA[i] >= renderer->colorASizeMAX))
+                            {
+                                renderer->colorRGBSizeMAX = colorModesBitsRGB[i];
+                                renderer->colorASizeMAX = colorModesBitsA[i];
+                            }
+                            renderer->colorModesCount++;
+                        }
+                        // float-color model
+                        if (colorModes[i] >= kCGLRGBFloat64Bit)
+                        {
+                            if (floatPixelFormatInitialized == 0)
+                            {
+                                floatPixelFormatInitialized = 1;
+                                
+                                renderer->colorFloatASizeMAX = colorModesBitsA[i];
+                                renderer->colorFloatRGBSizeMAX = colorModesBitsRGB[i];
+                                renderer->colorFloatASizeMIN = colorModesBitsA[i];
+                                renderer->colorFloatRGBSizeMIN = colorModesBitsRGB[i];
+                            }
+                            // look for max color and alpha values - prefer color models that have alpha
+                            if ((colorModesBitsRGB[i] >= renderer->colorFloatRGBSizeMAX) && (colorModesBitsA[i] >= renderer->colorFloatASizeMAX))
+                            {
+                                renderer->colorFloatRGBSizeMAX = colorModesBitsRGB[i];
+                                renderer->colorFloatASizeMAX = colorModesBitsA[i];
+                            }
+                            // find min color
+                            if (colorModesBitsA[i] < renderer->colorFloatASizeMIN)
+                            {
+                                renderer->colorFloatASizeMIN = colorModesBitsA[i];
+                            }
+                            // find min alpha color
+                            if (colorModesBitsA[i] < renderer->colorFloatRGBSizeMIN)
+                            {
+                                renderer->colorFloatRGBSizeMIN = colorModesBitsRGB[i];
+                            }
+                            renderer->colorFloatModesCount++;
+                        }
+                    }
+                    i++;
+                }
+                CGLDescribeRenderer(info, j, kCGLRPDepthModes, &(renderer->depthModes));
+                i=0;
+                while (depthModes[i] != 0)
+                {
+                    if ((renderer->depthModes & depthModes[i]) != 0)
+                    {
+                        renderer->depthSizeMAX = depthModesBits[i];
+                        renderer->depthModesCount++;
+                    }
+                    i++;
+                }
+                CGLDescribeRenderer(info, j, kCGLRPStencilModes, &(renderer->stencilModes));
+                i=0;
+                while (depthModes[i] != 0)
+                {
+                    if ((renderer->stencilModes & depthModes[i]) != 0)
+                    {
+                        renderer->stencilSizeMAX = depthModesBits[i];
+                        renderer->stencilModesCount++;
+                    }
+                    i++;
+                }
+                CGLDescribeRenderer(info, j, kCGLRPAccumModes, &(renderer->accumModes));
+                i=0;
+                while (colorModes[i] != 0)
+                {
+                    if ((renderer->accumModes & colorModes[i]) != 0)
+                    {
+                        if ((colorModesBitsRGB[i] >= renderer->accumRGBSizeMAX) && (colorModesBitsA[i] >= renderer->accumASizeMAX))
+                        {
+                            renderer->accumRGBSizeMAX = colorModesBitsRGB[i];
+                            renderer->accumASizeMAX = colorModesBitsA[i];
+                        }
+                        renderer->accumModesCount++;
+                    }
+                    i++;
+                }
+            }
+        }
+        CGLDestroyRendererInfo (info);
+    }
+    
 #if 0
-	fprintf(stderr, "gRenderersCount=%ld\n", gRenderersCount);
-	int j;
-	for (j=0; j<gRenderersCount; j++)
-	{
-		RendererInfo *renderer = &gRenderers[j];
-		fprintf(stderr, "	id=%ld\n", renderer->id);
-		fprintf(stderr, "	displayMask=%ld\n", renderer->displayMask);
-		
-		fprintf(stderr, "		accelerated=%ld\n", renderer->accelerated);
-		
-		fprintf(stderr, "		window=%ld\n", renderer->window);
-		fprintf(stderr, "		fullscreen=%ld\n", renderer->fullscreen);
-		fprintf(stderr, "		multiscreen=%ld\n", renderer->multiscreen);
-		fprintf(stderr, "		offscreen=%ld\n", renderer->offscreen);
-		fprintf(stderr, "		floatPixels=%ld\n", renderer->floatPixels);
-		fprintf(stderr, "		stereo=%ld\n", renderer->stereo);
-		
-		fprintf(stderr, "		auxBuffers=%ld\n", renderer->auxBuffers);
-		fprintf(stderr, "		sampleBuffers=%ld\n", renderer->sampleBuffers);
-		fprintf(stderr, "		samples=%ld\n", renderer->samples);
-		fprintf(stderr, "		samplesModes=%ld\n", renderer->samplesModes);
-		fprintf(stderr, "		multiSample=%ld\n", renderer->superSample);
-		fprintf(stderr, "		superSample=%ld\n", renderer->superSample);
-		fprintf(stderr, "		alphaSample=%ld\n", renderer->alphaSample);
-		
-		fprintf(stderr, "		colorModes=%ld\n", renderer->colorModes);
-		fprintf(stderr, "			colorRGBSizeMAX=%ld\n", renderer->colorRGBSizeMAX);
-		fprintf(stderr, "			colorASizeMAX=%ld\n", renderer->colorASizeMAX);
-		fprintf(stderr, "			colorFloatRGBSizeMAX=%ld\n", renderer->colorFloatRGBSizeMAX);
-		fprintf(stderr, "			colorFloatASizeMAX=%ld\n", renderer->colorFloatASizeMAX);
-		fprintf(stderr, "			colorFloatRGBSizeMIN=%ld\n", renderer->colorFloatRGBSizeMIN);
-		fprintf(stderr, "			colorFloatASizeMIN=%ld\n", renderer->colorFloatASizeMIN);
-		fprintf(stderr, "			colorModesCount=%ld\n", renderer->colorModesCount);
-		fprintf(stderr, "			colorFloatModesCount=%ld\n", renderer->colorFloatModesCount);
-		fprintf(stderr, "		depthModes=%ld\n", renderer->depthModes);
-		fprintf(stderr, "			depthSizeMAX=%ld\n", renderer->depthSizeMAX);
-		fprintf(stderr, "			depthModesCount=%ld\n", renderer->depthModesCount);
-		fprintf(stderr, "		stencilModes=%ld\n", renderer->stencilModes);
-		fprintf(stderr, "			stencilSizeMAX=%ld\n", renderer->stencilSizeMAX);
-		fprintf(stderr, "			stencilModesCount=%ld\n", renderer->stencilModesCount);
-		fprintf(stderr, "		accumModes=%ld\n", renderer->accumModes);
-		fprintf(stderr, "			accumRGBSizeMAX=%ld\n", renderer->accumRGBSizeMAX);
-		fprintf(stderr, "			accumASizeMAX=%ld\n", renderer->accumASizeMAX);
-		fprintf(stderr, "			accumModesCount=%ld\n", renderer->accumModesCount);
-		fprintf(stderr, "\n");
-	}
+    fprintf(stderr, "gRenderersCount=%ld\n", gRenderersCount);
+    int j;
+    for (j=0; j<gRenderersCount; j++)
+    {
+        RendererInfo *renderer = &gRenderers[j];
+        fprintf(stderr, "    id=%ld\n", renderer->id);
+        fprintf(stderr, "    displayMask=%ld\n", renderer->displayMask);
+        
+        fprintf(stderr, "        accelerated=%ld\n", renderer->accelerated);
+        
+        fprintf(stderr, "        window=%ld\n", renderer->window);
+        fprintf(stderr, "        fullscreen=%ld\n", renderer->fullscreen);
+        fprintf(stderr, "        multiscreen=%ld\n", renderer->multiscreen);
+        fprintf(stderr, "        offscreen=%ld\n", renderer->offscreen);
+        fprintf(stderr, "        floatPixels=%ld\n", renderer->floatPixels);
+        fprintf(stderr, "        stereo=%ld\n", renderer->stereo);
+        
+        fprintf(stderr, "        auxBuffers=%ld\n", renderer->auxBuffers);
+        fprintf(stderr, "        sampleBuffers=%ld\n", renderer->sampleBuffers);
+        fprintf(stderr, "        samples=%ld\n", renderer->samples);
+        fprintf(stderr, "        samplesModes=%ld\n", renderer->samplesModes);
+        fprintf(stderr, "        multiSample=%ld\n", renderer->superSample);
+        fprintf(stderr, "        superSample=%ld\n", renderer->superSample);
+        fprintf(stderr, "        alphaSample=%ld\n", renderer->alphaSample);
+        
+        fprintf(stderr, "        colorModes=%ld\n", renderer->colorModes);
+        fprintf(stderr, "            colorRGBSizeMAX=%ld\n", renderer->colorRGBSizeMAX);
+        fprintf(stderr, "            colorASizeMAX=%ld\n", renderer->colorASizeMAX);
+        fprintf(stderr, "            colorFloatRGBSizeMAX=%ld\n", renderer->colorFloatRGBSizeMAX);
+        fprintf(stderr, "            colorFloatASizeMAX=%ld\n", renderer->colorFloatASizeMAX);
+        fprintf(stderr, "            colorFloatRGBSizeMIN=%ld\n", renderer->colorFloatRGBSizeMIN);
+        fprintf(stderr, "            colorFloatASizeMIN=%ld\n", renderer->colorFloatASizeMIN);
+        fprintf(stderr, "            colorModesCount=%ld\n", renderer->colorModesCount);
+        fprintf(stderr, "            colorFloatModesCount=%ld\n", renderer->colorFloatModesCount);
+        fprintf(stderr, "        depthModes=%ld\n", renderer->depthModes);
+        fprintf(stderr, "            depthSizeMAX=%ld\n", renderer->depthSizeMAX);
+        fprintf(stderr, "            depthModesCount=%ld\n", renderer->depthModesCount);
+        fprintf(stderr, "        stencilModes=%ld\n", renderer->stencilModes);
+        fprintf(stderr, "            stencilSizeMAX=%ld\n", renderer->stencilSizeMAX);
+        fprintf(stderr, "            stencilModesCount=%ld\n", renderer->stencilModesCount);
+        fprintf(stderr, "        accumModes=%ld\n", renderer->accumModes);
+        fprintf(stderr, "            accumRGBSizeMAX=%ld\n", renderer->accumRGBSizeMAX);
+        fprintf(stderr, "            accumASizeMAX=%ld\n", renderer->accumASizeMAX);
+        fprintf(stderr, "            accumModesCount=%ld\n", renderer->accumModesCount);
+        fprintf(stderr, "\n");
+    }
 #endif
 }
 
@@ -368,7 +368,7 @@ long validateParameter(NSOpenGLPixelFormatAttribute attribute, long value)
       }
     }
   }
-	
+    
   return value;
 }
 
@@ -470,68 +470,73 @@ void deletePixelFormat(void* pixelFormat) {
 void* createContext(void* shareContext,
                     void* view,
                     void* pixelFormat,
+                    Bool opaque,
                     int* viewNotReady)
 {
-	getRendererInfo();
-	
-	NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
+    getRendererInfo();
+    
+    NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
 
-	NSView *nsView = NULL;
+    NSView *nsView = NULL;
     NSObject *nsObj = (NSObject*) view;
 
     if( nsObj != NULL && [nsObj isKindOfClass:[NSView class]] ) {
         nsView = (NSView*)nsObj;
     }
 
-	if (nsView != NULL)
-	{
-		Bool viewReady = true;
-
-		if ([nsView lockFocusIfCanDraw] == NO)
-		{
-			viewReady = false;
-		}
-		else
-		{
-			NSRect frame = [nsView frame];
-			if ((frame.size.width == 0) || (frame.size.height == 0))
-			{
-				[nsView unlockFocus];		
-				viewReady = false;
-			}
-		}
-
-		if (!viewReady)
-		{
-			if (viewNotReady != NULL)
-			{
-				*viewNotReady = 1;
-			}
-
-			// the view is not ready yet
-			[pool release];
-			return NULL;
-		}
-	}
-	
-	NSOpenGLContext* nsContext = [[NSOpenGLContext alloc]
+    if (nsView != NULL)
+    {
+        Bool viewReady = true;
+
+        if ([nsView lockFocusIfCanDraw] == NO)
+        {
+            viewReady = false;
+        }
+        else
+        {
+            NSRect frame = [nsView frame];
+            if ((frame.size.width == 0) || (frame.size.height == 0))
+            {
+                [nsView unlockFocus];        
+                viewReady = false;
+            }
+        }
+
+        if (!viewReady)
+        {
+            if (viewNotReady != NULL)
+            {
+                *viewNotReady = 1;
+            }
+
+            // the view is not ready yet
+            [pool release];
+            return NULL;
+        }
+    }
+    
+    NSOpenGLContext* nsContext = [[NSOpenGLContext alloc]
                                        initWithFormat: (NSOpenGLPixelFormat*) pixelFormat
                                        shareContext:   (NSOpenGLContext*) shareContext];
-		
+        
         if (nsContext != nil) {
           if (nsView != nil) {
+            if(!opaque) {
+                long zeroOpacity = 0;
+                [nsContext setValues:&zeroOpacity forParameter:NSOpenGLCPSurfaceOpacity];
+            }
             [nsContext setView:nsView];
-            [nsView unlockFocus];		
+            [nsView unlockFocus];        
           }
         }
 
-	[pool release];
-	return nsContext;
+    [pool release];
+    return nsContext;
 }
 
 void * getCurrentContext() {
   NSOpenGLContext *nsContext = NULL;
-	
+    
   NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
   nsContext = [NSOpenGLContext currentContext];
   [pool release];
@@ -541,7 +546,7 @@ void * getCurrentContext() {
 void * getCGLContext(void* nsJContext) {
   NSOpenGLContext *nsContext = (NSOpenGLContext*)nsJContext;
   void * cglContext = NULL;
-	
+    
   NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
   cglContext = [nsContext CGLContextObj];
   [pool release];
@@ -551,7 +556,7 @@ void * getCGLContext(void* nsJContext) {
 void * getNSView(void* nsJContext) {
   NSOpenGLContext *nsContext = (NSOpenGLContext*)nsJContext;
   void * view = NULL;
-	
+    
   NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
   view = [nsContext view];
   [pool release];
@@ -560,7 +565,7 @@ void * getNSView(void* nsJContext) {
 
 Bool makeCurrentContext(void* nsJContext) {
   NSOpenGLContext *nsContext = (NSOpenGLContext*)nsJContext;
-	
+    
   NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
   [nsContext makeCurrentContext];
   [pool release];
@@ -582,7 +587,7 @@ Bool clearCurrentContext(void* nsJContext) {
 
 Bool deleteContext(void* nsJContext) {
   NSOpenGLContext *nsContext = (NSOpenGLContext*)nsJContext;
-	
+    
   NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
   [nsContext clearDrawable];
   [nsContext release];
@@ -592,7 +597,7 @@ Bool deleteContext(void* nsJContext) {
 
 Bool flushBuffer(void* nsJContext) {
   NSOpenGLContext *nsContext = (NSOpenGLContext*)nsJContext;
-	
+    
   NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
   [nsContext flushBuffer];
   [pool release];
@@ -607,7 +612,7 @@ void setContextOpacity(void* nsJContext, int opacity) {
 
 void updateContext(void* nsJContext) {
   NSOpenGLContext *nsContext = (NSOpenGLContext*)nsJContext;
-	
+    
   NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
   [nsContext update];
   [pool release];
@@ -622,7 +627,7 @@ void copyContext(void* destContext, void* srcContext, int mask) {
 void* updateContextRegister(void* nsJContext, void* view) {
   NSOpenGLContext *nsContext = (NSOpenGLContext*)nsJContext;
   NSView *nsView = (NSView*)view;
-	
+    
   NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
   ContextUpdater *contextUpdater = [[ContextUpdater alloc] init];
   [contextUpdater registerFor:nsContext with:nsView];
@@ -632,7 +637,7 @@ void* updateContextRegister(void* nsJContext, void* view) {
 
 void updateContextUnregister(void* updater) {
   ContextUpdater *contextUpdater = (ContextUpdater *)updater;
-	
+    
   NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
   [contextUpdater release];
   [pool release];
@@ -653,7 +658,7 @@ void* createPBuffer(int renderTarget, int internalFormat, int width, int height)
 Bool destroyPBuffer(void* buffer) {
   /* FIXME: not clear whether we need to perform the clearDrawable below */
   NSOpenGLPixelBuffer *pBuffer = (NSOpenGLPixelBuffer*)buffer;
-	
+    
   NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
   /*
   if (nsContext != NULL) {
@@ -662,7 +667,7 @@ Bool destroyPBuffer(void* buffer) {
   */
   [pBuffer release];
   [pool release];
-	
+    
   return true;
 }
 
@@ -701,21 +706,21 @@ void* getProcAddress(const char *procname) {
     libGLImage = NSAddImage(libGLStr, options);
     libGLUImage = NSAddImage(libGLUStr, options);
   }
-	
+    
   unsigned long options = NSLOOKUPSYMBOLINIMAGE_OPTION_BIND | NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR;
   char underscoreName[512] = "_";
   strcat(underscoreName, procname);
-	
+    
   if (NSIsSymbolNameDefinedInImage(libGLImage, underscoreName) == YES) {
     NSSymbol sym = NSLookupSymbolInImage(libGLImage, underscoreName, options);
     return NSAddressOfSymbol(sym);
   }
-	
-  if (NSIsSymbolNameDefinedInImage(libGLUImage, underscoreName) == YES)	{
+    
+  if (NSIsSymbolNameDefinedInImage(libGLUImage, underscoreName) == YES)    {
     NSSymbol sym = NSLookupSymbolInImage(libGLUImage, underscoreName, options);
     return NSAddressOfSymbol(sym);
   }
-	
+    
   if (NSIsSymbolNameDefinedWithHint(underscoreName, "GL")) {
     NSSymbol sym = NSLookupAndBindSymbol(underscoreName);
     return NSAddressOfSymbol(sym);
diff --git a/src/jogl/native/openmax/omx_tool.c b/src/jogl/native/openmax/omx_tool.c
index c6b6494..57fa8ad 100644
--- a/src/jogl/native/openmax/omx_tool.c
+++ b/src/jogl/native/openmax/omx_tool.c
@@ -199,10 +199,10 @@ static OMX_ERRORTYPE EventHandler(
                 if (pOMXAV->endComponent == hComponent)
                 {
                     DBG_PRINT("\t end component - FIN\n");
-				    pOMXAV->status = OMXAV_FIN;
+                    pOMXAV->status = OMXAV_FIN;
                 }
-		    }
-		    break;
+            }
+            break;
         case OMX_EventError: 
             {
                 if (nData1 == OMX_ErrorIncorrectStateTransition)
@@ -1053,11 +1053,11 @@ void OMXToolBasicAV_SetStream(OMXToolBasicAV_t * pOMXAV, int vBufferNum, const K
     {
 
         OMX_TIME_CONFIG_ACTIVEREFCLOCKTYPE oActiveClockType;
-		INIT_PARAM(oActiveClockType);
-		oActiveClockType.eClock = (pOMXAV->audioPort != -1) ?
+        INIT_PARAM(oActiveClockType);
+        oActiveClockType.eClock = (pOMXAV->audioPort != -1) ?
                     OMX_TIME_RefClockAudio : OMX_TIME_RefClockVideo;
         OMXSAFEVOID(OMX_SetConfig(pOMXAV->comp[OMXAV_H_CLOCK], OMX_IndexConfigTimeActiveRefClock,
-							   &oActiveClockType));
+                               &oActiveClockType));
     }
     OMXSAFEVOID(OMX_SendCommand(pOMXAV->comp[OMXAV_H_CLOCK], OMX_CommandPortDisable, (OMX_U32) -1, 0));
 
diff --git a/src/jogl/native/openmax/omx_tool.h b/src/jogl/native/openmax/omx_tool.h
index dbc375d..d566507 100644
--- a/src/jogl/native/openmax/omx_tool.h
+++ b/src/jogl/native/openmax/omx_tool.h
@@ -10,25 +10,10 @@
     // __declspec(dllimport) void __stdcall Sleep(unsigned long dwMilliseconds);
 
     #define usleep(t)    Sleep((t) / 1000)
-
-    #ifdef _MSC_VER
-        /* This typedef is apparently needed for Microsoft compilers before VC8,
-           and on Windows CE */
-        #if !defined(__MINGW64__) && ( defined(UNDER_CE) || _MSC_VER <= 1400 )
-            #ifdef _WIN64
-                typedef long long intptr_t;
-            #else
-                typedef int intptr_t;
-            #endif
-        #endif
-    #else
-        #include <inttypes.h>
-    #endif
-#else
-    #include <unistd.h>
-    #include <inttypes.h>
 #endif
 
+#include <gluegen_stdint.h>
+
 #include <OMX_Core.h>
 #include <OMX_Component.h>
 #include <OMX_Index.h>
diff --git a/src/nativewindow/classes/javax/media/nativewindow/Capabilities.java b/src/nativewindow/classes/javax/media/nativewindow/Capabilities.java
index 79d69c7..368847e 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/Capabilities.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/Capabilities.java
@@ -52,10 +52,10 @@ public class Capabilities implements CapabilitiesImmutable, Cloneable, Comparabl
 
   // Support for transparent windows containing OpenGL content
   private boolean backgroundOpaque = true;
-  private int     transparentValueRed = -1;
-  private int     transparentValueGreen = -1;
-  private int     transparentValueBlue = -1;
-  private int     transparentValueAlpha = -1;
+  private int     transparentValueRed = 0;
+  private int     transparentValueGreen = 0;
+  private int     transparentValueBlue = 0;
+  private int     transparentValueAlpha = 0;
 
   // Switch for on- or offscreen
   private boolean onscreen  = true;
@@ -117,7 +117,7 @@ public class Capabilities implements CapabilitiesImmutable, Cloneable, Comparabl
   /** comparing RGBA values only */
   public int compareTo(Object o) {
     if ( ! ( o instanceof Capabilities ) ) {
-        Class c = (null != o) ? o.getClass() : null ;
+        Class<?> c = (null != o) ? o.getClass() : null ;
         throw new ClassCastException("Not a Capabilities object: " + c);
     }
 
@@ -194,32 +194,35 @@ public class Capabilities implements CapabilitiesImmutable, Cloneable, Comparabl
     this.alphaBits = alphaBits;
   }
 
-  /** For on-screen OpenGL contexts on some platforms, sets whether
-      the background of the context should be considered opaque. On
-      supported platforms, setting this to false, in conjunction with
-      the transparency values, may allow
-      hardware-accelerated OpenGL content inside of windows of
-      arbitrary shape. To achieve this effect it is necessary to use
-      an OpenGL clear color with an alpha less than 1.0. The default
-      value for this flag is <code>true</code>; setting it to false
-      may incur a certain performance penalty, so it is not
-      recommended to arbitrarily set it to false.<br>
-      If not set already, the transparency values for red, green, blue and alpha
-      are set to their default value, which is half of the value range
-      of the framebuffer's corresponding component,
-      ie <code> redValue = ( 1 << ( redBits - 1 ) ) -1 </code>.
-    */
+    /**
+     * 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) {
-        if(transparentValueRed<0)
-            transparentValueRed = ( 1 << ( getRedBits() - 1 ) )  - 1 ;
-        if(transparentValueGreen<0)
-            transparentValueGreen = ( 1 << ( getGreenBits() - 1 ) )  - 1 ;
-        if(transparentValueBlue<0)
-            transparentValueBlue = ( 1 << ( getBlueBits() - 1 ) )  - 1 ;
-        if(transparentValueAlpha<0)
-            transparentValueAlpha = ( 1 << ( getAlphaBits() - 1 ) )  - 1 ;
+    if(!opaque && getAlphaBits()==0) {
+        setAlphaBits(1);
     }
   }
 
@@ -307,14 +310,15 @@ public class Capabilities implements CapabilitiesImmutable, Cloneable, Comparabl
     } else {
         sink.append("offscr");
     }
-    sink.append(", rgba ").append(redBits).append("/").append(greenBits).append("/").append(blueBits).append("/").append(alphaBits);
+    sink.append(", rgba 0x").append(toHexString(redBits)).append("/").append(toHexString(greenBits)).append("/").append(toHexString(blueBits)).append("/").append(toHexString(alphaBits));
     if(backgroundOpaque) {
         sink.append(", opaque");
     } else {
-        sink.append(", trans-rgba 0x").append(Integer.toHexString(transparentValueRed)).append("/").append(Integer.toHexString(transparentValueGreen)).append("/").append(Integer.toHexString(transparentValueBlue)).append("/").append(Integer.toHexString(transparentValueAlpha));
+        sink.append(", trans-rgba 0x").append(toHexString(transparentValueRed)).append("/").append(toHexString(transparentValueGreen)).append("/").append(toHexString(transparentValueBlue)).append("/").append(toHexString(transparentValueAlpha));
     }
     return sink;
   }
+  protected final String toHexString(int val) { return Integer.toHexString(val); }
 
   /** Returns a textual representation of this Capabilities
       object. */ 
diff --git a/src/nativewindow/classes/javax/media/nativewindow/CapabilitiesImmutable.java b/src/nativewindow/classes/javax/media/nativewindow/CapabilitiesImmutable.java
index 3aae8c8..eccdf77 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/CapabilitiesImmutable.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/CapabilitiesImmutable.java
@@ -101,17 +101,18 @@ public interface CapabilitiesImmutable extends WriteCloneable {
      */
     int getTransparentAlphaValue();
 
-    Object cloneMutable();
-    
     /** Equality over the immutable attributes of both objects */
+    @Override
     boolean equals(Object obj);
 
     /** hash code over the immutable attributes of both objects */
+    @Override
     int hashCode();
 
     /** Return a textual representation of this object. Use the given StringBuffer [optional]. */
     StringBuffer toString(StringBuffer sink);
 
     /** Returns a textual representation of this object. */
+    @Override
     String toString();
 }
diff --git a/src/nativewindow/classes/javax/media/nativewindow/DefaultCapabilitiesChooser.java b/src/nativewindow/classes/javax/media/nativewindow/DefaultCapabilitiesChooser.java
index b43db82..6709344 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/DefaultCapabilitiesChooser.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/DefaultCapabilitiesChooser.java
@@ -40,8 +40,11 @@
 
 package javax.media.nativewindow;
 
+import java.security.AccessController;
 import java.util.List;
 
+import jogamp.nativewindow.Debug;
+
 /** <P> The default implementation of the {@link
     CapabilitiesChooser} interface, which provides consistent visual
     selection behavior across platforms. The precise algorithm is
@@ -64,7 +67,7 @@ import java.util.List;
 */
 
 public class DefaultCapabilitiesChooser implements CapabilitiesChooser {
-  private static final boolean DEBUG = false; // FIXME: Debug.debug("DefaultCapabilitiesChooser");
+  private static final boolean DEBUG = Debug.isPropertyDefined("nativewindow.debug.CapabilitiesChooser", true, AccessController.getContext());
 
   public int chooseCapabilities(final CapabilitiesImmutable desired,
                                 final List /*<CapabilitiesImmutable>*/ available,
@@ -131,7 +134,7 @@ public class DefaultCapabilitiesChooser implements CapabilitiesChooser {
       // Don't substitute a positive score for a smaller negative score
       if ((scoreClosestToZero == NO_SCORE) ||
           (Math.abs(score) < Math.abs(scoreClosestToZero) &&
-	   ((sign(scoreClosestToZero) < 0) || (sign(score) > 0)))) {
+       ((sign(scoreClosestToZero) < 0) || (sign(score) > 0)))) {
         scoreClosestToZero = score;
         chosenIndex = i;
       }
diff --git a/src/nativewindow/classes/javax/media/nativewindow/NativeSurface.java b/src/nativewindow/classes/javax/media/nativewindow/NativeSurface.java
index a5b71fb..e691ba8 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/NativeSurface.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/NativeSurface.java
@@ -135,10 +135,16 @@ public interface NativeSurface extends SurfaceUpdatedListener {
    */
   public long getSurfaceHandle();
 
-  /** Returns the current width of this surface. */
+  /**
+   * Returns the width of the client area excluding insets (window decorations).
+   * @return width of the client area
+   */
   public int getWidth();
 
-  /** Returns the current height of this surface. */
+  /**
+   * Returns the height of the client area excluding insets (window decorations).
+   * @return height of the client area
+   */
   public int getHeight();
 
   /**
diff --git a/src/nativewindow/classes/javax/media/nativewindow/NativeWindow.java b/src/nativewindow/classes/javax/media/nativewindow/NativeWindow.java
index d65cc8c..76ac729 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/NativeWindow.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/NativeWindow.java
@@ -40,6 +40,7 @@
 
 package javax.media.nativewindow;
 
+import javax.media.nativewindow.util.InsetsImmutable;
 import javax.media.nativewindow.util.Point;
 
 /** Extend the {@link NativeSurface} interface with windowing
@@ -74,10 +75,45 @@ public interface NativeWindow extends NativeSurface {
    */
   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> 
+   * 
+   * The top-level window size is
+   * <pre>
+   *   getWidth()  + getInsets().{@link InsetsImmutable#getTotalWidth() getTotalWidth()} 
+   *   getHeight() + getInsets().{@link InsetsImmutable#getTotalHeight() getTotalHeight()}
+   * </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, hence excluding insets (window decorations).<br> 
+   * @see #getInsets()
+   */
   public int getX();
 
-  /** Returns the current y position of this window, relative to it's parent. */
+  /** 
+   * @return the current y position of the top-left corner
+   *         of the client area, hence excluding insets (window decorations).<br> 
+   * @see #getInsets()
+   */
   public int getY();
 
   /** 
diff --git a/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java b/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java
index b0f5cb3..ef8876f 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java
@@ -37,7 +37,8 @@ import java.security.*;
 import java.util.*;
 
 import com.jogamp.common.util.*;
-import com.jogamp.common.jvm.JVMUtil;
+import com.jogamp.common.os.Platform;
+
 import jogamp.nativewindow.*;
 import java.lang.reflect.Constructor;
 import java.lang.reflect.Method;
@@ -60,6 +61,9 @@ public abstract class NativeWindowFactory {
     /** X11 type, as retrieved with {@link #getNativeWindowType(boolean)} */
     public static final String TYPE_X11 = "X11";
 
+    /** Android/EGL type, as retrieved with {@link #getNativeWindowType(boolean)}*/
+    public static final String TYPE_ANDROID = "ANDROID";
+
     /** Mac OS X type, as retrieved with {@link #getNativeWindowType(boolean)} */
     public static final String TYPE_MACOSX = "MacOSX";
 
@@ -70,50 +74,55 @@ public abstract class NativeWindowFactory {
     public static final String TYPE_DEFAULT = "default";
 
     private static NativeWindowFactory defaultFactory;
-    private static Map/*<Class, NativeWindowFactory>*/ registeredFactories;
-    private static Class nativeWindowClass;
+    private static Map<Class<?>, NativeWindowFactory> registeredFactories;
+    private static Class<?> nativeWindowClass;
     private static String nativeWindowingTypePure;
-    private static String nativeOSNamePure;
     private static String nativeWindowingTypeCustom;
-    private static String nativeOSNameCustom;
     private static boolean isAWTAvailable;
     public static final String AWTComponentClassName = "java.awt.Component" ;
     public static final String JAWTUtilClassName = "jogamp.nativewindow.jawt.JAWTUtil" ;
     public static final String X11UtilClassName = "jogamp.nativewindow.x11.X11Util";
+    public static final String OSXUtilClassName = "jogamp.nativewindow.macosx.OSXUtil";
     public static final String GDIClassName = "jogamp.nativewindow.windows.GDI";
     public static final String X11JAWTToolkitLockClassName = "jogamp.nativewindow.jawt.x11.X11JAWTToolkitLock" ;
     public static final String X11ToolkitLockClassName = "jogamp.nativewindow.x11.X11ToolkitLock" ;
-    private static Class  jawtUtilClass;
+    private static Class<?>  jawtUtilClass;
     private static Method jawtUtilGetJAWTToolkitMethod;
     private static Method jawtUtilInitMethod;
-    private static Class  x11JAWTToolkitLockClass;
-    private static Constructor x11JAWTToolkitLockConstructor;
-    private static Class  x11ToolkitLockClass;
-    private static Constructor x11ToolkitLockConstructor;
+    private static Class<?>  x11JAWTToolkitLockClass;
+    private static Constructor<?> x11JAWTToolkitLockConstructor;
+    private static Class<?>  x11ToolkitLockClass;
+    private static Constructor<?> x11ToolkitLockConstructor;
     private static boolean isFirstUIActionOnProcess;
+    private static boolean requiresToolkitLock;
 
     /** Creates a new NativeWindowFactory instance. End users do not
         need to call this method. */
     protected NativeWindowFactory() {
     }
 
-    private static String _getNativeWindowingType(String osNameLowerCase) {
-        if (osNameLowerCase.startsWith("kd")) {
-              return TYPE_EGL;
-        } else if (osNameLowerCase.startsWith("wind")) {
-              return TYPE_WINDOWS;
-        } else if (osNameLowerCase.startsWith("mac os x") ||
-                   osNameLowerCase.startsWith("darwin")) {
+    private static String _getNativeWindowingType() {
+        switch(Platform.OS_TYPE) {
+            case ANDROID:
+              return TYPE_ANDROID;
+            case MACOS:
               return TYPE_MACOSX;
-        } else if (osNameLowerCase.equals("awt")) {
-              return TYPE_AWT;
-        } else {
+            case WINDOWS:
+              return TYPE_WINDOWS;                
+            case OPENKODE:
+              return TYPE_EGL;
+                
+            case LINUX:
+            case FREEBSD:
+            case SUNOS:
+            case HPUX:
+            default:
               return TYPE_X11;
         }
     }
 
     static {
-        JVMUtil.initSingleton();
+        Platform.initSingleton();
         DEBUG = Debug.debug("NativeWindow");
         if(DEBUG) {
             Throwable td = new Throwable(Thread.currentThread().getName()+" - Info: NativeWindowFactory.<init>");
@@ -124,16 +133,25 @@ public abstract class NativeWindowFactory {
     static boolean initialized = false;
 
     private static void initNativeImpl(final boolean firstUIActionOnProcess, final ClassLoader cl) {
+        isFirstUIActionOnProcess = firstUIActionOnProcess;
+
         String clazzName = null;
         if( TYPE_X11.equals(nativeWindowingTypePure) ) {
             clazzName = X11UtilClassName;
         } else if( TYPE_WINDOWS.equals(nativeWindowingTypePure) ) {
             clazzName = GDIClassName;
+        } else if( TYPE_MACOSX.equals(nativeWindowingTypePure) ) {
+            clazzName = OSXUtilClassName;
         }
         if( null != clazzName ) {
             ReflectionUtil.callStaticMethod(clazzName, "initSingleton",
                                             new Class[] { boolean.class },
                                             new Object[] { new Boolean(firstUIActionOnProcess) }, cl );
+            
+            final Boolean res = (Boolean) ReflectionUtil.callStaticMethod(clazzName, "requiresToolkitLock", null, null, cl);
+            requiresToolkitLock = res.booleanValue();             
+        } else {            
+            requiresToolkitLock = false;
         }
     }
 
@@ -162,30 +180,27 @@ public abstract class NativeWindowFactory {
 
             // Gather the windowing OS first
             AccessControlContext acc = AccessController.getContext();
-            nativeOSNamePure = Debug.getProperty("os.name", false, acc);
-            nativeWindowingTypePure = _getNativeWindowingType(nativeOSNamePure.toLowerCase());
-            nativeOSNameCustom = Debug.getProperty("nativewindow.ws.name", true, acc);
-            if(null==nativeOSNameCustom||nativeOSNameCustom.length()==0) {
-                nativeOSNameCustom = nativeOSNamePure;
+            nativeWindowingTypePure = _getNativeWindowingType();
+            String tmp = Debug.getProperty("nativewindow.ws.name", true, acc);
+            if(null==tmp || tmp.length()==0) {
                 nativeWindowingTypeCustom = nativeWindowingTypePure;
             } else {
-                nativeWindowingTypeCustom = nativeOSNameCustom;
+                nativeWindowingTypeCustom = tmp;
             }
 
             final ClassLoader cl = NativeWindowFactory.class.getClassLoader();
 
             if(firstUIActionOnProcess) {
                 // X11 initialization before possible AWT initialization
-                initNativeImpl(firstUIActionOnProcess, cl);
+                initNativeImpl(true, cl);
             }
-            isFirstUIActionOnProcess = firstUIActionOnProcess;
             isAWTAvailable = false; // may be set to true below
 
             if( !Debug.getBooleanProperty("java.awt.headless", true, acc) &&
                 ReflectionUtil.isClassAvailable(AWTComponentClassName, cl) &&
                 ReflectionUtil.isClassAvailable("javax.media.nativewindow.awt.AWTGraphicsDevice", cl) ) {
 
-                AccessController.doPrivileged(new PrivilegedAction() {
+                AccessController.doPrivileged(new PrivilegedAction<Object>() {
                     public Object run() {
                         try {
                             jawtUtilClass = Class.forName(JAWTUtilClassName, false, NativeWindowFactory.class.getClassLoader());
@@ -200,7 +215,7 @@ public abstract class NativeWindowFactory {
                     }
                 });
                 if(null != jawtUtilClass && null != jawtUtilGetJAWTToolkitMethod && null != jawtUtilInitMethod) {
-                    ReflectionUtil.callMethod(null, jawtUtilInitMethod, null);
+                    ReflectionUtil.callMethod(null, jawtUtilInitMethod);
 
                     Object resO = ReflectionUtil.callStaticMethod(JAWTUtilClassName, "isHeadlessMode", null, null, cl );
                     if(resO instanceof Boolean) {
@@ -212,9 +227,9 @@ public abstract class NativeWindowFactory {
             }
             if(!firstUIActionOnProcess) {
                 // X11 initialization after possible AWT initialization
-                initNativeImpl(firstUIActionOnProcess, cl);
+                initNativeImpl(false, cl);
             }
-            registeredFactories = Collections.synchronizedMap(new HashMap());
+            registeredFactories = Collections.synchronizedMap(new HashMap<Class<?>, NativeWindowFactory>());
 
             // register our default factory -> NativeWindow
             NativeWindowFactory factory = new NativeWindowFactoryImpl();
@@ -239,6 +254,7 @@ public abstract class NativeWindowFactory {
  
             if(DEBUG) {
                 System.err.println("NativeWindowFactory firstUIActionOnProcess "+firstUIActionOnProcess);
+                System.err.println("NativeWindowFactory requiresToolkitLock "+requiresToolkitLock);
                 System.err.println("NativeWindowFactory isAWTAvailable "+isAWTAvailable+", defaultFactory "+factory);
             }
         }
@@ -250,19 +266,16 @@ public abstract class NativeWindowFactory {
         return isFirstUIActionOnProcess;
     }
 
+    /** @return true if the underlying toolkit requires locking, otherwise false. */
+    public static boolean requiresToolkitLock() {
+        return requiresToolkitLock;
+    }    
+    
     /** @return true if not headless, AWT Component and NativeWindow's AWT part available */
     public static boolean isAWTAvailable() { return isAWTAvailable; }
 
     /**
      * @param useCustom if false return the native value, if true return a custom value if set, otherwise fallback to the native value.
-     * @return the native OS name
-     */
-    public static String getNativeOSName(boolean useCustom) {
-        return useCustom?nativeOSNameCustom:nativeOSNamePure;
-    }
-
-    /**
-     * @param useCustom if false return the native value, if true return a custom value if set, otherwise fallback to the native value.
      * @return a define native window type, like {@link #TYPE_X11}, ..
      */
     public static String getNativeWindowType(boolean useCustom) {
@@ -318,7 +331,7 @@ public abstract class NativeWindowFactory {
      * </ul>
      */
     public static ToolkitLock getDefaultToolkitLock(String type) {
-        if( !isFirstUIActionOnProcess() ) {
+        if( requiresToolkitLock() ) {
             if( TYPE_X11 == type || TYPE_AWT == type && TYPE_X11 == getNativeWindowType(false) ) {
                 if( isAWTAvailable() ) {
                     return getAWTToolkitLock();
@@ -329,7 +342,7 @@ public abstract class NativeWindowFactory {
     }
 
     protected static ToolkitLock getAWTToolkitLock() {
-        Object resO = ReflectionUtil.callMethod(null, jawtUtilGetJAWTToolkitMethod, null);
+        Object resO = ReflectionUtil.callMethod(null, jawtUtilGetJAWTToolkitMethod);
 
         if(resO instanceof ToolkitLock) {
             return (ToolkitLock) resO;
@@ -364,7 +377,7 @@ public abstract class NativeWindowFactory {
      * </ul>
      */
     public static ToolkitLock createDefaultToolkitLock(String type, long deviceHandle) {
-        if( !isFirstUIActionOnProcess() ) {
+        if( requiresToolkitLock() ) {
             if( TYPE_X11 == type ) {
                 if( 0== deviceHandle ) {
                     throw new RuntimeException("JAWTUtil.createDefaultToolkitLock() called with NULL device but on X11");
@@ -378,32 +391,6 @@ public abstract class NativeWindowFactory {
         return NativeWindowFactoryImpl.getNullToolkitLock();
     }
 
-    /**
-     * Creates the default {@link ToolkitLock} for <code>type</code> and <code>deviceHandle</code>.
-     * <br>
-     * <ul>
-     *   <li> If {@link #initSingleton(boolean) initSingleton( <b>firstUIActionOnProcess := false</b> )} </li>
-     *   <ul>
-     *     <li>If <b>X11 type</b> </li>
-     *     <ul>
-     *       <li> return {@link jogamp.nativewindow.x11.X11ToolkitLock} </li>
-     *     </ul>
-     *   </ul>
-     *   <li> Otherwise return {@link jogamp.nativewindow.NullToolkitLock} </li>
-     * </ul>
-     */
-    public static ToolkitLock createDefaultToolkitLockNoAWT(String type, long deviceHandle) {
-        if( !isFirstUIActionOnProcess() ) {
-            if( TYPE_X11 == type ) {
-                if( 0== deviceHandle ) {
-                    throw new RuntimeException("JAWTUtil.createDefaultToolkitLockNoAWT() called with NULL device but on X11");
-                }
-                return createX11ToolkitLock(deviceHandle);
-            }
-        }
-        return NativeWindowFactoryImpl.getNullToolkitLock();
-    }
-
     protected static ToolkitLock createX11AWTToolkitLock(long deviceHandle) {
         try {
             return (ToolkitLock) x11JAWTToolkitLockConstructor.newInstance(new Object[]{new Long(deviceHandle)});
@@ -427,13 +414,13 @@ public abstract class NativeWindowFactory {
         already assumed the responsibility of creating a compatible
         NativeWindow implementation, or it might be that of a toolkit
         class like {@link java.awt.Component Component}. */
-    public static NativeWindowFactory getFactory(Class windowClass) throws IllegalArgumentException {
+    public static NativeWindowFactory getFactory(Class<?> windowClass) throws IllegalArgumentException {
         if (nativeWindowClass.isAssignableFrom(windowClass)) {
-            return (NativeWindowFactory) registeredFactories.get(nativeWindowClass);
+            return registeredFactories.get(nativeWindowClass);
         }
-        Class clazz = windowClass;
+        Class<?> clazz = windowClass;
         while (clazz != null) {
-            NativeWindowFactory factory = (NativeWindowFactory) registeredFactories.get(clazz);
+            NativeWindowFactory factory = registeredFactories.get(clazz);
             if (factory != null) {
                 return factory;
             }
@@ -445,7 +432,7 @@ public abstract class NativeWindowFactory {
     /** Registers a NativeWindowFactory handling window objects of the
         given class. This does not need to be called by end users,
         only implementors of new NativeWindowFactory subclasses. */
-    protected static void registerFactory(Class windowClass, NativeWindowFactory factory) {
+    protected static void registerFactory(Class<?> windowClass, NativeWindowFactory factory) {
         if(DEBUG) {
             System.err.println("NativeWindowFactory.registerFactory() "+windowClass+" -> "+factory);
         }
diff --git a/src/nativewindow/classes/javax/media/nativewindow/ProxySurface.java b/src/nativewindow/classes/javax/media/nativewindow/ProxySurface.java
index 038580c..e344762 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/ProxySurface.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/ProxySurface.java
@@ -28,10 +28,11 @@
 
 package javax.media.nativewindow;
 
+import com.jogamp.common.util.locks.LockFactory;
 import com.jogamp.common.util.locks.RecursiveLock;
 
 public abstract class ProxySurface implements NativeSurface {
-    protected RecursiveLock surfaceLock = new RecursiveLock();
+    protected RecursiveLock surfaceLock = LockFactory.createRecursiveLock();
     protected AbstractGraphicsConfiguration config;
     protected long displayHandle;
     protected int height;
@@ -86,7 +87,7 @@ public abstract class ProxySurface implements NativeSurface {
 
     public int lockSurface() throws NativeWindowException {
         surfaceLock.lock();
-        int res = surfaceLock.getRecursionCount() == 0 ? LOCK_SURFACE_NOT_READY : LOCK_SUCCESS;
+        int res = surfaceLock.getHoldCount() == 1 ? LOCK_SURFACE_NOT_READY : LOCK_SUCCESS; // new lock ?
 
         if ( LOCK_SURFACE_NOT_READY == res ) {
             try {
@@ -111,7 +112,7 @@ public abstract class ProxySurface implements NativeSurface {
     public final void unlockSurface() {
         surfaceLock.validateLocked();
 
-        if (surfaceLock.getRecursionCount() == 0) {
+        if (surfaceLock.getHoldCount() == 1) {
             final AbstractGraphicsDevice adevice = config.getScreen().getDevice();
             try {
                 unlockSurfaceImpl();
@@ -142,9 +143,5 @@ public abstract class ProxySurface implements NativeSurface {
         return surfaceLock.getOwner();
     }
 
-    public final int getSurfaceRecursionCount() {
-        return surfaceLock.getRecursionCount();
-    }
-
     public abstract String toString();
 }
diff --git a/src/nativewindow/classes/javax/media/nativewindow/util/Dimension.java b/src/nativewindow/classes/javax/media/nativewindow/util/Dimension.java
index 4151c15..0a5a945 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/util/Dimension.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/util/Dimension.java
@@ -29,7 +29,7 @@
  
 package javax.media.nativewindow.util;
 
-public class Dimension implements Cloneable, DimensionReadOnly {
+public class Dimension implements Cloneable, DimensionImmutable {
     int width;
     int height;
 
@@ -45,6 +45,10 @@ public class Dimension implements Cloneable, DimensionReadOnly {
         this.height=height;
     }
 
+    public Object cloneMutable() {
+      return clone();
+    }
+  
     public Object clone() {
         try {
             return super.clone();
diff --git a/src/nativewindow/classes/javax/media/nativewindow/util/DimensionImmutable.java b/src/nativewindow/classes/javax/media/nativewindow/util/DimensionImmutable.java
new file mode 100644
index 0000000..d14e94c
--- /dev/null
+++ b/src/nativewindow/classes/javax/media/nativewindow/util/DimensionImmutable.java
@@ -0,0 +1,57 @@
+/**
+ * Copyright 2010 JogAmp Community. 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:
+ *
+ *    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.nativewindow.util;
+
+import com.jogamp.common.type.WriteCloneable;
+
+/** Immutable Dimension Interface, consisting of it's read only components:<br>
+ * <ul>
+ *  <li><code>width</code></li>
+ *  <li><code>height</code></li>
+ * </ul>
+ */
+public interface DimensionImmutable extends WriteCloneable {
+
+    int getHeight();
+
+    int getWidth();
+
+    /**
+     * Checks whether two dimensions objects are equal. Two instances
+     * of <code>DimensionReadOnly</code> are equal if two components
+     * <code>height</code> and <code>width</code> are equal.
+     * @return  <code>true</code> if the two dimensions are equal;
+     *          otherwise <code>false</code>.
+     */
+    boolean equals(Object obj);
+
+    int hashCode();
+
+}
diff --git a/src/nativewindow/classes/javax/media/nativewindow/util/DimensionReadOnly.java b/src/nativewindow/classes/javax/media/nativewindow/util/DimensionReadOnly.java
deleted file mode 100644
index 442afd4..0000000
--- a/src/nativewindow/classes/javax/media/nativewindow/util/DimensionReadOnly.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Copyright 2010 JogAmp Community. 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:
- *
- *    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.nativewindow.util;
-
-/** Immutable Dimension Interface, consisting of it's read only components:<br>
- * <ul>
- *  <li><code>width</code></li>
- *  <li><code>height</code></li>
- * </ul>
- */
-public interface DimensionReadOnly extends Cloneable {
-
-    int getHeight();
-
-    int getWidth();
-
-    /**
-     * Checks whether two dimensions objects are equal. Two instances
-     * of <code>DimensionReadOnly</code> are equal if two components
-     * <code>height</code> and <code>width</code> are equal.
-     * @return  <code>true</code> if the two dimensions are equal;
-     *          otherwise <code>false</code>.
-     */
-    boolean equals(Object obj);
-
-    int hashCode();
-
-}
diff --git a/src/nativewindow/classes/javax/media/nativewindow/util/Insets.java b/src/nativewindow/classes/javax/media/nativewindow/util/Insets.java
index 96a45b7..199ec27 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/util/Insets.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/util/Insets.java
@@ -1,112 +1,95 @@
-/*
- * Copyright (c) 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
- * 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.
+/**
+ * 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 javax.media.nativewindow.util;
 
-/**
- * Simple class representing insets.
- * 
- * @author tdv
- */
-public class Insets implements Cloneable {
-    public int top;
-    public int left;
-    public int bottom;
-    public int right;
-    public int hash;
+public class Insets implements Cloneable, InsetsImmutable {
+    static final InsetsImmutable zeroInsets = new Insets();
+    public static final InsetsImmutable getZero() { return zeroInsets; }
+    
+    int l, r, t, b;
 
-    /**
-     * Creates and initializes a new <code>Insets</code> object with the
-     * specified top, left, bottom, and right insets.
-     * @param       top   the inset from the top.
-     * @param       left   the inset from the left.
-     * @param       bottom   the inset from the bottom.
-     * @param       right   the inset from the right.
-     */
-    public Insets(int top, int left, int bottom, int right) {
-        this.top = top;
-        this.left = left;
-        this.bottom = bottom;
-        this.right = right;
-        this.hash = computeHashCode();
+    public Insets() {
+        this(0, 0, 0, 0);
     }
 
-    /**
-     * Checks whether two insets objects are equal. Two instances
-     * of <code>Insets</code> are equal if the four integer values
-     * of the fields <code>top</code>, <code>left</code>,
-     * <code>bottom</code>, and <code>right</code> are all equal.
-     * @return      <code>true</code> if the two insets are equal;
-     *                          otherwise <code>false</code>.
-     */
+    public Insets(int left, int right, int top, int bottom) {
+        this.l=left;
+        this.r=right;
+        this.t=top;
+        this.b=bottom;
+    }
+    
+    public Object cloneMutable() {
+      return clone();
+    }
+  
+    protected Object clone() {
+        try {
+            return super.clone();
+        } catch (CloneNotSupportedException ex) {
+            throw new InternalError();
+        }
+    }
+
+    public final int getLeftWidth() { return l; }
+    public final int getRightWidth() { return r; }
+    public final int getTotalWidth() { return l + r; }
+    public final int getTopHeight() { return t; }
+    public final int getBottomHeight() { return b; }
+    public final int getTotalHeight() { return t + b; }
+
+    public void setLeftWidth(int left) { l = left; }
+    public void setRightWidth(int right) { r = right; }
+    public void setTopHeight(int top) { t = top; }
+    public void setBottomHeight(int bottom) { b = bottom; }
+    
     public boolean equals(Object obj) {
         if(this == obj)  { return true; }
         if (obj instanceof Insets) {
             Insets insets = (Insets)obj;
-            return ((top == insets.top) && (left == insets.left) &&
-                (bottom == insets.bottom) && (right == insets.right));
+            return (r == insets.r) && (l == insets.l) &&
+                   (b == insets.b) && (t == insets.t);
         }
         return false;
     }
 
-    /**
-     * Returns the hash code for this Insets.
-     *
-     * @return    a hash code for this Insets.
-     */
     public int hashCode() {
-        return hash;
+        int sum1 = l + b;
+        int sum2 = t + r;
+        int val1 = sum1 * (sum1 + 1)/2 + l;
+        int val2 = sum2 * (sum2 + 1)/2 + r;
+        int sum3 = val1 + val2;
+        return sum3 * (sum3 + 1)/2 + val2;
     }
 
     public String toString() {
-    	return getClass().getName() + "[top="  + top + ",left=" + left +
-            ",bottom=" + bottom + ",right=" + right + "]";
-    }
-
-    public Object clone() {
-        try {
-            return super.clone();
-        } catch (CloneNotSupportedException ex) {
-            throw new InternalError();
-        }
-    }
-
-    protected int computeHashCode() {
-        int sum1 = left + bottom;
-        int sum2 = right + top;
-        int val1 = sum1 * (sum1 + 1)/2 + left;
-        int val2 = sum2 * (sum2 + 1)/2 + top;
-        int sum3 = val1 + val2;
-        return sum3 * (sum3 + 1)/2 + val2;
+        return new String("[ l "+l+", r "+r+" - t "+t+", b "+b+" - "+getTotalWidth()+"x"+getTotalHeight()+"]");
     }
 }
+
diff --git a/src/nativewindow/classes/javax/media/nativewindow/util/InsetsImmutable.java b/src/nativewindow/classes/javax/media/nativewindow/util/InsetsImmutable.java
new file mode 100644
index 0000000..075641e
--- /dev/null
+++ b/src/nativewindow/classes/javax/media/nativewindow/util/InsetsImmutable.java
@@ -0,0 +1,66 @@
+/**
+ * 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 javax.media.nativewindow.util;
+
+import com.jogamp.common.type.WriteCloneable;
+
+/** Immutable Rectangle interface */
+public interface InsetsImmutable extends WriteCloneable {
+
+    /** @return left inset width */
+    int getLeftWidth();
+
+    /** @return right inset width */
+    int getRightWidth();
+
+    /** @return total width, ie. <code>left_width + right_width</code> */
+    int getTotalWidth();
+    
+    /** @return top inset height */
+    int getTopHeight();
+
+    /** @return bottom inset height */
+    int getBottomHeight();
+    
+    /** @return total height, ie. <code>top_height + bottom_height</code> */
+    int getTotalHeight();
+
+    /**
+     * Checks whether two rect objects are equal. Two instances
+     * of <code>Insets</code> are equal if the four integer values
+     * of the fields <code>left</code>, <code>right</code>,
+     * <code>top</code>, and <code>bottom</code> are all equal.
+     * @return      <code>true</code> if the two Insets are equal;
+     * otherwise <code>false</code>.
+     */
+    boolean equals(Object obj);
+
+    int hashCode();
+
+}
diff --git a/src/nativewindow/classes/javax/media/nativewindow/util/Point.java b/src/nativewindow/classes/javax/media/nativewindow/util/Point.java
index 6db0ecf..0a5036e 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/util/Point.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/util/Point.java
@@ -29,7 +29,7 @@
 
 package javax.media.nativewindow.util;
 
-public class Point implements Cloneable, PointReadOnly {
+public class Point implements Cloneable, PointImmutable {
     int x;
     int y;
 
@@ -42,6 +42,10 @@ public class Point implements Cloneable, PointReadOnly {
         this(0, 0);
     }
 
+    public Object cloneMutable() {
+      return clone();
+    }
+  
     public Object clone() {
         try {
             return super.clone();
@@ -59,11 +63,11 @@ public class Point implements Cloneable, PointReadOnly {
         return false;
     }
 
-    public int getX() {
+    public final int getX() {
         return x;
     }
 
-    public int getY() {
+    public final int getY() {
         return y;
     }
 
diff --git a/src/nativewindow/classes/javax/media/nativewindow/util/PointImmutable.java b/src/nativewindow/classes/javax/media/nativewindow/util/PointImmutable.java
new file mode 100644
index 0000000..d7eb0e7
--- /dev/null
+++ b/src/nativewindow/classes/javax/media/nativewindow/util/PointImmutable.java
@@ -0,0 +1,52 @@
+/**
+ * Copyright 2010 JogAmp Community. 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:
+ *
+ *    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.nativewindow.util;
+
+import com.jogamp.common.type.WriteCloneable;
+
+/** Immutable Point interface */
+public interface PointImmutable extends WriteCloneable {
+
+    int getX();
+
+    int getY();
+
+    /**
+     * Checks whether two points objects are equal. Two instances
+     * of <code>PointReadOnly</code> are equal if the two components
+     * <code>y</code> and <code>x</code> are equal.
+     * @return <code>true</code> if the two points are equal;
+     *         otherwise <code>false</code>.
+     */
+    public boolean equals(Object obj);
+
+    public int hashCode();
+    
+}
diff --git a/src/nativewindow/classes/javax/media/nativewindow/util/PointReadOnly.java b/src/nativewindow/classes/javax/media/nativewindow/util/PointReadOnly.java
deleted file mode 100644
index 9caaf7f..0000000
--- a/src/nativewindow/classes/javax/media/nativewindow/util/PointReadOnly.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * Copyright 2010 JogAmp Community. 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:
- *
- *    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.nativewindow.util;
-
-/** Immutable Point interface */
-public interface PointReadOnly extends Cloneable {
-
-    int getX();
-
-    int getY();
-
-    /**
-     * Checks whether two points objects are equal. Two instances
-     * of <code>PointReadOnly</code> are equal if the two components
-     * <code>y</code> and <code>x</code> are equal.
-     * @return <code>true</code> if the two points are equal;
-     *         otherwise <code>false</code>.
-     */
-    public boolean equals(Object obj);
-
-    public int hashCode();
-    
-}
diff --git a/src/nativewindow/classes/javax/media/nativewindow/util/Rectangle.java b/src/nativewindow/classes/javax/media/nativewindow/util/Rectangle.java
index ba24bc6..8d6bfe4 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/util/Rectangle.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/util/Rectangle.java
@@ -28,7 +28,7 @@
  
 package javax.media.nativewindow.util;
 
-public class Rectangle implements Cloneable, RectangleReadOnly {
+public class Rectangle implements Cloneable, RectangleImmutable {
     int x;
     int y;
     int width;
@@ -44,7 +44,11 @@ public class Rectangle implements Cloneable, RectangleReadOnly {
         this.width=width;
         this.height=height;
     }
-
+    
+    public Object cloneMutable() {
+      return clone();
+    }
+  
     protected Object clone() {
         try {
             return super.clone();
@@ -53,10 +57,10 @@ public class Rectangle implements Cloneable, RectangleReadOnly {
         }
     }
 
-    public int getX() { return x; }
-    public int getY() { return y; }
-    public int getWidth() { return width; }
-    public int getHeight() { return height; }
+    public final int getX() { return x; }
+    public final int getY() { return y; }
+    public final int getWidth() { return width; }
+    public final int getHeight() { return height; }
     public void setX(int x) { this.x = x; }
     public void setY(int y) { this.y = y; }
     public void setWidth(int width) { this.width = width; }
diff --git a/src/nativewindow/classes/javax/media/nativewindow/util/RectangleImmutable.java b/src/nativewindow/classes/javax/media/nativewindow/util/RectangleImmutable.java
new file mode 100644
index 0000000..d3b43c8
--- /dev/null
+++ b/src/nativewindow/classes/javax/media/nativewindow/util/RectangleImmutable.java
@@ -0,0 +1,56 @@
+/**
+ * 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 javax.media.nativewindow.util;
+
+import com.jogamp.common.type.WriteCloneable;
+
+/** Immutable Rectangle interface */
+public interface RectangleImmutable extends WriteCloneable {
+
+    int getHeight();
+
+    int getWidth();
+
+    int getX();
+
+    int getY();
+
+    /**
+     * Checks whether two rect objects are equal. Two instances
+     * of <code>Rectangle</code> are equal if the four integer values
+     * of the fields <code>y</code>, <code>x</code>,
+     * <code>height</code>, and <code>width</code> are all equal.
+     * @return      <code>true</code> if the two rectangles are equal;
+     * otherwise <code>false</code>.
+     */
+    boolean equals(Object obj);
+
+    int hashCode();
+
+}
diff --git a/src/nativewindow/classes/javax/media/nativewindow/util/RectangleReadOnly.java b/src/nativewindow/classes/javax/media/nativewindow/util/RectangleReadOnly.java
deleted file mode 100644
index 81a5a9f..0000000
--- a/src/nativewindow/classes/javax/media/nativewindow/util/RectangleReadOnly.java
+++ /dev/null
@@ -1,54 +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 javax.media.nativewindow.util;
-
-/** Immutable Rectangle interface */
-public interface RectangleReadOnly extends Cloneable {
-
-    int getHeight();
-
-    int getWidth();
-
-    int getX();
-
-    int getY();
-
-    /**
-     * Checks whether two rect objects are equal. Two instances
-     * of <code>Rectangle</code> are equal if the four integer values
-     * of the fields <code>y</code>, <code>x</code>,
-     * <code>height</code>, and <code>width</code> are all equal.
-     * @return      <code>true</code> if the two rectangles are equal;
-     * otherwise <code>false</code>.
-     */
-    boolean equals(Object obj);
-
-    int hashCode();
-
-}
diff --git a/src/nativewindow/classes/javax/media/nativewindow/util/SurfaceSize.java b/src/nativewindow/classes/javax/media/nativewindow/util/SurfaceSize.java
index ea098b9..8f21bc4 100644
--- a/src/nativewindow/classes/javax/media/nativewindow/util/SurfaceSize.java
+++ b/src/nativewindow/classes/javax/media/nativewindow/util/SurfaceSize.java
@@ -31,15 +31,15 @@ package javax.media.nativewindow.util;
 
 /** Immutable SurfaceSize Class, consisting of it's read only components:<br>
  * <ul>
- *  <li>{@link javax.media.nativewindow.util.DimensionReadOnly} size in pixels</li>
+ *  <li>{@link javax.media.nativewindow.util.DimensionImmutable} size in pixels</li>
  *  <li><code>bits per pixel</code></li>
  * </ul>
  */
-public class SurfaceSize  implements Cloneable {
-    DimensionReadOnly resolution;
+public class SurfaceSize {
+    DimensionImmutable resolution;
     int bitsPerPixel;
 
-    public SurfaceSize(DimensionReadOnly resolution, int bitsPerPixel) {
+    public SurfaceSize(DimensionImmutable resolution, int bitsPerPixel) {
         if(null==resolution || bitsPerPixel<=0) {
             throw new IllegalArgumentException("resolution must be set and bitsPerPixel greater 0");
         }
@@ -47,15 +47,7 @@ public class SurfaceSize  implements Cloneable {
         this.bitsPerPixel=bitsPerPixel;
     }
 
-    public Object clone() {
-        try {
-            return super.clone();
-        } catch (CloneNotSupportedException ex) {
-            throw new InternalError();
-        }
-    }
-
-    public final DimensionReadOnly getResolution() {
+    public final DimensionImmutable getResolution() {
         return resolution;
     }
 
diff --git a/src/nativewindow/classes/jogamp/nativewindow/NWJNILibLoader.java b/src/nativewindow/classes/jogamp/nativewindow/NWJNILibLoader.java
index 33e2905..2b6d3c0 100644
--- a/src/nativewindow/classes/jogamp/nativewindow/NWJNILibLoader.java
+++ b/src/nativewindow/classes/jogamp/nativewindow/NWJNILibLoader.java
@@ -31,14 +31,20 @@ package jogamp.nativewindow;
 
 import java.security.AccessController;
 import java.security.PrivilegedAction;
+
 import com.jogamp.common.jvm.JNILibLoaderBase;
+import com.jogamp.common.util.cache.TempJarCache;
 
 public class NWJNILibLoader extends JNILibLoaderBase {
   
   public static void loadNativeWindow(final String ossuffix) {
-    AccessController.doPrivileged(new PrivilegedAction() {
+    AccessController.doPrivileged(new PrivilegedAction<Object>() {
       public Object run() {
-        loadLibrary("nativewindow_"+ossuffix, null, false);
+        final String libName = "nativewindow_"+ossuffix ;
+        if(TempJarCache.isInitialized() && null == TempJarCache.findLibrary(libName)) {
+            addNativeJarLibs(NWJNILibLoader.class, "jogl.all", "jogl-all", new String[] { "nativewindow" } );
+        }
+        loadLibrary(libName, false);
         return null;
       }
     });
diff --git a/src/nativewindow/classes/jogamp/nativewindow/NativeWindowFactoryImpl.java b/src/nativewindow/classes/jogamp/nativewindow/NativeWindowFactoryImpl.java
index 3db8f32..d34d4e5 100644
--- a/src/nativewindow/classes/jogamp/nativewindow/NativeWindowFactoryImpl.java
+++ b/src/nativewindow/classes/jogamp/nativewindow/NativeWindowFactoryImpl.java
@@ -32,6 +32,7 @@
 
 package jogamp.nativewindow;
 
+import com.jogamp.common.os.Platform;
 import com.jogamp.common.util.*;
 import java.lang.reflect.*;
 
@@ -73,21 +74,21 @@ public class NativeWindowFactoryImpl extends NativeWindowFactory {
     private NativeWindow getAWTNativeWindow(Object winObj, AbstractGraphicsConfiguration config) {
         if (nativeWindowConstructor == null) {
             try {
-                String osType = getNativeWindowType(true);
+                String windowingType = getNativeWindowType(true);
                 String windowClassName = null;
 
                 // We break compile-time dependencies on the AWT here to
                 // make it easier to run this code on mobile devices
 
-                if (osType.equals(TYPE_WINDOWS)) {
+                if (windowingType.equals(TYPE_WINDOWS)) {
                     windowClassName = "jogamp.nativewindow.jawt.windows.WindowsJAWTWindow";
-                } else if (osType.equals(TYPE_MACOSX)) {
+                } else if (windowingType.equals(TYPE_MACOSX)) {
                     windowClassName = "jogamp.nativewindow.jawt.macosx.MacOSXJAWTWindow";
-                } else if (osType.equals(TYPE_X11)) {
+                } else if (windowingType.equals(TYPE_X11)) {
                     // Assume Linux, Solaris, etc. Should probably test for these explicitly.
                     windowClassName = "jogamp.nativewindow.jawt.x11.X11JAWTWindow";
                 } else {
-                    throw new IllegalArgumentException("OS " + getNativeOSName(false) + " not yet supported");
+                    throw new IllegalArgumentException("OS " + Platform.getOSName() + " not yet supported");
                 }
 
                 nativeWindowConstructor = ReflectionUtil.getConstructor(
diff --git a/src/nativewindow/classes/jogamp/nativewindow/NullToolkitLock.java b/src/nativewindow/classes/jogamp/nativewindow/NullToolkitLock.java
index 2056d20..1af6bf2 100644
--- a/src/nativewindow/classes/jogamp/nativewindow/NullToolkitLock.java
+++ b/src/nativewindow/classes/jogamp/nativewindow/NullToolkitLock.java
@@ -42,10 +42,8 @@ public class NullToolkitLock implements ToolkitLock {
     
     public final void lock() {
         if(TRACE_LOCK) {
-            String msg = "NullToolkitLock.lock()";
-            System.err.println(msg);
-            // Throwable t = new Throwable(msg);
-            // t.printStackTrace();
+            System.err.println("NullToolkitLock.lock()");
+            // Thread.dumpStack();
         }
     }
 
diff --git a/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTJNILibLoader.java b/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTJNILibLoader.java
index 1ac9e17..2c85382 100644
--- a/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTJNILibLoader.java
+++ b/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTJNILibLoader.java
@@ -48,7 +48,7 @@ import java.security.PrivilegedAction;
 
 public class JAWTJNILibLoader extends NWJNILibLoader {
   public static void loadAWTImpl() {
-    AccessController.doPrivileged(new PrivilegedAction() {
+    AccessController.doPrivileged(new PrivilegedAction<Object>() {
       public Object run() {
         // Make sure that awt.dll is loaded before loading jawt.dll. Otherwise
         // a Dialog with "awt.dll not found" might pop up.
diff --git a/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTUtil.java b/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTUtil.java
index 80dd5c4..c1c97ee 100644
--- a/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTUtil.java
+++ b/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTUtil.java
@@ -60,7 +60,6 @@ public class JAWTUtil {
   private static final Method isQueueFlusherThread;
   private static final boolean j2dExist;
 
-  private static final Class   sunToolkitClass;
   private static final Method  sunToolkitAWTLockMethod;
   private static final Method  sunToolkitAWTUnlockMethod;
   private static final boolean hasSunToolkitAWTLock;
@@ -71,7 +70,6 @@ public class JAWTUtil {
     PrivilegedDataBlob1() {
         ok = false;
     }  
-    Class   sunToolkitClass;
     Method  sunToolkitAWTLockMethod;
     Method  sunToolkitAWTUnlockMethod;
     boolean ok;
@@ -101,7 +99,7 @@ public class JAWTUtil {
         public Object run() {
             PrivilegedDataBlob1 d = new PrivilegedDataBlob1();
             try {                
-                d.sunToolkitClass = Class.forName("sun.awt.SunToolkit");
+                final Class sunToolkitClass = Class.forName("sun.awt.SunToolkit");
                 d.sunToolkitAWTLockMethod = sunToolkitClass.getDeclaredMethod("awtLock", new Class[]{});
                 d.sunToolkitAWTLockMethod.setAccessible(true);
                 d.sunToolkitAWTUnlockMethod = sunToolkitClass.getDeclaredMethod("awtUnlock", new Class[]{});
@@ -113,7 +111,6 @@ public class JAWTUtil {
             return d;
         }
     });
-    sunToolkitClass = pdb1.sunToolkitClass;
     sunToolkitAWTLockMethod = pdb1.sunToolkitAWTLockMethod;
     sunToolkitAWTUnlockMethod = pdb1.sunToolkitAWTUnlockMethod;
     
diff --git a/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTWindow.java b/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTWindow.java
index 67f6fe4..2c80392 100644
--- a/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTWindow.java
+++ b/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTWindow.java
@@ -37,6 +37,7 @@
 
 package jogamp.nativewindow.jawt;
 
+import com.jogamp.common.util.locks.LockFactory;
 import com.jogamp.common.util.locks.RecursiveLock;
 
 import java.awt.Component;
@@ -46,8 +47,11 @@ import javax.media.nativewindow.AbstractGraphicsDevice;
 import javax.media.nativewindow.NativeSurface;
 import javax.media.nativewindow.NativeWindow;
 import javax.media.nativewindow.NativeWindowException;
+import javax.media.nativewindow.util.Insets;
+import javax.media.nativewindow.util.InsetsImmutable;
 import javax.media.nativewindow.util.Point;
 import javax.media.nativewindow.util.Rectangle;
+import javax.media.nativewindow.util.RectangleImmutable;
 
 public abstract class JAWTWindow implements NativeWindow {
   protected static final boolean DEBUG = JAWTUtil.DEBUG;
@@ -89,7 +93,9 @@ public abstract class JAWTWindow implements NativeWindow {
   }
 
   /** @return the JAWT_DrawingSurfaceInfo's (JAWT_Rectangle) bounds, updated with lock */
-  public final Rectangle getBounds() { return bounds; }
+  public final RectangleImmutable getBounds() { return bounds; }
+  
+  public final InsetsImmutable getInsets() { return Insets.getZero(); }
 
   public final Component getAWTComponent() {
     return component;
@@ -107,13 +113,13 @@ public abstract class JAWTWindow implements NativeWindow {
   // NativeSurface
   //
 
-  private RecursiveLock surfaceLock = new RecursiveLock();
+  private RecursiveLock surfaceLock = LockFactory.createRecursiveLock();
 
   protected abstract int lockSurfaceImpl() throws NativeWindowException;
 
   public final int lockSurface() throws NativeWindowException {
     surfaceLock.lock();
-    int res = surfaceLock.getRecursionCount() == 0 ? LOCK_SURFACE_NOT_READY : LOCK_SUCCESS;
+    int res = surfaceLock.getHoldCount() == 1 ? LOCK_SURFACE_NOT_READY : LOCK_SUCCESS; // new lock ?
 
     if ( LOCK_SURFACE_NOT_READY == res ) {
         try {
@@ -140,7 +146,7 @@ public abstract class JAWTWindow implements NativeWindow {
   public final void unlockSurface() {
     surfaceLock.validateLocked();
 
-    if (surfaceLock.getRecursionCount() == 0) {
+    if (surfaceLock.getHoldCount() == 1) {
         final AbstractGraphicsDevice adevice = config.getScreen().getDevice();
         try {
             unlockSurfaceImpl();
@@ -226,34 +232,39 @@ public abstract class JAWTWindow implements NativeWindow {
   }
 
   public Point getLocationOnScreen(Point storage) {
-        if( 0 != getWindowHandle() ) {
-            Point d;
-            // windowLock.lock();
-            try {
-                d = getLocationOnScreenImpl(0, 0);
-            } finally {
-                // windowLock.unlock();
-            }
-            if(null!=d) {
-                if(null!=storage) {
-                    storage.translate(d.getX(),d.getY());
-                    return storage;
-                }
-                return d;
+      int lockRes = lockSurface();
+      if(LOCK_SURFACE_NOT_READY == lockRes) {
+          // FIXME: Shall we deal with already locked or unrealized surfaces ?
+          System.err.println("Warning: JAWT Lock couldn't be acquired!");
+          Thread.dumpStack();
+          return null;
+      }
+      try {
+          Point d = getLocationOnScreenImpl(0, 0);
+          if(null!=d) {
+            if(null!=storage) {
+                storage.translate(d.getX(),d.getY());
+                return storage;
             }
-            // fall through intended ..
-        }
-
-        if(!Thread.holdsLock(component.getTreeLock())) {
-            return null; // avoid deadlock ..
-        }
-        java.awt.Point awtLOS = component.getLocationOnScreen();
-        int dx = (int) ( awtLOS.getX() + .5 ) ;
-        int dy = (int) ( awtLOS.getY() + .5 ) ;
-        if(null!=storage) {
-            return storage.translate(dx, dy);
-        }
-        return new Point(dx, dy);
+            return d;
+          }
+          // fall through intended ..
+          if(!Thread.holdsLock(component.getTreeLock())) {
+              // FIXME: Verify if this check is still required!
+              System.err.println("Warning: JAWT Lock hold, but not the AWT tree lock!");
+              Thread.dumpStack();
+              return null; // avoid deadlock ..
+          }
+          java.awt.Point awtLOS = component.getLocationOnScreen();
+          int dx = (int) ( awtLOS.getX() + .5 ) ;
+          int dy = (int) ( awtLOS.getY() + .5 ) ;
+          if(null!=storage) {
+              return storage.translate(dx, dy);
+          }
+          return new Point(dx, dy);
+      } finally {
+          unlockSurface();
+      }
   }
   protected abstract Point getLocationOnScreenImpl(int x, int y);
 
diff --git a/src/nativewindow/classes/jogamp/nativewindow/jawt/macosx/MacOSXJAWTWindow.java b/src/nativewindow/classes/jogamp/nativewindow/jawt/macosx/MacOSXJAWTWindow.java
index 9c29bbd..d0152ce 100644
--- a/src/nativewindow/classes/jogamp/nativewindow/jawt/macosx/MacOSXJAWTWindow.java
+++ b/src/nativewindow/classes/jogamp/nativewindow/jawt/macosx/MacOSXJAWTWindow.java
@@ -40,6 +40,7 @@
 
 package jogamp.nativewindow.jawt.macosx;
 
+import java.awt.Component;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 
@@ -53,6 +54,7 @@ import jogamp.nativewindow.jawt.JAWTFactory;
 import jogamp.nativewindow.jawt.JAWTWindow;
 import jogamp.nativewindow.jawt.JAWT_DrawingSurface;
 import jogamp.nativewindow.jawt.JAWT_DrawingSurfaceInfo;
+import jogamp.nativewindow.macosx.OSXUtil;
 
 public class MacOSXJAWTWindow extends JAWTWindow {
 
@@ -86,7 +88,7 @@ public class MacOSXJAWTWindow extends JAWTWindow {
       ret = NativeWindow.LOCK_SURFACE_CHANGED;
     }
     if (firstLock) {
-      AccessController.doPrivileged(new PrivilegedAction() {
+      AccessController.doPrivileged(new PrivilegedAction<Object>() {
           public Object run() {
             dsi = ds.GetDrawingSurfaceInfo();
             return null;
@@ -132,7 +134,14 @@ public class MacOSXJAWTWindow extends JAWTWindow {
   }
 
   protected Point getLocationOnScreenImpl(int x, int y) {
-    return null; // FIXME
+      Component c = component;
+      while(null != c) {
+          x += c.getX();
+          y += c.getY();
+          c = c.getParent();
+      }
+      // return OSXUtil.GetLocationOnScreen(getWindowHandle(), x, y);
+      return new Point(x, y);
   }
 
   // Variables for lockSurface/unlockSurface
diff --git a/src/nativewindow/classes/jogamp/nativewindow/macosx/OSXUtil.java b/src/nativewindow/classes/jogamp/nativewindow/macosx/OSXUtil.java
new file mode 100644
index 0000000..ffd23fe
--- /dev/null
+++ b/src/nativewindow/classes/jogamp/nativewindow/macosx/OSXUtil.java
@@ -0,0 +1,39 @@
+package jogamp.nativewindow.macosx;
+
+import javax.media.nativewindow.NativeWindowException;
+import javax.media.nativewindow.util.Point;
+
+import jogamp.nativewindow.Debug;
+import jogamp.nativewindow.NWJNILibLoader;
+
+public class OSXUtil {
+    private static boolean isInit = false;  
+    private static final boolean DEBUG = Debug.debug("OSXUtil");
+    
+    public static synchronized void initSingleton(boolean firstX11ActionOnProcess) {
+      if(!isInit) {
+          NWJNILibLoader.loadNativeWindow("macosx");
+          
+          if( !initIDs0() ) {
+              throw new NativeWindowException("MacOSX: Could not initialized native stub");
+          }
+  
+          if(DEBUG) {
+              System.out.println("OSX.isFirstX11ActionOnProcess: "+firstX11ActionOnProcess);
+          }
+  
+          isInit = true;
+      }
+    }
+
+    public static boolean requiresToolkitLock() {
+        return false;
+    }
+    
+    public static Point GetLocationOnScreen(long windowOrView, int src_x, int src_y) {
+      return (Point) GetLocationOnScreen0(windowOrView, src_x, src_y);
+    }
+    
+    private static native boolean initIDs0();
+    private static native Object GetLocationOnScreen0(long windowOrView, int src_x, int src_y);
+}
diff --git a/src/nativewindow/classes/jogamp/nativewindow/x11/X11Util.java b/src/nativewindow/classes/jogamp/nativewindow/x11/X11Util.java
index 26da463..5c18392 100644
--- a/src/nativewindow/classes/jogamp/nativewindow/x11/X11Util.java
+++ b/src/nativewindow/classes/jogamp/nativewindow/x11/X11Util.java
@@ -51,29 +51,52 @@ import javax.media.nativewindow.util.Point;
  * Contains a thread safe X11 utility to retrieve display connections.
  */
 public class X11Util {
+    /** 
+     * See Bug 515 - https://jogamp.org/bugzilla/show_bug.cgi?id=515
+     * 
+     * It is observed that ATI X11 drivers, eg. fglrx 8.78.6 and fglrx 11.08/8.881,
+     * are quite sensitive to multiple Display connections.
+     * Here, closing displays shall happen in the same order as
+     * they were opened, -OR- shall not be closed at all!
+     * Otherwise some driver related bug appears and brings down the JVM.
+     * You may test this, ie just reverse the destroy order below.
+     * See also native test: jogl/test/native/displayMultiple02.c
+     * 
+     * Our current 'workaround' is to not close them at all if driver vendor is ATI.
+     */
+    public static final boolean ATI_HAS_XCLOSEDISPLAY_BUG = true;
+    
+    public static final boolean XINITTHREADS_ALWAYS_ENABLED = true;
+
     private static final boolean DEBUG = Debug.debug("X11Util");
     private static final boolean TRACE_DISPLAY_LIFECYCLE = Debug.getBooleanProperty("nativewindow.debug.X11Util.TraceDisplayLifecycle", true, AccessController.getContext());
 
     private static volatile String nullDisplayName = null;
-    private static boolean isFirstX11ActionOnProcess = false;
+    private static boolean requiresX11Lock = false;
     private static boolean isInit = false;
+    private static boolean markAllDisplaysUnclosable = false; // ATI/AMD X11 driver issues
 
     private static int setX11ErrorHandlerRecCount = 0;
     private static Object setX11ErrorHandlerLock = new Object();
 
-    public static synchronized void initSingleton(boolean firstX11ActionOnProcess) {
+    
+    public static synchronized void initSingleton(final boolean firstX11ActionOnProcess) {
         if(!isInit) {
             NWJNILibLoader.loadNativeWindow("x11");
 
             /**
              * Always issue XInitThreads() since we have independent
-             * off-thread created Display connections able to utilize multithreading, ie NEWT */
-            initialize0( true );
-            // initialize0( firstX11ActionOnProcess );
-            isFirstX11ActionOnProcess = firstX11ActionOnProcess;
+             * off-thread created Display connections able to utilize multithreading, 
+             * ie NEWT (jogamp.newt.x11.X11Display.createNativeImpl()) !!
+             */
+            initialize0( XINITTHREADS_ALWAYS_ENABLED ? true : firstX11ActionOnProcess );
 
+            requiresX11Lock = !firstX11ActionOnProcess ;
+            
             if(DEBUG) {
-                System.out.println("X11Util.isFirstX11ActionOnProcess: "+isFirstX11ActionOnProcess);
+                System.err.println("X11Util firstX11ActionOnProcess: "+firstX11ActionOnProcess+
+                                   ", XINITTHREADS_ALWAYS_ENABLED "+XINITTHREADS_ALWAYS_ENABLED+
+                                   ", requiresX11Lock "+requiresX11Lock); 
             }
             isInit = true;
         }
@@ -98,19 +121,19 @@ public class X11Util {
         }
     }
 
-    public static boolean isFirstX11ActionOnProcess() {
-        return isFirstX11ActionOnProcess;
+    public static boolean requiresToolkitLock() {
+        return requiresX11Lock;
     }
 
     public static void lockDefaultToolkit(long dpyHandle) {
         NativeWindowFactory.getDefaultToolkitLock().lock();
-        if(!isFirstX11ActionOnProcess) {
+        if(requiresX11Lock) {
             X11Util.XLockDisplay(dpyHandle);
         }
     }
 
     public static void unlockDefaultToolkit(long dpyHandle) {
-        if(!isFirstX11ActionOnProcess) {
+        if(requiresX11Lock) {
             X11Util.XUnlockDisplay(dpyHandle);
         }
         NativeWindowFactory.getDefaultToolkitLock().unlock();
@@ -121,11 +144,11 @@ public class X11Util {
             synchronized(X11Util.class) {
                 if(null==nullDisplayName) {
                     NativeWindowFactory.getDefaultToolkitLock().lock();
+                    long dpy = X11Lib.XOpenDisplay(null);
                     try {
-                        long dpy = X11Lib.XOpenDisplay(null);
                         nullDisplayName = X11Lib.XDisplayString(dpy);
-                        X11Lib.XCloseDisplay(dpy);
                     } finally {
+                        X11Lib.XCloseDisplay(dpy);
                         NativeWindowFactory.getDefaultToolkitLock().unlock();
                     }
                     if(DEBUG) {
@@ -136,19 +159,27 @@ public class X11Util {
         }
         return nullDisplayName;
     }
-
+    
+    public static boolean getMarkAllDisplaysUnclosable() {
+        return markAllDisplaysUnclosable;
+    }
+    public static void setMarkAllDisplaysUnclosable(boolean v) {
+        markAllDisplaysUnclosable = v;
+    }
+    
     private X11Util() {}
 
     // not exactly thread safe, but good enough for our purpose,
     // which is to tag a NamedDisplay uncloseable after creation.
     private static Object globalLock = new Object(); 
-    private static LongObjectHashMap globalNamedDisplayMap = new LongObjectHashMap();
-    private static List openDisplayList = new ArrayList();
-    private static List pendingDisplayList = new ArrayList();
+    private static LongObjectHashMap openDisplayMap = new LongObjectHashMap(); // handle -> name
+    private static List<NamedDisplay> openDisplayList = new ArrayList<NamedDisplay>();
+    private static List<NamedDisplay> pendingDisplayList = new ArrayList<NamedDisplay>();
 
     public static class NamedDisplay {
-        String name;
-        long   handle;
+        final String name;
+        final long   handle;
+        final int    hash32;
         int    refCount;
         boolean unCloseable;
         Throwable creationStack;
@@ -156,8 +187,14 @@ public class X11Util {
         protected NamedDisplay(String name, long handle) {
             this.name=name;
             this.handle=handle;
-            this.refCount=1;
+            this.refCount=0;
             this.unCloseable=false;
+            {
+                int h32;
+                h32 = 31 +                 (int)   handle          ; // lo
+                h32 = ((h32 << 5) - h32) + (int) ( handle >>> 32 ) ; // hi
+                hash32 = h32;
+            }
             if(DEBUG) {
                 this.creationStack=new Throwable("NamedDisplay Created at:");
             } else {
@@ -165,6 +202,22 @@ public class X11Util {
             }
         }
 
+        public final int hashCode() {
+            return hash32;
+        }
+        
+        public final boolean equals(Object obj) {
+            if(this == obj) { return true; }
+            if(obj instanceof NamedDisplay) {
+                NamedDisplay n = (NamedDisplay) obj;
+                return handle == n.handle;
+            }
+            return false;
+        }
+        
+        public final void addRef() { refCount++; }
+        public final void removeRef() { refCount--; }
+        
         public final String getName() { return name; }
         public final long   getHandle() { return handle; }
         public final int    getRefCount() { return refCount; }
@@ -192,8 +245,8 @@ public class X11Util {
         int num=0;
         if(DEBUG||verbose||pendingDisplayList.size() > 0) {
             String msg = "X11Util.Display: Shutdown (close open / pending Displays: "+realXCloseOpenAndPendingDisplays+
-                         ", open (no close attempt): "+globalNamedDisplayMap.size()+"/"+openDisplayList.size()+
-                         ", open (no close attempt and uncloseable): "+pendingDisplayList.size()+")" ;
+                         ", open (no close attempt): "+openDisplayMap.size()+"/"+openDisplayList.size()+
+                         ", pending (not closed, marked uncloseable): "+pendingDisplayList.size()+")" ;
             if(DEBUG) {
                 Exception e = new Exception(msg);
                 e.printStackTrace();
@@ -214,7 +267,7 @@ public class X11Util {
             }
             openDisplayList.clear();
             pendingDisplayList.clear();
-            globalNamedDisplayMap.clear();
+            openDisplayMap.clear();
         }
         return num;
     }
@@ -252,7 +305,7 @@ public class X11Util {
         synchronized(globalLock) {
             System.err.println("X11Util: Open X11 Display Connections: "+openDisplayList.size());
             for(int i=0; i<pendingDisplayList.size(); i++) {
-                NamedDisplay ndpy = (NamedDisplay) openDisplayList.get(i);
+                NamedDisplay ndpy = openDisplayList.get(i);
                 System.err.println("X11Util: ["+i+"]: "+ndpy);
                 if(null!=ndpy) {
                     Throwable t = ndpy.getCreationStack();
@@ -289,7 +342,7 @@ public class X11Util {
     public static boolean markDisplayUncloseable(long handle) {
         NamedDisplay ndpy;
         synchronized(globalLock) {
-            ndpy = (NamedDisplay) globalNamedDisplayMap.get(handle);
+            ndpy = (NamedDisplay) openDisplayMap.get(handle);
         }
         if( null != ndpy ) {
             ndpy.setUncloseable(true);
@@ -298,23 +351,40 @@ public class X11Util {
         return false;
     }
 
-    /** Returns this created named display. */
-    public static long createDisplay(String name) {
+    /** Returns a created or reused named display. */
+    public static long openDisplay(String name) {
+        long dpy = 0;
+        NamedDisplay namedDpy = null;
         name = validateDisplayName(name);
-        long dpy = XOpenDisplay(name);
-        if(0==dpy) {
-            throw new NativeWindowException("X11Util.Display: Unable to create a display("+name+") connection. Thread "+Thread.currentThread().getName());
-        }
-        // if you like to debug and synchronize X11 commands ..
-        // setSynchronizeDisplay(dpy, true);
-        NamedDisplay namedDpy = new NamedDisplay(name, dpy);
-        synchronized(globalLock) {
-            globalNamedDisplayMap.put(dpy, namedDpy);
+        boolean reused = false;
+        
+        synchronized(globalLock) {            
+            for(int i=0; i<pendingDisplayList.size(); i++) {
+                if(pendingDisplayList.get(i).getName().equals(name)) {
+                    namedDpy = pendingDisplayList.remove(i);
+                    dpy = namedDpy.getHandle();
+                    reused = true;
+                    break;
+                }
+            }
+            if(0 == dpy) {
+                dpy = XOpenDisplay(name);
+                if(0==dpy) {
+                    throw new NativeWindowException("X11Util.Display: Unable to create a display("+name+") connection. Thread "+Thread.currentThread().getName());
+                }
+                // if you like to debug and synchronize X11 commands ..
+                // setSynchronizeDisplay(dpy, true);
+                namedDpy = new NamedDisplay(name, dpy);
+            }
+            namedDpy.addRef();
+            openDisplayMap.put(dpy, namedDpy);
             openDisplayList.add(namedDpy);
-            pendingDisplayList.add(namedDpy);
+            if(markAllDisplaysUnclosable) {
+                namedDpy.setUncloseable(true);
+            }
         }
         if(DEBUG) {
-            Exception e = new Exception("X11Util.Display: Created new "+namedDpy+". Thread "+Thread.currentThread().getName());
+            Exception e = new Exception("X11Util.Display: openDisplay [reuse "+reused+"] "+namedDpy+". Thread "+Thread.currentThread().getName());
             e.printStackTrace();
         }
         return namedDpy.getHandle();
@@ -324,36 +394,39 @@ public class X11Util {
         NamedDisplay namedDpy;
 
         synchronized(globalLock) {
-            namedDpy = (NamedDisplay) globalNamedDisplayMap.remove(handle);
-            if(namedDpy!=null) {
-                if(!openDisplayList.remove(namedDpy)) { throw new RuntimeException("Internal: "+namedDpy); }
+            namedDpy = (NamedDisplay) openDisplayMap.remove(handle);
+            if(null==namedDpy) {
+                X11Util.dumpPendingDisplayConnections();
+                throw new RuntimeException("X11Util.Display: Display(0x"+Long.toHexString(handle)+") with given handle is not mapped. Thread "+Thread.currentThread().getName());
             }
-        }
-        if(null==namedDpy) {
-            X11Util.dumpPendingDisplayConnections();
-            throw new RuntimeException("X11Util.Display: Display(0x"+Long.toHexString(handle)+") with given handle is not mapped. Thread "+Thread.currentThread().getName());
-        }
-        if(namedDpy.getHandle()!=handle) {
-            X11Util.dumpPendingDisplayConnections();
-            throw new RuntimeException("X11Util.Display: Display(0x"+Long.toHexString(handle)+") Mapping error: "+namedDpy+". Thread "+Thread.currentThread().getName());
-        }
-
-        if(DEBUG) {
-            Exception e = new Exception("X11Util.Display: Closing new "+namedDpy+". Thread "+Thread.currentThread().getName());
-            e.printStackTrace();
-        }
-
-        if(!namedDpy.isUncloseable()) {
-            synchronized(globalLock) {
-                if(!pendingDisplayList.remove(namedDpy)) { throw new RuntimeException("Internal: "+namedDpy); }
+            if(namedDpy.getHandle()!=handle) {
+                X11Util.dumpPendingDisplayConnections();
+                throw new RuntimeException("X11Util.Display: Display(0x"+Long.toHexString(handle)+") Mapping error: "+namedDpy+". Thread "+Thread.currentThread().getName());
+            }
+    
+            namedDpy.removeRef();
+            if(!openDisplayList.remove(namedDpy)) { throw new RuntimeException("Internal: "+namedDpy); }
+            
+            if(!namedDpy.isUncloseable()) {
+                if(DEBUG) {
+                    System.err.println("X11Util.Display: XCloseDisplay "+namedDpy+". Thread "+Thread.currentThread().getName());
+                    Thread.dumpStack();
+                }
+                XCloseDisplay(namedDpy.getHandle());
+            } else {
+                // for reuse
+                pendingDisplayList.add(namedDpy);
             }
-            XCloseDisplay(namedDpy.getHandle());
+            
+            if(DEBUG) {
+                System.err.println("X11Util.Display: Closed (real: "+(!namedDpy.isUncloseable())+") "+namedDpy+". Thread "+Thread.currentThread().getName());
+            }    
         }
     }
 
     public static NamedDisplay getNamedDisplay(long handle) {
         synchronized(globalLock) {
-            return (NamedDisplay) globalNamedDisplayMap.get(handle);
+            return (NamedDisplay) openDisplayMap.get(handle);
         }
     }
 
@@ -398,7 +471,17 @@ public class X11Util {
                 Throwable t = new Throwable(Thread.currentThread()+" - X11Util.XCloseDisplay() 0x"+Long.toHexString(display));
                 t.printStackTrace();
             }
-            return X11Lib.XCloseDisplay(display);
+            int res = -1;            
+            X11Util.setX11ErrorHandler(true, DEBUG ? false : true);
+            try {
+                res = X11Lib.XCloseDisplay(display);
+            } catch (Exception ex) {
+                System.err.println("X11Util: Catched Exception:");
+                ex.printStackTrace();
+            } finally {
+                X11Util.setX11ErrorHandler(false, false);                    
+            }
+            return res;            
         } finally {
             NativeWindowFactory.getDefaultToolkitLock().unlock();
         }
diff --git a/src/nativewindow/native/macosx/OSXmisc.c b/src/nativewindow/native/macosx/OSXmisc.c
new file mode 100644
index 0000000..24cb8d4
--- /dev/null
+++ b/src/nativewindow/native/macosx/OSXmisc.c
@@ -0,0 +1,106 @@
+/**
+ * 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.
+ */
+ 
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdarg.h>
+#include <unistd.h>
+#include <AppKit/AppKit.h>
+
+#include "NativewindowCommon.h"
+#include "jogamp_nativewindow_macosx_OSXUtil.h"
+
+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 pointClz = NULL;
+static jmethodID pointCstr = NULL;
+
+static int _initialized=0;
+
+JNIEXPORT jboolean JNICALL 
+Java_jogamp_nativewindow_macosx_OSXUtil_initIDs0(JNIEnv *env, jclass _unused) {
+    if(0==_initialized) {
+        jclass c;
+        c = (*env)->FindClass(env, ClazzNamePoint);
+        if(NULL==c) {
+            NativewindowCommon_FatalError(env, "FatalError Java_jogamp_newt_driver_macosx_MacWindow_initIDs0: can't find %s", ClazzNamePoint);
+        }
+        pointClz = (jclass)(*env)->NewGlobalRef(env, c);
+        (*env)->DeleteLocalRef(env, c);
+        if(NULL==pointClz) {
+            NativewindowCommon_FatalError(env, "FatalError Java_jogamp_newt_driver_macosx_MacWindow_initIDs0: can't use %s", ClazzNamePoint);
+        }
+        pointCstr = (*env)->GetMethodID(env, pointClz, ClazzAnyCstrName, ClazzNamePointCstrSignature);
+        if(NULL==pointCstr) {
+            NativewindowCommon_FatalError(env, "FatalError Java_jogamp_newt_driver_macosx_MacWindow_initIDs0: can't fetch %s.%s %s",
+                ClazzNamePoint, ClazzAnyCstrName, ClazzNamePointCstrSignature);
+        }
+
+        _initialized=1;
+    }
+    return JNI_TRUE;
+}
+
+/*
+ * Class:     jogamp_newt_driver_macosx_MacWindow
+ * Method:    getLocationOnScreenImpl0
+ * Signature: (JII)Ljavax/media/nativewindow/util/Point;
+ */
+JNIEXPORT jobject JNICALL Java_jogamp_nativewindow_macosx_OSXUtil_GetLocationOnScreen0
+  (JNIEnv *env, jclass unused, jlong winOrView, jint src_x, jint src_y)
+{
+    NSRect r;
+    int dest_x=-1;
+    int dest_y=-1;
+
+    NSObject *nsObj = (NSObject*) ((intptr_t) winOrView);
+    NSWindow* win = NULL;
+
+    if( [nsObj isKindOfClass:[NSWindow class]] ) {
+        win = (NSWindow*) nsObj;
+    } else if( nsObj != NULL && [nsObj isKindOfClass:[NSView class]] ) {
+        NSView* view = (NSView*) nsObj;
+        win = [view window];
+    } else {
+        NativewindowCommon_throwNewRuntimeException(env, "neither win not view %p\n", nsObj);
+    }
+
+    r.origin.x = src_x;
+    r.origin.y = src_x;
+    r.size.width = 0;
+    r.size.height = 0;
+    // NSRect rS = [win convertRectToScreen: r]; // 10.7
+    NSPoint oS = [win convertBaseToScreen: r.origin];
+    dest_x = (int) oS.x;
+    dest_y = (int) oS.y;
+
+    return (*env)->NewObject(env, pointClz, pointCstr, (jint)dest_x, (jint)dest_y);
+}
+
diff --git a/src/nativewindow/native/windows/GDImisc.c b/src/nativewindow/native/windows/GDImisc.c
index 9bead17..e828500 100644
--- a/src/nativewindow/native/windows/GDImisc.c
+++ b/src/nativewindow/native/windows/GDImisc.c
@@ -9,23 +9,7 @@
 #include <wingdi.h>
 #include <stddef.h>
 
-#ifdef _WIN32
-  #ifdef _MSC_VER
-   /* This typedef is apparently needed for Microsoft compilers before VC8,
-      and on Windows CE */
-   #if (_MSC_VER < 1400) || defined(UNDER_CE)
-    #ifdef _WIN64
-     typedef long long intptr_t;
-    #else
-     typedef int intptr_t;
-    #endif
-   #endif
-  #else
-   #include <inttypes.h>
-  #endif
-#else
-  #include <inttypes.h>
-#endif
+#include <gluegen_stdint.h>
 
 #include <stdio.h>
 
diff --git a/src/nativewindow/native/windows/WindowsDWM.c b/src/nativewindow/native/windows/WindowsDWM.c
new file mode 100644
index 0000000..cc9ed6d
--- /dev/null
+++ b/src/nativewindow/native/windows/WindowsDWM.c
@@ -0,0 +1,95 @@
+
+#include "WindowsDWM.h"
+
+#include <stdlib.h>
+#include <stdio.h>
+
+// #define VERBOSE_ON 1
+
+#ifdef VERBOSE_ON
+    #define DBG_PRINT(args...) fprintf(stderr, args);
+#else
+    #define DBG_PRINT(args...)
+#endif
+
+/* GetProcAddress doesn't exist in A/W variants under desktop Windows */
+#ifndef UNDER_CE
+#define GetProcAddressA GetProcAddress
+#endif
+
+typedef HRESULT (WINAPI *DwmEnableCompositionPROCADDR)(UINT uCompositionAction);
+typedef HRESULT (WINAPI *DwmIsCompositionEnabledPROCADDR)(BOOL * pfEnabled);
+typedef HRESULT (WINAPI *DwmEnableBlurBehindWindowPROCADDR)(HWND hWnd, const DWM_BLURBEHIND* pBlurBehind);  
+typedef HRESULT (WINAPI *DwmExtendFrameIntoClientAreaPROCADDR)(HWND hwnd, const MARGINS *pMarInset);  
+
+static int _init = 0; // 1: init, 2: has DWM extension
+static DwmEnableCompositionPROCADDR _DwmEnableComposition = NULL;
+static DwmIsCompositionEnabledPROCADDR _DwmIsCompositionEnabled = NULL;
+static DwmEnableBlurBehindWindowPROCADDR _DwmEnableBlurBehindWindow = NULL;
+static DwmExtendFrameIntoClientAreaPROCADDR _DwmExtendFrameIntoClientArea = NULL;
+
+static int initWindowsDWM() {
+    if(0 == _init) {
+        _init = 1;
+        HANDLE shell = LoadLibrary(TEXT("dwmapi.dll"));
+        if (shell) {
+            _DwmEnableComposition = (DwmEnableCompositionPROCADDR) GetProcAddressA (shell, "DwmEnableComposition");
+            _DwmIsCompositionEnabled = (DwmIsCompositionEnabledPROCADDR) GetProcAddressA (shell, "DwmIsCompositionEnabled");
+            _DwmEnableBlurBehindWindow = (DwmEnableBlurBehindWindowPROCADDR) GetProcAddressA (shell, "DwmEnableBlurBehindWindow");
+            _DwmExtendFrameIntoClientArea = (DwmExtendFrameIntoClientAreaPROCADDR) GetProcAddressA (shell, "DwmExtendFrameIntoClientArea");
+            if(NULL != _DwmEnableComposition && NULL != _DwmIsCompositionEnabled && 
+               NULL != _DwmEnableBlurBehindWindow && NULL != _DwmExtendFrameIntoClientArea) {
+                _init = 2;
+            }
+        }
+        // FreeLibrary (shell);  
+        DBG_PRINT("DWM - initWindowsDWM: %d - s %p, e %p, c %p\n", _init, shell, _DwmEnableBlurBehindWindow, _DwmExtendFrameIntoClientArea);
+    }
+    return _init;
+}
+
+BOOL DwmIsExtensionAvailable() {
+    return (2 == initWindowsDWM()) ? TRUE : FALSE;
+}
+
+BOOL DwmIsCompositionEnabled( ) {
+    if(2 == initWindowsDWM()) {
+        BOOL fEnabled = FALSE;
+        if( 0 == _DwmIsCompositionEnabled(&fEnabled) ) {
+            DBG_PRINT("DWM - DwmIsCompositionEnabled: %d\n", fEnabled);
+            return fEnabled;
+        }
+    }
+    DBG_PRINT("DWM - DwmIsCompositionEnabled failed\n");
+    return FALSE;
+}
+
+BOOL DwmEnableComposition( UINT uCompositionAction ) {
+    if(2 == initWindowsDWM()) {
+        return 0 == _DwmEnableComposition(uCompositionAction) ? TRUE : FALSE;
+    }
+    return FALSE;
+}
+
+BOOL DwmEnableBlurBehindWindow(HWND hwnd, const DWM_BLURBEHIND* pBlurBehind) {  
+    if(2 == initWindowsDWM()) {
+        _DwmEnableBlurBehindWindow(hwnd, pBlurBehind);
+        DBG_PRINT("DWM - DwmEnableBlurBehindWindow: hwnd %p, f %d, on %d, %p\n", 
+            (void *)hwnd, 
+            (int) pBlurBehind->dwFlags,
+            (int) pBlurBehind->fEnable,
+            (void *)pBlurBehind->hRgnBlur);
+        return TRUE;
+    }
+    DBG_PRINT("DWM - DwmEnableBlurBehindWindow: n/a\n");
+    return FALSE;
+}  
+
+BOOL DwmExtendFrameIntoClientArea(HWND hwnd, const MARGINS *pMarInset) {
+    if(2 == initWindowsDWM()) {
+        _DwmExtendFrameIntoClientArea(hwnd, pMarInset);
+        return TRUE;
+    }
+    return FALSE;
+}  
+  
diff --git a/src/nativewindow/native/windows/WindowsDWM.h b/src/nativewindow/native/windows/WindowsDWM.h
new file mode 100644
index 0000000..36f82fc
--- /dev/null
+++ b/src/nativewindow/native/windows/WindowsDWM.h
@@ -0,0 +1,32 @@
+#ifndef _WINDOWS_DWM_H_
+#define _WINDOWS_DWM_H_
+
+    #include <windows.h> 
+
+    #define DWM_BB_ENABLE                 0x00000001  // fEnable has been specified  
+    #define DWM_EC_DISABLECOMPOSITION     0
+    #define DWM_EC_ENABLECOMPOSITION      1
+      
+    typedef struct _DWM_BLURBEHIND  
+    {  
+        DWORD dwFlags;  
+        BOOL fEnable;  
+        HRGN hRgnBlur;  
+        BOOL fTransitionOnMaximized;  
+    } DWM_BLURBEHIND, *PDWM_BLURBEHIND;  
+      
+    typedef struct _MARGINS  
+    {  
+        int cxLeftWidth;      // width of left border that retains its size  
+        int cxRightWidth;     // width of right border that retains its size  
+        int cyTopHeight;      // height of top border that retains its size  
+        int cyBottomHeight;   // height of bottom border that retains its size  
+    } MARGINS, *PMARGINS;  
+      
+    BOOL DwmIsExtensionAvailable();
+    BOOL DwmIsCompositionEnabled();
+    BOOL DwmEnableComposition( UINT uCompositionAction );
+    BOOL DwmEnableBlurBehindWindow(HWND hwnd, const DWM_BLURBEHIND* pBlurBehind);
+    BOOL DwmExtendFrameIntoClientArea(HWND hwnd, const MARGINS *pMarInset);
+      
+#endif /* _WINDOWS_DWM_H_ */
diff --git a/src/nativewindow/native/x11/XineramaHelper.c b/src/nativewindow/native/x11/XineramaHelper.c
index 899bbba..a4d380e 100644
--- a/src/nativewindow/native/x11/XineramaHelper.c
+++ b/src/nativewindow/native/x11/XineramaHelper.c
@@ -35,8 +35,9 @@
    determine whether the Xinerama extension is in use and therefore to
    treat the multiple AWT screens as one large screen. */
 
-#include <inttypes.h>
+#include <gluegen_stdint.h>
 #include <X11/Xlib.h>
+#include <stdio.h>
 
 #ifdef __sun
 
@@ -98,23 +99,23 @@ Bool XineramaEnabled(Display* display) {
   
 #else
 
-  char* XinExtName = "XINERAMA";
+  static const char* XinExtName = "XINERAMA";
   int32_t major_opcode, first_event, first_error;
   Bool gotXinExt = False;
-  int32_t locNumScr = 0;
+  Bool isXinActive = False;
 
-  XineramaScreenInfo *xinInfo;
+  // fprintf(stderr, "XineramaEnabled: p0\n"); fflush(stderr);
 
   gotXinExt = XQueryExtension(display, XinExtName, &major_opcode,
                               &first_event, &first_error);
+  // fprintf(stderr, "XineramaEnabled: p1 gotXinExt %d\n",gotXinExt); fflush(stderr);
 
   if (gotXinExt) {
-    xinInfo = XineramaQueryScreens(display, &locNumScr);
-    if (xinInfo != NULL) {
-      return True;
-    }
+    isXinActive = XineramaIsActive(display);
   }
-  return False;
+  // fprintf(stderr, "XineramaEnabled: p2 XineramaIsActive %d\n", isXinActive); fflush(stderr);
+
+  return isXinActive;
 
 #endif
 }
diff --git a/src/nativewindow/native/x11/Xmisc.c b/src/nativewindow/native/x11/Xmisc.c
index 1ced0ff..cc0b1a1 100644
--- a/src/nativewindow/native/x11/Xmisc.c
+++ b/src/nativewindow/native/x11/Xmisc.c
@@ -154,7 +154,16 @@ static void _initClazzAccess(JNIEnv *env) {
     }
 }
 
-static JNIEnv * x11ErrorHandlerJNIEnv = NULL;
+static JavaVM *jvmHandle = NULL;
+static int jvmVersion = 0;
+
+static void setupJVMVars(JNIEnv * env) {
+    if(0 != (*env)->GetJavaVM(env, &jvmHandle)) {
+        jvmHandle = NULL;
+    }
+    jvmVersion = (*env)->GetVersion(env);
+}
+
 static XErrorHandler origErrorHandler = NULL ;
 static int errorHandlerBlocked = 0 ;
 static int errorHandlerQuiet = 0 ;
@@ -162,15 +171,36 @@ static int errorHandlerQuiet = 0 ;
 static int x11ErrorHandler(Display *dpy, XErrorEvent *e)
 {
     if(!errorHandlerQuiet) {
-        fprintf(stderr, "Info: Nativewindow X11 Error: Display %p, Code 0x%X, errno %s\n", dpy, e->error_code, strerror(errno));
+        JNIEnv *curEnv = NULL;
+        JNIEnv *newEnv = NULL;
+        int envRes ;
+        const char * errStr = strerror(errno);
+
+        fprintf(stderr, "Info: Nativewindow X11 Error: Display %p, Code 0x%X, errno %s\n", dpy, e->error_code, errStr);
+        fflush(stderr);
+
+        // 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;
+            }
+            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);
+
+        if( NULL != newEnv ) {
+            // detached attached thread
+            (*jvmHandle)->DetachCurrentThread(jvmHandle);
+        }
     }
-#if 0
-    // Since the X11 Error may happen anytime, a exception could mess up the JVM completely.
-    // Experienced this for remote displays issuing non supported commands, eg. glXCreateContextAttribsARB(..)
-    //
-    NativewindowCommon_throwNewRuntimeException(x11ErrorHandlerJNIEnv, "Info: Nativewindow X11 Error: Display %p, Code 0x%X, errno %s", 
-        dpy, e->error_code, strerror(errno));
-#endif
 
 #if 0
     if(NULL!=origErrorHandler) {
@@ -186,7 +216,7 @@ static void x11ErrorHandlerEnable(Display *dpy, int onoff, JNIEnv * env) {
 
     if(onoff) {
         if(NULL==origErrorHandler) {
-            x11ErrorHandlerJNIEnv = env;
+            setupJVMVars(env);
             if(NULL!=dpy) {
                 XSync(dpy, False);
             }
@@ -215,8 +245,35 @@ static XIOErrorHandler origIOErrorHandler = NULL;
 
 static int x11IOErrorHandler(Display *dpy)
 {
-    fprintf(stderr, "Nativewindow X11 IOError: Display %p (%s): %s\n", dpy, XDisplayName(NULL), strerror(errno));
-    // NativewindowCommon_FatalError(x11ErrorHandlerJNIEnv, "Nativewindow X11 IOError: Display %p (%s): %s", dpy, XDisplayName(NULL), strerror(errno));
+    JNIEnv *curEnv = NULL;
+    JNIEnv *newEnv = NULL;
+    int envRes ;
+    const char * dpyName = XDisplayName(NULL);
+    const char * errStr = strerror(errno);
+
+    fprintf(stderr, "Nativewindow X11 IOError: Display %p (%s): %s\n", dpy, dpyName, errStr);
+
+    // 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;
+    }
+
+    NativewindowCommon_FatalError(curEnv, "Nativewindow X11 IOError: Display %p (%s): %s", dpy, dpyName, errStr);
+
+    if( NULL != newEnv ) {
+        // detached attached thread
+        (*jvmHandle)->DetachCurrentThread(jvmHandle);
+    }
     if(NULL!=origIOErrorHandler) {
         origIOErrorHandler(dpy);
     }
@@ -226,7 +283,7 @@ static int x11IOErrorHandler(Display *dpy)
 static void x11IOErrorHandlerEnable(int onoff, JNIEnv * env) {
     if(onoff) {
         if(NULL==origIOErrorHandler) {
-            x11ErrorHandlerJNIEnv = env;
+            setupJVMVars(env);
             origIOErrorHandler = XSetIOErrorHandler(x11IOErrorHandler);
         }
     } else {
diff --git a/src/newt/classes/com/jogamp/newt/Display.java b/src/newt/classes/com/jogamp/newt/Display.java
index f879449..6a0ebe1 100644
--- a/src/newt/classes/com/jogamp/newt/Display.java
+++ b/src/newt/classes/com/jogamp/newt/Display.java
@@ -146,15 +146,15 @@ public abstract class Display {
     public abstract void dispatchMessages();
     
     // Global Displays
-    protected static ArrayList displayList = new ArrayList();
+    protected static ArrayList<Display> displayList = new ArrayList<Display>();
     protected static int displaysActive = 0;
 
     public static void dumpDisplayList(String prefix) {
         synchronized(displayList) {
-            Iterator i = displayList.iterator();
+            Iterator<Display> i = displayList.iterator();
             System.err.println(prefix+" DisplayList[] entries: "+displayList.size()+" - "+getThreadName());
             for(int j=0; i.hasNext(); j++) {
-                DisplayImpl d = (DisplayImpl) i.next();
+                Display d = i.next();
                 System.err.println("  ["+j+"] : "+d);
             }
         }
@@ -198,10 +198,10 @@ public abstract class Display {
     }
 
     /** Returns the global display collection */
-    public static Collection getAllDisplays() {
-        ArrayList list;
+    public static Collection<Display> getAllDisplays() {
+        ArrayList<Display> list;
         synchronized(displayList) {
-            list = (ArrayList) displayList.clone();
+            list = (ArrayList<Display>) displayList.clone();
         }
         return list;
     }
diff --git a/src/newt/classes/com/jogamp/newt/NewtFactory.java b/src/newt/classes/com/jogamp/newt/NewtFactory.java
index 4b7eedc..d3be098 100644
--- a/src/newt/classes/com/jogamp/newt/NewtFactory.java
+++ b/src/newt/classes/com/jogamp/newt/NewtFactory.java
@@ -35,8 +35,9 @@
 package com.jogamp.newt;
 
 import javax.media.nativewindow.*;
-import com.jogamp.common.jvm.JVMUtil;
-import com.jogamp.newt.event.WindowEvent;
+
+import com.jogamp.common.os.Platform;
+
 import jogamp.newt.DisplayImpl;
 import jogamp.newt.ScreenImpl;
 import jogamp.newt.WindowImpl;
@@ -48,13 +49,13 @@ public class NewtFactory {
     // Work-around for initialization order problems on Mac OS X
     // between native Newt and (apparently) Fmod
     static {
-        JVMUtil.initSingleton();
+        Platform.initSingleton();
         NativeWindowFactory.initSingleton(false); // last resort ..
         WindowImpl.init(NativeWindowFactory.getNativeWindowType(true));
     }
 
-    public static Class getCustomClass(String packageName, String classBaseName) {
-        Class clazz = null;
+    public static Class<?> getCustomClass(String packageName, String classBaseName) {
+        Class<?> clazz = null;
         if(packageName!=null || classBaseName!=null) {
             String clazzName = packageName + "." + classBaseName ;
             try {
@@ -219,17 +220,6 @@ public class NewtFactory {
       return DisplayImpl.create(type, null, handle, false);
     }
 
-    private static boolean instanceOf(Object obj, String clazzName) {
-        Class clazz = obj.getClass();
-        do {
-            if(clazz.getName().equals(clazzName)) {
-                return true;
-            }
-            clazz = clazz.getSuperclass();
-        } while (clazz!=null);
-        return false;
-    }
-
     public static boolean isScreenCompatible(NativeWindow parent, Screen childScreen) {
       // Get parent's NativeWindow details
       AbstractGraphicsConfiguration parentConfig = (AbstractGraphicsConfiguration) parent.getGraphicsConfiguration();
diff --git a/src/newt/classes/com/jogamp/newt/Screen.java b/src/newt/classes/com/jogamp/newt/Screen.java
index fec3613..c6943ff 100644
--- a/src/newt/classes/com/jogamp/newt/Screen.java
+++ b/src/newt/classes/com/jogamp/newt/Screen.java
@@ -155,7 +155,7 @@ public abstract class Screen {
      * @return a shallow copy of the internal immutable {@link com.jogamp.newt.ScreenMode}s,
      * or null if not implemented for this native type {@link com.jogamp.newt.Display#getType()}.
      */
-    public abstract List/*<ScreenMode>*/ getScreenModes();
+    public abstract List<ScreenMode> getScreenModes();
 
     /**
      * Return the original {@link com.jogamp.newt.ScreenMode}, as used at NEWT initialization.
@@ -180,7 +180,7 @@ public abstract class Screen {
     public abstract boolean setCurrentScreenMode(ScreenMode screenMode);
 
     // Global Screens
-    protected static ArrayList screenList = new ArrayList();
+    protected static ArrayList<Screen> screenList = new ArrayList<Screen>();
     protected static int screensActive = 0;
 
     /**
@@ -220,10 +220,10 @@ public abstract class Screen {
         return null;
     }
     /** Returns the global display collection */
-    public static Collection getAllScreens() {
-        ArrayList list;
+    public static Collection<Screen> getAllScreens() {
+        ArrayList<Screen> list;
         synchronized(screenList) {
-            list = (ArrayList) screenList.clone();
+            list = (ArrayList<Screen>) screenList.clone();
         }
         return list;
     }
diff --git a/src/newt/classes/com/jogamp/newt/ScreenMode.java b/src/newt/classes/com/jogamp/newt/ScreenMode.java
index 81ce702..1f12217 100644
--- a/src/newt/classes/com/jogamp/newt/ScreenMode.java
+++ b/src/newt/classes/com/jogamp/newt/ScreenMode.java
@@ -28,6 +28,8 @@
 
 package com.jogamp.newt;
 
+import javax.media.nativewindow.util.DimensionImmutable;
+
 import com.jogamp.newt.util.MonitorMode;
 
 /** Immutable ScreenMode Class, consisting of it's read only components:<br>
@@ -99,7 +101,7 @@ import com.jogamp.newt.util.MonitorMode;
  * </pre>
  *
  */
-public class ScreenMode implements Cloneable {
+public class ScreenMode {
     /** zero rotation, compared to normal settings */
     public static final int ROTATE_0   = 0;
 
@@ -132,14 +134,6 @@ public class ScreenMode implements Cloneable {
         this.rotation = rotation;
     }
 
-    public Object clone() {
-        try {
-            return super.clone();
-        } catch (CloneNotSupportedException ex) {
-            throw new InternalError();
-        }
-    }
-
     /** Returns the unrotated <code>MonitorMode</code> */
     public final MonitorMode getMonitorMode() {
         return monitorMode;
@@ -149,6 +143,22 @@ public class ScreenMode implements Cloneable {
     public final int getRotation() {
         return rotation;
     }
+    
+    /** Returns the rotated screen width, 
+     *  derived from <code>getMonitorMode().getSurfaceSize().getResolution()</code>
+     *  and <code>getRotation()</code> 
+     */
+    public final int getRotatedWidth() {
+        return getRotatedWH(true);
+    }
+    
+    /** Returns the rotated screen height, 
+     *  derived from <code>getMonitorMode().getSurfaceSize().getResolution()</code>
+     *  and <code>getRotation()</code> 
+     */
+    public final int getRotatedHeight() {
+        return getRotatedWH(false);
+    }
 
     public final String toString() {
         return "[ " +  getMonitorMode() + ", " + rotation + " degr ]";
@@ -186,4 +196,13 @@ public class ScreenMode implements Cloneable {
         hash = ((hash << 5) - hash) + getRotation();
         return hash;
     }
+    
+    private final int getRotatedWH(boolean width) {
+        final DimensionImmutable d = getMonitorMode().getSurfaceSize().getResolution();
+        final boolean swap = ScreenMode.ROTATE_90 == rotation || ScreenMode.ROTATE_270 == rotation ;
+        if ( (  width &&  swap ) || ( !width && !swap ) ) {
+            return d.getHeight();
+        }
+        return d.getWidth();
+    }        
 }
diff --git a/src/newt/classes/com/jogamp/newt/Window.java b/src/newt/classes/com/jogamp/newt/Window.java
index b78f7a9..24555bf 100644
--- a/src/newt/classes/com/jogamp/newt/Window.java
+++ b/src/newt/classes/com/jogamp/newt/Window.java
@@ -37,7 +37,6 @@ import javax.media.nativewindow.CapabilitiesImmutable;
 import javax.media.nativewindow.NativeWindow;
 import javax.media.nativewindow.SurfaceUpdatedListener;
 import javax.media.nativewindow.WindowClosingProtocol;
-import javax.media.nativewindow.util.Insets;
 
 /**
  * Specifying the public Window functionality for the
@@ -46,7 +45,6 @@ import javax.media.nativewindow.util.Insets;
 public interface Window extends NativeWindow, WindowClosingProtocol {
     public static final boolean DEBUG_MOUSE_EVENT = Debug.debug("Window.MouseEvent");
     public static final boolean DEBUG_KEY_EVENT = Debug.debug("Window.KeyEvent");
-    public static final boolean DEBUG_WINDOW_EVENT = Debug.debug("Window.WindowEvent");
     public static final boolean DEBUG_IMPLEMENTATION = Debug.debug("Window");
 
     /** A 1s timeout while waiting for a native action response, ie {@link #setVisible(boolean)}. */
@@ -57,17 +55,8 @@ public interface Window extends NativeWindow, WindowClosingProtocol {
     //
 
     /**
-     * @return True if native window is valid, can be created or recovered.
-     * Otherwise false, ie this window is unrecoverable due to a <code>destroy(true)</code> call.
-     *
-     * @see #destroy(boolean)
-     * @see #setVisible(boolean)
-     */
-    boolean isValid();
-
-    /**
      * @return true if the native window handle is valid and ready to operate, ie
-     * if the native window has been created, otherwise false.
+     * if the native window has been created via {@link #setVisible(boolean) setVisible(true)}, otherwise false.
      *
      * @see #setVisible(boolean)
      * @see #destroy(boolean)
@@ -104,24 +93,18 @@ public interface Window extends NativeWindow, WindowClosingProtocol {
     /**
      * Destroy the Window and it's children, incl. native destruction.<br>
      * The Window can be recreate via {@link #setVisible(boolean) setVisible(true)}.
+     * <p>Visibility is set to false.</p>
      * <p>
      * This method invokes {@link Screen#removeReference()} after it's own destruction,<br>
      * which will issue {@link Screen#destroy()} if the reference count becomes 0.<br>
      * This destruction sequence shall end up in {@link Display#destroy()}, if all reference counts become 0.
      * </p>
-     * @see #invalidate()
+     * @see #destroy()
      * @see #setVisible(boolean)
      */
     void destroy();
 
     /**
-     * Destroys the Window via {@link #destroy()} and clears all Object references,
-     * eg. all states, size, position, parent handles, list of child Windows and reference to it's Screen.<br>
-     * This Window cannot be recreated after calling this method anymore.<br>
-     */
-    void invalidate();
-
-    /**
      * <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>
@@ -131,13 +114,13 @@ public interface Window extends NativeWindow, WindowClosingProtocol {
      * Zero size semantics are respected, see {@link #setSize(int,int)}:<br>
      * <pre>
      * if ( 0 == windowHandle && visible ) {
-     * this.visible = visible;
-     * if( 0<width*height ) {
-     * createNative();
-     * }
+     *   this.visible = visible;
+     *   if( 0 < width*height ) {
+     *     createNative();
+     *   }
      * } else if ( this.visible != visible ) {
-     * this.visible = visible;
-     * setNativeSizeImpl();
+     *   this.visible = visible;
+     *   setNativeSizeImpl();
      * }
      * </pre></p>
      * <p>
@@ -154,48 +137,93 @@ public interface Window extends NativeWindow, WindowClosingProtocol {
     // Child Window Management
     // 
 
-    void addChild(NativeWindow win);
+    boolean addChild(NativeWindow win);
 
-    void removeChild(NativeWindow win);
+    boolean removeChild(NativeWindow win);
 
     //
     // Modes / States
     //
 
     /**
-     * Sets the size of the client area of the window, excluding decorations
-     * Total size of the window will be
-     * {@code width+insets.left+insets.right, height+insets.top+insets.bottom}<br>
+     * Sets the size of the window's client area, excluding decorations.
+     * 
      * <p>
      * Zero size semantics are respected, see {@link #setVisible(boolean)}:<br>
      * <pre>
-     * if ( 0 != windowHandle && 0>=width*height && visible ) {
-     * setVisible(false);
-     * } else if ( 0 == windowHandle && 0<width*height && visible ) {
-     * setVisible(true);
+     * if ( 0 != windowHandle && 0 ≥ width*height && visible ) {
+     *   setVisible(false);
+     * } else if ( 0 == windowHandle && 0 < width*height && visible ) {
+     *   setVisible(true);
      * } else {
-     * // as expected ..
+     *   // as expected ..
      * }
      * </pre></p>
      * <p>
      * This call is ignored if in fullscreen mode.<br></p>
      *
-     * @param width of the client area of the window
-     * @param height of the client area of the window
+     * @param width of the window's client area
+     * @param height of the window's client area
+     * 
+     * @see #getInsets()
      */
     void setSize(int width, int height);
 
     /**
-     * Returns the width of the client area of this window
-     * @return width of the client area
+     * 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()
      */
-    int getWidth();
-
+    void setTopLevelSize(int width, int height);
+    
     /**
-     * Returns the height of the client area of this window
-     * @return height of the client area
+     * 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()
      */
-    int getHeight();
+    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();
 
     /** Defining ids for the reparenting strategy */
     public interface ReparentAction {
@@ -235,38 +263,6 @@ public interface Window extends NativeWindow, WindowClosingProtocol {
     
     boolean isFullscreen();
 
-    /**
-     * Sets the location of the top left corner of the window, including
-     * decorations (so the client area will be placed at
-     * {@code x+insets.left,y+insets.top}.<br>
-     *
-     * This call is ignored if in fullscreen mode.<br>
-     *
-     * @param x coord of the top left corner
-     * @param y coord of the top left corner
-     */
-    void setPosition(int x, int y);
-
-    int getX();
-
-    int getY();
-
-    /**
-     * Returns the insets for this native window (the difference between the
-     * size of the toplevel window with the decorations and the client area).
-     *
-     * @return insets for this platform window
-     */
-    Insets getInsets();
-
-    void setUndecorated(boolean value);
-    
-    boolean isUndecorated();
-    
-    void setTitle(String title);
-
-    String getTitle();
-
     static interface FocusRunnable {
         /**
          * @return false if NEWT shall proceed requesting the focus,
diff --git a/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java b/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java
index 0eda5c2..929980d 100644
--- a/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java
+++ b/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java
@@ -45,14 +45,17 @@ import javax.media.nativewindow.awt.AWTWindowClosingProtocol;
 import jogamp.nativewindow.awt.AWTMisc;
 
 import com.jogamp.newt.event.awt.AWTAdapter;
-import com.jogamp.newt.event.awt.AWTParentWindowAdapter;
 import com.jogamp.newt.event.WindowEvent;
 import com.jogamp.newt.Window;
 import com.jogamp.newt.event.WindowAdapter;
 import com.jogamp.newt.event.WindowListener;
 import jogamp.newt.Debug;
+import jogamp.newt.awt.event.AWTParentWindowAdapter;
+import jogamp.newt.awt.event.NewtFactoryAWT;
+
 import javax.swing.MenuSelectionManager;
 
+ at SuppressWarnings("serial")
 public class NewtCanvasAWT extends java.awt.Canvas implements WindowClosingProtocol {
     public static final boolean DEBUG = Debug.debug("Window");
 
@@ -93,6 +96,11 @@ public class NewtCanvasAWT extends java.awt.Canvas implements WindowClosingProto
                 } catch (Exception e) {
                     throw new NativeWindowException(e);
                 }
+                /**
+                // wait for AWT focus !
+                for(long sleep = Window.TIMEOUT_NATIVEWINDOW; 0<sleep && !isFocusOwner(); sleep-=10 ) {
+                    try { Thread.sleep(10); } catch (InterruptedException e) { }
+                } */
             }
             return focusActionImpl.result;
         }
@@ -120,13 +128,13 @@ public class NewtCanvasAWT extends java.awt.Canvas implements WindowClosingProto
     };
 
     /** sets a new NEWT child, provoking reparenting on the NEWT level. */
-    public NewtCanvasAWT setNEWTChild(Window child) {
+    /*package */ NewtCanvasAWT setNEWTChild(Window child) {
         if(newtChild!=child) {
             newtChild = child;
             if(null!=nativeWindow) {
                 java.awt.Container cont = AWTMisc.getContainer(this);
                 // reparent right away, addNotify has been called already
-                reparentWindow( (null!=newtChild) ? true : false, cont );
+                reparentWindow( (null!=child) ? true : false, cont );
             }
         }
         return this;
@@ -149,7 +157,7 @@ public class NewtCanvasAWT extends java.awt.Canvas implements WindowClosingProto
         return awtWindowClosingProtocol.setDefaultCloseOperation(op);
     }
 
-    void configureNewtChild(boolean attach) {
+    /* package */ void configureNewtChild(boolean attach) {
         if(null!=awtAdapter) {
           awtAdapter.removeFrom(this);
           awtAdapter=null;
@@ -157,16 +165,12 @@ public class NewtCanvasAWT extends java.awt.Canvas implements WindowClosingProto
         if( null != newtChild ) {
             if(attach) {
                 awtAdapter = new AWTParentWindowAdapter(newtChild).addTo(this);
-                if(newtChild.isValid()) {
-                    newtChild.addWindowListener(clearAWTMenusOnNewtFocus);
-                }
+                newtChild.addWindowListener(clearAWTMenusOnNewtFocus);
                 newtChild.setFocusAction(focusAction); // enable AWT focus traversal
                 newtChildCloseOp = newtChild.setDefaultCloseOperation(WindowClosingProtocol.DO_NOTHING_ON_CLOSE);
                 awtWindowClosingProtocol.addClosingListenerOneShot();
             } else {
-                if(newtChild.isValid()) {
-                    newtChild.removeWindowListener(clearAWTMenusOnNewtFocus);
-                }
+                newtChild.removeWindowListener(clearAWTMenusOnNewtFocus);
                 newtChild.setFocusAction(null);
                 newtChild.setDefaultCloseOperation(newtChildCloseOp);
                 awtWindowClosingProtocol.removeClosingListener();
@@ -191,7 +195,7 @@ public class NewtCanvasAWT extends java.awt.Canvas implements WindowClosingProto
             // if ( isShowing() == false ) -> Container was not visible yet.
             // if ( isShowing() == true  ) -> Container is already visible.
             System.err.println("NewtCanvasAWT.addNotify: "+newtChild+", "+this+", visible "+isVisible()+", showing "+isShowing()+
-            		           ", displayable "+isDisplayable()+" -> "+cont);
+                               ", displayable "+isDisplayable()+" -> "+cont);
         }  
         reparentWindow(true, cont);
     }
@@ -281,7 +285,7 @@ public class NewtCanvasAWT extends java.awt.Canvas implements WindowClosingProto
     }
 
     final void requestFocusAWTParent() {
-        super.requestFocus();
+        super.requestFocusInWindow();
     }
 
     final void requestFocusNEWTChild() {
@@ -294,13 +298,13 @@ public class NewtCanvasAWT extends java.awt.Canvas implements WindowClosingProto
 
     @Override
     public void requestFocus() {
-        requestFocusAWTParent();
+        super.requestFocus();
         requestFocusNEWTChild();
     }
 
     @Override
     public boolean requestFocus(boolean temporary) {
-        boolean res = super.requestFocus(temporary);
+        final boolean res = super.requestFocus(temporary);
         if(res) {
             requestFocusNEWTChild();
         }
@@ -309,7 +313,7 @@ public class NewtCanvasAWT extends java.awt.Canvas implements WindowClosingProto
 
     @Override
     public boolean requestFocusInWindow() {
-        boolean res = super.requestFocusInWindow();
+        final boolean res = super.requestFocusInWindow();
         if(res) {
             requestFocusNEWTChild();
         }
@@ -318,7 +322,7 @@ public class NewtCanvasAWT extends java.awt.Canvas implements WindowClosingProto
 
     @Override
     public boolean requestFocusInWindow(boolean temporary) {
-        boolean res = super.requestFocusInWindow(temporary);
+        final boolean res = super.requestFocusInWindow(temporary);
         if(res) {
             requestFocusNEWTChild();
         }
@@ -335,10 +339,10 @@ public class NewtCanvasAWT extends java.awt.Canvas implements WindowClosingProto
   private void disableBackgroundErase() {
     if (!disableBackgroundEraseInitialized) {
       try {
-        AccessController.doPrivileged(new PrivilegedAction() {
+        AccessController.doPrivileged(new PrivilegedAction<Object>() {
             public Object run() {
               try {
-                Class clazz = getToolkit().getClass();
+                Class<?> clazz = getToolkit().getClass();
                 while (clazz != null && disableBackgroundEraseMethod == null) {
                   try {
                     disableBackgroundEraseMethod =
diff --git a/src/newt/classes/com/jogamp/newt/awt/NewtFactoryAWT.java b/src/newt/classes/com/jogamp/newt/awt/NewtFactoryAWT.java
deleted file mode 100644
index e1370f0..0000000
--- a/src/newt/classes/com/jogamp/newt/awt/NewtFactoryAWT.java
+++ /dev/null
@@ -1,73 +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.newt.awt;
-
-
-import javax.media.nativewindow.*;
-import javax.media.nativewindow.awt.*;
-
-import com.jogamp.newt.NewtFactory;
-import jogamp.newt.Debug;
-
-public class NewtFactoryAWT extends NewtFactory {
-  public static final boolean DEBUG_IMPLEMENTATION = Debug.debug("Window");
-
-  /**
-   * Wraps an AWT component into a {@link javax.media.nativewindow.NativeWindow} utilizing the {@link javax.media.nativewindow.NativeWindowFactory},<br>
-   * using a configuration agnostic dummy {@link javax.media.nativewindow.DefaultGraphicsConfiguration}.<br>
-   * <p>
-   * The actual wrapping implementation is {@link jogamp.nativewindow.jawt.JAWTWindow}.<br></p>
-   * <p>
-   * Purpose of this wrapping is to access the AWT window handle,<br>
-   * not to actually render into it.<br>
-   * Hence the dummy configuration only.</p>
-   *
-   * @param awtCompObject must be of type java.awt.Component
-   */
-  public static NativeWindow getNativeWindow(Object awtCompObject, CapabilitiesImmutable capsRequested) {
-      if(null==awtCompObject) {
-        throw new NativeWindowException("Null AWT Component");
-      }
-      if( ! (awtCompObject instanceof java.awt.Component) ) {
-        throw new NativeWindowException("AWT Component not a java.awt.Component");
-      }
-      return getNativeWindow( (java.awt.Component) awtCompObject, capsRequested );
-  }
-
-  public static NativeWindow getNativeWindow(java.awt.Component awtComp, CapabilitiesImmutable capsRequested) {
-      DefaultGraphicsConfiguration config = AWTGraphicsConfiguration.create(awtComp, capsRequested, capsRequested);
-      NativeWindow awtNative = NativeWindowFactory.getNativeWindow(awtComp, config); // a JAWTWindow
-      if(DEBUG_IMPLEMENTATION) {
-        System.err.println("NewtFactoryAWT.getNativeWindow: "+awtComp+" -> "+awtNative);
-      }
-      return awtNative;
-  }
-}
-
diff --git a/src/newt/classes/com/jogamp/newt/awt/applet/JOGLNewtApplet1Run.java b/src/newt/classes/com/jogamp/newt/awt/applet/JOGLNewtApplet1Run.java
new file mode 100755
index 0000000..38a3d95
--- /dev/null
+++ b/src/newt/classes/com/jogamp/newt/awt/applet/JOGLNewtApplet1Run.java
@@ -0,0 +1,177 @@
+package com.jogamp.newt.awt.applet;
+
+import java.applet.*;
+import java.awt.Container;
+import java.awt.event.MouseListener;
+import java.awt.event.MouseMotionListener;
+import java.awt.event.KeyListener;
+
+import javax.media.opengl.*;
+
+import com.jogamp.newt.awt.NewtCanvasAWT;
+import com.jogamp.newt.opengl.GLWindow;
+import java.awt.BorderLayout;
+
+/** 
+ * Simple GLEventListener deployment as an applet using JOGL. This demo must be
+ * referenced from a web page via an <applet> tag.
+ * 
+ *  <p>
+ *  Example of an applet tag using GearsES2 within the applet area (normal case): 
+ *  <pre>
+        <applet width=100 height=100>
+           <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="GL2">
+           <param name="gl_swap_interval" value="1">
+           <param name="gl_debug" value="false">
+           <param name="gl_trace" value="false">
+           <param name="jnlp_href" value="jogl-newt-applet-runner.jnlp">
+        </applet>Hello Gears !
+ *  </pre>
+ *  </p>
+ *  
+ *  <p>
+ *  Example of an applet tag using GearsES2 in an undecorated, translucent and always-on-top window: 
+ *  <pre>
+        <applet width=1 height=1>
+           <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="GL2">
+           <param name="gl_swap_interval" value="1">
+           <param name="gl_undecorated" value="true">
+           <param name="gl_alwaysontop" value="true">
+           <param name="gl_alpha" value="1">
+           <param name="gl_multisamplebuffer" value="0">
+           <param name="gl_opaque" value="false">
+           <param name="gl_dx" value="10">
+           <param name="gl_dy" value="0">
+           <param name="gl_width" value="100">
+           <param name="gl_height" value="100">
+           <param name="gl_nodefaultkeyListener" value="true">
+           <param name="gl_debug" value="false">
+           <param name="gl_trace" value="false">
+           <param name="jnlp_href" value="jogl-newt-applet-runner.jnlp">
+        </applet>Hello Gears !
+ *  </pre>
+ *  </p>
+ */
+ at SuppressWarnings("serial")
+public class JOGLNewtApplet1Run extends Applet {
+    GLWindow glWindow;
+    NewtCanvasAWT newtCanvasAWT;
+    JOGLNewtAppletBase base;
+    /** if valid glStandalone:=true (own window) ! */
+    int glXd=Integer.MAX_VALUE, glYd=Integer.MAX_VALUE, glWidth=Integer.MAX_VALUE, glHeight=Integer.MAX_VALUE; 
+    boolean glStandalone = false;
+
+    public void init() {
+        if(!(this instanceof Container)) {
+            throw new RuntimeException("This Applet is not a AWT Container");
+        }
+        Container container = (Container) this; // have to think about that, we may use a Container
+
+        String glEventListenerClazzName=null;
+        String glProfileName=null;
+        int glSwapInterval=0;
+        boolean glDebug=false;
+        boolean glTrace=false;
+        boolean glUndecorated=false;
+        boolean glAlwaysOnTop=false;
+        boolean glOpaque=true;
+        int glAlphaBits=0;
+        int glNumMultisampleBuffer=0;
+        boolean glNoDefaultKeyListener = false;
+        try {
+            glEventListenerClazzName = getParameter("gl_event_listener_class");
+            glProfileName = getParameter("gl_profile");
+            glSwapInterval = JOGLNewtAppletBase.str2Int(getParameter("gl_swap_interval"), glSwapInterval);
+            glDebug = JOGLNewtAppletBase.str2Bool(getParameter("gl_debug"), glDebug);
+            glTrace = JOGLNewtAppletBase.str2Bool(getParameter("gl_trace"), glTrace);
+            glUndecorated = JOGLNewtAppletBase.str2Bool(getParameter("gl_undecorated"), glUndecorated);
+            glAlwaysOnTop = JOGLNewtAppletBase.str2Bool(getParameter("gl_alwaysontop"), glAlwaysOnTop);
+            glOpaque = JOGLNewtAppletBase.str2Bool(getParameter("gl_opaque"), glOpaque);
+            glAlphaBits = JOGLNewtAppletBase.str2Int(getParameter("gl_alpha"), glAlphaBits);
+            glNumMultisampleBuffer = JOGLNewtAppletBase.str2Int(getParameter("gl_multisamplebuffer"), glNumMultisampleBuffer); 
+            glXd = JOGLNewtAppletBase.str2Int(getParameter("gl_dx"), glXd);
+            glYd = JOGLNewtAppletBase.str2Int(getParameter("gl_dy"), glYd);
+            glWidth = JOGLNewtAppletBase.str2Int(getParameter("gl_width"), glWidth);
+            glHeight = JOGLNewtAppletBase.str2Int(getParameter("gl_height"), glHeight);
+            glNoDefaultKeyListener = JOGLNewtAppletBase.str2Bool(getParameter("gl_nodefaultkeyListener"), glNoDefaultKeyListener);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        if(null==glEventListenerClazzName) {
+            throw new RuntimeException("No applet parameter 'gl_event_listener_class'");
+        }
+        glStandalone = Integer.MAX_VALUE>glXd && Integer.MAX_VALUE>glYd && Integer.MAX_VALUE>glWidth && Integer.MAX_VALUE>glHeight;
+        
+        base = new JOGLNewtAppletBase(glEventListenerClazzName, 
+                                      glSwapInterval,
+                                      glNoDefaultKeyListener,
+                                      glDebug,
+                                      glTrace);
+
+        try {
+            GLProfile.initSingleton(false);
+            GLCapabilities caps = new GLCapabilities(GLProfile.get(glProfileName));
+            caps.setAlphaBits(glAlphaBits);
+            if(0<glNumMultisampleBuffer) {
+                caps.setSampleBuffers(true);
+                caps.setNumSamples(glNumMultisampleBuffer);
+            }
+            caps.setBackgroundOpaque(glOpaque);
+            glWindow = GLWindow.create(caps);
+            glWindow.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err);
+            glWindow.setUndecorated(glUndecorated);
+            glWindow.setAlwaysOnTop(glAlwaysOnTop);
+            if(glStandalone) {
+                newtCanvasAWT = null;
+            } else {
+                newtCanvasAWT = new NewtCanvasAWT(glWindow);
+                container.setLayout(new BorderLayout());
+                container.add(newtCanvasAWT, BorderLayout.CENTER);
+            }
+            base.init(glWindow);
+            if(base.isValid()) {
+                GLEventListener glEventListener = base.getGLEventListener();
+
+                if(glEventListener instanceof MouseListener) {
+                    addMouseListener((MouseListener)glEventListener);
+                }
+                if(glEventListener instanceof MouseMotionListener) {
+                    addMouseMotionListener((MouseMotionListener)glEventListener);
+                }
+                if(glEventListener instanceof KeyListener) {
+                    addKeyListener((KeyListener)glEventListener);
+                }
+            }
+        } catch (Throwable t) {
+            throw new RuntimeException(t);
+        }
+    }
+
+    public void start() {
+        if(glStandalone) {
+            glWindow.setSize(glWidth, glHeight);
+            final java.awt.Point p0 = this.getLocationOnScreen();
+            glWindow.setPosition(p0.x+glXd, p0.y+glYd);
+        }
+        base.start();
+    }
+
+    public void stop() {
+        base.stop();
+    }
+
+    public void destroy() {
+        glWindow.setVisible(false); // hide 1st
+        if(!glStandalone) {
+            glWindow.reparentWindow(null); // get out of newtCanvasAWT
+            this.remove(newtCanvasAWT); // remove newtCanvasAWT
+        }
+        base.destroy(); // destroy glWindow unrecoverable
+        base=null;
+    }
+}
+
diff --git a/src/newt/classes/com/jogamp/newt/awt/applet/JOGLNewtAppletBase.java b/src/newt/classes/com/jogamp/newt/awt/applet/JOGLNewtAppletBase.java
new file mode 100755
index 0000000..c6240d1
--- /dev/null
+++ b/src/newt/classes/com/jogamp/newt/awt/applet/JOGLNewtAppletBase.java
@@ -0,0 +1,244 @@
+package com.jogamp.newt.awt.applet;
+
+import java.lang.reflect.*;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
+import javax.media.nativewindow.NativeWindow;
+import javax.media.opengl.*;
+
+import com.jogamp.opengl.util.*;
+
+import com.jogamp.newt.event.*;
+import com.jogamp.newt.opengl.GLWindow;
+
+/** Shows how to deploy an applet using JOGL. This demo must be
+    referenced from a web page via an <applet> tag. */
+
+public class JOGLNewtAppletBase implements KeyListener, GLEventListener {
+    String glEventListenerClazzName;
+    int glSwapInterval;
+    boolean noDefaultKeyListener;
+    boolean glDebug;
+    boolean glTrace;
+
+    GLEventListener glEventListener = null;
+    GLWindow glWindow = null;
+    Animator glAnimator=null;
+    boolean isValid = false;
+    NativeWindow awtParent;
+
+    public JOGLNewtAppletBase(String glEventListenerClazzName, 
+                              int glSwapInterval,
+                              boolean noDefaultKeyListener,
+                              boolean glDebug,
+                              boolean glTrace) {
+    
+        this.glEventListenerClazzName=glEventListenerClazzName;
+        this.glSwapInterval=glSwapInterval;
+        this.noDefaultKeyListener = noDefaultKeyListener;
+        this.glDebug = glDebug;
+        this.glTrace = glTrace;
+    }
+
+    public GLEventListener getGLEventListener() { return glEventListener; }
+    public GLWindow getGLWindow() { return glWindow; }
+    public Animator getGLAnimator() { return glAnimator; }
+    public boolean isValid() { return isValid; }
+
+    public static boolean str2Bool(String str, boolean def) {
+        if(null==str) return def;
+        try {
+            return Boolean.valueOf(str).booleanValue();
+        } catch (Exception ex) { ex.printStackTrace(); }
+        return def;
+    }
+
+    public static int str2Int(String str, int def) {
+        if(null==str) return def;
+        try {
+            return Integer.parseInt(str);
+        } catch (Exception ex) { ex.printStackTrace(); }
+        return def;
+    }
+
+    public static GLEventListener createInstance(final String clazzName) {
+        Object instance = null;
+
+        try {
+            final Class<?> clazz = AccessController.doPrivileged(new PrivilegedAction<Class<?>>() {
+                public Class<?> run() {
+                    final ClassLoader cl = Thread.currentThread().getContextClassLoader();
+                    Class<?> clazz = null;
+                    try {
+                        clazz = Class.forName(clazzName, false, cl);
+                    } catch (Throwable t) {
+                        t.printStackTrace();
+                    }
+                    return clazz;
+                }
+            });
+            instance = clazz.newInstance();
+        } catch (Throwable t) {
+            t.printStackTrace();
+            throw new RuntimeException("Error while instantiating demo: "+clazzName);
+        }
+        if( null == instance ) {
+            throw new RuntimeException("Null GLEventListener: "+clazzName);
+        }
+        if( !(instance instanceof GLEventListener) ) {
+            throw new RuntimeException("Not a GLEventListener: "+clazzName);
+        }
+        return (GLEventListener) instance;
+    }
+
+    public static boolean setField(Object instance, String fieldName, Object value) {
+        try {
+            Field f = instance.getClass().getField(fieldName);
+            if(f.getType().isInstance(value)) {
+                f.set(instance, value);
+                return true;
+            } else {
+                System.out.println(instance.getClass()+" '"+fieldName+"' field not assignable with "+value.getClass()+", it's a: "+f.getType());
+            }
+        } catch (NoSuchFieldException nsfe) {
+            System.out.println(instance.getClass()+" has no '"+fieldName+"' field");
+        } catch (Throwable t) {
+            t.printStackTrace();
+        }
+        return false;
+    }
+
+    public void init(GLWindow glWindow) {
+        init(Thread.currentThread().getThreadGroup(), glWindow);
+    }
+
+    public void init(ThreadGroup tg, GLWindow glWindow) {
+        isValid = false;
+        this.glWindow = glWindow;
+
+        glEventListener = createInstance(glEventListenerClazzName);
+        if(null == glEventListener) {
+            return;
+        }
+
+        try {
+            if(!setField(glEventListener, "window", glWindow)) {
+                setField(glEventListener, "glWindow", glWindow);
+            }
+
+            glWindow.addGLEventListener(this);
+            glWindow.addGLEventListener(glEventListener);
+
+            if(glEventListener instanceof WindowListener) {
+                glWindow.addWindowListener((WindowListener)glEventListener);
+            }
+
+            if(glEventListener instanceof MouseListener) {
+                glWindow.addMouseListener((MouseListener)glEventListener);
+            }
+
+            if(glEventListener instanceof KeyListener) {
+                glWindow.addKeyListener((KeyListener)glEventListener);
+            }
+            
+            if(!noDefaultKeyListener) {
+                glWindow.addKeyListener(this);
+            }
+
+            glWindow.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err);
+
+            // glAnimator = new FPSAnimator(canvas, 60);
+            glAnimator = new Animator(tg, glWindow);
+            glAnimator.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, null);
+            
+        } catch (Throwable t) {
+            throw new RuntimeException(t);
+        }
+        isValid = true;
+    }
+
+    public void start() {
+        if(isValid) {
+            glWindow.setVisible(true);
+            glAnimator.start();
+            awtParent = glWindow.getParent();
+        }
+    }
+
+    public void stop() {
+        if(null!=glAnimator) {
+            glAnimator.stop();
+            glWindow.setVisible(false);
+        }
+    }
+
+    public void destroy() {
+        isValid = false;
+        if(null!=glAnimator) {
+            glAnimator.stop();
+            glAnimator.remove(glWindow);
+            glAnimator=null;
+        }
+        if(null!=glWindow) {
+            glWindow.destroy();
+            glWindow=null;
+        }
+    }
+
+    // ***********************************************************************************
+    // ***********************************************************************************
+    // ***********************************************************************************
+
+    public void init(GLAutoDrawable drawable) {
+        GL _gl = drawable.getGL();
+
+        if(glDebug) {
+            try {
+                _gl = _gl.getContext().setGL( GLPipelineFactory.create("javax.media.opengl.Debug", null, _gl, null) );
+            } catch (Exception e) {e.printStackTrace();} 
+        }
+
+        if(glTrace) {
+            try {
+                // Trace ..
+                _gl = _gl.getContext().setGL( GLPipelineFactory.create("javax.media.opengl.Trace", null, _gl, new Object[] { System.err } ) );
+            } catch (Exception e) {e.printStackTrace();} 
+        }
+
+        if(glSwapInterval>=0) {
+            _gl.setSwapInterval(glSwapInterval);
+        }
+    }
+    public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
+    }
+    public void display(GLAutoDrawable drawable) {
+    }
+    public void dispose(GLAutoDrawable drawable) {
+    }
+
+    // ***********************************************************************************
+    // ***********************************************************************************
+    // ***********************************************************************************
+
+    public void keyPressed(KeyEvent e) { 
+    }
+    public void keyReleased(KeyEvent e) { 
+    }
+    public void keyTyped(KeyEvent e) {
+       if(e.getKeyChar()=='d') {
+            glWindow.setUndecorated(!glWindow.isUndecorated());
+       } if(e.getKeyChar()=='f') {
+            glWindow.setFullscreen(!glWindow.isFullscreen());
+       } else if(e.getKeyChar()=='a') {
+            glWindow.setAlwaysOnTop(!glWindow.isAlwaysOnTop());
+       } else if(e.getKeyChar()=='r' && null!=awtParent) {
+            if(null == glWindow.getParent()) {
+                glWindow.reparentWindow(awtParent);
+            } else {
+                glWindow.reparentWindow(null);
+            }
+       }
+    }
+}
+
diff --git a/src/newt/classes/com/jogamp/newt/event/InputEvent.java b/src/newt/classes/com/jogamp/newt/event/InputEvent.java
index 1487878..40a5c84 100644
--- a/src/newt/classes/com/jogamp/newt/event/InputEvent.java
+++ b/src/newt/classes/com/jogamp/newt/event/InputEvent.java
@@ -69,15 +69,33 @@ public abstract class InputEvent extends NEWTEvent
     return (modifiers&SHIFT_MASK)!=0;
  }
 
- public boolean isButton1Down()  {
+ /**
+  * @return Array of pressed mouse buttons  [{@link MouseEvent#BUTTON1} ..]. 
+  *         If none is down, the resulting array is of length 0.
+  */
+ public final int[] getButtonsDown()  {
+     int len = 0;
+     if(isButton1Down()) { len++; }
+     if(isButton2Down()) { len++; }
+     if(isButton3Down()) { len++; }
+     
+     int[] res = new int[len];
+     int i=0;
+     if(isButton1Down()) { res[i++] = MouseEvent.BUTTON1; }
+     if(isButton2Down()) { res[i++] = MouseEvent.BUTTON2; }
+     if(isButton3Down()) { res[i++] = MouseEvent.BUTTON3; }
+     return res;
+ }
+
+ public final boolean isButton1Down()  {
     return (modifiers&BUTTON1_MASK)!=0;
  }
 
- public boolean isButton2Down()  {
+ public final boolean isButton2Down()  {
     return (modifiers&BUTTON2_MASK)!=0;
  }
 
- public boolean isButton3Down()  {
+ public final boolean isButton3Down()  {
     return (modifiers&BUTTON3_MASK)!=0;
  }
 
@@ -85,5 +103,5 @@ public abstract class InputEvent extends NEWTEvent
      return "InputEvent[modifiers:"+modifiers+", "+super.toString()+"]";
  }
 
- private int modifiers;
+ private final int modifiers;
 }
diff --git a/src/newt/classes/com/jogamp/newt/event/KeyEvent.java b/src/newt/classes/com/jogamp/newt/event/KeyEvent.java
index 2c3fd9c..9e4fe37 100644
--- a/src/newt/classes/com/jogamp/newt/event/KeyEvent.java
+++ b/src/newt/classes/com/jogamp/newt/event/KeyEvent.java
@@ -110,8 +110,8 @@ public class KeyEvent extends InputEvent
     return false;
  }
 
-    private int keyCode;
-    private char keyChar;
+    private final int keyCode;
+    private final char keyChar;
 
     public static final int EVENT_KEY_PRESSED = 300;
     public static final int EVENT_KEY_RELEASED= 301;
diff --git a/src/newt/classes/com/jogamp/newt/event/MouseEvent.java b/src/newt/classes/com/jogamp/newt/event/MouseEvent.java
index fbe32d4..2c12049 100644
--- a/src/newt/classes/com/jogamp/newt/event/MouseEvent.java
+++ b/src/newt/classes/com/jogamp/newt/event/MouseEvent.java
@@ -36,55 +36,136 @@ package com.jogamp.newt.event;
 
 public class MouseEvent extends InputEvent
 {
-  public static final int BUTTON1 = 1;
-  public static final int BUTTON2 = 2;
-  public static final int BUTTON3 = 3;
-  public static final int BUTTON4 = 4;
-  public static final int BUTTON5 = 5;
-  public static final int BUTTON6 = 6;
-  public static final int BUTTON_NUMBER = 6;
+    public static final int BUTTON1 = 1;
+    public static final int BUTTON2 = 2;
+    public static final int BUTTON3 = 3;
+    public static final int BUTTON4 = 4;
+    public static final int BUTTON5 = 5;
+    public static final int BUTTON6 = 6;
+    public static final int BUTTON_NUMBER = 6;
 
-  public static final int getClickTimeout() { 
-    return 300; 
-  }
+    public static final int getClickTimeout() { 
+        return 300; 
+    }
+
+    public MouseEvent(int eventType, Object source, long when,
+            int modifiers, int x, int y, int clickCount, int button,
+            int rotation)
+    {
+        super(eventType, source, when, modifiers); 
+        this.x = new int[]{x};
+        this.y = new int[]{y};
+        this.pressure = new float[]{0};
+        this.pointerids = new int[]{-1};
+        this.clickCount=clickCount;
+        this.button=button;
+        this.wheelRotation = rotation;
+    }
+
+    public MouseEvent(int eventType, Object source, long when,
+            int modifiers, int[] x, int[] y, float[] pressure, int[] pointerids, int clickCount, int button,
+            int rotation)
+    {
+        super(eventType, source, when, modifiers); 
+        this.x = x;
+        this.y = y;
+        if(pointerids.length != pressure.length ||
+           pointerids.length != x.length ||
+           pointerids.length != y.length) {
+            throw new IllegalArgumentException("All multiple pointer arrays must be of same size");
+        }
+        this.pressure = pressure;
+        this.pointerids = pointerids;
+        this.clickCount=clickCount;
+        this.button=button;
+        this.wheelRotation = rotation;
+    }
+    
+    /**
+     * @return the count of pointers involved in this event
+     */
+    public int getPointerCount() {
+        return x.length;
+    }
+    
+    /**
+     * @return the pointer id for the data at index.
+     *  return -1 if index not available.
+     */
+    public int getPointerId(int index) {
+        if(index >= pointerids.length)
+            return -1;
+        return pointerids[index];
+    }
+    
+    public int getButton() {
+        return button;
+    }
+    
+    public int getClickCount() {
+        return clickCount;
+    }
+    public int getX() {
+        return x[0];
+    }
+    
+    public int getY() {
+        return y[0];
+    }
+
+    /** 
+     * @return x-coord at index where index refers to the 
+     * data coming from a pointer. 
+     * @see getPointerId(index)
+     */
+    public int getX(int index) {
+        return x[index];
+    }
 
- public MouseEvent(int eventType, Object source, long when,
-                   int modifiers, int x, int y, int clickCount, int button,
-                   int rotation)
- {
-     super(eventType, source, when, modifiers); 
-     this.x=x;
-     this.y=y;
-     this.clickCount=clickCount;
-     this.button=button;
-     this.wheelRotation = rotation;
- }
+    public int getY(int index) {
+        return y[index];
+    }
+    
+    public float getPressure(){
+        return pressure[0];
+    }
+    
+    /**
+     * @return the pressure associated with the pointer at index.
+     * the value of zero is return if not available.
+     */
+    public float getPressure(int index){
+        return pressure[index];
+    }
+    
+    public int getWheelRotation() {
+        return wheelRotation;
+    }
 
- public int getButton() {
-    return button;
- }
- public int getClickCount() {
-    return clickCount;
- }
- public int getX() {
-    return x;
- }
- public int getY() {
-    return y;
- }
- public int getWheelRotation() {
-    return wheelRotation;
- }
- 
- public String toString() {
-    return "MouseEvent["+getEventTypeString(getEventType())+
-                       ", "+x+"/"+y+", button "+button+", count "+clickCount+
-                       ", wheel rotation "+wheelRotation+
-                       ", "+super.toString()+"]";
- }
+    public String toString() {
+        StringBuffer sb = new StringBuffer();
+        sb.append("MouseEvent[").append(getEventTypeString(getEventType()))
+        .append(", ").append(x).append("/").append(y)
+        .append(", button ").append(button).append(", count ")
+        .append(clickCount).append(", wheel rotation ").append(wheelRotation);
+        if(pointerids.length>0) {
+            sb.append(", pointer<").append(pointerids.length).append(">[");
+            for(int i=0; i<pointerids.length; i++) {
+                if(i>0) {
+                    sb.append(", ");
+                }
+                sb.append(pointerids[i]).append(": ")
+                .append(x[i]).append(" / ").append(y[i]).append(" ")
+                .append(pressure[i]).append("p");
+            }
+            sb.append("]");
+        }        
+        sb.append(", ").append(super.toString()).append("]");
+        return sb.toString();
+    }
 
- public static String getEventTypeString(int type) {
-    switch(type) {
+    public static String getEventTypeString(int type) {
+        switch(type) {
         case EVENT_MOUSE_CLICKED: return "EVENT_MOUSE_CLICKED";
         case EVENT_MOUSE_ENTERED: return "EVENT_MOUSE_ENTERED";
         case EVENT_MOUSE_EXITED: return "EVENT_MOUSE_EXITED";
@@ -94,17 +175,18 @@ public class MouseEvent extends InputEvent
         case EVENT_MOUSE_DRAGGED: return "EVENT_MOUSE_DRAGGED";
         case EVENT_MOUSE_WHEEL_MOVED: return "EVENT_MOUSE_WHEEL_MOVED";
         default: return "unknown (" + type + ")";
+        }
     }
- }
-
- private int x, y, clickCount, button, wheelRotation;
-
- public static final int EVENT_MOUSE_CLICKED  = 200;
- public static final int EVENT_MOUSE_ENTERED  = 201;
- public static final int EVENT_MOUSE_EXITED   = 202;
- public static final int EVENT_MOUSE_PRESSED  = 203;
- public static final int EVENT_MOUSE_RELEASED = 204;
- public static final int EVENT_MOUSE_MOVED    = 205;
- public static final int EVENT_MOUSE_DRAGGED  = 206;
- public static final int EVENT_MOUSE_WHEEL_MOVED = 207;
+    private final int x[], y[], clickCount, button, wheelRotation;
+    private final float pressure[];
+    private final int pointerids[];
+    
+    public static final int EVENT_MOUSE_CLICKED  = 200;
+    public static final int EVENT_MOUSE_ENTERED  = 201;
+    public static final int EVENT_MOUSE_EXITED   = 202;
+    public static final int EVENT_MOUSE_PRESSED  = 203;
+    public static final int EVENT_MOUSE_RELEASED = 204;
+    public static final int EVENT_MOUSE_MOVED    = 205;
+    public static final int EVENT_MOUSE_DRAGGED  = 206;
+    public static final int EVENT_MOUSE_WHEEL_MOVED = 207;
 }
diff --git a/src/newt/classes/com/jogamp/newt/event/NEWTEvent.java b/src/newt/classes/com/jogamp/newt/event/NEWTEvent.java
index 10673be..50aed2c 100644
--- a/src/newt/classes/com/jogamp/newt/event/NEWTEvent.java
+++ b/src/newt/classes/com/jogamp/newt/event/NEWTEvent.java
@@ -47,9 +47,9 @@ package com.jogamp.newt.event;
  * </ul><br>
  */
 public class NEWTEvent extends java.util.EventObject {
-    private boolean isSystemEvent;
-    private int eventType;
-    private long when;
+    private final boolean isSystemEvent;
+    private final int eventType;
+    private final long when;
     private Object attachment;
 
     static final boolean DEBUG = false;
diff --git a/src/newt/classes/com/jogamp/newt/event/WindowUpdateEvent.java b/src/newt/classes/com/jogamp/newt/event/WindowUpdateEvent.java
index 7cd6ee3..505939d 100644
--- a/src/newt/classes/com/jogamp/newt/event/WindowUpdateEvent.java
+++ b/src/newt/classes/com/jogamp/newt/event/WindowUpdateEvent.java
@@ -31,7 +31,7 @@ package com.jogamp.newt.event;
 import javax.media.nativewindow.util.Rectangle;
 
 public class WindowUpdateEvent extends WindowEvent {
-    Rectangle bounds;
+    final Rectangle bounds;
 
     public WindowUpdateEvent(int eventType, Object source, long when, Rectangle bounds)
     {
diff --git a/src/newt/classes/com/jogamp/newt/event/awt/AWTAdapter.java b/src/newt/classes/com/jogamp/newt/event/awt/AWTAdapter.java
index e240026..8991203 100644
--- a/src/newt/classes/com/jogamp/newt/event/awt/AWTAdapter.java
+++ b/src/newt/classes/com/jogamp/newt/event/awt/AWTAdapter.java
@@ -162,6 +162,14 @@ public abstract class AWTAdapter implements java.util.EventListener
         }
     }
 
+    public final com.jogamp.newt.Window getNewtWindow() { 
+        return newtWindow; 
+    }
+    
+    public final com.jogamp.newt.event.NEWTEventListener getNewtEventListener() {
+        return newtListener; 
+    }
+    
     /** 
      * Due to the fact that some NEWT {@link com.jogamp.newt.event.NEWTEventListener}
      * are mapped to more than one {@link java.util.EventListener},
diff --git a/src/newt/classes/com/jogamp/newt/event/awt/AWTKeyAdapter.java b/src/newt/classes/com/jogamp/newt/event/awt/AWTKeyAdapter.java
index 8fe6ff6..7b0f6ba 100644
--- a/src/newt/classes/com/jogamp/newt/event/awt/AWTKeyAdapter.java
+++ b/src/newt/classes/com/jogamp/newt/event/awt/AWTKeyAdapter.java
@@ -28,6 +28,8 @@
  
 package com.jogamp.newt.event.awt;
 
+import jogamp.newt.awt.event.AWTNewtEventFactory;
+
 public class AWTKeyAdapter extends AWTAdapter implements java.awt.event.KeyListener
 {
     public AWTKeyAdapter(com.jogamp.newt.event.KeyListener newtListener) {
diff --git a/src/newt/classes/com/jogamp/newt/event/awt/AWTMouseAdapter.java b/src/newt/classes/com/jogamp/newt/event/awt/AWTMouseAdapter.java
index bd42107..5dcd4d9 100644
--- a/src/newt/classes/com/jogamp/newt/event/awt/AWTMouseAdapter.java
+++ b/src/newt/classes/com/jogamp/newt/event/awt/AWTMouseAdapter.java
@@ -28,6 +28,8 @@
  
 package com.jogamp.newt.event.awt;
 
+import jogamp.newt.awt.event.AWTNewtEventFactory;
+
 public class AWTMouseAdapter extends AWTAdapter implements java.awt.event.MouseListener, java.awt.event.MouseMotionListener
 {
     public AWTMouseAdapter(com.jogamp.newt.event.MouseListener newtListener) {
diff --git a/src/newt/classes/com/jogamp/newt/event/awt/AWTNewtEventFactory.java b/src/newt/classes/com/jogamp/newt/event/awt/AWTNewtEventFactory.java
deleted file mode 100644
index 20c0d15..0000000
--- a/src/newt/classes/com/jogamp/newt/event/awt/AWTNewtEventFactory.java
+++ /dev/null
@@ -1,146 +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.newt.event.awt;
-
-import com.jogamp.common.util.IntIntHashMap;
-
-class AWTNewtEventFactory {
-
-    protected static final IntIntHashMap eventTypeAWT2NEWT;
-
-    static {
-        IntIntHashMap map = new IntIntHashMap();
-        map.setKeyNotFoundValue(-1);
-        // n/a map.put(java.awt.event.WindowEvent.WINDOW_OPENED, com.jogamp.newt.event.WindowEvent.EVENT_WINDOW_OPENED);
-        map.put(java.awt.event.WindowEvent.WINDOW_CLOSING, com.jogamp.newt.event.WindowEvent.EVENT_WINDOW_DESTROY_NOTIFY);
-        map.put(java.awt.event.WindowEvent.WINDOW_CLOSED, com.jogamp.newt.event.WindowEvent.EVENT_WINDOW_DESTROYED);
-        // n/a map.put(java.awt.event.WindowEvent.WINDOW_ICONIFIED, com.jogamp.newt.event.WindowEvent.EVENT_WINDOW_ICONIFIED);
-        // n/a map.put(java.awt.event.WindowEvent.WINDOW_DEICONIFIED, com.jogamp.newt.event.WindowEvent.EVENT_WINDOW_DEICONIFIED);
-        map.put(java.awt.event.WindowEvent.WINDOW_ACTIVATED, com.jogamp.newt.event.WindowEvent.EVENT_WINDOW_GAINED_FOCUS);
-        map.put(java.awt.event.WindowEvent.WINDOW_GAINED_FOCUS, com.jogamp.newt.event.WindowEvent.EVENT_WINDOW_GAINED_FOCUS);
-        map.put(java.awt.event.FocusEvent.FOCUS_GAINED, com.jogamp.newt.event.WindowEvent.EVENT_WINDOW_GAINED_FOCUS);
-        map.put(java.awt.event.WindowEvent.WINDOW_DEACTIVATED, com.jogamp.newt.event.WindowEvent.EVENT_WINDOW_LOST_FOCUS);
-        map.put(java.awt.event.WindowEvent.WINDOW_LOST_FOCUS, com.jogamp.newt.event.WindowEvent.EVENT_WINDOW_LOST_FOCUS);
-        map.put(java.awt.event.FocusEvent.FOCUS_LOST, com.jogamp.newt.event.WindowEvent.EVENT_WINDOW_LOST_FOCUS);
-        // n/a map.put(java.awt.event.WindowEvent.WINDOW_STATE_CHANGED, com.jogamp.newt.event.WindowEvent.EVENT_WINDOW_STATE_CHANGED);
-
-        map.put(java.awt.event.ComponentEvent.COMPONENT_MOVED, com.jogamp.newt.event.WindowEvent.EVENT_WINDOW_MOVED);
-        map.put(java.awt.event.ComponentEvent.COMPONENT_RESIZED, com.jogamp.newt.event.WindowEvent.EVENT_WINDOW_RESIZED);
-        // n/a map.put(java.awt.event.ComponentEvent.COMPONENT_SHOWN, com.jogamp.newt.event.WindowEvent.EVENT_WINDOW_SHOWN);
-        // n/a map.put(java.awt.event.ComponentEvent.COMPONENT_HIDDEN, com.jogamp.newt.event.WindowEvent.EVENT_WINDOW_HIDDEN);
-
-        map.put(java.awt.event.MouseEvent.MOUSE_CLICKED, com.jogamp.newt.event.MouseEvent.EVENT_MOUSE_CLICKED);
-        map.put(java.awt.event.MouseEvent.MOUSE_PRESSED, com.jogamp.newt.event.MouseEvent.EVENT_MOUSE_PRESSED);
-        map.put(java.awt.event.MouseEvent.MOUSE_RELEASED, com.jogamp.newt.event.MouseEvent.EVENT_MOUSE_RELEASED);
-        map.put(java.awt.event.MouseEvent.MOUSE_MOVED, com.jogamp.newt.event.MouseEvent.EVENT_MOUSE_MOVED);
-        map.put(java.awt.event.MouseEvent.MOUSE_ENTERED, com.jogamp.newt.event.MouseEvent.EVENT_MOUSE_ENTERED);
-        map.put(java.awt.event.MouseEvent.MOUSE_EXITED, com.jogamp.newt.event.MouseEvent.EVENT_MOUSE_EXITED);
-        map.put(java.awt.event.MouseEvent.MOUSE_DRAGGED, com.jogamp.newt.event.MouseEvent.EVENT_MOUSE_DRAGGED);
-        map.put(java.awt.event.MouseEvent.MOUSE_WHEEL, com.jogamp.newt.event.MouseEvent.EVENT_MOUSE_WHEEL_MOVED);
-
-        map.put(java.awt.event.KeyEvent.KEY_PRESSED, com.jogamp.newt.event.KeyEvent.EVENT_KEY_PRESSED);
-        map.put(java.awt.event.KeyEvent.KEY_RELEASED, com.jogamp.newt.event.KeyEvent.EVENT_KEY_RELEASED);
-        map.put(java.awt.event.KeyEvent.KEY_TYPED, com.jogamp.newt.event.KeyEvent.EVENT_KEY_TYPED);
-
-        eventTypeAWT2NEWT = map;
-    }
-
-    public static final int awtModifiers2Newt(int awtMods, boolean mouseHint) {
-        int newtMods = 0;
-        if ((awtMods & java.awt.event.InputEvent.SHIFT_MASK) != 0)     newtMods |= com.jogamp.newt.event.InputEvent.SHIFT_MASK;
-        if ((awtMods & java.awt.event.InputEvent.CTRL_MASK) != 0)      newtMods |= com.jogamp.newt.event.InputEvent.CTRL_MASK;
-        if ((awtMods & java.awt.event.InputEvent.META_MASK) != 0)      newtMods |= com.jogamp.newt.event.InputEvent.META_MASK;
-        if ((awtMods & java.awt.event.InputEvent.ALT_MASK) != 0)       newtMods |= com.jogamp.newt.event.InputEvent.ALT_MASK;
-        if ((awtMods & java.awt.event.InputEvent.ALT_GRAPH_MASK) != 0) newtMods |= com.jogamp.newt.event.InputEvent.ALT_GRAPH_MASK;
-        return newtMods;
-    }
-
-    public static final int awtButton2Newt(int awtButton) {
-        switch (awtButton) {
-            case java.awt.event.MouseEvent.BUTTON1: return com.jogamp.newt.event.MouseEvent.BUTTON1;
-            case java.awt.event.MouseEvent.BUTTON2: return com.jogamp.newt.event.MouseEvent.BUTTON2;
-            case java.awt.event.MouseEvent.BUTTON3: return com.jogamp.newt.event.MouseEvent.BUTTON3;
-        }
-        return 0;
-    }
-
-    static final com.jogamp.newt.event.WindowEvent createWindowEvent(java.awt.event.WindowEvent event, com.jogamp.newt.Window newtSource) {
-        int type = eventTypeAWT2NEWT.get(event.getID());
-        if(-1 < type) {
-            return new com.jogamp.newt.event.WindowEvent(type, ((null==newtSource)?(Object)event.getComponent():(Object)newtSource), System.currentTimeMillis());
-        }
-        return null; // no mapping ..
-    }
-
-    static final com.jogamp.newt.event.WindowEvent createWindowEvent(java.awt.event.ComponentEvent event, com.jogamp.newt.Window newtSource) {
-        int type = eventTypeAWT2NEWT.get(event.getID());
-        if(-1 < type) {
-            return new com.jogamp.newt.event.WindowEvent(type, (null==newtSource)?(Object)event.getComponent():(Object)newtSource, System.currentTimeMillis());
-        }
-        return null; // no mapping ..
-    }
-
-    static final com.jogamp.newt.event.WindowEvent createWindowEvent(java.awt.event.FocusEvent event, com.jogamp.newt.Window newtSource) {
-        int type = eventTypeAWT2NEWT.get(event.getID());
-        if(-1 < type) {
-            return new com.jogamp.newt.event.WindowEvent(type, (null==newtSource)?(Object)event.getComponent():(Object)newtSource, System.currentTimeMillis());
-        }
-        return null; // no mapping ..
-    }
-
-    static final com.jogamp.newt.event.MouseEvent createMouseEvent(java.awt.event.MouseEvent event, com.jogamp.newt.Window newtSource) {
-        int type = eventTypeAWT2NEWT.get(event.getID());
-        if(-1 < type) {
-            int rotation = 0;
-            if (event instanceof java.awt.event.MouseWheelEvent) {
-                rotation = ((java.awt.event.MouseWheelEvent)event).getWheelRotation();
-            }
-
-            return new com.jogamp.newt.event.MouseEvent(
-                           type, (null==newtSource)?(Object)event.getComponent():(Object)newtSource, event.getWhen(),
-                           awtModifiers2Newt(event.getModifiers(), true), 
-                           event.getX(), event.getY(), event.getClickCount(), 
-                           awtButton2Newt(event.getButton()), rotation);
-        }
-        return null; // no mapping ..
-    }
-
-    static final com.jogamp.newt.event.KeyEvent createKeyEvent(java.awt.event.KeyEvent event, com.jogamp.newt.Window newtSource) {
-        int type = eventTypeAWT2NEWT.get(event.getID());
-        if(-1 < type) {
-            return new com.jogamp.newt.event.KeyEvent(
-                           type, (null==newtSource)?(Object)event.getComponent():(Object)newtSource, event.getWhen(), 
-                           awtModifiers2Newt(event.getModifiers(), false), 
-                           event.getKeyCode(), event.getKeyChar());
-        }
-        return null; // no mapping ..
-    }
-
-}
-
diff --git a/src/newt/classes/com/jogamp/newt/event/awt/AWTParentWindowAdapter.java b/src/newt/classes/com/jogamp/newt/event/awt/AWTParentWindowAdapter.java
deleted file mode 100644
index 68f2b3e..0000000
--- a/src/newt/classes/com/jogamp/newt/event/awt/AWTParentWindowAdapter.java
+++ /dev/null
@@ -1,130 +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.newt.event.awt;
-
-/**
- * Specialized parent/client adapter,
- * where the NEWT child window really gets resized,
- * and the parent move window event gets discarded. */
-public class AWTParentWindowAdapter 
-    extends AWTWindowAdapter 
-    implements java.awt.event.HierarchyListener
-{
-    public AWTParentWindowAdapter(com.jogamp.newt.Window downstream) {
-        super(downstream);
-    }
-
-    public AWTAdapter addTo(java.awt.Component awtComponent) {
-        awtComponent.addHierarchyListener(this);
-        return super.addTo(awtComponent);
-    }
-
-    public AWTAdapter removeFrom(java.awt.Component awtComponent) {
-        awtComponent.removeHierarchyListener(this);
-        return super.removeFrom(awtComponent);
-    }
-
-    public void focusGained(java.awt.event.FocusEvent e) {
-        if(DEBUG_IMPLEMENTATION) {
-            System.err.println("AWT: focusGained: "+ e);
-        }
-    }
-
-    public void focusLost(java.awt.event.FocusEvent e) {
-        if(DEBUG_IMPLEMENTATION) {
-            System.err.println("AWT: focusLost: "+ e);
-        }
-    }
-
-    public void componentResized(java.awt.event.ComponentEvent e) {
-        // Need to resize the NEWT child window
-        // the resized event will be send via the native window feedback.
-        final java.awt.Component comp = e.getComponent();
-        if(DEBUG_IMPLEMENTATION) {
-            System.err.println("AWT: componentResized: "+comp);
-        }
-        if(newtWindow.isValid()) {
-            newtWindow.runOnEDTIfAvail(false, new Runnable() {
-                public void run() {
-                    int cw = comp.getWidth();
-                    int ch = comp.getHeight();
-                    if( 0 < cw * ch ) {
-                        if( newtWindow.getWidth() != cw || newtWindow.getHeight() != ch ) {
-                            newtWindow.setSize(cw, ch);
-                            if(comp.isVisible() != newtWindow.isVisible()) {
-                                newtWindow.setVisible(comp.isVisible());
-                            }
-                        }
-                    } else if(newtWindow.isVisible()) {
-                        newtWindow.setVisible(false);
-                    }
-                }});
-        }
-    }
-
-    public void componentMoved(java.awt.event.ComponentEvent e) {
-        // no propagation to NEWT child window
-    }
-
-    public void windowActivated(java.awt.event.WindowEvent e) {
-        // no propagation to NEWT child window
-    }
-
-    public void windowDeactivated(java.awt.event.WindowEvent e) {
-        // no propagation to NEWT child window
-    }
-
-    public void hierarchyChanged(java.awt.event.HierarchyEvent e) {
-        if( null == newtListener ) {
-            long bits = e.getChangeFlags();
-            final java.awt.Component changed = e.getChanged();
-            if( 0 != ( java.awt.event.HierarchyEvent.SHOWING_CHANGED & bits ) ) {
-                final boolean showing = changed.isShowing();
-                if(DEBUG_IMPLEMENTATION) {
-                    System.err.println("AWT: hierarchyChanged SHOWING_CHANGED: showing "+showing+", "+changed);
-                }
-                if(newtWindow.isValid()) {
-                    newtWindow.runOnEDTIfAvail(false, new Runnable() {
-                        public void run() {
-                            if(newtWindow.isVisible() != showing) {
-                                newtWindow.setVisible(showing);
-                            }
-                        }});
-                }
-            } 
-            if(DEBUG_IMPLEMENTATION) {
-                if( 0 != ( java.awt.event.HierarchyEvent.DISPLAYABILITY_CHANGED & bits ) ) {
-                    final boolean displayability = changed.isDisplayable();
-                    System.err.println("AWT: hierarchyChanged DISPLAYABILITY_CHANGED: displayability "+displayability+", "+changed);
-                }
-            }
-        }
-    }
-}
-
diff --git a/src/newt/classes/com/jogamp/newt/event/awt/AWTWindowAdapter.java b/src/newt/classes/com/jogamp/newt/event/awt/AWTWindowAdapter.java
index 85fe540..ae7474c 100644
--- a/src/newt/classes/com/jogamp/newt/event/awt/AWTWindowAdapter.java
+++ b/src/newt/classes/com/jogamp/newt/event/awt/AWTWindowAdapter.java
@@ -28,6 +28,8 @@
  
 package com.jogamp.newt.event.awt;
 
+import jogamp.newt.awt.event.AWTNewtEventFactory;
+
 public class AWTWindowAdapter 
     extends AWTAdapter 
     implements java.awt.event.ComponentListener, java.awt.event.WindowListener, java.awt.event.FocusListener
diff --git a/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java b/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java
index efbd959..7712b46 100644
--- a/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java
+++ b/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java
@@ -34,20 +34,21 @@
 
 package com.jogamp.newt.opengl;
 
+import java.io.PrintStream;
 import java.util.List;
 
 import com.jogamp.common.GlueGenVersion;
 import com.jogamp.common.util.VersionUtil;
-import com.jogamp.nativewindow.NativeWindowVersion;
 import com.jogamp.newt.*;
 import com.jogamp.newt.event.*;
 import jogamp.newt.WindowImpl;
 
 import javax.media.nativewindow.*;
+import javax.media.nativewindow.util.InsetsImmutable;
 import javax.media.nativewindow.util.Point;
-import javax.media.nativewindow.util.Insets;
 import javax.media.opengl.*;
 
+import jogamp.opengl.FPSCounterImpl;
 import jogamp.opengl.GLDrawableHelper;
 import com.jogamp.opengl.JoglVersion;
 
@@ -64,14 +65,14 @@ import com.jogamp.opengl.JoglVersion;
  * via {@link #invoke(boolean, javax.media.opengl.GLRunnable)} to the OpenGL command stream.<br>
  * <p>
  */
-public class GLWindow implements GLAutoDrawable, Window, NEWTEventConsumer {
-    private WindowImpl window;
+public class GLWindow implements GLAutoDrawable, Window, NEWTEventConsumer, FPSCounter {
+    private final WindowImpl window;
 
     /**
      * Constructor. Do not call this directly -- use {@link #create()} instead.
      */
     protected GLWindow(Window window) {
-        resetCounter();
+        resetFPSCounter();
         this.window = (WindowImpl) window;
         ((WindowImpl)this.window).setHandleDestroyNotify(false);
         window.addWindowListener(new WindowAdapter() {
@@ -123,6 +124,8 @@ public class GLWindow implements GLAutoDrawable, Window, NEWTEventConsumer {
      * with the given GLCapabilities.
      * <P>
      * The resulting GLWindow owns the Window, Screen and Device, ie it will be destructed.
+     * <P>
+     * The default display connection will be used and reused if already in process.  
      */
     public static GLWindow create(GLCapabilitiesImmutable caps) {
         return new GLWindow(NewtFactory.createWindow(caps));
@@ -219,6 +222,14 @@ public class GLWindow implements GLAutoDrawable, Window, NEWTEventConsumer {
         return window.isUndecorated();
     }
 
+    public final void setAlwaysOnTop(boolean value) {
+        window.setAlwaysOnTop(value);
+    }
+    
+    public final boolean isAlwaysOnTop() {
+        return window.isAlwaysOnTop();
+    }
+    
     public final void setFocusAction(FocusRunnable focusAction) {
         window.setFocusAction(focusAction);
     }
@@ -231,13 +242,16 @@ public class GLWindow implements GLAutoDrawable, Window, NEWTEventConsumer {
         return window.hasFocus();
     }
 
-    public final Insets getInsets() {
+    public final InsetsImmutable getInsets() {    
         return window.getInsets();
     }
-
+    
     public final void setPosition(int x, int y) {
         window.setPosition(x, y);
     }
+    public void setTopLevelPosition(int x, int y) {        
+        window.setTopLevelPosition(x, y);
+    }
 
     public final boolean setFullscreen(boolean fullscreen) {
         return window.setFullscreen(fullscreen);
@@ -265,12 +279,12 @@ public class GLWindow implements GLAutoDrawable, Window, NEWTEventConsumer {
         return window.reparentWindow(newParent, forceDestroyCreate);
     }
 
-    public final void removeChild(NativeWindow win) {
-        window.removeChild(win);
+    public final boolean removeChild(NativeWindow win) {
+        return window.removeChild(win);
     }
 
-    public final void addChild(NativeWindow win) {
-        window.addChild(win);
+    public final boolean addChild(NativeWindow win) {
+        return window.addChild(win);
     }
     
     //----------------------------------------------------------------------
@@ -288,11 +302,10 @@ public class GLWindow implements GLAutoDrawable, Window, NEWTEventConsumer {
     public final void setSize(int width, int height) {
         window.setSize(width, height);
     }
-
-    public final boolean isValid() {
-        return window.isValid();
+    public void setTopLevelSize(int width, int height) {
+        window.setTopLevelSize(width, height);        
     }
-
+    
     public final boolean isNativeValid() {
         return window.isNativeValid();
     }
@@ -317,7 +330,7 @@ public class GLWindow implements GLAutoDrawable, Window, NEWTEventConsumer {
         }
 
         public synchronized void destroyActionInLock() {
-            if(Window.DEBUG_WINDOW_EVENT || Window.DEBUG_IMPLEMENTATION) {
+            if(Window.DEBUG_IMPLEMENTATION) {
                 String msg = "GLWindow.destroy() "+Thread.currentThread()+", start";
                 System.err.println(msg);
                 //Exception e1 = new Exception(msg);
@@ -339,37 +352,21 @@ public class GLWindow implements GLAutoDrawable, Window, NEWTEventConsumer {
             }
             context = null;
             drawable = null;
-
-            if(Window.DEBUG_WINDOW_EVENT || Window.DEBUG_IMPLEMENTATION) {
+            
+            if(Window.DEBUG_IMPLEMENTATION) {
                 System.err.println("GLWindow.destroy() "+Thread.currentThread()+", fin");
             }
         }
 
-        public synchronized void invalidate(boolean unrecoverable) {
-            if(Window.DEBUG_WINDOW_EVENT || Window.DEBUG_IMPLEMENTATION) {
-                String msg = "GLWindow.invalidate("+unrecoverable+") "+Thread.currentThread()+", start";
-                System.err.println(msg);
-                //Exception e1 = new Exception(msg);
-                //e1.printStackTrace();
-            }
-            if(unrecoverable) {
-                GLAnimatorControl ctrl = GLWindow.this.getAnimator();
-                if ( null!=ctrl ) {
-                    ctrl.remove(GLWindow.this);
-                }
-                helper=null;
-            }
-        }
-
         public synchronized void resetCounter() {
-            if(Window.DEBUG_WINDOW_EVENT || Window.DEBUG_IMPLEMENTATION) {
+            if(Window.DEBUG_IMPLEMENTATION) {
                 System.err.println("GLWindow.resetCounter() "+Thread.currentThread());
             }
-            GLWindow.this.resetCounter();
+            GLWindow.this.resetFPSCounter();
         }
 
         public synchronized void setVisibleActionPost(boolean visible, boolean nativeWindowCreated) {
-            if(Window.DEBUG_WINDOW_EVENT || Window.DEBUG_IMPLEMENTATION) {
+            if(Window.DEBUG_IMPLEMENTATION) {
                 String msg = "GLWindow.setVisibleActionPost("+visible+", "+nativeWindowCreated+") "+Thread.currentThread()+", start";
                 System.err.println(msg);
                 // Exception e1 = new Exception(msg);
@@ -395,8 +392,9 @@ public class GLWindow implements GLAutoDrawable, Window, NEWTEventConsumer {
                 }
                 drawable.setRealized(true);
                 context = drawable.createContext(sharedContext);
+                context.setContextCreationFlags(additionalCtxCreationFlags);                
             }
-            if(Window.DEBUG_WINDOW_EVENT || Window.DEBUG_IMPLEMENTATION) {
+            if(Window.DEBUG_IMPLEMENTATION) {
                 String msg = "GLWindow.setVisibleActionPost("+visible+", "+nativeWindowCreated+") "+Thread.currentThread()+", fin";
                 System.err.println(msg);
                 //Exception e1 = new Exception(msg);
@@ -404,19 +402,20 @@ public class GLWindow implements GLAutoDrawable, Window, NEWTEventConsumer {
             }
         }
         
+        private GLAnimatorControl savedAnimator = null;
+        
         public synchronized boolean pauseRenderingAction() {
             boolean animatorPaused = false;
-            GLAnimatorControl ctrl = GLWindow.this.getAnimator();
-            if ( null!=ctrl ) {
-                animatorPaused = ctrl.pause();
+            savedAnimator = GLWindow.this.getAnimator();
+            if ( null != savedAnimator ) {
+                animatorPaused = savedAnimator.pause();
             }
             return animatorPaused;
         }
 
         public synchronized void resumeRenderingAction() {
-            GLAnimatorControl ctrl = GLWindow.this.getAnimator();
-            if ( null!=ctrl && ctrl.isPaused() ) {
-                ctrl.resume();
+            if ( null != savedAnimator && savedAnimator.isPaused() ) {
+                savedAnimator.resume();
             }
         }
     }
@@ -426,6 +425,7 @@ public class GLWindow implements GLAutoDrawable, Window, NEWTEventConsumer {
     //
 
     private GLContext sharedContext = null;
+    private int additionalCtxCreationFlags = 0;
     private GLDrawableFactory factory;
     private GLDrawable drawable;
     private GLContext context;
@@ -433,9 +433,7 @@ public class GLWindow implements GLAutoDrawable, Window, NEWTEventConsumer {
     // To make reshape events be sent immediately before a display event
     private boolean sendReshape=false;
     private boolean sendDestroy=false;
-    private boolean perfLog = false;
-    private long startTime, curTime, lastCheck;
-    private int  totalFrames, lastFrames;
+    private FPSCounterImpl fpsCounter = new FPSCounterImpl();    
 
     public GLDrawableFactory getFactory() {
         return factory;
@@ -455,6 +453,9 @@ public class GLWindow implements GLAutoDrawable, Window, NEWTEventConsumer {
 
     public void setContext(GLContext newCtx) {
         context = newCtx;
+        if(null != context) {
+            context.setContextCreationFlags(additionalCtxCreationFlags);
+        }        
     }
 
     public GLContext getContext() {
@@ -507,12 +508,6 @@ public class GLWindow implements GLAutoDrawable, Window, NEWTEventConsumer {
         return null;
     }
 
-    public boolean getPerfLogEnabled() { return perfLog; }
-
-    public void enablePerfLog(boolean v) {
-        perfLog = v;
-    }
-
     public void invoke(boolean wait, GLRunnable glRunnable) {
         if(null!=helper) {
             helper.invoke(this, wait, glRunnable);
@@ -520,28 +515,20 @@ public class GLWindow implements GLAutoDrawable, Window, NEWTEventConsumer {
     }
 
     public void display() {
-        display(false);
-    }
-
-    public void display(boolean forceReshape) {
-        if( null == window ) { return; }
-
-        if(sendDestroy || ( null!=window && window.hasDeviceChanged() && GLAutoDrawable.SCREEN_CHANGE_ACTION_ENABLED ) ) {
+        if( !isNativeValid() || !isVisible() ) { return; }
+        
+        if(sendDestroy || ( window.hasDeviceChanged() && GLAutoDrawable.SCREEN_CHANGE_ACTION_ENABLED ) ) {
             sendDestroy=false;
             destroy();
             return;
         }
-
-        if( null == context && isVisible() && 0<getWidth()*getHeight() ) {
-            // retry native window and drawable/context creation 
+        
+        if( null == context && 0<getWidth()*getHeight() ) { // TODO: Check memory sync
+            // retry drawable and context creation 
             setVisible(true);
         }
 
-        if(forceReshape) {
-            sendReshape = true;
-        }
-        
-        if( isVisible() && null != context ) {
+        if( null != context ) { // TODO: Check memory sync
             if( NativeSurface.LOCK_SURFACE_NOT_READY < lockSurface() ) {
                 try {
                     helper.invokeGL(drawable, context, displayAction, initAction);
@@ -551,7 +538,7 @@ public class GLWindow implements GLAutoDrawable, Window, NEWTEventConsumer {
             }
         }
     }
-
+    
     /** This implementation uses a static value */
     public void setAutoSwapBufferMode(boolean onOrOff) {
         if(null!=helper) {
@@ -566,24 +553,26 @@ public class GLWindow implements GLAutoDrawable, Window, NEWTEventConsumer {
         }
         return false;
     }
-
+    
     public void swapBuffers() {
         if(drawable!=null && context != null) {
-            // Lock: Locked Surface/Window by MakeCurrent/Release
-            if (context != GLContext.getCurrent()) {
-                // Assume we should try to make the context current before swapping the buffers
-                helper.invokeGL(drawable, context, swapBuffersAction, initAction);
-            } else {
-                drawable.swapBuffers();
-            }
+            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);
-            resetCounter();
+            resetFPSCounter();
         }
     }
     private InitAction initAction = new InitAction();
@@ -598,73 +587,50 @@ public class GLWindow implements GLAutoDrawable, Window, NEWTEventConsumer {
 
             helper.display(GLWindow.this);
 
-            curTime = System.currentTimeMillis();
-            totalFrames++;
-
-            if(perfLog) {
-                long dt0, dt1;
-                lastFrames++;
-                dt0 = curTime-lastCheck;
-                if ( dt0 > 5000 ) {
-                    dt1 = curTime-startTime;
-                    System.err.println(dt0/1000 +"s: "+ lastFrames + "f, " + (lastFrames*1000)/dt0 + " fps, "+dt0/lastFrames+" ms/f; "+
-                                       "total: "+ dt1/1000+"s, "+(totalFrames*1000)/dt1 + " fps, "+dt1/totalFrames+" ms/f");
-                    lastCheck=curTime;
-                    lastFrames=0;
-                }
-            }
+            fpsCounter.tickFPS();
         }
     }
     private DisplayAction displayAction = new DisplayAction();
 
-    /** 
-     * @return Time of the first display call in milliseconds.
-     *         This value is reset if becoming visible again or reparenting.
-     */
-    public final long getStartTime()   { 
-        return startTime; 
+    public final void setUpdateFPSFrames(int frames, PrintStream out) {
+        fpsCounter.setUpdateFPSFrames(frames, out);
     }
-
-    /** 
-     * @return Time of the last display call in milliseconds.
-     *         This value is reset if becoming visible again or reparenting.
-     */
-    public final long getCurrentTime() {
-        return curTime;
+    
+    public final void resetFPSCounter() {
+        fpsCounter.resetFPSCounter();
     }
 
-    /** 
-     * @return Duration <code>getCurrentTime() - getStartTime()</code>.
-     *
-     * @see #getStartTime()
-     * @see #getCurrentTime()
-     */
-    public final long getDuration() { 
-        return getCurrentTime()-getStartTime(); 
+    public final int getUpdateFPSFrames() {
+        return fpsCounter.getUpdateFPSFrames();
+    }
+    
+    public final long getFPSStartTime()   {
+        return fpsCounter.getFPSStartTime();
     }
 
-    /** 
-     * @return Number of frames displayed since the first display call, ie <code>getStartTime()</code>.
-     *         This value is reset if becoming visible again or reparenting.
-     */
-    public final int getTotalFrames() { 
-        return totalFrames; 
+    public final long getLastFPSUpdateTime() {
+        return fpsCounter.getLastFPSUpdateTime();
     }
 
-    /** Reset all counter (startTime, currentTime, frame number) */
-    public final synchronized void resetCounter() {
-        startTime = System.currentTimeMillis(); // overwrite startTime to real init one
-        curTime   = startTime;
-        lastCheck  = startTime;
-        totalFrames = 0; lastFrames = 0;
+    public final long getLastFPSPeriod() {
+        return fpsCounter.getLastFPSPeriod();
+    }
+    
+    public final float getLastFPS() {
+        return fpsCounter.getLastFPS();
+    }
+    
+    public final int getTotalFPSFrames() {
+        return fpsCounter.getTotalFPSFrames();
     }
 
-    private class SwapBuffersAction implements Runnable {
-        public final void run() {
-            drawable.swapBuffers();
-        }
+    public final long getTotalFPSDuration() {
+        return fpsCounter.getTotalFPSDuration();
     }
-    private SwapBuffersAction swapBuffersAction = new SwapBuffersAction();
+    
+    public final float getTotalFPS() {
+        return fpsCounter.getTotalFPS();
+    }        
 
     //----------------------------------------------------------------------
     // GLDrawable methods
@@ -864,10 +830,6 @@ public class GLWindow implements GLAutoDrawable, Window, NEWTEventConsumer {
         return window.surfaceSwap();
     }
 
-    public final void invalidate() {
-        window.invalidate();
-    }
-    
     public final long getWindowHandle() {
         return window.getWindowHandle();
 
@@ -900,17 +862,15 @@ public class GLWindow implements GLAutoDrawable, Window, NEWTEventConsumer {
     public static void main(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(NewtVersion.getInstance());
 
-        GLProfile glp = GLProfile.getDefault();
-        GLDrawableFactory factory = GLDrawableFactory.getFactory(glp);
-        List/*<GLCapabilitiesImmutable>*/ availCaps = factory.getAvailableCapabilities(null);
+        final GLProfile glp = GLProfile.getDefault();
+        final GLDrawableFactory factory = GLDrawableFactory.getFactory(glp);
+        final List<GLCapabilitiesImmutable> availCaps = factory.getAvailableCapabilities(null);
         for(int i=0; i<availCaps.size(); i++) {
             System.err.println(availCaps.get(i));
         }
-        GLCapabilitiesImmutable caps = new GLCapabilities( glp );
+        final GLCapabilitiesImmutable caps = new GLCapabilities( glp );
 
         GLWindow glWindow = GLWindow.create(caps);
         glWindow.setSize(128, 128);
@@ -919,6 +879,8 @@ public class GLWindow implements GLAutoDrawable, Window, NEWTEventConsumer {
             public void init(GLAutoDrawable drawable) {
                 GL gl = drawable.getGL();
                 System.err.println(JoglVersion.getGLInfo(gl, null));
+                System.err.println("Requested: "+drawable.getNativeSurface().getGraphicsConfiguration().getRequestedCapabilities());
+                System.err.println("Chosen   : "+drawable.getChosenGLCapabilities());
             }
 
             public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
@@ -932,7 +894,6 @@ public class GLWindow implements GLAutoDrawable, Window, NEWTEventConsumer {
         });
 
         glWindow.setVisible(true);
-        glWindow.invalidate();
+        glWindow.destroy();
     }
-
 }
diff --git a/src/newt/classes/com/jogamp/newt/util/MainThread.java b/src/newt/classes/com/jogamp/newt/util/MainThread.java
index 8bb725b..8de7742 100644
--- a/src/newt/classes/com/jogamp/newt/util/MainThread.java
+++ b/src/newt/classes/com/jogamp/newt/util/MainThread.java
@@ -41,25 +41,26 @@ import java.lang.reflect.Method;
 import java.lang.reflect.InvocationTargetException;
 import java.security.AccessControlContext;
 import java.security.AccessController;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Timer;
-import java.util.TimerTask;
 
 import javax.media.nativewindow.NativeWindowFactory;
 
+import com.jogamp.common.os.Platform;
 import com.jogamp.common.util.ReflectionUtil;
-import com.jogamp.common.util.RunnableTask;
-import com.jogamp.newt.Display;
+
 import jogamp.newt.Debug;
 import jogamp.newt.NEWTJNILibLoader;
-import jogamp.newt.awt.AWTEDTUtil;
 
 /**
  * NEWT Utility class MainThread<P>
  *
+ * <p>
+ * FIXME: Update this documentation! 
+ * This class just provides a main-thread utility, forking of a main java class
+ * on another thread while being able to continue doing platform specific things
+ * on the main-thread. The latter is essential for eg. MacOSX, where we continue
+ * to run NSApp.run().
+ * </p>
+ * 
  * This class provides a startup singleton <i>main thread</i>,
  * from which a new thread with the users main class is launched.<br>
  *
@@ -90,29 +91,27 @@ import jogamp.newt.awt.AWTEDTUtil;
  </PRE>
  * Which starts 4 threads, each with a window and OpenGL rendering.<br>
  */
-public class MainThread implements EDTUtil {
-    private static final AccessControlContext localACC = AccessController.getContext();
-    public static final boolean  MAIN_THREAD_CRITERIA = ( !NativeWindowFactory.isAWTAvailable() &&
-                                                           NativeWindowFactory.TYPE_MACOSX.equals(NativeWindowFactory.getNativeWindowType(false)) 
-                                                        ) || Debug.getBooleanProperty("newt.MainThread.force", true, localACC);
-
+public class MainThread {
+    private static final String MACOSXDisplayClassName = "jogamp.newt.driver.macosx.MacDisplay";
+    
+    /** if true, use the main thread EDT, otherwise AWT's EDT */
+    public static final boolean  HINT_USE_MAIN_THREAD;
+    
+    static {
+        final AccessControlContext localACC = AccessController.getContext();
+        Platform.initSingleton();
+        NativeWindowFactory.initSingleton(true);
+        NEWTJNILibLoader.loadNEWT();
+        HINT_USE_MAIN_THREAD = !NativeWindowFactory.isAWTAvailable() || 
+                                Debug.getBooleanProperty("newt.MainThread.force", true, localACC);        
+    }
+    
+    public static boolean useMainThread = false;
+    
     protected static final boolean DEBUG = Debug.debug("MainThread");
 
     private static final MainThread singletonMainThread = new MainThread(); // one singleton MainThread
 
-    private static boolean isExit=false;
-    private static volatile boolean isRunning=false;
-    private static final Object taskWorkerLock=new Object();
-    private static boolean shouldStop;
-    private static ArrayList tasks;
-    private static Thread mainThread;
-
-    private static Timer pumpMessagesTimer=null;
-    private static TimerTask pumpMessagesTimerTask=null;
-    private static final Map/*<Display, Runnable>*/ pumpMessageDisplayMap = new HashMap();
-
-    private static boolean useMainThread = false;
-
     static class MainAction extends Thread {
         private String mainClassName;
         private String[] mainClassArgs;
@@ -126,14 +125,10 @@ public class MainThread implements EDTUtil {
 
         @Override
         public void run() {
-            if ( useMainThread ) {
-                // we have to start first to provide the service ..
-                singletonMainThread.waitUntilRunning();
-            }
-
+            if(DEBUG) System.err.println("MainAction.run(): "+Thread.currentThread().getName()+" start");
             // start user app ..
             try {
-                Class mainClass = ReflectionUtil.getClass(mainClassName, true, getClass().getClassLoader());
+                Class<?> mainClass = ReflectionUtil.getClass(mainClassName, true, getClass().getClassLoader());
                 if(null==mainClass) {
                     throw new RuntimeException(new ClassNotFoundException("MainThread couldn't find main class "+mainClassName));
                 }
@@ -154,10 +149,6 @@ public class MainThread implements EDTUtil {
             if(DEBUG) System.err.println("MainAction.run(): "+Thread.currentThread().getName()+" user app fin");
 
             if ( useMainThread ) {
-                singletonMainThread.invokeStop(new Runnable() {
-                    public void run() {
-                        // nop
-                    }});
                 if(DEBUG) System.err.println("MainAction.run(): "+Thread.currentThread().getName()+" MainThread fin - stop");
                 System.exit(0);
             }
@@ -167,10 +158,22 @@ public class MainThread implements EDTUtil {
 
     /** Your new java application main entry, which pipelines your application */
     public static void main(String[] args) {
-        useMainThread = MAIN_THREAD_CRITERIA;
+        useMainThread = HINT_USE_MAIN_THREAD;
 
-        if(DEBUG) System.err.println("MainThread.main(): "+Thread.currentThread().getName()+" useMainThread "+ useMainThread );
+        final Platform.OSType osType = Platform.getOSType();
+        final boolean isMacOSX = osType == Platform.OSType.MACOS;
+        
+        if(DEBUG) {
+            System.err.println("MainThread.main(): "+Thread.currentThread().getName()+
+                ", useMainThread "+ useMainThread +
+                ", HINT_USE_MAIN_THREAD "+ HINT_USE_MAIN_THREAD +
+                ", isAWTAvailable " + NativeWindowFactory.isAWTAvailable() + ", ostype "+osType+", isMacOSX "+isMacOSX);
+        }
 
+        if(!useMainThread && !NativeWindowFactory.isAWTAvailable()) {
+            throw new RuntimeException("!USE_MAIN_THREAD and no AWT available");
+        }
+        
         if(args.length==0) {
             return;
         }
@@ -181,25 +184,29 @@ public class MainThread implements EDTUtil {
             System.arraycopy(args, 1, mainClassArgs, 0, args.length-1);
         }
 
-        NEWTJNILibLoader.loadNEWT();
-        
         mainAction = new MainAction(mainClassName, mainClassArgs);
 
-        if(NativeWindowFactory.TYPE_MACOSX.equals(NativeWindowFactory.getNativeWindowType(false))) {
-            ReflectionUtil.callStaticMethod("jogamp.newt.macosx.MacDisplay", "initSingleton", 
+        if(isMacOSX) {
+            ReflectionUtil.callStaticMethod(MACOSXDisplayClassName, "initSingleton", 
                 null, null, MainThread.class.getClassLoader());
         }
 
         if ( useMainThread ) {
-            shouldStop = false;
-            tasks = new ArrayList();
-            mainThread = Thread.currentThread();
-
             // dispatch user's main thread ..
             mainAction.start();
-
-            // do our main thread task scheduling
-            singletonMainThread.run();
+            
+            if(isMacOSX) {
+                try {
+                    if(DEBUG) {
+                        System.err.println("MainThread.main(): "+Thread.currentThread().getName()+"- runNSApp"); 
+                    }
+                    ReflectionUtil.callStaticMethod(MACOSXDisplayClassName, "runNSApplication", 
+                        null, null, MainThread.class.getClassLoader());
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+            }   
+            if(DEBUG) { System.err.println("MainThread - wait until last non daemon thread ends ..."); }            
         } else {
             // run user's main in this thread 
             mainAction.run();
@@ -210,197 +217,6 @@ public class MainThread implements EDTUtil {
         return singletonMainThread;
     }
 
-    public static Runnable removePumpMessage(Display dpy) {
-        synchronized(pumpMessageDisplayMap) {
-            return (Runnable) pumpMessageDisplayMap.remove(dpy);
-        }
-    }
-
-    public static void addPumpMessage(Display dpy, Runnable pumpMessage) {
-        if ( useMainThread ) {
-            return; // error ?
-        }
-        synchronized (pumpMessageDisplayMap) {
-            if(null == pumpMessagesTimer) {
-                pumpMessagesTimer = new Timer();
-                pumpMessagesTimerTask = new TimerTask() {
-                    public void run() {
-                        synchronized(pumpMessageDisplayMap) {
-                            for(Iterator i = pumpMessageDisplayMap.values().iterator(); i.hasNext(); ) {
-                                ((Runnable) i.next()).run();
-                            }
-                        }
-                    }
-                };
-                pumpMessagesTimer.scheduleAtFixedRate(pumpMessagesTimerTask, 0, defaultEDTPollGranularity);
-            }
-            pumpMessageDisplayMap.put(dpy, pumpMessage);
-        }
-    }
-
-    final public void reset() {
-        if(NativeWindowFactory.isAWTAvailable()) {
-            AWTEDTUtil.getSingleton().reset();
-        }
-        // nop
-    }
-
-    final public void start() {
-        if(NativeWindowFactory.isAWTAvailable()) {
-            AWTEDTUtil.getSingleton().start();
-        }
-        // nop
-    }
-
-    final public boolean isCurrentThreadEDT() {
-        if(NativeWindowFactory.isAWTAvailable()) {
-            return AWTEDTUtil.getSingleton().isCurrentThreadEDT();
-        }
-        return isRunning() && mainThread == Thread.currentThread() ;
-    }
-
-    final public boolean isRunning() {
-        if( useMainThread ) {
-            synchronized(taskWorkerLock) { 
-                return isRunning;
-            }
-        }
-        return true; // AWT is always running
-    }
-
-    private void invokeLater(Runnable task) {
-        synchronized(taskWorkerLock) {
-            if(isRunning() && mainThread != Thread.currentThread()) {
-                tasks.add(task);
-                taskWorkerLock.notifyAll();
-            } else {
-                // if !running or isEDTThread, do it right away
-                task.run();
-            }
-        }
-    }
-
-    final public void invokeStop(Runnable r) {
-        invokeImpl(true, r, true);
-    }
-
-    final public void invoke(boolean wait, Runnable r) {
-        invokeImpl(wait, r, false);
-    }
-
-    private void invokeImpl(boolean wait, Runnable r, boolean stop) {
-        if(r == null) {
-            return;
-        }
-
-        if(NativeWindowFactory.isAWTAvailable()) {
-            AWTEDTUtil.getSingleton().invokeImpl(wait, r, stop);
-            return;
-        }
-
-        // if this main thread is not being used or
-        // if this is already the main thread .. just execute.
-        // FIXME: start if not started .. sync logic with DefaultEDTUtil!!!
-        if( !isRunning() || mainThread == Thread.currentThread() ) {
-            r.run();
-            return;
-        }
-
-        boolean doWait = wait && isRunning() && mainThread != Thread.currentThread();
-        Object lock = new Object();
-        RunnableTask rTask = new RunnableTask(r, doWait?lock:null, true);
-        Throwable throwable = null;
-        synchronized(lock) {
-            invokeLater(rTask);
-            // FIXME ..
-            synchronized(taskWorkerLock) { 
-                if(isRunning) {
-                    shouldStop = true;
-                    if(DEBUG) System.err.println("MainThread.stop(): "+Thread.currentThread().getName()+" start");
-                }
-                taskWorkerLock.notifyAll();
-            }
-            if( doWait ) {
-                try {
-                    lock.wait();
-                } catch (InterruptedException ie) {
-                    throwable = ie;
-                }
-            }
-        }
-        if(null==throwable) {
-            throwable = rTask.getThrowable();
-        }
-        if(null!=throwable) {
-            throw new RuntimeException(throwable);
-        }
-    }
-
-    final public void waitUntilIdle() {
-        if(NativeWindowFactory.isAWTAvailable()) {
-            AWTEDTUtil.getSingleton().waitUntilIdle();
-        }
-    }
-
-    final public void waitUntilStopped() {
-        if(NativeWindowFactory.isAWTAvailable()) {
-            AWTEDTUtil.getSingleton().waitUntilStopped();
-        }
-    }
-
-    private void waitUntilRunning() {
-        synchronized(taskWorkerLock) {
-            if(isExit) return;
-
-            while(!isRunning) {
-                try {
-                    taskWorkerLock.wait();
-                } catch (InterruptedException e) {
-                    e.printStackTrace();
-                }
-            }
-        }
-    }
-
-    public void run() {
-        if(DEBUG) System.err.println("MainThread.run(): "+Thread.currentThread().getName());
-        synchronized(taskWorkerLock) {
-            isRunning = true;
-            taskWorkerLock.notifyAll();
-        }
-        while(!shouldStop) {
-            try {
-                // wait for something todo ..
-                synchronized(taskWorkerLock) {
-                    while(!shouldStop && tasks.size()==0) {
-                        try {
-                            taskWorkerLock.wait();
-                        } catch (InterruptedException e) {
-                            e.printStackTrace();
-                        }
-                    }
-
-                    // take over the tasks ..
-                    if(!shouldStop && tasks.size()>0) {
-                        Runnable task = (Runnable) tasks.remove(0);
-                        task.run(); // FIXME: could be run outside of lock
-                    }
-                    taskWorkerLock.notifyAll();
-                }
-            } catch (Throwable t) {
-                // handle errors ..
-                t.printStackTrace();
-            } finally {
-                // epilog - unlock locked stuff
-            }
-        }
-        if(DEBUG) System.err.println("MainThread.run(): "+Thread.currentThread().getName()+" fin");
-        synchronized(taskWorkerLock) {
-            isRunning = false;
-            isExit = true;
-            taskWorkerLock.notifyAll();
-        }
-    }
 }
 
 
diff --git a/src/newt/classes/com/jogamp/newt/util/MonitorMode.java b/src/newt/classes/com/jogamp/newt/util/MonitorMode.java
index fb2d0ce..5a8bf5b 100644
--- a/src/newt/classes/com/jogamp/newt/util/MonitorMode.java
+++ b/src/newt/classes/com/jogamp/newt/util/MonitorMode.java
@@ -33,16 +33,16 @@ import javax.media.nativewindow.util.*;
 /** Immutable MonitorMode Class, consisting of it's read only components:<br>
  * <ul>
  *  <li>{@link javax.media.nativewindow.util.SurfaceSize} surface memory size</li>
- *  <li>{@link javax.media.nativewindow.util.DimensionReadOnly} size in [mm]</li>
+ *  <li>{@link javax.media.nativewindow.util.DimensionImmutable} size in [mm]</li>
  *  <li><code>refresh rate</code></li>
  * </ul>
  */
-public class MonitorMode  implements Cloneable {
+public class MonitorMode {
     SurfaceSize surfaceSize;
-    DimensionReadOnly screenSizeMM; // in [mm]
+    DimensionImmutable screenSizeMM; // in [mm]
     int refreshRate;
 
-    public MonitorMode(SurfaceSize surfaceSize, DimensionReadOnly screenSizeMM, int refreshRate) {
+    public MonitorMode(SurfaceSize surfaceSize, DimensionImmutable screenSizeMM, int refreshRate) {
         if(null==surfaceSize || refreshRate<=0) {
             throw new IllegalArgumentException("surfaceSize must be set and refreshRate greater 0");
         }
@@ -51,19 +51,11 @@ public class MonitorMode  implements Cloneable {
         this.refreshRate=refreshRate;
     }
 
-    public Object clone() {
-        try {
-            return super.clone();
-        } catch (CloneNotSupportedException ex) {
-            throw new InternalError();
-        }
-    }
-
     public final SurfaceSize getSurfaceSize() {
         return surfaceSize;
     }
 
-    public final DimensionReadOnly getScreenSizeMM() {
+    public final DimensionImmutable getScreenSizeMM() {
         return screenSizeMM;
     }
 
diff --git a/src/newt/classes/com/jogamp/newt/util/ScreenModeUtil.java b/src/newt/classes/com/jogamp/newt/util/ScreenModeUtil.java
index 3e0e3da..93797c5 100644
--- a/src/newt/classes/com/jogamp/newt/util/ScreenModeUtil.java
+++ b/src/newt/classes/com/jogamp/newt/util/ScreenModeUtil.java
@@ -33,7 +33,7 @@ import com.jogamp.newt.ScreenMode;
 import java.util.ArrayList;
 import java.util.List;
 import javax.media.nativewindow.util.Dimension;
-import javax.media.nativewindow.util.DimensionReadOnly;
+import javax.media.nativewindow.util.DimensionImmutable;
 import javax.media.nativewindow.util.SurfaceSize;
 
 /**
@@ -66,13 +66,13 @@ public class ScreenModeUtil {
      */
     public static final int NUM_SCREEN_MODE_PROPERTIES_ALL = 8;
 
-    public static int getIndex(List/*<ScreenMode>*/ screenModes, ScreenMode search) {
+    public static int getIndex(List<ScreenMode> screenModes, ScreenMode search) {
         return screenModes.indexOf(search);
     }
 
-    public static int getIndexByHashCode(List/*<ScreenMode>*/ screenModes, ScreenMode search) {
+    public static int getIndexByHashCode(List<ScreenMode> screenModes, ScreenMode search) {
         for (int i=0; null!=screenModes && i<screenModes.size(); i++) {
-            if ( search.hashCode() == ((ScreenMode)screenModes.get(i)).hashCode() ) {
+            if ( search.hashCode() == screenModes.get(i).hashCode() ) {
                 return i;
             }
         }
@@ -84,17 +84,17 @@ public class ScreenModeUtil {
      * @param resolution
      * @return modes with nearest resolution, or matching ones
      */
-    public static List/*<ScreenMode>*/ filterByResolution(List/*<ScreenMode>*/ screenModes, DimensionReadOnly resolution) {
+    public static List<ScreenMode> filterByResolution(List<ScreenMode> screenModes, DimensionImmutable resolution) {
         if(null==screenModes || screenModes.size()==0) {
             return null;
         }
-        List out = new ArrayList();
+        List<ScreenMode> out = new ArrayList<ScreenMode>();
         int resolution_sq = resolution.getHeight()*resolution.getWidth();
         int sm_dsq=resolution_sq, sm_dsq_idx=0;
 
         for (int i=0; null!=screenModes && i<screenModes.size(); i++) {
-            ScreenMode sm = (ScreenMode)screenModes.get(i);
-            DimensionReadOnly res = sm.getMonitorMode().getSurfaceSize().getResolution();
+            ScreenMode sm = screenModes.get(i);
+            DimensionImmutable res = sm.getMonitorMode().getSurfaceSize().getResolution();
             int dsq = Math.abs(resolution_sq - res.getHeight()*res.getWidth());
             if(dsq<sm_dsq) {
                 sm_dsq = dsq;
@@ -108,17 +108,17 @@ public class ScreenModeUtil {
             return out;
         }
         // nearest ..
-        resolution = ((ScreenMode)screenModes.get(sm_dsq_idx)).getMonitorMode().getSurfaceSize().getResolution();
+        resolution = screenModes.get(sm_dsq_idx).getMonitorMode().getSurfaceSize().getResolution();
         return filterByResolution(screenModes, resolution);
     }
 
-    public static List/*<ScreenMode>*/ filterBySurfaceSize(List/*<ScreenMode>*/ screenModes, SurfaceSize surfaceSize) {
+    public static List<ScreenMode> filterBySurfaceSize(List<ScreenMode> screenModes, SurfaceSize surfaceSize) {
         if(null==screenModes || screenModes.size()==0) {
             return null;
         }
-        List out = new ArrayList();
+        List<ScreenMode> out = new ArrayList<ScreenMode>();
         for (int i=0; null!=screenModes && i<screenModes.size(); i++) {
-            ScreenMode sm = (ScreenMode)screenModes.get(i);
+            ScreenMode sm = screenModes.get(i);
             if(sm.getMonitorMode().getSurfaceSize().equals(surfaceSize)) {
                 out.add(sm);
             }
@@ -126,13 +126,13 @@ public class ScreenModeUtil {
         return out.size()>0 ? out : null;
     }
 
-    public static List/*<ScreenMode>*/ filterByRotation(List/*<ScreenMode>*/ screenModes, int rotation) {
+    public static List<ScreenMode> filterByRotation(List<ScreenMode> screenModes, int rotation) {
         if(null==screenModes || screenModes.size()==0) {
             return null;
         }
-        List out = new ArrayList();
+        List<ScreenMode> out = new ArrayList<ScreenMode>();
         for (int i=0; null!=screenModes && i<screenModes.size(); i++) {
-            ScreenMode sm = (ScreenMode)screenModes.get(i);
+            ScreenMode sm = screenModes.get(i);
             if(sm.getRotation() == rotation) {
                 out.add(sm);
             }
@@ -140,13 +140,13 @@ public class ScreenModeUtil {
         return out.size()>0 ? out : null;
     }
 
-    public static List/*<ScreenMode>*/ filterByBpp(List/*<ScreenMode>*/ screenModes, int bitsPerPixel) {
+    public static List<ScreenMode> filterByBpp(List<ScreenMode> screenModes, int bitsPerPixel) {
         if(null==screenModes || screenModes.size()==0) {
             return null;
         }
-        List out = new ArrayList();
+        List<ScreenMode> out = new ArrayList<ScreenMode>();
         for (int i=0; null!=screenModes && i<screenModes.size(); i++) {
-            ScreenMode sm = (ScreenMode)screenModes.get(i);
+            ScreenMode sm = screenModes.get(i);
             if(sm.getMonitorMode().getSurfaceSize().getBitsPerPixel() == bitsPerPixel) {
                 out.add(sm);
             }
@@ -160,15 +160,15 @@ public class ScreenModeUtil {
      * @param refreshRate
      * @return modes with nearest refreshRate, or matching ones
      */
-    public static List/*<ScreenMode>*/ filterByRate(List/*<ScreenMode>*/ screenModes, int refreshRate) {
+    public static List<ScreenMode> filterByRate(List<ScreenMode> screenModes, int refreshRate) {
         if(null==screenModes || screenModes.size()==0) {
             return null;
         }
         int sm_dr = refreshRate;
         int sm_dr_idx = -1;
-        List out = new ArrayList();
+        List<ScreenMode> out = new ArrayList<ScreenMode>();
         for (int i=0; null!=screenModes && i<screenModes.size(); i++) {
-            ScreenMode sm = (ScreenMode)screenModes.get(i);
+            ScreenMode sm = screenModes.get(i);
             int dr = Math.abs(refreshRate - sm.getMonitorMode().getRefreshRate());
             if(dr<sm_dr) {
                 sm_dr = dr;
@@ -181,17 +181,17 @@ public class ScreenModeUtil {
         if(out.size()>0) {
             return out;
         }
-        refreshRate = ((ScreenMode)screenModes.get(sm_dr_idx)).getMonitorMode().getRefreshRate();
+        refreshRate = screenModes.get(sm_dr_idx).getMonitorMode().getRefreshRate();
         return filterByRate(screenModes, refreshRate);
     }
 
-    public static List/*<ScreenMode>*/ getHighestAvailableBpp(List/*<ScreenMode>*/ screenModes) {
+    public static List<ScreenMode> getHighestAvailableBpp(List<ScreenMode> screenModes) {
         if(null==screenModes || screenModes.size()==0) {
             return null;
         }
         int highest = -1;
         for (int i=0; null!=screenModes && i < screenModes.size(); i++) {
-            ScreenMode sm = (ScreenMode)screenModes.get(i);
+            ScreenMode sm = screenModes.get(i);
             int bpp  = sm.getMonitorMode().getSurfaceSize().getBitsPerPixel();
             if (bpp > highest) {
                 highest = bpp;
@@ -200,13 +200,13 @@ public class ScreenModeUtil {
         return filterByBpp(screenModes, highest);
     }
 
-    public static List/*<ScreenMode>*/ getHighestAvailableRate(List/*<ScreenMode>*/ screenModes) {
+    public static List<ScreenMode> getHighestAvailableRate(List<ScreenMode> screenModes) {
         if(null==screenModes || screenModes.size()==0) {
             return null;
         }
         int highest = -1;
         for (int i=0; null!=screenModes && i < screenModes.size(); i++) {
-            ScreenMode sm = (ScreenMode)screenModes.get(i);
+            ScreenMode sm = screenModes.get(i);
             int rate = sm.getMonitorMode().getRefreshRate();
             if (rate > highest) {
                 highest = rate;
@@ -216,19 +216,19 @@ public class ScreenModeUtil {
     }
 
     /** WARNING: must be synchronized with ScreenMode.h, native implementation */
-    public static DimensionReadOnly streamInResolution(int[] resolutionProperties, int offset) {
+    public static DimensionImmutable streamInResolution(int[] resolutionProperties, int offset) {
         Dimension resolution = new Dimension(resolutionProperties[offset++], resolutionProperties[offset++]);
         return resolution;
     }
 
     /** WARNING: must be synchronized with ScreenMode.h, native implementation */
-    public static SurfaceSize streamInSurfaceSize(DimensionReadOnly resolution, int[] sizeProperties, int offset) {
+    public static SurfaceSize streamInSurfaceSize(DimensionImmutable resolution, int[] sizeProperties, int offset) {
         SurfaceSize surfaceSize = new SurfaceSize(resolution, sizeProperties[offset++]);
         return surfaceSize;
     }
 
     /** WARNING: must be synchronized with ScreenMode.h, native implementation */
-    public static MonitorMode streamInMonitorMode(SurfaceSize surfaceSize, DimensionReadOnly screenSizeMM, int[] monitorProperties, int offset) {
+    public static MonitorMode streamInMonitorMode(SurfaceSize surfaceSize, DimensionImmutable screenSizeMM, int[] monitorProperties, int offset) {
         int refreshRate = monitorProperties[offset++];
         return new MonitorMode(surfaceSize, screenSizeMM, refreshRate);
     }
@@ -244,8 +244,8 @@ public class ScreenModeUtil {
      *
      * @param modeProperties the input data
      * @param offset the offset to the input data
-     * @return index of the identical (old or new) ScreenMode element in <code>screenModePool</code>,
-     *         matching the input <code>modeProperties</code>, or -1 if input could not be processed.
+     * @return ScreenMode element matching the input <code>modeProperties</code>, 
+     *         or null if input could not be processed.
      */
     public static ScreenMode streamIn(int[] modeProperties, int offset) {
         return streamInImpl(null, null, null, null, null, modeProperties, offset);
@@ -254,7 +254,7 @@ public class ScreenModeUtil {
     /**
      *  WARNING: must be synchronized with ScreenMode.h, native implementation
      *
-     * @param resolutionPool hash array of unique DimensionReadOnly resolutions, no duplicates
+     * @param resolutionPool hash array of unique resolutions, no duplicates
      * @param surfaceSizePool hash array of unique SurfaceSize, no duplicates
      * @param monitorModePool hash array of unique MonitorMode, no duplicates
      * @param screenModePool hash array of unique ScreenMode, no duplicates
@@ -263,23 +263,24 @@ public class ScreenModeUtil {
      * @return index of the identical (old or new) ScreenMode element in <code>screenModePool</code>,
      *         matching the input <code>modeProperties</code>, or -1 if input could not be processed.
      */
-    public static int streamIn(ArrayHashSet resolutionPool,
-                               ArrayHashSet surfaceSizePool,
-                               ArrayHashSet screenSizeMMPool,
-                               ArrayHashSet monitorModePool,
-                               ArrayHashSet screenModePool,
+    public static int streamIn(ArrayHashSet<DimensionImmutable> resolutionPool,
+                               ArrayHashSet<SurfaceSize>        surfaceSizePool,
+                               ArrayHashSet<DimensionImmutable> screenSizeMMPool,
+                               ArrayHashSet<MonitorMode>        monitorModePool,
+                               ArrayHashSet<ScreenMode>         screenModePool,
                                int[] modeProperties, int offset) {
         ScreenMode screenMode = streamInImpl(resolutionPool, surfaceSizePool, screenSizeMMPool, monitorModePool, screenModePool,
                                          modeProperties, offset);
         return screenModePool.indexOf(screenMode);
     }
 
-    private static ScreenMode streamInImpl(ArrayHashSet resolutionPool,
-                                       ArrayHashSet surfaceSizePool,
-                                       ArrayHashSet screenSizeMMPool,
-                                       ArrayHashSet monitorModePool,
-                                       ArrayHashSet screenModePool,
-                                       int[] modeProperties, int offset) {
+                               
+    private static ScreenMode streamInImpl(ArrayHashSet<DimensionImmutable> resolutionPool,
+                                           ArrayHashSet<SurfaceSize>        surfaceSizePool,
+                                           ArrayHashSet<DimensionImmutable> screenSizeMMPool,
+                                           ArrayHashSet<MonitorMode>        monitorModePool,
+                                           ArrayHashSet<ScreenMode>         screenModePool,
+                                           int[] modeProperties, int offset) {
         int count = modeProperties[offset];
         if(NUM_SCREEN_MODE_PROPERTIES_ALL != count) {
             throw new RuntimeException("NUM_SCREEN_MODE_PROPERTIES should be "+NUM_SCREEN_MODE_PROPERTIES_ALL+", is "+count+", len "+(modeProperties.length-offset));
@@ -288,33 +289,33 @@ public class ScreenModeUtil {
             throw new RuntimeException("properties array too short, should be >= "+NUM_SCREEN_MODE_PROPERTIES_ALL+", is "+(modeProperties.length-offset));
         }
         offset++;
-        DimensionReadOnly resolution = ScreenModeUtil.streamInResolution(modeProperties, offset);
+        DimensionImmutable resolution = ScreenModeUtil.streamInResolution(modeProperties, offset);
         offset += ScreenModeUtil.NUM_RESOLUTION_PROPERTIES;
         if(null!=resolutionPool) {
-            resolution = (DimensionReadOnly) resolutionPool.getOrAdd(resolution);
+            resolution = resolutionPool.getOrAdd(resolution);
         }
 
         SurfaceSize surfaceSize = ScreenModeUtil.streamInSurfaceSize(resolution, modeProperties, offset);
         offset += ScreenModeUtil.NUM_SURFACE_SIZE_PROPERTIES;
         if(null!=surfaceSizePool) {
-            surfaceSize = (SurfaceSize) surfaceSizePool.getOrAdd(surfaceSize);
+            surfaceSize = surfaceSizePool.getOrAdd(surfaceSize);
         }
 
-        DimensionReadOnly screenSizeMM = ScreenModeUtil.streamInResolution(modeProperties, offset);
+        DimensionImmutable screenSizeMM = ScreenModeUtil.streamInResolution(modeProperties, offset);
         offset += ScreenModeUtil.NUM_RESOLUTION_PROPERTIES;
         if(null!=screenSizeMMPool) {
-            screenSizeMM = (DimensionReadOnly) screenSizeMMPool.getOrAdd(screenSizeMM);
+            screenSizeMM = screenSizeMMPool.getOrAdd(screenSizeMM);
         }
 
         MonitorMode monitorMode = ScreenModeUtil.streamInMonitorMode(surfaceSize, screenSizeMM, modeProperties, offset);
         offset += ScreenModeUtil.NUM_MONITOR_MODE_PROPERTIES - ScreenModeUtil.NUM_RESOLUTION_PROPERTIES;
         if(null!=monitorModePool) {
-            monitorMode = (MonitorMode) monitorModePool.getOrAdd(monitorMode);
+            monitorMode = monitorModePool.getOrAdd(monitorMode);
         }
 
         ScreenMode screenMode = ScreenModeUtil.streamInScreenMode(monitorMode, modeProperties, offset);
         if(null!=screenModePool) {
-            screenMode = (ScreenMode) screenModePool.getOrAdd(screenMode);
+            screenMode = screenModePool.getOrAdd(screenMode);
         }
         return screenMode;
     }
diff --git a/src/newt/classes/jogamp/newt/DefaultEDTUtil.java b/src/newt/classes/jogamp/newt/DefaultEDTUtil.java
index 3b14f30..0bcd332 100644
--- a/src/newt/classes/jogamp/newt/DefaultEDTUtil.java
+++ b/src/newt/classes/jogamp/newt/DefaultEDTUtil.java
@@ -39,7 +39,11 @@ package jogamp.newt;
 
 import java.util.ArrayList;
 import javax.media.nativewindow.NativeWindowException;
+
+import jogamp.common.util.locks.LockDebugUtil;
+
 import com.jogamp.common.util.RunnableTask;
+import com.jogamp.common.util.locks.Lock;
 import com.jogamp.newt.util.EDTUtil;
 
 public class DefaultEDTUtil implements EDTUtil {
@@ -65,10 +69,8 @@ public class DefaultEDTUtil implements EDTUtil {
             waitUntilStopped();
             if(DEBUG) {
                 if(edt.tasks.size()>0) {
-                    String msg = Thread.currentThread()+": EDT reset, remaining tasks: "+edt.tasks.size()+" - "+edt;
-                    System.err.println(msg);
-                    // Throwable t = new Throwable(msg);
-                    // t.printStackTrace();
+                    System.err.println(Thread.currentThread()+": EDT reset, remaining tasks: "+edt.tasks.size()+" - "+edt);
+                    // Thread.dumpStack();
                 }
                 System.err.println(Thread.currentThread()+": EDT reset - edt: "+edt);
             }
@@ -87,10 +89,8 @@ public class DefaultEDTUtil implements EDTUtil {
                 edt.setName(name+start_iter);
                 edt.shouldStop = false;
                 if(DEBUG) {
-                    String msg = Thread.currentThread()+": EDT START - edt: "+edt;
-                    System.err.println(msg);
-                    // Throwable t = new Throwable(msg);
-                    // t.printStackTrace();
+                    System.err.println(Thread.currentThread()+": EDT START - edt: "+edt);
+                    // Thread.dumpStack();
                 }
                 edt.start();
             }
@@ -125,32 +125,27 @@ public class DefaultEDTUtil implements EDTUtil {
                 if( edt.shouldStop ) {
                     // drop task ..
                     if(DEBUG) {
-                        Throwable t = new Throwable("Warning: EDT about (1) to stop, won't enqueue new task: "+edt);
-                        t.printStackTrace();
+                        System.err.println("Warning: EDT about (1) to stop, won't enqueue new task: "+edt);
+                        Thread.dumpStack();
                     }
                     return; 
                 }
-                // Exception ee = new Exception("XXX stop: "+stop+", tasks: "+edt.tasks.size()+", task: "+task);
-                // ee.printStackTrace();
+                // System.err.println(Thread.currentThread()+" XXX stop: "+stop+", tasks: "+edt.tasks.size()+", task: "+task);
+                // Thread.dumpStack();
                 if(stop) {
                     edt.shouldStop = true;
                     if(DEBUG) {
-                        String msg = Thread.currentThread()+": EDT signal STOP (on edt: "+isCurrentThreadEDT()+") - edt: "+edt;
-                        System.err.println(msg);
-                        // Throwable t = new Throwable(msg);
-                        // t.printStackTrace();
+                        System.err.println(Thread.currentThread()+": EDT signal STOP (on edt: "+isCurrentThreadEDT()+") - tasks: "+edt.tasks.size()+" - "+edt);
+                        // Thread.dumpStack();
                     }
                 }
                 if( isCurrentThreadEDT() ) {
                     task.run();
                     wait = false; // running in same thread (EDT) -> no wait
                     if(stop && edt.tasks.size()>0) {
-                        String msg = "Warning: EDT about (2) to stop, having remaining tasks: "+edt.tasks.size()+" - "+edt;
+                        System.err.println("Warning: EDT about (2) to stop, having remaining tasks: "+edt.tasks.size()+" - "+edt);
                         if(DEBUG) {
-                            Throwable t = new Throwable(msg);
-                            t.printStackTrace();
-                        } else {
-                            System.err.println(msg);
+                            Thread.dumpStack();
                         }
                     }
                 } else {
@@ -228,7 +223,7 @@ public class DefaultEDTUtil implements EDTUtil {
     class EventDispatchThread extends Thread {
         volatile boolean shouldStop = false;
         volatile boolean isRunning = false;
-        ArrayList tasks = new ArrayList(); // one shot tasks
+        ArrayList<RunnableTask> tasks = new ArrayList<RunnableTask>(); // one shot tasks
 
         public EventDispatchThread(ThreadGroup tg, String name) {
             super(tg, name);
@@ -244,6 +239,15 @@ public class DefaultEDTUtil implements EDTUtil {
             super.start();
         }
 
+        private final void validateNoRecursiveLocksHold() {
+            if(Lock.DEBUG) {
+                if(LockDebugUtil.getRecursiveLockTrace().size()>0) {
+                    LockDebugUtil.dumpRecursiveLockTrace(System.err);
+                    throw new InternalError("XXX");
+                }
+            }
+        }
+        
         /** 
          * Utilizing locking only on tasks and its execution,
          * not for event dispatching.
@@ -253,6 +257,7 @@ public class DefaultEDTUtil implements EDTUtil {
             if(DEBUG) {
                 System.err.println(getName()+": EDT run() START "+ getName());
             }
+            validateNoRecursiveLocksHold();
             RuntimeException error = null;
             try {
                 do {
@@ -273,13 +278,17 @@ public class DefaultEDTUtil implements EDTUtil {
                         }
                         // execute one task, if available
                         if(tasks.size()>0) {
-                            task = (RunnableTask) tasks.remove(0);
+                            task = tasks.remove(0);
                             tasks.notifyAll();
                         }
                     }
                     if(null!=task) {
-                        // Exceptions are always catched, see RunnableTask creation above
                         task.run();
+                        validateNoRecursiveLocksHold();
+                        if(!task.hasWaiter() && null != task.getThrowable()) {
+                            // at least dump stack-trace in case nobody waits for result
+                            task.getThrowable().printStackTrace();
+                        }
                     }
                 } while(!shouldStop) ;
             } catch (Throwable t) {
@@ -292,7 +301,7 @@ public class DefaultEDTUtil implements EDTUtil {
                 }
             } finally {
                 if(DEBUG) {
-                    RunnableTask rt = ( tasks.size() > 0 ) ? (RunnableTask) tasks.get(0) : null ;
+                    RunnableTask rt = ( tasks.size() > 0 ) ? tasks.get(0) : null ;
                     System.err.println(getName()+": EDT run() END "+ getName()+", tasks: "+tasks.size()+", "+rt+", "+error); 
                 }
                 synchronized(edtLock) {
@@ -302,18 +311,17 @@ public class DefaultEDTUtil implements EDTUtil {
                             // while having tasks and no previous-task, or previous-task is non final
                             RunnableTask task = null;
                             while ( ( null == task || task.getAttachment() == null ) && tasks.size() > 0 ) {
-                                task = ( RunnableTask ) tasks.remove(0);
+                                task = tasks.remove(0);
                                 task.run();
                                 tasks.notifyAll();
                             }
                             if(DEBUG) {
                                 if(null!=task && task.getAttachment()==null) {
-                                    Throwable t = new Throwable("Warning: EDT exit: Last task Not Final: "+tasks.size()+", "+task+" - "+edt);
-                                    t.printStackTrace();
+                                    System.err.println(getName()+" Warning: EDT exit: Last task Not Final: "+tasks.size()+", "+task+" - "+edt);
                                 } else if(tasks.size()>0) {
-                                    Throwable t = new Throwable("Warning: EDT exit: Remaining tasks Post Final: "+tasks.size());
-                                    t.printStackTrace();
+                                    System.err.println(getName()+" Warning: EDT exit: Remaining tasks Post Final: "+tasks.size());
                                 }
+                                Thread.dumpStack();
                             }
                         }
                     }
@@ -328,8 +336,8 @@ public class DefaultEDTUtil implements EDTUtil {
                 if(null!=error) {
                     throw error;
                 }
-            }
-        }
-    }
+            } // finally
+        } // run()
+    } // EventDispatchThread
 }
 
diff --git a/src/newt/classes/jogamp/newt/DisplayImpl.java b/src/newt/classes/jogamp/newt/DisplayImpl.java
index 299f4fb..2d25161 100644
--- a/src/newt/classes/jogamp/newt/DisplayImpl.java
+++ b/src/newt/classes/jogamp/newt/DisplayImpl.java
@@ -38,34 +38,34 @@ import com.jogamp.newt.Display;
 import com.jogamp.newt.NewtFactory;
 import com.jogamp.newt.event.NEWTEvent;
 import com.jogamp.newt.event.NEWTEventConsumer;
+
 import jogamp.newt.event.NEWTEventTask;
 import com.jogamp.newt.util.EDTUtil;
-import com.jogamp.newt.util.MainThread;
 import java.util.ArrayList;
 import javax.media.nativewindow.AbstractGraphicsDevice;
 import javax.media.nativewindow.NativeWindowException;
 import javax.media.nativewindow.NativeWindowFactory;
 
 public abstract class DisplayImpl extends Display {
-    public static final boolean DEBUG_TEST_EDT_MAINTHREAD = Debug.isPropertyDefined("newt.test.EDTMainThread", true); // JAU EDT Test ..
-
     private static int serialno = 1;
 
-    private static Class getDisplayClass(String type) 
+    private static Class<?> getDisplayClass(String type) 
         throws ClassNotFoundException 
     {
-        Class displayClass = NewtFactory.getCustomClass(type, "Display");
+        Class<?> displayClass = NewtFactory.getCustomClass(type, "Display");
         if(null==displayClass) {
-            if (NativeWindowFactory.TYPE_EGL.equals(type)) {
-                displayClass = Class.forName("jogamp.newt.opengl.kd.KDDisplay");
+            if (NativeWindowFactory.TYPE_ANDROID.equals(type)) {
+                displayClass = Class.forName("jogamp.newt.driver.android.AndroidDisplay");
+            } else if (NativeWindowFactory.TYPE_EGL.equals(type)) {
+                displayClass = Class.forName("jogamp.newt.driver.kd.KDDisplay");
             } else if (NativeWindowFactory.TYPE_WINDOWS.equals(type)) {
-                displayClass = Class.forName("jogamp.newt.windows.WindowsDisplay");
+                displayClass = Class.forName("jogamp.newt.driver.windows.WindowsDisplay");
             } else if (NativeWindowFactory.TYPE_MACOSX.equals(type)) {
-                displayClass = Class.forName("jogamp.newt.macosx.MacDisplay");
+                displayClass = Class.forName("jogamp.newt.driver.macosx.MacDisplay");
             } else if (NativeWindowFactory.TYPE_X11.equals(type)) {
-                displayClass = Class.forName("jogamp.newt.x11.X11Display");
+                displayClass = Class.forName("jogamp.newt.driver.x11.X11Display");
             } else if (NativeWindowFactory.TYPE_AWT.equals(type)) {
-                displayClass = Class.forName("jogamp.newt.awt.AWTDisplay");
+                displayClass = Class.forName("jogamp.newt.driver.awt.AWTDisplay");
             } else {
                 throw new RuntimeException("Unknown display type \"" + type + "\"");
             }
@@ -76,7 +76,7 @@ public abstract class DisplayImpl extends Display {
     /** Make sure to reuse a Display with the same name */
     public static Display create(String type, String name, final long handle, boolean reuse) {
         try {
-            Class displayClass = getDisplayClass(type);
+            Class<?> displayClass = getDisplayClass(type);
             DisplayImpl display = (DisplayImpl) displayClass.newInstance();
             name = display.validateDisplayName(name, handle);
             synchronized(displayList) {
@@ -167,15 +167,7 @@ public abstract class DisplayImpl extends Display {
 
     protected void createEDTUtil() {
         if(NewtFactory.useEDT()) {
-            if ( ! DEBUG_TEST_EDT_MAINTHREAD ) {
-                Thread current = Thread.currentThread();
-                edtUtil = new DefaultEDTUtil(current.getThreadGroup(), "Display-"+getFQName(), dispatchMessagesRunnable);
-            } else {
-                // Begin JAU EDT Test ..
-                MainThread.addPumpMessage(this, dispatchMessagesRunnable); 
-                edtUtil = MainThread.getSingleton();
-                // End JAU EDT Test ..
-            }
+            edtUtil = new DefaultEDTUtil(Thread.currentThread().getThreadGroup(), "Display-"+getFQName(), dispatchMessagesRunnable);            
             if(DEBUG) {
                 System.err.println("Display.createNative("+getFQName()+") Create EDTUtil: "+edtUtil.getClass().getName());
             }
@@ -239,9 +231,6 @@ public abstract class DisplayImpl extends Display {
             }
         } );
         if(null!=edtUtil) {
-            if ( DEBUG_TEST_EDT_MAINTHREAD ) {
-                MainThread.removePumpMessage(this); // JAU EDT Test ..
-            }
             edtUtil.waitUntilStopped();
             edtUtil.reset();
         }
@@ -333,7 +322,7 @@ public abstract class DisplayImpl extends Display {
         return aDevice;
     }
 
-    public final boolean isNativeValid() {
+    public synchronized final boolean isNativeValid() {
         return null != aDevice;
     }
 
@@ -352,7 +341,7 @@ public abstract class DisplayImpl extends Display {
     protected abstract void dispatchMessagesNative();
 
     private Object eventsLock = new Object();
-    private ArrayList/*<NEWTEvent>*/ events = new ArrayList();
+    private ArrayList<NEWTEventTask> events = new ArrayList<NEWTEventTask>();
     private volatile boolean haveEvents = false;
 
     class DispatchMessagesRunnable implements Runnable {
@@ -364,6 +353,12 @@ public abstract class DisplayImpl extends Display {
 
     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 ;
@@ -379,24 +374,28 @@ public abstract class DisplayImpl extends Display {
     
     public void dispatchMessages() {
         // System.err.println("Display.dispatchMessages() 0 "+this+" "+getThreadName());
-        if(0==refCount) return; // no screens 
-        if(null==getGraphicsDevice()) return; // no native device
+        if(0==refCount || // no screens 
+           null==getGraphicsDevice() // no native device
+          ) 
+        {
+            return;
+        }
 
-        ArrayList/*<NEWTEvent>*/ _events = null;
+        ArrayList<NEWTEventTask> _events = null;
 
         if(haveEvents) { // volatile: ok
             synchronized(eventsLock) {
                 if(haveEvents) {
                     // swap events list to free ASAP
                     _events = events;
-                    events = new ArrayList();
+                    events = new ArrayList<NEWTEventTask>();
                     haveEvents = false;
                 }
                 eventsLock.notifyAll();
             }
             if( null != _events ) {
                 for (int i=0; i < _events.size(); i++) {
-                    dispatchMessage((NEWTEventTask) _events.get(i));
+                    dispatchMessage(_events.get(i));
                 }
             }
         }
@@ -439,6 +438,24 @@ public abstract class DisplayImpl extends Display {
         }
     }
 
+    public interface DisplayRunnable {
+        Object run(long dpy);
+    }    
+    public final Object runWithLockedDisplayHandle(DisplayRunnable action) {
+        final AbstractGraphicsDevice aDevice = getGraphicsDevice();
+        if(null == aDevice) {
+            throw new RuntimeException("null device - not initialized: "+this);
+        }
+        Object res;
+        aDevice.lock();
+        try {
+            res = action.run(aDevice.getHandle());
+        } finally {
+            aDevice.unlock();
+        }
+        return res;
+    }
+    
     protected EDTUtil edtUtil = null;
     protected int id;
     protected String name;
diff --git a/src/newt/classes/jogamp/newt/NEWTJNILibLoader.java b/src/newt/classes/jogamp/newt/NEWTJNILibLoader.java
index 7b89398..1f5d5dd 100644
--- a/src/newt/classes/jogamp/newt/NEWTJNILibLoader.java
+++ b/src/newt/classes/jogamp/newt/NEWTJNILibLoader.java
@@ -39,21 +39,22 @@
 
 package jogamp.newt;
 
-// FIXME: refactor Java SE dependencies
-//import java.awt.Toolkit;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
-import java.util.HashSet;
+
 import com.jogamp.common.jvm.JNILibLoaderBase;
+import com.jogamp.common.util.cache.TempJarCache;
 
 public class NEWTJNILibLoader extends JNILibLoaderBase {
   
   public static void loadNEWT() {
-    AccessController.doPrivileged(new PrivilegedAction() {
+    AccessController.doPrivileged(new PrivilegedAction<Object>() {
       public Object run() {
-        loadLibrary("newt", null, true);
+        final String libName = "newt";
+        if(TempJarCache.isInitialized() && null == TempJarCache.findLibrary(libName)) {
+            addNativeJarLibs(NEWTJNILibLoader.class, "jogl.all", "jogl-all", new String[] { "nativewindow", "newt" } );
+        }
+        loadLibrary(libName, false);
         return null;
       }
     });
diff --git a/src/newt/classes/jogamp/newt/OffscreenWindow.java b/src/newt/classes/jogamp/newt/OffscreenWindow.java
index a79b1a5..fa7bafe 100644
--- a/src/newt/classes/jogamp/newt/OffscreenWindow.java
+++ b/src/newt/classes/jogamp/newt/OffscreenWindow.java
@@ -35,6 +35,7 @@
 package jogamp.newt;
 
 import javax.media.nativewindow.*;
+import javax.media.nativewindow.util.Insets;
 import javax.media.nativewindow.util.Point;
 
 public class OffscreenWindow extends WindowImpl implements SurfaceChangeable {
@@ -70,12 +71,6 @@ public class OffscreenWindow extends WindowImpl implements SurfaceChangeable {
     }
 
     @Override
-    protected void invalidate(boolean unrecoverable) {
-        super.invalidate(unrecoverable);
-        surfaceHandle = 0;
-    }
-
-    @Override
     public synchronized void destroy() {
         super.destroy();
         surfaceHandle = 0;
@@ -90,18 +85,13 @@ public class OffscreenWindow extends WindowImpl implements SurfaceChangeable {
         return surfaceHandle;
     }
 
-    protected void setVisibleImpl(boolean visible, int x, int y, int width, int height) {
-        sizeChanged(width, height, false);
-        visibleChanged(visible);
-    }
-
     protected void requestFocusImpl(boolean reparented) {
     }
 
     @Override
     public void setSize(int width, int height) {
-        if(!visible) {
-            sizeChanged(width, height, false);
+        if(!isVisible()) {
+            sizeChanged(false, width, height, false);
         }
     }
     @Override
@@ -113,8 +103,14 @@ public class OffscreenWindow extends WindowImpl implements SurfaceChangeable {
         // nop
         return false;
     }
-    protected boolean reconfigureWindowImpl(int x, int y, int width, int height, boolean parentChange, int fullScreenChange, int decorationChange) {
-        shouldNotCallThis();
+    
+    protected boolean reconfigureWindowImpl(int x, int y, int width, int height, int flags) {
+        if( 0 != ( FLAG_CHANGE_VISIBILITY & flags) ) {
+            sizeChanged(false, width, height, false);
+            visibleChanged(false, 0 != ( FLAG_IS_VISIBLE & flags));            
+        } else {
+            shouldNotCallThis();
+        }
         return false;
     }
 
@@ -127,9 +123,13 @@ public class OffscreenWindow extends WindowImpl implements SurfaceChangeable {
      }
      return new Point(0,0);
     }
-
+    
     protected Point getLocationOnScreenImpl(int x, int y) {
         return new Point(x,y);
     }
+    
+    protected void updateInsetsImpl(Insets insets) {
+        // nop ..        
+    }
 }
 
diff --git a/src/newt/classes/jogamp/newt/ScreenImpl.java b/src/newt/classes/jogamp/newt/ScreenImpl.java
index 065cd88..749bba1 100644
--- a/src/newt/classes/jogamp/newt/ScreenImpl.java
+++ b/src/newt/classes/jogamp/newt/ScreenImpl.java
@@ -41,9 +41,12 @@ import com.jogamp.newt.NewtFactory;
 import com.jogamp.newt.Screen;
 import com.jogamp.newt.ScreenMode;
 import com.jogamp.newt.event.ScreenModeListener;
+import com.jogamp.newt.util.MonitorMode;
 import com.jogamp.newt.util.ScreenModeUtil;
 
 import javax.media.nativewindow.*;
+import javax.media.nativewindow.util.DimensionImmutable;
+import javax.media.nativewindow.util.SurfaceSize;
 
 import java.security.*;
 import java.util.ArrayList;
@@ -61,29 +64,39 @@ public abstract class ScreenImpl extends Screen implements ScreenModeListener {
     protected int width=-1, height=-1; // detected values: set using setScreenSize
     protected static int usrWidth=-1, usrHeight=-1; // property values: newt.ws.swidth and newt.ws.sheight
     private static AccessControlContext localACC = AccessController.getContext();
-    private List/*<ScreenModeListener>*/ referencedScreenModeListener = new ArrayList();
+    private ArrayList<ScreenModeListener> referencedScreenModeListener = new ArrayList<ScreenModeListener>();
     long t0; // creationTime
 
-    private static Class getScreenClass(String type) 
-    throws ClassNotFoundException 
+    static {
+        AccessController.doPrivileged(new PrivilegedAction() {
+            public Object run() {
+                registerShutdownHook();
+                return null;
+            }
+        });
+    }
+    
+    private static Class<? extends Screen> getScreenClass(String type) throws ClassNotFoundException 
     {
-        Class screenClass = NewtFactory.getCustomClass(type, "Screen");
+        Class<?> screenClass = NewtFactory.getCustomClass(type, "Screen");
         if(null==screenClass) {
-            if (NativeWindowFactory.TYPE_EGL.equals(type)) {
-                screenClass = Class.forName("jogamp.newt.opengl.kd.KDScreen");
+            if (NativeWindowFactory.TYPE_ANDROID.equals(type)) {
+                screenClass = Class.forName("jogamp.newt.driver.android.AndroidScreen");
+            } else if (NativeWindowFactory.TYPE_EGL.equals(type)) {
+                screenClass = Class.forName("jogamp.newt.driver.kd.KDScreen");
             } else if (NativeWindowFactory.TYPE_WINDOWS.equals(type)) {
-                screenClass = Class.forName("jogamp.newt.windows.WindowsScreen");
+                screenClass = Class.forName("jogamp.newt.driver.windows.WindowsScreen");
             } else if (NativeWindowFactory.TYPE_MACOSX.equals(type)) {
-                screenClass = Class.forName("jogamp.newt.macosx.MacScreen");
+                screenClass = Class.forName("jogamp.newt.driver.macosx.MacScreen");
             } else if (NativeWindowFactory.TYPE_X11.equals(type)) {
-                screenClass = Class.forName("jogamp.newt.x11.X11Screen");
+                screenClass = Class.forName("jogamp.newt.driver.x11.X11Screen");
             } else if (NativeWindowFactory.TYPE_AWT.equals(type)) {
-                screenClass = Class.forName("jogamp.newt.awt.AWTScreen");
+                screenClass = Class.forName("jogamp.newt.driver.awt.AWTScreen");
             } else {
                 throw new RuntimeException("Unknown window type \"" + type + "\"");
             }
         }
-        return screenClass;
+        return (Class<? extends Screen>)screenClass;
     }
 
     public static Screen create(Display display, final int idx) {
@@ -109,7 +122,7 @@ public abstract class ScreenImpl extends Screen implements ScreenModeListener {
                         return screen0;
                     }
                 }
-                Class screenClass = getScreenClass(display.getType());
+                Class<? extends Screen> screenClass = getScreenClass(display.getType());
                 ScreenImpl screen  = (ScreenImpl) screenClass.newInstance();
                 screen.display = (DisplayImpl) display;
                 screen.screen_idx = idx;
@@ -161,6 +174,7 @@ public abstract class ScreenImpl extends Screen implements ScreenModeListener {
             if(null == aScreen) {
                 throw new NativeWindowException("Screen.createNative() failed to instanciate an AbstractGraphicsScreen");
             }
+            initScreenModeStatus();
             if(DEBUG) {
                 System.err.println("Screen.createNative() END ("+DisplayImpl.getThreadName()+", "+this+")");
             }
@@ -168,7 +182,8 @@ public abstract class ScreenImpl extends Screen implements ScreenModeListener {
                 screensActive++;
             }
         }
-        initScreenModeStatus();
+        ScreenModeStatus sms = ScreenModeStatus.getScreenModeStatus(this.getFQName());
+        sms.addListener(this);
     }
 
     public synchronized final void destroy() {
@@ -228,6 +243,11 @@ public abstract class ScreenImpl extends Screen implements ScreenModeListener {
         return fqname;
     }
 
+    /**
+     * Set the <b>rotated</b> ScreenSize.
+     * @see com.jogamp.newt.ScreenMode#getRotatedWidth()
+     * @see com.jogamp.newt.ScreenMode#getRotatedHeight()
+     */
     protected void setScreenSize(int w, int h) {
         System.err.println("Detected screen size "+w+"x"+h);
         width=w; height=h;
@@ -245,14 +265,23 @@ public abstract class ScreenImpl extends Screen implements ScreenModeListener {
         return aScreen;
     }
 
-    public final boolean isNativeValid() {
+    public synchronized final boolean isNativeValid() {
         return null != aScreen;
     }
 
+    
+    /**
+     * @return the <b>rotated</b> width.
+     * @see com.jogamp.newt.ScreenMode#getRotatedWidth()
+     */
     public final int getWidth() {
         return (usrWidth>0) ? usrWidth : (width>0) ? width : 480;
     }
 
+    /**
+     * @return the <b>rotated</b> height
+     * @see com.jogamp.newt.ScreenMode#getRotatedHeight()
+     */
     public final int getHeight() {
         return (usrHeight>0) ? usrHeight : (height>0) ? height : 480;
     }
@@ -262,8 +291,8 @@ public abstract class ScreenImpl extends Screen implements ScreenModeListener {
         return "NEWT-Screen["+getFQName()+", idx "+screen_idx+", refCount "+refCount+", "+getWidth()+"x"+getHeight()+", "+aScreen+", "+display+"]";
     }
 
-    public final List/*<ScreenMode>*/ getScreenModes() {
-        ArrayHashSet screenModes = getScreenModesOrig();
+    public final List<ScreenMode> getScreenModes() {
+        ArrayHashSet<ScreenMode> screenModes = getScreenModesOrig();
         if(null != screenModes && 0 < screenModes.size()) {
             return screenModes.toArrayList();
         }
@@ -285,10 +314,7 @@ public abstract class ScreenImpl extends Screen implements ScreenModeListener {
             }
             sms.lock();
             try {
-                smU = (ScreenMode) sms.getScreenModes().get(sm0); // unify via value hash
-                if(null == smU) {
-                    throw new RuntimeException(sm0+" could not be hashed from ScreenMode list");
-                }
+                smU = sms.getScreenModes().getOrAdd(sm0); // unified instance, maybe new
 
                 // if mode has changed somehow, update it ..
                 if( sms.getCurrentScreenMode().hashCode() != smU.hashCode() ) {
@@ -302,35 +328,47 @@ public abstract class ScreenImpl extends Screen implements ScreenModeListener {
     }
 
     public boolean setCurrentScreenMode(ScreenMode screenMode) {
-        ScreenMode smU = (ScreenMode) getScreenModesOrig().get(screenMode); // unify via value hash
+        final ScreenMode smC = getCurrentScreenMode();
+        ScreenMode smU = getScreenModesOrig().get(screenMode); // unify via value hash
+        if(smU.equals(smC)) {
+            if(DEBUG) {
+                System.err.println("Screen.setCurrentScreenMode ("+(System.currentTimeMillis()-t0)+"): 0.0 is-current (skip) "+smU+" == "+smC);
+            }            
+            return true;
+        }
         ScreenModeStatus sms = ScreenModeStatus.getScreenModeStatus(this.getFQName());
         if(null!=sms) {
             sms.lock();
             try {
+                long t0=0, t1=0;
                 if(DEBUG) {
                     System.err.println("Screen.setCurrentScreenMode ("+(System.currentTimeMillis()-t0)+"): 0.0 "+screenMode);
-                }
+                    t0 = System.currentTimeMillis();
+                }                
 
                 sms.fireScreenModeChangeNotify(smU);
 
                 if(DEBUG) {
                     System.err.println("Screen.setCurrentScreenMode ("+(System.currentTimeMillis()-t0)+"): 0.1 "+screenMode);
+                    t1 = System.currentTimeMillis();
                 }
 
-                boolean success = setCurrentScreenModeImpl(smU);
+                boolean success = setCurrentScreenModeImpl(smU);                    
                 if(success) {
-                    setScreenSize(screenMode.getMonitorMode().getSurfaceSize().getResolution().getWidth(),
-                                  screenMode.getMonitorMode().getSurfaceSize().getResolution().getHeight());
+                    setScreenSize(screenMode.getRotatedWidth(), screenMode.getRotatedHeight());
                 }
-
+                
                 if(DEBUG) {
+                    t1 = System.currentTimeMillis() - t1;
                     System.err.println("Screen.setCurrentScreenMode ("+(System.currentTimeMillis()-t0)+"): X.0 "+screenMode+", success: "+success);
                 }
 
                 sms.fireScreenModeChanged(smU, success);
-
+                                
                 if(DEBUG) {
-                    System.err.println("Screen.setCurrentScreenMode ("+(System.currentTimeMillis()-t0)+"): X.X "+screenMode+", success: "+success);
+                    t0 = System.currentTimeMillis() - t0;
+                    System.err.println("Screen.setCurrentScreenMode ("+(System.currentTimeMillis()-t0)+"): X.X "+screenMode+", success: "+success+
+                                       " - dt0 "+t0+"ms, dt1 "+t1+"ms");
                 }
 
                 return success;
@@ -348,6 +386,9 @@ public abstract class ScreenImpl extends Screen implements ScreenModeListener {
     }
 
     public void screenModeChanged(ScreenMode sm, boolean success) {
+        if(success) {
+            setScreenSize(sm.getRotatedWidth(), sm.getRotatedHeight());
+        }
         for(int i=0; i<referencedScreenModeListener.size(); i++) {
             ((ScreenModeListener)referencedScreenModeListener.get(i)).screenModeChanged(sm, success);
         }
@@ -362,7 +403,7 @@ public abstract class ScreenImpl extends Screen implements ScreenModeListener {
     }
 
     /** ScreenModeStatus bridge to native implementation */
-    protected final ArrayHashSet getScreenModesOrig() {
+    protected final ArrayHashSet<ScreenMode> getScreenModesOrig() {
         ScreenModeStatus sms = ScreenModeStatus.getScreenModeStatus(this.getFQName());
         if(null!=sms) {
             return sms.getScreenModes();
@@ -423,7 +464,7 @@ public abstract class ScreenImpl extends Screen implements ScreenModeListener {
         return false;
     }
 
-    private void initScreenModeStatus() {
+    private ScreenModeStatus initScreenModeStatus() {
         ScreenModeStatus sms;
         ScreenModeStatus.lockScreenModeStatus();
         try {
@@ -431,12 +472,23 @@ public abstract class ScreenImpl extends Screen implements ScreenModeListener {
             if(null==sms) {                
                 IntIntHashMap screenModesIdx2NativeIdx = new IntIntHashMap();
 
-                ArrayHashSet screenModes = collectNativeScreenModes(screenModesIdx2NativeIdx);
+                ArrayHashSet<ScreenMode> screenModes = collectNativeScreenModes(screenModesIdx2NativeIdx);
+                if(screenModes.size()==0) {
+                    ScreenMode sm0 = ( DEBUG_TEST_SCREENMODE_DISABLED ) ? null : getCurrentScreenModeImpl();
+                    if(null != sm0) {
+                        if(DEBUG) {
+                            System.err.println("ScreenImpl.initScreenModeStatus: added current (last resort, collect failed): "+sm0);
+                        }
+                        screenModes.getOrAdd(sm0);
+                    } else if(DEBUG) {
+                        System.err.println("ScreenImpl.initScreenModeStatus: Warning: No screen modes added!");
+                    }
+                }
                 sms = new ScreenModeStatus(screenModes, screenModesIdx2NativeIdx);
-                if(null!=screenModes && screenModes.size()>0) {
+                if(screenModes.size()>0) {
                     ScreenMode originalScreenMode = ( DEBUG_TEST_SCREENMODE_DISABLED ) ? null : getCurrentScreenModeImpl();
                     if(null != originalScreenMode) {
-                        ScreenMode originalScreenMode0 = (ScreenMode) screenModes.get(originalScreenMode); // unify via value hash
+                        ScreenMode originalScreenMode0 = screenModes.get(originalScreenMode); // unify via value hash
                         if(null == originalScreenMode0) {
                             throw new RuntimeException(originalScreenMode+" could not be hashed from ScreenMode list");
                         }
@@ -445,21 +497,19 @@ public abstract class ScreenImpl extends Screen implements ScreenModeListener {
                 }
                 ScreenModeStatus.mapScreenModeStatus(this.getFQName(), sms);
             }
-            sms.addListener(this);
         } finally {
             ScreenModeStatus.unlockScreenModeStatus();
         }
+        return sms;
     }
 
     /** ignores bpp < 15 */
-    private ArrayHashSet collectNativeScreenModes(IntIntHashMap screenModesIdx2NativeId) {
-        ArrayHashSet resolutionPool  = new ArrayHashSet();
-        ArrayHashSet surfaceSizePool = new ArrayHashSet();
-        ArrayHashSet screenSizeMMPool = new ArrayHashSet();
-        ArrayHashSet monitorModePool = new ArrayHashSet();
-        ArrayHashSet screenModePool = null;
-
-        screenModePool = new ArrayHashSet();
+    private ArrayHashSet<ScreenMode> collectNativeScreenModes(IntIntHashMap screenModesIdx2NativeId) {
+        ArrayHashSet<DimensionImmutable> resolutionPool   = new ArrayHashSet<DimensionImmutable>();
+        ArrayHashSet<SurfaceSize>        surfaceSizePool  = new ArrayHashSet<SurfaceSize>();
+        ArrayHashSet<DimensionImmutable> screenSizeMMPool = new ArrayHashSet<DimensionImmutable>();
+        ArrayHashSet<MonitorMode>        monitorModePool  = new ArrayHashSet<MonitorMode>();
+        ArrayHashSet<ScreenMode>         screenModePool   = new ArrayHashSet<ScreenMode>();
 
         int[] smProps = null;
         int num = 0;
@@ -502,7 +552,7 @@ public abstract class ScreenImpl extends Screen implements ScreenModeListener {
         ScreenModeStatus sms;
         ScreenModeStatus.lockScreenModeStatus();
         try {
-            sms = ScreenModeStatus.getScreenModeStatus(this.getFQName());
+            sms = ScreenModeStatus.getScreenModeStatus(getFQName());
             if(null != sms) {
                 sms.lock();
                 try {
@@ -510,7 +560,7 @@ public abstract class ScreenImpl extends Screen implements ScreenModeListener {
                         if(!sms.isOriginalMode()) {
                             setCurrentScreenMode(sms.getOriginalScreenMode());
                         }
-                        ScreenModeStatus.unmapScreenModeStatus(this.getFQName());
+                        ScreenModeStatus.unmapScreenModeStatus(getFQName());
                     }
                 } finally {
                     sms.unlock();
@@ -520,5 +570,38 @@ public abstract class ScreenImpl extends Screen implements ScreenModeListener {
             ScreenModeStatus.unlockScreenModeStatus();
         }
     }
+    
+    private final void shutdown() {
+        ScreenModeStatus sms = ScreenModeStatus.getScreenModeStatusUnlocked(getFQName());
+        if(null != sms) {
+            if(!sms.isOriginalMode()) {
+                try {
+                    setCurrentScreenModeImpl(sms.getOriginalScreenMode());
+                } catch (Throwable t) {
+                    // be quiet .. shutdown
+                }
+            }
+            ScreenModeStatus.unmapScreenModeStatusUnlocked(getFQName());
+        }            
+    }
+    private static final void shutdownAll() {
+        for(int i=0; i < screenList.size(); i++) {
+            ((ScreenImpl)screenList.get(i)).shutdown();
+        }
+    }
+    
+    private static synchronized void registerShutdownHook() {
+        final Thread shutdownHook = new Thread(new Runnable() {
+            public void run() {
+                ScreenImpl.shutdownAll();
+            }
+        });
+        AccessController.doPrivileged(new PrivilegedAction() {
+            public Object run() {
+                Runtime.getRuntime().addShutdownHook(shutdownHook);
+                return null;
+            }
+        });
+    }
 }
 
diff --git a/src/newt/classes/jogamp/newt/ScreenModeStatus.java b/src/newt/classes/jogamp/newt/ScreenModeStatus.java
index 4d8b8b5..be87ce0 100644
--- a/src/newt/classes/jogamp/newt/ScreenModeStatus.java
+++ b/src/newt/classes/jogamp/newt/ScreenModeStatus.java
@@ -30,30 +30,32 @@ package jogamp.newt;
 
 import com.jogamp.common.util.ArrayHashSet;
 import com.jogamp.common.util.IntIntHashMap;
+import com.jogamp.common.util.locks.LockFactory;
 import com.jogamp.common.util.locks.RecursiveLock;
 import com.jogamp.newt.Screen;
 import com.jogamp.newt.ScreenMode;
 import com.jogamp.newt.event.ScreenModeListener;
+
 import java.util.ArrayList;
 import java.util.HashMap;
 
 public class ScreenModeStatus {
     private static boolean DEBUG = Screen.DEBUG;
 
-    private RecursiveLock lock = new RecursiveLock();
-    private ArrayHashSet/*<ScreenMode>*/ screenModes;
+    private RecursiveLock lock = LockFactory.createRecursiveLock();
+    private ArrayHashSet<ScreenMode> screenModes;
     private IntIntHashMap screenModesIdx2NativeIdx;
     private ScreenMode currentScreenMode;
     private ScreenMode originalScreenMode;
-    private ArrayList/*<ScreenModeChangeListener>*/ listener = new ArrayList();
+    private ArrayList<ScreenModeListener> listener = new ArrayList<ScreenModeListener>();
 
-    private static HashMap screenFQN2ScreenModeStatus = new HashMap();
-    private static RecursiveLock screen2ScreenModeStatusLock = new RecursiveLock();
+    private static HashMap<String, ScreenModeStatus> screenFQN2ScreenModeStatus = new HashMap<String, ScreenModeStatus>();
+    private static RecursiveLock screen2ScreenModeStatusLock = LockFactory.createRecursiveLock();
 
     protected static void mapScreenModeStatus(String screenFQN, ScreenModeStatus sms) {
         screen2ScreenModeStatusLock.lock();
         try {
-            ScreenModeStatus _sms = (ScreenModeStatus) screenFQN2ScreenModeStatus.get(screenFQN);
+            ScreenModeStatus _sms = screenFQN2ScreenModeStatus.get(screenFQN);
             if( null != _sms ) {
                 throw new RuntimeException("ScreenModeStatus "+_sms+" already mapped to "+screenFQN);
             }
@@ -73,23 +75,29 @@ public class ScreenModeStatus {
     protected static void unmapScreenModeStatus(String screenFQN) {
         screen2ScreenModeStatusLock.lock();
         try {
-            ScreenModeStatus sms = (ScreenModeStatus) screenFQN2ScreenModeStatus.remove(screenFQN);
-            if(DEBUG) {
-                System.err.println("ScreenModeStatus.unmap "+screenFQN+" -> "+sms);
-            }
+            unmapScreenModeStatusUnlocked(screenFQN);
         } finally {
             screen2ScreenModeStatusLock.unlock();
         }
     }
+    protected static void unmapScreenModeStatusUnlocked(String screenFQN) {
+        ScreenModeStatus sms = screenFQN2ScreenModeStatus.remove(screenFQN);
+        if(DEBUG) {
+            System.err.println("ScreenModeStatus.unmap "+screenFQN+" -> "+sms);
+        }
+    }
 
     protected static ScreenModeStatus getScreenModeStatus(String screenFQN) {
         screen2ScreenModeStatusLock.lock();
         try {
-            return (ScreenModeStatus) screenFQN2ScreenModeStatus.get(screenFQN);
+            return getScreenModeStatusUnlocked(screenFQN);
         } finally {
             screen2ScreenModeStatusLock.unlock();
         }
     }
+    protected static ScreenModeStatus getScreenModeStatusUnlocked(String screenFQN) {
+        return screenFQN2ScreenModeStatus.get(screenFQN);
+    }
 
     protected static void lockScreenModeStatus() {
         screen2ScreenModeStatusLock.lock();
@@ -99,7 +107,7 @@ public class ScreenModeStatus {
         screen2ScreenModeStatusLock.unlock();
     }
     
-    public ScreenModeStatus(ArrayHashSet/*<ScreenMode>*/ screenModes,
+    public ScreenModeStatus(ArrayHashSet<ScreenMode> screenModes,
                             IntIntHashMap screenModesIdx2NativeIdx) {
         this.screenModes = screenModes;
         this.screenModesIdx2NativeIdx = screenModesIdx2NativeIdx;
@@ -135,7 +143,7 @@ public class ScreenModeStatus {
         }
     }
 
-    protected final ArrayHashSet/*<ScreenMode>*/ getScreenModes() {
+    protected final ArrayHashSet<ScreenMode> getScreenModes() {
         return screenModes;
     }
 
@@ -175,7 +183,7 @@ public class ScreenModeStatus {
         lock();
         try {
             for(int i=0; i<listener.size(); i++) {
-                ((ScreenModeListener)listener.get(i)).screenModeChangeNotify(desiredScreenMode);
+                listener.get(i).screenModeChangeNotify(desiredScreenMode);
             }
         } finally {
             unlock();
@@ -189,7 +197,7 @@ public class ScreenModeStatus {
                 this.currentScreenMode = currentScreenMode;
             }
             for(int i=0; i<listener.size(); i++) {
-                ((ScreenModeListener)listener.get(i)).screenModeChanged(currentScreenMode, success);
+                listener.get(i).screenModeChanged(currentScreenMode, success);
             }
         } finally {
             unlock();
@@ -203,5 +211,4 @@ public class ScreenModeStatus {
     protected final void unlock() throws RuntimeException {
         lock.unlock();
     }
-
 }
diff --git a/src/newt/classes/jogamp/newt/WindowImpl.java b/src/newt/classes/jogamp/newt/WindowImpl.java
index cb1c0ed..0091144 100644
--- a/src/newt/classes/jogamp/newt/WindowImpl.java
+++ b/src/newt/classes/jogamp/newt/WindowImpl.java
@@ -42,6 +42,7 @@ import com.jogamp.newt.NewtFactory;
 import com.jogamp.newt.Display;
 import com.jogamp.newt.Screen;
 import com.jogamp.newt.Window;
+import com.jogamp.common.util.locks.LockFactory;
 import com.jogamp.common.util.locks.RecursiveLock;
 import com.jogamp.newt.ScreenMode;
 import com.jogamp.newt.event.KeyEvent;
@@ -64,8 +65,9 @@ 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.DimensionReadOnly;
+import javax.media.nativewindow.util.DimensionImmutable;
 import javax.media.nativewindow.util.Insets;
+import javax.media.nativewindow.util.InsetsImmutable;
 import javax.media.nativewindow.util.Point;
 import javax.media.nativewindow.util.Rectangle;
 
@@ -73,21 +75,27 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
 {
     public static final boolean DEBUG_TEST_REPARENT_INCOMPATIBLE = Debug.isPropertyDefined("newt.test.Window.reparent.incompatible", true);
     
-    private RecursiveLock windowLock = new RecursiveLock();  // Window instance wide lock
-    private RecursiveLock surfaceLock = new RecursiveLock(); // Surface only lock
-    private long   windowHandle;
-    private ScreenImpl screen;
+    private volatile long windowHandle = 0; // lifecycle critical
+    private volatile boolean visible = false; // lifecycle critical
+    private RecursiveLock windowLock = LockFactory.createRecursiveLock();  // Window instance wide lock
+    private RecursiveLock surfaceLock = LockFactory.createRecursiveLock(); // Surface only lock
+    
+    private ScreenImpl screen; // never null after create - may change reference though (reparent)
     private boolean screenReferenceAdded = false;
-    private NativeWindow parentWindow;
-    private long parentWindowHandle;
-    protected AbstractGraphicsConfiguration config;
-    protected CapabilitiesImmutable capsRequested;
+    private NativeWindow parentWindow = null;
+    private long parentWindowHandle = 0;
+    protected AbstractGraphicsConfiguration config = null;
+    protected CapabilitiesImmutable capsRequested = null;
     protected CapabilitiesChooser capabilitiesChooser = null; // default null -> default
-    protected boolean fullscreen, visible, hasFocus;
-    protected int width, height, x, y;
-    protected int nfs_width, nfs_height, nfs_x, nfs_y; // non fullscreen dimensions ..
+    protected boolean fullscreen = false, hasFocus = false;    
+    protected int width = 128, height = 128; // client-area size w/o insets, default: may be overwritten by user
+    protected int x = -1, y = -1; // client-area pos w/o insets, default: undefined (allow WM to choose if not set by user)
+    protected Insets insets = new Insets(); // insets of decoration (if top-level && decorated)
+        
+    protected int nfs_width, nfs_height, nfs_x, nfs_y; // non fullscreen client-area size/pos w/o insets
     protected String title = "Newt Window";
     protected boolean undecorated = false;
+    protected boolean alwaysOnTop = false;
     private LifecycleHook lifecycleHook = null;
 
     private DestroyAction destroyAction = new DestroyAction();
@@ -99,37 +107,23 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
     private FocusRunnable focusAction = null;
 
     private Object surfaceUpdatedListenersLock = new Object();
-    private ArrayList surfaceUpdatedListeners;
+    private ArrayList<SurfaceUpdatedListener> surfaceUpdatedListeners = new ArrayList<SurfaceUpdatedListener>();
 
     private Object childWindowsLock = new Object();
-    private ArrayList childWindows;
+    private ArrayList<NativeWindow> childWindows = new ArrayList<NativeWindow>();
 
-    private ArrayList mouseListeners;
-    private int  mouseButtonPressed;  // current pressed mouse button number
-    private long lastMousePressed;    // last time when a mouse button was pressed
-    private int  lastMouseClickCount; // last mouse button click count
+    private ArrayList<MouseListener> mouseListeners = new ArrayList<MouseListener>();
+    private int  mouseButtonPressed = 0;  // current pressed mouse button number
+    private long lastMousePressed = 0;    // last time when a mouse button was pressed
+    private int  lastMouseClickCount = 0; // last mouse button click count
 
-    private ArrayList keyListeners;
+    private ArrayList<KeyListener> keyListeners = new ArrayList<KeyListener>();
 
-    private ArrayList windowListeners;
+    private ArrayList<WindowListener> windowListeners  = new ArrayList<WindowListener>();
     private boolean repaintQueued = false;
 
     ScreenModeListenerImpl screenModeListenerImpl = new ScreenModeListenerImpl();
 
-    private void initializeStates() {
-        invalidate(true);
-
-        childWindows = new ArrayList();
-        surfaceUpdatedListeners = new ArrayList();
-        windowListeners =  new ArrayList();
-        mouseListeners = new ArrayList();
-
-        mouseButtonPressed = 0; // current pressed mouse button number
-        lastMousePressed = 0; // last time when a mouse button was pressed
-        lastMouseClickCount = 0; // last mouse button click count
-        keyListeners = new ArrayList();
-    }
-
     // Workaround for initialization order problems on Mac OS X
     // between native Newt and (apparently) Fmod -- if Fmod is
     // initialized first then the connection to the window server
@@ -148,21 +142,23 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
     // Construction Methods
     //
 
-    private static Class getWindowClass(String type)
+    private static Class<?> getWindowClass(String type)
         throws ClassNotFoundException
     {
-        Class windowClass = NewtFactory.getCustomClass(type, "Window");
+        Class<?> windowClass = NewtFactory.getCustomClass(type, "Window");
         if(null==windowClass) {
-            if (NativeWindowFactory.TYPE_EGL.equals(type)) {
-                windowClass = Class.forName("jogamp.newt.opengl.kd.KDWindow");
+            if (NativeWindowFactory.TYPE_ANDROID.equals(type)) {
+                windowClass = Class.forName("jogamp.newt.driver.android.AndroidWindow");
+            } else if (NativeWindowFactory.TYPE_EGL.equals(type)) {
+                windowClass = Class.forName("jogamp.newt.driver.kd.KDWindow");
             } else if (NativeWindowFactory.TYPE_WINDOWS.equals(type)) {
-                windowClass = Class.forName("jogamp.newt.windows.WindowsWindow");
+                windowClass = Class.forName("jogamp.newt.driver.windows.WindowsWindow");
             } else if (NativeWindowFactory.TYPE_MACOSX.equals(type)) {
-                windowClass = Class.forName("jogamp.newt.macosx.MacWindow");
+                windowClass = Class.forName("jogamp.newt.driver.macosx.MacWindow");
             } else if (NativeWindowFactory.TYPE_X11.equals(type)) {
-                windowClass = Class.forName("jogamp.newt.x11.X11Window");
+                windowClass = Class.forName("jogamp.newt.driver.x11.X11Window");
             } else if (NativeWindowFactory.TYPE_AWT.equals(type)) {
-                windowClass = Class.forName("jogamp.newt.awt.AWTWindow");
+                windowClass = Class.forName("jogamp.newt.driver.awt.AWTWindow");
             } else {
                 throw new NativeWindowException("Unknown window type \"" + type + "\"");
             }
@@ -172,30 +168,30 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
 
     public static WindowImpl create(NativeWindow parentWindow, long parentWindowHandle, Screen screen, CapabilitiesImmutable caps) {
         try {
-            Class windowClass;
+            Class<?> windowClass;
             if(caps.isOnscreen()) {
                 windowClass = getWindowClass(screen.getDisplay().getType());
             } else {
                 windowClass = OffscreenWindow.class;
             }
             WindowImpl window = (WindowImpl) windowClass.newInstance();
-            window.initializeStates();
             window.parentWindow = parentWindow;
             window.parentWindowHandle = parentWindowHandle;
             window.screen = (ScreenImpl) screen;
             window.capsRequested = (CapabilitiesImmutable) caps.cloneMutable();
             window.setUndecorated(0!=parentWindowHandle);
+            window.instantiationFinished();
             return window;
         } catch (Throwable t) {
             t.printStackTrace();
             throw new NativeWindowException(t);
         }
     }
-
+    
     public static WindowImpl create(Object[] cstrArguments, Screen screen, CapabilitiesImmutable caps) {
         try {
-            Class windowClass = getWindowClass(screen.getDisplay().getType());
-            Class[] cstrArgumentTypes = getCustomConstructorArgumentTypes(windowClass);
+            Class<?> windowClass = getWindowClass(screen.getDisplay().getType());
+            Class<?>[] cstrArgumentTypes = getCustomConstructorArgumentTypes(windowClass);
             if(null==cstrArgumentTypes) {
                 throw new NativeWindowException("WindowClass "+windowClass+" doesn't support custom arguments in constructor");
             }
@@ -204,7 +200,6 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
                 throw new NativeWindowException("WindowClass "+windowClass+" constructor mismatch at argument #"+argsChecked+"; Constructor: "+getTypeStrList(cstrArgumentTypes)+", arguments: "+getArgsStrList(cstrArguments));
             }
             WindowImpl window = (WindowImpl) ReflectionUtil.createInstance( windowClass, cstrArgumentTypes, cstrArguments ) ;
-            window.initializeStates();
             window.screen = (ScreenImpl) screen;
             window.capsRequested = (CapabilitiesImmutable) caps.cloneMutable();
             return window;
@@ -244,13 +239,6 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
         void destroyActionInLock();
 
         /**
-         * Invoked after destruction from Window's invalidate method.<br>
-         * Called while window is locked.
-         * @param unrecoverable
-         */
-        void invalidate(boolean unrecoverable);
-
-        /**
          * Invoked for expensive modifications, ie while reparenting and ScreenMode change.<br>
          * No lock is hold when invoked.<br>
          *
@@ -272,22 +260,34 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
     private boolean createNative() {
         if(DEBUG_IMPLEMENTATION) {
             System.err.println("Window.createNative() START ("+getThreadName()+", "+this+")");
-        }
+        }        
         if( null != parentWindow && 
             NativeSurface.LOCK_SURFACE_NOT_READY >= parentWindow.lockSurface() ) {
-                throw new NativeWindowException("Parent surface lock: not ready: "+parentWindow);
+            throw new NativeWindowException("Parent surface lock: not ready: "+parentWindow);
+        }        
+        if( ( 0>x || 0>y ) && ( isUndecorated() || null != parentWindow ) ) {
+            // default child/undecorated window position is 0/0, if not set by user
+            x = 0; y = 0;
         }
         try {
             if(validateParentWindowHandle()) {
                 if(screenReferenceAdded) {
                     throw new InternalError("XXX");
                 }
-                screen.addReference();
-                screenReferenceAdded = true;
-                createNativeImpl();
-                setVisibleImpl(true, x, y, width, height);
-                screen.addScreenModeListener(screenModeListenerImpl);
-                setTitleImpl(title);
+                if(canCreateNativeImpl()) {
+                    screen.addReference();
+                    screenReferenceAdded = true;
+                    createNativeImpl();
+                    screen.addScreenModeListener(screenModeListenerImpl);
+                    setTitleImpl(title);
+                    if(waitForVisible(true, false)) {
+                        if(isFullscreen()) {
+                            fullscreen = false;
+                            FullScreenActionImpl fsa = new FullScreenActionImpl(true);
+                            fsa.run();
+                        }
+                    }
+                }
             }
         } finally {
             if(null!=parentWindow) {
@@ -297,7 +297,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
         if(DEBUG_IMPLEMENTATION) {
             System.err.println("Window.createNative() END ("+getThreadName()+", "+this+")");
         }
-        return 0 != windowHandle ;
+        return isNativeValid() ;
     }
 
     private void removeScreenReference() {
@@ -310,26 +310,6 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
         }
     }
 
-    private void closeAndInvalidate() {
-        windowLock.lock();
-        try {
-            if( null != screen ) {
-                if( 0 != windowHandle ) {
-                    screen.removeScreenModeListener(screenModeListenerImpl);
-                    closeNativeImpl();
-                    removeScreenReference();
-                }
-                Display dpy = screen.getDisplay();
-                if(null != dpy) {
-                    dpy.validateEDT();
-                }
-            }
-            invalidate(false);
-        } finally {
-            windowLock.unlock();
-        }
-    }
-
     private boolean validateParentWindowHandle() {
         if(null!=parentWindow) {
             parentWindowHandle = getNativeWindowHandle(parentWindow);
@@ -397,17 +377,35 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
     // Window: Native implementation
     //
 
+    /**
+     * Notifies the driver impl. that the instantiation is finished,
+     * ie. instance created and all fields set. 
+     */
+    protected void instantiationFinished() {
+        // nop
+    }
+    
+    protected boolean canCreateNativeImpl() {
+        return true; // default: always able to be created
+    }
+    
     /** 
      * The native implementation must set the native windowHandle.<br>
      *
+     * <p>
+     * The implementation shall respect the states {@link #isAlwaysOnTop()}/{@link #FLAG_IS_ALWAYSONTOP} and
+     * {@link #isUndecorated()}/{@link #FLAG_IS_UNDECORATED}, ie. the created window shall reflect those settings.
+     * </p>
+     * 
+     * <p>
      * The implementation should invoke the referenced java state callbacks
-     * to notify this Java object of state changes.
+     * to notify this Java object of state changes.</p>
      * 
      * @see #windowDestroyNotify()
-     * @see #focusChanged(boolean)
-     * @see #visibleChanged(boolean)
+     * @see #focusChanged(boolean, boolean)
+     * @see #visibleChanged(boolean, boolean)
      * @see #sizeChanged(int,int)
-     * @see #positionChanged(int,int)
+     * @see #positionChanged(boolean,int, int)
      * @see #windowDestroyNotify()
      */
     protected abstract void createNativeImpl();
@@ -415,39 +413,95 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
     protected abstract void closeNativeImpl();
 
     /** 
-     * The native implementation must invoke {@link #focusChanged(boolean)}
+     * 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}.
      * 
-     * @param force if true, bypass {@link #focusChanged(boolean)} and force focus request
+     * @param force if true, bypass {@link #focusChanged(boolean, boolean)} and force focus request
      */
     protected abstract void requestFocusImpl(boolean force);
 
-    /** 
-     * The native implementation must invoke {@link #visibleChanged(boolean)}
-     * to change the visibility state. This may happen asynchronous within 
-     * {@link #TIMEOUT_NATIVEWINDOW}.
-     */
-    protected abstract void setVisibleImpl(boolean visible, int x, int y, int width, int height);
+    public static final int FLAG_CHANGE_PARENTING       = 1 <<  0;
+    public static final int FLAG_CHANGE_DECORATION      = 1 <<  1;
+    public static final int FLAG_CHANGE_FULLSCREEN      = 1 <<  2;
+    public static final int FLAG_CHANGE_ALWAYSONTOP     = 1 <<  3;
+    public static final int FLAG_CHANGE_VISIBILITY      = 1 <<  4;
+    
+    public static final int FLAG_HAS_PARENT             = 1 <<  8;
+    public static final int FLAG_IS_UNDECORATED         = 1 <<  9;
+    public static final int FLAG_IS_FULLSCREEN          = 1 << 10;
+    public static final int FLAG_IS_ALWAYSONTOP         = 1 << 11;
+    public static final int FLAG_IS_VISIBLE             = 1 << 12;
 
     /**
      * The native implementation should invoke the referenced java state callbacks
      * to notify this Java object of state changes.
      * 
-     * @param x -1 if no position change requested, otherwise greater than zero
-     * @param y -1 if no position change requested, otherwise greater than zero
-     * @param width -1 if no size change requested, otherwise greater than zero
-     * @param height -1 if no size change requested, otherwise greater than zero
-     * @param parentChange true if reparenting requested, otherwise false
-     * @param fullScreenChange 0 if unchanged, -1 fullscreen off, 1 fullscreen on
-     * @param decorationChange 0 if unchanged, -1 undecorated, 1 decorated
+     * <p>
+     * Implementations shall set x/y to 0, in case it's negative. This could happen due
+     * to insets and positioning a decorated window to 0/0, which would place the frame
+     * outside of the screen.</p>
+     * 
+     * @param x client-area position, or <0 if unchanged
+     * @param y client-area position, or <0 if unchanged
+     * @param width client-area size, or <=0 if unchanged
+     * @param height client-area size, or <=0 if unchanged
+     * @param flags bitfield of change and status flags
      *
      * @see #sizeChanged(int,int)
-     * @see #positionChanged(int,int)
+     * @see #positionChanged(boolean,int, int)
      */
-    protected abstract boolean reconfigureWindowImpl(int x, int y, int width, int height, 
-                                                     boolean parentChange, int fullScreenChange, int decorationChange);
+    protected abstract boolean reconfigureWindowImpl(int x, int y, int width, int height, int flags);
+
+    protected int getReconfigureFlags(int changeFlags, boolean visible) {
+        return changeFlags |= ( ( 0 != getParentWindowHandle() ) ? FLAG_HAS_PARENT : 0 ) |
+                              ( isUndecorated() ? FLAG_IS_UNDECORATED : 0 ) |
+                              ( isFullscreen() ? FLAG_IS_FULLSCREEN : 0 ) |
+                              ( isAlwaysOnTop() ? FLAG_IS_ALWAYSONTOP : 0 ) |
+                              ( visible ? FLAG_IS_VISIBLE : 0 ) ;
+    }
+    protected static String getReconfigureFlagsAsString(StringBuffer sb, int flags) {
+        if(null == sb) { sb = new StringBuffer(); }
+        sb.append("[");
+        
+        if( 0 != ( FLAG_CHANGE_PARENTING & flags) ) {
+            sb.append("*");
+        }
+        sb.append("PARENT_");
+        sb.append(0 != ( FLAG_HAS_PARENT & flags));
+        sb.append(", ");
+        
+        if( 0 != ( FLAG_CHANGE_FULLSCREEN & flags) ) {
+            sb.append("*");
+        }
+        sb.append("FS_");
+        sb.append(0 != ( FLAG_IS_FULLSCREEN & flags));
+        sb.append(", ");
 
+        if( 0 != ( FLAG_CHANGE_DECORATION & flags) ) {
+            sb.append("*");
+        }
+        sb.append("UNDECOR_");
+        sb.append(0 != ( FLAG_IS_UNDECORATED & flags));
+        sb.append(", ");
+        
+        if( 0 != ( FLAG_CHANGE_ALWAYSONTOP & flags) ) {
+            sb.append("*");
+        }
+        sb.append("ALWAYSONTOP_");
+        sb.append(0 != ( FLAG_IS_ALWAYSONTOP & flags));
+        sb.append(", ");
+        
+        if( 0 != ( FLAG_CHANGE_VISIBILITY & flags) ) {
+            sb.append("*");
+        }
+        sb.append("VISIBLE_");
+        sb.append(0 != ( FLAG_IS_VISIBLE & flags));
+        
+        sb.append("]");
+        return sb.toString();
+    }
+    
     protected void setTitleImpl(String title) {}
 
     /**
@@ -458,6 +512,15 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
      * @return if not null, the screen location of the given coordinates
      */
     protected abstract Point getLocationOnScreenImpl(int x, int y);
+    
+    /** Triggered by user via {@link #getInsets()}.<br>
+     * Implementations may implement this hook to update the insets.<br> 
+     * However, they may prefer the event driven path via {@link #insetsChanged(boolean, int, int, int, int)}.
+     * 
+     * @see #getInsets()
+     * @see #insetsChanged(boolean, int, int, int, int)
+     */
+    protected abstract void updateInsetsImpl(Insets insets);
 
     //----------------------------------------------------------------------
     // NativeSurface
@@ -466,7 +529,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
     public final int lockSurface() {
         windowLock.lock();
         surfaceLock.lock();
-        int res = surfaceLock.getRecursionCount() == 0 ? LOCK_SURFACE_NOT_READY : LOCK_SUCCESS;
+        int res = surfaceLock.getHoldCount() == 1 ? LOCK_SURFACE_NOT_READY : LOCK_SUCCESS; // new lock ?
 
         if ( LOCK_SURFACE_NOT_READY == res ) {
             try {
@@ -495,7 +558,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
         surfaceLock.validateLocked();
         windowLock.validateLocked();
 
-        if (surfaceLock.getRecursionCount() == 0) {
+        if (surfaceLock.getHoldCount() == 1) {
             final AbstractGraphicsDevice adevice = config.getScreen().getDevice();
             try {
                 unlockSurfaceImpl();
@@ -601,11 +664,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
     //
 
     public final boolean isNativeValid() {
-        return null != getScreen() && 0 != getWindowHandle() ;
-    }
-
-    public final boolean isValid() {
-        return null != getScreen() ;
+        return 0 != windowHandle ;
     }
 
     public final Screen getScreen() {
@@ -625,21 +684,22 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
             if(!visible && null!=childWindows && childWindows.size()>0) {
               synchronized(childWindowsLock) {
                 for(int i = 0; i < childWindows.size(); i++ ) {
-                    NativeWindow nw = (NativeWindow) childWindows.get(i);
+                    NativeWindow nw = childWindows.get(i);
                     if(nw instanceof WindowImpl) {
                         ((WindowImpl)nw).setVisible(false);
                     }
                 }
               }
             }
-            if(0==windowHandle && visible) {
+            if(!isNativeValid() && visible) {
                 if( 0<width*height ) {
                     nativeWindowCreated = createNative();
-                    WindowImpl.this.waitForVisible(visible, true);
-                    madeVisible = visible;
+                    madeVisible = nativeWindowCreated;
                 }
+                // always flag visible, allowing a retry ..
+                WindowImpl.this.visible = true;                
             } else if(WindowImpl.this.visible != visible) {
-                if(0 != windowHandle) {
+                if(isNativeValid()) {
                     setVisibleImpl(visible, x, y, width, height);
                     WindowImpl.this.waitForVisible(visible, true);
                     madeVisible = visible;
@@ -650,10 +710,10 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
                 lifecycleHook.setVisibleActionPost(visible, nativeWindowCreated);
             }
 
-            if(0!=windowHandle && visible && null!=childWindows && childWindows.size()>0) {
+            if(isNativeValid() && visible && null!=childWindows && childWindows.size()>0) {
               synchronized(childWindowsLock) {
                 for(int i = 0; i < childWindows.size(); i++ ) {
-                    NativeWindow nw = (NativeWindow) childWindows.get(i);
+                    NativeWindow nw = childWindows.get(i);
                     if(nw instanceof WindowImpl) {
                         ((WindowImpl)nw).setVisible(true);
                     }
@@ -684,21 +744,17 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
     }
 
     public void setVisible(boolean visible) {
-        if(isValid()) {
-            if( 0==windowHandle && visible && 0>=width*height ) {
-                // fast-path: not realized yet, make visible, but zero size
-                return;
-            }
-
-            if(DEBUG_IMPLEMENTATION) {
-                String msg = "Window setVisible: START ("+getThreadName()+") "+x+"/"+y+" "+width+"x"+height+", fs "+fullscreen+", windowHandle "+toHexString(windowHandle)+", visible: "+this.visible+" -> "+visible+", parentWindowHandle "+toHexString(parentWindowHandle)+", parentWindow "+(null!=parentWindow);
-                System.err.println(msg);
-                Thread.dumpStack();
-            }
-            runOnEDTIfAvail(true, new VisibleAction(visible));
+        if(DEBUG_IMPLEMENTATION) {
+            System.err.println("Window setVisible: START ("+getThreadName()+") "+x+"/"+y+" "+width+"x"+height+", fs "+fullscreen+", windowHandle "+toHexString(windowHandle)+", visible: "+this.visible+" -> "+visible+", parentWindowHandle "+toHexString(parentWindowHandle)+", parentWindow "+(null!=parentWindow));
+            Thread.dumpStack();
         }
+        runOnEDTIfAvail(true, new VisibleAction(visible));
     }
-
+    
+    protected final void setVisibleImpl(boolean visible, int x, int y, int width, int height) {
+        reconfigureWindowImpl(x, y, width, height, getReconfigureFlags(FLAG_CHANGE_VISIBILITY, visible));           
+    }
+    
     private class SetSizeActionImpl implements Runnable {
         int width, height;
 
@@ -715,17 +771,17 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
                         String msg = "Window setSize: START "+WindowImpl.this.width+"x"+WindowImpl.this.height+" -> "+width+"x"+height+", fs "+fullscreen+", windowHandle "+toHexString(windowHandle)+", visible "+visible;
                         System.err.println(msg);
                     }
-                    if ( 0 != windowHandle && 0>=width*height && visible ) {
+                    if ( isNativeValid() && 0>=width*height && visible ) {
                         visibleAction=1; // invisible
                         WindowImpl.this.width = 0;
                         WindowImpl.this.height = 0;
-                    } else if ( 0 == windowHandle && 0<width*height && visible ) {
+                    } else if ( !isNativeValid() && 0<width*height && visible ) {
                         visibleAction = 2; // visible (create)
                         WindowImpl.this.width = width;
                         WindowImpl.this.height = height;
-                    } else if ( 0 != windowHandle ) {
+                    } else if ( isNativeValid() ) {
                         // this width/height will be set by windowChanged, called by the native implementation
-                        reconfigureWindowImpl(x, y, width, height, false, 0, 0);
+                        reconfigureWindowImpl(x, y, width, height, getReconfigureFlags(0, isVisible()));
                     } else {
                         WindowImpl.this.width = width;
                         WindowImpl.this.height = height;
@@ -745,9 +801,11 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
     }
 
     public void setSize(int width, int height) {
-        if(isValid()) {
-            runOnEDTIfAvail(true, new SetSizeActionImpl(width, height));
-        }
+        runOnEDTIfAvail(true, new SetSizeActionImpl(width, height));
+    }
+    
+    public void setTopLevelSize(int width, int height) {
+        setSize(width - getInsets().getTotalWidth(), height - getInsets().getTotalHeight());
     }
 
     private class DestroyAction implements Runnable {
@@ -761,17 +819,18 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
             }
             windowLock.lock();
             try {
-                if( !isValid() ) {
-                    return; // nop
+                if(DEBUG_IMPLEMENTATION) {
+                    String msg = "!!! Window DestroyAction() "+getThreadName();
+                    System.err.println(msg);
                 }
-
                 // Childs first ..
                 synchronized(childWindowsLock) {
                   if(childWindows.size()>0) {
                     // avoid ConcurrentModificationException: parent -> child -> parent.removeChild(this)
-                    ArrayList clonedChildWindows = (ArrayList) childWindows.clone();
+                    @SuppressWarnings("unchecked")
+                    ArrayList<NativeWindow> clonedChildWindows = (ArrayList<NativeWindow>) childWindows.clone();
                     while( clonedChildWindows.size() > 0 ) {
-                      NativeWindow nw = (NativeWindow) clonedChildWindows.remove(0);
+                      NativeWindow nw = clonedChildWindows.remove(0);
                       if(nw instanceof WindowImpl) {
                           ((WindowImpl)nw).sendWindowEvent(WindowEvent.EVENT_WINDOW_DESTROY_NOTIFY);
                           ((WindowImpl)nw).destroy();
@@ -787,7 +846,17 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
                     lifecycleHook.destroyActionInLock();
                 }
 
-                closeAndInvalidate();
+                if( null != screen ) {
+                    if( isNativeValid() ) {
+                        screen.removeScreenModeListener(screenModeListenerImpl);
+                        closeNativeImpl();
+                        removeScreenReference();
+                    }
+                    Display dpy = screen.getDisplay();
+                    if(null != dpy) {
+                        dpy.validateEDT();
+                    }
+                }
 
                 // send synced destroyed notification
                 sendWindowEvent(WindowEvent.EVENT_WINDOW_DESTROYED);
@@ -800,100 +869,37 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
             }
             if(animatorPaused) {
                 lifecycleHook.resumeRenderingAction();
-            }            
-        }
-    }
-
-    public void destroy() {
-        if( isValid() ) {
-            if(DEBUG_IMPLEMENTATION) {
-                String msg = "Window.destroy() START "+getThreadName();
-                System.err.println(msg);
-                //Exception ee = new Exception(msg);
-                //ee.printStackTrace();
-            }
-            runOnEDTIfAvail(true, destroyAction);
-        }
-    }
-
-    public final void invalidate() {
-        destroy();
-        invalidate(true);
-    }
-
-    /**
-     * @param unrecoverable If true, all states, size, position, parent handles,
-     * reference to it's Screen are reset.
-     * Otherwise you can recreate the window, via <code>setVisible(true)</code>.
-     * @see #invalidate()
-     * @see #destroy()
-     * @see #destroy(boolean)
-     */
-    protected void invalidate(boolean unrecoverable) {
-        windowLock.lock();
-        try {
-            if(DEBUG_IMPLEMENTATION || DEBUG_WINDOW_EVENT) {
-                String msg = "!!! Window Invalidate(unrecoverable: "+unrecoverable+") "+getThreadName();
-                System.err.println(msg);
-                // Throwable t = new Throwable(msg);
-                // t.printStackTrace();
-            }
-
-            // Childs first ..
-            synchronized(childWindowsLock) {
-              // avoid ConcurrentModificationException: parent -> child -> parent.removeChild(this)
-              if(null!=childWindows && childWindows.size()>0) {
-                ArrayList clonedChildWindows = (ArrayList) childWindows.clone();
-                while( clonedChildWindows.size() > 0 ) {
-                  NativeWindow nw = (NativeWindow) clonedChildWindows.remove(0);
-                  if(nw instanceof WindowImpl) {
-                      ((WindowImpl)nw).invalidate(unrecoverable);
-                  }
-                }
-              }
             }
-
-            if(null!=lifecycleHook) {
-                lifecycleHook.invalidate(unrecoverable);
-            }
-
-            windowHandle = 0;
+            setWindowHandle(0);
             visible = false;
             fullscreen = false;
             hasFocus = false;
-
-            if(unrecoverable) {
-                if(null!=parentWindow && parentWindow instanceof Window) {
-                    ((Window)parentWindow).removeChild(WindowImpl.this);
-                }
-                screen = null;
-
-                synchronized(childWindowsLock) {
-                    childWindows = null;
-                }
-                synchronized(surfaceUpdatedListenersLock) {
-                    surfaceUpdatedListeners = null;
-                }
-                windowListeners = null;
-                mouseListeners = null;
-                keyListeners = null;
-
-                parentWindowHandle = 0;
-                parentWindow = null;
-                capsRequested = null;
-                lifecycleHook = null;
-
-                // Default position and dimension will be re-set immediately by user
-                width  = 128;
-                height = 128;
-                x=0;
-                y=0;
-            }
-        } finally {
-            windowLock.unlock();
+            parentWindowHandle = 0;
+            
+            // these refs shall be kept alive - resurrection via setVisible(true)
+            /**
+            if(null!=parentWindow && parentWindow instanceof Window) {
+                ((Window)parentWindow).removeChild(WindowImpl.this);
+            }        
+            childWindows = null;
+            surfaceUpdatedListeners = null;
+            mouseListeners = null;
+            keyListeners = null;
+            capsRequested = null;
+            lifecycleHook = null;
+            
+            screen = null;           
+            windowListeners = null;
+            parentWindow = null;
+            */                        
         }
     }
 
+    public void destroy() {
+        visible = false; // Immediately mark synchronized visibility flag, avoiding possible recreation 
+        runOnEDTIfAvail(true, destroyAction);
+    }
+
     private class ReparentActionImpl implements Runnable, ReparentAction {
         NativeWindow newParentWindow;
         boolean forceDestroyCreate;
@@ -909,7 +915,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
             return reparentAction;
         }
 
-        private void setScreen(ScreenImpl newScreen) {
+        private void setScreen(ScreenImpl newScreen) { // never null !
             WindowImpl.this.removeScreenReference();
             screen = newScreen;
         }
@@ -1025,7 +1031,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
                     }
 
                     // Case: Top Window
-                    if( 0 == getParentWindowHandle() ) {
+                    if( 0 == parentWindowHandle ) {
                         // Already Top Window
                         reparentAction = ACTION_UNCHANGED;
                     } else if( !isNativeValid() || DEBUG_TEST_REPARENT_INCOMPATIBLE || forceDestroyCreate ) {
@@ -1068,71 +1074,75 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
                 }
 
                 if( ACTION_NATIVE_CREATION_PENDING == reparentAction ) {
+                    // make size and position persistent for proper recreation
+                    WindowImpl.this.x = x;
+                    WindowImpl.this.y = y;
+                    WindowImpl.this.width = width;
+                    WindowImpl.this.height = height;
                     return;
                 }
 
                 if( ACTION_NATIVE_REPARENTING == reparentAction ) {
                     DisplayImpl display = (DisplayImpl) screen.getDisplay();
                     display.dispatchMessagesNative(); // status up2date
+
                     if(wasVisible) {
                         setVisibleImpl(false, x, y, width, height);
                         WindowImpl.this.waitForVisible(false, true);
+                        // some composite WM behave slacky .. give 'em chance to change state -> invisible,
+                        // even though we do exactly that (KDE+Composite)
+                        try { Thread.sleep(100); } catch (InterruptedException e) { }
+                        display.dispatchMessagesNative(); // status up2date
                     }
 
                     // Lock parentWindow only during reparenting (attempt)
-                    NativeWindow parentWindowLocked = null;
+                    final NativeWindow parentWindowLocked;
                     if( null != parentWindow ) {
                         parentWindowLocked = parentWindow;
                         if( NativeSurface.LOCK_SURFACE_NOT_READY >= parentWindowLocked.lockSurface() ) {
-                            throw new NativeWindowException("Parent surface lock: not ready: "+parentWindow);
+                            throw new NativeWindowException("Parent surface lock: not ready: "+parentWindowLocked);
                         }
+                        // update native handle, locked state
+                        parentWindowHandle = parentWindowLocked.getWindowHandle();
+                    } else {
+                        parentWindowLocked = null;
                     }
                     boolean ok = false;
                     try {
-                        // write back mirrored values, to be able to detect satisfaction
-                        WindowImpl.this.x = x;
-                        WindowImpl.this.y = y;
-                        WindowImpl.this.width = width;
-                        WindowImpl.this.height = height;
-                        ok = reconfigureWindowImpl(x, y, width, height, true, 0, isUndecorated()?-1:1);
+                        ok = reconfigureWindowImpl(x, y, width, height, getReconfigureFlags(FLAG_CHANGE_PARENTING | FLAG_CHANGE_DECORATION, isVisible()));
                     } finally {
                         if(null!=parentWindowLocked) {
                             parentWindowLocked.unlockSurface();
                         }
                     }
 
-                    // set visible again, and revalidate 'ok',
-                    // since it has been experience that in some cases the reparented window gets hidden
+                    // set visible again
                     if(ok) {
                         display.dispatchMessagesNative(); // status up2date
                         if(wasVisible) {
                             setVisibleImpl(true, x, y, width, height);
                             ok = WindowImpl.this.waitForVisible(true, false);
                             display.dispatchMessagesNative(); // status up2date
-                            if( ok &&
-                                ( WindowImpl.this.x != x ||
-                                  WindowImpl.this.y != y ||
-                                  WindowImpl.this.width != width ||
-                                  WindowImpl.this.height != height ) )
-                            {
-                                if(DEBUG_IMPLEMENTATION) {
-                                    System.err.println("Window.reparent (reconfig)");
-                                }
-                                // reset pos/size .. due to some native impl flakyness
-                                reconfigureWindowImpl(x, y, width, height, false, 0, 0);
-                                display.dispatchMessagesNative(); // status up2date
-                                WindowImpl.this.waitForVisible(true, false);
-                                display.dispatchMessagesNative(); // status up2date
+                            if(ok) {
+                                ok = WindowImpl.this.waitForSize(width, height, false, TIMEOUT_NATIVEWINDOW);
+                            }
+                            if(ok) {
+                                requestFocusImpl(true);
+                                display.dispatchMessagesNative(); // status up2date                                
                             }
                         }
                     }
 
-                    if(ok) {
-                        if(wasVisible) {
-                            requestFocusImpl(true);
-                            display.dispatchMessagesNative(); // status up2date
-                        }
-                    } else {
+                    if(!ok || !wasVisible) {
+                        // make size and position persistent manual, 
+                        // since we don't have a WM feedback (invisible or recreation)
+                        WindowImpl.this.x = x;
+                        WindowImpl.this.y = y;
+                        WindowImpl.this.width = width;
+                        WindowImpl.this.height = height;                        
+                    }
+                    
+                    if(!ok) {
                         // native reparent failed -> try creation
                         if(DEBUG_IMPLEMENTATION) {
                             System.err.println("Window.reparent: native reparenting failed ("+getThreadName()+") windowHandle "+toHexString(windowHandle)+" parentWindowHandle "+toHexString(parentWindowHandle)+" -> "+toHexString(newParentWindowHandle)+" - Trying recreation");
@@ -1141,21 +1151,13 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
                         reparentAction = ACTION_NATIVE_CREATION ;
                     }
                 }
-
-                // write back mirrored values, ensuring persitence
-                // and not relying on native messaging
-                WindowImpl.this.x = x;
-                WindowImpl.this.y = y;
-                WindowImpl.this.width = width;
-                WindowImpl.this.height = height;
-
+                
                 if(DEBUG_IMPLEMENTATION) {
-                    System.err.println("Window.reparentWindow: END ("+getThreadName()+") windowHandle "+toHexString(windowHandle)+", visible: "+visible+", parentWindowHandle "+toHexString(parentWindowHandle)+", parentWindow "+ Display.hashCodeNullSafe(parentWindow)+" "+x+"/"+y+" "+width+"x"+height);
+                    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();
             }
-
             if(wasVisible) {
                 switch (reparentAction) {
                     case ACTION_NATIVE_REPARENTING:
@@ -1169,6 +1171,9 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
                         break;
                 }
             }
+            if(DEBUG_IMPLEMENTATION) {
+                System.err.println("Window.reparentWindow: END-X ("+getThreadName()+") windowHandle "+toHexString(windowHandle)+", visible: "+visible+", parentWindowHandle "+toHexString(parentWindowHandle)+", parentWindow "+ Display.hashCodeNullSafe(parentWindow)+" "+x+"/"+y+" "+width+"x"+height);
+            }
         }
     }
 
@@ -1192,13 +1197,9 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
     }
 
     public int reparentWindow(NativeWindow newParent, boolean forceDestroyCreate) {
-        int reparentActionStrategy = ReparentAction.ACTION_INVALID;
-        if(isValid()) {
-            ReparentActionImpl reparentAction = new ReparentActionImpl(newParent, forceDestroyCreate);
-            runOnEDTIfAvail(true, reparentAction);
-            reparentActionStrategy = reparentAction.getStrategy();
-        }
-        return reparentActionStrategy;
+        ReparentActionImpl reparentAction = new ReparentActionImpl(newParent, forceDestroyCreate);
+        runOnEDTIfAvail(true, reparentAction);
+        return reparentAction.getStrategy();
     }
 
     public CapabilitiesChooser setCapabilitiesChooser(CapabilitiesChooser chooser) {
@@ -1239,40 +1240,29 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
         public final void run() {
             windowLock.lock();
             try {
-                if(!fullscreen && isNativeValid() && WindowImpl.this.undecorated != undecorated) {
-                    WindowImpl.this.undecorated = undecorated;
-                    // mirror pos/size so native change notification can get overwritten
-                    int x = WindowImpl.this.x;
-                    int y = WindowImpl.this.y;
-                    int width = WindowImpl.this.width;
-                    int height = WindowImpl.this.height;
-
-                    if( 0 != windowHandle ) {
+                if(WindowImpl.this.undecorated != undecorated) {
+                  final boolean nativeUndecorationChange = !fullscreen && isNativeValid() && 
+                                                           isUndecorated() != undecorated ;
+                  
+                  // set current state
+                  WindowImpl.this.undecorated = undecorated;
+                  
+                  if( nativeUndecorationChange ) {
+                    // Change decoration on active window
+                      
+                    // Mirror pos/size so native change notification can get overwritten
+                    final int x = WindowImpl.this.x;
+                    final int y = WindowImpl.this.y;
+                    final int width = WindowImpl.this.width;
+                    final int height = WindowImpl.this.height;
+
+                    if( isNativeValid() ) {
                         DisplayImpl display = (DisplayImpl) screen.getDisplay();
                         display.dispatchMessagesNative(); // status up2date
-                        boolean wasVisible = isVisible();
-                        setVisibleImpl(false, x, y, width, height);
-                        WindowImpl.this.waitForVisible(false, true);
+                        reconfigureWindowImpl(x, y, width, height, getReconfigureFlags(FLAG_CHANGE_DECORATION, isVisible()));
                         display.dispatchMessagesNative(); // status up2date
-                        reconfigureWindowImpl(x, y, width, height, false, 0, undecorated?-1:1);
-                        display.dispatchMessagesNative(); // status up2date
-                        if(wasVisible) {
-                            setVisibleImpl(true, x, y, width, height);
-                            WindowImpl.this.waitForVisible(true, true);
-                            display.dispatchMessagesNative(); // status up2date
-                            if( WindowImpl.this.x != x ||
-                                WindowImpl.this.y != y ||
-                                WindowImpl.this.width != width ||
-                                WindowImpl.this.height != height ) 
-                            {
-                                // reset pos/size .. due to some native impl flakyness
-                                reconfigureWindowImpl(x, y, width, height, false, 0, 0);
-                                display.dispatchMessagesNative(); // status up2date
-                            }
-                            requestFocusImpl(true);
-                            display.dispatchMessagesNative(); // status up2date
-                        }
                     }
+                  }
                 }
             } finally {
                 windowLock.unlock();
@@ -1282,27 +1272,78 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
     }
 
     public void setUndecorated(boolean value) {
-        if(isValid()) {
-            runOnEDTIfAvail(true, new DecorationActionImpl(value));
-        }
+        runOnEDTIfAvail(true, new DecorationActionImpl(value));
     }
 
-    public boolean isUndecorated() {
+    public final boolean isUndecorated() {
         return 0 != parentWindowHandle || undecorated || fullscreen ;
     }
 
+    private class AlwaysOnTopActionImpl implements Runnable {
+        boolean alwaysOnTop;
+
+        private AlwaysOnTopActionImpl(boolean undecorated) {
+            this.alwaysOnTop = undecorated;
+        }
+
+        public final void run() {
+            windowLock.lock();
+            try {
+                if(WindowImpl.this.alwaysOnTop != alwaysOnTop) {
+                  final boolean nativeAlwaysOnTopChange = !fullscreen && isNativeValid() && 
+                                                           isAlwaysOnTop() != alwaysOnTop ;
+                  
+                  // set current state
+                  WindowImpl.this.alwaysOnTop = alwaysOnTop;
+                  
+                  if( nativeAlwaysOnTopChange ) {
+                    // Change decoration on active window
+                      
+                    // Mirror pos/size so native change notification can get overwritten
+                    final int x = WindowImpl.this.x;
+                    final int y = WindowImpl.this.y;
+                    final int width = WindowImpl.this.width;
+                    final int height = WindowImpl.this.height;
+
+                    if( isNativeValid() ) {
+                        DisplayImpl display = (DisplayImpl) screen.getDisplay();
+                        display.dispatchMessagesNative(); // status up2date
+                        reconfigureWindowImpl(x, y, width, height, getReconfigureFlags(FLAG_CHANGE_ALWAYSONTOP, isVisible()));
+                        display.dispatchMessagesNative(); // status up2date
+                    }
+                  }
+                }
+            } finally {
+                windowLock.unlock();
+            }
+            sendWindowEvent(WindowEvent.EVENT_WINDOW_RESIZED); // trigger a resize/relayout and repaint to listener
+        }
+    }
+
+    public final void setAlwaysOnTop(boolean value) {
+        runOnEDTIfAvail(true, new AlwaysOnTopActionImpl(value));
+    }
+    
+    public final boolean isAlwaysOnTop() {
+        return alwaysOnTop || fullscreen ;
+    }
+        
     public void requestFocus() {
         enqueueRequestFocus(true);
     }
 
-    public boolean hasFocus() {
+    public final boolean hasFocus() {
         return hasFocus;
     }
 
-    public Insets getInsets() {
-        return new Insets(0,0,0,0);
+    public final InsetsImmutable getInsets() {
+        if(isUndecorated()) {
+            return Insets.getZero();
+        }
+        updateInsetsImpl(insets);
+        return insets;
     }
-
+    
     public final int getWidth() {
         return width;
     }
@@ -1370,7 +1411,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
     //
 
     protected final long getParentWindowHandle() {
-        return parentWindowHandle;
+        return isFullscreen() ? 0 : parentWindowHandle;
     }
 
     @Override
@@ -1380,13 +1421,13 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
         sb.append(getClass().getName()+"[Config "+config+
                     "\n, "+screen+
                     "\n, ParentWindow "+parentWindow+
-                    "\n, ParentWindowHandle "+toHexString(parentWindowHandle)+
+                    "\n, ParentWindowHandle "+toHexString(parentWindowHandle)+" ("+(0!=getParentWindowHandle())+")"+
                     "\n, WindowHandle "+toHexString(getWindowHandle())+
                     "\n, SurfaceHandle "+toHexString(getSurfaceHandle())+ " (lockedExt window "+isWindowLockedByOtherThread()+", surface "+isSurfaceLockedByOtherThread()+")"+
                     "\n, Pos "+getX()+"/"+getY()+", size "+getWidth()+"x"+getHeight()+
                     "\n, Visible "+isVisible()+
-                    "\n, Undecorated "+undecorated+
-                    "\n, Fullscreen "+fullscreen+
+                    "\n, Undecorated "+undecorated+" ("+isUndecorated()+")"+
+                    "\n, AlwaysOnTop "+alwaysOnTop+", Fullscreen "+fullscreen+
                     "\n, WrappedWindow "+getWrappedWindow()+
                     "\n, ChildWindows "+childWindows.size());
 
@@ -1444,6 +1485,8 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
     public void setFocusAction(FocusRunnable focusAction) {
         this.focusAction = focusAction;
     }
+
+    /** Called by native requestFocusImpl() */
     protected boolean focusAction() {
         if(DEBUG_IMPLEMENTATION) {
             System.err.println("Window.focusAction() START - "+getThreadName()+", focusAction: "+focusAction+" - windowHandle "+toHexString(getWindowHandle()));
@@ -1476,8 +1519,8 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
                 if ( WindowImpl.this.x != x || WindowImpl.this.y != y ) {
                     if(!fullscreen) {
                         if(0!=windowHandle) {
-                            // this.x/this.y will be set by windowChanged, called by the native implementation
-                            reconfigureWindowImpl(x, y, -1, -1, false, 0, 0);
+                            // this.x/this.y will be set by sizeChanged, triggered by windowing event system
+                            reconfigureWindowImpl(x, y, width, height, getReconfigureFlags(0, isVisible()));
                         } else {
                             WindowImpl.this.x = x;
                             WindowImpl.this.y = y;
@@ -1491,9 +1534,11 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
     }
 
     public void setPosition(int x, int y) {
-        if(isValid()) {
-            runOnEDTIfAvail(true, new SetPositionActionImpl(x, y));
-        }
+        runOnEDTIfAvail(true, new SetPositionActionImpl(x, y));
+    }
+    
+    public void setTopLevelPosition(int x, int y) {
+        setPosition(x + getInsets().getLeftWidth(), y + getInsets().getTopHeight());
     }
 
     private class FullScreenActionImpl implements Runnable {
@@ -1506,66 +1551,88 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
         public final void run() {
             windowLock.lock();
             try {
-                if(isNativeValid() && WindowImpl.this.fullscreen != fullscreen) {
+              if(WindowImpl.this.fullscreen != fullscreen) {
+                final boolean nativeFullscreenChange = isNativeValid() && 
+                                                       isFullscreen() != fullscreen ;
+                  
+                // set current state
+                WindowImpl.this.fullscreen = fullscreen;
+
+                if( nativeFullscreenChange ) {
                     int x,y,w,h;
-                    WindowImpl.this.fullscreen = fullscreen;
+                    
                     if(fullscreen) {
+                        nfs_x = WindowImpl.this.x;
+                        nfs_y = WindowImpl.this.y;
+                        nfs_width = WindowImpl.this.width;
+                        nfs_height = WindowImpl.this.height;
                         x = 0; y = 0;
                         w = screen.getWidth();
                         h = screen.getHeight();
-                        nfs_width = width;
-                        nfs_height = height;
-                        nfs_x = x;
-                        nfs_y = y;
                     } else {
                         x = nfs_x;
                         y = nfs_y;
                         w = nfs_width;
                         h = nfs_height;
+                        
+                        if(null!=parentWindow) {
+                            // reset position to 0/0 within parent space
+                            x = 0;
+                            y = 0;
+        
+                            // refit if size is bigger than parent
+                            if( w > parentWindow.getWidth() ) {
+                                w = parentWindow.getWidth();
+                            }
+                            if( h > parentWindow.getHeight() ) {
+                                h = parentWindow.getHeight();
+                            }
+                        }
                     }
-                    if(DEBUG_IMPLEMENTATION || DEBUG_WINDOW_EVENT) {
+                    if(DEBUG_IMPLEMENTATION) {
                         System.err.println("Window fs: "+fullscreen+" "+x+"/"+y+" "+w+"x"+h+", "+isUndecorated()+", "+screen);
                     }
 
                     DisplayImpl display = (DisplayImpl) screen.getDisplay();
                     display.dispatchMessagesNative(); // status up2date
                     boolean wasVisible = isVisible();
-                    setVisibleImpl(false, x, y, width, height);
-                    WindowImpl.this.waitForVisible(false, true);
-                    display.dispatchMessagesNative(); // status up2date
-
-                    // write back mirrored values, to be able to detect satisfaction
-                    WindowImpl.this.x = x;
-                    WindowImpl.this.y = y;
-                    WindowImpl.this.width = w;
-                    WindowImpl.this.height = h;
-                    reconfigureWindowImpl(x, y, w, h, getParentWindowHandle()!=0, fullscreen?1:-1, isUndecorated()?-1:1);
+                    
+                    // Lock parentWindow only during reparenting (attempt)
+                    final NativeWindow parentWindowLocked;
+                    if( null != parentWindow ) {
+                        parentWindowLocked = parentWindow;
+                        if( NativeSurface.LOCK_SURFACE_NOT_READY >= parentWindowLocked.lockSurface() ) {
+                            throw new NativeWindowException("Parent surface lock: not ready: "+parentWindow);
+                        }
+                    } else {
+                        parentWindowLocked = null;
+                    }
+                    try {
+                        reconfigureWindowImpl(x, y, w, h, 
+                                              getReconfigureFlags( ( ( null != parentWindowLocked ) ? FLAG_CHANGE_PARENTING : 0 ) | 
+                                                                   FLAG_CHANGE_FULLSCREEN | FLAG_CHANGE_DECORATION, wasVisible) ); 
+                    } finally {
+                        if(null!=parentWindowLocked) {
+                            parentWindowLocked.unlockSurface();
+                        }
+                    }
                     display.dispatchMessagesNative(); // status up2date
-
+                    
                     if(wasVisible) {
-                        setVisibleImpl(true, x, y, width, height);
-                        boolean ok = WindowImpl.this.waitForVisible(true, true, Screen.SCREEN_MODE_CHANGE_TIMEOUT);
-                        display.dispatchMessagesNative(); // status up2date
-                        if( ok &&
-                            ( WindowImpl.this.x != x ||
-                              WindowImpl.this.y != y ||
-                              WindowImpl.this.width != w ||
-                              WindowImpl.this.height != h ) )
-                        {
-                            if(DEBUG_IMPLEMENTATION || DEBUG_WINDOW_EVENT) {
-                                System.err.println("Window fs (reconfig): "+x+"/"+y+" "+w+"x"+h+", "+screen);
-                            }
-                            // reset pos/size .. due to some native impl flakyness
-                            reconfigureWindowImpl(x, y, width, height, false, 0, 0);
-                            display.dispatchMessagesNative(); // status up2date
-                        }
+                        setVisibleImpl(true, x, y, w, h);
+                        WindowImpl.this.waitForVisible(true, false);
+                        display.dispatchMessagesNative(); // status up2date                                                        
+                        WindowImpl.this.waitForSize(w, h, false, TIMEOUT_NATIVEWINDOW);
+                        display.dispatchMessagesNative(); // status up2date                                                        
                         requestFocusImpl(true);
                         display.dispatchMessagesNative(); // status up2date
-                        if(DEBUG_IMPLEMENTATION || DEBUG_WINDOW_EVENT) {
-                            System.err.println("Window fs done");
+                        
+                        if(DEBUG_IMPLEMENTATION) {
+                            System.err.println("Window fs done: " + WindowImpl.this);
                         }
                     }
                 }
+              }    
             } finally {
                 windowLock.unlock();
             }
@@ -1574,9 +1641,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
     }
 
     public boolean setFullscreen(boolean fullscreen) {
-        if(isValid()) {
-            runOnEDTIfAvail(true, new FullScreenActionImpl(fullscreen));
-        }
+        runOnEDTIfAvail(true, new FullScreenActionImpl(fullscreen));
         return this.fullscreen;
     }
 
@@ -1584,7 +1649,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
         boolean animatorPaused = false;
 
         public void screenModeChangeNotify(ScreenMode sm) {
-            if(DEBUG_IMPLEMENTATION || DEBUG_WINDOW_EVENT) {
+            if(DEBUG_IMPLEMENTATION) {
                 System.err.println("Window.screenModeChangeNotify: "+sm);
             }
 
@@ -1594,12 +1659,12 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
         }
 
         public void screenModeChanged(ScreenMode sm, boolean success) {
-            if(DEBUG_IMPLEMENTATION || DEBUG_WINDOW_EVENT) {
+            if(DEBUG_IMPLEMENTATION) {
                 System.err.println("Window.screenModeChanged: "+sm+", success: "+success);
             }
 
             if(success) {
-                DimensionReadOnly screenSize = sm.getMonitorMode().getSurfaceSize().getResolution();
+                DimensionImmutable screenSize = sm.getMonitorMode().getSurfaceSize().getResolution();
                 if ( getHeight() > screenSize.getHeight()  ||
                      getWidth() > screenSize.getWidth() ) {
                     setSize(screenSize.getWidth(), screenSize.getHeight());
@@ -1617,18 +1682,18 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
     // Child Window Management
     // 
 
-    public final void removeChild(NativeWindow win) {
+    public final boolean removeChild(NativeWindow win) {
         synchronized(childWindowsLock) {
-            childWindows.remove(win);
+            return childWindows.remove(win);
         }
     }
 
-    public final void addChild(NativeWindow win) {
+    public final boolean addChild(NativeWindow win) {
         if (win == null) {
-            return;
+            return false;
         }
         synchronized(childWindowsLock) {
-            childWindows.add(win);
+            return childWindows.add(win);
         }
     }
 
@@ -1649,7 +1714,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
     }
 
     public void enqueueEvent(boolean wait, com.jogamp.newt.event.NEWTEvent event) {
-        if(isValid()) {
+        if(isNativeValid()) {
             ((DisplayImpl)getScreen().getDisplay()).enqueueEvent(wait, event);
         }
     }
@@ -1665,8 +1730,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
                         repaintQueued=true;
                         if(DEBUG_IMPLEMENTATION) {
                             System.err.println("Window.consumeEvent: queued "+e);
-                            // Exception ee = new Exception("Window.windowRepaint: "+e);
-                            // ee.printStackTrace();
+                            // Thread.dumpStack();
                         }
                         return false;
                     }
@@ -1680,9 +1744,8 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
                 // queue event in case window is locked, ie in operation
                 if( isWindowLocked() ) {
                     if(DEBUG_IMPLEMENTATION) {
-                        System.err.println("Window.consumeEvent: queued "+e);
-                        // Exception ee = new Exception("Window.windowRepaint: "+e);
-                        // ee.printStackTrace();
+                        // System.err.println("Window.consumeEvent: queued "+e);
+                        // Thread.dumpStack(); // JAU
                     }
                     return false;
                 }
@@ -1735,7 +1798,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
 
     public void removeAllSurfaceUpdatedListener() {
         synchronized(surfaceUpdatedListenersLock) {
-            surfaceUpdatedListeners = new ArrayList();
+            surfaceUpdatedListeners = new ArrayList<SurfaceUpdatedListener>();
         }
     }
 
@@ -1744,7 +1807,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
             if(0>index) { 
                 index = surfaceUpdatedListeners.size()-1; 
             }
-            return (SurfaceUpdatedListener) surfaceUpdatedListeners.get(index);
+            return surfaceUpdatedListeners.get(index);
         }
     }
 
@@ -1757,7 +1820,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
     public void surfaceUpdated(Object updater, NativeSurface ns, long when) {
         synchronized(surfaceUpdatedListenersLock) {
           for(int i = 0; i < surfaceUpdatedListeners.size(); i++ ) {
-            SurfaceUpdatedListener l = (SurfaceUpdatedListener) surfaceUpdatedListeners.get(i);
+            SurfaceUpdatedListener l = surfaceUpdatedListeners.get(i);
             l.surfaceUpdated(updater, ns, when);
           }
         }
@@ -1842,7 +1905,8 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
         if(l == null) {
             return;
         }
-        ArrayList clonedListeners = (ArrayList) mouseListeners.clone();
+        @SuppressWarnings("unchecked")
+        ArrayList<MouseListener> clonedListeners = (ArrayList<MouseListener>) mouseListeners.clone();
         if(0>index) { 
             index = clonedListeners.size(); 
         }
@@ -1854,17 +1918,19 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
         if (l == null) {
             return;
         }
-        ArrayList clonedListeners = (ArrayList) mouseListeners.clone();
+        @SuppressWarnings("unchecked")
+        ArrayList<MouseListener> clonedListeners = (ArrayList<MouseListener>) mouseListeners.clone();
         clonedListeners.remove(l);
         mouseListeners = clonedListeners;
     }
 
     public MouseListener getMouseListener(int index) {
-        ArrayList clonedListeners = (ArrayList) mouseListeners.clone();
+        @SuppressWarnings("unchecked")
+        ArrayList<MouseListener> clonedListeners = (ArrayList<MouseListener>) mouseListeners.clone();
         if(0>index) { 
             index = clonedListeners.size()-1; 
         }
-        return (MouseListener) clonedListeners.get(index);
+        return clonedListeners.get(index);
     }
 
     public MouseListener[] getMouseListeners() {
@@ -1877,7 +1943,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
         }
 
         for(int i = 0; i < mouseListeners.size(); i++ ) {
-            MouseListener l = (MouseListener) mouseListeners.get(i);
+            MouseListener l = mouseListeners.get(i);
             switch(e.getEventType()) {
                 case MouseEvent.EVENT_MOUSE_CLICKED:
                     l.mouseClicked(e);
@@ -1929,7 +1995,8 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
         if(l == null) {
             return;
         }
-        ArrayList clonedListeners = (ArrayList) keyListeners.clone();
+        @SuppressWarnings("unchecked")
+        ArrayList<KeyListener> clonedListeners = (ArrayList<KeyListener>) keyListeners.clone();
         if(0>index) { 
             index = clonedListeners.size();
         }
@@ -1941,17 +2008,19 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
         if (l == null) {
             return;
         }
-        ArrayList clonedListeners = (ArrayList) keyListeners.clone();
+        @SuppressWarnings("unchecked")
+        ArrayList<KeyListener> clonedListeners = (ArrayList<KeyListener>) keyListeners.clone();
         clonedListeners.remove(l);
         keyListeners = clonedListeners;
     }
 
     public KeyListener getKeyListener(int index) {
-        ArrayList clonedListeners = (ArrayList) keyListeners.clone();
+        @SuppressWarnings("unchecked")
+        ArrayList<KeyListener> clonedListeners = (ArrayList<KeyListener>) keyListeners.clone();
         if(0>index) { 
             index = clonedListeners.size()-1;
         }
-        return (KeyListener) clonedListeners.get(index);
+        return clonedListeners.get(index);
     }
 
     public KeyListener[] getKeyListeners() {
@@ -1963,7 +2032,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
             System.err.println("consumeKeyEvent: "+e);
         }
         for(int i = 0; i < keyListeners.size(); i++ ) {
-            KeyListener l = (KeyListener) keyListeners.get(i);
+            KeyListener l = keyListeners.get(i);
             switch(e.getEventType()) {
                 case KeyEvent.EVENT_KEY_PRESSED:
                     l.keyPressed(e);
@@ -2001,7 +2070,8 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
         if(l == null) {
             return;
         }
-        ArrayList clonedListeners = (ArrayList) windowListeners.clone();
+        @SuppressWarnings("unchecked")
+        ArrayList<WindowListener> clonedListeners = (ArrayList<WindowListener>) windowListeners.clone();
         if(0>index) { 
             index = clonedListeners.size(); 
         }
@@ -2013,17 +2083,19 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
         if (l == null) {
             return;
         }
-        ArrayList clonedListeners = (ArrayList) windowListeners.clone();
+        @SuppressWarnings("unchecked")
+        ArrayList<WindowListener> clonedListeners = (ArrayList<WindowListener>) windowListeners.clone();
         clonedListeners.remove(l);
         windowListeners = clonedListeners;
     }
 
     public WindowListener getWindowListener(int index) {
-        ArrayList clonedListeners = (ArrayList) windowListeners.clone();
+        @SuppressWarnings("unchecked")
+        ArrayList<WindowListener> clonedListeners = (ArrayList<WindowListener>) windowListeners.clone();
         if(0>index) { 
             index = clonedListeners.size()-1; 
         }
-        return (WindowListener) clonedListeners.get(index);
+        return clonedListeners.get(index);
     }
 
     public WindowListener[] getWindowListeners() {
@@ -2031,11 +2103,11 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
     }
 
     protected void consumeWindowEvent(WindowEvent e) {
-        if(DEBUG_WINDOW_EVENT) {
+        if(DEBUG_IMPLEMENTATION) {
             System.err.println("consumeWindowEvent: "+e+", visible "+isVisible()+" "+getX()+"/"+getY()+" "+getWidth()+"x"+getHeight());
         }
         for(int i = 0; i < windowListeners.size(); i++ ) {
-            WindowListener l = (WindowListener) windowListeners.get(i);
+            WindowListener l = windowListeners.get(i);
             switch(e.getEventType()) {
                 case WindowEvent.EVENT_WINDOW_RESIZED:
                     l.windowResized(e);
@@ -2066,24 +2138,24 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
         }
     }
 
-    /**
-     * @param focusGained
-     */
-    protected void focusChanged(boolean focusGained) {
+    /** Triggered by implementation's WM events to update the focus state. */
+    protected void focusChanged(boolean defer, boolean focusGained) {
         if(DEBUG_IMPLEMENTATION) {
-            System.err.println("Window.focusChanged: ("+getThreadName()+"): "+this.hasFocus+" -> "+focusGained+" - windowHandle "+toHexString(windowHandle)+" parentWindowHandle "+toHexString(parentWindowHandle));
+            System.err.println("Window.focusChanged: ("+getThreadName()+"): (defer: "+defer+") "+this.hasFocus+" -> "+focusGained+" - windowHandle "+toHexString(windowHandle)+" parentWindowHandle "+toHexString(parentWindowHandle));
         }
         hasFocus = focusGained;
-        if (focusGained) {
-            sendWindowEvent(WindowEvent.EVENT_WINDOW_GAINED_FOCUS);
+        final int evt = focusGained ? WindowEvent.EVENT_WINDOW_GAINED_FOCUS : WindowEvent.EVENT_WINDOW_LOST_FOCUS ; 
+        if(!defer) {
+            sendWindowEvent(evt);
         } else {
-            sendWindowEvent(WindowEvent.EVENT_WINDOW_LOST_FOCUS);
+            enqueueWindowEvent(false, evt);
         }
     }
 
-    protected void visibleChanged(boolean visible) {
+    /** Triggered by implementation's WM events to update the visibility state. */
+    protected void visibleChanged(boolean defer, boolean visible) {
         if(DEBUG_IMPLEMENTATION) {
-            System.err.println("Window.visibleChanged ("+getThreadName()+"): "+this.visible+" -> "+visible+" - windowHandle "+toHexString(windowHandle)+" parentWindowHandle "+toHexString(parentWindowHandle));
+            System.err.println("Window.visibleChanged ("+getThreadName()+"): (defer: "+defer+") "+this.visible+" -> "+visible+" - windowHandle "+toHexString(windowHandle)+" parentWindowHandle "+toHexString(parentWindowHandle));
         }
         this.visible = visible ;
     }
@@ -2096,45 +2168,106 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
         DisplayImpl display = (DisplayImpl) screen.getDisplay();
         for(long sleep = timeOut; 0<sleep && this.visible != visible; sleep-=10 ) {
             display.dispatchMessagesNative(); // status up2date
-            try {
-                Thread.sleep(10);
-            } catch (InterruptedException ie) {}
-            sleep -=10;
+            try { Thread.sleep(10); } catch (InterruptedException ie) {}
         }
         if(this.visible != visible) {
+            final String msg = "Visibility not reached as requested within "+timeOut+"ms : requested "+visible+", is "+this.visible; 
             if(failFast) {
-                throw new NativeWindowException("Visibility not reached as requested within "+timeOut+"ms : requested "+visible+", is "+this.visible);
+                throw new NativeWindowException(msg);
             } else if (DEBUG_IMPLEMENTATION) {
-                System.err.println("******* Visibility not reached as requested within "+timeOut+"ms : requested "+visible+", is "+this.visible);
+                System.err.println(msg);
             }
         }
         return this.visible == visible;
     }
 
-    protected void sizeChanged(int newWidth, int newHeight, boolean force) {
+    /** Triggered by implementation's WM events to update the client-area size w/o insets/decorations. */ 
+    protected void sizeChanged(boolean defer, int newWidth, int newHeight, boolean force) {
         if(force || width != newWidth || height != newHeight) {
             if(DEBUG_IMPLEMENTATION) {
-                System.err.println("Window.sizeChanged: ("+getThreadName()+"): force "+force+", "+width+"x"+height+" -> "+newWidth+"x"+newHeight+" - windowHandle "+toHexString(windowHandle)+" parentWindowHandle "+toHexString(parentWindowHandle));
+                System.err.println("Window.sizeChanged: ("+getThreadName()+"): (defer: "+defer+") force "+force+", "+width+"x"+height+" -> "+newWidth+"x"+newHeight+" - windowHandle "+toHexString(windowHandle)+" parentWindowHandle "+toHexString(parentWindowHandle));
+            }
+            if(0>newWidth || 0>newHeight) {
+                throw new NativeWindowException("Illegal width or height "+newWidth+"x"+newHeight+" (must be >= 0)");
             }
             width = newWidth;
             height = newHeight;
             if(isNativeValid()) {
-                sendWindowEvent(WindowEvent.EVENT_WINDOW_RESIZED);
+                if(!defer) {
+                    sendWindowEvent(WindowEvent.EVENT_WINDOW_RESIZED);
+                } else {
+                    enqueueWindowEvent(false, WindowEvent.EVENT_WINDOW_RESIZED);
+                }
             }
         }
     }
-
-    protected void positionChanged(int newX, int newY) {
-        if( 0==parentWindowHandle && ( x != newX || y != newY ) ) {
+    
+    private boolean waitForSize(int w, int h, boolean failFast, long timeOut) {
+        DisplayImpl display = (DisplayImpl) screen.getDisplay();
+        boolean reached = false;
+        for(long sleep = timeOut; !reached && 0<sleep; sleep-=10 ) {
+            if( w==getWidth() && h==getHeight() ) {
+                // reached pos/size
+                reached = true;
+            } else {
+                display.dispatchMessagesNative(); // status up2date
+                try { Thread.sleep(10); } catch (InterruptedException ie) {}
+            }
+        }
+        if(!reached) {
+            final String msg = "Size/Pos not reached as requested within "+timeOut+"ms : requested "+w+"x"+h+", is "+getWidth()+"x"+getHeight();
+            if(failFast) {
+                throw new NativeWindowException(msg);
+            } else if (DEBUG_IMPLEMENTATION) {
+                System.err.println(msg);
+                Thread.dumpStack();
+            }
+        }
+        return reached;
+    }
+    
+    /** Triggered by implementation's WM events to update the position. */ 
+    protected void positionChanged(boolean defer, int newX, int newY) {
+        if ( x != newX || y != newY ) {
             if(DEBUG_IMPLEMENTATION) {
-                System.err.println("Window.positionChanged: ("+getThreadName()+"): "+x+"/"+y+" -> "+newX+"/"+newY+" - windowHandle "+toHexString(windowHandle)+" parentWindowHandle "+toHexString(parentWindowHandle));
+                System.err.println("Window.positionChanged: ("+getThreadName()+"): (defer: "+defer+") "+x+"/"+y+" -> "+newX+"/"+newY+" - windowHandle "+toHexString(windowHandle)+" parentWindowHandle "+toHexString(parentWindowHandle));
             }
             x = newX;
             y = newY;
-            sendWindowEvent(WindowEvent.EVENT_WINDOW_MOVED);
+            if(!defer) {
+                sendWindowEvent(WindowEvent.EVENT_WINDOW_MOVED);
+            } else {
+                enqueueWindowEvent(false, WindowEvent.EVENT_WINDOW_MOVED);
+            }
         }
     }
 
+    /**
+     * Triggered by implementation's WM events to update the insets. 
+     * 
+     * @see #getInsets()
+     * @see #updateInsetsImpl(Insets)
+     */
+    protected void insetsChanged(boolean defer, int left, int right, int top, int bottom) {
+        if ( left >= 0 && right >= 0 && top >= 0 && bottom >= 0 ) {
+            if(isUndecorated()) {
+                if(DEBUG_IMPLEMENTATION) {
+                    System.err.println("Window.insetsChanged: skip insets change for undecoration mode");
+                }
+            } else if ( (left != insets.getLeftWidth() || right != insets.getRightWidth() || 
+                         top != insets.getTopHeight() || bottom != insets.getBottomHeight() )
+                       ) {
+                insets.setLeftWidth(left);
+                insets.setRightWidth(right);            
+                insets.setTopHeight(top);
+                insets.setBottomHeight(bottom);            
+                if(DEBUG_IMPLEMENTATION) {
+                    System.err.println("Window.insetsChanged: (defer: "+defer+") "+insets);
+                }
+            }
+        }
+    }
+    
     protected void windowDestroyNotify() {
         if(DEBUG_IMPLEMENTATION) {
             System.err.println("Window.windowDestroyNotify START "+getThreadName());
@@ -2143,7 +2276,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
         // send synced destroy notifications
         enqueueWindowEvent(true, WindowEvent.EVENT_WINDOW_DESTROY_NOTIFY);
 
-        if(handleDestroyNotify && DISPOSE_ON_CLOSE == defaultCloseOperation && isValid()) {
+        if(handleDestroyNotify && DISPOSE_ON_CLOSE == defaultCloseOperation) {
             destroy();
         }
 
@@ -2153,23 +2286,25 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
     }
 
     public void windowRepaint(int x, int y, int width, int height) {
+        windowRepaint(false, x, y, width, height); 
+    }
+    
+    /**
+     * Triggered by implementation's WM events to update the content
+     */ 
+    protected void windowRepaint(boolean defer, int x, int y, int width, int height) {
+        x = ( 0 > x ) ? this.x : x;
+        y = ( 0 > y ) ? this.y : y;
+        width = ( 0 >= width ) ? this.width : width;
+        height = ( 0 >= height ) ? this.height : height;
         if(DEBUG_IMPLEMENTATION) {
-            System.err.println("Window.windowRepaint "+getThreadName()+" - "+x+"/"+y+" "+width+"x"+height);
-            // Exception ee = new Exception("Window.windowRepaint: "+" - "+x+"/"+y+" "+width+"x"+height);
-            // ee.printStackTrace();
+            System.err.println("Window.windowRepaint "+getThreadName()+" (defer: "+defer+") "+x+"/"+y+" "+width+"x"+height);
         }
 
         if(isNativeValid()) {
-            if(0>width) {
-                width=this.width;
-            }
-            if(0>height) {
-                height=this.height;
-            }
-
             NEWTEvent e = new WindowUpdateEvent(WindowEvent.EVENT_WINDOW_REPAINT, this, System.currentTimeMillis(),
                                                 new Rectangle(x, y, width, height));
-            doEvent(false, false, e);
+            doEvent(defer, false, e);
         }
     }
 
@@ -2177,16 +2312,16 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
     // Reflection helper ..
     //
 
-    private static Class[] getCustomConstructorArgumentTypes(Class windowClass) {
-        Class[] argTypes = null;
+    private static Class<?>[] getCustomConstructorArgumentTypes(Class<?> windowClass) {
+        Class<?>[] argTypes = null;
         try {
-            Method m = windowClass.getDeclaredMethod("getCustomConstructorArgumentTypes", new Class[] {});
+            Method m = windowClass.getDeclaredMethod("getCustomConstructorArgumentTypes");
             argTypes = (Class[]) m.invoke(null, (Object[])null);
         } catch (Throwable t) {}
         return argTypes;
     }
 
-    private static int verifyConstructorArgumentTypes(Class[] types, Object[] args) {
+    private static int verifyConstructorArgumentTypes(Class<?>[] types, Object[] args) {
         if(types.length != args.length) {
             return -1;
         }
@@ -2209,7 +2344,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
         return sb.toString();
     }
 
-    private static String getTypeStrList(Class[] types) {
+    private static String getTypeStrList(Class<?>[] types) {
         StringBuilder sb = new StringBuilder();
         for(int i=0; i<types.length; i++) {
             sb.append(types[i]);
diff --git a/src/newt/classes/jogamp/newt/awt/AWTCanvas.java b/src/newt/classes/jogamp/newt/awt/AWTCanvas.java
deleted file mode 100644
index 01e8134..0000000
--- a/src/newt/classes/jogamp/newt/awt/AWTCanvas.java
+++ /dev/null
@@ -1,312 +0,0 @@
-/*
- * 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
- * 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 jogamp.newt.awt;
-
-import java.awt.Canvas;
-import java.awt.GraphicsDevice;
-import java.awt.GraphicsConfiguration;
-import java.lang.reflect.Method;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-
-import javax.media.nativewindow.AbstractGraphicsDevice;
-import javax.media.nativewindow.AbstractGraphicsScreen;
-import javax.media.nativewindow.CapabilitiesChooser;
-import javax.media.nativewindow.CapabilitiesImmutable;
-import javax.media.nativewindow.GraphicsConfigurationFactory;
-import javax.media.nativewindow.NativeWindowException;
-import javax.media.nativewindow.awt.AWTGraphicsConfiguration;
-import javax.media.nativewindow.awt.AWTGraphicsDevice;
-import javax.media.nativewindow.awt.AWTGraphicsScreen;
-import com.jogamp.newt.Window;
-
-public class AWTCanvas extends Canvas {
-  private GraphicsDevice device;
-  private GraphicsConfiguration chosen;
-  private AWTGraphicsConfiguration awtConfig;
-
-  private CapabilitiesChooser chooser=null;
-  private CapabilitiesImmutable capabilities;
-
-  private boolean displayConfigChanged=false;
-
-  public AWTCanvas(CapabilitiesImmutable capabilities, CapabilitiesChooser chooser) {
-    super();
-
-    if(null==capabilities) {
-        throw new NativeWindowException("Capabilities null");
-    }
-    this.capabilities=capabilities;
-    this.chooser=chooser;
-  }
-
-  public AWTGraphicsConfiguration getAWTGraphicsConfiguration() {
-    return awtConfig;
-  }
-
-  public boolean hasDeviceChanged() {
-    boolean res = displayConfigChanged;
-    displayConfigChanged=false;
-    return res;
-  }
-
-  public void addNotify() {
-
-    /**
-     * '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(capabilities, capabilities, chooser, device);
-    if(Window.DEBUG_IMPLEMENTATION) {
-        Exception e = new Exception("Info: Created Config: "+awtConfig);
-        e.printStackTrace();
-    }
-    if(null==awtConfig) {
-        throw new NativeWindowException("Error: NULL AWTGraphicsConfiguration");
-    }
-    chosen = awtConfig.getGraphicsConfiguration();
-
-    // before native peer is valid: X11
-    disableBackgroundErase();
-
-    // issues getGraphicsConfiguration() and creates the native peer
-    super.addNotify();
-
-    // after native peer is valid: Windows
-    disableBackgroundErase();
-
-    GraphicsConfiguration gc = super.getGraphicsConfiguration();
-    if(null!=gc) {
-        device = gc.getDevice();
-    }
-  }
-
-  public void removeNotify() {
-      try {
-        dispose();
-      } finally {
-        super.removeNotify();
-      }
-  }
-
-  private void dispose() {
-    if(null != awtConfig) {
-        AbstractGraphicsDevice adevice = awtConfig.getNativeGraphicsConfiguration().getScreen().getDevice();
-        String adeviceMsg=null;
-        if(Window.DEBUG_IMPLEMENTATION) {
-            adeviceMsg = adevice.toString();
-        }
-        boolean closed = adevice.close();
-        if(Window.DEBUG_IMPLEMENTATION) {
-            System.err.println("AWTCanvas.dispose(): closed GraphicsDevice: "+adeviceMsg+", result: "+closed);
-        }
-    }
-  }
-
-  /**
-   * Overridden to choose a GraphicsConfiguration on a parent container's
-   * GraphicsDevice because both devices
-   */
-  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.
-     *   - This canvas has been added to a component hierarchy and has
-     *     an ancestor with a non-null GC, but the native peer has not
-     *     yet been created. This means we can still choose the GC on
-     *     all platforms since the peer hasn't been created.
-     */
-    final GraphicsConfiguration gc = super.getGraphicsConfiguration();
-    /*
-     * 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.
-     */
-    if (gc != null && chosen != null && !chosen.equals(gc)) {
-      /*
-       * 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.
-         */
-        AWTGraphicsConfiguration config = chooseGraphicsConfiguration(
-                awtConfig.getChosenCapabilities(), awtConfig.getRequestedCapabilities(), chooser, gc.getDevice());
-        final GraphicsConfiguration compatible = (null!=config)?config.getGraphicsConfiguration():null;
-        if(Window.DEBUG_IMPLEMENTATION) {
-            Exception e = new Exception("Info: Call Stack: "+Thread.currentThread().getName());
-            e.printStackTrace();
-            System.err.println("!!! Created Config (n): HAVE    GC "+chosen);
-            System.err.println("!!! Created Config (n): THIS    GC "+gc);
-            System.err.println("!!! Created Config (n): Choosen GC "+compatible);
-            System.err.println("!!! Created Config (n): HAVE    CF "+awtConfig);
-            System.err.println("!!! Created Config (n): Choosen CF "+config);
-            System.err.println("!!! Created Config (n): EQUALS CAPS "+config.getChosenCapabilities().equals(awtConfig.getChosenCapabilities()));
-        }
-
-        if (compatible != null) {
-          /*
-           * Save the new GC for equals test above, and to return to
-           * any outside callers of this method.
-           */
-          chosen = compatible;
-          if( !config.getChosenCapabilities().equals(awtConfig.getChosenCapabilities())) {
-              displayConfigChanged=true;
-          } 
-          awtConfig = config;
-        }
-      }
-
-      /*
-       * If a compatible GC was not found in the block above, this will
-       * 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) {
-      /*
-       * The GC is null, which means we have no native peer, and are not
-       * part of a (realized) component hierarchy. So we return the
-       * desired visual that was selected in the constructor (possibly
-       * null).
-       */
-      return chosen;
-    }
-
-    /*
-     * Otherwise we have not explicitly selected a GC in the constructor, so
-     * just return what Canvas would have.
-     */
-    return gc;
-  }
-
-  private static AWTGraphicsConfiguration chooseGraphicsConfiguration(CapabilitiesImmutable capsChosen,
-                                                                      CapabilitiesImmutable capsRequested,
-                                                                      CapabilitiesChooser chooser,
-                                                                      GraphicsDevice device) {
-    AbstractGraphicsScreen aScreen = AWTGraphicsScreen.createScreenDevice(device, AbstractGraphicsDevice.DEFAULT_UNIT);
-    AWTGraphicsConfiguration config = (AWTGraphicsConfiguration)
-      GraphicsConfigurationFactory.getFactory(AWTGraphicsDevice.class).chooseGraphicsConfiguration(capsChosen,
-                                                                                                   capsRequested,
-                                                                                                   chooser, aScreen);
-    if (config == null) {
-      throw new NativeWindowException("Error: Couldn't fetch AWTGraphicsConfiguration");
-    }
-
-    return config;
-  }
-
-  // Disables the AWT's erasing of this Canvas's background on Windows
-  // in Java SE 6. This internal API is not available in previous
-  // releases, but the system property
-  // -Dsun.awt.noerasebackground=true can be specified to get similar
-  // results globally in previous releases.
-  private static boolean disableBackgroundEraseInitialized;
-  private static Method  disableBackgroundEraseMethod;
-  private void disableBackgroundErase() {
-    if (!disableBackgroundEraseInitialized) {
-      try {
-        AccessController.doPrivileged(new PrivilegedAction() {
-            public Object run() {
-              try {
-                Class clazz = getToolkit().getClass();
-                while (clazz != null && disableBackgroundEraseMethod == null) {
-                  try {
-                    disableBackgroundEraseMethod =
-                      clazz.getDeclaredMethod("disableBackgroundErase",
-                                              new Class[] { Canvas.class });
-                    disableBackgroundEraseMethod.setAccessible(true);
-                  } catch (Exception e) {
-                    clazz = clazz.getSuperclass();
-                  }
-                }
-              } catch (Exception e) {
-              }
-              return null;
-            }
-          });
-      } catch (Exception e) {
-      }
-      disableBackgroundEraseInitialized = true;
-      if(Window.DEBUG_IMPLEMENTATION) {
-        System.err.println("AWTCanvas: TK disableBackgroundErase method found: "+
-                (null!=disableBackgroundEraseMethod));
-      }
-    }
-    if (disableBackgroundEraseMethod != null) {
-      Throwable t=null;
-      try {
-        disableBackgroundEraseMethod.invoke(getToolkit(), new Object[] { this });
-      } catch (Exception e) {
-        // FIXME: workaround for 6504460 (incorrect backport of 6333613 in 5.0u10)
-        // throw new GLException(e);
-        t = e;
-      }
-      if(Window.DEBUG_IMPLEMENTATION) {
-        System.err.println("AWTCanvas: TK disableBackgroundErase error: "+t);
-      }
-    }
-  }
-}
diff --git a/src/newt/classes/jogamp/newt/awt/AWTDisplay.java b/src/newt/classes/jogamp/newt/awt/AWTDisplay.java
deleted file mode 100644
index 4c864c1..0000000
--- a/src/newt/classes/jogamp/newt/awt/AWTDisplay.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * 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
- * 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 jogamp.newt.awt;
-
-import javax.media.nativewindow.AbstractGraphicsDevice;
-import javax.media.nativewindow.awt.AWTGraphicsDevice;
-import com.jogamp.newt.NewtFactory;
-import jogamp.newt.DisplayImpl;
-
-public class AWTDisplay extends DisplayImpl {
-    public AWTDisplay() {
-    }
-
-    protected void createNativeImpl() {
-        aDevice = (AWTGraphicsDevice) AWTGraphicsDevice.createDevice(null, AbstractGraphicsDevice.DEFAULT_UNIT); // default
-    }
-
-    protected void setAWTGraphicsDevice(AWTGraphicsDevice d) {
-        aDevice = d;
-    }
-
-    protected void closeNativeImpl() { }
-
-    @Override
-    protected void createEDTUtil() {
-        if(NewtFactory.useEDT()) {
-            edtUtil = AWTEDTUtil.getSingleton();
-            if(DEBUG) {
-                System.err.println("AWTDisplay.createNative("+getFQName()+") Create EDTUtil: "+edtUtil.getClass().getName());
-            }
-        }
-    }
-
-    protected void dispatchMessagesNative() { /* nop */ }
-}
-
diff --git a/src/newt/classes/jogamp/newt/awt/AWTEDTUtil.java b/src/newt/classes/jogamp/newt/awt/AWTEDTUtil.java
deleted file mode 100644
index 7b638af..0000000
--- a/src/newt/classes/jogamp/newt/awt/AWTEDTUtil.java
+++ /dev/null
@@ -1,108 +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.newt.awt;
-
-import java.awt.EventQueue;
-import javax.media.nativewindow.NativeWindowException;
-import com.jogamp.newt.util.EDTUtil;
-import jogamp.newt.Debug;
-
-public class AWTEDTUtil implements EDTUtil {
-    public static final boolean DEBUG = Debug.debug("EDT");
-
-    private static AWTEDTUtil singletonMainThread = new AWTEDTUtil(); // one singleton MainThread
-
-    public static AWTEDTUtil getSingleton() {
-        return singletonMainThread;
-    }
-
-    AWTEDTUtil() {
-        // package private access ..
-    }
-
-    final public void reset() {
-        // nop
-    }
-
-    final public void start() {
-        // nop
-    }
-
-    final public boolean isCurrentThreadEDT() {
-        return EventQueue.isDispatchThread();
-    }
-
-    final public boolean isRunning() {
-        return true; // AWT is always running
-    }
-
-    final public void invokeStop(Runnable r) {
-        invokeImpl(true, r, true);
-    }
-
-    final public void invoke(boolean wait, Runnable r) {
-        invokeImpl(wait, r, false);
-    }
-
-    /**
-     * Public access to provide simple dispatching from other EDTUtil implementations
-     * @param wait true if invokeLater
-     * @param r the Runnable action
-     * @param stop true if EDT shall stop (ignored with AWT)
-     */
-    final public void invokeImpl(boolean wait, Runnable r, boolean stop) {
-        if(r == null) {
-            return;
-        }
-
-        // handover to AWT MainThread ..
-        try {
-            if ( isCurrentThreadEDT() ) {
-                r.run();
-                return;
-            }
-            if(wait) {
-                EventQueue.invokeAndWait(r);
-            } else {
-                EventQueue.invokeLater(r);
-            }
-        } catch (Exception e) {
-            throw new NativeWindowException(e);
-        }
-    }
-
-    final public void waitUntilIdle() {
-    }
-
-    final public void waitUntilStopped() {
-    }
-
-}
-
-
diff --git a/src/newt/classes/jogamp/newt/awt/AWTScreen.java b/src/newt/classes/jogamp/newt/awt/AWTScreen.java
deleted file mode 100644
index d059333..0000000
--- a/src/newt/classes/jogamp/newt/awt/AWTScreen.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * 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
- * 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 jogamp.newt.awt;
-
-import java.awt.DisplayMode;
-
-import jogamp.newt.ScreenImpl;
-import javax.media.nativewindow.awt.AWTGraphicsDevice;
-import javax.media.nativewindow.awt.AWTGraphicsScreen;
-
-public class AWTScreen extends ScreenImpl {
-    public AWTScreen() {
-    }
-
-    protected void createNativeImpl() {
-        aScreen = new AWTGraphicsScreen((AWTGraphicsDevice)display.getGraphicsDevice());
-        
-        final DisplayMode mode = ((AWTGraphicsDevice)getDisplay().getGraphicsDevice()).getGraphicsDevice().getDisplayMode();
-        if(null != mode) {
-            setScreenSize(mode.getWidth(), mode.getHeight());
-        }
-    }
-
-    protected void setAWTGraphicsScreen(AWTGraphicsScreen s) {
-        aScreen = s;
-    }
-
-    // done by AWTWindow ..
-    protected void setScreenSize(int w, int h) {
-        super.setScreenSize(w, h);
-    }
-
-    protected void closeNativeImpl() { }
-}
diff --git a/src/newt/classes/jogamp/newt/awt/AWTWindow.java b/src/newt/classes/jogamp/newt/awt/AWTWindow.java
deleted file mode 100644
index b07a9e3..0000000
--- a/src/newt/classes/jogamp/newt/awt/AWTWindow.java
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
- * 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
- * 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 jogamp.newt.awt;
-
-import java.awt.BorderLayout;
-import java.awt.Container;
-import java.awt.DisplayMode;
-import java.awt.Frame;
-import java.awt.Insets;
-import javax.media.nativewindow.NativeWindowException;
-import javax.media.nativewindow.awt.AWTGraphicsDevice;
-import javax.media.nativewindow.awt.AWTGraphicsScreen;
-import javax.media.nativewindow.util.Point;
-import jogamp.newt.WindowImpl;
-import com.jogamp.newt.event.awt.AWTKeyAdapter;
-import com.jogamp.newt.event.awt.AWTMouseAdapter;
-import com.jogamp.newt.event.awt.AWTWindowAdapter;
-
-/** An implementation of the Newt Window class built using the
-    AWT. This is provided for convenience of porting to platforms
-    supporting Java SE. */
-
-public class AWTWindow extends WindowImpl {
-
-    public AWTWindow() {
-        this(null);
-    }
-
-    public static Class[] getCustomConstructorArgumentTypes() {
-        return new Class[] { Container.class } ;
-    }
-
-    public AWTWindow(Container container) {
-        super();
-        title = "AWT NewtWindow";
-        this.container = container;
-        if(container instanceof Frame) {
-            frame = (Frame) container;
-        }
-    }
-
-    private boolean owningFrame;
-    private Container container = null;
-    private Frame frame = null; // same instance as container, just for impl. convenience
-    private AWTCanvas canvas;
-
-    protected void requestFocusImpl(boolean reparented) {
-        container.requestFocus();
-    }
-
-    @Override
-    protected void setTitleImpl(final String title) {
-        if (frame != null) {
-            frame.setTitle(title);
-        }
-    }
-
-    protected void createNativeImpl() {
-        if(0!=getParentWindowHandle()) {
-            throw new RuntimeException("Window parenting not supported in AWT, use AWTWindow(Frame) cstr for wrapping instead");
-        }
-
-        if(null==container) {
-            frame = new Frame();
-            container = frame;
-            owningFrame=true;
-        } else {
-            owningFrame=false;
-            width = container.getWidth();
-            height = container.getHeight();
-            x = container.getX();
-            y = container.getY();
-        }
-        if(null!=frame) {
-            frame.setTitle(getTitle());
-        }
-        container.setLayout(new BorderLayout());
-        canvas = new AWTCanvas(capsRequested, AWTWindow.this.capabilitiesChooser);
-
-        addWindowListener(new LocalWindowListener());
-
-        new AWTMouseAdapter(this).addTo(canvas); // fwd all AWT Mouse events to here
-        new AWTKeyAdapter(this).addTo(canvas); // fwd all AWT Key events to here
-
-        // canvas.addComponentListener(listener);
-        container.add(canvas, BorderLayout.CENTER);
-        container.setSize(width, height);
-        container.setLocation(x, y);
-        new AWTWindowAdapter(this).addTo(container); // fwd all AWT Window events to here
-
-        if(null!=frame) {
-            frame.setUndecorated(undecorated||fullscreen);
-        }
-
-        setWindowHandle(1); // just a marker ..
-    }
-
-    protected void closeNativeImpl() {
-        setWindowHandle(0); // just a marker ..
-        if(null!=container) {
-            container.setVisible(false);
-            container.remove(canvas);
-            container.setEnabled(false);
-            canvas.setEnabled(false);
-        }
-        if(owningFrame && null!=frame) {
-            frame.dispose();
-            owningFrame=false;
-            frame = null;
-        }
-    }
-
-    @Override
-    public boolean hasDeviceChanged() {
-        boolean res = canvas.hasDeviceChanged();
-        if(res) {
-            config = canvas.getAWTGraphicsConfiguration();
-            if (config == null) {
-                throw new NativeWindowException("Error Device change null GraphicsConfiguration: "+this);
-            }
-            updateDeviceData();
-        }
-        return res;
-    }
-
-    protected void setVisibleImpl(final boolean visible, int x, int y, int width, int height) {
-        container.setVisible(visible);
-
-        reconfigureWindowImpl(x, y, width, height, false, 0, 0);
-        config = canvas.getAWTGraphicsConfiguration();
-
-        if (config == null) {
-            throw new NativeWindowException("Error choosing GraphicsConfiguration creating window: "+this);
-        }
-
-        updateDeviceData();
-        visibleChanged(visible);
-    }
-
-    private void updateDeviceData() {
-        // propagate new info ..
-        ((AWTScreen)getScreen()).setAWTGraphicsScreen((AWTGraphicsScreen)config.getScreen());
-        ((AWTDisplay)getScreen().getDisplay()).setAWTGraphicsDevice((AWTGraphicsDevice)config.getScreen().getDevice());
-
-        final DisplayMode mode = ((AWTGraphicsDevice)config.getScreen().getDevice()).getGraphicsDevice().getDisplayMode();
-        if(null != mode) {
-            ((AWTScreen)getScreen()).setScreenSize(mode.getWidth(), mode.getHeight());
-        }
-        
-    }
-
-    @Override
-    public javax.media.nativewindow.util.Insets getInsets() {
-        final int insets[] = new int[] { 0, 0, 0, 0 };
-        Insets contInsets = container.getInsets();
-        insets[0] = contInsets.top;
-        insets[1] = contInsets.left;
-        insets[2] = contInsets.bottom;
-        insets[3] = contInsets.right;
-        return new javax.media.nativewindow.util.Insets(insets[0],insets[1],insets[2],insets[3]);
-    }
-
-    protected boolean reconfigureWindowImpl(final int x, final int y, final int width, final int height, final boolean parentChange, final int fullScreenChange, final int decorationChange) {
-        if(decorationChange!=0 && null!=frame) {
-            if(!container.isDisplayable()) {
-                frame.setUndecorated(isUndecorated());
-            } else {
-                if(DEBUG_IMPLEMENTATION || DEBUG_WINDOW_EVENT) {
-                    System.err.println("AWTWindow can't undecorate already created frame");
-                }
-            }
-        }
-        int _x=(x>=0)?x:AWTWindow.this.x;
-        int _y=(x>=0)?y:AWTWindow.this.y;
-        int _w=(width>0)?width:AWTWindow.this.width;
-        int _h=(height>0)?height:AWTWindow.this.height;
-
-        container.setLocation(_x, _y);
-        Insets insets = container.getInsets();
-        container.setSize(_w + insets.left + insets.right,
-                          _h + insets.top + insets.bottom);
-        return true;
-    }
-
-    protected Point getLocationOnScreenImpl(int x, int y) {
-        java.awt.Point ap = canvas.getLocationOnScreen();
-        ap.translate(x, y);
-        return new Point((int)(ap.getX()+0.5),(int)(ap.getY()+0.5));
-    }
-   
-    @Override
-    public Object getWrappedWindow() {
-        return canvas;
-    }
-
-    class LocalWindowListener extends com.jogamp.newt.event.WindowAdapter { 
-        @Override
-        public void windowMoved(com.jogamp.newt.event.WindowEvent e) {
-            if(null!=container) {
-                x = container.getX();
-                y = container.getY();
-            }
-        }
-        @Override
-        public void windowResized(com.jogamp.newt.event.WindowEvent e) {
-            if(null!=canvas) {
-                width = canvas.getWidth();
-                height = canvas.getHeight();
-            }
-        }
-    }
-}
diff --git a/src/newt/classes/jogamp/newt/awt/event/AWTNewtEventFactory.java b/src/newt/classes/jogamp/newt/awt/event/AWTNewtEventFactory.java
new file mode 100644
index 0000000..b9c8d2c
--- /dev/null
+++ b/src/newt/classes/jogamp/newt/awt/event/AWTNewtEventFactory.java
@@ -0,0 +1,146 @@
+/**
+ * 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.newt.awt.event;
+
+import com.jogamp.common.util.IntIntHashMap;
+
+public class AWTNewtEventFactory {
+
+    protected static final IntIntHashMap eventTypeAWT2NEWT;
+
+    static {
+        IntIntHashMap map = new IntIntHashMap();
+        map.setKeyNotFoundValue(0xFFFFFFFF);
+        // n/a map.put(java.awt.event.WindowEvent.WINDOW_OPENED, com.jogamp.newt.event.WindowEvent.EVENT_WINDOW_OPENED);
+        map.put(java.awt.event.WindowEvent.WINDOW_CLOSING, com.jogamp.newt.event.WindowEvent.EVENT_WINDOW_DESTROY_NOTIFY);
+        map.put(java.awt.event.WindowEvent.WINDOW_CLOSED, com.jogamp.newt.event.WindowEvent.EVENT_WINDOW_DESTROYED);
+        // n/a map.put(java.awt.event.WindowEvent.WINDOW_ICONIFIED, com.jogamp.newt.event.WindowEvent.EVENT_WINDOW_ICONIFIED);
+        // n/a map.put(java.awt.event.WindowEvent.WINDOW_DEICONIFIED, com.jogamp.newt.event.WindowEvent.EVENT_WINDOW_DEICONIFIED);
+        map.put(java.awt.event.WindowEvent.WINDOW_ACTIVATED, com.jogamp.newt.event.WindowEvent.EVENT_WINDOW_GAINED_FOCUS);
+        map.put(java.awt.event.WindowEvent.WINDOW_GAINED_FOCUS, com.jogamp.newt.event.WindowEvent.EVENT_WINDOW_GAINED_FOCUS);
+        map.put(java.awt.event.FocusEvent.FOCUS_GAINED, com.jogamp.newt.event.WindowEvent.EVENT_WINDOW_GAINED_FOCUS);
+        map.put(java.awt.event.WindowEvent.WINDOW_DEACTIVATED, com.jogamp.newt.event.WindowEvent.EVENT_WINDOW_LOST_FOCUS);
+        map.put(java.awt.event.WindowEvent.WINDOW_LOST_FOCUS, com.jogamp.newt.event.WindowEvent.EVENT_WINDOW_LOST_FOCUS);
+        map.put(java.awt.event.FocusEvent.FOCUS_LOST, com.jogamp.newt.event.WindowEvent.EVENT_WINDOW_LOST_FOCUS);
+        // n/a map.put(java.awt.event.WindowEvent.WINDOW_STATE_CHANGED, com.jogamp.newt.event.WindowEvent.EVENT_WINDOW_STATE_CHANGED);
+
+        map.put(java.awt.event.ComponentEvent.COMPONENT_MOVED, com.jogamp.newt.event.WindowEvent.EVENT_WINDOW_MOVED);
+        map.put(java.awt.event.ComponentEvent.COMPONENT_RESIZED, com.jogamp.newt.event.WindowEvent.EVENT_WINDOW_RESIZED);
+        // n/a map.put(java.awt.event.ComponentEvent.COMPONENT_SHOWN, com.jogamp.newt.event.WindowEvent.EVENT_WINDOW_SHOWN);
+        // n/a map.put(java.awt.event.ComponentEvent.COMPONENT_HIDDEN, com.jogamp.newt.event.WindowEvent.EVENT_WINDOW_HIDDEN);
+
+        map.put(java.awt.event.MouseEvent.MOUSE_CLICKED, com.jogamp.newt.event.MouseEvent.EVENT_MOUSE_CLICKED);
+        map.put(java.awt.event.MouseEvent.MOUSE_PRESSED, com.jogamp.newt.event.MouseEvent.EVENT_MOUSE_PRESSED);
+        map.put(java.awt.event.MouseEvent.MOUSE_RELEASED, com.jogamp.newt.event.MouseEvent.EVENT_MOUSE_RELEASED);
+        map.put(java.awt.event.MouseEvent.MOUSE_MOVED, com.jogamp.newt.event.MouseEvent.EVENT_MOUSE_MOVED);
+        map.put(java.awt.event.MouseEvent.MOUSE_ENTERED, com.jogamp.newt.event.MouseEvent.EVENT_MOUSE_ENTERED);
+        map.put(java.awt.event.MouseEvent.MOUSE_EXITED, com.jogamp.newt.event.MouseEvent.EVENT_MOUSE_EXITED);
+        map.put(java.awt.event.MouseEvent.MOUSE_DRAGGED, com.jogamp.newt.event.MouseEvent.EVENT_MOUSE_DRAGGED);
+        map.put(java.awt.event.MouseEvent.MOUSE_WHEEL, com.jogamp.newt.event.MouseEvent.EVENT_MOUSE_WHEEL_MOVED);
+
+        map.put(java.awt.event.KeyEvent.KEY_PRESSED, com.jogamp.newt.event.KeyEvent.EVENT_KEY_PRESSED);
+        map.put(java.awt.event.KeyEvent.KEY_RELEASED, com.jogamp.newt.event.KeyEvent.EVENT_KEY_RELEASED);
+        map.put(java.awt.event.KeyEvent.KEY_TYPED, com.jogamp.newt.event.KeyEvent.EVENT_KEY_TYPED);
+
+        eventTypeAWT2NEWT = map;
+    }
+
+    public static final int awtModifiers2Newt(int awtMods, boolean mouseHint) {
+        int newtMods = 0;
+        if ((awtMods & java.awt.event.InputEvent.SHIFT_MASK) != 0)     newtMods |= com.jogamp.newt.event.InputEvent.SHIFT_MASK;
+        if ((awtMods & java.awt.event.InputEvent.CTRL_MASK) != 0)      newtMods |= com.jogamp.newt.event.InputEvent.CTRL_MASK;
+        if ((awtMods & java.awt.event.InputEvent.META_MASK) != 0)      newtMods |= com.jogamp.newt.event.InputEvent.META_MASK;
+        if ((awtMods & java.awt.event.InputEvent.ALT_MASK) != 0)       newtMods |= com.jogamp.newt.event.InputEvent.ALT_MASK;
+        if ((awtMods & java.awt.event.InputEvent.ALT_GRAPH_MASK) != 0) newtMods |= com.jogamp.newt.event.InputEvent.ALT_GRAPH_MASK;
+        return newtMods;
+    }
+
+    public static final int awtButton2Newt(int awtButton) {
+        switch (awtButton) {
+            case java.awt.event.MouseEvent.BUTTON1: return com.jogamp.newt.event.MouseEvent.BUTTON1;
+            case java.awt.event.MouseEvent.BUTTON2: return com.jogamp.newt.event.MouseEvent.BUTTON2;
+            case java.awt.event.MouseEvent.BUTTON3: return com.jogamp.newt.event.MouseEvent.BUTTON3;
+        }
+        return 0;
+    }
+
+    public static final com.jogamp.newt.event.WindowEvent createWindowEvent(java.awt.event.WindowEvent event, com.jogamp.newt.Window newtSource) {
+        int type = eventTypeAWT2NEWT.get(event.getID());
+        if(0xFFFFFFFF != type) {
+            return new com.jogamp.newt.event.WindowEvent(type, ((null==newtSource)?(Object)event.getComponent():(Object)newtSource), System.currentTimeMillis());
+        }
+        return null; // no mapping ..
+    }
+
+    public static final com.jogamp.newt.event.WindowEvent createWindowEvent(java.awt.event.ComponentEvent event, com.jogamp.newt.Window newtSource) {
+        int type = eventTypeAWT2NEWT.get(event.getID());
+        if(0xFFFFFFFF != type) {
+            return new com.jogamp.newt.event.WindowEvent(type, (null==newtSource)?(Object)event.getComponent():(Object)newtSource, System.currentTimeMillis());
+        }
+        return null; // no mapping ..
+    }
+
+    public static final com.jogamp.newt.event.WindowEvent createWindowEvent(java.awt.event.FocusEvent event, com.jogamp.newt.Window newtSource) {
+        int type = eventTypeAWT2NEWT.get(event.getID());
+        if(0xFFFFFFFF != type) {
+            return new com.jogamp.newt.event.WindowEvent(type, (null==newtSource)?(Object)event.getComponent():(Object)newtSource, System.currentTimeMillis());
+        }
+        return null; // no mapping ..
+    }
+
+    public static final com.jogamp.newt.event.MouseEvent createMouseEvent(java.awt.event.MouseEvent event, com.jogamp.newt.Window newtSource) {
+        int type = eventTypeAWT2NEWT.get(event.getID());
+        if(0xFFFFFFFF != type) {
+            int rotation = 0;
+            if (event instanceof java.awt.event.MouseWheelEvent) {
+                rotation = ((java.awt.event.MouseWheelEvent)event).getWheelRotation();
+            }
+
+            return new com.jogamp.newt.event.MouseEvent(
+                           type, (null==newtSource)?(Object)event.getComponent():(Object)newtSource, event.getWhen(),
+                           awtModifiers2Newt(event.getModifiers(), true), 
+                           event.getX(), event.getY(), event.getClickCount(), 
+                           awtButton2Newt(event.getButton()), rotation);
+        }
+        return null; // no mapping ..
+    }
+
+    public static final com.jogamp.newt.event.KeyEvent createKeyEvent(java.awt.event.KeyEvent event, com.jogamp.newt.Window newtSource) {
+        int type = eventTypeAWT2NEWT.get(event.getID());
+        if(0xFFFFFFFF != type) {
+            return new com.jogamp.newt.event.KeyEvent(
+                           type, (null==newtSource)?(Object)event.getComponent():(Object)newtSource, event.getWhen(), 
+                           awtModifiers2Newt(event.getModifiers(), false), 
+                           event.getKeyCode(), event.getKeyChar());
+        }
+        return null; // no mapping ..
+    }
+
+}
+
diff --git a/src/newt/classes/jogamp/newt/awt/event/AWTParentWindowAdapter.java b/src/newt/classes/jogamp/newt/awt/event/AWTParentWindowAdapter.java
new file mode 100644
index 0000000..3588645
--- /dev/null
+++ b/src/newt/classes/jogamp/newt/awt/event/AWTParentWindowAdapter.java
@@ -0,0 +1,129 @@
+/**
+ * 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.newt.awt.event;
+
+import com.jogamp.newt.event.awt.AWTAdapter;
+import com.jogamp.newt.event.awt.AWTWindowAdapter;
+
+/**
+ * Specialized parent/client adapter,
+ * where the NEWT child window really gets resized,
+ * and the parent move window event gets discarded. */
+public class AWTParentWindowAdapter 
+    extends AWTWindowAdapter 
+    implements java.awt.event.HierarchyListener
+{
+    public AWTParentWindowAdapter(com.jogamp.newt.Window downstream) {
+        super(downstream);
+    }
+
+    public AWTAdapter addTo(java.awt.Component awtComponent) {
+        awtComponent.addHierarchyListener(this);
+        return super.addTo(awtComponent);
+    }
+
+    public AWTAdapter removeFrom(java.awt.Component awtComponent) {
+        awtComponent.removeHierarchyListener(this);
+        return super.removeFrom(awtComponent);
+    }
+
+    public void focusGained(java.awt.event.FocusEvent e) {
+        if(DEBUG_IMPLEMENTATION) {
+            System.err.println("AWT: focusGained: "+ e);
+        }
+    }
+
+    public void focusLost(java.awt.event.FocusEvent e) {
+        if(DEBUG_IMPLEMENTATION) {
+            System.err.println("AWT: focusLost: "+ e);
+        }
+    }
+
+    public void componentResized(java.awt.event.ComponentEvent e) {
+        // Need to resize the NEWT child window
+        // the resized event will be send via the native window feedback.
+        final java.awt.Component comp = e.getComponent();
+        if(DEBUG_IMPLEMENTATION) {
+            System.err.println("AWT: componentResized: "+comp);
+        }
+        getNewtWindow().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());
+                        }
+                    }
+                } else if(getNewtWindow().isVisible()) {
+                    getNewtWindow().setVisible(false);
+                }
+            }});
+    }
+
+    public void componentMoved(java.awt.event.ComponentEvent e) {
+        // no propagation to NEWT child window
+    }
+
+    public void windowActivated(java.awt.event.WindowEvent e) {
+        // no propagation to NEWT child window
+    }
+
+    public void windowDeactivated(java.awt.event.WindowEvent e) {
+        // no propagation to NEWT child window
+    }
+
+    public void hierarchyChanged(java.awt.event.HierarchyEvent e) {
+        if( null == getNewtEventListener() ) {
+            long bits = e.getChangeFlags();
+            final java.awt.Component changed = e.getChanged();
+            if( 0 != ( java.awt.event.HierarchyEvent.SHOWING_CHANGED & bits ) ) {
+                final boolean showing = changed.isShowing();
+                if(DEBUG_IMPLEMENTATION) {
+                    System.err.println("AWT: hierarchyChanged SHOWING_CHANGED: showing "+showing+", "+changed);
+                }
+                getNewtWindow().runOnEDTIfAvail(false, new Runnable() {
+                    public void run() {
+                        if(getNewtWindow().isVisible() != showing) {
+                            getNewtWindow().setVisible(showing);
+                        }
+                    }});
+            } 
+            if(DEBUG_IMPLEMENTATION) {
+                if( 0 != ( java.awt.event.HierarchyEvent.DISPLAYABILITY_CHANGED & bits ) ) {
+                    final boolean displayability = changed.isDisplayable();
+                    System.err.println("AWT: hierarchyChanged DISPLAYABILITY_CHANGED: displayability "+displayability+", "+changed);
+                }
+            }
+        }
+    }
+}
+
diff --git a/src/newt/classes/jogamp/newt/awt/event/NewtFactoryAWT.java b/src/newt/classes/jogamp/newt/awt/event/NewtFactoryAWT.java
new file mode 100644
index 0000000..aa98d3a
--- /dev/null
+++ b/src/newt/classes/jogamp/newt/awt/event/NewtFactoryAWT.java
@@ -0,0 +1,73 @@
+/**
+ * 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.newt.awt.event;
+
+
+import javax.media.nativewindow.*;
+import javax.media.nativewindow.awt.*;
+
+import com.jogamp.newt.NewtFactory;
+import jogamp.newt.Debug;
+
+public class NewtFactoryAWT extends NewtFactory {
+  public static final boolean DEBUG_IMPLEMENTATION = Debug.debug("Window");
+
+  /**
+   * Wraps an AWT component into a {@link javax.media.nativewindow.NativeWindow} utilizing the {@link javax.media.nativewindow.NativeWindowFactory},<br>
+   * using a configuration agnostic dummy {@link javax.media.nativewindow.DefaultGraphicsConfiguration}.<br>
+   * <p>
+   * The actual wrapping implementation is {@link jogamp.nativewindow.jawt.JAWTWindow}.<br></p>
+   * <p>
+   * Purpose of this wrapping is to access the AWT window handle,<br>
+   * not to actually render into it.<br>
+   * Hence the dummy configuration only.</p>
+   *
+   * @param awtCompObject must be of type java.awt.Component
+   */
+  public static NativeWindow getNativeWindow(Object awtCompObject, CapabilitiesImmutable capsRequested) {
+      if(null==awtCompObject) {
+        throw new NativeWindowException("Null AWT Component");
+      }
+      if( ! (awtCompObject instanceof java.awt.Component) ) {
+        throw new NativeWindowException("AWT Component not a java.awt.Component");
+      }
+      return getNativeWindow( (java.awt.Component) awtCompObject, capsRequested );
+  }
+
+  public static NativeWindow getNativeWindow(java.awt.Component awtComp, CapabilitiesImmutable capsRequested) {
+      DefaultGraphicsConfiguration config = AWTGraphicsConfiguration.create(awtComp, capsRequested, capsRequested);
+      NativeWindow awtNative = NativeWindowFactory.getNativeWindow(awtComp, config); // a JAWTWindow
+      if(DEBUG_IMPLEMENTATION) {
+        System.err.println("NewtFactoryAWT.getNativeWindow: "+awtComp+" -> "+awtNative);
+      }
+      return awtNative;
+  }
+}
+
diff --git a/src/newt/classes/jogamp/newt/awt/opengl/VersionApplet.java b/src/newt/classes/jogamp/newt/awt/opengl/VersionApplet.java
deleted file mode 100644
index 18524d0..0000000
--- a/src/newt/classes/jogamp/newt/awt/opengl/VersionApplet.java
+++ /dev/null
@@ -1,174 +0,0 @@
-package jogamp.newt.awt.opengl;
-
-import java.applet.Applet;
-import java.awt.BorderLayout;
-import java.awt.Container;
-import java.awt.Frame;
-import java.awt.GridLayout;
-import java.awt.TextArea;
-import java.awt.event.WindowAdapter;
-import java.awt.event.WindowEvent;
-
-import java.util.List;
-
-import javax.media.opengl.GLProfile;
-import javax.media.opengl.awt.GLCanvas;
-import javax.media.opengl.GL;
-import javax.media.opengl.GLAutoDrawable;
-import javax.media.opengl.GLCapabilities;
-import javax.media.opengl.GLCapabilitiesImmutable;
-import javax.media.opengl.GLDrawableFactory;
-import javax.media.opengl.GLEventListener;
-
-import com.jogamp.common.GlueGenVersion;
-import com.jogamp.common.os.Platform;
-import com.jogamp.common.util.VersionUtil;
-import com.jogamp.nativewindow.NativeWindowVersion;
-import com.jogamp.newt.NewtVersion;
-import com.jogamp.opengl.JoglVersion;
-
-public class VersionApplet extends Applet {
-  static {
-    GLProfile.initSingleton(false);
-  }
-  TextArea tareaVersion;
-  TextArea tareaCaps;
-  GLCanvas canvas;
-
-  public static void main(String[] args) {
-    Frame frame = new Frame("JOGL Version Applet");
-    frame.setSize(800, 600);
-    frame.setLayout(new BorderLayout());
-
-    VersionApplet va = new VersionApplet();
-    frame.addWindowListener(new ClosingWindowAdapter(frame, va));
-
-    va.init();
-    frame.add(va, BorderLayout.CENTER);
-    frame.validate();
-        
-    frame.setVisible(true);
-    va.start();
-  }
-
-  static class ClosingWindowAdapter extends WindowAdapter {
-    Frame f;
-    VersionApplet va;
-    public ClosingWindowAdapter(Frame f, VersionApplet va) {
-        this.f = f;
-        this.va = va;
-    }
-    public void windowClosing(WindowEvent ev) {
-        f.setVisible(false);
-        va.stop();
-        va.destroy();
-        f.remove(va);
-        f.dispose();
-        System.exit(0);
-    }
-  }
-
-  private synchronized void my_init() {
-    if(null != canvas) { return; }
-
-    GLProfile glp = GLProfile.getDefault();
-    GLCapabilities glcaps = new GLCapabilities(glp);
-
-    setLayout(new BorderLayout());
-    String s;
-
-    tareaVersion = new TextArea(120, 60);
-    s = VersionUtil.getPlatformInfo().toString();
-    System.err.println(s);
-    tareaVersion.append(s);
-
-    s = GlueGenVersion.getInstance().toString();
-    System.err.println(s);
-    tareaVersion.append(s);
-
-    s = NativeWindowVersion.getInstance().toString();
-    System.err.println(s);
-    tareaVersion.append(NativeWindowVersion.getInstance().toString());
-
-    s = JoglVersion.getInstance().toString();
-    System.err.println(s);
-    tareaVersion.append(s);
-
-    s = NewtVersion.getInstance().toString();
-    System.err.println(s);
-    tareaVersion.append(s);
-
-    tareaCaps = new TextArea(120, 20);
-    GLDrawableFactory factory = GLDrawableFactory.getFactory(glp);
-    List/*<GLCapabilitiesImmutable>*/ availCaps = factory.getAvailableCapabilities(null);
-    for(int i=0; i<availCaps.size(); i++) {
-        s = ((GLCapabilitiesImmutable) availCaps.get(i)).toString();
-        System.err.println(s);
-        tareaCaps.append(s);
-        tareaCaps.append(Platform.getNewline());
-    }
-
-    Container grid = new Container();
-    grid.setLayout(new GridLayout(2, 1));
-    grid.add(tareaVersion);
-    grid.add(tareaCaps);
-    add(grid, BorderLayout.CENTER);
-
-    canvas = new GLCanvas(glcaps);
-    canvas.addGLEventListener(new GLInfo());
-    canvas.setSize(10, 10);
-    add(canvas, BorderLayout.SOUTH);
-    validate();
-  }
-
-  private synchronized void my_release() {
-      if(null!=canvas) {
-          remove(canvas);
-          canvas.destroy();
-          canvas = null;
-          remove(tareaVersion);
-          tareaVersion=null;
-      }
-  }
-
-  public void init() {
-    System.err.println("VersionApplet: init() - begin");
-    my_init();
-    System.err.println("VersionApplet: init() - end");
-  }
-
-  public void start() {
-    System.err.println("VersionApplet: start() - begin");
-    System.err.println("VersionApplet: start() - end");
-  }
-
-  public void stop() {
-    System.err.println("VersionApplet: stop() - begin");
-    System.err.println("VersionApplet: stop() - end");
-  }
-
-  public void destroy() {
-    System.err.println("VersionApplet: destroy() - start");
-    my_release();
-    System.err.println("VersionApplet: destroy() - end");
-  }
-
-  class GLInfo implements GLEventListener {
-    public void init(GLAutoDrawable drawable) {
-        GL gl = drawable.getGL();
-        String s = JoglVersion.getGLInfo(gl, null).toString();
-        System.err.println(s);
-        tareaVersion.append(s);
-    }
-
-    public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
-    }
-
-    public void display(GLAutoDrawable drawable) {
-    }
-
-    public void dispose(GLAutoDrawable drawable) {
-    }
-  }
-
-}
diff --git a/src/newt/classes/jogamp/newt/driver/android/AndroidDisplay.java b/src/newt/classes/jogamp/newt/driver/android/AndroidDisplay.java
new file mode 100644
index 0000000..72c0bce
--- /dev/null
+++ b/src/newt/classes/jogamp/newt/driver/android/AndroidDisplay.java
@@ -0,0 +1,79 @@
+/**
+ * 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 jogamp.newt.driver.android;
+
+import jogamp.newt.*;
+import jogamp.opengl.egl.*;
+
+import javax.media.nativewindow.*;
+import javax.media.nativewindow.egl.*;
+import javax.media.opengl.GLException;
+
+public class AndroidDisplay extends jogamp.newt.DisplayImpl {
+    static {
+        NEWTJNILibLoader.loadNEWT();
+
+        if (!AndroidWindow.initIDs0()) {
+            throw new NativeWindowException("Failed to initialize Android NEWT Windowing library");
+        }
+    }
+
+    public static void initSingleton() {
+        // just exist to ensure static init has been run
+    }
+
+
+    public AndroidDisplay() {
+    }
+
+    protected void createNativeImpl() {
+        // EGL Device
+        final long eglDisplay = EGL.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("Android Display.createNativeImpl: eglDisplay(EGL_DEFAULT_DISPLAY): 0x"+Long.toHexString(eglDisplay));
+        }
+        if (!EGL.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);        
+    }
+
+    protected void closeNativeImpl() {
+        if (aDevice.getHandle() != EGL.EGL_NO_DISPLAY) {
+            EGL.eglTerminate(aDevice.getHandle());
+        }
+    }
+
+    protected void dispatchMessagesNative() {
+        // n/a .. DispatchMessages();
+    }    
+}
+
diff --git a/src/newt/classes/jogamp/newt/driver/android/AndroidScreen.java b/src/newt/classes/jogamp/newt/driver/android/AndroidScreen.java
new file mode 100644
index 0000000..ce6a9c5
--- /dev/null
+++ b/src/newt/classes/jogamp/newt/driver/android/AndroidScreen.java
@@ -0,0 +1,124 @@
+/**
+ * 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 jogamp.newt.driver.android;
+
+import javax.media.nativewindow.*;
+
+import com.jogamp.newt.ScreenMode;
+import com.jogamp.newt.util.ScreenModeUtil;
+
+import android.content.Context;
+import android.graphics.PixelFormat;
+import android.util.DisplayMetrics;
+import android.view.Surface;
+import android.view.WindowManager;
+
+public class AndroidScreen extends jogamp.newt.ScreenImpl {
+
+    static {
+        AndroidDisplay.initSingleton();
+    }
+
+    public AndroidScreen() {
+    }
+
+    protected void createNativeImpl() {
+        aScreen = new DefaultGraphicsScreen(getDisplay().getGraphicsDevice(), screen_idx);
+    }
+
+    protected void closeNativeImpl() { }
+
+    protected ScreenMode getCurrentScreenModeImpl() {
+        final Context ctx = jogamp.common.os.android.StaticContext.getContext();
+        final WindowManager wmgr = (WindowManager) ctx.getSystemService(Context.WINDOW_SERVICE);
+        final DisplayMetrics outMetrics = new DisplayMetrics();
+        final android.view.Display aDisplay = wmgr.getDefaultDisplay();
+        aDisplay.getMetrics(outMetrics);
+        
+        final int arot = aDisplay.getRotation();
+        final int nrot = androidRotation2NewtRotation(arot);
+        int[] props = new int[ScreenModeUtil.NUM_SCREEN_MODE_PROPERTIES_ALL];
+        int offset = 1; // set later for verification of iterator
+        offset = getScreenSize(outMetrics, nrot, props, offset);
+        offset = getBpp(aDisplay, props, offset); 
+        offset = getScreenSizeMM(outMetrics, props, offset);
+        props[offset++] = (int) aDisplay.getRefreshRate();
+        props[offset++] = nrot;
+        props[offset - ScreenModeUtil.NUM_SCREEN_MODE_PROPERTIES_ALL] = offset; // count
+        return ScreenModeUtil.streamIn(props, 0);
+    }
+    
+    //----------------------------------------------------------------------
+    // Internals only
+    //
+    static int androidRotation2NewtRotation(int arot) {
+        switch(arot) {
+            case Surface.ROTATION_270: return ScreenMode.ROTATE_270;
+            case Surface.ROTATION_180: return ScreenMode.ROTATE_180;
+            case Surface.ROTATION_90: return ScreenMode.ROTATE_90;
+            case Surface.ROTATION_0:
+        }
+        return ScreenMode.ROTATE_0;
+    }
+    static int getScreenSize(DisplayMetrics outMetrics, int nrot, int[] props, int offset) {
+        // swap width and height, since Android reflects rotated dimension, we don't
+        if (ScreenMode.ROTATE_90 == nrot || ScreenMode.ROTATE_270 == nrot) {
+            props[offset++] = outMetrics.heightPixels;
+            props[offset++] = outMetrics.widthPixels;
+        } else {        
+            props[offset++] = outMetrics.widthPixels;
+            props[offset++] = outMetrics.heightPixels;
+        }
+        return offset;
+    }    
+    static int getBpp(android.view.Display aDisplay, int[] props, int offset) {
+        int bpp;
+        switch(aDisplay.getPixelFormat()) {
+            case PixelFormat.RGBA_8888: bpp=32; break;
+            case PixelFormat.RGBX_8888: bpp=32; break;
+            case PixelFormat.RGB_888:   bpp=24; break;
+            case PixelFormat.RGB_565:   bpp=16; break;
+            case PixelFormat.RGBA_5551: bpp=16; break;
+            case PixelFormat.RGBA_4444: bpp=16; break;
+            case PixelFormat.RGB_332:   bpp= 8; break;
+            default: bpp=32;   
+        }            
+        props[offset++] = bpp;        
+        return offset;
+    }
+    static int getScreenSizeMM(DisplayMetrics outMetrics, int[] props, int offset) {
+        final float iw = (float) outMetrics.widthPixels / outMetrics.xdpi;
+        final float ih = (float) outMetrics.heightPixels / outMetrics.xdpi;
+        final float mmpi = 25.4f;
+        props[offset++] = (int) ((iw * mmpi)+0.5);
+        props[offset++]   = (int) ((ih * mmpi)+0.5);
+        return offset;
+    }    
+}
+
diff --git a/src/newt/classes/jogamp/newt/driver/android/AndroidWindow.java b/src/newt/classes/jogamp/newt/driver/android/AndroidWindow.java
new file mode 100644
index 0000000..cd3cb48
--- /dev/null
+++ b/src/newt/classes/jogamp/newt/driver/android/AndroidWindow.java
@@ -0,0 +1,412 @@
+/**
+ * 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 jogamp.newt.driver.android;
+
+import java.nio.IntBuffer;
+
+import jogamp.newt.driver.android.event.AndroidNewtEventFactory;
+
+import javax.media.nativewindow.Capabilities;
+import javax.media.nativewindow.CapabilitiesImmutable;
+import javax.media.nativewindow.NativeWindowException;
+import javax.media.nativewindow.egl.EGLGraphicsDevice;
+import javax.media.nativewindow.util.Insets;
+import javax.media.nativewindow.util.Point;
+import javax.media.opengl.GLCapabilitiesChooser;
+import javax.media.opengl.GLCapabilitiesImmutable;
+
+import com.jogamp.common.nio.Buffers;
+import com.jogamp.newt.event.MouseEvent;
+
+import jogamp.opengl.egl.EGL;
+import jogamp.opengl.egl.EGLGraphicsConfiguration;
+import jogamp.opengl.egl.EGLGraphicsConfigurationFactory;
+
+import android.content.Context;
+import android.graphics.PixelFormat;
+import android.util.Log;
+import android.view.MotionEvent;
+import android.view.Surface;
+import android.view.SurfaceHolder;
+import android.view.SurfaceHolder.Callback2;
+import android.view.SurfaceView;
+import android.view.View;
+import android.view.Window;
+import android.view.WindowManager;
+
+public class AndroidWindow extends jogamp.newt.WindowImpl implements Callback2 {
+    static {
+        AndroidDisplay.initSingleton();
+    }
+
+    public static CapabilitiesImmutable fixCapsAlpha(CapabilitiesImmutable rCaps) {
+        if(rCaps.getAlphaBits()==0) {
+            Capabilities nCaps = (Capabilities) rCaps.cloneMutable();
+            nCaps.setAlphaBits(1);
+            return nCaps;
+        }
+        return rCaps;
+    }
+    
+    public static CapabilitiesImmutable fixCaps(int format, CapabilitiesImmutable rCaps) {
+        PixelFormat pf = new PixelFormat(); 
+        PixelFormat.getPixelFormatInfo(format, pf);
+        final CapabilitiesImmutable res;        
+        int r, g, b, a;
+        
+        switch(format) {
+            case PixelFormat.RGBA_8888: r=8; g=8; b=8; a=8; break;
+            case PixelFormat.RGBX_8888: r=8; g=8; b=8; a=0; break;
+            case PixelFormat.RGB_888:   r=8; g=8; b=8; a=0; break;
+            case PixelFormat.RGB_565:   r=5; g=6; b=5; a=0; break;
+            case PixelFormat.RGBA_5551: r=5; g=5; b=5; a=1; break;
+            case PixelFormat.RGBA_4444: r=4; g=4; b=4; a=4; break;
+            case PixelFormat.RGB_332:   r=3; g=3; b=2; a=0; break;
+            default: throw new InternalError("Unhandled pixelformat: "+format);
+        }
+        final boolean fits = rCaps.getRedBits()   <= r &&
+                             rCaps.getGreenBits() <= g &&
+                             rCaps.getBlueBits()  <= b &&
+                             rCaps.getAlphaBits() <= a ;
+        
+        if(!fits) {
+            Capabilities nCaps = (Capabilities) rCaps.cloneMutable();
+            nCaps.setRedBits(r);
+            nCaps.setGreenBits(g);
+            nCaps.setBlueBits(b);
+            nCaps.setAlphaBits(a);
+            res = nCaps;            
+        } else {
+            res = rCaps;
+        }
+        Log.d(MD.TAG, "fixCaps:    format: "+format);
+        Log.d(MD.TAG, "fixCaps: requested: "+rCaps);
+        Log.d(MD.TAG, "fixCaps:    chosen: "+res);
+        
+        return res;
+    }
+    
+    public static int getFormat(CapabilitiesImmutable rCaps) {
+        int fmt = PixelFormat.UNKNOWN;
+        
+        if(!rCaps.isBackgroundOpaque()) {
+            fmt = PixelFormat.TRANSLUCENT;
+        } else if(rCaps.getRedBits()<=5 &&
+           rCaps.getGreenBits()<=6 &&
+           rCaps.getBlueBits()<=5 &&
+           rCaps.getAlphaBits()==0) {
+            fmt = PixelFormat.RGB_565;            
+        } 
+        /* else if(rCaps.getRedBits()<=5 &&
+           rCaps.getGreenBits()<=5 &&
+           rCaps.getBlueBits()<=5 &&
+           rCaps.getAlphaBits()==1) {
+            fmt = PixelFormat.RGBA_5551; // FIXME: Supported ?             
+        } */ 
+        else {        
+            fmt = PixelFormat.RGBA_8888;
+        }
+        Log.d(MD.TAG, "getFormat: requested: "+rCaps);
+        Log.d(MD.TAG, "getFormat:  returned: "+fmt);
+        
+        return fmt;
+    }
+    
+    class AndroidEvents implements /* View.OnKeyListener, */ View.OnTouchListener {
+
+        public boolean onTouch(View v, MotionEvent event) {
+            MouseEvent[] newtEvents = AndroidNewtEventFactory.createMouseEvents(AndroidWindow.this, event);
+            if(null != newtEvents) {
+                for(int i=0; i<newtEvents.length; i++) {
+                    AndroidWindow.this.enqueueEvent(false, newtEvents[i]);
+                }
+            }
+            return true;
+        }
+
+        /** TODO
+        public boolean onKey(View v, int keyCode, KeyEvent event) {
+            return false;
+        } */
+    }
+
+    @Override
+    protected void instantiationFinished() {
+        androidView = new MSurfaceView(jogamp.common.os.android.StaticContext.getContext());
+        AndroidEvents ae = new AndroidEvents();
+        androidView.setOnTouchListener(ae);
+        androidView.setClickable(false);
+        // nsv.setOnKeyListener(ae);
+        SurfaceHolder sh = androidView.getHolder();
+        sh.addCallback(this); 
+        // setFormat is done by SurfaceView in SDK 2.3 and newer. Uncomment
+        // this statement if back-porting to 2.2 or older:
+        // sh.setFormat(PixelFormat.RGB_565);
+        // sh.setFormat(PixelFormat.RGBA_5551);
+        // sh.setFormat(PixelFormat.RGBA_8888);
+        sh.setFormat(getFormat(getRequestedCapabilities()));
+        // setType is not needed for SDK 2.0 or newer. Uncomment this
+        // statement if back-porting this code to older SDKs.
+        // sh.setType(SurfaceHolder.SURFACE_TYPE_GPU);
+        // sh.setType(SurfaceHolder.SURFACE_TYPE_NORMAL);
+        
+        // default size -> TBD ! 
+        this.width = 0;
+        this.height = 0;
+    }
+    
+    public SurfaceView getAndroidView() { return androidView; }
+    
+    public void setAndroidWindow(android.view.Window window) { 
+        System.err.println("setandroidWindow: "+window+", "+width+"x"+height);
+        androidWindow = window;
+        androidWindowConfigurationPreCreate();
+        if(width>0 && height>0 && !isFullscreen()) {
+            if(null != androidWindow) {
+                androidWindow.setLayout(width, height);
+            }
+        }
+    }
+    public android.view.Window getAndroidWindow() { return androidWindow; }
+    
+    @Override
+    protected boolean canCreateNativeImpl() {
+        final boolean b = 0 != surfaceHandle;
+        Log.d(MD.TAG, "canCreateNativeImpl: "+b);
+        return b;
+    }
+
+    @Override
+    protected void createNativeImpl() {
+        Log.d(MD.TAG, "createNativeImpl 0 - surfaceHandle 0x"+Long.toHexString(surfaceHandle)+
+                    ", "+x+"/"+y+" "+width+"x"+height+" - "+Thread.currentThread().getName());
+        Thread.dumpStack();
+        if(0!=getParentWindowHandle()) {
+            throw new NativeWindowException("Window parenting not supported (yet)");
+        }
+        if(0==surfaceHandle) {
+            throw new InternalError("XXX");
+        }
+       
+        final EGLGraphicsDevice eglDevice = (EGLGraphicsDevice) getScreen().getDisplay().getGraphicsDevice();
+        final EGLGraphicsConfiguration eglConfig = EGLGraphicsConfigurationFactory.chooseGraphicsConfigurationStatic(
+                capsByFormat, (GLCapabilitiesImmutable) getRequestedCapabilities(), 
+                (GLCapabilitiesChooser)capabilitiesChooser, getScreen().getGraphicsScreen(), format);
+        if (eglConfig == null) {
+            throw new NativeWindowException("Error choosing GraphicsConfiguration creating window: "+this);
+        }
+        // query native VisualID and pass it to Surface
+        final long eglConfigHandle = eglConfig.getNativeConfig();
+        final IntBuffer nativeVisualID = Buffers.newDirectIntBuffer(1);
+        if(!EGL.eglGetConfigAttrib(eglDevice.getHandle(), eglConfigHandle, EGL.EGL_NATIVE_VISUAL_ID, nativeVisualID)) {
+            throw new NativeWindowException("eglgetConfigAttrib EGL_NATIVE_VISUAL_ID failed eglDisplay 0x"+Long.toHexString(eglDevice.getHandle())+ 
+                                  ", error 0x"+Integer.toHexString(EGL.eglGetError()));
+        }        
+        Log.d(MD.TAG, "nativeVisualID 0x"+Integer.toHexString(nativeVisualID.get(0)));
+        if(nativeVisualID.get(0)>0) {
+            setSurfaceVisualID0(surfaceHandle, nativeVisualID.get(0));
+        }
+        
+        eglSurface = EGL.eglCreateWindowSurface(eglDevice.getHandle(), eglConfig.getNativeConfig(), surfaceHandle, null);
+        if (EGL.EGL_NO_SURFACE==eglSurface) {
+            throw new NativeWindowException("Creation of window surface failed: "+eglConfig+", surfaceHandle 0x"+Long.toHexString(surfaceHandle)+", error "+toHexString(EGL.eglGetError()));
+        }
+        
+        // propagate data ..
+        config = eglConfig;
+        setWindowHandle(surfaceHandle);
+        Log.d(MD.TAG, "createNativeImpl X");
+    }
+
+    @Override
+    protected void closeNativeImpl() {
+        release0(surfaceHandle);
+        surface = null;
+        surfaceHandle = 0;
+        eglSurface = 0;        
+    }
+
+    @Override
+    public final long getSurfaceHandle() {
+        return eglSurface;
+    }
+    
+    protected void requestFocusImpl(boolean reparented) { }
+
+    protected void androidWindowConfigurationPreCreate() {
+        if( null != androidWindow) {
+            if( isFullscreen() || isUndecorated() ) {
+                androidWindow.requestFeature(Window.FEATURE_NO_TITLE);
+            }
+            if( isFullscreen() ) {
+                androidWindow.setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
+                                       WindowManager.LayoutParams.FLAG_FULLSCREEN);
+            }
+        }
+    }
+    
+    protected boolean reconfigureWindowImpl(int x, int y, int width, int height, int flags) {
+        if( 0 != ( FLAG_CHANGE_FULLSCREEN & flags) ) {
+            System.err.println("reconfigureWindowImpl.setFullscreen post creation (setContentView()) n/a");
+            return false;
+        }
+        if(width>0 || height>0) {
+            if(0!=getWindowHandle()) {
+                System.err.println("reconfigureWindowImpl.setSize n/a");
+                return false;
+            }
+        }
+        if(x>=0 || y>=0) {
+            System.err.println("reconfigureWindowImpl.setPos n/a");
+            return false;
+        }
+        if( 0 != ( FLAG_CHANGE_VISIBILITY & flags) ) {
+            visibleChanged(false, 0 != ( FLAG_IS_VISIBLE & flags));            
+        }
+        return true;
+    }
+
+    /**
+    Canvas cLock = null;
+    
+    @Override
+    protected int lockSurfaceImpl() {
+        if (null != cLock) {
+            throw new InternalError("surface already locked");
+        }        
+        if (0 != surfaceHandle) {
+            cLock = nsv.getHolder().lockCanvas();
+        }
+        return ( null != cLock ) ? LOCK_SUCCESS : LOCK_SURFACE_NOT_READY;
+    }
+
+    @Override
+    protected void unlockSurfaceImpl() {
+        if (null == cLock) {
+            throw new InternalError("surface not locked");
+        }
+        nsv.getHolder().unlockCanvasAndPost(cLock);
+        cLock=null;
+    } */
+    
+    protected Point getLocationOnScreenImpl(int x, int y) {
+        return new Point(x,y);
+    }
+
+    protected void updateInsetsImpl(Insets insets) {
+        // nop ..        
+    }
+    
+    //----------------------------------------------------------------------
+    // Surface Callbacks 
+    //
+    
+    public void surfaceCreated(SurfaceHolder holder) {    
+        Log.d(MD.TAG, "surfaceCreated: "+x+"/"+y+" "+width+"x"+height);
+    }
+
+    public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {
+        Log.d(MD.TAG, "surfaceChanged: f "+this.format+" -> "+format+", "+width+"x"+height+", current surfaceHandle: 0x"+Long.toHexString(surfaceHandle));
+        if(0!=surfaceHandle && this.format != format) {
+            // re-create
+            Log.d(MD.TAG, "surfaceChanged (destroy old)");
+            windowDestroyNotify();
+            if(isNativeValid()) {
+                destroy();
+            }
+            surfaceHandle = 0;
+            surface=null;
+        }
+        getScreen().getCurrentScreenMode(); // if ScreenMode changed .. trigger ScreenMode event
+
+        if(0>x || 0>y) {
+            x = 0;
+            y = 0;
+            positionChanged(false, 0, 0);
+        }
+        
+        if(0 == surfaceHandle) {
+            surface = holder.getSurface();
+            surfaceHandle = getSurfaceHandle0(surface);
+            acquire0(surfaceHandle);
+            format = getSurfaceVisualID0(surfaceHandle);
+            capsByFormat = (GLCapabilitiesImmutable) fixCaps(format, getRequestedCapabilities());
+            sizeChanged(false, getWidth0(surfaceHandle), getHeight0(surfaceHandle), false);
+    
+            Log.d(MD.TAG, "surfaceRealized: isValid: "+surface.isValid()+
+                          ", new surfaceHandle 0x"+Long.toHexString(surfaceHandle)+", format: "+format+
+                          ", "+x+"/"+y+" "+width+"x"+height+", visible: "+isVisible());
+    
+            if(isVisible()) {
+               setVisible(true); 
+            }
+        } else {
+            sizeChanged(false, width, height, false);                
+        }
+        windowRepaint(0, 0, width, height);
+        Log.d(MD.TAG, "surfaceChanged: X");
+    }
+    
+    public void surfaceDestroyed(SurfaceHolder holder) {
+        Log.d(MD.TAG, "surfaceDestroyed");
+        windowDestroyNotify();
+    }
+
+    public void surfaceRedrawNeeded(SurfaceHolder holder) {
+        Log.d(MD.TAG, "surfaceRedrawNeeded");
+        windowRepaint(0, 0, getWidth(), getHeight());
+    }
+    
+    
+    private MSurfaceView androidView;
+    private android.view.Window androidWindow;
+    private int format; // stored current PixelFormat
+    private GLCapabilitiesImmutable capsByFormat; // fixed requestedCaps by PixelFormat
+    private Surface surface = null;
+    private volatile long surfaceHandle = 0;
+    private long eglSurface = 0;
+    
+    class MSurfaceView extends SurfaceView {
+        public MSurfaceView (Context ctx) {
+            super(ctx);
+            setBackgroundDrawable(null);
+        }
+    }
+    //----------------------------------------------------------------------
+    // Internals only
+    //
+    protected static native boolean initIDs0();
+    protected static native long getSurfaceHandle0(Surface surface);
+    protected static native int getSurfaceVisualID0(long surfaceHandle);
+    protected static native void setSurfaceVisualID0(long surfaceHandle, int nativeVisualID);
+    protected static native int getWidth0(long surfaceHandle);
+    protected static native int getHeight0(long surfaceHandle);
+    protected static native void acquire0(long surfaceHandle);
+    protected static native void release0(long surfaceHandle);
+}
diff --git a/src/newt/classes/jogamp/newt/driver/android/MD.java b/src/newt/classes/jogamp/newt/driver/android/MD.java
new file mode 100644
index 0000000..06f7872
--- /dev/null
+++ b/src/newt/classes/jogamp/newt/driver/android/MD.java
@@ -0,0 +1,65 @@
+/**
+ * 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 jogamp.newt.driver.android;
+
+import java.util.List;
+
+import javax.media.opengl.GLDrawableFactory;
+import javax.media.opengl.GLProfile;
+
+import com.jogamp.common.GlueGenVersion;
+import com.jogamp.common.os.Platform;
+import com.jogamp.common.util.VersionUtil;
+import com.jogamp.opengl.JoglVersion;
+
+public class MD {
+   public static final String TAG = "JogAmp.NEWT";
+   
+   public static String getInfo() { 
+       
+        StringBuffer sb = new StringBuffer();
+        
+        sb.append(VersionUtil.getPlatformInfo()).append(Platform.NEWLINE)
+              .append(GlueGenVersion.getInstance()).append(Platform.NEWLINE)
+              .append(JoglVersion.getInstance()).append(Platform.NEWLINE)
+              .append(Platform.NEWLINE);
+              
+        final GLDrawableFactory factory = GLDrawableFactory.getEGLFactory();
+        final List/*<GLCapabilitiesImmutable>*/ availCaps = factory.getAvailableCapabilities(null);
+        for(int i=0; i<availCaps.size(); i++) {
+            sb.append(availCaps.get(i)).append(Platform.NEWLINE);
+        }
+       
+       return sb.toString();       
+   }
+   
+    public static void main(String args[]) {
+        
+        System.err.println(getInfo());
+    }
+}
diff --git a/src/newt/classes/jogamp/newt/driver/android/NewtBaseActivity.java b/src/newt/classes/jogamp/newt/driver/android/NewtBaseActivity.java
new file mode 100644
index 0000000..5e5b907
--- /dev/null
+++ b/src/newt/classes/jogamp/newt/driver/android/NewtBaseActivity.java
@@ -0,0 +1,168 @@
+/**
+ * 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 jogamp.newt.driver.android;
+
+import javax.media.opengl.GLProfile;
+
+import com.jogamp.newt.Window;
+import com.jogamp.newt.opengl.GLWindow;
+import com.jogamp.opengl.util.Animator;
+
+import jogamp.newt.driver.android.AndroidWindow;
+
+import android.app.Activity;
+import android.os.Bundle;
+import android.util.Log;
+
+public class NewtBaseActivity extends Activity {
+   AndroidWindow newtWindow = null;
+   Animator animator = null;
+    
+   boolean isInvokedByExternalActivity = false;
+   Activity extActivity = this;
+   
+   public void setIsInvokedByExternalActivity(Activity extActivity) {
+       this.extActivity = extActivity;
+       this.isInvokedByExternalActivity = null != extActivity;
+   }
+   public boolean getIsInvokedByExternalActivity() {
+       return null != extActivity;
+   }
+   
+   public Activity getActivity() {
+       if(isInvokedByExternalActivity) {
+           return extActivity;
+       } else {
+           return this;               
+       }
+   }     
+   
+   public void setContentView(android.view.Window androidWindow, Window newtWindow) {
+       if(newtWindow instanceof GLWindow) {
+           newtWindow = ((GLWindow)newtWindow).getWindow();
+       }
+       if(newtWindow instanceof AndroidWindow) {
+           this.newtWindow = (AndroidWindow)newtWindow;
+           this.newtWindow.setAndroidWindow(androidWindow);
+           if(isInvokedByExternalActivity) {
+               extActivity.setContentView(this.newtWindow.getAndroidView());
+           } else {
+               super.setContentView(this.newtWindow.getAndroidView());               
+           }
+       } else {
+           throw new IllegalArgumentException("Given NEWT Window is not an Android Window: "+newtWindow.getClass()); 
+       }
+   }
+   
+   public void setAnimator(Animator animator) {
+       this.animator = animator;
+   }
+      
+   @Override
+   public android.view.Window getWindow() {
+       return getActivity().getWindow();
+   }
+   
+   @Override
+   public void onCreate(Bundle savedInstanceState) {
+       Log.d(MD.TAG, "onCreate");
+       if(!isInvokedByExternalActivity) {
+           super.onCreate(savedInstanceState);
+           // register application context 
+           jogamp.common.os.android.StaticContext.setContext(getApplicationContext());
+       } else {
+           jogamp.common.os.android.StaticContext.setContext(extActivity.getApplicationContext());
+       }
+       extActivity.getWindow();
+
+       // init GLProfile
+       GLProfile.initSingleton(true);       
+   }
+   
+   @Override
+   public void onStart() {
+     Log.d(MD.TAG, "onStart");
+     if(!isInvokedByExternalActivity) {
+         super.onStart();
+     }
+   }
+     
+   @Override
+   public void onRestart() {
+     Log.d(MD.TAG, "onRestart");
+     if(!isInvokedByExternalActivity) {
+         super.onRestart();
+     }
+   }
+
+   @Override
+   public void onResume() {
+     Log.d(MD.TAG, "onResume");
+     if(!isInvokedByExternalActivity) {
+         super.onResume();
+     }
+     if(null != animator) {
+         animator.start();
+     }
+   }
+
+   @Override
+   public void onPause() {
+     Log.d(MD.TAG, "onPause");
+     if(null != animator) {
+         animator.pause();
+     }
+     if(!isInvokedByExternalActivity) {
+         super.onPause();
+     }
+   }
+
+   @Override
+   public void onStop() {
+     Log.d(MD.TAG, "onStop");
+     if(!isInvokedByExternalActivity) {
+         super.onStop();  
+     }
+   }
+
+   @Override
+   public void onDestroy() {
+     Log.d(MD.TAG, "onDestroy");
+     if(null != animator) {
+         animator.stop();
+         animator = null;
+     }
+     if(null != newtWindow) {
+         newtWindow.destroy();
+         newtWindow = null;
+     }
+     if(!isInvokedByExternalActivity) {
+         super.onDestroy(); 
+     }
+   }   
+}
diff --git a/src/newt/classes/jogamp/newt/driver/android/NewtVersionActivity.java b/src/newt/classes/jogamp/newt/driver/android/NewtVersionActivity.java
new file mode 100644
index 0000000..d379017
--- /dev/null
+++ b/src/newt/classes/jogamp/newt/driver/android/NewtVersionActivity.java
@@ -0,0 +1,59 @@
+/**
+ * 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 jogamp.newt.driver.android;
+
+import com.jogamp.common.GlueGenVersion;
+import com.jogamp.common.os.Platform;
+import com.jogamp.common.util.VersionUtil;
+import com.jogamp.opengl.JoglVersion;
+
+import android.os.Bundle;
+import android.util.Log;
+import android.widget.TextView;
+
+public class NewtVersionActivity extends NewtBaseActivity {
+   TextView tv = null;
+   
+   @Override
+   public void onCreate(Bundle savedInstanceState) {
+       super.onCreate(savedInstanceState);
+       
+       System.setProperty("nativewindow.debug", "all");
+       System.setProperty("jogl.debug", "all");
+       System.setProperty("newt.debug", "all");
+       System.setProperty("jogamp.debug.JNILibLoader", "true");
+       System.setProperty("jogamp.debug.NativeLibrary", "true");
+       // System.setProperty("jogamp.debug.NativeLibrary.Lookup", "true");
+       
+       tv = new TextView(this);
+       tv.setText(VersionUtil.getPlatformInfo()+Platform.NEWLINE+GlueGenVersion.getInstance()+Platform.NEWLINE+JoglVersion.getInstance()+Platform.NEWLINE);               
+       setContentView(tv);
+
+       Log.d(MD.TAG, "onCreate - X");
+   }   
+}
diff --git a/src/newt/classes/jogamp/newt/driver/android/event/AndroidNewtEventFactory.java b/src/newt/classes/jogamp/newt/driver/android/event/AndroidNewtEventFactory.java
new file mode 100644
index 0000000..ecf1f72
--- /dev/null
+++ b/src/newt/classes/jogamp/newt/driver/android/event/AndroidNewtEventFactory.java
@@ -0,0 +1,215 @@
+/**
+ * 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 jogamp.newt.driver.android.event;
+
+import java.awt.event.MouseEvent;
+
+import com.jogamp.common.util.IntIntHashMap;
+import com.jogamp.newt.Window;
+
+public class AndroidNewtEventFactory {
+
+    protected static final IntIntHashMap eventTypeANDROID2NEWT;
+
+    private static final String names[] = { "DOWN" , "UP" , "MOVE" , "CANCEL" , "OUTSIDE" ,
+                                            "POINTER_DOWN" , "POINTER_UP" , "7?" , "8?" , "9?" };
+    
+    static {
+        IntIntHashMap map = new IntIntHashMap();
+        map.setKeyNotFoundValue(0xFFFFFFFF);
+        
+        map.put(android.view.KeyEvent.ACTION_DOWN, com.jogamp.newt.event.KeyEvent.EVENT_KEY_PRESSED);
+        map.put(android.view.KeyEvent.ACTION_UP, com.jogamp.newt.event.KeyEvent.EVENT_KEY_RELEASED);
+        map.put(android.view.KeyEvent.ACTION_MULTIPLE, com.jogamp.newt.event.KeyEvent.EVENT_KEY_PRESSED);
+        
+        map.put(android.view.MotionEvent.ACTION_DOWN, com.jogamp.newt.event.MouseEvent.EVENT_MOUSE_PRESSED);
+        map.put(android.view.MotionEvent.ACTION_UP, com.jogamp.newt.event.MouseEvent.EVENT_MOUSE_RELEASED);
+        map.put(android.view.MotionEvent.ACTION_CANCEL, com.jogamp.newt.event.MouseEvent.EVENT_MOUSE_RELEASED);
+        map.put(android.view.MotionEvent.ACTION_MOVE, com.jogamp.newt.event.MouseEvent.EVENT_MOUSE_DRAGGED);
+        map.put(android.view.MotionEvent.ACTION_OUTSIDE, com.jogamp.newt.event.MouseEvent.EVENT_MOUSE_MOVED);
+        
+        map.put(android.view.MotionEvent.ACTION_POINTER_DOWN, com.jogamp.newt.event.MouseEvent.EVENT_MOUSE_PRESSED);
+        map.put(android.view.MotionEvent.ACTION_POINTER_UP, com.jogamp.newt.event.MouseEvent.EVENT_MOUSE_RELEASED);
+        
+        map.put(android.view.accessibility.AccessibilityEvent.TYPE_VIEW_FOCUSED, com.jogamp.newt.event.WindowEvent.EVENT_WINDOW_GAINED_FOCUS);
+
+        eventTypeANDROID2NEWT = map;
+    }
+
+    static final int androidKeyCode2Newt(int androidKeyCode) {
+        //safest ...but ugly
+        if (android.view.KeyEvent.KEYCODE_0 == androidKeyCode) return com.jogamp.newt.event.KeyEvent.VK_0;
+        if (android.view.KeyEvent.KEYCODE_1 == androidKeyCode) return com.jogamp.newt.event.KeyEvent.VK_1;
+        if (android.view.KeyEvent.KEYCODE_2 == androidKeyCode) return com.jogamp.newt.event.KeyEvent.VK_2;
+        if (android.view.KeyEvent.KEYCODE_3 == androidKeyCode) return com.jogamp.newt.event.KeyEvent.VK_3;
+        if (android.view.KeyEvent.KEYCODE_4 == androidKeyCode) return com.jogamp.newt.event.KeyEvent.VK_4;
+        if (android.view.KeyEvent.KEYCODE_5 == androidKeyCode) return com.jogamp.newt.event.KeyEvent.VK_5;
+        if (android.view.KeyEvent.KEYCODE_6 == androidKeyCode) return com.jogamp.newt.event.KeyEvent.VK_6;
+        if (android.view.KeyEvent.KEYCODE_7 == androidKeyCode) return com.jogamp.newt.event.KeyEvent.VK_7;
+        if (android.view.KeyEvent.KEYCODE_8 == androidKeyCode) return com.jogamp.newt.event.KeyEvent.VK_8;
+        if (android.view.KeyEvent.KEYCODE_9 == androidKeyCode) return com.jogamp.newt.event.KeyEvent.VK_9;
+        
+        if (android.view.KeyEvent.KEYCODE_A == androidKeyCode) return com.jogamp.newt.event.KeyEvent.VK_A;
+        if (android.view.KeyEvent.KEYCODE_B == androidKeyCode) return com.jogamp.newt.event.KeyEvent.VK_B;
+        if (android.view.KeyEvent.KEYCODE_C == androidKeyCode) return com.jogamp.newt.event.KeyEvent.VK_C;
+        if (android.view.KeyEvent.KEYCODE_D == androidKeyCode) return com.jogamp.newt.event.KeyEvent.VK_D;
+        if (android.view.KeyEvent.KEYCODE_E == androidKeyCode) return com.jogamp.newt.event.KeyEvent.VK_E;
+        if (android.view.KeyEvent.KEYCODE_F == androidKeyCode) return com.jogamp.newt.event.KeyEvent.VK_F;
+        if (android.view.KeyEvent.KEYCODE_G == androidKeyCode) return com.jogamp.newt.event.KeyEvent.VK_G;
+        if (android.view.KeyEvent.KEYCODE_H == androidKeyCode) return com.jogamp.newt.event.KeyEvent.VK_H;
+        if (android.view.KeyEvent.KEYCODE_I == androidKeyCode) return com.jogamp.newt.event.KeyEvent.VK_I;
+        if (android.view.KeyEvent.KEYCODE_J == androidKeyCode) return com.jogamp.newt.event.KeyEvent.VK_J;
+        if (android.view.KeyEvent.KEYCODE_K == androidKeyCode) return com.jogamp.newt.event.KeyEvent.VK_K;
+        if (android.view.KeyEvent.KEYCODE_L == androidKeyCode) return com.jogamp.newt.event.KeyEvent.VK_L;
+        if (android.view.KeyEvent.KEYCODE_M == androidKeyCode) return com.jogamp.newt.event.KeyEvent.VK_M;
+        if (android.view.KeyEvent.KEYCODE_N == androidKeyCode) return com.jogamp.newt.event.KeyEvent.VK_N;
+        if (android.view.KeyEvent.KEYCODE_O == androidKeyCode) return com.jogamp.newt.event.KeyEvent.VK_O;
+        if (android.view.KeyEvent.KEYCODE_P == androidKeyCode) return com.jogamp.newt.event.KeyEvent.VK_P;
+        if (android.view.KeyEvent.KEYCODE_Q == androidKeyCode) return com.jogamp.newt.event.KeyEvent.VK_Q;
+        if (android.view.KeyEvent.KEYCODE_R == androidKeyCode) return com.jogamp.newt.event.KeyEvent.VK_R;
+        if (android.view.KeyEvent.KEYCODE_S == androidKeyCode) return com.jogamp.newt.event.KeyEvent.VK_S;
+        if (android.view.KeyEvent.KEYCODE_T == androidKeyCode) return com.jogamp.newt.event.KeyEvent.VK_T;
+        if (android.view.KeyEvent.KEYCODE_U == androidKeyCode) return com.jogamp.newt.event.KeyEvent.VK_U;
+        if (android.view.KeyEvent.KEYCODE_V == androidKeyCode) return com.jogamp.newt.event.KeyEvent.VK_V;
+        if (android.view.KeyEvent.KEYCODE_W == androidKeyCode) return com.jogamp.newt.event.KeyEvent.VK_W;
+        if (android.view.KeyEvent.KEYCODE_X == androidKeyCode) return com.jogamp.newt.event.KeyEvent.VK_X;
+        if (android.view.KeyEvent.KEYCODE_Y == androidKeyCode) return com.jogamp.newt.event.KeyEvent.VK_Y;
+        if (android.view.KeyEvent.KEYCODE_Z == androidKeyCode) return com.jogamp.newt.event.KeyEvent.VK_Z;
+          
+        if (android.view.KeyEvent.KEYCODE_AT == androidKeyCode) return com.jogamp.newt.event.KeyEvent.VK_AT;
+        return 0;
+    }
+    
+    public static final com.jogamp.newt.event.WindowEvent createWindowEvent(android.view.accessibility.AccessibilityEvent event, com.jogamp.newt.Window newtSource) {
+        int type = eventTypeANDROID2NEWT.get(event.getEventType());
+        if(0xFFFFFFFF != type) {
+            return new com.jogamp.newt.event.WindowEvent(type, ((null==newtSource)?null:(Object)newtSource), event.getEventTime());
+        }
+        return null; // no mapping ..
+    }
+
+    static final int androidKeyModifiers2Newt(int androidMods) {
+        int newtMods = 0;
+        if ((androidMods & android.view.KeyEvent.META_SYM_ON)   != 0)   newtMods |= com.jogamp.newt.event.InputEvent.META_MASK;
+        if ((androidMods & android.view.KeyEvent.META_SHIFT_ON) != 0)   newtMods |= com.jogamp.newt.event.InputEvent.SHIFT_MASK;
+        if ((androidMods & android.view.KeyEvent.META_ALT_ON)   != 0)   newtMods |= com.jogamp.newt.event.InputEvent.ALT_MASK;
+        
+        return newtMods;
+    }
+    
+    public static final com.jogamp.newt.event.KeyEvent createKeyEvent(android.view.KeyEvent event, com.jogamp.newt.Window newtSource) {
+        int type = eventTypeANDROID2NEWT.get(event.getAction());
+        if(0xFFFFFFFF != type) {
+            return new com.jogamp.newt.event.KeyEvent(
+                           type, (null==newtSource)?null:(Object)newtSource, event.getEventTime(), 
+                           androidKeyModifiers2Newt(event.getMetaState()), 
+                           androidKeyCode2Newt(event.getKeyCode()), event.getDisplayLabel());
+        }
+        return null;
+    }
+
+    public static final com.jogamp.newt.event.MouseEvent[] createMouseEvents(com.jogamp.newt.Window newtSource, android.view.MotionEvent event) {
+        if(Window.DEBUG_MOUSE_EVENT) {
+            System.err.println("createMouseEvent: "+toString(event));
+        }
+        int type = eventTypeANDROID2NEWT.get(event.getAction());
+        if(0xFFFFFFFF != type) {
+            int rotation = 0;
+            int clickCount = 1;
+            int modifiers = 0;
+            
+            int[] x = new int[event.getPointerCount()];
+            int[] y = new int[event.getPointerCount()];
+            float[] pressure = new float[event.getPointerCount()];
+            int[] pointers = new int[event.getPointerCount()];
+            int index = 0;
+            while(index < event.getPointerCount()) {
+                x[index] = (int)event.getX(index);
+                y[index] = (int)event.getY(index);
+                pressure[index] = event.getPressure(index);
+                pointers[index] = event.getPointerId(index);  
+                index++;
+            }
+
+            com.jogamp.newt.event.MouseEvent res[];
+
+            com.jogamp.newt.event.MouseEvent me1 = 
+                    new com.jogamp.newt.event.MouseEvent(
+                           type, 
+                           (null==newtSource)?null:(Object)newtSource, event.getEventTime(),
+                                   modifiers , 
+                           x, y, pressure, pointers, clickCount, 
+                           pointers.length==1 ? MouseEvent.BUTTON1 : 0, rotation);
+            
+            if(type == com.jogamp.newt.event.MouseEvent.EVENT_MOUSE_RELEASED) {
+                com.jogamp.newt.event.MouseEvent me2 =
+                    new com.jogamp.newt.event.MouseEvent(
+                           com.jogamp.newt.event.MouseEvent.EVENT_MOUSE_CLICKED, 
+                           (null==newtSource)?null:(Object)newtSource, event.getEventTime(),
+                                   modifiers , 
+                           x, y, pressure, pointers, clickCount, 
+                           pointers.length==1 ? MouseEvent.BUTTON1 : 0, rotation);
+                res = new com.jogamp.newt.event.MouseEvent[2];
+                res[0] = me1;
+                res[1] = me2;
+            } else {
+                res = new com.jogamp.newt.event.MouseEvent[1];
+                res[0] = me1;                
+            }
+            return res;
+        } 
+        return null; // no mapping ..
+    }
+    
+    
+    public static String toString(android.view.MotionEvent event) {
+        StringBuilder sb = new StringBuilder();
+        int action = event.getAction();
+        int actionCode = action & android.view.MotionEvent.ACTION_MASK;
+        sb.append("ACTION_" ).append(names[actionCode]);
+        if (actionCode == android.view.MotionEvent.ACTION_POINTER_DOWN
+                || actionCode == android.view.MotionEvent.ACTION_POINTER_UP) {
+            sb.append("(pid " ).append(
+                    action >> android.view.MotionEvent.ACTION_POINTER_ID_SHIFT);
+            sb.append(")" );
+        }
+        sb.append("[" );
+        for (int i = 0; i < event.getPointerCount(); i++) {
+            sb.append("#" ).append(i);
+            sb.append("(pid " ).append(event.getPointerId(i));
+            sb.append(")=" ).append((int) event.getX(i));
+            sb.append("," ).append((int) event.getY(i));
+            if (i + 1 < event.getPointerCount())
+                sb.append(";" );
+        }
+        sb.append("]" );
+        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
new file mode 100644
index 0000000..0729f02
--- /dev/null
+++ b/src/newt/classes/jogamp/newt/driver/awt/AWTCanvas.java
@@ -0,0 +1,312 @@
+/*
+ * 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
+ * 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 jogamp.newt.driver.awt;
+
+import java.awt.Canvas;
+import java.awt.GraphicsDevice;
+import java.awt.GraphicsConfiguration;
+import java.lang.reflect.Method;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
+import javax.media.nativewindow.AbstractGraphicsDevice;
+import javax.media.nativewindow.AbstractGraphicsScreen;
+import javax.media.nativewindow.CapabilitiesChooser;
+import javax.media.nativewindow.CapabilitiesImmutable;
+import javax.media.nativewindow.GraphicsConfigurationFactory;
+import javax.media.nativewindow.NativeWindowException;
+import javax.media.nativewindow.awt.AWTGraphicsConfiguration;
+import javax.media.nativewindow.awt.AWTGraphicsDevice;
+import javax.media.nativewindow.awt.AWTGraphicsScreen;
+import com.jogamp.newt.Window;
+
+public class AWTCanvas extends Canvas {
+  private GraphicsDevice device;
+  private GraphicsConfiguration chosen;
+  private AWTGraphicsConfiguration awtConfig;
+
+  private CapabilitiesChooser chooser=null;
+  private CapabilitiesImmutable capabilities;
+
+  private boolean displayConfigChanged=false;
+
+  public AWTCanvas(CapabilitiesImmutable capabilities, CapabilitiesChooser chooser) {
+    super();
+
+    if(null==capabilities) {
+        throw new NativeWindowException("Capabilities null");
+    }
+    this.capabilities=capabilities;
+    this.chooser=chooser;
+  }
+
+  public AWTGraphicsConfiguration getAWTGraphicsConfiguration() {
+    return awtConfig;
+  }
+
+  public boolean hasDeviceChanged() {
+    boolean res = displayConfigChanged;
+    displayConfigChanged=false;
+    return res;
+  }
+
+  public void addNotify() {
+
+    /**
+     * '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(capabilities, capabilities, chooser, device);
+    if(Window.DEBUG_IMPLEMENTATION) {
+        Exception e = new Exception("Info: Created Config: "+awtConfig);
+        e.printStackTrace();
+    }
+    if(null==awtConfig) {
+        throw new NativeWindowException("Error: NULL AWTGraphicsConfiguration");
+    }
+    chosen = awtConfig.getGraphicsConfiguration();
+
+    // before native peer is valid: X11
+    disableBackgroundErase();
+
+    // issues getGraphicsConfiguration() and creates the native peer
+    super.addNotify();
+
+    // after native peer is valid: Windows
+    disableBackgroundErase();
+
+    GraphicsConfiguration gc = super.getGraphicsConfiguration();
+    if(null!=gc) {
+        device = gc.getDevice();
+    }
+  }
+
+  public void removeNotify() {
+      try {
+        dispose();
+      } finally {
+        super.removeNotify();
+      }
+  }
+
+  private void dispose() {
+    if(null != awtConfig) {
+        AbstractGraphicsDevice adevice = awtConfig.getNativeGraphicsConfiguration().getScreen().getDevice();
+        String adeviceMsg=null;
+        if(Window.DEBUG_IMPLEMENTATION) {
+            adeviceMsg = adevice.toString();
+        }
+        boolean closed = adevice.close();
+        if(Window.DEBUG_IMPLEMENTATION) {
+            System.err.println("AWTCanvas.dispose(): closed GraphicsDevice: "+adeviceMsg+", result: "+closed);
+        }
+    }
+  }
+
+  /**
+   * Overridden to choose a GraphicsConfiguration on a parent container's
+   * GraphicsDevice because both devices
+   */
+  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.
+     *   - This canvas has been added to a component hierarchy and has
+     *     an ancestor with a non-null GC, but the native peer has not
+     *     yet been created. This means we can still choose the GC on
+     *     all platforms since the peer hasn't been created.
+     */
+    final GraphicsConfiguration gc = super.getGraphicsConfiguration();
+    /*
+     * 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.
+     */
+    if (gc != null && chosen != null && !chosen.equals(gc)) {
+      /*
+       * 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.
+         */
+        AWTGraphicsConfiguration config = chooseGraphicsConfiguration(
+                awtConfig.getChosenCapabilities(), awtConfig.getRequestedCapabilities(), chooser, gc.getDevice());
+        final GraphicsConfiguration compatible = (null!=config)?config.getGraphicsConfiguration():null;
+        if(Window.DEBUG_IMPLEMENTATION) {
+            Exception e = new Exception("Info: Call Stack: "+Thread.currentThread().getName());
+            e.printStackTrace();
+            System.err.println("!!! Created Config (n): HAVE    GC "+chosen);
+            System.err.println("!!! Created Config (n): THIS    GC "+gc);
+            System.err.println("!!! Created Config (n): Choosen GC "+compatible);
+            System.err.println("!!! Created Config (n): HAVE    CF "+awtConfig);
+            System.err.println("!!! Created Config (n): Choosen CF "+config);
+            System.err.println("!!! Created Config (n): EQUALS CAPS "+config.getChosenCapabilities().equals(awtConfig.getChosenCapabilities()));
+        }
+
+        if (compatible != null) {
+          /*
+           * Save the new GC for equals test above, and to return to
+           * any outside callers of this method.
+           */
+          chosen = compatible;
+          if( !config.getChosenCapabilities().equals(awtConfig.getChosenCapabilities())) {
+              displayConfigChanged=true;
+          } 
+          awtConfig = config;
+        }
+      }
+
+      /*
+       * If a compatible GC was not found in the block above, this will
+       * 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) {
+      /*
+       * The GC is null, which means we have no native peer, and are not
+       * part of a (realized) component hierarchy. So we return the
+       * desired visual that was selected in the constructor (possibly
+       * null).
+       */
+      return chosen;
+    }
+
+    /*
+     * Otherwise we have not explicitly selected a GC in the constructor, so
+     * just return what Canvas would have.
+     */
+    return gc;
+  }
+
+  private static AWTGraphicsConfiguration chooseGraphicsConfiguration(CapabilitiesImmutable capsChosen,
+                                                                      CapabilitiesImmutable capsRequested,
+                                                                      CapabilitiesChooser chooser,
+                                                                      GraphicsDevice device) {
+    AbstractGraphicsScreen aScreen = AWTGraphicsScreen.createScreenDevice(device, AbstractGraphicsDevice.DEFAULT_UNIT);
+    AWTGraphicsConfiguration config = (AWTGraphicsConfiguration)
+      GraphicsConfigurationFactory.getFactory(AWTGraphicsDevice.class).chooseGraphicsConfiguration(capsChosen,
+                                                                                                   capsRequested,
+                                                                                                   chooser, aScreen);
+    if (config == null) {
+      throw new NativeWindowException("Error: Couldn't fetch AWTGraphicsConfiguration");
+    }
+
+    return config;
+  }
+
+  // Disables the AWT's erasing of this Canvas's background on Windows
+  // in Java SE 6. This internal API is not available in previous
+  // releases, but the system property
+  // -Dsun.awt.noerasebackground=true can be specified to get similar
+  // results globally in previous releases.
+  private static boolean disableBackgroundEraseInitialized;
+  private static Method  disableBackgroundEraseMethod;
+  private void disableBackgroundErase() {
+    if (!disableBackgroundEraseInitialized) {
+      try {
+        AccessController.doPrivileged(new PrivilegedAction() {
+            public Object run() {
+              try {
+                Class clazz = getToolkit().getClass();
+                while (clazz != null && disableBackgroundEraseMethod == null) {
+                  try {
+                    disableBackgroundEraseMethod =
+                      clazz.getDeclaredMethod("disableBackgroundErase",
+                                              new Class[] { Canvas.class });
+                    disableBackgroundEraseMethod.setAccessible(true);
+                  } catch (Exception e) {
+                    clazz = clazz.getSuperclass();
+                  }
+                }
+              } catch (Exception e) {
+              }
+              return null;
+            }
+          });
+      } catch (Exception e) {
+      }
+      disableBackgroundEraseInitialized = true;
+      if(Window.DEBUG_IMPLEMENTATION) {
+        System.err.println("AWTCanvas: TK disableBackgroundErase method found: "+
+                (null!=disableBackgroundEraseMethod));
+      }
+    }
+    if (disableBackgroundEraseMethod != null) {
+      Throwable t=null;
+      try {
+        disableBackgroundEraseMethod.invoke(getToolkit(), new Object[] { this });
+      } catch (Exception e) {
+        // FIXME: workaround for 6504460 (incorrect backport of 6333613 in 5.0u10)
+        // throw new GLException(e);
+        t = e;
+      }
+      if(Window.DEBUG_IMPLEMENTATION) {
+        System.err.println("AWTCanvas: TK disableBackgroundErase error: "+t);
+      }
+    }
+  }
+}
diff --git a/src/newt/classes/jogamp/newt/driver/awt/AWTDisplay.java b/src/newt/classes/jogamp/newt/driver/awt/AWTDisplay.java
new file mode 100644
index 0000000..64c7414
--- /dev/null
+++ b/src/newt/classes/jogamp/newt/driver/awt/AWTDisplay.java
@@ -0,0 +1,67 @@
+/*
+ * 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
+ * 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 jogamp.newt.driver.awt;
+
+import javax.media.nativewindow.AbstractGraphicsDevice;
+import javax.media.nativewindow.awt.AWTGraphicsDevice;
+import com.jogamp.newt.NewtFactory;
+import jogamp.newt.DisplayImpl;
+
+public class AWTDisplay extends DisplayImpl {
+    public AWTDisplay() {
+    }
+
+    protected void createNativeImpl() {
+        aDevice = (AWTGraphicsDevice) AWTGraphicsDevice.createDevice(null, AbstractGraphicsDevice.DEFAULT_UNIT); // default
+    }
+
+    protected void setAWTGraphicsDevice(AWTGraphicsDevice d) {
+        aDevice = d;
+    }
+
+    protected void closeNativeImpl() { }
+
+    @Override
+    protected void createEDTUtil() {
+        if(NewtFactory.useEDT()) {
+            edtUtil = AWTEDTUtil.getSingleton();
+            if(DEBUG) {
+                System.err.println("AWTDisplay.createNative("+getFQName()+") Create EDTUtil: "+edtUtil.getClass().getName());
+            }
+        }
+    }
+
+    protected void dispatchMessagesNative() { /* nop */ }
+}
+
diff --git a/src/newt/classes/jogamp/newt/driver/awt/AWTEDTUtil.java b/src/newt/classes/jogamp/newt/driver/awt/AWTEDTUtil.java
new file mode 100644
index 0000000..cca1e32
--- /dev/null
+++ b/src/newt/classes/jogamp/newt/driver/awt/AWTEDTUtil.java
@@ -0,0 +1,143 @@
+/**
+ * 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.newt.driver.awt;
+
+import java.awt.EventQueue;
+import java.lang.reflect.InvocationTargetException;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Timer;
+import java.util.TimerTask;
+
+import javax.media.nativewindow.NativeWindowException;
+
+import com.jogamp.newt.Display;
+import com.jogamp.newt.util.EDTUtil;
+import jogamp.newt.Debug;
+
+public class AWTEDTUtil implements EDTUtil {
+    public static final boolean DEBUG = Debug.debug("EDT");
+
+    private static Timer pumpMessagesTimer=null;
+    private static TimerTask pumpMessagesTimerTask=null;
+    private static final Map<Display, Runnable> pumpMessageDisplayMap = new HashMap<Display, Runnable>();
+    private static AWTEDTUtil singletonMainThread = new AWTEDTUtil(); // one singleton MainThread
+
+    public static AWTEDTUtil getSingleton() {
+        return singletonMainThread;
+    }
+
+    AWTEDTUtil() {
+        // package private access ..
+    }
+
+    final public void reset() {
+        // nop AWT is always running
+    }
+
+    final public void start() {
+        // nop AWT is always running
+    }
+
+    final public boolean isCurrentThreadEDT() {
+        return EventQueue.isDispatchThread();
+    }
+
+    final public boolean isRunning() {
+        return true; // AWT is always running
+    }
+
+    final public void invokeStop(Runnable r) {
+        invoke(true, r); // AWT is always running
+    }
+
+    final public void invoke(boolean wait, Runnable r) {
+        if(r == null) {
+            return;
+        }
+
+        // handover to AWT MainThread ..
+        try {
+            if ( isCurrentThreadEDT() ) {
+                r.run();
+                return;
+            }
+            if(wait) {
+                EventQueue.invokeAndWait(r);
+            } else {
+                EventQueue.invokeLater(r);
+            }
+        } catch (Exception e) {
+            throw new NativeWindowException(e);
+        }
+    }
+
+    final public void waitUntilIdle() {
+        // wait until previous events are processed, at least ..
+        try {
+            EventQueue.invokeAndWait( new Runnable() {
+                public void run() { }
+            });
+        } catch (Exception e) { }
+    }
+
+    final public void waitUntilStopped() {
+        // nop: AWT is always running
+    }
+
+    public static void addPumpMessage(Display dpy, Runnable pumpMessage) {
+        if(DEBUG) {
+            System.err.println("AWTEDTUtil.addPumpMessage(): "+Thread.currentThread().getName()+" - dpy "+dpy);
+        }
+        
+        synchronized (pumpMessageDisplayMap) {
+            if(null == pumpMessagesTimer) {
+                // AWT pump messages .. MAIN_THREAD uses main thread
+                pumpMessagesTimer = new Timer();
+                pumpMessagesTimerTask = new TimerTask() {
+                    public void run() {
+                        synchronized(pumpMessageDisplayMap) {
+                            for(Iterator<Runnable> i = pumpMessageDisplayMap.values().iterator(); i.hasNext(); ) {
+                                AWTEDTUtil.getSingleton().invoke(true, i.next());
+                                // AWTEDTUtil.getSingleton().invoke(false, i.next());
+                                // i.next().run();
+                            }
+                        }
+                    }
+                };
+                pumpMessagesTimer.scheduleAtFixedRate(pumpMessagesTimerTask, 0, defaultEDTPollGranularity);
+            }
+            pumpMessageDisplayMap.put(dpy, pumpMessage);
+        }
+    }
+
+}
+
+
diff --git a/src/newt/classes/jogamp/newt/driver/awt/AWTScreen.java b/src/newt/classes/jogamp/newt/driver/awt/AWTScreen.java
new file mode 100644
index 0000000..644c963
--- /dev/null
+++ b/src/newt/classes/jogamp/newt/driver/awt/AWTScreen.java
@@ -0,0 +1,65 @@
+/*
+ * 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
+ * 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 jogamp.newt.driver.awt;
+
+import java.awt.DisplayMode;
+
+import jogamp.newt.ScreenImpl;
+import javax.media.nativewindow.awt.AWTGraphicsDevice;
+import javax.media.nativewindow.awt.AWTGraphicsScreen;
+
+public class AWTScreen extends ScreenImpl {
+    public AWTScreen() {
+    }
+
+    protected void createNativeImpl() {
+        aScreen = new AWTGraphicsScreen((AWTGraphicsDevice)display.getGraphicsDevice());
+        
+        final DisplayMode mode = ((AWTGraphicsDevice)getDisplay().getGraphicsDevice()).getGraphicsDevice().getDisplayMode();
+        if(null != mode) {
+            setScreenSize(mode.getWidth(), mode.getHeight());
+        }
+    }
+
+    protected void setAWTGraphicsScreen(AWTGraphicsScreen s) {
+        aScreen = s;
+    }
+
+    // done by AWTWindow ..
+    protected void setScreenSize(int w, int h) {
+        super.setScreenSize(w, h);
+    }
+
+    protected void closeNativeImpl() { }
+}
diff --git a/src/newt/classes/jogamp/newt/driver/awt/AWTWindow.java b/src/newt/classes/jogamp/newt/driver/awt/AWTWindow.java
new file mode 100644
index 0000000..9aaa82f
--- /dev/null
+++ b/src/newt/classes/jogamp/newt/driver/awt/AWTWindow.java
@@ -0,0 +1,245 @@
+/*
+ * 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
+ * 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 jogamp.newt.driver.awt;
+
+import java.awt.BorderLayout;
+import java.awt.Container;
+import java.awt.DisplayMode;
+import java.awt.Frame;
+import java.awt.Insets;
+import javax.media.nativewindow.NativeWindowException;
+import javax.media.nativewindow.awt.AWTGraphicsDevice;
+import javax.media.nativewindow.awt.AWTGraphicsScreen;
+import javax.media.nativewindow.util.Point;
+import jogamp.newt.WindowImpl;
+import com.jogamp.newt.event.awt.AWTKeyAdapter;
+import com.jogamp.newt.event.awt.AWTMouseAdapter;
+import com.jogamp.newt.event.awt.AWTWindowAdapter;
+
+/** An implementation of the Newt Window class built using the
+    AWT. This is provided for convenience of porting to platforms
+    supporting Java SE. */
+
+public class AWTWindow extends WindowImpl {
+
+    public AWTWindow() {
+        this(null);
+    }
+
+    public static Class[] getCustomConstructorArgumentTypes() {
+        return new Class[] { Container.class } ;
+    }
+
+    public AWTWindow(Container container) {
+        super();
+        title = "AWT NewtWindow";
+        this.container = container;
+        if(container instanceof Frame) {
+            frame = (Frame) container;
+        }
+    }
+
+    private boolean owningFrame;
+    private Container container = null;
+    private Frame frame = null; // same instance as container, just for impl. convenience
+    private AWTCanvas canvas;
+
+    protected void requestFocusImpl(boolean reparented) {
+        container.requestFocus();
+    }
+
+    @Override
+    protected void setTitleImpl(final String title) {
+        if (frame != null) {
+            frame.setTitle(title);
+        }
+    }
+
+    protected void createNativeImpl() {
+        if(0!=getParentWindowHandle()) {
+            throw new RuntimeException("Window parenting not supported in AWT, use AWTWindow(Frame) cstr for wrapping instead");
+        }
+
+        if(null==container) {
+            frame = new Frame();
+            container = frame;
+            owningFrame=true;
+        } else {
+            owningFrame=false;
+            width = container.getWidth();
+            height = container.getHeight();
+            x = container.getX();
+            y = container.getY();
+        }
+        if(null!=frame) {
+            frame.setTitle(getTitle());
+        }
+        container.setLayout(new BorderLayout());
+        canvas = new AWTCanvas(capsRequested, AWTWindow.this.capabilitiesChooser);
+
+        addWindowListener(new LocalWindowListener());
+
+        new AWTMouseAdapter(this).addTo(canvas); // fwd all AWT Mouse events to here
+        new AWTKeyAdapter(this).addTo(canvas); // fwd all AWT Key events to here
+
+        // canvas.addComponentListener(listener);
+        container.add(canvas, BorderLayout.CENTER);
+        container.setSize(width, height);
+        container.setLocation(x, y);
+        new AWTWindowAdapter(this).addTo(container); // fwd all AWT Window events to here
+
+        reconfigureWindowImpl(x, y, width, height, getReconfigureFlags(FLAG_CHANGE_VISIBILITY | FLAG_CHANGE_DECORATION, true));
+        // throws exception if failed ..
+        
+        setWindowHandle(1); // just a marker ..
+    }
+
+    protected void closeNativeImpl() {
+        setWindowHandle(0); // just a marker ..
+        if(null!=container) {
+            container.setVisible(false);
+            container.remove(canvas);
+            container.setEnabled(false);
+            canvas.setEnabled(false);
+        }
+        if(owningFrame && null!=frame) {
+            frame.dispose();
+            owningFrame=false;
+            frame = null;
+        }
+    }
+
+    @Override
+    public boolean hasDeviceChanged() {
+        boolean res = canvas.hasDeviceChanged();
+        if(res) {
+            config = canvas.getAWTGraphicsConfiguration();
+            if (config == null) {
+                throw new NativeWindowException("Error Device change null GraphicsConfiguration: "+this);
+            }
+            updateDeviceData();
+        }
+        return res;
+    }
+
+    private void updateDeviceData() {
+        // propagate new info ..
+        ((AWTScreen)getScreen()).setAWTGraphicsScreen((AWTGraphicsScreen)config.getScreen());
+        ((AWTDisplay)getScreen().getDisplay()).setAWTGraphicsDevice((AWTGraphicsDevice)config.getScreen().getDevice());
+
+        final DisplayMode mode = ((AWTGraphicsDevice)config.getScreen().getDevice()).getGraphicsDevice().getDisplayMode();
+        if(null != mode) {
+            ((AWTScreen)getScreen()).setScreenSize(mode.getWidth(), mode.getHeight());
+        }
+        
+    }
+
+    protected void updateInsetsImpl(javax.media.nativewindow.util.Insets insets) {
+        Insets contInsets = container.getInsets();
+        insets.setLeftWidth(contInsets.left);
+        insets.setRightWidth(contInsets.right);
+        insets.setTopHeight(contInsets.top);
+        insets.setBottomHeight(contInsets.bottom);
+    }
+
+    protected boolean reconfigureWindowImpl(int x, int y, int width, int height, int flags) {
+        if(0 != ( FLAG_CHANGE_DECORATION & flags) && null!=frame) {
+            if(!container.isDisplayable()) {
+                frame.setUndecorated(isUndecorated());
+            } else {
+                if(DEBUG_IMPLEMENTATION) {
+                    System.err.println("AWTWindow can't undecorate already created frame");
+                }
+            }
+        }
+        
+        if( 0 != ( FLAG_CHANGE_VISIBILITY & flags) ) {
+            container.setVisible(0 != ( FLAG_IS_VISIBLE & flags));
+        }
+        
+        x=(x>=0)?x:AWTWindow.this.x;
+        y=(x>=0)?y:AWTWindow.this.y;
+        width=(width>0)?width:AWTWindow.this.width;
+        height=(height>0)?height:AWTWindow.this.height;
+
+        container.setLocation(x, y);
+        Insets insets = container.getInsets();
+        container.setSize(width + insets.left + insets.right,
+                          height + insets.top + insets.bottom);
+
+        if( 0 != ( FLAG_CHANGE_VISIBILITY & flags) ) {
+            if( 0 != ( FLAG_IS_VISIBLE & flags ) ) {
+                if( !hasDeviceChanged() ) {
+                    // oops ??
+                    config = canvas.getAWTGraphicsConfiguration();
+                    if(null == config) {
+                        throw new NativeWindowException("Error: !hasDeviceChanged && null == GraphicsConfiguration: "+this);
+                    }
+                }
+            }
+            visibleChanged(false, 0 != ( FLAG_IS_VISIBLE & flags));
+        }
+        
+        return true;
+    }
+
+    protected Point getLocationOnScreenImpl(int x, int y) {
+        java.awt.Point ap = canvas.getLocationOnScreen();
+        ap.translate(x, y);
+        return new Point((int)(ap.getX()+0.5),(int)(ap.getY()+0.5));
+    }
+   
+    @Override
+    public Object getWrappedWindow() {
+        return canvas;
+    }
+
+    class LocalWindowListener extends com.jogamp.newt.event.WindowAdapter { 
+        @Override
+        public void windowMoved(com.jogamp.newt.event.WindowEvent e) {
+            if(null!=container) {
+                x = container.getX();
+                y = container.getY();
+            }
+        }
+        @Override
+        public void windowResized(com.jogamp.newt.event.WindowEvent e) {
+            if(null!=canvas) {
+                width = canvas.getWidth();
+                height = canvas.getHeight();
+            }
+        }
+    }
+}
diff --git a/src/newt/classes/jogamp/newt/driver/broadcom/egl/Display.java b/src/newt/classes/jogamp/newt/driver/broadcom/egl/Display.java
new file mode 100644
index 0000000..1ed91c1
--- /dev/null
+++ b/src/newt/classes/jogamp/newt/driver/broadcom/egl/Display.java
@@ -0,0 +1,81 @@
+/*
+ * 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
+ * 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 jogamp.newt.driver.broadcom.egl;
+
+import jogamp.newt.*;
+import jogamp.opengl.egl.*;
+import javax.media.nativewindow.*;
+import javax.media.nativewindow.egl.*;
+
+public class Display extends jogamp.newt.DisplayImpl {
+
+    static {
+        NEWTJNILibLoader.loadNEWT();
+
+        if (!Window.initIDs()) {
+            throw new NativeWindowException("Failed to initialize BCEGL Window jmethodIDs");
+        }
+    }
+
+    public static void initSingleton() {
+        // just exist to ensure static init has been run
+    }
+
+
+    public Display() {
+    }
+
+    protected void createNativeImpl() {
+        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);
+    }
+
+    protected void closeNativeImpl() {
+        if (aDevice.getHandle() != EGL.EGL_NO_DISPLAY) {
+            DestroyDisplay(aDevice.getHandle());
+        }
+    }
+
+    protected void dispatchMessagesNative() {
+        // n/a .. DispatchMessages();
+    }
+
+    private native long CreateDisplay(int width, int height);
+    private native void DestroyDisplay(long dpy);
+    private native void DispatchMessages();
+}
+
diff --git a/src/newt/classes/jogamp/newt/driver/broadcom/egl/Screen.java b/src/newt/classes/jogamp/newt/driver/broadcom/egl/Screen.java
new file mode 100644
index 0000000..0a84537
--- /dev/null
+++ b/src/newt/classes/jogamp/newt/driver/broadcom/egl/Screen.java
@@ -0,0 +1,62 @@
+/*
+ * 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
+ * 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 jogamp.newt.driver.broadcom.egl;
+
+import javax.media.nativewindow.*;
+
+public class Screen extends jogamp.newt.ScreenImpl {
+
+    static {
+        Display.initSingleton();
+    }
+
+
+    public Screen() {
+    }
+
+    protected void createNativeImpl() {
+        aScreen = new DefaultGraphicsScreen(getDisplay().getGraphicsDevice(), screen_idx);
+        setScreenSize(fixedWidth, fixedHeight);
+    }
+
+    protected void closeNativeImpl() { }
+
+    //----------------------------------------------------------------------
+    // Internals only
+    //
+
+    static final int fixedWidth = 1920;
+    static final int fixedHeight = 1080;
+}
+
diff --git a/src/newt/classes/jogamp/newt/driver/broadcom/egl/Window.java b/src/newt/classes/jogamp/newt/driver/broadcom/egl/Window.java
new file mode 100644
index 0000000..7df293c
--- /dev/null
+++ b/src/newt/classes/jogamp/newt/driver/broadcom/egl/Window.java
@@ -0,0 +1,166 @@
+/*
+ * 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
+ * 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 jogamp.newt.driver.broadcom.egl;
+
+import jogamp.opengl.egl.*;
+import javax.media.nativewindow.*;
+import javax.media.nativewindow.util.Insets;
+import javax.media.nativewindow.util.Point;
+import javax.media.opengl.GLCapabilitiesImmutable;
+
+public class Window extends jogamp.newt.WindowImpl {
+    static {
+        Display.initSingleton();
+    }
+
+    public Window() {
+    }
+
+    protected void createNativeImpl() {
+        if(0!=getParentWindowHandle()) {
+            throw new RuntimeException("Window parenting not supported (yet)");
+        }
+        // query a good configuration .. even thought we drop this one 
+        // and reuse the EGLUtil choosen one later.
+        config = GraphicsConfigurationFactory.getFactory(getScreen().getDisplay().getGraphicsDevice()).chooseGraphicsConfiguration(
+                capsRequested, capsRequested, capabilitiesChooser, getScreen().getGraphicsScreen());
+        if (config == null) {
+            throw new NativeWindowException("Error choosing GraphicsConfiguration creating window: "+this);
+        }
+        setSizeImpl(getScreen().getWidth(), getScreen().getHeight());
+
+        setWindowHandle(realizeWindow(true, width, height));
+        if (0 == getWindowHandle()) {
+            throw new NativeWindowException("Error native Window Handle is null");
+        }
+    }
+
+    protected void closeNativeImpl() {
+        if(0!=windowHandleClose) {
+            CloseWindow(getDisplayHandle(), windowHandleClose);
+        }
+    }
+
+    protected void requestFocusImpl(boolean reparented) { }
+
+    protected void setSizeImpl(int width, int height) {
+        if(0!=getWindowHandle()) {
+            // n/a in BroadcomEGL
+            System.err.println("BCEGL Window.setSizeImpl n/a in BroadcomEGL with realized window");
+        } else {
+            this.width = width;
+            this.height = height;
+        }
+    }
+
+    protected boolean reconfigureWindowImpl(int x, int y, int width, int height, int flags) { 
+        if(0!=getWindowHandle()) {            
+            if(0 != ( FLAG_CHANGE_FULLSCREEN & flags)) {
+                if( 0 != ( FLAG_IS_FULLSCREEN & flags) ) {
+                    // n/a in BroadcomEGL
+                    System.err.println("setFullscreen n/a in BroadcomEGL");
+                    return false;
+                }
+            }
+        }
+        if(width>0 || height>0) {
+            if(0!=getWindowHandle()) {
+                // n/a in BroadcomEGL
+                System.err.println("BCEGL Window.setSizeImpl n/a in BroadcomEGL with realized window");
+            } else {
+                this.width=(width>0)?width:this.width;
+                this.height=(height>0)?height:this.height;
+            }
+        }
+        if(x>=0 || y>=0) {
+            System.err.println("BCEGL Window.setPositionImpl n/a in BroadcomEGL");
+        }
+        
+        if( 0 != ( FLAG_CHANGE_VISIBILITY & flags) ) {
+            visibleChanged(false, 0 != ( FLAG_IS_VISIBLE & flags));
+        }
+        return true;
+    }
+
+    protected Point getLocationOnScreenImpl(int x, int y) {
+        return new Point(x,y);
+    }
+
+    protected void updateInsetsImpl(Insets insets) {
+        // nop ..        
+    }
+
+    @Override
+    public boolean surfaceSwap() {
+        SwapWindow(getDisplayHandle(), getWindowHandle());
+        return true;
+    }
+
+    //----------------------------------------------------------------------
+    // Internals only
+    //
+
+    protected static native boolean initIDs();
+    private        native long CreateWindow(long eglDisplayHandle, boolean chromaKey, int width, int height);
+    private        native void CloseWindow(long eglDisplayHandle, long eglWindowHandle);
+    private        native void SwapWindow(long eglDisplayHandle, long eglWindowHandle);
+
+
+    private long realizeWindow(boolean chromaKey, int width, int height) {
+        if(DEBUG_IMPLEMENTATION) {
+            System.err.println("BCEGL Window.realizeWindow() with: chroma "+chromaKey+", "+width+"x"+height+", "+config);
+        }
+        long handle = CreateWindow(getDisplayHandle(), chromaKey, width, height);
+        if (0 == handle) {
+            throw new NativeWindowException("Error native Window Handle is null");
+        }
+        windowHandleClose = handle;
+        return handle;
+    }
+
+    private void windowCreated(int cfgID, int width, int height) {
+        this.width = width;
+        this.height = height;
+        GLCapabilitiesImmutable capsReq = (GLCapabilitiesImmutable) config.getRequestedCapabilities();
+        config = EGLGraphicsConfiguration.create(capsReq, getScreen().getGraphicsScreen(), cfgID);
+        if (config == null) {
+            throw new NativeWindowException("Error creating EGLGraphicsConfiguration from id: "+cfgID+", "+this);
+        }
+        if(DEBUG_IMPLEMENTATION) {
+            System.err.println("BCEGL Window.windowCreated(): "+toHexString(cfgID)+", "+width+"x"+height+", "+config);
+        }
+    }
+
+    private long   windowHandleClose;
+}
diff --git a/src/newt/classes/jogamp/newt/driver/intel/gdl/Display.java b/src/newt/classes/jogamp/newt/driver/intel/gdl/Display.java
new file mode 100644
index 0000000..20e151e
--- /dev/null
+++ b/src/newt/classes/jogamp/newt/driver/intel/gdl/Display.java
@@ -0,0 +1,104 @@
+/*
+ * 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
+ * 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 jogamp.newt.driver.intel.gdl;
+
+import jogamp.newt.*;
+import javax.media.nativewindow.*;
+
+public class Display extends jogamp.newt.DisplayImpl {
+    static int initCounter = 0;
+
+    static {
+        NEWTJNILibLoader.loadNEWT();
+
+        if (!Screen.initIDs()) {
+            throw new NativeWindowException("Failed to initialize GDL Screen jmethodIDs");
+        }
+        if (!Window.initIDs()) {
+            throw new NativeWindowException("Failed to initialize GDL Window jmethodIDs");
+        }
+    }
+
+    public static void initSingleton() {
+        // just exist to ensure static init has been run
+    }
+
+
+    public Display() {
+    }
+
+    protected void createNativeImpl() {
+        synchronized(Display.class) {
+            if(0==initCounter) {
+                displayHandle = CreateDisplay();
+                if(0==displayHandle) {
+                    throw new NativeWindowException("Couldn't initialize GDL Display");
+                }
+            }
+            initCounter++;
+        }
+        aDevice = new DefaultGraphicsDevice(NativeWindowFactory.TYPE_DEFAULT, AbstractGraphicsDevice.DEFAULT_CONNECTION, AbstractGraphicsDevice.DEFAULT_UNIT, displayHandle);
+    }
+
+    protected void closeNativeImpl() {
+        if(0==displayHandle) {
+            throw new NativeWindowException("displayHandle null; initCnt "+initCounter);
+        }
+        synchronized(Display.class) {
+            if(initCounter>0) {
+                initCounter--;
+                if(0==initCounter) {
+                    DestroyDisplay(displayHandle);
+                }
+            }
+        }
+    }
+
+    protected void dispatchMessagesNative() {
+        if(0!=displayHandle) {
+            DispatchMessages(displayHandle, focusedWindow);
+        }
+    }
+
+    protected void setFocus(Window focus) {
+        focusedWindow = focus;
+    }
+
+    private long displayHandle = 0;
+    private Window focusedWindow = null;
+    private native long CreateDisplay();
+    private native void DestroyDisplay(long displayHandle);
+    private native void DispatchMessages(long displayHandle, Window focusedWindow);
+}
+
diff --git a/src/newt/classes/jogamp/newt/driver/intel/gdl/Screen.java b/src/newt/classes/jogamp/newt/driver/intel/gdl/Screen.java
new file mode 100644
index 0000000..26b7120
--- /dev/null
+++ b/src/newt/classes/jogamp/newt/driver/intel/gdl/Screen.java
@@ -0,0 +1,68 @@
+/*
+ * 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
+ * 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 jogamp.newt.driver.intel.gdl;
+
+import jogamp.newt.*;
+import javax.media.nativewindow.*;
+
+public class Screen extends jogamp.newt.ScreenImpl {
+
+    static {
+        Display.initSingleton();
+    }
+
+    public Screen() {
+    }
+
+    protected void createNativeImpl() {
+        AbstractGraphicsDevice adevice = getDisplay().getGraphicsDevice();
+        GetScreenInfo(adevice.getHandle(), screen_idx);
+        aScreen = new DefaultGraphicsScreen(adevice, screen_idx);
+    }
+
+    protected void closeNativeImpl() { }
+
+    //----------------------------------------------------------------------
+    // Internals only
+    //
+
+    protected static native boolean initIDs();
+    private          native void GetScreenInfo(long displayHandle, int screen_idx);
+
+    // called by GetScreenInfo() ..
+    private void screenCreated(int width, int height) {
+        setScreenSize(width, height);
+    }
+}
+
diff --git a/src/newt/classes/jogamp/newt/driver/intel/gdl/Window.java b/src/newt/classes/jogamp/newt/driver/intel/gdl/Window.java
new file mode 100644
index 0000000..ab3e95e
--- /dev/null
+++ b/src/newt/classes/jogamp/newt/driver/intel/gdl/Window.java
@@ -0,0 +1,152 @@
+/*
+ * 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
+ * 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 jogamp.newt.driver.intel.gdl;
+
+import javax.media.nativewindow.*;
+import javax.media.nativewindow.util.Insets;
+import javax.media.nativewindow.util.Point;
+
+public class Window extends jogamp.newt.WindowImpl {
+    static {
+        Display.initSingleton();
+    }
+
+    public Window() {
+    }
+
+    static long nextWindowHandle = 1;
+
+    protected void createNativeImpl() {
+        if(0!=getParentWindowHandle()) {
+            throw new NativeWindowException("GDL Window does not support window parenting");
+        }
+        AbstractGraphicsScreen aScreen = getScreen().getGraphicsScreen();
+        AbstractGraphicsDevice aDevice = getScreen().getDisplay().getGraphicsDevice();
+
+        config = GraphicsConfigurationFactory.getFactory(aDevice).chooseGraphicsConfiguration(
+                capsRequested, capsRequested, capabilitiesChooser, aScreen);
+        if (config == null) {
+            throw new NativeWindowException("Error choosing GraphicsConfiguration creating window: "+this);
+        }
+
+        synchronized(Window.class) {
+            setWindowHandle(nextWindowHandle++); // just a marker
+
+            surfaceHandle = CreateSurface(aDevice.getHandle(), getScreen().getWidth(), getScreen().getHeight(), x, y, width, height);
+            if (surfaceHandle == 0) {
+                throw new NativeWindowException("Error creating window");
+            }
+        }
+    }
+
+    protected void closeNativeImpl() {
+        if(0!=surfaceHandle) {
+            synchronized(Window.class) {
+                CloseSurface(getDisplayHandle(), surfaceHandle);
+            }
+            surfaceHandle = 0;
+            ((Display)getScreen().getDisplay()).setFocus(null);
+        }
+    }
+
+    protected boolean reconfigureWindowImpl(int x, int y, int width, int height, int flags) {
+        Screen  screen = (Screen) getScreen();
+
+        x=(x>=0)?x:this.x;
+        y=(x>=0)?y:this.y;
+        width=(width>0)?width:this.width;
+        height=(height>0)?height:this.height;
+
+        if(width>screen.getWidth()) {
+            width=screen.getWidth();
+        }
+        if(height>screen.getHeight()) {
+            height=screen.getHeight();
+        }
+        if((x+width)>screen.getWidth()) {
+            x=screen.getWidth()-width;
+        }
+        if((y+height)>screen.getHeight()) {
+            y=screen.getHeight()-height;
+        }
+
+        if(0!=surfaceHandle) {
+            SetBounds0(surfaceHandle, getScreen().getWidth(), getScreen().getHeight(), x, y, width, height);
+        }
+
+        if( 0 != ( FLAG_CHANGE_VISIBILITY & flags) ) {
+            if(0 != ( FLAG_IS_VISIBLE & flags)) {
+                ((Display)getScreen().getDisplay()).setFocus(this);
+            }
+            visibleChanged(false, 0 != ( FLAG_IS_VISIBLE & flags));
+        }
+        
+        return true;
+    }
+
+    protected void requestFocusImpl(boolean reparented) {
+        ((Display)getScreen().getDisplay()).setFocus(this);
+    }
+
+    @Override
+    public final long getSurfaceHandle() {
+        return surfaceHandle;
+    }
+
+    protected Point getLocationOnScreenImpl(int x, int y) {
+        return new Point(x,y);
+    }
+
+    protected void updateInsetsImpl(Insets insets) {
+        // nop ..        
+    }
+    
+    //----------------------------------------------------------------------
+    // Internals only
+    //
+
+    protected static native boolean initIDs();
+    private        native long CreateSurface(long displayHandle, int scrn_width, int scrn_height, int x, int y, int width, int height);
+    private        native void CloseSurface(long displayHandle, long surfaceHandle);
+    private        native void SetBounds0(long surfaceHandle, int scrn_width, int scrn_height, int x, int y, int width, int height);
+
+    private void updateBounds(int x, int y, int width, int height) {
+        this.x = x;
+        this.y = y;
+        this.width = width;
+        this.height = height;
+    }
+
+    private long   surfaceHandle;
+}
diff --git a/src/newt/classes/jogamp/newt/driver/kd/KDDisplay.java b/src/newt/classes/jogamp/newt/driver/kd/KDDisplay.java
new file mode 100644
index 0000000..bbfe101
--- /dev/null
+++ b/src/newt/classes/jogamp/newt/driver/kd/KDDisplay.java
@@ -0,0 +1,84 @@
+/*
+ * 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
+ * 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 jogamp.newt.driver.kd;
+
+import com.jogamp.newt.*;
+import jogamp.newt.*;
+import jogamp.opengl.egl.*;
+import javax.media.nativewindow.*;
+import javax.media.nativewindow.egl.*;
+
+public class KDDisplay extends DisplayImpl {
+
+    static {
+        NEWTJNILibLoader.loadNEWT();
+
+        if (!KDWindow.initIDs()) {
+            throw new NativeWindowException("Failed to initialize KDWindow jmethodIDs");
+        }
+    }
+
+    public static void initSingleton() {
+        // just exist to ensure static init has been run
+    }
+
+
+    public KDDisplay() {
+    }
+
+    protected void createNativeImpl() {
+        // FIXME: map name to EGL_*_DISPLAY
+        long handle = EGL.eglGetDisplay(EGL.EGL_DEFAULT_DISPLAY);
+        if (handle == EGL.EGL_NO_DISPLAY) {
+            throw new NativeWindowException("eglGetDisplay failed");
+        }
+        if (!EGL.eglInitialize(handle, null, null)) {
+            throw new NativeWindowException("eglInitialize failed");
+        }
+        aDevice = new EGLGraphicsDevice(handle, AbstractGraphicsDevice.DEFAULT_CONNECTION, AbstractGraphicsDevice.DEFAULT_UNIT);
+    }
+
+    protected void closeNativeImpl() {
+        if (aDevice.getHandle() != EGL.EGL_NO_DISPLAY) {
+            EGL.eglTerminate(aDevice.getHandle());
+        }
+    }
+
+    protected void dispatchMessagesNative() {
+        DispatchMessages();
+    }
+
+    private native void DispatchMessages();
+}
+
diff --git a/src/newt/classes/jogamp/newt/driver/kd/KDScreen.java b/src/newt/classes/jogamp/newt/driver/kd/KDScreen.java
new file mode 100644
index 0000000..a11b08b
--- /dev/null
+++ b/src/newt/classes/jogamp/newt/driver/kd/KDScreen.java
@@ -0,0 +1,57 @@
+/*
+ * 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
+ * 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 jogamp.newt.driver.kd;
+
+import jogamp.newt.ScreenImpl;
+import javax.media.nativewindow.*;
+
+public class KDScreen extends ScreenImpl {
+    static {
+        KDDisplay.initSingleton();
+    }
+
+    public KDScreen() {
+    }
+
+    protected void createNativeImpl() {
+        aScreen = new DefaultGraphicsScreen(getDisplay().getGraphicsDevice(), screen_idx);
+    }
+
+    protected void closeNativeImpl() { }
+
+    // elevate access to this package ..
+    protected void setScreenSize(int w, int h) {
+        super.setScreenSize(w, h);
+    }
+}
diff --git a/src/newt/classes/jogamp/newt/driver/kd/KDWindow.java b/src/newt/classes/jogamp/newt/driver/kd/KDWindow.java
new file mode 100644
index 0000000..10a75a0
--- /dev/null
+++ b/src/newt/classes/jogamp/newt/driver/kd/KDWindow.java
@@ -0,0 +1,156 @@
+/*
+ * 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
+ * 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 jogamp.newt.driver.kd;
+
+import jogamp.newt.*;
+import jogamp.newt.driver.intel.gdl.Display;
+import jogamp.opengl.egl.*;
+import javax.media.nativewindow.*;
+import javax.media.nativewindow.util.Insets;
+import javax.media.nativewindow.util.Point;
+import javax.media.opengl.GLCapabilitiesImmutable;
+
+public class KDWindow extends WindowImpl {
+    private static final String WINDOW_CLASS_NAME = "NewtWindow";
+
+    static {
+        KDDisplay.initSingleton();
+    }
+
+    public KDWindow() {
+    }
+
+    protected void createNativeImpl() {
+        if(0!=getParentWindowHandle()) {
+            throw new RuntimeException("Window parenting not supported (yet)");
+        }
+        config = GraphicsConfigurationFactory.getFactory(getScreen().getDisplay().getGraphicsDevice()).chooseGraphicsConfiguration(
+                capsRequested, capsRequested, capabilitiesChooser, getScreen().getGraphicsScreen());
+        if (config == null) {
+            throw new NativeWindowException("Error choosing GraphicsConfiguration creating window: "+this);
+        }
+
+        GLCapabilitiesImmutable eglCaps = (GLCapabilitiesImmutable) config.getChosenCapabilities();
+        int[] eglAttribs = EGLGraphicsConfiguration.GLCapabilities2AttribList(eglCaps);
+
+        eglWindowHandle = CreateWindow(getDisplayHandle(), eglAttribs);
+        if (eglWindowHandle == 0) {
+            throw new NativeWindowException("Error creating egl window: "+config);
+        }
+        setVisible0(eglWindowHandle, false);
+        setWindowHandle(RealizeWindow(eglWindowHandle));
+        if (0 == getWindowHandle()) {
+            throw new NativeWindowException("Error native Window Handle is null");
+        }
+        windowHandleClose = eglWindowHandle;
+    }
+
+    protected void closeNativeImpl() {
+        if(0!=windowHandleClose) {
+            CloseWindow(windowHandleClose, windowUserData);
+            windowUserData=0;
+        }
+    }
+
+    protected void requestFocusImpl(boolean reparented) { }
+
+    protected boolean reconfigureWindowImpl(int x, int y, int width, int height, int flags) {
+        if( 0 != ( FLAG_CHANGE_VISIBILITY & flags) ) {
+            setVisible0(eglWindowHandle, 0 != ( FLAG_IS_VISIBLE & flags));
+            visibleChanged(false, 0 != ( FLAG_IS_VISIBLE & flags));
+        }
+        
+        if(0!=eglWindowHandle) {
+            if(0 != ( FLAG_CHANGE_FULLSCREEN & flags)) {
+                final boolean fs = 0 != ( FLAG_IS_FULLSCREEN & flags) ;
+                setFullScreen0(eglWindowHandle, fs);
+                if(fs) {
+                    return true;
+                }
+            }
+            // int _x=(x>=0)?x:this.x;
+            // int _y=(x>=0)?y:this.y;
+            width=(width>0)?width:this.width;
+            height=(height>0)?height:this.height;
+            if(width>0 || height>0) {
+                setSize0(eglWindowHandle, width, height);
+            }
+            if(x>=0 || y>=0) {
+                System.err.println("setPosition n/a in KD");
+            }
+        }
+        
+        if( 0 != ( FLAG_CHANGE_VISIBILITY & flags) ) {
+            visibleChanged(false, 0 != ( FLAG_IS_VISIBLE & flags));
+        }
+        
+        return true;
+    }
+
+    protected Point getLocationOnScreenImpl(int x, int y) {
+        return new Point(x,y);
+    }
+
+    protected void updateInsetsImpl(Insets insets) {
+        // nop ..        
+    }
+        
+    //----------------------------------------------------------------------
+    // Internals only
+    //
+
+    protected static native boolean initIDs();
+    private        native long CreateWindow(long displayHandle, int[] attributes);
+    private        native long RealizeWindow(long eglWindowHandle);
+    private        native int  CloseWindow(long eglWindowHandle, long userData);
+    private        native void setVisible0(long eglWindowHandle, boolean visible);
+    private        native void setSize0(long eglWindowHandle, int width, int height);
+    private        native void setFullScreen0(long eglWindowHandle, boolean fullscreen);
+
+    private void windowCreated(long userData) {
+        windowUserData=userData;
+    }
+
+    @Override
+    protected void sizeChanged(boolean defer, int newWidth, int newHeight, boolean force) {
+        if(fullscreen) {
+            ((KDScreen)getScreen()).setScreenSize(width, height);
+        }
+        super.sizeChanged(defer, newWidth, newHeight, force);
+    }
+
+    private long   eglWindowHandle;
+    private long   windowHandleClose;
+    private long   windowUserData;
+}
diff --git a/src/newt/classes/jogamp/newt/driver/macosx/MacDisplay.java b/src/newt/classes/jogamp/newt/driver/macosx/MacDisplay.java
new file mode 100644
index 0000000..527fdac
--- /dev/null
+++ b/src/newt/classes/jogamp/newt/driver/macosx/MacDisplay.java
@@ -0,0 +1,79 @@
+/*
+ * 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
+ * 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 jogamp.newt.driver.macosx;
+
+import javax.media.nativewindow.*;
+import javax.media.nativewindow.macosx.*;
+import jogamp.newt.*;
+
+public class MacDisplay extends DisplayImpl {
+    static {
+        NEWTJNILibLoader.loadNEWT();
+
+        if(!initNSApplication0()) {
+            throw new NativeWindowException("Failed to initialize native Application hook");
+        }
+        if(!MacWindow.initIDs0()) {
+            throw new NativeWindowException("Failed to initialize jmethodIDs");
+        }
+        if(DEBUG) {
+            System.err.println("MacDisplay.init App and IDs OK "+Thread.currentThread().getName());
+        }
+    }
+
+    public static void initSingleton() {
+        // just exist to ensure static init has been run
+    }
+    
+    public MacDisplay() {
+    }
+
+    protected void dispatchMessagesNative() {
+        // nop
+    }
+    
+    protected void createNativeImpl() {
+        aDevice = new MacOSXGraphicsDevice(AbstractGraphicsDevice.DEFAULT_UNIT);
+    }
+
+    protected void closeNativeImpl() { }
+
+    public static void runNSApplication() {
+        runNSApplication0();
+    }
+
+    private static native boolean initNSApplication0();
+    private static native void runNSApplication0();
+}
+
diff --git a/src/newt/classes/jogamp/newt/driver/macosx/MacScreen.java b/src/newt/classes/jogamp/newt/driver/macosx/MacScreen.java
new file mode 100644
index 0000000..67a3f8e
--- /dev/null
+++ b/src/newt/classes/jogamp/newt/driver/macosx/MacScreen.java
@@ -0,0 +1,57 @@
+/*
+ * 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
+ * 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 jogamp.newt.driver.macosx;
+
+import com.jogamp.newt.*;
+import jogamp.newt.ScreenImpl;
+import javax.media.nativewindow.*;
+
+public class MacScreen extends ScreenImpl {
+    static {
+        MacDisplay.initSingleton();
+    }
+
+    public MacScreen() {
+    }
+
+    protected void createNativeImpl() {
+        aScreen = new DefaultGraphicsScreen(getDisplay().getGraphicsDevice(), screen_idx);
+        setScreenSize(getWidthImpl0(screen_idx), getHeightImpl0(screen_idx));
+    }
+
+    protected void closeNativeImpl() { }
+
+    private static native int getWidthImpl0(int scrn_idx);
+    private static native int getHeightImpl0(int scrn_idx);
+}
diff --git a/src/newt/classes/jogamp/newt/driver/macosx/MacWindow.java b/src/newt/classes/jogamp/newt/driver/macosx/MacWindow.java
new file mode 100644
index 0000000..b34f9a2
--- /dev/null
+++ b/src/newt/classes/jogamp/newt/driver/macosx/MacWindow.java
@@ -0,0 +1,444 @@
+/*
+ * 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
+ * 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 jogamp.newt.driver.macosx;
+
+import javax.media.nativewindow.*;
+
+import com.jogamp.newt.event.*;
+
+import jogamp.nativewindow.macosx.OSXUtil;
+import jogamp.newt.*;
+
+import javax.media.nativewindow.util.Insets;
+import javax.media.nativewindow.util.InsetsImmutable;
+import javax.media.nativewindow.util.Point;
+
+public class MacWindow extends WindowImpl {
+    
+    // Window styles
+    private static final int NSBorderlessWindowMask     = 0;
+    private static final int NSTitledWindowMask         = 1 << 0;
+    private static final int NSClosableWindowMask       = 1 << 1;
+    private static final int NSMiniaturizableWindowMask = 1 << 2;
+    private static final int NSResizableWindowMask      = 1 << 3;
+
+    // Window backing store types
+    private static final int NSBackingStoreRetained     = 0;
+    private static final int NSBackingStoreNonretained  = 1;
+    private static final int NSBackingStoreBuffered     = 2;
+
+    // Key constants handled differently on Mac OS X than other platforms
+    private static final int NSUpArrowFunctionKey        = 0xF700;
+    private static final int NSDownArrowFunctionKey      = 0xF701;
+    private static final int NSLeftArrowFunctionKey      = 0xF702;
+    private static final int NSRightArrowFunctionKey     = 0xF703;
+    private static final int NSF1FunctionKey             = 0xF704;
+    private static final int NSF2FunctionKey             = 0xF705;
+    private static final int NSF3FunctionKey             = 0xF706;
+    private static final int NSF4FunctionKey             = 0xF707;
+    private static final int NSF5FunctionKey             = 0xF708;
+    private static final int NSF6FunctionKey             = 0xF709;
+    private static final int NSF7FunctionKey             = 0xF70A;
+    private static final int NSF8FunctionKey             = 0xF70B;
+    private static final int NSF9FunctionKey             = 0xF70C;
+    private static final int NSF10FunctionKey            = 0xF70D;
+    private static final int NSF11FunctionKey            = 0xF70E;
+    private static final int NSF12FunctionKey            = 0xF70F;
+    private static final int NSF13FunctionKey            = 0xF710;
+    private static final int NSF14FunctionKey            = 0xF711;
+    private static final int NSF15FunctionKey            = 0xF712;
+    private static final int NSF16FunctionKey            = 0xF713;
+    private static final int NSF17FunctionKey            = 0xF714;
+    private static final int NSF18FunctionKey            = 0xF715;
+    private static final int NSF19FunctionKey            = 0xF716;
+    private static final int NSF20FunctionKey            = 0xF717;
+    private static final int NSF21FunctionKey            = 0xF718;
+    private static final int NSF22FunctionKey            = 0xF719;
+    private static final int NSF23FunctionKey            = 0xF71A;
+    private static final int NSF24FunctionKey            = 0xF71B;
+    private static final int NSF25FunctionKey            = 0xF71C;
+    private static final int NSF26FunctionKey            = 0xF71D;
+    private static final int NSF27FunctionKey            = 0xF71E;
+    private static final int NSF28FunctionKey            = 0xF71F;
+    private static final int NSF29FunctionKey            = 0xF720;
+    private static final int NSF30FunctionKey            = 0xF721;
+    private static final int NSF31FunctionKey            = 0xF722;
+    private static final int NSF32FunctionKey            = 0xF723;
+    private static final int NSF33FunctionKey            = 0xF724;
+    private static final int NSF34FunctionKey            = 0xF725;
+    private static final int NSF35FunctionKey            = 0xF726;
+    private static final int NSInsertFunctionKey         = 0xF727;
+    private static final int NSDeleteFunctionKey         = 0xF728;
+    private static final int NSHomeFunctionKey           = 0xF729;
+    private static final int NSBeginFunctionKey          = 0xF72A;
+    private static final int NSEndFunctionKey            = 0xF72B;
+    private static final int NSPageUpFunctionKey         = 0xF72C;
+    private static final int NSPageDownFunctionKey       = 0xF72D;
+    private static final int NSPrintScreenFunctionKey    = 0xF72E;
+    private static final int NSScrollLockFunctionKey     = 0xF72F;
+    private static final int NSPauseFunctionKey          = 0xF730;
+    private static final int NSSysReqFunctionKey         = 0xF731;
+    private static final int NSBreakFunctionKey          = 0xF732;
+    private static final int NSResetFunctionKey          = 0xF733;
+    private static final int NSStopFunctionKey           = 0xF734;
+    private static final int NSMenuFunctionKey           = 0xF735;
+    private static final int NSUserFunctionKey           = 0xF736;
+    private static final int NSSystemFunctionKey         = 0xF737;
+    private static final int NSPrintFunctionKey          = 0xF738;
+    private static final int NSClearLineFunctionKey      = 0xF739;
+    private static final int NSClearDisplayFunctionKey   = 0xF73A;
+    private static final int NSInsertLineFunctionKey     = 0xF73B;
+    private static final int NSDeleteLineFunctionKey     = 0xF73C;
+    private static final int NSInsertCharFunctionKey     = 0xF73D;
+    private static final int NSDeleteCharFunctionKey     = 0xF73E;
+    private static final int NSPrevFunctionKey           = 0xF73F;
+    private static final int NSNextFunctionKey           = 0xF740;
+    private static final int NSSelectFunctionKey         = 0xF741;
+    private static final int NSExecuteFunctionKey        = 0xF742;
+    private static final int NSUndoFunctionKey           = 0xF743;
+    private static final int NSRedoFunctionKey           = 0xF744;
+    private static final int NSFindFunctionKey           = 0xF745;
+    private static final int NSHelpFunctionKey           = 0xF746;
+    private static final int NSModeSwitchFunctionKey     = 0xF747;
+
+    private volatile long surfaceHandle;
+
+    static {
+        MacDisplay.initSingleton();
+    }
+
+    public MacWindow() {
+    }
+    
+    protected void createNativeImpl() {
+        config = GraphicsConfigurationFactory.getFactory(getScreen().getDisplay().getGraphicsDevice()).chooseGraphicsConfiguration(
+                capsRequested, capsRequested, capabilitiesChooser, getScreen().getGraphicsScreen());
+        if (config == null) {
+            throw new NativeWindowException("Error choosing GraphicsConfiguration creating window: "+this);
+        }
+        reconfigureWindowImpl(x, y, width, height, getReconfigureFlags(FLAG_CHANGE_VISIBILITY, true));        
+        if (0 == getWindowHandle()) {
+            throw new NativeWindowException("Error creating window");
+        }
+    }
+
+    protected void closeNativeImpl() {
+        try {
+            if(DEBUG_IMPLEMENTATION) { System.err.println("MacWindow.CloseAction "+Thread.currentThread().getName()); }
+            if (getWindowHandle() != 0) {
+                orderOut0(getWindowHandle());
+                close0(getWindowHandle());
+            }
+        } catch (Throwable t) {
+            if(DEBUG_IMPLEMENTATION) { 
+                Exception e = new Exception("Warning: closeNative failed - "+Thread.currentThread().getName(), t);
+                e.printStackTrace();
+            }
+        } finally {
+            setWindowHandle(0);
+        }
+    }
+    
+    @Override
+    public final long getSurfaceHandle() {
+        return surfaceHandle;
+    }
+
+    @Override
+    protected void setTitleImpl(final String title) {
+        setTitle0(getWindowHandle(), title);
+    }
+
+    protected void requestFocusImpl(boolean reparented) {
+        makeKeyAndOrderFront0(getWindowHandle());            
+    }
+    
+    protected boolean reconfigureWindowImpl(int x, int y, int width, int height, int flags) {
+        int _x = x, _y = y;
+        if(0 == ( FLAG_IS_UNDECORATED & flags) && 0<=_x && 0<=_y) {
+            final InsetsImmutable i = getInsets();         
+            
+            // client position -> top-level window position
+            _x -= i.getLeftWidth() ;
+            _y -= i.getTopHeight() ;
+            if( 0 > _x ) { _x = 0; }
+            if( 0 > _y ) { _y = 0; }
+            if(DEBUG_IMPLEMENTATION) {
+                System.err.println("MacWindow reconfig (insets: "+i+"): "+x+"/"+y+" -> "+_x+"/"+_y);
+            }
+        }
+        {
+            // On MacOSX the absolute position is required to position 
+            // a window - even for a child window!
+            final NativeWindow parent = getParent();
+            if( null != parent && 0 != parent.getWindowHandle() ) {
+                final Point p = parent.getLocationOnScreen(null);
+                _x += p.getX();
+                _y += p.getY();
+                if(DEBUG_IMPLEMENTATION) {
+                    System.err.println("MacWindow reconfig (parent abs pos: "+p+"): "+x+"/"+y+" -> "+_x+"/"+_y);
+                }
+            }
+        }
+        
+        if(DEBUG_IMPLEMENTATION) {
+            System.err.println("MacWindow reconfig: "+x+"/"+y+" -> "+_x+"/"+_y+" - "+width+"x"+height+", "+
+                               getReconfigureFlagsAsString(null, flags));
+        }
+        
+        if( getWindowHandle() == 0 ) {
+            if( 0 != ( FLAG_IS_VISIBLE & flags) ) {
+                // FIXME: for some reason we do not need (or can use) 
+                // the absolute position at creation time .. need to determine the reason/mechanics.
+                createWindow(false, x, y, width, height, 0 != ( FLAG_IS_FULLSCREEN & flags));
+                this.x = x;
+                this.y = y;
+                visibleChanged(false, true); // no native event ..
+            } /* else { ?? } */
+        } else {
+            if( 0 != ( FLAG_CHANGE_VISIBILITY & flags) ) {
+                if( 0 != ( FLAG_IS_VISIBLE & flags) ) {
+                    makeKeyAndOrderFront0(getWindowHandle());
+                    visibleChanged(false, true); // no native event ..
+                    enqueueWindowEvent(false, WindowEvent.EVENT_WINDOW_GAINED_FOCUS);
+                } else {
+                    orderOut0(getWindowHandle());
+                    visibleChanged(false, false); // no native event ..
+                    enqueueWindowEvent(false, WindowEvent.EVENT_WINDOW_LOST_FOCUS);
+                }
+            } else if( 0 != ( FLAG_CHANGE_DECORATION & flags) ||
+                       0 != ( FLAG_CHANGE_PARENTING & flags) ||
+                       0 != ( FLAG_CHANGE_FULLSCREEN & flags) ) {
+                // FIXME: for some reason we do not need (or can use) 
+                // the absolute position at creation time .. need to determine the reason/mechanics.
+                createWindow(true, x, y, width, height, 0 != ( FLAG_IS_FULLSCREEN & flags));
+            }
+            if(x>=0 && y>=0) {
+                setFrameTopLeftPoint0(getParentWindowHandle(), getWindowHandle(), _x, _y);
+                this.x = x;
+                this.y = y;
+                enqueueWindowEvent(false, WindowEvent.EVENT_WINDOW_MOVED);
+            }
+            if(width>0 && height>0) {
+                setContentSize0(getWindowHandle(), width, height);
+                this.width = width;
+                this.height = height;
+                enqueueWindowEvent(false, WindowEvent.EVENT_WINDOW_RESIZED);
+            }
+            setAlwaysOnTop0(getWindowHandle(), 0 != ( FLAG_IS_ALWAYSONTOP & flags));
+        }
+        return true;
+    }
+
+    protected Point getLocationOnScreenImpl(int x, int y) {
+        return OSXUtil.GetLocationOnScreen(getWindowHandle(), x, y);
+    }
+    
+    protected void updateInsetsImpl(Insets insets) {
+        // nop - using event driven insetsChange(..)
+    }
+        
+    private char convertKeyChar(char keyChar) {
+        if (keyChar == '\r') {
+            // Turn these into \n
+            return '\n';
+        }
+
+        if (keyChar >= NSUpArrowFunctionKey && keyChar <= NSModeSwitchFunctionKey) {
+            switch (keyChar) {
+                case NSUpArrowFunctionKey:     return KeyEvent.VK_UP;
+                case NSDownArrowFunctionKey:   return KeyEvent.VK_DOWN;
+                case NSLeftArrowFunctionKey:   return KeyEvent.VK_LEFT;
+                case NSRightArrowFunctionKey:  return KeyEvent.VK_RIGHT;
+                case NSF1FunctionKey:          return KeyEvent.VK_F1;
+                case NSF2FunctionKey:          return KeyEvent.VK_F2;
+                case NSF3FunctionKey:          return KeyEvent.VK_F3;
+                case NSF4FunctionKey:          return KeyEvent.VK_F4;
+                case NSF5FunctionKey:          return KeyEvent.VK_F5;
+                case NSF6FunctionKey:          return KeyEvent.VK_F6;
+                case NSF7FunctionKey:          return KeyEvent.VK_F7;
+                case NSF8FunctionKey:          return KeyEvent.VK_F8;
+                case NSF9FunctionKey:          return KeyEvent.VK_F9;
+                case NSF10FunctionKey:         return KeyEvent.VK_F10;
+                case NSF11FunctionKey:         return KeyEvent.VK_F11;
+                case NSF12FunctionKey:         return KeyEvent.VK_F12;
+                case NSF13FunctionKey:         return KeyEvent.VK_F13;
+                case NSF14FunctionKey:         return KeyEvent.VK_F14;
+                case NSF15FunctionKey:         return KeyEvent.VK_F15;
+                case NSF16FunctionKey:         return KeyEvent.VK_F16;
+                case NSF17FunctionKey:         return KeyEvent.VK_F17;
+                case NSF18FunctionKey:         return KeyEvent.VK_F18;
+                case NSF19FunctionKey:         return KeyEvent.VK_F19;
+                case NSF20FunctionKey:         return KeyEvent.VK_F20;
+                case NSF21FunctionKey:         return KeyEvent.VK_F21;
+                case NSF22FunctionKey:         return KeyEvent.VK_F22;
+                case NSF23FunctionKey:         return KeyEvent.VK_F23;
+                case NSF24FunctionKey:         return KeyEvent.VK_F24;
+                case NSInsertFunctionKey:      return KeyEvent.VK_INSERT;
+                case NSDeleteFunctionKey:      return KeyEvent.VK_DELETE;
+                case NSHomeFunctionKey:        return KeyEvent.VK_HOME;
+                case NSBeginFunctionKey:       return KeyEvent.VK_BEGIN;
+                case NSEndFunctionKey:         return KeyEvent.VK_END;
+                case NSPageUpFunctionKey:      return KeyEvent.VK_PAGE_UP;
+                case NSPageDownFunctionKey:    return KeyEvent.VK_PAGE_DOWN;
+                case NSPrintScreenFunctionKey: return KeyEvent.VK_PRINTSCREEN;
+                case NSScrollLockFunctionKey:  return KeyEvent.VK_SCROLL_LOCK;
+                case NSPauseFunctionKey:       return KeyEvent.VK_PAUSE;
+                // Not handled:
+                // NSSysReqFunctionKey
+                // NSBreakFunctionKey
+                // NSResetFunctionKey
+                case NSStopFunctionKey:        return KeyEvent.VK_STOP;
+                // Not handled:
+                // NSMenuFunctionKey
+                // NSUserFunctionKey
+                // NSSystemFunctionKey
+                // NSPrintFunctionKey
+                // NSClearLineFunctionKey
+                // NSClearDisplayFunctionKey
+                // NSInsertLineFunctionKey
+                // NSDeleteLineFunctionKey
+                // NSInsertCharFunctionKey
+                // NSDeleteCharFunctionKey
+                // NSPrevFunctionKey
+                // NSNextFunctionKey
+                // NSSelectFunctionKey
+                // NSExecuteFunctionKey
+                // NSUndoFunctionKey
+                // NSRedoFunctionKey
+                // NSFindFunctionKey
+                // NSHelpFunctionKey
+                // NSModeSwitchFunctionKey
+                default: break;
+            }
+        }
+
+        // NSEvent's charactersIgnoringModifiers doesn't ignore the shift key
+        if (keyChar >= 'a' && keyChar <= 'z') {
+            return Character.toUpperCase(keyChar);
+        }
+
+        return keyChar;
+    }
+
+    @Override
+    public void enqueueKeyEvent(boolean wait, int eventType, int modifiers, int keyCode, char keyChar) {
+        int key = convertKeyChar(keyChar);
+        if(DEBUG_IMPLEMENTATION) System.err.println("MacWindow.enqueueKeyEvent "+Thread.currentThread().getName());
+        // Note that we send the key char for the key code on this
+        // platform -- we do not get any useful key codes out of the system
+        super.enqueueKeyEvent(wait, eventType, modifiers, key, keyChar);
+    }
+
+    private void createWindow(final boolean recreate, 
+                              int x, int y, int width, int height, 
+                              final boolean fullscreen) {
+
+        if(0!=getWindowHandle() && !recreate) {
+            return;
+        }
+
+        x=(x>=0)?x:this.x;
+        y=(x>=0)?y:this.y;
+        width=(width>0)?width:this.width;
+        height=(height>0)?height:this.height;
+        
+        final NativeWindow parent = getParent();
+        if(null != parent) {
+            final Point p = parent.getLocationOnScreen(null);
+            x += p.getX();
+            y += p.getY();
+        }
+        
+        try {
+            if(0!=getWindowHandle()) {
+                // save the view .. close the window
+                surfaceHandle = changeContentView0(getParentWindowHandle(), getWindowHandle(), 0);
+                if(recreate && 0==surfaceHandle) {
+                    throw new NativeWindowException("Internal Error - recreate, window but no view");
+                }
+                orderOut0(getWindowHandle());
+                close0(getWindowHandle());
+                setWindowHandle(0);
+            } else {
+                surfaceHandle = 0;
+            }
+            setWindowHandle(createWindow0(getParentWindowHandle(),
+                                         x, y, width, height,
+                                         config.getChosenCapabilities().isBackgroundOpaque(),
+                                         fullscreen,
+                                         (isUndecorated() ?
+                                         NSBorderlessWindowMask :
+                                         NSTitledWindowMask|NSClosableWindowMask|NSMiniaturizableWindowMask|NSResizableWindowMask),
+                                         NSBackingStoreBuffered, 
+                                         getScreen().getIndex(), surfaceHandle));
+            if (getWindowHandle() == 0) {
+                throw new NativeWindowException("Could create native window "+Thread.currentThread().getName()+" "+this);
+            }
+            surfaceHandle = contentView0(getWindowHandle());
+            setTitle0(getWindowHandle(), getTitle());
+            makeKeyAndOrderFront0(getWindowHandle());
+        } catch (Exception ie) {
+            ie.printStackTrace();
+        }
+    }
+    
+    @Override
+    protected void positionChanged(boolean defer, int newX, int newY) {
+        final NativeWindow parent = getParent();
+        if(null != parent) {
+            final Point p = parent.getLocationOnScreen(null);
+            newX -= p.getX();
+            newY -= p.getY();
+        }
+        super.positionChanged(defer, newX, newY);
+    }
+    
+    protected static native boolean initIDs0();
+    private native long createWindow0(long parentWindowHandle, int x, int y, int w, int h,
+                                     boolean opaque, boolean fullscreen, int windowStyle,
+                                     int backingStoreType,
+                                     int screen_idx, long view);
+    private native void makeKeyAndOrderFront0(long window);
+    private native void makeKey0(long window);
+    private native void orderOut0(long window);
+    private native void close0(long window);
+    private native void setTitle0(long window, String title);
+    private native long contentView0(long window);
+    private native long changeContentView0(long parentWindowOrViewHandle, long window, long view);
+    private native void setContentSize0(long window, int w, int h);
+    private native void setFrameTopLeftPoint0(long parentWindowHandle, long window, int x, int y);
+    private native void setAlwaysOnTop0(long window, boolean atop);
+}
diff --git a/src/newt/classes/jogamp/newt/driver/windows/WindowsDisplay.java b/src/newt/classes/jogamp/newt/driver/windows/WindowsDisplay.java
new file mode 100644
index 0000000..524d9fc
--- /dev/null
+++ b/src/newt/classes/jogamp/newt/driver/windows/WindowsDisplay.java
@@ -0,0 +1,94 @@
+/*
+ * 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
+ * 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 jogamp.newt.driver.windows;
+
+import jogamp.nativewindow.windows.RegisteredClass;
+import jogamp.nativewindow.windows.RegisteredClassFactory;
+import jogamp.newt.DisplayImpl;
+import jogamp.newt.NEWTJNILibLoader;
+import javax.media.nativewindow.AbstractGraphicsDevice;
+import javax.media.nativewindow.NativeWindowException;
+import javax.media.nativewindow.windows.WindowsGraphicsDevice;
+
+public class WindowsDisplay extends DisplayImpl {
+
+    private static final String newtClassBaseName = "_newt_clazz" ;
+    private static RegisteredClassFactory sharedClassFactory;
+
+    static {
+        NEWTJNILibLoader.loadNEWT();
+
+        if (!WindowsWindow.initIDs0()) {
+            throw new NativeWindowException("Failed to initialize WindowsWindow jmethodIDs");
+        }        
+        sharedClassFactory = new RegisteredClassFactory(newtClassBaseName, WindowsWindow.getNewtWndProc0());
+    }
+
+    public static void initSingleton() {
+        // just exist to ensure static init has been run
+    }
+
+    private RegisteredClass sharedClass;
+
+    public WindowsDisplay() {
+    }
+
+    protected void createNativeImpl() {
+        sharedClass = sharedClassFactory.getSharedClass();
+        aDevice = new WindowsGraphicsDevice(AbstractGraphicsDevice.DEFAULT_UNIT);
+    }
+
+    protected void closeNativeImpl() { 
+        sharedClassFactory.releaseSharedClass();
+    }
+
+    protected void dispatchMessagesNative() {
+        DispatchMessages0();
+    }
+
+    protected long getHInstance() {
+        return sharedClass.getHandle();
+    }
+
+    protected String getWindowClassName() {
+        return sharedClass.getName();
+    }
+
+    //----------------------------------------------------------------------
+    // Internals only
+    //
+    private static native void DispatchMessages0();
+}
+
diff --git a/src/newt/classes/jogamp/newt/driver/windows/WindowsScreen.java b/src/newt/classes/jogamp/newt/driver/windows/WindowsScreen.java
new file mode 100644
index 0000000..f2e457a
--- /dev/null
+++ b/src/newt/classes/jogamp/newt/driver/windows/WindowsScreen.java
@@ -0,0 +1,114 @@
+/*
+ * 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
+ * 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 jogamp.newt.driver.windows;
+
+import com.jogamp.common.util.ArrayHashSet;
+import java.util.ArrayList;
+
+import com.jogamp.newt.*;
+import jogamp.newt.ScreenImpl;
+import com.jogamp.newt.ScreenMode;
+import jogamp.newt.ScreenModeStatus;
+import com.jogamp.newt.util.ScreenModeUtil;
+
+import javax.media.nativewindow.*;
+
+public class WindowsScreen extends ScreenImpl {
+
+    static {
+        WindowsDisplay.initSingleton();
+    }
+
+    public WindowsScreen() {
+    }
+
+    protected void createNativeImpl() {
+        aScreen = new DefaultGraphicsScreen(getDisplay().getGraphicsDevice(), screen_idx);
+        setScreenSize(getWidthImpl0(screen_idx), getHeightImpl0(screen_idx));
+    }
+
+    protected void closeNativeImpl() {
+    }
+
+    private int[] getScreenModeIdx(int idx) {
+        int[] modeProps = getScreenMode0(screen_idx, idx);
+        if (null == modeProps || 0 == modeProps.length) {
+            return null;
+        }
+        if(modeProps.length < ScreenModeUtil.NUM_SCREEN_MODE_PROPERTIES_ALL) {
+            throw new RuntimeException("properties array too short, should be >= "+ScreenModeUtil.NUM_SCREEN_MODE_PROPERTIES_ALL+", is "+modeProps.length);
+        }
+        return modeProps;
+    }
+
+    private int nativeModeIdx;
+
+    protected int[] getScreenModeFirstImpl() {
+        nativeModeIdx = 0;
+        return getScreenModeNextImpl();
+    }
+
+    protected int[] getScreenModeNextImpl() {
+        int[] modeProps = getScreenModeIdx(nativeModeIdx);
+        if (null != modeProps && 0 < modeProps.length) {
+            nativeModeIdx++;
+            return modeProps;
+        }
+        return null;
+    }
+
+    protected ScreenMode getCurrentScreenModeImpl() {
+        int[] modeProps = getScreenModeIdx(-1);
+        if (null != modeProps && 0 < modeProps.length) {
+            return ScreenModeUtil.streamIn(modeProps, 0);
+        }
+        return null;
+    }
+
+    protected boolean setCurrentScreenModeImpl(ScreenMode sm) {
+        return setScreenMode0(screen_idx, 
+                              sm.getMonitorMode().getSurfaceSize().getResolution().getWidth(),
+                              sm.getMonitorMode().getSurfaceSize().getResolution().getHeight(),
+                              sm.getMonitorMode().getSurfaceSize().getBitsPerPixel(),
+                              sm.getMonitorMode().getRefreshRate(),
+                              sm.getRotation());
+    }
+
+    // Native calls
+    private native int getWidthImpl0(int scrn_idx);
+
+    private native int getHeightImpl0(int scrn_idx);
+
+    private native int[] getScreenMode0(int screen_index, int mode_index);
+    private native boolean setScreenMode0(int screen_index, int width, int height, int bits, int freq, int rot);
+}
diff --git a/src/newt/classes/jogamp/newt/driver/windows/WindowsWindow.java b/src/newt/classes/jogamp/newt/driver/windows/WindowsWindow.java
new file mode 100644
index 0000000..ee057fb
--- /dev/null
+++ b/src/newt/classes/jogamp/newt/driver/windows/WindowsWindow.java
@@ -0,0 +1,214 @@
+/*
+ * 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
+ * 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 jogamp.newt.driver.windows;
+
+import jogamp.nativewindow.windows.GDI;
+import jogamp.newt.WindowImpl;
+import javax.media.nativewindow.GraphicsConfigurationFactory;
+import javax.media.nativewindow.NativeWindowException;
+import javax.media.nativewindow.util.Insets;
+import javax.media.nativewindow.util.InsetsImmutable;
+import javax.media.nativewindow.util.Point;
+
+public class WindowsWindow extends WindowImpl {
+
+    private long hmon;
+    private long hdc;
+    private long windowHandleClose;
+
+    static {
+        WindowsDisplay.initSingleton();
+    }
+
+    public WindowsWindow() {
+    }
+
+    @Override
+    protected int lockSurfaceImpl() {
+        if (0 != hdc) {
+            throw new InternalError("surface not released");
+        }
+        hdc = GDI.GetDC(getWindowHandle());
+        hmon = MonitorFromWindow0(getWindowHandle());
+        return ( 0 != hdc ) ? LOCK_SUCCESS : LOCK_SURFACE_NOT_READY;
+    }
+
+    @Override
+    protected void unlockSurfaceImpl() {
+        if (0 == hdc) {
+            throw new InternalError("surface not acquired");
+        }
+        GDI.ReleaseDC(getWindowHandle(), hdc);
+        hdc=0;
+    }
+
+    @Override
+    public final long getSurfaceHandle() {
+        return hdc;
+    }
+
+    @Override
+    public boolean hasDeviceChanged() {
+        if(0!=getWindowHandle()) {
+            long _hmon = MonitorFromWindow0(getWindowHandle());
+            if (hmon != _hmon) {
+                if(DEBUG_IMPLEMENTATION) {
+                    Exception e = new Exception("Info: Window Device Changed "+Thread.currentThread().getName()+
+                                                ", HMON "+toHexString(hmon)+" -> "+toHexString(_hmon));
+                    e.printStackTrace();
+                }
+                hmon = _hmon;
+                return true;
+            }
+        }
+        return false;
+    }
+
+    protected void createNativeImpl() {
+        WindowsScreen  screen = (WindowsScreen) getScreen();
+        WindowsDisplay display = (WindowsDisplay) screen.getDisplay();
+        config = GraphicsConfigurationFactory.getFactory(display.getGraphicsDevice()).chooseGraphicsConfiguration(
+                capsRequested, capsRequested, capabilitiesChooser, screen.getGraphicsScreen());
+        if (config == null) {
+            throw new NativeWindowException("Error choosing GraphicsConfiguration creating window: "+this);
+        }
+        final int flags = getReconfigureFlags(0, true) & 
+                          ( FLAG_IS_ALWAYSONTOP | FLAG_IS_UNDECORATED ) ;
+        setWindowHandle(CreateWindow0(display.getHInstance(), display.getWindowClassName(), display.getWindowClassName(),
+                                      getParentWindowHandle(), x, y, width, height, flags)); 
+        if (getWindowHandle() == 0) {
+            throw new NativeWindowException("Error creating window");
+        }
+        windowHandleClose = getWindowHandle();
+        if(DEBUG_IMPLEMENTATION) {
+            Exception e = new Exception("Info: Window new window handle "+Thread.currentThread().getName()+
+                                        " (Parent HWND "+toHexString(getParentWindowHandle())+
+                                        ") : HWND "+toHexString(getWindowHandle())+", "+Thread.currentThread());
+            e.printStackTrace();
+        }
+    }
+
+    protected void closeNativeImpl() {
+        if (hdc != 0) {
+            if(windowHandleClose != 0) {
+                try {
+                    GDI.ReleaseDC(windowHandleClose, hdc);
+                } catch (Throwable t) {
+                    if(DEBUG_IMPLEMENTATION) { 
+                        Exception e = new Exception("Warning: closeNativeImpl failed - "+Thread.currentThread().getName(), t);
+                        e.printStackTrace();
+                    }
+                }
+            }
+            hdc = 0;
+        }
+        if(windowHandleClose != 0) {
+            try {
+                GDI.DestroyWindow(windowHandleClose);
+            } catch (Throwable t) {
+                if(DEBUG_IMPLEMENTATION) {
+                    Exception e = new Exception("Warning: closeNativeImpl failed - "+Thread.currentThread().getName(), t);
+                    e.printStackTrace();
+                }
+            } finally {
+                windowHandleClose = 0;
+            }
+        }
+    }
+
+    protected boolean reconfigureWindowImpl(int x, int y, int width, int height, int flags) {
+        if(DEBUG_IMPLEMENTATION) {
+            System.err.println("WindowsWindow reconfig: "+x+"/"+y+" "+width+"x"+height+", "+
+                               getReconfigureFlagsAsString(null, flags));
+        }
+        
+        if(0 == ( FLAG_IS_UNDECORATED & flags)) {
+            final InsetsImmutable i = getInsets();
+            
+            // client position -> top-level window position
+            if(0<=x && 0<=y) {
+                x -= i.getLeftWidth() ;
+                y -= i.getTopHeight() ;
+                if( 0 > x ) { x = 0; }
+                if( 0 > y ) { y = 0; }
+            }
+            
+            if(0<width && 0<height) {
+                // client size -> top-level window size
+                width += i.getTotalWidth();
+                height += i.getTotalHeight();
+            }
+        }
+        reconfigureWindow0( getParentWindowHandle(), getWindowHandle(), x, y, width, height, flags);
+        
+        if( 0 != ( FLAG_CHANGE_VISIBILITY & flags) ) {
+            visibleChanged(false, 0 != ( FLAG_IS_VISIBLE & flags));            
+        }
+        return true;
+    }
+
+    protected void requestFocusImpl(boolean force) {
+        requestFocus0(getWindowHandle(), force);
+    }
+
+    @Override
+    protected void setTitleImpl(final String title) {
+        setTitle0(getWindowHandle(), title);
+    }
+
+    protected Point getLocationOnScreenImpl(int x, int y) {
+        return GDI.GetRelativeLocation( getWindowHandle(), 0 /*root win*/, x, y);
+    }
+
+    protected void updateInsetsImpl(Insets insets) {
+        // nop - using event driven insetsChange(..)         
+    }
+    
+    //----------------------------------------------------------------------
+    // Internals only
+    //
+    protected static native boolean initIDs0();
+    protected static native long getNewtWndProc0();
+
+    private native long CreateWindow0(long hInstance, String wndClassName, String wndName,
+                                      long parentWindowHandle,
+                                      int x, int y, int width, int height, int flags);
+    private native long MonitorFromWindow0(long windowHandle);
+    private native void reconfigureWindow0(long parentWindowHandle, long windowHandle,
+                                           int x, int y, int width, int height, int flags);
+    private static native void setTitle0(long windowHandle, String title);
+    private native void requestFocus0(long windowHandle, boolean force);
+
+}
diff --git a/src/newt/classes/jogamp/newt/driver/x11/X11Display.java b/src/newt/classes/jogamp/newt/driver/x11/X11Display.java
new file mode 100644
index 0000000..b9a32c7
--- /dev/null
+++ b/src/newt/classes/jogamp/newt/driver/x11/X11Display.java
@@ -0,0 +1,152 @@
+/*
+ * 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
+ * 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 jogamp.newt.driver.x11;
+
+import javax.media.nativewindow.*;
+import javax.media.nativewindow.x11.*;
+import jogamp.newt.*;
+import jogamp.nativewindow.x11.X11Util;
+
+public class X11Display extends DisplayImpl {
+
+    static {
+        NEWTJNILibLoader.loadNEWT();
+
+        if ( !initIDs0() ) {
+            throw new NativeWindowException("Failed to initialize X11Display jmethodIDs");
+        }
+
+        if (!X11Window.initIDs0()) {
+            throw new NativeWindowException("Failed to initialize X11Window jmethodIDs");
+        }
+    }
+
+    public static void initSingleton() {
+        // just exist to ensure static init has been run
+    }
+
+
+    public X11Display() {
+    }
+
+    public String validateDisplayName(String name, long handle) {
+        return X11Util.validateDisplayName(name, handle);
+    }
+
+    protected void createNativeImpl() {
+        long handle = X11Util.openDisplay(name);
+        if( 0 == handle ) {
+            throw new RuntimeException("Error creating display(Win): "+name);
+        }
+        if(USE_SEPARATE_DISPLAY_FOR_EDT) {
+            edtDisplayHandle = X11Util.openDisplay(name);
+            if( 0 == edtDisplayHandle ) {
+                X11Util.closeDisplay(handle);
+                throw new RuntimeException("Error creating display(EDT): "+name);
+            }
+        } else {
+            edtDisplayHandle = handle;
+        }
+        try {
+            CompleteDisplay0(edtDisplayHandle);
+        } catch(RuntimeException e) {
+            closeNativeImpl();
+            throw e;
+        }
+        
+        if(X11Util.XINITTHREADS_ALWAYS_ENABLED) {
+            // Hack: Force non X11Display locking, even w/ AWT and w/o isFirstUIActionOnProcess() 
+            aDevice = new X11GraphicsDevice(handle, AbstractGraphicsDevice.DEFAULT_UNIT, NativeWindowFactory.getNullToolkitLock());            
+        } else {
+            // Proper: Use AWT/X11Display locking w/ AWT and X11Display locking only w/o isFirstUIActionOnProcess()
+            aDevice = new X11GraphicsDevice(handle, AbstractGraphicsDevice.DEFAULT_UNIT);
+        }
+    }
+
+    protected void closeNativeImpl() {
+        DisplayRelease0(edtDisplayHandle, javaObjectAtom, windowDeleteAtom);
+        javaObjectAtom = 0;
+        windowDeleteAtom = 0;
+        // closing using ATI driver bug 'same order'
+        final long handle = getHandle();
+        X11Util.closeDisplay(handle);
+        if(handle != edtDisplayHandle) {
+            X11Util.closeDisplay(edtDisplayHandle);
+        }
+        edtDisplayHandle = 0;
+    }
+
+    protected void dispatchMessagesNative() {
+        if(0 != edtDisplayHandle) {
+            DispatchMessages0(edtDisplayHandle, javaObjectAtom, windowDeleteAtom);
+        }
+    }
+
+    protected long getEDTHandle() { return edtDisplayHandle; }
+    protected long getJavaObjectAtom() { return javaObjectAtom; }
+    protected long getWindowDeleteAtom() { return windowDeleteAtom; }
+    
+    //----------------------------------------------------------------------
+    // Internals only
+    //
+    private static native boolean initIDs0();
+
+    private native void CompleteDisplay0(long handle);
+
+    private void displayCompleted(long javaObjectAtom, long windowDeleteAtom) {
+        this.javaObjectAtom=javaObjectAtom;
+        this.windowDeleteAtom=windowDeleteAtom;
+    }
+    private native void DisplayRelease0(long handle, long javaObjectAtom, long windowDeleteAtom);
+
+    private native void DispatchMessages0(long display, long javaObjectAtom, long windowDeleteAtom);
+
+    /**
+     * 2011/06/14 libX11 1.4.2 and libxcb 1.7 bug 20708 - Multithreading Issues w/ OpenGL, ..
+     *            https://bugs.freedesktop.org/show_bug.cgi?id=20708
+     *            https://jogamp.org/bugzilla/show_bug.cgi?id=502
+     *            Affects: Ubuntu 11.04, OpenSuSE 11, ..
+     *            Workaround: Using a separate X11 Display connection for event dispatching (EDT)
+     */    
+    private final boolean USE_SEPARATE_DISPLAY_FOR_EDT = true;
+    
+    private long edtDisplayHandle;
+    
+    /** X11 Window delete atom marker used on EDT */
+    private long windowDeleteAtom;
+    
+    /** X11 Window java object property used on EDT */
+    private long javaObjectAtom;
+}
+
diff --git a/src/newt/classes/jogamp/newt/driver/x11/X11Screen.java b/src/newt/classes/jogamp/newt/driver/x11/X11Screen.java
new file mode 100644
index 0000000..a673521
--- /dev/null
+++ b/src/newt/classes/jogamp/newt/driver/x11/X11Screen.java
@@ -0,0 +1,301 @@
+/*
+ * 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
+ * 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 jogamp.newt.driver.x11;
+
+import jogamp.newt.DisplayImpl;
+import jogamp.newt.ScreenImpl;
+import jogamp.newt.DisplayImpl.DisplayRunnable;
+
+import com.jogamp.newt.ScreenMode;
+import com.jogamp.newt.util.ScreenModeUtil;
+import java.util.List;
+
+import javax.media.nativewindow.x11.*;
+
+public class X11Screen extends ScreenImpl {
+
+    static {
+        X11Display.initSingleton();
+    }
+
+    public X11Screen() {
+    }
+
+    protected void createNativeImpl() {
+        // validate screen index
+        Long handle = (Long) display.runWithLockedDisplayHandle( new DisplayImpl.DisplayRunnable() {
+            public Object run(long dpy) {        
+                long handle = GetScreen0(dpy, screen_idx);
+                if(0 != handle) {
+                    setScreenSize(getWidth0(dpy, screen_idx), getHeight0(dpy, screen_idx));
+                }
+                return new Long(handle);
+            } } );        
+        if (handle.longValue() == 0) {
+            throw new RuntimeException("Error creating screen: " + screen_idx);
+        }        
+        aScreen = new X11GraphicsScreen((X11GraphicsDevice) getDisplay().getGraphicsDevice(), screen_idx);
+    }
+
+    protected void closeNativeImpl() {
+    }
+
+    private int[] nrotations;
+    private int nrotation_index;
+    private int nres_number;
+    private int nres_index;
+    private int[] nrates;
+    private int nrate_index;
+    private int nmode_number;
+
+    protected int[] getScreenModeFirstImpl() {
+        return (int[]) runWithLockedDisplayHandle( new DisplayImpl.DisplayRunnable() {
+            public Object run(long dpy) {
+                // initialize iterators and static data
+                nrotations = getAvailableScreenModeRotations0(dpy, screen_idx);
+                if(null==nrotations || 0==nrotations.length) {
+                    return null;
+                }
+                nrotation_index = 0;
+        
+                nres_number = getNumScreenModeResolutions0(dpy, screen_idx);
+                if(0==nres_number) {
+                    return null;
+                }
+                nres_index = 0;
+        
+                nrates = getScreenModeRates0(dpy, screen_idx, nres_index);
+                if(null==nrates || 0==nrates.length) {
+                    return null;
+                }
+                nrate_index = 0;
+        
+                nmode_number = 0;
+        
+                return getScreenModeNextImpl();
+            } } );
+    }
+
+    protected int[] getScreenModeNextImpl() {
+        // assemble: w x h x bpp x f x r        
+        return (int[]) runWithLockedDisplayHandle( new DisplayImpl.DisplayRunnable() {
+            public Object run(long dpy) {
+                /**
+                System.err.println("******** mode: "+nmode_number);
+                System.err.println("rot  "+nrotation_index);
+                System.err.println("rate "+nrate_index);
+                System.err.println("res  "+nres_index); */
+        
+                int[] res = getScreenModeResolution0(dpy, screen_idx, nres_index);
+                if(null==res || 0==res.length) {
+                    return null;
+                }
+                if(0>=res[0] || 0>=res[1]) {
+                    throw new InternalError("invalid resolution: "+res[0]+"x"+res[1]+" for res idx "+nres_index+"/"+nres_number);
+                }
+                int bpp = 32; // FIXME
+                int rate = nrates[nrate_index];
+                if(0>=rate) {
+                    throw new InternalError("invalid rate: "+rate+" at index "+nrate_index+"/"+nrates.length);
+                }
+                int rotation = nrotations[nrotation_index];
+        
+                int[] props = new int[ 1 + ScreenModeUtil.NUM_SCREEN_MODE_PROPERTIES_ALL ];
+                int i = 0;
+                props[i++] = nres_index; // use resolution index, not unique for native -> ScreenMode
+                props[i++] = 0; // set later for verification of iterator
+                props[i++] = res[0]; // width
+                props[i++] = res[1]; // height
+                props[i++] = bpp;    // bpp
+                props[i++] = res[2]; // widthmm
+                props[i++] = res[3]; // heightmm
+                props[i++] = rate;   // rate
+                props[i++] = rotation;
+                props[i - ScreenModeUtil.NUM_SCREEN_MODE_PROPERTIES_ALL] = i - 1; // count without extra element
+        
+                nmode_number++;
+        
+                // iteration: r -> f -> bpp -> [w x h]
+                nrotation_index++;
+                if(nrotation_index == nrotations.length) {
+                    nrotation_index=0;
+                    nrate_index++;
+                    if(null == nrates || nrate_index == nrates.length){
+                        nres_index++;
+                        if(nres_index == nres_number) {
+                            // done
+                            nrates=null;
+                            nrotations=null;
+                            return null;
+                        }
+        
+                        nrates = getScreenModeRates0(dpy, screen_idx, nres_index);
+                        if(null==nrates || 0==nrates.length) {
+                            return null;
+                        }
+                        nrate_index = 0;
+                    }
+                }
+        
+                return props;
+            } } );
+    }
+
+    protected ScreenMode getCurrentScreenModeImpl() {
+        return (ScreenMode) runWithLockedDisplayHandle( new DisplayImpl.DisplayRunnable() {
+            public Object run(long dpy) {
+                int resNumber = getNumScreenModeResolutions0(dpy, screen_idx);
+                if(0==resNumber) {
+                    return null;
+                }
+                int resIdx = getCurrentScreenResolutionIndex0(dpy, screen_idx);
+                if(0>resIdx) {
+                    return null;
+                }
+                if(resIdx>=resNumber) {
+                    throw new RuntimeException("Invalid resolution index: ! "+resIdx+" < "+resNumber);
+                }
+                int[] res = getScreenModeResolution0(dpy, screen_idx, resIdx);
+                if(null==res || 0==res.length) {
+                    return null;
+                }
+                if(0>=res[0] || 0>=res[1]) {
+                    throw new InternalError("invalid resolution: "+res[0]+"x"+res[1]+" for res idx "+resIdx+"/"+resNumber);
+                }
+                int rate = getCurrentScreenRate0(dpy, screen_idx);
+                if(0>rate) {
+                    return null;
+                }
+                int rot = getCurrentScreenRotation0(dpy, screen_idx);
+                if(0>rot) {
+                    return null;
+                }
+                int[] props = new int[ScreenModeUtil.NUM_SCREEN_MODE_PROPERTIES_ALL];
+                int i = 0;
+                props[i++] = 0; // set later for verification of iterator
+                props[i++] = res[0]; // width
+                props[i++] = res[1]; // height
+                props[i++] = 32;     // FIXME: bpp
+                props[i++] = res[2]; // widthmm
+                props[i++] = res[3]; // heightmm
+                props[i++] = rate;   // rate
+                props[i++] = rot;
+                props[i - ScreenModeUtil.NUM_SCREEN_MODE_PROPERTIES_ALL] = i; // count
+                return ScreenModeUtil.streamIn(props, 0);
+            } } );
+    }
+
+    protected boolean setCurrentScreenModeImpl(final ScreenMode screenMode) {
+        final List<ScreenMode> screenModes = this.getScreenModesOrig();
+        final int screenModeIdx = screenModes.indexOf(screenMode);
+        if(0>screenModeIdx) {
+            throw new RuntimeException("ScreenMode not element of ScreenMode list: "+screenMode);
+        }
+        final long t0 = System.currentTimeMillis();
+        Boolean done = (Boolean) runWithLockedDisplayHandle( new DisplayImpl.DisplayRunnable() {
+            public Object run(long dpy) {
+                boolean done = false;
+                int resNumber = getNumScreenModeResolutions0(dpy, screen_idx);
+                int resIdx = getScreenModesIdx2NativeIdx().get(screenModeIdx);
+                if(0>resIdx || resIdx>=resNumber) {
+                    throw new RuntimeException("Invalid resolution index: ! 0 < "+resIdx+" < "+resNumber+", screenMode["+screenModeIdx+"] "+screenMode);
+                }
+        
+                final int f = screenMode.getMonitorMode().getRefreshRate();
+                final int r = screenMode.getRotation();
+                if( setCurrentScreenModeStart0(dpy, screen_idx, resIdx, f, r) ) {
+                    while(!done && System.currentTimeMillis()-t0 < SCREEN_MODE_CHANGE_TIMEOUT) {
+                        done = setCurrentScreenModePollEnd0(dpy, screen_idx, resIdx, f, r);
+                        if(!done) {
+                            try { Thread.sleep(10); } catch (InterruptedException e) { }
+                        }
+                    }
+                }
+                return Boolean.valueOf(done);
+            }            
+        });
+        
+        if(!done.booleanValue()) {
+            System.err.println("X11Screen.setCurrentScreenModeImpl: TO ("+SCREEN_MODE_CHANGE_TIMEOUT+") reached: "+
+                               (System.currentTimeMillis()-t0)+"ms");
+        }
+        return done.booleanValue();
+    }
+
+    //----------------------------------------------------------------------
+    // Internals only
+    //    
+    private final Object runWithLockedDisplayHandle(DisplayRunnable action) {
+        return display.runWithLockedDisplayHandle(action);
+        // return runWithTempDisplayHandle(action);
+    }
+    
+    /** just here for testing some X11 RANDR bugs .. etc ..
+    private final Object runWithTempDisplayHandle(DisplayRunnable action) {
+        long dpy = X11Util.openDisplay(null);
+        if(0 == dpy) {
+            throw new RuntimeException("null device");
+        }
+        Object res;
+        try {
+            res = action.run(dpy);
+        } finally {
+            X11Util.closeDisplay(dpy);
+        }
+        return res;
+    } */
+    
+    private static native long GetScreen0(long dpy, int scrn_idx);
+
+    private static native int getWidth0(long display, int scrn_idx);
+
+    private static native int getHeight0(long display, int scrn_idx);
+
+    /** @return int[] { rot1, .. } */
+    private static native int[] getAvailableScreenModeRotations0(long display, int screen_index);
+
+    private static native int getNumScreenModeResolutions0(long display, int screen_index);
+
+    /** @return int[] { width, height, widthmm, heightmm } */
+    private static native int[] getScreenModeResolution0(long display, int screen_index, int mode_index);
+
+    private static native int[] getScreenModeRates0(long display, int screen_index, int mode_index);
+
+    private static native int getCurrentScreenResolutionIndex0(long display, int screen_index);
+    private static native int getCurrentScreenRate0(long display, int screen_index);
+    private static native int getCurrentScreenRotation0(long display, int screen_index);
+
+    /** needs own Display connection for XRANDR event handling */
+    private static native boolean setCurrentScreenModeStart0(long display, int screen_index, int mode_index, int freq, int rot);
+    private static native boolean setCurrentScreenModePollEnd0(long display, int screen_index, int mode_index, int freq, int rot);
+}
diff --git a/src/newt/classes/jogamp/newt/driver/x11/X11Window.java b/src/newt/classes/jogamp/newt/driver/x11/X11Window.java
new file mode 100644
index 0000000..dfb84f6
--- /dev/null
+++ b/src/newt/classes/jogamp/newt/driver/x11/X11Window.java
@@ -0,0 +1,173 @@
+/*
+ * 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
+ * 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 jogamp.newt.driver.x11;
+
+import jogamp.nativewindow.x11.X11Util;
+import jogamp.newt.DisplayImpl;
+import jogamp.newt.DisplayImpl.DisplayRunnable;
+import jogamp.newt.WindowImpl;
+import javax.media.nativewindow.*;
+import javax.media.nativewindow.x11.*;
+import javax.media.nativewindow.util.Insets;
+import javax.media.nativewindow.util.InsetsImmutable;
+import javax.media.nativewindow.util.Point;
+
+public class X11Window extends WindowImpl {
+    private static final String WINDOW_CLASS_NAME = "NewtWindow";
+
+    static {
+        X11Display.initSingleton();
+    }
+
+    public X11Window() {
+    }
+
+    protected void createNativeImpl() {
+        final X11Screen screen = (X11Screen) getScreen();
+        final X11Display display = (X11Display) screen.getDisplay();
+        final GraphicsConfigurationFactory factory = GraphicsConfigurationFactory.getFactory(display.getGraphicsDevice());
+        config = factory.chooseGraphicsConfiguration(
+                capsRequested, capsRequested, capabilitiesChooser, screen.getGraphicsScreen());
+        if(DEBUG_IMPLEMENTATION) {
+            System.err.println("X11Window.createNativeImpl() factory: "+factory+", chosen config: "+config);
+        }        
+        if (config == null) {
+            throw new NativeWindowException("Error choosing GraphicsConfiguration creating window: "+this);
+        }
+        X11GraphicsConfiguration x11config = (X11GraphicsConfiguration) config;
+        final long visualID = x11config.getVisualID();
+        final int flags = getReconfigureFlags(0, true) & 
+                          ( FLAG_IS_ALWAYSONTOP | FLAG_IS_UNDECORATED ) ;        
+        setWindowHandle(CreateWindow0(getParentWindowHandle(),
+                               display.getEDTHandle(), screen.getIndex(), visualID, 
+                               display.getJavaObjectAtom(), display.getWindowDeleteAtom(), 
+                               x, y, width, height, flags));
+        windowHandleClose = getWindowHandle();
+        if (0 == windowHandleClose) {
+            throw new NativeWindowException("Error creating window");
+        }
+    }
+
+    protected void closeNativeImpl() {
+        if(0!=windowHandleClose && null!=getScreen() ) {
+            X11Display display = (X11Display) getScreen().getDisplay();
+            try {
+                CloseWindow0(display.getEDTHandle(), windowHandleClose, 
+                             display.getJavaObjectAtom(), display.getWindowDeleteAtom());
+            } catch (Throwable t) {
+                if(DEBUG_IMPLEMENTATION) { 
+                    Exception e = new Exception("Warning: closeNativeImpl failed - "+Thread.currentThread().getName(), t);
+                    e.printStackTrace();
+                }
+            } finally {
+                windowHandleClose = 0;
+            }
+        }
+    }
+
+    protected boolean reconfigureWindowImpl(int x, int y, int width, int height, int flags) { 
+        if(DEBUG_IMPLEMENTATION) {
+            System.err.println("X11Window reconfig: "+x+"/"+y+" "+width+"x"+height+", "+
+                               getReconfigureFlagsAsString(null, flags));
+        }
+        if(0 == ( FLAG_IS_UNDECORATED & flags) && 0<=x && 0<=y) {
+            final InsetsImmutable i = getInsets();         
+            
+            // client position -> top-level window position
+            x -= i.getLeftWidth() ;
+            y -= i.getTopHeight() ;
+            if( 0 > x ) { x = 0; }
+            if( 0 > y ) { y = 0; }            
+        }        
+        reconfigureWindow0( getDisplayEDTHandle(), getScreenIndex(), getParentWindowHandle(), getWindowHandle(),
+                            x, y, width, height, flags);
+
+        return true;
+    }
+
+    protected void reparentNotify(long newParentWindowHandle) {
+        if(DEBUG_IMPLEMENTATION) {
+            final long p0 = getParentWindowHandle();
+            System.err.println("Window.reparentNotify ("+getThreadName()+"): "+toHexString(p0)+" -> "+toHexString(newParentWindowHandle));
+        }
+    }
+    
+    protected void requestFocusImpl(boolean force) {
+        requestFocus0(getDisplayEDTHandle(), getWindowHandle(), force);
+    }
+
+    @Override
+    protected void setTitleImpl(final String title) {
+        runWithLockedDisplayHandle( new DisplayImpl.DisplayRunnable() {
+            public Object run(long dpy) {
+                setTitle0(dpy, getWindowHandle(), title);
+                return null;
+            }
+        });
+    }
+
+    protected Point getLocationOnScreenImpl(final int x, final int y) {
+        // X11Util.GetRelativeLocation: locks display already !
+        return X11Util.GetRelativeLocation( getScreen().getDisplay().getHandle(), getScreenIndex(), getWindowHandle(), 0 /*root win*/, x, y);
+    }
+
+    protected void updateInsetsImpl(Insets insets) {
+        // nop - using event driven insetsChange(..)         
+    }
+    
+    //----------------------------------------------------------------------
+    // Internals only
+    //
+    
+    private final long getDisplayEDTHandle() {
+        return ((X11Display) getScreen().getDisplay()).getEDTHandle();
+    }
+    private final Object runWithLockedDisplayHandle(DisplayRunnable action) {
+        return ((DisplayImpl) getScreen().getDisplay()).runWithLockedDisplayHandle(action);
+        // return runWithTempDisplayHandle(action);
+    }
+
+    protected static native boolean initIDs0();
+    private native long CreateWindow0(long parentWindowHandle, long display, int screen_index, 
+                                            long visualID, long javaObjectAtom, long windowDeleteAtom, 
+                                            int x, int y, int width, int height, int flags); 
+    private native void CloseWindow0(long display, long windowHandle, long javaObjectAtom, long windowDeleteAtom);
+    private native void reconfigureWindow0(long display, int screen_index, long parentWindowHandle, long windowHandle,
+                                           int x, int y, int width, int height, int flags);    
+    private native void setTitle0(long display, long windowHandle, String title);
+    private native void requestFocus0(long display, long windowHandle, boolean force);
+    private native long getParentWindow0(long display, long windowHandle);
+
+    private long   windowHandleClose;
+}
diff --git a/src/newt/classes/jogamp/newt/intel/gdl/Display.java b/src/newt/classes/jogamp/newt/intel/gdl/Display.java
deleted file mode 100644
index b1afdb5..0000000
--- a/src/newt/classes/jogamp/newt/intel/gdl/Display.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * 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
- * 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 jogamp.newt.intel.gdl;
-
-import jogamp.newt.*;
-import javax.media.nativewindow.*;
-
-public class Display extends jogamp.newt.DisplayImpl {
-    static int initCounter = 0;
-
-    static {
-        NEWTJNILibLoader.loadNEWT();
-
-        if (!Screen.initIDs()) {
-            throw new NativeWindowException("Failed to initialize GDL Screen jmethodIDs");
-        }
-        if (!Window.initIDs()) {
-            throw new NativeWindowException("Failed to initialize GDL Window jmethodIDs");
-        }
-    }
-
-    public static void initSingleton() {
-        // just exist to ensure static init has been run
-    }
-
-
-    public Display() {
-    }
-
-    protected void createNativeImpl() {
-        synchronized(Display.class) {
-            if(0==initCounter) {
-                displayHandle = CreateDisplay();
-                if(0==displayHandle) {
-                    throw new NativeWindowException("Couldn't initialize GDL Display");
-                }
-            }
-            initCounter++;
-        }
-        aDevice = new DefaultGraphicsDevice(NativeWindowFactory.TYPE_DEFAULT, AbstractGraphicsDevice.DEFAULT_CONNECTION, AbstractGraphicsDevice.DEFAULT_UNIT, displayHandle);
-    }
-
-    protected void closeNativeImpl() {
-        if(0==displayHandle) {
-            throw new NativeWindowException("displayHandle null; initCnt "+initCounter);
-        }
-        synchronized(Display.class) {
-            if(initCounter>0) {
-                initCounter--;
-                if(0==initCounter) {
-                    DestroyDisplay(displayHandle);
-                }
-            }
-        }
-    }
-
-    protected void dispatchMessagesNative() {
-        if(0!=displayHandle) {
-            DispatchMessages(displayHandle, focusedWindow);
-        }
-    }
-
-    protected void setFocus(Window focus) {
-        focusedWindow = focus;
-    }
-
-    private long displayHandle = 0;
-    private Window focusedWindow = null;
-    private native long CreateDisplay();
-    private native void DestroyDisplay(long displayHandle);
-    private native void DispatchMessages(long displayHandle, Window focusedWindow);
-}
-
diff --git a/src/newt/classes/jogamp/newt/intel/gdl/Screen.java b/src/newt/classes/jogamp/newt/intel/gdl/Screen.java
deleted file mode 100644
index b351fe6..0000000
--- a/src/newt/classes/jogamp/newt/intel/gdl/Screen.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * 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
- * 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 jogamp.newt.intel.gdl;
-
-import jogamp.newt.*;
-import javax.media.nativewindow.*;
-
-public class Screen extends jogamp.newt.ScreenImpl {
-
-    static {
-        Display.initSingleton();
-    }
-
-    public Screen() {
-    }
-
-    protected void createNativeImpl() {
-        AbstractGraphicsDevice adevice = getDisplay().getGraphicsDevice();
-        GetScreenInfo(adevice.getHandle(), screen_idx);
-        aScreen = new DefaultGraphicsScreen(adevice, screen_idx);
-    }
-
-    protected void closeNativeImpl() { }
-
-    //----------------------------------------------------------------------
-    // Internals only
-    //
-
-    protected static native boolean initIDs();
-    private          native void GetScreenInfo(long displayHandle, int screen_idx);
-
-    // called by GetScreenInfo() ..
-    private void screenCreated(int width, int height) {
-        setScreenSize(width, height);
-    }
-}
-
diff --git a/src/newt/classes/jogamp/newt/intel/gdl/Window.java b/src/newt/classes/jogamp/newt/intel/gdl/Window.java
deleted file mode 100644
index d6003be..0000000
--- a/src/newt/classes/jogamp/newt/intel/gdl/Window.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * 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
- * 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 jogamp.newt.intel.gdl;
-
-import javax.media.nativewindow.*;
-import javax.media.nativewindow.util.Point;
-
-public class Window extends jogamp.newt.WindowImpl {
-    static {
-        Display.initSingleton();
-    }
-
-    public Window() {
-    }
-
-    static long nextWindowHandle = 1;
-
-    protected void createNativeImpl() {
-        if(0!=getParentWindowHandle()) {
-            throw new NativeWindowException("GDL Window does not support window parenting");
-        }
-        AbstractGraphicsScreen aScreen = getScreen().getGraphicsScreen();
-        AbstractGraphicsDevice aDevice = getScreen().getDisplay().getGraphicsDevice();
-
-        config = GraphicsConfigurationFactory.getFactory(aDevice).chooseGraphicsConfiguration(
-                capsRequested, capsRequested, capabilitiesChooser, aScreen);
-        if (config == null) {
-            throw new NativeWindowException("Error choosing GraphicsConfiguration creating window: "+this);
-        }
-
-        synchronized(Window.class) {
-            setWindowHandle(nextWindowHandle++); // just a marker
-
-            surfaceHandle = CreateSurface(aDevice.getHandle(), getScreen().getWidth(), getScreen().getHeight(), x, y, width, height);
-            if (surfaceHandle == 0) {
-                throw new NativeWindowException("Error creating window");
-            }
-        }
-    }
-
-    protected void closeNativeImpl() {
-        if(0!=surfaceHandle) {
-            synchronized(Window.class) {
-                CloseSurface(getDisplayHandle(), surfaceHandle);
-            }
-            surfaceHandle = 0;
-            ((Display)getScreen().getDisplay()).setFocus(null);
-        }
-    }
-
-    protected void setVisibleImpl(boolean visible, int x, int y, int width, int height) {
-        reconfigureWindowImpl(x, y, width, height, false, 0, 0);
-        if(visible) {
-            ((Display)getScreen().getDisplay()).setFocus(this);
-        }
-        this.visibleChanged(visible);
-    }
-
-    protected boolean reconfigureWindowImpl(int x, int y, int width, int height, boolean parentChange, int fullScreenChange, int decorationChange) {
-        Screen  screen = (Screen) getScreen();
-
-        int _x=(x>=0)?x:this.x;
-        int _y=(x>=0)?y:this.y;
-        int _w=(width>0)?width:this.width;
-        int _h=(height>0)?height:this.height;
-
-        if(_w>screen.getWidth()) {
-            _w=screen.getWidth();
-        }
-        if(_h>screen.getHeight()) {
-            _h=screen.getHeight();
-        }
-        if((_x+_w)>screen.getWidth()) {
-            _x=screen.getWidth()-_w;
-        }
-        if((_y+_h)>screen.getHeight()) {
-            _y=screen.getHeight()-_h;
-        }
-
-        if(0!=surfaceHandle) {
-            SetBounds0(surfaceHandle, getScreen().getWidth(), getScreen().getHeight(), _x, _y, _w, _h);
-        }
-
-        return true;
-    }
-
-    protected void requestFocusImpl(boolean reparented) {
-        ((Display)getScreen().getDisplay()).setFocus(this);
-    }
-
-    @Override
-    public final long getSurfaceHandle() {
-        return surfaceHandle;
-    }
-
-    protected Point getLocationOnScreenImpl(int x, int y) {
-        return new Point(x,y);
-    }
-
-    //----------------------------------------------------------------------
-    // Internals only
-    //
-
-    protected static native boolean initIDs();
-    private        native long CreateSurface(long displayHandle, int scrn_width, int scrn_height, int x, int y, int width, int height);
-    private        native void CloseSurface(long displayHandle, long surfaceHandle);
-    private        native void SetBounds0(long surfaceHandle, int scrn_width, int scrn_height, int x, int y, int width, int height);
-
-    private void updateBounds(int x, int y, int width, int height) {
-        this.x = x;
-        this.y = y;
-        this.width = width;
-        this.height = height;
-    }
-
-    private long   surfaceHandle;
-}
diff --git a/src/newt/classes/jogamp/newt/macosx/MacDisplay.java b/src/newt/classes/jogamp/newt/macosx/MacDisplay.java
deleted file mode 100644
index 49f2ff5..0000000
--- a/src/newt/classes/jogamp/newt/macosx/MacDisplay.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * 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
- * 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 jogamp.newt.macosx;
-
-import javax.media.nativewindow.*;
-import javax.media.nativewindow.macosx.*;
-import com.jogamp.newt.*;
-import jogamp.newt.*;
-import com.jogamp.newt.util.MainThread;
-
-public class MacDisplay extends DisplayImpl {
-    static {
-        NEWTJNILibLoader.loadNEWT();
-
-        if(!initNSApplication0()) {
-            throw new NativeWindowException("Failed to initialize native Application hook");
-        }
-        if(!MacWindow.initIDs0()) {
-            throw new NativeWindowException("Failed to initialize jmethodIDs");
-        }
-        if(DEBUG) {
-            System.err.println("MacDisplay.init App and IDs OK "+Thread.currentThread().getName());
-        }
-    }
-
-    public static void initSingleton() {
-        // just exist to ensure static init has been run
-    }
-    
-    public MacDisplay() {
-    }
-
-    protected void dispatchMessagesNative() {
-        dispatchMessages0();
-    }
-    
-    protected void createNativeImpl() {
-        aDevice = new MacOSXGraphicsDevice(AbstractGraphicsDevice.DEFAULT_UNIT);
-    }
-
-    protected void closeNativeImpl() { }
-
-    @Override
-    protected void createEDTUtil() {
-        if(NewtFactory.useEDT()) {
-            final Display f_dpy = this;
-            MainThread.addPumpMessage(this, 
-                                  new Runnable() {
-                                      public void run() {
-                                          if(null!=f_dpy.getGraphicsDevice()) {
-                                              f_dpy.dispatchMessages();
-                                          } } } );
-            edtUtil = MainThread.getSingleton();
-            edtUtil.start();
-        }
-    }
-
-    protected void releaseEDTUtil() {
-        if(null!=edtUtil) { 
-            MainThread.removePumpMessage(this);
-            edtUtil.waitUntilStopped();
-            edtUtil=null;
-        }
-    }
-
-    private static native boolean initNSApplication0();
-    protected native void dispatchMessages0();
-}
-
diff --git a/src/newt/classes/jogamp/newt/macosx/MacScreen.java b/src/newt/classes/jogamp/newt/macosx/MacScreen.java
deleted file mode 100644
index 3002860..0000000
--- a/src/newt/classes/jogamp/newt/macosx/MacScreen.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * 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
- * 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 jogamp.newt.macosx;
-
-import com.jogamp.newt.*;
-import jogamp.newt.ScreenImpl;
-import javax.media.nativewindow.*;
-
-public class MacScreen extends ScreenImpl {
-    static {
-        MacDisplay.initSingleton();
-    }
-
-    public MacScreen() {
-    }
-
-    protected void createNativeImpl() {
-        aScreen = new DefaultGraphicsScreen(getDisplay().getGraphicsDevice(), screen_idx);
-        setScreenSize(getWidthImpl0(screen_idx), getHeightImpl0(screen_idx));
-    }
-
-    protected void closeNativeImpl() { }
-
-    private static native int getWidthImpl0(int scrn_idx);
-    private static native int getHeightImpl0(int scrn_idx);
-}
diff --git a/src/newt/classes/jogamp/newt/macosx/MacWindow.java b/src/newt/classes/jogamp/newt/macosx/MacWindow.java
deleted file mode 100644
index a27f047..0000000
--- a/src/newt/classes/jogamp/newt/macosx/MacWindow.java
+++ /dev/null
@@ -1,439 +0,0 @@
-/*
- * 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
- * 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 jogamp.newt.macosx;
-
-import javax.media.nativewindow.*;
-import com.jogamp.common.util.locks.RecursiveLock;
-
-import com.jogamp.newt.event.*;
-import jogamp.newt.*;
-import javax.media.nativewindow.util.Insets;
-import javax.media.nativewindow.util.Point;
-
-public class MacWindow extends WindowImpl {
-    
-    // Window styles
-    private static final int NSBorderlessWindowMask     = 0;
-    private static final int NSTitledWindowMask         = 1 << 0;
-    private static final int NSClosableWindowMask       = 1 << 1;
-    private static final int NSMiniaturizableWindowMask = 1 << 2;
-    private static final int NSResizableWindowMask      = 1 << 3;
-
-    // Window backing store types
-    private static final int NSBackingStoreRetained     = 0;
-    private static final int NSBackingStoreNonretained  = 1;
-    private static final int NSBackingStoreBuffered     = 2;
-
-    // Key constants handled differently on Mac OS X than other platforms
-    private static final int NSUpArrowFunctionKey        = 0xF700;
-    private static final int NSDownArrowFunctionKey      = 0xF701;
-    private static final int NSLeftArrowFunctionKey      = 0xF702;
-    private static final int NSRightArrowFunctionKey     = 0xF703;
-    private static final int NSF1FunctionKey             = 0xF704;
-    private static final int NSF2FunctionKey             = 0xF705;
-    private static final int NSF3FunctionKey             = 0xF706;
-    private static final int NSF4FunctionKey             = 0xF707;
-    private static final int NSF5FunctionKey             = 0xF708;
-    private static final int NSF6FunctionKey             = 0xF709;
-    private static final int NSF7FunctionKey             = 0xF70A;
-    private static final int NSF8FunctionKey             = 0xF70B;
-    private static final int NSF9FunctionKey             = 0xF70C;
-    private static final int NSF10FunctionKey            = 0xF70D;
-    private static final int NSF11FunctionKey            = 0xF70E;
-    private static final int NSF12FunctionKey            = 0xF70F;
-    private static final int NSF13FunctionKey            = 0xF710;
-    private static final int NSF14FunctionKey            = 0xF711;
-    private static final int NSF15FunctionKey            = 0xF712;
-    private static final int NSF16FunctionKey            = 0xF713;
-    private static final int NSF17FunctionKey            = 0xF714;
-    private static final int NSF18FunctionKey            = 0xF715;
-    private static final int NSF19FunctionKey            = 0xF716;
-    private static final int NSF20FunctionKey            = 0xF717;
-    private static final int NSF21FunctionKey            = 0xF718;
-    private static final int NSF22FunctionKey            = 0xF719;
-    private static final int NSF23FunctionKey            = 0xF71A;
-    private static final int NSF24FunctionKey            = 0xF71B;
-    private static final int NSF25FunctionKey            = 0xF71C;
-    private static final int NSF26FunctionKey            = 0xF71D;
-    private static final int NSF27FunctionKey            = 0xF71E;
-    private static final int NSF28FunctionKey            = 0xF71F;
-    private static final int NSF29FunctionKey            = 0xF720;
-    private static final int NSF30FunctionKey            = 0xF721;
-    private static final int NSF31FunctionKey            = 0xF722;
-    private static final int NSF32FunctionKey            = 0xF723;
-    private static final int NSF33FunctionKey            = 0xF724;
-    private static final int NSF34FunctionKey            = 0xF725;
-    private static final int NSF35FunctionKey            = 0xF726;
-    private static final int NSInsertFunctionKey         = 0xF727;
-    private static final int NSDeleteFunctionKey         = 0xF728;
-    private static final int NSHomeFunctionKey           = 0xF729;
-    private static final int NSBeginFunctionKey          = 0xF72A;
-    private static final int NSEndFunctionKey            = 0xF72B;
-    private static final int NSPageUpFunctionKey         = 0xF72C;
-    private static final int NSPageDownFunctionKey       = 0xF72D;
-    private static final int NSPrintScreenFunctionKey    = 0xF72E;
-    private static final int NSScrollLockFunctionKey     = 0xF72F;
-    private static final int NSPauseFunctionKey          = 0xF730;
-    private static final int NSSysReqFunctionKey         = 0xF731;
-    private static final int NSBreakFunctionKey          = 0xF732;
-    private static final int NSResetFunctionKey          = 0xF733;
-    private static final int NSStopFunctionKey           = 0xF734;
-    private static final int NSMenuFunctionKey           = 0xF735;
-    private static final int NSUserFunctionKey           = 0xF736;
-    private static final int NSSystemFunctionKey         = 0xF737;
-    private static final int NSPrintFunctionKey          = 0xF738;
-    private static final int NSClearLineFunctionKey      = 0xF739;
-    private static final int NSClearDisplayFunctionKey   = 0xF73A;
-    private static final int NSInsertLineFunctionKey     = 0xF73B;
-    private static final int NSDeleteLineFunctionKey     = 0xF73C;
-    private static final int NSInsertCharFunctionKey     = 0xF73D;
-    private static final int NSDeleteCharFunctionKey     = 0xF73E;
-    private static final int NSPrevFunctionKey           = 0xF73F;
-    private static final int NSNextFunctionKey           = 0xF740;
-    private static final int NSSelectFunctionKey         = 0xF741;
-    private static final int NSExecuteFunctionKey        = 0xF742;
-    private static final int NSUndoFunctionKey           = 0xF743;
-    private static final int NSRedoFunctionKey           = 0xF744;
-    private static final int NSFindFunctionKey           = 0xF745;
-    private static final int NSHelpFunctionKey           = 0xF746;
-    private static final int NSModeSwitchFunctionKey     = 0xF747;
-
-    private volatile long surfaceHandle;
-
-    // non fullscreen dimensions ..
-    private final Insets insets = new Insets(0,0,0,0);
-
-    static {
-        MacDisplay.initSingleton();
-    }
-
-    public MacWindow() {
-    }
-    
-    protected void createNativeImpl() {
-        config = GraphicsConfigurationFactory.getFactory(getScreen().getDisplay().getGraphicsDevice()).chooseGraphicsConfiguration(
-                capsRequested, capsRequested, capabilitiesChooser, getScreen().getGraphicsScreen());
-        if (config == null) {
-            throw new NativeWindowException("Error choosing GraphicsConfiguration creating window: "+this);
-        }
-    }
-
-    protected void closeNativeImpl() {
-        nsViewLock.lock();
-        try {
-            if(DEBUG_IMPLEMENTATION) { System.err.println("MacWindow.CloseAction "+Thread.currentThread().getName()); }
-            if (getWindowHandle() != 0) {
-                close0(getWindowHandle());
-            }
-        } catch (Throwable t) {
-            if(DEBUG_IMPLEMENTATION) { 
-                Exception e = new Exception("Warning: closeNative failed - "+Thread.currentThread().getName(), t);
-                e.printStackTrace();
-            }
-        } finally {
-            setWindowHandle(0);
-            nsViewLock.unlock();
-        }
-    }
-    
-    @Override
-    public final long getSurfaceHandle() {
-        return surfaceHandle;
-    }
-
-    @Override
-    public Insets getInsets() {
-        // in order to properly calculate insets we need the window to be
-        // created
-        nsViewLock.lock();
-        try {
-            createWindow(false, getX(), getY(), getWidth(), getHeight(), isFullscreen());
-            return (Insets) insets.clone();
-        } finally {
-            nsViewLock.unlock();
-        }
-    }
-
-    private RecursiveLock nsViewLock = new RecursiveLock();
-
-    @Override
-    protected int lockSurfaceImpl() {
-        nsViewLock.lock();
-        return LOCK_SUCCESS;
-    }
-
-    @Override
-    protected void unlockSurfaceImpl() {
-        nsViewLock.unlock();
-    }
-
-    protected void setVisibleImpl(boolean visible, int x, int y, int width, int height) {
-        nsViewLock.lock();
-        try {
-            if (visible) {
-                createWindow(false, x, y, width, height, isFullscreen());
-                if (getWindowHandle() != 0) {
-                    makeKeyAndOrderFront0(getWindowHandle());
-                }
-            } else {
-                if (getWindowHandle() != 0) {
-                    orderOut0(getWindowHandle());
-                }
-            }
-            visibleChanged(visible);
-        } finally {
-            nsViewLock.unlock();
-        }
-    }
-
-    @Override
-    protected void setTitleImpl(final String title) {
-        // FIXME: move nsViewLock up to window lock
-        nsViewLock.lock();
-        try {
-            setTitle0(getWindowHandle(), title);
-        } finally {
-            nsViewLock.unlock();
-        }
-    }
-
-    protected void requestFocusImpl(boolean reparented) {
-        // FIXME: move nsViewLock up to window lock
-        nsViewLock.lock();
-        try {
-            makeKey0(getWindowHandle());
-        } finally {
-            nsViewLock.unlock();
-        }
-    }
-    
-    protected boolean reconfigureWindowImpl(int x, int y, int width, int height, boolean parentChange, int fullScreenChange, int decorationChange) {
-        nsViewLock.lock();
-        try {
-            if(DEBUG_IMPLEMENTATION || DEBUG_WINDOW_EVENT) {
-                System.err.println("MacWindow reconfig: parentChange "+parentChange+", fullScreenChange "+fullScreenChange+", decorationChange "+decorationChange+" "+x+"/"+y+" "+width+"x"+height);
-            }
-            int _x=(x>=0)?x:this.x;
-            int _y=(x>=0)?y:this.y;
-            int _w=(width>0)?width:this.width;
-            int _h=(height>0)?height:this.height;
-
-            if(decorationChange!=0 || parentChange || fullScreenChange!=0) {
-                createWindow(true, _x, _y, _w, _h, fullScreenChange>0);
-                if (getWindowHandle() != 0) {
-                    makeKeyAndOrderFront0(getWindowHandle());
-                }
-            } else {
-                if(x>=0 || y>=0) {
-                    setFrameTopLeftPoint0(getParentWindowHandle(), getWindowHandle(), _x, _y);
-                }
-                if(width>0 || height>0) {
-                    setContentSize0(getWindowHandle(), _w, _h);
-                }
-            }
-        } finally {
-            nsViewLock.unlock();
-        }
-        return true;
-    }
-
-    protected Point getLocationOnScreenImpl(int x, int y) {
-        return null;
-    }
-    
-    private void insetsChanged(int left, int top, int right, int bottom) {
-        if (DEBUG_IMPLEMENTATION) {
-            System.err.println(Thread.currentThread().getName()+
-                " Insets changed to " + left + ", " + top + ", " + right + ", " + bottom);
-        }
-        if (left != -1 && top != -1 && right != -1 && bottom != -1) {
-            insets.left = left;
-            insets.top = top;
-            insets.right = right;
-            insets.bottom = bottom;
-        }
-    }
-
-    private char convertKeyChar(char keyChar) {
-        if (keyChar == '\r') {
-            // Turn these into \n
-            return '\n';
-        }
-
-        if (keyChar >= NSUpArrowFunctionKey && keyChar <= NSModeSwitchFunctionKey) {
-            switch (keyChar) {
-                case NSUpArrowFunctionKey:     return KeyEvent.VK_UP;
-                case NSDownArrowFunctionKey:   return KeyEvent.VK_DOWN;
-                case NSLeftArrowFunctionKey:   return KeyEvent.VK_LEFT;
-                case NSRightArrowFunctionKey:  return KeyEvent.VK_RIGHT;
-                case NSF1FunctionKey:          return KeyEvent.VK_F1;
-                case NSF2FunctionKey:          return KeyEvent.VK_F2;
-                case NSF3FunctionKey:          return KeyEvent.VK_F3;
-                case NSF4FunctionKey:          return KeyEvent.VK_F4;
-                case NSF5FunctionKey:          return KeyEvent.VK_F5;
-                case NSF6FunctionKey:          return KeyEvent.VK_F6;
-                case NSF7FunctionKey:          return KeyEvent.VK_F7;
-                case NSF8FunctionKey:          return KeyEvent.VK_F8;
-                case NSF9FunctionKey:          return KeyEvent.VK_F9;
-                case NSF10FunctionKey:         return KeyEvent.VK_F10;
-                case NSF11FunctionKey:         return KeyEvent.VK_F11;
-                case NSF12FunctionKey:         return KeyEvent.VK_F12;
-                case NSF13FunctionKey:         return KeyEvent.VK_F13;
-                case NSF14FunctionKey:         return KeyEvent.VK_F14;
-                case NSF15FunctionKey:         return KeyEvent.VK_F15;
-                case NSF16FunctionKey:         return KeyEvent.VK_F16;
-                case NSF17FunctionKey:         return KeyEvent.VK_F17;
-                case NSF18FunctionKey:         return KeyEvent.VK_F18;
-                case NSF19FunctionKey:         return KeyEvent.VK_F19;
-                case NSF20FunctionKey:         return KeyEvent.VK_F20;
-                case NSF21FunctionKey:         return KeyEvent.VK_F21;
-                case NSF22FunctionKey:         return KeyEvent.VK_F22;
-                case NSF23FunctionKey:         return KeyEvent.VK_F23;
-                case NSF24FunctionKey:         return KeyEvent.VK_F24;
-                case NSInsertFunctionKey:      return KeyEvent.VK_INSERT;
-                case NSDeleteFunctionKey:      return KeyEvent.VK_DELETE;
-                case NSHomeFunctionKey:        return KeyEvent.VK_HOME;
-                case NSBeginFunctionKey:       return KeyEvent.VK_BEGIN;
-                case NSEndFunctionKey:         return KeyEvent.VK_END;
-                case NSPageUpFunctionKey:      return KeyEvent.VK_PAGE_UP;
-                case NSPageDownFunctionKey:    return KeyEvent.VK_PAGE_DOWN;
-                case NSPrintScreenFunctionKey: return KeyEvent.VK_PRINTSCREEN;
-                case NSScrollLockFunctionKey:  return KeyEvent.VK_SCROLL_LOCK;
-                case NSPauseFunctionKey:       return KeyEvent.VK_PAUSE;
-                // Not handled:
-                // NSSysReqFunctionKey
-                // NSBreakFunctionKey
-                // NSResetFunctionKey
-                case NSStopFunctionKey:        return KeyEvent.VK_STOP;
-                // Not handled:
-                // NSMenuFunctionKey
-                // NSUserFunctionKey
-                // NSSystemFunctionKey
-                // NSPrintFunctionKey
-                // NSClearLineFunctionKey
-                // NSClearDisplayFunctionKey
-                // NSInsertLineFunctionKey
-                // NSDeleteLineFunctionKey
-                // NSInsertCharFunctionKey
-                // NSDeleteCharFunctionKey
-                // NSPrevFunctionKey
-                // NSNextFunctionKey
-                // NSSelectFunctionKey
-                // NSExecuteFunctionKey
-                // NSUndoFunctionKey
-                // NSRedoFunctionKey
-                // NSFindFunctionKey
-                // NSHelpFunctionKey
-                // NSModeSwitchFunctionKey
-                default: break;
-            }
-        }
-
-        // NSEvent's charactersIgnoringModifiers doesn't ignore the shift key
-        if (keyChar >= 'a' && keyChar <= 'z') {
-            return Character.toUpperCase(keyChar);
-        }
-
-        return keyChar;
-    }
-
-    @Override
-    public void enqueueKeyEvent(boolean wait, int eventType, int modifiers, int keyCode, char keyChar) {
-        int key = convertKeyChar(keyChar);
-        if(DEBUG_IMPLEMENTATION) System.err.println("MacWindow.enqueueKeyEvent "+Thread.currentThread().getName());
-        // Note that we send the key char for the key code on this
-        // platform -- we do not get any useful key codes out of the system
-        super.enqueueKeyEvent(wait, eventType, modifiers, key, keyChar);
-    }
-
-    private void createWindow(final boolean recreate, final int x, final int y, final int width, final int height, final boolean fullscreen) {
-
-        if(0!=getWindowHandle() && !recreate) {
-            return;
-        }
-
-        try {
-            //runOnEDTIfAvail(true, new Runnable() {
-            //    public void run() {
-                    if(0!=getWindowHandle()) {
-                        // save the view .. close the window
-                        surfaceHandle = changeContentView0(getParentWindowHandle(), getWindowHandle(), 0);
-                        if(recreate && 0==surfaceHandle) {
-                            throw new NativeWindowException("Internal Error - recreate, window but no view");
-                        }
-                        close0(getWindowHandle());
-                        setWindowHandle(0);
-                    } else {
-                        surfaceHandle = 0;
-                    }
-                    setWindowHandle(createWindow0(getParentWindowHandle(),
-                                                 x, y, width, height, fullscreen,
-                                                 (isUndecorated() ?
-                                                 NSBorderlessWindowMask :
-                                                 NSTitledWindowMask|NSClosableWindowMask|NSMiniaturizableWindowMask|NSResizableWindowMask),
-                                                 NSBackingStoreBuffered, 
-                                                 getScreen().getIndex(), surfaceHandle));
-                    if (getWindowHandle() == 0) {
-                        throw new NativeWindowException("Could create native window "+Thread.currentThread().getName()+" "+this);
-                    }
-                    surfaceHandle = contentView0(getWindowHandle());
-                    setTitle0(getWindowHandle(), getTitle());
-                    // don't make the window visible on window creation
-                    // makeKeyAndOrderFront0(windowHandle);
-             //   } } );
-        } catch (Exception ie) {
-            ie.printStackTrace();
-        }
-
-        enqueueWindowEvent(false, WindowEvent.EVENT_WINDOW_MOVED);
-        enqueueWindowEvent(false, WindowEvent.EVENT_WINDOW_RESIZED);
-        enqueueWindowEvent(false, WindowEvent.EVENT_WINDOW_GAINED_FOCUS);
-    }
-    
-    protected static native boolean initIDs0();
-    private native long createWindow0(long parentWindowHandle, int x, int y, int w, int h,
-                                     boolean fullscreen, int windowStyle,
-                                     int backingStoreType,
-                                     int screen_idx, long view);
-    private native void makeKeyAndOrderFront0(long window);
-    private native void makeKey0(long window);
-    private native void orderOut0(long window);
-    private native void close0(long window);
-    private native void setTitle0(long window, String title);
-    private native long contentView0(long window);
-    private native long changeContentView0(long parentWindowHandle, long window, long view);
-    private native void setContentSize0(long window, int w, int h);
-    private native void setFrameTopLeftPoint0(long parentWindowHandle, long window, int x, int y);
-}
diff --git a/src/newt/classes/jogamp/newt/opengl/broadcom/egl/Display.java b/src/newt/classes/jogamp/newt/opengl/broadcom/egl/Display.java
deleted file mode 100644
index 494908a..0000000
--- a/src/newt/classes/jogamp/newt/opengl/broadcom/egl/Display.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * 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
- * 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 jogamp.newt.opengl.broadcom.egl;
-
-import jogamp.newt.*;
-import jogamp.opengl.egl.*;
-import javax.media.nativewindow.*;
-import javax.media.nativewindow.egl.*;
-
-public class Display extends jogamp.newt.DisplayImpl {
-
-    static {
-        NEWTJNILibLoader.loadNEWT();
-
-        if (!Window.initIDs()) {
-            throw new NativeWindowException("Failed to initialize BCEGL Window jmethodIDs");
-        }
-    }
-
-    public static void initSingleton() {
-        // just exist to ensure static init has been run
-    }
-
-
-    public Display() {
-    }
-
-    protected void createNativeImpl() {
-        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);
-    }
-
-    protected void closeNativeImpl() {
-        if (aDevice.getHandle() != EGL.EGL_NO_DISPLAY) {
-            DestroyDisplay(aDevice.getHandle());
-        }
-    }
-
-    protected void dispatchMessagesNative() {
-        // n/a .. DispatchMessages();
-    }
-
-    private native long CreateDisplay(int width, int height);
-    private native void DestroyDisplay(long dpy);
-    private native void DispatchMessages();
-}
-
diff --git a/src/newt/classes/jogamp/newt/opengl/broadcom/egl/Screen.java b/src/newt/classes/jogamp/newt/opengl/broadcom/egl/Screen.java
deleted file mode 100644
index 2224f78..0000000
--- a/src/newt/classes/jogamp/newt/opengl/broadcom/egl/Screen.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * 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
- * 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 jogamp.newt.opengl.broadcom.egl;
-
-import javax.media.nativewindow.*;
-
-public class Screen extends jogamp.newt.ScreenImpl {
-
-    static {
-        Display.initSingleton();
-    }
-
-
-    public Screen() {
-    }
-
-    protected void createNativeImpl() {
-        aScreen = new DefaultGraphicsScreen(getDisplay().getGraphicsDevice(), screen_idx);
-        setScreenSize(fixedWidth, fixedHeight);
-    }
-
-    protected void closeNativeImpl() { }
-
-    //----------------------------------------------------------------------
-    // Internals only
-    //
-
-    static final int fixedWidth = 1920;
-    static final int fixedHeight = 1080;
-}
-
diff --git a/src/newt/classes/jogamp/newt/opengl/broadcom/egl/Window.java b/src/newt/classes/jogamp/newt/opengl/broadcom/egl/Window.java
deleted file mode 100644
index 9532178..0000000
--- a/src/newt/classes/jogamp/newt/opengl/broadcom/egl/Window.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * 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
- * 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 jogamp.newt.opengl.broadcom.egl;
-
-import jogamp.opengl.egl.*;
-import javax.media.nativewindow.*;
-import javax.media.nativewindow.NativeWindowException;
-import javax.media.nativewindow.util.Point;
-import javax.media.opengl.GLCapabilitiesImmutable;
-
-public class Window extends jogamp.newt.WindowImpl {
-    static {
-        Display.initSingleton();
-    }
-
-    public Window() {
-    }
-
-    protected void createNativeImpl() {
-        if(0!=getParentWindowHandle()) {
-            throw new RuntimeException("Window parenting not supported (yet)");
-        }
-        // query a good configuration .. even thought we drop this one 
-        // and reuse the EGLUtil choosen one later.
-        config = GraphicsConfigurationFactory.getFactory(getScreen().getDisplay().getGraphicsDevice()).chooseGraphicsConfiguration(
-                capsRequested, capsRequested, capabilitiesChooser, getScreen().getGraphicsScreen());
-        if (config == null) {
-            throw new NativeWindowException("Error choosing GraphicsConfiguration creating window: "+this);
-        }
-        setSizeImpl(getScreen().getWidth(), getScreen().getHeight());
-
-        setWindowHandle(realizeWindow(true, width, height));
-        if (0 == getWindowHandle()) {
-            throw new NativeWindowException("Error native Window Handle is null");
-        }
-    }
-
-    protected void closeNativeImpl() {
-        if(0!=windowHandleClose) {
-            CloseWindow(getDisplayHandle(), windowHandleClose);
-        }
-    }
-
-    protected void setVisibleImpl(boolean visible, int x, int y, int width, int height) {
-        reconfigureWindowImpl(x, y, width, height, false, 0, 0);
-        visibleChanged(visible);
-    }
-
-    protected void requestFocusImpl(boolean reparented) { }
-
-    protected void setSizeImpl(int width, int height) {
-        if(0!=getWindowHandle()) {
-            // n/a in BroadcomEGL
-            System.err.println("BCEGL Window.setSizeImpl n/a in BroadcomEGL with realized window");
-        } else {
-            this.width = width;
-            this.height = height;
-        }
-    }
-
-    protected boolean reconfigureWindowImpl(int x, int y, int width, int height, 
-                                            boolean parentChange, int fullScreenChange, int decorationChange) {
-        if(0!=getWindowHandle()) {
-            if(0!=fullScreenChange) {
-                if( fullScreenChange > 0 ) {
-                    // n/a in BroadcomEGL
-                    System.err.println("setFullscreen n/a in BroadcomEGL");
-                    return false;
-                }
-            }
-        }
-        if(width>0 || height>0) {
-            if(0!=getWindowHandle()) {
-                // n/a in BroadcomEGL
-                System.err.println("BCEGL Window.setSizeImpl n/a in BroadcomEGL with realized window");
-            } else {
-                this.width=(width>0)?width:this.width;
-                this.height=(height>0)?height:this.height;
-            }
-        }
-        if(x>=0 || y>=0) {
-            System.err.println("BCEGL Window.setPositionImpl n/a in BroadcomEGL");
-        }
-        return true;
-    }
-
-    protected Point getLocationOnScreenImpl(int x, int y) {
-        return new Point(x,y);
-    }
-
-
-    @Override
-    public boolean surfaceSwap() {
-        SwapWindow(getDisplayHandle(), getWindowHandle());
-        return true;
-    }
-
-    //----------------------------------------------------------------------
-    // Internals only
-    //
-
-    protected static native boolean initIDs();
-    private        native long CreateWindow(long eglDisplayHandle, boolean chromaKey, int width, int height);
-    private        native void CloseWindow(long eglDisplayHandle, long eglWindowHandle);
-    private        native void SwapWindow(long eglDisplayHandle, long eglWindowHandle);
-
-
-    private long realizeWindow(boolean chromaKey, int width, int height) {
-        if(DEBUG_IMPLEMENTATION) {
-            System.err.println("BCEGL Window.realizeWindow() with: chroma "+chromaKey+", "+width+"x"+height+", "+config);
-        }
-        long handle = CreateWindow(getDisplayHandle(), chromaKey, width, height);
-        if (0 == handle) {
-            throw new NativeWindowException("Error native Window Handle is null");
-        }
-        windowHandleClose = handle;
-        return handle;
-    }
-
-    private void windowCreated(int cfgID, int width, int height) {
-        this.width = width;
-        this.height = height;
-        GLCapabilitiesImmutable capsReq = (GLCapabilitiesImmutable) config.getRequestedCapabilities();
-        config = EGLGraphicsConfiguration.create(capsReq, getScreen().getGraphicsScreen(), cfgID);
-        if (config == null) {
-            throw new NativeWindowException("Error creating EGLGraphicsConfiguration from id: "+cfgID+", "+this);
-        }
-        if(DEBUG_IMPLEMENTATION) {
-            System.err.println("BCEGL Window.windowCreated(): "+toHexString(cfgID)+", "+width+"x"+height+", "+config);
-        }
-    }
-
-    private long   windowHandleClose;
-}
diff --git a/src/newt/classes/jogamp/newt/opengl/kd/KDDisplay.java b/src/newt/classes/jogamp/newt/opengl/kd/KDDisplay.java
deleted file mode 100644
index c9d83a7..0000000
--- a/src/newt/classes/jogamp/newt/opengl/kd/KDDisplay.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * 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
- * 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 jogamp.newt.opengl.kd;
-
-import com.jogamp.newt.*;
-import jogamp.newt.*;
-import jogamp.opengl.egl.*;
-import javax.media.nativewindow.*;
-import javax.media.nativewindow.egl.*;
-
-public class KDDisplay extends DisplayImpl {
-
-    static {
-        NEWTJNILibLoader.loadNEWT();
-
-        if (!KDWindow.initIDs()) {
-            throw new NativeWindowException("Failed to initialize KDWindow jmethodIDs");
-        }
-    }
-
-    public static void initSingleton() {
-        // just exist to ensure static init has been run
-    }
-
-
-    public KDDisplay() {
-    }
-
-    protected void createNativeImpl() {
-        // FIXME: map name to EGL_*_DISPLAY
-        long handle = EGL.eglGetDisplay(EGL.EGL_DEFAULT_DISPLAY);
-        if (handle == EGL.EGL_NO_DISPLAY) {
-            throw new NativeWindowException("eglGetDisplay failed");
-        }
-        if (!EGL.eglInitialize(handle, null, null)) {
-            throw new NativeWindowException("eglInitialize failed");
-        }
-        aDevice = new EGLGraphicsDevice(handle, AbstractGraphicsDevice.DEFAULT_CONNECTION, AbstractGraphicsDevice.DEFAULT_UNIT);
-    }
-
-    protected void closeNativeImpl() {
-        if (aDevice.getHandle() != EGL.EGL_NO_DISPLAY) {
-            EGL.eglTerminate(aDevice.getHandle());
-        }
-    }
-
-    protected void dispatchMessagesNative() {
-        DispatchMessages();
-    }
-
-    private native void DispatchMessages();
-}
-
diff --git a/src/newt/classes/jogamp/newt/opengl/kd/KDScreen.java b/src/newt/classes/jogamp/newt/opengl/kd/KDScreen.java
deleted file mode 100644
index 2996fb1..0000000
--- a/src/newt/classes/jogamp/newt/opengl/kd/KDScreen.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * 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
- * 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 jogamp.newt.opengl.kd;
-
-import com.jogamp.newt.*;
-import jogamp.newt.ScreenImpl;
-import javax.media.nativewindow.*;
-
-public class KDScreen extends ScreenImpl {
-    static {
-        KDDisplay.initSingleton();
-    }
-
-    public KDScreen() {
-    }
-
-    protected void createNativeImpl() {
-        aScreen = new DefaultGraphicsScreen(getDisplay().getGraphicsDevice(), screen_idx);
-    }
-
-    protected void closeNativeImpl() { }
-
-    // elevate access to this package ..
-    protected void setScreenSize(int w, int h) {
-        super.setScreenSize(w, h);
-    }
-}
diff --git a/src/newt/classes/jogamp/newt/opengl/kd/KDWindow.java b/src/newt/classes/jogamp/newt/opengl/kd/KDWindow.java
deleted file mode 100644
index 9cfa13c..0000000
--- a/src/newt/classes/jogamp/newt/opengl/kd/KDWindow.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * 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
- * 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 jogamp.newt.opengl.kd;
-
-import jogamp.newt.*;
-import jogamp.opengl.egl.*;
-import javax.media.nativewindow.*;
-import javax.media.nativewindow.NativeWindowException;
-import javax.media.nativewindow.util.Point;
-import javax.media.opengl.GLCapabilitiesImmutable;
-
-public class KDWindow extends WindowImpl {
-    private static final String WINDOW_CLASS_NAME = "NewtWindow";
-
-    static {
-        KDDisplay.initSingleton();
-    }
-
-    public KDWindow() {
-    }
-
-    protected void createNativeImpl() {
-        if(0!=getParentWindowHandle()) {
-            throw new RuntimeException("Window parenting not supported (yet)");
-        }
-        config = GraphicsConfigurationFactory.getFactory(getScreen().getDisplay().getGraphicsDevice()).chooseGraphicsConfiguration(
-                capsRequested, capsRequested, capabilitiesChooser, getScreen().getGraphicsScreen());
-        if (config == null) {
-            throw new NativeWindowException("Error choosing GraphicsConfiguration creating window: "+this);
-        }
-
-        GLCapabilitiesImmutable eglCaps = (GLCapabilitiesImmutable) config.getChosenCapabilities();
-        int[] eglAttribs = EGLGraphicsConfiguration.GLCapabilities2AttribList(eglCaps);
-
-        eglWindowHandle = CreateWindow(getDisplayHandle(), eglAttribs);
-        if (eglWindowHandle == 0) {
-            throw new NativeWindowException("Error creating egl window: "+config);
-        }
-        setVisible0(eglWindowHandle, false);
-        setWindowHandle(RealizeWindow(eglWindowHandle));
-        if (0 == getWindowHandle()) {
-            throw new NativeWindowException("Error native Window Handle is null");
-        }
-        windowHandleClose = eglWindowHandle;
-    }
-
-    protected void closeNativeImpl() {
-        if(0!=windowHandleClose) {
-            CloseWindow(windowHandleClose, windowUserData);
-            windowUserData=0;
-        }
-    }
-
-    protected void setVisibleImpl(boolean visible, int x, int y, int width, int height) {
-        setVisible0(eglWindowHandle, visible);
-        reconfigureWindowImpl(x, y, width, height, false, 0, 0);
-        visibleChanged(visible);
-    }
-
-    protected void requestFocusImpl(boolean reparented) { }
-
-    protected boolean reconfigureWindowImpl(int x, int y, int width, int height, 
-                                            boolean parentChange, int fullScreenChange, int decorationChange) {
-        if(0!=eglWindowHandle) {
-            if(0!=fullScreenChange) {
-                boolean fs = fullScreenChange > 0;
-                setFullScreen0(eglWindowHandle, fs);
-                if(fs) {
-                    return true;
-                }
-            }
-            // int _x=(x>=0)?x:this.x;
-            // int _y=(x>=0)?y:this.y;
-            int _w=(width>0)?width:this.width;
-            int _h=(height>0)?height:this.height;
-            if(width>0 || height>0) {
-                setSize0(eglWindowHandle, _w, _h);
-            }
-            if(x>=0 || y>=0) {
-                System.err.println("setPosition n/a in KD");
-            }
-        }
-        return true;
-    }
-
-    protected Point getLocationOnScreenImpl(int x, int y) {
-        return new Point(x,y);
-    }
-
-    //----------------------------------------------------------------------
-    // Internals only
-    //
-
-    protected static native boolean initIDs();
-    private        native long CreateWindow(long displayHandle, int[] attributes);
-    private        native long RealizeWindow(long eglWindowHandle);
-    private        native int  CloseWindow(long eglWindowHandle, long userData);
-    private        native void setVisible0(long eglWindowHandle, boolean visible);
-    private        native void setSize0(long eglWindowHandle, int width, int height);
-    private        native void setFullScreen0(long eglWindowHandle, boolean fullscreen);
-
-    private void windowCreated(long userData) {
-        windowUserData=userData;
-    }
-
-    @Override
-    protected void sizeChanged(int newWidth, int newHeight, boolean force) {
-        if(fullscreen) {
-            ((KDScreen)getScreen()).setScreenSize(width, height);
-        }
-        super.sizeChanged(newWidth, newHeight, force);
-    }
-
-    private long   eglWindowHandle;
-    private long   windowHandleClose;
-    private long   windowUserData;
-}
diff --git a/src/newt/classes/jogamp/newt/windows/WindowsDisplay.java b/src/newt/classes/jogamp/newt/windows/WindowsDisplay.java
deleted file mode 100644
index 750c380..0000000
--- a/src/newt/classes/jogamp/newt/windows/WindowsDisplay.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * 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
- * 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 jogamp.newt.windows;
-
-import jogamp.nativewindow.windows.RegisteredClass;
-import jogamp.nativewindow.windows.RegisteredClassFactory;
-import jogamp.newt.DisplayImpl;
-import jogamp.newt.NEWTJNILibLoader;
-import javax.media.nativewindow.AbstractGraphicsDevice;
-import javax.media.nativewindow.NativeWindowException;
-import javax.media.nativewindow.windows.WindowsGraphicsDevice;
-
-public class WindowsDisplay extends DisplayImpl {
-
-    private static final String newtClassBaseName = "_newt_clazz" ;
-    private static RegisteredClassFactory sharedClassFactory;
-
-    static {
-        NEWTJNILibLoader.loadNEWT();
-
-        if (!WindowsWindow.initIDs0()) {
-            throw new NativeWindowException("Failed to initialize WindowsWindow jmethodIDs");
-        }        
-        sharedClassFactory = new RegisteredClassFactory(newtClassBaseName, WindowsWindow.getNewtWndProc0());
-    }
-
-    public static void initSingleton() {
-        // just exist to ensure static init has been run
-    }
-
-    private RegisteredClass sharedClass;
-
-    public WindowsDisplay() {
-    }
-
-    protected void createNativeImpl() {
-        sharedClass = sharedClassFactory.getSharedClass();
-        aDevice = new WindowsGraphicsDevice(AbstractGraphicsDevice.DEFAULT_UNIT);
-    }
-
-    protected void closeNativeImpl() { 
-        sharedClassFactory.releaseSharedClass();
-    }
-
-    protected void dispatchMessagesNative() {
-        DispatchMessages0();
-    }
-
-    protected long getHInstance() {
-        return sharedClass.getHandle();
-    }
-
-    protected String getWindowClassName() {
-        return sharedClass.getName();
-    }
-
-    //----------------------------------------------------------------------
-    // Internals only
-    //
-    private static native void DispatchMessages0();
-}
-
diff --git a/src/newt/classes/jogamp/newt/windows/WindowsScreen.java b/src/newt/classes/jogamp/newt/windows/WindowsScreen.java
deleted file mode 100644
index ea7fe8d..0000000
--- a/src/newt/classes/jogamp/newt/windows/WindowsScreen.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * 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
- * 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 jogamp.newt.windows;
-
-import com.jogamp.common.util.ArrayHashSet;
-import java.util.ArrayList;
-
-import com.jogamp.newt.*;
-import jogamp.newt.ScreenImpl;
-import com.jogamp.newt.ScreenMode;
-import jogamp.newt.ScreenModeStatus;
-import com.jogamp.newt.util.ScreenModeUtil;
-
-import javax.media.nativewindow.*;
-
-public class WindowsScreen extends ScreenImpl {
-
-    static {
-        WindowsDisplay.initSingleton();
-    }
-
-    public WindowsScreen() {
-    }
-
-    protected void createNativeImpl() {
-        aScreen = new DefaultGraphicsScreen(getDisplay().getGraphicsDevice(), screen_idx);
-        setScreenSize(getWidthImpl0(screen_idx), getHeightImpl0(screen_idx));
-    }
-
-    protected void closeNativeImpl() {
-    }
-
-    private int[] getScreenModeIdx(int idx) {
-        int[] modeProps = getScreenMode0(screen_idx, idx);
-        if (null == modeProps || 0 == modeProps.length) {
-            return null;
-        }
-        if(modeProps.length < ScreenModeUtil.NUM_SCREEN_MODE_PROPERTIES_ALL) {
-            throw new RuntimeException("properties array too short, should be >= "+ScreenModeUtil.NUM_SCREEN_MODE_PROPERTIES_ALL+", is "+modeProps.length);
-        }
-        return modeProps;
-    }
-
-    private int nativeModeIdx;
-
-    protected int[] getScreenModeFirstImpl() {
-        nativeModeIdx = 0;
-        return getScreenModeNextImpl();
-    }
-
-    protected int[] getScreenModeNextImpl() {
-        int[] modeProps = getScreenModeIdx(nativeModeIdx);
-        if (null != modeProps && 0 < modeProps.length) {
-            nativeModeIdx++;
-            return modeProps;
-        }
-        return null;
-    }
-
-    protected ScreenMode getCurrentScreenModeImpl() {
-        int[] modeProps = getScreenModeIdx(-1);
-        if (null != modeProps && 0 < modeProps.length) {
-            return ScreenModeUtil.streamIn(modeProps, 0);
-        }
-        return null;
-    }
-
-    protected boolean setCurrentScreenModeImpl(ScreenMode sm) {
-        return setScreenMode0(screen_idx, 
-                              sm.getMonitorMode().getSurfaceSize().getResolution().getWidth(),
-                              sm.getMonitorMode().getSurfaceSize().getResolution().getHeight(),
-                              sm.getMonitorMode().getSurfaceSize().getBitsPerPixel(),
-                              sm.getMonitorMode().getRefreshRate(),
-                              sm.getRotation());
-    }
-
-    // Native calls
-    private native int getWidthImpl0(int scrn_idx);
-
-    private native int getHeightImpl0(int scrn_idx);
-
-    private native int[] getScreenMode0(int screen_index, int mode_index);
-    private native boolean setScreenMode0(int screen_index, int width, int height, int bits, int freq, int rot);
-}
diff --git a/src/newt/classes/jogamp/newt/windows/WindowsWindow.java b/src/newt/classes/jogamp/newt/windows/WindowsWindow.java
deleted file mode 100644
index 653de29..0000000
--- a/src/newt/classes/jogamp/newt/windows/WindowsWindow.java
+++ /dev/null
@@ -1,209 +0,0 @@
-/*
- * 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
- * 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 jogamp.newt.windows;
-
-import jogamp.nativewindow.windows.GDI;
-import jogamp.newt.WindowImpl;
-import javax.media.nativewindow.GraphicsConfigurationFactory;
-import javax.media.nativewindow.NativeWindowException;
-import javax.media.nativewindow.util.Insets;
-import javax.media.nativewindow.util.Point;
-
-public class WindowsWindow extends WindowImpl {
-
-    private long hmon;
-    private long hdc;
-    private long windowHandleClose;
-    private final Insets insets = new Insets(0, 0, 0, 0);
-
-    static {
-        WindowsDisplay.initSingleton();
-    }
-
-    public WindowsWindow() {
-    }
-
-    @Override
-    protected int lockSurfaceImpl() {
-        if (0 != hdc) {
-            throw new InternalError("surface not released");
-        }
-        hdc = GDI.GetDC(getWindowHandle());
-        hmon = MonitorFromWindow0(getWindowHandle());
-        return ( 0 != hdc ) ? LOCK_SUCCESS : LOCK_SURFACE_NOT_READY;
-    }
-
-    @Override
-    protected void unlockSurfaceImpl() {
-        if (0 == hdc) {
-            throw new InternalError("surface not acquired");
-        }
-        GDI.ReleaseDC(getWindowHandle(), hdc);
-        hdc=0;
-    }
-
-    @Override
-    public final long getSurfaceHandle() {
-        return hdc;
-    }
-
-    @Override
-    public boolean hasDeviceChanged() {
-        if(0!=getWindowHandle()) {
-            long _hmon = MonitorFromWindow0(getWindowHandle());
-            if (hmon != _hmon) {
-                if(DEBUG_IMPLEMENTATION || DEBUG_WINDOW_EVENT) {
-                    Exception e = new Exception("Info: Window Device Changed "+Thread.currentThread().getName()+
-                                                ", HMON "+toHexString(hmon)+" -> "+toHexString(_hmon));
-                    e.printStackTrace();
-                }
-                hmon = _hmon;
-                return true;
-            }
-        }
-        return false;
-    }
-
-    protected void createNativeImpl() {
-        WindowsScreen  screen = (WindowsScreen) getScreen();
-        WindowsDisplay display = (WindowsDisplay) screen.getDisplay();
-        config = GraphicsConfigurationFactory.getFactory(display.getGraphicsDevice()).chooseGraphicsConfiguration(
-                capsRequested, capsRequested, capabilitiesChooser, screen.getGraphicsScreen());
-        if (config == null) {
-            throw new NativeWindowException("Error choosing GraphicsConfiguration creating window: "+this);
-        }
-        setWindowHandle(CreateWindow0(display.getHInstance(), display.getWindowClassName(), display.getWindowClassName(),
-                                      getParentWindowHandle(), 0, undecorated, x, y, width, height));
-        if (getWindowHandle() == 0) {
-            throw new NativeWindowException("Error creating window");
-        }
-        windowHandleClose = getWindowHandle();
-        if(DEBUG_IMPLEMENTATION || DEBUG_WINDOW_EVENT) {
-            Exception e = new Exception("Info: Window new window handle "+Thread.currentThread().getName()+
-                                        " (Parent HWND "+toHexString(getParentWindowHandle())+
-                                        ") : HWND "+toHexString(getWindowHandle())+", "+Thread.currentThread());
-            e.printStackTrace();
-        }
-    }
-
-    protected void closeNativeImpl() {
-        if (hdc != 0) {
-            if(windowHandleClose != 0) {
-                try {
-                    GDI.ReleaseDC(windowHandleClose, hdc);
-                } catch (Throwable t) {
-                    if(DEBUG_IMPLEMENTATION) { 
-                        Exception e = new Exception("Warning: closeNativeImpl failed - "+Thread.currentThread().getName(), t);
-                        e.printStackTrace();
-                    }
-                }
-            }
-            hdc = 0;
-        }
-        if(windowHandleClose != 0) {
-            try {
-                GDI.DestroyWindow(windowHandleClose);
-            } catch (Throwable t) {
-                if(DEBUG_IMPLEMENTATION) {
-                    Exception e = new Exception("Warning: closeNativeImpl failed - "+Thread.currentThread().getName(), t);
-                    e.printStackTrace();
-                }
-            } finally {
-                windowHandleClose = 0;
-            }
-        }
-    }
-
-    protected void setVisibleImpl(boolean visible, int x, int y, int width, int height) {
-        setVisible0(getWindowHandle(), visible, (getParentWindowHandle()==0)?true:false, x, y, width, height);
-        visibleChanged(visible);
-    }
-
-    protected boolean reconfigureWindowImpl(int x, int y, int width, int height, 
-                                            boolean parentChange, int fullScreenChange, int decorationChange) {
-        reconfigureWindow0( (fullScreenChange>0)?0:getParentWindowHandle(), 
-                             getWindowHandle(), x, y, width, height, isVisible(), parentChange, fullScreenChange, decorationChange);
-        return true;
-    }
-
-    protected void requestFocusImpl(boolean force) {
-        requestFocus0(getWindowHandle(), force);
-    }
-
-    @Override
-    protected void setTitleImpl(final String title) {
-        setTitle0(getWindowHandle(), title);
-    }
-
-    @Override
-    public Insets getInsets() {
-        return (Insets)insets.clone();
-    }
-
-    protected Point getLocationOnScreenImpl(int x, int y) {
-        return GDI.GetRelativeLocation( getWindowHandle(), 0 /*root win*/, x, y);
-    }
-
-    //----------------------------------------------------------------------
-    // Internals only
-    //
-    protected static native boolean initIDs0();
-    protected static native long getNewtWndProc0();
-
-    private native long CreateWindow0(long hInstance, String wndClassName, String wndName,
-                                      long parentWindowHandle, long visualID, boolean isUndecorated,
-                                      int x, int y, int width, int height);
-    private native long MonitorFromWindow0(long windowHandle);
-    private native void setVisible0(long windowHandle, boolean visible, boolean top, int x, int y, int width, int height);
-    private native void reconfigureWindow0(long parentWindowHandle, long windowHandle, 
-                                                  int x, int y, int width, int height, boolean isVisible,
-                                                  boolean parentChange, int fullScreenChange, int decorationChange);
-    private static native void setTitle0(long windowHandle, String title);
-    private native void requestFocus0(long windowHandle, boolean force);
-
-    private void insetsChanged(int left, int top, int right, int bottom) {
-        if (left != -1 && top != -1 && right != -1 && bottom != -1) {
-            if (left != insets.left || top != insets.top || right != insets.right || bottom != insets.bottom) {
-                insets.left = left;
-                insets.top = top;
-                insets.right = right;
-                insets.bottom = bottom;
-                if(DEBUG_IMPLEMENTATION) {
-                    System.err.println("Window.insetsChanged: "+insets);
-                }
-            }
-        }
-    }
-}
diff --git a/src/newt/classes/jogamp/newt/x11/X11Display.java b/src/newt/classes/jogamp/newt/x11/X11Display.java
deleted file mode 100644
index d4a83ab..0000000
--- a/src/newt/classes/jogamp/newt/x11/X11Display.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * 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
- * 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 jogamp.newt.x11;
-
-import javax.media.nativewindow.*;
-import javax.media.nativewindow.x11.*;
-import jogamp.newt.*;
-import jogamp.nativewindow.x11.X11Util;
-
-public class X11Display extends DisplayImpl {
-
-    static {
-        NEWTJNILibLoader.loadNEWT();
-
-        if ( !initIDs0() ) {
-            throw new NativeWindowException("Failed to initialize X11Display jmethodIDs");
-        }
-
-        if (!X11Window.initIDs0()) {
-            throw new NativeWindowException("Failed to initialize X11Window jmethodIDs");
-        }
-    }
-
-    public static void initSingleton() {
-        // just exist to ensure static init has been run
-    }
-
-
-    public X11Display() {
-    }
-
-    public String validateDisplayName(String name, long handle) {
-        return X11Util.validateDisplayName(name, handle);
-    }
-
-    protected void createNativeImpl() {
-        long handle = X11Util.createDisplay(name);
-        if( 0 == handle ) {
-            throw new RuntimeException("Error creating display: "+name);
-        }
-        try {
-            CompleteDisplay0(handle);
-        } catch(RuntimeException e) {
-            X11Util.closeDisplay(handle);
-            throw e;
-        }
-        aDevice = new X11GraphicsDevice(handle, AbstractGraphicsDevice.DEFAULT_UNIT, NativeWindowFactory.getNullToolkitLock());
-        // aDevice = new X11GraphicsDevice(handle, AbstractGraphicsDevice.DEFAULT_UNIT, NativeWindowFactory.createDefaultToolkitLockNoAWT(NativeWindowFactory.TYPE_X11, handle));
-        // aDevice = new X11GraphicsDevice(handle, AbstractGraphicsDevice.DEFAULT_UNIT);
-    }
-
-    protected void closeNativeImpl() {
-        X11Util.closeDisplay(getHandle());
-    }
-
-    protected void dispatchMessagesNative() {
-        long dpy = getHandle();
-        if(0!=dpy) {
-            DispatchMessages0(dpy, javaObjectAtom, windowDeleteAtom);
-        }
-    }
-
-    protected long getJavaObjectAtom() { return javaObjectAtom; }
-    protected long getWindowDeleteAtom() { return windowDeleteAtom; }
-
-    //----------------------------------------------------------------------
-    // Internals only
-    //
-    private static native boolean initIDs0();
-
-    private native void CompleteDisplay0(long handle);
-
-    private native void DispatchMessages0(long display, long javaObjectAtom, long windowDeleteAtom);
-
-    private void displayCompleted(long javaObjectAtom, long windowDeleteAtom) {
-        this.javaObjectAtom=javaObjectAtom;
-        this.windowDeleteAtom=windowDeleteAtom;
-    }
-
-    private long windowDeleteAtom;
-    private long javaObjectAtom;
-}
-
diff --git a/src/newt/classes/jogamp/newt/x11/X11Screen.java b/src/newt/classes/jogamp/newt/x11/X11Screen.java
deleted file mode 100644
index 4788f6b..0000000
--- a/src/newt/classes/jogamp/newt/x11/X11Screen.java
+++ /dev/null
@@ -1,270 +0,0 @@
-/*
- * 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
- * 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 jogamp.newt.x11;
-
-import jogamp.nativewindow.x11.X11Util;
-import jogamp.newt.ScreenImpl;
-import com.jogamp.newt.ScreenMode;
-import com.jogamp.newt.util.ScreenModeUtil;
-import java.util.List;
-
-import javax.media.nativewindow.x11.*;
-
-public class X11Screen extends ScreenImpl {
-
-    static {
-        X11Display.initSingleton();
-    }
-
-    public X11Screen() {
-    }
-
-    protected void createNativeImpl() {
-        long handle = GetScreen0(display.getHandle(), screen_idx);
-        if (handle == 0) {
-            throw new RuntimeException("Error creating screen: " + screen_idx);
-        }
-        aScreen = new X11GraphicsScreen((X11GraphicsDevice) getDisplay().getGraphicsDevice(), screen_idx);
-        setScreenSize(getWidth0(display.getHandle(), screen_idx),
-                getHeight0(display.getHandle(), screen_idx));
-    }
-
-    protected void closeNativeImpl() {
-    }
-
-    private int[] nrotations;
-    private int nrotation_index;
-    private int nres_number;
-    private int nres_index;
-    private int[] nrates;
-    private int nrate_index;
-    private int nmode_number;
-
-    protected int[] getScreenModeFirstImpl() {
-        // initialize iterators and static data
-        nrotations = getAvailableScreenModeRotations0(display.getHandle(), screen_idx);
-        if(null==nrotations || 0==nrotations.length) {
-            return null;
-        }
-        nrotation_index = 0;
-
-        nres_number = getNumScreenModeResolutions0(display.getHandle(), screen_idx);
-        if(0==nres_number) {
-            return null;
-        }
-        nres_index = 0;
-
-        nrates = getScreenModeRates0(display.getHandle(), screen_idx, nres_index);
-        if(null==nrates || 0==nrates.length) {
-            return null;
-        }
-        nrate_index = 0;
-
-        nmode_number = 0;
-
-        return getScreenModeNextImpl();
-    }
-
-    protected int[] getScreenModeNextImpl() {
-        // assemble: w x h x bpp x f x r        
-
-        /**
-        System.err.println("******** mode: "+nmode_number);
-        System.err.println("rot  "+nrotation_index);
-        System.err.println("rate "+nrate_index);
-        System.err.println("res  "+nres_index); */
-
-        int[] res = getScreenModeResolution0(display.getHandle(), screen_idx, nres_index);
-        if(null==res || 0==res.length) {
-            return null;
-        }
-        if(0>=res[0] || 0>=res[1]) {
-            throw new InternalError("invalid resolution: "+res[0]+"x"+res[1]+" for res idx "+nres_index+"/"+nres_number);
-        }
-        int bpp = 32; // FIXME
-        int rate = nrates[nrate_index];
-        if(0>=rate) {
-            throw new InternalError("invalid rate: "+rate+" at index "+nrate_index+"/"+nrates.length);
-        }
-        int rotation = nrotations[nrotation_index];
-
-        int[] props = new int[ 1 + ScreenModeUtil.NUM_SCREEN_MODE_PROPERTIES_ALL ];
-        int i = 0;
-        props[i++] = nres_index; // use resolution index, not unique for native -> ScreenMode
-        props[i++] = 0; // set later for verification of iterator
-        props[i++] = res[0]; // width
-        props[i++] = res[1]; // height
-        props[i++] = bpp;    // bpp
-        props[i++] = res[2]; // widthmm
-        props[i++] = res[3]; // heightmm
-        props[i++] = rate;   // rate
-        props[i++] = rotation;
-        props[i - ScreenModeUtil.NUM_SCREEN_MODE_PROPERTIES_ALL] = i - 1; // count without extra element
-
-        nmode_number++;
-
-        // iteration: r -> f -> bpp -> [w x h]
-        nrotation_index++;
-        if(nrotation_index == nrotations.length) {
-            nrotation_index=0;
-            nrate_index++;
-            if(null == nrates || nrate_index == nrates.length){
-                nres_index++;
-                if(nres_index == nres_number) {
-                    // done
-                    nrates=null;
-                    nrotations=null;
-                    return null;
-                }
-
-                nrates = getScreenModeRates0(display.getHandle(), screen_idx, nres_index);
-                if(null==nrates || 0==nrates.length) {
-                    return null;
-                }
-                nrate_index = 0;
-            }
-        }
-
-        return props;
-    }
-
-    protected ScreenMode getCurrentScreenModeImpl() {
-        int resNumber = getNumScreenModeResolutions0(display.getHandle(), screen_idx);
-        if(0==resNumber) {
-            return null;
-        }
-        int resIdx = getCurrentScreenResolutionIndex0(display.getHandle(), screen_idx);
-        if(0>resIdx) {
-            return null;
-        }
-        if(resIdx>=resNumber) {
-            throw new RuntimeException("Invalid resolution index: ! "+resIdx+" < "+resNumber);
-        }
-        int[] res = getScreenModeResolution0(display.getHandle(), screen_idx, resIdx);
-        if(null==res || 0==res.length) {
-            return null;
-        }
-        if(0>=res[0] || 0>=res[1]) {
-            throw new InternalError("invalid resolution: "+res[0]+"x"+res[1]+" for res idx "+resIdx+"/"+resNumber);
-        }
-        int rate = getCurrentScreenRate0(display.getHandle(), screen_idx);
-        if(0>rate) {
-            return null;
-        }
-        int rot = getCurrentScreenRotation0(display.getHandle(), screen_idx);
-        if(0>rot) {
-            return null;
-        }
-
-        int[] props = new int[ScreenModeUtil.NUM_SCREEN_MODE_PROPERTIES_ALL];
-        int i = 0;
-        props[i++] = 0; // set later for verification of iterator
-        props[i++] = res[0]; // width
-        props[i++] = res[1]; // height
-        props[i++] = 32;     // FIXME: bpp
-        props[i++] = res[2]; // widthmm
-        props[i++] = res[3]; // heightmm
-        props[i++] = rate;   // rate
-        props[i++] = rot;
-        props[i - ScreenModeUtil.NUM_SCREEN_MODE_PROPERTIES_ALL] = i; // count
-        return ScreenModeUtil.streamIn(props, 0);
-    }
-
-    protected boolean setCurrentScreenModeImpl(ScreenMode screenMode) {
-        List screenModes = this.getScreenModesOrig();
-        int screenModeIdx = screenModes.indexOf(screenMode);
-        if(0>screenModeIdx) {
-            throw new RuntimeException("ScreenMode not element of ScreenMode list: "+screenMode);
-        }
-        int resNumber = getNumScreenModeResolutions0(display.getHandle(), screen_idx);
-        int resIdx = getScreenModesIdx2NativeIdx().get(screenModeIdx);
-        if(0>resIdx || resIdx>=resNumber) {
-            throw new RuntimeException("Invalid resolution index: ! 0 < "+resIdx+" < "+resNumber+", screenMode["+screenModeIdx+"] "+screenMode);
-        }
-
-        long dpy = X11Util.createDisplay(display.getName());
-        if( 0 == dpy ) {
-            throw new RuntimeException("Error creating display: "+display.getName());
-        }
-
-        boolean done = false;
-        long t0 = System.currentTimeMillis();
-        try {
-            int f = screenMode.getMonitorMode().getRefreshRate();
-            int r = screenMode.getRotation();
-            if( setCurrentScreenModeStart0(dpy, screen_idx, resIdx, f, r) ) {
-                while(!done && System.currentTimeMillis()-t0 < SCREEN_MODE_CHANGE_TIMEOUT) {
-                    done = setCurrentScreenModePollEnd0(dpy, screen_idx, resIdx, f, r);
-                    if(!done) {
-                        Thread.yield();
-                    }
-                }
-            }
-        } finally {
-            X11Util.closeDisplay(dpy);
-        }
-
-        if(!done) {
-            System.err.println("X11Screen.setCurrentScreenModeImpl: TO ("+SCREEN_MODE_CHANGE_TIMEOUT+") reached: "+
-                               (System.currentTimeMillis()-t0)+"ms");
-        }
-        return done;
-    }
-
-    //----------------------------------------------------------------------
-    // Internals only
-    //
-    private static native long GetScreen0(long dpy, int scrn_idx);
-
-    private static native int getWidth0(long display, int scrn_idx);
-
-    private static native int getHeight0(long display, int scrn_idx);
-
-    /** @return int[] { rot1, .. } */
-    private static native int[] getAvailableScreenModeRotations0(long display, int screen_index);
-
-    private static native int getNumScreenModeResolutions0(long display, int screen_index);
-
-    /** @return int[] { width, height, widthmm, heightmm } */
-    private static native int[] getScreenModeResolution0(long display, int screen_index, int mode_index);
-
-    private static native int[] getScreenModeRates0(long display, int screen_index, int mode_index);
-
-    private static native int getCurrentScreenResolutionIndex0(long display, int screen_index);
-    private static native int getCurrentScreenRate0(long display, int screen_index);
-    private static native int getCurrentScreenRotation0(long display, int screen_index);
-
-    /** needs own Display connection for XRANDR event handling */
-    private static native boolean setCurrentScreenModeStart0(long display, int screen_index, int mode_index, int freq, int rot);
-    private static native boolean setCurrentScreenModePollEnd0(long display, int screen_index, int mode_index, int freq, int rot);
-}
diff --git a/src/newt/classes/jogamp/newt/x11/X11Window.java b/src/newt/classes/jogamp/newt/x11/X11Window.java
deleted file mode 100644
index 8f94556..0000000
--- a/src/newt/classes/jogamp/newt/x11/X11Window.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * 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
- * 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 jogamp.newt.x11;
-
-import jogamp.nativewindow.x11.X11Util;
-import jogamp.newt.WindowImpl;
-import javax.media.nativewindow.*;
-import javax.media.nativewindow.x11.*;
-import javax.media.nativewindow.util.Point;
-
-public class X11Window extends WindowImpl {
-    private static final String WINDOW_CLASS_NAME = "NewtWindow";
-
-    static {
-        X11Display.initSingleton();
-    }
-
-    public X11Window() {
-    }
-
-    protected void createNativeImpl() {
-        X11Screen screen = (X11Screen) getScreen();
-        X11Display display = (X11Display) screen.getDisplay();
-        config = GraphicsConfigurationFactory.getFactory(display.getGraphicsDevice()).chooseGraphicsConfiguration(
-                capsRequested, capsRequested, capabilitiesChooser, screen.getGraphicsScreen());
-        if (config == null) {
-            throw new NativeWindowException("Error choosing GraphicsConfiguration creating window: "+this);
-        }
-        X11GraphicsConfiguration x11config = (X11GraphicsConfiguration) config;
-        long visualID = x11config.getVisualID();
-        long w = CreateWindow0(getParentWindowHandle(),
-                               display.getHandle(), screen.getIndex(), visualID, 
-                               display.getJavaObjectAtom(), display.getWindowDeleteAtom(), 
-                               x, y, width, height, isUndecorated());
-        if (w == 0) {
-            throw new NativeWindowException("Error creating window: "+w);
-        }
-        setWindowHandle(w);
-        windowHandleClose = w;
-    }
-
-    protected void closeNativeImpl() {
-        if(0!=windowHandleClose && null!=getScreen() ) {
-            X11Display display = (X11Display) getScreen().getDisplay();
-            try {
-                CloseWindow0(display.getHandle(), windowHandleClose, 
-                             display.getJavaObjectAtom(), display.getWindowDeleteAtom());
-            } catch (Throwable t) {
-                if(DEBUG_IMPLEMENTATION) { 
-                    Exception e = new Exception("Warning: closeNativeImpl failed - "+Thread.currentThread().getName(), t);
-                    e.printStackTrace();
-                }
-            } finally {
-                windowHandleClose = 0;
-            }
-        }
-    }
-
-    protected void setVisibleImpl(boolean visible, int x, int y, int width, int height) {
-        setVisible0(getDisplayHandle(), getWindowHandle(), visible, x, y, width, height);
-    }
-
-    protected boolean reconfigureWindowImpl(int x, int y, int width, int height, 
-                                            boolean parentChange, int fullScreenChange, int decorationChange) {
-        reparentHandle=0;
-        reparentCount=0;
-        long reqNewParentHandle = ( fullScreenChange > 0 ) ? 0 : getParentWindowHandle() ;
-
-        reconfigureWindow0( getDisplayHandle(), getScreenIndex(), reqNewParentHandle, getWindowHandle(),
-                            x, y, width, height, isVisible(), parentChange, fullScreenChange, decorationChange);
-        return true;
-    }
-
-    protected void requestFocusImpl(boolean force) {
-        requestFocus0(getDisplayHandle(), getWindowHandle(), force);
-    }
-
-    @Override
-    protected void setTitleImpl(String title) {
-        setTitle0(getDisplayHandle(), getWindowHandle(), title);
-    }
-
-    protected Point getLocationOnScreenImpl(int x, int y) {
-        return X11Util.GetRelativeLocation( getDisplayHandle(), getScreenIndex(), getWindowHandle(), 0 /*root win*/, x, y);
-    }
-
-    //----------------------------------------------------------------------
-    // Internals only
-    //
-
-    protected static native boolean initIDs0();
-    private native long CreateWindow0(long parentWindowHandle, long display, int screen_index, 
-                                            long visualID, long javaObjectAtom, long windowDeleteAtom, 
-                                            int x, int y, int width, int height, boolean undecorated);
-    private native void CloseWindow0(long display, long windowHandle, long javaObjectAtom, long windowDeleteAtom);
-    private native void setVisible0(long display, long windowHandle, boolean visible, int x, int y, int width, int height);
-    private native void reconfigureWindow0(long display, int screen_index, long parentWindowHandle, long windowHandle, 
-                                                  int x, int y, int width, int height, boolean isVisible,
-                                                  boolean parentChange, int fullScreenChange, int decorationChange);
-    private native void setTitle0(long display, long windowHandle, String title);
-    private native void requestFocus0(long display, long windowHandle, boolean force);
-    private native Object getRelativeLocation0(long display, int screen_index, long src_win, long dest_win, int src_x, int src_y);
-
-    private void windowReparented(long gotParentHandle) {
-        reparentHandle = gotParentHandle;
-        reparentCount++;
-        if(DEBUG_IMPLEMENTATION) { 
-            System.err.println("******** new parent ("+reparentCount+"): " + toHexString(reparentHandle) );
-        }
-    }
-
-    private long   windowHandleClose;
-    private volatile long reparentHandle;
-    private volatile int reparentCount;
-}
diff --git a/src/newt/native/AndroidWindow.c b/src/newt/native/AndroidWindow.c
new file mode 100644
index 0000000..fa57656
--- /dev/null
+++ b/src/newt/native/AndroidWindow.c
@@ -0,0 +1,81 @@
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdarg.h>
+
+#include <gluegen_stdint.h>
+
+#include <unistd.h>
+#include <errno.h>
+
+#include "jogamp_newt_driver_android_AndroidWindow.h"
+
+#include <android/native_window.h>
+#include <android/native_window_jni.h>
+
+#define VERBOSE_ON 1
+
+#ifdef VERBOSE_ON
+    #define DBG_PRINT(...) fprintf(stdout, __VA_ARGS__)
+#else
+    #define DBG_PRINT(...)
+#endif
+
+
+JNIEXPORT jlong JNICALL Java_jogamp_newt_driver_android_AndroidWindow_getSurfaceHandle0
+    (JNIEnv *env, jclass clazz, jobject surface)
+{
+    ANativeWindow * anw = ANativeWindow_fromSurface(env, surface);
+    return (jlong) (intptr_t) anw;
+}
+
+JNIEXPORT jint JNICALL Java_jogamp_newt_driver_android_AndroidWindow_getSurfaceVisualID0
+    (JNIEnv *env, jclass clazz, jlong surfaceHandle)
+{
+    ANativeWindow * anw = (ANativeWindow *) (intptr_t) surfaceHandle;
+    return (jint) ANativeWindow_getFormat(anw);
+}
+
+JNIEXPORT void JNICALL Java_jogamp_newt_driver_android_AndroidWindow_setSurfaceVisualID0
+    (JNIEnv *env, jclass clazz, jlong surfaceHandle, jint nativeVisualID)
+{
+    ANativeWindow * anw = (ANativeWindow *) (intptr_t) surfaceHandle;
+    ANativeWindow_setBuffersGeometry(anw, 0, 0, nativeVisualID);
+}
+
+JNIEXPORT jint JNICALL Java_jogamp_newt_driver_android_AndroidWindow_getWidth0
+    (JNIEnv *env, jclass clazz, jlong surfaceHandle)
+{
+    ANativeWindow * anw = (ANativeWindow *) (intptr_t) surfaceHandle;
+    return (jint) ANativeWindow_getWidth(anw);
+}
+
+JNIEXPORT jint JNICALL Java_jogamp_newt_driver_android_AndroidWindow_getHeight0
+    (JNIEnv *env, jclass clazz, jlong surfaceHandle)
+{
+    ANativeWindow * anw = (ANativeWindow *) (intptr_t) surfaceHandle;
+    return (jint) ANativeWindow_getHeight(anw);
+}
+
+JNIEXPORT void JNICALL Java_jogamp_newt_driver_android_AndroidWindow_acquire0
+    (JNIEnv *env, jclass clazz, jlong surfaceHandle)
+{
+    ANativeWindow * anw = (ANativeWindow *) (intptr_t) surfaceHandle;
+    ANativeWindow_acquire(anw);
+}
+
+JNIEXPORT void JNICALL Java_jogamp_newt_driver_android_AndroidWindow_release0
+    (JNIEnv *env, jclass clazz, jlong surfaceHandle)
+{
+    ANativeWindow * anw = (ANativeWindow *) (intptr_t) surfaceHandle;
+    ANativeWindow_release(anw);
+}
+
+JNIEXPORT jboolean JNICALL Java_jogamp_newt_driver_android_AndroidWindow_initIDs0
+  (JNIEnv *env, jclass clazz)
+{
+    DBG_PRINT( "initIDs ok\n" );
+    return JNI_TRUE;
+}
+
diff --git a/src/newt/native/BroadcomEGL.c b/src/newt/native/BroadcomEGL.c
index 0cca904..df6aca6 100644
--- a/src/newt/native/BroadcomEGL.c
+++ b/src/newt/native/BroadcomEGL.c
@@ -31,17 +31,13 @@
  * 
  */
 
-#ifdef _WIN32
-  #include <windows.h>
-#else
-  #include <inttypes.h>
-#endif
+#include <gluegen_stdint.h>
 
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
 
-#include "jogamp_newt_opengl_broadcom_egl_Window.h"
+#include "jogamp_newt_driver_broadcom_egl_Window.h"
 
 #include "MouseEvent.h"
 #include "KeyEvent.h"
@@ -71,7 +67,7 @@ static jmethodID windowCreatedID = NULL;
  * Display
  */
 
-JNIEXPORT void JNICALL Java_jogamp_newt_opengl_broadcom_egl_Display_DispatchMessages
+JNIEXPORT void JNICALL Java_jogamp_newt_driver_broadcom_egl_Display_DispatchMessages
   (JNIEnv *env, jobject obj)
 {
     // FIXME: n/a
@@ -79,7 +75,7 @@ JNIEXPORT void JNICALL Java_jogamp_newt_opengl_broadcom_egl_Display_DispatchMess
     (void) obj;
 }
 
-JNIEXPORT jlong JNICALL Java_jogamp_newt_opengl_broadcom_egl_Display_CreateDisplay
+JNIEXPORT jlong JNICALL Java_jogamp_newt_driver_broadcom_egl_Display_CreateDisplay
   (JNIEnv *env, jobject obj, jint width, jint height)
 {
     (void) env;
@@ -93,7 +89,7 @@ JNIEXPORT jlong JNICALL Java_jogamp_newt_opengl_broadcom_egl_Display_CreateDispl
     return (jlong) (intptr_t) dpy;
 }
 
-JNIEXPORT void JNICALL Java_jogamp_newt_opengl_broadcom_egl_Display_DestroyDisplay
+JNIEXPORT void JNICALL Java_jogamp_newt_driver_broadcom_egl_Display_DestroyDisplay
   (JNIEnv *env, jobject obj, jlong display)
 {
     EGLDisplay dpy  = (EGLDisplay)(intptr_t)display;
@@ -110,7 +106,7 @@ JNIEXPORT void JNICALL Java_jogamp_newt_opengl_broadcom_egl_Display_DestroyDispl
  * Window
  */
 
-JNIEXPORT jboolean JNICALL Java_jogamp_newt_opengl_broadcom_egl_Window_initIDs
+JNIEXPORT jboolean JNICALL Java_jogamp_newt_driver_broadcom_egl_Window_initIDs
   (JNIEnv *env, jclass clazz)
 {
     windowCreatedID = (*env)->GetMethodID(env, clazz, "windowCreated", "(III)V");
@@ -122,7 +118,7 @@ JNIEXPORT jboolean JNICALL Java_jogamp_newt_opengl_broadcom_egl_Window_initIDs
     return JNI_TRUE;
 }
 
-JNIEXPORT jlong JNICALL Java_jogamp_newt_opengl_broadcom_egl_Window_CreateWindow
+JNIEXPORT jlong JNICALL Java_jogamp_newt_driver_broadcom_egl_Window_CreateWindow
   (JNIEnv *env, jobject obj, jlong display, jboolean chromaKey, jint width, jint height)
 {
     EGLDisplay dpy  = (EGLDisplay)(intptr_t)display;
@@ -166,7 +162,7 @@ JNIEXPORT jlong JNICALL Java_jogamp_newt_opengl_broadcom_egl_Window_CreateWindow
     return (jlong) (intptr_t) window;
 }
 
-JNIEXPORT void JNICALL Java_jogamp_newt_opengl_broadcom_egl_Window_CloseWindow
+JNIEXPORT void JNICALL Java_jogamp_newt_driver_broadcom_egl_Window_CloseWindow
   (JNIEnv *env, jobject obj, jlong display, jlong window)
 {
     EGLDisplay dpy  = (EGLDisplay) (intptr_t) display;
@@ -179,7 +175,7 @@ JNIEXPORT void JNICALL Java_jogamp_newt_opengl_broadcom_egl_Window_CloseWindow
     DBG_PRINT( "[CloseWindow] X\n");
 }
 
-JNIEXPORT void JNICALL Java_jogamp_newt_opengl_broadcom_egl_Window_SwapWindow
+JNIEXPORT void JNICALL Java_jogamp_newt_driver_broadcom_egl_Window_SwapWindow
   (JNIEnv *env, jobject obj, jlong display, jlong window)
 {
     EGLDisplay dpy  = (EGLDisplay) (intptr_t) display;
diff --git a/src/newt/native/IntelGDL.c b/src/newt/native/IntelGDL.c
index 953181c..690e112 100644
--- a/src/newt/native/IntelGDL.c
+++ b/src/newt/native/IntelGDL.c
@@ -31,15 +31,15 @@
  * 
  */
 
-#include <inttypes.h>
+#include <gluegen_stdint.h>
 
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
 
-#include "jogamp_newt_intel_gdl_Display.h"
-#include "jogamp_newt_intel_gdl_Screen.h"
-#include "jogamp_newt_intel_gdl_Window.h"
+#include "jogamp_newt_driver_intel_gdl_Display.h"
+#include "jogamp_newt_driver_intel_gdl_Screen.h"
+#include "jogamp_newt_driver_intel_gdl_Window.h"
 
 #include "MouseEvent.h"
 #include "KeyEvent.h"
@@ -122,7 +122,7 @@ static void JNI_ThrowNew(JNIEnv *env, const char *throwable, const char* message
  * Display
  */
 
-JNIEXPORT void JNICALL Java_jogamp_newt_intel_gdl_Display_DispatchMessages
+JNIEXPORT void JNICALL Java_jogamp_newt_driver_intel_gdl_Display_DispatchMessages
   (JNIEnv *env, jobject obj, jlong displayHandle, jobject focusedWindow)
 {
     // FIXME: n/a
@@ -137,7 +137,7 @@ JNIEXPORT void JNICALL Java_jogamp_newt_intel_gdl_Display_DispatchMessages
     } */
 }
 
-JNIEXPORT jlong JNICALL Java_jogamp_newt_intel_gdl_Display_CreateDisplay
+JNIEXPORT jlong JNICALL Java_jogamp_newt_driver_intel_gdl_Display_CreateDisplay
   (JNIEnv *env, jobject obj)
 {
     gdl_ret_t retval;
@@ -170,7 +170,7 @@ JNIEXPORT jlong JNICALL Java_jogamp_newt_intel_gdl_Display_CreateDisplay
     return (jlong) (intptr_t) p_driver_info;
 }
 
-JNIEXPORT void JNICALL Java_jogamp_newt_intel_gdl_Display_DestroyDisplay
+JNIEXPORT void JNICALL Java_jogamp_newt_driver_intel_gdl_Display_DestroyDisplay
   (JNIEnv *env, jobject obj, jlong displayHandle)
 {
     gdl_driver_info_t * p_driver_info = (gdl_driver_info_t *) (intptr_t) displayHandle;
@@ -189,7 +189,7 @@ JNIEXPORT void JNICALL Java_jogamp_newt_intel_gdl_Display_DestroyDisplay
  * Screen
  */
 
-JNIEXPORT jboolean JNICALL Java_jogamp_newt_intel_gdl_Screen_initIDs
+JNIEXPORT jboolean JNICALL Java_jogamp_newt_driver_intel_gdl_Screen_initIDs
   (JNIEnv *env, jclass clazz)
 {
     screenCreatedID = (*env)->GetMethodID(env, clazz, "screenCreated", "(II)V");
@@ -201,7 +201,7 @@ JNIEXPORT jboolean JNICALL Java_jogamp_newt_intel_gdl_Screen_initIDs
     return JNI_TRUE;
 }
 
-JNIEXPORT void JNICALL Java_jogamp_newt_intel_gdl_Screen_GetScreenInfo
+JNIEXPORT void JNICALL Java_jogamp_newt_driver_intel_gdl_Screen_GetScreenInfo
   (JNIEnv *env, jobject obj, jlong displayHandle, jint idx)
 {
     gdl_driver_info_t * p_driver_info = (gdl_driver_info_t *) (intptr_t) displayHandle;
@@ -233,7 +233,7 @@ JNIEXPORT void JNICALL Java_jogamp_newt_intel_gdl_Screen_GetScreenInfo
  * Window
  */
 
-JNIEXPORT jboolean JNICALL Java_jogamp_newt_intel_gdl_Window_initIDs
+JNIEXPORT jboolean JNICALL Java_jogamp_newt_driver_intel_gdl_Window_initIDs
   (JNIEnv *env, jclass clazz)
 {
     updateBoundsID = (*env)->GetMethodID(env, clazz, "updateBounds", "(IIII)V");
@@ -245,7 +245,7 @@ JNIEXPORT jboolean JNICALL Java_jogamp_newt_intel_gdl_Window_initIDs
     return JNI_TRUE;
 }
 
-JNIEXPORT jlong JNICALL Java_jogamp_newt_intel_gdl_Window_CreateSurface
+JNIEXPORT jlong JNICALL Java_jogamp_newt_driver_intel_gdl_Window_CreateSurface
   (JNIEnv *env, jobject obj, jlong displayHandle, jint scr_width, jint scr_height, jint x, jint y, jint width, jint height) {
 
     gdl_driver_info_t * p_driver_info = (gdl_driver_info_t *) (intptr_t) displayHandle;
@@ -338,7 +338,7 @@ JNIEXPORT jlong JNICALL Java_jogamp_newt_intel_gdl_Window_CreateSurface
     return (jlong) (intptr_t) plane;
 }
 
-JNIEXPORT void JNICALL Java_jogamp_newt_intel_gdl_Window_CloseSurface
+JNIEXPORT void JNICALL Java_jogamp_newt_driver_intel_gdl_Window_CloseSurface
   (JNIEnv *env, jobject obj, jlong display, jlong surface)
 {
     gdl_plane_id_t plane = (gdl_plane_id_t) (intptr_t) surface ;
@@ -347,7 +347,7 @@ JNIEXPORT void JNICALL Java_jogamp_newt_intel_gdl_Window_CloseSurface
     DBG_PRINT("[CloseSurface] plane %d\n", plane);
 }
 
-JNIEXPORT void JNICALL Java_jogamp_newt_intel_gdl_Window_SetBounds0
+JNIEXPORT void JNICALL Java_jogamp_newt_driver_intel_gdl_Window_SetBounds0
   (JNIEnv *env, jobject obj, jlong surface, jint scr_width, jint scr_height, jint x, jint y, jint width, jint height) {
 
     gdl_plane_id_t plane = (gdl_plane_id_t) (intptr_t) surface ;
diff --git a/src/newt/native/KDWindow.c b/src/newt/native/KDWindow.c
index be0488f..5f1affe 100644
--- a/src/newt/native/KDWindow.c
+++ b/src/newt/native/KDWindow.c
@@ -39,31 +39,11 @@
 #include <stdio.h>
 #include <string.h>
 
-#ifdef _WIN32
-    /* This typedef is apparently needed for Microsoft compilers before VC8,
-       and on Windows CE */
-    #if !defined(__MINGW64__) && ( defined(UNDER_CE) || _MSC_VER <= 1400 )
-        #ifdef _WIN64
-            typedef long long intptr_t;
-        #else
-            typedef int intptr_t;
-        #endif
-    #elif !defined(__MINGW64__) && _MSC_VER <= 1500
-        #ifdef _WIN64 // [
-            typedef __int64           intptr_t;
-        #else // _WIN64 ][
-            typedef int               intptr_t;
-        #endif // _WIN64 ]
-    #else
-        #include <inttypes.h>
-    #endif
-#else
-    #include <inttypes.h>
-#endif
+#include <gluegen_stdint.h>
 
 #include <KD/kd.h>
 
-#include "jogamp_newt_opengl_kd_KDWindow.h"
+#include "jogamp_newt_driver_kd_KDWindow.h"
 
 #include "MouseEvent.h"
 #include "KeyEvent.h"
@@ -101,7 +81,7 @@ static jmethodID sendKeyEventID = NULL;
  * Display
  */
 
-JNIEXPORT void JNICALL Java_jogamp_newt_opengl_kd_KDDisplay_DispatchMessages
+JNIEXPORT void JNICALL Java_jogamp_newt_driver_kd_KDDisplay_DispatchMessages
   (JNIEnv *env, jobject obj)
 {
     const KDEvent * evt;
@@ -147,7 +127,7 @@ JNIEXPORT void JNICALL Java_jogamp_newt_opengl_kd_KDDisplay_DispatchMessages
                                 KDint32 v[2];
                                 if(!kdGetWindowPropertyiv(kdWindow, KD_WINDOWPROPERTY_SIZE, v)) {
                                     DBG_PRINT( "event window size change : src: %p %dx%d\n", userData, v[0], v[1]);
-                                    (*env)->CallVoidMethod(env, javaWindow, sizeChangedID, (jint) v[0], (jint) v[1], JNI_FALSE);
+                                    (*env)->CallVoidMethod(env, javaWindow, sizeChangedID, JNI_FALSE, (jint) v[0], (jint) v[1], JNI_FALSE);
                                 } else {
                                     DBG_PRINT( "event window size change error: src: %p %dx%d\n", userData, v[0], v[1]);
                                 }
@@ -161,7 +141,7 @@ JNIEXPORT void JNICALL Java_jogamp_newt_opengl_kd_KDDisplay_DispatchMessages
                                 KDboolean visible;
                                 kdGetWindowPropertybv(kdWindow, KD_WINDOWPROPERTY_VISIBILITY, &visible);
                                 DBG_PRINT( "event window visibility: src: %p, v:%d\n", userData, visible);
-                                (*env)->CallVoidMethod(env, javaWindow, visibleChangedID, visible?JNI_TRUE:JNI_FALSE);
+                                (*env)->CallVoidMethod(env, javaWindow, visibleChangedID, JNI_FALSE, visible?JNI_TRUE:JNI_FALSE);
                             }
                             break;
                         default:
@@ -197,7 +177,7 @@ JNIEXPORT void JNICALL Java_jogamp_newt_opengl_kd_KDDisplay_DispatchMessages
  * Window
  */
 
-JNIEXPORT jboolean JNICALL Java_jogamp_newt_opengl_kd_KDWindow_initIDs
+JNIEXPORT jboolean JNICALL Java_jogamp_newt_driver_kd_KDWindow_initIDs
   (JNIEnv *env, jclass clazz)
 {
 #ifdef VERBOSE_ON
@@ -207,8 +187,8 @@ JNIEXPORT jboolean JNICALL Java_jogamp_newt_opengl_kd_KDWindow_initIDs
     #endif
 #endif
     windowCreatedID = (*env)->GetMethodID(env, clazz, "windowCreated", "(J)V");
-    sizeChangedID = (*env)->GetMethodID(env, clazz, "sizeChanged", "(IIZ)V");
-    visibleChangedID = (*env)->GetMethodID(env, clazz, "visibleChanged", "(Z)V");
+    sizeChangedID = (*env)->GetMethodID(env, clazz, "sizeChanged", "(ZIIZ)V");
+    visibleChangedID = (*env)->GetMethodID(env, clazz, "visibleChanged", "(ZZ)V");
     windowDestroyNotifyID = (*env)->GetMethodID(env, clazz, "windowDestroyNotify",    "()V");
     sendMouseEventID = (*env)->GetMethodID(env, clazz, "sendMouseEvent", "(IIIIII)V");
     sendKeyEventID = (*env)->GetMethodID(env, clazz, "sendKeyEvent", "(IIIC)V");
@@ -225,7 +205,7 @@ JNIEXPORT jboolean JNICALL Java_jogamp_newt_opengl_kd_KDWindow_initIDs
     return JNI_TRUE;
 }
 
-JNIEXPORT jlong JNICALL Java_jogamp_newt_opengl_kd_KDWindow_CreateWindow
+JNIEXPORT jlong JNICALL Java_jogamp_newt_driver_kd_KDWindow_CreateWindow
   (JNIEnv *env, jobject obj, jlong display, jintArray jAttrs)
 {
     jint * attrs = NULL;
@@ -267,7 +247,7 @@ JNIEXPORT jlong JNICALL Java_jogamp_newt_opengl_kd_KDWindow_CreateWindow
     return (jlong) (intptr_t) window;
 }
 
-JNIEXPORT jlong JNICALL Java_jogamp_newt_opengl_kd_KDWindow_RealizeWindow
+JNIEXPORT jlong JNICALL Java_jogamp_newt_driver_kd_KDWindow_RealizeWindow
   (JNIEnv *env, jobject obj, jlong window)
 {
     KDWindow *w = (KDWindow*) (intptr_t) window;
@@ -282,7 +262,7 @@ JNIEXPORT jlong JNICALL Java_jogamp_newt_opengl_kd_KDWindow_RealizeWindow
     return (jlong) (intptr_t) nativeWindow;
 }
 
-JNIEXPORT jint JNICALL Java_jogamp_newt_opengl_kd_KDWindow_CloseWindow
+JNIEXPORT jint JNICALL Java_jogamp_newt_driver_kd_KDWindow_CloseWindow
   (JNIEnv *env, jobject obj, jlong window, jlong juserData)
 {
     KDWindow *w = (KDWindow*) (intptr_t) window;
@@ -296,21 +276,21 @@ JNIEXPORT jint JNICALL Java_jogamp_newt_opengl_kd_KDWindow_CloseWindow
 }
 
 /*
- * Class:     jogamp_newt_opengl_kd_KDWindow
+ * Class:     jogamp_newt_driver_kd_KDWindow
  * Method:    setVisible0
  * Signature: (JJZ)V
  */
-JNIEXPORT void JNICALL Java_jogamp_newt_opengl_kd_KDWindow_setVisible0
+JNIEXPORT void JNICALL Java_jogamp_newt_driver_kd_KDWindow_setVisible0
   (JNIEnv *env, jobject obj, jlong window, jboolean visible)
 {
     KDWindow *w = (KDWindow*) (intptr_t) window;
     KDboolean v = (visible==JNI_TRUE)?KD_TRUE:KD_FALSE;
     kdSetWindowPropertybv(w, KD_WINDOWPROPERTY_VISIBILITY, &v);
     DBG_PRINT( "[setVisible] v=%d\n", visible);
-    (*env)->CallVoidMethod(env, obj, visibleChangedID, visible); // FIXME: or send via event ?
+    (*env)->CallVoidMethod(env, obj, visibleChangedID, JNI_FALSE, visible); // FIXME: or defer=true ?
 }
 
-JNIEXPORT void JNICALL Java_jogamp_newt_opengl_kd_KDWindow_setFullScreen0
+JNIEXPORT void JNICALL Java_jogamp_newt_driver_kd_KDWindow_setFullScreen0
   (JNIEnv *env, jobject obj, jlong window, jboolean fullscreen)
 {
 /** not supported, due to missing NV property ..
@@ -327,7 +307,7 @@ JNIEXPORT void JNICALL Java_jogamp_newt_opengl_kd_KDWindow_setFullScreen0
     (void)fullscreen;
 }
 
-JNIEXPORT void JNICALL Java_jogamp_newt_opengl_kd_KDWindow_setSize0
+JNIEXPORT void JNICALL Java_jogamp_newt_driver_kd_KDWindow_setSize0
   (JNIEnv *env, jobject obj, jlong window, jint width, jint height)
 {
     KDWindow *w = (KDWindow*) (intptr_t) window;
@@ -337,6 +317,6 @@ JNIEXPORT void JNICALL Java_jogamp_newt_opengl_kd_KDWindow_setSize0
     DBG_PRINT( "[setSize] v=%dx%d, res=%d\n", width, height, res);
     (void)res;
 
-    (*env)->CallVoidMethod(env, obj, sizeChangedID, (jint) width, (jint) height, JNI_FALSE);
+    (*env)->CallVoidMethod(env, obj, sizeChangedID, JNI_FALSE, (jint) width, (jint) height, JNI_FALSE);
 }
 
diff --git a/src/newt/native/MacWindow.m b/src/newt/native/MacWindow.m
index 3b708ac..335a1fd 100644
--- a/src/newt/native/MacWindow.m
+++ b/src/newt/native/MacWindow.m
@@ -33,7 +33,7 @@
 
 #import <inttypes.h>
 
-#import "jogamp_newt_macosx_MacWindow.h"
+#import "jogamp_newt_driver_macosx_MacWindow.h"
 #import "NewtMacWindow.h"
 
 #import "MouseEvent.h"
@@ -43,7 +43,7 @@
 
 #import <stdio.h>
 
-NSString* jstringToNSString(JNIEnv* env, jstring jstr)
+static NSString* jstringToNSString(JNIEnv* env, jstring jstr)
 {
     const jchar* jstrChars = (*env)->GetStringChars(env, jstr, NULL);
     NSString* str = [[NSString alloc] initWithCharacters: jstrChars length: (*env)->GetStringLength(env, jstr)];
@@ -51,45 +51,23 @@ NSString* jstringToNSString(JNIEnv* env, jstring jstr)
     return str;
 }
 
-void setFrameTopLeftPoint(NSWindow* pwin, NSWindow* win, jint x, jint y)
-{
+static void setFrameTopLeftPoint(NSWindow* pWin, NSWindow* mWin, jint x, jint y) {
     NSScreen* screen = [NSScreen mainScreen];
+    NSRect screenRect = [screen frame];
 
-    // this allows for better compatibility with awt behavior
-    NSRect visibleRect; // either screen or parent-window 
-    NSPoint pt;
-    int d_pty=0; // parent titlebar height
-    int d_ptx=0; 
-    
-    if(NULL==pwin) {
-        visibleRect = [screen frame];
-    } else {
-        visibleRect = [pwin frame];
-        NSView* pview = [pwin contentView];
-        NSRect viewRect = [pview frame];
-        d_pty = visibleRect.size.height - viewRect.size.height;
-        (void) d_ptx;
-        //d_pty = visibleRect.origin.y - viewRect.size.height;
-        //d_ptx = visibleRect.size.height - viewRect.size.height;
-        fprintf(stderr, "pwin %lf/%lf %lfx%lf, pview %lf/%lf %lfx%lf -> %d/%d\n", 
-            visibleRect.origin.x,
-            visibleRect.origin.y,
-            visibleRect.size.width,
-            visibleRect.size.height, 
-            viewRect.origin.x,
-            viewRect.origin.y,
-            viewRect.size.width,
-            viewRect.size.height, 
-            (int)x, (int)y);
+    DBG_PRINT( "setFrameTopLeftPoint screen %lf/%lf %lfx%lf\n", 
+        screenRect.origin.x,
+        screenRect.origin.y,
+        screenRect.size.width,
+        screenRect.size.height);
 
-    }
+    NSPoint pt = NSMakePoint(screenRect.origin.x + x, screenRect.origin.y + screenRect.size.height - y);
 
-    pt = NSMakePoint(visibleRect.origin.x + x, visibleRect.origin.y + visibleRect.size.height - y - d_pty);
-
-    [win setFrameTopLeftPoint: pt];
+    DBG_PRINT( "setFrameTopLeftPoint -> %lf/%lf\n", pt.x, pt.y);
+    [mWin setFrameTopLeftPoint: pt];
 }
 
-static NewtView * changeContentView(JNIEnv *env, jobject javaWindowObject, NSWindow *pwin, NSWindow *win, NewtView *newView) {
+static NewtView * changeContentView(JNIEnv *env, jobject javaWindowObject, NSWindow *pwin, NSView *pview, NSWindow *win, NewtView *newView) {
     NSView* oldNSView = [win contentView];
     NewtView* oldView = NULL;
 
@@ -107,6 +85,7 @@ NS_ENDHANDLER
             jobject globJavaWindowObject = [oldView getJavaWindowObject];
             (*env)->DeleteGlobalRef(env, globJavaWindowObject);
             [oldView setJavaWindowObject: NULL];
+            [oldView setDestroyNotifySent: false];
         }
         /** FIXME: Tried child window: auto clip or message reception ..
         if(NULL!=pwin) {
@@ -116,12 +95,23 @@ NS_ENDHANDLER
     if(NULL!=newView) {
         jobject globJavaWindowObject = (*env)->NewGlobalRef(env, javaWindowObject);
         [newView setJavaWindowObject: globJavaWindowObject];
-        [newView setJNIEnv: env];
+        [newView setDestroyNotifySent: false];
+        {
+            JavaVM *jvmHandle = NULL;
+            int jvmVersion = 0;
+
+            if(0 != (*env)->GetJavaVM(env, &jvmHandle)) {
+                jvmHandle = NULL;
+            } else {
+                jvmVersion = (*env)->GetVersion(env);
+            }
+            [newView setJVMHandle: jvmHandle];
+            [newView setJVMVersion: jvmVersion];
+        }
 
         /** FIXME: Tried child window: auto clip or message reception ..
         if(NULL!=pwin) {
-            NSView* pview = [pwin contentView];
-            [pview addSubview: newView];
+            [pview addSubview: newView positioned: NSWindowAbove relativeTo: nil];
         } */
     }
     [win setContentView: newView];
@@ -134,11 +124,11 @@ NS_ENDHANDLER
 }
 
 /*
- * Class:     jogamp_newt_macosx_MacDisplay
+ * Class:     jogamp_newt_driver_macosx_MacDisplay
  * Method:    initIDs
  * Signature: ()Z
  */
-JNIEXPORT jboolean JNICALL Java_jogamp_newt_macosx_MacDisplay_initNSApplication0
+JNIEXPORT jboolean JNICALL Java_jogamp_newt_driver_macosx_MacDisplay_initNSApplication0
   (JNIEnv *env, jclass clazz)
 {
     static int initialized = 0;
@@ -168,49 +158,28 @@ JNIEXPORT jboolean JNICALL Java_jogamp_newt_macosx_MacDisplay_initNSApplication0
 }
 
 /*
- * Class:     jogamp_newt_macosx_MacDisplay
- * Method:    dispatchMessages0
+ * Class:     jogamp_newt_driver_macosx_MacDisplay
+ * Method:    runNSApplication0
  * Signature: ()V
  */
-JNIEXPORT void JNICALL Java_jogamp_newt_macosx_MacDisplay_dispatchMessages0
-  (JNIEnv *env, jobject unused)
+JNIEXPORT void JNICALL Java_jogamp_newt_driver_macosx_MacDisplay_runNSApplication0
+  (JNIEnv *env, jclass clazz)
 {
-    NSEvent* event = NULL;
-    NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
-
-NS_DURING
-
-    int num_events = 0;
+    // NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
+    DBG_PRINT( "\nrunNSApplication0.0\n");
 
-    // Periodically take a break
-    do {
-        // FIXME: ignoring event mask for the time being
-        event = [NSApp nextEventMatchingMask: NSAnyEventMask
-                       untilDate: [NSDate distantPast]
-                       inMode: NSDefaultRunLoopMode
-                       dequeue: YES];
-        if (event != NULL) {
-            [NSApp sendEvent: event];
+    [NSApp run];
 
-            num_events++;
-        }
-    } while (num_events<100 && event != NULL);
-
-NS_HANDLER
-    
-    // just ignore it ..
-
-NS_ENDHANDLER
-
-    [pool release];
+    DBG_PRINT( "\nrunNSApplication0.X\n");
+    // [pool release];
 }
 
 /*
- * Class:     jogamp_newt_macosx_MacScreen
+ * Class:     jogamp_newt_driver_macosx_MacScreen
  * Method:    getWidthImpl
  * Signature: (I)I
  */
-JNIEXPORT jint JNICALL Java_jogamp_newt_macosx_MacScreen_getWidthImpl0
+JNIEXPORT jint JNICALL Java_jogamp_newt_driver_macosx_MacScreen_getWidthImpl0
   (JNIEnv *env, jclass clazz, jint screen_idx)
 {
     NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
@@ -227,11 +196,11 @@ JNIEXPORT jint JNICALL Java_jogamp_newt_macosx_MacScreen_getWidthImpl0
 }
 
 /*
- * Class:     jogamp_newt_macosx_MacScreen
+ * Class:     jogamp_newt_driver_macosx_MacScreen
  * Method:    getHeightImpl
  * Signature: (I)I
  */
-JNIEXPORT jint JNICALL Java_jogamp_newt_macosx_MacScreen_getHeightImpl0
+JNIEXPORT jint JNICALL Java_jogamp_newt_driver_macosx_MacScreen_getHeightImpl0
   (JNIEnv *env, jclass clazz, jint screen_idx)
 {
     NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
@@ -248,11 +217,11 @@ JNIEXPORT jint JNICALL Java_jogamp_newt_macosx_MacScreen_getHeightImpl0
 }
 
 /*
- * Class:     jogamp_newt_macosx_MacWindow
+ * Class:     jogamp_newt_driver_macosx_MacWindow
  * Method:    initIDs
  * Signature: ()Z
  */
-JNIEXPORT jboolean JNICALL Java_jogamp_newt_macosx_MacWindow_initIDs0
+JNIEXPORT jboolean JNICALL Java_jogamp_newt_driver_macosx_MacWindow_initIDs0
   (JNIEnv *env, jclass clazz)
 {
     static int initialized = 0;
@@ -269,145 +238,180 @@ JNIEXPORT jboolean JNICALL Java_jogamp_newt_macosx_MacWindow_initIDs0
 }
 
 /*
- * Class:     jogamp_newt_macosx_MacWindow
+ * Class:     jogamp_newt_driver_macosx_MacWindow
  * Method:    createWindow0
  * Signature: (JIIIIZIIIJ)J
  */
-JNIEXPORT jlong JNICALL Java_jogamp_newt_macosx_MacWindow_createWindow0
-  (JNIEnv *env, jobject jthis, jlong parent, jint x, jint y, jint w, jint h, jboolean fullscreen, jint styleMask, 
+JNIEXPORT jlong JNICALL Java_jogamp_newt_driver_macosx_MacWindow_createWindow0
+  (JNIEnv *env, jobject jthis, jlong parent, jint x, jint y, jint w, jint h, jboolean opaque, jboolean fullscreen, jint styleMask, 
    jint bufferingType, jint screen_idx, jlong jview)
 {
     NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
-    NSRect rect = NSMakeRect(x, y, w, h);
+    NewtView* myView = (NewtView*) (intptr_t) jview ;
+
+    DBG_PRINT( "createWindow0 - %p (this), %p (parent), %d/%d %dx%d, opaque %d, fs %d, style %X, buffType %X, screenidx %d, view %p (START)\n",
+        (void*)(intptr_t)jthis, (void*)(intptr_t)parent, (int)x, (int)y, (int)w, (int)h, (int) opaque, (int)fullscreen, 
+        (int)styleMask, (int)bufferingType, (int)screen_idx, myView);
 
     NSArray *screens = [NSScreen screens];
     if(screen_idx<0) screen_idx=0;
     if(screen_idx>=[screens count]) screen_idx=0;
-    NSScreen *screen = (NSScreen *) [screens objectAtIndex: screen_idx];
+    NSScreen *myScreen = (NSScreen *) [screens objectAtIndex: screen_idx];
+    NSRect rect;
 
     if (fullscreen) {
         styleMask = NSBorderlessWindowMask;
-        NSRect rect = [screen frame];
+        rect = [myScreen frame];
+        x = 0;
+        y = 0;
         w = (jint) (rect.size.width);
         h = (jint) (rect.size.height);
+    } else {
+        rect = NSMakeRect(x, y, w, h);
     }
 
     // Allocate the window
-    NSWindow* window = [[[NewtMacWindow alloc] initWithContentRect: rect
+    NSWindow* myWindow = [[[NewtMacWindow alloc] initWithContentRect: rect
                                                styleMask: (NSUInteger) styleMask
                                                backing: (NSBackingStoreType) bufferingType
-                                               screen: screen] retain];
+                                               screen: myScreen] retain];
 
     NSObject *nsParentObj = (NSObject*) ((intptr_t) parent);
     NSWindow* parentWindow = NULL;
+    NSView* parentView = NULL;
     if( nsParentObj != NULL && [nsParentObj isKindOfClass:[NSWindow class]] ) {
         parentWindow = (NSWindow*) nsParentObj;
+        parentView = [parentWindow contentView];
+        DBG_PRINT( "createWindow0 - Parent is NSWindow : %p (view) -> %p (win) \n", parentView, parentWindow);
     } else if( nsParentObj != NULL && [nsParentObj isKindOfClass:[NSView class]] ) {
-        NSView* view = (NSView*) nsParentObj;
-        parentWindow = [view window];
-        fprintf(stderr, "createWindow0 - Parent is NSView : %p -> %p (win) \n", nsParentObj, parentWindow);
+        parentView = (NSView*) nsParentObj;
+        parentWindow = [parentView window];
+        DBG_PRINT( "createWindow0 - Parent is NSView : %p -(view) > %p (win) \n", parentView, parentWindow);
     } else {
-        fprintf(stderr, "createWindow0 - Parent is neither NSWindow nor NSView : %p\n", nsParentObj);
+        DBG_PRINT( "createWindow0 - Parent is neither NSWindow nor NSView : %p\n", nsParentObj);
     }
     if(NULL!=parentWindow) {
-        [parentWindow addChildWindow: window ordered: NSWindowAbove];
-        [window setParentWindow: parentWindow];
+        [parentWindow addChildWindow: myWindow ordered: NSWindowAbove];
+        [myWindow setParentWindow: parentWindow];
     }
 
-    if (fullscreen) {
-        [window setOpaque: YES];
+    if(opaque) {
+        [myWindow setOpaque: YES];
     } else {
-        // If the window is undecorated, assume we want the possibility of
-        // a shaped window, so make it non-opaque and the background color clear
-        if ((styleMask & NSTitledWindowMask) == 0) {
-            [window setOpaque: NO];
-            [window setBackgroundColor: [NSColor clearColor]];
-        }
+        [myWindow setOpaque: NO];
+        [myWindow setBackgroundColor: [NSColor clearColor]];
     }
 
-    // Immediately re-position the window based on an upper-left coordinate system
-    setFrameTopLeftPoint(parentWindow, window, x, y);
-
     // specify we want mouse-moved events
-    [window setAcceptsMouseMovedEvents:YES];
+    [myWindow setAcceptsMouseMovedEvents:YES];
 
     // Use given NewtView or allocate an NewtView if NULL
-    NewtView* view = (0==jview)? [[NewtView alloc] initWithFrame: rect] : (NewtView*) ((intptr_t) jview) ;
+    if(NULL == myView) {
+        myView = [[NewtView alloc] initWithFrame: rect] ;
+        DBG_PRINT( "createWindow0 - new own view: %p\n", myView);
+    }
 
     // Set the content view
-    (void) changeContentView(env, jthis, parentWindow, window, view);
+    (void) changeContentView(env, jthis, parentWindow, parentView, myWindow, myView);
+
+    // Immediately re-position the window based on an upper-left coordinate system
+    setFrameTopLeftPoint(parentWindow, myWindow, x, y);
 
 NS_DURING
     // Available >= 10.5 - Makes the menubar disapear
     if(fullscreen) {
-         [view enterFullScreenMode: screen withOptions:NULL];
+         [myView enterFullScreenMode: myScreen withOptions:NULL];
     }
 NS_HANDLER
 NS_ENDHANDLER
 
     // Set the next responder to be the window so that we can forward
     // right mouse button down events
-    [view setNextResponder: window];
+    [myView setNextResponder: myWindow];
+
+    DBG_PRINT( "createWindow0 - %p (this), %p (parent): new window: %p (END)\n",
+        (void*)(intptr_t)jthis, (void*)(intptr_t)parent, myWindow);
 
     [pool release];
 
-    return (jlong) ((intptr_t) window);
+    return (jlong) ((intptr_t) myWindow);
 }
 
 /*
- * Class:     jogamp_newt_macosx_MacWindow
+ * Class:     jogamp_newt_driver_macosx_MacWindow
  * Method:    makeKeyAndOrderFront
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_jogamp_newt_macosx_MacWindow_makeKeyAndOrderFront0
+JNIEXPORT void JNICALL Java_jogamp_newt_driver_macosx_MacWindow_makeKeyAndOrderFront0
   (JNIEnv *env, jobject unused, jlong window)
 {
     NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
     NSWindow* win = (NSWindow*) ((intptr_t) window);
+
+    DBG_PRINT( "makeKeyAndOrderFront0 - window: %p (START)\n", win);
+
+    // [win performSelectorOnMainThread:@selector(makeKeyAndOrderFront:) withObject:win waitUntilDone:NO];
     [win makeKeyAndOrderFront: win];
+
+    DBG_PRINT( "makeKeyAndOrderFront0 - window: %p (END)\n", win);
+
     [pool release];
 }
 
 /*
- * Class:     jogamp_newt_macosx_MacWindow
+ * Class:     jogamp_newt_driver_macosx_MacWindow
  * Method:    makeKey
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_jogamp_newt_macosx_MacWindow_makeKey0
+JNIEXPORT void JNICALL Java_jogamp_newt_driver_macosx_MacWindow_makeKey0
   (JNIEnv *env, jobject unused, jlong window)
 {
     NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
     NSWindow* win = (NSWindow*) ((intptr_t) window);
+
+    DBG_PRINT( "makeKey0 - window: %p (START)\n", win);
+
+    // [win performSelectorOnMainThread:@selector(makeKeyWindow:) withObject:nil waitUntilDone:NO];
     [win makeKeyWindow];
+
+    DBG_PRINT( "makeKey0 - window: %p (END)\n", win);
+
     [pool release];
 }
 
 /*
- * Class:     jogamp_newt_macosx_MacWindow
+ * Class:     jogamp_newt_driver_macosx_MacWindow
  * Method:    orderOut
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_jogamp_newt_macosx_MacWindow_orderOut0
+JNIEXPORT void JNICALL Java_jogamp_newt_driver_macosx_MacWindow_orderOut0
   (JNIEnv *env, jobject unused, jlong window)
 {
     NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
     NSWindow* win = (NSWindow*) ((intptr_t) window);
+
+    DBG_PRINT( "orderOut0 - window: %p (START)\n", win);
+
+    // [win performSelectorOnMainThread:@selector(orderOut:) withObject:win waitUntilDone:NO];
     [win orderOut: win];
+
+    DBG_PRINT( "orderOut0 - window: %p (END)\n", win);
+
     [pool release];
 }
 
 /*
- * Class:     jogamp_newt_macosx_MacWindow
+ * Class:     jogamp_newt_driver_macosx_MacWindow
  * Method:    close0
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_jogamp_newt_macosx_MacWindow_close0
+JNIEXPORT void JNICALL Java_jogamp_newt_driver_macosx_MacWindow_close0
   (JNIEnv *env, jobject unused, jlong window)
 {
     NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
     NSWindow* win = (NSWindow*) ((intptr_t) window);
     NSView* view = [win contentView];
-    [win orderOut: win];
+    DBG_PRINT( "*************** windowClose.0: 0x%p\n", (void *)win);
 NS_DURING
     if(NULL!=view) {
         // Available >= 10.5 - Makes the menubar disapear
@@ -417,55 +421,90 @@ NS_DURING
     }
 NS_HANDLER
 NS_ENDHANDLER
-    [win close];
+    DBG_PRINT( "*************** windowClose.2: 0x%p\n", (void *)win);
+
+    [win performSelectorOnMainThread:@selector(close:) withObject:nil waitUntilDone:NO];
+    // [win close]
+
+    DBG_PRINT( "*************** windowClose.X: 0x%p\n", (void *)win);
     [pool release];
 }
 
 /*
- * Class:     jogamp_newt_macosx_MacWindow
+ * Class:     jogamp_newt_driver_macosx_MacWindow
  * Method:    setTitle0
  * Signature: (JLjava/lang/String;)V
  */
-JNIEXPORT void JNICALL Java_jogamp_newt_macosx_MacWindow_setTitle0
+JNIEXPORT void JNICALL Java_jogamp_newt_driver_macosx_MacWindow_setTitle0
   (JNIEnv *env, jobject unused, jlong window, jstring title)
 {
     NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
     NSWindow* win = (NSWindow*) ((intptr_t) window);
+
+    DBG_PRINT( "setTitle0 - window: %p (START)\n", win);
+
     NSString* str = jstringToNSString(env, title);
     [str autorelease];
-    [win setTitle: str];
+    [win performSelectorOnMainThread:@selector(setTitle:) withObject:str waitUntilDone:NO];
+    // [win setTitle: str];
+
+    DBG_PRINT( "setTitle0 - window: %p (END)\n", win);
+
     [pool release];
 }
 
 /*
- * Class:     jogamp_newt_macosx_MacWindow
+ * Class:     jogamp_newt_driver_macosx_MacWindow
  * Method:    contentView
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_jogamp_newt_macosx_MacWindow_contentView0
+JNIEXPORT jlong JNICALL Java_jogamp_newt_driver_macosx_MacWindow_contentView0
   (JNIEnv *env, jobject 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:     jogamp_newt_macosx_MacWindow
+ * Class:     jogamp_newt_driver_macosx_MacWindow
  * Method:    changeContentView
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_jogamp_newt_macosx_MacWindow_changeContentView0
-  (JNIEnv *env, jobject jthis, jlong parent, jlong window, jlong jview)
+JNIEXPORT jlong JNICALL Java_jogamp_newt_driver_macosx_MacWindow_changeContentView0
+  (JNIEnv *env, jobject jthis, jlong parentWindowOrView, jlong window, jlong jview)
 {
     NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
-    NSWindow* pwin = (NewtMacWindow*) ((intptr_t) parent);
+
     NSWindow* win = (NewtMacWindow*) ((intptr_t) window);
     NewtView* newView = (NewtView *) ((intptr_t) jview);
 
-    NewtView* oldView = changeContentView(env, jthis, pwin, win, newView);
+    DBG_PRINT( "changeContentView0 - window: %p (START)\n", win);
+
+    NSObject *nsParentObj = (NSObject*) ((intptr_t) parentWindowOrView);
+    NSWindow* pWin = NULL;
+    NSView* pView = NULL;
+    if( NULL != nsParentObj ) {
+        if( [nsParentObj isKindOfClass:[NSWindow class]] ) {
+            pWin = (NSWindow*) nsParentObj;
+            pView = [pWin contentView];
+        } else if( [nsParentObj isKindOfClass:[NSView class]] ) {
+            pView = (NSView*) nsParentObj;
+            pWin = [pView window];
+        }
+    }
+
+    NewtView* oldView = changeContentView(env, jthis, pWin, pView, win, newView);
+
+    DBG_PRINT( "changeContentView0 - window: %p (END)\n", win);
 
     [pool release];
 
@@ -473,32 +512,68 @@ JNIEXPORT jlong JNICALL Java_jogamp_newt_macosx_MacWindow_changeContentView0
 }
 
 /*
- * Class:     jogamp_newt_macosx_MacWindow
+ * Class:     jogamp_newt_driver_macosx_MacWindow
  * Method:    setContentSize
  * Signature: (JII)V
  */
-JNIEXPORT void JNICALL Java_jogamp_newt_macosx_MacWindow_setContentSize0
+JNIEXPORT void JNICALL Java_jogamp_newt_driver_macosx_MacWindow_setContentSize0
   (JNIEnv *env, jobject unused, jlong window, jint w, jint h)
 {
     NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
     NSWindow* win = (NSWindow*) ((intptr_t) window);
+
+    DBG_PRINT( "setContentSize0 - window: %p (START)\n", win);
+
     NSSize sz = NSMakeSize(w, h);
     [win setContentSize: sz];
+
+    DBG_PRINT( "setContentSize0 - window: %p (END)\n", win);
+
     [pool release];
 }
 
 /*
- * Class:     jogamp_newt_macosx_MacWindow
+ * Class:     jogamp_newt_driver_macosx_MacWindow
  * Method:    setFrameTopLeftPoint
- * Signature: (JII)V
+ * Signature: (JJII)V
  */
-JNIEXPORT void JNICALL Java_jogamp_newt_macosx_MacWindow_setFrameTopLeftPoint0
+JNIEXPORT void JNICALL Java_jogamp_newt_driver_macosx_MacWindow_setFrameTopLeftPoint0
   (JNIEnv *env, jobject unused, jlong parent, jlong window, jint x, jint y)
 {
     NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
     NSWindow* pwin = (NSWindow*) ((intptr_t) parent);
     NSWindow* win = (NSWindow*) ((intptr_t) window);
+
+    DBG_PRINT( "setFrameTopLeftPoint0 - window: %p (START)\n", win);
+
     setFrameTopLeftPoint(pwin, win, x, y);
+
+    DBG_PRINT( "setFrameTopLeftPoint0 - window: %p (END)\n", win);
+
+    [pool release];
+}
+
+/*
+ * Class:     jogamp_newt_driver_macosx_MacWindow
+ * Method:    setAlwaysOnTop0
+ * Signature: (JZ)V
+ */
+JNIEXPORT void JNICALL Java_jogamp_newt_driver_macosx_MacWindow_setAlwaysOnTop0
+  (JNIEnv *env, jobject unused, jlong window, jboolean atop)
+{
+    NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
+    NSWindow* win = (NSWindow*) ((intptr_t) window);
+
+    DBG_PRINT( "setAlwaysOnTop0 - window: %p (START)\n", win);
+
+    if(atop) {
+        [win setLevel:NSFloatingWindowLevel];
+    } else {
+        [win setLevel:NSNormalWindowLevel];
+    }
+
+    DBG_PRINT( "setAlwaysOnTop0 - window: %p (END)\n", win);
+
     [pool release];
 }
 
diff --git a/src/newt/native/NewtCommon.c b/src/newt/native/NewtCommon.c
index 0e3f992..3713cfd 100644
--- a/src/newt/native/NewtCommon.c
+++ b/src/newt/native/NewtCommon.c
@@ -33,12 +33,12 @@ void NewtCommon_init(JNIEnv *env) {
     if(NULL==runtimeExceptionClz) {
         jclass c = (*env)->FindClass(env, ClazzNameRuntimeException);
         if(NULL==c) {
-            NewtCommon_FatalError(env, "NEWT X11Window: can't find %s", ClazzNameRuntimeException);
+            NewtCommon_FatalError(env, "NEWT: can't find %s", ClazzNameRuntimeException);
         }
         runtimeExceptionClz = (jclass)(*env)->NewGlobalRef(env, c);
         (*env)->DeleteLocalRef(env, c);
         if(NULL==runtimeExceptionClz) {
-            NewtCommon_FatalError(env, "NEWT X11Window: can't use %s", ClazzNameRuntimeException);
+            NewtCommon_FatalError(env, "NEWT: can't use %s", ClazzNameRuntimeException);
         }
     }
 }
@@ -53,3 +53,30 @@ jchar* NewtCommon_GetNullTerminatedStringChars(JNIEnv* env, jstring str)
     return strChars;
 }
 
+JNIEnv* NewtCommon_GetJNIEnv(JavaVM * jvmHandle, int jvmVersion, int * shallBeDetached) {
+    JNIEnv* curEnv = NULL;
+    JNIEnv* newEnv = NULL;
+    int envRes;
+
+    // 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, "JNIEnv: can't attach thread: %d\n", envRes);
+            return NULL;
+        }
+        curEnv = newEnv;
+    } else if( JNI_OK != envRes ) {
+        // oops ..
+        fprintf(stderr, "can't GetEnv: %d\n", envRes);
+        return NULL;
+    }
+    if (curEnv==NULL) {
+        fprintf(stderr, "env is NULL\n");
+        return NULL;
+    }
+    *shallBeDetached = NULL != newEnv;
+    return curEnv;
+}
+
diff --git a/src/newt/native/NewtCommon.h b/src/newt/native/NewtCommon.h
index f5835f7..91fceb3 100644
--- a/src/newt/native/NewtCommon.h
+++ b/src/newt/native/NewtCommon.h
@@ -12,4 +12,6 @@ jchar* NewtCommon_GetNullTerminatedStringChars(JNIEnv* env, jstring str);
 void NewtCommon_FatalError(JNIEnv *env, const char* msg, ...);
 void NewtCommon_throwNewRuntimeException(JNIEnv *env, const char* msg, ...);
 
+JNIEnv* NewtCommon_GetJNIEnv (JavaVM * jvmHandle, int jvmVersion, int * shallBeDetached);
+
 #endif
diff --git a/src/newt/native/NewtMacWindow.h b/src/newt/native/NewtMacWindow.h
index 7f0cd60..5c465d4 100644
--- a/src/newt/native/NewtMacWindow.h
+++ b/src/newt/native/NewtMacWindow.h
@@ -34,23 +34,41 @@
 #import <AppKit/AppKit.h>
 #import "jni.h"
 
+#include "NewtCommon.h"
+
+#define VERBOSE_ON 1
+
+#ifdef VERBOSE_ON
+    #define DBG_PRINT(...) fprintf(stderr, __VA_ARGS__); fflush(stderr) 
+#else
+    #define DBG_PRINT(...)
+#endif
+
 @interface NewtView : NSView
 {
     jobject javaWindowObject;
 
     // This is set while messages are being dispatched and cleared afterward
-    JNIEnv* env;
+    JavaVM *jvmHandle;
+    int jvmVersion;
+
+    BOOL destroyNotifySent;
 }
 
 /* Set during event dispatching cycle */
-- (void) setJNIEnv: (JNIEnv*) env;
-- (JNIEnv*) getJNIEnv;
+- (void) setJVMHandle: (JavaVM*) vm;
+- (JavaVM*) getJVMHandle;
+- (void) setJVMVersion: (int) ver;
+- (int) getJVMVersion;
 
 /* Register or deregister (NULL) the java Window object, 
    ie, if NULL, no events are send */
 - (void) setJavaWindowObject: (jobject) javaWindowObj;
 - (jobject) getJavaWindowObject;
 
+- (void) setDestroyNotifySent: (BOOL) v;
+- (BOOL) getDestroyNotifySent;
+
 - (void) rightMouseDown: (NSEvent*) theEvent;
 
 @end
diff --git a/src/newt/native/NewtMacWindow.m b/src/newt/native/NewtMacWindow.m
index cba6949..eb1426d 100644
--- a/src/newt/native/NewtMacWindow.m
+++ b/src/newt/native/NewtMacWindow.m
@@ -72,8 +72,10 @@ jint GetDeltaY(NSEvent *event, jint javaMods) {
     return 0;
 }
 
-static jmethodID sendMouseEventID  = NULL;
-static jmethodID sendKeyEventID    = NULL;
+static jmethodID enqueueMouseEventID = NULL;
+static jmethodID enqueueKeyEventID = NULL;
+static jmethodID enqueueRequestFocusID = NULL;
+
 static jmethodID insetsChangedID   = NULL;
 static jmethodID sizeChangedID     = NULL;
 static jmethodID visibleChangedID = NULL;
@@ -82,13 +84,24 @@ static jmethodID focusChangedID    = NULL;
 static jmethodID windowDestroyNotifyID = NULL;
 
 @implementation NewtView
-- (void) setJNIEnv: (JNIEnv*) theEnv
+
+- (void) setJVMHandle: (JavaVM*) vm
 {
-    env = theEnv;
+    jvmHandle = vm;
 }
-- (JNIEnv*) getJNIEnv
+- (JavaVM*) getJVMHandle
+{
+    return jvmHandle;
+}
+
+- (void) setJVMVersion: (int) ver
 {
-    return env;
+    jvmVersion = ver;
+}
+
+- (int) getJVMVersion
+{
+    return jvmVersion;
 }
 
 - (void) setJavaWindowObject: (jobject) javaWindowObj
@@ -101,6 +114,16 @@ static jmethodID windowDestroyNotifyID = NULL;
     return javaWindowObject;
 }
 
+- (void) setDestroyNotifySent: (BOOL) v
+{
+    destroyNotifySent = v;
+}
+
+- (BOOL) getDestroyNotifySent
+{
+    return destroyNotifySent;
+}
+
 - (void) rightMouseDown: (NSEvent*) theEvent
 {
     NSResponder* next = [self nextResponder];
@@ -111,19 +134,43 @@ static jmethodID windowDestroyNotifyID = NULL;
 
 - (void)viewWillDraw
 {
-    fprintf(stderr, "*************** viewWillDraw: 0x%p", javaWindowObject); fflush(stderr);
+    DBG_PRINT("*************** viewWillDraw: 0x%p\n", javaWindowObject);
     [super viewWillDraw];
 }
 
 - (void)viewDidHide
 {
-    (*env)->CallVoidMethod(env, javaWindowObject, visibleChangedID, JNI_FALSE);
+    int shallBeDetached = 0;
+    JNIEnv* env = NewtCommon_GetJNIEnv(jvmHandle, jvmVersion, &shallBeDetached);
+    if(NULL==env) {
+        NSLog(@"viewDidHide: null JNIEnv");
+        return;
+    }
+
+    (*env)->CallVoidMethod(env, javaWindowObject, visibleChangedID, JNI_TRUE, JNI_FALSE);
+
+    if (shallBeDetached) {
+        (*jvmHandle)->DetachCurrentThread(jvmHandle);
+    }
+
     [super viewDidHide];
 }
 
 - (void)viewDidUnhide
 {
-    (*env)->CallVoidMethod(env, javaWindowObject, visibleChangedID, JNI_TRUE);
+    int shallBeDetached = 0;
+    JNIEnv* env = NewtCommon_GetJNIEnv(jvmHandle, jvmVersion, &shallBeDetached);
+    if(NULL==env) {
+        NSLog(@"viewDidHide: null JNIEnv");
+        return;
+    }
+
+    (*env)->CallVoidMethod(env, javaWindowObject, visibleChangedID, JNI_TRUE, JNI_TRUE);
+
+    if (shallBeDetached) {
+        (*jvmHandle)->DetachCurrentThread(jvmHandle);
+    }
+
     [super viewDidUnhide];
 }
 
@@ -133,16 +180,17 @@ static jmethodID windowDestroyNotifyID = NULL;
 
 + (BOOL) initNatives: (JNIEnv*) env forClass: (jclass) clazz
 {
-    sendMouseEventID = (*env)->GetMethodID(env, clazz, "sendMouseEvent", "(IIIIII)V");
-    sendKeyEventID = (*env)->GetMethodID(env, clazz, "sendKeyEvent", "(IIIC)V");
-    sizeChangedID     = (*env)->GetMethodID(env, clazz, "sizeChanged",     "(IIZ)V");
-    visibleChangedID = (*env)->GetMethodID(env, clazz, "visibleChanged", "(Z)V");
-    insetsChangedID     = (*env)->GetMethodID(env, clazz, "insetsChanged", "(IIII)V");
-    positionChangedID = (*env)->GetMethodID(env, clazz, "positionChanged", "(II)V");
-    focusChangedID = (*env)->GetMethodID(env, clazz, "focusChanged", "(Z)V");
+    enqueueMouseEventID = (*env)->GetMethodID(env, clazz, "enqueueMouseEvent", "(ZIIIIII)V");
+    enqueueKeyEventID = (*env)->GetMethodID(env, clazz, "enqueueKeyEvent", "(ZIIIC)V");
+    sizeChangedID     = (*env)->GetMethodID(env, clazz, "sizeChanged",     "(ZIIZ)V");
+    visibleChangedID = (*env)->GetMethodID(env, clazz, "visibleChanged", "(ZZ)V");
+    insetsChangedID     = (*env)->GetMethodID(env, clazz, "insetsChanged", "(ZIIII)V");
+    positionChangedID = (*env)->GetMethodID(env, clazz, "positionChanged", "(ZII)V");
+    focusChangedID = (*env)->GetMethodID(env, clazz, "focusChanged", "(ZZ)V");
     windowDestroyNotifyID    = (*env)->GetMethodID(env, clazz, "windowDestroyNotify",    "()V");
-    if (sendMouseEventID && sendKeyEventID && sizeChangedID && visibleChangedID && insetsChangedID &&
-        positionChangedID && focusChangedID && windowDestroyNotifyID)
+    enqueueRequestFocusID = (*env)->GetMethodID(env, clazz, "enqueueRequestFocus", "(Z)V");
+    if (enqueueMouseEventID && enqueueKeyEventID && sizeChangedID && visibleChangedID && insetsChangedID &&
+        positionChangedID && focusChangedID && windowDestroyNotifyID && enqueueRequestFocusID)
     {
         return YES;
     }
@@ -172,8 +220,9 @@ static jmethodID windowDestroyNotifyID = NULL;
     jint bottom = (jint)(contentRect.origin.y - frameRect.origin.y);
     jint right = (jint)(frameRect.size.width - (contentRect.size.width + l));
 
-    (*env)->CallVoidMethod(env, javaWindowObject, insetsChangedID,
-                           left, top, right, bottom);
+    DBG_PRINT( "updateInsets: [ l %d, r %d, t %d, b %d ]\n", (int)left, (int)right, (int)top, (int)bottom);
+
+    (*env)->CallVoidMethod(env, javaWindowObject, insetsChangedID, JNI_TRUE, left, right, top, bottom);
 }
 
 - (id) initWithContentRect: (NSRect) contentRect
@@ -225,8 +274,15 @@ static jint mods2JavaMods(NSUInteger mods)
     }
     NewtView* view = (NewtView *) nsview;
     jobject javaWindowObject = [view getJavaWindowObject];
-    JNIEnv* env = [view getJNIEnv];
-    if (env==NULL || javaWindowObject == NULL) {
+    if (javaWindowObject == NULL) {
+        NSLog(@"sendKeyEvent: null javaWindowObject");
+        return;
+    }
+    int shallBeDetached = 0;
+    JavaVM *jvmHandle = [view getJVMHandle];
+    JNIEnv* env = NewtCommon_GetJNIEnv(jvmHandle, [view getJVMVersion], &shallBeDetached);
+    if(NULL==env) {
+        NSLog(@"sendKeyEvent: null JNIEnv");
         return;
     }
 
@@ -240,9 +296,13 @@ static jint mods2JavaMods(NSUInteger mods)
         // Note: the key code in the NSEvent does not map to anything we can use
         jchar keyChar = (jchar) [chars characterAtIndex: i];
 
-        (*env)->CallVoidMethod(env, javaWindowObject, sendKeyEventID,
+        (*env)->CallVoidMethod(env, javaWindowObject, enqueueKeyEventID, JNI_FALSE,
                                evType, javaMods, keyCode, keyChar);
     }
+
+    if (shallBeDetached) {
+        (*jvmHandle)->DetachCurrentThread(jvmHandle);
+    }
 }
 
 - (void) keyDown: (NSEvent*) theEvent
@@ -264,8 +324,15 @@ static jint mods2JavaMods(NSUInteger mods)
     }
     NewtView* view = (NewtView *) nsview;
     jobject javaWindowObject = [view getJavaWindowObject];
-    JNIEnv* env = [view getJNIEnv];
-    if (env==NULL || javaWindowObject == NULL) {
+    if (javaWindowObject == NULL) {
+        NSLog(@"sendMouseEvent: null javaWindowObject");
+        return;
+    }
+    int shallBeDetached = 0;
+    JavaVM *jvmHandle = [view getJVMHandle];
+    JNIEnv* env = NewtCommon_GetJNIEnv(jvmHandle, [view getJVMVersion], &shallBeDetached);
+    if(NULL==env) {
+        NSLog(@"sendMouseEvent: null JNIEnv");
         return;
     }
 
@@ -313,11 +380,18 @@ static jint mods2JavaMods(NSUInteger mods)
         // ignore 0 increment wheel scroll events
         return;
     }
-    (*env)->CallVoidMethod(env, javaWindowObject, sendMouseEventID,
+    if (evType == EVENT_MOUSE_PRESSED) {
+        (*env)->CallVoidMethod(env, javaWindowObject, enqueueRequestFocusID, JNI_FALSE);
+    }
+    (*env)->CallVoidMethod(env, javaWindowObject, enqueueMouseEventID, JNI_FALSE,
                            evType, javaMods,
                            (jint) location.x,
                            (jint) (contentRect.size.height - location.y),
                            javaButtonNum, scrollDeltaY);
+
+    if (shallBeDetached) {
+        (*jvmHandle)->DetachCurrentThread(jvmHandle);
+    }
 }
 
 - (void) mouseEntered: (NSEvent*) theEvent
@@ -396,8 +470,15 @@ static jint mods2JavaMods(NSUInteger mods)
     }
     NewtView* view = (NewtView *) nsview;
     jobject javaWindowObject = [view getJavaWindowObject];
-    JNIEnv* env = [view getJNIEnv];
-    if (env==NULL || javaWindowObject == NULL) {
+    if (javaWindowObject == NULL) {
+        NSLog(@"windowDidResize: null javaWindowObject");
+        return;
+    }
+    int shallBeDetached = 0;
+    JavaVM *jvmHandle = [view getJVMHandle];
+    JNIEnv* env = NewtCommon_GetJNIEnv(jvmHandle, [view getJVMVersion], &shallBeDetached);
+    if(NULL==env) {
+        NSLog(@"windowDidResize: null JNIEnv");
         return;
     }
 
@@ -407,9 +488,13 @@ static jint mods2JavaMods(NSUInteger mods)
     NSRect frameRect = [self frame];
     NSRect contentRect = [self contentRectForFrameRect: frameRect];
 
-    (*env)->CallVoidMethod(env, javaWindowObject, sizeChangedID,
+    (*env)->CallVoidMethod(env, javaWindowObject, sizeChangedID, JNI_TRUE,
                            (jint) contentRect.size.width,
                            (jint) contentRect.size.height, JNI_FALSE);
+
+    if (shallBeDetached) {
+        (*jvmHandle)->DetachCurrentThread(jvmHandle);
+    }
 }
 
 - (void)windowDidMove: (NSNotification*) notification
@@ -420,8 +505,15 @@ static jint mods2JavaMods(NSUInteger mods)
     }
     NewtView* view = (NewtView *) nsview;
     jobject javaWindowObject = [view getJavaWindowObject];
-    JNIEnv* env = [view getJNIEnv];
-    if (env==NULL || javaWindowObject == NULL) {
+    if (javaWindowObject == NULL) {
+        NSLog(@"windowDidMove: null javaWindowObject");
+        return;
+    }
+    int shallBeDetached = 0;
+    JavaVM *jvmHandle = [view getJVMHandle];
+    JNIEnv* env = NewtCommon_GetJNIEnv(jvmHandle, [view getJVMVersion], &shallBeDetached);
+    if(NULL==env) {
+        NSLog(@"windowDidMove: null JNIEnv");
         return;
     }
 
@@ -435,29 +527,54 @@ static jint mods2JavaMods(NSUInteger mods)
     screenRect = [screen frame];
     pt = NSMakePoint(rect.origin.x, screenRect.origin.y + screenRect.size.height - rect.origin.y - rect.size.height);
 
-    (*env)->CallVoidMethod(env, javaWindowObject, positionChangedID,
-                           (jint) pt.x, (jint) pt.y);
+    (*env)->CallVoidMethod(env, javaWindowObject, positionChangedID, JNI_TRUE, (jint) pt.x, (jint) pt.y);
+
+    if (shallBeDetached) {
+        (*jvmHandle)->DetachCurrentThread(jvmHandle);
+    }
 }
 
 - (void)windowWillClose: (NSNotification*) notification
 {
+    NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
+
     NSView* nsview = [self contentView];
     if( ! [nsview isMemberOfClass:[NewtView class]] ) {
         return;
     }
     NewtView* view = (NewtView *) nsview;
-    jobject javaWindowObject = [view getJavaWindowObject];
-    JNIEnv* env = [view getJNIEnv];
-    if (env==NULL || javaWindowObject == NULL) {
-        return;
-    }
 
-    (*env)->CallVoidMethod(env, javaWindowObject, windowDestroyNotifyID);
-    // Can't issue call here - locked window state, done from Java method
+    if( false == [view getDestroyNotifySent] ) {
+        jobject javaWindowObject = [view getJavaWindowObject];
+        DBG_PRINT( "*************** windowWillClose.0: 0x%p\n", (void *)(intptr_t)javaWindowObject);
+        if (javaWindowObject == NULL) {
+            NSLog(@"windowWillClose: null javaWindowObject");
+            return;
+        }
+        int shallBeDetached = 0;
+        JavaVM *jvmHandle = [view getJVMHandle];
+        JNIEnv* env = NewtCommon_GetJNIEnv(jvmHandle, [view getJVMVersion], &shallBeDetached);
+        if(NULL==env) {
+            NSLog(@"windowWillClose: null JNIEnv");
+            return;
+        }
+
+        [view setDestroyNotifySent: true];
+        (*env)->CallVoidMethod(env, javaWindowObject, windowDestroyNotifyID);
+        // Can't issue call here - locked window state, done from Java method
 
-    // EOL ..
-    (*env)->DeleteGlobalRef(env, javaWindowObject);
-    [view setJavaWindowObject: NULL];
+        // EOL ..
+        (*env)->DeleteGlobalRef(env, javaWindowObject);
+        [view setJavaWindowObject: NULL];
+
+        if (shallBeDetached) {
+            (*jvmHandle)->DetachCurrentThread(jvmHandle);
+        }
+        DBG_PRINT( "*************** windowWillClose.X: 0x%p\n", (void *)(intptr_t)javaWindowObject);
+    } else {
+        DBG_PRINT( "*************** windowWillClose (skip)\n");
+    }
+    [pool release];
 }
 
 - (void) windowDidBecomeKey: (NSNotification *) notification
@@ -468,12 +585,23 @@ static jint mods2JavaMods(NSUInteger mods)
     }
     NewtView* view = (NewtView *) nsview;
     jobject javaWindowObject = [view getJavaWindowObject];
-    JNIEnv* env = [view getJNIEnv];
-    if (env==NULL || javaWindowObject == NULL) {
+    if (javaWindowObject == NULL) {
+        NSLog(@"windowDidBecomeKey: null javaWindowObject");
         return;
     }
+    int shallBeDetached = 0;
+    JavaVM *jvmHandle = [view getJVMHandle];
+    JNIEnv* env = NewtCommon_GetJNIEnv(jvmHandle, [view getJVMVersion], &shallBeDetached);
+    if(NULL==env) {
+        NSLog(@"windowDidBecomeKey: null JNIEnv");
+        return;
+    }
+
+    (*env)->CallVoidMethod(env, javaWindowObject, focusChangedID, JNI_TRUE, JNI_TRUE);
 
-    (*env)->CallVoidMethod(env, javaWindowObject, focusChangedID, JNI_TRUE);
+    if (shallBeDetached) {
+        (*jvmHandle)->DetachCurrentThread(jvmHandle);
+    }
 }
 
 - (void) windowDidResignKey: (NSNotification *) notification
@@ -484,12 +612,23 @@ static jint mods2JavaMods(NSUInteger mods)
     }
     NewtView* view = (NewtView *) nsview;
     jobject javaWindowObject = [view getJavaWindowObject];
-    JNIEnv* env = [view getJNIEnv];
-    if (env==NULL || javaWindowObject == NULL) {
+    if (javaWindowObject == NULL) {
+        NSLog(@"windowDidResignKey: null javaWindowObject");
+        return;
+    }
+    int shallBeDetached = 0;
+    JavaVM *jvmHandle = [view getJVMHandle];
+    JNIEnv* env = NewtCommon_GetJNIEnv(jvmHandle, [view getJVMVersion], &shallBeDetached);
+    if(NULL==env) {
+        NSLog(@"windowDidResignKey: null JNIEnv");
         return;
     }
 
-    (*env)->CallVoidMethod(env, javaWindowObject, focusChangedID, JNI_FALSE);
+    (*env)->CallVoidMethod(env, javaWindowObject, focusChangedID, JNI_TRUE, JNI_FALSE);
+
+    if (shallBeDetached) {
+        (*jvmHandle)->DetachCurrentThread(jvmHandle);
+    }
 }
 
 @end
diff --git a/src/newt/native/Window.h b/src/newt/native/Window.h
new file mode 100644
index 0000000..865746b
--- /dev/null
+++ b/src/newt/native/Window.h
@@ -0,0 +1,30 @@
+
+#ifndef _WINDOW_H_
+#define _WINDOW_H_
+
+#define FLAG_CHANGE_PARENTING       ( 1 <<  0 )
+#define FLAG_CHANGE_DECORATION      ( 1 <<  1 )
+#define FLAG_CHANGE_FULLSCREEN      ( 1 <<  2 )
+#define FLAG_CHANGE_ALWAYSONTOP     ( 1 <<  3 )
+#define FLAG_CHANGE_VISIBILITY      ( 1 <<  4 )
+
+#define FLAG_HAS_PARENT             ( 1 <<  8 )
+#define FLAG_IS_UNDECORATED         ( 1 <<  9 )
+#define FLAG_IS_FULLSCREEN          ( 1 << 10 )
+#define FLAG_IS_ALWAYSONTOP         ( 1 << 11 )
+#define FLAG_IS_VISIBLE             ( 1 << 12 )
+
+#define TST_FLAG_CHANGE_PARENTING(f)   ( 0 != ( (f) & FLAG_CHANGE_PARENTING ) ) 
+#define TST_FLAG_CHANGE_DECORATION(f)  ( 0 != ( (f) & FLAG_CHANGE_DECORATION ) ) 
+#define TST_FLAG_CHANGE_FULLSCREEN(f)  ( 0 != ( (f) & FLAG_CHANGE_FULLSCREEN ) ) 
+#define TST_FLAG_CHANGE_ALWAYSONTOP(f) ( 0 != ( (f) & FLAG_CHANGE_ALWAYSONTOP ) ) 
+#define TST_FLAG_CHANGE_VISIBILITY(f)  ( 0 != ( (f) & FLAG_CHANGE_VISIBILITY ) ) 
+
+#define TST_FLAG_HAS_PARENT(f)        ( 0 != ( (f) & FLAG_HAS_PARENT ) ) 
+#define TST_FLAG_IS_UNDECORATED(f)    ( 0 != ( (f) & FLAG_IS_UNDECORATED ) ) 
+#define TST_FLAG_IS_FULLSCREEN(f)     ( 0 != ( (f) & FLAG_IS_FULLSCREEN ) ) 
+#define TST_FLAG_IS_FULLSCREEN(f)     ( 0 != ( (f) & FLAG_IS_FULLSCREEN ) ) 
+#define TST_FLAG_IS_ALWAYSONTOP(f)    ( 0 != ( (f) & FLAG_IS_ALWAYSONTOP ) ) 
+#define TST_FLAG_IS_VISIBLE(f)        ( 0 != ( (f) & FLAG_IS_VISIBLE ) ) 
+
+#endif
diff --git a/src/newt/native/WindowsWindow.c b/src/newt/native/WindowsWindow.c
index 95f036b..307938a 100644
--- a/src/newt/native/WindowsWindow.c
+++ b/src/newt/native/WindowsWindow.c
@@ -36,28 +36,13 @@
 #include <Windowsx.h>
 #include <tchar.h>
 #include <stdlib.h>
+
 // NOTE: it looks like SHFullScreen and/or aygshell.dll is not available on the APX 2500 any more
 // #ifdef UNDER_CE
 // #include "aygshell.h"
 // #endif
 
-/* This typedef is apparently needed for Microsoft compilers before VC8,
-   and on Windows CE and MingW32  */
-#if !defined(__MINGW64__) && ( defined(UNDER_CE) || _MSC_VER <= 1400 )
-    #ifdef _WIN64
-        typedef long long intptr_t;
-    #else
-        typedef int intptr_t;
-    #endif
-#elif !defined(__MINGW64__) && _MSC_VER <= 1500
-    #ifdef _WIN64 // [
-        typedef __int64           intptr_t;
-    #else // _WIN64 ][
-        typedef int               intptr_t;
-    #endif // _WIN64 ]
-#else
-    #include <inttypes.h>
-#endif
+#include <gluegen_stdint.h>
 
 #if !defined(__MINGW64__) && _MSC_VER <= 1500
     // FIXME: Determine for which MSVC versions ..
@@ -96,10 +81,11 @@
 #define DISPLAY_DEVICE_ACTIVE 0x00000001
 #endif
 
-#include "jogamp_newt_windows_WindowsDisplay.h"
-#include "jogamp_newt_windows_WindowsScreen.h"
-#include "jogamp_newt_windows_WindowsWindow.h"
+#include "jogamp_newt_driver_windows_WindowsDisplay.h"
+#include "jogamp_newt_driver_windows_WindowsScreen.h"
+#include "jogamp_newt_driver_windows_WindowsWindow.h"
 
+#include "Window.h"
 #include "MouseEvent.h"
 #include "InputEvent.h"
 #include "KeyEvent.h"
@@ -680,9 +666,9 @@ static RECT* UpdateInsets(JNIEnv *env, jobject window, HWND hwnd)
         (int)m_insets.left, (int)m_insets.top, (int)m_insets.right, (int)m_insets.bottom,
         (int)(m_insets.right-m_insets.left), (int)(m_insets.top-m_insets.bottom));
 
-    (*env)->CallVoidMethod(env, window, insetsChangedID,
-                           m_insets.left, m_insets.top,
-                           m_insets.right, m_insets.bottom);
+    (*env)->CallVoidMethod(env, window, insetsChangedID, JNI_FALSE,
+                           m_insets.left, m_insets.right,
+                           m_insets.top, m_insets.bottom);
     return &m_insets;
 }
 
@@ -718,7 +704,6 @@ static RECT* UpdateInsets(JNIEnv *env, jobject window, HWND hwnd)
         m_insets.right < 0 || m_insets.bottom < 0)
     {
         LONG style = GetWindowLong(hwnd, GWL_STYLE);
-        // TODO: TDV: better undecorated checking needed
 
         BOOL bIsUndecorated = (style & (WS_CHILD|WS_POPUP|WS_SYSMENU)) != 0;
         if (!bIsUndecorated) {
@@ -743,12 +728,12 @@ static RECT* UpdateInsets(JNIEnv *env, jobject window, HWND hwnd)
         }
     }
 
-    DBG_PRINT("*** WindowsWindow: UpdateInsets window %p, %d/%d %dx%d\n", 
-        (void*)hwnd, (int)m_insets.left, (int)m_insets.top, (int)(m_insets.right-m_insets.left), (int)(m_insets.top-m_insets.bottom));
+    DBG_PRINT("*** WindowsWindow: UpdateInsets window %p, [l %d, r %d - t %d, b %d - %dx%d]\n", 
+        (void*)hwnd, (int)m_insets.left, (int)m_insets.right, (int)m_insets.top, (int)m_insets.bottom,
+        (int) ( m_insets.left + m_insets.right ), (int) (m_insets.top + m_insets.bottom));
 
-    (*env)->CallVoidMethod(env, window, insetsChangedID,
-                           m_insets.left, m_insets.top,
-                           m_insets.right, m_insets.bottom);
+    (*env)->CallVoidMethod(env, window, insetsChangedID, JNI_FALSE,
+                           (int)m_insets.left, (int)m_insets.right, (int)m_insets.top, (int)m_insets.bottom);
     return &m_insets;
 }
 
@@ -760,25 +745,23 @@ static void WmSize(JNIEnv *env, jobject window, HWND wnd, UINT type)
     int w, h;
     BOOL isVisible = IsWindowVisible(wnd);
 
-    // make sure insets are up to date
-    (void)UpdateInsets(env, window, wnd);
-
     if (type == SIZE_MINIMIZED) {
         // TODO: deal with minimized window sizing
         return;
     }
 
+    // make sure insets are up to date
+    (void)UpdateInsets(env, window, wnd);
+
     GetClientRect(wnd, &rc);
     
     // we report back the dimensions of the client area
-    w = rc.right  - rc.left;
-    h = rc.bottom - rc.top;
+    w = (int) ( rc.right  - rc.left );
+    h = (int) ( rc.bottom - rc.top );
 
     DBG_PRINT("*** WindowsWindow: WmSize window %p, %dx%d, visible %d\n", (void*)wnd, w, h, isVisible);
 
-    if(isVisible) {
-        (*env)->CallVoidMethod(env, window, sizeChangedID, w, h, JNI_FALSE);
-    }
+    (*env)->CallVoidMethod(env, window, sizeChangedID, JNI_FALSE, w, h, JNI_FALSE);
 }
 
 static LRESULT CALLBACK wndProc(HWND wnd, UINT message,
@@ -961,23 +944,22 @@ static LRESULT CALLBACK wndProc(HWND wnd, UINT message,
     }
 
     case WM_SETFOCUS:
-        (*env)->CallVoidMethod(env, window, focusChangedID, JNI_TRUE);
+        (*env)->CallVoidMethod(env, window, focusChangedID, JNI_FALSE, JNI_TRUE);
         useDefWindowProc = 1;
         break;
 
     case WM_KILLFOCUS:
-        (*env)->CallVoidMethod(env, window, focusChangedID, JNI_FALSE);
+        (*env)->CallVoidMethod(env, window, focusChangedID, JNI_FALSE, JNI_FALSE);
         useDefWindowProc = 1;
         break;
 
     case WM_SHOWWINDOW:
-        (*env)->CallVoidMethod(env, window, visibleChangedID, wParam==TRUE?JNI_TRUE:JNI_FALSE);
+        (*env)->CallVoidMethod(env, window, visibleChangedID, JNI_FALSE, wParam==TRUE?JNI_TRUE:JNI_FALSE);
         break;
 
     case WM_MOVE:
         DBG_PRINT("*** WindowsWindow: WM_MOVE window %p, %d/%d\n", wnd, (int)LOWORD(lParam), (int)HIWORD(lParam));
-        (*env)->CallVoidMethod(env, window, positionChangedID,
-                               (jint)LOWORD(lParam), (jint)HIWORD(lParam));
+        (*env)->CallVoidMethod(env, window, positionChangedID, JNI_FALSE, (jint)LOWORD(lParam), (jint)HIWORD(lParam));
         useDefWindowProc = 1;
         break;
 
@@ -989,7 +971,7 @@ static LRESULT CALLBACK wndProc(HWND wnd, UINT message,
             jint width = r.right-r.left;
             jint height = r.bottom-r.top;
             if (width > 0 && height > 0) {
-                (*env)->CallVoidMethod(env, window, windowRepaintID, r.left, r.top, width, height);
+                (*env)->CallVoidMethod(env, window, windowRepaintID, JNI_FALSE, r.left, r.top, width, height);
             }
             ValidateRect(wnd, &r);
             */
@@ -998,7 +980,7 @@ static LRESULT CALLBACK wndProc(HWND wnd, UINT message,
     }
     case WM_ERASEBKGND:
         // ignore erase background
-        (*env)->CallVoidMethod(env, window, windowRepaintID, 0, 0, -1, -1);
+        (*env)->CallVoidMethod(env, window, windowRepaintID, JNI_FALSE, 0, 0, -1, -1);
         useDefWindowProc = 0;
         res = 1; // OpenGL, etc .. erases the background, hence we claim to have just done this
         break;
@@ -1015,11 +997,11 @@ static LRESULT CALLBACK wndProc(HWND wnd, UINT message,
 }
 
 /*
- * Class:     jogamp_newt_windows_WindowsDisplay
+ * Class:     jogamp_newt_driver_windows_WindowsDisplay
  * Method:    DispatchMessages
  * Signature: ()V
  */
-JNIEXPORT void JNICALL Java_jogamp_newt_windows_WindowsDisplay_DispatchMessages0
+JNIEXPORT void JNICALL Java_jogamp_newt_driver_windows_WindowsDisplay_DispatchMessages0
   (JNIEnv *env, jclass clazz)
 {
     int i = 0;
@@ -1044,22 +1026,22 @@ JNIEXPORT void JNICALL Java_jogamp_newt_windows_WindowsDisplay_DispatchMessages0
 }
 
 /*
- * Class:     jogamp_newt_windows_WindowsScreen
+ * Class:     jogamp_newt_driver_windows_WindowsScreen
  * Method:    getWidthImpl
  * Signature: (I)I
  */
-JNIEXPORT jint JNICALL Java_jogamp_newt_windows_WindowsScreen_getWidthImpl0
+JNIEXPORT jint JNICALL Java_jogamp_newt_driver_windows_WindowsScreen_getWidthImpl0
   (JNIEnv *env, jobject obj, jint scrn_idx)
 {
     return (jint)GetSystemMetrics(SM_CXSCREEN);
 }
 
 /*
- * Class:     jogamp_newt_windows_WindowsScreen
+ * Class:     jogamp_newt_driver_windows_WindowsScreen
  * Method:    getHeightImpl
  * Signature: (I)I
  */
-JNIEXPORT jint JNICALL Java_jogamp_newt_windows_WindowsScreen_getHeightImpl0
+JNIEXPORT jint JNICALL Java_jogamp_newt_driver_windows_WindowsScreen_getHeightImpl0
   (JNIEnv *env, jobject obj, jint scrn_idx)
 {
     return (jint)GetSystemMetrics(SM_CYSCREEN);
@@ -1139,11 +1121,11 @@ static HDC NewtScreen_createDisplayDC(LPCTSTR displayDeviceName) {
 }
 
 /*
- * Class:     jogamp_newt_windows_WindowsScreen
+ * Class:     jogamp_newt_driver_windows_WindowsScreen
  * Method:    getScreenMode0
  * Signature: (II)[I
  */
-JNIEXPORT jintArray JNICALL Java_jogamp_newt_windows_WindowsScreen_getScreenMode0
+JNIEXPORT jintArray JNICALL Java_jogamp_newt_driver_windows_WindowsScreen_getScreenMode0
   (JNIEnv *env, jobject obj, jint scrn_idx, jint mode_idx)
 {
     DISPLAY_DEVICE device;
@@ -1212,11 +1194,11 @@ JNIEXPORT jintArray JNICALL Java_jogamp_newt_windows_WindowsScreen_getScreenMode
 }
 
 /*
- * Class:     jogamp_newt_windows_WindowsScreen
+ * Class:     jogamp_newt_driver_windows_WindowsScreen
  * Method:    setScreenMode0
  * Signature: (IIIIII)Z
  */
-JNIEXPORT jboolean JNICALL Java_jogamp_newt_windows_WindowsScreen_setScreenMode0
+JNIEXPORT jboolean JNICALL Java_jogamp_newt_driver_windows_WindowsScreen_setScreenMode0
   (JNIEnv *env, jobject object, jint scrn_idx, jint width, jint height, jint bits, jint rate, jint rot)
 {
     DISPLAY_DEVICE device;
@@ -1249,22 +1231,22 @@ JNIEXPORT jboolean JNICALL Java_jogamp_newt_windows_WindowsScreen_setScreenMode0
 }
 
 /*
- * Class:     jogamp_newt_windows_WindowsWindow
+ * Class:     jogamp_newt_driver_windows_WindowsWindow
  * Method:    initIDs0
  * Signature: ()Z
  */
-JNIEXPORT jboolean JNICALL Java_jogamp_newt_windows_WindowsWindow_initIDs0
+JNIEXPORT jboolean JNICALL Java_jogamp_newt_driver_windows_WindowsWindow_initIDs0
   (JNIEnv *env, jclass clazz)
 {
     NewtCommon_init(env);
 
-    insetsChangedID = (*env)->GetMethodID(env, clazz, "insetsChanged", "(IIII)V");
-    sizeChangedID = (*env)->GetMethodID(env, clazz, "sizeChanged", "(IIZ)V");
-    positionChangedID = (*env)->GetMethodID(env, clazz, "positionChanged", "(II)V");
-    focusChangedID = (*env)->GetMethodID(env, clazz, "focusChanged", "(Z)V");
-    visibleChangedID = (*env)->GetMethodID(env, clazz, "visibleChanged", "(Z)V");
+    insetsChangedID = (*env)->GetMethodID(env, clazz, "insetsChanged", "(ZIIII)V");
+    sizeChangedID = (*env)->GetMethodID(env, clazz, "sizeChanged", "(ZIIZ)V");
+    positionChangedID = (*env)->GetMethodID(env, clazz, "positionChanged", "(ZII)V");
+    focusChangedID = (*env)->GetMethodID(env, clazz, "focusChanged", "(ZZ)V");
+    visibleChangedID = (*env)->GetMethodID(env, clazz, "visibleChanged", "(ZZ)V");
     windowDestroyNotifyID    = (*env)->GetMethodID(env, clazz, "windowDestroyNotify", "()V");
-    windowRepaintID = (*env)->GetMethodID(env, clazz, "windowRepaint", "(IIII)V");
+    windowRepaintID = (*env)->GetMethodID(env, clazz, "windowRepaint", "(ZIIII)V");
     enqueueMouseEventID = (*env)->GetMethodID(env, clazz, "enqueueMouseEvent", "(ZIIIIII)V");
     sendMouseEventID = (*env)->GetMethodID(env, clazz, "sendMouseEvent", "(IIIIII)V");
     enqueueKeyEventID = (*env)->GetMethodID(env, clazz, "enqueueKeyEvent", "(ZIIIC)V");
@@ -1292,25 +1274,59 @@ JNIEXPORT jboolean JNICALL Java_jogamp_newt_windows_WindowsWindow_initIDs0
 }
 
 /*
- * Class:     jogamp_newt_windows_WindowsWindow
+ * Class:     jogamp_newt_driver_windows_WindowsWindow
  * Method:    getNewtWndProc0
  * Signature: ()J
  */
-JNIEXPORT jlong JNICALL Java_jogamp_newt_windows_WindowsWindow_getNewtWndProc0
+JNIEXPORT jlong JNICALL Java_jogamp_newt_driver_windows_WindowsWindow_getNewtWndProc0
   (JNIEnv *env, jclass clazz)
 {
     return (jlong) (intptr_t) wndProc;
 }
 
+static void NewtWindow_setVisiblePosSize(HWND hwnd, BOOL atop, BOOL visible, 
+                                         int x, int y, int width, int height)
+{
+    UINT flags;
+    BOOL bRes;
+    
+    DBG_PRINT("*** WindowsWindow: NewtWindow_setVisiblePosSize %d/%d %dx%d, atop %d, visible %d\n", 
+        x, y, width, height, atop, visible);
+
+    if(visible) {
+        flags = SWP_SHOWWINDOW;
+    } else {
+        flags = SWP_NOACTIVATE | SWP_NOZORDER;
+    }
+    if(0>x || 0>y) {
+        flags |= SWP_NOMOVE;
+    }
+    if(0>=width || 0>=height ) {
+        flags |= SWP_NOSIZE;
+    }
+
+    if(atop) {
+        SetWindowPos(hwnd, HWND_TOP, x, y, width, height, flags);
+        SetWindowPos(hwnd, HWND_TOPMOST, x, y, width, height, flags);
+    } else {
+        SetWindowPos(hwnd, HWND_NOTOPMOST, x, y, width, height, flags);
+        SetWindowPos(hwnd, HWND_TOP, x, y, width, height, flags);
+    }
+    // SetWindowPos(hwnd, atop ? HWND_TOPMOST : HWND_TOP, x, y, width, height, flags);
+
+    InvalidateRect(hwnd, NULL, TRUE);
+    UpdateWindow(hwnd);
+}
+
 /*
- * Class:     jogamp_newt_windows_WindowsWindow
+ * Class:     jogamp_newt_driver_windows_WindowsWindow
  * Method:    CreateWindow
  */
-JNIEXPORT jlong JNICALL Java_jogamp_newt_windows_WindowsWindow_CreateWindow0
+JNIEXPORT jlong JNICALL Java_jogamp_newt_driver_windows_WindowsWindow_CreateWindow0
   (JNIEnv *env, jobject obj, 
    jlong hInstance, jstring jWndClassName, jstring jWndName, 
-   jlong parent, jlong visualID, jboolean bIsUndecorated,
-   jint jx, jint jy, jint defaultWidth, jint defaultHeight)
+   jlong parent,
+   jint jx, jint jy, jint defaultWidth, jint defaultHeight, jint flags)
 {
     HWND parentWindow = (HWND) (intptr_t) parent;
     const TCHAR* wndClassName = NULL;
@@ -1319,6 +1335,7 @@ JNIEXPORT jlong JNICALL Java_jogamp_newt_windows_WindowsWindow_CreateWindow0
     int x=(int)jx, y=(int)jy;
     int width=(int)defaultWidth, height=(int)defaultHeight;
     HWND window = NULL;
+    int _x = x, _y = y; // pos for CreateWindow, might be tweaked
 
 #ifdef UNICODE
     wndClassName = NewtCommon_GetNullTerminatedStringChars(env, jWndClassName);
@@ -1328,30 +1345,32 @@ JNIEXPORT jlong JNICALL Java_jogamp_newt_windows_WindowsWindow_CreateWindow0
     wndName = (*env)->GetStringUTFChars(env, jWndName, NULL);
 #endif
 
-    if(NULL!=parentWindow) {
+    if( NULL!=parentWindow ) {
         if (!IsWindow(parentWindow)) {
             DBG_PRINT("*** WindowsWindow: CreateWindow failure: Passed parentWindow %p is invalid\n", parentWindow);
             return 0;
         }
         windowStyle |= WS_CHILD ;
-    } else if (bIsUndecorated) {
+    } else if ( TST_FLAG_IS_UNDECORATED(flags) ) {
         windowStyle |= WS_POPUP | WS_SYSMENU | WS_MAXIMIZEBOX | WS_MINIMIZEBOX;
     } else {
         windowStyle |= WS_OVERLAPPEDWINDOW;
-        x = CW_USEDEFAULT;
-        y = 0;
+        if(0>_x || 0>_y) {
+            // user didn't requested specific position, use WM default
+            _x = CW_USEDEFAULT;
+            _y = 0;
+        }
     }
 
-    (void) visualID; // FIXME: use the visualID ..
-
     window = CreateWindow(wndClassName, wndName, windowStyle,
-                          x, y, width, height,
+                          _x, _y, width, height,
                           parentWindow, NULL,
                           (HINSTANCE) (intptr_t) hInstance,
                           NULL);
 
-    DBG_PRINT("*** WindowsWindow: CreateWindow thread 0x%X, parent %p, window %p, %d/%d %dx%d\n", 
-        (int)GetCurrentThreadId(), parentWindow, window, x, y, width, height);
+    DBG_PRINT("*** WindowsWindow: CreateWindow thread 0x%X, parent %p, window %p, %d/%d %dx%d, undeco %d, alwaysOnTop %d\n", 
+        (int)GetCurrentThreadId(), parentWindow, window, x, y, width, height,
+        TST_FLAG_IS_UNDECORATED(flags), TST_FLAG_IS_ALWAYSONTOP(flags));
 
     if (NULL == window) {
         int lastError = (int) GetLastError();
@@ -1367,7 +1386,33 @@ JNIEXPORT jlong JNICALL Java_jogamp_newt_windows_WindowsWindow_CreateWindow0
         SetWindowLongPtr(window, GWLP_USERDATA, (intptr_t) wud);
 #endif
 
-        UpdateInsets(env, obj, window);
+        // gather and adjust position and size
+        {
+            RECT rc;
+            RECT * insets;
+            BOOL userPos = 0<=x && 0<=y ;
+
+            ShowWindow(window, SW_SHOW);
+
+            // send insets before visibility, allowing java code a proper sync point!
+            insets = UpdateInsets(env, wud->jinstance, window);
+            (*env)->CallVoidMethod(env, wud->jinstance, visibleChangedID, JNI_FALSE, JNI_TRUE);
+
+            if(!userPos) {
+                GetWindowRect(window, &rc);
+                x = rc.left + insets->left; // client coords
+                y = rc.top + insets->top;   // client coords
+            }
+            DBG_PRINT("*** WindowsWindow: CreateWindow client: %d/%d %dx%d (is user-pos %d)\n", x, y, width, height, userPos);
+
+            x -= insets->left; // top-level
+            y -= insets->top;  // top-level
+            width += insets->left + insets->right;   // top-level
+            height += insets->top + insets->bottom;  // top-level
+            DBG_PRINT("*** WindowsWindow: CreateWindow top-level %d/%d %dx%d\n", x, y, width, height);
+
+            NewtWindow_setVisiblePosSize(window, TST_FLAG_IS_ALWAYSONTOP(flags), TRUE, x, y, width, height);
+        }
     }
 
 #ifdef UNICODE
@@ -1382,11 +1427,11 @@ JNIEXPORT jlong JNICALL Java_jogamp_newt_windows_WindowsWindow_CreateWindow0
 }
 
 /*
- * Class:     jogamp_newt_windows_WindowsWindow
+ * Class:     jogamp_newt_driver_windows_WindowsWindow
  * Method:    MonitorFromWindow
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_jogamp_newt_windows_WindowsWindow_MonitorFromWindow0
+JNIEXPORT jlong JNICALL Java_jogamp_newt_driver_windows_WindowsWindow_MonitorFromWindow0
   (JNIEnv *env, jobject obj, jlong window)
 {
     #if (_WIN32_WINNT >= 0x0500 || _WIN32_WINDOWS >= 0x0410 || WINVER >= 0x0500) && !defined(_WIN32_WCE)
@@ -1396,85 +1441,6 @@ JNIEXPORT jlong JNICALL Java_jogamp_newt_windows_WindowsWindow_MonitorFromWindow
     #endif
 }
 
-/***
- * returns bits: 1: size change, 2: pos change
- */
-int NewtWindow_setVisiblePosSize(JNIEnv *env, jobject obj, HWND hwnd, jboolean top, jboolean visible, 
-                                 int x, int y, int width, int height)
-{
-    UINT flags;
-    HWND hWndInsertAfter;
-    BOOL bRes;
-    int iRes=0;
-    int wwidth = width; // final window width
-    int wheight = height; // final window height
-    
-    DBG_PRINT("*** WindowsWindow: NewtWindow_setVisiblePosSize %d/%d %dx%d, top %d, visible %d\n", 
-        x, y, width, height, (int)top, (int)visible);
-
-    if(JNI_TRUE == visible) {
-        flags = SWP_SHOWWINDOW;
-    } else {
-        flags = SWP_NOACTIVATE | SWP_NOZORDER;
-    }
-
-    if(0>x || 0>y ) {
-        flags |= SWP_NOMOVE;
-    } else {
-        iRes |= 2;
-    }
-    if(0>=width || 0>=height ) {
-        flags |= SWP_NOSIZE;
-    } else {
-        iRes |= 1;
-    }
-
-    if(JNI_TRUE == top) {
-        hWndInsertAfter = HWND_TOPMOST;
-        if ( 0 == ( flags & SWP_NOSIZE ) ) {
-
-            // since width, height are the size of the client area, we need to add insets
-            RECT *pInsets = UpdateInsets(env, obj, hwnd);
-
-            wwidth += pInsets->left + pInsets->right;
-            wheight += pInsets->top + pInsets->bottom;
-        }
-        DBG_PRINT("*** WindowsWindow: NewtWindow_setVisiblePosSize top size w/ insets: %d/%d %dx%d\n", x, y, wwidth, wheight);
-    } else {
-        hWndInsertAfter = HWND_TOP;
-        DBG_PRINT("*** WindowsWindow: NewtWindow_setVisiblePosSize client size: %d/%d %dx%d\n", x, y, wwidth, wheight);
-    }
-
-    SetWindowPos(hwnd, hWndInsertAfter, x, y, wwidth, wheight, flags);
-
-    InvalidateRect(hwnd, NULL, TRUE);
-    UpdateWindow(hwnd);
-
-    // we report back the size of client area
-    (*env)->CallVoidMethod(env, obj, sizeChangedID, (jint) width, (jint) height, JNI_FALSE);
-
-    return iRes;
-}
-
-/*
- * Class:     jogamp_newt_windows_WindowsWindow
- * Method:    setVisible0
- * Signature: (JZ)V
- */
-JNIEXPORT void JNICALL Java_jogamp_newt_windows_WindowsWindow_setVisible0
-  (JNIEnv *env, jobject obj, jlong window, jboolean visible, jboolean top, jint x, jint y, jint width, jint height)
-{
-    HWND hwnd = (HWND) (intptr_t) window;
-    DBG_PRINT("*** WindowsWindow: setVisible window %p, visible: %d, top %d, %d/%d %dx%d\n", 
-        hwnd, (int)visible, (int)top, x, y, width, height);
-    if (visible) {
-        NewtWindow_setVisiblePosSize(env, obj, hwnd, top, visible, x, y, width, height);
-        ShowWindow(hwnd, SW_SHOW);
-    } else {
-        ShowWindow(hwnd, SW_HIDE);
-    }
-}
-
 static jboolean NewtWindows_setFullScreen(jboolean fullscreen)
 {
     int flags = 0;
@@ -1494,23 +1460,26 @@ static jboolean NewtWindows_setFullScreen(jboolean fullscreen)
 }
 
 /*
- * Class:     jogamp_newt_windows_WindowsWindow
+ * Class:     jogamp_newt_driver_windows_WindowsWindow
  * Method:    reconfigureWindow0
- * Signature: (JIIIIZZII)V
+ * Signature: (JJIIIII)V
  */
-JNIEXPORT void JNICALL Java_jogamp_newt_windows_WindowsWindow_reconfigureWindow0
-  (JNIEnv *env, jobject obj, jlong parent, jlong window, jint x, jint y, jint width, jint height, 
-   jboolean visible, jboolean parentChange, jint fullScreenChange, jint decorationChange)
+JNIEXPORT void JNICALL Java_jogamp_newt_driver_windows_WindowsWindow_reconfigureWindow0
+  (JNIEnv *env, jobject obj, jlong parent, jlong window,
+   jint x, jint y, jint width, jint height, jint flags)
 {
     HWND hwndP = (HWND) (intptr_t) parent;
     HWND hwnd = (HWND) (intptr_t) window;
     DWORD windowStyle = WS_CLIPSIBLINGS | WS_CLIPCHILDREN ;
-    BOOL styleChange = ( 0 != decorationChange || 0 != fullScreenChange || JNI_TRUE == parentChange ) ? TRUE : FALSE ;
-    UINT flags = SWP_SHOWWINDOW;
-    HWND hWndInsertAfter;
+    BOOL styleChange = TST_FLAG_CHANGE_DECORATION(flags) || TST_FLAG_CHANGE_FULLSCREEN(flags) || TST_FLAG_CHANGE_PARENTING(flags) ;
 
-    DBG_PRINT("*** WindowsWindow: reconfigureWindow0 parent %p, window %p, %d/%d %dx%d, parentChange %d, fullScreenChange %d, visible %d, decorationChange %d -> styleChange %d\n", 
-        parent, window, x, y, width, height, parentChange, fullScreenChange, visible, decorationChange, styleChange);
+    DBG_PRINT( "*** WindowsWindow: reconfigureWindow0 parent %p, window %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 -> styleChange %d\n",
+        parent, window, x, y, width, height,
+        TST_FLAG_CHANGE_PARENTING(flags),   TST_FLAG_HAS_PARENT(flags),
+        TST_FLAG_CHANGE_DECORATION(flags),  TST_FLAG_IS_UNDECORATED(flags),
+        TST_FLAG_CHANGE_FULLSCREEN(flags),  TST_FLAG_IS_FULLSCREEN(flags),
+        TST_FLAG_CHANGE_ALWAYSONTOP(flags), TST_FLAG_IS_ALWAYSONTOP(flags),
+        TST_FLAG_CHANGE_VISIBILITY(flags), TST_FLAG_IS_VISIBLE(flags), styleChange);
 
     if (!IsWindow(hwnd)) {
         DBG_PRINT("*** WindowsWindow: reconfigureWindow0 failure: Passed window %p is invalid\n", (void*)hwnd);
@@ -1522,32 +1491,28 @@ JNIEXPORT void JNICALL Java_jogamp_newt_windows_WindowsWindow_reconfigureWindow0
         return;
     }
 
-    if(JNI_TRUE == visible) {
+    if(TST_FLAG_IS_VISIBLE(flags)) {
         windowStyle |= WS_VISIBLE ;
     }
     
-    if(fullScreenChange < 0)
-    {
-        NewtWindows_setFullScreen(JNI_FALSE);
-    }
-
     // order of call sequence: (MS documentation)
     //    TOP:  SetParent(.., NULL); Clear WS_CHILD [, Set WS_POPUP]
     //  CHILD:  Set WS_CHILD [, Clear WS_POPUP]; SetParent(.., PARENT) 
     //
-    if ( JNI_TRUE == parentChange && NULL == hwndP ) {
+    if( TST_FLAG_CHANGE_PARENTING(flags) && NULL == hwndP ) {
+        // TOP: in -> out
         SetParent(hwnd, NULL);
     }
     
-    if(fullScreenChange > 0)
-    {
+    if( TST_FLAG_CHANGE_FULLSCREEN(flags) && TST_FLAG_IS_FULLSCREEN(flags) ) { // FS on
+        // TOP: in -> out
         NewtWindows_setFullScreen(JNI_TRUE);
     }
 
     if ( styleChange ) {
         if(NULL!=hwndP) {
             windowStyle |= WS_CHILD ;
-        } else if ( decorationChange < 0 || 0 < fullScreenChange ) {
+        } else if ( TST_FLAG_IS_UNDECORATED(flags) ) {
             windowStyle |= WS_POPUP | WS_SYSMENU | WS_MAXIMIZEBOX | WS_MINIMIZEBOX;
         } else {
             windowStyle |= WS_OVERLAPPEDWINDOW;
@@ -1556,22 +1521,35 @@ JNIEXPORT void JNICALL Java_jogamp_newt_windows_WindowsWindow_reconfigureWindow0
         SetWindowPos(hwnd, 0, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER );
     }
 
-    if ( JNI_TRUE == parentChange && NULL != hwndP ) {
+    if( TST_FLAG_CHANGE_FULLSCREEN(flags) && !TST_FLAG_IS_FULLSCREEN(flags) ) { // FS off
+        // CHILD: out -> in
+        NewtWindows_setFullScreen(JNI_FALSE);
+    }
+
+    if ( TST_FLAG_CHANGE_PARENTING(flags) && NULL != hwndP ) {
+        // CHILD: out -> in
         SetParent(hwnd, hwndP );
     }
 
-    NewtWindow_setVisiblePosSize(env, obj, hwnd, (NULL == hwndP) ? JNI_TRUE : JNI_FALSE /* top */, visible,
-                                 x, y, width, height);
+    NewtWindow_setVisiblePosSize(hwnd, TST_FLAG_IS_ALWAYSONTOP(flags), TST_FLAG_IS_VISIBLE(flags), x, y, width, height);
+
+    if( TST_FLAG_CHANGE_VISIBILITY(flags) ) {
+        if( TST_FLAG_IS_VISIBLE(flags) ) {
+            ShowWindow(hwnd, SW_SHOW);
+        } else {
+            ShowWindow(hwnd, SW_HIDE);
+        }
+    }
 
     DBG_PRINT("*** WindowsWindow: reconfigureWindow0.X\n");
 }
 
 /*
- * Class:     jogamp_newt_windows_WindowsWindow
+ * Class:     jogamp_newt_driver_windows_WindowsWindow
  * Method:    setTitle
  * Signature: (JLjava/lang/String;)V
  */
-JNIEXPORT void JNICALL Java_jogamp_newt_windows_WindowsWindow_setTitle0
+JNIEXPORT void JNICALL Java_jogamp_newt_driver_windows_WindowsWindow_setTitle0
   (JNIEnv *env, jclass clazz, jlong window, jstring title)
 {
     HWND hwnd = (HWND) (intptr_t) window;
@@ -1585,11 +1563,11 @@ JNIEXPORT void JNICALL Java_jogamp_newt_windows_WindowsWindow_setTitle0
 }
 
 /*
- * Class:     jogamp_newt_windows_WindowsWindow
+ * Class:     jogamp_newt_driver_windows_WindowsWindow
  * Method:    requestFocus
  * Signature: (JZ)V
  */
-JNIEXPORT void JNICALL Java_jogamp_newt_windows_WindowsWindow_requestFocus0
+JNIEXPORT void JNICALL Java_jogamp_newt_driver_windows_WindowsWindow_requestFocus0
   (JNIEnv *env, jobject obj, jlong window, jboolean force)
 {
     DBG_PRINT("*** WindowsWindow: RequestFocus0\n");
diff --git a/src/newt/native/X11Window.c b/src/newt/native/X11Window.c
index 96da040..f2af919 100644
--- a/src/newt/native/X11Window.c
+++ b/src/newt/native/X11Window.c
@@ -36,12 +36,9 @@
 #include <stdio.h>
 #include <string.h>
 #include <stdarg.h>
-// Building on obsolete platform on SPARC right now
-#ifdef __sparc
-  #include <inttypes.h>
-#else
-  #include <stdint.h>
-#endif
+
+#include <gluegen_stdint.h>
+
 #include <unistd.h>
 #include <errno.h>
 #include <X11/Xlib.h>
@@ -51,11 +48,13 @@
 
 #include <X11/extensions/Xrandr.h>
 
-#include "jogamp_newt_x11_X11Screen.h"
-#include "jogamp_newt_x11_X11Display.h"
-#include "jogamp_newt_x11_X11Window.h"
+#include "jogamp_newt_driver_x11_X11Screen.h"
+#include "jogamp_newt_driver_x11_X11Display.h"
+#include "jogamp_newt_driver_x11_X11Window.h"
 
+#include "Window.h"
 #include "MouseEvent.h"
+#include "InputEvent.h"
 #include "KeyEvent.h"
 #include "WindowEvent.h"
 #include "ScreenMode.h"
@@ -138,17 +137,42 @@ static jint X11KeySym2NewtVKey(KeySym keySym) {
     return keySym;
 }
 
+static jint X11InputState2NewtModifiers(unsigned int xstate) {
+    jint modifiers = 0;
+    if ((ControlMask & xstate) != 0) {
+        modifiers |= EVENT_CTRL_MASK;
+    }
+    if ((ShiftMask & xstate) != 0) {
+        modifiers |= EVENT_SHIFT_MASK;
+    }
+    if ((Mod1Mask & xstate) != 0) {
+        modifiers |= EVENT_ALT_MASK;
+    }
+    if ((Button1Mask & xstate) != 0) {
+        modifiers |= EVENT_BUTTON1_MASK;
+    }
+    if ((Button2Mask & xstate) != 0) {
+        modifiers |= EVENT_BUTTON2_MASK;
+    }
+    if ((Button3Mask & xstate) != 0) {
+        modifiers |= EVENT_BUTTON3_MASK;
+    }
+
+    return modifiers;
+}
+
 static const char * const ClazzNameNewtWindow = "com/jogamp/newt/Window";
 
 static jclass    newtWindowClz=NULL;
 
+static jmethodID insetsChangedID = NULL;
 static jmethodID sizeChangedID = NULL;
 static jmethodID positionChangedID = NULL;
 static jmethodID focusChangedID = NULL;
 static jmethodID visibleChangedID = NULL;
+static jmethodID reparentNotifyID = NULL;
 static jmethodID windowDestroyNotifyID = NULL;
 static jmethodID windowRepaintID = NULL;
-static jmethodID windowReparentedID = NULL;
 static jmethodID enqueueMouseEventID = NULL;
 static jmethodID sendMouseEventID = NULL;
 static jmethodID enqueueKeyEventID = NULL;
@@ -163,7 +187,16 @@ static jmethodID displayCompletedID = NULL;
  * Display
  */
 
-static JNIEnv * x11ErrorHandlerJNIEnv = NULL;
+static JavaVM *jvmHandle = NULL;
+static int jvmVersion = 0;
+
+static void setupJVMVars(JNIEnv * env) {
+    if(0 != (*env)->GetJavaVM(env, &jvmHandle)) {
+        jvmHandle = NULL;
+    }
+    jvmVersion = (*env)->GetVersion(env);
+}
+
 static XErrorHandler origErrorHandler = NULL ;
 
 static int displayDispatchErrorHandler(Display *dpy, XErrorEvent *e)
@@ -175,8 +208,24 @@ static int displayDispatchErrorHandler(Display *dpy, XErrorEvent *e)
     } else if (e->error_code == BadWindow) {
         fprintf(stderr, "         BadWindow (%p): Window probably already removed\n", (void*)e->resourceid);
     } else {
-        NewtCommon_throwNewRuntimeException(x11ErrorHandlerJNIEnv, "NEWT X11 Error: Display %p, Code 0x%X, errno %s", 
-            dpy, e->error_code, strerror(errno));
+        int shallBeDetached = 0;
+        JNIEnv *jniEnv = NULL;
+        const char * errStr = strerror(errno);
+
+        fprintf(stderr, "Info: NEWT X11 Error: Display %p, Code 0x%X, errno %s\n", dpy, e->error_code, errStr);
+
+        jniEnv = NewtCommon_GetJNIEnv(jvmHandle, jvmVersion, &shallBeDetached);
+        if(NULL==jniEnv) {
+            fprintf(stderr, "NEWT X11 Error: null JNIEnv");
+            return;
+        }
+
+        NewtCommon_throwNewRuntimeException(jniEnv, "Info: NEWT X11 Error: Display %p, Code 0x%X, errno %s", 
+                                            dpy, e->error_code, errStr);
+
+        if (shallBeDetached) {
+            (*jvmHandle)->DetachCurrentThread(jvmHandle);
+        }
     }
 
     return 0;
@@ -185,7 +234,7 @@ static int displayDispatchErrorHandler(Display *dpy, XErrorEvent *e)
 static void displayDispatchErrorHandlerEnable(int onoff, JNIEnv * env) {
     if(onoff) {
         if(NULL==origErrorHandler) {
-            x11ErrorHandlerJNIEnv = env;
+            setupJVMVars(env);
             origErrorHandler = XSetErrorHandler(displayDispatchErrorHandler);
         }
     } else {
@@ -197,11 +246,11 @@ static void displayDispatchErrorHandlerEnable(int onoff, JNIEnv * env) {
 }
 
 /*
- * Class:     jogamp_newt_x11_X11Display
+ * Class:     jogamp_newt_driver_x11_X11Display
  * Method:    initIDs
  * Signature: (Z)Z
  */
-JNIEXPORT jboolean JNICALL Java_jogamp_newt_x11_X11Display_initIDs0
+JNIEXPORT jboolean JNICALL Java_jogamp_newt_driver_x11_X11Display_initIDs0
   (JNIEnv *env, jclass clazz)
 {
     jclass c;
@@ -229,11 +278,11 @@ JNIEXPORT jboolean JNICALL Java_jogamp_newt_x11_X11Display_initIDs0
 }
 
 /*
- * Class:     jogamp_newt_x11_X11Display
+ * Class:     jogamp_newt_driver_x11_X11Display
  * Method:    CompleteDisplay
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_jogamp_newt_x11_X11Display_CompleteDisplay0
+JNIEXPORT void JNICALL Java_jogamp_newt_driver_x11_X11Display_CompleteDisplay0
   (JNIEnv *env, jobject obj, jlong display)
 {
     Display * dpy = (Display *)(intptr_t)display;
@@ -244,9 +293,9 @@ JNIEXPORT void JNICALL Java_jogamp_newt_x11_X11Display_CompleteDisplay0
         NewtCommon_FatalError(env, "invalid display connection..");
     }
 
-    javaObjectAtom = (jlong) XInternAtom(dpy, "JOGL_JAVA_OBJECT", False);
+    javaObjectAtom = (jlong) XInternAtom(dpy, "NEWT_JAVA_OBJECT", False);
     if(None==javaObjectAtom) {
-        NewtCommon_throwNewRuntimeException(env, "could not create Atom JOGL_JAVA_OBJECT, bail out!");
+        NewtCommon_throwNewRuntimeException(env, "could not create Atom NEWT_JAVA_OBJECT, bail out!");
         return;
     }
 
@@ -263,6 +312,31 @@ JNIEXPORT void JNICALL Java_jogamp_newt_x11_X11Display_CompleteDisplay0
     (*env)->CallVoidMethod(env, obj, displayCompletedID, javaObjectAtom, windowDeleteAtom);
 }
 
+/*
+ * Class:     jogamp_newt_driver_x11_X11Display
+ * Method:    DisplayRelease0
+ * Signature: (JJJ)V
+ */
+JNIEXPORT void JNICALL Java_jogamp_newt_driver_x11_X11Display_DisplayRelease0
+  (JNIEnv *env, jobject obj, jlong display, jlong javaObjectAtom, jlong windowDeleteAtom)
+{
+    Display * dpy = (Display *)(intptr_t)display;
+    Atom wm_javaobject_atom = (Atom)javaObjectAtom;
+    Atom wm_delete_atom = (Atom)windowDeleteAtom;
+
+    if(dpy==NULL) {
+        NewtCommon_FatalError(env, "invalid display connection..");
+    }
+
+    // nothing to do to free the atoms !
+    (void) wm_javaobject_atom;
+    (void) wm_delete_atom;
+
+    XSync(dpy, True); // discard all pending events
+    DBG_PRINT("X11: X11Display_DisplayRelease dpy %p\n", dpy);
+}
+
+
 /**
  * Window
  */
@@ -300,34 +374,34 @@ static void setJavaWindowProperty(JNIEnv *env, Display *dpy, Window window, jlon
 }
 
 static jobject getJavaWindowProperty(JNIEnv *env, Display *dpy, Window window, jlong javaObjectAtom, Bool showWarning) {
-    Atom actual_type_return;
-    int actual_format_return;
+    Atom actual_type;
+    int actual_format;
     int nitems_32 = ( sizeof(uintptr_t) == 8 ) ? 2 : 1 ;
     unsigned char * jogl_java_object_data_pp = NULL;
     jobject jwindow;
 
     {
-        unsigned long nitems_return = 0;
-        unsigned long bytes_after_return = 0;
+        unsigned long nitems= 0;
+        unsigned long bytes_after= 0;
         jobject jwindow = NULL;
         int res;
 
         res = XGetWindowProperty(dpy, window, (Atom)javaObjectAtom, 0, nitems_32, False, 
-                                 (Atom)javaObjectAtom, &actual_type_return, &actual_format_return, 
-                                 &nitems_return, &bytes_after_return, &jogl_java_object_data_pp);
+                                 (Atom)javaObjectAtom, &actual_type, &actual_format, 
+                                 &nitems, &bytes_after, &jogl_java_object_data_pp);
 
         if ( Success != res ) {
             if(True==showWarning) {
-                fprintf(stderr, "Warning: NEWT X11Window: Could not fetch Atom JOGL_JAVA_OBJECT window property (res %d) nitems_return %ld, bytes_after_return %ld, result 0!\n", res, nitems_return, bytes_after_return);
+                fprintf(stderr, "Warning: NEWT X11Window: Could not fetch Atom NEWT_JAVA_OBJECT window property (res %d) nitems %ld, bytes_after %ld, result 0!\n", res, nitems, bytes_after);
             }
             return NULL;
         }
 
-        if(actual_type_return!=(Atom)javaObjectAtom || nitems_return<nitems_32 || NULL==jogl_java_object_data_pp) {
+        if(actual_type!=(Atom)javaObjectAtom || nitems<nitems_32 || NULL==jogl_java_object_data_pp) {
             XFree(jogl_java_object_data_pp);
             if(True==showWarning) {
-                fprintf(stderr, "Warning: NEWT X11Window: Fetched invalid Atom JOGL_JAVA_OBJECT window property (res %d) nitems_return %ld, bytes_after_return %ld, actual_type_return %ld, JOGL_JAVA_OBJECT %ld, result 0!\n", 
-                res, nitems_return, bytes_after_return, (long)actual_type_return, javaObjectAtom);
+                fprintf(stderr, "Warning: NEWT X11Window: Fetched invalid Atom NEWT_JAVA_OBJECT window property (res %d) nitems %ld, bytes_after %ld, actual_type %ld, NEWT_JAVA_OBJECT %ld, result 0!\n", 
+                res, nitems, bytes_after, (long)actual_type, (long)javaObjectAtom);
             }
             return NULL;
         }
@@ -338,7 +412,7 @@ static jobject getJavaWindowProperty(JNIEnv *env, Display *dpy, Window window, j
 
 #ifdef VERBOSE_ON
     if(JNI_FALSE == (*env)->IsInstanceOf(env, jwindow, newtWindowClz)) {
-        NewtCommon_throwNewRuntimeException(env, "fetched Atom JOGL_JAVA_OBJECT window is not a NEWT Window: javaWindow 0x%X !", jwindow);
+        NewtCommon_throwNewRuntimeException(env, "fetched Atom NEWT_JAVA_OBJECT window is not a NEWT Window: javaWindow 0x%X !", jwindow);
     }
 #endif
     return jwindow;
@@ -353,7 +427,7 @@ static Status NewtWindows_getRootAndParent (Display *dpy, Window w, Window * roo
     if(NULL!=children_return) {
         XFree(children_return);
     }
-    return res;
+    return res; // 0 == res -> Error
 }
 static Window NewtWindows_getRoot (Display *dpy, Window w) {
     Window root_return;
@@ -361,7 +435,7 @@ static Window NewtWindows_getRoot (Display *dpy, Window w) {
     if( 0 != NewtWindows_getRootAndParent(dpy, w, &root_return, &parent_return) ) {
         return root_return;
     }
-    return 0;
+    return 0; // Error
 }
 static Window NewtWindows_getParent (Display *dpy, Window w) {
     Window root_return;
@@ -369,35 +443,127 @@ static Window NewtWindows_getParent (Display *dpy, Window w) {
     if( 0 != NewtWindows_getRootAndParent(dpy, w, &root_return, &parent_return) ) {
         return parent_return;
     }
-    return 0;
+    return 0; // Error
+}
+static Status NewtWindows_getParentPosition (Display *dpy, Window w, int *x_return, int *y_return) {
+    Window root_return;
+    unsigned int width_return, height_return;
+    unsigned int border_width_return;
+    unsigned int depth_return;
+    Window parent = NewtWindows_getParent(dpy, w);
+
+    if(0 != parent) {
+        XGetGeometry(dpy, parent, &root_return, x_return, y_return, &width_return, 
+                               &height_return, &border_width_return, &depth_return);
+        return 1; // OK
+    }
+    return 0; // Error
 }
+static Status NewtWindows_getFrameExtends(Display *dpy, Window window, int *left, int *right, int *top, int *bottom) {
+    Atom actual_type;
+    int actual_format;
+    int nitems_32 = 4; // l, r, t, b
+    unsigned char * frame_extends_data_pp = NULL;
+
+    {
+        Atom _NET_FRAME_EXTENTS = XInternAtom( dpy, "_NET_FRAME_EXTENTS", False );
+        unsigned long nitems = 0;
+        unsigned long bytes_after = 0;
+        int res;
+
+        res = XGetWindowProperty(dpy, window, _NET_FRAME_EXTENTS, 0, nitems_32, False, 
+                                 AnyPropertyType, &actual_type, &actual_format, 
+                                 &nitems, &bytes_after, &frame_extends_data_pp);
 
+        if ( Success != res ) {
+            fprintf(stderr, "Error: NEWT X11Window: Could not fetch Atom _NET_FRAME_EXTENTS window property (res %d) nitems %ld, bytes_after %ld, result 0!\n", res, nitems, bytes_after);
+            return 0; // Error
+        }
+
+        if(nitems<nitems_32 || NULL==frame_extends_data_pp) {
+            XFree(frame_extends_data_pp);
+            // DBG_PRINT( "Warning: NEWT X11Window: Fetched invalid Atom _NET_FRAME_EXTENTS window property (res %d) nitems %ld, bytes_after %ld, actual_type %ld, actual_format %d, _NET_FRAME_EXTENTS %ld, result 0!\n", 
+            //     res, nitems, bytes_after, (long)actual_type, actual_format, _NET_FRAME_EXTENTS);
+            return 0; // Error, but ok - ie window not mapped
+        }
+    }
+    long * extends = (long*) frame_extends_data_pp;
+    *left = (int) *(extends + 0);
+    *right = (int) *(extends + 1);
+    *top = (int) *(extends + 2);
+    *bottom = (int) *(extends + 3);
+
+    // DBG_PRINT( "X11: _NET_FRAME_EXTENTS: window %p insets [ l %d, r %d, t %d, b %d ]\n",
+    //     (void*)window, *left, *right, *top, *bottom);
+        
+    XFree(frame_extends_data_pp);
+
+    return 1; // Ok
+}
+static Status NewtWindows_updateInsets(JNIEnv *env, jobject jwindow, Display *dpy, Window window, int *left, int *right, int *top, int *bottom) {
+    if(0 != NewtWindows_getFrameExtends(dpy, window, left, right, top, bottom)) {
+        DBG_PRINT( "NewtWindows_updateInsets: insets by _NET_FRAME_EXTENTS [ l %d, r %d, t %d, b %d ]\n",
+            *left, *right, *top, *bottom);
+        (*env)->CallVoidMethod(env, jwindow, insetsChangedID, JNI_FALSE, *left, *right, *top, *bottom);
+        return 1; // OK
+    } else if(0 != NewtWindows_getParentPosition (dpy, window, left, top)) {
+        *right = *left; *bottom = *left;
+        DBG_PRINT( "NewtWindows_updateInsets: insets by parent position [ l %d, r %d, t %d, b %d ]\n",
+            *left, *right, *top, *bottom);
+        (*env)->CallVoidMethod(env, jwindow, insetsChangedID, JNI_FALSE, *left, *right, *top, *bottom);
+        return 1; // OK
+    }
+    return 0; // Error
+}
+
+static void NewtWindows_setCWAbove(Display *dpy, Window w) {
+    XWindowChanges xwc;
+    memset(&xwc, 0, sizeof(XWindowChanges));
+    xwc.stack_mode = Above;
+    XConfigureWindow(dpy, w, CWStackMode, &xwc);
+    XSync(dpy, False);
+}
 
 static void NewtWindows_requestFocus (JNIEnv *env, jobject window, Display *dpy, Window w, jboolean force) {
     XWindowAttributes xwa;
     Window focus_return;
     int revert_to_return;
 
+    DBG_PRINT( "X11: requestFocus dpy %p,win %p, force %d\n", dpy, (void*)w, force);
+
     XGetInputFocus(dpy, &focus_return, &revert_to_return);
     if( JNI_TRUE==force || focus_return!=w) {
-        if(  JNI_TRUE==force || JNI_FALSE == (*env)->CallBooleanMethod(env, window, focusActionID) ) {
+        if( JNI_TRUE==force || JNI_FALSE == (*env)->CallBooleanMethod(env, window, focusActionID) ) {
+            DBG_PRINT( "X11: XRaiseWindow dpy %p, win %p\n", dpy, (void*)w);
             XRaiseWindow(dpy, w);
+            NewtWindows_setCWAbove(dpy, w);
             // Avoid 'BadMatch' errors from XSetInputFocus, ie if window is not viewable
             XGetWindowAttributes(dpy, w, &xwa);
             if(xwa.map_state == IsViewable) {
+                DBG_PRINT( "X11: XSetInputFocus dpy %p,win %pd\n", dpy, (void*)w);
                 XSetInputFocus(dpy, w, RevertToParent, CurrentTime);
             }
         }
     }
+    DBG_PRINT( "X11: requestFocus dpy %p,win %p, force %d - FIN\n", dpy, (void*)w, force);
     XSync(dpy, False);
 }
 
+#define DECOR_USE_MWM 1     // works for known WMs
+// #define DECOR_USE_EWMH 1 // haven't seen this to work (NORMAL->POPUP, never gets undecorated)
+
+/* see <http://tonyobryan.com/index.php?article=9> */
 #define MWM_HINTS_DECORATIONS   (1L << 1)
 #define PROP_MWM_HINTS_ELEMENTS 5
 
 static void NewtWindows_setDecorations (Display *dpy, Window w, Bool decorated) {
-    unsigned long mwmhints[PROP_MWM_HINTS_ELEMENTS] = { 0, 0, 0, 0, 0 }; // flags, functions, decorations, input_mode, status
-    Atom _MOTIF_WM_HINTS_DECORATIONS = XInternAtom( dpy, "_MOTIF_WM_HINTS", False );
+
+#ifdef DECOR_USE_MWM
+    unsigned long mwmhints[PROP_MWM_HINTS_ELEMENTS] = { MWM_HINTS_DECORATIONS, 0, decorated, 0, 0 }; // flags, functions, decorations, input_mode, status
+    Atom _MOTIF_WM_HINTS = XInternAtom( dpy, "_MOTIF_WM_HINTS", False );
+#endif
+
+#ifdef DECOR_USE_EWMH
     Atom _NET_WM_WINDOW_TYPE = XInternAtom( dpy, "_NET_WM_WINDOW_TYPE", False );
     Atom types[3]={0};
     int ntypes=0;
@@ -405,66 +571,155 @@ static void NewtWindows_setDecorations (Display *dpy, Window w, Bool decorated)
         types[ntypes++] = XInternAtom( dpy, "_NET_WM_WINDOW_TYPE_NORMAL", False );
     } else {
         types[ntypes++] = XInternAtom( dpy, "_NET_WM_WINDOW_TYPE_POPUP_MENU", False );
-        types[ntypes++] = XInternAtom( dpy, "_NET_WM_WINDOW_TYPE_NORMAL", False );
     }
+#endif
 
-    mwmhints[0] = MWM_HINTS_DECORATIONS;
-    mwmhints[2] = decorated ;
+#ifdef DECOR_USE_MWM
+    XChangeProperty( dpy, w, _MOTIF_WM_HINTS, _MOTIF_WM_HINTS, 32, PropModeReplace, (unsigned char *)&mwmhints, PROP_MWM_HINTS_ELEMENTS);
+#endif
 
-    XChangeProperty( dpy, w, _MOTIF_WM_HINTS_DECORATIONS, _MOTIF_WM_HINTS_DECORATIONS, 32, PropModeReplace, (unsigned char *)&mwmhints, PROP_MWM_HINTS_ELEMENTS);
+#ifdef DECOR_USE_EWMH
     XChangeProperty( dpy, w, _NET_WM_WINDOW_TYPE, XA_ATOM, 32, PropModeReplace, (unsigned char *)&types, ntypes);
+#endif
+
+    XSync(dpy, False);
+}
+
+static void NewtWindows_setNormalWindowEWMH (Display *dpy, Window w) {
+    Atom _NET_WM_WINDOW_TYPE = XInternAtom( dpy, "_NET_WM_WINDOW_TYPE", False );
+    Atom types[1]={0};
+    types[0] = XInternAtom( dpy, "_NET_WM_WINDOW_TYPE_NORMAL", False );
+    XChangeProperty( dpy, w, _NET_WM_WINDOW_TYPE, XA_ATOM, 32, PropModeReplace, (unsigned char *)&types, 1);
+    XSync(dpy, False);
 }
 
 #define _NET_WM_STATE_REMOVE 0
 #define _NET_WM_STATE_ADD 1
 
-static void NewtWindows_setFullscreen (Display *dpy, Window root, Window w, Bool fullscreen) {
+#define _NET_WM_FULLSCREEN ( 1 << 0 )
+#define _NET_WM_ABOVE      ( 1 << 1 )
+
+/**
+ * Set fullscreen using Extended Window Manager Hints (EWMH)
+ *
+ * Fullscreen on:
+ *   Be aware that _NET_WM_STATE_FULLSCREEN requires a mapped window
+ *   which shall be on the top of the stack to work reliable.
+ *
+ * The WM will internally save the size and position when entering FS
+ * and resets it when leaving FS.
+ * The same is assumed for the decoration state.
+ */
+static int NewtWindows_isFullscreenEWMHSupported (Display *dpy, Window w) {
+    Atom _NET_WM_ALLOWED_ACTIONS = XInternAtom( dpy, "_NET_WM_ALLOWED_ACTIONS", False );
+    Atom _NET_WM_ACTION_FULLSCREEN = XInternAtom( dpy, "_NET_WM_ACTION_FULLSCREEN", False );
+    Atom _NET_WM_ACTION_ABOVE = XInternAtom( dpy, "_NET_WM_ACTION_ABOVE", False );
+    Atom * actions;
+    Atom type;
+    unsigned long action_len, remain;
+    int res = 0, form, i;
+    Status s;
+
+    if ( Success == (s = XGetWindowProperty(dpy, w, _NET_WM_ALLOWED_ACTIONS, 0, 1024, False, AnyPropertyType,
+                                            &type, &form, &action_len, &remain, (unsigned char**)&actions)) ) {
+        for(i=0; i<action_len; i++) {
+            if(_NET_WM_ACTION_FULLSCREEN == actions[i]) {
+                DBG_PRINT( "**************** X11: FS EWMH CHECK[%d]: _NET_WM_ACTION_FULLSCREEN (*)\n", i);
+                res |= _NET_WM_FULLSCREEN ;
+            } else if(_NET_WM_ACTION_ABOVE == actions[i]) {
+                DBG_PRINT( "**************** X11: FS EWMH CHECK[%d]: _NET_WM_ACTION_ABOVE (*)\n", i);
+                res |= _NET_WM_ABOVE ;
+            }
+#ifdef VERBOSE_ON
+            else {
+                char * astr = XGetAtomName(dpy, actions[i]);
+                DBG_PRINT( "**************** X11: FS EWMH CHECK[%d]: %s (unused)\n", i, astr);
+                XFree(astr);
+            }
+#endif
+        }
+        DBG_PRINT( "**************** X11: FS EWMH CHECK: 0x%X\n", res);
+    } else {
+        DBG_PRINT( "**************** X11: FS EWMH CHECK: XGetWindowProperty failed: %d\n", s);
+    }
+    // above code doesn't work reliable on KDE4 ...
+    res = _NET_WM_FULLSCREEN | _NET_WM_ABOVE ;
+    return res;
+}
+
+static Bool NewtWindows_setFullscreenEWMH (Display *dpy, Window root, Window w, int ewmhFlags, Bool isVisible, Bool enable) {
     Atom _NET_WM_STATE = XInternAtom( dpy, "_NET_WM_STATE", False );
     Atom _NET_WM_STATE_ABOVE = XInternAtom( dpy, "_NET_WM_STATE_ABOVE", False );
     Atom _NET_WM_STATE_FULLSCREEN = XInternAtom( dpy, "_NET_WM_STATE_FULLSCREEN", False );
-    
-    Atom types[2]={0};
-    int ntypes=0;
+    int ewmhMask = NewtWindows_isFullscreenEWMHSupported(dpy, w);
+    Bool res = False;
 
-    types[ntypes++] = _NET_WM_STATE_FULLSCREEN;
-    types[ntypes++] = _NET_WM_STATE_ABOVE;
+    if(0 == ewmhMask) { 
+        return res;
+    }
 
-    XEvent xev;
-    memset ( &xev, 0, sizeof(xev) );
-    
-    xev.type = ClientMessage;
-    xev.xclient.window = w;
-    xev.xclient.message_type = _NET_WM_STATE;
-    xev.xclient.format = 32;
-        
-    if(True==fullscreen) {
-        xev.xclient.data.l[0] = _NET_WM_STATE_ADD;
-        xev.xclient.data.l[1] = _NET_WM_STATE_FULLSCREEN;
-        xev.xclient.data.l[2] = _NET_WM_STATE_ABOVE;
-        xev.xclient.data.l[3] = 1; //source indication for normal applications
+    if(!isVisible && True==enable) {
+        Atom types[2]={0};
+        int ntypes=0;
+
+        if( 0 != ( ( _NET_WM_FULLSCREEN & ewmhMask ) & ewmhFlags ) )  {
+            types[ntypes++] = _NET_WM_STATE_FULLSCREEN;
+        }
+        if( 0 != ( ( _NET_WM_ABOVE & ewmhMask ) & ewmhFlags ) )  {
+            types[ntypes++] = _NET_WM_STATE_ABOVE;
+        }
+        if(ntypes>0) {
+            XChangeProperty( dpy, w, _NET_WM_STATE, XA_ATOM, 32, PropModeReplace, (unsigned char *)&types, ntypes);
+            XSync(dpy, False);
+            res = True;
+        }
     } else {
-        xev.xclient.data.l[0] = _NET_WM_STATE_REMOVE;
-        xev.xclient.data.l[1] = _NET_WM_STATE_FULLSCREEN;
-        xev.xclient.data.l[2] = _NET_WM_STATE_ABOVE;
+        if(enable) {
+            NewtWindows_setCWAbove(dpy, w);
+        }
+        XEvent xev;
+        long mask = SubstructureNotifyMask | SubstructureRedirectMask ;
+        int i=0;
+        
+        memset ( &xev, 0, sizeof(xev) );
+        
+        xev.type = ClientMessage;
+        xev.xclient.window = w;
+        xev.xclient.message_type = _NET_WM_STATE;
+        xev.xclient.format = 32;
+            
+        xev.xclient.data.l[i++] = ( True == enable ) ? _NET_WM_STATE_ADD : _NET_WM_STATE_REMOVE ;
+        if( 0 != ( ( _NET_WM_FULLSCREEN & ewmhMask ) & ewmhFlags ) )  {
+            xev.xclient.data.l[i++] = _NET_WM_STATE_FULLSCREEN;
+        }
+        if( 0 != ( ( _NET_WM_ABOVE & ewmhMask ) & ewmhFlags ) )  {
+            xev.xclient.data.l[i++] = _NET_WM_STATE_ABOVE;
+        }
         xev.xclient.data.l[3] = 1; //source indication for normal applications
-    }
 
-    XChangeProperty( dpy, w, _NET_WM_STATE, XA_ATOM, 32, PropModeReplace, (unsigned char *)&types, ntypes);
+        if(i>0) {
+            XSendEvent ( dpy, root, False, mask, &xev );
+            res = True;
+        }
+    }
     XSync(dpy, False);
-    XSendEvent (dpy, root, False, SubstructureRedirectMask | SubstructureNotifyMask, &xev );
+    DBG_PRINT( "X11: reconfigureWindow0 FULLSCREEN EWMH ON %d, ewmhMask 0x%X, ewmhFlags 0x%X, visible %d: %d\n", 
+        enable, ewmhMask, ewmhFlags, isVisible, res);
+    return res;
 }
 
 #define USE_SENDIO_DIRECT 1
 
 /*
- * Class:     jogamp_newt_x11_X11Display
+ * Class:     jogamp_newt_driver_x11_X11Display
  * Method:    DispatchMessages
  * Signature: (JIJJ)V
  */
-JNIEXPORT void JNICALL Java_jogamp_newt_x11_X11Display_DispatchMessages0
-  (JNIEnv *env, jobject obj, jlong display, jlong javaObjectAtom, jlong wmDeleteAtom)
+JNIEXPORT void JNICALL Java_jogamp_newt_driver_x11_X11Display_DispatchMessages0
+  (JNIEnv *env, jobject obj, jlong display, jlong javaObjectAtom, jlong windowDeleteAtom)
 {
     Display * dpy = (Display *) (intptr_t) display;
+    Atom wm_delete_atom = (Atom)windowDeleteAtom;
     int num_events = 100;
 
     if ( NULL == dpy ) {
@@ -475,14 +730,16 @@ JNIEXPORT void JNICALL Java_jogamp_newt_x11_X11Display_DispatchMessages0
     while( num_events > 0 ) {
         jobject jwindow = NULL;
         XEvent evt;
-        KeySym keySym;
-        char keyChar;
+        KeySym keySym = 0;
+        jint modifiers = 0;
+        char keyChar = 0;
         char text[255];
 
-        // num_events = XPending(dpy); // I/O Flush ..
-        // num_events = XEventsQueued(dpy, QueuedAfterFlush); // I/O Flush only of no already queued events are available
-        // num_events = XEventsQueued(dpy, QueuedAlready); // no I/O Flush at all, doesn't work on some cards (eg ATI)
-        if ( 0 >= XEventsQueued(dpy, QueuedAfterFlush) ) {
+        // XEventsQueued(dpy, X):
+        //   QueuedAlready                 : No I/O Flush or system call  doesn't work on some cards (eg ATI) ?) 
+        //   QueuedAfterFlush == XPending(): I/O Flush only if no already queued events are available
+        //   QueuedAfterReading            : QueuedAlready + if queue==0, attempt to read more ..
+        if ( 0 >= XPending(dpy) ) {
             // DBG_PRINT( "X11: DispatchMessages 0x%X - Leave 1\n", dpy); 
             return;
         }
@@ -500,7 +757,7 @@ JNIEXPORT void JNICALL Java_jogamp_newt_x11_X11Display_DispatchMessages0
             return ;
         }
 
-        // DBG_PRINT( "X11: DispatchMessages dpy %p, win %p, Event %d\n", (void*)dpy, (void*)evt.xany.window, evt.type);
+        // DBG_PRINT( "X11: DispatchMessages dpy %p, win %p, Event %d\n", (void*)dpy, (void*)evt.xany.window, (int)evt.type);
 
         displayDispatchErrorHandlerEnable(1, env);
 
@@ -524,11 +781,23 @@ JNIEXPORT void JNICALL Java_jogamp_newt_x11_X11Display_DispatchMessages0
             case KeyRelease:
             case KeyPress:
                 if(XLookupString(&evt.xkey,text,255,&keySym,0)==1) {
+                    KeySym lower_return = 0, upper_return = 0;
                     keyChar=text[0];
+                    XConvertCase(keySym, &lower_return, &upper_return);
+                    // always return upper case, set modifier masks (SHIFT, ..)
+                    keySym = upper_return;
+                    modifiers = X11InputState2NewtModifiers(evt.xkey.state);
                 } else {
                     keyChar=0;
                 }
                 break;
+
+            case ButtonPress:
+            case ButtonRelease:
+            case MotionNotify:
+                modifiers = X11InputState2NewtModifiers(evt.xbutton.state);
+                break;
+
             default:
                 break;
         }
@@ -537,84 +806,60 @@ JNIEXPORT void JNICALL Java_jogamp_newt_x11_X11Display_DispatchMessages0
             case ButtonPress:
                 (*env)->CallVoidMethod(env, jwindow, enqueueRequestFocusID, JNI_FALSE);
                 #ifdef USE_SENDIO_DIRECT
-                (*env)->CallVoidMethod(env, jwindow, sendMouseEventID, 
-                                      (jint) EVENT_MOUSE_PRESSED, 
-                                      (jint) evt.xbutton.state, 
+                (*env)->CallVoidMethod(env, jwindow, sendMouseEventID, (jint) EVENT_MOUSE_PRESSED, 
+                                      modifiers,
                                       (jint) evt.xbutton.x, (jint) evt.xbutton.y, (jint) evt.xbutton.button, 0 /*rotation*/);
                 #else
-                (*env)->CallVoidMethod(env, jwindow, enqueueMouseEventID, 
-                                      JNI_FALSE,
-                                      (jint) EVENT_MOUSE_PRESSED, 
-                                      (jint) evt.xbutton.state, 
+                (*env)->CallVoidMethod(env, jwindow, enqueueMouseEventID, JNI_FALSE, (jint) EVENT_MOUSE_PRESSED, 
+                                      modifiers,
                                       (jint) evt.xbutton.x, (jint) evt.xbutton.y, (jint) evt.xbutton.button, 0 /*rotation*/);
                 #endif
                 break;
             case ButtonRelease:
                 #ifdef USE_SENDIO_DIRECT
-                (*env)->CallVoidMethod(env, jwindow, sendMouseEventID, 
-                                      (jint) EVENT_MOUSE_RELEASED, 
-                                      (jint) evt.xbutton.state, 
+                (*env)->CallVoidMethod(env, jwindow, sendMouseEventID, (jint) EVENT_MOUSE_RELEASED, 
+                                      modifiers,
                                       (jint) evt.xbutton.x, (jint) evt.xbutton.y, (jint) evt.xbutton.button, 0 /*rotation*/);
                 #else
-                (*env)->CallVoidMethod(env, jwindow, enqueueMouseEventID, 
-                                      JNI_FALSE,
-                                      (jint) EVENT_MOUSE_RELEASED, 
-                                      (jint) evt.xbutton.state, 
+                (*env)->CallVoidMethod(env, jwindow, enqueueMouseEventID, JNI_FALSE, (jint) EVENT_MOUSE_RELEASED, 
+                                      modifiers,
                                       (jint) evt.xbutton.x, (jint) evt.xbutton.y, (jint) evt.xbutton.button, 0 /*rotation*/);
                 #endif
                 break;
             case MotionNotify:
                 #ifdef USE_SENDIO_DIRECT
-                (*env)->CallVoidMethod(env, jwindow, sendMouseEventID, 
-                                      (jint) EVENT_MOUSE_MOVED, 
-                                      (jint) evt.xmotion.state, 
+                (*env)->CallVoidMethod(env, jwindow, sendMouseEventID, (jint) EVENT_MOUSE_MOVED, 
+                                      modifiers,
                                       (jint) evt.xmotion.x, (jint) evt.xmotion.y, (jint) 0, 0 /*rotation*/); 
                 #else
-                (*env)->CallVoidMethod(env, jwindow, enqueueMouseEventID, 
-                                      JNI_FALSE,
-                                      (jint) EVENT_MOUSE_MOVED, 
-                                      (jint) evt.xmotion.state, 
+                (*env)->CallVoidMethod(env, jwindow, enqueueMouseEventID, JNI_FALSE, (jint) EVENT_MOUSE_MOVED, 
+                                      modifiers,
                                       (jint) evt.xmotion.x, (jint) evt.xmotion.y, (jint) 0, 0 /*rotation*/); 
                 #endif
                 break;
             case KeyPress:
                 #ifdef USE_SENDIO_DIRECT
-                (*env)->CallVoidMethod(env, jwindow, sendKeyEventID, 
-                                      (jint) EVENT_KEY_PRESSED, 
-                                      (jint) evt.xkey.state, 
-                                      X11KeySym2NewtVKey(keySym), (jchar) keyChar);
+                (*env)->CallVoidMethod(env, jwindow, sendKeyEventID, (jint) EVENT_KEY_PRESSED, 
+                                      modifiers, X11KeySym2NewtVKey(keySym), (jchar) keyChar);
                 #else
-                (*env)->CallVoidMethod(env, jwindow, enqueueKeyEventID,
-                                      JNI_FALSE,
-                                      (jint) EVENT_KEY_PRESSED, 
-                                      (jint) evt.xkey.state, 
-                                      X11KeySym2NewtVKey(keySym), (jchar) keyChar);
+                (*env)->CallVoidMethod(env, jwindow, enqueueKeyEventID, JNI_FALSE, (jint) EVENT_KEY_PRESSED, 
+                                      modifiers, X11KeySym2NewtVKey(keySym), (jchar) keyChar);
                 #endif
 
                 break;
             case KeyRelease:
                 #ifdef USE_SENDIO_DIRECT
-                (*env)->CallVoidMethod(env, jwindow, sendKeyEventID, 
-                                      (jint) EVENT_KEY_RELEASED, 
-                                      (jint) evt.xkey.state, 
-                                      X11KeySym2NewtVKey(keySym), (jchar) keyChar);
-
-                (*env)->CallVoidMethod(env, jwindow, sendKeyEventID, 
-                                      (jint) EVENT_KEY_TYPED, 
-                                      (jint) evt.xkey.state, 
-                                      (jint) -1, (jchar) keyChar);
+                (*env)->CallVoidMethod(env, jwindow, sendKeyEventID, (jint) EVENT_KEY_RELEASED, 
+                                      modifiers, X11KeySym2NewtVKey(keySym), (jchar) keyChar);
+
+                (*env)->CallVoidMethod(env, jwindow, sendKeyEventID, (jint) EVENT_KEY_TYPED, 
+                                      modifiers, (jint) -1, (jchar) keyChar);
                 #else
-                (*env)->CallVoidMethod(env, jwindow, enqueueKeyEventID,
-                                      JNI_FALSE,
-                                      (jint) EVENT_KEY_RELEASED, 
-                                      (jint) evt.xkey.state, 
-                                      X11KeySym2NewtVKey(keySym), (jchar) keyChar);
-
-                (*env)->CallVoidMethod(env, jwindow, enqueueKeyEventID,
-                                      JNI_FALSE,
-                                      (jint) EVENT_KEY_TYPED, 
-                                      (jint) evt.xkey.state, 
-                                      (jint) -1, (jchar) keyChar);
+                (*env)->CallVoidMethod(env, jwindow, enqueueKeyEventID, JNI_FALSE, (jint) EVENT_KEY_RELEASED, 
+                                      modifiers, X11KeySym2NewtVKey(keySym), (jchar) keyChar);
+
+                (*env)->CallVoidMethod(env, jwindow, enqueueKeyEventID, JNI_FALSE, (jint) EVENT_KEY_TYPED, 
+                                      modifiers, (jint) -1, (jchar) keyChar);
                 #endif
 
                 break;
@@ -636,29 +881,35 @@ JNIEXPORT void JNICALL Java_jogamp_newt_x11_X11Display_DispatchMessages0
                             evt.xconfigure.override_redirect, evt.xconfigure.window != evt.xconfigure.event);
                 if ( evt.xconfigure.window == evt.xconfigure.event ) {
                     // ignore child window change notification
-                    (*env)->CallVoidMethod(env, jwindow, sizeChangedID, 
+                    {
+                        // update insets
+                        int left, right, top, bottom;
+                        NewtWindows_updateInsets(env, jwindow, dpy, evt.xany.window, &left, &right, &top, &bottom);
+                    }
+                    (*env)->CallVoidMethod(env, jwindow, sizeChangedID, JNI_FALSE,
                                             (jint) evt.xconfigure.width, (jint) evt.xconfigure.height, JNI_FALSE);
-                    (*env)->CallVoidMethod(env, jwindow, positionChangedID, 
+                    (*env)->CallVoidMethod(env, jwindow, positionChangedID, JNI_FALSE,
                                             (jint) evt.xconfigure.x, (jint) evt.xconfigure.y);
                 }
                 break;
             case ClientMessage:
-                if (evt.xclient.send_event==True && evt.xclient.data.l[0]==(Atom)wmDeleteAtom) {
+                if (evt.xclient.send_event==True && evt.xclient.data.l[0]==wm_delete_atom) { // windowDeleteAtom
                     DBG_PRINT( "X11: event . ClientMessage call %p type 0x%X !!!\n", 
                         (void*)evt.xclient.window, (unsigned int)evt.xclient.message_type);
                     (*env)->CallVoidMethod(env, jwindow, windowDestroyNotifyID);
                     // Called by Window.java: CloseWindow(); 
+                    num_events = 0; // end loop in case of destroyed display
                 }
                 break;
 
             case FocusIn:
                 DBG_PRINT( "X11: event . FocusIn call %p\n", (void*)evt.xvisibility.window);
-                (*env)->CallVoidMethod(env, jwindow, focusChangedID, JNI_TRUE);
+                (*env)->CallVoidMethod(env, jwindow, focusChangedID, JNI_FALSE, JNI_TRUE);
                 break;
 
             case FocusOut:
                 DBG_PRINT( "X11: event . FocusOut call %p\n", (void*)evt.xvisibility.window);
-                (*env)->CallVoidMethod(env, jwindow, focusChangedID, JNI_FALSE);
+                (*env)->CallVoidMethod(env, jwindow, focusChangedID, JNI_FALSE, JNI_FALSE);
                 break;
 
             case Expose:
@@ -666,7 +917,7 @@ JNIEXPORT void JNICALL Java_jogamp_newt_x11_X11Display_DispatchMessages0
                     evt.xexpose.x, evt.xexpose.y, evt.xexpose.width, evt.xexpose.height, evt.xexpose.count);
 
                 if (evt.xexpose.count == 0 && evt.xexpose.width > 0 && evt.xexpose.height > 0) {
-                    (*env)->CallVoidMethod(env, jwindow, windowRepaintID, 
+                    (*env)->CallVoidMethod(env, jwindow, windowRepaintID, JNI_FALSE,
                         evt.xexpose.x, evt.xexpose.y, evt.xexpose.width, evt.xexpose.height);
                 }
                 break;
@@ -677,7 +928,12 @@ JNIEXPORT void JNICALL Java_jogamp_newt_x11_X11Display_DispatchMessages0
                     evt.xmap.event!=evt.xmap.window);
                 if( evt.xmap.event == evt.xmap.window ) {
                     // ignore child window notification
-                    (*env)->CallVoidMethod(env, jwindow, visibleChangedID, JNI_TRUE);
+                    {
+                        // update insets
+                        int left, right, top, bottom;
+                        NewtWindows_updateInsets(env, jwindow, dpy, evt.xany.window, &left, &right, &top, &bottom);
+                    }
+                    (*env)->CallVoidMethod(env, jwindow, visibleChangedID, JNI_FALSE, JNI_TRUE);
                 }
                 break;
 
@@ -687,7 +943,7 @@ JNIEXPORT void JNICALL Java_jogamp_newt_x11_X11Display_DispatchMessages0
                     evt.xunmap.event!=evt.xunmap.window);
                 if( evt.xunmap.event == evt.xunmap.window ) {
                     // ignore child window notification
-                    (*env)->CallVoidMethod(env, jwindow, visibleChangedID, JNI_FALSE);
+                    (*env)->CallVoidMethod(env, jwindow, visibleChangedID, JNI_FALSE, JNI_FALSE);
                 }
                 break;
 
@@ -714,13 +970,13 @@ JNIEXPORT void JNICALL Java_jogamp_newt_x11_X11Display_DispatchMessages0
                         parentResult = (jlong) (intptr_t) evt.xreparent.parent;
                     }
                     #ifdef VERBOSE_ON
-                        DBG_PRINT( "X11: event . ReparentNotify: call OldParent %p (root %p, top %p), NewParent %p (root %p, top %p), Window %p (root %p, top %p)\n", 
+                        DBG_PRINT( "X11: event . ReparentNotify: call %d/%d OldParent %p (root %p, top %p), NewParent %p (root %p, top %p), Window %p (root %p, top %p)\n", 
+                            evt.xreparent.x, evt.xreparent.y, 
                             (void*)evt.xreparent.event, (void*)oldParentRoot, (void*)oldParentTopParent,
                             (void*)evt.xreparent.parent, (void*)parentRoot, (void*)parentTopParent,
                             (void*)evt.xreparent.window, (void*)winRoot, (void*)winTopParent);
                     #endif
-
-                    (*env)->CallVoidMethod(env, jwindow, windowReparentedID, parentResult);
+                    (*env)->CallVoidMethod(env, jwindow, reparentNotifyID, (jlong)evt.xreparent.parent);
                 }
                 break;
 
@@ -738,11 +994,11 @@ JNIEXPORT void JNICALL Java_jogamp_newt_x11_X11Display_DispatchMessages0
  */
 
 /*
- * Class:     jogamp_newt_x11_X11Screen
+ * Class:     jogamp_newt_driver_x11_X11Screen
  * Method:    GetScreen
  * Signature: (JI)J
  */
-JNIEXPORT jlong JNICALL Java_jogamp_newt_x11_X11Screen_GetScreen0
+JNIEXPORT jlong JNICALL Java_jogamp_newt_driver_x11_X11Screen_GetScreen0
   (JNIEnv *env, jclass clazz, jlong display, jint screen_index)
 {
     Display * dpy = (Display *)(intptr_t)display;
@@ -754,25 +1010,22 @@ JNIEXPORT jlong JNICALL Java_jogamp_newt_x11_X11Screen_GetScreen0
         NewtCommon_FatalError(env, "invalid display connection..");
     }
 
-    scrn = ScreenOfDisplay(dpy,screen_index);
-    if(scrn==NULL) {
-        scrn=DefaultScreenOfDisplay(dpy);
-    }
+    scrn = ScreenOfDisplay(dpy, screen_index);
     if(scrn==NULL) {
-        fprintf(stderr, "couldn't get screen ..\n");
+        fprintf(stderr, "couldn't get screen idx %d\n", screen_index);
     }
-    DBG_PRINT("X11: X11Screen_GetScreen0 scrn %p DONE\n", scrn);
+    DBG_PRINT("X11: X11Screen_GetScreen0 idx %d -> scrn %p DONE\n", screen_index, scrn);
     return (jlong) (intptr_t) scrn;
 }
 
-JNIEXPORT jint JNICALL Java_jogamp_newt_x11_X11Screen_getWidth0
+JNIEXPORT jint JNICALL Java_jogamp_newt_driver_x11_X11Screen_getWidth0
   (JNIEnv *env, jclass clazz, jlong display, jint scrn_idx)
 {
     Display * dpy = (Display *) (intptr_t) display;
     return (jint) XDisplayWidth( dpy, scrn_idx);
 }
 
-JNIEXPORT jint JNICALL Java_jogamp_newt_x11_X11Screen_getHeight0
+JNIEXPORT jint JNICALL Java_jogamp_newt_driver_x11_X11Screen_getHeight0
   (JNIEnv *env, jclass clazz, jlong display, jint scrn_idx)
 {
     Display * dpy = (Display *) (intptr_t) display;
@@ -812,11 +1065,11 @@ static int NewtScreen_XRotation2Degree(JNIEnv *env, int xrotation) {
 }
 
 /*
- * Class:     jogamp_newt_x11_X11Screen
+ * Class:     jogamp_newt_driver_x11_X11Screen
  * Method:    getAvailableScreenModeRotations0
  * Signature: (JI)I
  */
-JNIEXPORT jintArray JNICALL Java_jogamp_newt_x11_X11Screen_getAvailableScreenModeRotations0
+JNIEXPORT jintArray JNICALL Java_jogamp_newt_driver_x11_X11Screen_getAvailableScreenModeRotations0
   (JNIEnv *env, jclass clazz, jlong display, jint scrn_idx)
 {
     Display *dpy = (Display *) (intptr_t) display;
@@ -862,18 +1115,18 @@ JNIEXPORT jintArray JNICALL Java_jogamp_newt_x11_X11Screen_getAvailableScreenMod
 }
 
 /*
- * Class:     jogamp_newt_x11_X11Screen
+ * Class:     jogamp_newt_driver_x11_X11Screen
  * Method:    getNumScreenModeResolution0
  * Signature: (JI)I
  */
-JNIEXPORT jint JNICALL Java_jogamp_newt_x11_X11Screen_getNumScreenModeResolutions0
+JNIEXPORT jint JNICALL Java_jogamp_newt_driver_x11_X11Screen_getNumScreenModeResolutions0
   (JNIEnv *env, jclass clazz, jlong display, jint scrn_idx)
 {
     Display *dpy = (Display *) (intptr_t) display;
     Window root = RootWindow(dpy, (int)scrn_idx);
     
     if(False == NewtScreen_hasRANDR(dpy)) {
-        DBG_PRINT("Java_jogamp_newt_x11_X11Screen_getNumScreenModeResolutions0: RANDR not available\n");
+        DBG_PRINT("Java_jogamp_newt_driver_x11_X11Screen_getNumScreenModeResolutions0: RANDR not available\n");
         return 0;
     }
 
@@ -884,18 +1137,18 @@ JNIEXPORT jint JNICALL Java_jogamp_newt_x11_X11Screen_getNumScreenModeResolution
 }
 
 /*
- * Class:     jogamp_newt_x11_X11Screen
+ * Class:     jogamp_newt_driver_x11_X11Screen
  * Method:    getScreenModeResolutions0
  * Signature: (JII)[I
  */
-JNIEXPORT jintArray JNICALL Java_jogamp_newt_x11_X11Screen_getScreenModeResolution0
+JNIEXPORT jintArray JNICALL Java_jogamp_newt_driver_x11_X11Screen_getScreenModeResolution0
   (JNIEnv *env, jclass clazz, jlong display, jint scrn_idx, jint resMode_idx)
 {
     Display *dpy = (Display *) (intptr_t) display;
     Window root = RootWindow(dpy, (int)scrn_idx);
     
     if(False == NewtScreen_hasRANDR(dpy)) {
-        DBG_PRINT("Java_jogamp_newt_x11_X11Screen_getScreenModeResolution0: RANDR not available\n");
+        DBG_PRINT("Java_jogamp_newt_driver_x11_X11Screen_getScreenModeResolution0: RANDR not available\n");
         return (*env)->NewIntArray(env, 0);
     }
 
@@ -927,18 +1180,18 @@ JNIEXPORT jintArray JNICALL Java_jogamp_newt_x11_X11Screen_getScreenModeResoluti
 }
 
 /*
- * Class:     jogamp_newt_x11_X11Screen
+ * Class:     jogamp_newt_driver_x11_X11Screen
  * Method:    getScreenModeRates0
  * Signature: (JII)[I
  */
-JNIEXPORT jintArray JNICALL Java_jogamp_newt_x11_X11Screen_getScreenModeRates0
+JNIEXPORT jintArray JNICALL Java_jogamp_newt_driver_x11_X11Screen_getScreenModeRates0
   (JNIEnv *env, jclass clazz, jlong display, jint scrn_idx, jint resMode_idx)
 {
     Display *dpy = (Display *) (intptr_t) display;
     Window root = RootWindow(dpy, (int)scrn_idx);
     
     if(False == NewtScreen_hasRANDR(dpy)) {
-        DBG_PRINT("Java_jogamp_newt_x11_X11Screen_getScreenModeRates0: RANDR not available\n");
+        DBG_PRINT("Java_jogamp_newt_driver_x11_X11Screen_getScreenModeRates0: RANDR not available\n");
         return (*env)->NewIntArray(env, 0);
     }
 
@@ -971,18 +1224,18 @@ JNIEXPORT jintArray JNICALL Java_jogamp_newt_x11_X11Screen_getScreenModeRates0
 }
 
 /*
- * Class:     jogamp_newt_x11_X11Screen
+ * Class:     jogamp_newt_driver_x11_X11Screen
  * Method:    getCurrentScreenRate0
  * Signature: (JI)I
  */
-JNIEXPORT jint JNICALL Java_jogamp_newt_x11_X11Screen_getCurrentScreenRate0
+JNIEXPORT jint JNICALL Java_jogamp_newt_driver_x11_X11Screen_getCurrentScreenRate0
   (JNIEnv *env, jclass clazz, jlong display, jint scrn_idx) 
 {
     Display *dpy = (Display *) (intptr_t) display;
     Window root = RootWindow(dpy, (int)scrn_idx);
     
     if(False == NewtScreen_hasRANDR(dpy)) {
-        DBG_PRINT("Java_jogamp_newt_x11_X11Screen_getCurrentScreenRate0: RANDR not available\n");
+        DBG_PRINT("Java_jogamp_newt_driver_x11_X11Screen_getCurrentScreenRate0: RANDR not available\n");
         return -1;
     }
 
@@ -997,18 +1250,18 @@ JNIEXPORT jint JNICALL Java_jogamp_newt_x11_X11Screen_getCurrentScreenRate0
 }
 
 /*
- * Class:     jogamp_newt_x11_X11Screen
+ * Class:     jogamp_newt_driver_x11_X11Screen
  * Method:    getCurrentScreenRotation0
  * Signature: (JI)I
  */
-JNIEXPORT jint JNICALL Java_jogamp_newt_x11_X11Screen_getCurrentScreenRotation0
+JNIEXPORT jint JNICALL Java_jogamp_newt_driver_x11_X11Screen_getCurrentScreenRotation0
   (JNIEnv *env, jclass clazz, jlong display, jint scrn_idx)
 {
     Display *dpy = (Display *) (intptr_t) display;
     Window root = RootWindow(dpy, (int)scrn_idx);
     
     if(False == NewtScreen_hasRANDR(dpy)) {
-        DBG_PRINT("Java_jogamp_newt_x11_X11Screen_getCurrentScreenRotation0: RANDR not available\n");
+        DBG_PRINT("Java_jogamp_newt_driver_x11_X11Screen_getCurrentScreenRotation0: RANDR not available\n");
         return -1;
     }
 
@@ -1026,18 +1279,18 @@ JNIEXPORT jint JNICALL Java_jogamp_newt_x11_X11Screen_getCurrentScreenRotation0
 
 
 /*
- * Class:     jogamp_newt_x11_X11Screen
+ * Class:     jogamp_newt_driver_x11_X11Screen
  * Method:    getCurrentScreenResolutionIndex0
  * Signature: (JI)I
  */
-JNIEXPORT jint JNICALL Java_jogamp_newt_x11_X11Screen_getCurrentScreenResolutionIndex0
+JNIEXPORT jint JNICALL Java_jogamp_newt_driver_x11_X11Screen_getCurrentScreenResolutionIndex0
   (JNIEnv *env, jclass clazz, jlong display, jint scrn_idx)
 {
    Display *dpy = (Display *) (intptr_t) display;
    Window root = RootWindow(dpy, (int)scrn_idx);
   
    if(False == NewtScreen_hasRANDR(dpy)) {
-       DBG_PRINT("Java_jogamp_newt_x11_X11Screen_getCurrentScreenResolutionIndex0: RANDR not available\n");
+       DBG_PRINT("Java_jogamp_newt_driver_x11_X11Screen_getCurrentScreenResolutionIndex0: RANDR not available\n");
        return -1;
    }
 
@@ -1055,18 +1308,18 @@ JNIEXPORT jint JNICALL Java_jogamp_newt_x11_X11Screen_getCurrentScreenResolution
 }
 
 /*
- * Class:     jogamp_newt_x11_X11Screen
+ * Class:     jogamp_newt_driver_x11_X11Screen
  * Method:    setCurrentScreenModeStart0
  * Signature: (JIIII)Z
  */
-JNIEXPORT jboolean JNICALL Java_jogamp_newt_x11_X11Screen_setCurrentScreenModeStart0
+JNIEXPORT jboolean JNICALL Java_jogamp_newt_driver_x11_X11Screen_setCurrentScreenModeStart0
   (JNIEnv *env, jclass clazz, jlong display, jint screen_idx, jint resMode_idx, jint freq, jint rotation)
 {
     Display *dpy = (Display *) (intptr_t) display;
     Window root = RootWindow(dpy, (int)screen_idx);
 
     if(False == NewtScreen_hasRANDR(dpy)) {
-        DBG_PRINT("Java_jogamp_newt_x11_X11Screen_setCurrentScreenModeStart0: RANDR not available\n");
+        DBG_PRINT("Java_jogamp_newt_driver_x11_X11Screen_setCurrentScreenModeStart0: RANDR not available\n");
         return JNI_FALSE;
     }
 
@@ -1115,11 +1368,11 @@ JNIEXPORT jboolean JNICALL Java_jogamp_newt_x11_X11Screen_setCurrentScreenModeSt
 }
 
 /*
- * Class:     jogamp_newt_x11_X11Screen
+ * Class:     jogamp_newt_driver_x11_X11Screen
  * Method:    setCurrentScreenModePollEnd0
  * Signature: (J)Z
  */
-JNIEXPORT jboolean JNICALL Java_jogamp_newt_x11_X11Screen_setCurrentScreenModePollEnd0
+JNIEXPORT jboolean JNICALL Java_jogamp_newt_driver_x11_X11Screen_setCurrentScreenModePollEnd0
   (JNIEnv *env, jclass clazz, jlong display, jint screen_idx, jint resMode_idx, jint freq, jint rotation)
 {
     Display *dpy = (Display *) (intptr_t) display;
@@ -1128,7 +1381,7 @@ JNIEXPORT jboolean JNICALL Java_jogamp_newt_x11_X11Screen_setCurrentScreenModePo
     XRRScreenChangeNotifyEvent * scn_event = (XRRScreenChangeNotifyEvent *) &evt;
 
     if(False == NewtScreen_hasRANDR(dpy)) {
-        DBG_PRINT("Java_jogamp_newt_x11_X11Screen_setCurrentScreenModePollEnd0: RANDR not available\n");
+        DBG_PRINT("Java_jogamp_newt_driver_x11_X11Screen_setCurrentScreenModePollEnd0: RANDR not available\n");
         return JNI_FALSE;
     }
 
@@ -1177,20 +1430,21 @@ JNIEXPORT jboolean JNICALL Java_jogamp_newt_x11_X11Screen_setCurrentScreenModePo
  */
 
 /*
- * Class:     jogamp_newt_x11_X11Window
+ * Class:     jogamp_newt_driver_x11_X11Window
  * Method:    initIDs
  * Signature: ()Z
  */
-JNIEXPORT jboolean JNICALL Java_jogamp_newt_x11_X11Window_initIDs0
+JNIEXPORT jboolean JNICALL Java_jogamp_newt_driver_x11_X11Window_initIDs0
   (JNIEnv *env, jclass clazz)
 {
-    sizeChangedID = (*env)->GetMethodID(env, clazz, "sizeChanged", "(IIZ)V");
-    positionChangedID = (*env)->GetMethodID(env, clazz, "positionChanged", "(II)V");
-    focusChangedID = (*env)->GetMethodID(env, clazz, "focusChanged", "(Z)V");
-    visibleChangedID = (*env)->GetMethodID(env, clazz, "visibleChanged", "(Z)V");
+    insetsChangedID = (*env)->GetMethodID(env, clazz, "insetsChanged", "(ZIIII)V");
+    sizeChangedID = (*env)->GetMethodID(env, clazz, "sizeChanged", "(ZIIZ)V");
+    positionChangedID = (*env)->GetMethodID(env, clazz, "positionChanged", "(ZII)V");
+    focusChangedID = (*env)->GetMethodID(env, clazz, "focusChanged", "(ZZ)V");
+    visibleChangedID = (*env)->GetMethodID(env, clazz, "visibleChanged", "(ZZ)V");
+    reparentNotifyID = (*env)->GetMethodID(env, clazz, "reparentNotify", "(J)V");
     windowDestroyNotifyID = (*env)->GetMethodID(env, clazz, "windowDestroyNotify", "()V");
-    windowRepaintID = (*env)->GetMethodID(env, clazz, "windowRepaint", "(IIII)V");
-    windowReparentedID = (*env)->GetMethodID(env, clazz, "windowReparented", "(J)V");
+    windowRepaintID = (*env)->GetMethodID(env, clazz, "windowRepaint", "(ZIIII)V");
     enqueueMouseEventID = (*env)->GetMethodID(env, clazz, "enqueueMouseEvent", "(ZIIIIII)V");
     sendMouseEventID = (*env)->GetMethodID(env, clazz, "sendMouseEvent", "(IIIIII)V");
     enqueueKeyEventID = (*env)->GetMethodID(env, clazz, "enqueueKeyEvent", "(ZIIIC)V");
@@ -1198,13 +1452,14 @@ JNIEXPORT jboolean JNICALL Java_jogamp_newt_x11_X11Window_initIDs0
     enqueueRequestFocusID = (*env)->GetMethodID(env, clazz, "enqueueRequestFocus", "(Z)V");
     focusActionID = (*env)->GetMethodID(env, clazz, "focusAction", "()Z");
 
-    if (sizeChangedID == NULL ||
+    if (insetsChangedID == NULL ||
+        sizeChangedID == NULL ||
         positionChangedID == NULL ||
         focusChangedID == NULL ||
         visibleChangedID == NULL ||
+        reparentNotifyID == NULL ||
         windowDestroyNotifyID == NULL ||
         windowRepaintID == NULL ||
-        windowReparentedID == NULL ||
         enqueueMouseEventID == NULL ||
         sendMouseEventID == NULL ||
         enqueueKeyEventID == NULL ||
@@ -1216,22 +1471,53 @@ JNIEXPORT jboolean JNICALL Java_jogamp_newt_x11_X11Window_initIDs0
     return JNI_TRUE;
 }
 
+static Bool WaitForMapNotify( Display *dpy, XEvent *event, XPointer arg ) {
+    return (event->type == MapNotify) && (event->xmap.window == (Window) arg);
+}
+
+static Bool WaitForUnmapNotify( Display *dpy, XEvent *event, XPointer arg ) {
+    return (event->type == UnmapNotify) && (event->xmap.window == (Window) arg);
+}
+
+static void NewtWindows_setPosSize(Display *dpy, Window w, jint x, jint y, jint width, jint height) {
+    if(width>0 && height>0 || x>=0 && y>=0) { // resize/position if requested
+        XWindowChanges xwc;
+        int flags = 0;
+
+        memset(&xwc, 0, sizeof(XWindowChanges));
+        if(0<=x && 0<=y) {
+            flags |= CWX | CWY;
+            xwc.x=x;
+            xwc.y=y;
+        }
+        if(0<width && 0<height) {
+            flags |= CWWidth | CWHeight;
+            xwc.width=width;
+            xwc.height=height;
+        }
+        XConfigureWindow(dpy, w, flags, &xwc);
+        XSync(dpy, False);
+    }
+}
+
 /*
- * Class:     jogamp_newt_x11_X11Window
+ * Class:     jogamp_newt_driver_x11_X11Window
  * Method:    CreateWindow
  * Signature: (JJIJIIII)J
  */
-JNIEXPORT jlong JNICALL Java_jogamp_newt_x11_X11Window_CreateWindow0
+JNIEXPORT jlong JNICALL Java_jogamp_newt_driver_x11_X11Window_CreateWindow0
   (JNIEnv *env, jobject obj, jlong parent, jlong display, jint screen_index, 
                              jlong visualID, 
                              jlong javaObjectAtom, jlong windowDeleteAtom, 
-                             jint x, jint y, jint width, jint height,
-                             jboolean undecorated)
+                             jint x, jint y, jint width, jint height, int flags)
 {
-    Display * dpy  = (Display *)(intptr_t)display;
+    Display * dpy = (Display *)(intptr_t)display;
+    Atom wm_delete_atom = (Atom)windowDeleteAtom;
     int       scrn_idx = (int)screen_index;
+    Window root = RootWindow(dpy, scrn_idx);
     Window  windowParent = (Window) parent;
     Window  window = 0;
+    jobject jwindow = 0;
 
     XVisualInfo visualTemplate;
     XVisualInfo *pVisualQuery = NULL;
@@ -1243,7 +1529,6 @@ JNIEXPORT jlong JNICALL Java_jogamp_newt_x11_X11Window_CreateWindow0
     int n;
 
     Screen* scrn;
-    Atom wm_delete_atom;
 
     if(dpy==NULL) {
         NewtCommon_FatalError(env, "invalid display connection..");
@@ -1258,13 +1543,11 @@ JNIEXPORT jlong JNICALL Java_jogamp_newt_x11_X11Window_CreateWindow0
 
     scrn = ScreenOfDisplay(dpy, scrn_idx);
     if(0==windowParent) {
-        windowParent = XRootWindowOfScreen(scrn);
-    }
-    if( XRootWindowOfScreen(scrn) != XRootWindow(dpy, scrn_idx) ) {
-        NewtCommon_FatalError(env, "XRoot Malfunction: %p != %p"+XRootWindowOfScreen(scrn), XRootWindow(dpy, scrn_idx));
+        windowParent = root;
     }
-    DBG_PRINT( "X11: CreateWindow dpy %p, parent %p, %x/%d %dx%d, undeco %d\n", 
-        (void*)dpy, (void*)windowParent, x, y, width, height, undecorated);
+    DBG_PRINT( "X11: CreateWindow dpy %p, parent %p, %x/%d %dx%d, undeco %d, alwaysOnTop %d\n", 
+        (void*)dpy, (void*)windowParent, x, y, width, height,
+        TST_FLAG_IS_UNDECORATED(flags), TST_FLAG_IS_ALWAYSONTOP(flags));
 
     // try given VisualID on screen
     memset(&visualTemplate, 0, sizeof(XVisualInfo));
@@ -1294,68 +1577,101 @@ JNIEXPORT jlong JNICALL Java_jogamp_newt_x11_X11Window_CreateWindow0
     }
 
     attrMask  = ( CWBackingStore | CWBackingPlanes | CWBackingPixel | CWBackPixmap |
-                  CWBorderPixel | CWColormap | CWOverrideRedirect ) ;
+                  CWBorderPixel | CWColormap | CWOverrideRedirect | CWEventMask ) ;
 
     memset(&xswa, 0, sizeof(xswa));
-    xswa.override_redirect = False; // use the window manager, always
+    xswa.override_redirect = False; // use the window manager, always (default)
     xswa.border_pixel = 0;
     xswa.background_pixmap = None;
-    xswa.backing_store=NotUseful; /* NotUseful, WhenMapped, Always */
-    xswa.backing_planes=0;        /* planes to be preserved if possible */
-    xswa.backing_pixel=0;         /* value to use in restoring planes */
+    xswa.backing_store=NotUseful;  /* NotUseful, WhenMapped, Always */
+    xswa.backing_planes=0;         /* planes to be preserved if possible */
+    xswa.backing_pixel=0;          /* value to use in restoring planes */
+    xswa.event_mask  = ButtonPressMask | ButtonReleaseMask | PointerMotionMask ;
+    xswa.event_mask |= KeyPressMask | KeyReleaseMask ;
+    xswa.event_mask |= FocusChangeMask | SubstructureNotifyMask | StructureNotifyMask | ExposureMask ;
 
     xswa.colormap = XCreateColormap(dpy,
                                     windowParent,
                                     visual,
                                     AllocNone);
 
-    window = XCreateWindow(dpy,
-                           windowParent,
-                           x, y,
-                           width, height,
-                           0, // border width
-                           depth,
-                           InputOutput,
-                           visual,
-                           attrMask,
-                           &xswa);
+    {
+        int _x = x, _y = y; // pos for CreateWindow, might be tweaked
+        if(0>_x || 0>_y) {
+            // user didn't requested specific position, use WM default
+            _x = 0;
+            _y = 0;
+        }
+        window = XCreateWindow(dpy,
+                               windowParent,
+                               _x, _y, // only a hint, WM most likely will override
+                               width, height,
+                               0, // border width
+                               depth,
+                               InputOutput,
+                               visual,
+                               attrMask,
+                               &xswa);
+    }
 
     if(0==window) {
         NewtCommon_throwNewRuntimeException(env, "could not create Window, bail out!");
         return 0;
     }
 
-    wm_delete_atom = (Atom)windowDeleteAtom;
-    XSetWMProtocols(dpy, window, &wm_delete_atom, 1);
+    XSetWMProtocols(dpy, window, &wm_delete_atom, 1); // windowDeleteAtom
+    jwindow = (*env)->NewGlobalRef(env, obj);
+    setJavaWindowProperty(env, dpy, window, javaObjectAtom, jwindow);
 
-    setJavaWindowProperty(env, dpy, window, javaObjectAtom, (*env)->NewGlobalRef(env, obj));
-
-    // XClearWindow(dpy, window);
-    XSync(dpy, False);
+    NewtWindows_setNormalWindowEWMH(dpy, window);
+    NewtWindows_setDecorations(dpy, window, TST_FLAG_IS_UNDECORATED(flags) ? False : True );
 
+    // since native creation happens at setVisible(true) .. 
+    // we can pre-map the window here to be able to gather the insets and position.
     {
-        long xevent_mask = 0;
-        xevent_mask |= ButtonPressMask | ButtonReleaseMask | PointerMotionMask ;
-        xevent_mask |= KeyPressMask | KeyReleaseMask ;
-        xevent_mask |= FocusChangeMask | SubstructureNotifyMask | StructureNotifyMask | ExposureMask ;
+        XEvent event;
+        int left, right, top, bottom;
+        Bool userPos = 0<=x && 0<=y ;
+
+        XMapWindow(dpy, window);
+        XIfEvent( dpy, &event, WaitForMapNotify, (XPointer) window ); // wait to get proper insets values
+
+        // send insets before visibility, allowing java code a proper sync point!
+        NewtWindows_updateInsets(env, jwindow, dpy, window, &left, &right, &top, &bottom);
+        (*env)->CallVoidMethod(env, jwindow, visibleChangedID, JNI_FALSE, JNI_TRUE);
+
+        if(!userPos) {
+            // get position from WM
+            int dest_x, dest_y;
+            Window child;
+            XTranslateCoordinates(dpy, window, windowParent, 0, 0, &dest_x, &dest_y, &child);
+            x = (int)dest_x; y = (int)dest_y;
+        }
+        DBG_PRINT("X11: [CreateWindow]: client: %d/%d %dx%d (is user-pos %d)\n", x, y, width, height, userPos);
 
-        XSelectInput(dpy, window, xevent_mask);
-    }
+        x -= left; // top-level
+        y -= top;  // top-level
+        if(0>x) { x = 0; }
+        if(0>y) { y = 0; }
+        DBG_PRINT("X11: [CreateWindow]: top-level: %d/%d\n", x, y);
+        NewtWindows_setPosSize(dpy, window, x, y, width, height);
 
-    NewtWindows_setDecorations(dpy, window, ( JNI_TRUE == undecorated ) ? False : True );
-    XSync(dpy, False);
+        if( TST_FLAG_IS_ALWAYSONTOP(flags) ) {
+            NewtWindows_setFullscreenEWMH(dpy, root, window, _NET_WM_ABOVE, True, True);
+        }
+    }
 
     DBG_PRINT( "X11: [CreateWindow] created window %p on display %p\n", (void*)window, dpy);
     return (jlong) window;
 }
 
 /*
- * Class:     jogamp_newt_x11_X11Window
+ * Class:     jogamp_newt_driver_x11_X11Window
  * Method:    CloseWindow
  * Signature: (JJ)V
  */
-JNIEXPORT void JNICALL Java_jogamp_newt_x11_X11Window_CloseWindow0
-  (JNIEnv *env, jobject obj, jlong display, jlong window, jlong javaObjectAtom, jlong wmDeleteAtom)
+JNIEXPORT void JNICALL Java_jogamp_newt_driver_x11_X11Window_CloseWindow0
+  (JNIEnv *env, jobject obj, jlong display, jlong window, jlong javaObjectAtom, jlong windowDeleteAtom)
 {
     Display * dpy = (Display *) (intptr_t) display;
     Window w = (Window)window;
@@ -1380,9 +1696,10 @@ JNIEXPORT void JNICALL Java_jogamp_newt_x11_X11Window_CloseWindow0
     XSync(dpy, False);
     XSelectInput(dpy, w, 0);
     XUnmapWindow(dpy, w);
+    XSync(dpy, False);
 
     // Drain all events related to this window ..
-    Java_jogamp_newt_x11_X11Display_DispatchMessages0(env, obj, display, javaObjectAtom, wmDeleteAtom);
+    Java_jogamp_newt_driver_x11_X11Display_DispatchMessages0(env, obj, display, javaObjectAtom, windowDeleteAtom);
 
     XDestroyWindow(dpy, w);
     XSync(dpy, False);
@@ -1392,135 +1709,155 @@ JNIEXPORT void JNICALL Java_jogamp_newt_x11_X11Window_CloseWindow0
     DBG_PRINT( "X11: CloseWindow END\n");
 }
 
-static void NewtWindows_setPosSize(Display *dpy, Window w, jint x, jint y, jint width, jint height)
-{
-    if(width>0 && height>0 || x>=0 && y>=0) { // resize/position if requested
-        XWindowChanges xwc;
-        unsigned int mod_flags = ( (x>=0)?CWX:0 ) | ( (y>=0)?CWY:0 ) | 
-                                 ( (width>0)?CWWidth:0 ) | ( (height>0)?CWHeight:0 ) ;
-        DBG_PRINT( "X11: reconfigureWindow0 pos/size mod: 0x%X\n", mod_flags);
-        memset(&xwc, 0, sizeof(XWindowChanges));
-        xwc.x=x;
-        xwc.y=y;
-        xwc.width=width;
-        xwc.height=height;
-        XConfigureWindow(dpy, w, mod_flags, &xwc);
-        XSync(dpy, False);
-    }
-}
-
-/*
- * Class:     jogamp_newt_x11_X11Window
- * Method:    setVisible0
- * Signature: (JJZIIII)V
- */
-JNIEXPORT void JNICALL Java_jogamp_newt_x11_X11Window_setVisible0
-  (JNIEnv *env, jobject obj, jlong display, jlong window, jboolean visible, jint x, jint y, jint width, jint height)
-{
-    Display * dpy = (Display *) (intptr_t) display;
-    Window w = (Window)window;
-    DBG_PRINT( "X11: setVisible0 vis %d\n", visible);
-
-    if(dpy==NULL) {
-        NewtCommon_FatalError(env, "invalid display connection..");
-    }
-
-    if(visible==JNI_TRUE) {
-        XMapRaised(dpy, w);
-    } else {
-        XUnmapWindow(dpy, w);
-    }
-    XSync(dpy, False);
-
-    NewtWindows_setPosSize(dpy, w, x, y, width, height);
+#if 0
+static Bool WaitForReparentNotify( Display *dpy, XEvent *event, XPointer arg ) {
+    return (event->type == ReparentNotify) && (event->xreparent.window == (Window) arg);
 }
+#endif
 
 /*
- * Class:     jogamp_newt_x11_X11Window
+ * Class:     jogamp_newt_driver_x11_X11Window
  * Method:    reconfigureWindow0
- * Signature: (JIJJIIIIZZII)V
+ * Signature: (JIJJIIIII)V
  */
-JNIEXPORT void JNICALL Java_jogamp_newt_x11_X11Window_reconfigureWindow0
+JNIEXPORT void JNICALL Java_jogamp_newt_driver_x11_X11Window_reconfigureWindow0
   (JNIEnv *env, jobject obj, jlong jdisplay, jint screen_index, jlong jparent, jlong jwindow, 
-   jint x, jint y, jint width, jint height, jboolean isVisible, jboolean parentChange, jint fullscreenChange, jint decorationChange)
+   jint x, jint y, jint width, jint height, jint flags)
 {
     Display * dpy = (Display *) (intptr_t) jdisplay;
-    Screen * scrn = ScreenOfDisplay(dpy, (int)screen_index);
     Window w = (Window)jwindow;
-    Window root = XRootWindowOfScreen(scrn);
+    Window root = RootWindow(dpy, screen_index);
     Window parent = (0!=jparent)?(Window)jparent:root;
-    Window topParentParent;
-    Window topParentWindow;
-    Bool moveIntoParent = False;
+    XEvent event;
+    Bool isVisible = !TST_FLAG_CHANGE_VISIBILITY(flags) && TST_FLAG_IS_VISIBLE(flags) ;
+    Bool tempInvisible = ( TST_FLAG_CHANGE_FULLSCREEN(flags) || TST_FLAG_CHANGE_PARENTING(flags) ) && isVisible ;
+    int fsEWMHFlags = 0;
+    if( TST_FLAG_CHANGE_FULLSCREEN(flags) ) {
+        fsEWMHFlags |= _NET_WM_FULLSCREEN;
+        if( TST_FLAG_IS_FULLSCREEN(flags) ) {
+            fsEWMHFlags |= _NET_WM_ABOVE; // fs & above on
+        } else if( !TST_FLAG_IS_ALWAYSONTOP(flags) ) {
+            fsEWMHFlags |= _NET_WM_ABOVE; // fs & above off
+        } /* else { } */                  // fs off, keep above
+    } else if( TST_FLAG_CHANGE_ALWAYSONTOP(flags) ) {
+        fsEWMHFlags |= _NET_WM_ABOVE; // toggle above only
+    }
 
     displayDispatchErrorHandlerEnable(1, env);
 
-    topParentParent = NewtWindows_getParent (dpy, parent);
-    topParentWindow = NewtWindows_getParent (dpy, w);
-
-    DBG_PRINT( "X11: reconfigureWindow0 dpy %p, scrn %d/%p, parent %p/%p (top %p), win %p (top %p), %d/%d %dx%d visible %d, parentChange %d, fullscreenChange %d, decorationChange %d\n", 
-        (void*)dpy, screen_index, (void*)scrn, (void*) jparent, (void*)parent, (void*) topParentParent, (void*)w, (void*)topParentWindow,
-        x, y, width, height, isVisible, parentChange, fullscreenChange, decorationChange);
+    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,
+        x, y, width, height, 
+        TST_FLAG_CHANGE_PARENTING(flags),   TST_FLAG_HAS_PARENT(flags),
+        TST_FLAG_CHANGE_DECORATION(flags),  TST_FLAG_IS_UNDECORATED(flags),
+        TST_FLAG_CHANGE_FULLSCREEN(flags),  TST_FLAG_IS_FULLSCREEN(flags),
+        TST_FLAG_CHANGE_ALWAYSONTOP(flags), TST_FLAG_IS_ALWAYSONTOP(flags),
+        TST_FLAG_CHANGE_VISIBILITY(flags),  TST_FLAG_IS_VISIBLE(flags), tempInvisible, fsEWMHFlags);
+
+    // FS Note: To toggle FS, utilizing the _NET_WM_STATE_FULLSCREEN WM state shall be enough.
+    //          However, we have to consider other cases like reparenting and WM which don't support it.
+
+    if( fsEWMHFlags && !TST_FLAG_CHANGE_PARENTING(flags) && isVisible &&
+        ( 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) ) {
+            displayDispatchErrorHandlerEnable(0, env);
+            return;
+        }
+    }
 
-    if(parentChange && JNI_TRUE == isVisible) { // unmap window if visible, reduce X11 internal signaling (WM unmap)
+    if( tempInvisible ) {
+        DBG_PRINT( "X11: reconfigureWindow0 TEMP VISIBLE OFF\n");
         XUnmapWindow(dpy, w);
-        XSync(dpy, False);
+        XIfEvent( dpy, &event, WaitForUnmapNotify, (XPointer) w );
+        // no need to notify the java side .. just temp change
     }
 
-    if(0 > fullscreenChange ) { // FS off
-        NewtWindows_setFullscreen(dpy, root, w, False );
-        XSync(dpy, False);
+    if( fsEWMHFlags && ( ( TST_FLAG_CHANGE_FULLSCREEN(flags)  && !TST_FLAG_IS_FULLSCREEN(flags) ) || 
+                         ( TST_FLAG_CHANGE_ALWAYSONTOP(flags) && !TST_FLAG_IS_ALWAYSONTOP(flags) ) ) ) { // FS off
+        NewtWindows_setFullscreenEWMH(dpy, root, w, fsEWMHFlags, isVisible, False);
     }
 
-    if(parentChange) {
-        if(0 != jparent) { // move into parent ..
-            moveIntoParent = True;
-            NewtWindows_setDecorations (dpy, w, False);
-            XSync(dpy, False);
-        }
+    if( TST_FLAG_CHANGE_PARENTING(flags) && !TST_FLAG_HAS_PARENT(flags) ) {
+        // TOP: in -> out
+        DBG_PRINT( "X11: reconfigureWindow0 PARENTING in->out\n");
         XReparentWindow( dpy, w, parent, x, y ); // actual reparent call
+        // XIfEvent( dpy, &event, WaitForReparentNotify, (XPointer) w );
         XSync(dpy, False);
     }
 
-    if(!moveIntoParent && 0!=decorationChange) {
-        NewtWindows_setDecorations (dpy, w, (0 < decorationChange) ? True : False);
-        XSync(dpy, False);
+    if( TST_FLAG_CHANGE_DECORATION(flags) ) {
+        DBG_PRINT( "X11: reconfigureWindow0 DECORATIONS %d\n", !TST_FLAG_IS_UNDECORATED(flags));
+        NewtWindows_setDecorations (dpy, w, TST_FLAG_IS_UNDECORATED(flags) ? False : True);
     }
 
+    DBG_PRINT( "X11: reconfigureWindow0 setPosSize %d/%d %dx%d\n", x, y, width, height);
     NewtWindows_setPosSize(dpy, w, x, y, width, height);
 
-    if(0 < fullscreenChange ) { // FS on
-        NewtWindows_setFullscreen(dpy, root, w, True );
+    if( TST_FLAG_CHANGE_PARENTING(flags) && TST_FLAG_HAS_PARENT(flags) ) {
+        // CHILD: out -> in
+        DBG_PRINT( "X11: reconfigureWindow0 PARENTING out->in\n");
+        XReparentWindow( dpy, w, parent, x, y ); // actual reparent call
+        // XIfEvent( dpy, &event, WaitForReparentNotify, (XPointer) w );
         XSync(dpy, False);
     }
-    
-    if(parentChange && JNI_TRUE == isVisible) { // map window 
+
+    if( tempInvisible ) {
+        DBG_PRINT( "X11: reconfigureWindow0 TEMP VISIBLE ON\n");
         XMapRaised(dpy, w);
+        XIfEvent( dpy, &event, WaitForMapNotify, (XPointer) w );
+        // no need to notify the java side .. just temp change
+    }
+
+    if( TST_FLAG_CHANGE_VISIBILITY(flags) ) {
+        if( TST_FLAG_IS_VISIBLE(flags) ) {
+            DBG_PRINT( "X11: reconfigureWindow0 VISIBLE ON\n");
+            XMapRaised(dpy, w);
+        } else {
+            DBG_PRINT( "X11: reconfigureWindow0 VISIBLE OFF\n");
+            XUnmapWindow(dpy, w);
+        }
         XSync(dpy, False);
     }
 
+    if( fsEWMHFlags && ( ( TST_FLAG_CHANGE_FULLSCREEN(flags)  && TST_FLAG_IS_FULLSCREEN(flags) ) || 
+                         ( TST_FLAG_CHANGE_ALWAYSONTOP(flags) && TST_FLAG_IS_ALWAYSONTOP(flags) ) ) ) { // FS on
+        NewtWindows_setFullscreenEWMH(dpy, root, w, fsEWMHFlags, isVisible, True);
+    }
+
     displayDispatchErrorHandlerEnable(0, env);
 
     DBG_PRINT( "X11: reconfigureWindow0 X\n");
 }
 
 /*
- * Class:     jogamp_newt_x11_X11Window
+ * Class:     jogamp_newt_driver_x11_X11Window
  * Method:    requestFocus0
- * Signature: (JJ)V
+ * Signature: (JJZ)V
  */
-JNIEXPORT void JNICALL Java_jogamp_newt_x11_X11Window_requestFocus0
+JNIEXPORT void JNICALL Java_jogamp_newt_driver_x11_X11Window_requestFocus0
   (JNIEnv *env, jobject obj, jlong display, jlong window, jboolean force)
 {
     NewtWindows_requestFocus ( env, obj, (Display *) (intptr_t) display, (Window)window, force ) ;
 }
 
 /*
- * Class:     Java_jogamp_newt_x11_X11Window
+ * Class:     jogamp_newt_driver_x11_X11Window
+ * Method:    getParentWindow0
+ * Signature: (JJ)J
+ */
+JNIEXPORT jlong JNICALL Java_jogamp_newt_driver_x11_X11Window_getParentWindow0
+  (JNIEnv *env, jobject obj, jlong display, jlong window)
+{
+    return (jlong) NewtWindows_getParent ((Display *) (intptr_t) display, (Window)window);
+}
+
+/*
+ * Class:     Java_jogamp_newt_driver_x11_X11Window
  * Method:    setTitle0
  * Signature: (JJLjava/lang/String;)V
  */
-JNIEXPORT void JNICALL Java_jogamp_newt_x11_X11Window_setTitle0
+JNIEXPORT void JNICALL Java_jogamp_newt_driver_x11_X11Window_setTitle0
   (JNIEnv *env, jclass clazz, jlong display, jlong window, jstring title)
 {
     Display * dpy = (Display *) (intptr_t) display;
diff --git a/src/test/com/jogamp/opengl/test/android/NEWTElektronActivity.java b/src/test/com/jogamp/opengl/test/android/NEWTElektronActivity.java
new file mode 100644
index 0000000..4424008
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/android/NEWTElektronActivity.java
@@ -0,0 +1,77 @@
+/**
+ * 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.android;
+
+import javax.media.opengl.GLCapabilities;
+import javax.media.opengl.GLProfile;
+
+import jogamp.newt.driver.android.NewtBaseActivity;
+
+import com.jogamp.newt.ScreenMode;
+import com.jogamp.newt.event.ScreenModeListener;
+import com.jogamp.newt.opengl.GLWindow;
+
+import com.jogamp.opengl.test.junit.jogl.demos.es2.ElektronenMultiplizierer;
+import com.jogamp.opengl.util.Animator;
+
+import android.os.Bundle;
+import android.util.Log;
+
+public class NEWTElektronActivity extends NewtBaseActivity {
+   static String TAG = "NEWTElektronActivity";
+   
+   @Override
+   public void onCreate(Bundle savedInstanceState) {
+       Log.d(TAG, "onCreate - 0");
+       super.onCreate(savedInstanceState);
+       
+       // create GLWindow (-> incl. underlying NEWT Display, Screen & Window)
+       GLCapabilities caps = new GLCapabilities(GLProfile.get(GLProfile.GLES2));
+       // caps.setAlphaBits(4);
+       // caps.setNumSamples(4);
+       // caps.setSampleBuffers(true);
+       Log.d(TAG, "req caps: "+caps);
+       GLWindow glWindow = GLWindow.create(caps);
+       glWindow.setFullscreen(true);
+       setContentView(getWindow(), glWindow);
+       
+       glWindow.addGLEventListener(new ElektronenMultiplizierer());
+       glWindow.getWindow().getScreen().addScreenModeListener(new ScreenModeListener() {
+        public void screenModeChangeNotify(ScreenMode sm) { }
+        public void screenModeChanged(ScreenMode sm, boolean success) {
+            System.err.println("ScreenMode Changed: "+sm);
+        }
+       });
+       glWindow.setVisible(true);
+       Animator animator = new Animator(glWindow);
+       animator.setUpdateFPSFrames(60, System.err);
+       setAnimator(animator);
+       
+       Log.d(TAG, "onCreate - X");
+   }   
+}
diff --git a/src/test/com/jogamp/opengl/test/android/NEWTGearsES1Activity.java b/src/test/com/jogamp/opengl/test/android/NEWTGearsES1Activity.java
new file mode 100644
index 0000000..bc4e7d3
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/android/NEWTGearsES1Activity.java
@@ -0,0 +1,73 @@
+/**
+ * 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.android;
+
+import javax.media.opengl.GLCapabilities;
+import javax.media.opengl.GLProfile;
+
+import jogamp.newt.driver.android.NewtBaseActivity;
+
+import com.jogamp.newt.ScreenMode;
+import com.jogamp.newt.event.ScreenModeListener;
+import com.jogamp.newt.opengl.GLWindow;
+
+import com.jogamp.opengl.test.junit.jogl.demos.es1.GearsES1;
+import com.jogamp.opengl.util.Animator;
+
+import android.os.Bundle;
+import android.util.Log;
+
+public class NEWTGearsES1Activity extends NewtBaseActivity {
+   static String TAG = "NEWTGearsES1Activity";
+   
+   @Override
+   public void onCreate(Bundle savedInstanceState) {
+       Log.d(TAG, "onCreate - 0");
+       super.onCreate(savedInstanceState);
+       
+       // create GLWindow (-> incl. underlying NEWT Display, Screen & Window)
+       GLCapabilities caps = new GLCapabilities(GLProfile.get(GLProfile.GLES1));
+       Log.d(TAG, "req caps: "+caps);
+       GLWindow glWindow = GLWindow.create(caps);
+       setContentView(getWindow(), glWindow);
+       
+       glWindow.addGLEventListener(new GearsES1(1));
+       glWindow.getWindow().getScreen().addScreenModeListener(new ScreenModeListener() {
+        public void screenModeChangeNotify(ScreenMode sm) { }
+        public void screenModeChanged(ScreenMode sm, boolean success) {
+            System.err.println("ScreenMode Changed: "+sm);
+        }
+       });
+       glWindow.setVisible(true);
+       Animator animator = new Animator(glWindow);
+       animator.setUpdateFPSFrames(60, System.err);
+       setAnimator(animator);
+       
+       Log.d(TAG, "onCreate - X");
+   }   
+}
diff --git a/src/test/com/jogamp/opengl/test/android/NEWTGearsES2Activity.java b/src/test/com/jogamp/opengl/test/android/NEWTGearsES2Activity.java
new file mode 100644
index 0000000..939bfa2
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/android/NEWTGearsES2Activity.java
@@ -0,0 +1,74 @@
+/**
+ * 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.android;
+
+import javax.media.opengl.GLCapabilities;
+import javax.media.opengl.GLProfile;
+
+import jogamp.newt.driver.android.NewtBaseActivity;
+
+import com.jogamp.newt.ScreenMode;
+import com.jogamp.newt.event.ScreenModeListener;
+import com.jogamp.newt.opengl.GLWindow;
+
+import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
+import com.jogamp.opengl.util.Animator;
+
+import android.os.Bundle;
+import android.util.Log;
+
+public class NEWTGearsES2Activity extends NewtBaseActivity {
+   static String TAG = "NEWTGearsES2Activity";
+   
+   @Override
+   public void onCreate(Bundle savedInstanceState) {
+       Log.d(TAG, "onCreate - 0");
+       super.onCreate(savedInstanceState);
+       
+       // create GLWindow (-> incl. underlying NEWT Display, Screen & Window)
+       GLCapabilities caps = new GLCapabilities(GLProfile.get(GLProfile.GLES2));
+       Log.d(TAG, "req caps: "+caps);
+       GLWindow glWindow = GLWindow.create(caps);
+       glWindow.setFullscreen(true);
+       setContentView(getWindow(), glWindow);
+       
+       glWindow.addGLEventListener(new GearsES2(1));
+       glWindow.getWindow().getScreen().addScreenModeListener(new ScreenModeListener() {
+        public void screenModeChangeNotify(ScreenMode sm) { }
+        public void screenModeChanged(ScreenMode sm, boolean success) {
+            System.err.println("ScreenMode Changed: "+sm);
+        }
+       });
+       glWindow.setVisible(true);
+       Animator animator = new Animator(glWindow);
+       animator.setUpdateFPSFrames(60, System.err);
+       setAnimator(animator);
+       
+       Log.d(TAG, "onCreate - X");
+   }   
+}
diff --git a/src/test/com/jogamp/opengl/test/android/NEWTGearsES2TransActivity.java b/src/test/com/jogamp/opengl/test/android/NEWTGearsES2TransActivity.java
new file mode 100644
index 0000000..84ff0a5
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/android/NEWTGearsES2TransActivity.java
@@ -0,0 +1,77 @@
+/**
+ * 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.android;
+
+import javax.media.opengl.GLCapabilities;
+import javax.media.opengl.GLProfile;
+
+import jogamp.newt.driver.android.NewtBaseActivity;
+
+import com.jogamp.newt.ScreenMode;
+import com.jogamp.newt.event.ScreenModeListener;
+import com.jogamp.newt.opengl.GLWindow;
+
+import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
+import com.jogamp.opengl.util.Animator;
+
+import android.os.Bundle;
+import android.util.Log;
+
+public class NEWTGearsES2TransActivity extends NewtBaseActivity {
+   static String TAG = "NEWTGearsES2TransActivity";
+   
+   @Override
+   public void onCreate(Bundle savedInstanceState) {
+       Log.d(TAG, "onCreate - 0");
+       super.onCreate(savedInstanceState);
+       
+       // create GLWindow (-> incl. underlying NEWT Display, Screen & Window)
+       GLCapabilities caps = new GLCapabilities(GLProfile.get(GLProfile.GLES2));
+       caps.setBackgroundOpaque(false);
+       Log.d(TAG, "req caps: "+caps);
+       GLWindow glWindow = GLWindow.create(caps);
+       glWindow.setSize(300, 300);
+       // glWindow.setFullscreen(true);
+       glWindow.setUndecorated(true);
+       setContentView(getWindow(), glWindow);
+       
+       glWindow.addGLEventListener(new GearsES2(1));
+       glWindow.getWindow().getScreen().addScreenModeListener(new ScreenModeListener() {
+        public void screenModeChangeNotify(ScreenMode sm) { }
+        public void screenModeChanged(ScreenMode sm, boolean success) {
+            System.err.println("ScreenMode Changed: "+sm);
+        }
+       });
+       glWindow.setVisible(true);
+       Animator animator = new Animator(glWindow);
+       animator.setUpdateFPSFrames(60, System.err);
+       setAnimator(animator);
+       
+       Log.d(TAG, "onCreate - X");
+   }   
+}
diff --git a/src/test/com/jogamp/opengl/test/android/NEWTGraphUI1pActivity.java b/src/test/com/jogamp/opengl/test/android/NEWTGraphUI1pActivity.java
new file mode 100644
index 0000000..83f3587
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/android/NEWTGraphUI1pActivity.java
@@ -0,0 +1,77 @@
+/**
+ * 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.android;
+
+import javax.media.opengl.GLCapabilities;
+import javax.media.opengl.GLProfile;
+
+import jogamp.newt.driver.android.NewtBaseActivity;
+
+import com.jogamp.newt.ScreenMode;
+import com.jogamp.newt.event.ScreenModeListener;
+import com.jogamp.newt.opengl.GLWindow;
+
+import com.jogamp.opengl.test.junit.graph.demos.GPUUISceneGLListener0A;
+import com.jogamp.opengl.util.Animator;
+
+import android.os.Bundle;
+import android.util.Log;
+
+public class NEWTGraphUI1pActivity extends NewtBaseActivity {
+   static String TAG = "NEWTGraphUIActivity";
+   
+   @Override
+   public void onCreate(Bundle savedInstanceState) {
+       Log.d(TAG, "onCreate - 0");
+       super.onCreate(savedInstanceState);
+       
+       // create GLWindow (-> incl. underlying NEWT Display, Screen & Window)
+       GLCapabilities caps = new GLCapabilities(GLProfile.get(GLProfile.GLES2));
+       caps.setAlphaBits(4);
+       caps.setNumSamples(4);
+       caps.setSampleBuffers(true);
+       Log.d(TAG, "req caps: "+caps);
+       GLWindow glWindow = GLWindow.create(caps);
+       glWindow.setFullscreen(true);
+       setContentView(getWindow(), glWindow);
+       
+       glWindow.addGLEventListener(new GPUUISceneGLListener0A(0));
+       glWindow.getWindow().getScreen().addScreenModeListener(new ScreenModeListener() {
+        public void screenModeChangeNotify(ScreenMode sm) { }
+        public void screenModeChanged(ScreenMode sm, boolean success) {
+            System.err.println("ScreenMode Changed: "+sm);
+        }
+       });
+       glWindow.setVisible(true);
+       Animator animator = new Animator(glWindow);
+       animator.setUpdateFPSFrames(60, System.err);
+       setAnimator(animator);
+       
+       Log.d(TAG, "onCreate - X");
+   }   
+}
diff --git a/src/test/com/jogamp/opengl/test/android/NEWTGraphUI2pActivity.java b/src/test/com/jogamp/opengl/test/android/NEWTGraphUI2pActivity.java
new file mode 100644
index 0000000..17924d4
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/android/NEWTGraphUI2pActivity.java
@@ -0,0 +1,78 @@
+/**
+ * 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.android;
+
+import javax.media.opengl.GLCapabilities;
+import javax.media.opengl.GLProfile;
+
+import jogamp.newt.driver.android.NewtBaseActivity;
+
+import com.jogamp.graph.curve.Region;
+import com.jogamp.newt.ScreenMode;
+import com.jogamp.newt.event.ScreenModeListener;
+import com.jogamp.newt.opengl.GLWindow;
+
+import com.jogamp.opengl.test.junit.graph.demos.GPUUISceneGLListener0A;
+import com.jogamp.opengl.util.Animator;
+
+import android.os.Bundle;
+import android.util.Log;
+
+public class NEWTGraphUI2pActivity extends NewtBaseActivity {
+   static String TAG = "NEWTGraphUIActivity";
+   
+   @Override
+   public void onCreate(Bundle savedInstanceState) {
+       Log.d(TAG, "onCreate - 0");
+       super.onCreate(savedInstanceState);
+       
+       // create GLWindow (-> incl. underlying NEWT Display, Screen & Window)
+       GLCapabilities caps = new GLCapabilities(GLProfile.get(GLProfile.GLES2));
+       caps.setAlphaBits(4);
+       caps.setNumSamples(4);
+       caps.setSampleBuffers(true);
+       Log.d(TAG, "req caps: "+caps);
+       GLWindow glWindow = GLWindow.create(caps);
+       glWindow.setFullscreen(true);
+       setContentView(getWindow(), glWindow);
+       
+       glWindow.addGLEventListener(new GPUUISceneGLListener0A(Region.VBAA_RENDERING_BIT));
+       glWindow.getWindow().getScreen().addScreenModeListener(new ScreenModeListener() {
+        public void screenModeChangeNotify(ScreenMode sm) { }
+        public void screenModeChanged(ScreenMode sm, boolean success) {
+            System.err.println("ScreenMode Changed: "+sm);
+        }
+       });
+       glWindow.setVisible(true);
+       Animator animator = new Animator(glWindow);
+       animator.setUpdateFPSFrames(60, System.err);
+       setAnimator(animator);
+       
+       Log.d(TAG, "onCreate - X");
+   }   
+}
diff --git a/src/test/com/jogamp/opengl/test/android/NEWTRedSquareES1Activity.java b/src/test/com/jogamp/opengl/test/android/NEWTRedSquareES1Activity.java
new file mode 100644
index 0000000..6fc3a46
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/android/NEWTRedSquareES1Activity.java
@@ -0,0 +1,73 @@
+/**
+ * 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.android;
+
+import javax.media.opengl.GLCapabilities;
+import javax.media.opengl.GLProfile;
+
+import jogamp.newt.driver.android.NewtBaseActivity;
+
+import com.jogamp.newt.ScreenMode;
+import com.jogamp.newt.event.ScreenModeListener;
+import com.jogamp.newt.opengl.GLWindow;
+
+import com.jogamp.opengl.test.junit.jogl.demos.es1.RedSquareES1;
+import com.jogamp.opengl.util.Animator;
+
+import android.os.Bundle;
+import android.util.Log;
+
+public class NEWTRedSquareES1Activity extends NewtBaseActivity {
+   static String TAG = "NEWTGearsES1Activity";
+   
+   @Override
+   public void onCreate(Bundle savedInstanceState) {
+       Log.d(TAG, "onCreate - 0");
+       super.onCreate(savedInstanceState);
+       
+       // create GLWindow (-> incl. underlying NEWT Display, Screen & Window)
+       GLCapabilities caps = new GLCapabilities(GLProfile.get(GLProfile.GLES1));
+       Log.d(TAG, "req caps: "+caps);
+       GLWindow glWindow = GLWindow.create(caps);
+       setContentView(getWindow(), glWindow);
+       
+       glWindow.addGLEventListener(new RedSquareES1(1));
+       glWindow.getWindow().getScreen().addScreenModeListener(new ScreenModeListener() {
+        public void screenModeChangeNotify(ScreenMode sm) { }
+        public void screenModeChanged(ScreenMode sm, boolean success) {
+            System.err.println("ScreenMode Changed: "+sm);
+        }
+       });
+       glWindow.setVisible(true);
+       Animator animator = new Animator(glWindow);
+       animator.setUpdateFPSFrames(60, System.err);
+       setAnimator(animator);
+       
+       Log.d(TAG, "onCreate - X");
+   }   
+}
diff --git a/src/test/com/jogamp/opengl/test/android/NEWTRedSquareES2Activity.java b/src/test/com/jogamp/opengl/test/android/NEWTRedSquareES2Activity.java
new file mode 100644
index 0000000..e9ef981
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/android/NEWTRedSquareES2Activity.java
@@ -0,0 +1,74 @@
+/**
+ * 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.android;
+
+import javax.media.opengl.GLCapabilities;
+import javax.media.opengl.GLProfile;
+
+import jogamp.newt.driver.android.NewtBaseActivity;
+
+import com.jogamp.newt.ScreenMode;
+import com.jogamp.newt.event.ScreenModeListener;
+import com.jogamp.newt.opengl.GLWindow;
+
+import com.jogamp.opengl.test.junit.jogl.demos.es2.RedSquareES2;
+import com.jogamp.opengl.util.Animator;
+
+import android.os.Bundle;
+import android.util.Log;
+
+public class NEWTRedSquareES2Activity extends NewtBaseActivity {
+   static String TAG = "NEWTGearsES2Activity";
+   
+   @Override
+   public void onCreate(Bundle savedInstanceState) {
+       Log.d(TAG, "onCreate - 0");
+       super.onCreate(savedInstanceState);
+       
+       // create GLWindow (-> incl. underlying NEWT Display, Screen & Window)
+       GLCapabilities caps = new GLCapabilities(GLProfile.get(GLProfile.GLES2));
+       Log.d(TAG, "req caps: "+caps);
+       GLWindow glWindow = GLWindow.create(caps);
+       glWindow.setFullscreen(true);
+       setContentView(getWindow(), glWindow);
+       
+       glWindow.addGLEventListener(new RedSquareES2(1));
+       glWindow.getWindow().getScreen().addScreenModeListener(new ScreenModeListener() {
+        public void screenModeChangeNotify(ScreenMode sm) { }
+        public void screenModeChanged(ScreenMode sm, boolean success) {
+            System.err.println("ScreenMode Changed: "+sm);
+        }
+       });
+       glWindow.setVisible(true);
+       Animator animator = new Animator(glWindow);
+       animator.setUpdateFPSFrames(60, System.err);
+       setAnimator(animator);
+       
+       Log.d(TAG, "onCreate - X");
+   }   
+}
diff --git a/src/test/com/jogamp/opengl/test/bugs/Bug427GLJPanelTest1.java b/src/test/com/jogamp/opengl/test/bugs/Bug427GLJPanelTest1.java
index ceee2c8..04ce155 100644
--- a/src/test/com/jogamp/opengl/test/bugs/Bug427GLJPanelTest1.java
+++ b/src/test/com/jogamp/opengl/test/bugs/Bug427GLJPanelTest1.java
@@ -66,7 +66,7 @@ public class Bug427GLJPanelTest1 extends JFrame implements GLEventListener {
 
     public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) {
     }
-	
-	public void dispose(GLAutoDrawable drawable) {
-	}
+    
+    public void dispose(GLAutoDrawable drawable) {
+    }
 }
diff --git a/src/test/com/jogamp/opengl/test/bugs/Issue326Test1.java b/src/test/com/jogamp/opengl/test/bugs/Issue326Test1.java
index 4c2b547..833f341 100644
--- a/src/test/com/jogamp/opengl/test/bugs/Issue326Test1.java
+++ b/src/test/com/jogamp/opengl/test/bugs/Issue326Test1.java
@@ -32,19 +32,19 @@ public class Issue326Test1 extends Frame implements GLEventListener {
     int width, height;
 
     public static void main(String[] args) {
-        new Issue326Test1();		
+        new Issue326Test1();        
     }
-	
+    
     GLCanvas canvas;
     TextRenderer tr ;
-	
+    
     public Issue326Test1() {
         super("TextTest");
         this.setSize(800, 800);
         canvas = new GLCanvas();
         canvas.addGLEventListener(this);
         add(canvas);
-		
+        
         setVisible(true);
         addWindowListener(new WindowAdapter() {
                 public void windowClosing(WindowEvent e) {
@@ -57,20 +57,20 @@ public class Issue326Test1 extends Frame implements GLEventListener {
         GL2 gl = drawable.getGL().getGL2();
         gl.glClearColor(0, 0, 0, 0);
         gl.glClear(GL2.GL_COLOR_BUFFER_BIT|GL2.GL_DEPTH_BUFFER_BIT);
-		
-	    
+        
+        
         gl.glMatrixMode(GL2.GL_PROJECTION);
-        gl.glLoadIdentity();		
+        gl.glLoadIdentity();        
         //new GLU().gluPerspective(45f, (float)width/(float)height, 0.1f, 1000f);
         gl.glOrtho(0.0, 800, 0.0, 800, -100.0, 100.0);
         gl.glMatrixMode(GL2.GL_MODELVIEW);
         gl.glLoadIdentity();
-		
+        
         tr.beginRendering(800,800);
         tr.draw( "die Marktwirtschaft. Da regelt sich � angeblich", 16, 32);
         tr.draw( "Hello World! This text is scrambled", 16, 16);
         tr.endRendering();
-		
+        
     }
 
     public void init(GLAutoDrawable arg0) {
@@ -90,5 +90,5 @@ public class Issue326Test1 extends Frame implements GLEventListener {
         gl.glLoadIdentity();
     }
 
-	public void dispose(GLAutoDrawable drawable) {}
+    public void dispose(GLAutoDrawable drawable) {}
 }
diff --git a/src/test/com/jogamp/opengl/test/bugs/Issue326Test2.java b/src/test/com/jogamp/opengl/test/bugs/Issue326Test2.java
index 8960c96..ac5d819 100644
--- a/src/test/com/jogamp/opengl/test/bugs/Issue326Test2.java
+++ b/src/test/com/jogamp/opengl/test/bugs/Issue326Test2.java
@@ -21,19 +21,19 @@ public class Issue326Test2 extends Frame implements GLEventListener {
     int width, height;
 
     public static void main(String[] args) {
-        new Issue326Test2();		
+        new Issue326Test2();        
     }
-	
+    
     GLCanvas canvas;
     TextRenderer tr;
-	
+    
     public Issue326Test2() {
         super("");
         this.setSize(800, 800);
         canvas = new GLCanvas();
         canvas.addGLEventListener(this);
         add(canvas);
-		
+        
         setVisible(true);
         addWindowListener(new WindowAdapter() {
                 public void windowClosing(WindowEvent e) {
@@ -46,12 +46,12 @@ public class Issue326Test2 extends Frame implements GLEventListener {
         GL2 gl = drawable.getGL().getGL2();
         gl.glClearColor(0, 0, 0, 0);
         gl.glClear(GL2.GL_COLOR_BUFFER_BIT|GL2.GL_DEPTH_BUFFER_BIT);
-	    
+        
         tr.beginRendering(drawable.getWidth(), drawable.getHeight());
         tr.draw("LA CLAPI\u00c8RE \nAlt: 1100-1700m \nGlissement de terrain majeur", 16, 80);
         tr.draw("dans la haute Tin\u00e9e, sur un flanc du Parc du Mercantour.", 16, 16);
         tr.endRendering();
-		
+        
     }
 
     public void init(GLAutoDrawable arg0) {
@@ -68,6 +68,6 @@ public class Issue326Test2 extends Frame implements GLEventListener {
         gl.glLoadIdentity();
     }
 
-	public void dispose(GLAutoDrawable drawable) {}
+    public void dispose(GLAutoDrawable drawable) {}
 }
 
diff --git a/src/test/com/jogamp/opengl/test/bugs/Issue344Base.java b/src/test/com/jogamp/opengl/test/bugs/Issue344Base.java
index c3401fe..9b0a4c6 100644
--- a/src/test/com/jogamp/opengl/test/bugs/Issue344Base.java
+++ b/src/test/com/jogamp/opengl/test/bugs/Issue344Base.java
@@ -91,7 +91,7 @@ public abstract class Issue344Base implements GLEventListener
                         h / -2.0f * textScaleFactor,
                         3f,
                         textScaleFactor);
-		
+        
         renderer.end3DRendering();
     }
 
@@ -103,5 +103,5 @@ public abstract class Issue344Base implements GLEventListener
         glu.gluPerspective(15, (float) width / (float) height, 5, 15);
     }
 
-	public void dispose(GLAutoDrawable drawable) {}
+    public void dispose(GLAutoDrawable drawable) {}
 }
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/TestRegionRendererNEWT01.java b/src/test/com/jogamp/opengl/test/junit/graph/TestRegionRendererNEWT01.java
new file mode 100644
index 0000000..55d3371
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/graph/TestRegionRendererNEWT01.java
@@ -0,0 +1,190 @@
+package com.jogamp.opengl.test.junit.graph;
+
+import java.io.IOException;
+
+import javax.media.nativewindow.NativeWindowFactory;
+import javax.media.opengl.GLAutoDrawable;
+import javax.media.opengl.GLCapabilities;
+import javax.media.opengl.GLCapabilitiesImmutable;
+import javax.media.opengl.GLEventListener;
+import javax.media.opengl.GLException;
+import javax.media.opengl.GLProfile;
+
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.jogamp.graph.curve.Region;
+import com.jogamp.graph.curve.opengl.RenderState;
+import com.jogamp.graph.geom.opengl.SVertex;
+import com.jogamp.newt.opengl.GLWindow;
+import com.jogamp.opengl.test.junit.graph.demos.GPURegionGLListener01;
+import com.jogamp.opengl.test.junit.graph.demos.GPURegionGLListener02;
+import com.jogamp.opengl.test.junit.graph.demos.GPURegionRendererListenerBase01;
+import com.jogamp.opengl.test.junit.util.UITestCase;
+import com.jogamp.opengl.util.glsl.ShaderState;
+
+
+public class TestRegionRendererNEWT01 extends UITestCase {
+
+    public static void main(String args[]) throws IOException {
+        String tstname = TestRegionRendererNEWT01.class.getName();
+        org.junit.runner.JUnitCore.main(tstname);
+    }    
+    
+    @BeforeClass
+    public static void initClass() {
+        GLProfile.initSingleton(true);
+    }
+
+    static void destroyWindow(GLWindow window) {
+        if(null!=window) {
+            window.destroy();
+        }
+    }
+
+    static GLWindow createWindow(String title, GLCapabilitiesImmutable caps, int width, int height) {
+        Assert.assertNotNull(caps);
+
+        GLWindow window = GLWindow.create(caps);
+        window.setSize(width, height);
+        window.setPosition(10, 10);
+        window.setTitle(title);
+        Assert.assertNotNull(window);
+        window.setVisible(true);
+
+        return window;
+    }
+
+    @Test
+    public void testRegionRendererR2T01() throws InterruptedException {
+        GLProfile glp = GLProfile.getGL2ES2();
+        
+        GLCapabilities caps = new GLCapabilities(glp);
+        //caps.setOnscreen(false);
+        caps.setAlphaBits(4);    
+
+        GLWindow window = createWindow("shape-vbaa1-msaa0", caps, 800,400);
+        RenderState rs = RenderState.createRenderState(new ShaderState(), SVertex.factory());
+        GPURegionGLListener02  demo02Listener = new GPURegionGLListener02 (rs, Region.VBAA_RENDERING_BIT, 1140, false, false); 
+        demo02Listener.attachInputListenerTo(window);                
+        window.addGLEventListener(demo02Listener);        
+        
+        RegionGLListener listener = new RegionGLListener(demo02Listener, window.getTitle(), "GPURegionNewtDemo02");
+        window.addGLEventListener(listener);
+        
+        listener.setTech(-20, 00, 0f, -300, 400);
+        window.display();
+        
+        listener.setTech(-20, 00, 0f, -150, 800);
+        window.display();
+        
+        listener.setTech(-20, 00, 0f, -50, 1000);
+        window.display();
+
+        destroyWindow(window); 
+    }
+    
+    @Test
+    public void testRegionRendererMSAA01() throws InterruptedException {
+        GLProfile glp = GLProfile.get(GLProfile.GL2ES2);
+        GLCapabilities caps = new GLCapabilities(glp);
+    //    caps.setOnscreen(false);
+        caps.setAlphaBits(4);    
+        caps.setSampleBuffers(true);
+        caps.setNumSamples(4);
+
+        GLWindow window = createWindow("shape-vbaa0-msaa1", caps, 800, 400);
+        RenderState rs = RenderState.createRenderState(new ShaderState(), SVertex.factory());
+
+        GPURegionGLListener01 demo01Listener = new GPURegionGLListener01 (rs, 0, 0, false, false);
+        demo01Listener.attachInputListenerTo(window);        
+        window.addGLEventListener(demo01Listener);
+                
+        RegionGLListener listener = new RegionGLListener(demo01Listener, window.getTitle(), "GPURegion01");
+        window.addGLEventListener(listener);
+        
+        listener.setTech(-20, 00, 0f, -300, 400);
+        window.display();
+        
+        listener.setTech(-20, 00, 0f, -150, 800);
+        window.display();
+        
+        listener.setTech(-20, 00, 0f, -50, 1000);
+        window.display();
+        
+        destroyWindow(window); 
+    }
+    
+    @Test
+    public void testRegionRendererMSAA02() throws InterruptedException {
+        GLProfile glp = GLProfile.get(GLProfile.GL2ES2);
+        GLCapabilities caps = new GLCapabilities(glp);
+        caps.setAlphaBits(4);    
+        caps.setSampleBuffers(true);
+        caps.setNumSamples(4);
+
+        GLWindow window = createWindow("shape-vbaa0-msaa1", caps, 800, 400);
+        RenderState rs = RenderState.createRenderState(new ShaderState(), SVertex.factory());
+
+        GPURegionGLListener01 demo01Listener = new GPURegionGLListener01 (rs, Region.VARIABLE_CURVE_WEIGHT_BIT, 0, false, false);
+        demo01Listener.attachInputListenerTo(window);        
+        window.addGLEventListener(demo01Listener);
+                
+        RegionGLListener listener = new RegionGLListener(demo01Listener, window.getTitle(), "GPURegion02");
+        window.addGLEventListener(listener);
+        
+        listener.setTech(-20, 00, 0f, -300, 400);
+        window.display();
+        
+        listener.setTech(-20, 00, 0f, -150, 800);
+        window.display();
+        
+        listener.setTech(-20, 00, 0f, -50, 1000);
+        window.display();
+        
+        destroyWindow(window); 
+    }
+    
+    private class RegionGLListener implements GLEventListener {
+        String winTitle;
+        String name;
+        GPURegionRendererListenerBase01 impl;
+        
+        public RegionGLListener(GPURegionRendererListenerBase01 impl, String title, String name) {
+            this.impl = impl;
+            this.winTitle = title;
+            this.name = name;
+        }
+        
+        public void setTech(float xt, float yt, float angle, int zoom, int fboSize){
+            impl.setMatrix(xt, yt, angle, zoom, fboSize);       
+        }
+
+        public void init(GLAutoDrawable drawable) {
+            impl.init(drawable);
+        }
+        
+        public void display(GLAutoDrawable drawable) {
+            impl.display(drawable);
+
+            try {
+                impl.printScreen(drawable, "./", winTitle, name, false);
+            } catch (GLException e) {
+                e.printStackTrace();
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        }
+
+        public void dispose(GLAutoDrawable drawable) {
+            impl.dispose(drawable);
+            
+        }
+
+        public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
+            impl.reshape(drawable, x, y, width, height);
+            
+        }
+    }
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT01.java b/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT01.java
new file mode 100755
index 0000000..9fd0c05
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT01.java
@@ -0,0 +1,175 @@
+package com.jogamp.opengl.test.junit.graph;
+
+import java.io.IOException;
+
+import javax.media.nativewindow.NativeWindowFactory;
+import javax.media.opengl.GL;
+import javax.media.opengl.GL2ES2;
+import javax.media.opengl.GLAutoDrawable;
+import javax.media.opengl.GLCapabilities;
+import javax.media.opengl.GLCapabilitiesImmutable;
+import javax.media.opengl.GLException;
+import javax.media.opengl.GLProfile;
+
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.jogamp.graph.curve.Region;
+import com.jogamp.graph.curve.opengl.RenderState;
+import com.jogamp.graph.curve.opengl.TextRenderer;
+import com.jogamp.graph.font.FontFactory;
+import com.jogamp.graph.geom.opengl.SVertex;
+import com.jogamp.newt.opengl.GLWindow;
+import com.jogamp.opengl.test.junit.graph.demos.GPUTextRendererListenerBase01;
+import com.jogamp.opengl.test.junit.util.UITestCase;
+import com.jogamp.opengl.util.glsl.ShaderState;
+
+
+public class TestTextRendererNEWT01 extends UITestCase {
+    static final boolean DEBUG = false;
+    static final boolean TRACE = false;
+
+    public static void main(String args[]) throws IOException {
+        String tstname = TestTextRendererNEWT01.class.getName();
+        org.junit.runner.JUnitCore.main(tstname);
+    }    
+        
+    @BeforeClass
+    public static void initClass() {
+        GLProfile.initSingleton(true);
+    }
+
+    static void destroyWindow(GLWindow window) {
+        if(null!=window) {
+            window.destroy();
+        }
+    }
+
+    static GLWindow createWindow(String title, GLCapabilitiesImmutable caps, int width, int height) {
+        Assert.assertNotNull(caps);
+
+        GLWindow window = GLWindow.create(caps);
+        window.setSize(width, height);
+        window.setPosition(10, 10);
+        window.setTitle(title);
+        Assert.assertNotNull(window);
+        window.setVisible(true);
+
+        return window;
+    }
+
+    @Test
+    public void testTextRendererR2T01() throws InterruptedException {
+        GLProfile glp = GLProfile.getGL2ES2();
+        
+        GLCapabilities caps = new GLCapabilities(glp);
+        caps.setAlphaBits(4);    
+
+        GLWindow window = createWindow("text-vbaa1-msaa0", caps, 800,400);
+        RenderState rs = RenderState.createRenderState(new ShaderState(), SVertex.factory());
+        TextGLListener textGLListener = new TextGLListener(rs, Region.VBAA_RENDERING_BIT, DEBUG, TRACE);
+        textGLListener.attachInputListenerTo(window);
+        window.addGLEventListener(textGLListener);
+        
+        textGLListener.setFontSet(FontFactory.UBUNTU, 0, 0);
+        textGLListener.setTech(-400, -30, 0f, -1000, window.getWidth()*2);
+        window.display();
+        
+        textGLListener.setTech(-400, -30, 0, -380, window.getWidth()*3);
+        window.display();
+        
+        textGLListener.setTech(-400, -20, 0, -80, window.getWidth()*4);
+        window.display();
+
+        textGLListener.setFontSet(FontFactory.JAVA, 0, 0);
+        textGLListener.setTech(-400, -30, 0f, -1000, window.getWidth()*2);
+        window.display();
+        
+        textGLListener.setTech(-400, -30, 0, -380, window.getWidth()*3);
+        window.display();
+        
+        textGLListener.setTech(-400, -20, 0, -80, window.getWidth()*4);
+        window.display();
+        
+        destroyWindow(window); 
+    }
+    
+    @Test
+    public void testTextRendererMSAA01() throws InterruptedException {
+        GLProfile glp = GLProfile.get(GLProfile.GL2ES2);
+        GLCapabilities caps = new GLCapabilities(glp);
+        caps.setAlphaBits(4);    
+        caps.setSampleBuffers(true);
+        caps.setNumSamples(4);
+
+        GLWindow window = createWindow("text-vbaa0-msaa1", caps, 800, 400);
+        RenderState rs = RenderState.createRenderState(new ShaderState(), SVertex.factory());
+        TextGLListener textGLListener = new TextGLListener(rs, 0, DEBUG, TRACE);
+        textGLListener.attachInputListenerTo(window);
+        window.addGLEventListener(textGLListener);
+        
+        textGLListener.setFontSet(FontFactory.UBUNTU, 0, 0);
+        textGLListener.setTech(-400, -30, 0f, -1000, 0);
+        window.display();
+        
+        textGLListener.setTech(-400, -30, 0, -380, 0);
+        window.display();
+        
+        textGLListener.setTech(-400, -20, 0, -80, 0);
+        window.display();
+        
+        textGLListener.setFontSet(FontFactory.JAVA, 0, 0);
+        textGLListener.setTech(-400, -30, 0f, -1000, 0);
+        window.display();
+        
+        textGLListener.setTech(-400, -30, 0, -380, 0);
+        window.display();
+        
+        textGLListener.setTech(-400, -20, 0, -80, 0);
+        window.display();
+        
+        destroyWindow(window); 
+    }
+    
+    private class TextGLListener extends GPUTextRendererListenerBase01 {
+        String winTitle;
+        
+        public TextGLListener(RenderState rs, int type, boolean debug, boolean trace) {
+            super(rs, type, debug, trace);
+        }
+        
+        public void attachInputListenerTo(GLWindow window) {
+            super.attachInputListenerTo(window);
+            winTitle = window.getTitle();
+        }
+        public void setTech(float xt, float yt, float angle, int zoom, int fboSize){
+            setMatrix(xt, yt, angle, zoom, fboSize);       
+        }
+
+        public void init(GLAutoDrawable drawable) {
+            super.init(drawable);
+            
+            GL2ES2 gl = drawable.getGL().getGL2ES2();
+            gl.setSwapInterval(1);
+            gl.glEnable(GL.GL_DEPTH_TEST);
+            
+            final TextRenderer textRenderer = (TextRenderer) getRenderer();
+            
+            textRenderer.setAlpha(gl, 1.0f);
+            textRenderer.setColorStatic(gl, 0.0f, 0.0f, 0.0f);
+        }
+        
+        public void display(GLAutoDrawable drawable) {
+            super.display(drawable);
+
+            try {
+                printScreen(drawable, "./", winTitle, false);
+            } catch (GLException e) {
+                e.printStackTrace();
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        }
+    }
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPURegionGLListener01.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPURegionGLListener01.java
new file mode 100644
index 0000000..b8bb9ac
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPURegionGLListener01.java
@@ -0,0 +1,126 @@
+/**
+ * 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.graph.demos;
+
+import javax.media.opengl.GL;
+import javax.media.opengl.GL2ES2;
+import javax.media.opengl.GLAutoDrawable;
+import com.jogamp.graph.curve.OutlineShape;
+import com.jogamp.graph.curve.opengl.GLRegion;
+import com.jogamp.graph.curve.opengl.RegionRenderer;
+import com.jogamp.graph.curve.opengl.RenderState;
+
+/** Demonstrate the rendering of multiple outlines into one region/OutlineShape
+ *  These Outlines are not necessary connected or contained.
+ *  The output of this demo shows two identical shapes but the left one
+ *  has some vertices with off-curve flag set to true, and the right allt he vertices 
+ *  are on the curve. Demos the Res. Independent Nurbs based Curve rendering 
+ *
+ */
+public class GPURegionGLListener01 extends GPURegionRendererListenerBase01 {
+    OutlineShape outlineShape = null;
+    
+    public GPURegionGLListener01 (RenderState rs, int renderModes, int fbosize, boolean debug, boolean trace) {
+        super(rs, renderModes, debug, trace);
+        setMatrix(-20, 00, 0f, -50, fbosize);
+    }
+    
+    private void createTestOutline(){
+        float offset = 0;
+        outlineShape = new OutlineShape(getRenderer().getRenderState().getVertexFactory());
+        outlineShape.addVertex(0.0f,-10.0f, true);
+        outlineShape.addVertex(15.0f,-10.0f, true);
+        outlineShape.addVertex(10.0f,5.0f, false);
+        outlineShape.addVertex(15.0f,10.0f, true);
+        outlineShape.addVertex(6.0f,15.0f, false);
+        outlineShape.addVertex(5.0f,8.0f, false);
+        outlineShape.addVertex(0.0f,10.0f,true);
+        outlineShape.closeLastOutline();
+        outlineShape.addEmptyOutline();
+        outlineShape.addVertex(5.0f,-5.0f,true);
+        outlineShape.addVertex(10.0f,-5.0f, false);
+        outlineShape.addVertex(10.0f,0.0f, true);
+        outlineShape.addVertex(5.0f,0.0f, false);
+        outlineShape.closeLastOutline();
+        
+        /** Same shape as above but without any off-curve vertices */
+        offset = 30;
+        outlineShape.addEmptyOutline();
+        outlineShape.addVertex(offset+0.0f,-10.0f, true);
+        outlineShape.addVertex(offset+17.0f,-10.0f, true);
+        outlineShape.addVertex(offset+11.0f,5.0f, true);
+        outlineShape.addVertex(offset+16.0f,10.0f, true);
+        outlineShape.addVertex(offset+7.0f,15.0f, true);
+        outlineShape.addVertex(offset+6.0f,8.0f, true);
+        outlineShape.addVertex(offset+0.0f,10.0f, true);
+        outlineShape.closeLastOutline();
+        outlineShape.addEmptyOutline();
+        outlineShape.addVertex(offset+5.0f,0.0f, true);
+        outlineShape.addVertex(offset+5.0f,-5.0f, true);
+        outlineShape.addVertex(offset+10.0f,-5.0f, true);
+        outlineShape.addVertex(offset+10.0f,0.0f, true);
+        outlineShape.closeLastOutline();
+        
+        region = GLRegion.create(outlineShape, getRenderModes());
+    }
+
+    public void init(GLAutoDrawable drawable) {
+        super.init(drawable);
+        
+        GL2ES2 gl = drawable.getGL().getGL2ES2();
+
+        final RegionRenderer regionRenderer = (RegionRenderer) getRenderer();
+
+        gl.setSwapInterval(1);
+        gl.glEnable(GL2ES2.GL_DEPTH_TEST);
+        gl.glEnable(GL2ES2.GL_BLEND);
+        regionRenderer.setAlpha(gl, 1.0f);
+        regionRenderer.setColorStatic(gl, 0.0f, 0.0f, 0.0f);
+        MSAATool.dump(drawable);
+        
+        createTestOutline();
+    }
+
+    public void display(GLAutoDrawable drawable) {
+        GL2ES2 gl = drawable.getGL().getGL2ES2();
+
+        gl.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
+        gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
+
+        final RegionRenderer regionRenderer = (RegionRenderer) getRenderer();
+        
+        regionRenderer.resetModelview(null);
+        regionRenderer.translate(null, getXTran(), getYTran(), getZoom());
+        regionRenderer.rotate(gl, getAngle(), 0, 1, 0);
+        if( weight != regionRenderer.getWeight()) {
+            regionRenderer.setWeight(gl, weight);
+        }
+        regionRenderer.draw(gl, region, getPosition(), getTexSize());
+    }        
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPURegionGLListener02.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPURegionGLListener02.java
new file mode 100644
index 0000000..904e54e
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPURegionGLListener02.java
@@ -0,0 +1,125 @@
+/**
+ * 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.graph.demos;
+
+import javax.media.opengl.GL;
+import javax.media.opengl.GL2ES2;
+import javax.media.opengl.GLAutoDrawable;
+
+import com.jogamp.graph.curve.OutlineShape;
+import com.jogamp.graph.curve.opengl.GLRegion;
+import com.jogamp.graph.curve.opengl.RegionRenderer;
+import com.jogamp.graph.curve.opengl.RenderState;
+
+/** Demonstrate the rendering of multiple OutlineShapes
+ *  into one region
+ *
+ */
+public class GPURegionGLListener02 extends GPURegionRendererListenerBase01 {
+    OutlineShape[] outlineShapes = new OutlineShape[2];
+
+    public GPURegionGLListener02 (RenderState rs, int renderModes, int fbosize, boolean debug, boolean trace) {
+        super(rs, renderModes, debug, trace);
+        setMatrix(-20, 00, 0f, -50, fbosize);
+    }
+        
+    private void createTestOutline(){
+        float offset = 0;
+        outlineShapes[0] = new OutlineShape(getRenderer().getRenderState().getVertexFactory());
+        outlineShapes[0].addVertex(0.0f,-10.0f,true);
+        outlineShapes[0].addVertex(15.0f,-10.0f, true);
+        outlineShapes[0].addVertex(10.0f,5.0f, false);
+        outlineShapes[0].addVertex(15.0f,10.0f, true);
+        outlineShapes[0].addVertex(6.0f,15.0f, false);
+        outlineShapes[0].addVertex(5.0f,8.0f, false);
+        outlineShapes[0].addVertex(0.0f,10.0f,true);
+        outlineShapes[0].closeLastOutline();
+        outlineShapes[0].addEmptyOutline();
+        outlineShapes[0].addVertex(5.0f,-5.0f,true);
+        outlineShapes[0].addVertex(10.0f,-5.0f, false);
+        outlineShapes[0].addVertex(10.0f,0.0f, true);
+        outlineShapes[0].addVertex(5.0f,0.0f, false);
+        outlineShapes[0].closeLastOutline();
+        
+        /** Same shape as above but without any off-curve vertices */
+        outlineShapes[1] = new OutlineShape(getRenderer().getRenderState().getVertexFactory());
+        offset = 30;
+        outlineShapes[1].addVertex(offset+0.0f,-10.0f, true);
+        outlineShapes[1].addVertex(offset+17.0f,-10.0f, true);
+        outlineShapes[1].addVertex(offset+11.0f,5.0f, true);
+        outlineShapes[1].addVertex(offset+16.0f,10.0f, true);
+        outlineShapes[1].addVertex(offset+7.0f,15.0f, true);
+        outlineShapes[1].addVertex(offset+6.0f,8.0f, true);
+        outlineShapes[1].addVertex(offset+0.0f,10.0f, true);
+        outlineShapes[1].closeLastOutline();
+        outlineShapes[1].addEmptyOutline();
+        outlineShapes[1].addVertex(offset+5.0f,0.0f, true);
+        outlineShapes[1].addVertex(offset+5.0f,-5.0f, true);
+        outlineShapes[1].addVertex(offset+10.0f,-5.0f, true);
+        outlineShapes[1].addVertex(offset+10.0f,0.0f, true);
+        outlineShapes[1].closeLastOutline();
+        
+        region = GLRegion.create(outlineShapes, getRenderModes());
+    }
+
+    public void init(GLAutoDrawable drawable) {
+        super.init(drawable);
+        
+        GL2ES2 gl = drawable.getGL().getGL2ES2();
+
+        final RegionRenderer regionRenderer = (RegionRenderer) getRenderer();
+
+        gl.setSwapInterval(1);
+        gl.glEnable(GL2ES2.GL_DEPTH_TEST);
+        gl.glEnable(GL2ES2.GL_BLEND);
+        regionRenderer.setAlpha(gl, 1.0f);
+        regionRenderer.setColorStatic(gl, 0.0f, 0.0f, 0.0f);
+        MSAATool.dump(drawable);
+        
+        createTestOutline();
+    }
+
+    public void display(GLAutoDrawable drawable) {
+        GL2ES2 gl = drawable.getGL().getGL2ES2();
+
+        gl.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
+        gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
+
+        final RegionRenderer regionRenderer = (RegionRenderer) getRenderer();
+        
+        regionRenderer.resetModelview(null);
+        regionRenderer.translate(null, getXTran(), getYTran(), getZoom());
+        regionRenderer.rotate(gl, getAngle(), 0, 1, 0);
+        if( weight != regionRenderer.getWeight()) {
+            regionRenderer.setWeight(gl, weight);
+        }
+        regionRenderer.draw(gl, region, getPosition(), getTexSize());            
+        
+    }        
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPURegionNewtDemo01.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPURegionNewtDemo01.java
new file mode 100755
index 0000000..5e0c266
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPURegionNewtDemo01.java
@@ -0,0 +1,99 @@
+/**
+ * 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.graph.demos;
+
+import javax.media.opengl.FPSCounter;
+import javax.media.opengl.GLCapabilities;
+import javax.media.opengl.GLProfile;
+
+import com.jogamp.graph.curve.Region;
+import com.jogamp.graph.curve.opengl.RenderState;
+import com.jogamp.graph.geom.opengl.SVertex;
+import com.jogamp.newt.event.KeyAdapter;
+import com.jogamp.newt.event.KeyEvent;
+import com.jogamp.newt.event.WindowAdapter;
+import com.jogamp.newt.event.WindowEvent;
+import com.jogamp.newt.opengl.GLWindow;
+import com.jogamp.opengl.util.Animator;
+import com.jogamp.opengl.util.glsl.ShaderState;
+
+/** Demonstrate the rendering of multiple outlines into one region/OutlineShape
+ *  These Outlines are not necessary connected or contained.
+ *  The output of this demo shows two identical shapes but the left one
+ *  has some vertices with off-curve flag set to true, and the right allt he vertices 
+ *  are on the curve. Demos the Res. Independent Nurbs based Curve rendering 
+ *
+ */
+public class GPURegionNewtDemo01 {
+    static final boolean DEBUG = false;
+    static final boolean TRACE = false;
+    
+    public static void main(String[] args) {
+        GLProfile.initSingleton(true);
+        GLProfile glp = GLProfile.getGL2ES2();
+        GLCapabilities caps = new GLCapabilities(glp);
+        caps.setAlphaBits(4);
+        caps.setSampleBuffers(true);
+        caps.setNumSamples(4); // 2 samples is not enough ..
+        System.out.println("Requested: " + caps);
+        
+        final GLWindow window = GLWindow.create(caps);
+        window.setPosition(10, 10);
+        window.setSize(800, 400);
+        window.setTitle("GPU Curve Region Newt Demo 01 - vbaa0 msaa1");
+        
+        RenderState rs = RenderState.createRenderState(new ShaderState(), SVertex.factory());
+        GPURegionGLListener01 regionGLListener = new GPURegionGLListener01 (rs, Region.VARIABLE_CURVE_WEIGHT_BIT, 0, DEBUG, TRACE);
+        regionGLListener.attachInputListenerTo(window);                
+        window.addGLEventListener(regionGLListener);
+
+        window.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err);     
+        window.setVisible(true);
+
+        //FPSAnimator animator = new FPSAnimator(60);
+        final Animator animator = new Animator();
+        animator.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err);
+        animator.add(window);
+        
+        window.addKeyListener(new KeyAdapter() {
+            public void keyPressed(KeyEvent arg0) {
+                if(arg0.getKeyCode() == KeyEvent.VK_F4) {
+                    window.destroy();
+                }
+            }
+        });
+        window.addWindowListener(new WindowAdapter() {
+            public void windowDestroyed(WindowEvent e) {
+                animator.stop();
+            }
+        });
+                
+        animator.start();
+    }    
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPURegionNewtDemo02.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPURegionNewtDemo02.java
new file mode 100644
index 0000000..f1db1cc
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPURegionNewtDemo02.java
@@ -0,0 +1,94 @@
+/**
+ * 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.graph.demos;
+
+import javax.media.opengl.FPSCounter;
+import javax.media.opengl.GLCapabilities;
+import javax.media.opengl.GLProfile;
+
+import com.jogamp.graph.curve.Region;
+import com.jogamp.graph.curve.opengl.RenderState;
+import com.jogamp.graph.geom.opengl.SVertex;
+import com.jogamp.newt.event.KeyAdapter;
+import com.jogamp.newt.event.KeyEvent;
+import com.jogamp.newt.event.WindowAdapter;
+import com.jogamp.newt.event.WindowEvent;
+import com.jogamp.newt.opengl.GLWindow;
+import com.jogamp.opengl.util.Animator;
+import com.jogamp.opengl.util.glsl.ShaderState;
+
+/** Demonstrate the rendering of multiple OutlineShapes
+ *  into one region
+ *
+ */
+public class GPURegionNewtDemo02 {
+    static final boolean DEBUG = false;
+    static final boolean TRACE = false;
+    
+    public static void main(String[] args) {
+        GLProfile.initSingleton(true);
+        GLProfile glp = GLProfile.getGL2ES2();
+        GLCapabilities caps = new GLCapabilities(glp);
+        caps.setAlphaBits(4);               
+        System.out.println("Requested: " + caps);
+        
+        final GLWindow window = GLWindow.create(caps);
+        window.setPosition(10, 10);
+        window.setSize(800, 400);
+        window.setTitle("GPU Curve Region Newt Demo 02 - vbaa1 msaa0");
+                
+        RenderState rs = RenderState.createRenderState(new ShaderState(), SVertex.factory());
+        GPURegionGLListener02  regionGLListener = new GPURegionGLListener02 (rs, Region.VBAA_RENDERING_BIT|Region.VARIABLE_CURVE_WEIGHT_BIT, 1140, DEBUG, TRACE); 
+        regionGLListener.attachInputListenerTo(window);                
+        window.addGLEventListener(regionGLListener);
+             
+        window.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err);
+        window.setVisible(true);
+
+        //FPSAnimator animator = new FPSAnimator(60);
+        final Animator animator = new Animator();
+        animator.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err);
+        animator.add(window);
+        
+        window.addKeyListener(new KeyAdapter() {
+            public void keyPressed(KeyEvent arg0) {
+                if(arg0.getKeyCode() == KeyEvent.VK_F4) {
+                    window.destroy();
+                }
+            }
+        });
+        window.addWindowListener(new WindowAdapter() {
+            public void windowDestroyed(WindowEvent e) {
+                animator.stop();
+            }
+        });
+                
+        animator.start();
+    }    
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPURegionRendererListenerBase01.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPURegionRendererListenerBase01.java
new file mode 100644
index 0000000..8439d1f
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPURegionRendererListenerBase01.java
@@ -0,0 +1,52 @@
+/**
+ * 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.graph.demos;
+
+import com.jogamp.graph.curve.OutlineShape;
+import com.jogamp.graph.curve.opengl.RegionRenderer;
+import com.jogamp.graph.curve.opengl.RenderState;
+
+/**
+ *
+ * Action Keys:
+ * - 1/2: zoom in/out
+ * - 3/4: font +/-
+ * - 6/7: 2nd pass texture size
+ * - 0/9: rotate 
+ * - s: toogle draw 'font set'
+ * - f: toggle draw fps
+ * - v: toggle v-sync
+ * - space: toggle font (ubuntu/java)
+ */
+public abstract class GPURegionRendererListenerBase01 extends GPURendererListenerBase01 {
+    OutlineShape outlineShape = null;
+
+    public GPURegionRendererListenerBase01(RenderState rs, int renderModes, boolean debug, boolean trace) {
+        super(RegionRenderer.create(rs, renderModes), renderModes, debug, trace);
+    }        
+}
\ No newline at end of file
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
new file mode 100644
index 0000000..dac965d
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPURendererListenerBase01.java
@@ -0,0 +1,297 @@
+/**
+ * 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.graph.demos;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+
+import javax.media.opengl.FPSCounter;
+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.GLException;
+import javax.media.opengl.GLPipelineFactory;
+import javax.media.opengl.GLRunnable;
+
+
+import com.jogamp.graph.curve.Region;
+import com.jogamp.graph.curve.opengl.GLRegion;
+import com.jogamp.graph.curve.opengl.Renderer;
+import com.jogamp.newt.event.KeyEvent;
+import com.jogamp.newt.event.KeyListener;
+import com.jogamp.newt.opengl.GLWindow;
+import com.jogamp.opengl.util.GLReadBufferUtil;
+
+/**
+ *
+ * Action Keys:
+ * - 1/2: zoom in/out
+ * - 6/7: 2nd pass texture size
+ * - 0/9: rotate 
+ * - Q/W: change weight
+ * - v: toggle v-sync
+ * - s: screenshot
+ */
+public abstract class GPURendererListenerBase01 implements GLEventListener {
+    private GLReadBufferUtil screenshot;
+    private Renderer renderer;
+    private int renderModes;
+    private boolean debug;
+    private boolean trace;
+    
+    protected GLRegion region;
+
+    private KeyAction keyAction;
+    
+    private volatile GLAutoDrawable autoDrawable = null;
+    
+    private final float[] position = new float[] {0,0,0};
+    
+    private float xTran = -10;
+    private float yTran =  10;    
+    private float ang = 0f;
+    private float zoom = -70f;
+    private int texSize = 400; 
+
+    protected volatile float weight = 1.0f;
+    boolean ignoreInput = false;
+
+    public GPURendererListenerBase01(Renderer renderer, int renderModes, boolean debug, boolean trace) {
+        this.renderer = renderer;
+        this.renderModes = renderModes;
+        this.debug = debug;
+        this.trace = trace;
+        this.screenshot = new GLReadBufferUtil(false, false);
+    }
+    
+    public final Renderer getRenderer() { return renderer; }
+    public final int getRenderModes() { return renderModes; }
+    public final float getZoom() { return zoom; }
+    public final float getXTran() { return xTran; }
+    public final float getYTran() { return yTran; }
+    public final float getAngle() { return ang; }
+    public final int getTexSize() { return texSize; }
+    public final float[] getPosition() { return position; }
+
+    public void setMatrix(float xtrans, float ytrans, float angle, int zoom, int fbosize) {
+        this.xTran = xtrans;
+        this.yTran = ytrans; 
+        this.ang = angle;  
+        this.zoom = zoom;
+        this.texSize = fbosize;     
+    }
+    
+    public void init(GLAutoDrawable drawable) {
+        autoDrawable = drawable;
+        GL2ES2 gl = drawable.getGL().getGL2ES2();
+        if(debug) {
+            gl = gl.getContext().setGL( GLPipelineFactory.create("javax.media.opengl.Debug", null, gl, null) ).getGL2ES2();
+        }
+        if(trace) {
+            gl = gl.getContext().setGL( GLPipelineFactory.create("javax.media.opengl.Trace", null, gl, new Object[] { System.err } ) ).getGL2ES2();
+        }
+        System.err.println("*** "+gl.getContext().getGLVersion());
+        System.err.println("*** GLDebugMessage "+gl.getContext().isGLDebugMessageEnabled());
+        gl.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
+        getRenderer().init(gl);
+    }
+    
+    public void reshape(GLAutoDrawable drawable, int xstart, int ystart, int width, int height) {
+        GL2ES2 gl = drawable.getGL().getGL2ES2();
+        
+        gl.glViewport(xstart, ystart, width, height);        
+        renderer.reshapePerspective(gl, 45.0f, width, height, 0.1f, 7000.0f);
+        
+        dumpMatrix();
+        System.err.println("Reshape: "+renderer.getRenderState());        
+    }
+    
+    public void dispose(GLAutoDrawable drawable) {
+        autoDrawable = null;
+        GL2ES2 gl = drawable.getGL().getGL2ES2();
+        if(null != region) {
+            region.destroy(gl, renderer.getRenderState());
+        }
+        screenshot.dispose(gl);
+        renderer.destroy(gl);
+    }    
+    
+    public void zoom(int v){
+        zoom += v;
+        dumpMatrix();
+    }
+    
+    public void move(float x, float y){
+        xTran += x;
+        yTran += y;
+        dumpMatrix();
+    }
+    public void rotate(float delta){
+        ang += delta;
+        ang %= 360.0f;
+        dumpMatrix();
+    }
+    public void editGlobalWeight(float delta) {
+        if( !Renderer.isWeightValid(weight+delta) ) {
+            return;
+        }
+        weight += delta;
+        System.err.println("Global Weight: "+ weight);
+    }
+    
+    void dumpMatrix() {
+        System.err.println("Matrix: " + xTran + "/" + yTran + " x"+zoom + " @"+ang);
+    }
+    
+    /** Attach the input listener to the window */ 
+    public void attachInputListenerTo(GLWindow window) {
+        if ( null == keyAction ) {
+            keyAction = new KeyAction();
+            window.addKeyListener(keyAction);        
+        }
+    }
+    
+    public void detachInputListenerFrom(GLWindow window) {
+        if ( null == keyAction ) {
+            return;
+        }
+        window.removeKeyListener(keyAction);
+    }
+    
+    public void printScreen(GLAutoDrawable drawable, String dir, String tech, String objName, boolean exportAlpha) throws GLException, IOException {
+        StringWriter sw = new StringWriter();
+        PrintWriter pw = new PrintWriter(sw);
+        pw.printf("-%03dx%03d-Z%04d-T%04d-%s", drawable.getWidth(), drawable.getHeight(), (int)Math.abs(zoom), texSize, objName);
+        
+        final String filename = dir + tech + sw +".tga";
+        screenshot.readPixels(drawable.getGL(), drawable, false);
+        screenshot.write(new File(filename));
+    }
+    
+    int screenshot_num = 0;
+
+    public void setIgnoreInput(boolean v) {
+        ignoreInput = v;
+    }
+    public boolean getIgnoreInput() {
+        return ignoreInput;
+    }
+    
+    public class KeyAction implements KeyListener {
+        public void keyPressed(KeyEvent arg0) {
+            if(ignoreInput) {
+                return;
+            }
+            
+            if(arg0.getKeyCode() == KeyEvent.VK_1){
+                zoom(10);
+            }
+            else if(arg0.getKeyCode() == KeyEvent.VK_2){
+                zoom(-10);
+            }
+            else if(arg0.getKeyCode() == KeyEvent.VK_UP){
+                move(0, -1);
+            }
+            else if(arg0.getKeyCode() == KeyEvent.VK_DOWN){
+                move(0, 1);
+            }
+            else if(arg0.getKeyCode() == KeyEvent.VK_LEFT){
+                move(1, 0);
+            }
+            else if(arg0.getKeyCode() == KeyEvent.VK_RIGHT){
+                move(-1, 0);
+            }
+            else if(arg0.getKeyCode() == KeyEvent.VK_6){
+                texSize -= 10;
+                System.err.println("Tex Size: " + texSize);
+            }
+            else if(arg0.getKeyCode() == KeyEvent.VK_7){
+                texSize += 10;
+                System.err.println("Tex Size: " + texSize);
+            }            
+            else if(arg0.getKeyCode() == KeyEvent.VK_0){
+                rotate(1);
+            }
+            else if(arg0.getKeyCode() == KeyEvent.VK_9){
+                rotate(-1);
+            }  
+            else if(arg0.getKeyCode() == KeyEvent.VK_Q){
+                editGlobalWeight(-0.1f);
+            }
+            else if(arg0.getKeyCode() == KeyEvent.VK_W){
+                editGlobalWeight(0.1f);
+            }
+            else if(arg0.getKeyCode() == KeyEvent.VK_V) {
+                if(null != autoDrawable) {
+                    autoDrawable.invoke(false, new GLRunnable() {
+                        public boolean run(GLAutoDrawable drawable) {
+                            GL gl = drawable.getGL();
+                            int i = gl.getSwapInterval();      
+                            i = i==0 ? 1 : 0;
+                            gl.setSwapInterval(i);
+                            final GLAnimatorControl a = drawable.getAnimator();
+                            if( null != a ) {
+                                a.resetFPSCounter();
+                            }
+                            if(drawable instanceof FPSCounter) {
+                                ((FPSCounter)drawable).resetFPSCounter();
+                            }
+                            System.err.println("Swap Interval: "+i);
+                            return true;
+                        }
+                    });
+                }                
+            }
+            else if(arg0.getKeyCode() == KeyEvent.VK_S){
+                rotate(-1);
+                    if(null != autoDrawable) {
+                        autoDrawable.invoke(false, new GLRunnable() {
+                            public boolean run(GLAutoDrawable drawable) {
+                                try {
+                                    final String type = Region.isVBAA(renderModes) ? "vbaa0-msaa1" : "vbaa1-msaa0" + ( Region.isNonUniformWeight(renderModes) ? "-vc" : "-uc" ) ; 
+                                    printScreen(drawable, "./", "demo-"+type, "snap"+screenshot_num, false);
+                                    screenshot_num++;
+                                } catch (GLException e) {
+                                    e.printStackTrace();
+                                } catch (IOException e) {
+                                    e.printStackTrace();
+                                }     
+                                return true;
+                            }
+                        });
+                    }                
+            }  
+        }
+        public void keyTyped(KeyEvent arg0) {}
+        public void keyReleased(KeyEvent arg0) {}
+    }
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUTextGLListener0A.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUTextGLListener0A.java
new file mode 100644
index 0000000..da34b1d
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUTextGLListener0A.java
@@ -0,0 +1,77 @@
+/**
+ * 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.graph.demos;
+
+
+import javax.media.opengl.GL2ES2;
+import javax.media.opengl.GLAutoDrawable;
+
+import com.jogamp.graph.curve.opengl.RenderState;
+import com.jogamp.graph.curve.opengl.TextRenderer;
+import com.jogamp.graph.geom.opengl.SVertex;
+import com.jogamp.newt.opengl.GLWindow;
+import com.jogamp.opengl.util.glsl.ShaderState;
+
+public class GPUTextGLListener0A extends GPUTextRendererListenerBase01 {
+    
+    public GPUTextGLListener0A() {
+        this( RenderState.createRenderState(new ShaderState(), SVertex.factory()), 0, 0, false, false ) ;
+    }
+    
+    public GPUTextGLListener0A(RenderState rs, int numpass, int fbosize, boolean debug, boolean trace) {
+        super(rs, numpass, debug, trace);
+        setMatrix(-400, -30, 0f, -500, fbosize); 
+    }
+    
+    public void init(GLAutoDrawable drawable) {
+        if(drawable instanceof GLWindow) {
+            final GLWindow glw = (GLWindow) drawable;
+            attachInputListenerTo(glw);
+        }        
+        super.init(drawable);
+        
+        GL2ES2 gl = drawable.getGL().getGL2ES2();
+        
+        final TextRenderer textRenderer = (TextRenderer) getRenderer();
+        
+        gl.setSwapInterval(1);
+        gl.glEnable(GL2ES2.GL_DEPTH_TEST);
+        gl.glEnable(GL2ES2.GL_BLEND);
+        textRenderer.setAlpha(gl, 1.0f);
+        textRenderer.setColorStatic(gl, 0.0f, 0.0f, 0.0f);
+        MSAATool.dump(drawable);
+    }
+    
+    public void dispose(GLAutoDrawable drawable) {
+        if(drawable instanceof GLWindow) {
+            final GLWindow glw = (GLWindow) drawable;
+            detachInputListenerFrom(glw);
+        }
+        super.dispose(drawable);
+    }
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUTextNewtDemo01.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUTextNewtDemo01.java
new file mode 100644
index 0000000..bcd60d4
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUTextNewtDemo01.java
@@ -0,0 +1,91 @@
+/**
+ * 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.graph.demos;
+
+
+import javax.media.opengl.FPSCounter;
+import javax.media.opengl.GLCapabilities;
+import javax.media.opengl.GLProfile;
+
+
+import com.jogamp.graph.curve.opengl.GLRegion;
+import com.jogamp.graph.curve.opengl.RenderState;
+import com.jogamp.graph.geom.opengl.SVertex;
+import com.jogamp.newt.event.KeyAdapter;
+import com.jogamp.newt.event.KeyEvent;
+import com.jogamp.newt.event.WindowAdapter;
+import com.jogamp.newt.event.WindowEvent;
+import com.jogamp.newt.opengl.GLWindow;
+import com.jogamp.opengl.util.Animator;
+import com.jogamp.opengl.util.glsl.ShaderState;
+
+public class GPUTextNewtDemo01 {
+    static final boolean DEBUG = false;
+    static final boolean TRACE = false;
+    
+    public static void main(String[] args) {
+        GLProfile.initSingleton(true);
+        GLProfile glp = GLProfile.getGL2ES2();
+        GLCapabilities caps = new GLCapabilities(glp);
+        caps.setAlphaBits(4);
+        caps.setSampleBuffers(true);
+        caps.setNumSamples(4); // 2 samples is not enough ..
+        System.out.println("Requested: "+caps);
+        
+        final GLWindow window = GLWindow.create(caps);        
+        window.setPosition(10, 10);
+        window.setSize(800, 400);
+        window.setTitle("GPU Text Newt Demo 01 - vbaa0 msaa1");
+        
+        final RenderState rs = RenderState.createRenderState(new ShaderState(), SVertex.factory());
+        GPUTextGLListener0A textGLListener = new GPUTextGLListener0A(rs, 0, 0, DEBUG, TRACE);
+        window.addGLEventListener(textGLListener);
+        window.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err);        
+        
+        final Animator animator = new Animator();
+        animator.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err);
+        animator.add(window);
+        
+        window.addKeyListener(new KeyAdapter() {
+            public void keyPressed(KeyEvent arg0) {
+                if(arg0.getKeyCode() == KeyEvent.VK_F4) {
+                    window.destroy();
+                }
+            }
+        });
+        window.addWindowListener(new WindowAdapter() {
+            public void windowDestroyed(WindowEvent e) {
+                animator.stop();
+            }
+        });
+        
+        window.setVisible(true);
+        // FPSAnimator animator = new FPSAnimator(10);
+        animator.start();
+    }    
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUTextNewtDemo02.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUTextNewtDemo02.java
new file mode 100644
index 0000000..5981e79
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUTextNewtDemo02.java
@@ -0,0 +1,100 @@
+/**
+ * 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.graph.demos;
+
+import javax.media.opengl.FPSCounter;
+import javax.media.opengl.GLCapabilities;
+import javax.media.opengl.GLProfile;
+
+import com.jogamp.graph.curve.Region;
+import com.jogamp.graph.curve.opengl.RenderState;
+import com.jogamp.graph.geom.opengl.SVertex;
+import com.jogamp.newt.event.KeyAdapter;
+import com.jogamp.newt.event.KeyEvent;
+import com.jogamp.newt.event.WindowAdapter;
+import com.jogamp.newt.event.WindowEvent;
+import com.jogamp.newt.opengl.GLWindow;
+import com.jogamp.opengl.util.Animator;
+import com.jogamp.opengl.util.glsl.ShaderState;
+
+public class GPUTextNewtDemo02 {
+    /**
+     * FIXME:
+     * 
+     * If DEBUG is enabled:
+     *  
+     * Caused by: javax.media.opengl.GLException: Thread[main-Display-X11_:0.0-1-EDT-1,5,main] glGetError() returned the following error codes after a call to glFramebufferRenderbuffer(<int> 0x8D40, <int> 0x1902, <int> 0x8D41, <int> 0x1): GL_INVALID_ENUM ( 1280 0x500), 
+     * at javax.media.opengl.DebugGL4bc.checkGLGetError(DebugGL4bc.java:33961)
+     * at javax.media.opengl.DebugGL4bc.glFramebufferRenderbuffer(DebugGL4bc.java:33077)
+     * at jogamp.graph.curve.opengl.VBORegion2PGL3.initFBOTexture(VBORegion2PGL3.java:295)
+     */
+    static final boolean DEBUG = false;
+    static final boolean TRACE = false;
+    
+    public static void main(String[] args) {
+        GLProfile.initSingleton(true);
+        GLProfile glp = GLProfile.getGL2ES2();
+        
+        GLCapabilities caps = new GLCapabilities(glp);
+        caps.setAlphaBits(4);        
+        System.out.println("Requested: "+caps);
+        
+        final GLWindow window = GLWindow.create(caps);
+        
+        window.setPosition(10, 10);
+        window.setSize(800, 400);        
+        window.setTitle("GPU Text Newt Demo 02 - vbaa1 msaa0");
+        
+        RenderState rs = RenderState.createRenderState(new ShaderState(), SVertex.factory());
+        GPUTextGLListener0A textGLListener = new GPUTextGLListener0A(rs, Region.VBAA_RENDERING_BIT, window.getWidth()*3, DEBUG, TRACE);
+        // ((TextRenderer)textGLListener.getRenderer()).setCacheLimit(32);
+        window.addGLEventListener(textGLListener);
+        
+        window.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err);        
+        window.setVisible(true);
+        // FPSAnimator animator = new FPSAnimator(60);
+        final Animator animator = new Animator();
+        animator.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err);
+        animator.add(window);
+        
+        window.addKeyListener(new KeyAdapter() {
+            public void keyPressed(KeyEvent arg0) {
+                if(arg0.getKeyCode() == KeyEvent.VK_F4) {
+                    window.destroy();
+                }
+            }
+        });
+        window.addWindowListener(new WindowAdapter() {
+            public void windowDestroyed(WindowEvent e) {
+                animator.stop();
+            }
+        });
+                
+        animator.start();
+    }    
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUTextRendererListenerBase01.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUTextRendererListenerBase01.java
new file mode 100644
index 0000000..ad662e0
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUTextRendererListenerBase01.java
@@ -0,0 +1,292 @@
+/**
+ * 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.graph.demos;
+
+import java.io.IOException;
+
+import javax.media.opengl.FPSCounter;
+import javax.media.opengl.GL;
+import javax.media.opengl.GL2ES2;
+import javax.media.opengl.GLAnimatorControl;
+import javax.media.opengl.GLAutoDrawable;
+import javax.media.opengl.GLException;
+
+import com.jogamp.graph.curve.opengl.RenderState;
+import com.jogamp.graph.curve.opengl.TextRenderer;
+import com.jogamp.graph.font.Font;
+import com.jogamp.graph.font.FontFactory;
+import com.jogamp.graph.geom.AABBox;
+import com.jogamp.graph.geom.Vertex;
+import com.jogamp.newt.event.KeyEvent;
+import com.jogamp.newt.event.KeyListener;
+import com.jogamp.newt.opengl.GLWindow;
+
+/**
+ *
+ * GPURendererListenerBase01 Keys:
+ * - 1/2: zoom in/out
+ * - 6/7: 2nd pass texture size
+ * - 0/9: rotate
+ * - v: toggle v-sync
+ * - s: screenshot
+ * 
+ * Additional Keys:
+ * - 3/4: font +/-
+ * - h: toogle draw 'font set'
+ * - f: toggle draw fps
+ * - space: toggle font (ubuntu/java)
+ * - i: live input text input (CR ends it, backspace supported)
+ */
+public abstract class GPUTextRendererListenerBase01 extends GPURendererListenerBase01 {
+    int fontSet = FontFactory.UBUNTU;
+    Font font;
+    
+    int headType = 0;
+    boolean drawFPS = false;
+    boolean updateFont = true;
+    final int fontSizeFixed = 6;
+    int fontSize = 40;
+    final int fontSizeModulo = 100;
+    String fontName;
+    AABBox fontNameBox;
+    String headtext;
+    AABBox headbox;
+    
+    static final String text1 = "abcdefghijklmnopqrstuvwxyz\nABCDEFGHIJKLMNOPQRSTUVWXYZ\n0123456789.:,;(*!?/\\\")$%^&-+@~#<>{}[]";
+    static final String text2 = "The quick brown fox jumps over the lazy dog";
+    static final String textX = 
+        "JOGAMP graph demo using Resolution Independent NURBS\n"+
+        "JOGAMP JOGL - OpenGL ES2 profile\n"+
+        "Press 1/2 to zoom in/out the below text\n"+
+        "Press 6/7 to edit texture size if using VBAA\n"+
+        "Press 0/9 to rotate the below string\n"+
+        "Press v to toggle vsync\n"+
+        "Press i for live input text input (CR ends it, backspace supported)\n"+
+        "Press f to toggle fps. H for different text, space for font type\n"; 
+    
+    static final String textX2 = 
+        "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec nec sapien tellus. \n"+
+        "Ut purus odio, rhoncus sit amet commodo eget, ullamcorper vel urna. Mauris ultricies \n"+
+        "quam iaculis urna cursus ornare. Nullam ut felis a ante ultrices ultricies nec a elit. \n"+
+        "In hac habitasse platea dictumst. Vivamus et mi a quam lacinia pharetra at venenatis est.\n"+ 
+        "Morbi quis bibendum nibh. Donec lectus orci, sagittis in consequat nec, volutpat nec nisi.\n"+
+        "Donec ut dolor et nulla tristique varius. In nulla magna, fermentum id tempus quis, semper \n"+
+        "in lorem. Maecenas in ipsum ac justo scelerisque sollicitudin. Quisque sit amet neque lorem,\n" +
+        "-------Press H to change text---------\n"; 
+    
+    StringBuffer userString = new StringBuffer();
+    boolean userInput = false;
+    
+    public GPUTextRendererListenerBase01(RenderState rs, int modes, boolean debug, boolean trace) {
+        super(TextRenderer.create(rs, modes), modes, debug, trace);        
+        this.font = FontFactory.get(fontSet).getDefault();
+        dumpFontNames();
+        
+        this.fontName = font.toString();
+        this.fontNameBox = font.getStringBounds(fontName, fontSizeFixed*2);
+        switchHeadBox();        
+    }
+
+    void dumpFontNames() {
+        System.err.println("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
+        System.err.println(font.getAllNames(null, "\n"));
+        System.err.println("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");        
+    }
+    
+    void switchHeadBox() {
+        headType = ( headType + 1 ) % 4 ; 
+        switch(headType) {
+          case 0:
+              headtext = null;
+              break;
+              
+          case 1:
+              headtext= textX2;
+              break;
+          case 2:
+              headtext= textX;
+              break;
+              
+          default:
+              headtext = text1;              
+        }
+        if(null != headtext) {
+            headbox = font.getStringBounds(headtext, fontSizeFixed*3);
+        }
+    }
+
+    public void display(GLAutoDrawable drawable) {
+        final int width = drawable.getWidth();
+        final int height = drawable.getHeight();
+        GL2ES2 gl = drawable.getGL().getGL2ES2();
+        
+        gl.glClearColor(1.0f, 1.0f, 1.0f, 1.0f); // Demo02 needs to have this set here as well .. hmm ?
+        gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
+
+        final TextRenderer textRenderer = (TextRenderer) getRenderer();
+        textRenderer.reshapeOrtho(null, width, height, 0.1f, 7000.0f);
+        textRenderer.setColorStatic(gl, 0.0f, 0.0f, 0.0f);
+        final GLAnimatorControl animator = drawable.getAnimator();
+        final boolean _drawFPS = drawFPS && null != animator && animator.getTotalFPSFrames()>10;
+        
+        if(_drawFPS) {
+            final float fps = animator.getTotalFPS();
+            final String fpsS = String.valueOf(fps);
+            final int fpsSp = fpsS.indexOf('.');
+            textRenderer.resetModelview(null);
+            textRenderer.translate(gl, fontSizeFixed, fontSizeFixed, -6000);
+            textRenderer.drawString3D(gl, font, fpsS.substring(0, fpsSp+2)+" fps", getPosition(), fontSizeFixed*3, getTexSize());
+        }
+        
+        int dx = width-(int)fontNameBox.getWidth()-2 ;
+        int dy = height - 10;        
+        
+        textRenderer.resetModelview(null);
+        textRenderer.translate(gl, dx, dy, -6000);
+        textRenderer.drawString3D(gl, font, fontName, getPosition(), fontSizeFixed*2, getTexSize());
+        
+        dx  =  10;
+        dy += -(int)fontNameBox.getHeight() - 10;
+        
+        if(null != headtext) { 
+            textRenderer.resetModelview(null);
+            textRenderer.translate(gl, dx, dy, -6000);
+            textRenderer.drawString3D(gl, font, headtext, getPosition(), fontSizeFixed*3, getTexSize());
+        }
+        
+        textRenderer.reshapePerspective(null, 45.0f, width, height, 0.1f, 7000.0f);             
+
+        textRenderer.resetModelview(null);            
+        textRenderer.translate(null, getXTran(), getYTran(), getZoom());
+        textRenderer.rotate(gl, getAngle(), 0, 1, 0);
+        textRenderer.setColorStatic(gl, 1.0f, 0.0f, 0.0f);
+        if(!userInput) {
+            textRenderer.drawString3D(gl, font, text2, getPosition(), fontSize, getTexSize());
+        } else {
+            textRenderer.drawString3D(gl, font, userString.toString(), getPosition(), fontSize, getTexSize());
+        }
+    }        
+        
+    public void fontIncr(int v) {
+        fontSize = Math.abs((fontSize + v) % fontSizeModulo) ;
+        updateFont = true;
+        dumpMatrix(true);
+    }
+
+    public void nextFontSet() {
+        fontSet = ( fontSet == FontFactory.UBUNTU ) ? FontFactory.JAVA : FontFactory.UBUNTU ;
+        font = FontFactory.get(fontSet).getDefault();   
+        this.fontName = font.getFullFamilyName(null).toString();
+        this.fontNameBox = font.getStringBounds(fontName, fontSizeFixed*3);
+        dumpFontNames();
+    }
+    
+    public void setFontSet(int set, int family, int stylebits) {
+        fontSet = set;
+        font = FontFactory.get(fontSet).get(family, stylebits);       
+        dumpFontNames();
+    }
+    
+    public boolean isUserInputMode() { return userInput; }
+    
+    void dumpMatrix(boolean bbox) {
+        System.err.println("Matrix: " + getXTran() + "/" + getYTran() + " x"+getZoom() + " @"+getAngle() +" fontSize "+fontSize);
+        if(bbox) {
+            System.err.println("bbox: "+font.getStringBounds(text2, fontSize));
+        }
+    }
+    
+    KeyAction keyAction = null;
+    
+    @Override
+    public void attachInputListenerTo(GLWindow window) {
+        if ( null == keyAction ) {
+            keyAction = new KeyAction();
+            window.addKeyListener(keyAction);
+            super.attachInputListenerTo(window);            
+        }                
+    }
+
+    @Override
+    public void detachInputListenerFrom(GLWindow window) {
+        super.detachInputListenerFrom(window);
+        if ( null == keyAction ) {
+            return;
+        }
+        window.removeKeyListener(keyAction);
+    }
+    
+    public void printScreen(GLAutoDrawable drawable, String dir, String tech, boolean exportAlpha) throws GLException, IOException {
+        final String fn = font.getFullFamilyName(null).toString();        
+        printScreen(drawable, dir, tech, fn.replace(' ', '_'), exportAlpha);
+    }
+    
+    public class KeyAction implements KeyListener {
+        public void keyPressed(KeyEvent arg0) {
+            if(userInput) {
+                return;
+            }
+            
+            if(arg0.getKeyCode() == KeyEvent.VK_3) {
+                fontIncr(10);
+            }
+            else if(arg0.getKeyCode() == KeyEvent.VK_4) {
+                fontIncr(-10);
+            }
+            else if(arg0.getKeyCode() == KeyEvent.VK_H) {
+                switchHeadBox();
+            }  
+            else if(arg0.getKeyCode() == KeyEvent.VK_F) {
+                drawFPS = !drawFPS; 
+            }  
+            else if(arg0.getKeyCode() == KeyEvent.VK_SPACE) {      
+                nextFontSet();
+            }
+            else if(arg0.getKeyCode() == KeyEvent.VK_I) {
+                userInput = true;
+                setIgnoreInput(true);
+            }
+        }
+        
+        public void keyTyped(KeyEvent arg0) {
+            if(userInput) {                
+                char c = arg0.getKeyChar();
+                
+                if(c == 0x0d) {
+                    userInput = false;
+                    setIgnoreInput(false);
+                } else if(c == 0x08 && userString.length()>0) {
+                    userString.deleteCharAt(userString.length()-1);
+                } else if( font.isPrintableChar( c ) ) { 
+                    userString.append(c);
+                }
+            }
+        }
+        public void keyReleased(KeyEvent arg0) {}
+    }
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUUISceneGLListener0A.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUUISceneGLListener0A.java
new file mode 100644
index 0000000..540aade
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUUISceneGLListener0A.java
@@ -0,0 +1,408 @@
+package com.jogamp.opengl.test.junit.graph.demos;
+
+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.GLPipelineFactory;
+import javax.media.opengl.GLRunnable;
+
+import com.jogamp.graph.curve.Region;
+import com.jogamp.graph.curve.opengl.RegionRenderer;
+import com.jogamp.graph.curve.opengl.RenderState;
+import com.jogamp.graph.font.Font;
+import com.jogamp.graph.font.FontFactory;
+import com.jogamp.graph.geom.opengl.SVertex;
+import com.jogamp.newt.event.MouseAdapter;
+import com.jogamp.newt.event.MouseEvent;
+import com.jogamp.newt.opengl.GLWindow;
+import com.jogamp.opengl.test.junit.graph.demos.ui.Label;
+import com.jogamp.opengl.test.junit.graph.demos.ui.RIButton;
+import com.jogamp.opengl.test.junit.graph.demos.ui.SceneUIController;
+import com.jogamp.opengl.test.junit.graph.demos.ui.opengl.UIRegion;
+import com.jogamp.opengl.util.glsl.ShaderState;
+
+public class GPUUISceneGLListener0A implements GLEventListener {
+
+    private boolean debug = false;
+    private boolean trace = false; 
+    
+    private final int renderModes;
+    private final int texSize; 
+    private final int renderModes2;
+    private final int texSize2; 
+    private RegionRenderer regionRenderer;
+    private RenderState rs;
+    
+    int fontSet = FontFactory.UBUNTU;
+    Font font;
+    final int fontSizeFixed = 6;
+    
+    private float xTran = 0;
+    private float yTran = 0;    
+    private float ang = 0f;
+    private float zoom = -200f;
+    private float zoomText = 1f;
+    private int currentText = 0;
+    
+    private Label[] labels = null;
+    private String[] strings = null;
+    private UIRegion[] labelRegions;
+    private UIRegion fpsRegion = null;
+    private UIRegion jogampRegion = null;
+    private RIButton[] buttons = null;
+    
+    private int numSelectable = 6;
+    
+    private SceneUIController sceneUIController = null;
+    private MultiTouchListener multiTouchListener = null;
+    private boolean showFPS = false;
+    private GLAutoDrawable cDrawable;
+    private float fps = 0; 
+    
+    private String jogamp = "JogAmp - Jogl Graph Module Demo";
+    private float angText = 0;
+    
+    public GPUUISceneGLListener0A() {
+      this(0);
+    }
+    
+    public GPUUISceneGLListener0A(int renderModes) {
+      this(RenderState.createRenderState(new ShaderState(), SVertex.factory()), renderModes, false, false);
+    }
+    
+    public GPUUISceneGLListener0A(RenderState rs, int renderModes, boolean debug, boolean trace) {
+        this.rs = rs;
+        this.renderModes = renderModes;
+        this.texSize = Region.isVBAA(renderModes) ? 400 : 0;
+        this.renderModes2 = 0;
+        this.texSize2 = 0;
+        
+        this.debug = debug;
+        this.trace = trace;
+        font = FontFactory.get(FontFactory.UBUNTU).getDefault();
+        labelRegions = new UIRegion[3];
+        sceneUIController = new SceneUIController();
+    }
+    
+    private void initButtons(int width, int height) {
+        buttons = new RIButton[numSelectable];
+        int xaxis = -110;
+        float xSize = 40f;
+        float ySize = 16f;
+        
+        int start = 50;
+        int diff = (int)ySize + 5;
+        
+        buttons[0] = new RIButton(SVertex.factory(), font, "Next Text", xSize, ySize){
+            public void onClick() {
+                   currentText = (currentText+1)%3;
+            }
+            public void onPressed() { }
+            public void onRelease() { }
+        };
+        
+        buttons[0].setPosition(xaxis,start,0);
+        
+        buttons[1] = new RIButton(SVertex.factory(), font, "Show FPS", xSize, ySize){
+            public void onClick() {
+                final GLAnimatorControl a = cDrawable.getAnimator();
+                if( null != a ) {
+                    a.resetFPSCounter();
+                }
+                showFPS = !showFPS;
+            }
+            public void onPressed() { }
+            public void onRelease() { }
+        };
+        buttons[1].setPosition(xaxis,start - diff,0);
+        buttons[1].setToggleable(true);
+        
+        buttons[2] = new RIButton(SVertex.factory(), font, "v-sync", xSize, ySize){
+            public void onClick() {
+                cDrawable.invoke(false, new GLRunnable() {
+                    public boolean run(GLAutoDrawable drawable) {
+                        GL gl = drawable.getGL();
+                        gl.setSwapInterval(gl.getSwapInterval()<=0?1:0);
+                        final GLAnimatorControl a = drawable.getAnimator();
+                        if( null != a ) {
+                            a.resetFPSCounter();
+                        }
+                        return true;
+                    }
+                });
+            }
+            public void onPressed() { }
+            public void onRelease() { }
+        };
+        buttons[2].setPosition(xaxis,start-diff*2,0);
+        buttons[2].setToggleable(true);
+        
+        buttons[3] = new RIButton(SVertex.factory(), font, "Tilt  +Y", xSize, ySize) {
+            public void onClick() {  
+                ang+=10;
+            }
+            public void onPressed() { 
+
+            }
+            public void onRelease() { }
+        };
+        buttons[3].setPosition(xaxis,start-diff*3,0);
+        
+        buttons[4] = new RIButton(SVertex.factory(), font, "Tilt  -Y", xSize, ySize){
+            public void onClick() {
+                ang-=10;
+            }
+            public void onPressed() { }
+            public void onRelease() { }
+        };
+        buttons[4].setPosition(xaxis,start-diff*4,0);
+        
+        buttons[5] = new RIButton(SVertex.factory(), font, "Quit", xSize, ySize){
+            public void onClick() {
+                cDrawable.destroy();
+            }
+            public void onPressed() { }
+            public void onRelease() { }
+        };
+        buttons[5].setPosition(xaxis,start-diff*5,0);
+        buttons[5].setButtonColor(0.8f, 0.0f, 0.0f);
+        buttons[5].setLabelColor(1.0f, 1.0f, 1.0f);
+        
+        buttons[5].setButtonSelectedColor(0.8f, 0.8f, 0.8f);
+        buttons[5].setLabelSelectedColor(0.8f, 0.0f, 0.0f);
+    }
+    
+    private void initTexts() {
+        strings = new String[3];
+        
+        strings[0] = "abcdefghijklmn\nopqrstuvwxyz\nABCDEFGHIJKL\nMNOPQRSTUVWXYZ\n0123456789.:,;(*!?/\\\")$%^&-+@~#<>{}[]";
+        strings[1] = "The quick brown fox\njumps over the lazy\ndog";
+        
+        strings[2] = 
+            "Lorem ipsum dolor sit amet, consectetur\n"+
+            "Ut purus odio, rhoncus sit amet com\n"+
+            "quam iaculis urna cursus ornare. Nullam\n"+
+            "In hac habitasse platea dictumst. Vivam\n"+ 
+            "Morbi quis bibendum nibh. Donec lectus\n"+
+            "Donec ut dolor et nulla tristique variu\n"+
+            "in lorem. Maecenas in ipsum ac justo sc\n";
+        
+        labels = new Label[3];
+    }
+
+    public void init(GLAutoDrawable drawable) {
+        if(drawable instanceof GLWindow) {
+            System.err.println("GPUUISceneGLListener0A: init (1)");
+            final GLWindow glw = (GLWindow) drawable;
+            attachInputListenerTo(glw);
+        } else {
+            System.err.println("GPUUISceneGLListener0A: init (0)");            
+        }
+        final int width = drawable.getWidth();
+        final int height = drawable.getHeight();
+        cDrawable = drawable;
+        GL2ES2 gl = drawable.getGL().getGL2ES2();
+        if(debug) {
+            gl = gl.getContext().setGL( GLPipelineFactory.create("javax.media.opengl.Debug", null, gl, null) ).getGL2ES2();
+        }
+        if(trace) {
+            gl = gl.getContext().setGL( GLPipelineFactory.create("javax.media.opengl.Trace", null, gl, new Object[] { System.err } ) ).getGL2ES2();
+        }
+        
+        this.font = FontFactory.get(fontSet).getDefault();
+        regionRenderer = RegionRenderer.create(rs, renderModes); 
+        
+        gl.glEnable(GL2ES2.GL_DEPTH_TEST);
+        gl.glEnable(GL2ES2.GL_BLEND);
+        
+        regionRenderer.init(gl);
+        regionRenderer.setAlpha(gl, 1.0f);
+        regionRenderer.setColorStatic(gl, 0.0f, 0.0f, 0.0f);
+        
+        initTexts();
+        initButtons(width, height);
+        
+        sceneUIController.setRenderer(regionRenderer, rs, renderModes, texSize);
+        sceneUIController.addShape(buttons[0]);
+        sceneUIController.addShape(buttons[1]);
+        sceneUIController.addShape(buttons[2]);
+        sceneUIController.addShape(buttons[3]);
+        sceneUIController.addShape(buttons[4]);
+        sceneUIController.addShape(buttons[5]);
+        drawable.addGLEventListener(sceneUIController);
+                
+        Label jlabel = new Label(SVertex.factory(), font, fontSizeFixed, jogamp){
+            public void onClick() { }
+            public void onPressed() { }
+            public void onRelease() { }
+        };
+        
+        jogampRegion = new UIRegion(jlabel);
+        final GLAnimatorControl a = drawable.getAnimator();
+        if( null != a ) {
+            a.resetFPSCounter();
+        }        
+    }
+
+    public void dispose(GLAutoDrawable drawable) {
+        if(drawable instanceof GLWindow) {
+            System.err.println("GPUUISceneGLListener0A: dispose (1)");
+            final GLWindow glw = (GLWindow) drawable;
+            detachInputListenerFrom(glw);
+        } else {
+            System.err.println("GPUUISceneGLListener0A: dispose (0)");            
+        }
+        
+        drawable.removeGLEventListener(sceneUIController);
+        sceneUIController.dispose(drawable);
+        
+        GL2ES2 gl = drawable.getGL().getGL2ES2();
+        regionRenderer.destroy(gl);
+    }
+
+    public void display(GLAutoDrawable drawable) {
+        // System.err.println("GPUUISceneGLListener0A: display");
+        final int width = drawable.getWidth();
+        final int height = drawable.getHeight();
+        GL2ES2 gl = drawable.getGL().getGL2ES2();
+        
+        gl.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
+        gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
+        
+        regionRenderer.reshapePerspective(null, 45.0f, width, height, 0.1f, 7000.0f);
+        sceneUIController.setTranslate(xTran, yTran, zoom);
+        sceneUIController.setRotation(0, ang, 0);
+        
+        renderScene(drawable);
+  }
+    
+    private void renderScene(GLAutoDrawable drawable) {
+        GL2ES2 gl = drawable.getGL().getGL2ES2();
+        
+        regionRenderer.resetModelview(null);
+        regionRenderer.translate(null, xTran-50, yTran+43, zoom);
+        regionRenderer.translate(gl, 0, 30, 0);
+        regionRenderer.scale(null, zoomText, zoomText, 1);
+        regionRenderer.scale(gl, 1.5f, 1.5f, 1.0f);
+        regionRenderer.rotate(gl, angText , 0, 1, 0);
+        regionRenderer.setColorStatic(gl, 0.0f, 1.0f, 0.0f);
+        regionRenderer.draw(gl, jogampRegion.getRegion(gl, rs, 0), new float[]{0,0,0}, 0);
+        
+        if(null == labelRegions[currentText]) {
+            if( null == labels[currentText]) {
+                labels[currentText] = new Label(SVertex.factory(), font, fontSizeFixed, strings[currentText]){
+                    public void onClick() { }
+                    public void onPressed() { }
+                    public void onRelease() { }
+                };
+            }
+            labelRegions[currentText] = new UIRegion(labels[currentText]);
+        }
+        
+        regionRenderer.resetModelview(null);
+        regionRenderer.translate(null, xTran-50, yTran, zoom);
+        regionRenderer.translate(gl, 0, 30, 0);
+        regionRenderer.scale(null, zoomText, zoomText, 1);
+        regionRenderer.scale(gl, 1.5f, 1.5f, 1.0f);
+        regionRenderer.rotate(gl, zoomText, 0, 1, 0);
+        
+        regionRenderer.setColorStatic(gl, 0.0f, 0.0f, 0.0f);
+        regionRenderer.draw(gl, labelRegions[currentText].getRegion(gl, rs, renderModes2), new float[]{0,0,0}, texSize2);
+        
+        final GLAnimatorControl animator = drawable.getAnimator();
+        final boolean _drawFPS = showFPS && null != animator;
+        
+        if(_drawFPS && fps != animator.getTotalFPS()) {
+            if(null != fpsRegion) {
+                fpsRegion.destroy(gl, rs);
+            }
+            fps = animator.getTotalFPS();
+            final String fpsS = String.valueOf(fps);
+            final int fpsSp = fpsS.indexOf('.');
+            
+            Label fpsLabel = new Label(SVertex.factory(), font, fontSizeFixed, fpsS.substring(0, fpsSp+2)+" fps"){
+                public void onClick() { }
+                public void onPressed() { }
+                public void onRelease() { }
+            };
+            fpsRegion = new UIRegion(fpsLabel);
+        }    
+        if(showFPS && null != fpsRegion) {
+            regionRenderer.translate(gl, 0, -60, 0);
+            regionRenderer.scale(null, zoomText, zoomText, 1);
+            regionRenderer.draw(gl, fpsRegion.getRegion(gl, rs, 0), new float[]{0,0,0}, 0);
+        }
+    }
+    
+    public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
+        System.err.println("GPUUISceneGLListener0A: reshape");
+        GL2ES2 gl = drawable.getGL().getGL2ES2();
+        
+        gl.glViewport(x, y, width, height);        
+        regionRenderer.reshapePerspective(gl, 45.0f, width, height, 5f, 70.0f);
+    }
+
+    public void attachInputListenerTo(GLWindow window) {
+        if ( null == multiTouchListener ) {
+            multiTouchListener = new MultiTouchListener();
+            window.addMouseListener(multiTouchListener);
+            sceneUIController.attachInputListenerTo(window);
+        }
+    }
+    
+    public void detachInputListenerFrom(GLWindow window) {
+        if ( null != multiTouchListener ) {
+            window.removeMouseListener(multiTouchListener);
+            sceneUIController.detachInputListenerFrom(window);
+        }
+    }
+    
+    private class MultiTouchListener extends MouseAdapter {
+        int lv = 0;
+        
+        boolean first = false;
+        
+        @Override
+        public void mousePressed(MouseEvent e) {
+            first = true;  
+        }
+
+        @Override
+        public void mouseReleased(MouseEvent e) {
+            first = false;
+        }
+
+        @Override
+        public void mouseDragged(MouseEvent e) {
+            System.err.println("demo:mousedragged "+e);
+            if(e.getPointerCount()==2) {
+                // 2 finger zoom ..
+                if(first) {
+                    lv = Math.abs(e.getY(0)-e.getY(1));
+                    first=false;
+                    return;
+                }
+                int nv = Math.abs(e.getY(0)-e.getY(1));
+                int dy = nv - lv;
+                
+                zoom += 2 * Math.signum(dy);
+                
+                lv = nv;
+            } else {
+                // 1 finger drag
+                if(first) {
+                    lv = e.getX();
+                    first=false;
+                    return;
+                }
+                int nv = e.getX();
+                int dx = nv - lv;                
+                xTran += Math.signum(dx);
+                
+                lv = nv;
+            }
+        }
+    }
+}      
\ No newline at end of file
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUUISceneNewtDemo01.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUUISceneNewtDemo01.java
new file mode 100644
index 0000000..91f6687
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUUISceneNewtDemo01.java
@@ -0,0 +1,49 @@
+package com.jogamp.opengl.test.junit.graph.demos;
+
+import javax.media.opengl.GLCapabilities;
+import javax.media.opengl.GLProfile;
+
+import com.jogamp.graph.curve.opengl.RenderState;
+import com.jogamp.graph.geom.opengl.SVertex;
+import com.jogamp.newt.event.WindowAdapter;
+import com.jogamp.newt.event.WindowEvent;
+import com.jogamp.newt.opengl.GLWindow;
+import com.jogamp.opengl.util.Animator;
+import com.jogamp.opengl.util.glsl.ShaderState;
+
+public class GPUUISceneNewtDemo01 {
+    static final boolean DEBUG = false;
+    static final boolean TRACE = false;
+    
+    public static void main(String[] args) {
+        GLProfile.initSingleton(true);
+        GLProfile glp = GLProfile.getGL2ES2();
+        GLCapabilities caps = new GLCapabilities(glp);
+        caps.setAlphaBits(4);
+        caps.setSampleBuffers(true);
+        caps.setNumSamples(4);
+        
+        final GLWindow window = GLWindow.create(caps);        
+        window.setPosition(10, 10);
+        window.setSize(680, 480);
+        window.setTitle("GraphUI Newt Demo");
+        
+        final RenderState rs = RenderState.createRenderState(new ShaderState(), SVertex.factory());
+        GPUUISceneGLListener0A textGLListener = new GPUUISceneGLListener0A(rs, 0, DEBUG, TRACE);
+        window.addGLEventListener(textGLListener);
+        textGLListener.attachInputListenerTo(window);
+        
+        final Animator animator = new Animator();
+        animator.setUpdateFPSFrames(60, System.err);        
+        animator.add(window);
+        
+        window.addWindowListener(new WindowAdapter() {
+            public void windowDestroyed(WindowEvent e) {
+                animator.stop();
+            }
+        });
+        
+        window.setVisible(true);
+        animator.start();
+    }    
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUUISceneNewtDemo02.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUUISceneNewtDemo02.java
new file mode 100644
index 0000000..a6cd770
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUUISceneNewtDemo02.java
@@ -0,0 +1,50 @@
+package com.jogamp.opengl.test.junit.graph.demos;
+
+import javax.media.opengl.GLCapabilities;
+import javax.media.opengl.GLProfile;
+
+import com.jogamp.graph.curve.Region;
+import com.jogamp.graph.curve.opengl.RenderState;
+import com.jogamp.graph.geom.opengl.SVertex;
+import com.jogamp.newt.event.WindowAdapter;
+import com.jogamp.newt.event.WindowEvent;
+import com.jogamp.newt.opengl.GLWindow;
+import com.jogamp.opengl.util.Animator;
+import com.jogamp.opengl.util.glsl.ShaderState;
+
+public class GPUUISceneNewtDemo02 {
+    static final boolean DEBUG = false;
+    static final boolean TRACE = false;
+    
+    public static void main(String[] args) {
+        GLProfile.initSingleton(true);
+        GLProfile glp = GLProfile.getGL2ES2();
+        GLCapabilities caps = new GLCapabilities(glp);
+        caps.setAlphaBits(4);
+        caps.setSampleBuffers(true);
+        caps.setNumSamples(4);
+        
+        final GLWindow window = GLWindow.create(caps);        
+        window.setPosition(10, 10);
+        window.setSize(680, 480);
+        window.setTitle("GraphUI Newt Demo");
+        
+        final RenderState rs = RenderState.createRenderState(new ShaderState(), SVertex.factory());
+        GPUUISceneGLListener0A textGLListener = new GPUUISceneGLListener0A(rs, Region.VBAA_RENDERING_BIT, DEBUG, TRACE);
+        window.addGLEventListener(textGLListener);
+        textGLListener.attachInputListenerTo(window);
+        
+        final Animator animator = new Animator();
+        animator.setUpdateFPSFrames(60, System.err);
+        animator.add(window);
+        
+        window.addWindowListener(new WindowAdapter() {
+            public void windowDestroyed(WindowEvent e) {
+                animator.stop();
+            }
+        });
+        
+        window.setVisible(true);
+        animator.start();
+    }    
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/MSAATool.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/MSAATool.java
new file mode 100644
index 0000000..1fbedb3
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/MSAATool.java
@@ -0,0 +1,69 @@
+/**
+ * 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.graph.demos;
+
+import javax.media.opengl.GL2ES2;
+import javax.media.opengl.GL2GL3;
+import javax.media.opengl.GLAutoDrawable;
+import javax.media.opengl.GLCapabilitiesImmutable;
+
+public class MSAATool {
+    public static void dump(GLAutoDrawable drawable) {
+        float[] vf = new float[] { 0f };
+        byte[] vb = new byte[] { 0 };
+        int[] vi = new int[] { 0, 0 };
+        
+        System.out.println("GL MSAA SETUP:");
+        GL2ES2 gl = drawable.getGL().getGL2ES2();
+        GLCapabilitiesImmutable caps = drawable.getChosenGLCapabilities();
+        System.out.println("  Caps realised "+caps);        
+        System.out.println("  Caps sample buffers "+caps.getSampleBuffers()+", samples "+caps.getNumSamples());
+        
+        // default TRUE
+        System.out.println("  GL MULTISAMPLE "+gl.glIsEnabled(GL2ES2.GL_MULTISAMPLE));
+        // sample buffers min 0, same as GLX_SAMPLE_BUFFERS_ARB or WGL_SAMPLE_BUFFERS_ARB 
+        gl.glGetIntegerv(GL2GL3.GL_SAMPLE_BUFFERS, vi, 0);
+        // samples min 0
+        gl.glGetIntegerv(GL2GL3.GL_SAMPLES, vi, 1);
+        System.out.println("  GL SAMPLE_BUFFERS "+vi[0]+", SAMPLES "+vi[1]);
+        
+        System.out.println("GL CSAA SETUP:");
+        // default FALSE
+        System.out.println("  GL SAMPLE COVERAGE "+gl.glIsEnabled(GL2GL3.GL_SAMPLE_COVERAGE));
+        // default FALSE
+        System.out.println("  GL SAMPLE_ALPHA_TO_COVERAGE "+gl.glIsEnabled(GL2GL3.GL_SAMPLE_ALPHA_TO_COVERAGE));
+        // default FALSE
+        System.out.println("  GL SAMPLE_ALPHA_TO_ONE "+gl.glIsEnabled(GL2GL3.GL_SAMPLE_ALPHA_TO_ONE));
+        // default FALSE, value 1, invert false
+        gl.glGetFloatv(GL2GL3.GL_SAMPLE_COVERAGE_VALUE, vf, 0);
+        gl.glGetBooleanv(GL2GL3.GL_SAMPLE_COVERAGE_INVERT, vb, 0);
+        System.out.println("  GL SAMPLE_COVERAGE "+gl.glIsEnabled(GL2GL3.GL_SAMPLE_COVERAGE) + 
+                              ": SAMPLE_COVERAGE_VALUE "+vf[0]+
+                              ", SAMPLE_COVERAGE_INVERT "+vb[0]);            
+    }
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/Label.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/Label.java
new file mode 100644
index 0000000..ca70481
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/Label.java
@@ -0,0 +1,106 @@
+/**
+ * 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.graph.demos.ui;
+
+import javax.media.opengl.GL2ES2;
+
+import jogamp.graph.curve.text.GlyphString;
+
+import com.jogamp.graph.curve.opengl.RegionRenderer;
+import com.jogamp.graph.curve.opengl.RenderState;
+import com.jogamp.graph.font.Font;
+import com.jogamp.graph.geom.Vertex;
+import com.jogamp.graph.geom.Vertex.Factory;
+
+public abstract class Label extends UIShape implements UITextShape {
+    protected Font font;
+    protected int size;
+    protected String text;
+    protected GlyphString glyphString; 
+    
+    public Label(Factory<? extends Vertex> factory, Font font, int size, String text) {
+        super(factory);
+        this.font = font;
+        this.size = size;
+        this.text = text;
+    }
+    
+    public GlyphString getGlyphString() {
+        return glyphString;
+    }
+    
+    public String getText() {
+        return text;
+    }
+    
+    public void setText(String text) {
+        this.text = text;
+        dirty |= DIRTY_SHAPE;
+    }
+    
+    public Font getFont() {
+        return font;
+    }
+
+    public void setFont(Font font) {
+        this.font = font;
+        dirty |= DIRTY_SHAPE;        
+    }
+
+    public int getSize() {
+        return size;
+    }
+
+    public void setSize(int size) {
+        this.size = size;
+        dirty |= DIRTY_SHAPE;        
+    }
+
+    public String toString(){
+        return "Label [" + font.toString() + ", size " + size + ", " + getText() + "]";
+    }
+
+    @Override
+    protected void clearImpl() {
+        if(null != glyphString) {
+            glyphString.destroy(null, null);
+        }        
+    }
+    
+    @Override
+    protected void createShape() {
+        clearImpl();
+        glyphString = GlyphString.createString(shape, getVertexFactory(), font, size, text);        
+    }
+
+    @Override
+    public void render(GL2ES2 gl, RenderState rs, RegionRenderer renderer,
+            int renderModes, int texSize, boolean selection) {
+        
+    }
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/RIButton.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/RIButton.java
new file mode 100644
index 0000000..3acab3b
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/RIButton.java
@@ -0,0 +1,271 @@
+/**
+ * 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.graph.demos.ui;
+
+import javax.media.opengl.GL2ES2;
+
+import com.jogamp.graph.curve.opengl.RegionRenderer;
+import com.jogamp.graph.curve.opengl.RenderState;
+import com.jogamp.graph.font.Font;
+import com.jogamp.graph.geom.AABBox;
+import com.jogamp.graph.geom.Vertex;
+import com.jogamp.graph.geom.Vertex.Factory;
+import com.jogamp.opengl.test.junit.graph.demos.ui.opengl.UIRegion;
+
+/** GPU based resolution independent Button impl
+ */
+public abstract class RIButton extends UIShape {
+    private float width, height;
+    private Label label;
+    private float spacing = 4.0f;
+    private float corner = 1.0f;
+    private float labelZOffset = -0.05f;
+    
+    private float[] buttonColor = {0.6f, 0.6f, 0.6f};
+    private float[] buttonSelectedColor = {0.8f,0.8f,0.8f};
+    private float[] labelColor = {1.0f, 1.0f, 1.0f};
+    private float[] labelSelectedColor = {0.1f, 0.1f, 0.1f};
+ 
+    
+    public RIButton(Factory<? extends Vertex> factory, Font labelFont, String labelText, float width, float height) {
+        super(factory);
+        
+        // FIXME: Determine font size - PMV Matrix relation ?
+        // this.label = new Label(factory, labelFont, (int)(height - 2f * spacing), labelText);
+        this.label = new Label(factory, labelFont, 10, labelText){
+            public void onClick() { }
+            public void onPressed() { }
+            public void onRelease() { }
+        };
+        
+        this.width = width;
+        this.height = height;
+    }
+
+    public final float getWidth() { return width; }
+    public final float getHeight() { return height; }
+    public float getCorner() { return corner; }
+    public Label getLabel() { return label; }
+
+    public void setDimension(int width, int height) {
+        this.width = width;
+        this.height = height;
+        dirty |= DIRTY_SHAPE;
+    }
+    
+    @Override
+    protected void clearImpl() {
+        label.clear();
+    }
+    
+    @Override
+    protected void createShape() {
+        // FIXME: Only possible if all data (color) is 
+        //        is incl. in Outline Shape.
+        //        Until then - draw each separately!
+        //shape.addOutlinShape( label.getShape() );
+        label.updateShape();
+        
+        final AABBox lbox = label.getBounds();
+        if(corner == 0.0f) {
+            createSharpOutline(lbox);
+        } else {
+            createCurvedOutline(lbox);
+        }
+        float sx = getWidth() / ( 2f*spacing + lbox.getWidth() );
+        float sy = getHeight() / ( 2f*spacing + lbox.getHeight() );
+        
+        setScale(sx, sy, 1);
+    }
+    
+    
+    private void createSharpOutline(AABBox lbox) {
+        float th = (2f*spacing) + lbox.getHeight();
+        float tw = (2f*spacing) + lbox.getWidth();
+        
+        float minX = lbox.getMinX()-spacing;
+        float minY = lbox.getMinY()-spacing;
+        float minZ = labelZOffset;
+        
+        shape.addVertex(minX, minY, minZ,  true);
+        shape.addVertex(minX+tw, minY,  minZ, true);
+        shape.addVertex(minX+tw, minY + th, minZ,  true);
+        shape.addVertex(minX, minY + th, minZ,  true);
+        shape.closeLastOutline();
+    }
+    
+    private void createCurvedOutline(AABBox lbox){
+        float th = 2.0f*spacing + lbox.getHeight();
+        float tw = 2.0f*spacing + lbox.getWidth();
+        
+        float cw = 0.5f*corner*Math.min(tw, th);
+        float ch = 0.5f*corner*Math.min(tw, th);
+        
+        float minX = lbox.getMinX()-spacing;
+        float minY = lbox.getMinY()-spacing;
+        float minZ = labelZOffset;
+        shape.addVertex(minX, minY + ch, minZ, true);
+        shape.addVertex(minX, minY,  minZ, false);
+        shape.addVertex(minX + cw, minY, minZ,  true);
+        shape.addVertex(minX + tw - cw, minY,  minZ, true);
+        shape.addVertex(minX + tw, minY, minZ,  false);
+        shape.addVertex(minX + tw, minY + ch, minZ,  true);
+        shape.addVertex(minX + tw, minY + th- ch, minZ,  true);
+        shape.addVertex(minX + tw, minY + th, minZ,  false);
+        shape.addVertex(minX + tw - cw, minY + th, minZ,  true);
+        shape.addVertex(minX + cw, minY + th, minZ,  true);
+        shape.addVertex(minX, minY + th, minZ,  false);
+        shape.addVertex(minX, minY + th - ch, minZ,  true);
+        shape.closeLastOutline();
+    }
+    
+    public void setCorner(float corner) {
+        if(corner > 1.0f){
+            this.corner = 1.0f;
+        }
+        else if(corner < 0.01f){
+            this.corner = 0.0f;
+        }
+        else{
+            this.corner = corner;
+        }
+        dirty |= DIRTY_SHAPE;
+    }
+    
+    public float getLabelZOffset() {
+        return labelZOffset;
+    }
+
+    public void setLabelZOffset(float labelZOffset) {
+        this.labelZOffset = -labelZOffset;
+        dirty |= DIRTY_SHAPE;
+    }
+    public float getSpacing() {
+        return spacing;
+    }
+
+    public void setSpacing(float spacing) {
+        if(spacing < 0.0f){
+            this.spacing = 0.0f;
+        }
+        else{
+            this.spacing = spacing;
+        }
+        dirty |= DIRTY_SHAPE;
+    }
+    
+    public float[] getButtonColor() {
+        return buttonColor;
+    }
+
+    public void setButtonColor(float r, float g, float b) {
+        this.buttonColor = new float[3];
+        this.buttonColor[0] = r;
+        this.buttonColor[1] = g;
+        this.buttonColor[2] = b;
+    }
+
+    public float[] getLabelColor() {
+        return labelColor;
+    }
+    
+    private UIRegion buttonRegion = null;
+    private UIRegion labelRegion = null;
+    private boolean toggle =false;
+    private boolean toggleable = false;
+
+    public void render(GL2ES2 gl, RenderState rs, RegionRenderer renderer, int renderModes, int texSize, boolean selection) {
+        if(null == buttonRegion) {
+            buttonRegion = new UIRegion(this);
+            labelRegion = new UIRegion(getLabel());
+        }  
+        
+        gl.glEnable(GL2ES2.GL_POLYGON_OFFSET_FILL);
+        gl.glPolygonOffset(0.0f, 1f);
+        
+        float[] bColor = buttonColor;
+        if(isPressed() || toggle){
+            bColor = buttonSelectedColor;
+        }
+        if(!selection){
+            renderer.setColorStatic(gl, bColor[0], bColor[1], bColor[2]);
+        }
+        renderer.draw(gl, buttonRegion.getRegion(gl, rs, renderModes), getPosition(), texSize);
+        gl.glDisable(GL2ES2.GL_POLYGON_OFFSET_FILL);
+        
+        float[] lColor = labelColor;
+        if(isPressed() || toggle ){
+            lColor = labelSelectedColor;
+        }
+        if(!selection){
+            renderer.setColorStatic(gl, lColor[0], lColor[1], lColor[2]);
+        }
+        renderer.draw(gl, labelRegion.getRegion(gl, rs, renderModes), getPosition(), texSize);
+    }
+    public void setPressed(boolean b) {
+        super.setPressed(b);
+        if(isToggleable() && b) {
+            toggle = !toggle;
+        }
+    }
+    
+    public void setLabelColor(float r, float g, float b) {
+        this.labelColor = new float[3];
+        this.labelColor[0] = r;
+        this.labelColor[1] = g;
+        this.labelColor[2] = b;
+    }
+    
+    public void setButtonSelectedColor(float r, float g, float b){
+        this.buttonSelectedColor = new float[3];
+        this.buttonSelectedColor[0] = r;
+        this.buttonSelectedColor[1] = g;
+        this.buttonSelectedColor[2] = b;
+    }
+    
+    public void setLabelSelectedColor(float r, float g, float b){
+        this.labelSelectedColor = new float[3];
+        this.labelSelectedColor[0] = r;
+        this.labelSelectedColor[1] = g;
+        this.labelSelectedColor[2] = b;
+    }
+
+    public boolean isToggleable() {
+        return toggleable;
+    }
+    
+    public void setToggleable(boolean toggleable) {
+        this.toggleable = toggleable;
+    }
+
+    public String toString() {
+        return "RIButton [" + getWidth() + "x" + getHeight() + ", "
+            + getLabel() + ", " + "spacing: " + spacing
+            + ", " + "corner: " + corner + ", " + "shapeOffset: " + labelZOffset + " ]";
+    }
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/SceneUIController.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/SceneUIController.java
new file mode 100644
index 0000000..6a400e9
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/SceneUIController.java
@@ -0,0 +1,261 @@
+package com.jogamp.opengl.test.junit.graph.demos.ui;
+
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+import java.nio.IntBuffer;
+import java.util.ArrayList;
+
+import javax.media.opengl.GL;
+import javax.media.opengl.GL2ES2;
+import javax.media.opengl.GLAutoDrawable;
+import javax.media.opengl.GLEventListener;
+import javax.media.opengl.GLRunnable;
+
+import com.jogamp.common.nio.Buffers;
+import com.jogamp.graph.curve.opengl.RegionRenderer;
+import com.jogamp.graph.curve.opengl.RenderState;
+import com.jogamp.newt.event.MouseEvent;
+import com.jogamp.newt.event.MouseListener;
+import com.jogamp.newt.opengl.GLWindow;
+
+public class SceneUIController implements GLEventListener{
+    private ArrayList<UIShape> shapes = new ArrayList<UIShape>();
+
+    private int count = 0;
+    private int renderModes; 
+    private int texSize; 
+    private RegionRenderer renderer = null;
+    private RenderState rs = null;
+
+    private float[] translate = new float[3];
+    private float[] scale = new float[3];
+    private float[] rotation = new float[3];
+
+    private float[] sceneClearColor = new float[]{0,0,0,1};
+    
+    private int activeId = -1;
+    
+    private SBCMouseListener sbcMouseListener = null;
+    
+    private GLAutoDrawable cDrawable = null;
+
+    public SceneUIController() {
+    }
+    
+    public void setRenderer(RegionRenderer renderer, RenderState rs, int renderModes, int texSize) {
+        this.renderer = renderer;
+        this.rs = rs;
+        this.renderModes = renderModes;
+        this.texSize = texSize;
+    }
+    
+    public SceneUIController(RegionRenderer renderer, RenderState rs, int renderModes, int texSize) {
+        this.renderer = renderer;
+        this.rs = rs;
+        this.renderModes = renderModes;
+        this.texSize = texSize;
+    }
+    
+    public void attachInputListenerTo(GLWindow window) {
+        if(null == sbcMouseListener) {
+            sbcMouseListener = new SBCMouseListener();
+            window.addMouseListener(sbcMouseListener);
+        }
+    }
+
+    public void detachInputListenerFrom(GLWindow window) {
+        if(null != sbcMouseListener) {
+            window.removeMouseListener(sbcMouseListener);
+        }
+    }
+    
+    public ArrayList<UIShape> getShapes() {
+        return shapes;
+    }
+    public void addShape(UIShape b) {
+        shapes.add(b);
+        count++;
+    }
+
+    public void removeShape(UIShape b) {
+        boolean found = shapes.remove(b);
+        if(found) {
+            count--;
+        }
+    }
+    
+    public void init(GLAutoDrawable drawable) {
+        System.err.println("SceneUIController: init");
+        cDrawable = drawable;
+    }
+    public void display(GLAutoDrawable drawable) {
+        // System.err.println("SceneUIController: display");
+        final int width = drawable.getWidth();
+        final int height = drawable.getHeight();
+        GL2ES2 gl = drawable.getGL().getGL2ES2();
+
+        render(gl, width, height, renderModes, texSize, false);
+    }
+   
+    public void dispose(GLAutoDrawable drawable) {
+        System.err.println("SceneUIController: dispose");
+        cDrawable = null;
+    }
+
+    public void reshape(GLAutoDrawable drawable, int x, int y, int width,
+            int height) {
+        System.err.println("SceneUIController: reshape");
+        GL2ES2 gl = drawable.getGL().getGL2ES2();
+        renderer.reshapePerspective(gl, 45.0f, width, height, 5f, 70.0f);        
+    }
+
+    public UIShape getShape(GLAutoDrawable drawable,int x, int y) {
+        final int width = drawable.getWidth();
+        final int height = drawable.getHeight();
+        GL2ES2 gl = drawable.getGL().getGL2ES2();
+
+        int index = checkSelection(gl, x, y, width, height);
+        if(index == -1)
+            return null;
+        return shapes.get(index);
+    }
+    
+    public UIShape getActiveUI() {
+        if(activeId == -1)
+            return null;
+        return shapes.get(activeId);
+    }
+    
+    public void release() {
+        activeId = -1;
+    }
+
+    private int checkSelection(GL2ES2 gl,int x, int y, int width, int height) {
+        gl.glPixelStorei(GL2ES2.GL_PACK_ALIGNMENT, 4);
+        gl.glPixelStorei(GL2ES2.GL_UNPACK_ALIGNMENT, 4);
+        gl.glClearColor(sceneClearColor[0], sceneClearColor[1], sceneClearColor[2], sceneClearColor[3]);
+        gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
+
+        render(gl, width, height, 0, 0, true);
+        ByteBuffer pixel = Buffers.newDirectByteBuffer(4);
+        pixel.order(ByteOrder.nativeOrder());
+        IntBuffer viewport = IntBuffer.allocate(4);
+        gl.glGetIntegerv(GL2ES2.GL_VIEWPORT, viewport);
+        gl.glReadPixels(x, viewport.get(3) - y, 1, 1, GL2ES2.GL_RGBA,
+                GL2ES2.GL_UNSIGNED_BYTE, pixel);
+
+        int qp = pixel.get(0) & 0xFF;
+        int index = Math.round(((qp/255.0f)*(count+2))-1);
+        if(index < 0 || index >= count)
+            return -1;
+        return index;
+    }
+
+    private void render(GL2ES2 gl, int width, int height, int renderModes, int texSize, boolean select) {
+        renderer.reshapePerspective(null, 45.0f, width, height, 0.1f, 7000.0f);
+        
+        for(int index=0; index < count;index++){
+            if(select) {
+                float color= index+1;
+                renderer.setColorStatic(gl, color/(count+2), color/(count+2), color/(count+2));
+            }
+            float[] s = shapes.get(index).getScale();
+            float[] p = shapes.get(index).getPosition();
+            renderer.resetModelview(null);
+            renderer.translate(null, translate[0]+p[0], translate[1]+p[1], translate[2]+p[2]);
+            renderer.scale(gl, s[0], s[1], s[2]);
+            renderer.rotate(gl, rotation[0], 1, 0, 0);
+            renderer.rotate(gl, rotation[1], 0, 1, 0);
+            renderer.rotate(gl, rotation[2], 0, 0, 1);
+            
+            shapes.get(index).render(gl, rs, renderer, renderModes, texSize, select);
+            renderer.rotate(gl, -rotation[0], 1, 0, 0);
+            renderer.rotate(gl, -rotation[1], 0, 1, 0);
+            renderer.rotate(gl, -rotation[2], 0, 0, 1);
+        }
+    }
+
+    public void setTranslate(float x, float y, float z) {
+        this.translate[0] = x;
+        this.translate[1] = y;
+        this.translate[2] = z;
+    }
+
+    public void setScale(float x, float y, float z) {
+        this.scale[0] = x;
+        this.scale[1] = y;
+        this.scale[2] = z;
+    }
+
+    public void setRotation(float x, float y, float z) {
+        this.rotation[0] = x;
+        this.rotation[1] = y;
+        this.rotation[2] = z;
+    }
+    public float[] getSceneClearColor() {
+        return sceneClearColor;
+    }
+
+    public void setSceneClearColor(float r, float g, float b, float a) {
+        this.sceneClearColor[0] = r;
+        this.sceneClearColor[1] = g;
+        this.sceneClearColor[2] = b;
+        this.sceneClearColor[3] = a;
+    }
+    
+    private class SBCMouseListener implements MouseListener {
+        int mouseX = -1;
+        int mouseY = -1;
+        
+        public void mouseClicked(MouseEvent e) {
+            UIShape uiShape = getActiveUI();
+            if(uiShape != null){
+                uiShape.onClick();
+            }
+        }
+
+        public void mousePressed(MouseEvent e) {
+            if(null==cDrawable) {
+                return;
+            }
+            mouseX = e.getX();
+            mouseY = e.getY();
+            
+            GLRunnable runnable = new GLRunnable() {
+                public boolean run(GLAutoDrawable drawable) {
+                    UIShape s = getShape(drawable, mouseX, mouseY);
+                    if(null != s) {
+                        activeId = getShapes().indexOf(s);
+                    }
+                    else {
+                        activeId = -1;
+                    }
+                    return false;
+                }
+            };
+            cDrawable.invoke(true, runnable);
+            
+            UIShape uiShape = getActiveUI();
+            
+            if(uiShape != null) {
+                uiShape.setPressed(true);
+                uiShape.onPressed();
+            }
+        }
+
+        public void mouseReleased(MouseEvent e) { 
+            UIShape uiShape = getActiveUI();
+            if(uiShape != null){
+                uiShape.setPressed(false);
+                uiShape.onRelease();
+            }
+        }
+
+        public void mouseMoved(MouseEvent e) { }
+        public void mouseEntered(MouseEvent e) { }
+        public void mouseExited(MouseEvent e) { }
+        public void mouseDragged(MouseEvent e) { }
+        public void mouseWheelMoved(MouseEvent e) { }
+        
+    }
+}
\ No newline at end of file
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/UIGLListener01.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/UIGLListener01.java
new file mode 100644
index 0000000..5f92f13
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/UIGLListener01.java
@@ -0,0 +1,123 @@
+/**
+ * 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.graph.demos.ui;
+
+import javax.media.opengl.GL;
+import javax.media.opengl.GL2ES2;
+import javax.media.opengl.GLAutoDrawable;
+
+import com.jogamp.graph.curve.opengl.RegionRenderer;
+import com.jogamp.graph.curve.opengl.RenderState;
+import com.jogamp.graph.font.Font;
+import com.jogamp.graph.font.FontFactory;
+import com.jogamp.graph.geom.opengl.SVertex;
+import com.jogamp.opengl.test.junit.graph.demos.MSAATool;
+import com.jogamp.opengl.test.junit.graph.demos.ui.opengl.UIRegion;
+
+public class UIGLListener01 extends UIListenerBase01 {
+    
+    public UIGLListener01 (RenderState rs, boolean debug, boolean trace) {
+        super(RegionRenderer.create(rs, 0), debug, trace);
+        setMatrix(-20, 00, 0f, -50);
+        final Font font = FontFactory.get(FontFactory.UBUNTU).getDefault();
+        button = new RIButton(SVertex.factory(), font, "Click me!", 4f, 3f){
+            public void onClick() {
+            }
+            public void onPressed() {
+            }
+            public void onRelease() {
+            }
+            
+        };
+        button.setPosition(2,1,0);
+        /** Button defaults !
+            button.setLabelColor(1.0f,1.0f,1.0f);
+            button.setButtonColor(0.6f,0.6f,0.6f);
+            button.setCorner(1.0f);
+            button.setSpacing(2.0f);
+         */
+        System.err.println(button);
+    }
+    
+    public void init(GLAutoDrawable drawable) {
+        super.init(drawable);
+        
+        GL2ES2 gl = drawable.getGL().getGL2ES2();
+
+        gl.setSwapInterval(1);
+        gl.glEnable(GL2ES2.GL_DEPTH_TEST);
+        gl.glEnable(GL2ES2.GL_POLYGON_OFFSET_FILL);
+        
+        MSAATool.dump(drawable);
+    }
+
+    UIRegion regionButton;
+    UIRegion regionLabel;
+    
+    public void display(GLAutoDrawable drawable) {
+        GL2ES2 gl = drawable.getGL().getGL2ES2();
+
+        gl.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
+        gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
+
+        final RegionRenderer regionRenderer = getRegionRenderer();
+        final RenderState rs = regionRenderer.getRenderState();
+        
+        regionRenderer.resetModelview(null);
+        
+        regionRenderer.translate(null, getXTran(), getYTran(), getZoom());
+        regionRenderer.rotate(gl, getAngle(), 0, 1, 0);
+        
+        final float[] bColor = button.getButtonColor();
+        final float[] lColor = button.getLabelColor();        
+        if(null == regionButton) {
+            regionButton = new UIRegion(button);
+            regionLabel = new UIRegion(button.getLabel());
+        }        
+        
+        regionRenderer.setColorStatic(gl, bColor[0], bColor[1], bColor[2]);
+        regionRenderer.draw(gl, regionButton.getRegion(gl, rs, 0), getPosition(), 0);
+//        regionRenderer.translate(gl, button.getPosition()[0], button.getPosition()[1], button.getPosition()[2]);
+        regionRenderer.setColorStatic(gl, lColor[0], lColor[1], lColor[2]);
+        regionRenderer.draw(gl, regionLabel.getRegion(gl, rs, 0), getPosition(), 0);
+    }        
+    
+    public void dispose(GLAutoDrawable drawable) {
+        GL2ES2 gl = drawable.getGL().getGL2ES2();
+        if(null != regionButton) {
+            regionButton.destroy(gl, getRegionRenderer().getRenderState());
+            regionButton = null;
+        }
+        if(null != regionLabel) {
+            regionLabel.destroy(gl, getRegionRenderer().getRenderState());
+            regionButton = null;
+        }
+        super.dispose(drawable);
+    }
+}
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
new file mode 100644
index 0000000..0fe48e5
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/UIListenerBase01.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.graph.demos.ui;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+
+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.GLException;
+import javax.media.opengl.GLPipelineFactory;
+import javax.media.opengl.GLRunnable;
+
+import com.jogamp.graph.curve.opengl.RegionRenderer;
+import com.jogamp.newt.event.KeyEvent;
+import com.jogamp.newt.event.KeyListener;
+import com.jogamp.newt.event.MouseEvent;
+import com.jogamp.newt.event.MouseListener;
+import com.jogamp.newt.opengl.GLWindow;
+import com.jogamp.opengl.util.GLReadBufferUtil;
+
+/**
+ *
+ * Action Keys:
+ * - 1/2: zoom in/out
+ * - 4/5: increase/decrease shape/text spacing
+ * - 6/7: increase/decrease corner size
+ * - 0/9: rotate 
+ * - v: toggle v-sync
+ * - s: screenshot
+ */
+public abstract class UIListenerBase01 implements GLEventListener {
+    private GLReadBufferUtil screenshot;
+    private RegionRenderer rRenderer;
+    private boolean debug;
+    private boolean trace;
+    
+    protected RIButton button;
+    
+    private KeyAction keyAction;
+    private MouseAction mouseAction;
+    
+    private volatile GLAutoDrawable autoDrawable = null;
+    
+    private final float[] position = new float[] {0,0,0};
+    
+    private float xTran = -10;
+    private float yTran =  10;    
+    private float ang = 0f;
+    private float zoom = -70f;
+
+    boolean ignoreInput = false;
+
+    public UIListenerBase01(RegionRenderer rRenderer, boolean debug, boolean trace) {
+        this.rRenderer = rRenderer;
+        this.debug = debug;
+        this.trace = trace;
+        this.screenshot = new GLReadBufferUtil(false, false);
+    }
+    
+    public final RegionRenderer getRegionRenderer() { return rRenderer; }
+    public final float getZoom() { return zoom; }
+    public final float getXTran() { return xTran; }
+    public final float getYTran() { return yTran; }
+    public final float getAngle() { return ang; }
+    public final float[] getPosition() { return position; }
+
+    public void setMatrix(float xtrans, float ytrans, float angle, int zoom) {
+        this.xTran = xtrans;
+        this.yTran = ytrans; 
+        this.ang = angle;  
+        this.zoom = zoom;
+    }
+    
+    public void init(GLAutoDrawable drawable) {
+        autoDrawable = drawable;
+        GL2ES2 gl = drawable.getGL().getGL2ES2();
+        if(debug) {
+            gl = gl.getContext().setGL( GLPipelineFactory.create("javax.media.opengl.Debug", null, gl, null) ).getGL2ES2();
+        }
+        if(trace) {
+            gl = gl.getContext().setGL( GLPipelineFactory.create("javax.media.opengl.Trace", null, gl, new Object[] { System.err } ) ).getGL2ES2();
+        }
+        gl.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
+        getRegionRenderer().init(gl);        
+    }
+    
+    public void reshape(GLAutoDrawable drawable, int xstart, int ystart, int width, int height) {
+        GL2ES2 gl = drawable.getGL().getGL2ES2();
+        
+        gl.glViewport(xstart, ystart, width, height);        
+        rRenderer.reshapePerspective(gl, 45.0f, width, height, 0.1f, 7000.0f);
+        dumpMatrix();
+    }
+    
+    public void dispose(GLAutoDrawable drawable) {
+        autoDrawable = null;
+        GL2ES2 gl = drawable.getGL().getGL2ES2();
+        screenshot.dispose(gl);
+        rRenderer.destroy(gl);
+    }    
+    
+    public void zoom(int v){
+        zoom += v;
+        dumpMatrix();
+    }
+    
+    public void move(float x, float y){
+        xTran += x;
+        yTran += y;
+        dumpMatrix();
+    }
+    public void rotate(float delta){
+        ang += delta;
+        ang %= 360.0f;
+        dumpMatrix();
+    }
+    
+    void dumpMatrix() {
+        System.err.println("Matrix: " + xTran + "/" + yTran + " x"+zoom + " @"+ang);
+    }
+    
+    /** Attach the input listener to the window */ 
+    public void attachInputListenerTo(GLWindow window) {
+        if ( null == keyAction ) {
+            keyAction = new KeyAction();
+            window.addKeyListener(keyAction);        
+        }
+        if ( null == mouseAction ) {
+            mouseAction = new MouseAction();
+            window.addMouseListener(mouseAction);        
+        }
+    }
+    
+    public void detachFrom(GLWindow window) {
+        if ( null == keyAction ) {
+            return;
+        }
+        if ( null == mouseAction ) {
+            return;
+        }
+        window.removeGLEventListener(this);
+        window.removeKeyListener(keyAction);
+        window.removeMouseListener(mouseAction);
+    }
+    
+    public void printScreen(GLAutoDrawable drawable, String dir, String tech, String objName, boolean exportAlpha) throws GLException, IOException {
+        StringWriter sw = new StringWriter();
+        PrintWriter pw = new PrintWriter(sw);
+        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 +".tga";
+        screenshot.readPixels(drawable.getGL(), drawable, false);
+        screenshot.write(new File(filename));
+    }
+    
+    int screenshot_num = 0;
+
+    public void setIgnoreInput(boolean v) {
+        ignoreInput = v;
+    }
+    public boolean getIgnoreInput() {
+        return ignoreInput;
+    }
+    
+    public class MouseAction implements MouseListener{
+
+        public void mouseClicked(MouseEvent e) {
+            
+        }
+
+        public void mouseEntered(MouseEvent e) {
+        }
+
+        public void mouseExited(MouseEvent e) {
+        }
+
+        public void mousePressed(MouseEvent e) {
+            button.setLabelColor(0.8f,0.8f,0.8f);
+            button.setButtonColor(0.1f, 0.1f, 0.1f);
+        }
+
+        public void mouseReleased(MouseEvent e) {
+            button.setLabelColor(1.0f,1.0f,1.0f);
+            button.setButtonColor(0.6f,0.6f,0.6f);
+        }
+
+        public void mouseMoved(MouseEvent e) {
+            // TODO Auto-generated method stub
+            
+        }
+
+        public void mouseDragged(MouseEvent e) {
+            // TODO Auto-generated method stub
+            
+        }
+
+        public void mouseWheelMoved(MouseEvent e) {
+            // TODO Auto-generated method stub
+            
+        }
+        
+    }
+    
+    public class KeyAction implements KeyListener {
+        public void keyPressed(KeyEvent arg0) {
+            if(ignoreInput) {
+                return;
+            }
+            
+            if(arg0.getKeyCode() == KeyEvent.VK_1){
+                zoom(10);
+            }
+            else if(arg0.getKeyCode() == KeyEvent.VK_2){
+                zoom(-10);
+            }
+            else if(arg0.getKeyCode() == KeyEvent.VK_UP){
+                move(0, -1);
+            }
+            else if(arg0.getKeyCode() == KeyEvent.VK_DOWN){
+                move(0, 1);
+            }
+            else if(arg0.getKeyCode() == KeyEvent.VK_LEFT){
+                move(1, 0);
+            }
+            else if(arg0.getKeyCode() == KeyEvent.VK_RIGHT){
+                move(-1, 0);
+            }
+            else if(arg0.getKeyCode() == KeyEvent.VK_4){
+                button.setSpacing(button.getSpacing()-0.1f);
+                System.err.println("Button Spacing: " + button.getSpacing());
+            }
+            else if(arg0.getKeyCode() == KeyEvent.VK_5){
+                button.setSpacing(button.getSpacing()+0.1f);
+                System.err.println("Button Spacing: " + button.getSpacing());
+            }
+            else if(arg0.getKeyCode() == KeyEvent.VK_6){
+                button.setCorner(button.getCorner()-0.1f);
+                System.err.println("Button Corner: " + button.getCorner());
+            }
+            else if(arg0.getKeyCode() == KeyEvent.VK_7){
+                button.setCorner(button.getCorner()+0.1f);
+                System.err.println("Button Corner: " + button.getCorner());
+            }
+            else if(arg0.getKeyCode() == KeyEvent.VK_0){
+                rotate(1);
+            }
+            else if(arg0.getKeyCode() == KeyEvent.VK_9){
+                rotate(-1);
+            }  
+            else if(arg0.getKeyCode() == KeyEvent.VK_V) {
+                if(null != autoDrawable) {
+                    autoDrawable.invoke(false, new GLRunnable() {
+                        public boolean run(GLAutoDrawable drawable) {
+                            GL gl = drawable.getGL();
+                            int i = gl.getSwapInterval();      
+                            i = i==0 ? 1 : 0;
+                            gl.setSwapInterval(i);
+                            final GLAnimatorControl a = drawable.getAnimator();
+                            if( null != a ) {
+                                a.resetFPSCounter();
+                            }
+                            System.err.println("Swap Interval: "+i);
+                            return true;
+                        }
+                    });
+                }                
+            }
+            else if(arg0.getKeyCode() == KeyEvent.VK_S){
+                rotate(-1);
+                    if(null != autoDrawable) {
+                        autoDrawable.invoke(false, new GLRunnable() {
+                            public boolean run(GLAutoDrawable drawable) {
+                                try {
+                                    final String type = ( 1 == rRenderer.getRenderModes() ) ? "r2t0-msaa1" : "r2t1-msaa0" ; 
+                                    printScreen(drawable, "./", "demo-"+type, "snap"+screenshot_num, false);
+                                    screenshot_num++;
+                                } catch (GLException e) {
+                                    e.printStackTrace();
+                                } catch (IOException e) {
+                                    e.printStackTrace();
+                                }
+                                return true;                                
+                            }
+                        });
+                    }                
+            }  
+        }
+        public void keyTyped(KeyEvent arg0) {}
+        public void keyReleased(KeyEvent arg0) {}
+    }
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/UINewtDemo01.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/UINewtDemo01.java
new file mode 100644
index 0000000..27b7ecc
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/UINewtDemo01.java
@@ -0,0 +1,96 @@
+/**
+ * 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.graph.demos.ui;
+
+import javax.media.opengl.FPSCounter;
+import javax.media.opengl.GLCapabilities;
+import javax.media.opengl.GLProfile;
+
+import com.jogamp.graph.curve.opengl.RenderState;
+import com.jogamp.graph.geom.opengl.SVertex;
+import com.jogamp.newt.event.KeyAdapter;
+import com.jogamp.newt.event.KeyEvent;
+import com.jogamp.newt.event.WindowAdapter;
+import com.jogamp.newt.event.WindowEvent;
+import com.jogamp.newt.opengl.GLWindow;
+import com.jogamp.opengl.util.Animator;
+import com.jogamp.opengl.util.glsl.ShaderState;
+
+/** Demonstrate the rendering of multiple outlines into one region/OutlineShape
+ *  These Outlines are not necessary connected or contained.
+ *  The output of this demo shows two identical shapes but the left one
+ *  has some vertices with off-curve flag set to true, and the right allt he vertices 
+ *  are on the curve. Demos the Res. Independent Nurbs based Curve rendering 
+ *
+ */
+public class UINewtDemo01 {
+    static final boolean DEBUG = false;
+    static final boolean TRACE = false;
+    
+    public static void main(String[] args) {
+        GLProfile.initSingleton(true);
+        GLProfile glp = GLProfile.getGL2ES2();
+        GLCapabilities caps = new GLCapabilities(glp);
+        caps.setAlphaBits(4);
+        caps.setSampleBuffers(true);
+        caps.setNumSamples(4);
+        System.out.println("Requested: " + caps);
+        
+        final GLWindow window = GLWindow.create(caps);
+        window.setPosition(10, 10);
+        window.setSize(800, 400);
+        window.setTitle("GPU UI Newt Demo 01");
+        RenderState rs = RenderState.createRenderState(new ShaderState(), SVertex.factory());
+        UIGLListener01 uiGLListener = new UIGLListener01 (rs, DEBUG, TRACE);
+        uiGLListener.attachInputListenerTo(window);        
+        window.addGLEventListener(uiGLListener);
+
+        window.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err);        
+        window.setVisible(true);
+
+        final Animator animator = new Animator();
+        animator.setUpdateFPSFrames(FPSCounter.DEFAULT_FRAMES_PER_INTERVAL, System.err);
+        animator.add(window);
+        
+        window.addKeyListener(new KeyAdapter() {
+            public void keyPressed(KeyEvent arg0) {
+                if(arg0.getKeyCode() == KeyEvent.VK_F4) {
+                    window.destroy();
+                }
+            }
+        });
+        window.addWindowListener(new WindowAdapter() {
+            public void windowDestroyed(WindowEvent e) {
+                animator.stop();
+            }
+        });
+                
+        animator.start();
+    }    
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/UIShape.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/UIShape.java
new file mode 100644
index 0000000..c04fa8b
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/UIShape.java
@@ -0,0 +1,130 @@
+/**
+ * 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.graph.demos.ui;
+
+import javax.media.opengl.GL2ES2;
+
+import com.jogamp.graph.curve.OutlineShape;
+import com.jogamp.graph.curve.opengl.RegionRenderer;
+import com.jogamp.graph.curve.opengl.RenderState;
+import com.jogamp.graph.geom.AABBox;
+import com.jogamp.graph.geom.Vertex;
+import com.jogamp.graph.geom.Vertex.Factory;
+
+public abstract class UIShape {
+    private final Factory<? extends Vertex> vertexFactory;
+    protected OutlineShape shape;
+    
+    protected static final int DIRTY_SHAPE  = 1 << 0 ;    
+    protected int dirty = DIRTY_SHAPE;
+    
+    private boolean down = false;
+
+    public UIShape(Factory<? extends Vertex> factory) {
+        this.vertexFactory = factory;
+        this.shape = new OutlineShape(factory);
+    }
+    
+    public void clear() {
+        clearImpl();
+        shape.clear();
+    }
+    
+    public abstract void render(GL2ES2 gl, RenderState rs, RegionRenderer renderer, int renderModes, int texSize, boolean selection);
+    
+    protected boolean positionDirty = false;
+    
+    private float[] position = new float[]{0,0,0};
+    private float[] scale = new float[]{1.0f,1.0f,1.0f};
+    public void setScale(float x, float y, float z){
+        scale[0] = x;
+        scale[1] = y;
+        scale[2] = z;
+    }
+    
+    public void setPosition(float x, float y, float z) {
+        this.position[0] = x;
+        this.position[1] = y;
+        this.position[2] = z;
+        positionDirty = true;
+    }
+    
+    private void updatePosition () {
+        float minX = shape.getBounds().getLow()[0];
+        float minY = shape.getBounds().getLow()[1];
+        float minZ = shape.getBounds().getLow()[2];
+        System.out.println("Position was: " + (position[0]) + " " + (position[1]) + " " + (position[2]));
+        System.out.println("Position became: " + (position[0] - minX) + " " + (position[1] - minY) + " " + (position[2] - minZ));
+        setPosition(position[0] - minX, position[1] - minY, position[2] - minZ);
+        positionDirty = false;
+    }
+    
+    public float[] getScale() { return scale; }   
+    public float[] getPosition() { return position; }
+    
+    protected abstract void clearImpl();
+    
+    protected abstract void createShape();
+    
+    public boolean updateShape() {
+        if( isShapeDirty() ) {
+            shape.clear();
+            createShape();
+            if(positionDirty){
+                updatePosition();
+            }
+            dirty &= ~DIRTY_SHAPE;
+            return true;
+        }
+        return false;
+    }
+    
+    public final Vertex.Factory<? extends Vertex> getVertexFactory() { return vertexFactory; }    
+    public AABBox getBounds() { return shape.getBounds(); }
+    
+    public OutlineShape getShape() { 
+        updateShape(); 
+        return shape; 
+    }
+    
+    public boolean isShapeDirty() {
+        return 0 != ( dirty & DIRTY_SHAPE ) ;
+    }    
+    
+    public void setPressed(boolean b) {
+        this.down  = b;
+    }
+    
+    public boolean isPressed() {
+        return this.down;
+    }
+    
+    public abstract void onClick();
+    public abstract void onPressed();
+    public abstract void onRelease();
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/UITextShape.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/UITextShape.java
new file mode 100644
index 0000000..ee79d9a
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/UITextShape.java
@@ -0,0 +1,37 @@
+/**
+ * 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.graph.demos.ui;
+
+import jogamp.graph.curve.text.GlyphString;
+
+/**
+ * Marker interface to mark a UIShape implementation for text usage
+ */
+public interface UITextShape {
+    GlyphString getGlyphString();
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/opengl/UIRegion.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/opengl/UIRegion.java
new file mode 100644
index 0000000..8827109
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/opengl/UIRegion.java
@@ -0,0 +1,77 @@
+/**
+ * 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.graph.demos.ui.opengl;
+
+import javax.media.opengl.GL2ES2;
+
+import com.jogamp.graph.curve.opengl.GLRegion;
+import com.jogamp.graph.curve.opengl.RenderState;
+import com.jogamp.opengl.test.junit.graph.demos.ui.UIShape;
+import com.jogamp.opengl.test.junit.graph.demos.ui.UITextShape;
+
+public class UIRegion {
+    protected static final int DIRTY_REGION  = 1 << 0 ;    
+    protected int dirty = DIRTY_REGION;
+    
+    private UIShape uiShape;
+    private GLRegion region;
+    
+    public UIRegion(UIShape uis) {
+        this.uiShape = uis;
+    }
+    
+    public boolean updateRegion(GL2ES2 gl, RenderState rs, int renderModes) {
+        if( uiShape.updateShape() || isRegionDirty() ) {
+            destroy(gl, rs);
+            if(uiShape instanceof UITextShape) {
+                region = ((UITextShape)uiShape).getGlyphString().createRegion(gl, renderModes);    
+            } else {
+                region = GLRegion.create(uiShape.getShape(), renderModes);
+            }
+            dirty &= ~DIRTY_REGION;
+            return true;
+        }
+        return false;
+    }
+    
+    public GLRegion getRegion(GL2ES2 gl, RenderState rs, int renderModes) { 
+        updateRegion(gl, rs, renderModes);
+        return region; 
+    }
+    
+    public boolean isRegionDirty() {
+        return 0 != ( dirty & DIRTY_REGION ) ;
+    }
+    
+    public void destroy(GL2ES2 gl, RenderState rs) {
+        if(null != region) {
+            region.destroy(gl, rs);
+            region = null;
+        }                    
+    }
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLDebug00NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLDebug00NEWT.java
new file mode 100644
index 0000000..a42247b
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLDebug00NEWT.java
@@ -0,0 +1,235 @@
+/**
+ * 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.acore;
+
+import java.io.IOException;
+
+import javax.media.opengl.GL;
+import javax.media.opengl.GL2GL3;
+import javax.media.opengl.GLCapabilities;
+import javax.media.opengl.GLContext;
+import javax.media.opengl.GLDebugListener;
+import javax.media.opengl.GLDebugMessage;
+import javax.media.opengl.GLDrawable;
+import javax.media.opengl.GLDrawableFactory;
+import javax.media.opengl.GLProfile;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.BeforeClass;
+
+import com.jogamp.newt.Display;
+import com.jogamp.newt.NewtFactory;
+import com.jogamp.newt.Screen;
+import com.jogamp.newt.Window;
+import com.jogamp.opengl.test.junit.util.UITestCase;
+
+public class TestGLDebug00NEWT extends UITestCase {
+    
+    static String dbgTstMsg0 = "Hello World";
+    static int dbgTstId0 = 42;
+    
+    @BeforeClass
+    public static void initClass() {
+        // GLProfile.initSingleton(true);
+    }
+    
+    public class WindowContext {        
+        public final Window window;
+        public final GLContext context;
+        
+        public WindowContext(Window w, GLContext c) {
+            window = w;
+            context = c;
+        }
+    }       
+    
+    WindowContext createWindow(GLProfile glp, boolean debugGL) {        
+        GLCapabilities caps = new GLCapabilities(glp);
+        //
+        // Create native windowing resources .. X11/Win/OSX
+        // 
+        Display display = NewtFactory.createDisplay(null); // local display
+        Assert.assertNotNull(display);
+
+        Screen screen  = NewtFactory.createScreen(display, 0); // screen 0
+        Assert.assertNotNull(screen);
+
+        Window window = NewtFactory.createWindow(screen, caps);
+        Assert.assertNotNull(window);
+        window.setSize(128, 128);
+        window.setVisible(true);
+
+        GLDrawableFactory factory = GLDrawableFactory.getFactory(glp);
+        GLDrawable drawable = factory.createGLDrawable(window);
+        Assert.assertNotNull(drawable);
+        
+        drawable.setRealized(true);
+        
+        GLContext context = drawable.createContext(null);
+        Assert.assertNotNull(context);
+        
+        context.enableGLDebugMessage(debugGL);
+        
+        int res = context.makeCurrent();
+        Assert.assertTrue(GLContext.CONTEXT_CURRENT_NEW==res || GLContext.CONTEXT_CURRENT==res);
+        
+        return new WindowContext(window, context);
+    }
+
+    void destroyWindow(WindowContext winctx) {
+        GLDrawable drawable = winctx.context.getGLDrawable();
+        
+        Assert.assertNotNull(winctx.context);
+        winctx.context.destroy();
+
+        Assert.assertNotNull(drawable);
+        drawable.setRealized(false);
+
+        Assert.assertNotNull(winctx.window);
+        winctx.window.destroy();
+    }
+
+    
+    void test01GLDebug01EnableDisable(boolean enable) throws InterruptedException {
+        GLProfile glp = GLProfile.getDefault();
+        
+        WindowContext winctx = createWindow(glp, enable);
+        String glDebugExt = winctx.context.getGLDebugMessageExtension();
+        System.err.println("glDebug extension: "+glDebugExt);
+        System.err.println("glDebug enabled: "+winctx.context.isGLDebugMessageEnabled());
+        System.err.println("glDebug sync: "+winctx.context.isGLDebugSynchronous());
+        System.err.println("context version: "+winctx.context.getGLVersion());        
+        
+        Assert.assertEquals((null == glDebugExt) ? false : enable, winctx.context.isGLDebugMessageEnabled());
+        
+        destroyWindow(winctx);
+    }
+
+    @Test
+    public void test01GLDebugDisabled() throws InterruptedException {
+        test01GLDebug01EnableDisable(false);
+    }
+
+    @Test
+    public void test01GLDebugEnabled() throws InterruptedException {
+        test01GLDebug01EnableDisable(true);
+    }
+    
+    @Test
+    public void test02GLDebugError() throws InterruptedException {
+        GLProfile glp = GLProfile.getDefault();
+        
+        WindowContext winctx = createWindow(glp, true);
+        
+        MyGLDebugListener myGLDebugListener = new MyGLDebugListener(
+                GL2GL3.GL_DEBUG_SOURCE_API_ARB,
+                GL2GL3.GL_DEBUG_TYPE_ERROR_ARB,
+                GL2GL3.GL_DEBUG_SEVERITY_HIGH_ARB);
+        winctx.context.addGLDebugListener(myGLDebugListener);
+        
+        GL gl = winctx.context.getGL();
+        
+        gl.glBindFramebuffer(-1, -1); // ERROR !
+        
+        if( winctx.context.isGLDebugMessageEnabled() ) {
+            Assert.assertEquals(true, myGLDebugListener.received());
+        }                
+        
+        destroyWindow(winctx);
+    }
+    
+    @Test
+    public void test03GLDebugInsert() throws InterruptedException {
+        GLProfile glp = GLProfile.getDefault();
+        WindowContext winctx = createWindow(glp, true);
+        MyGLDebugListener myGLDebugListener = new MyGLDebugListener(dbgTstMsg0, dbgTstId0);
+        winctx.context.addGLDebugListener(myGLDebugListener);
+        
+        String glDebugExt = winctx.context.getGLDebugMessageExtension();        
+        Assert.assertEquals((null == glDebugExt) ? false : true, winctx.context.isGLDebugMessageEnabled());
+        
+        if( winctx.context.isGLDebugMessageEnabled() ) {
+            winctx.context.glDebugMessageInsert(GL2GL3.GL_DEBUG_SOURCE_APPLICATION_ARB, 
+                                                GL2GL3.GL_DEBUG_TYPE_OTHER_ARB,
+                                                dbgTstId0, 
+                                                GL2GL3.GL_DEBUG_SEVERITY_MEDIUM_ARB, dbgTstMsg0);
+            Assert.assertEquals(true, myGLDebugListener.received());
+        }                
+        
+        destroyWindow(winctx);
+    }
+
+    
+    public static void main(String args[]) throws IOException {
+        String tstname = TestGLDebug00NEWT.class.getName();
+        org.junit.runner.JUnitCore.main(tstname);
+    }
+    
+    public class MyGLDebugListener implements GLDebugListener {
+        int recSource;
+        int recType;
+        int recSeverity;
+        
+        String recMsg;
+        int recId;
+        boolean received = false;
+        
+        public MyGLDebugListener(int recSource, int recType, int recSeverity) {
+            this.recSource = recSource;
+            this.recType = recType;
+            this.recSeverity = recSeverity;
+            this.recMsg = null;
+            this.recId = -1;
+            
+        }
+        public MyGLDebugListener(String recMsg, int recId) {
+            this.recSource = -1;
+            this.recType = -1;
+            this.recSeverity = -1;
+            this.recMsg = recMsg;
+            this.recId = recId;
+        }
+        
+        public boolean received() { return received; }
+        
+        public void messageSent(GLDebugMessage event) {
+            System.err.println("XXX: "+event);            
+            if(null != recMsg && recMsg.equals(event.getDbgMsg()) && recId == event.getDbgId()) {
+                received = true;
+            } else if(0 <= recSource && recSource == event.getDbgSource() && 
+                                        recType == event.getDbgType() &&
+                                        recSeverity== event.getDbgSeverity() ) {
+                received = true;                
+            }
+            // Thread.dumpStack();
+        }        
+    }
+}
+    
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLDebug01NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLDebug01NEWT.java
new file mode 100644
index 0000000..6ab6714
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLDebug01NEWT.java
@@ -0,0 +1,195 @@
+/**
+ * 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.acore;
+
+import java.io.IOException;
+
+import javax.media.opengl.GL2GL3;
+import javax.media.opengl.GLAutoDrawable;
+import javax.media.opengl.GLCapabilities;
+import javax.media.opengl.GLContext;
+import javax.media.opengl.GLDebugListener;
+import javax.media.opengl.GLDebugMessage;
+import javax.media.opengl.GLProfile;
+import javax.media.opengl.GLRunnable;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.BeforeClass;
+
+import com.jogamp.newt.opengl.GLWindow;
+import com.jogamp.opengl.test.junit.util.UITestCase;
+
+public class TestGLDebug01NEWT extends UITestCase {
+    
+    static String dbgTstMsg0 = "Hello World";
+    static int dbgTstId0 = 42;
+    
+    @BeforeClass
+    public static void initClass() {
+        GLProfile.initSingleton(true);
+    }
+    
+    GLWindow createWindow(GLProfile glp, boolean debugGL) {        
+        GLCapabilities caps = new GLCapabilities(glp);
+        //
+        // Create native windowing resources .. X11/Win/OSX
+        // 
+        GLWindow window = GLWindow.create(caps);
+        Assert.assertNotNull(window);
+        window.setContextCreationFlags(debugGL?GLContext.CTX_OPTION_DEBUG:0);
+        window.setSize(128, 128);
+        window.setVisible(true);
+
+        Assert.assertNotNull(window.getContext());
+        Assert.assertNotNull(window.getContext().isCreated());
+        
+        return window;
+    }
+
+    void destroyWindow(GLWindow window) {
+        window.destroy();
+    }
+
+    
+    void test01GLDebug01EnableDisable(boolean enable, final String dbgTstMsg, final int dbgTstId) throws InterruptedException {
+        GLProfile glp = GLProfile.getDefault();
+        
+        final GLWindow window = createWindow(glp, enable);
+        final GLContext ctx = window.getContext();
+        MyGLDebugListener myGLDebugListener = new MyGLDebugListener(dbgTstMsg, dbgTstId);
+        if(enable) {
+            ctx.addGLDebugListener(myGLDebugListener);
+        }        
+        String glDebugExt = ctx.getGLDebugMessageExtension();
+        System.err.println("glDebug extension: "+glDebugExt);
+        System.err.println("glDebug enabled: "+ctx.isGLDebugMessageEnabled());
+        System.err.println("glDebug sync: "+ ctx.isGLDebugSynchronous());
+        System.err.println("context version: "+ctx.getGLVersion());
+        
+        Assert.assertEquals((null == glDebugExt) ? false : enable, ctx.isGLDebugMessageEnabled());
+        if(ctx.isGLDebugMessageEnabled() && null != dbgTstMsg && 0 <= dbgTstId) {
+            window.invoke(true, new GLRunnable() {
+                public boolean run(GLAutoDrawable drawable) {
+                    drawable.getContext().glDebugMessageInsert(GL2GL3.GL_DEBUG_SOURCE_APPLICATION_ARB, 
+                                                               GL2GL3.GL_DEBUG_TYPE_OTHER_ARB,
+                                                               dbgTstId, 
+                                                               GL2GL3.GL_DEBUG_SEVERITY_MEDIUM_ARB, dbgTstMsg);
+                    return true;
+                }
+            });
+            Assert.assertEquals(true, myGLDebugListener.received());
+        } 
+        
+        destroyWindow(window);
+    }
+
+    @Test
+    public void test01GLDebug01Disabled() throws InterruptedException {
+        test01GLDebug01EnableDisable(false, null, -1);
+    }
+
+    @Test
+    public void test01GLDebug01Enabled() throws InterruptedException {
+        test01GLDebug01EnableDisable(true, dbgTstMsg0, dbgTstId0);
+    }
+    
+    @Test
+    public void test02GLDebug01Error() throws InterruptedException {
+        GLProfile glp = GLProfile.getDefault();
+        
+        GLWindow window = createWindow(glp, true);
+        
+        MyGLDebugListener myGLDebugListener = new MyGLDebugListener(
+                GL2GL3.GL_DEBUG_SOURCE_API_ARB,
+                GL2GL3.GL_DEBUG_TYPE_ERROR_ARB,
+                GL2GL3.GL_DEBUG_SEVERITY_HIGH_ARB);
+        window.getContext().addGLDebugListener(myGLDebugListener);
+        
+        window.invoke(true, new GLRunnable() {
+            public boolean run(GLAutoDrawable drawable) {
+                drawable.getGL().glBindFramebuffer(-1, -1); // ERROR !
+                return true;
+            }
+        } );
+        
+        if( window.getContext().isGLDebugMessageEnabled() ) {
+            Assert.assertEquals(true, myGLDebugListener.received());
+        }                
+        
+        destroyWindow(window);
+    }
+    
+    
+    public static void main(String args[]) throws IOException {
+        String tstname = TestGLDebug01NEWT.class.getName();
+        org.junit.runner.JUnitCore.main(tstname);
+    }
+    
+    public class MyGLDebugListener implements GLDebugListener {
+        int recSource;
+        int recType;
+        int recSeverity;
+        
+        String recMsg;
+        int recId;
+        boolean received = false;
+        
+        public MyGLDebugListener(int recSource, int recType, int recSeverity) {
+            this.recSource = recSource;
+            this.recType = recType;
+            this.recSeverity = recSeverity;
+            this.recMsg = null;
+            this.recId = -1;
+            
+        }
+        public MyGLDebugListener(String recMsg, int recId) {
+            this.recSource = -1;
+            this.recType = -1;
+            this.recSeverity = -1;
+            this.recMsg = recMsg;
+            this.recId = recId;
+        }
+        
+        public boolean received() { return received; }
+        
+        public void messageSent(GLDebugMessage event) {
+            System.err.println("XXX: "+event);            
+            if(null != recMsg && recMsg.equals(event.getDbgMsg()) && recId == event.getDbgId()) {
+                received = true;
+            } else if(0 <= recSource && recSource == event.getDbgSource() && 
+                                        recType == event.getDbgType() &&
+                                        recSeverity== event.getDbgSeverity() ) {
+                received = true;                
+            }
+            // Thread.dumpStack();
+        }        
+    }
+}
+    
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLExtensionQueryOffscreen.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLExtensionQueryOffscreen.java
new file mode 100644
index 0000000..5af5263
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLExtensionQueryOffscreen.java
@@ -0,0 +1,96 @@
+/**
+ * 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.util.Collections;
+import java.util.SortedSet;
+import java.util.TreeSet;
+
+import javax.media.nativewindow.AbstractGraphicsDevice;
+import javax.media.opengl.DefaultGLCapabilitiesChooser;
+import javax.media.opengl.GL;
+import javax.media.opengl.GLAutoDrawable;
+import javax.media.opengl.GLCapabilities;
+import javax.media.opengl.GLCapabilitiesChooser;
+import javax.media.opengl.GLContext;
+import javax.media.opengl.GLDrawableFactory;
+import javax.media.opengl.GLProfile;
+
+import org.junit.Test;
+
+public class TestGLExtensionQueryOffscreen {
+    
+    public static void main(String[] args) {
+        TestGLExtensionQueryOffscreen instance = new TestGLExtensionQueryOffscreen();
+        instance.testJogl2ExtensionCheck1();
+        instance.testJogl2ExtensionCheck2();
+    }
+
+    @Test
+    public void testJogl2ExtensionCheck1() {
+        GLDrawableFactory factory = GLDrawableFactory.getDesktopFactory();
+        GLContext sharedContext = factory.getOrCreateSharedContext(null);
+        sharedContext.makeCurrent();
+        String extensions;
+        try {
+            extensions = sharedContext.getGL().glGetString(GL.GL_EXTENSIONS);
+        } finally {
+            sharedContext.release();
+        }
+        String[] tabExtensions = extensions.split(" ");
+        SortedSet<String> setExtensions = new TreeSet<String>();
+        Collections.addAll(setExtensions, tabExtensions);
+        System.out.println("SharedContext: "+sharedContext);
+        System.out.println("SharedContext: "+setExtensions);
+    }
+    
+    @Test
+    public void testJogl2ExtensionCheck2() {
+        GLCapabilities caps = new GLCapabilities(GLProfile.getDefault());
+        GLDrawableFactory factory = GLDrawableFactory.getDesktopFactory();
+        GLCapabilitiesChooser glCapsChooser = new DefaultGLCapabilitiesChooser();
+        AbstractGraphicsDevice agd = factory.getDefaultDevice();
+        
+        GLAutoDrawable drawable = factory.createGLPbuffer(agd, caps, glCapsChooser, 256, 256, null);
+        GLContext context = drawable.getContext();
+        context.makeCurrent();
+        String extensions;
+        try {
+            extensions = context.getGL().glGetString(GL.GL_EXTENSIONS);
+        } finally {
+            context.release();
+        }
+        String[] tabExtensions = extensions.split(" ");
+        SortedSet<String> setExtensions = new TreeSet<String>();
+        Collections.addAll(setExtensions, tabExtensions);
+        System.out.println("DefaulContext: "+context);
+        System.out.println("DefaulContext: "+setExtensions);
+    }
+}
+
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 d4f24bb..7813482 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
@@ -56,7 +56,7 @@ public class TestGLProfile01NEWT extends UITestCase {
         System.err.println(NewtVersion.getInstance());
 
         GLDrawableFactory factory = GLDrawableFactory.getFactory(GLProfile.getDefault());
-        List/*<GLCapabilitiesImmutable>*/ availCaps = factory.getAvailableCapabilities(null);
+        List<GLCapabilitiesImmutable> availCaps = factory.getAvailableCapabilities(null);
         for(int i=0; i<availCaps.size(); i++) {
             System.err.println(availCaps.get(i));
         }
@@ -65,25 +65,28 @@ public class TestGLProfile01NEWT extends UITestCase {
     @Test
     public void test01GLProfileDefault() throws InterruptedException {
         System.out.println("GLProfile "+GLProfile.glAvailabilityToString());
+        System.out.println("GLProfile.getDefaultDesktopDevice(): "+GLProfile.getDefaultDesktopDevice());
+        System.out.println("GLProfile.getDefaultEGLDevice(): "+GLProfile.getDefaultEGLDevice());
+        System.out.println("GLProfile.getDefaultDevice(): "+GLProfile.getDefaultDevice());        
         GLProfile glp = GLProfile.getDefault();
         System.out.println("GLProfile.getDefault(): "+glp);
         if(glp.getName().equals(GLProfile.GL4bc)) {
-            Assert.assertTrue(GLProfile.isGL4bcAvailable());
-            Assert.assertTrue(GLProfile.isGL3bcAvailable());
-            Assert.assertTrue(GLProfile.isGL2Available());
-            Assert.assertTrue(GLProfile.isGL2ES1Available());
-            Assert.assertTrue(GLProfile.isGL2ES2Available());
+            Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL4bc));
+            Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL3bc));
+            Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL2));
+            Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL2ES1));
+            Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL2ES2));
         } else if(glp.getName().equals(GLProfile.GL3bc)) {
-            Assert.assertTrue(GLProfile.isGL3bcAvailable());
-            Assert.assertTrue(GLProfile.isGL2Available());
-            Assert.assertTrue(GLProfile.isGL2ES1Available());
-            Assert.assertTrue(GLProfile.isGL2ES2Available());
+            Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL3bc));
+            Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL2));
+            Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL2ES1));
+            Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL2ES2));
         } else if(glp.getName().equals(GLProfile.GL2)) {
-            Assert.assertTrue(GLProfile.isGL2Available());
-            Assert.assertTrue(GLProfile.isGL2ES1Available());
-            Assert.assertTrue(GLProfile.isGL2ES2Available());
+            Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL2));
+            Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL2ES1));
+            Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL2ES2));
         } else if(glp.getName().equals(GLProfile.GL2ES1)) {
-            Assert.assertTrue(GLProfile.isGL2ES1Available());
+            Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL2ES1));
         }
         dumpVersion(glp);
     }
@@ -100,29 +103,21 @@ public class TestGLProfile01NEWT extends UITestCase {
         GLProfile glp = GLProfile.getMaxProgrammable();
         System.out.println("GLProfile.getMaxProgrammable(): "+glp);
         if(glp.getName().equals(GLProfile.GL4)) {
-            Assert.assertTrue(GLProfile.isGL4Available());
-            Assert.assertTrue(GLProfile.isGL3Available());
-            Assert.assertTrue(GLProfile.isGL2Available());
-            Assert.assertTrue(GLProfile.isGL2ES1Available());
-            Assert.assertTrue(GLProfile.isGL2ES2Available());
+            Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL4));
+            Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL3));
+            Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL2ES2));
         } else if(glp.getName().equals(GLProfile.GL3)) {
-            Assert.assertTrue(GLProfile.isGL3Available());
-            Assert.assertTrue(GLProfile.isGL2Available());
-            Assert.assertTrue(GLProfile.isGL2ES1Available());
-            Assert.assertTrue(GLProfile.isGL2ES2Available());
-        } else if(glp.getName().equals(GLProfile.GL2)) {
-            Assert.assertTrue(GLProfile.isGL2Available());
-            Assert.assertTrue(GLProfile.isGL2ES1Available());
-            Assert.assertTrue(GLProfile.isGL2ES2Available());
+            Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL3));
+            Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL2ES2));
         } else if(glp.getName().equals(GLProfile.GL2ES2)) {
-            Assert.assertTrue(GLProfile.isGL2ES2Available());
+            Assert.assertTrue(GLProfile.isAvailable(GLProfile.GL2ES2));
         }
         dumpVersion(glp);
     }
 
     @Test
     public void test04GLProfileGL2ES1() throws InterruptedException {
-        if(!GLProfile.isGL2ES1Available()) {
+        if(!GLProfile.isAvailable(GLProfile.GL2ES1)) {
             System.out.println("GLProfile GL2ES1 n/a");
             return;
         }
@@ -133,7 +128,7 @@ public class TestGLProfile01NEWT extends UITestCase {
 
     @Test
     public void test05GLProfileGL2ES2() throws InterruptedException {
-        if(!GLProfile.isGL2ES2Available()) {
+        if(!GLProfile.isAvailable(GLProfile.GL2ES2)) {
             System.out.println("GLProfile GL2ES2 n/a");
             return;
         }
@@ -141,6 +136,17 @@ public class TestGLProfile01NEWT extends UITestCase {
         System.out.println("GLProfile GL2ES2: "+glp);
         dumpVersion(glp);
     }
+    
+    @Test
+    public void test06GLProfileShutdownRecreate() throws InterruptedException {
+        GLProfile.shutdown();
+        GLProfile.initSingleton(true);
+        System.out.println("GLProfile.getDefault(): "+GLProfile.getDefault());
+        System.out.println("GLProfile.getDefaultDesktopDevice(): "+GLProfile.getDefaultDesktopDevice());
+        System.out.println("GLProfile.getDefaultEGLDevice(): "+GLProfile.getDefaultEGLDevice());
+        System.out.println("GLProfile.getDefaultDevice(): "+GLProfile.getDefaultDevice());
+    }
+
 
     protected void dumpVersion(GLProfile glp) throws InterruptedException {
         GLCapabilities caps = new GLCapabilities(glp);
@@ -155,7 +161,7 @@ public class TestGLProfile01NEWT extends UITestCase {
 
         glWindow.display();
         Thread.sleep(100);
-        glWindow.invalidate();
+        glWindow.destroy();
     }
 
     public static void main(String args[]) throws IOException {
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGPUMemSec01NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGPUMemSec01NEWT.java
new file mode 100644
index 0000000..a369f54
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGPUMemSec01NEWT.java
@@ -0,0 +1,324 @@
+/**
+ * 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 com.jogamp.common.nio.Buffers;
+import com.jogamp.opengl.util.GLPixelStorageModes;
+import com.jogamp.opengl.test.junit.util.NEWTGLContext;
+import com.jogamp.opengl.test.junit.util.UITestCase;
+
+import java.io.IOException;
+import java.nio.ByteBuffer;
+
+import javax.media.opengl.GL;
+import javax.media.opengl.GL2GL3;
+import javax.media.opengl.GLDrawable;
+import javax.media.opengl.GLException;
+import javax.media.opengl.GLProfile;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+public class TestGPUMemSec01NEWT extends UITestCase {
+    static String hexString(int i) {
+        return "0x"+Integer.toHexString(i);
+    }
+    static String exceptionMsg(String pre, int format, int type, int components, int width, int height, int rl1, int rl4, int rl8) {
+        return pre + 
+             ": fmt "+hexString(format)+", type "+hexString(type)+", comps "+components+
+             ", "+width+"x"+height+
+             ", rowlenA1 "+rl1+", rowlenA4 "+rl4+", rowlenA8 "+rl8;        
+    }
+    
+    static NEWTGLContext.WindowContext createCurrentGLOffscreenWindow(int width, int height) throws GLException, InterruptedException {
+        final NEWTGLContext.WindowContext winctx = NEWTGLContext.createOffscreenWindow(GLProfile.getGL2ES2(), width, height, true);
+        final GL gl = winctx.context.getGL();
+
+        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
+        
+        // misc GL setup
+        gl.glClearColor(1, 1, 1, 1);
+        gl.glEnable(GL.GL_DEPTH_TEST);
+        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
+        gl.glViewport(0, 0, width, height);        
+        gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
+        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
+        
+        return winctx;
+    }
+    
+    static int readPixelsCheck(GL gl, int format, int type, int components, int width, int height) throws InterruptedException {
+        int expectedExceptions = 0;
+        
+        final int rowlenA1 = width * components;    
+        
+        final int rowlenA4 = ( ( width * components + 3 ) / 4 ) * 4 ;        
+        Assert.assertTrue(rowlenA4 % 4 == 0);
+
+        final int rowlenA8 = ( ( width * components + 7 ) / 8 ) * 8 ;
+        Assert.assertTrue(rowlenA8 % 8 == 0);
+        
+        GLPixelStorageModes psm = new GLPixelStorageModes();
+        psm.setPackAlignment(gl, 1);
+        
+        Exception ee = null;
+        
+        // ok size !
+        try {
+            ByteBuffer bb = Buffers.newDirectByteBuffer(height*rowlenA1);
+            gl.glReadPixels(0, 0, width, height, format, type, bb);
+            Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
+        } catch(IndexOutOfBoundsException e) {
+            ee = e;
+        }
+        Assert.assertNull(
+            exceptionMsg("Unexpected IndexOutOfBoundsException (size ok, alignment 1)", 
+                         format, type, components, width, height, rowlenA1, rowlenA4, rowlenA8), ee);
+        ee = null;
+        
+        
+        // too small -10 !
+        try {
+            ByteBuffer bb = Buffers.newDirectByteBuffer(height*rowlenA1-10);
+            gl.glReadPixels(0, 0, width, height, format, type, bb);
+            Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
+        } catch(IndexOutOfBoundsException e) {
+            ee = e;
+            System.err.println(
+                exceptionMsg("OK Expected IndexOutOfBoundsException (size-10 bytes)", 
+                             format, type, components, width, height, rowlenA1, rowlenA4, rowlenA8)+
+                             ": "+ee.getMessage());
+            expectedExceptions++;            
+        }
+        Assert.assertNotNull(
+            exceptionMsg("Expected IndexOutOfBoundsException (size-10 bytes)", 
+                         format, type, components, width, height, rowlenA1, rowlenA4, rowlenA8), ee);
+        ee = null;
+        
+        // too small size/4 !
+        try {
+            ByteBuffer bb = Buffers.newDirectByteBuffer(height*rowlenA1/4);
+            gl.glReadPixels(0, 0, width, height, format, type, bb);
+            Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
+        } catch(IndexOutOfBoundsException e) {
+            ee = e;
+            System.err.println(
+                exceptionMsg("OK Expected IndexOutOfBoundsException (size/4 bytes)", 
+                             format, type, components, width, height, rowlenA1, rowlenA4, rowlenA8)+
+                             ": "+ee.getMessage());
+            expectedExceptions++;            
+        }
+        Assert.assertNotNull(
+            exceptionMsg("Expected IndexOutOfBoundsException (size/4 bytes)", 
+                         format, type, components, width, height, rowlenA1, rowlenA4, rowlenA8), ee);
+        ee = null;
+
+        //
+        // Alignment test
+        //         
+        psm.setPackAlignment(gl, 4);
+        
+        // ok size !
+        try {
+            ByteBuffer bb = Buffers.newDirectByteBuffer(height*rowlenA4);
+            gl.glReadPixels(0, 0, width, height, format, type, bb);
+            Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
+        } catch(IndexOutOfBoundsException e) {
+            ee = e;
+        }
+        Assert.assertNull(
+            exceptionMsg("Unexpected IndexOutOfBoundsException (size ok, alignment 4)", 
+                         format, type, components, width, height, rowlenA1, rowlenA4, rowlenA8), ee);
+        ee = null;
+        
+        // too small if rowlenA1%4 > 0
+        try {
+            ByteBuffer bb = Buffers.newDirectByteBuffer(height*rowlenA1);
+            gl.glReadPixels(0, 0, width, height, format, type, bb);
+            Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
+        } catch(IndexOutOfBoundsException e) {
+            ee = e;
+            if(rowlenA1%4>0) {
+                System.err.println(
+                    exceptionMsg("OK Expected IndexOutOfBoundsException (alignment 4)", 
+                                 format, type, components, width, height, rowlenA1, rowlenA4, rowlenA8)+
+                                 ": "+ee.getMessage());
+                expectedExceptions++;
+            }
+        }
+        if(rowlenA1%4>0) {
+            Assert.assertNotNull(
+                exceptionMsg("Expected IndexOutOfBoundsException (alignment 4)", 
+                             format, type, components, width, height, rowlenA1, rowlenA4, rowlenA8), ee);
+        } else {
+            Assert.assertNull(
+                exceptionMsg("Unexpected IndexOutOfBoundsException (alignment 4)", 
+                             format, type, components, width, height, rowlenA1, rowlenA4, rowlenA8), ee);            
+        }
+        ee = null;
+        
+        psm.setPackAlignment(gl, 8);
+        
+        // ok size !
+        try {
+            ByteBuffer bb = Buffers.newDirectByteBuffer(height*rowlenA8);
+            gl.glReadPixels(0, 0, width, height, format, type, bb);
+            Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
+        } catch(IndexOutOfBoundsException e) {
+            ee = e;
+        }
+        Assert.assertNull(
+            exceptionMsg("Unexpected IndexOutOfBoundsException (size ok, alignment 8)", 
+                         format, type, components, width, height, rowlenA1, rowlenA4, rowlenA8), ee);
+        ee = null;
+        
+        // too small if rowlenA1%8 > 0
+        try {
+            ByteBuffer bb = Buffers.newDirectByteBuffer(height*rowlenA1);
+            gl.glReadPixels(0, 0, width, height, format, type, bb);
+            Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
+        } catch(IndexOutOfBoundsException e) {
+            ee = e;
+            if(rowlenA1%8>0) {
+                System.err.println(
+                    exceptionMsg("OK Expected IndexOutOfBoundsException (alignment 8)", 
+                                 format, type, components, width, height, rowlenA1, rowlenA4, rowlenA8)+
+                                 ": "+ee.getMessage());
+                expectedExceptions++;
+            }
+        }
+        if(rowlenA1%8>0) {
+            Assert.assertNotNull(
+                exceptionMsg("Expected IndexOutOfBoundsException (alignment 8)", 
+                             format, type, components, width, height, rowlenA1, rowlenA4, rowlenA8), ee);
+        } else {
+            Assert.assertNull(
+                exceptionMsg("Unexpected IndexOutOfBoundsException (alignment 8)", 
+                             format, type, components, width, height, rowlenA1, rowlenA4, rowlenA8), ee);            
+        }
+        ee = null;
+        
+        psm.restore(gl);        
+        
+        return expectedExceptions;            
+    }
+    
+    @Test
+    public void testReadPixels_640x480xRGBxUB() throws InterruptedException {
+        final int width = 640;
+        final int height= 480;
+        
+        // preset ..
+        final NEWTGLContext.WindowContext winctx = createCurrentGLOffscreenWindow(width, height);
+        final GLDrawable drawable = winctx.context.getGLDrawable();
+        final GL gl = winctx.context.getGL();
+        
+        // 2 x too small - 0 x alignment
+        Assert.assertEquals(2, readPixelsCheck(gl, GL.GL_RGB, GL.GL_UNSIGNED_BYTE, 3, width, height));
+                        
+        drawable.swapBuffers();
+        Thread.sleep(50);
+        
+        NEWTGLContext.destroyWindow(winctx);
+    }
+    
+    @Test
+    public void testReadPixels_102x100xRGBxUB() throws InterruptedException {
+        final int wwidth = 640;
+        final int wheight= 480;
+        final int rwidth = 102;
+        final int rheight= 100;
+        
+        // preset ..
+        final NEWTGLContext.WindowContext winctx = createCurrentGLOffscreenWindow(wwidth, wheight);
+        final GLDrawable drawable = winctx.context.getGLDrawable();
+        final GL gl = winctx.context.getGL();
+        
+        // 2 x too small - 2 x alignment
+        Assert.assertEquals(4, readPixelsCheck(gl, GL.GL_RGB, GL.GL_UNSIGNED_BYTE, 3, rwidth, rheight));
+                        
+        drawable.swapBuffers();
+        Thread.sleep(50);
+        
+        NEWTGLContext.destroyWindow(winctx);
+    }
+    
+    @Test
+    public void testReadPixelsGL2GL3_640x480xREDxUB() throws InterruptedException {
+        if(!GLProfile.isAvailable(GLProfile.GL2GL3)) {
+            System.err.println("GL2GL3 n/a skip test");
+            return;
+        }
+        final int width = 640;
+        final int height= 480;
+
+        // preset ..
+        final NEWTGLContext.WindowContext winctx = createCurrentGLOffscreenWindow(width, height);
+        final GLDrawable drawable = winctx.context.getGLDrawable();
+        final GL2GL3 gl = winctx.context.getGL().getGL2GL3();
+        
+        // 2 x too small - 0 x alignment
+        Assert.assertEquals(2, readPixelsCheck(gl, GL2GL3.GL_RED, GL.GL_UNSIGNED_BYTE, 1, width, height));
+                        
+        drawable.swapBuffers();
+        Thread.sleep(50);
+        
+        NEWTGLContext.destroyWindow(winctx);
+    }
+
+    @Test
+    public void testReadPixelsGL2GL3_102x100xREDxUB() throws InterruptedException {
+        if(!GLProfile.isAvailable(GLProfile.GL2GL3)) {
+            System.err.println("GL2GL3 n/a skip test");
+            return;
+        }
+        int wwidth = 640;
+        int wheight= 480;
+        int rwidth = 102;
+        int rheight= 100;
+
+        // preset ..
+        final NEWTGLContext.WindowContext winctx = createCurrentGLOffscreenWindow(wwidth, wheight);
+        final GLDrawable drawable = winctx.context.getGLDrawable();
+        final GL2GL3 gl = winctx.context.getGL().getGL2GL3();
+        
+        // 2 x too small - 2 x alignment
+        Assert.assertEquals(4, readPixelsCheck(gl, GL2GL3.GL_RED, GL.GL_UNSIGNED_BYTE, 1, rwidth, rheight));
+                        
+        drawable.swapBuffers();
+        Thread.sleep(50);
+        
+        NEWTGLContext.destroyWindow(winctx);
+    }
+    
+    public static void main(String args[]) throws IOException {
+        String tstname = TestGPUMemSec01NEWT.class.getName();
+        org.junit.runner.JUnitCore.main(tstname);
+    }    
+}
+
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestMapBuffer01NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestMapBuffer01NEWT.java
new file mode 100644
index 0000000..bad04ad
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestMapBuffer01NEWT.java
@@ -0,0 +1,111 @@
+/**
+ * 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.acore;
+
+import com.jogamp.common.nio.Buffers;
+import com.jogamp.opengl.test.junit.util.NEWTGLContext;
+import com.jogamp.opengl.test.junit.util.UITestCase;
+
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+
+import javax.media.opengl.GL;
+import javax.media.opengl.GL2GL3;
+import javax.media.opengl.GLProfile;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ *
+ * @author Luz, et.al.
+ */
+public class TestMapBuffer01NEWT extends UITestCase {
+    static final boolean DEBUG = false;
+    
+    @Test
+    public void testWriteRead01a() throws InterruptedException {
+        ByteBuffer verticiesBB = ByteBuffer.allocate(4*9);
+        verticiesBB.order(ByteOrder.nativeOrder());
+        testWriteRead01(verticiesBB);
+    }
+    @Test
+    public void testWriteRead01b() throws InterruptedException {
+        ByteBuffer verticiesBB = Buffers.newDirectByteBuffer(4*9);
+        testWriteRead01(verticiesBB);
+    }
+
+    private void testWriteRead01(ByteBuffer verticiesBB) throws InterruptedException {
+        final NEWTGLContext.WindowContext winctx = NEWTGLContext.createOffscreenWindow(GLProfile.getDefault(), 800, 600, true);
+        final GL gl = winctx.context.getGL();
+
+        int[] vertexBuffer = new int[1];
+        
+        verticiesBB.putFloat(0);
+        verticiesBB.putFloat(0.5f);
+        verticiesBB.putFloat(0);
+
+        verticiesBB.putFloat(0.5f);
+        verticiesBB.putFloat(-0.5f);
+        verticiesBB.putFloat(0);
+
+        verticiesBB.putFloat(-0.5f);
+        verticiesBB.putFloat(-0.5f);
+        verticiesBB.putFloat(0);
+        verticiesBB.rewind();
+        if(DEBUG) {
+            for(int i=0; i < verticiesBB.capacity(); i+=4) {
+                System.out.println("java "+i+": "+verticiesBB.getFloat(i));
+            }
+        }
+
+        gl.glGenBuffers(1, vertexBuffer, 0);
+
+        gl.glBindBuffer(GL.GL_ARRAY_BUFFER, vertexBuffer[0]);
+
+        // gl.glBufferData(GL3.GL_ARRAY_BUFFER, verticiesBB.capacity(), verticiesBB, GL3.GL_STATIC_READ);
+        gl.glBufferData(GL.GL_ARRAY_BUFFER, verticiesBB.capacity(), verticiesBB, GL.GL_STATIC_DRAW);
+        
+        ByteBuffer bb = gl.glMapBuffer(GL.GL_ARRAY_BUFFER, GL2GL3.GL_READ_ONLY);
+        // gl.glUnmapBuffer(GL3.GL_ARRAY_BUFFER);
+        if(DEBUG) {
+            for(int i=0; i < bb.capacity(); i+=4) {
+                System.out.println("gpu "+i+": "+bb.getFloat(i));
+            }
+        }
+        for(int i=0; i < bb.capacity(); i+=4) {
+            Assert.assertEquals(verticiesBB.getFloat(i), bb.getFloat(i), 0.0);
+        }
+        NEWTGLContext.destroyWindow(winctx);
+    }
+    public static void main(String args[]) throws IOException {
+        String tstname = TestMapBuffer01NEWT.class.getName();
+        org.junit.runner.JUnitCore.main(tstname);
+    }    
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestNVSwapGroupNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestNVSwapGroupNEWT.java
new file mode 100644
index 0000000..0f64738
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestNVSwapGroupNEWT.java
@@ -0,0 +1,140 @@
+/**
+ * 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.acore;
+
+import com.jogamp.newt.opengl.GLWindow;
+
+import javax.media.nativewindow.util.InsetsImmutable;
+import javax.media.opengl.GLAutoDrawable;
+import javax.media.opengl.GLCapabilities;
+import javax.media.opengl.GLContext;
+import javax.media.opengl.GLEventListener;
+import javax.media.opengl.GLProfile;
+import com.jogamp.opengl.util.Animator;
+
+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.BeforeClass;
+import org.junit.Test;
+
+public class TestNVSwapGroupNEWT extends UITestCase {
+    static GLProfile glp;
+    static GLCapabilities caps;
+    static int width, height;
+
+    @BeforeClass
+    public static void initClass() {
+        GLProfile.initSingleton(true);
+        glp = GLProfile.getDefault();
+        Assert.assertNotNull(glp);
+        caps = new GLCapabilities(glp);
+        Assert.assertNotNull(caps);
+        width  = 256;
+        height = 256;
+    }
+
+    protected GLWindow runTestGL(Animator animator, int x, int y, final int group, final int barrier) {
+        GLWindow glWindow = GLWindow.create(caps);
+        Assert.assertNotNull(glWindow);
+        glWindow.setTitle("Shared Gears NEWT Test: "+x+"/"+y);
+
+        glWindow.setSize(width, height);
+
+        GearsES2 gears = new GearsES2(1);
+        glWindow.addGLEventListener(new GLEventListener() {
+            public void init(GLAutoDrawable drawable) {
+                int[] maxVals = new int[] { -1, -1 } ;
+                GLContext glc = drawable.getContext();
+                boolean r = glc.queryMaxSwapGroups(maxVals, 0, maxVals, 1);
+                System.err.println("swap group max groups "+maxVals[0]+", barriers "+maxVals[0]+", "+r);
+                if(maxVals[0]>=group) {
+                    System.err.println("swap group joing 1: "+glc.joinSwapGroup(group));
+                    if(maxVals[1]>=barrier) {
+                        System.err.println("swap group bind 1-1: "+glc.bindSwapBarrier(group, barrier));
+                    }
+                }                
+            }
+            public void dispose(GLAutoDrawable drawable) {}
+            public void display(GLAutoDrawable drawable) {}
+            public void reshape(GLAutoDrawable drawable, int x, int y,
+                    int width, int height) {}
+        });
+        glWindow.addGLEventListener(gears);
+
+        animator.add(glWindow);
+
+        glWindow.setVisible(true);
+
+        /** insets (if supported) are available only if window is set visible and hence is created */
+        glWindow.setTopLevelPosition(x, y);
+
+        return glWindow;
+    }
+
+    /** NV swap group is currently disabled .. needs more testing */
+    @Test
+    public void test01() throws InterruptedException {
+        // make sure it won't be active for now !
+        int swap_group = 9999; 
+        int swap_barrier = 9999; 
+        
+        Animator animator = new Animator();
+        GLWindow f1 = runTestGL(animator, 0, 0, swap_group, swap_barrier);
+        InsetsImmutable insets = f1.getInsets();
+        GLWindow f2 = runTestGL(animator, width+insets.getTotalWidth(), 0, swap_group, swap_barrier);
+        animator.setUpdateFPSFrames(1, null);        
+        animator.start();
+        while(animator.isAnimating() && animator.getTotalFPSDuration()<duration) {
+            Thread.sleep(100);
+        }
+        animator.stop();
+
+        f1.destroy();
+        f2.destroy();
+
+        // see above ..
+        // releaseShared();
+    }
+
+    static long duration = 500; // ms
+
+    public static void main(String args[]) {
+        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(); }
+            }
+        }
+        org.junit.runner.JUnitCore.main(TestNVSwapGroupNEWT.class.getName());
+    }
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListAWT.java
index bf4c493..99e81af 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListAWT.java
@@ -36,13 +36,14 @@ import javax.media.opengl.awt.GLCanvas;
 import com.jogamp.opengl.util.Animator;
 
 import com.jogamp.opengl.test.junit.util.UITestCase;
-import com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.Gears;
+import com.jogamp.opengl.test.junit.jogl.demos.gl2.Gears;
 import com.jogamp.opengl.test.junit.util.AWTRobotUtil;
 
 import java.awt.Frame;
 import javax.swing.SwingUtilities;
 
 import org.junit.Assert;
+import org.junit.Assume;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
@@ -55,13 +56,12 @@ public class TestSharedContextListAWT extends UITestCase {
 
     @BeforeClass
     public static void initClass() {
-        GLProfile.initSingleton(true);
         glp = GLProfile.getDefault();
         Assert.assertNotNull(glp);
         caps = new GLCapabilities(glp);
         Assert.assertNotNull(caps);
-        width  = 512;
-        height = 512;
+        width  = 256;
+        height = 256;
     }
 
     private void initShared() {
@@ -82,7 +82,7 @@ public class TestSharedContextListAWT extends UITestCase {
         return new Frame("Shared Gears AWT Test: "+x+"/"+y+" shared "+useShared);
     }
 
-    protected GLCanvas runTestGL(final Frame frame, final Animator animator, final int x, final int y, final boolean useShared)
+    protected GLCanvas runTestGL(final Frame frame, final Animator animator, final int x, final int y, final boolean useShared, final boolean vsync)
             throws InterruptedException
     {
         final GLCanvas glCanvas = new GLCanvas(caps, useShared ? sharedDrawable.getContext() : null);        
@@ -91,7 +91,7 @@ public class TestSharedContextListAWT extends UITestCase {
         frame.setLocation(x, y);
         frame.setSize(width, height);
         
-        Gears gears = new Gears();
+        Gears gears = new Gears(vsync ? 1 : 0);
         if(useShared) {
             gears.setGears(sharedGears.getGear1(), sharedGears.getGear2(), sharedGears.getGear3());
         }
@@ -109,34 +109,45 @@ public class TestSharedContextListAWT extends UITestCase {
     public void test01() throws InterruptedException {
         initShared();
 
-        Frame f1 = createFrame(0, 0, true);
-        Frame f2 = createFrame(width, 0, true);
-        Frame f3 = createFrame(0, height, false);
+        final Frame f1 = createFrame(0, 0, true);
+        final Frame f2 = createFrame(width, 0, true);
+        final Frame f3 = createFrame(0, height, false);
 
         Animator animator = new Animator();
 
-        GLCanvas glc1 = runTestGL(f1, animator, 0,     0,      true);
-        GLCanvas glc2 = runTestGL(f2, animator, width, 0,      true);
-        GLCanvas glc3 = runTestGL(f3, animator, 0,     height, false);
+        final GLCanvas glc1 = runTestGL(f1, animator, 0,     0,      true, false);
+        final GLCanvas glc2 = runTestGL(f2, animator, width, 0,      true, false);
+        final GLCanvas glc3 = runTestGL(f3, animator, 0,     height, false, true);
 
+        animator.setUpdateFPSFrames(1, null);        
         animator.start();
-        while(animator.isAnimating() && animator.getDuration()<duration) {
+        while(animator.isAnimating() && animator.getTotalFPSDuration()<duration) {
             Thread.sleep(100);
         }
         animator.stop();
 
         // here we go again: On AMD/X11 the create/destroy sequence must be the same
-        // even though this is agains the chicken/egg logic here ..
+        // even though this is agains the chicken/egg logic
         releaseShared();
 
-        f1.dispose();
-        Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glc1, false));
-
-        f2.dispose();
-        Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glc2, false));
-
-        f3.dispose();
-        Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glc3, false));
+        try {
+            javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
+                public void run() {
+                    try {
+                        f1.dispose();
+                        Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glc1, false));
+                        f2.dispose();
+                        Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glc2, false));
+                        f3.dispose();
+                        Assert.assertEquals(true, AWTRobotUtil.waitForRealized(glc3, false));
+                    } catch (Throwable t) {
+                        throw new RuntimeException(t);
+                    }
+                }});
+        } catch( Throwable throwable ) {
+            throwable.printStackTrace();
+            Assume.assumeNoException( throwable );
+        }                
         
         // see above ..
         //releaseShared();
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListNEWT.java
index f5c9506..a37b4cc 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListNEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextListNEWT.java
@@ -28,7 +28,11 @@
  
 package com.jogamp.opengl.test.junit.jogl.acore;
 
+import java.io.IOException;
+
 import com.jogamp.newt.opengl.GLWindow;
+
+import javax.media.nativewindow.util.InsetsImmutable;
 import javax.media.opengl.GLCapabilities;
 import javax.media.opengl.GLDrawableFactory;
 import javax.media.opengl.GLPbuffer;
@@ -36,7 +40,7 @@ import javax.media.opengl.GLProfile;
 import com.jogamp.opengl.util.Animator;
 
 import com.jogamp.opengl.test.junit.util.UITestCase;
-import com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.Gears;
+import com.jogamp.opengl.test.junit.jogl.demos.gl2.Gears;
 
 import org.junit.Assert;
 import org.junit.BeforeClass;
@@ -56,8 +60,8 @@ public class TestSharedContextListNEWT extends UITestCase {
         Assert.assertNotNull(glp);
         caps = new GLCapabilities(glp);
         Assert.assertNotNull(caps);
-        width  = 512;
-        height = 512;
+        width  = 256;
+        height = 256;
     }
 
     private void initShared() {
@@ -75,7 +79,7 @@ public class TestSharedContextListNEWT extends UITestCase {
         sharedDrawable.destroy();
     }
 
-    protected GLWindow runTestGL(Animator animator, int x, int y, boolean useShared) {
+    protected GLWindow runTestGL(Animator animator, int x, int y, boolean useShared, boolean vsync) {
         GLWindow glWindow = GLWindow.create(caps);
         Assert.assertNotNull(glWindow);
         glWindow.setTitle("Shared Gears NEWT Test: "+x+"/"+y+" shared "+useShared);
@@ -84,9 +88,8 @@ public class TestSharedContextListNEWT extends UITestCase {
         }
 
         glWindow.setSize(width, height);
-        glWindow.setPosition(x, y);
 
-        Gears gears = new Gears();
+        Gears gears = new Gears(vsync ? 1 : 0);
         if(useShared) {
             gears.setGears(sharedGears.getGear1(), sharedGears.getGear2(), sharedGears.getGear3());
         }
@@ -96,6 +99,9 @@ public class TestSharedContextListNEWT extends UITestCase {
 
         glWindow.setVisible(true);
 
+        /** insets (if supported) are available only if window is set visible and hence is created */
+        glWindow.setTopLevelPosition(x, y);
+
         return glWindow;
     }
 
@@ -103,11 +109,13 @@ public class TestSharedContextListNEWT extends UITestCase {
     public void test01() throws InterruptedException {
         initShared();
         Animator animator = new Animator();
-        GLWindow f1 = runTestGL(animator, 0, 0, true);
-        GLWindow f2 = runTestGL(animator, width, 0, true);
-        GLWindow f3 = runTestGL(animator, 0, height, false);
+        GLWindow f1 = runTestGL(animator, 0, 0, true, false);
+        InsetsImmutable insets = f1.getInsets();
+        GLWindow f2 = runTestGL(animator, width+insets.getTotalWidth(), 0, true, false);
+        GLWindow f3 = runTestGL(animator, 0, height+insets.getTotalHeight(), false, true);
+        animator.setUpdateFPSFrames(1, null);        
         animator.start();
-        while(animator.isAnimating() && animator.getDuration()<duration) {
+        while(animator.isAnimating() && animator.getTotalFPSDuration()<duration) {
             Thread.sleep(100);
         }
         animator.stop();
@@ -126,7 +134,7 @@ public class TestSharedContextListNEWT extends UITestCase {
 
     static long duration = 500; // ms
 
-    public static void main(String args[]) {
+    public static void main(String args[]) throws IOException {
         for(int i=0; i<args.length; i++) {
             if(args[i].equals("-time")) {
                 i++;
@@ -135,6 +143,10 @@ public class TestSharedContextListNEWT extends UITestCase {
                 } 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(TestSharedContextListNEWT.class.getName());
     }
 }
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES1NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES1NEWT.java
new file mode 100644
index 0000000..e78efb3
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES1NEWT.java
@@ -0,0 +1,146 @@
+/**
+ * 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 com.jogamp.newt.opengl.GLWindow;
+
+import javax.media.nativewindow.util.InsetsImmutable;
+import javax.media.opengl.GLCapabilities;
+import javax.media.opengl.GLDrawableFactory;
+import javax.media.opengl.GLPbuffer;
+import javax.media.opengl.GLProfile;
+import com.jogamp.opengl.util.Animator;
+
+import com.jogamp.opengl.test.junit.util.UITestCase;
+import com.jogamp.opengl.test.junit.jogl.demos.es1.GearsES1;
+
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class TestSharedContextVBOES1NEWT extends UITestCase {
+    static GLProfile glp;
+    static GLCapabilities caps;
+    static int width, height;
+    GLPbuffer sharedDrawable;
+    GearsES1 sharedGears;
+
+    @BeforeClass
+    public static void initClass() {
+        GLProfile.initSingleton(true);
+        glp = GLProfile.getDefault();
+        Assert.assertNotNull(glp);
+        caps = new GLCapabilities(glp);
+        Assert.assertNotNull(caps);
+        width  = 256;
+        height = 256;
+    }
+
+    private void initShared() {
+        sharedDrawable = GLDrawableFactory.getFactory(glp).createGLPbuffer(null, caps, null, width, height, null);
+        Assert.assertNotNull(sharedDrawable);
+        sharedGears = new GearsES1();
+        Assert.assertNotNull(sharedGears);
+        sharedDrawable.addGLEventListener(sharedGears);
+        // init and render one frame, which will setup the Gears display lists
+        sharedDrawable.display();
+    }
+
+    private void releaseShared() {
+        Assert.assertNotNull(sharedDrawable);
+        sharedDrawable.destroy();
+    }
+
+    protected GLWindow runTestGL(Animator animator, int x, int y, boolean useShared, boolean vsync) {
+        GLWindow glWindow = GLWindow.create(caps);
+        Assert.assertNotNull(glWindow);
+        glWindow.setTitle("Shared Gears NEWT Test: "+x+"/"+y+" shared "+useShared);
+        if(useShared) {
+            glWindow.setSharedContext(sharedDrawable.getContext());
+        }
+
+        glWindow.setSize(width, height);
+
+        GearsES1 gears = new GearsES1(vsync ? 1 : 0);
+        if(useShared) {
+            gears.setGears(sharedGears.getGear1(), sharedGears.getGear2(), sharedGears.getGear3());
+        }
+        glWindow.addGLEventListener(gears);
+
+        animator.add(glWindow);
+
+        glWindow.setVisible(true);
+
+        /** insets (if supported) are available only if window is set visible and hence is created */
+        glWindow.setTopLevelPosition(x, y);
+        
+        return glWindow;
+    }
+
+    @Test
+    public void test01() throws InterruptedException {
+        initShared();
+        Animator animator = new Animator();
+        GLWindow f1 = runTestGL(animator, 0, 0, true, false);
+        InsetsImmutable insets = f1.getInsets();
+        GLWindow f2 = runTestGL(animator, width+insets.getTotalWidth(), 0, true, false);
+        GLWindow f3 = runTestGL(animator, 0, height+insets.getTotalHeight(), false, true);
+        animator.setUpdateFPSFrames(1, null);        
+        animator.start();
+        while(animator.isAnimating() && animator.getTotalFPSDuration()<duration) {
+            Thread.sleep(100);
+        }
+        animator.stop();
+
+        // here we go again: On AMD/X11 the create/destroy sequence must be the same
+        // even though this is agains the chicken/egg logic here ..
+        releaseShared();
+
+        f1.destroy();
+        f2.destroy();
+        f3.destroy();
+
+        // see above ..
+        // releaseShared();
+    }
+
+    static long duration = 500; // ms
+
+    public static void main(String args[]) {
+        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(); }
+            }
+        }
+        org.junit.runner.JUnitCore.main(TestSharedContextVBOES1NEWT.class.getName());
+    }
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2NEWT.java
new file mode 100644
index 0000000..a37c43c
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestSharedContextVBOES2NEWT.java
@@ -0,0 +1,146 @@
+/**
+ * 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 com.jogamp.newt.opengl.GLWindow;
+
+import javax.media.nativewindow.util.InsetsImmutable;
+import javax.media.opengl.GLCapabilities;
+import javax.media.opengl.GLDrawableFactory;
+import javax.media.opengl.GLPbuffer;
+import javax.media.opengl.GLProfile;
+import com.jogamp.opengl.util.Animator;
+
+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.BeforeClass;
+import org.junit.Test;
+
+public class TestSharedContextVBOES2NEWT extends UITestCase {
+    static GLProfile glp;
+    static GLCapabilities caps;
+    static int width, height;
+    GLPbuffer sharedDrawable;
+    GearsES2 sharedGears;
+
+    @BeforeClass
+    public static void initClass() {
+        GLProfile.initSingleton(true);
+        glp = GLProfile.getDefault();
+        Assert.assertNotNull(glp);
+        caps = new GLCapabilities(glp);
+        Assert.assertNotNull(caps);
+        width  = 256;
+        height = 256;
+    }
+
+    private void initShared() {
+        sharedDrawable = GLDrawableFactory.getFactory(glp).createGLPbuffer(null, caps, null, width, height, null);
+        Assert.assertNotNull(sharedDrawable);
+        sharedGears = new GearsES2();
+        Assert.assertNotNull(sharedGears);
+        sharedDrawable.addGLEventListener(sharedGears);
+        // init and render one frame, which will setup the Gears display lists
+        sharedDrawable.display();
+    }
+
+    private void releaseShared() {
+        Assert.assertNotNull(sharedDrawable);
+        sharedDrawable.destroy();
+    }
+
+    protected GLWindow runTestGL(Animator animator, int x, int y, boolean useShared, boolean vsync) {
+        GLWindow glWindow = GLWindow.create(caps);
+        Assert.assertNotNull(glWindow);
+        glWindow.setTitle("Shared Gears NEWT Test: "+x+"/"+y+" shared "+useShared);
+        if(useShared) {
+            glWindow.setSharedContext(sharedDrawable.getContext());            
+        }
+
+        glWindow.setSize(width, height);
+
+        GearsES2 gears = new GearsES2(vsync ? 1 : 0);
+        if(useShared) {
+            gears.setGears(sharedGears.getGear1(), sharedGears.getGear2(), sharedGears.getGear3());
+        }
+        glWindow.addGLEventListener(gears);
+
+        animator.add(glWindow);
+
+        glWindow.setVisible(true);
+        
+        /** insets (if supported) are available only if window is set visible and hence is created */
+        glWindow.setTopLevelPosition(x, y);
+
+        return glWindow;
+    }
+
+    @Test
+    public void test01() throws InterruptedException {
+        initShared();
+        Animator animator = new Animator();
+        GLWindow f1 = runTestGL(animator, 0, 0, true, false);
+        InsetsImmutable insets = f1.getInsets();
+        GLWindow f2 = runTestGL(animator, width+insets.getTotalWidth(), 0, true, false);
+        GLWindow f3 = runTestGL(animator, 0, height+insets.getTotalHeight(), false, true);
+        animator.setUpdateFPSFrames(1, null);        
+        animator.start();
+        while(animator.isAnimating() && animator.getTotalFPSDuration()<duration) {
+            Thread.sleep(100);
+        }
+        animator.stop();
+
+        // here we go again: On AMD/X11 the create/destroy sequence must be the same
+        // even though this is agains the chicken/egg logic here ..
+        releaseShared();
+
+        f1.destroy();
+        f2.destroy();
+        f3.destroy();
+
+        // see above ..
+        // releaseShared();
+    }
+
+    static long duration = 500; // ms
+
+    public static void main(String args[]) {
+        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(); }
+            }
+        }
+        org.junit.runner.JUnitCore.main(TestSharedContextVBOES2NEWT.class.getName());
+    }
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestAWT01GLn.java b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestAWT01GLn.java
index 21e1a4a..55bdb95 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestAWT01GLn.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestAWT01GLn.java
@@ -34,7 +34,7 @@ import javax.media.opengl.awt.GLCanvas;
 import com.jogamp.opengl.util.Animator;
 
 import com.jogamp.opengl.test.junit.util.UITestCase;
-import com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.Gears;
+import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
 
 import java.awt.Frame;
 
@@ -52,7 +52,6 @@ public class TestAWT01GLn extends UITestCase {
 
     @BeforeClass
     public static void startup() {
-        GLProfile.initSingleton(true);
         System.out.println("GLProfile "+GLProfile.glAvailabilityToString());
     }
 
@@ -84,7 +83,7 @@ public class TestAWT01GLn extends UITestCase {
     protected void runTestGL(GLCapabilities caps) throws InterruptedException {
         glCanvas = new GLCanvas(caps);
         Assert.assertNotNull(glCanvas);
-        glCanvas.addGLEventListener(new Gears());
+        glCanvas.addGLEventListener(new GearsES2());
         frame.add(glCanvas);
 
         // Revalidate size/layout.
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestAWT02WindowClosing.java b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestAWT02WindowClosing.java
index 535f0e9..f83c8c0 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestAWT02WindowClosing.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestAWT02WindowClosing.java
@@ -45,11 +45,6 @@ public class TestAWT02WindowClosing extends UITestCase {
 
     static long durationPerTest = 200; // ms
 
-    @BeforeClass
-    public static void initClass() {
-        GLProfile.initSingleton(true);
-    }
-
     @Test
     public void test01WindowClosing() throws InterruptedException {
         Frame frame = new Frame();
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestAWT03GLCanvasRecreate01.java b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestAWT03GLCanvasRecreate01.java
index 2faf8fa..aa7b4e0 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestAWT03GLCanvasRecreate01.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestAWT03GLCanvasRecreate01.java
@@ -33,7 +33,8 @@ import javax.media.opengl.awt.GLCanvas;
 import com.jogamp.opengl.util.Animator;
 
 import com.jogamp.opengl.test.junit.util.UITestCase;
-import com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.Gears;
+import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
+
 import com.jogamp.opengl.test.junit.util.MiscUtils;
 
 import java.awt.Frame;
@@ -58,7 +59,6 @@ public class TestAWT03GLCanvasRecreate01 extends UITestCase {
 
     @BeforeClass
     public static void startup() {
-        GLProfile.initSingleton(true);
         System.out.println("GLProfile "+GLProfile.glAvailabilityToString());
     }
 
@@ -66,7 +66,7 @@ public class TestAWT03GLCanvasRecreate01 extends UITestCase {
     public void init() {
         glCanvas = new GLCanvas();
         Assert.assertNotNull(glCanvas);
-        glCanvas.addGLEventListener(new Gears());
+        glCanvas.addGLEventListener(new GearsES2());
 
         animator = new Animator(glCanvas);
         animator.start();
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug460GLCanvasNPEAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug460GLCanvasNPEAWT.java
new file mode 100644
index 0000000..c89ce43
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestBug460GLCanvasNPEAWT.java
@@ -0,0 +1,56 @@
+/**
+ * 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.awt;
+
+import javax.media.opengl.GLCapabilities;
+import javax.media.opengl.GLCapabilitiesImmutable;
+import javax.media.opengl.GLProfile;
+import javax.media.opengl.awt.GLCanvas;
+
+import org.junit.Test;
+
+public class TestBug460GLCanvasNPEAWT {
+
+    public static void main(String[] args) {
+        TestBug460GLCanvasNPEAWT instance = new TestBug460GLCanvasNPEAWT();
+        instance.testIncompleteGLCanvasNPE();
+    }
+
+    @Test
+    public void testIncompleteGLCanvasNPE() {
+        GLCapabilities caps = new GLCapabilities(GLProfile.getDefault());
+        GLCanvas glc = new GLCanvas(caps);
+        // GLDrawableFactory factory = glc.getFactory(); // null ok: not realized
+        // GLCapabilitiesImmutable glci = glc.getChosenGLCapabilities(); -> NPE ok: .. not realized
+        GLCapabilitiesImmutable glCapsRequested = glc.getRequestedGLCapabilities();
+        System.out.println("ReqCaps: "+glCapsRequested);
+        System.out.println("GLCanvas: "+glc);
+    }
+}
+
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestSwingAWT01GLn.java b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestSwingAWT01GLn.java
index 779ad76..29f83fc 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestSwingAWT01GLn.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/awt/TestSwingAWT01GLn.java
@@ -35,7 +35,9 @@ import javax.media.opengl.awt.GLCanvas;
 import com.jogamp.opengl.util.Animator;
 
 import com.jogamp.opengl.test.junit.util.UITestCase;
-import com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.Gears;
+import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
+
+
 import java.awt.Frame;
 import java.awt.Window;
 import javax.swing.JFrame;
@@ -45,12 +47,11 @@ import org.junit.BeforeClass;
 import org.junit.Test;
 
 import static org.junit.Assume.*;
-import static org.junit.Assert.*;
 import static javax.swing.SwingUtilities.*;
 
 /**
  * Tests context creation + display on various kinds of Window implementations.
- * @author Michael Bien
+ * @author Michael Bien, et. al.
  */
 public class TestSwingAWT01GLn extends UITestCase {
     private Window[] windows;
@@ -58,7 +59,6 @@ public class TestSwingAWT01GLn extends UITestCase {
 
     @BeforeClass
     public static void startup() {
-        GLProfile.initSingleton(true);
         System.out.println("GLProfile "+GLProfile.glAvailabilityToString());
     }
 
@@ -83,7 +83,7 @@ public class TestSwingAWT01GLn extends UITestCase {
             Runnable test = new Runnable() {
                 public void run() {
                     glCanvas[0] = new GLCanvas(caps);
-                    glCanvas[0].addGLEventListener(new Gears());
+                    glCanvas[0].addGLEventListener(new GearsES2());
                     window.add(glCanvas[0]);
 
                     // Revalidate size/layout.
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/awt/text/TestAWTTextRendererUseVertexArrayBug464.java b/src/test/com/jogamp/opengl/test/junit/jogl/awt/text/TestAWTTextRendererUseVertexArrayBug464.java
index fc19a68..ab369a9 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/awt/text/TestAWTTextRendererUseVertexArrayBug464.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/awt/text/TestAWTTextRendererUseVertexArrayBug464.java
@@ -37,8 +37,10 @@ import com.jogamp.opengl.test.junit.util.UITestCase;
 
 import java.awt.Frame;
 import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
 
 import org.junit.Assert;
+import org.junit.Assume;
 import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.After;
@@ -69,7 +71,6 @@ public class TestAWTTextRendererUseVertexArrayBug464 extends UITestCase {
 
     @BeforeClass
     public static void initClass() {
-        GLProfile.initSingleton(true);
         glp = GLProfile.get(GLProfile.GL2);
         Assert.assertNotNull(glp);
         caps = new GLCapabilities(glp);
@@ -90,11 +91,18 @@ public class TestAWTTextRendererUseVertexArrayBug464 extends UITestCase {
 
     @After
     public void cleanupTest() {
-    	frame.setVisible(false);
-        frame.remove(glCanvas);
+        try {
+            javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
+                public void run() {
+                    frame.setVisible(false);
+                    frame.remove(glCanvas);
+                    frame.dispose();
+                }});
+        } catch( Throwable throwable ) {
+            throwable.printStackTrace();
+            Assume.assumeNoException( throwable );
+        }        
         glCanvas=null;
-        Assert.assertNotNull(frame);
-        frame.dispose();
         frame=null;
     }
 
@@ -107,15 +115,15 @@ public class TestAWTTextRendererUseVertexArrayBug464 extends UITestCase {
         Animator animator = new Animator(glCanvas);
 
         animator.start();
-	
-	    Thread.sleep(500); // 500 ms
-	
-	    animator.stop();
+    
+        Thread.sleep(500); // 500 ms
+    
+        animator.stop();
         
-	    String disallowedMethods = listener.getDisallowedMethodCalls();
-	    if (!disallowedMethods.equals("")) {
-	    	Assert.fail("Following VBO-related glMethods have been called: "+ disallowedMethods);
-	    }
+        String disallowedMethods = listener.getDisallowedMethodCalls();
+        if (!disallowedMethods.equals("")) {
+            Assert.fail("Following VBO-related glMethods have been called: "+ disallowedMethods);
+        }
     }
     
     @Test
@@ -127,15 +135,15 @@ public class TestAWTTextRendererUseVertexArrayBug464 extends UITestCase {
         Animator animator = new Animator(glCanvas);
 
         animator.start();
-	
-	    Thread.sleep(500); // 500 ms
-	
-	    animator.stop();
+    
+        Thread.sleep(500); // 500 ms
+    
+        animator.stop();
         
-	    String disallowedMethods = listener.getDisallowedMethodCalls();
-	    if (!disallowedMethods.equals("")) {
-	    	Assert.fail("Following VBO-related glMethods have been called: "+ disallowedMethods);
-	    }
+        String disallowedMethods = listener.getDisallowedMethodCalls();
+        if (!disallowedMethods.equals("")) {
+            Assert.fail("Following VBO-related glMethods have been called: "+ disallowedMethods);
+        }
     }
 
     public static void main(String args[]) throws IOException {
@@ -151,5 +159,5 @@ public class TestAWTTextRendererUseVertexArrayBug464 extends UITestCase {
             "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/jogl/awt/text/TextRendererGLEventListener01.java b/src/test/com/jogamp/opengl/test/junit/jogl/awt/text/TextRendererGLEventListener01.java
index b147041..c966845 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/awt/text/TextRendererGLEventListener01.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/awt/text/TextRendererGLEventListener01.java
@@ -75,9 +75,9 @@ public class TextRendererGLEventListener01 implements GLEventListener {
         Assert.assertFalse(renderer.getUseVertexArrays());
         
         text = "ABC123#+?";
-    	
-    	PrintStream nullStream = new PrintStream(new OutputStream(){ public void write(int b){}});
-    	drawable.setGL(new TextRendererTraceGL2Mock01(drawable.getGL().getGL2(), nullStream, this));
+        
+        PrintStream nullStream = new PrintStream(new OutputStream(){ public void write(int b){}});
+        drawable.setGL(new TextRendererTraceGL2Mock01(drawable.getGL().getGL2(), nullStream, this));
     }
 
     public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
@@ -90,35 +90,35 @@ public class TextRendererGLEventListener01 implements GLEventListener {
     }
 
     public void dispose(GLAutoDrawable drawable) {
-    	renderer.dispose();
+        renderer.dispose();
     }
 
     public void display(GLAutoDrawable drawable) {
         if (disallowedMethodCalls.equals("")) {
-        	if (testNumber == 1) {
-        		renderer.beginRendering(drawable.getWidth(), drawable.getHeight());
+            if (testNumber == 1) {
+                renderer.beginRendering(drawable.getWidth(), drawable.getHeight());
                 renderer.setColor(1.0f, 1.0f, 1.0f, 1.0f);
                 renderer.draw(text, 0, 0);
                 renderer.endRendering();
-        	}
-        	if (testNumber == 2) {
-        		renderer.begin3DRendering();
-        		renderer.setColor(1.0f, 1.0f, 1.0f, 1.0f);
-        		renderer.draw3D(text, 0, 0, 0, 0.002f);
-        		renderer.end3DRendering();
-        	}
+            }
+            if (testNumber == 2) {
+                renderer.begin3DRendering();
+                renderer.setColor(1.0f, 1.0f, 1.0f, 1.0f);
+                renderer.draw3D(text, 0, 0, 0, 0.002f);
+                renderer.end3DRendering();
+            }
         }
     }
     
     public void disallowedMethodCalled (String method) {
-    	if (!disallowedMethodCalls.equals("")) {
-    		disallowedMethodCalls += ", ";
-    	}
-    	disallowedMethodCalls += method;
+        if (!disallowedMethodCalls.equals("")) {
+            disallowedMethodCalls += ", ";
+        }
+        disallowedMethodCalls += method;
     }
     
     public String getDisallowedMethodCalls() {
-    	return this.disallowedMethodCalls;
+        return this.disallowedMethodCalls;
     }
 }
 
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/awt/text/TextRendererTraceGL2Mock01.java b/src/test/com/jogamp/opengl/test/junit/jogl/awt/text/TextRendererTraceGL2Mock01.java
index 63258a5..86714fc 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/awt/text/TextRendererTraceGL2Mock01.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/awt/text/TextRendererTraceGL2Mock01.java
@@ -63,75 +63,75 @@ import com.jogamp.common.nio.Buffers;
  */
 
 public class TextRendererTraceGL2Mock01 extends TraceGL2 {
-	
-	TextRendererGLEventListener01 listener;
-
-	public TextRendererTraceGL2Mock01(GL2 downstreamGL2, PrintStream stream, TextRendererGLEventListener01 listener) {
-		super(downstreamGL2, stream);
-		this.listener = listener;
-	}	
-
-	@Override
-	public void glGetBufferSubData(int arg0, long arg1, long arg2, Buffer arg3) {
-		listener.disallowedMethodCalled("glGetBufferSubData");
-	}
-
-	@Override
-	public ByteBuffer glMapBuffer(int arg0, int arg1) {
-		listener.disallowedMethodCalled("glMapBuffer");
-		return Buffers.newDirectByteBuffer(0);
-	}
-
-	@Override
-	public void glGetBufferParameteriv(int arg0, int arg1, IntBuffer arg2) {
-		listener.disallowedMethodCalled("glGetBufferParameteriv");
-	}
-
-	@Override
-	public boolean glUnmapBuffer(int arg0) {
-		listener.disallowedMethodCalled("glUnmapBuffer");
-		return false;
-	}
-	
-	@Override
-	public void glGenBuffers(int arg0, IntBuffer arg1) {
-		listener.disallowedMethodCalled("glGenBuffers");
-	}
-
-	@Override
-	public void glGenBuffers(int arg0, int[] arg1, int arg2) {
-		listener.disallowedMethodCalled("glGenBuffers");
-	}
-
-	@Override
-	public boolean glIsBuffer(int arg0) {
-		listener.disallowedMethodCalled("glIsBuffer");
-		return false;
-	}
-
-	@Override
-	public void glBindBuffer(int arg0, int arg1) {
-		listener.disallowedMethodCalled("glBindBuffer");
-	}
-
-	@Override
-	public void glDeleteBuffers(int arg0, int[] arg1, int arg2) {
-		listener.disallowedMethodCalled("glDeleteBuffers");
-	}
-
-	@Override
-	public void glBufferSubData(int arg0, long arg1, long arg2, Buffer arg3) {
-		listener.disallowedMethodCalled("glBufferSubData");
-	}
-
-	@Override
-	public void glGetBufferParameteriv(int arg0, int arg1, int[] arg2, int arg3) {
-		listener.disallowedMethodCalled("glGetBufferParameteriv");
-	}
-
-	@Override
-	public void glBufferData(int arg0, long arg1, Buffer arg2, int arg3) {
-		listener.disallowedMethodCalled("glBufferData");
-	}
+    
+    TextRendererGLEventListener01 listener;
+
+    public TextRendererTraceGL2Mock01(GL2 downstreamGL2, PrintStream stream, TextRendererGLEventListener01 listener) {
+        super(downstreamGL2, stream);
+        this.listener = listener;
+    }    
+
+    @Override
+    public void glGetBufferSubData(int arg0, long arg1, long arg2, Buffer arg3) {
+        listener.disallowedMethodCalled("glGetBufferSubData");
+    }
+
+    @Override
+    public ByteBuffer glMapBuffer(int arg0, int arg1) {
+        listener.disallowedMethodCalled("glMapBuffer");
+        return Buffers.newDirectByteBuffer(0);
+    }
+
+    @Override
+    public void glGetBufferParameteriv(int arg0, int arg1, IntBuffer arg2) {
+        listener.disallowedMethodCalled("glGetBufferParameteriv");
+    }
+
+    @Override
+    public boolean glUnmapBuffer(int arg0) {
+        listener.disallowedMethodCalled("glUnmapBuffer");
+        return false;
+    }
+    
+    @Override
+    public void glGenBuffers(int arg0, IntBuffer arg1) {
+        listener.disallowedMethodCalled("glGenBuffers");
+    }
+
+    @Override
+    public void glGenBuffers(int arg0, int[] arg1, int arg2) {
+        listener.disallowedMethodCalled("glGenBuffers");
+    }
+
+    @Override
+    public boolean glIsBuffer(int arg0) {
+        listener.disallowedMethodCalled("glIsBuffer");
+        return false;
+    }
+
+    @Override
+    public void glBindBuffer(int arg0, int arg1) {
+        listener.disallowedMethodCalled("glBindBuffer");
+    }
+
+    @Override
+    public void glDeleteBuffers(int arg0, int[] arg1, int arg2) {
+        listener.disallowedMethodCalled("glDeleteBuffers");
+    }
+
+    @Override
+    public void glBufferSubData(int arg0, long arg1, long arg2, Buffer arg3) {
+        listener.disallowedMethodCalled("glBufferSubData");
+    }
+
+    @Override
+    public void glGetBufferParameteriv(int arg0, int arg1, int[] arg2, int arg3) {
+        listener.disallowedMethodCalled("glGetBufferParameteriv");
+    }
+
+    @Override
+    public void glBufferData(int arg0, long arg1, Buffer arg2, int arg3) {
+        listener.disallowedMethodCalled("glBufferData");
+    }
 
 }
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/caps/TestMultisampleNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/caps/TestMultisampleNEWT.java
index 8285a66..1e3274d 100755
--- a/src/test/com/jogamp/opengl/test/junit/jogl/caps/TestMultisampleNEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/caps/TestMultisampleNEWT.java
@@ -80,7 +80,8 @@ public class TestMultisampleNEWT {
     }
     // turns out we need to have alpha, 
     // otherwise no AA will be visible.
-    caps.setAlphaBits(1); 
+    // This is done implicit now ..
+    // caps.setAlphaBits(1); 
 
     window = GLWindow.create(caps);
     window.setCapabilitiesChooser(chooser);
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/caps/TestTranslucencyNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/caps/TestTranslucencyNEWT.java
new file mode 100644
index 0000000..a01cb59
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/caps/TestTranslucencyNEWT.java
@@ -0,0 +1,155 @@
+/**
+ * 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.caps;
+
+import com.jogamp.newt.event.KeyAdapter;
+import com.jogamp.newt.event.KeyEvent;
+import com.jogamp.newt.opengl.GLWindow;
+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.test.junit.jogl.demos.es2.GearsES2;
+
+import javax.media.opengl.GLCapabilities;
+import javax.media.opengl.GLProfile;
+
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.AfterClass;
+import org.junit.Test;
+
+public class TestTranslucencyNEWT extends UITestCase {
+    static GLProfile glp;
+    static int width, height;
+
+    @BeforeClass
+    public static void initClass() {
+        GLProfile.initSingleton(true);
+        /*if(GLProfile.isAvailable(GLProfile.getDefaultEGLDevice(), GLProfile.GLES2)) {
+            // exact match
+            glp = GLProfile.get(GLProfile.getDefaultEGLDevice(), GLProfile.GLES2);
+        } else */ {
+            // default device, somehow ES2 compatible
+            glp = GLProfile.getGL2ES2(); 
+        }
+        Assert.assertNotNull(glp);
+        width  = 512;
+        height = 512;
+    }
+
+    @AfterClass
+    public static void releaseClass() {
+    }
+
+    protected void runTestGL(GLCapabilities caps, boolean undecorated) throws InterruptedException {
+        GLWindow glWindow = GLWindow.create(caps);
+        Assert.assertNotNull(glWindow);
+        glWindow.setTitle("Gears NEWT Test (translucent "+!caps.isBackgroundOpaque()+")");
+        glWindow.setUndecorated(undecorated);
+        glWindow.addGLEventListener(new GearsES2());
+
+        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);
+
+        final GLWindow f_glWindow = glWindow;
+        glWindow.addKeyListener(new KeyAdapter() {
+            public void keyTyped(KeyEvent e) {
+                if(e.getKeyChar()=='f') {
+                    new Thread() {
+                        public void run() {
+                            f_glWindow.setFullscreen(!f_glWindow.isFullscreen());
+                    } }.start();
+                } else if(e.getKeyChar()=='d') {
+                    new Thread() {
+                        public void run() {
+                            f_glWindow.setUndecorated(!f_glWindow.isUndecorated());
+                    } }.start();
+                }
+            }
+        });
+
+        glWindow.setSize(width, height);
+        glWindow.setVisible(true);
+        animator.setUpdateFPSFrames(1, null);
+        animator.start();
+
+        while(!quitAdapter.shouldQuit() && animator.isAnimating() && animator.getTotalFPSDuration()<duration) {
+            Thread.sleep(100);
+        }
+
+        animator.stop();
+        glWindow.destroy();
+    }
+
+    @Test
+    public void test01OpaqueDecorated() throws InterruptedException {
+        GLCapabilities caps = new GLCapabilities(glp);
+        caps.setBackgroundOpaque(true); // default
+        runTestGL(caps, false);
+    }
+
+    @Test
+    public void test01TransparentDecorated() throws InterruptedException {
+        GLCapabilities caps = new GLCapabilities(glp);
+        caps.setBackgroundOpaque(false);
+        // This is done implicit now ..
+        // caps.setAlphaBits(1); 
+        runTestGL(caps, false);
+    }
+
+    @Test
+    public void test01TransparentUndecorated() throws InterruptedException {
+        GLCapabilities caps = new GLCapabilities(glp);
+        caps.setBackgroundOpaque(false);
+        // This is done implicit now ..
+        // caps.setAlphaBits(1); 
+        runTestGL(caps, true);
+    }
+    
+    static long duration = 500; // ms
+
+    public static void main(String args[]) {
+        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(); }
+            }
+        }
+        org.junit.runner.JUnitCore.main(TestTranslucencyNEWT.class.getName());
+    }
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/GearsObject.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/GearsObject.java
new file mode 100644
index 0000000..b098e1d
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/GearsObject.java
@@ -0,0 +1,275 @@
+/**
+ * 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;
+
+import java.nio.FloatBuffer;
+
+import javax.media.opengl.GL;
+
+import com.jogamp.common.nio.Buffers;
+import com.jogamp.opengl.util.GLArrayDataServer;
+
+/**
+ * GearsObject.java <BR>
+ * @author Brian Paul (converted to Java by Ron Cemer and Sven Gothel) <P>
+ */
+public abstract class GearsObject {
+    public static final FloatBuffer red = Buffers.newDirectFloatBuffer( new float[] { 0.8f, 0.1f, 0.0f, 0.7f } );
+    public static final FloatBuffer green = Buffers.newDirectFloatBuffer( new float[] { 0.0f, 0.8f, 0.2f, 0.7f } );
+    public static final FloatBuffer blue = Buffers.newDirectFloatBuffer( new float[] { 0.2f, 0.2f, 1.0f, 0.7f } );
+    public static final float M_PI = (float)Math.PI;
+    
+    public GLArrayDataServer frontFace;
+    public GLArrayDataServer frontSide;
+    public GLArrayDataServer backFace;
+    public GLArrayDataServer backSide;
+    public GLArrayDataServer outwardFace;
+    public GLArrayDataServer insideRadiusCyl;
+    public boolean isShared;
+
+    public abstract GLArrayDataServer createInterleaved(int comps, int dataType, boolean normalized, int initialSize, int vboUsage);
+    public abstract void addInterleavedVertexAndNormalArrays(GLArrayDataServer array, int components);
+    public abstract void draw(GL gl, float x, float y, float angle, FloatBuffer color);
+    
+    public void destroy(GL gl) {
+        if(!isShared) {
+            // could be already destroyed by shared configuration
+            if(null != frontFace) {
+                frontFace.destroy(gl);
+            }
+            if(null != frontSide) {
+                frontSide.destroy(gl);
+            }
+            if(null != backFace) {
+                backFace.destroy(gl);
+            }
+            if(null != backSide) {
+                backSide.destroy(gl);
+            }
+            if(null != outwardFace) {
+                outwardFace.destroy(gl);
+            }
+            if(null != insideRadiusCyl) {
+                insideRadiusCyl.destroy(gl);
+            }
+        }
+        frontFace=null;
+        frontSide=null;
+        backFace=null;
+        backSide=null;
+        outwardFace=null;
+        insideRadiusCyl=null;            
+        isShared = false;
+    }
+    
+    public GearsObject ( GearsObject shared ) {
+        isShared = true;
+        frontFace = shared.frontFace;
+        frontSide = shared.frontSide;
+        backFace = shared.backFace;
+        backSide = shared.backSide;
+        outwardFace = shared.outwardFace;
+        insideRadiusCyl = shared.insideRadiusCyl;
+    }
+            
+    public GearsObject (
+            float inner_radius,
+            float outer_radius,
+            float width,
+            int teeth,
+            float tooth_depth)
+    {
+        final float dz = width * 0.5f; 
+        int i;
+        float r0, r1, r2;
+        float angle, da;
+        float u, v, len;
+        float s[] = new float[5];
+        float c[] = new float[5];
+        float normal[] = new float[3];
+        // final int tris_per_tooth = 32;
+
+        isShared = false;
+        
+        r0 = inner_radius;
+        r1 = outer_radius - tooth_depth / 2.0f;
+        r2 = outer_radius + tooth_depth / 2.0f;
+
+        da = 2.0f * (float) Math.PI / teeth / 4.0f;
+
+        s[4] = 0; // sin(0f)
+        c[4] = 1; // cos(0f)
+
+        frontFace = createInterleaved(6, GL.GL_FLOAT, false, 4*teeth+2, GL.GL_STATIC_DRAW);
+        addInterleavedVertexAndNormalArrays(frontFace, 3);
+        backFace = createInterleaved(6, GL.GL_FLOAT, false, 4*teeth+2, GL.GL_STATIC_DRAW);
+        addInterleavedVertexAndNormalArrays(backFace, 3);
+        frontSide = createInterleaved(6, GL.GL_FLOAT, false, 6*teeth, GL.GL_STATIC_DRAW);
+        addInterleavedVertexAndNormalArrays(frontSide, 3);
+        backSide = createInterleaved(6, GL.GL_FLOAT, false, 6*teeth, GL.GL_STATIC_DRAW);
+        addInterleavedVertexAndNormalArrays(backSide, 3);
+        outwardFace = createInterleaved(6, GL.GL_FLOAT, false, 4*4*teeth+2, GL.GL_STATIC_DRAW);
+        addInterleavedVertexAndNormalArrays(outwardFace, 3);
+        insideRadiusCyl = createInterleaved(6, GL.GL_FLOAT, false, 2*teeth+2, GL.GL_STATIC_DRAW);
+        addInterleavedVertexAndNormalArrays(insideRadiusCyl, 3);
+
+        for (i = 0; i < teeth; i++) {
+            angle = i * 2.0f * M_PI / teeth;
+            sincos(angle + da * 0f, s, 0, c, 0);
+            sincos(angle + da * 1f, s, 1, c, 1);
+            sincos(angle + da * 2f, s, 2, c, 2);
+            sincos(angle + da * 3f, s, 3, c, 3);
+            
+            /* front  */
+            normal[0] = 0.0f;
+            normal[1] = 0.0f;
+            normal[2] = 1.0f;
+            
+            /* front face - GL.GL_TRIANGLE_STRIP */
+            vert(frontFace, r0 * c[0], r0 * s[0], dz, normal);
+            vert(frontFace, r1 * c[0], r1 * s[0], dz, normal);
+            vert(frontFace, r0 * c[0], r0 * s[0], dz, normal);
+            vert(frontFace, r1 * c[3], r1 * s[3], dz, normal);
+            
+            /* front sides of teeth - GL.GL_TRIANGLES */
+            vert(frontSide, r1 * c[0], r1 * s[0], dz, normal);
+            vert(frontSide, r2 * c[1], r2 * s[1], dz, normal);        
+            vert(frontSide, r2 * c[2], r2 * s[2], dz, normal);
+            vert(frontSide, r1 * c[0], r1 * s[0], dz, normal);
+            vert(frontSide, r2 * c[2], r2 * s[2], dz, normal);        
+            vert(frontSide, r1 * c[3], r1 * s[3], dz, normal);
+            
+            /* back */
+            normal[0] = 0.0f;
+            normal[1] = 0.0f;
+            normal[2] = -1.0f;
+            
+            /* back face - GL.GL_TRIANGLE_STRIP */
+            vert(backFace, r1 * c[0], r1 * s[0], -dz, normal);
+            vert(backFace, r0 * c[0], r0 * s[0], -dz, normal);
+            vert(backFace, r1 * c[3], r1 * s[3], -dz, normal);
+            vert(backFace, r0 * c[0], r0 * s[0], -dz, normal);
+            
+            /* back sides of teeth - GL.GL_TRIANGLES*/
+            vert(backSide, r1 * c[3], r1 * s[3], -dz, normal);
+            vert(backSide, r2 * c[2], r2 * s[2], -dz, normal);
+            vert(backSide, r2 * c[1], r2 * s[1], -dz, normal);
+            vert(backSide, r1 * c[3], r1 * s[3], -dz, normal);
+            vert(backSide, r2 * c[1], r2 * s[1], -dz, normal);        
+            vert(backSide, r1 * c[0], r1 * s[0], -dz, normal);
+            
+            /* outward faces of teeth */
+            u = r2 * c[1] - r1 * c[0];
+            v = r2 * s[1] - r1 * s[0];
+            len = (float)Math.sqrt(u * u + v * v);
+            u /= len;
+            v /= len;
+            normal[0] =    v;
+            normal[1] =   -u;
+            normal[2] = 0.0f;
+
+            vert(outwardFace, r1 * c[0], r1 * s[0],  dz, normal);
+            vert(outwardFace, r1 * c[0], r1 * s[0], -dz, normal);
+            vert(outwardFace, r2 * c[1], r2 * s[1],  dz, normal);
+            vert(outwardFace, r2 * c[1], r2 * s[1], -dz, normal);
+
+            normal[0] = c[0];
+            normal[1] = s[0];
+            vert(outwardFace, r2 * c[1], r2 * s[1],  dz, normal);
+            vert(outwardFace, r2 * c[1], r2 * s[1], -dz, normal);
+            vert(outwardFace, r2 * c[2], r2 * s[2],  dz, normal);
+            vert(outwardFace, r2 * c[2], r2 * s[2], -dz, normal);
+
+            normal[0] = ( r1 * s[3] - r2 * s[2] );
+            normal[1] = ( r1 * c[3] - r2 * c[2] ) * -1.0f ;
+            vert(outwardFace, r2 * c[2], r2 * s[2],  dz, normal);
+            vert(outwardFace, r2 * c[2], r2 * s[2], -dz, normal);        
+            vert(outwardFace, r1 * c[3], r1 * s[3],  dz, normal);
+            vert(outwardFace, r1 * c[3], r1 * s[3], -dz, normal);
+
+            normal[0] = c[0];
+            normal[1] = s[0];
+            vert(outwardFace, r1 * c[3], r1 * s[3],  dz, normal);
+            vert(outwardFace, r1 * c[3], r1 * s[3], -dz, normal);
+            vert(outwardFace, r1 * c[0], r1 * s[0],  dz, normal);
+            vert(outwardFace, r1 * c[0], r1 * s[0], -dz, normal);
+            
+            /* inside radius cylinder */
+            normal[0] = c[0] * -1.0f;
+            normal[1] = s[0] * -1.0f;
+            normal[2] = 0.0f;
+            vert(insideRadiusCyl, r0 * c[0], r0 * s[0], -dz, normal);
+            vert(insideRadiusCyl, r0 * c[0], r0 * s[0],  dz, normal);
+        }
+        /* finish front face */
+        normal[0] = 0.0f;
+        normal[1] = 0.0f;
+        normal[2] = 1.0f;
+        vert(frontFace, r0 * c[4], r0 * s[4], dz, normal);
+        vert(frontFace, r1 * c[4], r1 * s[4], dz, normal);
+        frontFace.seal(true);
+        
+        /* finish back face */
+        normal[2] = -1.0f;              
+        vert(backFace, r1 * c[4], r1 * s[4], -dz, normal);
+        vert(backFace, r0 * c[4], r0 * s[4], -dz, normal);
+        backFace.seal(true);
+        
+        backSide.seal(true);
+        frontSide.seal(true);
+        
+        /* finish outward face */
+        sincos(da * 1f, s, 1, c, 1);
+        u = r2 * c[1] - r1 * c[4];
+        v = r2 * s[1] - r1 * s[4];
+        len = (float)Math.sqrt(u * u + v * v);
+        u /= len;
+        v /= len;
+        normal[0] =    v;
+        normal[1] =   -u;
+        normal[2] = 0.0f;
+        vert(outwardFace, r1 * c[4], r1 * s[4],  dz, normal);
+        vert(outwardFace, r1 * c[4], r1 * s[4], -dz, normal);        
+        outwardFace.seal(true);
+
+        /* finish inside radius cylinder */
+        normal[0] = c[4] * -1.0f;
+        normal[1] = s[4] * -1.0f;
+        normal[2] = 0.0f;
+        vert(insideRadiusCyl, r0 * c[4], r0 * s[4], -dz, normal);
+        vert(insideRadiusCyl, r0 * c[4], r0 * s[4],  dz, normal);
+        insideRadiusCyl.seal(true);
+    }
+
+    static void vert(GLArrayDataServer array, float x, float y, float z, float n[]) {
+        array.putf(x);
+        array.putf(y);
+        array.putf(z);
+        array.putf(n[0]);
+        array.putf(n[1]);
+        array.putf(n[2]);
+    }
+    
+    static void sincos(float x, float sin[], int sinIdx, float cos[], int cosIdx) {
+        sin[sinIdx] = (float) Math.sin(x);
+        cos[cosIdx] = (float) Math.cos(x);
+    }
+}
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
new file mode 100644
index 0000000..8d579ce
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es1/GearsES1.java
@@ -0,0 +1,266 @@
+/**
+ * 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.es1;
+
+import javax.media.opengl.GL;
+import javax.media.opengl.GL2ES1;
+import javax.media.opengl.GLAutoDrawable;
+import javax.media.opengl.GLEventListener;
+import javax.media.opengl.GLProfile;
+
+import com.jogamp.newt.Window;
+import com.jogamp.newt.event.KeyAdapter;
+import com.jogamp.newt.event.KeyEvent;
+import com.jogamp.newt.event.KeyListener;
+import com.jogamp.newt.event.MouseAdapter;
+import com.jogamp.newt.event.MouseEvent;
+import com.jogamp.newt.event.MouseListener;
+import com.jogamp.opengl.test.junit.jogl.demos.GearsObject;
+
+/**
+ * GearsES1.java <BR>
+ * @author Brian Paul (converted to Java by Ron Cemer and Sven Gothel) <P>
+ */
+public class GearsES1 implements GLEventListener {
+  private final float pos[] = { 5.0f, 5.0f, 10.0f, 0.0f };
+
+  private float view_rotx = 20.0f, view_roty = 30.0f, view_rotz = 0.0f;
+  private GearsObject gear1=null, gear2=null, gear3=null;
+  private float angle = 0.0f;
+  private int swapInterval;
+  private boolean initialized = false;
+
+  private int prevMouseX, prevMouseY;
+
+  public GearsES1(int swapInterval) {
+    this.swapInterval = swapInterval;
+  }
+
+  public GearsES1() {
+    this.swapInterval = 1;
+  }
+  
+  public void setGears(GearsObject g1, GearsObject g2, GearsObject g3) {
+      gear1 = g1;
+      gear2 = g2;
+      gear3 = g3;
+  }
+
+  /**
+   * @return gear1
+   */
+  public GearsObject getGear1() { return gear1; }
+
+  /**
+   * @return gear2
+   */
+  public GearsObject getGear2() { return gear2; }
+
+  /**
+   * @return gear3
+   */
+  public GearsObject getGear3() { return gear3; }
+  
+  public void init(GLAutoDrawable drawable) {
+    System.err.println(Thread.currentThread()+" GearsES1.init ...");
+    initialized = true;
+    
+    // Use debug pipeline
+    // drawable.setGL(new DebugGL(drawable.getGL()));
+
+    GL _gl = drawable.getGL();
+    // GL2ES1 gl = FixedFuncUtil.wrapFixedFuncEmul(_gl /*, true*/);
+    GL2ES1 gl = _gl.getGL2ES1();
+    
+    System.err.println("Chosen GLCapabilities: " + drawable.getChosenGLCapabilities());
+    System.err.println("INIT GL IS: " + gl.getClass().getName());
+    System.err.println("GL_VENDOR: " + gl.glGetString(GL.GL_VENDOR));
+    System.err.println("GL_RENDERER: " + gl.glGetString(GL.GL_RENDERER));
+    System.err.println("GL_VERSION: " + gl.glGetString(GL.GL_VERSION));
+
+    gl.glLightfv(GL2ES1.GL_LIGHT0, GL2ES1.GL_POSITION, pos, 0);
+    gl.glEnable(GL.GL_CULL_FACE);
+    gl.glEnable(GL2ES1.GL_LIGHTING);
+    gl.glEnable(GL2ES1.GL_LIGHT0);
+    gl.glEnable(GL2ES1.GL_DEPTH_TEST);
+            
+    /* make the gears */
+    if(null == gear1) {
+        gear1 = new GearsObjectES1(1.0f, 4.0f, 1.0f, 20, 0.7f);
+        System.err.println("gear1 created: "+gear1);
+    } else {
+        System.err.println("gear1 reused: "+gear1);
+    }
+                
+    if(null == gear2) {
+        gear2 = new GearsObjectES1(0.5f, 2.0f, 2.0f, 10, 0.7f);
+        System.err.println("gear2 created: "+gear2);
+    } else {
+        System.err.println("gear2 reused: "+gear2);
+    }
+            
+    if(null == gear3) {
+        gear3 = new GearsObjectES1(1.3f, 2.0f, 0.5f, 10, 0.7f);
+        System.err.println("gear3 created: "+gear3);
+    } else {
+        System.err.println("gear3 reused: "+gear3);
+    }
+            
+    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;
+        window.addMouseListener(gearsMouse);
+        window.addKeyListener(gearsKeys);
+    } else if (GLProfile.isAWTAvailable() && drawable instanceof java.awt.Component) {
+        java.awt.Component comp = (java.awt.Component) drawable;
+        new com.jogamp.newt.event.awt.AWTMouseAdapter(gearsMouse).addTo(comp);
+        new com.jogamp.newt.event.awt.AWTKeyAdapter(gearsKeys).addTo(comp);
+    }
+    System.err.println(Thread.currentThread()+" GearsES1.init FIN");
+  }
+    
+  public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
+    System.err.println(Thread.currentThread()+" GearsES1.reshape "+x+"/"+y+" "+width+"x"+height+", swapInterval "+swapInterval);
+    GL2ES1 gl = drawable.getGL().getGL2ES1();
+
+    gl.setSwapInterval(swapInterval);
+
+    float h = (float)height / (float)width;
+            
+    gl.glMatrixMode(GL2ES1.GL_PROJECTION);
+
+    gl.glLoadIdentity();
+    gl.glFrustum(-1.0f, 1.0f, -h, h, 5.0f, 60.0f);
+    gl.glMatrixMode(GL2ES1.GL_MODELVIEW);
+    gl.glLoadIdentity();
+    gl.glTranslatef(0.0f, 0.0f, -40.0f);
+    System.err.println(Thread.currentThread()+" GearsES1.reshape FIN");
+  }
+
+  public void dispose(GLAutoDrawable drawable) {
+    System.err.println(Thread.currentThread()+" GearsES1.dispose ... ");
+    initialized = false;
+    GL gl = drawable.getGL();
+    gear1.destroy(gl);
+    gear1 = null;
+    gear2.destroy(gl);
+    gear2 = null;
+    gear3.destroy(gl);
+    gear3 = null;
+    System.err.println(Thread.currentThread()+" GearsES1.dispose FIN");
+  }
+
+  public void display(GLAutoDrawable drawable) {    
+    // Turn the gears' teeth
+    angle += 2.0f;
+
+    // Get the GL corresponding to the drawable we are animating
+    GL2ES1 gl = drawable.getGL().getGL2ES1();
+
+    gl.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
+
+    // Special handling for the case where the GLJPanel is translucent
+    // and wants to be composited with other Java 2D content
+    if (GLProfile.isAWTAvailable() && 
+        (drawable instanceof javax.media.opengl.awt.GLJPanel) &&
+        !((javax.media.opengl.awt.GLJPanel) drawable).isOpaque() &&
+        ((javax.media.opengl.awt.GLJPanel) drawable).shouldPreserveColorBufferIfTranslucent()) {
+      gl.glClear(GL.GL_DEPTH_BUFFER_BIT);
+    } else {
+      gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
+    }
+
+    gl.glNormal3f(0.0f, 0.0f, 1.0f);
+    
+    // Rotate the entire assembly of gears based on how the user
+    // dragged the mouse around
+    gl.glPushMatrix();
+    gl.glRotatef(view_rotx, 1.0f, 0.0f, 0.0f);
+    gl.glRotatef(view_roty, 0.0f, 1.0f, 0.0f);
+    gl.glRotatef(view_rotz, 0.0f, 0.0f, 1.0f);
+            
+    gear1.draw(gl, -3.0f, -2.0f, angle, GearsObject.red);            
+    gear2.draw(gl, 3.1f, -2.0f, -2.0f * angle - 9.0f, GearsObject.green);    
+    gear3.draw(gl, -3.1f, 4.2f, -2.0f * angle - 25.0f, GearsObject.blue);
+    
+    // Remember that every push needs a pop; this one is paired with
+    // rotating the entire gear assembly
+    gl.glPopMatrix();
+  }
+
+  
+  class GearsKeyAdapter extends KeyAdapter {      
+    public void keyPressed(KeyEvent e) {
+        int kc = e.getKeyCode();
+        if(KeyEvent.VK_LEFT == kc) {
+            view_roty -= 1;
+        } else if(KeyEvent.VK_RIGHT == kc) {
+            view_roty += 1;
+        } else if(KeyEvent.VK_UP == kc) {
+            view_rotx -= 1;
+        } else if(KeyEvent.VK_DOWN == kc) {
+            view_rotx += 1;
+        }
+    }
+  }
+  
+  class GearsMouseAdapter extends MouseAdapter {
+      public void mousePressed(MouseEvent e) {
+        prevMouseX = e.getX();
+        prevMouseY = e.getY();
+      }
+        
+      public void mouseReleased(MouseEvent e) {
+      }
+        
+      public void mouseDragged(MouseEvent e) {
+        int x = e.getX();
+        int y = e.getY();
+        int width=0, height=0;
+        Object source = e.getSource();
+        if(source instanceof Window) {
+            Window window = (Window) source;
+            width=window.getWidth();
+            height=window.getHeight();
+        } else if (GLProfile.isAWTAvailable() && source instanceof java.awt.Component) {
+            java.awt.Component comp = (java.awt.Component) source;
+            width=comp.getWidth();
+            height=comp.getHeight();
+        } else {
+            throw new RuntimeException("Event source neither Window nor Component: "+source);
+        }
+        float thetaY = 360.0f * ( (float)(x-prevMouseX)/(float)width);
+        float thetaX = 360.0f * ( (float)(prevMouseY-y)/(float)height);
+        
+        prevMouseX = x;
+        prevMouseY = y;
+
+        view_rotx += thetaX;
+        view_roty += thetaY;
+      }
+  }
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es1/GearsObjectES1.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es1/GearsObjectES1.java
new file mode 100644
index 0000000..1208dad
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es1/GearsObjectES1.java
@@ -0,0 +1,80 @@
+/**
+ * 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.es1;
+
+import java.nio.FloatBuffer;
+
+import javax.media.opengl.GL;
+import javax.media.opengl.GL2ES1;
+import javax.media.opengl.fixedfunc.GLPointerFunc;
+
+
+import com.jogamp.opengl.test.junit.jogl.demos.GearsObject;
+import com.jogamp.opengl.util.GLArrayDataServer;
+
+/**
+ * GearsObjectES1.java <BR>
+ * @author Brian Paul (converted to Java by Ron Cemer and Sven Gothel) <P>
+ */
+public class GearsObjectES1 extends GearsObject {
+
+    public GearsObjectES1(float inner_radius, float outer_radius, float width,
+            int teeth, float tooth_depth) {
+        super(inner_radius, outer_radius, width, teeth, tooth_depth);
+    }
+
+    @Override
+    public GLArrayDataServer createInterleaved(int comps, int dataType, boolean normalized, int initialSize, int vboUsage) {
+        return GLArrayDataServer.createFixedInterleaved(comps, dataType, normalized, initialSize, vboUsage);
+    }
+    
+    @Override
+    public void addInterleavedVertexAndNormalArrays(GLArrayDataServer array,
+            int components) {
+        array.addFixedSubArray(GLPointerFunc.GL_VERTEX_ARRAY, 3, GL.GL_ARRAY_BUFFER);
+        array.addFixedSubArray(GLPointerFunc.GL_NORMAL_ARRAY, 3, GL.GL_ARRAY_BUFFER);
+    }
+
+    private void draw(GL2ES1 gl, GLArrayDataServer array, int mode) {
+        array.enableBuffer(gl, true);
+        gl.glDrawArrays(mode, 0, array.getElementCount());
+        array.enableBuffer(gl, false);
+    }
+
+    @Override
+    public void draw(GL _gl, float x, float y, float angle, FloatBuffer color) {
+        GL2ES1 gl = _gl.getGL2ES1();        
+        gl.glPushMatrix();
+        gl.glTranslatef(x, y, 0f);
+        gl.glRotatef(angle, 0f, 0f, 1f);
+        gl.glMaterialfv(GL2ES1.GL_FRONT_AND_BACK, GL2ES1.GL_AMBIENT_AND_DIFFUSE, color);
+        
+        gl.glShadeModel(GL2ES1.GL_FLAT);
+        draw(gl, frontFace, GL.GL_TRIANGLE_STRIP);
+        draw(gl, frontSide, GL.GL_TRIANGLES);
+        draw(gl, backFace, GL.GL_TRIANGLE_STRIP);
+        draw(gl, backSide, GL.GL_TRIANGLES);
+        draw(gl, outwardFace, GL.GL_TRIANGLE_STRIP);
+        gl.glShadeModel(GL2ES1.GL_SMOOTH);          
+        draw(gl, insideRadiusCyl, GL.GL_TRIANGLE_STRIP);
+        gl.glPopMatrix();
+    }    
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es1/RedSquare.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es1/RedSquare.java
deleted file mode 100644
index eaf697a..0000000
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es1/RedSquare.java
+++ /dev/null
@@ -1,169 +0,0 @@
-package com.jogamp.opengl.test.junit.jogl.demos.es1;
-
-import com.jogamp.common.nio.Buffers;
-import java.nio.*;
-import java.util.*;
-import javax.media.opengl.*;
-import javax.media.opengl.glu.*;
-import javax.media.nativewindow.*;
-
-import com.jogamp.opengl.util.*;
-import com.jogamp.opengl.util.glsl.fixedfunc.*;
-
-public class RedSquare implements GLEventListener {
-
-    public static boolean glDebugEmu = false;
-    public static boolean glDebug = false ;
-    public static boolean glTrace = false ;
-    public static boolean oneThread = false;
-    public static boolean useAnimator = false;
-    public static int swapInterval = -1;
-
-    boolean debug = false;
-    long startTime = 0;
-    long curTime = 0;
-
-    GLU glu = null;
-
-    public RedSquare() {
-        this(false);
-    }
-
-    public RedSquare(boolean debug) {
-        this.debug = debug;
-    }
-
-    // FIXME: we must add storage of the pointers in the GL state to
-    // the GLImpl classes. The need for this can be seen by making
-    // these variables method local instead of instance members. The
-    // square will disappear after a second or so due to garbage
-    // collection. On desktop OpenGL this implies a stack of
-    // references due to the existence of glPush/PopClientAttrib. On
-    // OpenGL ES 1/2 it can simply be one set of references.
-    private FloatBuffer colors;
-    private FloatBuffer vertices;
-
-    public void init(GLAutoDrawable drawable) {
-        System.out.println("RedSquare: Init");
-        GL _gl = drawable.getGL();
-
-        if(glDebugEmu) {
-            try {
-                // Debug ..
-                _gl = _gl.getContext().setGL( GLPipelineFactory.create("javax.media.opengl.Debug", GL2ES2.class, _gl, null) );
-
-                if(glTrace) {
-                    // Trace ..
-                    _gl = _gl.getContext().setGL( GLPipelineFactory.create("javax.media.opengl.Trace", GL2ES2.class, _gl, new Object[] { System.err } ) );
-                }
-            } catch (Exception e) {e.printStackTrace();} 
-            glDebug = false;
-            glTrace = false;
-        }
-
-        GL2ES1 gl = FixedFuncUtil.getFixedFuncImpl(_gl);
-        if(swapInterval>=0) {
-            gl.setSwapInterval(swapInterval);
-        }
-
-        if(glDebug) {
-            try {
-                // Debug ..
-                gl = (GL2ES1) gl.getContext().setGL( GLPipelineFactory.create("javax.media.opengl.Debug", GL2ES1.class, gl, null) );
-            } catch (Exception e) {e.printStackTrace();} 
-        }
-
-        if(glTrace) {
-            try {
-                // Trace ..
-                gl = (GL2ES1) gl.getContext().setGL( GLPipelineFactory.create("javax.media.opengl.Trace", GL2ES1.class, gl, new Object[] { System.err } ) );
-            } catch (Exception e) {e.printStackTrace();}
-        }
-
-        glu = GLU.createGLU(gl);
-
-        if(debug) {
-            System.err.println(Thread.currentThread()+" Entering initialization");
-            System.err.println(Thread.currentThread()+" GL Profile: "+gl.getGLProfile());
-            System.err.println(Thread.currentThread()+" GL:" + gl);
-            System.err.println(Thread.currentThread()+" GL_VERSION=" + gl.glGetString(gl.GL_VERSION));
-            System.err.println(Thread.currentThread()+" GL_EXTENSIONS:");
-            System.err.println(Thread.currentThread()+"   " + gl.glGetString(gl.GL_EXTENSIONS));
-            System.err.println(Thread.currentThread()+" swapInterval: " + swapInterval + " (GL: "+gl.getSwapInterval()+")");
-            System.err.println(Thread.currentThread()+" GLU: " + glu);
-        }
-
-        // Allocate vertex arrays
-        colors   = Buffers.newDirectFloatBuffer(16);
-        vertices = Buffers.newDirectFloatBuffer(12);
-        // Fill them up
-        colors.put( 0, 1);    colors.put( 1, 0);     colors.put( 2, 0);    colors.put( 3, 1);
-        colors.put( 4, 0);    colors.put( 5, 0);     colors.put( 6, 1);    colors.put( 7, 1);
-        colors.put( 8, 1);    colors.put( 9, 0);     colors.put(10, 0);    colors.put(11, 1);
-        colors.put(12, 1);    colors.put(13, 0);     colors.put(14, 0);    colors.put(15, 1);
-        vertices.put(0, -2);  vertices.put( 1,  2);  vertices.put( 2,  0);
-        vertices.put(3,  2);  vertices.put( 4,  2);  vertices.put( 5,  0);
-        vertices.put(6, -2);  vertices.put( 7, -2);  vertices.put( 8,  0);
-        vertices.put(9,  2);  vertices.put(10, -2);  vertices.put(11,  0);
-
-        gl.glEnableClientState(gl.GL_VERTEX_ARRAY);
-        gl.glEnableClientState(gl.GL_COLOR_ARRAY);
-        gl.glVertexPointer(3, GL.GL_FLOAT, 0, vertices);
-        gl.glColorPointer(4, GL.GL_FLOAT, 0, colors);
-
-        // OpenGL Render Settings
-        gl.glClearColor(0, 0, 0, 1);
-        gl.glEnable(GL.GL_DEPTH_TEST);
-
-        startTime = System.currentTimeMillis();
-        curTime = startTime;
-    }
-
-    public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
-        System.out.println("RedSquare: Reshape");
-        GL2ES1 gl = drawable.getGL().getGL2ES1();
-        // Set location in front of camera
-        gl.glMatrixMode(gl.GL_PROJECTION);
-        gl.glLoadIdentity();
-        glu.gluPerspective(45.0f, (float)width / (float)height, 1.0f, 100.0f);
-        //gl.glOrthof(-4.0f, 4.0f, -4.0f, 4.0f, 1.0f, 100.0f);
-        //glu.gluLookAt(0, 0, -20, 0, 0, 0, 0, 1, 0);
-    }
-
-    public void display(GLAutoDrawable drawable) {
-        curTime = System.currentTimeMillis();
-        GL2ES1 gl = drawable.getGL().getGL2ES1();
-        gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
-
-        // One rotation every four seconds
-        gl.glMatrixMode(gl.GL_MODELVIEW);
-        gl.glLoadIdentity();
-        gl.glTranslatef(0, 0, -10);
-        float ang = ((float) (curTime - startTime) * 360.0f) / 4000.0f;
-        gl.glRotatef(ang, 0, 0, 1);
-        gl.glRotatef(ang, 0, 1, 0);
-
-
-        // Draw a square
-        gl.glDrawArrays(GL.GL_TRIANGLE_STRIP, 0, 4);
-    }
-
-    public void dispose(GLAutoDrawable drawable) {
-        System.out.println("RedSquare: Dispose");
-        GL2ES1 gl = drawable.getGL().getGL2ES1();
-        if(debug) {
-            System.out.println(Thread.currentThread()+" RedSquare.dispose: "+gl.getContext());
-        }
-        gl.glDisableClientState(gl.GL_VERTEX_ARRAY);
-        gl.glDisableClientState(gl.GL_COLOR_ARRAY);
-        glu.destroy();
-        glu = null;
-        colors.clear();
-        colors   = null;
-        vertices.clear();
-        vertices = null;
-        if(debug) {
-            System.out.println(Thread.currentThread()+" RedSquare.dispose: FIN");
-        }
-    }
-}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es1/RedSquareES1.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es1/RedSquareES1.java
new file mode 100644
index 0000000..8d1c708
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es1/RedSquareES1.java
@@ -0,0 +1,162 @@
+package com.jogamp.opengl.test.junit.jogl.demos.es1;
+
+import com.jogamp.common.nio.Buffers;
+import java.nio.*;
+import javax.media.opengl.*;
+import javax.media.opengl.fixedfunc.GLMatrixFunc;
+import javax.media.opengl.fixedfunc.GLPointerFunc;
+
+import com.jogamp.opengl.util.glsl.fixedfunc.*;
+
+public class RedSquareES1 implements GLEventListener {
+
+    public static boolean glDebugEmu = false;
+    public static boolean glDebug = false ;
+    public static boolean glTrace = false ;
+    public static boolean oneThread = false;
+    public static boolean useAnimator = false;
+    private int swapInterval = 0;
+
+    long startTime = 0;
+    long curTime = 0;
+
+    public RedSquareES1(int swapInterval) {
+        this.swapInterval = swapInterval;
+    }
+
+    public RedSquareES1() {
+        this.swapInterval = 1;
+    }
+    
+    // FIXME: we must add storage of the pointers in the GL state to
+    // the GLImpl classes. The need for this can be seen by making
+    // these variables method local instead of instance members. The
+    // square will disappear after a second or so due to garbage
+    // collection. On desktop OpenGL this implies a stack of
+    // references due to the existence of glPush/PopClientAttrib. On
+    // OpenGL ES 1/2 it can simply be one set of references.
+    private FloatBuffer colors;
+    private FloatBuffer vertices;
+
+    public void init(GLAutoDrawable drawable) {
+        System.err.println(Thread.currentThread()+" RedSquareES1.init ...");
+        GL _gl = drawable.getGL();
+
+        if(glDebugEmu) {
+            try {
+                // Debug ..
+                _gl = _gl.getContext().setGL( GLPipelineFactory.create("javax.media.opengl.Debug", GL2ES2.class, _gl, null) );
+
+                if(glTrace) {
+                    // Trace ..
+                    _gl = _gl.getContext().setGL( GLPipelineFactory.create("javax.media.opengl.Trace", GL2ES2.class, _gl, new Object[] { System.err } ) );
+                }
+            } catch (Exception e) {e.printStackTrace();} 
+            glDebug = false;
+            glTrace = false;
+        }
+
+        GL2ES1 gl = FixedFuncUtil.wrapFixedFuncEmul(_gl);
+        if(glDebug) {
+            try {
+                // Debug ..
+                gl = (GL2ES1) gl.getContext().setGL( GLPipelineFactory.create("javax.media.opengl.Debug", GL2ES1.class, gl, null) );
+            } catch (Exception e) {e.printStackTrace();} 
+        }
+
+        if(glTrace) {
+            try {
+                // Trace ..
+                gl = (GL2ES1) gl.getContext().setGL( GLPipelineFactory.create("javax.media.opengl.Trace", GL2ES1.class, gl, new Object[] { System.err } ) );
+            } catch (Exception e) {e.printStackTrace();}
+        }
+
+        System.err.println(Thread.currentThread()+"Chosen GLCapabilities: " + drawable.getChosenGLCapabilities());
+        System.err.println(Thread.currentThread()+"INIT GL IS: " + gl.getClass().getName());
+        System.err.println(Thread.currentThread()+"GL_VENDOR: " + gl.glGetString(GL.GL_VENDOR));
+        System.err.println(Thread.currentThread()+"GL_RENDERER: " + gl.glGetString(GL.GL_RENDERER));
+        System.err.println(Thread.currentThread()+"GL_VERSION: " + gl.glGetString(GL.GL_VERSION));
+        
+        System.err.println(Thread.currentThread()+" GL Profile: "+gl.getGLProfile());
+        System.err.println(Thread.currentThread()+" GL:" + gl);
+        System.err.println(Thread.currentThread()+" GL_VERSION=" + gl.glGetString(GL.GL_VERSION));
+
+        // Allocate vertex arrays
+        colors   = Buffers.newDirectFloatBuffer(16);
+        vertices = Buffers.newDirectFloatBuffer(12);
+        // Fill them up
+        colors.put( 0, 1);    colors.put( 1, 0);     colors.put( 2, 0);    colors.put( 3, 1);
+        colors.put( 4, 0);    colors.put( 5, 0);     colors.put( 6, 1);    colors.put( 7, 1);
+        colors.put( 8, 1);    colors.put( 9, 0);     colors.put(10, 0);    colors.put(11, 1);
+        colors.put(12, 1);    colors.put(13, 0);     colors.put(14, 0);    colors.put(15, 1);
+        vertices.put(0, -2);  vertices.put( 1,  2);  vertices.put( 2,  0);
+        vertices.put(3,  2);  vertices.put( 4,  2);  vertices.put( 5,  0);
+        vertices.put(6, -2);  vertices.put( 7, -2);  vertices.put( 8,  0);
+        vertices.put(9,  2);  vertices.put(10, -2);  vertices.put(11,  0);
+
+        gl.glVertexPointer(3, GL.GL_FLOAT, 0, vertices);
+        gl.glColorPointer(4, GL.GL_FLOAT, 0, colors);
+
+        // OpenGL Render Settings
+        gl.glClearColor(0, 0, 0, 1);
+        gl.glEnable(GL.GL_DEPTH_TEST);
+
+        startTime = System.currentTimeMillis();
+        curTime = startTime;
+        System.err.println(Thread.currentThread()+" RedSquareES1.init FIN");
+    }
+
+    public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
+        System.err.println(Thread.currentThread()+" RedSquareES1.reshape "+x+"/"+y+" "+width+"x"+height+", swapInterval "+swapInterval);
+        GL2ES1 gl = drawable.getGL().getGL2ES1();
+        gl.setSwapInterval(swapInterval);
+        
+        // Set location in front of camera
+        gl.glMatrixMode(GLMatrixFunc.GL_PROJECTION);
+        gl.glLoadIdentity();
+        gluPerspective(gl, 45.0f, (float)width / (float)height, 1.0f, 100.0f);
+        // gl.glOrthof(-4.0f, 4.0f, -4.0f, 4.0f, 1.0f, 100.0f);
+        System.err.println(Thread.currentThread()+" RedSquareES1.reshape FIN");
+    }
+    
+    void gluPerspective(GL2ES1 gl, final float fovy, final float aspect, final float zNear, final float zFar) {
+      float top=(float)Math.tan(fovy*((float)Math.PI)/360.0f)*zNear;
+      float bottom=-1.0f*top;
+      float left=aspect*bottom;
+      float right=aspect*top;
+      gl.glFrustumf(left, right, bottom, top, zNear, zFar);        
+    }
+
+    public void display(GLAutoDrawable drawable) {
+        curTime = System.currentTimeMillis();
+        GL2ES1 gl = drawable.getGL().getGL2ES1();
+        gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
+
+        // One rotation every four seconds
+        gl.glMatrixMode(GLMatrixFunc.GL_MODELVIEW);
+        gl.glLoadIdentity();
+        gl.glTranslatef(0, 0, -10);
+        float ang = ((float) (curTime - startTime) * 360.0f) / 4000.0f;
+        gl.glRotatef(ang, 0, 0, 1);
+        gl.glRotatef(ang, 0, 1, 0);
+
+        // Draw a square
+        gl.glEnableClientState(GLPointerFunc.GL_VERTEX_ARRAY);
+        gl.glEnableClientState(GLPointerFunc.GL_COLOR_ARRAY);
+        gl.glDrawArrays(GL.GL_TRIANGLE_STRIP, 0, 4);
+        gl.glDisableClientState(GLPointerFunc.GL_VERTEX_ARRAY);
+        gl.glDisableClientState(GLPointerFunc.GL_COLOR_ARRAY);
+    }
+
+    public void dispose(GLAutoDrawable drawable) {
+        System.err.println(Thread.currentThread()+" RedSquareES1.dispose ... ");
+        GL2ES1 gl = drawable.getGL().getGL2ES1();
+        gl.glDisableClientState(GLPointerFunc.GL_VERTEX_ARRAY);
+        gl.glDisableClientState(GLPointerFunc.GL_COLOR_ARRAY);
+        colors.clear();
+        colors   = null;
+        vertices.clear();
+        vertices = null;
+        System.err.println(Thread.currentThread()+" RedSquareES1.dispose FIN");
+    }
+}
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
new file mode 100644
index 0000000..86f63cb
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es1/newt/TestGearsES1NEWT.java
@@ -0,0 +1,136 @@
+/**
+ * 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.demos.es1.newt;
+
+import com.jogamp.newt.event.KeyAdapter;
+import com.jogamp.newt.event.KeyEvent;
+import com.jogamp.newt.opengl.GLWindow;
+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.test.junit.jogl.demos.es1.GearsES1;
+
+import javax.media.opengl.GLCapabilities;
+import javax.media.opengl.GLProfile;
+
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.AfterClass;
+import org.junit.Test;
+
+public class TestGearsES1NEWT extends UITestCase {
+    static GLProfile glp;
+    static int width, height;
+
+    @BeforeClass
+    public static void initClass() {
+        GLProfile.initSingleton(true);
+        /* if(GLProfile.isAvailable(GLProfile.getDefaultEGLDevice(), GLProfile.GLES1)) {
+            // exact match
+            glp = GLProfile.get(GLProfile.getDefaultEGLDevice(), GLProfile.GLES1);
+        } else */ {
+            // default device, somehow ES1 compatible
+            glp = GLProfile.getGL2ES1(); 
+        }
+        Assert.assertNotNull(glp);
+        width  = 512;
+        height = 512;
+    }
+
+    @AfterClass
+    public static void releaseClass() {
+    }
+
+    protected void runTestGL(GLCapabilities caps) throws InterruptedException {
+        GLWindow glWindow = GLWindow.create(caps);
+        Assert.assertNotNull(glWindow);
+        glWindow.setTitle("Gears NEWT Test");
+
+        glWindow.addGLEventListener(new GearsES1());
+
+        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);
+
+        final GLWindow f_glWindow = glWindow;
+        glWindow.addKeyListener(new KeyAdapter() {
+            public void keyTyped(KeyEvent e) {
+                if(e.getKeyChar()=='f') {
+                    new Thread() {
+                        public void run() {
+                            f_glWindow.setFullscreen(!f_glWindow.isFullscreen());
+                    } }.start();
+                } else if(e.getKeyChar()=='d') {
+                    new Thread() {
+                        public void run() {
+                            f_glWindow.setUndecorated(!f_glWindow.isUndecorated());
+                    } }.start();
+                }
+            }
+        });
+
+        glWindow.setSize(width, height);
+        glWindow.setVisible(true);
+        animator.setUpdateFPSFrames(1, null);
+        animator.start();
+
+        while(!quitAdapter.shouldQuit() && animator.isAnimating() && animator.getTotalFPSDuration()<duration) {
+            Thread.sleep(100);
+        }
+
+        animator.stop();
+        glWindow.destroy();
+    }
+
+    @Test
+    public void test01() throws InterruptedException {
+        GLCapabilities caps = new GLCapabilities(glp);
+        runTestGL(caps);
+    }
+
+    static long duration = 500; // ms
+
+    public static void main(String args[]) {
+        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(); }
+            }
+        }
+        org.junit.runner.JUnitCore.main(TestGearsES1NEWT.class.getName());
+    }
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es1/newt/TestRedSquareES1NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es1/newt/TestRedSquareES1NEWT.java
new file mode 100644
index 0000000..e73be50
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es1/newt/TestRedSquareES1NEWT.java
@@ -0,0 +1,136 @@
+/**
+ * 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.demos.es1.newt;
+
+import com.jogamp.newt.event.KeyAdapter;
+import com.jogamp.newt.event.KeyEvent;
+import com.jogamp.newt.opengl.GLWindow;
+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.test.junit.jogl.demos.es1.RedSquareES1;
+
+import javax.media.opengl.GLCapabilities;
+import javax.media.opengl.GLProfile;
+
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.AfterClass;
+import org.junit.Test;
+
+public class TestRedSquareES1NEWT extends UITestCase {
+    static GLProfile glp;
+    static int width, height;
+
+    @BeforeClass
+    public static void initClass() {
+        GLProfile.initSingleton(true);
+        /* if(GLProfile.isAvailable(GLProfile.getDefaultEGLDevice(), GLProfile.GLES1)) {
+            // exact match
+            glp = GLProfile.get(GLProfile.getDefaultEGLDevice(), GLProfile.GLES1);
+        } else */ {
+            // default device, somehow ES1 compatible
+            glp = GLProfile.getGL2ES1(); 
+        }
+        Assert.assertNotNull(glp);
+        width  = 512;
+        height = 512;
+    }
+
+    @AfterClass
+    public static void releaseClass() {
+    }
+
+    protected void runTestGL(GLCapabilities caps) throws InterruptedException {
+        GLWindow glWindow = GLWindow.create(caps);
+        Assert.assertNotNull(glWindow);
+        glWindow.setTitle("Gears NEWT Test");
+
+        glWindow.addGLEventListener(new RedSquareES1());
+
+        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);
+
+        final GLWindow f_glWindow = glWindow;
+        glWindow.addKeyListener(new KeyAdapter() {
+            public void keyTyped(KeyEvent e) {
+                if(e.getKeyChar()=='f') {
+                    new Thread() {
+                        public void run() {
+                            f_glWindow.setFullscreen(!f_glWindow.isFullscreen());
+                    } }.start();
+                } else if(e.getKeyChar()=='d') {
+                    new Thread() {
+                        public void run() {
+                            f_glWindow.setUndecorated(!f_glWindow.isUndecorated());
+                    } }.start();
+                }
+            }
+        });
+
+        glWindow.setSize(width, height);
+        glWindow.setVisible(true);
+        animator.setUpdateFPSFrames(1, null);
+        animator.start();
+
+        while(!quitAdapter.shouldQuit() && animator.isAnimating() && animator.getTotalFPSDuration()<duration) {
+            Thread.sleep(100);
+        }
+
+        animator.stop();
+        glWindow.destroy();
+    }
+
+    @Test
+    public void test01() throws InterruptedException {
+        GLCapabilities caps = new GLCapabilities(glp);
+        runTestGL(caps);
+    }
+
+    static long duration = 500; // ms
+
+    public static void main(String args[]) {
+        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(); }
+            }
+        }
+        org.junit.runner.JUnitCore.main(TestRedSquareES1NEWT.class.getName());
+    }
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/ElektronenMultiplizierer.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/ElektronenMultiplizierer.java
new file mode 100644
index 0000000..52a98fd
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/ElektronenMultiplizierer.java
@@ -0,0 +1,538 @@
+/**
+ * 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.demos.es2;
+
+import static javax.media.opengl.GL.*;
+
+import java.nio.FloatBuffer;
+
+import javax.media.opengl.GL;
+import javax.media.opengl.GL2ES2;
+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 javax.media.opengl.GLUniformData;
+
+import com.jogamp.common.nio.Buffers;
+import com.jogamp.newt.event.KeyAdapter;
+import com.jogamp.newt.event.KeyEvent;
+import com.jogamp.newt.opengl.GLWindow;
+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;
+
+/**
+ * <pre>
+ *   __ __|_  ___________________________________________________________________________  ___|__ __
+ *  //    /\                                           _                                  /\    \\  
+ * //____/  \__     __ _____ _____ _____ _____ _____  | |     __ _____ _____ __        __/  \____\\ 
+ *  \    \  / /  __|  |     |   __|  _  |     |  _  | | |  __|  |     |   __|  |      /\ \  /    /  
+ *   \____\/_/  |  |  |  |  |  |  |     | | | |   __| | | |  |  |  |  |  |  |  |__   "  \_\/____/   
+ *  /\    \     |_____|_____|_____|__|__|_|_|_|__|    | | |_____|_____|_____|_____|  _  /    /\     
+ * /  \____\                       http://jogamp.org  |_|                              /____/  \    
+ * \  /   "' _________________________________________________________________________ `"   \  /    
+ *  \/____.                                                                             .____\/
+ * </pre>     
+ *
+ * <p>
+ * JOGL2 port of my PC 4k intro competition entry for Revision 2011. Sure it got a little bigger 
+ * while porting but the shader and control code remained more or less untouched. The intro renders
+ * a fullscreen billboard using a single fragment shader. The shader encapsulates basically two 
+ * different routines: A sphere-tracing based raymarcher for a single fractal formula and a bitmap
+ * orbit trap julia+mandelbrot fractal renderer. Additionally an inline-processing analog-distortion
+ * filter is applied to all rendered fragments to make the overall look more interesting.
+ * </p>
+ *
+ * <p>
+ * The different intro parts are all parameter variations of the two routines in the fragment shader 
+ * synched to the music: Parts 3+5 are obviously the mandelbrot and julia bitmap orbit traps, and parts
+ * 1,2,4 and 6 are pure fractal sphere tracing.
+ * </p>
+ *
+ * <p>
+ * During the development of the intro it turned out that perfectly raymarching every pixel of the orbit
+ * trapped julia+mandelbrot fractal was way to slow even on highend hardware. So I inserted a lowres 
+ * intermediate FBO to be used by the bitmap based orbit trap routine wich was ofcourse way faster, but
+ * had the obvious upscaling artefacts. Maybe I'll produce a perfect quality version for very patient 
+ * people with insane hardware :)
+ * </p>
+ *
+ * <p>
+ * Papers and articles you should be familiar with before trying to understand the code:
+ * </p>
+ *
+ * <p>
+ * <ul>
+ * <li>Distance rendering for fractals: http://www.iquilezles.org/www/articles/distancefractals/distancefractals.htm</li>
+ * <li>Geometric orbit traps: http://www.iquilezles.org/www/articles/ftrapsgeometric/ftrapsgeometric.htm</li>
+ * <li>Bitmap orbit traps: http://www.iquilezles.org/www/articles/ftrapsbitmap/ftrapsbitmap.htm</li>
+ * <li>Ambient occlusion techniques: http://www.iquilezles.org/www/articles/ao/ao.htm</li>
+ * <li>Sphere tracing: A geometric method for the antialiased ray tracing of implicit surfaces: http://graphics.cs.uiuc.edu/~jch/papers/zeno.pdf</li>
+ * <li>Rendering fractals with distance estimation function: http://www.iquilezles.org/www/articles/mandelbulb/mandelbulb.htm</li>
+ * </ul>
+ * </p>
+ *
+ * <p>
+ * <ul>
+ * <li>For an impression how this routine looks like see here: http://www.youtube.com/watch?v=lvC8maVHh8Q</li>
+ * <li>Original release from the Revision can be found here: http://www.pouet.net/prod.php?which=56860</li>
+ * </ul>
+ * </p>
+ *
+ * <p>
+ * http://www.youtube.com/user/DemoscenePassivist
+ * </p>
+ *
+ * @author Dominik Ströhlein (DemoscenePassivist)
+ */
+public class ElektronenMultiplizierer implements GLEventListener {
+
+//BEGIN --- BaseGlobalEnvironment replacement ---
+
+    private final GLCapabilities mCaps; 
+    // private final GLU mGlu;
+
+    private String      mCommandLineParameter_BaseRoutineClassName;
+    private boolean     mCommandLineParameter_MultiSampling;
+    private int         mCommandLineParameter_NumberOfSampleBuffers;
+    private boolean     mCommandLineParameter_AnisotropicFiltering;
+    private float       mCommandLineParameter_AnisotropyLevel;
+    private boolean     mCommandLineParameter_FrameCapture;
+    private boolean     mCommandLineParameter_FrameSkip;
+    private boolean     mUsesFullScreenMode;
+    private int         mFrameCounter;
+    private int         mCommandLineParameter_FrameRate;
+    private long        mFrameSkipAverageFramerateTimeStart;
+    private long        mFrameSkipAverageFramerateTimeEnd; 
+    private boolean     mFrameSkipManual;
+    // private int         mSkippedFramesCounter;
+//    private BaseMusic mBaseMusic;
+    boolean             mMusicSyncStartTimeInitialized = false;
+
+    private ShaderState st;
+    private PMVMatrix pmvMatrix;
+    private GLUniformData pmvMatrixUniform;
+    private GLUniformData mScreenDimensionUniform;
+    private GLArrayDataServer vertices0;
+    // private GLArrayDataServer texCoords0;
+    
+    public String   getBaseRoutineClassName()       { return mCommandLineParameter_BaseRoutineClassName; }
+    public boolean  preferMultiSampling()           { return mCommandLineParameter_MultiSampling; }
+    public int      getNumberOfSamplingBuffers()    { return mCommandLineParameter_NumberOfSampleBuffers; }
+    public boolean  preferAnisotropicFiltering()    { return mCommandLineParameter_AnisotropicFiltering; }
+    public float    getAnisotropyLevel()            { return mCommandLineParameter_AnisotropyLevel; }
+    public boolean  wantsFrameCapture()             { return mCommandLineParameter_FrameCapture; }
+    public int      getDesiredFramerate()           { return mCommandLineParameter_FrameRate; }
+    public boolean  wantsFrameSkip()                { return mCommandLineParameter_FrameSkip; }
+    public boolean  usesFullScreenMode()            { return mUsesFullScreenMode; }
+
+    class TimeShiftKeys extends KeyAdapter {
+        public void keyPressed(KeyEvent e) {
+            if(KeyEvent.VK_RIGHT == e.getKeyCode()) {
+                skipFrames(120);
+            } else if(KeyEvent.VK_LEFT == e.getKeyCode()) {
+                skipFrames(-120);
+            }                
+        }    
+    }
+    TimeShiftKeys timeShiftKeys;
+    
+    public ElektronenMultiplizierer (
+            String inBaseRoutineClassName,
+            boolean inMultiSampling,
+            int inNumberOfSampleBuffers,
+            boolean inAnisotropicFiltering,
+            float inAnisotropyLevel,
+            boolean inFrameCapture,
+            boolean inFrameSkip, int desiredFrameRate, int startFrame
+    ) {
+        // mGlu = new GLU();
+        mCommandLineParameter_BaseRoutineClassName = inBaseRoutineClassName;
+        mCommandLineParameter_MultiSampling = inMultiSampling;
+        mCommandLineParameter_NumberOfSampleBuffers = (inNumberOfSampleBuffers==-1) ? 2 : inNumberOfSampleBuffers;
+        mCommandLineParameter_AnisotropicFiltering = inAnisotropicFiltering;
+        mCommandLineParameter_AnisotropyLevel = (inAnisotropyLevel==-1.0f) ? 2.0f : inAnisotropyLevel;
+        mCommandLineParameter_FrameCapture = inFrameCapture;
+        mCommandLineParameter_FrameSkip = inFrameSkip;
+        mCommandLineParameter_FrameRate = desiredFrameRate;
+        mCaps = new GLCapabilities(GLProfile.get(GLProfile.GL2ES2));
+        if (preferMultiSampling()) {
+            // enable/configure multisampling support ...
+            mCaps.setSampleBuffers(true);
+            mCaps.setNumSamples(getNumberOfSamplingBuffers());
+            mCaps.setAccumAlphaBits(1);
+            mCaps.setAccumBlueBits(1);
+            mCaps.setAccumGreenBits(1);
+            mCaps.setAccumRedBits(1);
+            // turns out we need to have alpha, otherwise no AA will be visible
+            mCaps.setAlphaBits(1); 
+        }
+        
+        mFrameSkipAverageFramerateTimeStart = 0;
+        mFrameCounter = 0;        
+        skipFrames(startFrame);
+        timeShiftKeys = new TimeShiftKeys();
+    }
+    
+    public ElektronenMultiplizierer() {
+        this(null, false, -1, false, -1.0f, false, true, 30, 0);        
+    }
+    
+    /**
+     * skip frames by turning back start time
+     * @param frames positive or negative values 
+     */
+    public void skipFrames(int frames) {
+        final long dft = 1000000000/mCommandLineParameter_FrameRate;
+        mFrameSkipAverageFramerateTimeStart -= frames * dft ;
+        mFrameSkipManual = true;
+    }
+    
+    public GLCapabilitiesImmutable getGLCapabilities() {
+        return mCaps;
+    }
+
+    public void init(GLAutoDrawable drawable) {
+        if(drawable instanceof GLWindow) {
+            final GLWindow glw = (GLWindow) drawable;
+            glw.addKeyListener(0, timeShiftKeys);
+        }
+        GL2ES2 gl = drawable.getGL().getGL2ES2();
+        gl.setSwapInterval(1);
+
+        st = new ShaderState();        
+        final ShaderCode vp0 = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, 1, this.getClass(),
+                "shader", "shader/bin", "default");
+        final ShaderCode fp0 = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, 1, this.getClass(),
+                "shader", "shader/bin", "elektronenmultiplizierer_development");
+          //    "shader", "shader/bin", "elektronenmultiplizierer_port");
+        final ShaderProgram sp0 = new ShaderProgram();
+        sp0.add(gl, vp0, System.err);
+        sp0.add(gl, fp0, System.err);       
+        st.attachShaderProgram(gl, sp0);
+        st.useProgram(gl, true);
+                
+        final float XRESf = (float) drawable.getWidth();
+        final float YRESf = (float) drawable.getHeight();
+
+        mScreenDimensionUniform = new GLUniformData("resolution", 2, Buffers.newDirectFloatBuffer(2));
+        final FloatBuffer mScreenDimensionV = (FloatBuffer) mScreenDimensionUniform.getBuffer();
+        mScreenDimensionV.put(0, XRESf);
+        mScreenDimensionV.put(1, YRESf);
+        st.ownUniform(mScreenDimensionUniform);       
+        st.uniform(gl, mScreenDimensionUniform);        
+        
+        pmvMatrix = new PMVMatrix();
+        pmvMatrixUniform = new GLUniformData("gcu_PMVMatrix", 4, 4, pmvMatrix.glGetPMvMatrixf());
+        st.ownUniform(pmvMatrixUniform);
+        st.uniform(gl, pmvMatrixUniform);
+                 
+        vertices0 = GLArrayDataServer.createGLSL("gca_Vertices", 2, GL.GL_FLOAT, false, 4, GL.GL_STATIC_DRAW);
+        vertices0.putf(0);     vertices0.putf(YRESf);
+        vertices0.putf(XRESf); vertices0.putf(YRESf);
+        vertices0.putf(0);     vertices0.putf(0);
+        vertices0.putf(XRESf); vertices0.putf(0);
+        vertices0.seal(gl, true);        
+        st.ownAttribute(vertices0, true);
+        vertices0.enableBuffer(gl, false);
+        
+        /**
+        texCoords0 = GLArrayDataServer.createGLSL("gca_TexCoords", 2, GL.GL_FLOAT, false, 4, GL.GL_STATIC_DRAW);
+        texCoords0.putf(0f); texCoords0.putf(1f);
+        texCoords0.putf(1f);  texCoords0.putf(1f);
+        texCoords0.putf(0f);  texCoords0.putf(0f);        
+        texCoords0.putf(1f); texCoords0.putf(0f);
+        texCoords0.seal(gl, true);
+        st.ownAttribute(texCoords0, true);
+        texCoords0.enableBuffer(gl, false); */
+
+        //generate framebufferobject
+        int[] result = new int[1];
+        gl.glGenTextures(1, result, 0);
+        mFrameBufferTextureID = result[0];
+        gl.glBindTexture(GL_TEXTURE_2D, mFrameBufferTextureID);
+        gl.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+        gl.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+        gl.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+        gl.glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, 384, 384, 0, GL_RGBA, GL_UNSIGNED_BYTE, null);
+
+        //allocate the framebuffer object ...
+        gl.glGenFramebuffers(1, result, 0);
+        mFrameBufferObjectID = result[0];
+        gl.glBindFramebuffer(GL_FRAMEBUFFER, mFrameBufferObjectID);
+        gl.glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, mFrameBufferTextureID, 0);
+        gl.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
+        gl.glBindFramebuffer(GL_FRAMEBUFFER, 0);
+        st.uniform(gl, new GLUniformData("fb", 0));
+
+        // will be changed in display(..)
+        st.uniform(gl, new GLUniformData("en", 0));
+        st.uniform(gl, new GLUniformData("tm", 0.0f));
+        st.uniform(gl, new GLUniformData("br", 0.0f));
+        st.uniform(gl, new GLUniformData("et", 0.0f));
+
+        gl.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
+
+        // if NO music is used sync to mainloop start ...
+        // (add up current time due to possible turned back start time by skip frames)
+        mFrameSkipAverageFramerateTimeStart += System.nanoTime();
+        
+//        mBaseMusic = new BaseMusic(BaseGlobalEnvironment.getInstance().getMusicFileName());
+//        mBaseMusic.init();
+//        mBaseMusic.play();
+    }
+
+    public void display(GLAutoDrawable drawable) {
+        if (wantsFrameSkip()) {
+            mFrameSkipAverageFramerateTimeEnd = System.nanoTime();
+            double tDesiredFrameRate = (float)getDesiredFramerate();
+            double tSingleFrameTime = 1000000000.0f/tDesiredFrameRate;
+            double tElapsedTime = mFrameSkipAverageFramerateTimeEnd - mFrameSkipAverageFramerateTimeStart;
+            double mFrameCounterTargetValue = tElapsedTime/tSingleFrameTime;
+            double mFrameCounterDifference = mFrameCounterTargetValue-mFrameCounter;
+            if (mFrameSkipManual || mFrameCounterDifference>2) {
+                mFrameCounter+=mFrameCounterDifference;
+                // mSkippedFramesCounter+=mFrameCounterDifference;
+            } else if (mFrameCounterDifference<-2) {
+                //hold framecounter advance ...
+                mFrameCounter--;
+            }
+            mFrameSkipManual = false;
+        }
+       
+        GL2ES2 gl = drawable.getGL().getGL2ES2();
+        
+        final int XRES = drawable.getWidth();
+        final int YRES = drawable.getHeight();
+
+//        if (!getBaseMusic().isOffline()) {
+//            //if music IS used sync to first second of music ...
+//            if (BaseRoutineRuntime.getInstance().getBaseMusic().getPositionInMilliseconds()>0 && !mMusicSyncStartTimeInitialized) {
+//                BaseLogging.getInstance().info("Synching to BaseMusic ...");
+//                mFrameSkipAverageFramerateTimeStart = (long)(System.nanoTime()-((double)BaseRoutineRuntime.getInstance().getBaseMusic().getPositionInMilliseconds()*1000000.0d));
+//                mMusicSyncStartTimeInitialized = true;
+//            }
+//        }
+        //allow music DSP's to synchronize with framerate ...
+//        mBaseMusic.synchonizeMusic();
+
+        //use this for offline rendering/capture ...
+        int MMTime_u_ms = (int)((((float)mFrameCounter)*44100.0f)/60.0f);
+        //use this for music synched rendering ...
+        //int MMTime_u_ms = (int)(BaseRoutineRuntime.getInstance().getBaseMusic().getPositionInMilliseconds()*(44100.0f/1000.0f));
+        //dedicated sync variable for each event ... kinda lame but who cares X-)
+        if (MMTime_u_ms>=522240  && !mSyncEvent_01) { mSyncEvent_01 = true; handleSyncEvent(MMTime_u_ms); }
+        if (MMTime_u_ms>=1305480 && !mSyncEvent_02) { mSyncEvent_02 = true; handleSyncEvent(MMTime_u_ms); }
+        if (MMTime_u_ms>=1827720 && !mSyncEvent_03) { mSyncEvent_03 = true; handleSyncEvent(MMTime_u_ms); }
+        if (MMTime_u_ms>=2349960 && !mSyncEvent_04) { mSyncEvent_04 = true; handleSyncEvent(MMTime_u_ms); }
+        if (MMTime_u_ms>=3394440 && !mSyncEvent_05) { mSyncEvent_05 = true; handleSyncEvent(MMTime_u_ms); }
+        if (MMTime_u_ms>=3916680 && !mSyncEvent_06) { mSyncEvent_06 = true; handleSyncEvent(MMTime_u_ms); }
+        if (MMTime_u_ms>=4438408 && !mSyncEvent_07) { mSyncEvent_07 = true; handleSyncEvent(MMTime_u_ms); }
+        if (MMTime_u_ms>=5482831 && !mSyncEvent_08) { mSyncEvent_08 = true; handleSyncEvent(MMTime_u_ms); }
+        //calculate current time based on 60fps reference framerate ...
+        MMTime_u_ms = (int)((((float)mFrameCounter)*44100.0f)/60.0f);
+        gl.glDisable(GL_CULL_FACE);
+        gl.glDisable(GL_DEPTH_TEST);
+
+        st.useProgram(gl, true);
+
+        vertices0.enableBuffer(gl, true);
+        // texCoords0.enableBuffer(gl, true);
+
+        pmvMatrix.glMatrixMode(PMVMatrix.GL_PROJECTION);
+        pmvMatrix.glLoadIdentity();
+        pmvMatrix.glOrthof(0f, XRES, YRES, 0f, -1f, 1f);
+        pmvMatrix.glMatrixMode(PMVMatrix.GL_MODELVIEW);
+        pmvMatrix.glLoadIdentity();
+        st.uniform(gl, pmvMatrixUniform);
+        
+        gl.glActiveTexture(GL_TEXTURE0);
+
+        //gogogo! O-)
+        float tBrightnessSync = 40.0f-((MMTime_u_ms-mSyncTime)/1000.0f);
+        if (tBrightnessSync<1) {
+            tBrightnessSync=1;
+        }
+        mEffectTime = (float)((MMTime_u_ms-mEffectSyncTime)/100000.0f);
+        
+        if (mSyncEventNumber==0 && mEffectTime<4.0f) {
+            //fadein and fullscreen rotate
+            tBrightnessSync = mEffectTime/4.0f;
+        } else if (mSyncEventNumber==8 && mEffectTime>12.0f) {
+             //fullscrenn mushroom transform
+             tBrightnessSync = 1.0f-((mEffectTime-12.0f)/3.5f);
+        }
+        
+        if (mSyncEventNumber==0 || mSyncEventNumber==1) {
+             //zoomin from fog
+             mEffectNumber = 3;
+             mEffectTime *= 1.75;
+             float tEffectTimeMax = 9.3f; 
+             if (mEffectTime>=tEffectTimeMax) {
+                 mEffectTime=tEffectTimeMax;
+             }
+        } else if(mSyncEventNumber==2 || mSyncEventNumber==3) {
+             //transform big after zoomin
+             mEffectNumber = 4;
+             mEffectTime *= 0.25f;
+        } else if(mSyncEventNumber==4) {
+             //mandelbrot orbit-trap zoomout
+             mEffectNumber = 1;
+             mEffectTime *= 0.0002f;
+        } else if(mSyncEventNumber==5 || mSyncEventNumber==6) {
+             //inside fractal
+             mEffectNumber = 5;
+             mEffectTime *= 0.02f;
+        } else if(mSyncEventNumber==7) {
+             //spiral orbit-trap
+             mEffectNumber = 0;
+             mEffectTime *= 0.02f;
+        } else if(mSyncEventNumber==8) {
+             //fadeout fractal
+             mEffectNumber = 6;
+             mEffectTime *= 0.364f;
+        }
+         
+        gl.glBindFramebuffer(GL_FRAMEBUFFER, mFrameBufferObjectID);
+        // gl.glViewport(0, 0, drawable.getWidth(), drawable.getHeight());                
+        GLUniformData en = st.getUniform("en");
+        if(mSyncEventNumber==7) {
+             en.setData(2);
+        }
+        if(mSyncEventNumber==4) {
+             en.setData(7);
+        } else {
+             en.setData(0);
+        }
+        st.uniform(gl, en);
+         
+        GLUniformData et = st.getUniform("et");
+        st.uniform(gl, et.setData(9.1f));
+
+        st.uniform(gl, st.getUniform("tm").setData(MMTime_u_ms/40000.0f));
+        st.uniform(gl, st.getUniform("br").setData(tBrightnessSync));
+
+        if(mSyncEventNumber==4 || mSyncEventNumber==7) {
+           //render to fbo only when using julia/mandel orbittrap ...
+           // gl.glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+           gl.glDrawArrays(GL.GL_TRIANGLE_STRIP, 0, 4);        
+        }
+        gl.glBindFramebuffer(GL_FRAMEBUFFER, 0);
+        st.uniform(gl, en.setData(mEffectNumber));
+        st.uniform(gl, et.setData(mEffectTime));
+
+        gl.glEnable(GL_TEXTURE_2D);
+        gl.glBindTexture(GL_TEXTURE_2D, mFrameBufferTextureID);
+
+        gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
+        gl.glDrawArrays(GL.GL_TRIANGLE_STRIP, 0, 4);        
+
+        vertices0.enableBuffer(gl, false);
+        // texCoords0.enableBuffer(gl, false);         
+        st.useProgram(gl, false);
+
+        //---
+        mFrameCounter++;
+    }
+
+    public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
+        GL2ES2 gl = drawable.getGL().getGL2ES2();
+        
+        st.useProgram(gl, true);
+        vertices0.seal(false);
+        vertices0.rewind();
+        vertices0.putf(0);     vertices0.putf(height);
+        vertices0.putf(width); vertices0.putf(height);
+        vertices0.putf(0);     vertices0.putf(0);
+        vertices0.putf(width); vertices0.putf(0);
+        vertices0.seal(gl, true);        
+        st.ownAttribute(vertices0, true);
+        vertices0.enableBuffer(gl, false);
+        
+        final FloatBuffer mScreenDimensionV = (FloatBuffer) mScreenDimensionUniform.getBuffer();
+        mScreenDimensionV.put(0, (float) width);
+        mScreenDimensionV.put(1, (float) height);
+        st.uniform(gl, mScreenDimensionUniform);
+
+        st.useProgram(gl, false);
+        gl.glViewport(0, 0, width, height);                
+    }
+
+    public void dispose(GLAutoDrawable drawable) {
+        GL2ES2 gl = drawable.getGL().getGL2ES2();
+        gl.glDeleteFramebuffers(1, new int[] { mFrameBufferObjectID }, 0);
+        gl.glDeleteTextures(1, new int[] { mFrameBufferTextureID }, 0);
+        st.destroy(gl);
+        if(drawable instanceof GLWindow) {
+            final GLWindow glw = (GLWindow) drawable;
+            glw.removeKeyListener(timeShiftKeys);
+        }      
+    }
+
+//    public BaseMusic getBaseMusic() {
+//        return mBaseMusic;
+//    }
+    
+    public void resetFrameCounter() {
+        mFrameCounter = 0;
+    }
+
+//END --- BaseRoutineRuntime ---
+
+    protected int mFrameBufferTextureID;
+    protected int mFrameBufferObjectID;
+    protected int mSyncTime;
+    protected int mSyncEventNumber;
+    protected float mEffectTime;
+    protected int mEffectNumber;
+    protected int mEffectSyncTime;
+
+    protected boolean mSyncEvent_01;
+    protected boolean mSyncEvent_02;
+    protected boolean mSyncEvent_03;
+    protected boolean mSyncEvent_04;
+    protected boolean mSyncEvent_05;
+    protected boolean mSyncEvent_06;
+    protected boolean mSyncEvent_07;
+    protected boolean mSyncEvent_08;
+
+    public void handleSyncEvent(int inMMTime_u_ms) {
+        mSyncTime = inMMTime_u_ms;
+        mSyncEventNumber++;
+        System.out.println("NEW SYNC EVENT! tSyncEventNumber="+mSyncEventNumber+" tSyncTime="+mSyncTime);
+        if (mSyncEventNumber==0 || mSyncEventNumber==2 || mSyncEventNumber==5 || mSyncEventNumber==8) {
+            mEffectSyncTime = inMMTime_u_ms;
+        }
+    }
+    
+}
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
new file mode 100644
index 0000000..9bff38f
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/GearsES2.java
@@ -0,0 +1,300 @@
+/**
+ * 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 com.jogamp.common.nio.Buffers;
+import com.jogamp.newt.Window;
+import com.jogamp.newt.event.KeyAdapter;
+import com.jogamp.newt.event.KeyEvent;
+import com.jogamp.newt.event.KeyListener;
+import com.jogamp.newt.event.MouseAdapter;
+import com.jogamp.newt.event.MouseEvent;
+import com.jogamp.newt.event.MouseListener;
+import com.jogamp.opengl.test.junit.jogl.demos.GearsObject;
+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 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.GLProfile;
+import javax.media.opengl.GLUniformData;
+
+/**
+ * GearsES2.java <BR>
+ * @author Brian Paul (converted to Java by Ron Cemer and Sven Gothel) <P>
+ */
+public class GearsES2 implements GLEventListener {
+    private final FloatBuffer lightPos = Buffers.newDirectFloatBuffer( new float[] { 5.0f, 5.0f, 10.0f } );
+    
+    private ShaderState st = null;
+    private PMVMatrix pmvMatrix = null;
+    private GLUniformData pmvMatrixUniform = null;
+    private GLUniformData colorU = null;
+    private float view_rotx = 20.0f, view_roty = 30.0f, view_rotz = 0.0f;
+    private GearsObjectES2 gear1=null, gear2=null, gear3=null;
+    private float angle = 0.0f;
+    private int swapInterval = 0;
+    // private MouseListener gearsMouse = new TraceMouseAdapter(new GearsMouseAdapter());
+    private MouseListener gearsMouse = new GearsMouseAdapter();    
+    private KeyListener gearsKeys = new GearsKeyAdapter();
+
+    private int prevMouseX, prevMouseY;
+
+    public GearsES2(int swapInterval) {
+        this.swapInterval = swapInterval;
+    }
+
+    public GearsES2() {
+        this.swapInterval = 1;
+    }
+
+    public void setGears(GearsObjectES2 g1, GearsObjectES2 g2, GearsObjectES2 g3) {
+        gear1 = g1;
+        gear2 = g2;
+        gear3 = g3;
+    }
+
+    /**
+     * @return gear1
+     */
+    public GearsObjectES2 getGear1() { return gear1; }
+
+    /**
+     * @return gear2
+     */
+    public GearsObjectES2 getGear2() { return gear2; }
+
+    /**
+     * @return gear3
+     */
+    public GearsObjectES2 getGear3() { return gear3; }
+
+
+    public void init(GLAutoDrawable drawable) {
+        System.err.println(Thread.currentThread()+" GearsES2.init ...");
+        GL2ES2 gl = drawable.getGL().getGL2ES2();
+
+        System.err.println("Chosen GLCapabilities: " + drawable.getChosenGLCapabilities());
+        System.err.println("INIT GL IS: " + gl.getClass().getName());
+        System.err.println("GL_VENDOR: " + gl.glGetString(GL.GL_VENDOR));
+        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();
+        st.setVerbose(true);
+        final ShaderCode vp0 = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, 1, this.getClass(),
+                "shader", "shader/bin", "gears");
+        final ShaderCode fp0 = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, 1, this.getClass(),
+                "shader", "shader/bin", "gears");
+        final ShaderProgram sp0 = new ShaderProgram();
+        sp0.add(gl, vp0, System.err);
+        sp0.add(gl, fp0, System.err);
+        st.attachShaderProgram(gl, sp0);
+        st.useProgram(gl, true);
+        // Use debug pipeline
+        // drawable.setGL(new DebugGL(drawable.getGL()));
+
+        pmvMatrix = new PMVMatrix();
+        st.attachObject("pmvMatrix", pmvMatrix);
+        pmvMatrixUniform = new GLUniformData("pmvMatrix", 4, 4, pmvMatrix.glGetPMvMvitMatrixf()); // P, Mv, Mvi and Mvit
+        st.ownUniform(pmvMatrixUniform);
+        st.uniform(gl, pmvMatrixUniform);
+
+        GLUniformData lightU = new GLUniformData("lightPos", 3, lightPos);
+        st.ownUniform(lightU);
+        st.uniform(gl, lightU);
+
+        colorU = new GLUniformData("color", 4, GearsObject.red);
+        st.ownUniform(colorU);
+        st.uniform(gl, colorU);
+
+        if(null == gear1) {
+            gear1 = new GearsObjectES2(1.0f, 4.0f, 1.0f, 20, 0.7f, pmvMatrix, pmvMatrixUniform, colorU);
+            System.err.println("gear1 created: "+gear1);
+        } else {
+            gear1 = new GearsObjectES2(gear1, pmvMatrix, pmvMatrixUniform, colorU);
+            System.err.println("gear1 reused: "+gear1);
+        }
+                    
+        if(null == gear2) {
+            gear2 = new GearsObjectES2(0.5f, 2.0f, 2.0f, 10, 0.7f, pmvMatrix, pmvMatrixUniform, colorU);
+            System.err.println("gear2 created: "+gear2);
+        } else {
+            gear2 = new GearsObjectES2(gear2, pmvMatrix, pmvMatrixUniform, colorU);
+            System.err.println("gear2 reused: "+gear2);
+        }
+                
+        if(null == gear3) {
+            gear3 = new GearsObjectES2(1.3f, 2.0f, 0.5f, 10, 0.7f, pmvMatrix, pmvMatrixUniform, colorU);
+            System.err.println("gear3 created: "+gear3);
+        } else {
+            gear3 = new GearsObjectES2(gear3, pmvMatrix, pmvMatrixUniform, colorU);
+            System.err.println("gear3 reused: "+gear3);
+        }                
+        
+        if (drawable instanceof Window) {
+            Window window = (Window) drawable;
+            window.addMouseListener(gearsMouse);
+            window.addKeyListener(gearsKeys);
+        } else if (GLProfile.isAWTAvailable() && drawable instanceof java.awt.Component) {
+            java.awt.Component comp = (java.awt.Component) drawable;
+            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);
+        GL2ES2 gl = drawable.getGL().getGL2ES2();
+
+        float h = (float)height / (float)width;
+
+        st.useProgram(gl, true);
+        pmvMatrix.glMatrixMode(PMVMatrix.GL_PROJECTION);
+        pmvMatrix.glLoadIdentity();
+        pmvMatrix.glFrustumf(-1.0f, 1.0f, -h, h, 5.0f, 60.0f);
+        pmvMatrix.glMatrixMode(PMVMatrix.GL_MODELVIEW);
+        pmvMatrix.glLoadIdentity();
+        pmvMatrix.glTranslatef(0.0f, 0.0f, -40.0f);
+        st.uniform(gl, pmvMatrixUniform);
+        st.useProgram(gl, false);
+        
+        System.err.println(Thread.currentThread()+" GearsES2.reshape FIN");
+    }
+
+    public void dispose(GLAutoDrawable drawable) {
+        System.err.println(Thread.currentThread()+" GearsES2.dispose ... ");
+        if (drawable instanceof Window) {
+            Window window = (Window) drawable;
+            window.removeMouseListener(gearsMouse);
+            window.removeKeyListener(gearsKeys);
+        }
+        GL2ES2 gl = drawable.getGL().getGL2ES2();
+        st.useProgram(gl, false);
+        gear1.destroy(gl);
+        gear1 = null;
+        gear2.destroy(gl);
+        gear2 = null;
+        gear3.destroy(gl);
+        gear3 = null;        
+        pmvMatrix = null;
+        colorU = null;        
+        st.destroy(gl);
+        st = null;
+        System.err.println(Thread.currentThread()+" GearsES2.dispose FIN");
+    }
+
+    public void display(GLAutoDrawable drawable) {
+        // Turn the gears' teeth
+        angle += 2.0f;
+
+        // Get the GL corresponding to the drawable we are animating
+        GL2ES2 gl = drawable.getGL().getGL2ES2();
+
+        gl.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
+
+        // Special handling for the case where the GLJPanel is translucent
+        // and wants to be composited with other Java 2D content
+        if (GLProfile.isAWTAvailable() && 
+            (drawable instanceof javax.media.opengl.awt.GLJPanel) &&
+            !((javax.media.opengl.awt.GLJPanel) drawable).isOpaque() &&
+            ((javax.media.opengl.awt.GLJPanel) drawable).shouldPreserveColorBufferIfTranslucent()) {
+          gl.glClear(GL.GL_DEPTH_BUFFER_BIT);
+        } else {
+          gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
+        }
+
+        st.useProgram(gl, true);
+        pmvMatrix.glPushMatrix();
+        pmvMatrix.glRotatef(view_rotx, 1.0f, 0.0f, 0.0f);
+        pmvMatrix.glRotatef(view_roty, 0.0f, 1.0f, 0.0f);
+        pmvMatrix.glRotatef(view_rotz, 0.0f, 0.0f, 1.0f);
+
+        gear1.draw(gl, -3.0f, -2.0f,  1f * angle -    0f, GearsObject.red);
+        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);
+    }
+
+    class GearsKeyAdapter extends KeyAdapter {      
+        public void keyPressed(KeyEvent e) {
+            int kc = e.getKeyCode();
+            if(KeyEvent.VK_LEFT == kc) {
+                view_roty -= 1;
+            } else if(KeyEvent.VK_RIGHT == kc) {
+                view_roty += 1;
+            } else if(KeyEvent.VK_UP == kc) {
+                view_rotx -= 1;
+            } else if(KeyEvent.VK_DOWN == kc) {
+                view_rotx += 1;
+            }
+        }
+    }
+
+    class GearsMouseAdapter extends MouseAdapter {
+        public void mousePressed(MouseEvent e) {
+            prevMouseX = e.getX();
+            prevMouseY = e.getY();
+        }
+
+        public void mouseReleased(MouseEvent e) {
+        }
+
+        public void mouseDragged(MouseEvent e) {
+            int x = e.getX();
+            int y = e.getY();
+            int width=0, height=0;
+            Object source = e.getSource();
+            if(source instanceof Window) {
+                Window window = (Window) source;
+                width=window.getWidth();
+                height=window.getHeight();
+            } else if (GLProfile.isAWTAvailable() && source instanceof java.awt.Component) {
+                java.awt.Component comp = (java.awt.Component) source;
+                width=comp.getWidth();
+                height=comp.getHeight();
+            } else {
+                throw new RuntimeException("Event source neither Window nor Component: "+source);
+            }
+            float thetaY = 360.0f * ( (float)(x-prevMouseX)/(float)width);
+            float thetaX = 360.0f * ( (float)(prevMouseY-y)/(float)height);
+
+            prevMouseX = x;
+            prevMouseY = y;
+
+            view_rotx += thetaX;
+            view_roty += thetaY;
+        }
+    }
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/GearsObjectES2.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/GearsObjectES2.java
new file mode 100644
index 0000000..82485ea
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/GearsObjectES2.java
@@ -0,0 +1,107 @@
+/**
+ * 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.GLUniformData;
+
+
+import com.jogamp.opengl.test.junit.jogl.demos.GearsObject;
+import com.jogamp.opengl.util.GLArrayDataServer;
+import com.jogamp.opengl.util.PMVMatrix;
+import com.jogamp.opengl.util.glsl.ShaderState;
+
+/**
+ * GearsObjectES2.java <BR>
+ * @author Brian Paul (converted to Java by Ron Cemer and Sven Gothel) <P>
+ */
+public class GearsObjectES2 extends GearsObject {
+    PMVMatrix pmvMatrix;
+    GLUniformData pmvMatrixUniform;
+    GLUniformData colorUniform;
+    
+    public GearsObjectES2(float inner_radius, float outer_radius, float width,
+                          int teeth, float tooth_depth,
+                          PMVMatrix pmvMatrix, 
+                          GLUniformData pmvMatrixUniform,
+                          GLUniformData colorUniform) 
+    {
+        super(inner_radius, outer_radius, width, teeth, tooth_depth);
+        this.pmvMatrix = pmvMatrix;
+        this.pmvMatrixUniform = pmvMatrixUniform;
+        this.colorUniform = colorUniform;
+    }
+
+    public GearsObjectES2(GearsObject shared,
+                          PMVMatrix pmvMatrix, 
+                          GLUniformData pmvMatrixUniform,
+                          GLUniformData colorUniform) 
+    {
+        super(shared);
+        this.pmvMatrix = pmvMatrix;
+        this.pmvMatrixUniform = pmvMatrixUniform;
+        this.colorUniform = colorUniform;
+    }
+
+    @Override
+    public GLArrayDataServer createInterleaved(int comps, int dataType, boolean normalized, int initialSize, int vboUsage) {
+        return GLArrayDataServer.createGLSLInterleaved(comps, dataType, normalized, initialSize, vboUsage);
+    }
+    
+    @Override
+    public void addInterleavedVertexAndNormalArrays(GLArrayDataServer array,
+            int components) {
+        array.addGLSLSubArray("vertices", 3, GL.GL_ARRAY_BUFFER);
+        array.addGLSLSubArray("normals", 3, GL.GL_ARRAY_BUFFER);
+    }
+
+    private void draw(GL2ES2 gl, GLArrayDataServer array, int mode) {
+        array.enableBuffer(gl, true);
+        gl.glDrawArrays(mode, 0, array.getElementCount());
+        array.enableBuffer(gl, false);
+    }
+
+    @Override
+    public void draw(GL _gl, float x, float y, float angle, FloatBuffer color) {
+        final GL2ES2 gl = _gl.getGL2ES2();
+        final ShaderState st = ShaderState.getShaderState(gl);
+        pmvMatrix.glPushMatrix();
+        pmvMatrix.glTranslatef(x, y, 0f);
+        pmvMatrix.glRotatef(angle, 0f, 0f, 1f);
+        pmvMatrix.update();
+        st.uniform(gl, pmvMatrixUniform);
+
+        colorUniform.setData(color);
+        st.uniform(gl, colorUniform);
+
+        draw(gl, frontFace, GL.GL_TRIANGLE_STRIP);
+        draw(gl, frontSide, GL.GL_TRIANGLES);
+        draw(gl, backFace, GL.GL_TRIANGLE_STRIP);
+        draw(gl, backSide, GL.GL_TRIANGLES);
+        draw(gl, outwardFace, GL.GL_TRIANGLE_STRIP);
+        draw(gl, insideRadiusCyl, GL.GL_TRIANGLE_STRIP);
+        
+        pmvMatrix.glPopMatrix();
+    }    
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/RedSquare0.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/RedSquare0.java
deleted file mode 100644
index f062a73..0000000
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/RedSquare0.java
+++ /dev/null
@@ -1,198 +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.demos.es2;
-
-import com.jogamp.common.nio.Buffers;
-import com.jogamp.opengl.util.Animator;
-import com.jogamp.opengl.util.GLArrayDataWrapper;
-import com.jogamp.opengl.util.PMVMatrix;
-import com.jogamp.opengl.test.junit.jogl.demos.es2.shader.RedSquareShader;
-import com.jogamp.opengl.test.junit.util.GLSLSimpleProgram;
-import java.io.ByteArrayOutputStream;
-import java.io.PrintStream;
-import java.nio.FloatBuffer;
-import javax.media.opengl.GL;
-import javax.media.opengl.GL2ES2;
-import javax.media.opengl.GLAutoDrawable;
-import javax.media.opengl.GLContext;
-import javax.media.opengl.GLEventListener;
-import javax.media.opengl.GLUniformData;
-import org.junit.Assert;
-
-public class RedSquare0 implements GLEventListener {
-    ByteArrayOutputStream baos = new ByteArrayOutputStream();
-    PrintStream pbaos = new PrintStream(baos);
-    GLSLSimpleProgram myShader;
-    PMVMatrix pmvMatrix;
-    int mgl_PMVMatrix;
-    GLUniformData pmvMatrixUniform;
-    int mgl_Vertex;
-    int mgl_Color;
-    long t0;
-
-    public void init(GLAutoDrawable glad) {
-        GLContext context = glad.getContext();
-        context.makeCurrent();
-        GL2ES2 gl = context.getGL().getGL2ES2();
-        myShader = GLSLSimpleProgram.create(gl, RedSquareShader.VERTEX_SHADER_TEXT, RedSquareShader.FRAGMENT_SHADER_TEXT, true);
-        gl.glUseProgram(myShader.getShaderProgram());
-        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
-        // setup mgl_PMVMatrix
-        pmvMatrix = new PMVMatrix();
-        pmvMatrix.glMatrixMode(PMVMatrix.GL_PROJECTION);
-        pmvMatrix.glLoadIdentity();
-        pmvMatrix.glMatrixMode(PMVMatrix.GL_MODELVIEW);
-        pmvMatrix.glLoadIdentity();
-        mgl_PMVMatrix = gl.glGetUniformLocation(myShader.getShaderProgram(), "mgl_PMVMatrix");
-        Assert.assertTrue(0 <= mgl_PMVMatrix);
-        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
-        pmvMatrixUniform = new GLUniformData("mgl_PMVMatrix", 4, 4, pmvMatrix.glGetPMvMatrixf());
-        pmvMatrixUniform.setLocation(mgl_PMVMatrix);
-        gl.glUniform(pmvMatrixUniform);
-        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
-        // Allocate Vertex Array
-        int components = 3;
-        int numElements = 4;
-        mgl_Vertex = gl.glGetAttribLocation(myShader.getShaderProgram(), "mgl_Vertex");
-        Assert.assertTrue(0 <= mgl_Vertex);
-        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
-        FloatBuffer buffer = Buffers.newDirectFloatBuffer(numElements * components);
-        GLArrayDataWrapper vertices = GLArrayDataWrapper.createGLSL(gl, "mgl_Vertex", 3, gl.GL_FLOAT, false, 0, buffer, -1, 0);
-        {
-            // Fill them up
-            FloatBuffer verticeb = (FloatBuffer) vertices.getBuffer();
-            verticeb.put(-2);
-            verticeb.put(2);
-            verticeb.put(0);
-            verticeb.put(2);
-            verticeb.put(2);
-            verticeb.put(0);
-            verticeb.put(-2);
-            verticeb.put(-2);
-            verticeb.put(0);
-            verticeb.put(2);
-            verticeb.put(-2);
-            verticeb.put(0);
-        }
-        buffer.flip();
-        vertices.setLocation(mgl_Vertex);
-        gl.glEnableVertexAttribArray(mgl_Vertex);
-        gl.glVertexAttribPointer(vertices);
-        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
-        // Allocate Color Array
-        components = 4;
-        numElements = 4;
-        mgl_Color = gl.glGetAttribLocation(myShader.getShaderProgram(), "mgl_Color");
-        Assert.assertTrue(0 <= mgl_Color);
-        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
-        buffer = Buffers.newDirectFloatBuffer(numElements * components);
-        GLArrayDataWrapper colors = GLArrayDataWrapper.createGLSL(gl, "mgl_Color", 4, gl.GL_FLOAT, false, 0, buffer, -1, 0);
-        {
-            // Fill them up
-            FloatBuffer colorb = (FloatBuffer) colors.getBuffer();
-            colorb.put(1);
-            colorb.put(0);
-            colorb.put(0);
-            colorb.put(1);
-            colorb.put(0);
-            colorb.put(0);
-            colorb.put(1);
-            colorb.put(1);
-            colorb.put(1);
-            colorb.put(0);
-            colorb.put(0);
-            colorb.put(1);
-            colorb.put(1);
-            colorb.put(0);
-            colorb.put(0);
-            colorb.put(1);
-        }
-        buffer.flip();
-        colors.setLocation(mgl_Color);
-        gl.glEnableVertexAttribArray(mgl_Color);
-        gl.glVertexAttribPointer(colors);
-        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
-        // OpenGL Render Settings
-        gl.glClearColor(0, 0, 0, 1);
-        gl.glEnable(GL2ES2.GL_DEPTH_TEST);
-        gl.glUseProgram(0);
-        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
-
-        t0 = System.currentTimeMillis();
-    }
-
-    public void reshape(GLAutoDrawable glad, int x, int y, int width, int height) {
-        GL2ES2 gl = glad.getGL().getGL2ES2();
-        gl.glUseProgram(myShader.getShaderProgram());
-        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
-        // 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.glOrthof(-4.0f, 4.0f, -4.0f, 4.0f, 1.0f, 100.0f);
-        gl.glUniform(pmvMatrixUniform);
-        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
-        gl.glUseProgram(0);
-        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
-    }
-
-    public void display(GLAutoDrawable glad) {
-        long t1 = System.currentTimeMillis();
-
-        GL2ES2 gl = glad.getGL().getGL2ES2();
-        gl.glUseProgram(myShader.getShaderProgram());
-        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
-        gl.glClear(gl.GL_COLOR_BUFFER_BIT | gl.GL_DEPTH_BUFFER_BIT);
-        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
-        // 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);
-        gl.glUniform(pmvMatrixUniform);
-        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
-        // Draw a square
-        gl.glDrawArrays(gl.GL_TRIANGLE_STRIP, 0, 4);
-        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
-        gl.glUseProgram(0);
-        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
-    }
-
-    public void dispose(GLAutoDrawable glad) {
-        GL2ES2 gl = glad.getGL().getGL2ES2();
-        gl.glDisableVertexAttribArray(mgl_Vertex);
-        gl.glDisableVertexAttribArray(mgl_Color);
-        myShader.release(gl);
-        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
-        pmvMatrix.destroy();
-        pmvMatrix = null;
-        System.err.println("dispose done");
-    }
-}
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
new file mode 100644
index 0000000..d06c6da
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/RedSquareES2.java
@@ -0,0 +1,211 @@
+/**
+ * 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.demos.es2;
+
+import com.jogamp.newt.event.MouseAdapter;
+import com.jogamp.newt.event.MouseEvent;
+import com.jogamp.newt.opengl.GLWindow;
+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;
+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 {
+    ShaderState st;
+    PMVMatrix pmvMatrix;
+    GLUniformData pmvMatrixUniform;
+    GLArrayDataServer vertices ;
+    GLArrayDataServer colors ;
+    long t0;
+    private int swapInterval = 0;
+    MyMouseAdapter myMouse = new MyMouseAdapter();
+    GLWindow glWindow = null;
+
+    public RedSquareES2(int swapInterval) {
+        this.swapInterval = swapInterval;
+    }
+
+    public RedSquareES2() {
+        this.swapInterval = 1;
+    }
+        
+    public void init(GLAutoDrawable glad) {
+        System.err.println(Thread.currentThread()+" RedSquareES2.init ...");
+        GL2ES2 gl = glad.getGL().getGL2ES2();
+        
+        System.err.println(Thread.currentThread()+"Chosen GLCapabilities: " + glad.getChosenGLCapabilities());
+        System.err.println(Thread.currentThread()+"INIT GL IS: " + gl.getClass().getName());
+        System.err.println(Thread.currentThread()+"GL_VENDOR: " + gl.glGetString(GL.GL_VENDOR));
+        System.err.println(Thread.currentThread()+"GL_RENDERER: " + gl.glGetString(GL.GL_RENDERER));
+        System.err.println(Thread.currentThread()+"GL_VERSION: " + gl.glGetString(GL.GL_VERSION));
+        
+        System.err.println(Thread.currentThread()+" GL Profile: "+gl.getGLProfile());
+        System.err.println(Thread.currentThread()+" GL:" + gl);
+        System.err.println(Thread.currentThread()+" GL_VERSION=" + gl.glGetString(GL.GL_VERSION));
+        
+        st = new ShaderState();
+        st.setVerbose(true);
+        final ShaderCode vp0 = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, 1, this.getClass(),
+                "shader", "shader/bin", "RedSquareShader");
+        final ShaderCode fp0 = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, 1, this.getClass(),
+                "shader", "shader/bin", "RedSquareShader");
+        final ShaderProgram sp0 = new ShaderProgram();
+        sp0.add(gl, vp0, System.err);
+        sp0.add(gl, fp0, System.err);
+        st.attachShaderProgram(gl, sp0);
+        st.useProgram(gl, true);        
+        
+        // setup mgl_PMVMatrix
+        pmvMatrix = new PMVMatrix();
+        pmvMatrix.glMatrixMode(PMVMatrix.GL_PROJECTION);
+        pmvMatrix.glLoadIdentity();
+        pmvMatrix.glMatrixMode(PMVMatrix.GL_MODELVIEW);
+        pmvMatrix.glLoadIdentity();       
+        pmvMatrixUniform = new GLUniformData("mgl_PMVMatrix", 4, 4, pmvMatrix.glGetPMvMatrixf()); // P, Mv
+        st.ownUniform(pmvMatrixUniform);
+        st.uniform(gl, pmvMatrixUniform);        
+        
+        // Allocate Vertex Array
+        vertices = GLArrayDataServer.createGLSL("mgl_Vertex", 3, GL.GL_FLOAT, false, 4, GL.GL_STATIC_DRAW);
+        vertices.putf(-2); vertices.putf( 2); vertices.putf( 0);
+        vertices.putf( 2); vertices.putf( 2); vertices.putf( 0);
+        vertices.putf(-2); vertices.putf(-2); vertices.putf( 0);
+        vertices.putf( 2); vertices.putf(-2); vertices.putf( 0);
+        vertices.seal(gl, true);
+        st.ownAttribute(vertices, true);
+        vertices.enableBuffer(gl, false);
+        
+        // Allocate Color Array
+        colors= GLArrayDataServer.createGLSL("mgl_Color", 4, GL.GL_FLOAT, false, 4, GL.GL_STATIC_DRAW);
+        colors.putf(1); colors.putf(0); colors.putf(0); colors.putf(1);
+        colors.putf(0); colors.putf(0); colors.putf(1); colors.putf(1);
+        colors.putf(1); colors.putf(0); colors.putf(0); colors.putf(1);
+        colors.putf(1); colors.putf(0); colors.putf(0); colors.putf(1);
+        colors.seal(gl, true);          
+        st.ownAttribute(colors, true);
+        colors.enableBuffer(gl, false);
+        
+        // OpenGL Render Settings
+        gl.glClearColor(0, 0, 0, 1);
+        gl.glEnable(GL2ES2.GL_DEPTH_TEST);
+        st.useProgram(gl, false);        
+
+        if (glad instanceof GLWindow) {
+            glWindow = (GLWindow) glad;
+            glWindow.addMouseListener(myMouse);
+        }
+        t0 = System.currentTimeMillis();
+        System.err.println(Thread.currentThread()+" RedSquareES2.init FIN");
+    }
+
+    public void reshape(GLAutoDrawable glad, int x, int y, int width, int height) {
+        System.err.println(Thread.currentThread()+" RedSquareES2.reshape "+x+"/"+y+" "+width+"x"+height+", swapInterval "+swapInterval);        
+        GL2ES2 gl = glad.getGL().getGL2ES2();
+        
+        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.glOrthof(-4.0f, 4.0f, -4.0f, 4.0f, 1.0f, 100.0f);
+        st.uniform(gl, pmvMatrixUniform);
+        st.useProgram(gl, false);
+        System.err.println(Thread.currentThread()+" RedSquareES2.reshape FIN");
+    }
+
+    public void display(GLAutoDrawable glad) {
+        long t1 = System.currentTimeMillis();
+
+        GL2ES2 gl = glad.getGL().getGL2ES2();
+        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);
+        st.uniform(gl, pmvMatrixUniform);        
+
+        // Draw a square
+        vertices.enableBuffer(gl, true);
+        colors.enableBuffer(gl, true);
+        gl.glDrawArrays(GL.GL_TRIANGLE_STRIP, 0, 4);
+        vertices.enableBuffer(gl, false);
+        colors.enableBuffer(gl, false);
+        st.useProgram(gl, false);
+    }
+
+    public void dispose(GLAutoDrawable glad) {
+        System.err.println(Thread.currentThread()+" RedSquareES2.dispose ... ");
+        if (null != glWindow) {
+            glWindow.removeMouseListener(myMouse);
+            glWindow = null;            
+        }
+        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.getWindow()) {
+                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/newt/TestElektronenMultipliziererNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestElektronenMultipliziererNEWT.java
new file mode 100644
index 0000000..d9cee4f
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestElektronenMultipliziererNEWT.java
@@ -0,0 +1,151 @@
+/**
+ * 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.demos.es2.newt;
+
+import com.jogamp.newt.event.KeyAdapter;
+import com.jogamp.newt.event.KeyEvent;
+import com.jogamp.newt.event.TraceWindowAdapter;
+import com.jogamp.newt.opengl.GLWindow;
+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.test.junit.jogl.demos.es2.ElektronenMultiplizierer;
+
+import javax.media.opengl.GLCapabilitiesImmutable;
+import javax.media.opengl.GLProfile;
+
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.AfterClass;
+import org.junit.Test;
+
+/**
+ * @see com.jogamp.opengl.test.junit.jogl.demos.es2.ElektronenMultiplizierer
+ * @author Dominik Ströhlein (DemoscenePassivist), et.al.
+ */
+public class TestElektronenMultipliziererNEWT extends UITestCase {
+    static final int width = 640, height = 480;
+
+    static final String tRoutineClassName = null;
+    static final boolean tMultiSampling = false;
+    static final int tNumberOfSampleBuffers = -1;
+    static final boolean tAnisotropicFiltering = false;
+    static final float tAnisotropyLevel = -1.0f;
+    static final boolean tFrameCapture = false;
+    static final boolean tFrameSkip = true;
+    static final int desiredFrameRate = 30;
+    static int startFrame = 1700;
+    static long duration = 5000; // ms
+    
+    @BeforeClass
+    public static void initClass() {
+        GLProfile.initSingleton(true);
+    }
+
+    @AfterClass
+    public static void releaseClass() {
+    }
+
+    protected void run() throws InterruptedException {
+        final ElektronenMultiplizierer demo = new ElektronenMultiplizierer(
+                tRoutineClassName,
+                tMultiSampling,tNumberOfSampleBuffers,
+                tAnisotropicFiltering,tAnisotropyLevel,
+                tFrameCapture,
+                tFrameSkip, desiredFrameRate, startFrame
+        );
+        GLCapabilitiesImmutable caps = demo.getGLCapabilities();
+        
+        GLWindow glWindow = GLWindow.create(caps);
+        Assert.assertNotNull(glWindow);
+        glWindow.setSize(width, height);
+        glWindow.setTitle("ElektronenMultiplizierer (GL2ES2/NEWT)");
+        glWindow.addGLEventListener(demo);
+
+        Animator animator = new Animator(glWindow);
+        animator.setUpdateFPSFrames(60, System.err);
+        QuitAdapter quitAdapter = new QuitAdapter();
+
+        //glWindow.addKeyListener(new TraceKeyAdapter(quitAdapter));
+        glWindow.addWindowListener(new TraceWindowAdapter(quitAdapter));
+        glWindow.addKeyListener(quitAdapter);
+        glWindow.addWindowListener(quitAdapter);
+
+        final GLWindow f_glWindow = glWindow;
+        glWindow.addKeyListener(new KeyAdapter() {
+            public void keyTyped(KeyEvent e) {
+                if(e.getKeyChar()=='f') {
+                    new Thread() {
+                        public void run() {
+                            f_glWindow.setFullscreen(!f_glWindow.isFullscreen());
+                    } }.start();
+                } else if(e.getKeyChar()=='d') {
+                    new Thread() {
+                        public void run() {
+                            f_glWindow.setUndecorated(!f_glWindow.isUndecorated());
+                    } }.start();
+                }
+            }
+        });
+
+        glWindow.setVisible(true);
+        animator.start();
+
+        while(!quitAdapter.shouldQuit() && animator.isAnimating() && animator.getTotalFPSDuration()<duration) {
+            Thread.sleep(100);
+        }
+        animator.stop();
+        glWindow.destroy();
+    }
+
+    @Test
+    public void testElektronenMultiplizierer01() throws InterruptedException {
+        run();
+    }
+
+    public static void main(String args[]) {
+        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(); }
+            }
+            if(args[i].equals("-sframe")) {
+                i++;
+                try {
+                    startFrame = Integer.parseInt(args[i]);
+                } catch (Exception ex) { ex.printStackTrace(); }
+            }
+        }
+        org.junit.runner.JUnitCore.main(TestElektronenMultipliziererNEWT.class.getName());
+    }
+}
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
new file mode 100644
index 0000000..df86b83
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestGearsES2NEWT.java
@@ -0,0 +1,174 @@
+/**
+ * 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.demos.es2.newt;
+
+import com.jogamp.newt.event.KeyAdapter;
+import com.jogamp.newt.event.KeyEvent;
+import com.jogamp.newt.opengl.GLWindow;
+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.test.junit.jogl.demos.es2.GearsES2;
+
+import javax.media.opengl.GLCapabilities;
+import javax.media.opengl.GLProfile;
+
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.AfterClass;
+import org.junit.Test;
+
+public class TestGearsES2NEWT extends UITestCase {
+    static GLProfile glp;
+    static int width, height;
+
+    @BeforeClass
+    public static void initClass() {
+        GLProfile.initSingleton(true);
+        /*if(GLProfile.isAvailable(GLProfile.getDefaultEGLDevice(), GLProfile.GLES2)) {
+            // exact match
+            glp = GLProfile.get(GLProfile.getDefaultEGLDevice(), GLProfile.GLES2);
+        } else */ {
+            // default device, somehow ES2 compatible
+            glp = GLProfile.getGL2ES2(); 
+        }
+        Assert.assertNotNull(glp);
+        width  = 512;
+        height = 512;
+    }
+
+    @AfterClass
+    public static void releaseClass() {
+    }
+
+    protected void runTestGL(GLCapabilities caps, boolean undecorated) throws InterruptedException {
+        System.err.println("requested: "+caps);
+        GLWindow glWindow = GLWindow.create(caps);
+        Assert.assertNotNull(glWindow);
+        glWindow.setTitle("Gears NEWT Test (translucent "+!caps.isBackgroundOpaque()+")");
+        glWindow.setSize(width, height);
+        glWindow.setUndecorated(undecorated);
+        glWindow.setAlwaysOnTop(alwaysOnTop);
+        glWindow.setFullscreen(fullscreen);
+        glWindow.addGLEventListener(new GearsES2());
+
+        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);
+
+        final GLWindow f_glWindow = glWindow;
+        glWindow.addKeyListener(new KeyAdapter() {
+            public void keyTyped(KeyEvent e) {
+                if(e.getKeyChar()=='f') {
+                    new Thread() {
+                        public void run() {
+                            System.err.println("[set fullscreen  pre]: "+f_glWindow.getX()+"/"+f_glWindow.getY()+" "+f_glWindow.getWidth()+"x"+f_glWindow.getHeight()+", f "+f_glWindow.isFullscreen()+", "+f_glWindow.getInsets());
+                            f_glWindow.setFullscreen(!f_glWindow.isFullscreen());
+                            System.err.println("[set fullscreen post]: "+f_glWindow.getX()+"/"+f_glWindow.getY()+" "+f_glWindow.getWidth()+"x"+f_glWindow.getHeight()+", f "+f_glWindow.isFullscreen()+", "+f_glWindow.getInsets());
+                    } }.start();
+                } else if(e.getKeyChar()=='a') {
+                    new Thread() {
+                        public void run() {
+                            System.err.println("[set alwaysontop pre]: "+f_glWindow.getX()+"/"+f_glWindow.getY()+" "+f_glWindow.getWidth()+"x"+f_glWindow.getHeight()+", a "+f_glWindow.isAlwaysOnTop()+", "+f_glWindow.getInsets());
+                            f_glWindow.setAlwaysOnTop(!f_glWindow.isAlwaysOnTop());
+                            System.err.println("[set alwaysontop post]: "+f_glWindow.getX()+"/"+f_glWindow.getY()+" "+f_glWindow.getWidth()+"x"+f_glWindow.getHeight()+", a "+f_glWindow.isAlwaysOnTop()+", "+f_glWindow.getInsets());
+                    } }.start();
+                } else if(e.getKeyChar()=='d') {
+                    new Thread() {
+                        public void run() {
+                            System.err.println("[set undecorated  pre]: "+f_glWindow.getX()+"/"+f_glWindow.getY()+" "+f_glWindow.getWidth()+"x"+f_glWindow.getHeight()+", d "+f_glWindow.isUndecorated()+", "+f_glWindow.getInsets());
+                            f_glWindow.setUndecorated(!f_glWindow.isUndecorated());
+                            System.err.println("[set undecorated post]: "+f_glWindow.getX()+"/"+f_glWindow.getY()+" "+f_glWindow.getWidth()+"x"+f_glWindow.getHeight()+", d "+f_glWindow.isUndecorated()+", "+f_glWindow.getInsets());
+                    } }.start();
+                } else if(e.getKeyChar()=='s') {
+                    new Thread() {
+                        public void run() {
+                            System.err.println("[set position  pre]: "+f_glWindow.getX()+"/"+f_glWindow.getY()+" "+f_glWindow.getWidth()+"x"+f_glWindow.getHeight()+", "+f_glWindow.getInsets());
+                            f_glWindow.setPosition(100, 100);
+                            System.err.println("[set position post]: "+f_glWindow.getX()+"/"+f_glWindow.getY()+" "+f_glWindow.getWidth()+"x"+f_glWindow.getHeight()+", "+f_glWindow.getInsets());
+                    } }.start();
+                }
+            }
+        });
+
+        glWindow.setVisible(true);
+        
+        System.err.println("size/pos: "+f_glWindow.getX()+"/"+f_glWindow.getY()+" "+f_glWindow.getWidth()+"x"+f_glWindow.getHeight()+", "+f_glWindow.getInsets());
+        System.err.println("chosen: "+glWindow.getChosenCapabilities());
+        
+        animator.setUpdateFPSFrames(1, null);
+        animator.start();
+
+        while(!quitAdapter.shouldQuit() && animator.isAnimating() && animator.getTotalFPSDuration()<duration) {
+            Thread.sleep(100);
+        }
+
+        animator.stop();
+        glWindow.destroy();
+    }
+
+    @Test
+    public void test01() throws InterruptedException {
+        GLCapabilities caps = new GLCapabilities(glp);
+        caps.setBackgroundOpaque(opaque);
+        runTestGL(caps, undecorated);
+    }
+
+    static long duration = 500; // ms
+    static boolean opaque = true;
+    static boolean undecorated = false;
+    static boolean alwaysOnTop = false;
+    static boolean fullscreen = false;
+
+    public static void main(String args[]) {
+        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("-translucent")) {
+                opaque = false;
+            } else if(args[i].equals("-undecorated")) {
+                undecorated = true;
+            } else if(args[i].equals("-atop")) {
+                alwaysOnTop = true;
+            } else if(args[i].equals("-fullscreen")) {
+                fullscreen = true;
+            }
+        }
+        org.junit.runner.JUnitCore.main(TestGearsES2NEWT.class.getName());
+    }
+}
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
new file mode 100644
index 0000000..63ec215
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestRedSquareES2NEWT.java
@@ -0,0 +1,136 @@
+/**
+ * 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.demos.es2.newt;
+
+import com.jogamp.newt.event.KeyAdapter;
+import com.jogamp.newt.event.KeyEvent;
+import com.jogamp.newt.opengl.GLWindow;
+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.test.junit.jogl.demos.es2.RedSquareES2;
+
+import javax.media.opengl.GLCapabilities;
+import javax.media.opengl.GLProfile;
+
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.AfterClass;
+import org.junit.Test;
+
+public class TestRedSquareES2NEWT extends UITestCase {
+    static GLProfile glp;
+    static int width, height;
+
+    @BeforeClass
+    public static void initClass() {
+        GLProfile.initSingleton(true);
+        /* if(GLProfile.isAvailable(GLProfile.getDefaultEGLDevice(), GLProfile.GLES1)) {
+            // exact match
+            glp = GLProfile.get(GLProfile.getDefaultEGLDevice(), GLProfile.GLES1);
+        } else */ {
+            // default device, somehow ES1 compatible
+            glp = GLProfile.getGL2ES2(); 
+        }
+        Assert.assertNotNull(glp);
+        width  = 512;
+        height = 512;
+    }
+
+    @AfterClass
+    public static void releaseClass() {
+    }
+
+    protected void runTestGL(GLCapabilities caps) throws InterruptedException {
+        GLWindow glWindow = GLWindow.create(caps);
+        Assert.assertNotNull(glWindow);
+        glWindow.setTitle("Gears NEWT Test");
+
+        glWindow.addGLEventListener(new RedSquareES2());
+
+        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);
+
+        final GLWindow f_glWindow = glWindow;
+        glWindow.addKeyListener(new KeyAdapter() {
+            public void keyTyped(KeyEvent e) {
+                if(e.getKeyChar()=='f') {
+                    new Thread() {
+                        public void run() {
+                            f_glWindow.setFullscreen(!f_glWindow.isFullscreen());
+                    } }.start();
+                } else if(e.getKeyChar()=='d') {
+                    new Thread() {
+                        public void run() {
+                            f_glWindow.setUndecorated(!f_glWindow.isUndecorated());
+                    } }.start();
+                }
+            }
+        });
+
+        glWindow.setSize(width, height);
+        glWindow.setVisible(true);
+        animator.setUpdateFPSFrames(60, System.err);
+        animator.start();
+
+        while(!quitAdapter.shouldQuit() && animator.isAnimating() && animator.getTotalFPSDuration()<duration) {
+            Thread.sleep(100);
+        }
+
+        animator.stop();
+        glWindow.destroy();
+    }
+
+    @Test
+    public void test01() throws InterruptedException {
+        GLCapabilities caps = new GLCapabilities(glp);
+        runTestGL(caps);
+    }
+
+    static long duration = 500; // ms
+
+    public static void main(String args[]) {
+        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(); }
+            }
+        }
+        org.junit.runner.JUnitCore.main(TestRedSquareES2NEWT.class.getName());
+    }
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/RedSquareShader.fp b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/RedSquareShader.fp
new file mode 100644
index 0000000..d3cfecd
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/RedSquareShader.fp
@@ -0,0 +1,23 @@
+// Copyright 2010 JogAmp Community. All rights reserved.
+
+/**
+ * AMD complains: #version must occur before any other statement in the program
+#ifdef GL_ES
+    #version 100
+#else
+    #version 110
+#endif
+ */
+
+#ifdef GL_ES
+  precision mediump float;
+  precision mediump int;
+#endif
+
+varying   vec4    frontColor;
+
+void main (void)
+{
+    gl_FragColor = frontColor;
+}
+
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/RedSquareShader.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/RedSquareShader.java
index 3ef62df..cdbf3d9 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/RedSquareShader.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/RedSquareShader.java
@@ -31,17 +31,14 @@ package com.jogamp.opengl.test.junit.jogl.demos.es2.shader;
 public class RedSquareShader {
     public static String VERTEX_SHADER_TEXT =
                 " #ifdef GL_ES\n" +
-                "  #define MEDIUMP mediump\n" +
-                "  #define HIGHP highp\n" +
-                "#else\n" +
-                "  #define MEDIUMP\n" +
-                "  #define HIGHP\n" +
+                "  precision mediump float;\n" +
+                "  precision mediump int;\n" +
                 "#endif\n" +
                 "\n" +
-                "uniform MEDIUMP mat4    mgl_PMVMatrix[2];\n" +
-                "attribute HIGHP vec4    mgl_Vertex;\n" +
-                "attribute HIGHP vec4    mgl_Color;\n" +
-                "varying   HIGHP vec4    frontColor;\n" +
+                "uniform mat4    mgl_PMVMatrix[2];\n" +
+                "attribute vec4    mgl_Vertex;\n" +
+                "attribute vec4    mgl_Color;\n" +
+                "varying vec4    frontColor;\n" +
                 "\n" +
                 "void main(void)\n" +
                 "{\n" +
@@ -50,19 +47,15 @@ public class RedSquareShader {
                 "}\n" ;
 
     public static String FRAGMENT_SHADER_TEXT =
-                "#ifdef GL_ES\n" +
-                "  #define MEDIUMP mediump\n" +
-                "  #define HIGHP highp\n" +
-                "#else\n" +
-                "  #define MEDIUMP\n" +
-                "  #define HIGHP\n" +
+                " #ifdef GL_ES\n" +
+                "  precision mediump float;\n" +
+                "  precision mediump int;\n" +
                 "#endif\n" +
                 "\n" +
-                "varying   HIGHP vec4    frontColor;\n" +
+                "varying   vec4    frontColor;\n" +
                 "\n" +
                 "void main (void)\n" +
                 "{\n" +
                 "    gl_FragColor = frontColor;\n" +
                 "}\n" ;
-
 }
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/RedSquareShader.vp b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/RedSquareShader.vp
new file mode 100644
index 0000000..bfd44c8
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/RedSquareShader.vp
@@ -0,0 +1,27 @@
+// Copyright 2010 JogAmp Community. All rights reserved.
+
+/**
+ * AMD complains: #version must occur before any other statement in the program
+#ifdef GL_ES
+    #version 100
+#else
+    #version 110
+#endif
+ */
+
+#ifdef GL_ES
+  precision mediump float;
+  precision mediump int;
+#endif
+
+uniform mat4    mgl_PMVMatrix[2];
+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/RedSquareShader2.fp b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/RedSquareShader2.fp
new file mode 100644
index 0000000..01e4b09
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/RedSquareShader2.fp
@@ -0,0 +1,26 @@
+// Copyright 2010 JogAmp Community. All rights reserved.
+
+/**
+ * AMD complains: #version must occur before any other statement in the program
+#ifdef GL_ES
+    #version 100
+#else
+    #version 110
+#endif
+ */
+
+#ifdef GL_ES
+  #define MEDIUMP mediump
+  #define HIGHP highp
+#else
+  #define MEDIUMP
+  #define HIGHP
+#endif
+
+varying   HIGHP vec4    frontColor;
+
+void main (void)
+{
+    gl_FragColor = vec4(0.0, frontColor.g, frontColor.b, 1.0);
+}
+
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/default.vp b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/default.vp
new file mode 100644
index 0000000..99ad6e4
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/default.vp
@@ -0,0 +1,19 @@
+//Copyright 2010 JogAmp Community. All rights reserved.
+
+#ifdef GL_ES
+  #define MEDIUMP mediump
+  #define HIGHP highp
+  #define LOWP  lowp
+#else
+  #define MEDIUMP
+  #define HIGHP
+  #define LOWP
+#endif
+
+uniform HIGHP mat4    gcu_PMVMatrix[3]; // P, Mv, and Mvi
+attribute HIGHP vec4  gca_Vertices;
+
+void main(void)
+{
+  gl_Position = gcu_PMVMatrix[0] * gcu_PMVMatrix[1] * gca_Vertices;
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/elektronenmultiplizierer_development.fp b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/elektronenmultiplizierer_development.fp
new file mode 100644
index 0000000..6c9e048
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/elektronenmultiplizierer_development.fp
@@ -0,0 +1,379 @@
+/**
+ * Copyright 2011 JogAmp Community. All rights reserved.
+ * 
+ * Details see: src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/ElektronenMultiplizierer.java
+ */
+
+/**
+ * http://www.youtube.com/user/DemoscenePassivist
+ * author: Dominik Stroehlein (DemoscenePassivist) 
+ **/
+
+#ifdef GL_ES
+  precision mediump float;
+  precision mediump sampler2D;
+  precision mediump int;
+#endif
+
+uniform int en;         //effectnumber
+uniform float et;       //effecttime
+uniform sampler2D fb;   //fbotexture
+uniform float br;       //brightness
+uniform float tm;       //time
+uniform vec2 resolution;//screen resolution/fbo resolution
+ 
+float camerafocallengthdode;
+vec3 camerapositiondode;
+vec2 sizedode;
+vec3 backgroundcolor = vec3(0,0.6,0.46);
+mat3 worldrotationxyz;
+mat3 fractalplanerotationx;
+mat3 fractalplanerotationy;
+mat3 camerarotationdode;
+vec2 oglFragCoord;
+
+//fractal formula used for sphreretracing/distance-estimation
+//dodecahedron serpinski (knighty)
+//http://www.fractalforums.com/index.php?topic=3158.msg16982#msg16982
+//normal vectors for the dodecahedra-siepinski folding planes are:
+//(phi^2, 1, -phi), (-phi, phi^2, 1), (1, -phi, phi^2), (-phi*(1+phi), phi^2-1, 1+phi), (1+phi, -phi*(1+phi), phi^2-1) and x=0, y=0, z=0 planes.
+
+//const pre-calc
+const float phi = 1.618;
+const float _IKVNORM_ = 1.0 / sqrt(pow(phi * (1.0 + phi), 2.0) + pow(phi * phi - 1.0, 2.0) + pow(1.0 + phi, 2.0));
+const float _C1_ = phi * (1.0 + phi) * _IKVNORM_;
+const float _C2_ = (phi * phi - 1.0) * _IKVNORM_;
+const float _1C_ = (1.0 + phi) * _IKVNORM_;
+const vec3 phi3 = vec3(0.5, 0.5 / phi, 0.5 * phi);
+const vec3 c3   = vec3(_C1_, _C2_, _1C_);
+
+vec3 distancefunction(vec3 w) {
+//!P center scale offset ...   
+    vec3 offset;
+    if (en==6) {
+        offset = vec3(0.61,0.1*et,0.99);
+    } else {
+        offset = vec3(0.61,0.0,0.99);
+    } 
+//!P center scale \0/ this is awesome for fadeins !!!
+    float scale = 2.;
+    w *= worldrotationxyz;
+    float d, t;
+    float md = 1000.0, cd = 0.0;
+//!P iterations (8) ... 2x see below
+    for (int i = 0; i < 8; i++) {
+        w *= fractalplanerotationx;
+        w = abs(w);        
+        t = w.x * phi3.z + w.y * phi3.y - w.z * phi3.x;
+        if (t < 0.0) { w += vec3(-2.0, -2.0, 2.0) * t * phi3.zyx; }
+        t = -w.x * phi3.x + w.y * phi3.z + w.z * phi3.y;
+        if (t < 0.0) { w += vec3(2.0, -2.0, -2.0) * t * phi3.xzy; }
+        t = w.x * phi3.y - w.y * phi3.x + w.z * phi3.z;
+        if (t < 0.0) { w += vec3(-2.0, 2.0, -2.0) * t * phi3.yxz; } 
+        t = -w.x * c3.x + w.y * c3.y + w.z * c3.z;
+        if (t < 0.0) { w += vec3(2.0, -2.0, -2.0) * t * c3.xyz; }
+        t = w.x * c3.z - w.y * c3.x + w.z * c3.y;
+        if (t < 0.0) { w += vec3(-2.0, 2.0, -2.0) * t * c3.zxy; }     
+        w *= fractalplanerotationy;
+        w *= scale;
+        w -= offset * (scale - 1.0);
+        //accumulate minimum orbit for coloring ... 
+        d = dot(w, w);
+//!P iterations for coloring (4)        
+        if (i < 4) {
+            md = min(md, d);
+            cd = d;
+        }
+    }
+//!P max iterations (8)        
+    return vec3((length(w) - 2.0) * pow(scale, -8.0), md, cd);
+}
+
+//calculate ray direction fragment coordinates
+vec3 raydirection(vec2 pixel) {
+    vec2 p = (0.5*sizedode-pixel)/vec2(sizedode.x,-sizedode.y);
+//!P aspect ratio of dode
+    p.x *= sizedode.x/sizedode.y;
+//!P vec3 w = vec3(0, 0, 1), vec3 v = vec3(0, 1, 0), vec3 u = vec3(1, 0, 0);   
+    vec3 d = (p.x * vec3(1, 0, 0)+p.y * vec3(0, 1, 0)-camerafocallengthdode * vec3(0, 0, 1));   
+    return normalize(camerarotationdode * d);
+}
+
+//iq's fake ambient occlusion
+//http://www.iquilezles.org/www/material/nvscene2008/rwwtt.pdf
+//http://www.iquilezles.org/www/articles/ao/ao.htm
+float ambientocclusion(vec3 p, vec3 n, float eps) {
+    float o = 1.0;
+//!P ao spread (10.6)
+//   spreads the output color intensity 
+    eps *= 10.6;
+//!P ao intensity (0.16)
+    float k = 0.16 / eps;
+    //add little start distance to the surface
+    float d = 2.0 * eps;
+//!P ao iterations (5) ...    
+    for (int i = 0; i < 5; ++i) {
+        o -= (d - distancefunction(p + n * d).x) * k;
+        d += eps;
+        //fade ao when distance to the surface increases
+        k *= 0.5;
+    }
+    return clamp(o, 0.0, 1.0);
+}
+
+vec4 render(vec2 pixel) {
+    vec3  ray_direction = raydirection(pixel);
+//!P minimum ray length (6e-5)    
+    float ray_length = 6e-5;
+    vec3  ray = camerapositiondode + ray_length * ray_direction;
+//!P minimum epsilon (6e-7) ...
+    float eps = 6e-7;
+    vec3  dist;
+    vec3  normal = vec3(0);
+    int   steps = 0;
+    bool  hit = false;
+    float minmarch = 0.0;
+//!P maxmarch = 10000.0;
+    float maxmarch = 25.0;
+//!P field of view scale = (1.0 / sqrt(1.0 + camerafocallengthdode * camerafocallengthdode))   
+//!P detail of surface approximation =  1.22
+//!P pixelscale = (1.0 / min(sizedode.x, sizedode.y))
+    float epsfactor = 2.0 * (1.0 / sqrt(1.0 + camerafocallengthdode * camerafocallengthdode)) * (1.0 / min(sizedode.x, sizedode.y)) * 1.22;    
+    ray_length = minmarch;
+    ray = camerapositiondode + ray_length * ray_direction;
+//!P max number of raymarching steps (90);
+    for (int i = 0; i < 90; i++) {
+        steps = i;
+        dist = distancefunction(ray);
+//!P X-) questionable surface smoothing (0.53)            
+        dist.x *= 0.53;            
+        //backtrack previous step and check if it was only a "fussel"
+        if (hit && dist.x < eps || ray_length > maxmarch || ray_length < minmarch) {
+            steps--;
+            break;
+         }
+         hit = false;
+         ray_length += dist.x;
+         ray = camerapositiondode + ray_length * ray_direction;
+         eps = ray_length * epsfactor;
+         if (dist.x < eps || ray_length < minmarch) {
+             hit = true;
+         }
+    }
+    //\0/ there is a hit!
+    vec4 color = vec4(backgroundcolor,0.5);
+    if (hit) {
+        float aof = 1.0;
+        if (steps < 1 || ray_length < minmarch) {
+            normal = normalize(ray);
+        } else {
+            //gradient in x,y and z direction for intersection point 
+            //!P minimum normal (1.5e-7)
+            float e = max(eps * 0.5, 1.5e-7);
+            normal = normalize(vec3(
+                distancefunction(ray + vec3(e, 0, 0)).x - distancefunction(ray - vec3(e, 0, 0)).x, 
+                distancefunction(ray + vec3(0, e, 0)).x - distancefunction(ray - vec3(0, e, 0)).x, 
+                distancefunction(ray + vec3(0, 0, e)).x - distancefunction(ray - vec3(0, 0, e)).x
+            ));
+            aof = ambientocclusion(ray, normal, eps);
+        }        
+//!P hardcoded light position vec3(-50,150,-25)
+        float diffuse = max(dot(normal, normalize(vec3(-50,150,-25) - ray)), 0.0);
+//blinn/phong specular stuff ...
+//!P specular exponent (4)
+//!P specularity (0.8)
+//!P diffuse color vec3(0.45) 2x in one line ...
+//!P ambient color vec2 ambientcolor = vec2(0.5,0.3)
+        color.rgb = (mix(vec3(0.5), backgroundcolor, 0.3) * vec3(0.45) + vec3(0.45) * diffuse + pow(diffuse, 4.) * 0.8)*aof;
+        color.a = 1.0;
+    }  
+//!P fog factor = 0.01   
+    color.rgb = mix(backgroundcolor, color.rgb, exp(-pow(ray_length, 2.0) * 0.01));
+    return color;
+}
+
+mat3 xmatrixrotation(float angle) {
+    return mat3(
+        vec3(1.0,         0.0,        0.0),
+        vec3(0.0,  cos(angle), sin(angle)),
+        vec3(0.0, -sin(angle), cos(angle))
+    );
+}
+
+mat3 ymatrixrotation(float angle) {
+    return mat3(
+        vec3(cos(angle), 0.0, -sin(angle)),
+        vec3(       0.0, 1.0,         0.0),
+        vec3(sin(angle), 0.0,  cos(angle))
+    );
+}
+
+vec4 raymarch_orbittrap_image(vec2 fragcoord) {    
+    //do the matrix calculations by hand X-)
+    //as mat4 constructor and arithmetic assignments are 
+    //currently broken (2010-09-21) on ATI cards i found
+    //a workaround using vec4 constructors wich works on
+    //both NVIDIA+ATI --- MAGIC. DO NOT TOUCH! -=#:-)     
+    mat3  identitymatrix = mat3(1,0,0,0,1,0,0,0,1);    
+    float sin_phi = sin(0.1*tm);
+    float cos_phi = cos(0.1*tm);
+    mat3 zrot = mat3(
+        vec3( cos_phi, sin_phi, 0.0),
+        vec3(-sin_phi, cos_phi, 0.0),
+        vec3(     0.0,     0.0, 1.0)
+    );
+    vec2 position;
+    float fractalplanex_var;
+    float fractalplaney_var;
+    position = oglFragCoord.xy;
+    camerafocallengthdode = 1.0;      
+    if (en==2) {
+        sizedode = vec2(384,384);        
+        camerapositiondode = vec3(0.0,0.0,-2.7);
+    } else if (en==3) {
+        camerapositiondode = vec3(0.0,0.0,-2.7*(10.-et));
+    } else if (en==4) {
+        camerapositiondode = vec3(0.0,0.0,-2.7*(10.-9.3));
+        fractalplanex_var = et;
+        fractalplaney_var = 0.0;
+    } else if (en==5) {
+        //inside effect
+        camerapositiondode = vec3(0.0,0.0,-0.05);
+        fractalplanex_var = 1.06;
+        fractalplaney_var = -1.0-et;          
+    } else if (en==6) {
+        camerapositiondode = vec3(0.0,0.0,-2.7*(10.-9.5));
+        fractalplanex_var = et;
+        fractalplaney_var = sin(et*0.03)-1.0;   
+    } else if (en==7) {
+        sizedode = vec2(384,384);        
+        fractalplanex_var = et;
+        fractalplaney_var = sin(et*0.93)-1.0;
+        camerapositiondode = vec3(0.0,0.0,-2.7);
+    } 
+    worldrotationxyz = xmatrixrotation(0.1*tm)*ymatrixrotation(0.1*tm)*zrot*identitymatrix;
+    fractalplanerotationx = xmatrixrotation(fractalplanex_var)*identitymatrix;
+    fractalplanerotationy = xmatrixrotation(fractalplaney_var)*identitymatrix;
+    camerarotationdode = ymatrixrotation(3.14)*identitymatrix;                             
+    vec4 color = render(position);
+    return color;
+}
+
+//----------------------------------------------------------------------------------------------------------
+
+vec4 orbitmapping(vec4 c, vec2 w) {
+//!P orbit trap scale and offset    
+    vec2 orbittrapoffset = vec2(0.24,-0.24);
+    float orbittrapscale;
+    if (en==0) {
+        //julia set ...
+        orbittrapscale = 0.625;
+    } else {
+        //mandlebrot ...
+        orbittrapscale = 0.325;
+    }
+    vec2 sp = 0.5 + (w / orbittrapscale - orbittrapoffset);    
+    vec4 s = texture2D(fb, sp);
+    if (s.a > 0.0) {
+        c = mix(c, s, s.a);
+    }
+    return c;
+}
+
+vec4 orbittrap(vec2 z) {
+    float powerjulia = 2.;
+    vec3  colorjulia = vec3(1.0);
+    vec4  color = vec4(colorjulia, 0.0);
+    float n = 0.0;
+    vec2 c;
+    if (en==0) {    
+        //julia mode ...
+//!P use offset-julia from 2.25 to 2.5
+        c = vec2(sin(et+2.07)*0.05,cos(et+2.07));
+    } else {
+        //mandelbrot mode ...
+        c = z;
+    }
+//!P max iterations for julia (128) ... 2x parameter - see below!     
+    for (int i = 0; i<128; i++) {
+        n += 1.0;        
+        float r = pow(length(z), powerjulia);
+        float a = powerjulia * atan(z.y, z.x);
+        z = vec2(cos(a) * r, sin(a) * r) +c;
+//!P min iterations for julia (1.0) ...         
+        if (n >= 1.0) {
+            color = orbitmapping(color, z);
+//!P orbit trap alpha precision (0.6) ...
+            if (color.a >= 0.6) {
+                break;
+            }
+        }
+    }
+//!P max iterations for julia (128.0) ...
+    float blend = clamp(1.0 - (n / 128.0) * 2.0, 0.0, 1.0);
+    color.rgb = mix(colorjulia, color.rgb, blend);
+    return color;
+}
+
+void main() {
+    vec2 sizejulia = resolution;
+    sizedode = sizejulia;
+    oglFragCoord = gl_FragCoord.xy;
+    vec4 color;
+    if (en==0 || en==1) {
+        //render 2d julia/mandelbrot
+//!P camera position for julia ...
+        vec3 camerapositionjulia;
+        if (en==0) {
+            //julia
+            camerapositionjulia = vec3(-0.2,-0.515,0.095347+(et*1.75));
+        } else {
+            //mandelbrot
+            camerapositionjulia = vec3(0.325895,0.049551,0.0005+et);
+        }
+//!P absolute output size of julia orbit trap ...
+        vec2  z = ((oglFragCoord.xy - (sizejulia * 0.5)) / sizejulia) *
+                    vec2(sizejulia.x/sizejulia.y, 1.0) * //aspect ratio 
+                         camerapositionjulia.z + 
+                         camerapositionjulia.xy;
+        color = orbittrap(z);
+    } else {
+        color = raymarch_orbittrap_image(oglFragCoord.xy);
+    } 
+    if (en==2 || en==7) {
+        gl_FragColor = color;
+    } else {
+        //do normal rendering ...    
+        //analog-tv distortion ...
+        vec2 position = oglFragCoord.xy / sizejulia.xy;
+        position.y *=-1.0;
+        vec3 color_tv = color.rgb;
+        //contrast
+        color_tv = clamp(color_tv*0.5+0.5*color_tv*color_tv*1.2,0.0,1.0);
+        //circular vignette fade
+        color_tv *= 0.5 + 0.5*16.0*position.x*position.y*(1.0-position.x)*(-1.0-position.y);                
+        //color shift
+        if (en==0 || en==3) {
+            color_tv *= vec3(0.8,1.0,0.7); //green
+        }
+        if (en==1 || en==4) {
+            color_tv *= vec3(0.95,0.85,1.0); //blue
+        }
+        if (en==5) {
+            color_tv *= vec3(1.0,0.7,1.0); //purple
+        }
+        
+        if (en==6) {
+            color_tv *= vec3(0.7,1.0,1.0); //cyan
+        }        
+        if (en==2) {
+            color_tv *= vec3(1.0,1.0,0.7); //yellow
+        }
+        //tvlines effect
+        color_tv *= 0.9+0.1*sin(1.5*tm+position.y*1000.0);
+        //tv flicker effect
+        color_tv *= 0.97+0.13*sin(2.5*tm);
+        color_tv *= br;
+        gl_FragColor = vec4(color_tv,1.0);
+    }       
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/elektronenmultiplizierer_port.fp b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/elektronenmultiplizierer_port.fp
new file mode 100644
index 0000000..d3df819
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/elektronenmultiplizierer_port.fp
@@ -0,0 +1,234 @@
+/**
+ * Copyright 2011 JogAmp Community. All rights reserved.
+ * 
+ * Details see: src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/ElektronenMultiplizierer.java
+ */
+
+/**
+ * http://www.youtube.com/user/DemoscenePassivist
+ * author: Dominik Stroehlein (DemoscenePassivist) 
+ **/
+
+//When I wrote this, only God and I understood what I was doing ...
+// ... now only God knows! X-)
+
+uniform int en;
+uniform float et;
+uniform sampler2D fb;
+uniform float br,tm;
+uniform vec2 resolution;
+float v;
+vec3 n;
+vec2 e;
+vec3 f=vec3(0,.6,.46);
+mat3 i,m,r,y;
+vec2 c;
+const float x=1.618,t=1./sqrt(pow(x*(1.+x),2.)+pow(x*x-1.,2.)+pow(1.+x,2.)),z=x*(1.+x)*t,s=(x*x-1.)*t,w=(1.+x)*t;
+const vec3 a=vec3(.5,.5/x,.5*x),p=vec3(z,s,w);
+vec3 l(vec3 v) {
+    vec3 n;
+    if(en==6)
+        n=vec3(.61,.1*et,.99);
+    else
+      n=vec3(.61,0.,.99);
+    float e=2.;
+    v*=i;
+    float f,x,c=1000.,y=0.;
+    for(int z=0;z<8;z++) {
+        v*=m;
+        v=abs(v);
+        x=v.x*a.z+v.y*a.y-v.z*a.x;
+        if(x<0.)
+            v+=vec3(-2.,-2.,2.)*x*a.zyx;
+        x=-v.x*a.x+v.y*a.z+v.z*a.y;
+        if(x<0.)
+            v+=vec3(2.,-2.,-2.)*x*a.xzy;
+        x=v.x*a.y-v.y*a.x+v.z*a.z;
+        if(x<0.)
+            v+=vec3(-2.,2.,-2.)*x*a.yxz;
+        x=-v.x*p.x+v.y*p.y+v.z*p.z;
+        if(x<0.)
+            v+=vec3(2.,-2.,-2.)*x*p.xyz;
+        x=v.x*p.z-v.y*p.x+v.z*p.y;
+        if(x<0.)
+            v+=vec3(-2.,2.,-2.)*x*p.zxy;
+        v*=r;
+        v*=e;
+        v-=n*(e-1.);
+        f=dot(v,v);
+        if(z<4)
+            c=min(c,f),y=f;
+    }
+    return vec3((length(v)-2.)*pow(e,-8.),c,y);
+}
+vec3 b(vec2 x) {
+    vec2 n=(.5*e-x)/vec2(e.x,-e.y);
+    n.x*=e.x/e.y;
+    vec3 a=n.x*vec3(1,0,0)+n.y*vec3(0,1,0)-v*vec3(0,0,1);
+    return normalize(y*a);
+}
+float b(vec3 e,vec3 x,float v) {
+    float n=1.;
+    v*=10.6;
+    float t=.16/v,y=2.*v;
+    for(int i=0;i<5;++i)
+        n-=(y-l(e+x*y).x)*t,y+=v,t*=.5;
+    return clamp(n,0.,1.);
+}
+vec4 h(vec2 x) {
+    vec3 a=b(x);
+    float i=6e-05;
+    vec3 y=n+i*a;
+    float c=6e-07;
+    vec3 m,z=vec3(0);
+    int r=0;
+    bool t=false;
+    float s=0.,w=25.,p=2.*(1./sqrt(1.+v*v))*(1./min(e.x,e.y))*1.22;
+    i=s;
+    y=n+i*a;
+    for(int g=0;g<90;g++) {
+        r=g;
+        m=l(y);
+        m.x*=.53;
+        if(t&&m.x<c||i>w||i<s) {
+            r--;
+            break;
+        }
+        t=false;
+        i+=m.x;
+        y=n+i*a;
+        c=i*p;
+        if(m.x<c||i<s)
+            t=true;
+    }
+    vec4 g=vec4(f,.5);
+    if(t) {
+        float d=1.;
+        if(r<1||i<s)
+            z=normalize(y);
+        else {
+            float h=max(c*.5,1.5e-07);
+            z=normalize(vec3(l(y+vec3(h,0,0)).x-l(y-vec3(h,0,0)).x,l(y+vec3(0,h,0)).x-l(y-vec3(0,h,0)).x,l(y+vec3(0,0,h)).x-l(y-vec3(0,0,h)).x));
+            d=b(y,z,c);
+        }
+        float h=max(dot(z,normalize(vec3(-66,162,-30)-y)),0.);
+        g.xyz=(mix(vec3(.5),f,.3)*vec3(.45)+vec3(.45)*h+pow(h,4.)*.8)*d;
+        g.w=1.;
+    }
+    g.xyz=mix(f,g.xyz,exp(-pow(i,2.)*.01));
+    return g;
+}
+mat3 g(float e) {
+    return mat3(vec3(1.,0.,0.),vec3(0.,cos(e),sin(e)),vec3(0.,-sin(e),cos(e)));
+}
+mat3 d(float e) {
+    return mat3(vec3(cos(e),0.,-sin(e)),vec3(0.,1.,0.),vec3(sin(e),0.,cos(e)));
+}
+vec4 D(vec2 x) {
+    mat3 a=mat3(1,0,0,0,1,0,0,0,1);
+    float t=sin(.1*tm),z=cos(.1*tm);
+    mat3 p=mat3(vec3(z,t,0.),vec3(-t,z,0.),vec3(0.,0.,1.));
+    vec2 f;
+    float s,w;
+    f=c.xy;
+    v=1.;
+    if(en==2)
+        e=vec2(384,384),n=vec3(0.,0.,-2.7);
+    if(en==3)
+        n=vec3(0.,0.,-2.7*(10.-et));
+    if(en==4)
+        n=vec3(0.,0.,-1.89),s=et,w=0.;
+    if(en==5)
+        n=vec3(0.,0.,-.05),s=1.06,w=-1.-et;
+    if(en==6)
+        n=vec3(0.,0.,-1.35),s=et,w=sin(et*.03)-1.;
+    if(en==7)
+        e=vec2(384,384),s=et,w=sin(et*.93)-1.,n=vec3(0.,0.,-2.7);
+    i=g(.1*tm)*d(.1*tm)*p*a;
+    m=g(s)*a;
+    r=g(w)*a;
+    y=d(3.14)*a;
+    vec4 l=h(f);
+    if(l.w<.00392) {
+        discard;
+    }
+    return l;
+}
+vec4 D(vec4 e,vec2 x) {
+    vec2 n=vec2(.24,-.24);
+    float y;
+    if(en==0)
+        y=.625;
+    else
+     y=.325;
+    vec2 v=.5+(x/y-n);
+    vec4 c=texture2D(fb,v);
+    if(c.w>0.)
+        e=mix(e,c,c.w);
+    return e;
+}
+vec4 o(vec2 v) {
+    float n=2.;
+    vec3 e=vec3(1.);
+    vec4 i=vec4(e,0.);
+    float y=0.;
+    vec2 x;
+    if(en==0)
+        x=vec2(sin(et+2.07)*.05,cos(et+2.07));
+    else
+        x=v;
+    for(int f=0;f<128;f++) {
+        y+=1.;
+        float t=pow(length(v),n),c=n*atan(v.y,v.x);
+        v=vec2(cos(c)*t,sin(c)*t)+x;
+        if(y>=1.) {
+            i=D(i,v);
+            if(i.w>=.6) {
+                break;
+            }
+        }
+    }
+    float c=clamp(1.-y/128.*2.,0.,1.);
+    i.xyz=mix(e,i.xyz,c);
+    return i;
+}
+void main() {
+    //vec2 v=vec2(640.0,480.0);
+    vec2 v =resolution;
+    e=v;
+    c=gl_FragCoord.xy;
+    vec4 n;
+    if(en==0||en==1) {
+        vec3 a;
+        if(en==0)
+            a=vec3(-.2,-.515,.095347+et*1.75);
+        else
+            a=vec3(.325895,.049551,.0005+et);
+        vec2 x=(c.xy-v*.5)/v*vec2(v.x/v.y,1.)*a.z+a.xy;
+        n=o(x);
+    } else
+        n=D(c.xy);
+    if(en==2||en==7)
+        gl_FragColor=n;
+    else {
+        vec2 i=c.xy/v.xy;
+        i.y*=-1.;
+        vec3 x=n.xyz;
+        x=clamp(x*.5+.5*x*x*1.2,0.,1.);
+        x*=.5+8.*i.x*i.y*(1.-i.x)*(-1.-i.y);
+        if(en==0||en==3)
+            x*=vec3(.8,1.,.7);
+        if(en==1||en==4)
+            x*=vec3(.95,.85,1.);
+        if(en==5)
+            x*=vec3(1.,.7,1.);
+        if(en==6)
+            x*=vec3(.7,1.,1.);
+        if(en==2)
+            x*=vec3(1.,1.,.7);
+        x*=.9+.1*sin(1.5*tm+i.y*1000.);
+        x*=.97+.13*sin(2.5*tm);
+        x*=br;
+        gl_FragColor=vec4(x,1.);
+    }
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/fbo-mrt-1.fp b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/fbo-mrt-1.fp
new file mode 100644
index 0000000..1738d96
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/fbo-mrt-1.fp
@@ -0,0 +1,11 @@
+//Copyright 2010 JogAmp Community. All rights reserved.
+
+#version 110
+
+varying vec4    frontColor;
+
+void main (void)
+{
+    gl_FragData[0] = vec4( frontColor.r, 0.0, 0.0, 1.0 ); 
+    gl_FragData[1] = vec4( 0.0, frontColor.g, 0.0, 1.0 );
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/fbo-mrt-1.vp b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/fbo-mrt-1.vp
new file mode 100644
index 0000000..7f95a65
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/fbo-mrt-1.vp
@@ -0,0 +1,16 @@
+// Copyright 2010 JogAmp Community. All rights reserved.
+
+#version 110
+
+uniform mat4    gcu_PMVMatrix[2]; // P, Mv, and Mvi
+attribute vec4  gca_Vertices;
+attribute vec4  gca_Colors;
+
+varying vec4    frontColor;
+
+void main(void)
+{
+  frontColor = gca_Colors;
+  gl_Position = gcu_PMVMatrix[0] * gcu_PMVMatrix[1] * gca_Vertices;
+}
+
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/fbo-mrt-2.fp b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/fbo-mrt-2.fp
new file mode 100644
index 0000000..deac58c
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/fbo-mrt-2.fp
@@ -0,0 +1,16 @@
+//Copyright 2010 JogAmp Community. All rights reserved.
+
+#version 110
+
+uniform sampler2D gcs_TexUnit0;
+uniform sampler2D gcs_TexUnit1;
+
+varying vec4    frontColor;
+varying vec2      texCoord;
+
+void main (void)
+{
+  vec2 rg = texture2D(gcs_TexUnit0, texCoord).rg + texture2D(gcs_TexUnit1, texCoord).rg;
+  float b = frontColor.b - length(rg);
+  gl_FragData[0] = vec4( rg, b, 1.0 );
+}
\ No newline at end of file
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/fbo-mrt-2.vp b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/fbo-mrt-2.vp
new file mode 100644
index 0000000..1b2c023
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/fbo-mrt-2.vp
@@ -0,0 +1,18 @@
+//Copyright 2010 JogAmp Community. All rights reserved.
+
+#version 110
+
+uniform mat4    gcu_PMVMatrix[2]; // P, Mv, and Mvi
+attribute vec4  gca_Vertices;
+attribute vec4  gca_Colors;
+attribute vec2  gca_TexCoords;
+
+varying vec4    frontColor;
+varying vec2    texCoord;
+
+void main(void)
+{
+  frontColor = gca_Colors;
+  texCoord = gca_TexCoords;
+  gl_Position = gcu_PMVMatrix[0] * gcu_PMVMatrix[1] * gca_Vertices;
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/gears.fp b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/gears.fp
new file mode 100644
index 0000000..e8feef2
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/gears.fp
@@ -0,0 +1,47 @@
+// Copyright (C) 2011 JogAmp Community. All rights reserved.
+// Details see GearsES2.java
+
+#ifdef GL_ES
+  precision mediump float;
+  precision mediump int;
+#endif
+
+uniform vec4 color;
+
+varying vec3 normal;
+varying vec4 position;
+varying vec3 lightDir;
+varying float attenuation;
+varying vec3 cameraDir;
+
+// Defining The Material Colors
+const vec4 matAmbient  = vec4(0.2, 0.2, 0.2, 1.0); // orig default
+const vec4 matDiffuse  = vec4(0.8, 0.8, 0.8, 1.0); // orig default
+// const vec4 matSpecular = vec4(0.0, 0.0, 0.0, 1.0); // orig default
+const vec4 matSpecular = vec4(0.8, 0.8, 0.8, 1.0);
+// const float matShininess = 0.0; // orig default
+const float matShininess = 0.5;
+
+void main()
+{ 
+    float lambertTerm = dot(normal, lightDir);       
+ 
+    vec4 ambient = color * matAmbient;
+    vec4 diffuse = color * lambertTerm *  attenuation * matDiffuse;
+    vec4 specular = vec4(0.0);
+    if (lambertTerm > 0.0) {
+        float NdotHV;
+        /*
+        vec3 halfDir;        
+        halfDir  = normalize (lightDir + cameraDir); 
+        NdotHV   = max(0.0, dot(normal, halfDir));
+        */      
+        vec3 E = normalize(-position.xyz);  
+        vec3 R = reflect(-lightDir, normal);
+        NdotHV   = max(0.0, dot(R, E));
+        
+        specular += color * pow(NdotHV, matShininess) * attenuation * matSpecular;
+    }
+        
+    gl_FragColor = ambient + diffuse + specular ;
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/gears.vp b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/gears.vp
new file mode 100644
index 0000000..b2d7708
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/gears.vp
@@ -0,0 +1,44 @@
+// Copyright (C) 2011 JogAmp Community. All rights reserved.
+// Details see GearsES2.java
+
+#ifdef GL_ES
+  precision mediump float;
+  precision mediump int;
+#endif
+uniform mat4 pmvMatrix[4]; // P, Mv, Mvi and Mvit
+uniform vec3 lightPos;
+
+attribute vec4 vertices;
+attribute vec4 normals;
+
+varying vec3 normal;
+varying vec4 position;
+varying vec3 lightDir;
+varying float attenuation;
+varying vec3 cameraDir;
+
+const float constantAttenuation = 0.5; // 1.0;
+const float linearAttenuation   = 0.001; // 0.0;
+const float quadraticAttenuation= 0.0002; // 0.0;
+
+void main(void)
+{
+    // Transforming The Vertex Position To ModelView-Space
+    position  = pmvMatrix[1] * vertices; // vertex eye position
+    
+    // incl. projection 
+    gl_Position = pmvMatrix[0] * position;
+    
+    // Transforming The Normal To ModelView-Space
+    normal = normalize((pmvMatrix[3] * normals).xyz);
+    
+    // Calculating The Vector From The Vertex Position To The Light Position
+    lightDir = lightPos - position.xyz;
+    float d = length(lightDir);
+    attenuation = 1.0 / ( 
+                       constantAttenuation + 
+                       linearAttenuation    * d +   
+                       quadraticAttenuation * d * d );
+    lightDir = normalize(lightDir);                
+    cameraDir  = normalize((pmvMatrix[2] * vec4(0,0,0,1.0)).xyz - vertices.xyz);                   
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/ruler.fp b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/ruler.fp
new file mode 100644
index 0000000..b2f4d7a
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/shader/ruler.fp
@@ -0,0 +1,26 @@
+//Copyright 2010 JogAmp Community. All rights reserved.
+
+#ifdef GL_ES
+  #define MEDIUMP mediump
+  #define HIGHP highp
+  #define LOWP  lowp
+#else
+  #define MEDIUMP
+  #define HIGHP
+  #define LOWP
+#endif
+
+uniform MEDIUMP vec3 gcu_RulerColor;
+uniform MEDIUMP vec2 gcu_RulerPixFreq;
+
+const MEDIUMP vec2 onev2 = vec2(1.0, 1.0);
+
+void main (void)
+{
+  MEDIUMP vec2 c = step( onev2, mod(gl_FragCoord.xy, gcu_RulerPixFreq) );
+  if( c.s == 0.0 || c.t == 0.0 ) {
+    gl_FragColor = vec4(gcu_RulerColor, 1.0);
+  } else {
+    discard;
+  }
+}
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
new file mode 100644
index 0000000..b4881ab
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/Gears.java
@@ -0,0 +1,387 @@
+
+package com.jogamp.opengl.test.junit.jogl.demos.gl2;
+
+import javax.media.opengl.GL2;
+import javax.media.opengl.GLAutoDrawable;
+import javax.media.opengl.GLEventListener;
+import javax.media.opengl.GLProfile;
+
+import com.jogamp.newt.Window;
+import com.jogamp.newt.event.InputEvent;
+import com.jogamp.newt.event.KeyAdapter;
+import com.jogamp.newt.event.KeyEvent;
+import com.jogamp.newt.event.KeyListener;
+import com.jogamp.newt.event.MouseAdapter;
+import com.jogamp.newt.event.MouseEvent;
+import com.jogamp.newt.event.MouseListener;
+import com.jogamp.newt.event.awt.AWTKeyAdapter;
+import com.jogamp.newt.event.awt.AWTMouseAdapter;
+
+/**
+ * Gears.java <BR>
+ * author: Brian Paul (converted to Java by Ron Cemer and Sven Gothel) <P>
+ *
+ * This version is equal to Brian Paul's version 1.2 1999/10/21
+ */
+
+public class Gears implements GLEventListener {
+  private float view_rotx = 20.0f, view_roty = 30.0f, view_rotz = 0.0f;
+  private int gear1=0, gear2=0, gear3=0;
+  private float angle = 0.0f;
+  private int swapInterval;
+
+  // private boolean mouseRButtonDown = false;
+  private int prevMouseX, prevMouseY;
+
+  public Gears(int swapInterval) {
+    this.swapInterval = swapInterval;
+  }
+
+  public Gears() {
+    this.swapInterval = 1;
+  }
+  
+  public void setGears(int g1, int g2, int g3) {
+      gear1 = g1;
+      gear2 = g2;
+      gear3 = g3;
+  }
+
+  /**
+   * @return display list gear1
+   */
+  public int getGear1() { return gear1; }
+
+  /**
+   * @return display list gear2
+   */
+  public int getGear2() { return gear2; }
+
+  /**
+   * @return display list gear3
+   */
+  public int getGear3() { return gear3; }
+
+  public void init(GLAutoDrawable drawable) {
+    System.err.println("Gears: Init: "+drawable);
+    // Use debug pipeline
+    // drawable.setGL(new DebugGL(drawable.getGL()));
+
+    GL2 gl = drawable.getGL().getGL2();
+
+    System.err.println("Chosen GLCapabilities: " + drawable.getChosenGLCapabilities());
+    System.err.println("INIT GL IS: " + gl.getClass().getName());
+    System.err.println("GL_VENDOR: " + gl.glGetString(GL2.GL_VENDOR));
+    System.err.println("GL_RENDERER: " + gl.glGetString(GL2.GL_RENDERER));
+    System.err.println("GL_VERSION: " + gl.glGetString(GL2.GL_VERSION));
+
+    float pos[] = { 5.0f, 5.0f, 10.0f, 0.0f };
+    float red[] = { 0.8f, 0.1f, 0.0f, 0.7f };
+    float green[] = { 0.0f, 0.8f, 0.2f, 0.7f };
+    float blue[] = { 0.2f, 0.2f, 1.0f, 0.7f };
+
+    gl.glLightfv(GL2.GL_LIGHT0, GL2.GL_POSITION, pos, 0);
+    gl.glEnable(GL2.GL_CULL_FACE);
+    gl.glEnable(GL2.GL_LIGHTING);
+    gl.glEnable(GL2.GL_LIGHT0);
+    gl.glEnable(GL2.GL_DEPTH_TEST);
+            
+    /* make the gears */
+    if(0>=gear1) {
+        gear1 = gl.glGenLists(1);
+        gl.glNewList(gear1, GL2.GL_COMPILE);
+        gl.glMaterialfv(GL2.GL_FRONT, GL2.GL_AMBIENT_AND_DIFFUSE, red, 0);
+        gear(gl, 1.0f, 4.0f, 1.0f, 20, 0.7f);
+        gl.glEndList();
+        System.err.println("gear1 list created: "+gear1);
+    } else {
+        System.err.println("gear1 list reused: "+gear1);
+    }
+            
+    if(0>=gear2) {
+        gear2 = gl.glGenLists(1);
+        gl.glNewList(gear2, GL2.GL_COMPILE);
+        gl.glMaterialfv(GL2.GL_FRONT, GL2.GL_AMBIENT_AND_DIFFUSE, green, 0);
+        gear(gl, 0.5f, 2.0f, 2.0f, 10, 0.7f);
+        gl.glEndList();
+        System.err.println("gear2 list created: "+gear2);
+    } else {
+        System.err.println("gear2 list reused: "+gear2);
+    }
+            
+    if(0>=gear3) {
+        gear3 = gl.glGenLists(1);
+        gl.glNewList(gear3, GL2.GL_COMPILE);
+        gl.glMaterialfv(GL2.GL_FRONT, GL2.GL_AMBIENT_AND_DIFFUSE, blue, 0);
+        gear(gl, 1.3f, 2.0f, 0.5f, 10, 0.7f);
+        gl.glEndList();
+        System.err.println("gear3 list created: "+gear3);
+    } else {
+        System.err.println("gear3 list reused: "+gear3);
+    }
+            
+    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;
+        window.addMouseListener(gearsMouse);
+        window.addKeyListener(gearsKeys);
+    } else if (GLProfile.isAWTAvailable() && drawable instanceof java.awt.Component) {
+        java.awt.Component comp = (java.awt.Component) drawable;
+        new AWTMouseAdapter(gearsMouse).addTo(comp);
+        new AWTKeyAdapter(gearsKeys).addTo(comp);
+    }
+  }
+    
+  public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
+    System.err.println("Gears: Reshape "+x+"/"+y+" "+width+"x"+height);
+    GL2 gl = drawable.getGL().getGL2();
+
+    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);
+    gl.glMatrixMode(GL2.GL_MODELVIEW);
+    gl.glLoadIdentity();
+    gl.glTranslatef(0.0f, 0.0f, -40.0f);
+  }
+
+  public void dispose(GLAutoDrawable drawable) {
+    System.err.println("Gears: Dispose");
+    setGears(0, 0, 0);
+  }
+
+  public void display(GLAutoDrawable drawable) {
+    // Turn the gears' teeth
+    angle += 2.0f;
+
+    // Get the GL corresponding to the drawable we are animating
+    GL2 gl = drawable.getGL().getGL2();
+
+    gl.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
+
+    // Special handling for the case where the GLJPanel is translucent
+    // and wants to be composited with other Java 2D content
+    if (GLProfile.isAWTAvailable() && 
+        (drawable instanceof javax.media.opengl.awt.GLJPanel) &&
+        !((javax.media.opengl.awt.GLJPanel) drawable).isOpaque() &&
+        ((javax.media.opengl.awt.GLJPanel) drawable).shouldPreserveColorBufferIfTranslucent()) {
+      gl.glClear(GL2.GL_DEPTH_BUFFER_BIT);
+    } else {
+      gl.glClear(GL2.GL_COLOR_BUFFER_BIT | GL2.GL_DEPTH_BUFFER_BIT);
+    }
+            
+    // Rotate the entire assembly of gears based on how the user
+    // dragged the mouse around
+    gl.glPushMatrix();
+    gl.glRotatef(view_rotx, 1.0f, 0.0f, 0.0f);
+    gl.glRotatef(view_roty, 0.0f, 1.0f, 0.0f);
+    gl.glRotatef(view_rotz, 0.0f, 0.0f, 1.0f);
+            
+    // Place the first gear and call its display list
+    gl.glPushMatrix();
+    gl.glTranslatef(-3.0f, -2.0f, 0.0f);
+    gl.glRotatef(angle, 0.0f, 0.0f, 1.0f);
+    gl.glCallList(gear1);
+    gl.glPopMatrix();
+            
+    // Place the second gear and call its display list
+    gl.glPushMatrix();
+    gl.glTranslatef(3.1f, -2.0f, 0.0f);
+    gl.glRotatef(-2.0f * angle - 9.0f, 0.0f, 0.0f, 1.0f);
+    gl.glCallList(gear2);
+    gl.glPopMatrix();
+            
+    // Place the third gear and call its display list
+    gl.glPushMatrix();
+    gl.glTranslatef(-3.1f, 4.2f, 0.0f);
+    gl.glRotatef(-2.0f * angle - 25.0f, 0.0f, 0.0f, 1.0f);
+    gl.glCallList(gear3);
+    gl.glPopMatrix();
+            
+    // Remember that every push needs a pop; this one is paired with
+    // rotating the entire gear assembly
+    gl.glPopMatrix();
+  }
+
+  public static void gear(GL2 gl,
+                          float inner_radius,
+                          float outer_radius,
+                          float width,
+                          int teeth,
+                          float tooth_depth)
+  {
+    int i;
+    float r0, r1, r2;
+    float angle, da;
+    float u, v, len;
+
+    r0 = inner_radius;
+    r1 = outer_radius - tooth_depth / 2.0f;
+    r2 = outer_radius + tooth_depth / 2.0f;
+            
+    da = 2.0f * (float) Math.PI / teeth / 4.0f;
+            
+    gl.glShadeModel(GL2.GL_FLAT);
+
+    gl.glNormal3f(0.0f, 0.0f, 1.0f);
+
+    /* draw front face */
+    gl.glBegin(GL2.GL_QUAD_STRIP);
+    for (i = 0; i <= teeth; i++)
+      {
+        angle = i * 2.0f * (float) Math.PI / teeth;
+        gl.glVertex3f(r0 * (float)Math.cos(angle), r0 * (float)Math.sin(angle), width * 0.5f);
+        gl.glVertex3f(r1 * (float)Math.cos(angle), r1 * (float)Math.sin(angle), width * 0.5f);
+        if(i < teeth)
+          {
+            gl.glVertex3f(r0 * (float)Math.cos(angle), r0 * (float)Math.sin(angle), width * 0.5f);
+            gl.glVertex3f(r1 * (float)Math.cos(angle + 3.0f * da), r1 * (float)Math.sin(angle + 3.0f * da), width * 0.5f);
+          }
+      }
+    gl.glEnd();
+
+    /* draw front sides of teeth */
+    gl.glBegin(GL2.GL_QUADS);
+    for (i = 0; i < teeth; i++)
+      {
+        angle = i * 2.0f * (float) Math.PI / teeth;
+        gl.glVertex3f(r1 * (float)Math.cos(angle), r1 * (float)Math.sin(angle), width * 0.5f);
+        gl.glVertex3f(r2 * (float)Math.cos(angle + da), r2 * (float)Math.sin(angle + da), width * 0.5f);
+        gl.glVertex3f(r2 * (float)Math.cos(angle + 2.0f * da), r2 * (float)Math.sin(angle + 2.0f * da), width * 0.5f);
+        gl.glVertex3f(r1 * (float)Math.cos(angle + 3.0f * da), r1 * (float)Math.sin(angle + 3.0f * da), width * 0.5f);
+      }
+    gl.glEnd();
+    
+    /* draw back face */
+    gl.glBegin(GL2.GL_QUAD_STRIP);
+    for (i = 0; i <= teeth; i++)
+      {
+        angle = i * 2.0f * (float) Math.PI / teeth;
+        gl.glVertex3f(r1 * (float)Math.cos(angle), r1 * (float)Math.sin(angle), -width * 0.5f);
+        gl.glVertex3f(r0 * (float)Math.cos(angle), r0 * (float)Math.sin(angle), -width * 0.5f);
+        gl.glVertex3f(r1 * (float)Math.cos(angle + 3 * da), r1 * (float)Math.sin(angle + 3 * da), -width * 0.5f);
+        gl.glVertex3f(r0 * (float)Math.cos(angle), r0 * (float)Math.sin(angle), -width * 0.5f);
+      }
+    gl.glEnd();
+    
+    /* draw back sides of teeth */
+    gl.glBegin(GL2.GL_QUADS);
+    for (i = 0; i < teeth; i++)
+      {
+        angle = i * 2.0f * (float) Math.PI / teeth;
+        gl.glVertex3f(r1 * (float)Math.cos(angle + 3 * da), r1 * (float)Math.sin(angle + 3 * da), -width * 0.5f);
+        gl.glVertex3f(r2 * (float)Math.cos(angle + 2 * da), r2 * (float)Math.sin(angle + 2 * da), -width * 0.5f);
+        gl.glVertex3f(r2 * (float)Math.cos(angle + da), r2 * (float)Math.sin(angle + da), -width * 0.5f);
+        gl.glVertex3f(r1 * (float)Math.cos(angle), r1 * (float)Math.sin(angle), -width * 0.5f);
+      }
+    gl.glEnd();
+    
+    /* draw outward faces of teeth */
+    gl.glBegin(GL2.GL_QUAD_STRIP);
+    for (i = 0; i < teeth; i++)
+      {
+        angle = i * 2.0f * (float) Math.PI / teeth;
+        gl.glVertex3f(r1 * (float)Math.cos(angle), r1 * (float)Math.sin(angle), width * 0.5f);
+        gl.glVertex3f(r1 * (float)Math.cos(angle), r1 * (float)Math.sin(angle), -width * 0.5f);
+        u = r2 * (float)Math.cos(angle + da) - r1 * (float)Math.cos(angle);
+        v = r2 * (float)Math.sin(angle + da) - r1 * (float)Math.sin(angle);
+        len = (float)Math.sqrt(u * u + v * v);
+        u /= len;
+        v /= len;
+        gl.glNormal3f(v, -u, 0.0f);
+        gl.glVertex3f(r2 * (float)Math.cos(angle + da), r2 * (float)Math.sin(angle + da), width * 0.5f);
+        gl.glVertex3f(r2 * (float)Math.cos(angle + da), r2 * (float)Math.sin(angle + da), -width * 0.5f);
+        gl.glNormal3f((float)Math.cos(angle), (float)Math.sin(angle), 0.0f);
+        gl.glVertex3f(r2 * (float)Math.cos(angle + 2 * da), r2 * (float)Math.sin(angle + 2 * da), width * 0.5f);
+        gl.glVertex3f(r2 * (float)Math.cos(angle + 2 * da), r2 * (float)Math.sin(angle + 2 * da), -width * 0.5f);
+        u = r1 * (float)Math.cos(angle + 3 * da) - r2 * (float)Math.cos(angle + 2 * da);
+        v = r1 * (float)Math.sin(angle + 3 * da) - r2 * (float)Math.sin(angle + 2 * da);
+        gl.glNormal3f(v, -u, 0.0f);
+        gl.glVertex3f(r1 * (float)Math.cos(angle + 3 * da), r1 * (float)Math.sin(angle + 3 * da), width * 0.5f);
+        gl.glVertex3f(r1 * (float)Math.cos(angle + 3 * da), r1 * (float)Math.sin(angle + 3 * da), -width * 0.5f);
+        gl.glNormal3f((float)Math.cos(angle), (float)Math.sin(angle), 0.0f);
+      }
+    gl.glVertex3f(r1 * (float)Math.cos(0), r1 * (float)Math.sin(0), width * 0.5f);
+    gl.glVertex3f(r1 * (float)Math.cos(0), r1 * (float)Math.sin(0), -width * 0.5f);
+    gl.glEnd();
+    
+    gl.glShadeModel(GL2.GL_SMOOTH);
+    
+    /* draw inside radius cylinder */
+    gl.glBegin(GL2.GL_QUAD_STRIP);
+    for (i = 0; i <= teeth; i++)
+      {
+        angle = i * 2.0f * (float) Math.PI / teeth;
+        gl.glNormal3f(-(float)Math.cos(angle), -(float)Math.sin(angle), 0.0f);
+        gl.glVertex3f(r0 * (float)Math.cos(angle), r0 * (float)Math.sin(angle), -width * 0.5f);
+        gl.glVertex3f(r0 * (float)Math.cos(angle), r0 * (float)Math.sin(angle), width * 0.5f);
+      }
+    gl.glEnd();
+  }
+
+  class GearsKeyAdapter extends KeyAdapter {      
+    public void keyPressed(KeyEvent e) {
+        int kc = e.getKeyCode();
+        if(KeyEvent.VK_LEFT == kc) {
+            view_roty -= 1;
+        } else if(KeyEvent.VK_RIGHT == kc) {
+            view_roty += 1;
+        } else if(KeyEvent.VK_UP == kc) {
+            view_rotx -= 1;
+        } else if(KeyEvent.VK_DOWN == kc) {
+            view_rotx += 1;
+        }
+    }
+  }
+  
+  class GearsMouseAdapter extends MouseAdapter {
+      public void mousePressed(MouseEvent e) {
+        prevMouseX = e.getX();
+        prevMouseY = e.getY();
+        if ((e.getModifiers() & InputEvent.BUTTON3_MASK) != 0) {
+          // mouseRButtonDown = true;
+        }
+      }
+        
+      public void mouseReleased(MouseEvent e) {
+        if ((e.getModifiers() & InputEvent.BUTTON3_MASK) != 0) {
+          // mouseRButtonDown = false;
+        }
+      }
+        
+      public void mouseDragged(MouseEvent e) {
+        int x = e.getX();
+        int y = e.getY();
+        int width=0, height=0;
+        Object source = e.getSource();
+        if(source instanceof Window) {
+            Window window = (Window) source;
+            width=window.getWidth();
+            height=window.getHeight();
+        } else if (GLProfile.isAWTAvailable() && source instanceof java.awt.Component) {
+            java.awt.Component comp = (java.awt.Component) source;
+            width=comp.getWidth();
+            height=comp.getHeight();
+        } else {
+            throw new RuntimeException("Event source neither Window nor Component: "+source);
+        }
+        float thetaY = 360.0f * ( (float)(x-prevMouseX)/(float)width);
+        float thetaX = 360.0f * ( (float)(prevMouseY-y)/(float)height);
+        
+        prevMouseX = x;
+        prevMouseY = y;
+
+        view_rotx += thetaX;
+        view_roty += thetaY;
+      }
+  }
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/OneTriangle.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/OneTriangle.java
new file mode 100644
index 0000000..fa4d819
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/OneTriangle.java
@@ -0,0 +1,69 @@
+/**
+ * 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.demos.gl2;
+
+import javax.media.opengl.GL;
+import javax.media.opengl.GL2;
+import javax.media.opengl.glu.GLU;
+
+/**
+ * A utility class to encapsulate drawing a single triangle for unit tests.
+ * @author Wade Walker
+ */
+public class OneTriangle {
+
+    public static void setup( GL2 gl, int width, int height ) {
+        gl.glMatrixMode( GL2.GL_PROJECTION );
+        gl.glLoadIdentity();
+
+        // coordinate system origin at lower left with width and height same as the window
+        GLU glu = new GLU();
+        glu.gluOrtho2D( 0.0f, width, 0.0f, height );
+
+        gl.glMatrixMode( GL2.GL_MODELVIEW );
+        gl.glLoadIdentity();
+
+        gl.glViewport( 0, 0, width, height );
+    }
+
+    public static void render( GL2 gl, int width, int height) {
+        gl.glClear( GL.GL_COLOR_BUFFER_BIT );
+
+        // draw a triangle filling the window
+        gl.glLoadIdentity();
+        gl.glBegin( GL.GL_TRIANGLES );
+        gl.glColor3f( 1, 0, 0 );
+        gl.glVertex2f( 0, 0 );
+        gl.glColor3f( 0, 1, 0 );
+        gl.glVertex2f( width, 0 );
+        gl.glColor3f( 0, 0, 1 );
+        gl.glVertex2f( width / 2, height );
+        gl.glEnd();
+    }
+}
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
new file mode 100644
index 0000000..8ab6412
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/awt/TestGearsAWT.java
@@ -0,0 +1,124 @@
+/**
+ * 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.demos.gl2.awt;
+
+import javax.media.opengl.*;
+
+import com.jogamp.opengl.util.Animator;
+import javax.media.opengl.awt.GLCanvas;
+import com.jogamp.newt.event.awt.AWTKeyAdapter;
+import com.jogamp.newt.event.awt.AWTWindowAdapter;
+import com.jogamp.newt.event.TraceKeyAdapter;
+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.Frame;
+
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.AfterClass;
+import org.junit.Test;
+
+public class TestGearsAWT extends UITestCase {
+    static GLProfile glp;
+    static int width, height;
+
+    @BeforeClass
+    public static void initClass() {
+        glp = GLProfile.getDefault();
+        Assert.assertNotNull(glp);
+        width  = 512;
+        height = 512;
+    }
+
+    @AfterClass
+    public static void releaseClass() {
+    }
+
+    protected void runTestGL(GLCapabilities caps) throws InterruptedException {
+        Frame frame = new Frame("Gears AWT Test");
+        Assert.assertNotNull(frame);
+
+        GLCanvas glCanvas = new GLCanvas(caps);
+        Assert.assertNotNull(glCanvas);
+        frame.add(glCanvas);
+        frame.setSize(512, 512);
+
+        glCanvas.addGLEventListener(new Gears());
+
+        Animator animator = new Animator(glCanvas);
+        QuitAdapter quitAdapter = new QuitAdapter();
+
+        new AWTKeyAdapter(new TraceKeyAdapter(quitAdapter)).addTo(glCanvas);
+        new AWTWindowAdapter(new TraceWindowAdapter(quitAdapter)).addTo(frame);
+
+        frame.setVisible(true);
+        animator.setUpdateFPSFrames(1, null);        
+        animator.start();
+
+        while(!quitAdapter.shouldQuit() && animator.isAnimating() && animator.getTotalFPSDuration()<duration) {
+            Thread.sleep(100);
+        }
+
+        Assert.assertNotNull(frame);
+        Assert.assertNotNull(glCanvas);
+        Assert.assertNotNull(animator);
+
+        animator.stop();
+        Assert.assertEquals(false, animator.isAnimating());
+        frame.setVisible(false);
+        Assert.assertEquals(false, frame.isVisible());
+        frame.remove(glCanvas);
+        frame.dispose();
+        frame=null;
+        glCanvas=null;
+    }
+
+    @Test
+    public void test01() throws InterruptedException {
+        GLCapabilities caps = new GLCapabilities(glp);
+        runTestGL(caps);
+    }
+
+    static long duration = 500; // ms
+
+    public static void main(String args[]) {
+        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(); }
+            }
+        }
+        org.junit.runner.JUnitCore.main(TestGearsAWT.class.getName());
+    }
+}
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
new file mode 100644
index 0000000..59d54c3
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/awt/TestGearsGLJPanelAWT.java
@@ -0,0 +1,132 @@
+/**
+ * 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.demos.gl2.awt;
+
+import javax.media.opengl.*;
+
+import com.jogamp.opengl.util.FPSAnimator;
+import javax.media.opengl.awt.GLJPanel;
+
+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.lang.reflect.InvocationTargetException;
+import javax.swing.JFrame;
+import javax.swing.SwingUtilities;
+
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.AfterClass;
+import org.junit.Ignore;
+import org.junit.Test;
+
+public class TestGearsGLJPanelAWT extends UITestCase {
+    static GLProfile glp;
+    static int width, height;
+
+    @BeforeClass
+    public static void initClass() {
+        glp = GLProfile.getDefault();
+        Assert.assertNotNull(glp);
+        width  = 512;
+        height = 512;
+    }
+
+    @AfterClass
+    public static void releaseClass() {
+    }
+
+    protected void runTestGL(GLCapabilities caps)
+            throws AWTException, InterruptedException, InvocationTargetException
+    {
+        JFrame frame = new JFrame("Swing GLJPanel");
+        Assert.assertNotNull(frame);
+
+        GLJPanel glJPanel = new GLJPanel(caps);
+        Assert.assertNotNull(glJPanel);
+        glJPanel.addGLEventListener(new Gears());
+
+        FPSAnimator animator = new FPSAnimator(glJPanel, 60);
+
+        final JFrame _frame = frame;
+        final GLJPanel _glJPanel = glJPanel;
+        SwingUtilities.invokeAndWait(new Runnable() {
+                public void run() {
+                    _frame.getContentPane().add(_glJPanel, BorderLayout.CENTER);
+                    _frame.setSize(512, 512);
+                    _frame.setVisible(true);
+                } } ) ;
+
+        animator.setUpdateFPSFrames(1, null);        
+        animator.start();
+        Assert.assertEquals(true, animator.isAnimating());
+
+        while(animator.isAnimating() && animator.getTotalFPSDuration()<duration) {
+            Thread.sleep(100);
+        }
+
+        Assert.assertNotNull(frame);
+        Assert.assertNotNull(glJPanel);
+        Assert.assertNotNull(animator);
+
+        animator.stop();
+        Assert.assertEquals(false, animator.isAnimating());
+        SwingUtilities.invokeAndWait(new Runnable() {
+                public void run() {
+                    _frame.setVisible(false);
+                    _frame.getContentPane().remove(_glJPanel);
+                    _frame.remove(_glJPanel);
+                    _glJPanel.destroy();
+                    _frame.dispose();
+                } } );
+    }
+
+    @Test
+    public void test01()
+            throws AWTException, InterruptedException, InvocationTargetException
+    {
+        GLCapabilities caps = new GLCapabilities(GLProfile.getDefault());
+        runTestGL(caps);
+    }
+
+    static long duration = 500; // ms
+
+    public static void main(String args[]) {
+        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(); }
+            }
+        }
+        org.junit.runner.JUnitCore.main(TestGearsGLJPanelAWT.class.getName());
+    }
+}
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/TestGearsGLJPanelAWTBug450.java
new file mode 100644
index 0000000..7a4645b
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/awt/TestGearsGLJPanelAWTBug450.java
@@ -0,0 +1,164 @@
+/**
+ * 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.demos.gl2.awt;
+
+import javax.media.opengl.*;
+
+import com.jogamp.opengl.util.FPSAnimator;
+
+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.util.UITestCase;
+import java.awt.AWTException;
+import java.awt.BorderLayout;
+import java.lang.reflect.InvocationTargetException;
+import java.nio.ByteBuffer;
+
+import javax.swing.JFrame;
+import javax.swing.SwingUtilities;
+
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.AfterClass;
+import org.junit.Test;
+
+/**
+ * Test for bug 450, which causes the right part of the frame to be black
+ * for all x >= height.
+ * 
+ * Draws the Gears demo in a window that's twice as wide than it is tall,
+ * and checks to see if a particular pixel in the right half of the frame
+ * is colored.
+ *
+ * @author Wade Walker (adapted from TestGearsGLJPanelAWT)
+ */
+public class TestGearsGLJPanelAWTBug450 extends UITestCase {
+    static GLProfile glp;
+    static int width, height;
+    /** 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() {
+        glp = GLProfile.getDefault();
+        Assert.assertNotNull(glp);
+        width  = 512;
+        height = 256;
+    }
+
+    @AfterClass
+    public static void releaseClass() {
+    }
+
+    protected void runTestGL(GLCapabilities caps)
+            throws AWTException, InterruptedException, InvocationTargetException
+    {
+        JFrame frame = new JFrame("Swing GLJPanel");
+        Assert.assertNotNull(frame);
+
+        GLJPanel glJPanel = new GLJPanel(caps);
+        Assert.assertNotNull(glJPanel);
+        glJPanel.addGLEventListener(new Gears() {
+            @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 );
+                byte byte0 = bytebuffer.get( 0 );
+                byte byte1 = bytebuffer.get( 1 );
+                byte byte2 = bytebuffer.get( 2 );
+                if( (byte0 == 0) && (byte1 == 0) && (byte2 == 0) )
+                    failed = true;
+            }
+        });
+
+        FPSAnimator animator = new FPSAnimator(glJPanel, 60);
+
+        final JFrame _frame = frame;
+        final GLJPanel _glJPanel = glJPanel;
+        SwingUtilities.invokeAndWait(new Runnable() {
+                public void run() {
+                    _frame.getContentPane().add(_glJPanel, BorderLayout.CENTER);
+                    _frame.setSize(width, height);
+                    _frame.setVisible(true);
+                } } ) ;
+
+        animator.setUpdateFPSFrames(1, null);        
+        animator.start();
+        Assert.assertEquals(true, animator.isAnimating());
+
+        while(animator.isAnimating() && animator.getTotalFPSDuration()<duration) {
+            Thread.sleep(100);
+        }
+
+        Assert.assertNotNull(frame);
+        Assert.assertNotNull(glJPanel);
+        Assert.assertNotNull(animator);
+
+        animator.stop();
+        Assert.assertEquals(false, animator.isAnimating());
+        SwingUtilities.invokeAndWait(new Runnable() {
+                public void run() {
+                    _frame.setVisible(false);
+                    _frame.getContentPane().remove(_glJPanel);
+                    _frame.remove(_glJPanel);
+                    _glJPanel.destroy();
+                    _frame.dispose();
+                } } );
+
+        Assert.assertFalse( failed );
+    }
+
+    @Test
+    public void test01()
+            throws AWTException, InterruptedException, InvocationTargetException
+    {
+        GLCapabilities caps = new GLCapabilities(GLProfile.getDefault());
+        runTestGL(caps);
+    }
+
+    static long duration = 500; // ms
+
+    public static void main(String args[]) {
+        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(); }
+            }
+        }
+        org.junit.runner.JUnitCore.main(TestGearsGLJPanelAWTBug450.class.getName());
+    }
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/Gears.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/Gears.java
deleted file mode 100644
index 0dcf6be..0000000
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/Gears.java
+++ /dev/null
@@ -1,371 +0,0 @@
-
-package com.jogamp.opengl.test.junit.jogl.demos.gl2.gears;
-
-import javax.media.opengl.*;
-
-import com.jogamp.newt.event.*;
-import com.jogamp.newt.event.awt.*;
-import com.jogamp.newt.Window;
-
-/**
- * Gears.java <BR>
- * author: Brian Paul (converted to Java by Ron Cemer and Sven Gothel) <P>
- *
- * This version is equal to Brian Paul's version 1.2 1999/10/21
- */
-
-public class Gears implements GLEventListener {
-  private float view_rotx = 20.0f, view_roty = 30.0f, view_rotz = 0.0f;
-  private int gear1=0, gear2=0, gear3=0;
-  private float angle = 0.0f;
-  private int swapInterval;
-
-  private boolean mouseRButtonDown = false;
-  private int prevMouseX, prevMouseY;
-
-  public Gears(int swapInterval) {
-    this.swapInterval = swapInterval;
-  }
-
-  public Gears() {
-    this.swapInterval = 1;
-  }
-
-  public void setGears(int g1, int g2, int g3) {
-      gear1 = g1;
-      gear2 = g2;
-      gear3 = g3;
-  }
-
-  /**
-   * @return display list gear1
-   */
-  public int getGear1() { return gear1; }
-
-  /**
-   * @return display list gear2
-   */
-  public int getGear2() { return gear2; }
-
-  /**
-   * @return display list gear3
-   */
-  public int getGear3() { return gear3; }
-
-  public void init(GLAutoDrawable drawable) {
-    System.err.println("Gears: Init");
-    // Use debug pipeline
-    // drawable.setGL(new DebugGL(drawable.getGL()));
-
-    GL2 gl = drawable.getGL().getGL2();
-
-    float pos[] = { 5.0f, 5.0f, 10.0f, 0.0f };
-    float red[] = { 0.8f, 0.1f, 0.0f, 0.7f };
-    float green[] = { 0.0f, 0.8f, 0.2f, 0.7f };
-    float blue[] = { 0.2f, 0.2f, 1.0f, 0.7f };
-
-    gl.glLightfv(GL2.GL_LIGHT0, GL2.GL_POSITION, pos, 0);
-    gl.glEnable(GL2.GL_CULL_FACE);
-    gl.glEnable(GL2.GL_LIGHTING);
-    gl.glEnable(GL2.GL_LIGHT0);
-    gl.glEnable(GL2.GL_DEPTH_TEST);
-            
-    /* make the gears */
-    if(0>=gear1) {
-        gear1 = gl.glGenLists(1);
-        gl.glNewList(gear1, GL2.GL_COMPILE);
-        gl.glMaterialfv(GL2.GL_FRONT, GL2.GL_AMBIENT_AND_DIFFUSE, red, 0);
-        gear(gl, 1.0f, 4.0f, 1.0f, 20, 0.7f);
-        gl.glEndList();
-        System.err.println("gear1 list created: "+gear1);
-    } else {
-        System.err.println("gear1 list reused: "+gear1);
-    }
-            
-    if(0>=gear2) {
-        gear2 = gl.glGenLists(1);
-        gl.glNewList(gear2, GL2.GL_COMPILE);
-        gl.glMaterialfv(GL2.GL_FRONT, GL2.GL_AMBIENT_AND_DIFFUSE, green, 0);
-        gear(gl, 0.5f, 2.0f, 2.0f, 10, 0.7f);
-        gl.glEndList();
-        System.err.println("gear2 list created: "+gear2);
-    } else {
-        System.err.println("gear2 list reused: "+gear2);
-    }
-            
-    if(0>=gear3) {
-        gear3 = gl.glGenLists(1);
-        gl.glNewList(gear3, GL2.GL_COMPILE);
-        gl.glMaterialfv(GL2.GL_FRONT, GL2.GL_AMBIENT_AND_DIFFUSE, blue, 0);
-        gear(gl, 1.3f, 2.0f, 0.5f, 10, 0.7f);
-        gl.glEndList();
-        System.err.println("gear3 list created: "+gear3);
-    } else {
-        System.err.println("gear3 list reused: "+gear3);
-    }
-            
-    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;
-        window.addMouseListener(gearsMouse);
-        window.addKeyListener(gearsKeys);
-    } else if (GLProfile.isAWTAvailable() && drawable instanceof java.awt.Component) {
-        java.awt.Component comp = (java.awt.Component) drawable;
-        new AWTMouseAdapter(gearsMouse).addTo(comp);
-        new AWTKeyAdapter(gearsKeys).addTo(comp);
-    }
-  }
-    
-  public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
-    System.err.println("Gears: Reshape "+x+"/"+y+" "+width+"x"+height);
-    GL2 gl = drawable.getGL().getGL2();
-
-    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);
-    gl.glMatrixMode(GL2.GL_MODELVIEW);
-    gl.glLoadIdentity();
-    gl.glTranslatef(0.0f, 0.0f, -40.0f);
-  }
-
-  public void dispose(GLAutoDrawable drawable) {
-    System.err.println("Gears: Dispose");
-    setGears(0, 0, 0);
-  }
-
-  public void display(GLAutoDrawable drawable) {
-    // Turn the gears' teeth
-    angle += 2.0f;
-
-    // Get the GL corresponding to the drawable we are animating
-    GL2 gl = drawable.getGL().getGL2();
-
-    gl.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
-
-    // Special handling for the case where the GLJPanel is translucent
-    // and wants to be composited with other Java 2D content
-    if (GLProfile.isAWTAvailable() && 
-        (drawable instanceof javax.media.opengl.awt.GLJPanel) &&
-        !((javax.media.opengl.awt.GLJPanel) drawable).isOpaque() &&
-        ((javax.media.opengl.awt.GLJPanel) drawable).shouldPreserveColorBufferIfTranslucent()) {
-      gl.glClear(GL2.GL_DEPTH_BUFFER_BIT);
-    } else {
-      gl.glClear(GL2.GL_COLOR_BUFFER_BIT | GL2.GL_DEPTH_BUFFER_BIT);
-    }
-            
-    // Rotate the entire assembly of gears based on how the user
-    // dragged the mouse around
-    gl.glPushMatrix();
-    gl.glRotatef(view_rotx, 1.0f, 0.0f, 0.0f);
-    gl.glRotatef(view_roty, 0.0f, 1.0f, 0.0f);
-    gl.glRotatef(view_rotz, 0.0f, 0.0f, 1.0f);
-            
-    // Place the first gear and call its display list
-    gl.glPushMatrix();
-    gl.glTranslatef(-3.0f, -2.0f, 0.0f);
-    gl.glRotatef(angle, 0.0f, 0.0f, 1.0f);
-    gl.glCallList(gear1);
-    gl.glPopMatrix();
-            
-    // Place the second gear and call its display list
-    gl.glPushMatrix();
-    gl.glTranslatef(3.1f, -2.0f, 0.0f);
-    gl.glRotatef(-2.0f * angle - 9.0f, 0.0f, 0.0f, 1.0f);
-    gl.glCallList(gear2);
-    gl.glPopMatrix();
-            
-    // Place the third gear and call its display list
-    gl.glPushMatrix();
-    gl.glTranslatef(-3.1f, 4.2f, 0.0f);
-    gl.glRotatef(-2.0f * angle - 25.0f, 0.0f, 0.0f, 1.0f);
-    gl.glCallList(gear3);
-    gl.glPopMatrix();
-            
-    // Remember that every push needs a pop; this one is paired with
-    // rotating the entire gear assembly
-    gl.glPopMatrix();
-  }
-
-  public static void gear(GL2 gl,
-                          float inner_radius,
-                          float outer_radius,
-                          float width,
-                          int teeth,
-                          float tooth_depth)
-  {
-    int i;
-    float r0, r1, r2;
-    float angle, da;
-    float u, v, len;
-
-    r0 = inner_radius;
-    r1 = outer_radius - tooth_depth / 2.0f;
-    r2 = outer_radius + tooth_depth / 2.0f;
-            
-    da = 2.0f * (float) Math.PI / teeth / 4.0f;
-            
-    gl.glShadeModel(GL2.GL_FLAT);
-
-    gl.glNormal3f(0.0f, 0.0f, 1.0f);
-
-    /* draw front face */
-    gl.glBegin(GL2.GL_QUAD_STRIP);
-    for (i = 0; i <= teeth; i++)
-      {
-        angle = i * 2.0f * (float) Math.PI / teeth;
-        gl.glVertex3f(r0 * (float)Math.cos(angle), r0 * (float)Math.sin(angle), width * 0.5f);
-        gl.glVertex3f(r1 * (float)Math.cos(angle), r1 * (float)Math.sin(angle), width * 0.5f);
-        if(i < teeth)
-          {
-            gl.glVertex3f(r0 * (float)Math.cos(angle), r0 * (float)Math.sin(angle), width * 0.5f);
-            gl.glVertex3f(r1 * (float)Math.cos(angle + 3.0f * da), r1 * (float)Math.sin(angle + 3.0f * da), width * 0.5f);
-          }
-      }
-    gl.glEnd();
-
-    /* draw front sides of teeth */
-    gl.glBegin(GL2.GL_QUADS);
-    for (i = 0; i < teeth; i++)
-      {
-        angle = i * 2.0f * (float) Math.PI / teeth;
-        gl.glVertex3f(r1 * (float)Math.cos(angle), r1 * (float)Math.sin(angle), width * 0.5f);
-        gl.glVertex3f(r2 * (float)Math.cos(angle + da), r2 * (float)Math.sin(angle + da), width * 0.5f);
-        gl.glVertex3f(r2 * (float)Math.cos(angle + 2.0f * da), r2 * (float)Math.sin(angle + 2.0f * da), width * 0.5f);
-        gl.glVertex3f(r1 * (float)Math.cos(angle + 3.0f * da), r1 * (float)Math.sin(angle + 3.0f * da), width * 0.5f);
-      }
-    gl.glEnd();
-    
-    /* draw back face */
-    gl.glBegin(GL2.GL_QUAD_STRIP);
-    for (i = 0; i <= teeth; i++)
-      {
-        angle = i * 2.0f * (float) Math.PI / teeth;
-        gl.glVertex3f(r1 * (float)Math.cos(angle), r1 * (float)Math.sin(angle), -width * 0.5f);
-        gl.glVertex3f(r0 * (float)Math.cos(angle), r0 * (float)Math.sin(angle), -width * 0.5f);
-        gl.glVertex3f(r1 * (float)Math.cos(angle + 3 * da), r1 * (float)Math.sin(angle + 3 * da), -width * 0.5f);
-        gl.glVertex3f(r0 * (float)Math.cos(angle), r0 * (float)Math.sin(angle), -width * 0.5f);
-      }
-    gl.glEnd();
-    
-    /* draw back sides of teeth */
-    gl.glBegin(GL2.GL_QUADS);
-    for (i = 0; i < teeth; i++)
-      {
-        angle = i * 2.0f * (float) Math.PI / teeth;
-        gl.glVertex3f(r1 * (float)Math.cos(angle + 3 * da), r1 * (float)Math.sin(angle + 3 * da), -width * 0.5f);
-        gl.glVertex3f(r2 * (float)Math.cos(angle + 2 * da), r2 * (float)Math.sin(angle + 2 * da), -width * 0.5f);
-        gl.glVertex3f(r2 * (float)Math.cos(angle + da), r2 * (float)Math.sin(angle + da), -width * 0.5f);
-        gl.glVertex3f(r1 * (float)Math.cos(angle), r1 * (float)Math.sin(angle), -width * 0.5f);
-      }
-    gl.glEnd();
-    
-    /* draw outward faces of teeth */
-    gl.glBegin(GL2.GL_QUAD_STRIP);
-    for (i = 0; i < teeth; i++)
-      {
-        angle = i * 2.0f * (float) Math.PI / teeth;
-        gl.glVertex3f(r1 * (float)Math.cos(angle), r1 * (float)Math.sin(angle), width * 0.5f);
-        gl.glVertex3f(r1 * (float)Math.cos(angle), r1 * (float)Math.sin(angle), -width * 0.5f);
-        u = r2 * (float)Math.cos(angle + da) - r1 * (float)Math.cos(angle);
-        v = r2 * (float)Math.sin(angle + da) - r1 * (float)Math.sin(angle);
-        len = (float)Math.sqrt(u * u + v * v);
-        u /= len;
-        v /= len;
-        gl.glNormal3f(v, -u, 0.0f);
-        gl.glVertex3f(r2 * (float)Math.cos(angle + da), r2 * (float)Math.sin(angle + da), width * 0.5f);
-        gl.glVertex3f(r2 * (float)Math.cos(angle + da), r2 * (float)Math.sin(angle + da), -width * 0.5f);
-        gl.glNormal3f((float)Math.cos(angle), (float)Math.sin(angle), 0.0f);
-        gl.glVertex3f(r2 * (float)Math.cos(angle + 2 * da), r2 * (float)Math.sin(angle + 2 * da), width * 0.5f);
-        gl.glVertex3f(r2 * (float)Math.cos(angle + 2 * da), r2 * (float)Math.sin(angle + 2 * da), -width * 0.5f);
-        u = r1 * (float)Math.cos(angle + 3 * da) - r2 * (float)Math.cos(angle + 2 * da);
-        v = r1 * (float)Math.sin(angle + 3 * da) - r2 * (float)Math.sin(angle + 2 * da);
-        gl.glNormal3f(v, -u, 0.0f);
-        gl.glVertex3f(r1 * (float)Math.cos(angle + 3 * da), r1 * (float)Math.sin(angle + 3 * da), width * 0.5f);
-        gl.glVertex3f(r1 * (float)Math.cos(angle + 3 * da), r1 * (float)Math.sin(angle + 3 * da), -width * 0.5f);
-        gl.glNormal3f((float)Math.cos(angle), (float)Math.sin(angle), 0.0f);
-      }
-    gl.glVertex3f(r1 * (float)Math.cos(0), r1 * (float)Math.sin(0), width * 0.5f);
-    gl.glVertex3f(r1 * (float)Math.cos(0), r1 * (float)Math.sin(0), -width * 0.5f);
-    gl.glEnd();
-    
-    gl.glShadeModel(GL2.GL_SMOOTH);
-    
-    /* draw inside radius cylinder */
-    gl.glBegin(GL2.GL_QUAD_STRIP);
-    for (i = 0; i <= teeth; i++)
-      {
-        angle = i * 2.0f * (float) Math.PI / teeth;
-        gl.glNormal3f(-(float)Math.cos(angle), -(float)Math.sin(angle), 0.0f);
-        gl.glVertex3f(r0 * (float)Math.cos(angle), r0 * (float)Math.sin(angle), -width * 0.5f);
-        gl.glVertex3f(r0 * (float)Math.cos(angle), r0 * (float)Math.sin(angle), width * 0.5f);
-      }
-    gl.glEnd();
-  }
-
-  class GearsKeyAdapter extends KeyAdapter {      
-    public void keyPressed(KeyEvent e) {
-        int kc = e.getKeyCode();
-        if(KeyEvent.VK_LEFT == kc) {
-            view_roty -= 1;
-        } else if(KeyEvent.VK_RIGHT == kc) {
-            view_roty += 1;
-        } else if(KeyEvent.VK_UP == kc) {
-            view_rotx -= 1;
-        } else if(KeyEvent.VK_DOWN == kc) {
-            view_rotx += 1;
-        }
-    }
-  }
-  
-  class GearsMouseAdapter extends MouseAdapter {
-      public void mousePressed(MouseEvent e) {
-        prevMouseX = e.getX();
-        prevMouseY = e.getY();
-        if ((e.getModifiers() & e.BUTTON3_MASK) != 0) {
-          mouseRButtonDown = true;
-        }
-      }
-        
-      public void mouseReleased(MouseEvent e) {
-        if ((e.getModifiers() & e.BUTTON3_MASK) != 0) {
-          mouseRButtonDown = false;
-        }
-      }
-        
-      public void mouseDragged(MouseEvent e) {
-        int x = e.getX();
-        int y = e.getY();
-        int width=0, height=0;
-        Object source = e.getSource();
-        if(source instanceof Window) {
-            Window window = (Window) source;
-            width=window.getWidth();
-            height=window.getHeight();
-        } else if (GLProfile.isAWTAvailable() && source instanceof java.awt.Component) {
-            java.awt.Component comp = (java.awt.Component) source;
-            width=comp.getWidth();
-            height=comp.getHeight();
-        } else {
-            throw new RuntimeException("Event source neither Window nor Component: "+source);
-        }
-        float thetaY = 360.0f * ( (float)(x-prevMouseX)/(float)width);
-        float thetaX = 360.0f * ( (float)(prevMouseY-y)/(float)height);
-        
-        prevMouseX = x;
-        prevMouseY = y;
-
-        view_rotx += thetaX;
-        view_roty += thetaY;
-      }
-  }
-}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/TestGearsAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/TestGearsAWT.java
deleted file mode 100644
index d04ce38..0000000
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/TestGearsAWT.java
+++ /dev/null
@@ -1,122 +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.demos.gl2.gears;
-
-import javax.media.opengl.*;
-import com.jogamp.opengl.util.Animator;
-import javax.media.opengl.awt.GLCanvas;
-import com.jogamp.newt.event.awt.AWTKeyAdapter;
-import com.jogamp.newt.event.awt.AWTWindowAdapter;
-import com.jogamp.newt.event.TraceKeyAdapter;
-import com.jogamp.newt.event.TraceWindowAdapter;
-
-import com.jogamp.opengl.test.junit.util.UITestCase;
-import com.jogamp.opengl.test.junit.util.QuitAdapter;
-import java.awt.Frame;
-
-import org.junit.Assert;
-import org.junit.BeforeClass;
-import org.junit.AfterClass;
-import org.junit.Test;
-
-public class TestGearsAWT extends UITestCase {
-    static GLProfile glp;
-    static int width, height;
-
-    @BeforeClass
-    public static void initClass() {
-        GLProfile.initSingleton(true);
-        glp = GLProfile.getDefault();
-        Assert.assertNotNull(glp);
-        width  = 512;
-        height = 512;
-    }
-
-    @AfterClass
-    public static void releaseClass() {
-    }
-
-    protected void runTestGL(GLCapabilities caps) throws InterruptedException {
-        Frame frame = new Frame("Gears AWT Test");
-        Assert.assertNotNull(frame);
-
-        GLCanvas glCanvas = new GLCanvas(caps);
-        Assert.assertNotNull(glCanvas);
-        frame.add(glCanvas);
-        frame.setSize(512, 512);
-
-        glCanvas.addGLEventListener(new Gears());
-
-        Animator animator = new Animator(glCanvas);
-        QuitAdapter quitAdapter = new QuitAdapter();
-
-        new AWTKeyAdapter(new TraceKeyAdapter(quitAdapter)).addTo(glCanvas);
-        new AWTWindowAdapter(new TraceWindowAdapter(quitAdapter)).addTo(frame);
-
-        frame.setVisible(true);
-        animator.start();
-
-        while(!quitAdapter.shouldQuit() && animator.isAnimating() && animator.getDuration()<duration) {
-            Thread.sleep(100);
-        }
-
-        Assert.assertNotNull(frame);
-        Assert.assertNotNull(glCanvas);
-        Assert.assertNotNull(animator);
-
-        animator.stop();
-        Assert.assertEquals(false, animator.isAnimating());
-        frame.setVisible(false);
-        Assert.assertEquals(false, frame.isVisible());
-        frame.remove(glCanvas);
-        frame.dispose();
-        frame=null;
-        glCanvas=null;
-    }
-
-    @Test
-    public void test01() throws InterruptedException {
-        GLCapabilities caps = new GLCapabilities(GLProfile.getDefault());
-        runTestGL(caps);
-    }
-
-    static long duration = 500; // ms
-
-    public static void main(String args[]) {
-        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(); }
-            }
-        }
-        org.junit.runner.JUnitCore.main(TestGearsAWT.class.getName());
-    }
-}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/TestGearsGLJPanelAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/TestGearsGLJPanelAWT.java
deleted file mode 100644
index 40e2ae9..0000000
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/TestGearsGLJPanelAWT.java
+++ /dev/null
@@ -1,130 +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.demos.gl2.gears;
-
-import javax.media.opengl.*;
-import com.jogamp.opengl.util.FPSAnimator;
-import javax.media.opengl.awt.GLJPanel;
-
-import com.jogamp.opengl.test.junit.util.UITestCase;
-import java.awt.AWTException;
-import java.awt.BorderLayout;
-import java.lang.reflect.InvocationTargetException;
-import javax.swing.JFrame;
-import javax.swing.SwingUtilities;
-
-import org.junit.Assert;
-import org.junit.BeforeClass;
-import org.junit.AfterClass;
-import org.junit.Ignore;
-import org.junit.Test;
-
-public class TestGearsGLJPanelAWT extends UITestCase {
-    static GLProfile glp;
-    static int width, height;
-
-    @BeforeClass
-    public static void initClass() {
-        GLProfile.initSingleton(false);
-        glp = GLProfile.getDefault();
-        Assert.assertNotNull(glp);
-        width  = 512;
-        height = 512;
-    }
-
-    @AfterClass
-    public static void releaseClass() {
-    }
-
-    protected void runTestGL(GLCapabilities caps)
-            throws AWTException, InterruptedException, InvocationTargetException
-    {
-        JFrame frame = new JFrame("Swing GLJPanel");
-        Assert.assertNotNull(frame);
-
-        GLJPanel glJPanel = new GLJPanel(caps);
-        Assert.assertNotNull(glJPanel);
-        glJPanel.addGLEventListener(new Gears());
-
-        FPSAnimator animator = new FPSAnimator(glJPanel, 60);
-
-        final JFrame _frame = frame;
-        final GLJPanel _glJPanel = glJPanel;
-        SwingUtilities.invokeAndWait(new Runnable() {
-                public void run() {
-                    _frame.getContentPane().add(_glJPanel, BorderLayout.CENTER);
-                    _frame.setSize(512, 512);
-                    _frame.setVisible(true);
-                } } ) ;
-
-        animator.start();
-        Assert.assertEquals(true, animator.isAnimating());
-
-        while(animator.isAnimating() && animator.getDuration()<duration) {
-            Thread.sleep(100);
-        }
-
-        Assert.assertNotNull(frame);
-        Assert.assertNotNull(glJPanel);
-        Assert.assertNotNull(animator);
-
-        animator.stop();
-        Assert.assertEquals(false, animator.isAnimating());
-        SwingUtilities.invokeAndWait(new Runnable() {
-                public void run() {
-                    _frame.setVisible(false);
-                    _frame.getContentPane().remove(_glJPanel);
-                    _frame.remove(_glJPanel);
-                    _glJPanel.destroy();
-                    _frame.dispose();
-                } } );
-    }
-
-    @Test
-    public void test01()
-            throws AWTException, InterruptedException, InvocationTargetException
-    {
-        GLCapabilities caps = new GLCapabilities(GLProfile.getDefault());
-        runTestGL(caps);
-    }
-
-    static long duration = 500; // ms
-
-    public static void main(String args[]) {
-        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(); }
-            }
-        }
-        org.junit.runner.JUnitCore.main(TestGearsGLJPanelAWT.class.getName());
-    }
-}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/TestGearsGLJPanelAWTBug450.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/TestGearsGLJPanelAWTBug450.java
deleted file mode 100644
index cd26825..0000000
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/TestGearsGLJPanelAWTBug450.java
+++ /dev/null
@@ -1,163 +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.demos.gl2.gears;
-
-import javax.media.opengl.*;
-
-import com.jogamp.opengl.util.FPSAnimator;
-
-import javax.media.opengl.awt.GLJPanel;
-import javax.media.opengl.glu.gl2.GLUgl2;
-
-import com.jogamp.opengl.test.junit.util.UITestCase;
-import java.awt.AWTException;
-import java.awt.BorderLayout;
-import java.lang.reflect.InvocationTargetException;
-import java.nio.ByteBuffer;
-
-import javax.swing.JFrame;
-import javax.swing.SwingUtilities;
-
-import org.junit.Assert;
-import org.junit.BeforeClass;
-import org.junit.AfterClass;
-import org.junit.Test;
-
-/**
- * Test for bug 450, which causes the right part of the frame to be black
- * for all x >= height.
- * 
- * Draws the Gears demo in a window that's twice as wide than it is tall,
- * and checks to see if a particular pixel in the right half of the frame
- * is colored.
- *
- * @author Wade Walker (adapted from TestGearsGLJPanelAWT)
- */
-public class TestGearsGLJPanelAWTBug450 extends UITestCase {
-    static GLProfile glp;
-    static int width, height;
-    /** 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() {
-        GLProfile.initSingleton(false);
-        glp = GLProfile.getDefault();
-        Assert.assertNotNull(glp);
-        width  = 512;
-        height = 256;
-    }
-
-    @AfterClass
-    public static void releaseClass() {
-    }
-
-    protected void runTestGL(GLCapabilities caps)
-            throws AWTException, InterruptedException, InvocationTargetException
-    {
-        JFrame frame = new JFrame("Swing GLJPanel");
-        Assert.assertNotNull(frame);
-
-        GLJPanel glJPanel = new GLJPanel(caps);
-        Assert.assertNotNull(glJPanel);
-        glJPanel.addGLEventListener(new Gears() {
-        	@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 );
-        	    byte byte0 = bytebuffer.get( 0 );
-        	    byte byte1 = bytebuffer.get( 1 );
-        	    byte byte2 = bytebuffer.get( 2 );
-        	    if( (byte0 == 0) && (byte1 == 0) && (byte2 == 0) )
-        	    	failed = true;
-        	}
-        });
-
-        FPSAnimator animator = new FPSAnimator(glJPanel, 60);
-
-        final JFrame _frame = frame;
-        final GLJPanel _glJPanel = glJPanel;
-        SwingUtilities.invokeAndWait(new Runnable() {
-                public void run() {
-                    _frame.getContentPane().add(_glJPanel, BorderLayout.CENTER);
-                    _frame.setSize(width, height);
-                    _frame.setVisible(true);
-                } } ) ;
-
-        animator.start();
-        Assert.assertEquals(true, animator.isAnimating());
-
-        while(animator.isAnimating() && animator.getDuration()<duration) {
-            Thread.sleep(100);
-        }
-
-        Assert.assertNotNull(frame);
-        Assert.assertNotNull(glJPanel);
-        Assert.assertNotNull(animator);
-
-        animator.stop();
-        Assert.assertEquals(false, animator.isAnimating());
-        SwingUtilities.invokeAndWait(new Runnable() {
-                public void run() {
-            		_frame.setVisible(false);
-                    _frame.getContentPane().remove(_glJPanel);
-                    _frame.remove(_glJPanel);
-                    _glJPanel.destroy();
-                    _frame.dispose();
-                } } );
-
-        Assert.assertFalse( failed );
-    }
-
-    @Test
-    public void test01()
-            throws AWTException, InterruptedException, InvocationTargetException
-    {
-        GLCapabilities caps = new GLCapabilities(GLProfile.getDefault());
-        runTestGL(caps);
-    }
-
-    static long duration = 500; // ms
-
-    public static void main(String args[]) {
-        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(); }
-            }
-        }
-        org.junit.runner.JUnitCore.main(TestGearsGLJPanelAWTBug450.class.getName());
-    }
-}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/newt/TestGearsNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/newt/TestGearsNEWT.java
deleted file mode 100644
index 0f7d77f..0000000
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/newt/TestGearsNEWT.java
+++ /dev/null
@@ -1,130 +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.demos.gl2.gears.newt;
-
-import com.jogamp.newt.event.KeyAdapter;
-import com.jogamp.newt.event.KeyEvent;
-import com.jogamp.newt.opengl.GLWindow;
-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.test.junit.jogl.demos.gl2.gears.Gears;
-import javax.media.opengl.GLAutoDrawable;
-import javax.media.opengl.GLCapabilities;
-import javax.media.opengl.GLProfile;
-import javax.media.opengl.GLRunnable;
-
-import org.junit.Assert;
-import org.junit.BeforeClass;
-import org.junit.AfterClass;
-import org.junit.Test;
-
-public class TestGearsNEWT extends UITestCase {
-    static GLProfile glp;
-    static int width, height;
-
-    @BeforeClass
-    public static void initClass() {
-        GLProfile.initSingleton(true);
-        glp = GLProfile.getDefault();
-        Assert.assertNotNull(glp);
-        width  = 512;
-        height = 512;
-    }
-
-    @AfterClass
-    public static void releaseClass() {
-    }
-
-    protected void runTestGL(GLCapabilities caps) throws InterruptedException {
-        GLWindow glWindow = GLWindow.create(caps);
-        Assert.assertNotNull(glWindow);
-        glWindow.setTitle("Gears NEWT Test");
-
-        glWindow.addGLEventListener(new Gears());
-
-        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);
-
-        final GLWindow f_glWindow = glWindow;
-        glWindow.addKeyListener(new KeyAdapter() {
-            public void keyTyped(KeyEvent e) {
-                if(e.getKeyChar()=='f') {
-                    new Thread() {
-                        public void run() {
-                            f_glWindow.setFullscreen(!f_glWindow.isFullscreen());
-                    } }.start();
-                } else if(e.getKeyChar()=='d') {
-                    new Thread() {
-                        public void run() {
-                            f_glWindow.setUndecorated(!f_glWindow.isUndecorated());
-                    } }.start();
-                }
-            }
-        });
-
-        glWindow.setSize(width, height);
-        glWindow.setVisible(true);
-        animator.start();
-
-        while(!quitAdapter.shouldQuit() && animator.isAnimating() && animator.getDuration()<duration) {
-            Thread.sleep(100);
-        }
-
-        animator.stop();
-        glWindow.invalidate();
-    }
-
-    @Test
-    public void test01() throws InterruptedException {
-        GLCapabilities caps = new GLCapabilities(GLProfile.getDefault());
-        runTestGL(caps);
-    }
-
-    static long duration = 500; // ms
-
-    public static void main(String args[]) {
-        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(); }
-            }
-        }
-        org.junit.runner.JUnitCore.main(TestGearsNEWT.class.getName());
-    }
-}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/newt/TestGearsNewtAWTWrapper.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/newt/TestGearsNewtAWTWrapper.java
deleted file mode 100644
index f05c20c..0000000
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/newt/TestGearsNewtAWTWrapper.java
+++ /dev/null
@@ -1,112 +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.demos.gl2.gears.newt;
-
-import javax.media.nativewindow.*;
-import javax.media.opengl.*;
-import com.jogamp.opengl.util.Animator;
-
-import com.jogamp.opengl.test.junit.util.UITestCase;
-import com.jogamp.opengl.test.junit.util.QuitAdapter;
-import com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.Gears;
-import com.jogamp.newt.*;
-import com.jogamp.newt.event.*;
-import com.jogamp.newt.opengl.*;
-
-import org.junit.Assert;
-import org.junit.BeforeClass;
-import org.junit.AfterClass;
-import org.junit.Test;
-
-public class TestGearsNewtAWTWrapper extends UITestCase {
-    static GLProfile glp;
-    static int width, height;
-
-    @BeforeClass
-    public static void initClass() {
-        GLProfile.initSingleton(true);
-        glp = GLProfile.getDefault();
-        Assert.assertNotNull(glp);
-        width  = 512;
-        height = 512;
-    }
-
-    @AfterClass
-    public static void releaseClass() {
-    }
-
-    protected void runTestGL(GLCapabilitiesImmutable caps) throws InterruptedException {
-        Display nDisplay = NewtFactory.createDisplay(NativeWindowFactory.TYPE_AWT, null, false); // local display
-        Screen nScreen  = NewtFactory.createScreen(nDisplay, 0); // screen 0
-        Window nWindow = NewtFactory.createWindow(nScreen, caps);
-
-        GLWindow glWindow = GLWindow.create(nWindow);
-        Assert.assertNotNull(glWindow);
-        glWindow.setTitle("Gears NewtAWTWrapper Test");
-
-        glWindow.addGLEventListener(new Gears());
-
-        Animator animator = new Animator(glWindow);
-        QuitAdapter quitAdapter = new QuitAdapter();
-
-        glWindow.addKeyListener(new TraceKeyAdapter(quitAdapter));
-        glWindow.addWindowListener(new TraceWindowAdapter(quitAdapter));
-
-        glWindow.setSize(width, height);
-        glWindow.setVisible(true);
-        animator.start();
-
-        while(!quitAdapter.shouldQuit() && animator.isAnimating() && animator.getDuration()<duration) {
-            Thread.sleep(100);
-        }
-
-        animator.stop();
-        glWindow.invalidate();
-    }
-
-    @Test
-    public void test01() throws InterruptedException {
-        GLCapabilitiesImmutable caps = new GLCapabilities(GLProfile.getDefault());
-        runTestGL(caps);
-    }
-
-    static long duration = 500; // ms
-
-    public static void main(String args[]) {
-        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(); }
-            }
-        }
-        org.junit.runner.JUnitCore.main(TestGearsNewtAWTWrapper.class.getName());
-    }
-}
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
new file mode 100644
index 0000000..4b6f799
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/newt/TestGearsNEWT.java
@@ -0,0 +1,133 @@
+/**
+ * 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.demos.gl2.newt;
+
+import com.jogamp.newt.event.KeyAdapter;
+import com.jogamp.newt.event.KeyEvent;
+import com.jogamp.newt.opengl.GLWindow;
+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.test.junit.jogl.demos.gl2.Gears;
+
+import javax.media.opengl.FPSCounter;
+import javax.media.opengl.GLAutoDrawable;
+import javax.media.opengl.GLCapabilities;
+import javax.media.opengl.GLProfile;
+import javax.media.opengl.GLRunnable;
+
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.AfterClass;
+import org.junit.Test;
+
+public class TestGearsNEWT extends UITestCase {
+    static GLProfile glp;
+    static int width, height;
+
+    @BeforeClass
+    public static void initClass() {
+        GLProfile.initSingleton(true);
+        glp = GLProfile.getDefault();
+        Assert.assertNotNull(glp);
+        width  = 512;
+        height = 512;
+    }
+
+    @AfterClass
+    public static void releaseClass() {
+    }
+
+    protected void runTestGL(GLCapabilities caps) throws InterruptedException {
+        GLWindow glWindow = GLWindow.create(caps);
+        Assert.assertNotNull(glWindow);
+        glWindow.setTitle("Gears NEWT Test");
+
+        glWindow.addGLEventListener(new Gears());
+
+        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);
+
+        final GLWindow f_glWindow = glWindow;
+        glWindow.addKeyListener(new KeyAdapter() {
+            public void keyTyped(KeyEvent e) {
+                if(e.getKeyChar()=='f') {
+                    new Thread() {
+                        public void run() {
+                            f_glWindow.setFullscreen(!f_glWindow.isFullscreen());
+                    } }.start();
+                } else if(e.getKeyChar()=='d') {
+                    new Thread() {
+                        public void run() {
+                            f_glWindow.setUndecorated(!f_glWindow.isUndecorated());
+                    } }.start();
+                }
+            }
+        });
+
+        glWindow.setSize(width, height);
+        glWindow.setVisible(true);
+        animator.setUpdateFPSFrames(1, null);
+        animator.start();
+
+        while(!quitAdapter.shouldQuit() && animator.isAnimating() && animator.getTotalFPSDuration()<duration) {
+            Thread.sleep(100);
+        }
+
+        animator.stop();
+        glWindow.destroy();
+    }
+
+    @Test
+    public void test01() throws InterruptedException {
+        GLCapabilities caps = new GLCapabilities(GLProfile.getDefault());
+        runTestGL(caps);
+    }
+
+    static long duration = 500; // ms
+
+    public static void main(String args[]) {
+        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(); }
+            }
+        }
+        org.junit.runner.JUnitCore.main(TestGearsNEWT.class.getName());
+    }
+}
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
new file mode 100644
index 0000000..e05c588
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/newt/TestGearsNewtAWTWrapper.java
@@ -0,0 +1,113 @@
+/**
+ * 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.demos.gl2.newt;
+
+import javax.media.nativewindow.*;
+import javax.media.opengl.*;
+
+import com.jogamp.opengl.util.Animator;
+
+import com.jogamp.opengl.test.junit.util.UITestCase;
+import com.jogamp.opengl.test.junit.util.QuitAdapter;
+import com.jogamp.opengl.test.junit.jogl.demos.gl2.Gears;
+import com.jogamp.newt.*;
+import com.jogamp.newt.event.*;
+import com.jogamp.newt.opengl.*;
+
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.AfterClass;
+import org.junit.Test;
+
+public class TestGearsNewtAWTWrapper extends UITestCase {
+    static GLProfile glp;
+    static int width, height;
+
+    @BeforeClass
+    public static void initClass() {
+        glp = GLProfile.getDefault();
+        Assert.assertNotNull(glp);
+        width  = 512;
+        height = 512;
+    }
+
+    @AfterClass
+    public static void releaseClass() {
+    }
+
+    protected void runTestGL(GLCapabilitiesImmutable caps) throws InterruptedException {
+        Display nDisplay = NewtFactory.createDisplay(NativeWindowFactory.TYPE_AWT, null, false); // local display
+        Screen nScreen  = NewtFactory.createScreen(nDisplay, 0); // screen 0
+        Window nWindow = NewtFactory.createWindow(nScreen, caps);
+
+        GLWindow glWindow = GLWindow.create(nWindow);
+        Assert.assertNotNull(glWindow);
+        glWindow.setTitle("Gears NewtAWTWrapper Test");
+
+        glWindow.addGLEventListener(new Gears());
+
+        Animator animator = new Animator(glWindow);
+        QuitAdapter quitAdapter = new QuitAdapter();
+
+        glWindow.addKeyListener(new TraceKeyAdapter(quitAdapter));
+        glWindow.addWindowListener(new TraceWindowAdapter(quitAdapter));
+
+        glWindow.setSize(width, height);
+        glWindow.setVisible(true);
+        animator.setUpdateFPSFrames(1, null);        
+        animator.start();
+
+        while(!quitAdapter.shouldQuit() && animator.isAnimating() && animator.getTotalFPSDuration()<duration) {
+            Thread.sleep(100);
+        }
+
+        animator.stop();
+        glWindow.destroy();
+    }
+
+    @Test
+    public void test01() throws InterruptedException {
+        GLCapabilitiesImmutable caps = new GLCapabilities(GLProfile.getDefault());
+        runTestGL(caps);
+    }
+
+    static long duration = 500; // ms
+
+    public static void main(String args[]) {
+        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(); }
+            }
+        }
+        org.junit.runner.JUnitCore.main(TestGearsNewtAWTWrapper.class.getName());
+    }
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/drawable/TestDrawable01NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/drawable/TestDrawable01NEWT.java
index 8897dc6..5568b42 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/drawable/TestDrawable01NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/drawable/TestDrawable01NEWT.java
@@ -145,7 +145,7 @@ public class TestDrawable01NEWT extends UITestCase {
 
         // GLWindow.destroy(..) sequence cont..
         Assert.assertNotNull(window);
-        window.invalidate();
+        window.destroy();
 
         drawable = null;
         context = null;
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/glsl/GLSLMiscHelper.java b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/GLSLMiscHelper.java
new file mode 100644
index 0000000..ae08b64
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/GLSLMiscHelper.java
@@ -0,0 +1,198 @@
+/**
+ * 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.glsl;
+
+import com.jogamp.opengl.util.GLArrayDataServer;
+import com.jogamp.opengl.util.glsl.ShaderState;
+
+import javax.media.opengl.GL;
+import javax.media.opengl.GL2ES2;
+import javax.media.opengl.GLDrawable;
+
+import org.junit.Assert;
+
+public class GLSLMiscHelper {
+    public static final int frames_perftest =  10000; // frames
+    public static final int frames_warmup   =    500; // frames
+    
+    public static void validateGLArrayDataServerState(GL2ES2 gl, GLArrayDataServer data) {
+        final ShaderState st = ShaderState.getShaderState(gl);
+        int[] qi = new int[1];
+        if(null != st) {            
+            Assert.assertEquals(data, st.getAttribute(data.getName()));            
+            if(st.shaderProgram().linked()) {
+                Assert.assertEquals(data.getLocation(), st.getCachedAttribLocation(data.getName()));
+                Assert.assertEquals(data.getLocation(), st.getAttribLocation(gl, data));
+                Assert.assertEquals(data.getLocation(), st.getAttribLocation(gl, data.getName()));
+                Assert.assertEquals(data.getLocation(), gl.glGetAttribLocation(st.shaderProgram().program(), data.getName()));                
+            }
+        }
+        gl.glGetVertexAttribiv(data.getLocation(), GL2ES2.GL_VERTEX_ATTRIB_ARRAY_ENABLED, qi, 0);
+        Assert.assertEquals(data.enabled()?GL.GL_TRUE:GL.GL_FALSE, qi[0]);
+        gl.glGetVertexAttribiv(data.getLocation(), GL2ES2.GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING, qi, 0);
+        Assert.assertEquals(data.getVBOName(), qi[0]);  
+        Assert.assertEquals(data.getSizeInBytes(), gl.glGetBufferSize(data.getVBOName()));        
+    }
+
+    public static void pause(long ms) throws InterruptedException {
+        long t0 = System.currentTimeMillis();
+        while( System.currentTimeMillis() - t0 < ms) {
+            Thread.sleep(ms);
+        }        
+    }
+    
+    public static void displayVCArrays(GLDrawable drawable, GL2ES2 gl, boolean preEnable, GLArrayDataServer vertices, GLArrayDataServer colors, boolean postDisable, int num, long postDelay) throws InterruptedException {
+        System.err.println("screen #"+num);
+        if(preEnable) {
+            vertices.enableBuffer(gl, true);
+            // invalid - Assert.assertEquals(vertices.getVBOName(), gl.glGetBoundBuffer(GL.GL_ARRAY_BUFFER));
+            colors.enableBuffer(gl, true);
+            // invalid - Assert.assertEquals(colors.getVBOName(), gl.glGetBoundBuffer(GL.GL_ARRAY_BUFFER));
+            //
+            // Above assertions are invalid, since GLSLArrayHandler will not bind the VBO to target
+            // if the VBO is already bound to the attribute itself.
+            // validateGLArrayDataServerState(..) does check proper VBO to attribute binding.
+        }
+        Assert.assertTrue(vertices.enabled());
+        Assert.assertTrue(colors.enabled());
+        
+        validateGLArrayDataServerState(gl, vertices);
+        validateGLArrayDataServerState(gl, colors);
+        gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
+        gl.glDrawArrays(GL.GL_TRIANGLE_STRIP, 0, 4);        
+        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
+        if(postDisable) {
+            vertices.enableBuffer(gl, false);
+            colors.enableBuffer(gl, false);
+            Assert.assertTrue(!vertices.enabled());
+            Assert.assertTrue(!colors.enabled());
+        }
+        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
+        drawable.swapBuffers();
+        if(postDelay>0) { pause(postDelay); }        
+    }
+    
+    public static void displayVCArraysNoChecks(GLDrawable drawable, GL2ES2 gl, boolean preEnable, GLArrayDataServer vertices, GLArrayDataServer colors, boolean postDisable) throws InterruptedException {
+        if(preEnable) {
+            vertices.enableBuffer(gl, true);
+            colors.enableBuffer(gl, true);
+        }
+        gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
+        gl.glDrawArrays(GL.GL_TRIANGLE_STRIP, 0, 4);        
+        if(postDisable) {
+            vertices.enableBuffer(gl, false);
+            colors.enableBuffer(gl, false);
+        }
+        drawable.swapBuffers();
+    }
+    
+    public static GLArrayDataServer createRSVertices0(GL2ES2 gl, int location) {
+        final ShaderState st = ShaderState.getShaderState(gl);
+        
+        // Allocate Vertex Array0
+        GLArrayDataServer vertices0 = GLArrayDataServer.createGLSL("mgl_Vertex", 3, GL.GL_FLOAT, false, 4, GL.GL_STATIC_DRAW);
+        if(0<=location) {
+            st.bindAttribLocation(gl, location, vertices0);
+        }
+        Assert.assertTrue(vertices0.isVBO());
+        Assert.assertTrue(vertices0.isVertexAttribute());
+        Assert.assertTrue(!vertices0.isVBOWritten());
+        Assert.assertTrue(!vertices0.sealed());
+        vertices0.putf(-2); vertices0.putf(2);  vertices0.putf(0);
+        vertices0.putf(2);  vertices0.putf(2);  vertices0.putf(0);
+        vertices0.putf(-2); vertices0.putf(-2); vertices0.putf(0);
+        vertices0.putf(2);  vertices0.putf(-2); vertices0.putf(0);
+        vertices0.seal(gl, true);
+        Assert.assertTrue(vertices0.isVBOWritten());
+        Assert.assertTrue(vertices0.sealed());
+        Assert.assertEquals(4, vertices0.getElementCount());
+        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());        
+        Assert.assertEquals(vertices0.getVBOName(), gl.glGetBoundBuffer(GL.GL_ARRAY_BUFFER));
+        validateGLArrayDataServerState(gl, vertices0);
+        return vertices0;
+    }
+        
+    public static GLArrayDataServer createRSVertices1(GL2ES2 gl) {            
+        GLArrayDataServer vertices1 = GLArrayDataServer.createGLSL("mgl_Vertex", 3, GL.GL_FLOAT, false, 4, GL.GL_STATIC_DRAW); 
+        Assert.assertTrue(vertices1.isVBO());
+        Assert.assertTrue(vertices1.isVertexAttribute());
+        Assert.assertTrue(!vertices1.isVBOWritten());
+        Assert.assertTrue(!vertices1.sealed());
+        vertices1.putf(-2); vertices1.putf(1);  vertices1.putf(0);
+        vertices1.putf(2);  vertices1.putf(1);  vertices1.putf(0);
+        vertices1.putf(-2); vertices1.putf(-1); vertices1.putf(0);
+        vertices1.putf(2);  vertices1.putf(-1); vertices1.putf(0);
+        vertices1.seal(gl, true);
+        Assert.assertTrue(vertices1.isVBOWritten());
+        Assert.assertTrue(vertices1.sealed());
+        Assert.assertEquals(4, vertices1.getElementCount());
+        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
+        Assert.assertEquals(vertices1.getVBOName(), gl.glGetBoundBuffer(GL.GL_ARRAY_BUFFER));
+        validateGLArrayDataServerState(gl, vertices1);
+        return vertices1;
+    }
+        
+    public static GLArrayDataServer createRSColors0(GL2ES2 gl, int location) {
+        final ShaderState st = ShaderState.getShaderState(gl);
+        GLArrayDataServer colors0 = GLArrayDataServer.createGLSL("mgl_Color", 4, GL.GL_FLOAT, false, 4, GL.GL_STATIC_DRAW);
+        if(0<=location) {
+            st.bindAttribLocation(gl, location, colors0);
+        }        
+        colors0.putf(1); colors0.putf(0); colors0.putf(0); colors0.putf(1);
+        colors0.putf(0); colors0.putf(0); colors0.putf(1); colors0.putf(1);
+        colors0.putf(1); colors0.putf(0); colors0.putf(0); colors0.putf(1);
+        colors0.putf(1); colors0.putf(0); colors0.putf(0); colors0.putf(1);
+        colors0.seal(gl, true);
+        Assert.assertTrue(colors0.isVBO());
+        Assert.assertTrue(colors0.isVertexAttribute());
+        Assert.assertTrue(colors0.isVBOWritten());
+        Assert.assertTrue(colors0.sealed());
+        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
+        Assert.assertEquals(colors0.getVBOName(), gl.glGetBoundBuffer(GL.GL_ARRAY_BUFFER));
+        validateGLArrayDataServerState(gl, colors0);
+        return colors0;
+    }
+    
+    public static GLArrayDataServer createRSColors1(GL2ES2 gl) {        
+        // Allocate Color Array1
+        GLArrayDataServer colors1 = GLArrayDataServer.createGLSL("mgl_Color", 4, GL.GL_FLOAT, false, 4, GL.GL_STATIC_DRAW);
+        colors1.putf(1); colors1.putf(0); colors1.putf(1); colors1.putf(1);
+        colors1.putf(0); colors1.putf(1); colors1.putf(0); colors1.putf(1);
+        colors1.putf(1); colors1.putf(0); colors1.putf(1); colors1.putf(1);
+        colors1.putf(1); colors1.putf(0); colors1.putf(1); colors1.putf(1);
+        colors1.seal(gl, true);
+        Assert.assertTrue(colors1.isVBO());
+        Assert.assertTrue(colors1.isVertexAttribute());
+        Assert.assertTrue(colors1.isVBOWritten());
+        Assert.assertTrue(colors1.sealed());
+        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
+        Assert.assertEquals(colors1.getVBOName(), gl.glGetBoundBuffer(GL.GL_ARRAY_BUFFER));
+        validateGLArrayDataServerState(gl, colors1);
+        return colors1;        
+    }    
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestFBOMRTNEWT01.java b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestFBOMRTNEWT01.java
new file mode 100644
index 0000000..9dd9200
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestFBOMRTNEWT01.java
@@ -0,0 +1,230 @@
+/**
+ * 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.glsl;
+
+import com.jogamp.opengl.util.FBObject;
+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;
+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;
+import com.jogamp.opengl.test.junit.util.UITestCase;
+
+import java.io.IOException;
+
+import javax.media.opengl.GL;
+import javax.media.opengl.GL2ES2;
+import javax.media.opengl.GL2GL3;
+import javax.media.opengl.GLDrawable;
+import javax.media.opengl.GLProfile;
+import javax.media.opengl.GLUniformData;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.BeforeClass;
+
+public class TestFBOMRTNEWT01 extends UITestCase {
+    static long durationPerTest = 10; // ms
+
+    @BeforeClass
+    public static void initClass() {
+        GLProfile.initSingleton(true);
+    }
+    
+    @Test
+    public void test01() throws InterruptedException {
+        // preset ..
+        final NEWTGLContext.WindowContext winctx = NEWTGLContext.createOnscreenWindow(GLProfile.getGL2ES2(), 640, 480, true);
+        final GLDrawable drawable = winctx.context.getGLDrawable();
+        final GL _gl = winctx.context.getGL();
+        Assert.assertTrue(_gl.isGL2GL3());
+        final GL2GL3 gl = _gl.getGL2GL3();
+        System.err.println(winctx.context);
+
+        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
+        // test code ..        
+        final ShaderState st = new ShaderState();
+        // st.setVerbose(true);
+        
+        final ShaderCode vp0 = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, 1, RedSquareES2.class,
+                "shader", "shader/bin", "fbo-mrt-1");
+        final ShaderCode fp0 = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, 1, RedSquareES2.class,
+                "shader", "shader/bin", "fbo-mrt-1");
+        final ShaderProgram sp0 = new ShaderProgram();
+        sp0.add(gl, vp0, System.err);
+        sp0.add(gl, fp0, System.err);       
+        Assert.assertTrue(0<=sp0.program()); 
+        Assert.assertTrue(!sp0.inUse());
+        Assert.assertTrue(!sp0.linked());
+        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());        
+        st.attachShaderProgram(gl, sp0);
+        
+        final ShaderCode vp1 = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, 1, RedSquareES2.class,
+                "shader", "shader/bin", "fbo-mrt-2");
+        final ShaderCode fp1 = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, 1, RedSquareES2.class,
+                "shader", "shader/bin", "fbo-mrt-2");
+        final ShaderProgram sp1 = new ShaderProgram();
+        sp1.add(gl, vp1, System.err);
+        sp1.add(gl, fp1, System.err);       
+        Assert.assertTrue(0<=sp1.program()); 
+        Assert.assertTrue(!sp1.inUse());
+        Assert.assertTrue(!sp1.linked());
+        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());        
+        st.attachShaderProgram(gl, sp1);
+        st.useProgram(gl, true);
+                        
+        final PMVMatrix pmvMatrix = new PMVMatrix();
+        final GLUniformData pmvMatrixUniform = new GLUniformData("gcu_PMVMatrix", 4, 4, pmvMatrix.glGetPMvMatrixf());
+        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
+        st.ownUniform(pmvMatrixUniform);       
+        st.uniform(gl, pmvMatrixUniform);
+        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
+        
+        final GLArrayDataServer vertices0 = GLArrayDataServer.createGLSL("gca_Vertices", 3, GL.GL_FLOAT, false, 4, GL.GL_STATIC_DRAW);
+        // st.bindAttribLocation(gl, 0, vertices0);
+        vertices0.putf(0); vertices0.putf(1);  vertices0.putf(0);
+        vertices0.putf(1);  vertices0.putf(1);  vertices0.putf(0);
+        vertices0.putf(0); vertices0.putf(0); vertices0.putf(0);
+        vertices0.putf(1);  vertices0.putf(0); vertices0.putf(0);
+        vertices0.seal(gl, true);
+        st.ownAttribute(vertices0, true);
+        vertices0.enableBuffer(gl, false);
+        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
+        
+        final GLArrayDataServer colors0 = GLArrayDataServer.createGLSL("gca_Colors", 4, GL.GL_FLOAT, false, 4, GL.GL_STATIC_DRAW);
+        // st.bindAttribLocation(gl, 1, colors0);
+        colors0.putf(1); colors0.putf(0);  colors0.putf(1); colors0.putf(1);
+        colors0.putf(0);  colors0.putf(0);  colors0.putf(1); colors0.putf(1);
+        colors0.putf(0); colors0.putf(0); colors0.putf(0); colors0.putf(1);
+        colors0.putf(0);  colors0.putf(1); colors0.putf(1); colors0.putf(1);
+        colors0.seal(gl, true);
+        st.ownAttribute(colors0, true);
+        colors0.enableBuffer(gl, false);
+        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
+        
+        final GLUniformData texUnit0 = new GLUniformData("gcs_TexUnit0", 0);
+        st.ownUniform(texUnit0);       
+        st.uniform(gl, texUnit0);
+        final GLUniformData texUnit1 = new GLUniformData("gcs_TexUnit1", 1);
+        st.ownUniform(texUnit1);       
+        st.uniform(gl, texUnit1);
+                
+        final GLArrayDataServer texCoords0 = GLArrayDataServer.createGLSL("gca_TexCoords", 2, GL.GL_FLOAT, false, 4, GL.GL_STATIC_DRAW);
+        // st.bindAttribLocation(gl, 2, texCoords0);
+        texCoords0.putf(0f); texCoords0.putf(1f);
+        texCoords0.putf(1f);  texCoords0.putf(1f);
+        texCoords0.putf(0f); texCoords0.putf(0f);
+        texCoords0.putf(1f);  texCoords0.putf(0f);        
+        texCoords0.seal(gl, true);
+        st.ownAttribute(texCoords0, true);
+        texCoords0.enableBuffer(gl, false);
+        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
+
+        // 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) );
+        Assert.assertTrue( fbo_mrt.isStatusValid() ) ;
+        fbo_mrt.unbind(gl);
+        
+        // misc GL setup
+        gl.glClearColor(1, 1, 1, 1);
+        gl.glEnable(GL2ES2.GL_DEPTH_TEST);
+        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
+
+        // reshape
+        pmvMatrix.glMatrixMode(PMVMatrix.GL_PROJECTION);
+        pmvMatrix.glLoadIdentity();
+        pmvMatrix.glOrthof(0f, 1f, 0f, 1f, -10f, 10f);
+        pmvMatrix.glMatrixMode(PMVMatrix.GL_MODELVIEW);
+        pmvMatrix.glLoadIdentity();
+        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[] bck_buffers = new int[] { GL2GL3.GL_BACK_LEFT };
+        
+        for(int i=0; i<durationPerTest; i+=50) {
+            // pass 1 - MRT: Red -> buffer0, Green -> buffer1
+            st.attachShaderProgram(gl, sp0);           
+            vertices0.enableBuffer(gl, true);
+            colors0.enableBuffer(gl, true);
+            
+            fbo_mrt.bind(gl);
+            gl.glDrawBuffers(2, two_buffers, 0);
+            gl.glViewport(0, 0, fbo_mrt.getWidth(), fbo_mrt.getHeight());        
+            
+            gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
+            gl.glDrawArrays(GL.GL_TRIANGLE_STRIP, 0, 4);
+            fbo_mrt.unbind(gl);
+            vertices0.enableBuffer(gl, false);
+            colors0.enableBuffer(gl, false);
+            
+            // pass 2 - mix buffer0, buffer1 and blue
+            // rg = buffer0.rg + buffer1.rg, b = Blue - length(rg);
+            st.attachShaderProgram(gl, sp1);
+            vertices0.enableBuffer(gl, true);
+            colors0.enableBuffer(gl, true);
+            texCoords0.enableBuffer(gl, true);
+            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.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
+            gl.glDrawArrays(GL.GL_TRIANGLE_STRIP, 0, 4);
+            fbo_mrt.unuse(gl);
+            vertices0.enableBuffer(gl, false);
+            colors0.enableBuffer(gl, false);
+            texCoords0.enableBuffer(gl, false);
+            
+            drawable.swapBuffers();
+            Thread.sleep(50);
+        }
+        
+        NEWTGLContext.destroyWindow(winctx);
+    }
+    
+    public static void main(String args[]) throws IOException {
+        System.err.println("main - start");
+        for(int i=0; i<args.length; i++) {
+            if(args[i].equals("-time")) {
+                durationPerTest = MiscUtils.atoi(args[++i], (int)durationPerTest);
+            }
+        }
+        String tstname = TestFBOMRTNEWT01.class.getName();
+        org.junit.runner.JUnitCore.main(tstname);
+        System.err.println("main - end");
+    }    
+}
+
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
new file mode 100644
index 0000000..6729383
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLShaderState01NEWT.java
@@ -0,0 +1,408 @@
+/**
+ * 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.glsl;
+
+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;
+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;
+import com.jogamp.opengl.test.junit.util.UITestCase;
+
+import java.io.IOException;
+import javax.media.opengl.GL;
+import javax.media.opengl.GL2ES2;
+import javax.media.opengl.GLDrawable;
+import javax.media.opengl.GLProfile;
+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
+ * and shader state in general.
+ */
+public class TestGLSLShaderState01NEWT extends UITestCase {
+    static long durationPerTest = 10; // ms
+
+    static final int vertices0_loc = 0; // FIXME: AMD needs this to be location 0 ? hu ?
+    static final int colors0_loc = 1;
+    
+    @BeforeClass
+    public static void initClass() {
+        GLProfile.initSingleton(true);
+    }
+    
+    @Test
+    public void testShaderState01Validation() throws InterruptedException {
+        // preset ..
+        final NEWTGLContext.WindowContext winctx = NEWTGLContext.createOnscreenWindow(GLProfile.getGL2ES2(), 480, 480, true);
+        final GLDrawable drawable = winctx.context.getGLDrawable();
+        final GL2ES2 gl = winctx.context.getGL().getGL2ES2();
+        System.err.println(winctx.context);
+
+        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
+        
+        // test code ..        
+        final ShaderState st = new ShaderState();
+        
+        final ShaderCode rsVp = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, 1, RedSquareES2.class,
+                "shader", "shader/bin", "RedSquareShader");
+        final ShaderCode rsFp = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, 1, RedSquareES2.class,
+                "shader", "shader/bin", "RedSquareShader");
+
+        final ShaderProgram sp = new ShaderProgram();
+        Assert.assertTrue(0>sp.program());
+        
+        sp.add(gl, rsVp, System.err);
+        sp.add(gl, rsFp, System.err);
+        
+        Assert.assertTrue(0<=sp.program()); 
+        Assert.assertTrue(!sp.inUse());
+        Assert.assertTrue(!sp.linked());
+        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
+        
+        st.attachShaderProgram(gl, sp);
+        
+        Assert.assertEquals(null, ShaderState.getShaderState(gl));
+        st.setShaderState(gl); // pre-use attach
+        Assert.assertEquals(st, ShaderState.getShaderState(gl));
+        
+        // Allocate Vertex Array0
+        final GLArrayDataServer vertices0 = GLSLMiscHelper.createRSVertices0(gl, vertices0_loc);
+        System.err.println("vertices0: " + vertices0);        
+        vertices0.enableBuffer(gl, false);
+        Assert.assertEquals(vertices0_loc, vertices0.getLocation());
+        st.ownAttribute(vertices0, true);
+        
+        // Allocate Color Array0
+        final GLArrayDataServer colors0 = GLSLMiscHelper.createRSColors0(gl, colors0_loc);
+        System.err.println("colors0: " + colors0);
+        colors0.enableBuffer(gl, false);
+        Assert.assertEquals(colors0_loc, colors0.getLocation());
+        st.ownAttribute(colors0, true);
+                               
+        Assert.assertTrue(sp.link(gl, System.err));
+        Assert.assertTrue(sp.linked());
+        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
+        
+        Assert.assertEquals(vertices0_loc, vertices0.getLocation());
+        GLSLMiscHelper.validateGLArrayDataServerState(gl, vertices0);
+        
+        Assert.assertEquals(colors0_loc, colors0.getLocation());
+        GLSLMiscHelper.validateGLArrayDataServerState(gl, colors0);
+        
+        st.useProgram(gl, true);
+        Assert.assertTrue(sp.inUse());
+        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
+        
+        // setup mgl_PMVMatrix
+        final PMVMatrix pmvMatrix = new PMVMatrix();
+        final GLUniformData pmvMatrixUniform = new GLUniformData("mgl_PMVMatrix", 4, 4, pmvMatrix.glGetPMvMatrixf());
+        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
+        st.ownUniform(pmvMatrixUniform);
+        
+        st.uniform(gl, pmvMatrixUniform);
+        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
+        Assert.assertEquals(pmvMatrixUniform, st.getUniform("mgl_PMVMatrix"));
+        
+        // Allocate Vertex Array1
+        final GLArrayDataServer vertices1 = GLSLMiscHelper.createRSVertices1(gl);
+        System.err.println("vertices1: " + vertices1);
+        vertices1.enableBuffer(gl, false);
+        GLSLMiscHelper.validateGLArrayDataServerState(gl, vertices1);
+        st.ownAttribute(vertices1, true);
+        
+        // Allocate Color Array1
+        final GLArrayDataServer colors1 = GLSLMiscHelper.createRSColors1(gl);
+        System.err.println("colors1: " + colors1);
+        colors1.enableBuffer(gl, false);
+        GLSLMiscHelper.validateGLArrayDataServerState(gl, colors1);
+        st.ownAttribute(colors0, true);
+        
+        // misc GL setup
+        gl.glClearColor(0, 0, 0, 1);
+        gl.glEnable(GL2ES2.GL_DEPTH_TEST);
+        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
+
+        // reshape
+        pmvMatrix.glMatrixMode(PMVMatrix.GL_PROJECTION);
+        pmvMatrix.glLoadIdentity();
+        pmvMatrix.gluPerspective(45.0F, (float) drawable.getWidth() / (float) drawable.getHeight(), 1.0F, 100.0F);
+        pmvMatrix.glMatrixMode(PMVMatrix.GL_MODELVIEW);
+        pmvMatrix.glLoadIdentity();
+        pmvMatrix.glTranslatef(0, 0, -10);
+        st.uniform(gl, pmvMatrixUniform);
+        gl.glViewport(0, 0, drawable.getWidth(), drawable.getHeight());        
+        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
+        
+        // display #1 vertices0 / colors0 (post-disable)
+        GLSLMiscHelper.displayVCArrays(drawable, gl, true, vertices0, colors0, true, 1, durationPerTest);
+
+        // display #2 #1 vertices1 / colors1 (post-disable)
+        GLSLMiscHelper.displayVCArrays(drawable, gl, true, vertices1, colors1, true, 2, durationPerTest);
+        
+        // display #3 vertices0 / colors0 (post-disable)
+        GLSLMiscHelper.displayVCArrays(drawable, gl, true, vertices0, colors0, true, 3, durationPerTest);
+        
+        // cleanup
+        st.destroy(gl);
+        
+        NEWTGLContext.destroyWindow(winctx);
+    }
+
+    @Test(timeout=120000)
+    public void testShaderState00PerformanceSingleKeepEnabled() throws InterruptedException {
+        testShaderState00PerformanceSingle(false);
+    }
+    @Test(timeout=120000)
+    public void testShaderState00PerformanceSingleToggleEnable() throws InterruptedException {
+        testShaderState00PerformanceSingle(true);
+    }
+    
+    void testShaderState00PerformanceSingle(boolean toggleEnable) throws InterruptedException {
+        // preset ..
+        final NEWTGLContext.WindowContext winctx = NEWTGLContext.createOnscreenWindow(GLProfile.getGL2ES2(), 480, 480, false);
+        final GLDrawable drawable = winctx.context.getGLDrawable();
+        final GL2ES2 gl = winctx.context.getGL().getGL2ES2();
+        System.err.println(winctx.context);
+        gl.setSwapInterval(0);
+        
+        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
+        
+        // test code ..        
+        final ShaderState st = new ShaderState();
+        
+        final ShaderCode rsVp = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, 1, RedSquareES2.class,
+                "shader", "shader/bin", "RedSquareShader");
+        final ShaderCode rsFp = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, 1, RedSquareES2.class,
+                "shader", "shader/bin", "RedSquareShader");
+
+        final ShaderProgram sp = new ShaderProgram();
+        sp.add(rsVp);
+        sp.add(rsFp);
+        
+        sp.init(gl);
+        Assert.assertTrue(sp.link(gl, System.err));
+        
+        st.attachShaderProgram(gl, sp);        
+        st.useProgram(gl, true);
+        
+        // setup mgl_PMVMatrix
+        final PMVMatrix pmvMatrix = new PMVMatrix();
+        final GLUniformData pmvMatrixUniform = new GLUniformData("mgl_PMVMatrix", 4, 4, pmvMatrix.glGetPMvMatrixf());       
+        st.ownUniform(pmvMatrixUniform);
+        st.uniform(gl, pmvMatrixUniform);
+        
+        // Allocate Vertex Array0
+        final GLArrayDataServer vertices0 = GLSLMiscHelper.createRSVertices0(gl, -1);
+        st.ownAttribute(vertices0, true);
+        vertices0.enableBuffer(gl, toggleEnable ? false : true);
+        
+        // Allocate Color Array0
+        final GLArrayDataServer colors0 = GLSLMiscHelper.createRSColors0(gl, -1);
+        st.ownAttribute(colors0, true);
+        colors0.enableBuffer(gl, toggleEnable ? false : true);
+        
+        // misc GL setup
+        gl.glClearColor(0, 0, 0, 1);
+        gl.glEnable(GL2ES2.GL_DEPTH_TEST);
+
+        // reshape
+        pmvMatrix.glMatrixMode(PMVMatrix.GL_PROJECTION);
+        pmvMatrix.glLoadIdentity();
+        pmvMatrix.gluPerspective(45.0F, (float) drawable.getWidth() / (float) drawable.getHeight(), 1.0F, 100.0F);
+        pmvMatrix.glMatrixMode(PMVMatrix.GL_MODELVIEW);
+        pmvMatrix.glLoadIdentity();
+        pmvMatrix.glTranslatef(0, 0, -10);
+        st.uniform(gl, pmvMatrixUniform);
+        gl.glViewport(0, 0, drawable.getWidth(), drawable.getHeight());        
+
+        gl.setSwapInterval(0);
+        
+        // validation ..
+        GLSLMiscHelper.displayVCArrays(drawable, gl, toggleEnable, vertices0, colors0, toggleEnable, 1, 0);
+        
+        // warmup ..
+        for(int frames=0; frames<GLSLMiscHelper.frames_warmup; frames++) {
+            GLSLMiscHelper.displayVCArraysNoChecks(drawable, gl, toggleEnable, vertices0, colors0, toggleEnable);
+        }
+        
+        // measure ..
+        long t0 = System.currentTimeMillis();
+        int frames;
+        
+        for(frames=0; frames<GLSLMiscHelper.frames_perftest; frames++) {
+            GLSLMiscHelper.displayVCArraysNoChecks(drawable, gl, toggleEnable, vertices0, colors0, toggleEnable);
+        }        
+        final long t1 = System.currentTimeMillis();
+        final long dt = t1 - t0;        
+        final double fps = ( frames * 1000.0 ) / (double) dt;
+        final String fpsS = String.valueOf(fps);        
+        final int fpsSp = fpsS.indexOf('.');        
+        System.err.println("testShaderState00PerformanceSingle toggleEnable "+toggleEnable+": "+dt/1000.0 +"s: "+ frames + "f, " + fpsS.substring(0, fpsSp+2) + " fps, "+dt/frames+" ms/f");        
+        
+        // cleanup
+        st.destroy(gl);
+        
+        NEWTGLContext.destroyWindow(winctx);        
+    }
+    
+    @Test(timeout=120000)
+    public void testShaderState01PerformanceDouble() throws InterruptedException {
+        // preset ..
+        final NEWTGLContext.WindowContext winctx = NEWTGLContext.createOnscreenWindow(GLProfile.getGL2ES2(), 480, 480, false);
+        final GLDrawable drawable = winctx.context.getGLDrawable();
+        final GL2ES2 gl = winctx.context.getGL().getGL2ES2();
+        System.err.println(winctx.context);
+        gl.setSwapInterval(0);
+        
+        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
+        
+        // test code ..        
+        final ShaderState st = new ShaderState();
+        
+        final ShaderCode rsVp = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, 1, RedSquareES2.class,
+                "shader", "shader/bin", "RedSquareShader");
+        final ShaderCode rsFp = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, 1, RedSquareES2.class,
+                "shader", "shader/bin", "RedSquareShader");
+
+        final ShaderProgram sp = new ShaderProgram();
+        sp.add(rsVp);
+        sp.add(rsFp);
+        
+        sp.init(gl);
+        Assert.assertTrue(sp.link(gl, System.err));
+        
+        st.attachShaderProgram(gl, sp);        
+        st.useProgram(gl, true);
+        
+        // setup mgl_PMVMatrix
+        final PMVMatrix pmvMatrix = new PMVMatrix();
+        final GLUniformData pmvMatrixUniform = new GLUniformData("mgl_PMVMatrix", 4, 4, pmvMatrix.glGetPMvMatrixf());
+        st.ownUniform(pmvMatrixUniform);
+        st.uniform(gl, pmvMatrixUniform);
+        
+        // Allocate Vertex Array0
+        final GLArrayDataServer vertices0 = GLSLMiscHelper.createRSVertices0(gl, -1);
+        st.ownAttribute(vertices0, true);
+        vertices0.enableBuffer(gl, false);
+        
+        // Allocate Vertex Array1
+        final GLArrayDataServer vertices1 = GLSLMiscHelper.createRSVertices1(gl);
+        st.ownAttribute(vertices1, true);
+        vertices1.enableBuffer(gl, false);
+        
+        // Allocate Color Array0
+        final GLArrayDataServer colors0 = GLSLMiscHelper.createRSColors0(gl, -1);
+        st.ownAttribute(colors0, true);
+        colors0.enableBuffer(gl, false);
+        
+        // Allocate Color Array1
+        final GLArrayDataServer colors1 = GLSLMiscHelper.createRSColors1(gl);
+        st.ownAttribute(colors1, true);
+        colors1.enableBuffer(gl, false);
+        
+        // misc GL setup
+        gl.glClearColor(0, 0, 0, 1);
+        gl.glEnable(GL2ES2.GL_DEPTH_TEST);
+
+        // reshape
+        pmvMatrix.glMatrixMode(PMVMatrix.GL_PROJECTION);
+        pmvMatrix.glLoadIdentity();
+        pmvMatrix.gluPerspective(45.0F, (float) drawable.getWidth() / (float) drawable.getHeight(), 1.0F, 100.0F);
+        pmvMatrix.glMatrixMode(PMVMatrix.GL_MODELVIEW);
+        pmvMatrix.glLoadIdentity();
+        pmvMatrix.glTranslatef(0, 0, -10);
+        st.uniform(gl, pmvMatrixUniform);
+        gl.glViewport(0, 0, drawable.getWidth(), drawable.getHeight());        
+
+        gl.setSwapInterval(0);
+                
+        // validation ..
+        GLSLMiscHelper.displayVCArrays(drawable, gl, true, vertices0, colors0, true, 1, 0);
+        GLSLMiscHelper.displayVCArrays(drawable, gl, true, vertices1, colors1, true, 2, 0);
+                
+        // warmup ..
+        for(int frames=0; frames<GLSLMiscHelper.frames_warmup; frames+=2) {
+            GLSLMiscHelper.displayVCArraysNoChecks(drawable, gl, true, vertices0, colors0, true);
+            GLSLMiscHelper.displayVCArraysNoChecks(drawable, gl, true, vertices1, colors1, true);
+        }
+        
+        // measure ..
+        long t0 = System.currentTimeMillis();
+        int frames;
+        
+        for(frames=0; frames<GLSLMiscHelper.frames_perftest; frames+=2) {
+            GLSLMiscHelper.displayVCArraysNoChecks(drawable, gl, true, vertices0, colors0, true);
+            GLSLMiscHelper.displayVCArraysNoChecks(drawable, gl, true, vertices1, colors1, true);
+        }        
+        final long t1 = System.currentTimeMillis();
+        final long dt = t1 - t0;        
+        final double fps = ( frames * 1000.0 ) / (double) dt;
+        final String fpsS = String.valueOf(fps);        
+        final int fpsSp = fpsS.indexOf('.');        
+        System.err.println("testShaderState01PerformanceDouble: "+dt/1000.0 +"s: "+ frames + "f, " + fpsS.substring(0, fpsSp+2) + " fps, "+dt/frames+" ms/f");        
+        
+        // cleanup
+        st.destroy(gl);
+        
+        NEWTGLContext.destroyWindow(winctx);
+    }
+    
+    public static void main(String args[]) throws IOException {
+        System.err.println("main - start");
+        boolean wait = false;
+        for(int i=0; i<args.length; i++) {
+            if(args[i].equals("-time")) {
+                durationPerTest = MiscUtils.atoi(args[++i], (int)durationPerTest);
+            }
+            if(args[i].equals("-wait")) {
+                wait = true;
+            }
+        }
+        if(wait) {
+            while(-1 == System.in.read()) ;
+            TestGLSLShaderState01NEWT tst = new TestGLSLShaderState01NEWT();
+            try {
+                tst.testShaderState01PerformanceDouble();
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+        } else {
+            String tstname = TestGLSLShaderState01NEWT.class.getName();
+            org.junit.runner.JUnitCore.main(tstname);
+        }
+        System.err.println("main - end");
+    }    
+}
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
new file mode 100644
index 0000000..2bb8256
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLShaderState02NEWT.java
@@ -0,0 +1,390 @@
+/**
+ * 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.glsl;
+
+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;
+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;
+import com.jogamp.opengl.test.junit.util.UITestCase;
+
+import java.io.IOException;
+import javax.media.opengl.GL;
+import javax.media.opengl.GL2ES2;
+import javax.media.opengl.GLDrawable;
+import javax.media.opengl.GLProfile;
+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
+ * and shader state in general.
+ */
+public class TestGLSLShaderState02NEWT extends UITestCase {
+    static long durationPerTest = 10; // ms
+
+    static final int vertices0_loc = 0; // FIXME: AMD needs this to be location 0 ? hu ?
+    static final int colors0_loc = 5;
+    
+    @BeforeClass
+    public static void initClass() {
+        GLProfile.initSingleton(true);
+    }
+    
+    @Test
+    public void testShaderState01ValidationSP1Linked() throws InterruptedException {
+        testShaderState01Validation(true);
+    }
+    @Test
+    public void testShaderState01ValidationSP1Unlinked() throws InterruptedException {
+        testShaderState01Validation(false);
+    }
+    
+    private void testShaderState01Validation(boolean linkSP1) throws InterruptedException {
+        // preset ..
+        final NEWTGLContext.WindowContext winctx = NEWTGLContext.createOnscreenWindow(GLProfile.getGL2ES2(), 480, 480, true);
+        final GLDrawable drawable = winctx.context.getGLDrawable();
+        final GL2ES2 gl = winctx.context.getGL().getGL2ES2();
+        System.err.println(winctx.context);
+        
+        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
+        
+        // test code ..        
+        final ShaderState st = new ShaderState();
+        
+        final ShaderCode rsVp0 = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, 1, RedSquareES2.class,
+                "shader", "shader/bin", "RedSquareShader");
+        final ShaderCode rsFp0 = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, 1, RedSquareES2.class,
+                "shader", "shader/bin", "RedSquareShader");
+        final ShaderCode rsFp1 = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, 1, RedSquareES2.class,
+                "shader", "shader/bin", "RedSquareShader2");
+
+        final ShaderProgram sp1 = new ShaderProgram();
+        sp1.add(rsVp0);
+        sp1.add(rsFp1);
+        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
+        Assert.assertTrue(0>sp1.program());        
+        sp1.init(gl);
+        Assert.assertTrue(0<=sp1.program()); 
+        Assert.assertTrue(!sp1.inUse());
+        Assert.assertTrue(!sp1.linked());
+        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
+        if(linkSP1) {
+            Assert.assertTrue(sp1.link(gl, System.err));
+            Assert.assertTrue(sp1.linked());
+            Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
+        }
+        
+        final ShaderProgram sp0 = new ShaderProgram();        
+        sp0.add(rsVp0);
+        sp0.add(rsFp0);
+        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
+        
+        Assert.assertTrue(0>sp0.program());        
+        sp0.init(gl);
+        Assert.assertTrue(0<=sp0.program()); 
+        Assert.assertTrue(!sp0.inUse());
+        Assert.assertTrue(!sp0.linked());
+        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());        
+                
+        st.attachShaderProgram(gl, sp0);
+        Assert.assertEquals(null, ShaderState.getShaderState(gl));
+        st.setShaderState(gl); // pre-use attach
+        Assert.assertEquals(st, ShaderState.getShaderState(gl));
+        
+        // Allocate Vertex Array0
+        final GLArrayDataServer vertices0 = GLSLMiscHelper.createRSVertices0(gl, vertices0_loc);
+        st.ownAttribute(vertices0, true);
+        System.err.println("vertices0: " + vertices0);        
+        vertices0.enableBuffer(gl, false);
+        Assert.assertEquals(vertices0_loc, vertices0.getLocation());
+        
+        // Allocate Color Array0
+        final GLArrayDataServer colors0 = GLSLMiscHelper.createRSColors0(gl, colors0_loc);
+        st.ownAttribute(colors0, true);
+        System.err.println("colors0: " + colors0);
+        colors0.enableBuffer(gl, false);
+        Assert.assertEquals(colors0_loc, colors0.getLocation());
+                               
+        Assert.assertTrue(sp0.link(gl, System.err));
+        Assert.assertTrue(sp0.linked());
+        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
+        
+        Assert.assertEquals(vertices0_loc, vertices0.getLocation());
+        Assert.assertEquals(vertices0_loc, st.getAttribLocation(gl, vertices0.getName()));
+        Assert.assertEquals(vertices0_loc, gl.glGetAttribLocation(st.shaderProgram().program(), vertices0.getName()));
+        
+        Assert.assertEquals(colors0_loc, colors0.getLocation());
+        Assert.assertEquals(colors0_loc, st.getAttribLocation(gl, colors0.getName()));
+        Assert.assertEquals(colors0_loc, gl.glGetAttribLocation(st.shaderProgram().program(), colors0.getName()));
+        
+        st.useProgram(gl, true);
+        Assert.assertTrue(sp0.inUse());
+        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
+        
+        // setup mgl_PMVMatrix
+        final PMVMatrix pmvMatrix = new PMVMatrix();
+        final GLUniformData pmvMatrixUniform = new GLUniformData("mgl_PMVMatrix", 4, 4, pmvMatrix.glGetPMvMatrixf());
+        st.ownUniform(pmvMatrixUniform);
+        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
+        
+        st.uniform(gl, pmvMatrixUniform);
+        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
+        Assert.assertEquals(pmvMatrixUniform, st.getUniform("mgl_PMVMatrix"));
+        
+        // Allocate Vertex Array1
+        final GLArrayDataServer vertices1 = GLSLMiscHelper.createRSVertices1(gl);
+        st.ownAttribute(vertices1, true);
+        System.err.println("vertices1: " + vertices1);
+        vertices1.enableBuffer(gl, false);
+        
+        // Allocate Color Array1
+        final GLArrayDataServer colors1 = GLSLMiscHelper.createRSColors1(gl);
+        st.ownAttribute(colors1, true);
+        System.err.println("colors1: " + colors1);
+        colors1.enableBuffer(gl, false);
+        
+        // misc GL setup
+        gl.glClearColor(0, 0, 0, 1);
+        gl.glEnable(GL2ES2.GL_DEPTH_TEST);
+        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
+
+        // reshape
+        pmvMatrix.glMatrixMode(PMVMatrix.GL_PROJECTION);
+        pmvMatrix.glLoadIdentity();
+        pmvMatrix.gluPerspective(45.0F, (float) drawable.getWidth() / (float) drawable.getHeight(), 1.0F, 100.0F);
+        pmvMatrix.glMatrixMode(PMVMatrix.GL_MODELVIEW);
+        pmvMatrix.glLoadIdentity();
+        pmvMatrix.glTranslatef(0, 0, -10);
+        st.uniform(gl, pmvMatrixUniform);
+        gl.glViewport(0, 0, drawable.getWidth(), drawable.getHeight());
+        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
+        
+        // display #1 vertices0 / colors0 (post-disable)
+        GLSLMiscHelper.displayVCArrays(drawable, gl, true, vertices0, colors0, true, 1, durationPerTest);
+
+        // display #2 vertices1 / colors1 (post-disable)
+        GLSLMiscHelper.displayVCArrays(drawable, gl, true, vertices1, colors1, true, 2, durationPerTest);
+        
+        // display #3 vertices0 / colors0 (post-disable)
+        GLSLMiscHelper.displayVCArrays(drawable, gl, true, vertices0, colors0, true, 3, durationPerTest);
+
+        // display #4 vertices1 / colors1 (post-disable)
+        GLSLMiscHelper.displayVCArrays(drawable, gl, true, vertices1, colors1, true, 4, durationPerTest);
+        
+        // SP1
+        st.attachShaderProgram(gl, sp1);
+        
+        if(!linkSP1) {
+            // all attribute locations shall be same now, due to impl. glBindAttributeLocation
+            Assert.assertEquals(vertices0_loc, vertices0.getLocation());
+            Assert.assertEquals(vertices0_loc, st.getAttribLocation(gl, vertices0.getName()));
+            Assert.assertEquals(vertices0_loc, gl.glGetAttribLocation(st.shaderProgram().program(), vertices0.getName()));
+            
+            Assert.assertEquals(colors0_loc, colors0.getLocation());
+            Assert.assertEquals(colors0_loc, st.getAttribLocation(gl, colors0.getName()));
+            Assert.assertEquals(colors0_loc, gl.glGetAttribLocation(st.shaderProgram().program(), colors0.getName()));
+        }
+        
+        // display #1 vertices0 / colors0 (post-disable)
+        GLSLMiscHelper.displayVCArrays(drawable, gl, true, vertices0, colors0, true, 10, durationPerTest);
+
+        // display #2 vertices1 / colors1 (post-disable)
+        GLSLMiscHelper.displayVCArrays(drawable, gl, true, vertices1, colors1, true, 20, durationPerTest);
+        
+        // display #3 vertices0 / colors0 (post-disable)
+        GLSLMiscHelper.displayVCArrays(drawable, gl, true, vertices0, colors0, true, 30, durationPerTest);
+        
+        // display #4 vertices1 / colors1 (post-disable)
+        GLSLMiscHelper.displayVCArrays(drawable, gl, true, vertices1, colors1, true, 40, durationPerTest);
+        
+        // cleanup
+        st.destroy(gl);
+        
+        NEWTGLContext.destroyWindow(winctx);
+    }
+
+    @Test(timeout=120000)    
+    public void testShaderState01PerformanceDouble() throws InterruptedException {
+        // preset ..
+        final NEWTGLContext.WindowContext winctx = NEWTGLContext.createOnscreenWindow(GLProfile.getGL2ES2(), 480, 480, false);
+        final GLDrawable drawable = winctx.context.getGLDrawable();
+        final GL2ES2 gl = winctx.context.getGL().getGL2ES2();
+        System.err.println(winctx.context);
+        gl.setSwapInterval(0);
+        
+        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
+        
+        // test code ..        
+        final ShaderState st = new ShaderState();
+        
+        final ShaderCode rsVp0 = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, 1, RedSquareES2.class,
+                "shader", "shader/bin", "RedSquareShader");
+        final ShaderCode rsFp0 = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, 1, RedSquareES2.class,
+                "shader", "shader/bin", "RedSquareShader");
+        final ShaderCode rsFp1 = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, 1, RedSquareES2.class,
+                "shader", "shader/bin", "RedSquareShader2");
+
+        final ShaderProgram sp1 = new ShaderProgram();
+        sp1.add(rsVp0);
+        sp1.add(rsFp1);
+        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
+        Assert.assertTrue(0>sp1.program());        
+        sp1.init(gl);
+        Assert.assertTrue(sp1.link(gl, System.err));
+        
+        final ShaderProgram sp0 = new ShaderProgram();
+        sp0.add(rsVp0);
+        sp0.add(rsFp0);
+        
+        sp0.init(gl);
+        Assert.assertTrue(sp0.link(gl, System.err));
+        
+        st.attachShaderProgram(gl, sp0);        
+        st.useProgram(gl, true);
+        
+        // setup mgl_PMVMatrix
+        final PMVMatrix pmvMatrix = new PMVMatrix();
+        final GLUniformData pmvMatrixUniform = new GLUniformData("mgl_PMVMatrix", 4, 4, pmvMatrix.glGetPMvMatrixf());
+        st.ownUniform(pmvMatrixUniform);
+        st.uniform(gl, pmvMatrixUniform);
+        
+        // Allocate Vertex Array0
+        final GLArrayDataServer vertices0 = GLSLMiscHelper.createRSVertices0(gl, -1);
+        st.ownAttribute(vertices0, true);
+        vertices0.enableBuffer(gl, false);
+        
+        // Allocate Vertex Array1
+        final GLArrayDataServer vertices1 = GLSLMiscHelper.createRSVertices1(gl);
+        st.ownAttribute(vertices1, true);
+        vertices1.enableBuffer(gl, false);
+        
+        // Allocate Color Array0
+        final GLArrayDataServer colors0 = GLSLMiscHelper.createRSColors0(gl, -1);
+        st.ownAttribute(colors0, true);
+        colors0.enableBuffer(gl, false);
+        
+        // Allocate Color Array1
+        final GLArrayDataServer colors1 = GLSLMiscHelper.createRSColors1(gl);
+        st.ownAttribute(colors1, true);
+        colors1.enableBuffer(gl, false);
+        
+        // misc GL setup
+        gl.glClearColor(0, 0, 0, 1);
+        gl.glEnable(GL2ES2.GL_DEPTH_TEST);
+
+        // reshape
+        pmvMatrix.glMatrixMode(PMVMatrix.GL_PROJECTION);
+        pmvMatrix.glLoadIdentity();
+        pmvMatrix.gluPerspective(45.0F, (float) drawable.getWidth() / (float) drawable.getHeight(), 1.0F, 100.0F);
+        pmvMatrix.glMatrixMode(PMVMatrix.GL_MODELVIEW);
+        pmvMatrix.glLoadIdentity();
+        pmvMatrix.glTranslatef(0, 0, -10);
+        st.uniform(gl, pmvMatrixUniform);
+        gl.glViewport(0, 0, drawable.getWidth(), drawable.getHeight());
+
+        gl.setSwapInterval(0);
+        
+        // validation ..
+        st.attachShaderProgram(gl, sp0);
+        GLSLMiscHelper.displayVCArrays(drawable, gl, true, vertices0, colors0, true, 1, 0);
+        GLSLMiscHelper.displayVCArrays(drawable, gl, true, vertices1, colors1, true, 2, 0);
+        st.attachShaderProgram(gl, sp1);
+        GLSLMiscHelper.displayVCArrays(drawable, gl, true, vertices0, colors0, true, 1, 0);
+        GLSLMiscHelper.displayVCArrays(drawable, gl, true, vertices1, colors1, true, 2, 0);
+        
+        // warmup ..        
+        for(int frames=0; frames<GLSLMiscHelper.frames_warmup; frames+=2) {
+            // SP0
+            st.attachShaderProgram(gl, sp0);
+            GLSLMiscHelper.displayVCArraysNoChecks(drawable, gl, true, vertices0, colors0, true);
+            // SP1
+            st.attachShaderProgram(gl, sp1);
+            GLSLMiscHelper.displayVCArraysNoChecks(drawable, gl, true, vertices1, colors1, true);
+        }
+        
+        // measure ..
+        long t0 = System.currentTimeMillis();
+        int frames;
+        
+        for(frames=0; frames<GLSLMiscHelper.frames_perftest; frames+=4) {
+            // SP0
+            st.attachShaderProgram(gl, sp0);
+            GLSLMiscHelper.displayVCArraysNoChecks(drawable, gl, true, vertices0, colors0, true);
+            GLSLMiscHelper.displayVCArraysNoChecks(drawable, gl, true, vertices1, colors1, true);
+            // SP1
+            st.attachShaderProgram(gl, sp1);
+            GLSLMiscHelper.displayVCArraysNoChecks(drawable, gl, true, vertices0, colors0, true);
+            GLSLMiscHelper.displayVCArraysNoChecks(drawable, gl, true, vertices1, colors1, true);
+        }
+        
+        final long t1 = System.currentTimeMillis();
+        final long dt = t1 - t0;        
+        final double fps = ( frames * 1000.0 ) / (double) dt;
+        final String fpsS = String.valueOf(fps);        
+        final int fpsSp = fpsS.indexOf('.');        
+        System.err.println("testShaderState01PerformanceDouble: "+dt/1000.0 +"s: "+ frames + "f, " + fpsS.substring(0, fpsSp+2) + " fps, "+dt/frames+" ms/f");        
+        
+        // cleanup
+        st.destroy(gl);
+        NEWTGLContext.destroyWindow(winctx);
+    }
+    
+    public static void main(String args[]) throws IOException {
+        System.err.println("main - start");
+        boolean wait = false;
+        for(int i=0; i<args.length; i++) {
+            if(args[i].equals("-time")) {
+                durationPerTest = MiscUtils.atoi(args[++i], (int)durationPerTest);
+            }
+            if(args[i].equals("-wait")) {
+                wait = true;
+            }
+        }
+        if(wait) {
+            while(-1 == System.in.read()) ;
+            TestGLSLShaderState02NEWT tst = new TestGLSLShaderState02NEWT();
+            try {
+                tst.testShaderState01PerformanceDouble();
+            } catch (Exception e) {
+                e.printStackTrace();
+            }            
+        } else {
+            String tstname = TestGLSLShaderState02NEWT.class.getName();
+            org.junit.runner.JUnitCore.main(tstname);
+            System.err.println("main - end");
+        }
+    }    
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLSimple01NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLSimple01NEWT.java
index ed2f5d3..b683cb2 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLSimple01NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestGLSLSimple01NEWT.java
@@ -28,11 +28,12 @@
 
 package com.jogamp.opengl.test.junit.jogl.glsl;
 
-import com.jogamp.opengl.test.junit.jogl.demos.es2.RedSquare0;
+import com.jogamp.opengl.test.junit.jogl.demos.es2.RedSquareES2;
 import com.jogamp.opengl.test.junit.util.GLSLSimpleProgram;
 import com.jogamp.opengl.test.junit.util.UITestCase;
 
 
+import javax.media.opengl.FPSCounter;
 import javax.media.opengl.GLCapabilities;
 import javax.media.opengl.GLContext;
 import javax.media.opengl.GLProfile;
@@ -114,12 +115,13 @@ public class TestGLSLSimple01NEWT extends UITestCase {
         window.setSize(800, 600);
         window.setVisible(true);
         Assert.assertTrue(window.isNativeValid());
-        window.addGLEventListener(new RedSquare0());
+        window.addGLEventListener(new RedSquareES2());
         
         Animator animator = new Animator(window);
+        animator.setUpdateFPSFrames(1, null);        
         animator.start();
         Assert.assertEquals(true, animator.isAnimating());
-        while(animator.isAnimating() && animator.getDuration()<durationPerTest) {
+        while(animator.isAnimating() && animator.getTotalFPSDuration()<durationPerTest) {
             Thread.sleep(100);
         }
         Assert.assertEquals(true, animator.isAnimating());
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestRulerNEWT01.java b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestRulerNEWT01.java
new file mode 100644
index 0000000..cc97efb
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestRulerNEWT01.java
@@ -0,0 +1,172 @@
+/**
+ * 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.glsl;
+
+import com.jogamp.common.nio.Buffers;
+import com.jogamp.newt.util.MonitorMode;
+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;
+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;
+import com.jogamp.opengl.test.junit.util.UITestCase;
+
+import java.io.IOException;
+import java.nio.FloatBuffer;
+
+import javax.media.nativewindow.util.DimensionImmutable;
+import javax.media.opengl.GL;
+import javax.media.opengl.GL2ES2;
+import javax.media.opengl.GLDrawable;
+import javax.media.opengl.GLProfile;
+import javax.media.opengl.GLUniformData;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.BeforeClass;
+
+public class TestRulerNEWT01 extends UITestCase {
+    static long durationPerTest = 10; // ms
+
+    @BeforeClass
+    public static void initClass() {
+        GLProfile.initSingleton(true);
+    }
+    
+    @Test
+    public void test01() throws InterruptedException {
+        // preset ..
+        final NEWTGLContext.WindowContext winctx = NEWTGLContext.createOnscreenWindow(GLProfile.getGL2ES2(), 640, 480, true);
+        final GLDrawable drawable = winctx.context.getGLDrawable();
+        final GL2ES2 gl = winctx.context.getGL().getGL2ES2();
+        System.err.println(winctx.context);
+
+        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
+        // test code ..        
+        final ShaderState st = new ShaderState();
+        
+        final ShaderCode vp0 = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, 1, RedSquareES2.class,
+                "shader", "shader/bin", "default");
+        final ShaderCode fp0 = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, 1, RedSquareES2.class,
+                "shader", "shader/bin", "ruler");
+
+        final ShaderProgram sp0 = new ShaderProgram();
+        sp0.add(gl, vp0, System.err);
+        sp0.add(gl, fp0, System.err);       
+        Assert.assertTrue(0<=sp0.program()); 
+        Assert.assertTrue(!sp0.inUse());
+        Assert.assertTrue(!sp0.linked());
+        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
+        
+        st.attachShaderProgram(gl, sp0);
+        st.useProgram(gl, true);
+        
+        final PMVMatrix pmvMatrix = new PMVMatrix();
+        final GLUniformData pmvMatrixUniform = new GLUniformData("gcu_PMVMatrix", 4, 4, pmvMatrix.glGetPMvMatrixf());
+        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
+        st.ownUniform(pmvMatrixUniform);       
+        st.uniform(gl, pmvMatrixUniform);
+        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
+         
+        final GLUniformData rulerColor= new GLUniformData("gcu_RulerColor", 3, Buffers.newDirectFloatBuffer(3));
+        final FloatBuffer rulerColorV = (FloatBuffer) rulerColor.getBuffer();
+        rulerColorV.put(0, 0.5f);
+        rulerColorV.put(1, 0.5f);
+        rulerColorV.put(2, 0.5f);
+        st.ownUniform(rulerColor);       
+        st.uniform(gl, rulerColor);        
+        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
+        
+        final MonitorMode mmode = winctx.window.getScreen().getCurrentScreenMode().getMonitorMode();
+        final DimensionImmutable sdim = mmode.getScreenSizeMM();
+        final DimensionImmutable spix = mmode.getSurfaceSize().getResolution();   
+        final GLUniformData rulerPixFreq = new GLUniformData("gcu_RulerPixFreq", 2, Buffers.newDirectFloatBuffer(2));
+        final FloatBuffer rulerPixFreqV = (FloatBuffer) rulerPixFreq.getBuffer();
+        rulerPixFreqV.put(0, (float)spix.getWidth() / (float)sdim.getWidth() * 10.0f);
+        rulerPixFreqV.put(1, (float)spix.getHeight() / (float)sdim.getHeight() * 10.0f);
+        st.ownUniform(rulerPixFreq);
+        st.uniform(gl, rulerPixFreq);        
+        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
+        System.err.println("Screen dim "+sdim);
+        System.err.println("Screen siz "+spix);
+        System.err.println("Screen pixel/cm "+rulerPixFreqV.get(0)+", "+rulerPixFreqV.get(1));
+
+        final GLArrayDataServer vertices0 = GLArrayDataServer.createGLSL("gca_Vertices", 3, GL.GL_FLOAT, false, 4, GL.GL_STATIC_DRAW);
+        vertices0.putf(0); vertices0.putf(1);  vertices0.putf(0);
+        vertices0.putf(1);  vertices0.putf(1);  vertices0.putf(0);
+        vertices0.putf(0); vertices0.putf(0); vertices0.putf(0);
+        vertices0.putf(1);  vertices0.putf(0); vertices0.putf(0);
+        vertices0.seal(gl, true);
+        st.ownAttribute(vertices0, true);
+        
+        // misc GL setup
+        gl.glClearColor(1, 1, 1, 1);
+        gl.glEnable(GL2ES2.GL_DEPTH_TEST);
+        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
+
+        // reshape
+        pmvMatrix.glMatrixMode(PMVMatrix.GL_PROJECTION);
+        pmvMatrix.glLoadIdentity();
+        pmvMatrix.glOrthof(0f, 1f, 0f, 1f, -10f, 10f);
+        // pmvMatrix.gluPerspective(45.0F, (float) drawable.getWidth() / (float) drawable.getHeight(), 1.0F, 100.0F);
+        pmvMatrix.glMatrixMode(PMVMatrix.GL_MODELVIEW);
+        pmvMatrix.glLoadIdentity();
+        // pmvMatrix.glTranslatef(0, 0, -6);
+        // pmvMatrix.glRotatef(45f, 1f, 0f, 0f);
+        st.uniform(gl, pmvMatrixUniform);
+        gl.glViewport(0, 0, drawable.getWidth(), drawable.getHeight());        
+        Assert.assertEquals(GL.GL_NO_ERROR, gl.glGetError());
+        
+        for(int i=0; i<10; i++) {
+            vertices0.enableBuffer(gl, true);
+            gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
+            gl.glDrawArrays(GL.GL_TRIANGLE_STRIP, 0, 4);        
+            vertices0.enableBuffer(gl, false);
+            drawable.swapBuffers();
+            Thread.sleep(durationPerTest/10);
+        }
+        
+        NEWTGLContext.destroyWindow(winctx);
+    }
+    
+    public static void main(String args[]) throws IOException {
+        System.err.println("main - start");
+        for(int i=0; i<args.length; i++) {
+            if(args[i].equals("-time")) {
+                durationPerTest = MiscUtils.atoi(args[++i], (int)durationPerTest);
+            }
+        }
+        String tstname = TestRulerNEWT01.class.getName();
+        org.junit.runner.JUnitCore.main(tstname);
+        System.err.println("main - end");
+    }    
+}
+
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestShaderCompilationBug459AWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestShaderCompilationBug459AWT.java
index e7f376e..d133ebd 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestShaderCompilationBug459AWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestShaderCompilationBug459AWT.java
@@ -40,6 +40,7 @@ import javax.media.opengl.awt.GLCanvas;
 import java.awt.Frame;
 
 import org.junit.Assert;
+import org.junit.Assume;
 import org.junit.BeforeClass;
 import org.junit.AfterClass;
 import org.junit.Test;
@@ -49,7 +50,6 @@ import org.junit.Test;
  * This bug is Windows-only; it works on Mac OS X and CentOS.
  */
 public class TestShaderCompilationBug459AWT extends UITestCase {
-    static GLProfile glp;
     static int width, height;
     static long duration = 500; // ms
     /** Exception in shader code sets this, since it won't bubble up through AWT. */
@@ -57,9 +57,6 @@ public class TestShaderCompilationBug459AWT extends UITestCase {
 
     @BeforeClass
     public static void initClass() {
-        GLProfile.initSingleton(true);
-        glp = GLProfile.getDefault();
-        Assert.assertNotNull(glp);
         width  = 512;
         height = 512;
     }
@@ -70,7 +67,7 @@ public class TestShaderCompilationBug459AWT extends UITestCase {
 
     @Test
     public void compileShader() throws InterruptedException {
-        GLProfile glp = GLProfile.get("GL2GL3");         
+        GLProfile glp = GLProfile.get(GLProfile.GL2GL3);         
         GLCapabilities caps = new GLCapabilities(glp);   
         // commenting out this line makes it work
         caps.setStencilBits(8);
@@ -78,10 +75,10 @@ public class TestShaderCompilationBug459AWT extends UITestCase {
         // commenting in this line also makes it work
         //caps.setSampleBuffers(true); 
 
-        Frame frame = new Frame("Bug 459 shader compilation test");
+        final Frame frame = new Frame("Bug 459 shader compilation test");
         Assert.assertNotNull(frame);
 
-        GLCanvas glCanvas = new GLCanvas(caps);
+        final GLCanvas glCanvas = new GLCanvas(caps);
         Assert.assertNotNull(glCanvas);
         frame.add(glCanvas);
         frame.setSize(512, 512);
@@ -135,9 +132,10 @@ public class TestShaderCompilationBug459AWT extends UITestCase {
 
         Animator animator = new Animator(glCanvas);
         frame.setVisible(true);
+        animator.setUpdateFPSFrames(1, null);        
         animator.start();
 
-        while(animator.isAnimating() && animator.getDuration()<duration) {
+        while(animator.isAnimating() && animator.getTotalFPSDuration()<duration) {
             Thread.sleep(100);
         }
 
@@ -148,12 +146,17 @@ public class TestShaderCompilationBug459AWT extends UITestCase {
 
         animator.stop();
         Assert.assertEquals(false, animator.isAnimating());
-        frame.setVisible(false);
-        Assert.assertEquals(false, frame.isVisible());
-        frame.remove(glCanvas);
-        frame.dispose();
-        frame=null;
-        glCanvas=null;
+        try {
+            javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
+                public void run() {
+                    frame.setVisible(false);
+                    frame.remove(glCanvas);
+                    frame.dispose();
+                }});
+        } catch( Throwable throwable ) {
+            throwable.printStackTrace();
+            Assume.assumeNoException( throwable );
+        }        
     }
 
     public static void main(String args[]) {
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestTransformFeedbackVaryingsBug407NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestTransformFeedbackVaryingsBug407NEWT.java
index be4873f..a6d04cf 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestTransformFeedbackVaryingsBug407NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/glsl/TestTransformFeedbackVaryingsBug407NEWT.java
@@ -83,7 +83,7 @@ public class TestTransformFeedbackVaryingsBug407NEWT extends UITestCase {
 
 
     private GLWindow prepareTest() {
-        if(!GLProfile.isGL3Available()) {
+        if(!GLProfile.isAvailable(GLProfile.GL3)) {
             System.err.println("GL3 not available");
             System.err.println(GLProfile.glAvailabilityToString());
             return null;
@@ -136,7 +136,7 @@ public class TestTransformFeedbackVaryingsBug407NEWT extends UITestCase {
 
     @Test(timeout=60000)
     public void testGlTransformFeedbackVaryings_WhenVarNameOK() {
-        if(!GLProfile.isGL3Available()) {
+        if(!GLProfile.isAvailable(GLProfile.GL3)) {
             return;
         }
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
@@ -178,7 +178,7 @@ public class TestTransformFeedbackVaryingsBug407NEWT extends UITestCase {
 
     @Test(timeout=60000)
     public void testGlTransformFeedbackVaryings_WhenVarNameWrong() {
-        if(!GLProfile.isGL3Available()) {
+        if(!GLProfile.isAvailable(GLProfile.GL3)) {
             return;
         }
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/glu/TestBug463ScaleImageMemoryAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/glu/TestBug463ScaleImageMemoryAWT.java
index 1f525a6..f23bca8 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/glu/TestBug463ScaleImageMemoryAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/glu/TestBug463ScaleImageMemoryAWT.java
@@ -29,8 +29,6 @@
 package com.jogamp.opengl.test.junit.jogl.glu;
 
 import java.awt.Frame;
-import java.awt.event.WindowAdapter;
-import java.awt.event.WindowEvent;
 import java.nio.ByteBuffer;
 
 import javax.media.opengl.GL;
@@ -39,10 +37,13 @@ import javax.media.opengl.GLCapabilities;
 import javax.media.opengl.GLEventListener;
 import javax.media.opengl.GLProfile;
 import javax.media.opengl.awt.GLCanvas;
-import javax.media.opengl.glu.gl2.GLUgl2;
+import javax.media.opengl.glu.gl2es1.GLUgl2es1;
 
+import org.junit.Assume;
 import org.junit.Test;
 
+import com.jogamp.opengl.test.junit.util.UITestCase;
+
 /**
  * Tests for bug 463, where gluScaleImage uses up all system memory. This was due to creating millions of
  * 4-byte direct buffer objects inside the tight loops of Image.fill_image() and Image.empty_image(). Since
@@ -51,7 +52,7 @@ import org.junit.Test;
  * was in JOGL 1) solves the problem.  
  * @author Wade Walker
  */
-public class TestBug463ScaleImageMemoryAWT implements GLEventListener {
+public class TestBug463ScaleImageMemoryAWT extends UITestCase implements GLEventListener {
 
     /* @Override */
     public void init(GLAutoDrawable drawable) {
@@ -73,7 +74,7 @@ public class TestBug463ScaleImageMemoryAWT implements GLEventListener {
         
         ByteBuffer bufferIn  = ByteBuffer.wrap(datain);
         ByteBuffer bufferOut = ByteBuffer.wrap(dataout);      
-        GLUgl2 glu = new GLUgl2();
+        GLUgl2es1 glu = new GLUgl2es1(); 
         // in the failing case, the system would run out of memory in here
         glu.gluScaleImage( GL.GL_RGBA,
                            widthin, heightin, GL.GL_UNSIGNED_BYTE, bufferIn,
@@ -90,22 +91,42 @@ public class TestBug463ScaleImageMemoryAWT implements GLEventListener {
     }
 
     @Test
-    public void test01() {
-        Frame frame = new Frame("Test");
+    public void test01() throws InterruptedException {
         GLProfile glprofile = GLProfile.getDefault();
         GLCapabilities glCapabilities = new GLCapabilities(glprofile);
         final GLCanvas canvas = new GLCanvas(glCapabilities);
-        frame.setSize(256, 256);
-        frame.add(canvas);
-        frame.setVisible( true );
         canvas.addGLEventListener( this );
+        
+        final Frame frame = new Frame("Test");
+        frame.add(canvas);
+        frame.setSize(256, 256);        
+        frame.validate();
 
-        frame.addWindowListener(new WindowAdapter() {
-            public void windowClosing( WindowEvent e ) {
-                System.exit(0);
-            }
-        });
+        try {
+            javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
+                public void run() {
+                    frame.setVisible(true);
+                }});
+        } catch (Throwable t) {
+            t.printStackTrace();
+            Assume.assumeNoException(t);
+        }
+        
         canvas.display();
+
+        Thread.sleep(200);
+        
+        try {
+            javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
+                public void run() {
+                    frame.setVisible(false);
+                    frame.remove(canvas);
+                    frame.dispose();
+                }});
+        } catch (Throwable t) {
+            t.printStackTrace();
+            Assume.assumeNoException(t);
+        }        
    }
 
     public static void main(String args[]) {
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/newt/TestSwingAWTRobotUsageBeforeJOGLInitBug411.java b/src/test/com/jogamp/opengl/test/junit/jogl/newt/TestSwingAWTRobotUsageBeforeJOGLInitBug411.java
index 21a9736..2809a13 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/newt/TestSwingAWTRobotUsageBeforeJOGLInitBug411.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/newt/TestSwingAWTRobotUsageBeforeJOGLInitBug411.java
@@ -28,7 +28,8 @@
  
 package com.jogamp.opengl.test.junit.jogl.newt;
 
-import com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.Gears;
+import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
+
 import com.jogamp.opengl.test.junit.util.*;
 
 import java.lang.reflect.InvocationTargetException;
@@ -49,7 +50,6 @@ import java.awt.Dimension;
 import java.awt.AWTException;
 import java.awt.Robot;
 import java.awt.Point;
-import java.awt.Rectangle;
 import java.awt.event.InputEvent;
 import java.awt.event.MouseAdapter;
 import java.awt.event.MouseEvent;
@@ -68,7 +68,7 @@ import org.junit.AfterClass;
 import org.junit.Test;
 
 public class TestSwingAWTRobotUsageBeforeJOGLInitBug411 extends UITestCase {
-    static long durationPerTest = 500; // ms
+    static long durationPerTest = 150; // ms
     static Robot robot;
     static Border border;
     static JFrame frame;
@@ -110,8 +110,6 @@ public class TestSwingAWTRobotUsageBeforeJOGLInitBug411 extends UITestCase {
 
     @BeforeClass
     public static void setup() throws InterruptedException, InvocationTargetException, AWTException {
-        int count;
-
         System.err.println("TestSwingAWTRobotUsageBeforeJOGLInitBug411.setup(): Start Pre-JOGL-Swing");
 
         // GLProfile.initSingleton(false);
@@ -167,6 +165,8 @@ public class TestSwingAWTRobotUsageBeforeJOGLInitBug411 extends UITestCase {
 
         System.err.println("TestSwingAWTRobotUsageBeforeJOGLInitBug411.setup(): Before JOGL init");
 
+        // just to trigger JOGL initialization at a well defined point ..
+        // ofc it's not the first UI command
         GLProfile.initSingleton(false);
 
         System.err.println("TestSwingAWTRobotUsageBeforeJOGLInitBug411.setup(): End Pre-JOGL-Swing");
@@ -201,7 +201,7 @@ public class TestSwingAWTRobotUsageBeforeJOGLInitBug411 extends UITestCase {
 
         AWTRobotUtil.toFront(robot, frame);
 
-        drawable.addGLEventListener(new Gears());
+        drawable.addGLEventListener(new GearsES2());
 
         for(int i=0; i<100; i++) {
             javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
@@ -218,7 +218,6 @@ public class TestSwingAWTRobotUsageBeforeJOGLInitBug411 extends UITestCase {
         drawable.addGLEventListener(new SwingGLAction());
 
         Point p0 = canvas.getLocationOnScreen();
-        Rectangle r0 = canvas.getBounds();
         robot.mouseMove( (int) ( p0.getX() + .5 ) ,
                          (int) ( p0.getY() + .5 ) );
         robot.mousePress(InputEvent.BUTTON1_MASK);
@@ -255,7 +254,7 @@ public class TestSwingAWTRobotUsageBeforeJOGLInitBug411 extends UITestCase {
         win0.setVisible(true);
         Screen screen = win0.getScreen();
         win0.setPosition(screen.getWidth()-150, 0);
-        win0.addGLEventListener(new Gears());
+        win0.addGLEventListener(new GearsES2());
         Animator anim = new Animator(win0);
         anim.start();
 
@@ -265,17 +264,17 @@ public class TestSwingAWTRobotUsageBeforeJOGLInitBug411 extends UITestCase {
         runTestGL(newtCanvasAWT, win1);
 
         win0.destroy();
-        Assert.assertEquals(true, anim.isAnimating());
+        Assert.assertEquals(false, win0.isNativeValid());        
+        Assert.assertEquals(true, anim.isAnimating()); // due to newtCanvasAWT/win1
 
-        newtCanvasAWT.destroy();
-
-        win0.invalidate();
+        newtCanvasAWT.destroy(); // destroys both newtCanvasAWT/win1
+        Assert.assertEquals(false, win1.isNativeValid());
+        Assert.assertEquals(false, win0.isNativeValid());
         Assert.assertEquals(true, anim.isAnimating());
-        win1.invalidate();
+        
+        Assert.assertEquals(true, anim.stop());
         Assert.assertEquals(false, anim.isAnimating());
 
-        anim.stop();
-
         System.err.println("TestSwingAWTRobotUsageBeforeJOGLInitBug411.test01NewtCanvasAWT(): End");
     }
 
@@ -305,11 +304,15 @@ public class TestSwingAWTRobotUsageBeforeJOGLInitBug411 extends UITestCase {
         anim.add(glCanvas);
         runTestGL(glCanvas, glCanvas);
 
+        Assert.assertEquals(true, anim.isAnimating());
+        anim.remove(glCanvas);
+        Assert.assertEquals(false, anim.isAnimating());
+        
         /**
         win0.destroy();
         Assert.assertEquals(true, anim.isAnimating());
          */
-        anim.stop();
+        Assert.assertEquals(true, anim.stop());
         System.err.println("TestSwingAWTRobotUsageBeforeJOGLInitBug411.test02GLCanvas(): End");
     }
 
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/ReadBuffer2File.java b/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/ReadBuffer2File.java
index 95e7d6e..b829c8d 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/ReadBuffer2File.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/ReadBuffer2File.java
@@ -37,7 +37,7 @@ import java.io.File;
 public class ReadBuffer2File extends ReadBufferBase {
 
     public ReadBuffer2File(GLDrawable externalRead) {
-        super(externalRead);
+        super(externalRead, false);
     }
 
     @Override
@@ -52,10 +52,9 @@ public class ReadBuffer2File extends ReadBufferBase {
         }
 
         File file = File.createTempFile("shot" + shotNum + "-", ".ppm");
-        TextureIO.write(readBufferUtil.getTextureData(), file);
+        readBufferUtil.write(file);
         System.out.println("Wrote: " + file.getAbsolutePath() + ", ...");
         shotNum++;
-        readBufferUtil.rewindPixelBuffer();
     }
 
     @Override
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/ReadBuffer2Screen.java b/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/ReadBuffer2Screen.java
index 96a830a..5bdef28 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/ReadBuffer2Screen.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/ReadBuffer2Screen.java
@@ -47,7 +47,7 @@ public class ReadBuffer2Screen extends ReadBufferBase {
     boolean enableBufferVBO    = true; // FIXME
 
     public ReadBuffer2Screen (GLDrawable externalRead) {
-        super(externalRead);
+        super(externalRead, true);
     }
 
     @Override
@@ -62,10 +62,10 @@ public class ReadBuffer2Screen extends ReadBufferBase {
         if(null==readTextureVertices) {
             //readTextureVertices = GLArrayDataClient.createFixed(gl, GLPointerFunc.GL_VERTEX_ARRAY, "mgl_Vertex", 
             //                                                    2, GL.GL_FLOAT, true, 4);
-            readTextureVertices = GLArrayDataServer.createFixed(gl, GLPointerFunc.GL_VERTEX_ARRAY, "mgl_Vertex", 
-                                                                2, GL.GL_FLOAT, true, 4, GL.GL_STATIC_DRAW);
+            readTextureVertices = GLArrayDataServer.createFixed(GLPointerFunc.GL_VERTEX_ARRAY, 2, 
+                                                                GL.GL_FLOAT, true, 4, GL.GL_STATIC_DRAW);
             readTextureVertices.setEnableAlways(enableBufferAlways);
-            readTextureVertices.setVBOUsage(enableBufferVBO);
+            readTextureVertices.setVBOEnabled(enableBufferVBO);
             {
                 FloatBuffer vb = (FloatBuffer)readTextureVertices.getBuffer();
                 vb.put(-f_edge); vb.put(-f_edge);
@@ -128,8 +128,8 @@ public class ReadBuffer2Screen extends ReadBufferBase {
       if(!readBufferUtil.isValid()) return;
 
       // Now draw one quad with the texture
-      readBufferUtil.getTexture().enable();
-      readBufferUtil.getTexture().bind();
+      readBufferUtil.getTexture().enable(gl);
+      readBufferUtil.getTexture().bind(gl);
 
       if(gl.isGL2ES1()) {
           // gl.getGL2ES1().glTexEnvi(GL2ES1.GL_TEXTURE_ENV, GL2ES1.GL_TEXTURE_ENV_MODE, GL2ES1.GL_REPLACE);
@@ -142,22 +142,22 @@ public class ReadBuffer2Screen extends ReadBufferBase {
       if(null!=readTextureCoords) {
           readTextureCoords.enableBuffer(gl, true);
       }
-      gl.glDrawArrays(GL.GL_TRIANGLE_STRIP, 0, readTextureVertices.getElementNumber());
+      gl.glDrawArrays(GL.GL_TRIANGLE_STRIP, 0, readTextureVertices.getElementCount());
       /**
       if(null!=readTextureCoords) {
           readTextureCoords.enableBuffer(gl, false);
       }
       readTextureVertices.enableBuffer(gl, false); */
 
-      readBufferUtil.getTexture().disable();
+      readBufferUtil.getTexture().disable(gl);
     }
 
     void updateTextureCoords(GL gl, boolean force) {
         if(force || null==readTextureCoords) {
-            readTextureCoords = GLArrayDataServer.createFixed(gl, GLPointerFunc.GL_TEXTURE_COORD_ARRAY, "mgl_MultiTexCoord0", 
-                                                              2, GL.GL_FLOAT, true, 4, GL.GL_STATIC_DRAW);
+            readTextureCoords = GLArrayDataServer.createFixed(GLPointerFunc.GL_TEXTURE_COORD_ARRAY, 2, 
+                                                              GL.GL_FLOAT, true, 4, GL.GL_STATIC_DRAW);
             readTextureCoords.setEnableAlways(enableBufferAlways);
-            readTextureCoords.setVBOUsage(enableBufferVBO);
+            readTextureCoords.setVBOEnabled(enableBufferVBO);
             {
                 TextureCoords coords = readBufferUtil.getTexture().getImageTexCoords();
                 FloatBuffer cb = (FloatBuffer)readTextureCoords.getBuffer();
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 71a73a7..e3ca25a 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
@@ -30,16 +30,19 @@ package com.jogamp.opengl.test.junit.jogl.offscreen;
 
 import javax.media.opengl.*;
 
+import com.jogamp.opengl.util.GLReadBufferUtil;
+
 public class ReadBufferBase implements GLEventListener {
     public boolean glDebug = false ;
     public boolean glTrace = false ;
 
     protected GLDrawable externalRead;
 
-    ReadBufferUtil readBufferUtil = new ReadBufferUtil();
+    GLReadBufferUtil readBufferUtil;
 
-    public ReadBufferBase (GLDrawable externalRead) {
+    public ReadBufferBase (GLDrawable externalRead, boolean write2Texture) {
         this.externalRead = externalRead ;
+        this.readBufferUtil = new GLReadBufferUtil(false, write2Texture);
     }
 
     public void init(GLAutoDrawable drawable) {
@@ -78,13 +81,13 @@ public class ReadBufferBase implements GLEventListener {
     }
 
     public void dispose(GLAutoDrawable drawable) {
-        readBufferUtil.dispose();
+        readBufferUtil.dispose(drawable.getGL());
     }
 
     public void display(GLAutoDrawable drawable) {
         GL gl = drawable.getGL();
 
-        readBufferUtil.fetchOffscreenTexture(drawable, gl);
+        readBufferUtil.readPixels(gl, drawable, false);
     }
 
 }
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/ReadBufferUtil.java b/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/ReadBufferUtil.java
deleted file mode 100644
index d4fa0d6..0000000
--- a/src/test/com/jogamp/opengl/test/junit/jogl/offscreen/ReadBufferUtil.java
+++ /dev/null
@@ -1,107 +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.offscreen;
-
-import com.jogamp.opengl.util.GLBuffers;
-import java.nio.*;
-import javax.media.opengl.*;
-
-import com.jogamp.opengl.util.texture.Texture;
-import com.jogamp.opengl.util.texture.TextureData;
-
-public class ReadBufferUtil {
-    protected int readPixelSizeLast = 0;
-    protected Buffer readPixelBuffer = null;
-    protected TextureData readTextureData = null;
-    protected Texture readTexture = new Texture(GL.GL_TEXTURE_2D);
-
-    public Buffer getPixelBuffer() { return readPixelBuffer; }
-    public void rewindPixelBuffer() { readPixelBuffer.rewind(); }
-
-    public TextureData getTextureData() { return readTextureData; }
-    public Texture getTexture() { return readTexture; }
-
-    public boolean isValid() {
-      return null!=readTexture && null!=readTextureData && null!=readPixelBuffer ;
-    }
-
-    public void fetchOffscreenTexture(GLDrawable drawable, GL gl) {
-        int readPixelSize = drawable.getWidth() * drawable.getHeight() * 3 ; // RGB
-        boolean newData = false;
-        if(readPixelSize>readPixelSizeLast) {
-            readPixelBuffer = GLBuffers.newDirectGLBuffer(GL.GL_UNSIGNED_BYTE, readPixelSize);
-            readPixelSizeLast = readPixelSize ;
-            try {
-                readTextureData = new TextureData(
-                           gl.getGLProfile(),
-                           // gl.isGL2GL3()?gl.GL_RGBA:gl.GL_RGB,
-                           gl.GL_RGB,
-                           drawable.getWidth(), drawable.getHeight(),
-                           0, 
-                           gl.GL_RGB,
-                           gl.GL_UNSIGNED_BYTE,
-                           false, false, 
-                           false /* flip */,
-                           readPixelBuffer,
-                           null /* Flusher */);
-                newData = true;
-            } catch (Exception e) {
-                readTextureData = null;
-                readPixelBuffer = null;
-                readPixelSizeLast = 0;
-                throw new RuntimeException("can not fetch offscreen texture", e);
-            }
-        }
-        if(null!=readPixelBuffer) {
-            readPixelBuffer.clear();
-            gl.glReadPixels(0, 0, drawable.getWidth(), drawable.getHeight(), GL.GL_RGB, GL.GL_UNSIGNED_BYTE, readPixelBuffer);
-            readPixelBuffer.rewind();
-            if(newData) {
-                readTexture.updateImage(readTextureData);
-            } else {
-                readTexture.updateSubImage(readTextureData, 0, 
-                                           0, 0, // src offset
-                                           0, 0, // dst offset
-                                           drawable.getWidth(), drawable.getHeight());
-            }
-            readPixelBuffer.rewind();
-        }
-    }
-
-    @SuppressWarnings("deprecation")
-    public void dispose() {
-        readTexture.dispose();
-        readTextureData = null;
-        readPixelBuffer.clear();
-        readPixelBuffer = null;
-        readPixelSizeLast = 0;
-    }
-
-}
-
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 3ad2c42..8ca1f3e 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
@@ -30,6 +30,7 @@ package com.jogamp.opengl.test.junit.jogl.offscreen;
 
 import javax.media.opengl.*;
 
+import com.jogamp.opengl.util.GLReadBufferUtil;
 import com.jogamp.opengl.util.texture.TextureIO;
 
 import java.io.File;
@@ -39,11 +40,11 @@ import javax.media.nativewindow.*;
 
 public class Surface2File implements SurfaceUpdatedListener {
 
-    ReadBufferUtil readBufferUtil = new ReadBufferUtil();
+    GLReadBufferUtil readBufferUtil = new GLReadBufferUtil(false, false);
     int shotNum = 0;
 
-    public void dispose() {
-        readBufferUtil.dispose();
+    public void dispose(GL gl) {
+        readBufferUtil.dispose(gl);
     }
 
     public void surfaceUpdated(Object updater, NativeSurface ns, long when) {
@@ -54,7 +55,7 @@ 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();
-                readBufferUtil.fetchOffscreenTexture(drawable, gl);
+                readBufferUtil.readPixels(gl, drawable, false);
                 gl.glFinish();
                 try {
                     surface2File("shot");
@@ -71,9 +72,8 @@ public class Surface2File implements SurfaceUpdatedListener {
         }
 
         File file = File.createTempFile(basename + shotNum + "-", ".ppm");
-        TextureIO.write(readBufferUtil.getTextureData(), file);
+        readBufferUtil.write(file);
         System.err.println("Wrote: " + file.getAbsolutePath() + ", ...");
         shotNum++;
-        readBufferUtil.rewindPixelBuffer();
     }
 }
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 6a02bc0..5618194 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
@@ -28,7 +28,6 @@
  
 package com.jogamp.opengl.test.junit.jogl.offscreen;
 
-
 import com.jogamp.newt.Display;
 import com.jogamp.newt.NewtFactory;
 import com.jogamp.newt.Screen;
@@ -46,7 +45,7 @@ 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.RedSquare;
+import com.jogamp.opengl.test.junit.jogl.demos.es2.RedSquareES2;
 import java.io.IOException;
 
 public class TestOffscreen01GLPBufferNEWT extends UITestCase {
@@ -88,11 +87,11 @@ public class TestOffscreen01GLPBufferNEWT extends UITestCase {
         Assert.assertNotNull(glWindow);
         glWindow.setVisible(true);
 
-        GLEventListener demo = new RedSquare();
+        GLEventListener demo = new RedSquareES2();
         WindowUtilNEWT.setDemoFields(demo, window, glWindow, false);
         glWindow.addGLEventListener(demo);
 
-        while ( glWindow.getTotalFrames() < 2) {
+        while ( glWindow.getTotalFPSFrames() < 2) {
             glWindow.display();
         }
 
@@ -182,12 +181,12 @@ public class TestOffscreen01GLPBufferNEWT extends UITestCase {
             Assert.assertNotNull(glWindows[i]);
             glWindows[i].setVisible(true);
 
-            demos[i] = new RedSquare();
+            demos[i] = new RedSquareES2();
             WindowUtilNEWT.setDemoFields(demos[i], windows[i], glWindows[i], false);
             glWindows[i].addGLEventListener(demos[i]);
         }
 
-        while ( glWindows[0].getTotalFrames() < 2) {
+        while ( glWindows[0].getTotalFPSFrames() < 2) {
             for(i=0; i<winnum; i++) {
                 glWindows[i].display();
             }
@@ -235,12 +234,12 @@ public class TestOffscreen01GLPBufferNEWT extends UITestCase {
             glWindows[i] = GLWindow.create(windows[i]);
             Assert.assertNotNull(glWindows[i]);
             glWindows[i].setVisible(true);
-            demos[i] = new RedSquare();
+            demos[i] = new RedSquareES2();
             WindowUtilNEWT.setDemoFields(demos[i], windows[i], glWindows[i], false);
             glWindows[i].addGLEventListener(demos[i]);
         }
 
-        while ( glWindows[0].getTotalFrames() < 2) {
+        while ( glWindows[0].getTotalFPSFrames() < 2) {
             for(i=0; i<winnum; i++) {
                 glWindows[i].display();
             }
@@ -282,19 +281,15 @@ public class TestOffscreen01GLPBufferNEWT extends UITestCase {
         Assert.assertNotNull(glWindow);
         glWindow.setVisible(true);
 
-        GLWindow windowOnScreen = null;
         WindowListener wl=null;
         MouseListener ml=null;
         SurfaceUpdatedListener ul=null;
 
-        GLEventListener demo = new RedSquare();
+        GLEventListener demo = new RedSquareES2();
         Assert.assertNotNull(demo);
 
-        WindowUtilNEWT.run(glWindow, demo, windowOnScreen, wl, ml, ul, 2, true /*snapshot*/, false /*debug*/);
+        WindowUtilNEWT.run(glWindow, demo, null, wl, ml, ul, 2, true /*snapshot*/, false /*debug*/);
 
-        if(null!=windowOnScreen) {
-            windowOnScreen.destroy();
-        }
         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 d92b4ff..1b43940 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
@@ -46,9 +46,13 @@ 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.RedSquare;
+import com.jogamp.opengl.test.junit.jogl.demos.es1.RedSquareES1;
 import java.io.IOException;
 
+/**
+ * Using ES1 GL demo, since pixmap might not be hw accelerated, 
+ * hence it is possible to not have GLSL. 
+ */
 public class TestOffscreen02BitmapNEWT extends UITestCase {
     static GLProfile glpDefault;
     static GLDrawableFactory glDrawableFactory;
@@ -97,11 +101,11 @@ public class TestOffscreen02BitmapNEWT extends UITestCase {
         Assert.assertNotNull(glWindow);
         glWindow.setVisible(true);
 
-        GLEventListener demo = new RedSquare();
+        GLEventListener demo = new RedSquareES1();
         WindowUtilNEWT.setDemoFields(demo, window, glWindow, false);
         glWindow.addGLEventListener(demo);
 
-        while ( glWindow.getTotalFrames() < 2) {
+        while ( glWindow.getTotalFPSFrames() < 2) {
             glWindow.display();
         }
 
@@ -140,19 +144,15 @@ public class TestOffscreen02BitmapNEWT extends UITestCase {
         Assert.assertNotNull(glWindow);
         glWindow.setVisible(true);
 
-        GLWindow windowOnScreen = null;
         WindowListener wl=null;
         MouseListener ml=null;
         SurfaceUpdatedListener ul=null;
 
-        GLEventListener demo = new RedSquare();
+        GLEventListener demo = new RedSquareES1();
         Assert.assertNotNull(demo);
 
-        WindowUtilNEWT.run(glWindow, demo, windowOnScreen, wl, ml, ul, 2, true /*snapshot*/, false /*debug*/);
+        WindowUtilNEWT.run(glWindow, demo, null, wl, ml, ul, 2, true /*snapshot*/, false /*debug*/);
 
-        if(null!=windowOnScreen) {
-            windowOnScreen.destroy();
-        }
         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 4420a51..199b094 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
@@ -100,7 +100,7 @@ public class WindowUtilNEWT {
             System.err.println("+++++++++++++++++++++++++++");
         }
 
-        while ( windowOffScreen.getTotalFrames() < frames) {
+        while ( windowOffScreen.getTotalFPSFrames() < frames) {
             windowOffScreen.display();
         }
         windowOffScreen.removeAllSurfaceUpdatedListener();
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/swt/OneTriangle.java b/src/test/com/jogamp/opengl/test/junit/jogl/swt/OneTriangle.java
deleted file mode 100644
index 655e590..0000000
--- a/src/test/com/jogamp/opengl/test/junit/jogl/swt/OneTriangle.java
+++ /dev/null
@@ -1,71 +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.GL;
-import javax.media.opengl.GL2;
-import javax.media.opengl.glu.GLU;
-
-import org.eclipse.swt.graphics.Rectangle;
-
-/**
- * A utility class to encapsulate drawing a single triangle for unit tests.
- * @author Wade Walker
- */
-public class OneTriangle {
-
-    public static void setup( GL2 gl, Rectangle rectangle ) {
-        gl.glMatrixMode( GL2.GL_PROJECTION );
-        gl.glLoadIdentity();
-
-        // coordinate system origin at lower left with width and height same as the window
-        GLU glu = new GLU();
-        glu.gluOrtho2D( 0.0f, rectangle.width, 0.0f, rectangle.height );
-
-        gl.glMatrixMode( GL2.GL_MODELVIEW );
-        gl.glLoadIdentity();
-
-        gl.glViewport( 0, 0, rectangle.width, rectangle.height );
-    }
-
-    public static void render( GL2 gl, Rectangle rectangle ) {
-        gl.glClear( GL.GL_COLOR_BUFFER_BIT );
-
-        // draw a triangle filling the window
-        gl.glLoadIdentity();
-        gl.glBegin( GL.GL_TRIANGLES );
-        gl.glColor3f( 1, 0, 0 );
-        gl.glVertex2f( 0, 0 );
-        gl.glColor3f( 0, 1, 0 );
-        gl.glVertex2f( rectangle.width, 0 );
-        gl.glColor3f( 0, 0, 1 );
-        gl.glVertex2f( rectangle.width / 2, rectangle.height );
-        gl.glEnd();
-    }
-}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWT01GLn.java b/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWT01GLn.java
index af125d4..e6d937d 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWT01GLn.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWT01GLn.java
@@ -53,6 +53,7 @@ import org.junit.BeforeClass;
 import org.junit.After;
 import org.junit.Test;
 
+import com.jogamp.opengl.test.junit.jogl.demos.gl2.OneTriangle;
 import com.jogamp.opengl.test.junit.util.UITestCase;
 
 /**
@@ -72,7 +73,7 @@ public class TestSWT01GLn extends UITestCase {
 
     @BeforeClass
     public static void startup() {
-        GLProfile.initSingleton( true );
+        GLProfile.initSingleton(true);
         System.out.println( "GLProfile " + GLProfile.glAvailabilityToString() );
     }
 
@@ -125,7 +126,7 @@ public class TestSWT01GLn extends UITestCase {
                 glcanvas.setCurrent();
                 glcontext.makeCurrent();
                 GL2 gl = glcontext.getGL().getGL2();
-                OneTriangle.setup( gl, rectangle );
+                OneTriangle.setup( gl, rectangle.width, rectangle.height );
                 glcontext.release();
                 System.err.println("resize");
             }
@@ -138,7 +139,7 @@ public class TestSWT01GLn extends UITestCase {
                 glcanvas.setCurrent();
                 glcontext.makeCurrent();
                 GL2 gl = glcontext.getGL().getGL2();
-                OneTriangle.render( gl, rectangle );
+                OneTriangle.render( gl, rectangle.width, rectangle.height );
                 glcanvas.swapBuffers();
                 glcontext.release();
                 System.err.println("paint");
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWT02GLn.java b/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWT02GLn.java
index b3d167b..1ee3748 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWT02GLn.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWT02GLn.java
@@ -51,6 +51,7 @@ import org.junit.BeforeClass;
 import org.junit.After;
 import org.junit.Test;
 
+import com.jogamp.opengl.test.junit.jogl.demos.gl2.OneTriangle;
 import com.jogamp.opengl.test.junit.util.UITestCase;
 import javax.media.nativewindow.AbstractGraphicsDevice;
 import javax.media.nativewindow.ProxySurface;
@@ -151,7 +152,7 @@ public class TestSWT02GLn extends UITestCase {
                 if( GLContext.CONTEXT_NOT_CURRENT < glcontext.makeCurrent() ) {
                     glok=true;
                     GL2 gl = glcontext.getGL().getGL2();
-                    OneTriangle.setup( gl, rectangle );
+                    OneTriangle.setup( gl, rectangle.width, rectangle.height );
                     glcontext.release();
                 } else {
                     sizeMissing[0] = true;
@@ -169,10 +170,10 @@ public class TestSWT02GLn extends UITestCase {
                     glok=true;
                     GL2 gl = glcontext.getGL().getGL2();
                     if(sizeMissing[0]) {
-                        OneTriangle.setup( gl, rectangle );
+                        OneTriangle.setup( gl, rectangle.width, rectangle.height);
                         sizeMissing[0] = false;
                     }
-                    OneTriangle.render( gl, rectangle );
+                    OneTriangle.render( gl, rectangle.width, rectangle.height);
                     drawable.swapBuffers();
                     glcontext.release();
                 }
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTAWT01GLn.java b/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTAWT01GLn.java
index 25653ab..595e6fb 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTAWT01GLn.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/swt/TestSWTAWT01GLn.java
@@ -52,12 +52,13 @@ import org.junit.BeforeClass;
 import org.junit.After;
 import org.junit.Test;
 
+import com.jogamp.opengl.test.junit.jogl.demos.gl2.OneTriangle;
 import com.jogamp.opengl.test.junit.util.UITestCase;
 
 /**
  * Tests that a basic SWT app can open without crashing under different GL profiles. Uses the AWT GL canvas with
  * the SWT_AWT bridge.
- * @author Wade Walker
+ * @author Wade Walker, et.al.
  */
 public class TestSWTAWT01GLn extends UITestCase {
 
@@ -71,7 +72,6 @@ public class TestSWTAWT01GLn extends UITestCase {
 
     @BeforeClass
     public static void startup() {
-        GLProfile.initSingleton( true );
         System.out.println( "GLProfile " + GLProfile.glAvailabilityToString() );
     }
 
@@ -96,10 +96,14 @@ public class TestSWTAWT01GLn extends UITestCase {
         Assert.assertNotNull( composite );
         Assert.assertNotNull( glcanvas );
         try {
-            frame.setVisible( false );
-            frame.remove( glcanvas );
-            frame.dispose();
+            javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
+                public void run() {
+                    frame.setVisible(false);
+                    frame.remove(glcanvas);
+                    frame.dispose();
+                }});
             composite.dispose();
+            shell.close();
             shell.dispose();
             display.dispose();
         }
@@ -133,14 +137,14 @@ public class TestSWTAWT01GLn extends UITestCase {
             public void display( GLAutoDrawable glautodrawable ) {
                 Rectangle rectangle = new Rectangle( 0, 0, glautodrawable.getWidth(), glautodrawable.getHeight() );
                 GL2 gl = glautodrawable.getGL().getGL2();
-                OneTriangle.render( gl, rectangle );
+                OneTriangle.render( gl, rectangle.width, rectangle.height );
             }
 
             /* @Override */
             public void reshape( GLAutoDrawable glautodrawable, int x, int y, int width, int height ) {
                 Rectangle rectangle = new Rectangle( 0, 0, glautodrawable.getWidth(), glautodrawable.getHeight() );
                 GL2 gl = glautodrawable.getGL().getGL2();
-                OneTriangle.setup( gl, rectangle );
+                OneTriangle.setup( gl, rectangle.width, rectangle.height );
             }
         });
 
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/texture/TestGrayTextureFromFileAWTBug417.java b/src/test/com/jogamp/opengl/test/junit/jogl/texture/TestGrayTextureFromFileAWTBug417.java
index 82cd917..8f38ac6 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/texture/TestGrayTextureFromFileAWTBug417.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/texture/TestGrayTextureFromFileAWTBug417.java
@@ -65,7 +65,6 @@ public class TestGrayTextureFromFileAWTBug417 extends UITestCase {
 
     @BeforeClass
     public static void initClass() {
-        GLProfile.initSingleton(true);
         glp = GLProfile.get(GLProfile.GL2GL3);
         Assert.assertNotNull(glp);
         caps = new GLCapabilities(glp);
@@ -85,9 +84,8 @@ public class TestGrayTextureFromFileAWTBug417 extends UITestCase {
 
     @Test
     public void test1() throws InterruptedException {
-        GLCanvas glCanvas = new GLCanvas(caps);
-
-        Frame frame = new Frame("Texture Test");
+        final GLCanvas glCanvas = new GLCanvas(caps);
+        final Frame frame = new Frame("Texture Test");
         Assert.assertNotNull(frame);
         frame.add(glCanvas);
         frame.setSize( 256, 128 );
@@ -118,12 +116,17 @@ public class TestGrayTextureFromFileAWTBug417 extends UITestCase {
         Thread.sleep(500); // 500 ms
 
         animator.stop();
-        frame.setVisible(false);
-        frame.remove(glCanvas);
-        glCanvas=null;
-        Assert.assertNotNull(frame);
-        frame.dispose();
-        frame=null;
+        try {
+            javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
+                public void run() {
+                    frame.setVisible(false);
+                    frame.remove(glCanvas);
+                    frame.dispose();
+                }});
+        } catch( Throwable throwable ) {
+            throwable.printStackTrace();
+            Assume.assumeNoException( throwable );
+        }        
     }
 
     public static void main(String args[]) throws IOException {
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/texture/TestTexture01AWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/texture/TestTexture01AWT.java
index bd83799..4905764 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/texture/TestTexture01AWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/texture/TestTexture01AWT.java
@@ -49,6 +49,7 @@ import java.awt.image.BufferedImage;
 import java.io.IOException;
 import org.junit.Assert;
 import org.junit.After;
+import org.junit.Assume;
 import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -60,7 +61,6 @@ public class TestTexture01AWT extends UITestCase {
 
     @BeforeClass
     public static void initClass() {
-        GLProfile.initSingleton(true);
         glp = GLProfile.get(GLProfile.GL2GL3);
         Assert.assertNotNull(glp);
         caps = new GLCapabilities(glp);
@@ -103,9 +103,8 @@ public class TestTexture01AWT extends UITestCase {
 
     @Test
     public void test1() throws InterruptedException {
-        GLCanvas glCanvas = new GLCanvas(caps);
-
-        Frame frame = new Frame("Texture Test");
+        final GLCanvas glCanvas = new GLCanvas(caps);
+        final Frame frame = new Frame("Texture Test");
         Assert.assertNotNull(frame);
         frame.add(glCanvas);
         frame.setSize(512, 512);
@@ -121,12 +120,17 @@ public class TestTexture01AWT extends UITestCase {
         Thread.sleep(500); // 500 ms
 
         animator.stop();
-        frame.setVisible(false);
-        frame.remove(glCanvas);
-        glCanvas=null;
-        Assert.assertNotNull(frame);
-        frame.dispose();
-        frame=null;
+        try {
+            javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
+                public void run() {
+                    frame.setVisible(false);
+                    frame.remove(glCanvas);
+                    frame.dispose();
+                }});
+        } catch( Throwable throwable ) {
+            throwable.printStackTrace();
+            Assume.assumeNoException( throwable );
+        }                
     }
 
     public static void main(String args[]) throws IOException {
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/gl2/TextureGL2ListenerDraw1.java b/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/gl2/TextureGL2ListenerDraw1.java
index 649a3b1..084caa6 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/gl2/TextureGL2ListenerDraw1.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/util/texture/gl2/TextureGL2ListenerDraw1.java
@@ -69,7 +69,7 @@ public class TextureGL2ListenerDraw1 implements GLEventListener {
     public void dispose(GLAutoDrawable drawable) {
         GL2 gl = drawable.getGL().getGL2();
         if(null!=texture) {
-            texture.disable();
+            texture.disable(gl);
             texture.destroy(gl);
         }
         if(null!=textureData) {
@@ -91,8 +91,8 @@ public class TextureGL2ListenerDraw1 implements GLEventListener {
     
         // Now draw one quad with the texture
         if(null!=texture) {
-            texture.enable();
-            texture.bind();
+            texture.enable(gl);
+            texture.bind(gl);
             gl.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_TEXTURE_ENV_MODE, GL2.GL_REPLACE);
             TextureCoords coords = texture.getImageTexCoords();
             gl.glBegin(GL2.GL_QUADS);
@@ -105,7 +105,7 @@ public class TextureGL2ListenerDraw1 implements GLEventListener {
             gl.glTexCoord2f(coords.left(), coords.top());
             gl.glVertex3f(0, 1, 0);
             gl.glEnd();
-            texture.disable();
+            texture.disable(gl);
         }
     }
 }
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/ManualScreenMode03NEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/ManualScreenMode03NEWT.java
new file mode 100644
index 0000000..29ec443
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/newt/ManualScreenMode03NEWT.java
@@ -0,0 +1,110 @@
+/**
+ * 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.newt;
+
+import java.io.IOException;
+import javax.media.opengl.GLCapabilities;
+import javax.media.opengl.GLProfile;
+
+import com.jogamp.opengl.util.Animator;
+
+import com.jogamp.newt.Display;
+import com.jogamp.newt.NewtFactory;
+import com.jogamp.newt.Screen;
+import com.jogamp.newt.ScreenMode;
+import com.jogamp.newt.opengl.GLWindow;
+import com.jogamp.newt.util.ScreenModeUtil;
+import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
+import com.jogamp.opengl.test.junit.util.UITestCase;
+import java.util.List;
+import javax.media.nativewindow.util.Dimension;
+
+/**
+ * Manual testing the ScreenImpl shutdown hook, 
+ * which shall reset the ScreenMode to it's original state
+ * when the application exists (normal or ctrl-c).
+ */
+public class ManualScreenMode03NEWT extends UITestCase {
+    static int waitTime = 7000; // 1 sec
+    
+    static GLWindow createWindow(Screen screen, GLCapabilities caps, int width, int height, boolean onscreen, boolean undecorated) {
+        caps.setOnscreen(onscreen);
+
+        GLWindow window = GLWindow.create(screen, caps);
+        window.setSize(width, height);
+        window.addGLEventListener(new GearsES2());
+        window.setVisible(true);
+        return window;
+    }
+
+    public void run() {
+        int width  = 640;
+        int height = 480;
+        GLProfile glp = GLProfile.getDefault();
+        GLCapabilities caps = new GLCapabilities(glp);
+        Display display = NewtFactory.createDisplay(null); // local display
+        Screen screen  = NewtFactory.createScreen(display, 0); // screen 0
+        GLWindow window = createWindow(screen, caps, width, height, true /* onscreen */, false /* undecorated */);
+
+        List<ScreenMode> screenModes = screen.getScreenModes();
+        if(null==screenModes) {
+            // no support ..
+            System.err.println("Your platform has no ScreenMode change support, sorry");
+            return;
+        }
+        Animator animator = new Animator(window);
+        animator.start();
+
+        ScreenMode smCurrent = screen.getCurrentScreenMode();
+        ScreenMode smOrig = screen.getOriginalScreenMode();
+        System.err.println("[0] current/orig: "+smCurrent);
+
+        screenModes = ScreenModeUtil.filterByRate(screenModes, smOrig.getMonitorMode().getRefreshRate());
+        screenModes = ScreenModeUtil.filterByRotation(screenModes, 0);
+        screenModes = ScreenModeUtil.filterByResolution(screenModes, new Dimension(801, 601));
+        screenModes = ScreenModeUtil.getHighestAvailableBpp(screenModes);
+
+        ScreenMode sm = (ScreenMode) screenModes.get(0);
+        System.err.println("[0] set current: "+sm);
+        screen.setCurrentScreenMode(sm);
+
+        System.err.print("[0] post setting .. wait <");
+        try {
+            Thread.sleep(waitTime);
+        } catch (InterruptedException e) {
+        }
+        System.err.println("done>");
+        System.exit(0);
+    }
+
+    public static void main(String args[]) throws IOException {
+        ManualScreenMode03NEWT t = new ManualScreenMode03NEWT();
+        t.run();
+    }
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestDisplayLifecycle01NEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestDisplayLifecycle01NEWT.java
index 9343e2d..d027460 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/TestDisplayLifecycle01NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/TestDisplayLifecycle01NEWT.java
@@ -28,19 +28,10 @@
 
 package com.jogamp.opengl.test.junit.newt;
 
-import java.lang.reflect.*;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
 import org.junit.Assert;
-import org.junit.Before;
 import org.junit.BeforeClass;
-import org.junit.After;
-import org.junit.AfterClass;
 import org.junit.Test;
 
-import javax.media.nativewindow.*;
 import javax.media.opengl.*;
 
 import com.jogamp.newt.*;
@@ -50,7 +41,7 @@ import java.io.IOException;
 
 import com.jogamp.opengl.test.junit.util.UITestCase;
 import com.jogamp.opengl.test.junit.util.MiscUtils;
-import com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.Gears;
+import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
 
 public class TestDisplayLifecycle01NEWT extends UITestCase {
     static GLProfile glp;
@@ -83,8 +74,9 @@ public class TestDisplayLifecycle01NEWT extends UITestCase {
         } else {
             glWindow = GLWindow.create(caps);
         }
+        glWindow.setUpdateFPSFrames(1, null);
 
-        GLEventListener demo = new Gears();
+        GLEventListener demo = new GearsES2();
         setDemoFields(demo, glWindow);
         glWindow.addGLEventListener(demo);
         glWindow.addWindowListener(new TraceWindowAdapter());
@@ -113,12 +105,11 @@ public class TestDisplayLifecycle01NEWT extends UITestCase {
         Assert.assertEquals(false,screen.isNativeValid());
 
         Assert.assertNotNull(window.getScreen());
-        Assert.assertEquals(true,window.isValid());
         Assert.assertEquals(false,window.isNativeValid());
         Assert.assertEquals(false,window.isVisible());
 
         // lazy native creation sequence: Display, Screen and Window
-        Assert.assertEquals(0, window.getTotalFrames());
+        Assert.assertEquals(0, window.getTotalFPSFrames());
         window.setVisible(true);
 
         Assert.assertEquals(screen,window.getScreen());
@@ -130,14 +121,14 @@ public class TestDisplayLifecycle01NEWT extends UITestCase {
         Assert.assertEquals(true,screen.isNativeValid());
         Assert.assertEquals(true,window.isNativeValid());
         Assert.assertEquals(true,window.isVisible());
-        System.err.println("Frames for setVisible(true) 1: "+window.getTotalFrames());
-        Assert.assertTrue(0 < window.getTotalFrames());
+        System.err.println("Frames for setVisible(true) 1: "+window.getTotalFPSFrames());
+        Assert.assertTrue(0 < window.getTotalFPSFrames());
 
-        while(window.getDuration()<1*durationPerTest) {
+        while(window.getTotalFPSDuration()<1*durationPerTest) {
             window.display();
             Thread.sleep(100);
         }
-        System.err.println("duration: "+window.getDuration());
+        System.err.println("duration: "+window.getTotalFPSDuration());
 
         // just make the Window invisible
         window.setVisible(false);
@@ -145,19 +136,19 @@ public class TestDisplayLifecycle01NEWT extends UITestCase {
         Assert.assertEquals(false,window.isVisible());
 
         // just make the Window visible again
-        window.resetCounter();
-        Assert.assertEquals(0, window.getTotalFrames());
+        window.resetFPSCounter();
+        Assert.assertEquals(0, window.getTotalFPSFrames());
         window.setVisible(true);
         Assert.assertEquals(true,window.isNativeValid());
         Assert.assertEquals(true,window.isVisible());
-        System.err.println("Frames for setVisible(true) 1: "+window.getTotalFrames());
-        Assert.assertTrue(0 < window.getTotalFrames());
+        System.err.println("Frames for setVisible(true) 1: "+window.getTotalFPSFrames());
+        Assert.assertTrue(0 < window.getTotalFPSFrames());
 
-        while(window.getDuration()<2*durationPerTest) {
+        while(window.getTotalFPSDuration()<2*durationPerTest) {
             window.display();
             Thread.sleep(100);
         }
-        System.err.println("duration: "+window.getDuration());
+        System.err.println("duration: "+window.getTotalFPSDuration());
 
         // destruction ..
         window.destroy();
@@ -169,15 +160,14 @@ public class TestDisplayLifecycle01NEWT extends UITestCase {
         Assert.assertEquals(false,display.getEDTUtil().isRunning());
         Assert.assertEquals(0,screen.getReferenceCount());
         Assert.assertEquals(false,screen.isNativeValid());
-        Assert.assertEquals(true, window.isValid());
         Assert.assertEquals(false,window.isNativeValid());
         Assert.assertEquals(false,window.isVisible());
-        window.resetCounter();
-        Assert.assertEquals(0, window.getTotalFrames());
+        window.resetFPSCounter();
+        Assert.assertEquals(0, window.getTotalFPSFrames());
 
         // a display call shall not change a thing
         window.display();
-        Assert.assertEquals(0, window.getTotalFrames());
+        Assert.assertEquals(0, window.getTotalFPSFrames());
         Assert.assertEquals(false,window.isNativeValid());
         Assert.assertEquals(false,window.isVisible());
 
@@ -193,18 +183,18 @@ public class TestDisplayLifecycle01NEWT extends UITestCase {
         Assert.assertEquals(true,screen.isNativeValid());
         Assert.assertEquals(true,window.isNativeValid());
         Assert.assertEquals(true,window.isVisible());
-        System.err.println("Frames for setVisible(true) 2: "+window.getTotalFrames());
-        Assert.assertTrue(0 < window.getTotalFrames());
+        System.err.println("Frames for setVisible(true) 2: "+window.getTotalFPSFrames());
+        Assert.assertTrue(0 < window.getTotalFPSFrames());
 
-        while(window.getDuration()<1*durationPerTest) {
+        while(window.getTotalFPSDuration()<1*durationPerTest) {
             window.display();
             Thread.sleep(100);
         }
-        System.err.println("duration: "+window.getDuration());
+        System.err.println("duration: "+window.getTotalFPSDuration());
 
         // destruction ..
         window.destroy();
-        display.dumpDisplayList("Post destroy(true)");
+        Display.dumpDisplayList("Post destroy(true)");
 
         // end-state == start-state
         Assert.assertEquals(0,Display.getActiveDisplayNumber());
@@ -216,7 +206,6 @@ public class TestDisplayLifecycle01NEWT extends UITestCase {
         Assert.assertEquals(false,screen.isNativeValid());
 
         Assert.assertNotNull(window.getScreen());
-        Assert.assertEquals(true,window.isValid());
         Assert.assertEquals(false,window.isNativeValid());
         Assert.assertEquals(false,window.isVisible());
     }
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestDisplayLifecycle02NEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestDisplayLifecycle02NEWT.java
index d17c5f0..4b3c5d5 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/TestDisplayLifecycle02NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/TestDisplayLifecycle02NEWT.java
@@ -28,19 +28,10 @@
 
 package com.jogamp.opengl.test.junit.newt;
 
-import java.lang.reflect.*;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
 import org.junit.Assert;
-import org.junit.Before;
 import org.junit.BeforeClass;
-import org.junit.After;
-import org.junit.AfterClass;
 import org.junit.Test;
 
-import javax.media.nativewindow.*;
 import javax.media.opengl.*;
 
 import com.jogamp.newt.*;
@@ -50,7 +41,7 @@ import java.io.IOException;
 
 import com.jogamp.opengl.test.junit.util.UITestCase;
 import com.jogamp.opengl.test.junit.util.MiscUtils;
-import com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.Gears;
+import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
 
 public class TestDisplayLifecycle02NEWT extends UITestCase {
     static GLProfile glp;
@@ -76,8 +67,9 @@ public class TestDisplayLifecycle02NEWT extends UITestCase {
         // Create native windowing resources .. X11/Win/OSX
         // 
         GLWindow glWindow = GLWindow.create(caps);
+        glWindow.setUpdateFPSFrames(1, null);
 
-        GLEventListener demo = new Gears();
+        GLEventListener demo = new GearsES2();
         setDemoFields(demo, glWindow);
         glWindow.addGLEventListener(demo);
         glWindow.addWindowListener(new TraceWindowAdapter());
@@ -106,7 +98,7 @@ public class TestDisplayLifecycle02NEWT extends UITestCase {
         Assert.assertEquals(false,window.isVisible());
 
         // lazy native creation sequence: Display, Screen and Window
-        Assert.assertEquals(0, window.getTotalFrames());
+        Assert.assertEquals(0, window.getTotalFPSFrames());
         window.setVisible(true);
 
         Assert.assertEquals(screen,window.getScreen());
@@ -119,14 +111,14 @@ public class TestDisplayLifecycle02NEWT extends UITestCase {
         Assert.assertEquals(true,screen.isNativeValid());
         Assert.assertEquals(true,window.isNativeValid());
         Assert.assertEquals(true,window.isVisible());
-        System.err.println("Frames for setVisible(true) 1: "+window.getTotalFrames());
-        Assert.assertTrue(0 < window.getTotalFrames());
+        System.err.println("Frames for setVisible(true) 1: "+window.getTotalFPSFrames());
+        Assert.assertTrue(0 < window.getTotalFPSFrames());
 
-        while(window.getDuration()<1*durationPerTest) {
+        while(window.getTotalFPSDuration()<1*durationPerTest) {
             window.display();
             Thread.sleep(100);
         }
-        System.err.println("duration: "+window.getDuration());
+        System.err.println("duration: "+window.getTotalFPSDuration());
 
         // just make the Window invisible
         window.setVisible(false);
@@ -134,19 +126,19 @@ public class TestDisplayLifecycle02NEWT extends UITestCase {
         Assert.assertEquals(false,window.isVisible());
 
         // just make the Window visible again
-        window.resetCounter();
-        Assert.assertEquals(0, window.getTotalFrames());
+        window.resetFPSCounter();
+        Assert.assertEquals(0, window.getTotalFPSFrames());
         window.setVisible(true);
         Assert.assertEquals(true,window.isNativeValid());
         Assert.assertEquals(true,window.isVisible());
-        System.err.println("Frames for setVisible(true) 1: "+window.getTotalFrames());
-        Assert.assertTrue(0 < window.getTotalFrames());
+        System.err.println("Frames for setVisible(true) 1: "+window.getTotalFPSFrames());
+        Assert.assertTrue(0 < window.getTotalFPSFrames());
 
-        while(window.getDuration()<2*durationPerTest) {
+        while(window.getTotalFPSDuration()<2*durationPerTest) {
             window.display();
             Thread.sleep(100);
         }
-        System.err.println("duration: "+window.getDuration());
+        System.err.println("duration: "+window.getTotalFPSDuration());
 
         // destruction.. ref count down, but keep all
         window.destroy();
@@ -160,16 +152,15 @@ public class TestDisplayLifecycle02NEWT extends UITestCase {
         Assert.assertEquals(0,screen.getReferenceCount());
         Assert.assertEquals(false,screen.isNativeValid());
         Assert.assertNotNull(window.getScreen());
-        Assert.assertEquals(true,window.isValid());
         Assert.assertEquals(false,window.isNativeValid());
         Assert.assertEquals(false,window.isVisible());
 
-        window.resetCounter();
-        Assert.assertEquals(0, window.getTotalFrames());
+        window.resetFPSCounter();
+        Assert.assertEquals(0, window.getTotalFPSFrames());
 
         // a display call shall not change a thing
         window.display();
-        Assert.assertEquals(0, window.getTotalFrames());
+        Assert.assertEquals(0, window.getTotalFPSFrames());
         Assert.assertEquals(false,window.isNativeValid());
         Assert.assertEquals(false,window.isVisible());
 
@@ -179,7 +170,6 @@ public class TestDisplayLifecycle02NEWT extends UITestCase {
         Assert.assertEquals(screen,window.getScreen());
         Assert.assertEquals(1,Display.getActiveDisplayNumber());
         Assert.assertEquals(1,display.getReferenceCount());
-        Assert.assertEquals(true,window.isValid());
         Assert.assertEquals(true,display.isNativeValid());
         Assert.assertEquals(true,display.getEDTUtil().isRunning());
         Assert.assertEquals(1,Screen.getActiveScreenNumber());
@@ -187,23 +177,21 @@ public class TestDisplayLifecycle02NEWT extends UITestCase {
         Assert.assertEquals(true,screen.isNativeValid());
         Assert.assertEquals(true,window.isNativeValid());
         Assert.assertEquals(true,window.isVisible());
-        System.err.println("Frames for setVisible(true) 2: "+window.getTotalFrames());
-        Assert.assertTrue(0 < window.getTotalFrames());
+        System.err.println("Frames for setVisible(true) 2: "+window.getTotalFPSFrames());
+        Assert.assertTrue(0 < window.getTotalFPSFrames());
 
-        while(window.getDuration()<1*durationPerTest) {
+        while(window.getTotalFPSDuration()<1*durationPerTest) {
             window.display();
             Thread.sleep(100);
         }
-        System.err.println("duration: "+window.getDuration());
+        System.err.println("duration: "+window.getTotalFPSDuration());
 
-        // destruction + invalidate, ie Display/Screen will be unreferenced
-        window.invalidate();
-        Assert.assertNull(window.getScreen());
-        Assert.assertEquals(false,window.isValid());
+        window.destroy();
+        Assert.assertEquals(screen,window.getScreen());
         Assert.assertEquals(false,window.isNativeValid());
         Assert.assertEquals(false,window.isVisible());
 
-        display.dumpDisplayList("Post destroy(true)");
+        Display.dumpDisplayList("Post destroy(true)");
 
         // end-state == start-state
         Assert.assertEquals(0,Display.getActiveDisplayNumber());
@@ -255,7 +243,7 @@ public class TestDisplayLifecycle02NEWT extends UITestCase {
         Assert.assertEquals(false,window2.isVisible());
 
         // lazy native creation sequence: Display, Screen and Window
-        Assert.assertEquals(0, window1.getTotalFrames());
+        Assert.assertEquals(0, window1.getTotalFPSFrames());
         window1.setVisible(true);
 
         Assert.assertEquals(1,Display.getActiveDisplayNumber());
@@ -267,10 +255,10 @@ public class TestDisplayLifecycle02NEWT extends UITestCase {
         Assert.assertEquals(true,screen.isNativeValid());
         Assert.assertEquals(true,window1.isNativeValid());
         Assert.assertEquals(true,window1.isVisible());
-        System.err.println("Frames for setVisible(true) 1: "+window1.getTotalFrames());
-        Assert.assertTrue(0 < window1.getTotalFrames());
+        System.err.println("Frames for setVisible(true) 1: "+window1.getTotalFPSFrames());
+        Assert.assertTrue(0 < window1.getTotalFPSFrames());
 
-        Assert.assertEquals(0, window2.getTotalFrames());
+        Assert.assertEquals(0, window2.getTotalFPSFrames());
         window2.setVisible(true);
 
         Assert.assertEquals(1,Display.getActiveDisplayNumber());
@@ -282,14 +270,14 @@ public class TestDisplayLifecycle02NEWT extends UITestCase {
         Assert.assertEquals(true,screen.isNativeValid());
         Assert.assertEquals(true,window2.isNativeValid());
         Assert.assertEquals(true,window2.isVisible());
-        System.err.println("Frames for setVisible(true) 2: "+window2.getTotalFrames());
-        Assert.assertTrue(0 < window2.getTotalFrames());
+        System.err.println("Frames for setVisible(true) 2: "+window2.getTotalFPSFrames());
+        Assert.assertTrue(0 < window2.getTotalFPSFrames());
 
-        while(window1.getDuration()<1*durationPerTest) {
+        while(window1.getTotalFPSDuration()<1*durationPerTest) {
             window1.display();
             Thread.sleep(100);
         }
-        System.err.println("duration: "+window1.getDuration());
+        System.err.println("duration: "+window1.getTotalFPSDuration());
 
         // just make the Window invisible
         window1.setVisible(false);
@@ -299,7 +287,6 @@ public class TestDisplayLifecycle02NEWT extends UITestCase {
         // destruction ...
         window1.destroy();
         Assert.assertNotNull(window1.getScreen());
-        Assert.assertEquals(true,window1.isValid());
         Assert.assertEquals(false,window1.isNativeValid());
         Assert.assertEquals(false,window1.isVisible());
 
@@ -315,7 +302,6 @@ public class TestDisplayLifecycle02NEWT extends UITestCase {
         // destruction
         window2.destroy();
         Assert.assertNotNull(window2.getScreen());
-        Assert.assertEquals(true,window2.isValid());
         Assert.assertEquals(false,window2.isNativeValid());
         Assert.assertEquals(false,window2.isVisible());
 
@@ -330,16 +316,12 @@ public class TestDisplayLifecycle02NEWT extends UITestCase {
         Assert.assertEquals(false,screen.isNativeValid());
 
         // invalidate .. remove all refs
-        window1.invalidate();
-        Assert.assertNull(window1.getScreen());
-        Assert.assertEquals(false,window1.isValid());
+        window1.destroy();
         Assert.assertEquals(false,window1.isNativeValid());
         Assert.assertEquals(false,window1.isVisible());
 
         // invalidate .. remove all refs
-        window2.invalidate();
-        Assert.assertNull(window2.getScreen());
-        Assert.assertEquals(false,window2.isValid());
+        window2.destroy();
         Assert.assertEquals(false,window2.isNativeValid());
         Assert.assertEquals(false,window2.isVisible());
 
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestEventSourceNotAWTBug.java b/src/test/com/jogamp/opengl/test/junit/newt/TestEventSourceNotAWTBug.java
index 67dd2a3..e6f3f0a 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/TestEventSourceNotAWTBug.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/TestEventSourceNotAWTBug.java
@@ -28,11 +28,7 @@
  
 package com.jogamp.opengl.test.junit.newt;
 
-import org.junit.Assert;
-import org.junit.Before;
 import org.junit.BeforeClass;
-import org.junit.After;
-import org.junit.AfterClass;
 import org.junit.Test;
 
 import java.io.IOException;
@@ -45,7 +41,7 @@ import javax.swing.WindowConstants;
 
 import com.jogamp.newt.awt.NewtCanvasAWT;
 import com.jogamp.newt.opengl.GLWindow;
-import com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.Gears;
+import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
 import com.jogamp.opengl.test.junit.util.*;
 
 /**
@@ -55,7 +51,6 @@ public class TestEventSourceNotAWTBug extends UITestCase {
 
     @BeforeClass
     public static void initClass() {
-        GLProfile.initSingleton(true);
     }
 
     @Test
@@ -70,7 +65,7 @@ public class TestEventSourceNotAWTBug extends UITestCase {
         jf.getContentPane().add(canvas);
 
         // The following line isn't event necessary to see the problem.
-        glWindow.addGLEventListener(new Gears());
+        glWindow.addGLEventListener(new GearsES2());
 
         final JFrame f_jf = jf;
 
@@ -88,7 +83,7 @@ public class TestEventSourceNotAWTBug extends UITestCase {
                 f_jf.dispose();
             }
         });
-        glWindow.invalidate();
+        glWindow.destroy();
     }
 
     public static void main(String args[]) throws IOException {
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestFocus01SwingAWTRobot.java b/src/test/com/jogamp/opengl/test/junit/newt/TestFocus01SwingAWTRobot.java
index 047df5c..173cae1 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/TestFocus01SwingAWTRobot.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/TestFocus01SwingAWTRobot.java
@@ -30,6 +30,7 @@ package com.jogamp.opengl.test.junit.newt;
 
 import org.junit.Assert;
 import org.junit.AfterClass;
+import org.junit.Assume;
 
 import java.awt.AWTException;
 import java.awt.BorderLayout;
@@ -39,11 +40,12 @@ import java.lang.reflect.InvocationTargetException;
 
 import javax.media.opengl.GLCapabilities;
 import javax.media.opengl.GLEventListener;
-import javax.media.opengl.GLProfile;
 import javax.swing.JFrame;
 
 import java.util.ArrayList;
+import java.io.BufferedReader;
 import java.io.IOException;
+import java.io.InputStreamReader;
 
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -51,7 +53,7 @@ import org.junit.Test;
 import com.jogamp.newt.awt.NewtCanvasAWT;
 import com.jogamp.newt.opengl.GLWindow;
 import com.jogamp.opengl.util.Animator;
-import com.jogamp.opengl.test.junit.jogl.demos.es1.RedSquare;
+import com.jogamp.opengl.test.junit.jogl.demos.es2.RedSquareES2;
 
 import com.jogamp.opengl.test.junit.util.*;
 
@@ -64,7 +66,6 @@ public class TestFocus01SwingAWTRobot extends UITestCase {
 
     @BeforeClass
     public static void initClass() {
-        GLProfile.initSingleton(true);
         width = 640;
         height = 480;
         glCaps = new GLCapabilities(null);
@@ -88,12 +89,12 @@ public class TestFocus01SwingAWTRobot extends UITestCase {
 
     private void testFocus01ProgrFocusImpl(Robot robot) throws AWTException,
             InvocationTargetException, InterruptedException {
-        ArrayList eventCountAdapters = new ArrayList();
+        ArrayList<EventCountAdapter> eventCountAdapters = new ArrayList<EventCountAdapter>();
 
         // Create a window.
         GLWindow glWindow1 = GLWindow.create(glCaps);
         glWindow1.setTitle("testNewtChildFocus");
-        GLEventListener demo1 = new RedSquare();
+        GLEventListener demo1 = new RedSquareES2();
         TestListenerCom01AWT.setDemoFields(demo1, glWindow1, false);
         glWindow1.addGLEventListener(demo1);
         NEWTFocusAdapter glWindow1FA = new NEWTFocusAdapter("GLWindow1");
@@ -117,8 +118,10 @@ public class TestFocus01SwingAWTRobot extends UITestCase {
         eventCountAdapters.add(newtCanvasAWTFA);
 
         // Add the canvas to a frame, and make it all visible.
-        JFrame frame1 = new JFrame("Swing AWT Parent Frame: "
-                + glWindow1.getTitle());
+        final JFrame frame1 = new JFrame("Swing AWT Parent Frame: "
+                                         + glWindow1.getTitle());
+        AWTFocusAdapter frame1FA = new AWTFocusAdapter("frame1");
+        frame1.addFocusListener(frame1FA);
         frame1.getContentPane().add(newtCanvasAWT, BorderLayout.CENTER);
         Button button = new Button("Click me ..");
         AWTFocusAdapter buttonFA = new AWTFocusAdapter("Button");
@@ -133,37 +136,39 @@ public class TestFocus01SwingAWTRobot extends UITestCase {
         Assert.assertTrue(AWTRobotUtil.toFront(robot, frame1));
 
         int wait=0;
-        while(wait<awtWaitTimeout/100 && glWindow1.getTotalFrames()<1) { Thread.sleep(awtWaitTimeout/10); wait++; }
-        System.err.println("Frames for initial setVisible(true): "+glWindow1.getTotalFrames());
+        while(wait<awtWaitTimeout/100 && glWindow1.getTotalFPSFrames()<1) { Thread.sleep(awtWaitTimeout/10); wait++; }
+        System.err.println("Frames for initial setVisible(true): "+glWindow1.getTotalFPSFrames());
         Assert.assertTrue(glWindow1.isVisible());
-        Assert.assertTrue(0 < glWindow1.getTotalFrames());
+        Assert.assertTrue(0 < glWindow1.getTotalFPSFrames());
 
         // Continuous animation ..
         Animator animator = new Animator(glWindow1);
         animator.start();
+        AWTRobotUtil.assertRequestFocusAndWait(robot, frame1, frame1, frame1FA, null);
 
         // Button Focus
         Thread.sleep(100); // allow event sync
+        
         System.err.println("FOCUS AWT  Button request");
         EventCountAdapterUtil.reset(eventCountAdapters);
-        Assert.assertTrue(AWTRobotUtil.requestFocusAndWait(robot, button, button, buttonFA, null));
-        Assert.assertEquals(1, buttonFA.getCount());
-        Assert.assertEquals(0, glWindow1FA.getCount());
-        Assert.assertEquals(0, newtCanvasAWTFA.getCount());
+        AWTRobotUtil.assertRequestFocusAndWait(robot, button, button, buttonFA, null);
+        Assert.assertEquals(true, buttonFA.hasFocus());
+        Assert.assertEquals(false, glWindow1FA.hasFocus());
+        Assert.assertEquals(false, newtCanvasAWTFA.hasFocus());
         System.err.println("FOCUS AWT  Button sync");
-        Assert.assertEquals(2, AWTRobotUtil.testKeyType(robot, 2, button, buttonKA));
+        AWTRobotUtil.assertKeyType(robot, java.awt.event.KeyEvent.VK_A, 2, button, buttonKA);
 
         // Request the AWT focus, which should automatically provide the NEWT window with focus.
         Thread.sleep(100); // allow event sync
         System.err.println("FOCUS NEWT Canvas/GLWindow request");
         EventCountAdapterUtil.reset(eventCountAdapters);
-        Assert.assertTrue(AWTRobotUtil.requestFocusAndWait(robot, newtCanvasAWT, newtCanvasAWT.getNEWTChild(), glWindow1FA, buttonFA));
-        Assert.assertTrue(AWTRobotUtil.waitForCount(0, newtCanvasAWTFA));
-        Assert.assertEquals(1, glWindow1FA.getCount());
-        Assert.assertEquals(0, newtCanvasAWTFA.getCount());
-        Assert.assertEquals(-1, buttonFA.getCount()); // lost focus
+        AWTRobotUtil.assertRequestFocusAndWait(robot, newtCanvasAWT, newtCanvasAWT.getNEWTChild(), glWindow1FA, buttonFA);
+        Assert.assertTrue(AWTRobotUtil.waitForFocusCount(false, newtCanvasAWTFA));
+        Assert.assertEquals(true, glWindow1FA.hasFocus());
+        Assert.assertEquals(false, newtCanvasAWTFA.hasFocus());
+        Assert.assertEquals(false, buttonFA.hasFocus());
         System.err.println("FOCUS NEWT Canvas/GLWindow sync");
-        Assert.assertEquals(2, AWTRobotUtil.testKeyType(robot, 2, glWindow1, glWindow1KA));
+        AWTRobotUtil.assertKeyType(robot, java.awt.event.KeyEvent.VK_A, 2, glWindow1, glWindow1KA);
         Assert.assertEquals("AWT parent canvas received keyboard events", 0, newtCanvasAWTKA.getCount());
 
         // Remove listeners to avoid logging during dispose/destroy.
@@ -174,8 +179,17 @@ public class TestFocus01SwingAWTRobot extends UITestCase {
 
         // Shutdown the test.
         animator.stop();
-        frame1.dispose();
-        glWindow1.invalidate();
+        try {
+            javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
+                public void run() {
+                    frame1.setVisible(false);
+                    frame1.dispose();
+                }});
+        } catch( Throwable throwable ) {
+            throwable.printStackTrace();
+            Assume.assumeNoException( throwable );
+        }        
+        glWindow1.destroy();
     }
 
     static int atoi(String a) {
@@ -192,6 +206,11 @@ public class TestFocus01SwingAWTRobot extends UITestCase {
                 durationPerTest = atoi(args[++i]);
             }
         }
+        /**
+        BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
+        System.err.println("Press enter to continue");
+        System.err.println(stdin.readLine()); 
+        */
         System.out.println("durationPerTest: "+durationPerTest);
         String tstname = TestFocus01SwingAWTRobot.class.getName();
         org.junit.runner.JUnitCore.main(tstname);
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestFocus02SwingAWTRobot.java b/src/test/com/jogamp/opengl/test/junit/newt/TestFocus02SwingAWTRobot.java
index 15e4c3a..78f2f45 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/TestFocus02SwingAWTRobot.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/TestFocus02SwingAWTRobot.java
@@ -54,13 +54,11 @@ import com.jogamp.newt.awt.NewtCanvasAWT;
 import java.io.IOException;
 
 import com.jogamp.opengl.test.junit.util.*;
-import com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.Gears;
+import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
 
 public class TestFocus02SwingAWTRobot extends UITestCase {
     static int width, height;
-    static long durationPerTest = 800;
     static long awtWaitTimeout = 1000;
-    static long waitReparent = 0;
     static GLCapabilities glCaps;
 
     @BeforeClass
@@ -74,7 +72,6 @@ public class TestFocus02SwingAWTRobot extends UITestCase {
         f.dispose();
         f=null;
 
-        GLProfile.initSingleton(false);
         glCaps = new GLCapabilities(null);
     }
 
@@ -84,17 +81,15 @@ public class TestFocus02SwingAWTRobot extends UITestCase {
     
     private void testFocus01ProgrFocusImpl(Robot robot) 
         throws AWTException, InterruptedException, InvocationTargetException {
-        int x = 0;
-        int y = 0;
 
-        ArrayList eventCountAdapters = new ArrayList();
+        ArrayList<EventCountAdapter> eventCountAdapters = new ArrayList<EventCountAdapter>();
 
         /**
          * JFrame . JPanel . Container . NewtCanvasAWT . GLWindow
          */
         GLWindow glWindow1 = GLWindow.create(glCaps);
         glWindow1.setTitle("testWindowParenting01CreateVisibleDestroy");
-        GLEventListener demo1 = new Gears();
+        GLEventListener demo1 = new GearsES2();
         glWindow1.addGLEventListener(demo1);
         NEWTFocusAdapter glWindow1FA = new NEWTFocusAdapter("GLWindow1");
         glWindow1.addWindowListener(glWindow1FA);
@@ -164,90 +159,90 @@ public class TestFocus02SwingAWTRobot extends UITestCase {
         Assert.assertTrue(AWTRobotUtil.toFront(robot, jFrame1));
 
         int wait=0;
-        while(wait<awtWaitTimeout/100 && glWindow1.getTotalFrames()<1) { Thread.sleep(awtWaitTimeout/10); wait++; }
-        System.err.println("Frames for initial setVisible(true): "+glWindow1.getTotalFrames());
+        while(wait<awtWaitTimeout/10 && glWindow1.getTotalFPSFrames()<1) { Thread.sleep(awtWaitTimeout/100); wait++; }
+        System.err.println("Frames for initial setVisible(true): "+glWindow1.getTotalFPSFrames());
         Assert.assertTrue(glWindow1.isVisible());
-        Assert.assertTrue(0 < glWindow1.getTotalFrames());
+        Assert.assertTrue(0 < glWindow1.getTotalFPSFrames());
 
         // Continuous animation ..
         Animator animator1 = new Animator(glWindow1);
         animator1.start();
+        AWTRobotUtil.assertRequestFocusAndWait(robot, jFrame1, jFrame1, jFrame1FA, null);
 
         // Button Outer Focus
         Thread.sleep(100); // allow event sync
         System.err.println("FOCUS AWT  Button Outer request");
         EventCountAdapterUtil.reset(eventCountAdapters);
-        Assert.assertTrue(AWTRobotUtil.requestFocusAndWait(robot, buttonNorthOuter, buttonNorthOuter, buttonNorthOuterFA, null));
-        Assert.assertEquals(1, buttonNorthOuterFA.getCount());
-        Assert.assertEquals(0, glWindow1FA.getCount());
-        Assert.assertEquals(0, newtCanvasAWTFA.getCount());
-        Assert.assertEquals(0, buttonNorthInnerFA.getCount());
-        Assert.assertEquals(0, jFrame1FA.getCount());
+        AWTRobotUtil.assertRequestFocusAndWait(robot, buttonNorthOuter, buttonNorthOuter, buttonNorthOuterFA, null);
+        Assert.assertEquals(true, buttonNorthOuterFA.hasFocus());
+        Assert.assertEquals(false, glWindow1FA.hasFocus());
+        Assert.assertEquals(false, newtCanvasAWTFA.hasFocus());
+        Assert.assertEquals(false, buttonNorthInnerFA.hasFocus());
+        Assert.assertEquals(false, jFrame1FA.hasFocus());
         System.err.println("FOCUS AWT  Button Outer sync");
-        Assert.assertEquals(2, AWTRobotUtil.testKeyType(robot, 2, buttonNorthOuter, buttonNorthOuterKA));
-        Assert.assertEquals(1, AWTRobotUtil.testMouseClick(robot, java.awt.event.InputEvent.BUTTON1_MASK, 1, 
-                                                           buttonNorthOuter, buttonNorthOuterMA));
-        Assert.assertEquals(3, AWTRobotUtil.testMouseClick(robot, java.awt.event.InputEvent.BUTTON1_MASK, 2, 
-                                                           buttonNorthOuter, buttonNorthOuterMA));
+        AWTRobotUtil.assertKeyType(robot, java.awt.event.KeyEvent.VK_A, 2, buttonNorthOuter, buttonNorthOuterKA);
+        AWTRobotUtil.assertMouseClick(robot, java.awt.event.InputEvent.BUTTON1_MASK, 1, 
+                                      buttonNorthOuter, buttonNorthOuterMA);
+        AWTRobotUtil.assertMouseClick(robot, java.awt.event.InputEvent.BUTTON1_MASK, 2, 
+                                      buttonNorthOuter, buttonNorthOuterMA);
 
         // NEWT Focus
         Thread.sleep(100); // allow event sync
         System.err.println("FOCUS NEWT Canvas/GLWindow request");
         EventCountAdapterUtil.reset(eventCountAdapters);
-        Assert.assertTrue(AWTRobotUtil.requestFocusAndWait(robot, newtCanvasAWT, newtCanvasAWT.getNEWTChild(), glWindow1FA, buttonNorthOuterFA));
-        Assert.assertTrue(AWTRobotUtil.waitForCount(0, newtCanvasAWTFA));
-        Assert.assertEquals(1, glWindow1FA.getCount());
-        Assert.assertEquals(0, newtCanvasAWTFA.getCount());
-        Assert.assertEquals(0, buttonNorthInnerFA.getCount());
-        Assert.assertEquals(-1, buttonNorthOuterFA.getCount()); // lost focus
-        Assert.assertEquals(0, jFrame1FA.getCount());
+        AWTRobotUtil.assertRequestFocusAndWait(robot, newtCanvasAWT, newtCanvasAWT.getNEWTChild(), glWindow1FA, buttonNorthOuterFA);
+        Assert.assertTrue(AWTRobotUtil.waitForFocusCount(false, newtCanvasAWTFA));
+        Assert.assertEquals(true, glWindow1FA.hasFocus());
+        Assert.assertEquals(false, newtCanvasAWTFA.hasFocus());
+        Assert.assertEquals(false, buttonNorthInnerFA.hasFocus());
+        Assert.assertEquals(false, buttonNorthOuterFA.hasFocus());
+        Assert.assertEquals(false, jFrame1FA.hasFocus());
         System.err.println("FOCUS NEWT Canvas/GLWindow sync");
-        Assert.assertEquals(2, AWTRobotUtil.testKeyType(robot, 2, glWindow1, glWindow1KA));
+        AWTRobotUtil.assertKeyType(robot, java.awt.event.KeyEvent.VK_A, 2, glWindow1, glWindow1KA);
         Assert.assertEquals("AWT parent canvas received keyboard events", 0, newtCanvasAWTKA.getCount());
-        Assert.assertEquals(1, AWTRobotUtil.testMouseClick(robot, java.awt.event.InputEvent.BUTTON1_MASK, 1, 
-                                                           glWindow1, glWindow1MA));
-        Assert.assertEquals(3, AWTRobotUtil.testMouseClick(robot, java.awt.event.InputEvent.BUTTON1_MASK, 2, 
-                                                           glWindow1, glWindow1MA));
+        AWTRobotUtil.assertMouseClick(robot, java.awt.event.InputEvent.BUTTON1_MASK, 1, 
+                                      glWindow1, glWindow1MA);
+        AWTRobotUtil.assertMouseClick(robot, java.awt.event.InputEvent.BUTTON1_MASK, 2, 
+                                      glWindow1, glWindow1MA);
         Assert.assertEquals("AWT parent canvas received mouse events", 0, newtCanvasAWTMA.getCount());
 
         // Button Inner Focus
         Thread.sleep(100); // allow event sync
         System.err.println("FOCUS AWT  Button request");
         EventCountAdapterUtil.reset(eventCountAdapters);
-        Assert.assertTrue(AWTRobotUtil.requestFocusAndWait(robot, buttonNorthInner, buttonNorthInner, buttonNorthInnerFA, glWindow1FA));
-        Assert.assertEquals(1, buttonNorthInnerFA.getCount());
-        Assert.assertEquals(-1, glWindow1FA.getCount()); // lost focus
-        Assert.assertEquals(0, newtCanvasAWTFA.getCount());
-        Assert.assertEquals(0, buttonNorthOuterFA.getCount());
-        Assert.assertEquals(0, jFrame1FA.getCount());
+        AWTRobotUtil.assertRequestFocusAndWait(robot, buttonNorthInner, buttonNorthInner, buttonNorthInnerFA, glWindow1FA);
+        Assert.assertEquals(true, buttonNorthInnerFA.hasFocus());
+        Assert.assertEquals(false, glWindow1FA.hasFocus());
+        Assert.assertEquals(false, newtCanvasAWTFA.hasFocus());
+        Assert.assertEquals(false, buttonNorthOuterFA.hasFocus());
+        Assert.assertEquals(false, jFrame1FA.hasFocus());
         System.err.println("FOCUS AWT  Button sync");
-        Assert.assertEquals(2, AWTRobotUtil.testKeyType(robot, 2, buttonNorthInner, buttonNorthInnerKA));
-        Assert.assertEquals(1, AWTRobotUtil.testMouseClick(robot, java.awt.event.InputEvent.BUTTON1_MASK, 1, 
-                                                           buttonNorthInner, buttonNorthInnerMA));
-        Assert.assertEquals(3, AWTRobotUtil.testMouseClick(robot, java.awt.event.InputEvent.BUTTON1_MASK, 2, 
-                                                           buttonNorthInner, buttonNorthInnerMA));
+        AWTRobotUtil.assertKeyType(robot, java.awt.event.KeyEvent.VK_A, 2, buttonNorthInner, buttonNorthInnerKA);
+        AWTRobotUtil.assertMouseClick(robot, java.awt.event.InputEvent.BUTTON1_MASK, 1, 
+                                      buttonNorthInner, buttonNorthInnerMA);
+        AWTRobotUtil.assertMouseClick(robot, java.awt.event.InputEvent.BUTTON1_MASK, 2, 
+                                      buttonNorthInner, buttonNorthInnerMA);
 
         // NEWT Focus
         Thread.sleep(100); // allow event sync
         System.err.println("FOCUS NEWT Canvas/GLWindow request");
         EventCountAdapterUtil.reset(eventCountAdapters);
-        Assert.assertTrue(AWTRobotUtil.requestFocusAndWait(robot, newtCanvasAWT, newtCanvasAWT.getNEWTChild(), glWindow1FA, buttonNorthInnerFA));
-        Assert.assertTrue(AWTRobotUtil.waitForCount(0, newtCanvasAWTFA));
-        Assert.assertEquals(1, glWindow1FA.getCount());
-        Assert.assertEquals(0, newtCanvasAWTFA.getCount());
-        Assert.assertEquals(-1, buttonNorthInnerFA.getCount()); // lost focus
-        Assert.assertEquals(0, buttonNorthOuterFA.getCount());
-        Assert.assertEquals(0, jFrame1FA.getCount());
+        AWTRobotUtil.assertRequestFocusAndWait(robot, newtCanvasAWT, newtCanvasAWT.getNEWTChild(), glWindow1FA, buttonNorthInnerFA);
+        Assert.assertTrue(AWTRobotUtil.waitForFocusCount(false, newtCanvasAWTFA));
+        Assert.assertEquals(true, glWindow1FA.hasFocus());
+        Assert.assertEquals(false, newtCanvasAWTFA.hasFocus());
+        Assert.assertEquals(false, buttonNorthInnerFA.hasFocus());
+        Assert.assertEquals(false, buttonNorthOuterFA.hasFocus());
+        Assert.assertEquals(false, jFrame1FA.hasFocus());
         System.err.println("FOCUS NEWT Canvas/GLWindow sync");
-        Assert.assertEquals(2, AWTRobotUtil.testKeyType(robot, 2, glWindow1, glWindow1KA));
+        AWTRobotUtil.assertKeyType(robot, java.awt.event.KeyEvent.VK_A, 2, glWindow1, glWindow1KA);
         Assert.assertEquals("AWT parent canvas received keyboard events", 0, newtCanvasAWTKA.getCount());
-        Assert.assertEquals(1, AWTRobotUtil.testMouseClick(robot, java.awt.event.InputEvent.BUTTON1_MASK, 1, 
-                                                           glWindow1, glWindow1MA));
-        Assert.assertEquals(3, AWTRobotUtil.testMouseClick(robot, java.awt.event.InputEvent.BUTTON1_MASK, 2, 
-                                                           glWindow1, glWindow1MA));
+        AWTRobotUtil.assertMouseClick(robot, java.awt.event.InputEvent.BUTTON1_MASK, 1, 
+                                      glWindow1, glWindow1MA);
+        AWTRobotUtil.assertMouseClick(robot, java.awt.event.InputEvent.BUTTON1_MASK, 2, 
+                                      glWindow1, glWindow1MA);
         Assert.assertEquals("AWT parent canvas received mouse events", 0, newtCanvasAWTMA.getCount());
 
-
         animator1.stop();
         Assert.assertEquals(false, animator1.isAnimating());
 
@@ -261,7 +256,7 @@ public class TestFocus02SwingAWTRobot extends UITestCase {
                     _jFrame1.dispose();
                 } });
 
-        glWindow1.invalidate();
+        glWindow1.destroy();
     }
 
     @Test
@@ -284,18 +279,20 @@ public class TestFocus02SwingAWTRobot extends UITestCase {
         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]);
-            } else if(args[i].equals("-wait")) {
-                waitReparent = atoi(args[++i]);
-            }
+    @SuppressWarnings("unused")
+    public static void main(String args[]) 
+        throws IOException, AWTException, InterruptedException, InvocationTargetException 
+    {
+        if(true) {
+            String tstname = TestFocus02SwingAWTRobot.class.getName();
+            org.junit.runner.JUnitCore.main(tstname);
+        } else {       
+            TestFocus02SwingAWTRobot.initClass();
+            TestFocus02SwingAWTRobot test = new TestFocus02SwingAWTRobot();        
+            test.testFocus01ProgrFocus();
+            test.testFocus02RobotFocus();
+            TestFocus02SwingAWTRobot.release();
         }
-        System.err.println("durationPerTest "+durationPerTest);
-        System.err.println("waitReparent "+waitReparent);
-        String tstname = TestFocus02SwingAWTRobot.class.getName();
-        org.junit.runner.JUnitCore.main(tstname);
     }
 }
 
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestGLWindows00NEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestGLWindows00NEWT.java
index f957157..5c42f2b 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/TestGLWindows00NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/TestGLWindows00NEWT.java
@@ -35,13 +35,12 @@ import org.junit.Test;
 import javax.media.opengl.*;
 
 import com.jogamp.newt.*;
-import com.jogamp.newt.event.*;
 import com.jogamp.newt.opengl.*;
 import java.io.IOException;
 
 import com.jogamp.opengl.test.junit.util.UITestCase;
-import com.jogamp.opengl.test.junit.util.MiscUtils;
-import com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.Gears;
+import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
+
 import javax.media.nativewindow.AbstractGraphicsDevice;
 
 public class TestGLWindows00NEWT extends UITestCase {
@@ -73,8 +72,9 @@ public class TestGLWindows00NEWT extends UITestCase {
             glWindow = GLWindow.create(caps);
             Assert.assertNotNull(glWindow);
         }
+        glWindow.setUpdateFPSFrames(1, null);        
 
-        GLEventListener demo = new Gears();
+        GLEventListener demo = new GearsES2();
         glWindow.addGLEventListener(demo);
 
         glWindow.setSize(512, 512);
@@ -87,9 +87,8 @@ public class TestGLWindows00NEWT extends UITestCase {
 
     static void destroyWindow(GLWindow glWindow) {
         if(null!=glWindow) {
-            glWindow.invalidate();
+            glWindow.destroy();
             Assert.assertEquals(false,glWindow.isNativeValid());
-            Assert.assertEquals(false,glWindow.isValid());
         }
     }
 
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestGLWindows01NEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestGLWindows01NEWT.java
index 5be9771..45a0b0b 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/TestGLWindows01NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/TestGLWindows01NEWT.java
@@ -41,7 +41,7 @@ import java.io.IOException;
 
 import com.jogamp.opengl.test.junit.util.UITestCase;
 import com.jogamp.opengl.test.junit.util.MiscUtils;
-import com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.Gears;
+import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
 
 public class TestGLWindows01NEWT extends UITestCase {
     static GLProfile glp;
@@ -82,7 +82,7 @@ public class TestGLWindows01NEWT extends UITestCase {
         Assert.assertEquals(false,glWindow.isVisible());
         Assert.assertEquals(false,glWindow.isNativeValid());
 
-        GLEventListener demo = new Gears();
+        GLEventListener demo = new GearsES2();
         setDemoFields(demo, glWindow);
         if(!addGLEventListenerAfterVisible) {
             glWindow.addGLEventListener(demo);
@@ -91,12 +91,12 @@ public class TestGLWindows01NEWT extends UITestCase {
 
         glWindow.setSize(width, height);
 
-        Assert.assertEquals(0, glWindow.getTotalFrames());
+        Assert.assertEquals(0, glWindow.getTotalFPSFrames());
         glWindow.setVisible(true);
         Assert.assertEquals(true,glWindow.isVisible());
         Assert.assertEquals(true,glWindow.isNativeValid());
-        System.out.println("Frames for initial setVisible(true): "+glWindow.getTotalFrames());
-        Assert.assertTrue(0 < glWindow.getTotalFrames());
+        System.out.println("Frames for initial setVisible(true): "+glWindow.getTotalFPSFrames());
+        Assert.assertTrue(0 < glWindow.getTotalFPSFrames());
 
         //
         // Create native OpenGL resources .. XGL/WGL/CGL .. 
@@ -119,9 +119,8 @@ public class TestGLWindows01NEWT extends UITestCase {
 
     static void destroyWindow(GLWindow glWindow) {
         if(null!=glWindow) {
-            glWindow.invalidate();
+            glWindow.destroy();
             Assert.assertEquals(false,glWindow.isNativeValid());
-            Assert.assertEquals(false,glWindow.isValid());
         }
     }
 
@@ -195,7 +194,7 @@ public class TestGLWindows01NEWT extends UITestCase {
         for(state=0; state*100<durationPerTest; state++) {
             Thread.sleep(100);
         }
-        System.out.println("duration: "+window.getDuration());
+        System.out.println("duration: "+window.getTotalFPSDuration());
         destroyWindow(window);
     }
 
@@ -211,7 +210,7 @@ public class TestGLWindows01NEWT extends UITestCase {
         for(state=0; state*100<durationPerTest; state++) {
             Thread.sleep(100);
         }
-        System.out.println("duration: "+window.getDuration());
+        System.out.println("duration: "+window.getTotalFPSDuration());
         destroyWindow(window);
     }
 
@@ -226,7 +225,7 @@ public class TestGLWindows01NEWT extends UITestCase {
         for(state=0; state*100<durationPerTest; state++) {
             Thread.sleep(100);
         }
-        System.out.println("duration: "+window.getDuration());
+        System.out.println("duration: "+window.getTotalFPSDuration());
         destroyWindow(window);
     }
 
@@ -263,8 +262,8 @@ public class TestGLWindows01NEWT extends UITestCase {
         for(state=0; state*100<durationPerTest; state++) {
             Thread.sleep(100);
         }
-        System.out.println("duration1: "+window1.getDuration());
-        System.out.println("duration2: "+window2.getDuration());
+        System.out.println("duration1: "+window1.getTotalFPSDuration());
+        System.out.println("duration2: "+window2.getTotalFPSDuration());
 
         destroyWindow(window1);
         destroyWindow(window2);
@@ -325,8 +324,8 @@ public class TestGLWindows01NEWT extends UITestCase {
         for(state=0; state*100<durationPerTest; state++) {
             Thread.sleep(100);
         }
-        System.out.println("duration1: "+window1.getDuration());
-        System.out.println("duration2: "+window2.getDuration());
+        System.out.println("duration1: "+window1.getTotalFPSDuration());
+        System.out.println("duration2: "+window2.getTotalFPSDuration());
 
         // It is observed that some X11 drivers, eg ATI, fglrx 8.78.6,
         // are quite sensitive to multiple Display connections (NEWT Display -> X11 Display).
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestGLWindows02NEWTAnimated.java b/src/test/com/jogamp/opengl/test/junit/newt/TestGLWindows02NEWTAnimated.java
index 6582a96..3176d59 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/TestGLWindows02NEWTAnimated.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/TestGLWindows02NEWTAnimated.java
@@ -43,7 +43,7 @@ import java.io.IOException;
 
 import com.jogamp.opengl.test.junit.util.UITestCase;
 import com.jogamp.opengl.test.junit.util.MiscUtils;
-import com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.Gears;
+import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
 
 public class TestGLWindows02NEWTAnimated extends UITestCase {
     static GLProfile glp;
@@ -58,7 +58,7 @@ public class TestGLWindows02NEWTAnimated extends UITestCase {
         glp = GLProfile.getDefault();
     }
 
-    static GLWindow createWindow(Screen screen, GLCapabilities caps, int width, int height, boolean onscreen, boolean undecorated) {
+    static GLWindow createWindow(Screen screen, GLCapabilities caps, int width, int height, boolean onscreen, boolean undecorated, boolean vsync) {
         Assert.assertNotNull(caps);
         caps.setOnscreen(onscreen);
         // System.out.println("Requested: "+caps);
@@ -74,10 +74,11 @@ public class TestGLWindows02NEWTAnimated extends UITestCase {
         } else {
             glWindow = GLWindow.create(caps);
         }
+        glWindow.setUpdateFPSFrames(1, null);        
         Assert.assertNotNull(glWindow);
         glWindow.setUndecorated(onscreen && undecorated);
 
-        GLEventListener demo = new Gears();
+        GLEventListener demo = new GearsES2(vsync ? 1 : 0);
         setDemoFields(demo, glWindow);
         glWindow.addGLEventListener(demo);
         glWindow.addWindowListener(new TraceWindowAdapter());
@@ -116,14 +117,24 @@ public class TestGLWindows02NEWTAnimated extends UITestCase {
     public void testWindowDecor01Simple() throws InterruptedException {
         GLCapabilities caps = new GLCapabilities(glp);
         Assert.assertNotNull(caps);
-        GLWindow window = createWindow(null, caps, width, height, true /* onscreen */, false /* undecorated */);
+        GLWindow window = createWindow(null, caps, width, height, true /* onscreen */, false /* undecorated */, true /* vsync */);
         Animator animator = new Animator(window);
+        animator.setUpdateFPSFrames(1, null);        
         Assert.assertTrue(animator.start());
-        while(animator.isAnimating() && animator.getDuration()<durationPerTest) {
+        while(animator.isAnimating() && animator.getTotalFPSDuration()<durationPerTest) {
             Thread.sleep(100);
         }
-        destroyWindow(window);
+        destroyWindow(window); // destroy - but still in animator        
+        Assert.assertEquals(false, window.isNativeValid());
+        Assert.assertEquals(false, window.isVisible());                
         Assert.assertEquals(true, animator.isAnimating());
+        Assert.assertEquals(false, animator.isPaused());
+        Assert.assertEquals(true, animator.isStarted());
+        
+        animator.remove(window);
+        Assert.assertEquals(false, animator.isAnimating());
+        Assert.assertEquals(false, animator.isPaused());
+        Assert.assertEquals(true, animator.isStarted());
         Assert.assertTrue(animator.stop());
     }
 
@@ -131,15 +142,22 @@ public class TestGLWindows02NEWTAnimated extends UITestCase {
     public void testWindowDecor02DestroyWinTwiceA() throws InterruptedException {
         GLCapabilities caps = new GLCapabilities(glp);
         Assert.assertNotNull(caps);
-        GLWindow window = createWindow(null, caps, width, height, true /* onscreen */, false /* undecorated */);
+        GLWindow window = createWindow(null, caps, width, height, true /* onscreen */, false /* undecorated */, true /* vsync */);
         Animator animator = new Animator(window);
+        animator.setUpdateFPSFrames(1, null);        
         Assert.assertTrue(animator.start());
-        while(animator.isAnimating() && animator.getDuration()<durationPerTest) {
+        while(animator.isAnimating() && animator.getTotalFPSDuration()<durationPerTest) {
             Thread.sleep(100);
         }
         destroyWindow(window);
         destroyWindow(window);
         Assert.assertEquals(true, animator.isAnimating());
+        Assert.assertEquals(false, animator.isPaused());
+        Assert.assertEquals(true, animator.isStarted());
+        animator.remove(window);
+        Assert.assertEquals(false, animator.isAnimating());
+        Assert.assertEquals(false, animator.isPaused());
+        Assert.assertEquals(true, animator.isStarted());
         Assert.assertTrue(animator.stop());
     }
 
@@ -153,15 +171,16 @@ public class TestGLWindows02NEWTAnimated extends UITestCase {
 
         Screen screen  = NewtFactory.createScreen(display, 0); // screen 0
         Assert.assertNotNull(screen);
-        GLWindow window1 = createWindow(screen, caps, width, height, true /* onscreen */, false /* undecorated */);
+        GLWindow window1 = createWindow(screen, caps, width, height, true /* onscreen */, false /* undecorated */, false /* vsync */);
         Assert.assertNotNull(window1);
         window1.setPosition(0, 0);
 
-        GLWindow window2 = createWindow(screen, caps, width-10, height-10, true /* onscreen */, false /* undecorated */);
+        GLWindow window2 = createWindow(screen, caps, width-10, height-10, true /* onscreen */, false /* undecorated */, true /* vsync */);
         Assert.assertNotNull(window2);
         window2.setPosition(screen.getWidth()-width, 0);
 
         Animator animator = new Animator();
+        animator.setUpdateFPSFrames(1, null);        
         Assert.assertEquals(false, animator.isStarted());
         Assert.assertEquals(false, animator.isAnimating());
         Assert.assertEquals(false, animator.isPaused());
@@ -181,18 +200,20 @@ public class TestGLWindows02NEWTAnimated extends UITestCase {
         Assert.assertEquals(true, animator.isAnimating());
         Assert.assertEquals(false, animator.isPaused());
 
-        while(animator.isAnimating() && animator.getDuration()<durationPerTest) {
+        while(animator.isAnimating() && animator.getTotalFPSDuration()<durationPerTest) {
             Thread.sleep(100);
         }
-        window1.invalidate();
+        window1.destroy();
+        animator.remove(window1);
         Assert.assertEquals(true, animator.isStarted());
         Assert.assertEquals(true, animator.isAnimating());
         Assert.assertEquals(false, animator.isPaused());
-
-        while(animator.isAnimating() && animator.getDuration()<2*durationPerTest) {
+        // animator.resetFPSCounter();
+        while(animator.isAnimating() && animator.getTotalFPSDuration()<durationPerTest+durationPerTest/10) {
             Thread.sleep(100);
         }
-        window2.invalidate();
+        window2.destroy();
+        animator.remove(window2);
         Assert.assertEquals(true, animator.isStarted());
         Assert.assertEquals(false, animator.isAnimating());
         Assert.assertEquals(false, animator.isPaused());
@@ -212,17 +233,18 @@ public class TestGLWindows02NEWTAnimated extends UITestCase {
 
         Screen screen1  = NewtFactory.createScreen(display1, 0); // screen 0
         Assert.assertNotNull(screen1);
-        GLWindow window1 = createWindow(screen1, caps, width, height, true /* onscreen */, false /* undecorated */);
+        GLWindow window1 = createWindow(screen1, caps, width, height, true /* onscreen */, false /* undecorated */, false /* vsync */);
         Assert.assertNotNull(window1);
         window1.setPosition(0, 0);
 
         Screen screen2  = NewtFactory.createScreen(display2, 0); // screen 0
         Assert.assertNotNull(screen2);
-        GLWindow window2 = createWindow(screen2, caps, width-10, height-10, true /* onscreen */, false /* undecorated */);
+        GLWindow window2 = createWindow(screen2, caps, width-10, height-10, true /* onscreen */, false /* undecorated */, true /* vsync */);
         Assert.assertNotNull(window2);
         window2.setPosition(screen2.getWidth()-width, 0);
 
         Animator animator = new Animator();
+        animator.setUpdateFPSFrames(1, null);        
         Assert.assertEquals(false, animator.isStarted());
         Assert.assertEquals(false, animator.isAnimating());
         Assert.assertEquals(false, animator.isPaused());
@@ -242,30 +264,32 @@ public class TestGLWindows02NEWTAnimated extends UITestCase {
         Assert.assertEquals(true, animator.isAnimating());
         Assert.assertEquals(false, animator.isPaused());
 
-        while(animator.isAnimating() && animator.getDuration()<durationPerTest) {
+        while(animator.isAnimating() && animator.getTotalFPSDuration()<durationPerTest) {
             Thread.sleep(100);
         }
         destroyWindow(window1);
+        animator.remove(window1);
         Assert.assertEquals(true, animator.isStarted());
         Assert.assertEquals(true, animator.isAnimating());
         Assert.assertEquals(false, animator.isPaused());
 
-        while(animator.isAnimating() && animator.getDuration()<2*durationPerTest) {
+        while(animator.isAnimating() && animator.getTotalFPSDuration()<durationPerTest+durationPerTest/10) {
             Thread.sleep(100);
         }
         destroyWindow(window2);
+        animator.remove(window2);
         Assert.assertEquals(true, animator.isStarted());
-        Assert.assertEquals(true, animator.isAnimating());
+        Assert.assertEquals(false, animator.isAnimating());
         Assert.assertEquals(false, animator.isPaused());
 
         Assert.assertEquals(true, animator.pause());
-        Assert.assertEquals(true, animator.isStarted());
+        Assert.assertEquals(true, animator.isStarted());                
         Assert.assertEquals(false, animator.isAnimating());
         Assert.assertEquals(true, animator.isPaused());
 
         Assert.assertEquals(true, animator.resume());
         Assert.assertEquals(true, animator.isStarted());
-        Assert.assertEquals(true, animator.isAnimating());
+        Assert.assertEquals(false, animator.isAnimating());
         Assert.assertEquals(false, animator.isPaused());
 
         Assert.assertTrue(animator.stop());
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestListenerCom01AWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestListenerCom01AWT.java
index b2068d9..15151fa 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/TestListenerCom01AWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/TestListenerCom01AWT.java
@@ -28,37 +28,23 @@
  
 package com.jogamp.opengl.test.junit.newt;
 
-import java.lang.reflect.*;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
 import org.junit.Assert;
-import org.junit.Before;
 import org.junit.BeforeClass;
-import org.junit.After;
-import org.junit.AfterClass;
 import org.junit.Test;
 
-import java.awt.Button;
-import java.awt.BorderLayout;
-import java.awt.Canvas;
 import java.awt.Frame;
 
 import javax.media.opengl.*;
-import javax.media.nativewindow.*;
 
 import com.jogamp.opengl.util.Animator;
 import com.jogamp.newt.*;
-import com.jogamp.newt.event.*;
 import com.jogamp.newt.opengl.*;
 import com.jogamp.newt.awt.NewtCanvasAWT;
 
 import java.io.IOException;
 
 import com.jogamp.opengl.test.junit.util.*;
-import com.jogamp.opengl.test.junit.jogl.demos.es1.RedSquare;
-import com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.Gears;
+import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
 
 public class TestListenerCom01AWT extends UITestCase {
     static int width, height;
@@ -67,7 +53,6 @@ public class TestListenerCom01AWT extends UITestCase {
 
     @BeforeClass
     public static void initClass() {
-        GLProfile.initSingleton(true);
         width  = 640;
         height = 480;
     }
@@ -81,7 +66,7 @@ public class TestListenerCom01AWT extends UITestCase {
 
         System.out.println("durationPerTest "+durationPerTest);
 
-        GLEventListener demo = new Gears();
+        GLEventListener demo = new GearsES2();
         setDemoFields(demo, glWindow, false);
         glWindow.addGLEventListener(demo);
 
@@ -109,8 +94,9 @@ public class TestListenerCom01AWT extends UITestCase {
         frame.setVisible(true);
 
         Animator animator1 = new Animator(glWindow);
+        animator1.setUpdateFPSFrames(1, null);        
         animator1.start();
-        while(animator1.isAnimating() && animator1.getDuration()<durationPerTest) {
+        while(animator1.isAnimating() && animator1.getTotalFPSDuration()<durationPerTest) {
             Thread.sleep(100);
             width+=10; height+=10;
             frame.setSize(width, height);
@@ -119,7 +105,7 @@ public class TestListenerCom01AWT extends UITestCase {
         Assert.assertEquals(false, animator1.isAnimating());
 
         frame.dispose();
-        glWindow.invalidate();
+        glWindow.destroy();
     }
 
     public static void setDemoFields(GLEventListener demo, GLWindow glWindow, boolean debug) {
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestRemoteGLWindows01NEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestRemoteGLWindows01NEWT.java
index 6b501e3..578aa55 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/TestRemoteGLWindows01NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/TestRemoteGLWindows01NEWT.java
@@ -34,6 +34,7 @@ import org.junit.BeforeClass;
 import org.junit.Test;
 
 import javax.media.opengl.*;
+
 import com.jogamp.opengl.util.Animator;
 
 import com.jogamp.newt.*;
@@ -41,7 +42,8 @@ import com.jogamp.newt.opengl.*;
 import java.io.IOException;
 
 import com.jogamp.opengl.test.junit.util.UITestCase;
-import com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.Gears;
+import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
+
 import javax.media.nativewindow.AbstractGraphicsDevice;
 import javax.media.nativewindow.NativeWindowException;
 
@@ -88,9 +90,8 @@ public class TestRemoteGLWindows01NEWT extends UITestCase {
 
     static void destroyWindow(GLWindow glWindow) {
         if(null!=glWindow) {
-            glWindow.invalidate();
+            glWindow.destroy();
             Assert.assertEquals(false,glWindow.isNativeValid());
-            Assert.assertEquals(false,glWindow.isValid());
         }
     }
 
@@ -99,7 +100,7 @@ public class TestRemoteGLWindows01NEWT extends UITestCase {
         Animator animator = new Animator();
         GLCapabilities caps = new GLCapabilities(glp);
         Assert.assertNotNull(caps);
-        GLWindow window1 = createWindow(null, caps, new Gears(1)); // local with vsync
+        GLWindow window1 = createWindow(null, caps, new GearsES2(1)); // local with vsync
         Assert.assertEquals(true,window1.isNativeValid());
         Assert.assertEquals(true,window1.isVisible());
         AbstractGraphicsDevice device1 = window1.getScreen().getDisplay().getGraphicsDevice();
@@ -124,7 +125,7 @@ public class TestRemoteGLWindows01NEWT extends UITestCase {
             System.err.println("");
             System.err.println("GLProfiles window2: "+device2.getConnection()+": "+GLProfile.glAvailabilityToString(device2));
             screen2  = NewtFactory.createScreen(display2, 0); // screen 0
-            window2 = createWindow(screen2, caps, new Gears(0)); // remote, no vsync
+            window2 = createWindow(screen2, caps, new GearsES2(0)); // remote, no vsync
         } catch (NativeWindowException nwe) {
             System.err.println(nwe);
             Assume.assumeNoException(nwe);
@@ -136,9 +137,10 @@ public class TestRemoteGLWindows01NEWT extends UITestCase {
         Assert.assertEquals(true,window2.isVisible());
 
         animator.add(window2);
+        animator.setUpdateFPSFrames(1, null);        
         animator.start();
 
-        while(animator.getDuration()<durationPerTest) {
+        while(animator.getTotalFPSDuration()<durationPerTest) {
             Thread.sleep(100);
         }
 
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode00NEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode00NEWT.java
index 7de63e6..cfb8c77 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode00NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode00NEWT.java
@@ -46,7 +46,7 @@ import java.util.Iterator;
 import java.util.List;
 import javax.media.nativewindow.Capabilities;
 import javax.media.nativewindow.util.Dimension;
-import javax.media.nativewindow.util.DimensionReadOnly;
+import javax.media.nativewindow.util.DimensionImmutable;
 import javax.media.nativewindow.util.SurfaceSize;
 
 public class TestScreenMode00NEWT extends UITestCase {
@@ -66,9 +66,9 @@ public class TestScreenMode00NEWT extends UITestCase {
 
     @Test
     public void testScreenModeInfo00() throws InterruptedException {
-        DimensionReadOnly res = new Dimension(640, 480);
+        DimensionImmutable res = new Dimension(640, 480);
         SurfaceSize surfsz = new SurfaceSize(res, 32);
-        DimensionReadOnly mm = new Dimension(500, 400);
+        DimensionImmutable mm = new Dimension(500, 400);
         MonitorMode mon = new MonitorMode(surfsz, mm, 60);
         ScreenMode sm_out = new ScreenMode(mon, 90);
         System.err.println("00 out: "+sm_out);
@@ -95,32 +95,36 @@ public class TestScreenMode00NEWT extends UITestCase {
 
     @Test
     public void testScreenModeInfo01() throws InterruptedException {
-    	Capabilities caps = new Capabilities();
+        Capabilities caps = new Capabilities();
         Window window = NewtFactory.createWindow(caps);
         window.setSize(width, height);
         window.setVisible(true);
 
         Screen screen = window.getScreen();
 
-        List screenModes = screen.getScreenModes();
+        List<ScreenMode> screenModes = screen.getScreenModes();
         if(null != screenModes) {
             Assert.assertTrue(screenModes.size()>0);
             int i=0;
-            for(Iterator iter=screenModes.iterator(); iter.hasNext(); i++) {
+            for(Iterator<ScreenMode> iter=screenModes.iterator(); iter.hasNext(); i++) {
                 System.err.println(i+": "+iter.next());
             }
             ScreenMode sm_o = screen.getOriginalScreenMode();
             Assert.assertNotNull(sm_o);            
-            ScreenMode sm_c = screen.getOriginalScreenMode();
+            ScreenMode sm_c = screen.getCurrentScreenMode();
             Assert.assertNotNull(sm_c);
-            System.err.println("orig: "+sm_o);
-            System.err.println("curr: "+sm_c);
+            System.err.println("orig SM: "+sm_o);
+            System.err.println("curr SM: "+sm_c);
+            System.err.println("curr sz: "+screen.getWidth()+"x"+screen.getHeight());
+            Assert.assertEquals(sm_o, sm_c);
+            Assert.assertEquals(sm_c.getRotatedWidth(), screen.getWidth());
+            Assert.assertEquals(sm_c.getRotatedHeight(), screen.getHeight());
         } else {
             // no support ..
             System.err.println("Your platform has no ScreenMode change support, sorry");
         }
 
-        window.invalidate();
+        window.destroy();
 
         Assert.assertEquals(false,window.isVisible());
         Assert.assertEquals(false,window.isNativeValid());
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode00bNEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode00bNEWT.java
new file mode 100644
index 0000000..15b3740
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode00bNEWT.java
@@ -0,0 +1,124 @@
+/**
+ * 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;
+
+import java.io.IOException;
+import javax.media.nativewindow.NativeWindowFactory;
+
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.jogamp.newt.Display;
+import com.jogamp.newt.NewtFactory;
+import com.jogamp.newt.Screen;
+import com.jogamp.newt.ScreenMode;
+import com.jogamp.newt.opengl.GLWindow;
+import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
+import com.jogamp.opengl.test.junit.util.UITestCase;
+import com.jogamp.opengl.util.Animator;
+
+import java.util.Iterator;
+import java.util.List;
+import javax.media.opengl.GLCapabilities;
+import javax.media.opengl.GLCapabilitiesImmutable;
+
+public class TestScreenMode00bNEWT extends UITestCase {
+    static int width, height;
+    
+    static int waitTimeShort = 4; //1 sec
+    static int waitTimeLong = 6; //6 sec
+        
+    @BeforeClass
+    public static void initClass() {
+        NativeWindowFactory.initSingleton(true);
+        width  = 640;
+        height = 480;
+    }
+
+    @Test
+    public void testScreenModeInfo01() throws InterruptedException {
+        Display display = NewtFactory.createDisplay(null);
+        Screen screen = NewtFactory.createScreen(display, 0);
+        // screen.addReference();
+        
+        // put some load on the screen/display context ..
+        GLCapabilitiesImmutable caps = new GLCapabilities(null); 
+        GLWindow window = GLWindow.create(screen, caps);
+        window.addGLEventListener(new GearsES2());
+        window.setSize(256, 256);
+        window.setVisible(true);
+        Animator anim = new Animator(window);
+        anim.start();
+
+        Assert.assertEquals(true,window.isNativeValid());
+        Assert.assertEquals(true,screen.isNativeValid());
+        Assert.assertEquals(true,display.isNativeValid());
+        
+        List<ScreenMode> screenModes = screen.getScreenModes();
+        if(null != screenModes) {
+            Assert.assertTrue(screenModes.size()>0);
+            int i=0;
+            for(Iterator<ScreenMode> iter=screenModes.iterator(); iter.hasNext(); i++) {
+                System.err.println(i+": "+iter.next());
+            }
+            ScreenMode sm_o = screen.getOriginalScreenMode();
+            
+            Assert.assertNotNull(sm_o);            
+            ScreenMode sm_c = screen.getCurrentScreenMode();
+            Assert.assertNotNull(sm_c);
+            System.err.println("orig: "+sm_o);
+            System.err.println("curr: "+sm_c);
+            
+            for(i=0; i<100; i++) {
+                sm_c = screen.getCurrentScreenMode();
+                Assert.assertNotNull(sm_c);
+                System.err.print(".");
+            }
+            System.err.println("!");
+        } else {
+            // no support ..
+            System.err.println("Your platform has no ScreenMode change support, sorry");
+        }
+        
+        // screen.removeReference();
+        anim.stop();
+        window.destroy();
+
+        Assert.assertEquals(false,window.isVisible());
+        Assert.assertEquals(false,window.isNativeValid());
+        Assert.assertEquals(false,screen.isNativeValid());
+        Assert.assertEquals(false,display.isNativeValid());
+    }
+
+    public static void main(String args[]) throws IOException {
+        String tstname = TestScreenMode00bNEWT.class.getName();
+        org.junit.runner.JUnitCore.main(tstname);
+    }
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode01NEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode01NEWT.java
index ffff682..c53c9a1 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode01NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode01NEWT.java
@@ -29,12 +29,13 @@
 package com.jogamp.opengl.test.junit.newt;
 
 import java.io.IOException;
-import javax.media.nativewindow.NativeWindowFactory;
 import javax.media.opengl.GLCapabilities;
 import javax.media.opengl.GLProfile;
 
 import com.jogamp.opengl.util.Animator;
 
+import org.junit.After;
+import org.junit.AfterClass;
 import org.junit.Assert;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -46,35 +47,82 @@ import com.jogamp.newt.Window;
 import com.jogamp.newt.ScreenMode;
 import com.jogamp.newt.opengl.GLWindow;
 import com.jogamp.newt.util.ScreenModeUtil;
-import com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.Gears;
+import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
 import com.jogamp.opengl.test.junit.util.UITestCase;
+
 import java.util.List;
 import javax.media.nativewindow.util.Dimension;
 
+/**
+ * Demonstrates fullscreen with and without ScreenMode change.
+ * 
+ * <p>
+ * Also documents NV RANDR/GL bug, see {@link TestScreenMode01NEWT#cleanupGL()}.</p> 
+ */
 public class TestScreenMode01NEWT extends UITestCase {
     static GLProfile glp;
     static int width, height;
     
-    static int waitTimeShort = 1000; // 1 sec
-    static int waitTimeLong = 5000; // 5 sec
-    
-    
+    static int waitTimeShort = 2000; // 2 sec
+    static int waitTimeLong = 8000; // 8 sec
 
     @BeforeClass
     public static void initClass() {
-        NativeWindowFactory.initSingleton(true);
+        GLProfile.initSingleton(true);
         width  = 640;
         height = 480;
         glp = GLProfile.getDefault();
     }
 
+    @AfterClass
+    public static void releaseClass() throws InterruptedException {
+        Thread.sleep(waitTimeShort);
+    }
+    
+    /**
+     * Following configurations results in a SIGSEGV:
+     * <pre>
+     *   Ubuntu 11.04 (natty), NV GTX 460, driver [280.10* - 285.03]
+     * </pre>
+     * 
+     * Situation:
+     * <pre>
+     *   1 - Create Screen, GLWindow (w/ context)
+     *   2 - ScreenMode change
+     *   3 - Destroy GLWindow (w/ context), Screen
+     *   4 - Create  Screen, GLWindow (w/ context) (*)
+     * </pre>
+     *   
+     * Step 4 causes the exception within 1st 'glXMakeContextCurrent(..)' call
+     * on the the created GL context.
+     * 
+     * Remedy:
+     * <pre>
+     *   A) Releasing all resources before step 4 .. works.
+     *   B) Holding the native Display/Screen in NEWT also works (ie screen.addReference()).
+     * </pre>
+     * 
+     * Hence there must be some correlations with the screen randr mode
+     * and some of the glcontext/gldrawables.
+     * 
+     * <pre>
+     * Remedy A) is demonstrated here
+     * Remedy B) is shown in {@link TestScreenMode01bNEWT}
+     * </pre>
+     */
+    @After
+    public void cleanupGL() throws InterruptedException {
+        GLProfile.shutdown();
+        GLProfile.initSingleton(true);
+    }
+    
     static GLWindow createWindow(Screen screen, GLCapabilities caps, int width, int height, boolean onscreen, boolean undecorated) {
         Assert.assertNotNull(caps);
         caps.setOnscreen(onscreen);
 
         GLWindow window = GLWindow.create(screen, caps);
         window.setSize(width, height);
-        window.addGLEventListener(new Gears());
+        window.addGLEventListener(new GearsES2());
         Assert.assertNotNull(window);
         window.setVisible(true);
         return window;
@@ -88,7 +136,8 @@ public class TestScreenMode01NEWT extends UITestCase {
     
     @Test
     public void testFullscreenChange01() throws InterruptedException {
-    	GLCapabilities caps = new GLCapabilities(glp);
+        Thread.sleep(waitTimeShort);
+        GLCapabilities caps = new GLCapabilities(glp);
         Assert.assertNotNull(caps);
         Display display = NewtFactory.createDisplay(null); // local display
         Assert.assertNotNull(display);
@@ -99,18 +148,26 @@ public class TestScreenMode01NEWT extends UITestCase {
         Animator animator = new Animator(window);
         animator.start();
         
+        Assert.assertEquals(false, window.isFullscreen());
+        Assert.assertEquals(width, window.getWidth());
+        Assert.assertEquals(height, window.getHeight());
+        
         window.setFullscreen(true);
         Assert.assertEquals(true, window.isFullscreen());
+        Assert.assertEquals(window.getScreen().getWidth(), window.getWidth());
+        Assert.assertEquals(window.getScreen().getHeight(), window.getHeight());
         
         Thread.sleep(waitTimeShort);
 
         window.setFullscreen(false);
         Assert.assertEquals(false, window.isFullscreen());
+        Assert.assertEquals(width, window.getWidth());
+        Assert.assertEquals(height, window.getHeight());
         
         Thread.sleep(waitTimeShort);
 
         animator.stop();
-        destroyWindow(window);    	
+        destroyWindow(window);        
     }
 
     @Test
@@ -126,7 +183,7 @@ public class TestScreenMode01NEWT extends UITestCase {
         GLWindow window = createWindow(screen, caps, width, height, true /* onscreen */, false /* undecorated */);
         Assert.assertNotNull(window);
 
-        List screenModes = screen.getScreenModes();
+        List<ScreenMode> screenModes = screen.getScreenModes();
         if(null==screenModes) {
             // no support ..
             System.err.println("Your platform has no ScreenMode change support, sorry");
@@ -144,6 +201,8 @@ public class TestScreenMode01NEWT extends UITestCase {
         Assert.assertNotNull(smOrig);
         Assert.assertEquals(smCurrent, smOrig);
         System.err.println("[0] current/orig: "+smCurrent);
+        Assert.assertEquals(smCurrent.getRotatedWidth(), screen.getWidth());
+        Assert.assertEquals(smCurrent.getRotatedHeight(), screen.getHeight());
 
         screenModes = ScreenModeUtil.filterByRate(screenModes, smOrig.getMonitorMode().getRefreshRate());
         Assert.assertNotNull(screenModes);
@@ -154,6 +213,7 @@ public class TestScreenMode01NEWT extends UITestCase {
         screenModes = ScreenModeUtil.filterByResolution(screenModes, new Dimension(801, 601));
         Assert.assertNotNull(screenModes);
         Assert.assertTrue(screenModes.size()>0);
+        
         screenModes = ScreenModeUtil.getHighestAvailableBpp(screenModes);
         Assert.assertNotNull(screenModes);
         Assert.assertTrue(screenModes.size()>0);
@@ -163,13 +223,13 @@ public class TestScreenMode01NEWT extends UITestCase {
         screen.setCurrentScreenMode(sm);
         Assert.assertEquals(sm, screen.getCurrentScreenMode());
         Assert.assertNotSame(smOrig, screen.getCurrentScreenMode());
+        Assert.assertEquals(sm.getRotatedWidth(), screen.getWidth());
+        Assert.assertEquals(sm.getRotatedHeight(), screen.getHeight());
 
         Thread.sleep(waitTimeLong);
 
         // check reset ..
 
-        ScreenMode saveOrigMode = (ScreenMode) smOrig.clone();
-
         Assert.assertEquals(true,display.isNativeValid());
         Assert.assertEquals(true,screen.isNativeValid());
         Assert.assertEquals(true,window.isNativeValid());
@@ -177,6 +237,7 @@ public class TestScreenMode01NEWT extends UITestCase {
 
         animator.stop();
         destroyWindow(window);
+        Thread.sleep(waitTimeShort);
 
         Assert.assertEquals(false,window.isVisible());
         Assert.assertEquals(false,window.isNativeValid());
@@ -192,40 +253,46 @@ public class TestScreenMode01NEWT extends UITestCase {
         System.err.println("[1] current/orig: "+smCurrent);
 
         Assert.assertNotNull(smCurrent);
-        Assert.assertEquals(saveOrigMode, smOrig);
+        Assert.assertEquals(smCurrent, smOrig);
+        Assert.assertEquals(smCurrent.getRotatedWidth(), screen.getWidth());
+        Assert.assertEquals(smCurrent.getRotatedHeight(), screen.getHeight());
 
         screen.destroy();
 
         Assert.assertEquals(false,screen.isNativeValid());
         Assert.assertEquals(false,display.isNativeValid());
-
-        Thread.sleep(waitTimeShort);
     }
 
     @Test
     public void testScreenModeChangeWithFS01Pre() throws InterruptedException {
         Thread.sleep(waitTimeShort);
         testScreenModeChangeWithFS01Impl(true) ;
-        Thread.sleep(waitTimeShort);
     }
 
     @Test
     public void testScreenModeChangeWithFS01Post() throws InterruptedException {
         Thread.sleep(waitTimeShort);
         testScreenModeChangeWithFS01Impl(false) ;
-        Thread.sleep(waitTimeShort);
     }
 
     protected void testScreenModeChangeWithFS01Impl(boolean preFS) throws InterruptedException {
-    	GLCapabilities caps = new GLCapabilities(glp);
+        GLCapabilities caps = new GLCapabilities(glp);
         Display display = NewtFactory.createDisplay(null); // local display
         Screen screen  = NewtFactory.createScreen(display, 0); // screen 0
         GLWindow window = createWindow(screen, caps, width, height, true /* onscreen */, false /* undecorated */);
         Animator animator = new Animator(window);
         animator.start();
 
+        ScreenMode smCurrent = screen.getCurrentScreenMode();
+        Assert.assertNotNull(smCurrent);
         ScreenMode smOrig = screen.getOriginalScreenMode();
-        List screenModes = screen.getScreenModes();
+        Assert.assertNotNull(smOrig);
+        Assert.assertEquals(smCurrent, smOrig);
+        System.err.println("[0] current/orig: "+smCurrent);
+        Assert.assertEquals(smCurrent.getRotatedWidth(), screen.getWidth());
+        Assert.assertEquals(smCurrent.getRotatedHeight(), screen.getHeight());
+        
+        List<ScreenMode> screenModes = screen.getScreenModes();
         if(null==screenModes) {
             // no support ..
             destroyWindow(window);
@@ -243,12 +310,15 @@ public class TestScreenMode01NEWT extends UITestCase {
         if(preFS) {
             System.err.println("[0] set FS pre 0: "+window.isFullscreen());
             window.setFullscreen(true);
+            System.err.println("[0] set FS pre 1: "+window.isFullscreen());
             Assert.assertEquals(true, window.isFullscreen());
             System.err.println("[0] set FS pre X: "+window.isFullscreen());
         }
 
         System.err.println("[0] set current: "+screenMode);
         screen.setCurrentScreenMode(screenMode);
+        Assert.assertEquals(screenMode.getRotatedWidth(), screen.getWidth());
+        Assert.assertEquals(screenMode.getRotatedHeight(), screen.getHeight());
         
         if(!preFS) {
             System.err.println("[0] set FS post 0: "+window.isFullscreen());
@@ -261,18 +331,32 @@ public class TestScreenMode01NEWT extends UITestCase {
         
         // check reset ..
 
-        ScreenMode saveOrigMode = (ScreenMode) smOrig.clone();
+        Assert.assertEquals(true,display.isNativeValid());
+        Assert.assertEquals(true,screen.isNativeValid());
+        Assert.assertEquals(true,window.isNativeValid());
+        Assert.assertEquals(true,window.isVisible());
 
         animator.stop();
         destroyWindow(window);
+        Thread.sleep(waitTimeShort);
+
+        Assert.assertEquals(false,window.isVisible());
+        Assert.assertEquals(false,window.isNativeValid());
+        Assert.assertEquals(false,screen.isNativeValid());
+        Assert.assertEquals(false,display.isNativeValid());
 
         screen.createNative(); // trigger native re-creation
 
-        ScreenMode smCurrent = screen.getCurrentScreenMode();
+        Assert.assertEquals(true,display.isNativeValid());
+        Assert.assertEquals(true,screen.isNativeValid());
+        
+        smCurrent = screen.getCurrentScreenMode();
         System.err.println("[1] current/orig: "+smCurrent);
 
         Assert.assertNotNull(smCurrent);
-        Assert.assertEquals(saveOrigMode, smOrig);
+        Assert.assertEquals(smCurrent, smOrig);
+        Assert.assertEquals(smCurrent.getRotatedWidth(), screen.getWidth());
+        Assert.assertEquals(smCurrent.getRotatedHeight(), screen.getHeight());
 
         screen.destroy();
     }
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode01bNEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode01bNEWT.java
new file mode 100644
index 0000000..6c505d5
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode01bNEWT.java
@@ -0,0 +1,190 @@
+/**
+ * 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;
+
+import java.io.IOException;
+import javax.media.nativewindow.NativeWindowFactory;
+import javax.media.opengl.GLCapabilities;
+import javax.media.opengl.GLProfile;
+
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.jogamp.newt.Display;
+import com.jogamp.newt.NewtFactory;
+import com.jogamp.newt.Screen;
+import com.jogamp.newt.Window;
+import com.jogamp.newt.ScreenMode;
+import com.jogamp.newt.opengl.GLWindow;
+import com.jogamp.newt.util.ScreenModeUtil;
+import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
+import com.jogamp.opengl.test.junit.util.UITestCase;
+
+import java.util.List;
+import javax.media.nativewindow.util.Dimension;
+
+/**
+ * Documents remedy B) for NV RANDR/GL bug
+ * 
+ * @see TestScreenMode01NEWT#cleanupGL()
+ */
+public class TestScreenMode01bNEWT extends UITestCase {
+    static GLProfile glp;
+    static int width, height;
+    
+    static int waitTimeShort = 2000;
+    static int waitTimeLong = 2000;
+
+    @BeforeClass
+    public static void initClass() {
+        GLProfile.initSingleton(true);
+        width  = 100;
+        height = 100;
+        glp = GLProfile.getDefault();
+    }
+
+    @AfterClass
+    public static void releaseClass() throws InterruptedException {
+        Thread.sleep(waitTimeShort);
+    }
+    
+    static Window createWindow(Screen screen, GLCapabilities caps, String name, int x, int y, int width, int height) {
+        Assert.assertNotNull(caps);
+
+        GLWindow window = GLWindow.create(screen, caps);
+        // Window window = NewtFactory.createWindow(screen, caps);
+        window.setTitle(name);
+        window.setPosition(x, y);
+        window.setSize(width, height);
+        window.addGLEventListener(new GearsES2());
+        Assert.assertNotNull(window);
+        window.setVisible(true);
+        return window;
+    }
+
+    static void destroyWindow(Window window) {
+        if(null!=window) {
+            window.destroy();
+        }
+    }
+    
+    @Test
+    public void testScreenModeChange01() throws InterruptedException {
+        Thread.sleep(waitTimeShort);
+
+        GLCapabilities caps = new GLCapabilities(glp);
+        Assert.assertNotNull(caps);
+        Display display = NewtFactory.createDisplay(null); // local display
+        Assert.assertNotNull(display);
+        Screen screen  = NewtFactory.createScreen(display, 0); // screen 0
+        Assert.assertNotNull(screen);
+        Window window0 = createWindow(screen, caps, "win0", 0, 0, width, height);
+        Assert.assertNotNull(window0);        
+
+        List<ScreenMode> screenModes = screen.getScreenModes();
+        if(null==screenModes) {
+            // no support ..
+            System.err.println("Your platform has no ScreenMode change support, sorry");
+            destroyWindow(window0);
+            return;
+        }
+        Assert.assertTrue(screenModes.size()>0);
+
+        ScreenMode smCurrent = screen.getCurrentScreenMode();
+        Assert.assertNotNull(smCurrent);
+        ScreenMode smOrig = screen.getOriginalScreenMode();
+        Assert.assertNotNull(smOrig);
+        Assert.assertEquals(smCurrent, smOrig);
+        System.err.println("[0] current/orig: "+smCurrent);
+
+        screenModes = ScreenModeUtil.filterByRate(screenModes, smOrig.getMonitorMode().getRefreshRate());
+        Assert.assertNotNull(screenModes);
+        Assert.assertTrue(screenModes.size()>0);
+        screenModes = ScreenModeUtil.filterByRotation(screenModes, 0);
+        Assert.assertNotNull(screenModes);
+        Assert.assertTrue(screenModes.size()>0);
+        screenModes = ScreenModeUtil.filterByResolution(screenModes, new Dimension(801, 601));
+        Assert.assertNotNull(screenModes);
+        Assert.assertTrue(screenModes.size()>0);
+        
+        screenModes = ScreenModeUtil.getHighestAvailableBpp(screenModes);
+        Assert.assertNotNull(screenModes);
+        Assert.assertTrue(screenModes.size()>0);
+
+        ScreenMode sm = (ScreenMode) screenModes.get(0);
+        System.err.println("[0] set current: "+sm);
+        screen.setCurrentScreenMode(sm);
+        Assert.assertEquals(sm, screen.getCurrentScreenMode());
+        Assert.assertNotSame(smOrig, screen.getCurrentScreenMode());
+
+        Thread.sleep(waitTimeShort);
+
+        // check reset ..
+
+        Assert.assertEquals(true,display.isNativeValid());
+        Assert.assertEquals(true,screen.isNativeValid());
+        Assert.assertEquals(true,window0.isNativeValid());
+        Assert.assertEquals(true,window0.isVisible());
+
+        screen.addReference(); // keep it alive !
+        screen.setCurrentScreenMode(smOrig);
+        
+        destroyWindow(window0);
+        Assert.assertEquals(false,window0.isVisible());
+        Assert.assertEquals(false,window0.isNativeValid());
+        Assert.assertEquals(true,screen.isNativeValid()); // alive !
+        Assert.assertEquals(true,display.isNativeValid());
+                
+        Thread.sleep(waitTimeShort);
+
+        Window window1 = createWindow(screen, caps, "win1", 
+                                      width+window0.getInsets().getTotalWidth(), 0, 
+                                      width, height);
+        Assert.assertNotNull(window1);
+        Assert.assertEquals(true,window1.isNativeValid());
+        Assert.assertEquals(true,window1.isVisible());
+        
+        Thread.sleep(waitTimeShort);
+        
+        destroyWindow(window1);
+        Assert.assertEquals(false,window1.isNativeValid());
+        Assert.assertEquals(false,window1.isVisible());
+        
+        screen.removeReference();
+        Assert.assertEquals(false,screen.isNativeValid());
+        Assert.assertEquals(false,display.isNativeValid());                
+    }
+
+    public static void main(String args[]) throws IOException {
+        String tstname = TestScreenMode01bNEWT.class.getName();
+        org.junit.runner.JUnitCore.main(tstname);
+    }
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode02NEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode02NEWT.java
index 2ec0490..c5c1168 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode02NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode02NEWT.java
@@ -29,12 +29,12 @@
 package com.jogamp.opengl.test.junit.newt;
 
 import java.io.IOException;
-import javax.media.nativewindow.NativeWindowFactory;
 import javax.media.opengl.GLCapabilities;
 import javax.media.opengl.GLProfile;
 
 import com.jogamp.opengl.util.Animator;
 
+import org.junit.AfterClass;
 import org.junit.Assert;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -46,7 +46,7 @@ import com.jogamp.newt.Window;
 import com.jogamp.newt.ScreenMode;
 import com.jogamp.newt.opengl.GLWindow;
 import com.jogamp.newt.util.ScreenModeUtil;
-import com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.Gears;
+import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
 import com.jogamp.opengl.test.junit.util.UITestCase;
 import java.util.List;
 import javax.media.nativewindow.util.Dimension;
@@ -55,24 +55,29 @@ public class TestScreenMode02NEWT extends UITestCase {
     static GLProfile glp;
     static int width, height;
     
-    static int waitTimeShort = 1000; // 1 sec
-    static int waitTimeLong = 5000; // 5 sec
+    static int waitTimeShort = 2000; // 2 sec
+    static int waitTimeLong = 8000; // 8 sec
 
     @BeforeClass
     public static void initClass() {
-        NativeWindowFactory.initSingleton(true);
+        GLProfile.initSingleton(true);
         width  = 640;
         height = 480;
         glp = GLProfile.getDefault();
     }
 
+    @AfterClass
+    public static void releaseClass() throws InterruptedException {
+        Thread.sleep(waitTimeShort);
+    }
+    
     static GLWindow createWindow(Screen screen, GLCapabilities caps, int width, int height, boolean onscreen, boolean undecorated) {
         Assert.assertNotNull(caps);
         caps.setOnscreen(onscreen);
 
         GLWindow window = GLWindow.create(screen, caps);
         window.setSize(width, height);
-        window.addGLEventListener(new Gears());
+        window.addGLEventListener(new GearsES2());
         Assert.assertNotNull(window);
         window.setVisible(true);
         Assert.assertTrue(window.isVisible());
@@ -98,7 +103,7 @@ public class TestScreenMode02NEWT extends UITestCase {
         GLWindow window = createWindow(screen, caps, width, height, true /* onscreen */, false /* undecorated */);
         Assert.assertNotNull(window);
 
-        List screenModes = screen.getScreenModes();
+        List<ScreenMode> screenModes = screen.getScreenModes();
         if(null==screenModes) {
             // no support ..
             System.err.println("Your platform has no ScreenMode change support, sorry");
@@ -145,8 +150,6 @@ public class TestScreenMode02NEWT extends UITestCase {
 
         // check reset ..
 
-        ScreenMode saveOrigMode = (ScreenMode) smOrig.clone();
-
         Assert.assertEquals(true,display.isNativeValid());
         Assert.assertEquals(true,screen.isNativeValid());
         Assert.assertEquals(true,window.isNativeValid());
@@ -169,14 +172,12 @@ public class TestScreenMode02NEWT extends UITestCase {
         System.err.println("[1] current/orig: "+smCurrent);
 
         Assert.assertNotNull(smCurrent);
-        Assert.assertEquals(saveOrigMode, smOrig);
+        Assert.assertEquals(smCurrent, smOrig);
 
         screen.destroy();
 
         Assert.assertEquals(false,screen.isNativeValid());
         Assert.assertEquals(false,display.isNativeValid());
-
-        Thread.sleep(waitTimeShort);
     }
 
     public static void main(String args[]) throws IOException {
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestWindowClosingProtocol01AWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestWindowClosingProtocol01AWT.java
index 581877e..7106817 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/TestWindowClosingProtocol01AWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/TestWindowClosingProtocol01AWT.java
@@ -42,7 +42,8 @@ import javax.media.opengl.GLCapabilities;
 import javax.media.opengl.GLProfile;
 import javax.media.opengl.awt.GLCanvas;
 
-import com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.Gears;
+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.UITestCase;
 
@@ -55,7 +56,7 @@ public class TestWindowClosingProtocol01AWT extends UITestCase {
         GLProfile glp = GLProfile.getDefault();
         GLCapabilities caps = new GLCapabilities(glp);
         final GLCanvas glCanvas = new GLCanvas(caps);
-        glCanvas.addGLEventListener(new Gears());
+        glCanvas.addGLEventListener(new GearsES2());
         SwingUtilities.invokeLater(new Runnable() {
             public void run() {
                 frame.add(glCanvas);
@@ -76,6 +77,7 @@ public class TestWindowClosingProtocol01AWT extends UITestCase {
         Assert.assertEquals(true, AWTRobotUtil.closeWindow(frame, false)); // nop
         Thread.sleep(100);
         Assert.assertEquals(true, frame.isDisplayable());
+        Assert.assertEquals(true,  frame.isVisible());
         Assert.assertEquals(true, glCanvas.isValid());
         Assert.assertEquals(true, glCanvas.isDisplayable());
 
@@ -89,6 +91,7 @@ public class TestWindowClosingProtocol01AWT extends UITestCase {
         Assert.assertEquals(true,  AWTRobotUtil.closeWindow(frame, false)); // no frame close
         Assert.assertEquals(true,  AWTRobotUtil.waitForRealized(glCanvas, false));
         Assert.assertEquals(true,  frame.isDisplayable());
+        Assert.assertEquals(true,  frame.isVisible());
         Assert.assertEquals(false, glCanvas.isRealized());
 
         SwingUtilities.invokeLater(new Runnable() {
@@ -104,7 +107,7 @@ public class TestWindowClosingProtocol01AWT extends UITestCase {
         GLProfile glp = GLProfile.getDefault();
         GLCapabilities caps = new GLCapabilities(glp);
         GLCanvas glCanvas = new GLCanvas(caps);
-        glCanvas.addGLEventListener(new Gears());
+        glCanvas.addGLEventListener(new GearsES2());
         frame.getContentPane().add(glCanvas);
         frame.pack();
         frame.setSize(512, 512);
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestWindowClosingProtocol02NEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestWindowClosingProtocol02NEWT.java
index 8f5baec..8ad52ca 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/TestWindowClosingProtocol02NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/TestWindowClosingProtocol02NEWT.java
@@ -40,7 +40,8 @@ import javax.media.opengl.GLProfile;
 
 import com.jogamp.newt.opengl.GLWindow;
 
-import com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.Gears;
+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.UITestCase;
 
@@ -53,7 +54,7 @@ public class TestWindowClosingProtocol02NEWT extends UITestCase {
         final GLWindow glWindow = GLWindow.create(caps);
         final AWTRobotUtil.WindowClosingListener windowClosingListener = AWTRobotUtil.addClosingListener(glWindow);
 
-        glWindow.addGLEventListener(new Gears());
+        glWindow.addGLEventListener(new GearsES2());
         glWindow.setSize(512, 512);
         glWindow.setVisible(true);
         Assert.assertEquals(true, glWindow.isVisible());
@@ -70,7 +71,6 @@ public class TestWindowClosingProtocol02NEWT extends UITestCase {
         Assert.assertEquals(WindowClosingProtocol.DO_NOTHING_ON_CLOSE, op);
 
         Assert.assertEquals(true, AWTRobotUtil.closeWindow(glWindow, false)); // nop
-        Assert.assertEquals(true, glWindow.isValid());
         Assert.assertEquals(true, glWindow.isNativeValid());
         Assert.assertEquals(true, windowClosingListener.isWindowClosing());
         windowClosingListener.reset();
@@ -83,7 +83,6 @@ public class TestWindowClosingProtocol02NEWT extends UITestCase {
         Assert.assertEquals(WindowClosingProtocol.DISPOSE_ON_CLOSE, op);
 
         Assert.assertEquals(true,  AWTRobotUtil.closeWindow(glWindow, true));
-        Assert.assertEquals(true,  glWindow.isValid());
         Assert.assertEquals(false, glWindow.isNativeValid());
         Assert.assertEquals(true,  windowClosingListener.isWindowClosing());
     }
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestWindowClosingProtocol03NewtAWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestWindowClosingProtocol03NewtAWT.java
index a107306..c14c461 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/TestWindowClosingProtocol03NewtAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/TestWindowClosingProtocol03NewtAWT.java
@@ -42,7 +42,8 @@ import javax.media.nativewindow.WindowClosingProtocol;
 import javax.media.opengl.GLCapabilities;
 import javax.media.opengl.GLProfile;
 
-import com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.Gears;
+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.UITestCase;
 
@@ -57,16 +58,25 @@ public class TestWindowClosingProtocol03NewtAWT extends UITestCase {
         final GLWindow glWindow = GLWindow.create(caps);
         final AWTRobotUtil.WindowClosingListener windowClosingListener = AWTRobotUtil.addClosingListener(glWindow);
 
-        glWindow.addGLEventListener(new Gears());
+        glWindow.addGLEventListener(new GearsES2());
 
-        NewtCanvasAWT newtCanvas = new NewtCanvasAWT(glWindow);
+        final NewtCanvasAWT newtCanvas = new NewtCanvasAWT(glWindow);
 
-        frame.getContentPane().add(newtCanvas);
-        frame.pack();
-        frame.setSize(512, 512);
-        frame.validate();
-        frame.setVisible(true);
-        Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, true));
+        SwingUtilities.invokeLater(new Runnable() {
+            public void run() {
+                frame.getContentPane().add(newtCanvas);
+                frame.pack();
+                frame.setSize(512, 512);
+                frame.validate();
+                frame.setVisible(true);
+            } });
+        Assert.assertEquals(true,  AWTRobotUtil.waitForVisible(frame, true));
+        Assert.assertEquals(true,  AWTRobotUtil.waitForRealized(glWindow, true));
+        Assert.assertEquals(true,  frame.isDisplayable());
+        Assert.assertEquals(true,  frame.isVisible());
+        Assert.assertEquals(true,  newtCanvas.isValid());
+        Assert.assertEquals(true,  newtCanvas.isDisplayable());
+        Assert.assertEquals(true,  glWindow.isNativeValid());
 
         //
         // close with op: DO_NOTHING_ON_CLOSE -> NOP / HIDE (default)
@@ -77,9 +87,9 @@ public class TestWindowClosingProtocol03NewtAWT extends UITestCase {
 
         Assert.assertEquals(true,  AWTRobotUtil.closeWindow(frame, false));
         Assert.assertEquals(true,  frame.isDisplayable());
+        Assert.assertEquals(false, frame.isVisible());
         Assert.assertEquals(true,  newtCanvas.isValid());
         Assert.assertEquals(true,  newtCanvas.isDisplayable());
-        Assert.assertEquals(true,  glWindow.isValid());
         Assert.assertEquals(true,  glWindow.isNativeValid());
         Assert.assertEquals(true,  windowClosingListener.isWindowClosing());
         windowClosingListener.reset();
@@ -88,8 +98,10 @@ public class TestWindowClosingProtocol03NewtAWT extends UITestCase {
             public void run() {
                 frame.setVisible(true);
             } });
-        Assert.assertEquals(true, AWTRobotUtil.waitForVisible(frame, true));
-
+        Assert.assertEquals(true,  AWTRobotUtil.waitForVisible(frame, true));
+        Assert.assertEquals(true,  frame.isDisplayable());
+        Assert.assertEquals(true,  frame.isVisible());
+        
         //
         // close with op (JFrame): DISPOSE_ON_CLOSE -- newtCanvas -- glWindow --> dispose
         //
@@ -100,9 +112,9 @@ public class TestWindowClosingProtocol03NewtAWT extends UITestCase {
 
         Assert.assertEquals(true,  AWTRobotUtil.closeWindow(frame, true));
         Assert.assertEquals(false, frame.isDisplayable());
+        Assert.assertEquals(false, frame.isVisible());
         Assert.assertEquals(false, newtCanvas.isValid());
         Assert.assertEquals(false, newtCanvas.isDisplayable());
-        Assert.assertEquals(true,  glWindow.isValid());
         Assert.assertEquals(false, glWindow.isNativeValid());
         Assert.assertEquals(true,  windowClosingListener.isWindowClosing());
     }
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestWindows01NEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestWindows01NEWT.java
index 5ac6041..827dd09 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/TestWindows01NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/TestWindows01NEWT.java
@@ -28,19 +28,12 @@
  
 package com.jogamp.opengl.test.junit.newt;
 
-import java.lang.reflect.*;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
 import org.junit.Assert;
-import org.junit.Before;
 import org.junit.BeforeClass;
-import org.junit.After;
-import org.junit.AfterClass;
 import org.junit.Test;
 
 import javax.media.nativewindow.*;
+import javax.media.nativewindow.util.Point;
 
 import com.jogamp.newt.*;
 import java.io.IOException;
@@ -53,11 +46,13 @@ public class TestWindows01NEWT extends UITestCase {
     @BeforeClass
     public static void initClass() {
         NativeWindowFactory.initSingleton(true);
-        width  = 640;
-        height = 480;
+        width  = 256;
+        height = 256;
     }
 
-    static Window createWindow(Screen screen, Capabilities caps, int width, int height, boolean onscreen, boolean undecorated) {
+    static Window createWindow(Capabilities caps, int x, int y, int width, int height, boolean onscreen, boolean undecorated) throws InterruptedException {
+        final boolean userPos = x>=0 && y>=0 ; // user has specified a position
+        
         Assert.assertNotNull(caps);
         caps.setOnscreen(onscreen);
         // System.out.println("Requested: "+caps);
@@ -65,110 +60,121 @@ public class TestWindows01NEWT extends UITestCase {
         //
         // Create native windowing resources .. X11/Win/OSX
         // 
-        Window window = NewtFactory.createWindow(screen, caps);
+        Window window = NewtFactory.createWindow(caps);
         Assert.assertNotNull(window);
+        Screen screen = window.getScreen();
+        Display display = screen.getDisplay();
         window.setUndecorated(onscreen && undecorated);
+        if(userPos) {
+            window.setPosition(x, y);
+        }
         window.setSize(width, height);
         Assert.assertEquals(false,window.isNativeValid());
         Assert.assertEquals(false,window.isVisible());
         window.setVisible(true);
+        // System.err.println("************* Created: "+window);
+        
+        Assert.assertEquals(true,display.isNativeValid());            
+        Assert.assertEquals(true,screen.isNativeValid());
         Assert.assertEquals(true,window.isVisible());
         Assert.assertEquals(true,window.isNativeValid());
-        // Assert.assertEquals(width,window.getWidth());
-        // Assert.assertEquals(height,window.getHeight());
-        // System.out.println("Created: "+window);
+        Assert.assertEquals(width, window.getWidth());
+        Assert.assertEquals(height, window.getHeight());
+
+        /** we don't sync on position - unreliable test
+        Point p0  = window.getLocationOnScreen(null);
+        Assert.assertEquals(p0.getX(), window.getX());
+        Assert.assertEquals(p0.getY(), window.getY());
+        if(userPos) {
+            Assert.assertEquals(x, window.getX());
+            Assert.assertEquals(y, window.getY());
+        } */
 
-        //
-        // Create native OpenGL resources .. XGL/WGL/CGL .. 
-        // equivalent to GLAutoDrawable methods: setVisible(true)
-        // 
         CapabilitiesImmutable chosenCapabilities = window.getGraphicsConfiguration().getNativeGraphicsConfiguration().getChosenCapabilities();
         Assert.assertNotNull(chosenCapabilities);
-        Assert.assertTrue(chosenCapabilities.getGreenBits()>5);
-        Assert.assertTrue(chosenCapabilities.getBlueBits()>5);
-        Assert.assertTrue(chosenCapabilities.getRedBits()>5);
+        Assert.assertTrue(chosenCapabilities.getGreenBits()>=5);
+        Assert.assertTrue(chosenCapabilities.getBlueBits()>=5);
+        Assert.assertTrue(chosenCapabilities.getRedBits()>=5);
         Assert.assertEquals(chosenCapabilities.isOnscreen(),onscreen);
-
+        
         return window;
     }
 
-    static void destroyWindow(Display display, Screen screen, Window window) {
-        if(null!=window) {
-            window.destroy();
-        }
-        if(null!=screen) {
-            screen.destroy();
+    static void destroyWindow(Window window, boolean last) {
+        if(null==window) {
+            return;
         }
-        if(null!=display) {
-            display.destroy();
+        Screen screen = window.getScreen();
+        Display display = screen.getDisplay();
+        window.destroy();
+        // System.err.println("************* Destroyed: "+window);
+        if(last) {
+            Assert.assertEquals(false,screen.isNativeValid());
+            Assert.assertEquals(false,display.isNativeValid());
+        } else {
+            Assert.assertEquals(true,screen.isNativeValid());
+            Assert.assertEquals(true,display.isNativeValid());            
         }
+        Assert.assertEquals(false,window.isNativeValid());
+        Assert.assertEquals(false,window.isVisible());
     }
 
+
     @Test
-    public void testWindowNativeRecreate01Simple() throws InterruptedException {
+    public void testWindowDecorSimpleWMPos() throws InterruptedException {
         Capabilities caps = new Capabilities();
         Assert.assertNotNull(caps);
-        Display display = NewtFactory.createDisplay(null); // local display
-        Assert.assertNotNull(display);
-        Screen screen  = NewtFactory.createScreen(display, 0); // screen 0
-        Assert.assertNotNull(screen);
 
-        Window window = createWindow(screen, caps, width, height, true /* onscreen */, false /* undecorated */);
-        window.destroy();
-        Assert.assertEquals(false,window.isNativeValid());
-        Assert.assertEquals(false,window.isVisible());
+        Window window = createWindow(caps, -1, -1, width, height, true /* onscreen */, false /* undecorated */);
+        destroyWindow(window, true);
+    }
 
-        window.setVisible(true);
-        Assert.assertEquals(true,window.isNativeValid());
-        Assert.assertEquals(true,window.isVisible());
 
-        Thread.sleep(100); // 100 ms
-        destroyWindow(display, screen, window);
+    @Test
+    public void testWindowDecorSimpleUserPos() throws InterruptedException {
+        Capabilities caps = new Capabilities();
+        Assert.assertNotNull(caps);
+
+        Window window = createWindow(caps, 100, 100, width, height, true /* onscreen */, false /* undecorated */);
+        destroyWindow(window, true);
     }
 
     @Test
-    public void testWindowDecor01Simple() throws InterruptedException {
+    public void testWindowNativeRecreate01Simple() throws InterruptedException {
         Capabilities caps = new Capabilities();
         Assert.assertNotNull(caps);
-        Display display = NewtFactory.createDisplay(null); // local display
-        Assert.assertNotNull(display);
-        Screen screen  = NewtFactory.createScreen(display, 0); // screen 0
-        Assert.assertNotNull(screen);
-
-        Window window = createWindow(screen, caps, width, height, true /* onscreen */, false /* undecorated */);
-        Thread.sleep(100); // 100 ms
-        destroyWindow(display, screen, window);
-    }
 
+        Window window = createWindow(caps, -1, -1, width, height, true /* onscreen */, false /* undecorated */);
+        destroyWindow(window, true);
+        
+        window.setVisible(true);
+        Assert.assertEquals(true,window.isNativeValid());
+        Assert.assertEquals(true,window.isVisible());
+        Assert.assertEquals(width, window.getWidth());
+        Assert.assertEquals(height, window.getHeight());
+
+        destroyWindow(window, true);
+    }
+    
     @Test
-    public void testWindowDecor02DestroyWinTwiceA() throws InterruptedException {
+    public void testWindowDecorDestroyWinTwiceA() throws InterruptedException {
         Capabilities caps = new Capabilities();
         Assert.assertNotNull(caps);
-        Display display = NewtFactory.createDisplay(null); // local display
-        Assert.assertNotNull(display);
-        Screen screen  = NewtFactory.createScreen(display, 0); // screen 0
-        Assert.assertNotNull(screen);
-
-        Window window = createWindow(screen, caps, width, height, true /* onscreen */, false /* undecorated */);
-        Thread.sleep(100); // 100 ms
-        destroyWindow(null, null, window);
-        destroyWindow(display, screen, window);
+
+        Window window = createWindow(caps, -1, -1, width, height, true /* onscreen */, false /* undecorated */);
+        destroyWindow(window, true);
+        destroyWindow(window, true);
     }
 
     @Test
-    public void testWindowDecor03TwoWin() throws InterruptedException {
+    public void testWindowDecorTwoWin() throws InterruptedException {
         Capabilities caps = new Capabilities();
         Assert.assertNotNull(caps);
-        Display display = NewtFactory.createDisplay(null); // local display
-        Assert.assertNotNull(display);
-        Screen screen  = NewtFactory.createScreen(display, 0); // screen 0
-        Assert.assertNotNull(screen);
-
-        Window window1 = createWindow(screen, caps, width, height, true /* onscreen */, false /* undecorated */);
-        Window window2 = createWindow(screen, caps, width, height, true /* onscreen */, false /* undecorated */);
-        Thread.sleep(100); // 100 ms
-        destroyWindow(null, null, window2);
-        destroyWindow(display, screen, window1);
+
+        Window window1 = createWindow(caps, -1, -1, width, height, true /* onscreen */, false /* undecorated */);
+        Window window2 = createWindow(caps, 100, 100, width, height, true /* onscreen */, false /* undecorated */);
+        destroyWindow(window2, false);
+        destroyWindow(window1, true);
     }
 
     public static void main(String args[]) throws IOException {
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/parenting/GLRunnableDummy.java b/src/test/com/jogamp/opengl/test/junit/newt/parenting/GLRunnableDummy.java
index d518616..1ca7477 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/parenting/GLRunnableDummy.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/parenting/GLRunnableDummy.java
@@ -28,21 +28,15 @@
  
 package com.jogamp.opengl.test.junit.newt.parenting;
 
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.AfterClass;
-import org.junit.Test;
-
 import javax.media.opengl.*;
 
 public class GLRunnableDummy implements GLRunnable {
     float r=0.0f;
     float g=0.0f;
     float b=0.0f;
-    float d=0.001f;
+    float d=0.1f;
 
-    public void run(GLAutoDrawable drawable) {
+    public boolean run(GLAutoDrawable drawable) {
         GL2ES1 gl = drawable.getGL().getGL2ES1();
         gl.glClearColor(r, g, b, 1f);
         r+=d;
@@ -53,5 +47,6 @@ public class GLRunnableDummy implements GLRunnable {
             r=0f;
             d*=-1f;
         }
+        return true;
     }
 }
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/parenting/NewtAWTReparentingKeyAdapter.java b/src/test/com/jogamp/opengl/test/junit/newt/parenting/NewtAWTReparentingKeyAdapter.java
new file mode 100644
index 0000000..46748cb
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/newt/parenting/NewtAWTReparentingKeyAdapter.java
@@ -0,0 +1,95 @@
+/**
+ * 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.newt.parenting;
+
+import java.awt.Frame;
+
+import javax.media.nativewindow.util.InsetsImmutable;
+
+import com.jogamp.newt.awt.NewtCanvasAWT;
+import com.jogamp.newt.event.KeyAdapter;
+import com.jogamp.newt.event.KeyEvent;
+import com.jogamp.newt.opengl.GLWindow;
+
+class NewtAWTReparentingKeyAdapter extends KeyAdapter {
+    Frame frame;
+    NewtCanvasAWT newtCanvasAWT;
+    GLWindow glWindow;
+    
+    public NewtAWTReparentingKeyAdapter(Frame frame, NewtCanvasAWT newtCanvasAWT, GLWindow glWindow) {
+        this.frame = frame;
+        this.newtCanvasAWT = newtCanvasAWT;
+        this.glWindow = glWindow;
+    }
+    
+    public void keyTyped(KeyEvent e) {
+        if(e.getKeyChar()=='d') {
+            glWindow.setUndecorated(!glWindow.isUndecorated());
+        } else if(e.getKeyChar()=='f') {
+            glWindow.setFullscreen(!glWindow.isFullscreen());                
+        } else if(e.getKeyChar()=='p') {
+            new Thread() {
+                public void run() {
+                    if(glWindow.getAnimator().isPaused()) {
+                        glWindow.getAnimator().resume();
+                    } else {
+                        glWindow.getAnimator().pause();    
+                    }                                
+                }
+            }.run();
+        } else if(e.getKeyChar()=='r') {
+            if(glWindow.getParent()==null) {
+                System.err.println("XXX glWin to home");
+                glWindow.reparentWindow(newtCanvasAWT.getNativeWindow());
+            } else {
+                final InsetsImmutable nInsets = glWindow.getInsets();
+                java.awt.Insets aInsets = frame.getInsets();
+                System.err.println("XXX glWin to TOP - insets " + nInsets + ", " + aInsets);
+                glWindow.reparentWindow(null);
+                int dx, dy;
+                if(nInsets.getTotalHeight()==0) {
+                    dx = aInsets.left;
+                    dy = aInsets.top;
+                } else {
+                    dx = nInsets.getLeftWidth();
+                    dy = nInsets.getTopHeight();
+                }
+                glWindow.setPosition(frame.getX()+frame.getWidth()+dx, frame.getY()+dy);
+            }
+            glWindow.requestFocus();
+        } else if(e.getKeyChar()=='s') {
+            if(glWindow.getParent()==null) {
+                System.err.println("XXX glWin to 100/100");
+                glWindow.setPosition(100, 100);
+            } else {
+                System.err.println("XXX glWin to 0/0");
+                glWindow.setPosition(0, 0);                
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01NEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01NEWT.java
index 5173d0f..7f97be6 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01NEWT.java
@@ -37,18 +37,17 @@ import javax.media.opengl.*;
 
 import com.jogamp.opengl.util.Animator;
 import com.jogamp.newt.*;
-import com.jogamp.newt.event.*;
 import com.jogamp.newt.opengl.*;
 
 import java.io.IOException;
 
 import com.jogamp.opengl.test.junit.util.*;
-import com.jogamp.opengl.test.junit.jogl.demos.es1.RedSquare;
-import com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.Gears;
+import com.jogamp.opengl.test.junit.jogl.demos.es2.RedSquareES2;
+import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
 
 public class TestParenting01NEWT extends UITestCase {
     static int width, height;
-    static long durationPerTest = 500;
+    static long durationPerTest = 600;
     static long waitAbout10FramesAt30fps = 10*34; // 10 frames @ 30fps
     static GLCapabilities glCaps;
 
@@ -62,15 +61,10 @@ public class TestParenting01NEWT extends UITestCase {
 
     @Test
     public void testWindowParenting01CreateVisibleDestroy() throws InterruptedException {
-        int x = 0;
-        int y = 0;
-
         Assert.assertEquals(0,Display.getActiveDisplayNumber());
         Display display = null;
         Screen screen = null;
 
-        NEWTEventFiFo eventFifo = new NEWTEventFiFo();
-
         GLWindow glWindow1 = GLWindow.create(glCaps);
         Assert.assertNotNull(glWindow1);
         Assert.assertEquals(false, glWindow1.isVisible());
@@ -88,7 +82,7 @@ public class TestParenting01NEWT extends UITestCase {
 
         glWindow1.setTitle("testWindowParenting01CreateVisibleDestroy");
         glWindow1.setSize(640, 480);
-        GLEventListener demo1 = new RedSquare();
+        GLEventListener demo1 = new RedSquareES2();
         setDemoFields(demo1, glWindow1, false);
         glWindow1.addGLEventListener(demo1);
 
@@ -100,7 +94,7 @@ public class TestParenting01NEWT extends UITestCase {
         Assert.assertSame(screen,glWindow2.getScreen());
         Assert.assertSame(display,glWindow2.getScreen().getDisplay());
         glWindow2.setSize(320, 240);
-        GLEventListener demo2 = new Gears();
+        GLEventListener demo2 = new GearsES2();
         setDemoFields(demo2, glWindow2, false);
         glWindow2.addGLEventListener(demo2);
 
@@ -113,12 +107,12 @@ public class TestParenting01NEWT extends UITestCase {
         Assert.assertEquals(0,Display.getActiveDisplayNumber());
 
         // visible test
-        Assert.assertEquals(0, glWindow1.getTotalFrames());
-        Assert.assertEquals(0, glWindow2.getTotalFrames());
+        Assert.assertEquals(0, glWindow1.getTotalFPSFrames());
+        Assert.assertEquals(0, glWindow2.getTotalFPSFrames());
         glWindow1.setVisible(true);
-        System.err.println("Frames for setVisible(true): A1: "+glWindow1.getTotalFrames()+", B1: "+glWindow2.getTotalFrames());
-        Assert.assertTrue(0 < glWindow1.getTotalFrames());
-        Assert.assertTrue(0 < glWindow2.getTotalFrames());
+        System.err.println("Frames for setVisible(true): A1: "+glWindow1.getTotalFPSFrames()+", B1: "+glWindow2.getTotalFPSFrames());
+        Assert.assertTrue(0 < glWindow1.getTotalFPSFrames());
+        Assert.assertTrue(0 < glWindow2.getTotalFPSFrames());
 
         Assert.assertEquals(true, glWindow1.isVisible());
         Assert.assertEquals(true, glWindow1.isNativeValid());
@@ -138,38 +132,40 @@ public class TestParenting01NEWT extends UITestCase {
         Assert.assertEquals(false, glWindow2.isVisible());
         Assert.assertEquals(true, glWindow2.isNativeValid());
 
-        glWindow1.resetCounter();
-        glWindow2.resetCounter();
-        Assert.assertEquals(0, glWindow1.getTotalFrames());
-        Assert.assertEquals(0, glWindow2.getTotalFrames());
+        glWindow1.resetFPSCounter();
+        glWindow2.resetFPSCounter();
+        Assert.assertEquals(0, glWindow1.getTotalFPSFrames());
+        Assert.assertEquals(0, glWindow2.getTotalFPSFrames());
         glWindow1.setVisible(true);
-        System.err.println("Frames for setVisible(true): A2: "+glWindow1.getTotalFrames()+", B2: "+glWindow2.getTotalFrames());
-        Assert.assertTrue(0 < glWindow1.getTotalFrames());
-        Assert.assertTrue(0 < glWindow2.getTotalFrames());
+        System.err.println("Frames for setVisible(true): A2: "+glWindow1.getTotalFPSFrames()+", B2: "+glWindow2.getTotalFPSFrames());
+        Assert.assertTrue(0 < glWindow1.getTotalFPSFrames());
+        Assert.assertTrue(0 < glWindow2.getTotalFPSFrames());
 
         Assert.assertEquals(true, glWindow1.isVisible());
         Assert.assertEquals(true, glWindow1.isNativeValid());
         Assert.assertEquals(true, glWindow2.isVisible());
         Assert.assertEquals(true, glWindow2.isNativeValid());
 
-        glWindow1.resetCounter();
-        glWindow2.resetCounter();
+        glWindow1.resetFPSCounter();
+        glWindow2.resetFPSCounter();
         Animator animator1 = new Animator(glWindow1);
+        animator1.setUpdateFPSFrames(1, null);        
         animator1.start();
         Assert.assertEquals(true, animator1.isAnimating());
         Assert.assertEquals(false, animator1.isPaused());
         Assert.assertNotNull(animator1.getThread());
         Animator animator2 = new Animator(glWindow2);
+        animator2.setUpdateFPSFrames(1, null);        
         animator2.start();
         Assert.assertEquals(true, animator2.isAnimating());
         Assert.assertEquals(false, animator2.isPaused());
         Assert.assertNotNull(animator2.getThread());
-        while(animator1.isAnimating() && animator1.getDuration()<durationPerTest) {
+        while(animator1.isAnimating() && animator1.getTotalFPSDuration()<durationPerTest) {
             Thread.sleep(100);
         }
-        System.err.println("Frames for setVisible(true): A3: "+glWindow1.getTotalFrames()+", B3: "+glWindow2.getTotalFrames());
-        Assert.assertTrue(0 < glWindow1.getTotalFrames());
-        Assert.assertTrue(0 < glWindow2.getTotalFrames());
+        System.err.println("Frames for setVisible(true): A3: "+glWindow1.getTotalFPSFrames()+", B3: "+glWindow2.getTotalFPSFrames());
+        Assert.assertTrue(0 < glWindow1.getTotalFPSFrames());
+        Assert.assertTrue(0 < glWindow2.getTotalFPSFrames());
 
         Assert.assertEquals(true, animator1.pause());
         Assert.assertEquals(false, animator1.isAnimating());
@@ -180,8 +176,8 @@ public class TestParenting01NEWT extends UITestCase {
         Assert.assertEquals(true, animator2.isPaused());
         Assert.assertNotNull(animator2.getThread());
 
-        glWindow1.resetCounter();
-        glWindow2.resetCounter();
+        glWindow1.resetFPSCounter();
+        glWindow2.resetFPSCounter();
         Assert.assertEquals(true, animator1.resume());
         Assert.assertEquals(true, animator1.isAnimating());
         Assert.assertEquals(false, animator1.isPaused());
@@ -191,9 +187,9 @@ public class TestParenting01NEWT extends UITestCase {
         Assert.assertEquals(false, animator2.isPaused());
         Assert.assertNotNull(animator2.getThread());
         Thread.sleep(waitAbout10FramesAt30fps);
-        System.err.println("Frames for setVisible(true): A4: "+glWindow1.getTotalFrames()+", B4: "+glWindow2.getTotalFrames());
-        Assert.assertTrue(0 < glWindow1.getTotalFrames());
-        Assert.assertTrue(0 < glWindow2.getTotalFrames());
+        System.err.println("Frames for setVisible(true): A4: "+glWindow1.getTotalFPSFrames()+", B4: "+glWindow2.getTotalFPSFrames());
+        Assert.assertTrue(0 < glWindow1.getTotalFPSFrames());
+        Assert.assertTrue(0 < glWindow2.getTotalFPSFrames());
 
         animator1.stop();
         Assert.assertEquals(false, animator1.isAnimating());
@@ -215,10 +211,8 @@ public class TestParenting01NEWT extends UITestCase {
         glWindow2.destroy(); // can be recreated, refs are hold
         Assert.assertEquals(true,  glWindow1.isVisible());
         Assert.assertEquals(true,  glWindow1.isNativeValid());
-        Assert.assertEquals(true,  glWindow1.isValid());
         Assert.assertEquals(false, glWindow2.isVisible());
         Assert.assertEquals(false, glWindow2.isNativeValid());
-        Assert.assertEquals(true,  glWindow2.isValid());
 
         Assert.assertEquals(1,display.getReferenceCount());
         Assert.assertEquals(true,display.isNativeValid());
@@ -231,10 +225,8 @@ public class TestParenting01NEWT extends UITestCase {
         glWindow1.destroy(); // can be recreated, refs are hold
         Assert.assertEquals(false, glWindow1.isVisible());
         Assert.assertEquals(false, glWindow1.isNativeValid());
-        Assert.assertEquals(true,  glWindow1.isValid());
         Assert.assertEquals(false, glWindow2.isVisible());
         Assert.assertEquals(false, glWindow2.isNativeValid());
-        Assert.assertEquals(true,  glWindow2.isValid());
 
         Assert.assertEquals(0,display.getReferenceCount());
         Assert.assertEquals(false,display.isNativeValid());
@@ -245,19 +237,19 @@ public class TestParenting01NEWT extends UITestCase {
         Assert.assertEquals(0,Display.getActiveDisplayNumber());
 
         // recreation ..
-        glWindow1.resetCounter();
-        glWindow2.resetCounter();
-        Assert.assertEquals(0, glWindow1.getTotalFrames());
-        Assert.assertEquals(0, glWindow2.getTotalFrames());
+        glWindow1.resetFPSCounter();
+        glWindow2.resetFPSCounter();
+        Assert.assertEquals(0, glWindow1.getTotalFPSFrames());
+        Assert.assertEquals(0, glWindow2.getTotalFPSFrames());
         glWindow1.setVisible(true);
         Assert.assertEquals(true, glWindow1.isVisible());
         Assert.assertEquals(true, glWindow1.isNativeValid());
         Assert.assertEquals(true, glWindow2.isVisible());
         Assert.assertEquals(true, glWindow2.isNativeValid());
 
-        System.err.println("Frames for setVisible(true): A3: "+glWindow1.getTotalFrames()+", B3: "+glWindow2.getTotalFrames());
-        Assert.assertTrue(0 < glWindow1.getTotalFrames());
-        Assert.assertTrue(0 < glWindow2.getTotalFrames());
+        System.err.println("Frames for setVisible(true): A3: "+glWindow1.getTotalFPSFrames()+", B3: "+glWindow2.getTotalFPSFrames());
+        Assert.assertTrue(0 < glWindow1.getTotalFPSFrames());
+        Assert.assertTrue(0 < glWindow2.getTotalFPSFrames());
 
         Assert.assertEquals(1,display.getReferenceCount());
         Assert.assertEquals(true,display.isNativeValid());
@@ -269,9 +261,7 @@ public class TestParenting01NEWT extends UITestCase {
 
         // chain glwindow1 -> glwindow2 ; can be recreated ..
         glWindow1.destroy();
-        Assert.assertEquals(true, glWindow1.isValid());
         Assert.assertEquals(false, glWindow1.isNativeValid());
-        Assert.assertEquals(true, glWindow2.isValid());
         Assert.assertEquals(false, glWindow2.isNativeValid());
         Assert.assertEquals(0,display.getReferenceCount());
         Assert.assertEquals(false,display.isNativeValid());
@@ -281,13 +271,8 @@ public class TestParenting01NEWT extends UITestCase {
         Assert.assertEquals(false,screen.isNativeValid());
         Assert.assertEquals(0,Display.getActiveDisplayNumber());
 
-        glWindow1.invalidate();
-        Assert.assertEquals(false, glWindow1.isValid());
-        Assert.assertEquals(false, glWindow2.isValid());
-
         // test double destroy/invalidate ..
-        glWindow2.invalidate();
-        Assert.assertEquals(false, glWindow2.isValid());
+        glWindow2.destroy();
 
         Assert.assertEquals(0,display.getReferenceCount());
         Assert.assertEquals(false,display.isNativeValid());
@@ -312,19 +297,14 @@ public class TestParenting01NEWT extends UITestCase {
      * @param reparentRecreate true, if the followup reparent should utilize destroy/create, instead of native reparenting
      */
     protected void testWindowParenting02ReparentTop2WinImpl(boolean reparentRecreate) throws InterruptedException {
-        int x = 0;
-        int y = 0;
-
         Assert.assertEquals(0,Display.getActiveDisplayNumber());
         Display display1 = null;
         Screen screen1 = null;
 
-        NEWTEventFiFo eventFifo = new NEWTEventFiFo();
-
         GLWindow glWindow1 = GLWindow.create(glCaps);
         glWindow1.setTitle("testWindowParenting02ReparentTop2Win");
         glWindow1.setSize(640, 480);
-        GLEventListener demo1 = new RedSquare();
+        GLEventListener demo1 = new RedSquareES2();
         setDemoFields(demo1, glWindow1, false);
         glWindow1.addGLEventListener(demo1);
         screen1 = glWindow1.getScreen();
@@ -340,7 +320,7 @@ public class TestParenting01NEWT extends UITestCase {
 
         GLWindow glWindow2 = GLWindow.create(glCaps);
         glWindow2.setSize(320, 240);
-        GLEventListener demo2 = new Gears();
+        GLEventListener demo2 = new GearsES2();
         setDemoFields(demo2, glWindow2, false);
         glWindow2.addGLEventListener(demo2);
         Assert.assertSame(screen1, glWindow2.getScreen());
@@ -354,7 +334,7 @@ public class TestParenting01NEWT extends UITestCase {
         Assert.assertEquals(false,screen1.isNativeValid());
         Assert.assertEquals(0,Display.getActiveDisplayNumber());
 
-        Assert.assertEquals(0, glWindow1.getTotalFrames());
+        Assert.assertEquals(0, glWindow1.getTotalFPSFrames());
         glWindow1.setVisible(true);
         Assert.assertEquals(1,display1.getReferenceCount());
         Assert.assertEquals(true,display1.isNativeValid());
@@ -364,10 +344,10 @@ public class TestParenting01NEWT extends UITestCase {
         Assert.assertEquals(true,screen1.isNativeValid());
         Assert.assertEquals(1,Display.getActiveDisplayNumber());
         Assert.assertEquals(true, glWindow1.isVisible());
-        System.err.println("Frames for setVisible(true) A1: "+glWindow1.getTotalFrames());
-        Assert.assertTrue(0 < glWindow1.getTotalFrames());
+        System.err.println("Frames for setVisible(true) A1: "+glWindow1.getTotalFPSFrames());
+        Assert.assertTrue(0 < glWindow1.getTotalFPSFrames());
 
-        Assert.assertEquals(0, glWindow2.getTotalFrames());
+        Assert.assertEquals(0, glWindow2.getTotalFPSFrames());
         glWindow2.setVisible(true);
 
         Assert.assertEquals(1,display1.getReferenceCount());
@@ -378,31 +358,33 @@ public class TestParenting01NEWT extends UITestCase {
         Assert.assertEquals(true,screen1.isNativeValid());
         Assert.assertEquals(1,Display.getActiveDisplayNumber());
         Assert.assertEquals(true, glWindow2.isVisible());
-        System.err.println("Frames for setVisible(true) B1: "+glWindow2.getTotalFrames());
-        Assert.assertTrue(0 < glWindow1.getTotalFrames());
+        System.err.println("Frames for setVisible(true) B1: "+glWindow2.getTotalFPSFrames());
+        Assert.assertTrue(0 < glWindow1.getTotalFPSFrames());
 
         Animator animator1 = new Animator(glWindow1);
+        animator1.setUpdateFPSFrames(1, null);
         animator1.start();
         Animator animator2 = new Animator(glWindow2);
+        animator2.setUpdateFPSFrames(1, null);
         animator2.start();
 
         int state = 0;
         int reparentAction;
-        while(animator1.isAnimating() && animator1.getDuration()<3*durationPerTest) {
+        while(animator1.isAnimating() && animator1.getTotalFPSDuration()<3*durationPerTest) {
             Thread.sleep(durationPerTest);
             switch(state) {
                 case 0:
                     // glWindow2 -- child --> glWindow1: compatible
                     Assert.assertEquals(true, glWindow2.isVisible());
-                    System.err.println("Frames(1) "+glWindow2.getTotalFrames());
+                    System.err.println("Frames(1) "+glWindow2.getTotalFPSFrames());
                     reparentAction = glWindow2.reparentWindow(glWindow1, reparentRecreate);
-                    System.err.println("Frames(2) "+glWindow2.getTotalFrames());
+                    System.err.println("Frames(2) "+glWindow2.getTotalFPSFrames());
                     Assert.assertTrue(Window.ReparentAction.ACTION_INVALID < reparentAction);
                     Assert.assertEquals(true, glWindow2.isVisible());
                     Assert.assertEquals(true, glWindow2.isNativeValid());
                     Assert.assertSame(glWindow1,glWindow2.getParent());
-                    System.err.println("Frames for reparentWindow(parent, "+reparentRecreate+"): "+reparentAction+", B2: "+glWindow2.getTotalFrames());
-                    Assert.assertTrue(0 < glWindow2.getTotalFrames());
+                    System.err.println("Frames for reparentWindow(parent, "+reparentRecreate+"): "+reparentAction+", B2: "+glWindow2.getTotalFPSFrames());
+                    Assert.assertTrue(0 < glWindow2.getTotalFPSFrames());
 
                     Assert.assertEquals(1,display1.getReferenceCount());
                     Assert.assertEquals(true,display1.isNativeValid());
@@ -425,8 +407,8 @@ public class TestParenting01NEWT extends UITestCase {
                     Assert.assertEquals(true, glWindow2.isVisible());
                     Assert.assertEquals(true, glWindow2.isNativeValid());
                     Assert.assertNull(glWindow2.getParent());
-                    System.err.println("Frames for reparentWindow(parent, "+reparentRecreate+"): "+reparentAction+", B3: "+glWindow2.getTotalFrames());
-                    Assert.assertTrue(0 < glWindow2.getTotalFrames());
+                    System.err.println("Frames for reparentWindow(parent, "+reparentRecreate+"): "+reparentAction+", B3: "+glWindow2.getTotalFPSFrames());
+                    Assert.assertTrue(0 < glWindow2.getTotalFPSFrames());
 
                     Assert.assertEquals(1,display1.getReferenceCount());
                     Assert.assertEquals(true,display1.isNativeValid());
@@ -466,10 +448,8 @@ public class TestParenting01NEWT extends UITestCase {
 
         // destroy glWindow2
         glWindow2.destroy();
-        Assert.assertEquals(true,  glWindow1.isValid());
         Assert.assertEquals(true,  glWindow1.isNativeValid());
         Assert.assertEquals(true,  glWindow1.isVisible());
-        Assert.assertEquals(true,  glWindow2.isValid());
         Assert.assertEquals(false, glWindow2.isNativeValid());
         Assert.assertEquals(false, glWindow2.isVisible());
 
@@ -484,10 +464,8 @@ public class TestParenting01NEWT extends UITestCase {
 
         // destroy glWindow1
         glWindow1.destroy();
-        Assert.assertEquals(true,  glWindow1.isValid());
         Assert.assertEquals(false, glWindow1.isNativeValid());
         Assert.assertEquals(false, glWindow1.isVisible());
-        Assert.assertEquals(true,  glWindow2.isValid());
         Assert.assertEquals(false, glWindow2.isNativeValid());
         Assert.assertEquals(false, glWindow2.isVisible());
 
@@ -499,13 +477,6 @@ public class TestParenting01NEWT extends UITestCase {
         Assert.assertEquals(false,screen1.isNativeValid());
 
         Assert.assertEquals(0,Display.getActiveDisplayNumber());
-
-        glWindow1.invalidate();
-        Assert.assertEquals(false, glWindow1.isValid());
-        Assert.assertEquals(true,  glWindow2.isValid());
-
-        glWindow2.invalidate();
-        Assert.assertEquals(false, glWindow2.isValid());
     }
 
     @Test
@@ -519,11 +490,6 @@ public class TestParenting01NEWT extends UITestCase {
     }
 
     protected void testWindowParenting03ReparentWin2TopImpl(boolean reparentRecreate) throws InterruptedException {
-        int x = 0;
-        int y = 0;
-
-        NEWTEventFiFo eventFifo = new NEWTEventFiFo();
-
         Assert.assertEquals(0,Display.getActiveDisplayNumber());
         Display display1 = null;
         Screen screen1 = null;
@@ -535,7 +501,7 @@ public class TestParenting01NEWT extends UITestCase {
         display1 = screen1.getDisplay();
         glWindow1.setTitle("testWindowParenting03ReparentWin2Top");
         glWindow1.setSize(640, 480);
-        GLEventListener demo1 = new RedSquare();
+        GLEventListener demo1 = new RedSquareES2();
         setDemoFields(demo1, glWindow1, false);
         glWindow1.addGLEventListener(demo1);
 
@@ -551,7 +517,7 @@ public class TestParenting01NEWT extends UITestCase {
         screen2 = glWindow2.getScreen();
         display2 = screen2.getDisplay();
         glWindow2.setSize(320, 240);
-        GLEventListener demo2 = new Gears();
+        GLEventListener demo2 = new GearsES2();
         setDemoFields(demo2, glWindow2, false);
         glWindow2.addGLEventListener(demo2);
 
@@ -566,12 +532,12 @@ public class TestParenting01NEWT extends UITestCase {
         Assert.assertSame(screen1,glWindow2.getScreen());
         Assert.assertSame(display1,glWindow2.getScreen().getDisplay());
 
-        Assert.assertEquals(0, glWindow1.getTotalFrames());
-        Assert.assertEquals(0, glWindow2.getTotalFrames());
+        Assert.assertEquals(0, glWindow1.getTotalFPSFrames());
+        Assert.assertEquals(0, glWindow2.getTotalFPSFrames());
         glWindow1.setVisible(true);
-        System.err.println("Frames for setVisible(): A1: "+glWindow1.getTotalFrames()+", B1: "+glWindow2.getTotalFrames());
-        Assert.assertTrue(0 < glWindow2.getTotalFrames());
-        Assert.assertTrue(0 < glWindow1.getTotalFrames());
+        System.err.println("Frames for setVisible(): A1: "+glWindow1.getTotalFPSFrames()+", B1: "+glWindow2.getTotalFPSFrames());
+        Assert.assertTrue(0 < glWindow2.getTotalFPSFrames());
+        Assert.assertTrue(0 < glWindow1.getTotalFPSFrames());
 
         Assert.assertEquals(1,display1.getReferenceCount());
         Assert.assertEquals(true,display1.isNativeValid());
@@ -584,13 +550,15 @@ public class TestParenting01NEWT extends UITestCase {
         Assert.assertEquals(1,Display.getActiveDisplayNumber());
 
         Animator animator1 = new Animator(glWindow1);
+        animator1.setUpdateFPSFrames(1, null);
         animator1.start();
         Animator animator2 = new Animator(glWindow2);
+        animator2.setUpdateFPSFrames(1, null);
         animator2.start();
 
         int state = 0;
         int reparentAction;
-        while(animator1.isAnimating() && animator1.getDuration()<3*durationPerTest) {
+        while(animator1.isAnimating() && animator1.getTotalFPSDuration()<3*durationPerTest) {
             Thread.sleep(durationPerTest);
             switch(state) {
                 case 0:
@@ -599,8 +567,8 @@ public class TestParenting01NEWT extends UITestCase {
                     Assert.assertTrue(Window.ReparentAction.ACTION_INVALID < reparentAction);
                     Assert.assertEquals(true, glWindow2.isVisible());
                     Assert.assertEquals(true, glWindow2.isNativeValid());
-                    System.err.println("Frames for reparentWindow(parent, "+reparentRecreate+"): "+reparentAction+", B2: "+glWindow2.getTotalFrames());
-                    Assert.assertTrue(0 < glWindow2.getTotalFrames());
+                    System.err.println("Frames for reparentWindow(parent, "+reparentRecreate+"): "+reparentAction+", B2: "+glWindow2.getTotalFPSFrames());
+                    Assert.assertTrue(0 < glWindow2.getTotalFPSFrames());
                     Assert.assertNull(glWindow2.getParent());
                     Assert.assertSame(screen1,glWindow2.getScreen());
                     Assert.assertSame(display1,glWindow2.getScreen().getDisplay());
@@ -612,8 +580,8 @@ public class TestParenting01NEWT extends UITestCase {
                     Assert.assertTrue(Window.ReparentAction.ACTION_INVALID < reparentAction);
                     Assert.assertEquals(true, glWindow2.isVisible());
                     Assert.assertEquals(true, glWindow2.isNativeValid());
-                    System.err.println("Frames for reparentWindow(parent, "+reparentRecreate+"): "+reparentAction+", B3 "+glWindow2.getTotalFrames());
-                    Assert.assertTrue(0 < glWindow2.getTotalFrames());
+                    System.err.println("Frames for reparentWindow(parent, "+reparentRecreate+"): "+reparentAction+", B3 "+glWindow2.getTotalFPSFrames());
+                    Assert.assertTrue(0 < glWindow2.getTotalFPSFrames());
                     Assert.assertSame(glWindow1,glWindow2.getParent());
                     Assert.assertSame(screen1,glWindow2.getScreen());
                     Assert.assertSame(display1,glWindow2.getScreen().getDisplay());
@@ -647,10 +615,8 @@ public class TestParenting01NEWT extends UITestCase {
         Assert.assertEquals(1,Display.getActiveDisplayNumber());
 
         glWindow1.destroy(); // should destroy both windows, actually, since glWindow2 is a child
-        Assert.assertEquals(true,  glWindow1.isValid());
         Assert.assertEquals(false, glWindow1.isNativeValid());
         Assert.assertEquals(false, glWindow1.isVisible());
-        Assert.assertEquals(true,  glWindow2.isValid());
         Assert.assertEquals(false, glWindow2.isNativeValid());
         Assert.assertEquals(false, glWindow2.isVisible());
 
@@ -674,9 +640,9 @@ public class TestParenting01NEWT extends UITestCase {
         Assert.assertEquals(false, glWindow1.isNativeValid());
         Assert.assertEquals(false, glWindow2.isNativeValid());
 
-        glWindow1.invalidate(); // parent -> child
-        Assert.assertEquals(false, glWindow1.isValid());
-        Assert.assertEquals(false, glWindow2.isValid());
+        glWindow1.destroy(); // parent -> child
+        Assert.assertEquals(false, glWindow1.isNativeValid());
+        Assert.assertEquals(false, glWindow2.isNativeValid());
 
         Assert.assertEquals(0,Display.getActiveDisplayNumber());
     }
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01aAWT.java b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01aAWT.java
index 424fff0..2da3188 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01aAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01aAWT.java
@@ -28,39 +28,25 @@
 
 package com.jogamp.opengl.test.junit.newt.parenting;
 
-import java.lang.reflect.*;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
 import org.junit.Assert;
-import org.junit.Before;
 import org.junit.BeforeClass;
-import org.junit.After;
-import org.junit.AfterClass;
 import org.junit.Test;
 
 import java.awt.Button;
 import java.awt.BorderLayout;
-import java.awt.Canvas;
 import java.awt.Container;
 import java.awt.Frame;
-import java.awt.Dimension;
 
 import javax.media.opengl.*;
-import javax.media.nativewindow.*;
 
 import com.jogamp.opengl.util.Animator;
-import com.jogamp.newt.*;
-import com.jogamp.newt.event.*;
 import com.jogamp.newt.opengl.*;
 import com.jogamp.newt.awt.NewtCanvasAWT;
 
 import java.io.IOException;
 
 import com.jogamp.opengl.test.junit.util.*;
-import com.jogamp.opengl.test.junit.jogl.demos.es1.RedSquare;
-import com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.Gears;
+import com.jogamp.opengl.test.junit.jogl.demos.es2.RedSquareES2;
 
 public class TestParenting01aAWT extends UITestCase {
     static int width, height;
@@ -70,7 +56,6 @@ public class TestParenting01aAWT extends UITestCase {
 
     @BeforeClass
     public static void initClass() throws InterruptedException {
-        GLProfile.initSingleton(true);
         width  = 640;
         height = 480;
         glCaps = new GLCapabilities(null);
@@ -79,18 +64,13 @@ public class TestParenting01aAWT extends UITestCase {
 
     @Test
     public void testWindowParenting01CreateVisibleDestroy1() throws InterruptedException {
-        int x = 0;
-        int y = 0;
-
-        NEWTEventFiFo eventFifo = new NEWTEventFiFo();
-
         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 RedSquare();
+        GLEventListener demo1 = new RedSquareES2();
         setDemoFields(demo1, glWindow1, false);
         glWindow1.addGLEventListener(demo1);
 
@@ -123,43 +103,39 @@ public class TestParenting01aAWT extends UITestCase {
         Assert.assertEquals(newtCanvasAWT.getNativeWindow(),glWindow1.getParent());
 
         Animator animator1 = new Animator(glWindow1);
+        animator1.setUpdateFPSFrames(1, null);        
         animator1.start();
-        while(animator1.isAnimating() && animator1.getDuration()<durationPerTest) {
+        while(animator1.isAnimating() && animator1.getTotalFPSDuration()<durationPerTest) {
             Thread.sleep(100);
         }
         animator1.stop();
         Assert.assertEquals(false, animator1.isAnimating());
 
         frame1.setVisible(false);
-        Assert.assertEquals(true, glWindow1.isValid());
+        Assert.assertEquals(true, glWindow1.isNativeValid());
 
         frame1.setVisible(true);
-        Assert.assertEquals(true, glWindow1.isValid());
+        Assert.assertEquals(true, glWindow1.isNativeValid());
 
         frame1.remove(newtCanvasAWT);
         // Assert.assertNull(glWindow1.getParent());
-        Assert.assertEquals(true, glWindow1.isValid());
+        Assert.assertEquals(true, glWindow1.isNativeValid());
 
         frame1.dispose();
-        Assert.assertEquals(true, glWindow1.isValid());
+        Assert.assertEquals(true, glWindow1.isNativeValid());
 
-        glWindow1.invalidate();
-        //Assert.assertEquals(false, glWindow1.isValid());
+        glWindow1.destroy();
+        Assert.assertEquals(false, glWindow1.isNativeValid());
     }
 
     @Test
     public void testWindowParenting02CreateVisibleDestroy2Defered() throws InterruptedException {
-        int x = 0;
-        int y = 0;
-
-        NEWTEventFiFo eventFifo = new NEWTEventFiFo();
-
         GLWindow glWindow1 = GLWindow.create(glCaps);
         Assert.assertNotNull(glWindow1);
         Assert.assertEquals(false, glWindow1.isVisible());
         Assert.assertEquals(false, glWindow1.isNativeValid());
         Assert.assertNull(glWindow1.getParent());
-        GLEventListener demo1 = new RedSquare();
+        GLEventListener demo1 = new RedSquareES2();
         setDemoFields(demo1, glWindow1, false);
         glWindow1.addGLEventListener(demo1);
 
@@ -180,26 +156,22 @@ public class TestParenting01aAWT extends UITestCase {
         Assert.assertEquals(newtCanvasAWT.getNativeWindow(),glWindow1.getParent());
 
         Animator animator1 = new Animator(glWindow1);
+        animator1.setUpdateFPSFrames(1, null);
         animator1.start();
-        while(animator1.isAnimating() && animator1.getDuration()<durationPerTest) {
+        while(animator1.isAnimating() && animator1.getTotalFPSDuration()<durationPerTest) {
             Thread.sleep(100);
         }
         animator1.stop();
         Assert.assertEquals(false, animator1.isAnimating());
 
         frame.dispose();
-        glWindow1.invalidate();
+        glWindow1.destroy();
     }
 
     @Test
     public void testWindowParenting02CreateVisibleDestroy3Odd() throws InterruptedException {
-        int x = 0;
-        int y = 0;
-
-        NEWTEventFiFo eventFifo = new NEWTEventFiFo();
-
         GLWindow glWindow1 = GLWindow.create(glCaps);
-        GLEventListener demo1 = new RedSquare();
+        GLEventListener demo1 = new RedSquareES2();
         setDemoFields(demo1, glWindow1, false);
         glWindow1.addGLEventListener(demo1);
 
@@ -215,28 +187,24 @@ public class TestParenting01aAWT extends UITestCase {
         frame.add(newtCanvasAWT);
 
         Animator animator1 = new Animator(glWindow1);
+        animator1.setUpdateFPSFrames(1, null);
         animator1.start();
         Assert.assertEquals(true, animator1.isStarted());
         Assert.assertEquals(true, animator1.isAnimating());
-        while(animator1.isAnimating() && animator1.getDuration()<durationPerTest) {
+        while(animator1.isAnimating() && animator1.getTotalFPSDuration()<durationPerTest) {
             Thread.sleep(100);
         }
 
         Assert.assertEquals(true, animator1.isAnimating()); // !!!
 
         frame.dispose();
-        glWindow1.invalidate();
+        glWindow1.destroy();
     }
 
     @Test
     public void testWindowParenting03ReparentNewtWin2Top() throws InterruptedException {
-        int x = 0;
-        int y = 0;
-
-        NEWTEventFiFo eventFifo = new NEWTEventFiFo();
-
         GLWindow glWindow1 = GLWindow.create(glCaps);
-        GLEventListener demo1 = new RedSquare();
+        GLEventListener demo1 = new RedSquareES2();
         setDemoFields(demo1, glWindow1, false);
         glWindow1.addGLEventListener(demo1);
 
@@ -251,10 +219,11 @@ public class TestParenting01aAWT extends UITestCase {
         Assert.assertEquals(newtCanvasAWT.getNativeWindow(),glWindow1.getParent());
 
         Animator animator1 = new Animator(glWindow1);
+        animator1.setUpdateFPSFrames(1, null);        
         animator1.start();
 
         int state = 0;
-        while(animator1.isAnimating() && animator1.getDuration()<3*durationPerTest) {
+        while(animator1.isAnimating() && animator1.getTotalFPSDuration()<3*durationPerTest) {
             Thread.sleep(durationPerTest);
             switch(state) {
                 case 0:
@@ -275,18 +244,13 @@ public class TestParenting01aAWT extends UITestCase {
         Assert.assertEquals(false, animator1.isAnimating());
 
         frame.dispose();
-        glWindow1.invalidate();
+        glWindow1.destroy();
     }
 
     @Test
     public void testWindowParenting04ReparentNewtWin2TopLayouted() throws InterruptedException {
-        int x = 0;
-        int y = 0;
-
-        NEWTEventFiFo eventFifo = new NEWTEventFiFo();
-
         GLWindow glWindow1 = GLWindow.create(glCaps);
-        GLEventListener demo1 = new RedSquare();
+        GLEventListener demo1 = new RedSquareES2();
         setDemoFields(demo1, glWindow1, false);
         glWindow1.addGLEventListener(demo1);
 
@@ -306,10 +270,11 @@ public class TestParenting01aAWT extends UITestCase {
         Assert.assertEquals(newtCanvasAWT.getNativeWindow(),glWindow1.getParent());
 
         Animator animator1 = new Animator(glWindow1);
+        animator1.setUpdateFPSFrames(1, null);        
         animator1.start();
 
         int state = 0;
-        while(animator1.isAnimating() && animator1.getDuration()<3*durationPerTest) {
+        while(animator1.isAnimating() && animator1.getTotalFPSDuration()<3*durationPerTest) {
             Thread.sleep(durationPerTest);
             switch(state) {
                 case 0:
@@ -330,19 +295,14 @@ public class TestParenting01aAWT extends UITestCase {
         Assert.assertEquals(false, animator1.isAnimating());
 
         frame.dispose();
-        glWindow1.invalidate();
+        glWindow1.destroy();
     }
 
     @Test
     public void testWindowParenting05ReparentAWTWinHopFrame2Frame() throws InterruptedException {
-        int x = 0;
-        int y = 0;
-
-        NEWTEventFiFo eventFifo = new NEWTEventFiFo();
-
         GLWindow glWindow1 = GLWindow.create(glCaps);
         glWindow1.setUndecorated(true);
-        GLEventListener demo1 = new RedSquare();
+        GLEventListener demo1 = new RedSquareES2();
         setDemoFields(demo1, glWindow1, false);
         glWindow1.addGLEventListener(demo1);
 
@@ -372,10 +332,11 @@ public class TestParenting01aAWT extends UITestCase {
         Assert.assertEquals(newtCanvasAWT.getNativeWindow(),glWindow1.getParent());
 
         Animator animator1 = new Animator(glWindow1);
+        animator1.setUpdateFPSFrames(1, null);        
         animator1.start();
 
         int state = 0;
-        while(animator1.isAnimating() && animator1.getDuration()<3*durationPerTest) {
+        while(animator1.isAnimating() && animator1.getTotalFPSDuration()<3*durationPerTest) {
             Thread.sleep(durationPerTest);
             switch(state) {
                 case 0:
@@ -395,7 +356,7 @@ public class TestParenting01aAWT extends UITestCase {
 
         frame1.dispose();
         frame2.dispose();
-        glWindow1.invalidate();
+        glWindow1.destroy();
     }
 
     public static void setDemoFields(GLEventListener demo, GLWindow glWindow, boolean debug) {
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01bAWT.java b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01bAWT.java
index 2b8d344..fb93ad9 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01bAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01bAWT.java
@@ -28,39 +28,27 @@
  
 package com.jogamp.opengl.test.junit.newt.parenting;
 
-import java.lang.reflect.*;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
 import org.junit.Assert;
-import org.junit.Before;
 import org.junit.BeforeClass;
-import org.junit.After;
-import org.junit.AfterClass;
 import org.junit.Test;
 
 import java.awt.Button;
 import java.awt.BorderLayout;
-import java.awt.Canvas;
 import java.awt.Frame;
-import java.awt.Dimension;
 
 import javax.media.opengl.*;
-import javax.media.nativewindow.*;
+import javax.swing.SwingUtilities;
 
 import com.jogamp.opengl.util.Animator;
 import com.jogamp.opengl.util.FPSAnimator;
 import com.jogamp.newt.*;
-import com.jogamp.newt.event.*;
 import com.jogamp.newt.opengl.*;
 import com.jogamp.newt.awt.NewtCanvasAWT;
 
 import java.io.IOException;
 
 import com.jogamp.opengl.test.junit.util.*;
-import com.jogamp.opengl.test.junit.jogl.demos.es1.RedSquare;
-import com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.Gears;
+import com.jogamp.opengl.test.junit.jogl.demos.es2.RedSquareES2;
 
 public class TestParenting01bAWT extends UITestCase {
     static int width, height;
@@ -70,7 +58,6 @@ public class TestParenting01bAWT extends UITestCase {
 
     @BeforeClass
     public static void initClass() {
-        GLProfile.initSingleton(true);
         width  = 640;
         height = 480;
         glCaps = new GLCapabilities(null);
@@ -87,20 +74,15 @@ public class TestParenting01bAWT extends UITestCase {
     }
 
     public void testWindowParenting05ReparentAWTWinHopFrame2FrameImpl(int fps) throws InterruptedException {
-        int x = 0;
-        int y = 0;
-
-        NEWTEventFiFo eventFifo = new NEWTEventFiFo();
-
         GLWindow glWindow1 = GLWindow.create(glCaps);
         glWindow1.setUndecorated(true);
-        GLEventListener demo1 = new RedSquare();
+        GLEventListener demo1 = new RedSquareES2();
         setDemoFields(demo1, glWindow1, false);
         glWindow1.addGLEventListener(demo1);
 
-        NewtCanvasAWT newtCanvasAWT = new NewtCanvasAWT(glWindow1);
+        final NewtCanvasAWT newtCanvasAWT = new NewtCanvasAWT(glWindow1);
 
-        Frame frame1 = new Frame("AWT Parent Frame");
+        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);
@@ -110,7 +92,7 @@ public class TestParenting01bAWT extends UITestCase {
         frame1.setLocation(0, 0);
         frame1.setVisible(true);
 
-        Frame frame2 = new Frame("AWT Parent Frame");
+        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);
@@ -136,12 +118,24 @@ public class TestParenting01bAWT extends UITestCase {
             Thread.sleep(durationPerTest);
             switch(state) {
                 case 0:
-                    frame1.remove(newtCanvasAWT);
-                    frame2.add(newtCanvasAWT, BorderLayout.CENTER);
+                    SwingUtilities.invokeLater(new Runnable() {
+                        public void run() {
+                            frame1.remove(newtCanvasAWT);
+                            frame2.add(newtCanvasAWT, BorderLayout.CENTER);
+                            frame1.validate();
+                            frame2.validate();
+                        }
+                    });                    
                     break;
                 case 1:
-                    frame2.remove(newtCanvasAWT);
-                    frame1.add(newtCanvasAWT, BorderLayout.CENTER);
+                    SwingUtilities.invokeLater(new Runnable() {
+                        public void run() {
+                            frame2.remove(newtCanvasAWT);
+                            frame1.add(newtCanvasAWT, BorderLayout.CENTER);
+                            frame2.validate();
+                            frame1.validate();
+                        }
+                    });                    
                     break;
             }
         }
@@ -156,7 +150,7 @@ public class TestParenting01bAWT extends UITestCase {
 
         frame1.dispose();
         frame2.dispose();
-        glWindow1.invalidate();
+        glWindow1.destroy();
     }
 
     public static void setDemoFields(GLEventListener demo, GLWindow glWindow, boolean debug) {
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01cAWT.java b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01cAWT.java
index 7321c6b..4477c3f 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01cAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01cAWT.java
@@ -28,38 +28,25 @@
  
 package com.jogamp.opengl.test.junit.newt.parenting;
 
-import java.lang.reflect.*;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
 import org.junit.Assert;
-import org.junit.Before;
 import org.junit.BeforeClass;
-import org.junit.After;
-import org.junit.AfterClass;
 import org.junit.Test;
 
 import java.awt.Button;
 import java.awt.BorderLayout;
-import java.awt.Canvas;
 import java.awt.Container;
 import java.awt.Frame;
-import java.awt.Dimension;
 
 import javax.media.opengl.*;
-import javax.media.nativewindow.*;
 
 import com.jogamp.newt.*;
-import com.jogamp.newt.event.*;
 import com.jogamp.newt.opengl.*;
 import com.jogamp.newt.awt.NewtCanvasAWT;
 
 import java.io.IOException;
 
 import com.jogamp.opengl.test.junit.util.*;
-import com.jogamp.opengl.test.junit.jogl.demos.es1.RedSquare;
-import com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.Gears;
+import com.jogamp.opengl.test.junit.jogl.demos.es2.RedSquareES2;
 
 public class TestParenting01cAWT extends UITestCase {
     static int width, height;
@@ -68,7 +55,6 @@ public class TestParenting01cAWT extends UITestCase {
 
     @BeforeClass
     public static void initClass() {
-        GLProfile.initSingleton(true);
         width  = 640;
         height = 480;
         glCaps = new GLCapabilities(null);
@@ -76,19 +62,15 @@ public class TestParenting01cAWT extends UITestCase {
 
     @Test
     public void testWindowParenting01CreateVisibleDestroy1() throws InterruptedException {
-        int x = 0;
-        int y = 0;
         int i;
 
-        NEWTEventFiFo eventFifo = new NEWTEventFiFo();
-
         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 RedSquare();
+        GLEventListener demo1 = new RedSquareES2();
         setDemoFields(demo1, glWindow1, false);
         glWindow1.addGLEventListener(demo1);
 
@@ -125,32 +107,27 @@ public class TestParenting01cAWT extends UITestCase {
         }
 
         frame1.setVisible(false);
-        Assert.assertEquals(true, glWindow1.isValid());
+        Assert.assertEquals(true, glWindow1.isNativeValid());
 
         frame1.setVisible(true);
-        Assert.assertEquals(true, glWindow1.isValid());
+        Assert.assertEquals(true, glWindow1.isNativeValid());
 
         frame1.remove(newtCanvasAWT);
         // Assert.assertNull(glWindow1.getParent());
-        Assert.assertEquals(true, glWindow1.isValid());
+        Assert.assertEquals(true, glWindow1.isNativeValid());
 
         frame1.dispose();
-        Assert.assertEquals(true, glWindow1.isValid());
+        Assert.assertEquals(true, glWindow1.isNativeValid());
 
-        glWindow1.invalidate();
-        //Assert.assertEquals(false, glWindow1.isValid());
+        glWindow1.destroy();
+        Assert.assertEquals(false, glWindow1.isNativeValid());
     }
 
     @Test
     public void testWindowParenting05ReparentAWTWinHopFrame2Frame() throws InterruptedException {
-        int x = 0;
-        int y = 0;
-
-        NEWTEventFiFo eventFifo = new NEWTEventFiFo();
-
         GLWindow glWindow1 = GLWindow.create(glCaps);
         glWindow1.setUndecorated(true);
-        GLEventListener demo1 = new RedSquare();
+        GLEventListener demo1 = new RedSquareES2();
         setDemoFields(demo1, glWindow1, false);
         glWindow1.addGLEventListener(demo1);
 
@@ -196,7 +173,7 @@ public class TestParenting01cAWT extends UITestCase {
 
         frame1.dispose();
         frame2.dispose();
-        glWindow1.invalidate();
+        glWindow1.destroy();
     }
 
     public static void setDemoFields(GLEventListener demo, GLWindow glWindow, boolean debug) {
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 1c155f7..478e000 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
@@ -45,14 +45,13 @@ import javax.media.opengl.*;
 
 import com.jogamp.opengl.util.Animator;
 import com.jogamp.newt.*;
-import com.jogamp.newt.event.*;
 import com.jogamp.newt.opengl.*;
 import com.jogamp.newt.awt.NewtCanvasAWT;
 
 import java.io.IOException;
 
 import com.jogamp.opengl.test.junit.util.*;
-import com.jogamp.opengl.test.junit.jogl.demos.es1.RedSquare;
+import com.jogamp.opengl.test.junit.jogl.demos.es2.RedSquareES2;
 
 public class TestParenting01cSwingAWT extends UITestCase {
     static int width, height;
@@ -62,7 +61,6 @@ public class TestParenting01cSwingAWT extends UITestCase {
 
     @BeforeClass
     public static void initClass() {
-        GLProfile.initSingleton(true);
         width  = 640;
         height = 480;
         glCaps = new GLCapabilities(null);
@@ -70,11 +68,6 @@ public class TestParenting01cSwingAWT extends UITestCase {
 
     @Test
     public void testWindowParenting01CreateVisibleDestroy1() throws InterruptedException, InvocationTargetException {
-        int x = 0;
-        int y = 0;
-
-        NEWTEventFiFo eventFifo = new NEWTEventFiFo();
-
         /**
          * JFrame . JPanel . Container . NewtCanvasAWT . GLWindow
          */
@@ -84,11 +77,13 @@ public class TestParenting01cSwingAWT extends UITestCase {
         Assert.assertEquals(false, glWindow1.isNativeValid());
         Assert.assertNull(glWindow1.getParent());
         glWindow1.setTitle("testWindowParenting01CreateVisibleDestroy");
-        GLEventListener demo1 = new RedSquare();
+        GLEventListener demo1 = new RedSquareES2();
         setDemoFields(demo1, glWindow1, false);
         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() {
@@ -98,7 +93,7 @@ public class TestParenting01cSwingAWT extends UITestCase {
                 {
                    try {
                        _glWindow1.invoke(true, _glRunnable);
-                       Thread.yield();
+                       Thread.sleep(100);
                    } catch (Throwable t) {}
                }
             }
@@ -106,13 +101,13 @@ public class TestParenting01cSwingAWT extends UITestCase {
         disturbanceThread.start();
 
 
-        NewtCanvasAWT newtCanvasAWT = new NewtCanvasAWT(glWindow1);
+        final NewtCanvasAWT newtCanvasAWT = new NewtCanvasAWT(glWindow1);
         Assert.assertNotNull(newtCanvasAWT);
         Assert.assertEquals(false, glWindow1.isVisible());
         Assert.assertEquals(false, glWindow1.isNativeValid());
         Assert.assertNull(glWindow1.getParent());
 
-        Container container1 = new Container();
+        final Container container1 = new Container();
         container1.setLayout(new BorderLayout());
         container1.add(new Button("north"), BorderLayout.NORTH);
         container1.add(new Button("south"), BorderLayout.SOUTH);
@@ -120,7 +115,7 @@ public class TestParenting01cSwingAWT extends UITestCase {
         container1.add(new Button("west"), BorderLayout.WEST);
         container1.add(newtCanvasAWT, BorderLayout.CENTER);
 
-        JPanel jPanel1 = new JPanel();
+        final JPanel jPanel1 = new JPanel();
         jPanel1.setLayout(new BorderLayout());
         jPanel1.add(new Button("north"), BorderLayout.NORTH);
         jPanel1.add(new Button("south"), BorderLayout.SOUTH);
@@ -128,7 +123,7 @@ public class TestParenting01cSwingAWT extends UITestCase {
         jPanel1.add(new Button("west"), BorderLayout.WEST);
         jPanel1.add(container1, BorderLayout.CENTER);
 
-        JFrame jFrame1 = new JFrame("Swing Parent JFrame");
+        final JFrame jFrame1 = new JFrame("Swing Parent JFrame");
         // jFrame1.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         jFrame1.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); // equivalent to Frame, use windowClosing event!
         jFrame1.setContentPane(jPanel1);
@@ -136,14 +131,10 @@ public class TestParenting01cSwingAWT extends UITestCase {
         System.out.println("Demos: 1 - Visible");
         jFrame1.setVisible(true); // from here on, we need to run modifications on EDT
 
-        final JFrame _jFrame1 = jFrame1;
-        final JPanel _jPanel1 = jPanel1;
-        final Container _container1 = container1;
-
         // visible test
         Assert.assertEquals(newtCanvasAWT.getNativeWindow(),glWindow1.getParent());
 
-        while(animator1.isAnimating() && animator1.getDuration()<durationPerTest) {
+        while(animator1.isAnimating() && animator1.getTotalFPSDuration()<durationPerTest) {
             Thread.sleep(100);
         }
         System.out.println("Demos: 2 - StopAnimator");
@@ -152,43 +143,39 @@ public class TestParenting01cSwingAWT extends UITestCase {
 
         SwingUtilities.invokeAndWait(new Runnable() {
                 public void run() {
-		    System.out.println("Demos: 3 - !Visible");
-                    _jFrame1.setVisible(false);
+            System.out.println("Demos: 3 - !Visible");
+                    jFrame1.setVisible(false);
                 } });
-        Assert.assertEquals(true, glWindow1.isValid());
+        Assert.assertEquals(true, glWindow1.isNativeValid());
 
         SwingUtilities.invokeAndWait(new Runnable() {
                 public void run() {
-		    System.out.println("Demos: 4 - Visible");
-                    _jFrame1.setVisible(true);
+            System.out.println("Demos: 4 - Visible");
+                    jFrame1.setVisible(true);
                 } });
-        Assert.assertEquals(true, glWindow1.isValid());
+        Assert.assertEquals(true, glWindow1.isNativeValid());
 
         SwingUtilities.invokeAndWait(new Runnable() {
                 public void run() {
-		    System.out.println("Demos: 5 - X Container");
-                    _jPanel1.remove(_container1);
+            System.out.println("Demos: 5 - X Container");
+                    jPanel1.remove(container1);
+                    jFrame1.validate();
                 } });
         // Assert.assertNull(glWindow1.getParent());
-        Assert.assertEquals(true, glWindow1.isValid());
+        Assert.assertEquals(true, glWindow1.isNativeValid());
 
         SwingUtilities.invokeAndWait(new Runnable() {
                 public void run() {
-                    _jFrame1.dispose();
+                    jFrame1.dispose();
                 } });
-        Assert.assertEquals(true, glWindow1.isValid());
+        Assert.assertEquals(true, glWindow1.isNativeValid());
 
-        glWindow1.invalidate();
-        //Assert.assertEquals(false, glWindow1.isValid());
+        glWindow1.destroy();
+        Assert.assertEquals(false, glWindow1.isNativeValid());
     }
 
     @Test
     public void testWindowParenting05ReparentAWTWinHopFrame2Frame() throws InterruptedException, InvocationTargetException {
-        int x = 0;
-        int y = 0;
-
-        NEWTEventFiFo eventFifo = new NEWTEventFiFo();
-
         /**
          * JFrame . JPanel . Container . NewtCanvasAWT . GLWindow
          */
@@ -198,11 +185,13 @@ public class TestParenting01cSwingAWT extends UITestCase {
         Assert.assertEquals(false, glWindow1.isNativeValid());
         Assert.assertNull(glWindow1.getParent());
         glWindow1.setTitle("testWindowParenting01CreateVisibleDestroy");
-        GLEventListener demo1 = new RedSquare();
+        GLEventListener demo1 = new RedSquareES2();
         setDemoFields(demo1, glWindow1, false);
         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() {
@@ -212,20 +201,20 @@ public class TestParenting01cSwingAWT extends UITestCase {
                 {
                    try {
                        _glWindow1.invoke(true, _glRunnable);
-                       Thread.yield();
+                       Thread.sleep(100);
                    } catch (Throwable t) {}
                }
             }
         });
         disturbanceThread.start();
 
-        NewtCanvasAWT newtCanvasAWT = new NewtCanvasAWT(glWindow1);
+        final NewtCanvasAWT newtCanvasAWT = new NewtCanvasAWT(glWindow1);
         Assert.assertNotNull(newtCanvasAWT);
         Assert.assertEquals(false, glWindow1.isVisible());
         Assert.assertEquals(false, glWindow1.isNativeValid());
         Assert.assertNull(glWindow1.getParent());
 
-        Container container1 = new Container();
+        final Container container1 = new Container();
         container1.setLayout(new BorderLayout());
         container1.add(new Button("north"), BorderLayout.NORTH);
         container1.add(new Button("south"), BorderLayout.SOUTH);
@@ -233,7 +222,7 @@ public class TestParenting01cSwingAWT extends UITestCase {
         container1.add(new Button("west"), BorderLayout.WEST);
         container1.add(newtCanvasAWT, BorderLayout.CENTER);
 
-        JPanel jPanel1 = new JPanel();
+        final JPanel jPanel1 = new JPanel();
         jPanel1.setLayout(new BorderLayout());
         jPanel1.add(new Button("north"), BorderLayout.NORTH);
         jPanel1.add(new Button("south"), BorderLayout.SOUTH);
@@ -241,7 +230,7 @@ public class TestParenting01cSwingAWT extends UITestCase {
         jPanel1.add(new Button("west"), BorderLayout.WEST);
         jPanel1.add(container1, BorderLayout.CENTER);
 
-        JFrame jFrame1 = new JFrame("Swing Parent JFrame");
+        final JFrame jFrame1 = new JFrame("Swing Parent JFrame");
         // jFrame1.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         jFrame1.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); // equivalent to Frame, use windowClosing event!
         jFrame1.setContentPane(jPanel1);
@@ -249,14 +238,14 @@ public class TestParenting01cSwingAWT extends UITestCase {
         jFrame1.setSize(width, height);
         jFrame1.setVisible(true); // from here on, we need to run modifications on EDT
 
-        JPanel jPanel2 = new JPanel();
+        final JPanel jPanel2 = new JPanel();
         jPanel2.setLayout(new BorderLayout());
         jPanel2.add(new Button("north"), BorderLayout.NORTH);
         jPanel2.add(new Button("south"), BorderLayout.SOUTH);
         jPanel2.add(new Button("east"), BorderLayout.EAST);
         jPanel2.add(new Button("west"), BorderLayout.WEST);
 
-        JFrame jFrame2 = new JFrame("Swing Parent JFrame");
+        final JFrame jFrame2 = new JFrame("Swing Parent JFrame");
         // jFrame2.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         jFrame2.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); // equivalent to Frame, use windowClosing event!
         jFrame2.setContentPane(jPanel2);
@@ -264,32 +253,29 @@ public class TestParenting01cSwingAWT extends UITestCase {
         jFrame2.setSize(width, height);
         jFrame2.setVisible(true); // from here on, we need to run modifications on EDT
 
-        final NewtCanvasAWT _newtCanvasAWT = newtCanvasAWT;
-        final JFrame _jFrame1 = jFrame1;
-        final JPanel _jPanel1 = jPanel1;
-        final Container _container1 = container1;
-        final JFrame _jFrame2 = jFrame2;
-        final JPanel _jPanel2 = jPanel2;
-
         // visible test
         Assert.assertEquals(newtCanvasAWT.getNativeWindow(),glWindow1.getParent());
 
         int state = 0;
-        while(animator1.isAnimating() && animator1.getDuration()<3*durationPerTest) {
+        while(animator1.isAnimating() && animator1.getTotalFPSDuration()<3*durationPerTest) {
             Thread.sleep(durationPerTest);
             switch(state) {
                 case 0:
                     SwingUtilities.invokeAndWait(new Runnable() {
                             public void run() {
-                                _container1.remove(_newtCanvasAWT);
-                                _jPanel2.add(_newtCanvasAWT, BorderLayout.CENTER);
+                                container1.remove(newtCanvasAWT);
+                                jPanel2.add(newtCanvasAWT, BorderLayout.CENTER);
+                                jFrame1.validate();
+                                jFrame2.validate();
                             } });
                     break;
                 case 1:
                     SwingUtilities.invokeAndWait(new Runnable() {
                             public void run() {
-                                _jPanel2.remove(_newtCanvasAWT);
-                                _container1.add(_newtCanvasAWT, BorderLayout.CENTER);
+                                jPanel2.remove(newtCanvasAWT);
+                                container1.add(newtCanvasAWT, BorderLayout.CENTER);
+                                jFrame1.validate();
+                                jFrame2.validate();                                
                             } });
                     break;
             }
@@ -301,20 +287,20 @@ public class TestParenting01cSwingAWT extends UITestCase {
 
         SwingUtilities.invokeAndWait(new Runnable() {
                 public void run() {
-                    _jFrame1.setVisible(false);
-                    _jFrame2.setVisible(false);
+                    jFrame1.setVisible(false);
+                    jFrame2.setVisible(false);
                 } });
-        Assert.assertEquals(true, glWindow1.isValid());
+        Assert.assertEquals(true, glWindow1.isNativeValid());
 
         SwingUtilities.invokeAndWait(new Runnable() {
                 public void run() {
-                    _jFrame1.dispose();
-                    _jFrame2.dispose();
+                    jFrame1.dispose();
+                    jFrame2.dispose();
                 } });
-        Assert.assertEquals(true, glWindow1.isValid());
+        Assert.assertEquals(true, glWindow1.isNativeValid());
 
-        glWindow1.invalidate();
-        //Assert.assertEquals(false, glWindow1.isValid());
+        glWindow1.destroy();
+        Assert.assertEquals(false, glWindow1.isNativeValid());
     }
 
     public static void setDemoFields(GLEventListener demo, GLWindow glWindow, boolean debug) {
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting02AWT.java b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting02AWT.java
index 20388e2..3ce1f50 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting02AWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting02AWT.java
@@ -28,37 +28,26 @@
  
 package com.jogamp.opengl.test.junit.newt.parenting;
 
-import java.lang.reflect.*;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
 import org.junit.Assert;
-import org.junit.Before;
 import org.junit.BeforeClass;
-import org.junit.After;
-import org.junit.AfterClass;
 import org.junit.Test;
 
 import java.awt.Button;
 import java.awt.BorderLayout;
-import java.awt.Canvas;
 import java.awt.Frame;
 
 import javax.media.opengl.*;
-import javax.media.nativewindow.*;
 
-import com.jogamp.opengl.util.Animator;
 import com.jogamp.newt.*;
 import com.jogamp.newt.event.*;
 import com.jogamp.newt.opengl.*;
 import com.jogamp.newt.awt.NewtCanvasAWT;
 
 import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
 
 import com.jogamp.opengl.test.junit.util.*;
-import com.jogamp.opengl.test.junit.jogl.demos.es1.RedSquare;
-import com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.Gears;
+import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
 
 public class TestParenting02AWT extends UITestCase {
     static int width, height;
@@ -68,52 +57,51 @@ public class TestParenting02AWT extends UITestCase {
 
     @BeforeClass
     public static void initClass() {
-        GLProfile.initSingleton(true);
         width  = 640;
         height = 480;
     }
 
     @Test
-    public void testWindowParenting01NewtChildOnAWTParentLayouted() throws InterruptedException {
+    public void testWindowParenting01NewtChildOnAWTParentLayouted() throws InterruptedException, InvocationTargetException {
         runNewtChildOnAWTParent(true, false);
     }
 
     @Test
-    public void testWindowParenting02NewtChildOnAWTParentLayoutedDef() throws InterruptedException {
+    public void testWindowParenting02NewtChildOnAWTParentLayoutedDef() throws InterruptedException, InvocationTargetException {
         runNewtChildOnAWTParent(true, true);
     }
 
     @Test
-    public void testWindowParenting03NewtChildOnAWTParentDirect() throws InterruptedException {
+    public void testWindowParenting03NewtChildOnAWTParentDirect() throws InterruptedException, InvocationTargetException {
         runNewtChildOnAWTParent(false, false);
     }
 
     @Test
-    public void testWindowParenting04NewtChildOnAWTParentDirectDef() throws InterruptedException {
+    public void testWindowParenting04NewtChildOnAWTParentDirectDef() throws InterruptedException, InvocationTargetException {
         runNewtChildOnAWTParent(false, true);
     }
 
-    public void runNewtChildOnAWTParent(boolean useLayout, boolean deferredPeer) throws InterruptedException {
+    public void runNewtChildOnAWTParent(final boolean useLayout, final boolean deferredPeer) throws InterruptedException, InvocationTargetException {
         NEWTEventFiFo eventFifo = new NEWTEventFiFo();
 
         // setup NEWT GLWindow ..
-        GLWindow glWindow = GLWindow.create(new GLCapabilities(null));
+        final GLWindow glWindow = GLWindow.create(new GLCapabilities(null));
         Assert.assertNotNull(glWindow);
         glWindow.setTitle("NEWT - CHILD");
         glWindow.addKeyListener(new TraceKeyAdapter(new KeyAction(eventFifo)));
         glWindow.addWindowListener(new TraceWindowAdapter(new WindowAction(eventFifo)));
-        GLEventListener demo = new Gears();
+        final GLEventListener demo = new GearsES2();
         setDemoFields(demo, glWindow, false);
         glWindow.addGLEventListener(demo);
 
         // attach NEWT GLWindow to AWT Canvas
-        NewtCanvasAWT newtCanvasAWT = new NewtCanvasAWT(glWindow);
+        final NewtCanvasAWT newtCanvasAWT = new NewtCanvasAWT(glWindow);
         Assert.assertNotNull(newtCanvasAWT);
         Assert.assertEquals(false, glWindow.isVisible());
         Assert.assertEquals(false, glWindow.isNativeValid());
         Assert.assertNull(glWindow.getParent());
 
-        Frame frame = new Frame("AWT Parent Frame");
+        final Frame frame = new Frame("AWT Parent Frame");
         Assert.assertNotNull(frame);
         if(useLayout) {
             frame.setLayout(new BorderLayout());
@@ -132,15 +120,22 @@ public class TestParenting02AWT extends UITestCase {
 
         frame.setSize(width, height);
 
-        frame.setVisible(true);
+        javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                frame.setVisible(true);
+            }});
         // X11: true, Windows: false - Assert.assertEquals(true, glWindow.isVisible());
 
         if(deferredPeer) {
-            if(useLayout) {
-                frame.add(newtCanvasAWT, BorderLayout.CENTER);
-            } else {
-                frame.add(newtCanvasAWT);
-            }
+            javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
+                public void run() {
+                    if(useLayout) {
+                        frame.add(newtCanvasAWT, BorderLayout.CENTER);
+                    } else {
+                        frame.add(newtCanvasAWT);
+                    }
+                    frame.validate();
+                }});
         }
 
         // Since it is not defined when AWT's addNotify call happen
@@ -162,7 +157,11 @@ public class TestParenting02AWT extends UITestCase {
 
         if(useLayout) {
             // test some fancy re-layout ..
-            frame.remove(newtCanvasAWT);
+            javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
+                public void run() {
+                    frame.remove(newtCanvasAWT);
+                    frame.validate();
+                }});
             Assert.assertEquals(false, glWindow.isVisible());
             Assert.assertEquals(true, glWindow.isNativeValid());
             Assert.assertNull(glWindow.getParent());
@@ -172,7 +171,11 @@ public class TestParenting02AWT extends UITestCase {
             Thread.sleep(waitReparent);
 
             // should recreate properly ..
-            frame.add(newtCanvasAWT, BorderLayout.CENTER);
+            javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
+                public void run() {
+                    frame.add(newtCanvasAWT, BorderLayout.CENTER);
+                    frame.validate();
+                }});
             glWindow.display();
             Assert.assertEquals(true, glWindow.isVisible());
             Assert.assertEquals(true, glWindow.isNativeValid());
@@ -213,9 +216,12 @@ public class TestParenting02AWT extends UITestCase {
         }
         Thread.sleep(waitReparent);
 
-        glWindow.invalidate();
+        glWindow.destroy();
         if(useLayout) {
-            frame.remove(newtCanvasAWT);
+            javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
+                public void run() {
+                    frame.remove(newtCanvasAWT);
+                }});
         }
         frame.dispose();
     }
@@ -251,6 +257,8 @@ public class TestParenting02AWT extends UITestCase {
             }
         }
         String tstname = TestParenting02AWT.class.getName();
+        org.junit.runner.JUnitCore.main(tstname);
+        /*
         org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(new String[] {
             tstname,
             "filtertrace=true",
@@ -261,7 +269,7 @@ public class TestParenting02AWT 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 b9bd2d9..13aad0c 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
@@ -29,21 +29,12 @@
 
 package com.jogamp.opengl.test.junit.newt.parenting;
 
-import java.lang.reflect.*;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
 import org.junit.Assert;
-import org.junit.Before;
 import org.junit.BeforeClass;
-import org.junit.After;
-import org.junit.AfterClass;
 import org.junit.Test;
 
 import javax.media.opengl.*;
 import javax.media.nativewindow.*;
-import javax.media.nativewindow.*;
 
 import com.jogamp.newt.*;
 import com.jogamp.newt.event.*;
@@ -52,8 +43,10 @@ import com.jogamp.newt.opengl.*;
 import java.io.IOException;
 
 import com.jogamp.opengl.test.junit.util.*;
-import com.jogamp.opengl.test.junit.jogl.demos.es1.RedSquare;
-import com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.Gears;
+import com.jogamp.opengl.test.junit.jogl.demos.es2.RedSquareES2;
+import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
+// import com.jogamp.opengl.test.junit.jogl.demos.es1.RedSquareES1;
+// import com.jogamp.opengl.test.junit.jogl.demos.es1.GearsES1;
 
 public class TestParenting02NEWT extends UITestCase {
     static int width, height;
@@ -122,7 +115,7 @@ public class TestParenting02NEWT extends UITestCase {
         glWindow1.addKeyListener(new TraceKeyAdapter(new KeyAction(eventFifo)));
         glWindow1.addWindowListener(new TraceWindowAdapter());
 
-        GLEventListener demo1 = new RedSquare();
+        GLEventListener demo1 = new RedSquareES2();
         setDemoFields(demo1, window1, glWindow1, false);
         // glWindow1.addGLEventListener(demo1);
 
@@ -144,7 +137,7 @@ public class TestParenting02NEWT extends UITestCase {
         glWindow2.addWindowListener(new TraceWindowAdapter(new WindowAction(eventFifo)));
         // glWindow2.addMouseListener(new TraceMouseAdapter());
 
-        GLEventListener demo2 = new Gears();
+        GLEventListener demo2 = new GearsES2();
         setDemoFields(demo2, window2, glWindow2, false);
         // glWindow2.addGLEventListener(demo2);
 
@@ -164,12 +157,12 @@ public class TestParenting02NEWT extends UITestCase {
         while (duration>0 && !shouldQuit) {
             glWindow1.display();
             glWindow2.display();
-            Thread.sleep(step);
             duration -= step;
             x += 1;
             y += 1;
-            glWindow1.setPosition(x,y);
+            // glWindow1.setPosition(x,y);
             glWindow2.setPosition(glWindow1.getWidth()/2,glWindow1.getHeight()/2-y);
+            Thread.sleep(step);
 
             while( null != ( event = (NEWTEvent) eventFifo.get() ) ) {
                 Window source = (Window) event.getSource();
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting03AWT.java b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting03AWT.java
index 7da30cf..2ce6223 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting03AWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting03AWT.java
@@ -29,30 +29,20 @@
 package com.jogamp.opengl.test.junit.newt.parenting;
 
 import java.lang.reflect.*;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
 
 import org.junit.Assert;
-import org.junit.Before;
 import org.junit.BeforeClass;
-import org.junit.After;
-import org.junit.AfterClass;
 import org.junit.Test;
 
-import java.awt.Button;
 import java.awt.BorderLayout;
-import java.awt.Canvas;
 import java.awt.Container;
 import java.awt.Dimension;
 import java.awt.Frame;
 import java.awt.Label;
 
 import javax.media.opengl.*;
-import javax.media.nativewindow.*;
 
 import com.jogamp.opengl.util.Animator;
-import com.jogamp.opengl.util.FPSAnimator;
 import com.jogamp.newt.*;
 import com.jogamp.newt.event.*;
 import com.jogamp.newt.opengl.*;
@@ -61,7 +51,7 @@ import com.jogamp.newt.awt.NewtCanvasAWT;
 import java.io.IOException;
 
 import com.jogamp.opengl.test.junit.util.*;
-import com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.Gears;
+import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
 
 public class TestParenting03AWT extends UITestCase {
     static Dimension size;
@@ -71,7 +61,6 @@ public class TestParenting03AWT extends UITestCase {
 
     @BeforeClass
     public static void initClass() {
-        GLProfile.initSingleton(true);
         size = new Dimension(400,200);
         glCaps = new GLCapabilities(null);
         glCaps.setAlphaBits(8);
@@ -84,18 +73,13 @@ public class TestParenting03AWT extends UITestCase {
     }
 
     public void testWindowParenting1AWTOneNewtChild() throws InterruptedException, InvocationTargetException {
-        int x = 0;
-        int y = 0;
-
-        NEWTEventFiFo eventFifo = new NEWTEventFiFo();
-
         GLWindow glWindow1 = GLWindow.create(glCaps);
-        glWindow1.enablePerfLog(true);
+        glWindow1.setUpdateFPSFrames(1, null);
         glWindow1.setUndecorated(true);
         NewtCanvasAWT newtCanvasAWT1 = new NewtCanvasAWT(glWindow1);
         newtCanvasAWT1.setPreferredSize(size);
 
-        GLEventListener demo1 = new Gears(1);
+        GLEventListener demo1 = new GearsES2(1);
         setDemoFields(demo1, glWindow1, false);
         glWindow1.addGLEventListener(demo1);
         final NewtCanvasAWT f_newtCanvasAWT1 = newtCanvasAWT1;
@@ -124,7 +108,6 @@ public class TestParenting03AWT extends UITestCase {
         cont1.setLayout(new BorderLayout());
         cont1.add(newtCanvasAWT1, BorderLayout.CENTER);
         cont1.setVisible(true);
-        final Container f_cont1 = cont1;
 
         Frame frame1 = new Frame("AWT Parent Frame");
         frame1.setLayout(new BorderLayout());
@@ -152,7 +135,7 @@ public class TestParenting03AWT extends UITestCase {
         Assert.assertEquals(null, animator1.getThread());
 
         frame1.dispose();
-        glWindow1.invalidate();
+        glWindow1.destroy();
     }
 
     public static void setDemoFields(GLEventListener demo, GLWindow glWindow, boolean debug) {
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting03bAWT.java b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting03bAWT.java
index 34d95d8..46a63dc 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting03bAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting03bAWT.java
@@ -29,39 +29,28 @@
 package com.jogamp.opengl.test.junit.newt.parenting;
 
 import java.lang.reflect.*;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
 
 import org.junit.Assert;
-import org.junit.Before;
 import org.junit.BeforeClass;
-import org.junit.After;
-import org.junit.AfterClass;
 import org.junit.Test;
 
-import java.awt.Button;
 import java.awt.BorderLayout;
-import java.awt.Canvas;
 import java.awt.Container;
 import java.awt.Dimension;
 import java.awt.Frame;
 import java.awt.Label;
 
 import javax.media.opengl.*;
-import javax.media.nativewindow.*;
 
 import com.jogamp.opengl.util.Animator;
-import com.jogamp.opengl.util.FPSAnimator;
 import com.jogamp.newt.*;
-import com.jogamp.newt.event.*;
 import com.jogamp.newt.opengl.*;
 import com.jogamp.newt.awt.NewtCanvasAWT;
 
 import java.io.IOException;
 
 import com.jogamp.opengl.test.junit.util.*;
-import com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.Gears;
+import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
 
 public class TestParenting03bAWT extends UITestCase {
     static Dimension size;
@@ -71,7 +60,6 @@ public class TestParenting03bAWT extends UITestCase {
 
     @BeforeClass
     public static void initClass() {
-        GLProfile.initSingleton(true);
         size = new Dimension(400,200);
         glCaps = new GLCapabilities(null);
     }
@@ -82,95 +70,56 @@ public class TestParenting03bAWT extends UITestCase {
     }
 
     public void testWindowParenting1AWTTwoNewtChilds() throws InterruptedException, InvocationTargetException {
-        int x = 0;
-        int y = 0;
-
-        NEWTEventFiFo eventFifo = new NEWTEventFiFo();
-
+        Frame frame1 = new Frame("AWT Parent Frame");
         GLWindow glWindow1 = GLWindow.create(glCaps);
-        glWindow1.enablePerfLog(true);
-        glWindow1.setUndecorated(true);
+        glWindow1.setUpdateFPSFrames(1, null);
         NewtCanvasAWT newtCanvasAWT1 = new NewtCanvasAWT(glWindow1);
         newtCanvasAWT1.setPreferredSize(size);
 
-        GLEventListener demo1 = new Gears(1);
+        GLEventListener demo1 = new GearsES2(1);
         setDemoFields(demo1, glWindow1, false);
         glWindow1.addGLEventListener(demo1);
-        final NewtCanvasAWT f_newtCanvasAWT1 = newtCanvasAWT1;
-        final GLWindow f_glWindow1 = glWindow1;
-        glWindow1.addKeyListener(new KeyAdapter() {
-            public void keyTyped(KeyEvent e) {
-                if(e.getKeyChar()=='d') {
-                    f_glWindow1.setUndecorated(!f_glWindow1.isUndecorated());
-                } else if(e.getKeyChar()=='f') {
-                    f_glWindow1.setFullscreen(!f_glWindow1.isFullscreen());
-                } else if(e.getKeyChar()=='r') {
-                    if(f_glWindow1.getParent()==null) {
-                        System.err.println("XXX glWin1 to home");
-                        f_glWindow1.reparentWindow(f_newtCanvasAWT1.getNativeWindow());
-                    } else {
-                        System.err.println("XXX glWin1 to TOP");
-                        f_glWindow1.reparentWindow(null);
-                    }
-                }
-            }
-        });
+        glWindow1.addKeyListener(new NewtAWTReparentingKeyAdapter(frame1, newtCanvasAWT1, glWindow1));
         GLAnimatorControl animator1 = new Animator(glWindow1);
         animator1.start();
 
         GLWindow glWindow2 = GLWindow.create(glCaps);
-        glWindow2.enablePerfLog(true);
-        glWindow2.setUndecorated(true);
+        glWindow2.setUpdateFPSFrames(1, null);
         NewtCanvasAWT newtCanvasAWT2 = new NewtCanvasAWT(glWindow2);
         newtCanvasAWT2.setPreferredSize(size);
 
-        GLEventListener demo2 = new Gears(1);
+        GLEventListener demo2 = new GearsES2(1);
         setDemoFields(demo2, glWindow2, false);
         glWindow2.addGLEventListener(demo2);
-        final NewtCanvasAWT f_newtCanvasAWT2 = newtCanvasAWT2;
-        final GLWindow f_glWindow2 = glWindow2;
-        glWindow2.addKeyListener(new KeyAdapter() {
-            public void keyTyped(KeyEvent e) {
-                if(e.getKeyChar()=='d') {
-                    f_glWindow2.setUndecorated(!f_glWindow2.isUndecorated());
-                } else if(e.getKeyChar()=='f') {
-                    f_glWindow2.setFullscreen(!f_glWindow2.isFullscreen());
-                } else if(e.getKeyChar()=='r') {
-                    if(f_glWindow2.getParent()==null) {
-                        System.err.println("XXX glWin2 to home");
-                        f_glWindow2.reparentWindow(f_newtCanvasAWT2.getNativeWindow());
-                    } else {
-                        System.err.println("XXX glWin2 to TOP");
-                        f_glWindow2.reparentWindow(null);
-                    }
-                }
-            }
-        });
+        glWindow2.addKeyListener(new NewtAWTReparentingKeyAdapter(frame1, newtCanvasAWT2, glWindow2));
         GLAnimatorControl animator2 = new Animator(glWindow2);
         animator2.start();
 
         Container cont1 = new Container();
         cont1.setLayout(new BorderLayout());
         cont1.add(newtCanvasAWT1, BorderLayout.CENTER);
+        System.err.println("******* Cont1 setVisible");
         cont1.setVisible(true);
-        final Container f_cont1 = cont1;
 
         Container cont2 = new Container();
         cont2.setLayout(new BorderLayout());
         cont2.add(newtCanvasAWT2, BorderLayout.CENTER);
+        System.err.println("******* Cont2 setVisible");
         cont2.setVisible(true);
         final Container f_cont2 = cont2;
 
-        Frame frame1 = new Frame("AWT Parent Frame");
         frame1.setLayout(new BorderLayout());
+        frame1.add(new Label("NORTH"), BorderLayout.NORTH);
+        frame1.add(new Label("CENTER"), BorderLayout.CENTER);
+        frame1.add(new Label("SOUTH"), BorderLayout.SOUTH);
         frame1.add(cont1, BorderLayout.EAST);
-        frame1.add(new Label("center"), BorderLayout.CENTER);
         frame1.setLocation(0, 0);
         frame1.setSize((int)size.getWidth()*2, (int)size.getHeight()*2);
         final Frame f_frame1 = frame1;
         javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
             public void run() {
                 f_frame1.pack();
+                System.err.println("******* Frame setVisible");
                 f_frame1.setVisible(true);
             }});
 
@@ -206,8 +155,8 @@ public class TestParenting03bAWT extends UITestCase {
         Assert.assertEquals(null, animator2.getThread());
 
         frame1.dispose();
-        glWindow1.invalidate();
-        glWindow2.invalidate();
+        glWindow1.destroy();
+        glWindow2.destroy();
     }
 
     public static void setDemoFields(GLEventListener demo, GLWindow glWindow, boolean debug) {
diff --git a/src/test/com/jogamp/opengl/test/junit/util/AWTFocusAdapter.java b/src/test/com/jogamp/opengl/test/junit/util/AWTFocusAdapter.java
index 9e5a01e..d0fbf07 100644
--- a/src/test/com/jogamp/opengl/test/junit/util/AWTFocusAdapter.java
+++ b/src/test/com/jogamp/opengl/test/junit/util/AWTFocusAdapter.java
@@ -31,10 +31,10 @@ package com.jogamp.opengl.test.junit.util;
 import java.awt.event.FocusEvent;
 import java.awt.event.FocusListener;
 
-public class AWTFocusAdapter implements EventCountAdapter, FocusListener {
+public class AWTFocusAdapter implements FocusEventCountAdapter, FocusListener {
 
     String prefix;
-    int focusGained;
+    boolean focusGained;
     boolean wasTemporary;
 
     public AWTFocusAdapter(String prefix) {
@@ -42,13 +42,12 @@ public class AWTFocusAdapter implements EventCountAdapter, FocusListener {
         reset();
     }
 
-    /** @return the balance of focus gained/lost, ie should be 0 or 1 */
-    public int getCount() {
+    public boolean hasFocus() {
         return focusGained;
     }
-
+    
     public void reset() {
-        focusGained = 0;
+        focusGained = false;
         wasTemporary = false;
     }
 
@@ -59,15 +58,17 @@ public class AWTFocusAdapter implements EventCountAdapter, FocusListener {
 
     /* @Override */
     public void focusGained(FocusEvent e) {
-        ++focusGained;
+        focusGained = true;
         wasTemporary = e.isTemporary();
         System.err.println("FOCUS AWT  GAINED "+(wasTemporary?"TEMP":"PERM")+" ["+focusGained+"]: "+prefix+", "+e);
     }
 
     /* @Override */
     public void focusLost(FocusEvent e) {
-        --focusGained;
+        focusGained = false;
         wasTemporary = e.isTemporary();
         System.err.println("FOCUS AWT  LOST   "+(wasTemporary?"TEMP":"PERM")+" ["+focusGained+"]: "+prefix+", "+e);
     }
+    
+    public String toString() { return prefix+"[gained "+focusGained +", temp "+wasTemporary+"]"; }    
 }
diff --git a/src/test/com/jogamp/opengl/test/junit/util/AWTKeyAdapter.java b/src/test/com/jogamp/opengl/test/junit/util/AWTKeyAdapter.java
index ed09ecd..6c01561 100644
--- a/src/test/com/jogamp/opengl/test/junit/util/AWTKeyAdapter.java
+++ b/src/test/com/jogamp/opengl/test/junit/util/AWTKeyAdapter.java
@@ -28,27 +28,47 @@
  
 package com.jogamp.opengl.test.junit.util;
 
-public class AWTKeyAdapter extends java.awt.event.KeyAdapter implements EventCountAdapter {
+import java.awt.event.KeyEvent;
+
+public class AWTKeyAdapter extends java.awt.event.KeyAdapter implements InputEventCountAdapter {
 
     String prefix;
     int keyTyped;
+    boolean pressed;
 
     public AWTKeyAdapter(String prefix) {
         this.prefix = prefix;
         reset();
     }
 
+    public boolean isPressed() {
+        return pressed;
+    }
+    
     public int getCount() {
         return keyTyped;
     }
 
     public void reset() {
         keyTyped = 0;
+        pressed = false;
+    }
+
+    public void keyPressed(KeyEvent e) {
+        pressed = true;
+        System.err.println("KEY AWT PRESSED ["+pressed+"]: "+prefix+", "+e);
+    }
+
+    public void keyReleased(KeyEvent e) {
+        pressed = false;
+        System.err.println("KEY AWT RELEASED ["+pressed+"]: "+prefix+", "+e);
     }
 
     public void keyTyped(java.awt.event.KeyEvent e) {
         ++keyTyped;
         System.err.println("KEY AWT  TYPED ["+keyTyped+"]: "+prefix+", "+e);
     }
+    
+    public String toString() { return prefix+"[pressed "+pressed+", typed "+keyTyped+"]"; }
 }
 
diff --git a/src/test/com/jogamp/opengl/test/junit/util/AWTMouseAdapter.java b/src/test/com/jogamp/opengl/test/junit/util/AWTMouseAdapter.java
index 7fa2015..b948023 100644
--- a/src/test/com/jogamp/opengl/test/junit/util/AWTMouseAdapter.java
+++ b/src/test/com/jogamp/opengl/test/junit/util/AWTMouseAdapter.java
@@ -28,26 +28,46 @@
  
 package com.jogamp.opengl.test.junit.util;
 
-public class AWTMouseAdapter extends java.awt.event.MouseAdapter implements EventCountAdapter {
+import java.awt.event.MouseEvent;
+
+public class AWTMouseAdapter extends java.awt.event.MouseAdapter implements InputEventCountAdapter {
     String prefix;
     int mouseClicked;
+    boolean pressed;
 
     public AWTMouseAdapter(String prefix) {
         this.prefix = prefix;
         reset();
     }
 
+    public boolean isPressed() {
+        return pressed;
+    }
+    
     public int getCount() {
         return mouseClicked;
     }
-
+    
     public void reset() {
         mouseClicked = 0;
+        pressed = false;
     }
 
+    public void mousePressed(MouseEvent e) {
+        pressed = true;
+        System.err.println("MOUSE AWT PRESSED ["+pressed+"]: "+prefix+", "+e);
+    }
+
+    public void mouseReleased(MouseEvent e) {
+        pressed = false;
+        System.err.println("MOUSE AWT RELEASED ["+pressed+"]: "+prefix+", "+e);
+    }
+    
     public void mouseClicked(java.awt.event.MouseEvent e) {
         mouseClicked+=e.getClickCount();
         System.err.println("MOUSE AWT CLICKED ["+mouseClicked+"]: "+prefix+", "+e);
-    }
+    }    
+    
+    public String toString() { return prefix+"[pressed "+pressed+", clicked "+mouseClicked+"]"; }
 }
 
diff --git a/src/test/com/jogamp/opengl/test/junit/util/AWTRobotUtil.java b/src/test/com/jogamp/opengl/test/junit/util/AWTRobotUtil.java
index d0f9172..661d58b 100644
--- a/src/test/com/jogamp/opengl/test/junit/util/AWTRobotUtil.java
+++ b/src/test/com/jogamp/opengl/test/junit/util/AWTRobotUtil.java
@@ -39,17 +39,24 @@ import java.awt.Point;
 import java.awt.Rectangle;
 import java.awt.Robot;
 import java.awt.Toolkit;
-import java.awt.event.InputEvent;
+
 import javax.media.opengl.awt.GLCanvas;
 import javax.swing.JFrame;
 
-public class AWTRobotUtil {
+import org.junit.Assert;
 
-    public static int TIME_OUT = 1000; // 1s
-    public static int ROBOT_DELAY = 50; // ms
-    public static int POLL_DIVIDER = 20; // TO/20
+public class AWTRobotUtil {
 
-    public static Point getCenterLocation(Object obj, boolean frameTitlebar) 
+    static final boolean DEBUG = false;
+    
+    public static final int RETRY_NUMBER  =   5;
+    public static final int ROBOT_DELAY   = 100; // ms
+    public static final int TIME_OUT     = 1000; // 1s
+    public static final int POLL_DIVIDER   = 20; // TO/20
+    public static final int TIME_SLICE   = TIME_OUT / POLL_DIVIDER ;
+    public static Integer AWT_CLICK_TO = null; 
+    
+    public static Point getCenterLocation(Object obj) 
         throws InterruptedException, InvocationTargetException {
         Component comp = null;
         com.jogamp.newt.Window win = null;
@@ -66,7 +73,7 @@ public class AWTRobotUtil {
         if(null!=comp) {
             Point p0 = comp.getLocationOnScreen();
             Rectangle r0 = comp.getBounds();
-            if( frameTitlebar && comp instanceof JFrame ) {
+            if( comp instanceof JFrame ) {
                 JFrame jFrame = (JFrame) comp;
                 Container cont = jFrame.getContentPane();
                 Point p1 = cont.getLocationOnScreen();
@@ -102,7 +109,7 @@ public class AWTRobotUtil {
             robot = new Robot();
             robot.setAutoWaitForIdle(true);
         }
-        Point p0 = getCenterLocation(window, false);
+        Point p0 = getCenterLocation(window);
         System.err.println("robot pos: "+p0);
         robot.mouseMove( (int) p0.getX(), (int) p0.getY() );
         robot.delay(ROBOT_DELAY);
@@ -118,7 +125,7 @@ public class AWTRobotUtil {
         KeyboardFocusManager kfm = KeyboardFocusManager.getCurrentKeyboardFocusManager();
         int wait;
         for (wait=0; wait<POLL_DIVIDER && window != kfm.getFocusedWindow(); wait++) {
-            Thread.sleep(TIME_OUT/POLL_DIVIDER);
+            Thread.sleep(TIME_SLICE);
         }
         return wait<POLL_DIVIDER;
     }
@@ -134,50 +141,71 @@ public class AWTRobotUtil {
             robot.setAutoWaitForIdle(true);
         }
 
-        Point p0 = getCenterLocation(obj, false);
+        Point p0 = getCenterLocation(obj);
         System.err.println("robot pos: "+p0);
 
         robot.mouseMove( (int) p0.getX(), (int) p0.getY() );
         robot.delay(ROBOT_DELAY);
     }
 
+    public static int getClickTimeout(Object obj) {
+        if(obj instanceof com.jogamp.newt.Window) {
+            return com.jogamp.newt.event.MouseEvent.getClickTimeout();
+        } else if(obj instanceof Component) {
+            if(null == AWT_CLICK_TO) {
+                AWT_CLICK_TO =
+                    (Integer) Toolkit.getDefaultToolkit().getDesktopProperty("awt.multiClickInterval");
+                if(null == AWT_CLICK_TO) { 
+                    AWT_CLICK_TO = new Integer(500);
+                }
+            }
+            return AWT_CLICK_TO.intValue();
+        } else {
+            throw new RuntimeException("Neither AWT nor NEWT: "+obj);
+        }        
+    }
+    
     /**
      * requestFocus, if robot is valid, use mouse operation,
      * otherwise programatic, ie call requestFocus
      */
     public static void requestFocus(Robot robot, Object obj) 
         throws AWTException, InterruptedException, InvocationTargetException {
-        Component comp = null;
-        com.jogamp.newt.Window win = null;
+        final Component comp;
+        final com.jogamp.newt.Window win;
 
+        KeyboardFocusManager.getCurrentKeyboardFocusManager().clearGlobalFocusOwner();
+        
         if(obj instanceof com.jogamp.newt.Window) {
             win = (com.jogamp.newt.Window) obj;
+            comp = null;
         } else if(obj instanceof Component) {
+            win = null;
             comp = (Component) obj;
         } else {
             throw new RuntimeException("Neither AWT nor NEWT: "+obj);
         }
-
-        if(null == robot) {
-            if(null!=comp) {
-                final Component f_comp = comp;
-                javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
-                    public void run() {
-                        f_comp.requestFocus();
-                    }});
-            } else {
-                win.requestFocus();
-            }
-            return;
+        
+        if(null!=comp) {
+            javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
+                public void run() {
+                    comp.requestFocus();
+                }});
+        } else {
+            win.requestFocus();
         }
+    }
 
-        centerMouse(robot, obj);
-
-        robot.delay(ROBOT_DELAY);
-        robot.mousePress(InputEvent.BUTTON1_MASK);
-        robot.delay(ROBOT_DELAY);
-        robot.mouseRelease(InputEvent.BUTTON1_MASK);
-        robot.delay(ROBOT_DELAY);
+    public static boolean hasFocus(Object obj) {
+        if(obj instanceof Component) {
+            final Component comp = (Component) obj;
+            final KeyboardFocusManager kfm = KeyboardFocusManager.getCurrentKeyboardFocusManager();
+            return comp == kfm.getPermanentFocusOwner();
+        } else if(obj instanceof com.jogamp.newt.Window) {
+            return ((com.jogamp.newt.Window) obj).hasFocus();
+        } else {
+            throw new RuntimeException("Neither AWT nor NEWT: "+obj);
+        }
     }
 
     /**
@@ -187,15 +215,15 @@ public class AWTRobotUtil {
     public static boolean waitForFocus(Object obj) throws InterruptedException {
         int wait;
         if(obj instanceof Component) {
-            Component comp = (Component) obj;
-            KeyboardFocusManager kfm = KeyboardFocusManager.getCurrentKeyboardFocusManager();
+            final Component comp = (Component) obj;
+            final KeyboardFocusManager kfm = KeyboardFocusManager.getCurrentKeyboardFocusManager();
             for (wait=0; wait<POLL_DIVIDER && comp != kfm.getPermanentFocusOwner(); wait++) {
-                Thread.sleep(TIME_OUT/POLL_DIVIDER);
+                Thread.sleep(TIME_SLICE);
             }
         } else if(obj instanceof com.jogamp.newt.Window) {
-            com.jogamp.newt.Window win = (com.jogamp.newt.Window) obj;
+            final com.jogamp.newt.Window win = (com.jogamp.newt.Window) obj;
             for (wait=0; wait<POLL_DIVIDER && !win.hasFocus(); wait++) {
-                Thread.sleep(TIME_OUT/POLL_DIVIDER);
+                Thread.sleep(TIME_SLICE);
             }
         } else {
             throw new RuntimeException("Neither AWT nor NEWT: "+obj);
@@ -207,49 +235,76 @@ public class AWTRobotUtil {
      *
      * @return True if the Window became the global focused Window within TIME_OUT
      */
-    public static boolean waitForFocus(Object obj, int gainT0, EventCountAdapter gain, 
-                                                   int lostT0, EventCountAdapter lost) throws InterruptedException {
+    public static boolean waitForFocus(Object obj, FocusEventCountAdapter gain, 
+                                                   FocusEventCountAdapter lost) throws InterruptedException {
         if(!waitForFocus(obj)) {
             return false;
         }
+        if(null == gain) {
+            return true;
+        }
+        
         int wait;
         for (wait=0; wait<POLL_DIVIDER; wait++) {
-            int gainT1 = gain.getCount();
-            int lostT1 = (null!=lost) ? lost.getCount() : -1;
-            if(gainT1-gainT0==1 && lostT1-lostT0==-1) {
+            if( ( null == lost || !lost.hasFocus() ) && gain.hasFocus() ) {
                 return true;
             }
-            Thread.sleep(TIME_OUT/POLL_DIVIDER);
+            Thread.sleep(TIME_SLICE);
         }
         return false;
     }
 
-    public static boolean requestFocusAndWait(Robot robot, Object requestFocus, Object waitForFocus)
+    public static void assertRequestFocusAndWait(Robot robot, Object requestFocus, Object waitForFocus, 
+                                              FocusEventCountAdapter gain, FocusEventCountAdapter lost)
         throws AWTException, InterruptedException, InvocationTargetException {
 
-        requestFocus(robot, requestFocus);
-        return waitForFocus(waitForFocus);
+        int i = 0;
+        boolean hasFocus = false;
+        
+        for(i=0; i < RETRY_NUMBER && !hasFocus; i++) {
+            requestFocus(robot, requestFocus);
+            hasFocus = waitForFocus(waitForFocus, gain, lost);
+        }
+        Assert.assertTrue("Did not gain focus", hasFocus);
     }
 
-    public static boolean requestFocusAndWait(Robot robot, Object requestFocus, Object waitForFocus, 
-                                              EventCountAdapter gain, EventCountAdapter lost)
-        throws AWTException, InterruptedException, InvocationTargetException {
-
-        int gainT0 = gain.getCount();
-        int lostT0 = (null!=lost) ? lost.getCount() : 0;
-
-        requestFocus(robot, requestFocus);
-        return waitForFocus(waitForFocus, gainT0, gain, lostT0, lost);
+    static int keyType(int i, Robot robot, int keyCode,
+                       Object obj, InputEventCountAdapter counter) throws InterruptedException, AWTException, InvocationTargetException 
+    {
+        int tc = 0;
+        int j;
+        final long t0 = System.currentTimeMillis();
+        
+        for(j=0; 1 > tc && j<RETRY_NUMBER; j++) {
+            if(!hasFocus(obj)) {
+                // focus lost for some reason, regain it programmatic
+                if(DEBUG) { System.err.println(i+":"+j+" KC1.0: "+counter+" - regain focus"); }
+                requestFocus(null, obj);
+            }
+            final int c0 = counter.getCount();
+            if(DEBUG) { System.err.println(i+":"+j+" KC1.1: "+counter); }
+            robot.waitForIdle();
+            robot.keyPress(keyCode);
+            robot.keyRelease(keyCode);
+            if(DEBUG) { System.err.println(i+":"+j+" KC1.2: "+counter); }
+            tc = counter.getCount() - c0;
+            for (int wait=0; wait<POLL_DIVIDER && 1 > tc; wait++) {
+                robot.delay(TIME_SLICE);
+                tc = counter.getCount() - c0;
+            }
+            if(DEBUG) { System.err.println(i+":"+j+" KC1.X: tc "+tc+", "+counter); }
+        }
+        Assert.assertEquals("Key ("+i+":"+j+") not typed one time", 1, tc);
+        return (int) ( System.currentTimeMillis() - t0 ) ;
     }
-
+    
     /**
-     * @param keyTypedCounter shall return the number of keys typed (press + release)
-     * @return True if typeCount keys within TIME_OUT has been received
+     * @param keyCode TODO
+     * @param counter shall return the number of keys typed (press + release)
      */
-    public static int testKeyType(Robot robot, int typeCount, Object obj, EventCountAdapter keyTypedCounter) 
+    public static void assertKeyType(Robot robot, int keyCode, int typeCount, 
+                                     Object obj, InputEventCountAdapter counter) 
         throws AWTException, InterruptedException, InvocationTargetException {
-        Component comp = null;
-        com.jogamp.newt.Window win = null;
 
         if(null == robot) {
             robot = new Robot();
@@ -258,30 +313,59 @@ public class AWTRobotUtil {
 
         centerMouse(robot, obj);
 
-        int c0 = keyTypedCounter.getCount();
+        Assert.assertEquals("Key already pressed", false, counter.isPressed());
+        
+        if(DEBUG) {
+            System.err.println("**************************************");
+            System.err.println("KC0: "+counter);
+        }
+        
+        final int c0 = counter.getCount();
 
         for(int i=0; i<typeCount; i++) {
-            robot.keyPress(java.awt.event.KeyEvent.VK_A);
-            robot.delay(ROBOT_DELAY);
-            robot.keyRelease(java.awt.event.KeyEvent.VK_A);
-            robot.delay(ROBOT_DELAY);
+            keyType(i, robot, keyCode, obj, counter); 
         }
 
-        // Wait for the key events to be processed.
-        int wait;
-        for (wait=0; wait<POLL_DIVIDER && (keyTypedCounter.getCount()-c0)<typeCount; wait++) {
-            Thread.sleep(TIME_OUT/POLL_DIVIDER);
-        }
-        return keyTypedCounter.getCount()-c0;
+        if(DEBUG) { System.err.println("KC3.0: "+counter); }
+        Assert.assertEquals("Wrong key count", typeCount, counter.getCount()-c0);
     }
 
+    static int mouseClick(int i, Robot robot, int mouseButton,
+                          Object obj, InputEventCountAdapter counter) throws InterruptedException, AWTException, InvocationTargetException 
+    {
+        int j;
+        int tc = 0;
+        final long t0 = System.currentTimeMillis();
+        
+        for(j=0; 1 > tc && j<RETRY_NUMBER; j++) {
+            if(!hasFocus(obj)) {
+                // focus lost for some reason, regain it programmatic
+                if(DEBUG) { System.err.println(i+":"+j+" MC1.0: "+counter+" - regain focus"); }
+                requestFocus(null, obj);
+            }
+            final int c0 = counter.getCount();
+            if(DEBUG) { System.err.println(i+":"+j+" MC1.1: "+counter); }
+            robot.waitForIdle();
+            robot.mousePress(mouseButton);
+            robot.mouseRelease(mouseButton);
+            if(DEBUG) { System.err.println(i+":"+j+" MC1.2: "+counter); }
+            tc = counter.getCount() - c0;
+            for (int wait=0; wait<POLL_DIVIDER && 1 > tc; wait++) {
+                robot.delay(TIME_SLICE);
+                tc = counter.getCount() - c0;
+            }
+            if(DEBUG) { System.err.println(i+":"+j+" MC1.X: tc "+tc+", "+counter); }
+        }
+        Assert.assertEquals("Mouse ("+i+":"+j+") not clicked one time", 1, tc);
+        return (int) ( System.currentTimeMillis() - t0 ) ;
+    }
+    
     /**
      * @param mouseButton ie InputEvent.BUTTON1_MASK
      * @param clickCount ie 1, or 2
-     * @return True if the desired clickCount within TIME_OUT has been received
      */
-    public static int testMouseClick(Robot robot, int mouseButton, int clickCount,
-                                     Object obj, EventCountAdapter mouseClickCounter) 
+    public static void assertMouseClick(Robot robot, int mouseButton, int clickCount,
+                                        Object obj, InputEventCountAdapter counter) 
         throws AWTException, InterruptedException, InvocationTargetException {
 
         if(null == robot) {
@@ -289,39 +373,39 @@ public class AWTRobotUtil {
             robot.setAutoWaitForIdle(true);
         }
 
-        final int clickTO = com.jogamp.newt.event.MouseEvent.getClickTimeout();
+        final int clickTO = getClickTimeout(obj);
 
         centerMouse(robot, obj);
 
-        robot.delay(2*clickTO);
-
-        int c0 = mouseClickCounter.getCount();
-
+        Assert.assertEquals("Mouse already pressed", false, counter.isPressed());
+        
+        if(DEBUG) {
+            System.err.println("**************************************");
+            System.err.println("MC0: "+counter);
+        }
+        
+        final int c0 = counter.getCount();
+        
         for(int i=0; i<clickCount; i++) {
-            robot.mousePress(mouseButton);
-            robot.delay(clickTO/4);
-            robot.mouseRelease(mouseButton);
-            robot.delay(clickTO/4);
+            final int waited = mouseClick(i, robot, mouseButton, obj, counter);
+            if(DEBUG) { System.err.println(i+": MC2.X: "+counter+", consumed: "+waited); }
+            robot.delay( clickTO + 1 );
         }
 
-        // Wait for the key events to be processed.
-        int wait;
-        for (wait=0; wait<POLL_DIVIDER && (mouseClickCounter.getCount()-c0)<clickCount; wait++) {
-            Thread.sleep(TIME_OUT/POLL_DIVIDER);
-        }
-        return mouseClickCounter.getCount()-c0;
+        if(DEBUG) { System.err.println("MC3.0: "+counter); }
+        Assert.assertEquals("Wrong mouse click count", clickCount, counter.getCount() - c0);
     }
 
     /**
      *
-     * @return True if the EventCountAdapter became the desired value within TIME_OUT
+     * @return True if the FocusEventCountAdapter became the desired value within TIME_OUT
      */
-    public static boolean waitForCount(int desired, EventCountAdapter eca) throws InterruptedException {
+    public static boolean waitForFocusCount(boolean desired, FocusEventCountAdapter eca) throws InterruptedException {
         for (int wait=0; wait<POLL_DIVIDER; wait++) {
-            if( eca.getCount() == desired ) {
+            if( eca.hasFocus() == desired ) {
                 return true;
             }
-            Thread.sleep(TIME_OUT/POLL_DIVIDER);
+            Thread.sleep(TIME_SLICE);
         }
         return false;
     }
@@ -335,12 +419,12 @@ public class AWTRobotUtil {
         if(obj instanceof Component) {
             Component comp = (Component) obj;
             for (wait=0; wait<POLL_DIVIDER && visible != comp.isVisible(); wait++) {
-                Thread.sleep(TIME_OUT/POLL_DIVIDER);
+                Thread.sleep(TIME_SLICE);
             }
         } else if(obj instanceof com.jogamp.newt.Window) {
             com.jogamp.newt.Window win = (com.jogamp.newt.Window) obj;
             for (wait=0; wait<POLL_DIVIDER && visible != win.isVisible(); wait++) {
-                Thread.sleep(TIME_OUT/POLL_DIVIDER);
+                Thread.sleep(TIME_SLICE);
             }
         } else {
             throw new RuntimeException("Neither AWT nor NEWT: "+obj);
@@ -357,31 +441,31 @@ public class AWTRobotUtil {
         if (obj instanceof Component) {
             Component comp = (Component) obj;
             for (wait=0; wait<POLL_DIVIDER && realized != comp.isDisplayable(); wait++) {
-                Thread.sleep(TIME_OUT/POLL_DIVIDER);
+                Thread.sleep(TIME_SLICE);
             }
             // if GLCanvas, ensure it got also painted -> drawable.setRealized(true);
             if(wait<POLL_DIVIDER && comp instanceof GLCanvas) {
                 GLCanvas glcanvas = (GLCanvas) comp;
                 for (wait=0; wait<POLL_DIVIDER && realized != glcanvas.isRealized(); wait++) {
-                    Thread.sleep(TIME_OUT/POLL_DIVIDER);
+                    Thread.sleep(TIME_SLICE);
                 }
                 if(wait>=POLL_DIVIDER) {
                     // for some reason GLCanvas hasn't been painted yet, force it!
                     System.err.println("XXX: FORCE REPAINT PRE - canvas: "+glcanvas);
                     glcanvas.repaint();
                     for (wait=0; wait<POLL_DIVIDER && realized != glcanvas.isRealized(); wait++) {
-                        Thread.sleep(TIME_OUT/POLL_DIVIDER);
+                        Thread.sleep(TIME_SLICE);
                     }
                     System.err.println("XXX: FORCE REPAINT POST - canvas: "+glcanvas);
                 }
                 for (wait=0; wait<POLL_DIVIDER && realized != glcanvas.isRealized(); wait++) {
-                    Thread.sleep(TIME_OUT/POLL_DIVIDER);
+                    Thread.sleep(TIME_SLICE);
                 }
             }            
         } else if(obj instanceof com.jogamp.newt.Window) {
             com.jogamp.newt.Window win = (com.jogamp.newt.Window) obj;
             for (wait=0; wait<POLL_DIVIDER && realized != win.isNativeValid(); wait++) {
-                Thread.sleep(TIME_OUT/POLL_DIVIDER);
+                Thread.sleep(TIME_SLICE);
             }
         } else {
             throw new RuntimeException("Neither AWT nor NEWT: "+obj);
@@ -414,11 +498,11 @@ public class AWTRobotUtil {
         }
         int wait;
         for (wait=0; wait<POLL_DIVIDER && !closingListener.isWindowClosing(); wait++) {
-            Thread.sleep(TIME_OUT/POLL_DIVIDER);
+            Thread.sleep(TIME_SLICE);
         }
         if(wait<POLL_DIVIDER && willClose) {
             for (wait=0; wait<POLL_DIVIDER && !closingListener.isWindowClosed(); wait++) {
-                Thread.sleep(TIME_OUT/POLL_DIVIDER);
+                Thread.sleep(TIME_SLICE);
             }
         }
         return wait<POLL_DIVIDER;
diff --git a/src/test/com/jogamp/opengl/test/junit/util/EventCountAdapter.java b/src/test/com/jogamp/opengl/test/junit/util/EventCountAdapter.java
index 105d250..76a1884 100644
--- a/src/test/com/jogamp/opengl/test/junit/util/EventCountAdapter.java
+++ b/src/test/com/jogamp/opengl/test/junit/util/EventCountAdapter.java
@@ -29,8 +29,6 @@
 package com.jogamp.opengl.test.junit.util;
 
 public interface EventCountAdapter {
-
-    int getCount();
     void reset();
 }
 
diff --git a/src/test/com/jogamp/opengl/test/junit/util/FocusEventCountAdapter.java b/src/test/com/jogamp/opengl/test/junit/util/FocusEventCountAdapter.java
new file mode 100644
index 0000000..b555515
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/util/FocusEventCountAdapter.java
@@ -0,0 +1,34 @@
+/**
+ * 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.util;
+
+public interface FocusEventCountAdapter extends EventCountAdapter {
+    boolean hasFocus();
+}
+
diff --git a/src/test/com/jogamp/opengl/test/junit/util/GLSLSimpleProgram.java b/src/test/com/jogamp/opengl/test/junit/util/GLSLSimpleProgram.java
index bcafc02..e23c31c 100644
--- a/src/test/com/jogamp/opengl/test/junit/util/GLSLSimpleProgram.java
+++ b/src/test/com/jogamp/opengl/test/junit/util/GLSLSimpleProgram.java
@@ -39,11 +39,13 @@ public class GLSLSimpleProgram {
     private int shaderProgram;
     private int vertShader;
     private int fragShader;
+    private boolean isValid;
 
     private GLSLSimpleProgram(int shaderProgram, int vertShader, int fragShader) {
         this.shaderProgram = shaderProgram;
         this.vertShader = vertShader;
         this.fragShader = fragShader;
+        this.isValid = true;
     }
 
     public static GLSLSimpleProgram create(GL2ES2 gl, String vertShaderCode, String fragShaderCode, boolean link) {
@@ -105,6 +107,10 @@ public class GLSLSimpleProgram {
         gl.glDetachShader(shaderProgram, fragShader);
         gl.glDeleteShader(fragShader);
         gl.glDeleteProgram(shaderProgram);
+        isValid = false;
+        shaderProgram = 0;
+        vertShader = 0;
+        fragShader = 0;
     }
 
     public int getFragShader() {
@@ -118,4 +124,8 @@ public class GLSLSimpleProgram {
     public int getVertShader() {
         return vertShader;
     }
+    
+    public boolean isValid() {
+        return isValid;
+    }
 }
diff --git a/src/test/com/jogamp/opengl/test/junit/util/InputEventCountAdapter.java b/src/test/com/jogamp/opengl/test/junit/util/InputEventCountAdapter.java
new file mode 100644
index 0000000..27f3d7e
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/util/InputEventCountAdapter.java
@@ -0,0 +1,35 @@
+/**
+ * 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.util;
+
+public interface InputEventCountAdapter extends  EventCountAdapter {
+    int getCount();
+    boolean isPressed();
+}
+
diff --git a/src/test/com/jogamp/opengl/test/junit/util/NEWTFocusAdapter.java b/src/test/com/jogamp/opengl/test/junit/util/NEWTFocusAdapter.java
index 9ee74ae..9f710c4 100644
--- a/src/test/com/jogamp/opengl/test/junit/util/NEWTFocusAdapter.java
+++ b/src/test/com/jogamp/opengl/test/junit/util/NEWTFocusAdapter.java
@@ -28,37 +28,44 @@
  
 package com.jogamp.opengl.test.junit.util;
 
-import com.jogamp.newt.event.WindowAdapter;
 import com.jogamp.newt.event.WindowEvent;
+import com.jogamp.newt.event.WindowListener;
+import com.jogamp.newt.event.WindowUpdateEvent;
 
-public class NEWTFocusAdapter extends WindowAdapter implements EventCountAdapter {
+public class NEWTFocusAdapter implements WindowListener, FocusEventCountAdapter {
 
     String prefix;
-    int focusGained;
+    boolean focusGained;
 
     public NEWTFocusAdapter(String prefix) {
         this.prefix = prefix;
         reset();
     }
 
-    public int getCount() {
+    public boolean hasFocus() {
         return focusGained;
     }
-
+    
     public void reset() {
-        focusGained = 0;
+        focusGained = false;
     }
 
-    @Override
     public void windowGainedFocus(WindowEvent e) {
-        ++focusGained;
+        focusGained = true;
         System.err.println("FOCUS NEWT GAINED ["+focusGained+"]: "+prefix+", "+e);
     }
 
-    @Override
     public void windowLostFocus(WindowEvent e) {
-        --focusGained;
+        focusGained = false;
         System.err.println("FOCUS NEWT LOST   ["+focusGained+"]: "+prefix+", "+e);
     }
+
+    public void windowResized(WindowEvent e) { }
+    public void windowMoved(WindowEvent e) { }
+    public void windowDestroyNotify(WindowEvent e) { }
+    public void windowDestroyed(WindowEvent e) { }
+    public void windowRepaint(WindowUpdateEvent e) { }
+    
+    public String toString() { return prefix+"[gained "+focusGained+"]"; }        
 }
 
diff --git a/src/test/com/jogamp/opengl/test/junit/util/NEWTGLContext.java b/src/test/com/jogamp/opengl/test/junit/util/NEWTGLContext.java
new file mode 100644
index 0000000..814a9fc
--- /dev/null
+++ b/src/test/com/jogamp/opengl/test/junit/util/NEWTGLContext.java
@@ -0,0 +1,141 @@
+/**
+ * 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.util;
+
+import com.jogamp.newt.Display;
+import com.jogamp.newt.NewtFactory;
+import com.jogamp.newt.Screen;
+import com.jogamp.newt.Window;
+
+import javax.media.opengl.GLCapabilities;
+import javax.media.opengl.GLContext;
+import javax.media.opengl.GLDrawable;
+import javax.media.opengl.GLDrawableFactory;
+import javax.media.opengl.GLProfile;
+
+import org.junit.Assert;
+
+public class NEWTGLContext {
+
+    public static class WindowContext {        
+        public final Window window;
+        public final GLContext context;
+        
+        public WindowContext(Window w, GLContext c) {
+            window = w;
+            context = c;
+        }
+    }
+
+    public static WindowContext createOffscreenWindow(GLProfile glp, int width, int height, boolean debugGL) throws InterruptedException {        
+        GLCapabilities caps = new GLCapabilities(glp);
+        caps.setOnscreen(false);
+        caps.setPBuffer(true);
+        
+        //
+        // Create native windowing resources .. X11/Win/OSX
+        // 
+        Display display = NewtFactory.createDisplay(null); // local display
+        Assert.assertNotNull(display);
+    
+        Screen screen  = NewtFactory.createScreen(display, 0); // screen 0
+        Assert.assertNotNull(screen);
+    
+        Window window = NewtFactory.createWindow(screen, caps);
+        Assert.assertNotNull(window);
+        window.setSize(width, height);
+        window.setVisible(true);
+        AWTRobotUtil.waitForVisible(window, true);
+        AWTRobotUtil.waitForRealized(window, true);
+            
+        GLDrawableFactory factory = GLDrawableFactory.getFactory(glp);
+        GLDrawable drawable = factory.createGLDrawable(window);
+        Assert.assertNotNull(drawable);
+        
+        drawable.setRealized(true);
+        
+        GLContext context = drawable.createContext(null);
+        Assert.assertNotNull(context);
+        
+        context.enableGLDebugMessage(debugGL);
+        
+        int res = context.makeCurrent();
+        Assert.assertTrue(GLContext.CONTEXT_CURRENT_NEW==res || GLContext.CONTEXT_CURRENT==res);
+        
+        return new WindowContext(window, context);
+    }
+
+    public static WindowContext createOnscreenWindow(GLProfile glp, int width, int height, boolean debugGL) throws InterruptedException {        
+        GLCapabilities caps = new GLCapabilities(glp);
+        //
+        // Create native windowing resources .. X11/Win/OSX
+        // 
+        Display display = NewtFactory.createDisplay(null); // local display
+        Assert.assertNotNull(display);
+    
+        Screen screen  = NewtFactory.createScreen(display, 0); // screen 0
+        Assert.assertNotNull(screen);
+    
+        Window window = NewtFactory.createWindow(screen, caps);
+        Assert.assertNotNull(window);
+        window.setSize(width, height);
+        window.setVisible(true);
+        AWTRobotUtil.waitForVisible(window, true);
+        AWTRobotUtil.waitForRealized(window, true);
+            
+        GLDrawableFactory factory = GLDrawableFactory.getFactory(glp);
+        GLDrawable drawable = factory.createGLDrawable(window);
+        Assert.assertNotNull(drawable);
+        
+        drawable.setRealized(true);
+        
+        GLContext context = drawable.createContext(null);
+        Assert.assertNotNull(context);
+        
+        context.enableGLDebugMessage(debugGL);
+        
+        int res = context.makeCurrent();
+        Assert.assertTrue(GLContext.CONTEXT_CURRENT_NEW==res || GLContext.CONTEXT_CURRENT==res);
+        
+        return new WindowContext(window, context);
+    }
+
+    public static void destroyWindow(WindowContext winctx) {
+        GLDrawable drawable = winctx.context.getGLDrawable();
+        
+        Assert.assertNotNull(winctx.context);
+        winctx.context.destroy();
+    
+        Assert.assertNotNull(drawable);
+        drawable.setRealized(false);
+    
+        Assert.assertNotNull(winctx.window);
+        winctx.window.destroy();
+    }
+   
+}
diff --git a/src/test/com/jogamp/opengl/test/junit/util/NEWTKeyAdapter.java b/src/test/com/jogamp/opengl/test/junit/util/NEWTKeyAdapter.java
index ba1a2f3..32b392c 100644
--- a/src/test/com/jogamp/opengl/test/junit/util/NEWTKeyAdapter.java
+++ b/src/test/com/jogamp/opengl/test/junit/util/NEWTKeyAdapter.java
@@ -31,28 +31,46 @@ package com.jogamp.opengl.test.junit.util;
 import com.jogamp.newt.event.KeyAdapter;
 import com.jogamp.newt.event.KeyEvent;
 
-public class NEWTKeyAdapter extends KeyAdapter implements EventCountAdapter {
+public class NEWTKeyAdapter extends KeyAdapter implements InputEventCountAdapter {
 
     String prefix;
     int keyTyped;
+    boolean pressed;
 
     public NEWTKeyAdapter(String prefix) {
         this.prefix = prefix;
         reset();
     }
 
+    public boolean isPressed() {
+        return pressed;
+    }
+    
     public int getCount() {
         return keyTyped;
     }
 
     public void reset() {
         keyTyped = 0;
+        pressed = false;
     }
 
+    public void keyPressed(KeyEvent e) {
+        pressed = true;
+        System.err.println("NEWT AWT PRESSED ["+pressed+"]: "+prefix+", "+e);
+    }
+    
+    public void keyReleased(KeyEvent e) {
+        pressed = false;
+        System.err.println("NEWT AWT RELEASED ["+pressed+"]: "+prefix+", "+e);
+    }
+     
     @Override
     public void keyTyped(KeyEvent e) {
         ++keyTyped;
         System.err.println("KEY NEWT TYPED ["+keyTyped+"]: "+prefix+", "+e);
     }
+    
+    public String toString() { return prefix+"[pressed "+pressed+", typed "+keyTyped+"]"; }
 }
 
diff --git a/src/test/com/jogamp/opengl/test/junit/util/NEWTMouseAdapter.java b/src/test/com/jogamp/opengl/test/junit/util/NEWTMouseAdapter.java
index 617d951..d98b9ca 100644
--- a/src/test/com/jogamp/opengl/test/junit/util/NEWTMouseAdapter.java
+++ b/src/test/com/jogamp/opengl/test/junit/util/NEWTMouseAdapter.java
@@ -31,27 +31,45 @@ package com.jogamp.opengl.test.junit.util;
 import com.jogamp.newt.event.MouseAdapter;
 import com.jogamp.newt.event.MouseEvent;
 
-public class NEWTMouseAdapter extends MouseAdapter implements EventCountAdapter {
+public class NEWTMouseAdapter extends MouseAdapter implements InputEventCountAdapter {
 
     String prefix;
     int mouseClicked;
+    boolean pressed;
 
     public NEWTMouseAdapter(String prefix) {
         this.prefix = prefix;
         reset();
     }
 
+    public boolean isPressed() {
+        return pressed;
+    }
+    
     public int getCount() {
         return mouseClicked;
     }
 
     public void reset() {
         mouseClicked = 0;
+        pressed = false;
     }
 
+    public void mousePressed(MouseEvent e) {
+        pressed = true;
+        System.err.println("MOUSE NEWT PRESSED ["+pressed+"]: "+prefix+", "+e);
+    }
+    
+    public void mouseReleased(MouseEvent e) {
+        pressed = false;
+        System.err.println("MOUSE NEWT RELEASED ["+pressed+"]: "+prefix+", "+e);
+    }
+    
     public void mouseClicked(MouseEvent e) {
         mouseClicked+=e.getClickCount();
         System.err.println("MOUSE NEWT CLICKED ["+mouseClicked+"]: "+prefix+", "+e);
     }
+    
+    public String toString() { return prefix+"[pressed "+pressed+", clicked "+mouseClicked+"]"; }
 }
 
diff --git a/src/test/com/jogamp/opengl/test/junit/util/QuitAdapter.java b/src/test/com/jogamp/opengl/test/junit/util/QuitAdapter.java
index 77996bf..42d68da 100644
--- a/src/test/com/jogamp/opengl/test/junit/util/QuitAdapter.java
+++ b/src/test/com/jogamp/opengl/test/junit/util/QuitAdapter.java
@@ -36,13 +36,13 @@ public class QuitAdapter extends WindowAdapter implements WindowListener, KeyLis
     public boolean shouldQuit() { return shouldQuit; }
 
     public void windowDestroyNotify(WindowEvent e) {
-        System.out.println("QUIT Window "+Thread.currentThread());
+        System.err.println("QUIT Window "+Thread.currentThread());
         shouldQuit = true;
     }
 
     public void keyTyped(KeyEvent e) {
         if(e.getKeyChar()=='q') {
-            System.out.println("QUIT Key "+Thread.currentThread());
+            System.err.println("QUIT Key "+Thread.currentThread());
             shouldQuit = true;
         }
     }
diff --git a/src/test/com/jogamp/opengl/test/junit/util/SingletonInstance.java b/src/test/com/jogamp/opengl/test/junit/util/SingletonInstance.java
deleted file mode 100644
index 7e3b9eb..0000000
--- a/src/test/com/jogamp/opengl/test/junit/util/SingletonInstance.java
+++ /dev/null
@@ -1,143 +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.util;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.RandomAccessFile;
-import java.nio.channels.FileLock;
-
-public class SingletonInstance {
-
-    static final boolean DEBUG = true;
-    static final String temp_file_path;
-
-    static {
-        String s = null;
-        try {
-            File tmpFile = File.createTempFile("TEST", "tst");
-            String absTmpFile = tmpFile.getCanonicalPath();
-            tmpFile.delete();
-            s = absTmpFile.substring(0, absTmpFile.lastIndexOf(File.separator));
-        } catch (IOException ex) {
-            ex.printStackTrace();
-        }
-        temp_file_path = s;
-    }
-
-    public static String getCanonicalTempPath() {
-        return temp_file_path;
-    }
-
-    public static String getCanonicalTempLockFilePath(String basename) {
-        return getCanonicalTempPath() + File.separator + basename;
-    }
-
-    public SingletonInstance(String lockFileBasename) {
-        this.file = new File ( getCanonicalTempLockFilePath ( lockFileBasename ) );
-    }
-
-    public SingletonInstance(File lockFile) {
-        this.file = lockFile ;
-    }
-
-    public synchronized void lock(long timeout_ms, long poll_ms) {
-        long i=0;
-        try {
-            do {
-                if(tryLock()) {
-                    return;
-                }
-                if(DEBUG && 0==i) {
-                    System.err.println("Wait for lock " + file);
-                }
-                i++;
-                Thread.sleep(poll_ms);
-            } while ( i < timeout_ms / poll_ms ) ;
-        } catch ( InterruptedException ie ) {
-            throw new  RuntimeException(ie);
-        }
-        throw new RuntimeException("SingletonInstance couldn't get lock within "+timeout_ms+"ms");
-    }
-
-    public synchronized boolean tryLock() {
-        try {
-            randomAccessFile = new RandomAccessFile(file, "rw");
-            fileLock = randomAccessFile.getChannel().tryLock();
-
-            if (fileLock != null) {
-                //final File f_file = file;
-                //final RandomAccessFile f_randomAccessFile = randomAccessFile;
-                //final FileLock f_fileLock = fileLock;
-                Runtime.getRuntime().addShutdownHook(new Thread() {
-                    public void run() {
-                        unlock();
-                    }
-                });
-                locked = true;
-                if(DEBUG) {
-                    System.err.println("Locked " + file);
-                }
-                return true;
-            }
-        } catch (Exception e) {
-            System.err.println("Unable to create and/or lock file: " + file);
-            e.printStackTrace();
-        }
-        return false;
-    }
-
-    public synchronized boolean unlock() {
-        if(locked) {
-            try {
-                fileLock.release();
-                randomAccessFile.close();
-                file.delete();
-                return true;
-            } catch (Exception e) {
-                System.err.println("Unable to remove lock file: " + file);
-                e.printStackTrace();
-            } finally {
-                fileLock = null;
-                randomAccessFile = null;
-                locked = false;
-            }
-        }
-        return false;
-    }
-
-    public synchronized boolean isLocked() {
-        return locked;
-    }
-
-    File file = null;
-    RandomAccessFile randomAccessFile = null;
-    FileLock fileLock = null;
-    boolean locked = false;
-}
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 b01ba1b..1ff1428 100644
--- a/src/test/com/jogamp/opengl/test/junit/util/UITestCase.java
+++ b/src/test/com/jogamp/opengl/test/junit/util/UITestCase.java
@@ -28,27 +28,53 @@
  
 package com.jogamp.opengl.test.junit.util;
 
+import com.jogamp.common.util.locks.SingletonInstance;
+
 import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.After;
 import org.junit.AfterClass;
+import org.junit.Rule;
+import org.junit.rules.TestName;
 
 
 public abstract class UITestCase {
+    @Rule public TestName _unitTestName = new TestName();
 
     public static final String SINGLE_INSTANCE_LOCK_FILE = "UITestCase.lock";
+    public static final int SINGLE_INSTANCE_LOCK_PORT = 59999;
+    
+    public static final long SINGLE_INSTANCE_LOCK_TO   = 3*60*1000; // wait up to 3 min
+    public static final long SINGLE_INSTANCE_LOCK_POLL =      1000; // poll every 1s
 
-    static SingletonInstance singletonInstance;
+    static volatile SingletonInstance singletonInstance;
 
-    protected SingletonInstance getSingletonInstance() {
-        return singletonInstance;
+    private static final synchronized void initSingletonInstance() {
+        if( null == singletonInstance )  {
+            // singletonInstance = SingletonInstance.createFileLock(SINGLE_INSTANCE_LOCK_POLL, SINGLE_INSTANCE_LOCK_FILE);
+            singletonInstance = SingletonInstance.createServerSocket(SINGLE_INSTANCE_LOCK_POLL, SINGLE_INSTANCE_LOCK_PORT);
+            if(!singletonInstance.tryLock(SINGLE_INSTANCE_LOCK_TO)) {
+                throw new RuntimeException("Fatal: Could lock single instance: "+singletonInstance.getName());
+            }
+        }
     }
 
+    public final String getTestMethodName() {
+        return _unitTestName.getMethodName();
+    }
+    
+    public final String getSimpleTestName() {
+        return getClass().getSimpleName()+" - "+getTestMethodName();
+    }
+
+    public final String getFullTestName() {
+        return getClass().getName()+" - "+getTestMethodName();
+    }
+    
     @BeforeClass
     public static void oneTimeSetUp() {
-        // one-time initialization code        
-        singletonInstance = new SingletonInstance(SINGLE_INSTANCE_LOCK_FILE);
-        singletonInstance.lock(3*60*1000, 100); // wait up to 3 min, poll every 100ms
+        // one-time initialization code                
+        initSingletonInstance();
     }
 
     @AfterClass
@@ -60,12 +86,12 @@ public abstract class UITestCase {
 
     @Before
     public void setUp() {
-        System.err.println("++++ UITestCase.setUp: "+getClass().getName());
+        System.err.println("++++ UITestCase.setUp: "+getFullTestName());
     }
 
     @After
     public void tearDown() {
-        System.err.println("++++ UITestCase.tearDown: "+getClass().getName());
+        System.err.println("++++ UITestCase.tearDown: "+getFullTestName());
     }
 
 }
diff --git a/tools/jackpotc/.gitignore b/tools/jackpotc/.gitignore
deleted file mode 100644
index a65b417..0000000
--- a/tools/jackpotc/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-lib
diff --git a/tools/jackpotc/test/oldgears/.gitignore b/tools/jackpotc/test/oldgears/.gitignore
deleted file mode 100644
index 563e9d6..0000000
--- a/tools/jackpotc/test/oldgears/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-build
-gensrc
-dist
-nbproject/private
diff --git a/www/index.html b/www/index.html
index 9790d9f..475bb87 100644
--- a/www/index.html
+++ b/www/index.html
@@ -15,14 +15,13 @@
             <div id="menu">
                 <ul>
                     <li><a href="../../">Home</a></li>
-                    <li><a href="../../gluegen/www/">Gluegen</a></li>
-                    <li><a href="../../joal/www/">JOAL</a></li>
-                    <li><a href="../../jocl/www/">JOCL</a></li>
+                    <li><a href="../../deployment/jogamp-current/jogl-test-applets.html">Tests</a></li>
                     <li><a href="../../jogl-demos/www/">Demos</a></li>
+                    <li><a href="../../deployment/jogamp-next/javadoc/jogl/javadoc/">JavaDoc</a></li>
+                    <li><a href="../../gluegen/www/">Gluegen</a></li>
                     <li><a href="../../wiki/">Wiki</a></li>
                     <li><a href="../../blog/">Blogs</a></li>
-                    <li><a href="../../forum.html">Forums</a></li>
-                    <li><a href="../../deployment/jogamp-next/javadoc/jogl/javadoc/">JavaDoc</a></li>
+                    <li><a href="http://forum.jogamp.org/" target="_blank">Forum</a></li>
                 </ul>
             </div>
             <div id="main">
@@ -62,19 +61,30 @@
                     <h3>Overview</h3>
 
                     <p>
-                        The JOGL project hosts the development version of the
-                        Java™ Binding for the OpenGL® API (<a href="http://jcp.org/en/jsr/detail?id=231">JSR-231</a>),
+                        The JOGL project hosts the development version of the Java™ Binding for the OpenGL® API,
                         and is designed to provide hardware-supported 3D graphics to applications written in Java.
                     </p>
                     <p>
                         JOGL provides full access to the APIs in the OpenGL 1.3 - 3.0, 3.1 - 3.3, ≥ 4.0, ES 1.x and ES 2.x specification
-                        [<a href="../doc/bouml/html-svg/">UML diagram</a>]
                         as well as nearly all vendor extensions.
-                        It integrates with the AWT and Swing widget sets, as well with custom windowing toolkits using the the NativeWindow API.
-                        It is part of a suite of open-source technologies initiated by the Game Technology Group at Sun Microsystems.
+                        <a href="../doc/Overview-OpenGL-Evolution-And-JOGL.html">OpenGL Evolution & JOGL</a>
+                        (<a href="../doc/bouml/html-svg/fig128069.svg">UML</a>) gives you a brief overview of OpenGL, 
+                        it's profiles and how we map them to JOGL.
+                    </p>
+                    <p>
+                        JOGL integrates with the AWT and Swing widget sets, as well with custom windowing toolkits using the NativeWindow API.
+                        <a href="../doc/NEWT-Overview.html">JOGL also provides it's own native windowing toolkit, NEWT</a>.
+                    </p>
+                    <p>
+                    Quick Version Info: Current [ <a href="../../deployment/jogamp-current/jogl-applet-version.html">Applet</a>, 
+                                                  <a href="../../deployment/jogamp-current/jogl-application-version.jnlp">Application</a> ], 
+                                        Next [ <a href="../../deployment/jogamp-next/jogl-applet-version.html">Applet</a>, 
+                                               <a href="../../deployment/jogamp-next/jogl-application-version.jnlp">Application</a> ].
                     </p>
                     <p>
-                        Please see the <a href="../../jogl-demos/www">JOGL demos</a> for illustrations of
+                        Please see the <a href="../../deployment/jogamp-current/jogl-test-applets.html"><b>JOGL Tests</b></a>
+                        (<a href="../../deployment/jogamp-next/jogl-test-applets.html"><i>next version</i></a>)
+                        and <a href="../../jogl-demos/www"><b>JOGL demos</b></a> for illustrations of
                         advanced OpenGL techniques now possible with the Java platform.
                     </p>
 
diff --git a/www/media/jogl-applet-demoscene-elektronenmultiplizierer01-small.png b/www/media/jogl-applet-demoscene-elektronenmultiplizierer01-small.png
new file mode 100644
index 0000000..3087379
Binary files /dev/null and b/www/media/jogl-applet-demoscene-elektronenmultiplizierer01-small.png differ
diff --git a/www/media/jogl-applet-demoscene-elektronenmultiplizierer01.png b/www/media/jogl-applet-demoscene-elektronenmultiplizierer01.png
new file mode 100644
index 0000000..c990c78
Binary files /dev/null and b/www/media/jogl-applet-demoscene-elektronenmultiplizierer01.png differ
diff --git a/www/media/jogl-applet-gearses2-normal-small.png b/www/media/jogl-applet-gearses2-normal-small.png
new file mode 100644
index 0000000..4fdf3fc
Binary files /dev/null and b/www/media/jogl-applet-gearses2-normal-small.png differ
diff --git a/www/media/jogl-applet-gearses2-normal.png b/www/media/jogl-applet-gearses2-normal.png
new file mode 100644
index 0000000..58eeda7
Binary files /dev/null and b/www/media/jogl-applet-gearses2-normal.png differ
diff --git a/www/media/jogl-applet-gearses2-translucent-small.png b/www/media/jogl-applet-gearses2-translucent-small.png
new file mode 100644
index 0000000..f100a11
Binary files /dev/null and b/www/media/jogl-applet-gearses2-translucent-small.png differ
diff --git a/www/media/jogl-applet-gearses2-translucent.png b/www/media/jogl-applet-gearses2-translucent.png
new file mode 100644
index 0000000..423830c
Binary files /dev/null and b/www/media/jogl-applet-gearses2-translucent.png differ
diff --git a/www/media/jogl-applet-graph-text01-small.png b/www/media/jogl-applet-graph-text01-small.png
new file mode 100644
index 0000000..d4c8da8
Binary files /dev/null and b/www/media/jogl-applet-graph-text01-small.png differ
diff --git a/www/media/jogl-applet-graph-text01.png b/www/media/jogl-applet-graph-text01.png
new file mode 100644
index 0000000..0bf38d1
Binary files /dev/null and b/www/media/jogl-applet-graph-text01.png differ
diff --git a/www/media/jogl-applet-graph-uiscene01-small.png b/www/media/jogl-applet-graph-uiscene01-small.png
new file mode 100644
index 0000000..7d54d7f
Binary files /dev/null and b/www/media/jogl-applet-graph-uiscene01-small.png differ
diff --git a/www/media/jogl-applet-graph-uiscene01.png b/www/media/jogl-applet-graph-uiscene01.png
new file mode 100644
index 0000000..fa54a84
Binary files /dev/null and b/www/media/jogl-applet-graph-uiscene01.png differ
diff --git a/www/media/jogl-applet-version-small.png b/www/media/jogl-applet-version-small.png
new file mode 100644
index 0000000..0f5d546
Binary files /dev/null and b/www/media/jogl-applet-version-small.png differ
diff --git a/www/media/jogl-applet-version.png b/www/media/jogl-applet-version.png
new file mode 100644
index 0000000..71b38a4
Binary files /dev/null and b/www/media/jogl-applet-version.png differ

-- 
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