From 0906140a18690a9dced8dec12dfdd8cf4c95a4df Mon Sep 17 00:00:00 2001 From: sg215889 Date: Fri, 24 Jul 2009 07:29:28 -0700 Subject: Add: Extended support for CVM crosscompile: - Clean up X11 dependency - NativeWindow: - Seperate X11 out of core. - Add nativewindow.x11.jar and nativewindow.x11.cdc.jar - Newt: - Seperate X11,win,osx out of core. - Add newt.x11.jar, newt.win.jar, newt.osx.jar and the CDC variants Fix: External Context & Drawable (X11 and Windows) - Properly fetch current context values (ctx, display, drawable, ..) - Create GraphicsConfiguration based on the given pixelformat/FBConfig Fix: Java2D OpenGL Usage - Using the external context as shared for the external drawable - JAWTUtil: Skip locking in case of OGL-Flush-Queue - TODO: Windows FBO still does not work .. (X11 is fine) --- etc/profile.jogl | 2 +- jnlp-files/jogl-all-awt.jnlp | 4 +- jnlp-files/jogl-all.jnlp | 66 ----- jnlp-files/jogl-awt.jnlp | 2 +- jnlp-files/jogl-core.jnlp | 2 +- jnlp-files/jogl-gl2es12.jnlp | 2 +- jnlp-files/nativewindow-all-awt.jnlp | 64 +++++ jnlp-files/nativewindow-awt.jnlp | 51 +--- jnlp-files/nativewindow.jnlp | 13 +- jnlp-files/newt-all-awt.jnlp | 64 +++++ jnlp-files/newt-awt.jnlp | 4 +- jnlp-files/newt-jogl.jnlp | 4 +- jnlp-files/newt.jnlp | 18 +- make/build-jogl.xml | 172 ++++++++----- make/build-nativewindow.xml | 204 ++++++++------- make/build-newt.xml | 144 +++++++++-- make/make.jogl.all.linux-x86.sh | 1 + make/nativewindowRIversion-cdc | 8 + make/nativewindowversion-cdc | 8 + .../classes/com/sun/opengl/impl/awt/AWTUtil.java | 16 +- .../classes/com/sun/opengl/impl/awt/Java2D.java | 3 +- .../impl/windows/wgl/WindowsDummyWGLDrawable.java | 4 +- .../windows/wgl/WindowsExternalWGLContext.java | 57 ++++- .../windows/wgl/WindowsExternalWGLDrawable.java | 24 +- .../windows/wgl/WindowsOffscreenWGLDrawable.java | 8 +- .../windows/wgl/WindowsOnscreenWGLDrawable.java | 48 ---- .../windows/wgl/WindowsPbufferWGLDrawable.java | 26 +- .../impl/windows/wgl/WindowsWGLDrawable.java | 53 +++- .../windows/wgl/WindowsWGLDrawableFactory.java | 6 +- .../wgl/WindowsWGLGraphicsConfiguration.java | 94 +++++-- .../WindowsWGLGraphicsConfigurationFactory.java | 279 +++++++++++---------- .../opengl/impl/x11/glx/X11ExternalGLXContext.java | 48 +++- .../impl/x11/glx/X11ExternalGLXDrawable.java | 192 ++++---------- .../com/sun/opengl/impl/x11/glx/X11GLXContext.java | 99 +++++--- .../sun/opengl/impl/x11/glx/X11GLXDrawable.java | 24 ++ .../opengl/impl/x11/glx/X11GLXDrawableFactory.java | 6 +- .../impl/x11/glx/X11GLXGraphicsConfiguration.java | 184 ++++++-------- .../glx/X11GLXGraphicsConfigurationFactory.java | 49 ++-- .../impl/x11/glx/X11OffscreenGLXContext.java | 12 +- .../impl/x11/glx/X11OffscreenGLXDrawable.java | 8 +- .../impl/x11/glx/X11OnscreenGLXDrawable.java | 19 -- .../opengl/impl/x11/glx/X11PbufferGLXDrawable.java | 5 +- src/jogl/classes/com/sun/opengl/util/FBObject.java | 28 ++- .../media/opengl/DefaultGLCapabilitiesChooser.java | 5 +- .../classes/javax/media/opengl/GLCapabilities.java | 14 +- .../classes/javax/media/opengl/awt/GLJPanel.java | 151 ++++++----- .../com/sun/nativewindow/impl/NullWindow.java | 9 +- .../com/sun/nativewindow/impl/jawt/JAWTUtil.java | 44 +++- .../javax/media/nativewindow/Capabilities.java | 23 +- .../media/nativewindow/NativeWindowFactory.java | 10 +- .../media/nativewindow/x11/X11GraphicsDevice.java | 2 - .../media/nativewindow/x11/X11GraphicsScreen.java | 4 +- 52 files changed, 1391 insertions(+), 996 deletions(-) delete mode 100644 jnlp-files/jogl-all.jnlp create mode 100644 jnlp-files/nativewindow-all-awt.jnlp create mode 100644 jnlp-files/newt-all-awt.jnlp create mode 100644 make/nativewindowRIversion-cdc create mode 100644 make/nativewindowversion-cdc diff --git a/etc/profile.jogl b/etc/profile.jogl index 5ed6e01d7..c1daef85d 100755 --- a/etc/profile.jogl +++ b/etc/profile.jogl @@ -28,7 +28,7 @@ uname -a | grep -i Darwin && OSS=osx JOGL_AWT="jogl.awt.jar jogl.util.awt.jar newt.awt.jar nativewindow.awt.jar" -JOGL_CORE="nativewindow.core.jar jogl.core.jar newt.core.jar newt.ogl.jar jogl.util.jar" +JOGL_CORE="nativewindow.core.jar nativewindow.x11.jar jogl.core.jar newt.core.jar newt.$OSS.jar newt.ogl.jar jogl.util.jar" JOGL_JAR_ALL="$JOGL_CORE jogl.gles1.jar jogl.gles1.dbg.jar jogl.gles2.jar jogl.gles2.dbg.jar jogl.egl.jar jogl.gl2es12.$OSS.jar jogl.gl2es12.dbg.jar jogl.gl2.$OSS.jar jogl.gl2.dbg.jar jogl.util.gl2.jar jogl.glu.tess.jar jogl.glu.mipmap.jar jogl.glu.gl2.jar jogl.util.gl2.jar jogl.util.fixedfuncemu.jar $JOGL_AWT jogl.cg.jar" JOGL_LIB_ALL="libjogl_gl2.so libjogl_es1.so libjogl_es2.so libnewt.so libjogl_awt.so" diff --git a/jnlp-files/jogl-all-awt.jnlp b/jnlp-files/jogl-all-awt.jnlp index 9c5962581..125980882 100644 --- a/jnlp-files/jogl-all-awt.jnlp +++ b/jnlp-files/jogl-all-awt.jnlp @@ -5,7 +5,7 @@ Java(tm) Binding to the OpenGL(r) API (ALL.AWT) Sun Microsystems, Inc. - Java Binding to the OpenGL API - JSR-231 2.0.0 (beta2) - ALL.AWT + Java Binding to the OpenGL API - JSR-231 2.0.0 - ALL.AWT Java programming language binding for the OpenGL 3D graphics API - ALL.AWT @@ -16,7 +16,7 @@ - + diff --git a/jnlp-files/jogl-all.jnlp b/jnlp-files/jogl-all.jnlp deleted file mode 100644 index 744492675..000000000 --- a/jnlp-files/jogl-all.jnlp +++ /dev/null @@ -1,66 +0,0 @@ - - - - Java(tm) Binding to the OpenGL(r) API (ALL) - Sun Microsystems, Inc. - - Java Binding to the OpenGL API - JSR-231 2.0.0 (beta2) - ALL - Java programming language binding for the OpenGL 3D graphics API - ALL. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jnlp-files/jogl-awt.jnlp b/jnlp-files/jogl-awt.jnlp index b77e40e04..03c61b37a 100644 --- a/jnlp-files/jogl-awt.jnlp +++ b/jnlp-files/jogl-awt.jnlp @@ -5,7 +5,7 @@ Java(tm) Binding to the OpenGL(r) API (AWT) Sun Microsystems, Inc. - Java Binding to the OpenGL API - JSR-231 2.0.0 (beta2) - AWT + Java Binding to the OpenGL API - JSR-231 2.0.0 - AWT Java programming language binding for the OpenGL 3D graphics API - AWT. diff --git a/jnlp-files/jogl-core.jnlp b/jnlp-files/jogl-core.jnlp index 8f6832e42..c1dbcfc1d 100644 --- a/jnlp-files/jogl-core.jnlp +++ b/jnlp-files/jogl-core.jnlp @@ -5,7 +5,7 @@ Java(tm) Binding to the OpenGL(r) API (CORE) Sun Microsystems, Inc. - Java Binding to the OpenGL API - JSR-231 2.0.0 (beta2) - CORE + Java Binding to the OpenGL API - JSR-231 2.0.0 - CORE Java programming language binding for the OpenGL 3D graphics API - CORE. diff --git a/jnlp-files/jogl-gl2es12.jnlp b/jnlp-files/jogl-gl2es12.jnlp index 2ae20531e..25402adcb 100644 --- a/jnlp-files/jogl-gl2es12.jnlp +++ b/jnlp-files/jogl-gl2es12.jnlp @@ -5,7 +5,7 @@ Java(tm) Binding to the OpenGL(r) API (GL2ES12) Sun Microsystems, Inc. - Java Binding to the OpenGL API - JSR-231 2.0.0 (beta2) - GL2ES12 + Java Binding to the OpenGL API - JSR-231 2.0.0 - GL2ES12 Java programming language binding for the OpenGL 3D graphics API - GL2ES12. diff --git a/jnlp-files/nativewindow-all-awt.jnlp b/jnlp-files/nativewindow-all-awt.jnlp new file mode 100644 index 000000000..f22166ecb --- /dev/null +++ b/jnlp-files/nativewindow-all-awt.jnlp @@ -0,0 +1,64 @@ + + + + Java(tm) NativeWindow Interface API (ALL.AWT) + Sun Microsystems, Inc. + + Java API for a binding to a native windowing system - 2.0 - ALL.AWT + Java API for a binding to a native windowing system - 2.0 - ALL.AWT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jnlp-files/nativewindow-awt.jnlp b/jnlp-files/nativewindow-awt.jnlp index b78dad9e4..aa07c3a24 100644 --- a/jnlp-files/nativewindow-awt.jnlp +++ b/jnlp-files/nativewindow-awt.jnlp @@ -5,59 +5,16 @@ Java(tm) NativeWindow Interface API (AWT) Sun Microsystems, Inc. - Java API for a binding to a native windowing system - 2.0 (beta2) - AWT - Java API for a binding to a native windowing system - 2.0 (beta2) - AWT + Java API for a binding to a native windowing system - 2.0 - AWT + Java API for a binding to a native windowing system - 2.0 - AWT - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + diff --git a/jnlp-files/nativewindow.jnlp b/jnlp-files/nativewindow.jnlp index e49d6c4ac..60a07aede 100644 --- a/jnlp-files/nativewindow.jnlp +++ b/jnlp-files/nativewindow.jnlp @@ -5,8 +5,8 @@ Java(tm) NativeWindow Interface API (CORE) Sun Microsystems, Inc. - Java API for a binding to a native windowing system - 2.0 (beta2) - CORE - Java API for a binding to a native windowing system - 2.0 (beta2) - CORE + Java API for a binding to a native windowing system - 2.0 - CORE + Java API for a binding to a native windowing system - 2.0 - CORE @@ -27,30 +27,39 @@ + + + + + + + + + diff --git a/jnlp-files/newt-all-awt.jnlp b/jnlp-files/newt-all-awt.jnlp new file mode 100644 index 000000000..7378e8ca2 --- /dev/null +++ b/jnlp-files/newt-all-awt.jnlp @@ -0,0 +1,64 @@ + + + + NEWT - New Windowing Toolkit (ALL.AWT) + Sun Microsystems, Inc. + + NEWT - A NativeWindow Interface implementation - ALL.AWT + NEWT - A NativeWindow Interface implementation - ALL.AWT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jnlp-files/newt-awt.jnlp b/jnlp-files/newt-awt.jnlp index 9df4e9495..28bb8e706 100644 --- a/jnlp-files/newt-awt.jnlp +++ b/jnlp-files/newt-awt.jnlp @@ -5,8 +5,8 @@ NEWT - New Windowing Toolkit (AWT) Sun Microsystems, Inc. - NEWT - A NativeWindow Interface implementation (beta2) - AWT - NEWT - A NativeWindow Interface implementation (beta2) - AWT + NEWT - A NativeWindow Interface implementation - AWT + NEWT - A NativeWindow Interface implementation - AWT diff --git a/jnlp-files/newt-jogl.jnlp b/jnlp-files/newt-jogl.jnlp index ed5cc6d35..1ac69781a 100644 --- a/jnlp-files/newt-jogl.jnlp +++ b/jnlp-files/newt-jogl.jnlp @@ -5,8 +5,8 @@ NEWT - New Windowing Toolkit (JOGL) Sun Microsystems, Inc. - NEWT - A NativeWindow Interface implementation (beta2) - JOGL - NEWT - A NativeWindow Interface implementation (beta2) - JOGL + NEWT - A NativeWindow Interface implementation - JOGL + NEWT - A NativeWindow Interface implementation - JOGL diff --git a/jnlp-files/newt.jnlp b/jnlp-files/newt.jnlp index 538760369..cb6899256 100644 --- a/jnlp-files/newt.jnlp +++ b/jnlp-files/newt.jnlp @@ -5,8 +5,8 @@ NEWT - New Windowing Toolkit (CORE) Sun Microsystems, Inc. - NEWT - A NativeWindow Interface implementation (beta2) - CORE - NEWT - A NativeWindow Interface implementation (beta2) - CORE + NEWT - A NativeWindow Interface implementation - CORE + NEWT - A NativeWindow Interface implementation - CORE @@ -18,45 +18,59 @@ + + + + + + + + + + + + + + diff --git a/make/build-jogl.xml b/make/build-jogl.xml index f68f82a85..c48745da7 100644 --- a/make/build-jogl.xml +++ b/make/build-jogl.xml @@ -51,10 +51,14 @@ - - Some environment defs affecting compilation + - setup.noAWT is set iff: + !isWindows && !isOSX && !noX11 + - Internal settings, may not be necessary to set them manually, since all JAR archives are orthogonal. setup.noAWT setup.noCDC + --> @@ -73,6 +77,34 @@ --> + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -183,7 +215,12 @@ - + + + + + @@ -263,9 +300,13 @@ - + + + + + @@ -341,14 +382,16 @@ + + - - + + - + - + - + - + + + + + + + + + + + + + - - + + + + - - + - - + - + - - - - - - - - - @@ -1731,7 +1780,32 @@ - + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + @@ -1822,18 +1892,6 @@ - - - - - - - - - - - diff --git a/make/build-nativewindow.xml b/make/build-nativewindow.xml index d6d57bce0..79e6b93ae 100644 --- a/make/build-nativewindow.xml +++ b/make/build-nativewindow.xml @@ -44,20 +44,12 @@ - - Some environment defs affecting compilation - setup.cdcfp - Using the CDC Java runtime library - - no DoubleBuffer - - no LongBuffer - - This will set - -> setup.noAWT + - setup.noAWT is set iff: + !isWindows && !isOSX && !noX11 - Internal settings, may not be necessary to set them manually, since all JAR archives are orthogonal. setup.noAWT - setup.noX11WindowsMacOsX, which implies: - setup.noX11 - setup.noWindows - setup.noMacOsX --> @@ -77,66 +69,48 @@ - - - - - - - + + + + + - - - - - - - - - + + + + + - - - + + + + - - - + - - - - - - - - + + + + - - - - + value="javax/media/nativewindow/*, javax/media/nativewindow/egl/*, javax/media/nativewindow/macosx/*, javax/media/nativewindow/windows/*, com/sun/nativewindow/impl/*, com/sun/nativewindow/impl/jvm/*"/> - + - - - + - - + + - - - - - - - - - - - - - + @@ -233,6 +192,7 @@ + @@ -242,10 +202,12 @@ + + @@ -285,9 +247,12 @@ + + + @@ -315,11 +280,13 @@ + + @@ -337,7 +304,6 @@ - @@ -393,6 +359,10 @@ emitter="com.sun.gluegen.JavaEmitter"> + + + @@ -409,6 +379,10 @@ emitter="com.sun.gluegen.JavaEmitter"> + + + @@ -468,22 +442,22 @@ - Compile the original and generated source. The composable pipelines - will be generated. --> - + - - + - + - + - + @@ -848,6 +822,29 @@ + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + - + + excludes="${java.part.awt} ${java.part.x11}"/> - - + + + + + + + + @@ -69,15 +73,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + value="com/sun/javafx/newt/*, com/sun/javafx/newt/util/*, com/sun/javafx/newt/impl/*"/> + + + + + + @@ -99,7 +139,12 @@ - + + + + + @@ -161,9 +206,16 @@ - + + + + + + + + @@ -182,28 +234,35 @@ + + - - - + + - - + + + + + + + + @@ -510,13 +569,18 @@ - - - - - + + + + + + + + + + - - + + + + + + + + + + + + + + + includes="${java.part.x11}"/> + + + + + + + + + + + + + + + - + - - - + + + + + +