diff options
15 files changed, 40 insertions, 20 deletions
diff --git a/make/build-jogl.xml b/make/build-jogl.xml index ed5919b94..e4bb28063 100644 --- a/make/build-jogl.xml +++ b/make/build-jogl.xml @@ -90,11 +90,18 @@ <property name="java.part.gluegen-gl-rt" value="com/jogamp/gluegen/runtime/opengl/*"/> + <property name="java.part.core.shadercode" + value="jogamp/opengl/shader/* jogamp/opengl/shader/bin/**"/> + + <property name="java.part.core.assets" + value="jogamp/opengl/assets/**"/> + <property name="java.part.core.util" - value="com/jogamp/opengl/util/* jogamp/opengl/util/* com/jogamp/opengl/util/glsl/* jogamp/opengl/util/glsl/* jogamp/opengl/shader/**"/> + value="com/jogamp/opengl/util/* jogamp/opengl/util/* com/jogamp/opengl/util/glsl/* jogamp/opengl/util/glsl/* ${java.part.core.shadercode} ${java.part.core.assets}"/> <property name="java.part.core" value="${java.part.gluegen-gl-rt} com/jogamp/opengl/* com/jogamp/opengl/fixedfunc/* com/jogamp/opengl/math/** jogamp/opengl/* ${java.part.core.util}"/> + <property name="java.part.core.exclude" value="com/jogamp/opengl/Debug* com/jogamp/opengl/Trace* com/jogamp/opengl/util/AWTAnimatorImpl* com/jogamp/opengl/util/PNG*"/> <property name="java.part.nv-cg" @@ -175,9 +182,6 @@ <property name="java.part.util.graph.fonts" value="jogamp/graph/font/fonts/**"/> - <property name="java.part.core.shadercode" - value="jogamp/opengl/shader/* jogamp/opengl/shader/bin/**"/> - <property name="java.part.util.shadercode" value="jogamp/opengl/util/stereo/shader/*"/> @@ -191,7 +195,7 @@ value="jogamp/opengl/util/glsl/fixedfunc/shaders/* jogamp/opengl/util/glsl/fixedfunc/shaders/bin/**"/> <property name="java.part.nonjava" - value="${java.part.core.shadercode} ${java.part.util.shadercode} ${java.part.util.fixedfuncemu.shadercode} ${java.part.util.graph.shadercode} ${java.part.util.graph.fonts}"/> + value="${java.part.core.assets} ${java.part.core.shadercode} ${java.part.util.shadercode} ${java.part.util.fixedfuncemu.shadercode} ${java.part.util.graph.shadercode} ${java.part.util.graph.fonts}"/> <!-- condition excludes --> @@ -1229,7 +1233,7 @@ <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"> - <!-- make shadercode and fonts available in classpath --> + <!-- make shadercode, fonts etc available in classpath --> <copy todir="${classes}"> <fileset dir="${src.java}" includes="${java.part.nonjava}" @@ -1950,7 +1954,6 @@ <fileset dir="${classes}" includes="${java.part.util} ${java.part.util.glsl} ${java.part.openal}" excludes="${java.part.util.awt} ${java.part.util.gldesktop} ${java.part.util.fixedfuncemu} ${java.part.util.graph}"/> - <fileset dir="resources/assets" includes="jogl/util/data/**" /> </jar> <jar manifest="${build.jogl}/manifest.mf" destfile="${jogl-util-graph.jar}" filesonly="true"> <fileset dir="${classes}" diff --git a/make/build-newt.xml b/make/build-newt.xml index 8df13ae49..15db39653 100644 --- a/make/build-newt.xml +++ b/make/build-newt.xml @@ -105,6 +105,9 @@ <property name="java.part.core" value="com/jogamp/newt/* com/jogamp/newt/event/* com/jogamp/newt/util/* com/jogamp/newt/util/applet/* jogamp/newt/* jogamp/newt/event/* jogamp/newt/driver/*"/> + <property name="java.part.core.assets" + value="jogamp/newt/assets/**"/> + <property name="java.part.opengl" value="com/jogamp/newt/opengl/** jogamp/newt/driver/opengl/**"/> @@ -156,6 +159,9 @@ <property name="java.part.driver.android" value="jogamp/newt/driver/android/**"/> + <property name="java.part.nonjava" + value="${java.part.core.assets}"/> + <!-- condition excludes --> <condition property="java.excludes.awt" @@ -441,6 +447,13 @@ <src path="${src.java}" /> <classpath refid="jogl_nativewindow_gluegen.classpath"/> </javac> + + <!-- make shadercode, fonts etc available in classpath --> + <copy todir="${classes}"> + <fileset dir="${src.java}" + includes="${java.part.nonjava}" + excludes="**/*.java"/> + </copy> </target> <target name="java.compile.android" if="android-jars.available"> @@ -1134,8 +1147,7 @@ <target name="build-jars-javase" depends="setup-manifestfile,build-jars-opengl,build-jars-awt,build-jars-swt,build-jars-javafx,build-jars-driver"> <jar manifest="${build.newt}/manifest.mf" destfile="${newt.jar}" filesonly="true"> <fileset dir="${classes}" - includes="${java.part.core}"/> - <fileset dir="resources/assets" includes="newt/data/**" /> + includes="${java.part.core} ${java.part.nonjava}"/> </jar> <jar manifest="${build.newt}/manifest.mf" destfile="${newt-event.jar}" filesonly="true"> <fileset dir="${classes}"> diff --git a/make/resources/assets/jogl/util/data/av/test-ntsc01-28x16.png b/src/jogl/classes/jogamp/opengl/assets/test-ntsc01-28x16.png Binary files differindex 4601a214e..4601a214e 100644 --- a/make/resources/assets/jogl/util/data/av/test-ntsc01-28x16.png +++ b/src/jogl/classes/jogamp/opengl/assets/test-ntsc01-28x16.png diff --git a/src/jogl/classes/jogamp/opengl/util/av/NullGLMediaPlayer.java b/src/jogl/classes/jogamp/opengl/util/av/NullGLMediaPlayer.java index 92ed2d749..59dba68f2 100644 --- a/src/jogl/classes/jogamp/opengl/util/av/NullGLMediaPlayer.java +++ b/src/jogl/classes/jogamp/opengl/util/av/NullGLMediaPlayer.java @@ -108,7 +108,7 @@ public class NullGLMediaPlayer extends GLMediaPlayerImpl { public final static TextureData createTestTextureData() { TextureData res = null; try { - final URLConnection urlConn = IOUtil.getResource("jogl/util/data/av/test-ntsc01-28x16.png", NullGLMediaPlayer.class.getClassLoader()); + final URLConnection urlConn = IOUtil.getResource("jogamp/opengl/assets/test-ntsc01-28x16.png", NullGLMediaPlayer.class.getClassLoader()); if(null != urlConn) { res = TextureIO.newTextureData(GLProfile.getGL2ES2(), urlConn.getInputStream(), false, TextureIO.PNG); } diff --git a/src/newt/classes/com/jogamp/newt/NewtFactory.java b/src/newt/classes/com/jogamp/newt/NewtFactory.java index 61d21026a..12e61d0b2 100644 --- a/src/newt/classes/com/jogamp/newt/NewtFactory.java +++ b/src/newt/classes/com/jogamp/newt/NewtFactory.java @@ -60,7 +60,7 @@ public class NewtFactory { public static final String DRIVER_DEFAULT_ROOT_PACKAGE = "jogamp.newt.driver"; private static IOUtil.ClassResources defaultWindowIcons; - private static String sysPaths = "newt/data/jogamp-16x16.png newt/data/jogamp-32x32.png"; + private static String sysPaths = "jogamp/newt/assets/jogamp-16x16.png jogamp/newt/assets/jogamp-32x32.png"; static { SecurityUtil.doPrivileged(new PrivilegedAction<Object>() { diff --git a/src/newt/classes/com/jogamp/newt/Window.java b/src/newt/classes/com/jogamp/newt/Window.java index 3a84bd79c..60ed53c9f 100644 --- a/src/newt/classes/com/jogamp/newt/Window.java +++ b/src/newt/classes/com/jogamp/newt/Window.java @@ -87,12 +87,12 @@ import com.jogamp.nativewindow.util.SurfaceSize; * The location must be resolvable via classpath, i.e. shall reference a location within the jar file. * Example (our default): * <pre> - * -Dnewt.window.icons="newt/data/jogamp-16x16.png,newt/data/jogamp-32x32.png" - * -Djnlp.newt.window.icons="newt/data/jogamp-16x16.png,newt/data/jogamp-32x32.png" + * -Dnewt.window.icons="jogamp/newt/assets/jogamp-16x16.png,jogamp/newt/assets/jogamp-32x32.png" + * -Djnlp.newt.window.icons="jogamp/newt/assets/jogamp-16x16.png,jogamp/newt/assets/jogamp-32x32.png" * </pre> * The property can also be set programmatically, which must happen before any NEWT classes are <i>touched</i>: * <pre> - * System.setProperty("newt.window.icons", "newt/data/jogamp-16x16.png, newt/data/jogamp-32x32.png"); + * System.setProperty("newt.window.icons", "jogamp/newt/assets/jogamp-16x16.png,jogamp/newt/assets/jogamp-32x32.png"); * </pre> * To disable even Jogamp's own window icons in favor of system icons, * simply set a non-existing location, e.g.: diff --git a/src/newt/classes/com/jogamp/newt/opengl/util/NEWTDemoListener.java b/src/newt/classes/com/jogamp/newt/opengl/util/NEWTDemoListener.java index aaed713a8..563c09474 100644 --- a/src/newt/classes/com/jogamp/newt/opengl/util/NEWTDemoListener.java +++ b/src/newt/classes/com/jogamp/newt/opengl/util/NEWTDemoListener.java @@ -493,7 +493,7 @@ public class NEWTDemoListener extends WindowAdapter implements KeyListener, Mous disp.createNative(); { PointerIcon _pointerIcon = null; - final IOUtil.ClassResources res = new IOUtil.ClassResources(new String[] { "newt/data/cross-grey-alpha-16x16.png" }, disp.getClass().getClassLoader(), null); + final IOUtil.ClassResources res = new IOUtil.ClassResources(new String[] { "jogamp/newt/assets/cross-grey-alpha-16x16.png" }, disp.getClass().getClassLoader(), null); try { _pointerIcon = disp.createPointerIcon(res, 8, 8); pointerIcons.add(_pointerIcon); @@ -504,7 +504,7 @@ public class NEWTDemoListener extends WindowAdapter implements KeyListener, Mous } { PointerIcon _pointerIcon = null; - final IOUtil.ClassResources res = new IOUtil.ClassResources(new String[] { "newt/data/pointer-grey-alpha-16x24.png" }, disp.getClass().getClassLoader(), null); + final IOUtil.ClassResources res = new IOUtil.ClassResources(new String[] { "jogamp/newt/assets/pointer-grey-alpha-16x24.png" }, disp.getClass().getClassLoader(), null); try { _pointerIcon = disp.createPointerIcon(res, 0, 0); pointerIcons.add(_pointerIcon); diff --git a/src/newt/classes/jogamp/newt/DisplayImpl.java b/src/newt/classes/jogamp/newt/DisplayImpl.java index 8c0240ffd..aea42b66d 100644 --- a/src/newt/classes/jogamp/newt/DisplayImpl.java +++ b/src/newt/classes/jogamp/newt/DisplayImpl.java @@ -66,6 +66,7 @@ import com.jogamp.nativewindow.util.PointImmutable; public abstract class DisplayImpl extends Display { protected static final boolean DISABLE_POINTER_ICON = PropertyAccess.isPropertyDefined("newt.disable.PointerIcon", true); + protected static final String defaultPointerIconPath = "jogamp/newt/assets/pointer-grey-alpha-16x24.png"; private static int serialno = 1; private static final boolean pngUtilAvail; @@ -123,6 +124,7 @@ public abstract class DisplayImpl extends Display { final Exception[] ex = { null }; final String exStr = "Could not resolve "+pngResource.resourcePaths[0]; runOnEDTIfAvail(true, new Runnable() { + @Override public void run() { try { if( !DisplayImpl.this.isNativeValidAsync() ) { @@ -198,6 +200,7 @@ public abstract class DisplayImpl extends Display { } final PointerIconImpl[] res = { null }; runOnEDTIfAvail(true, new Runnable() { + @Override public void run() { try { if( !DisplayImpl.this.isNativeValidAsync() ) { diff --git a/make/resources/assets/newt/data/cross-grey-alpha-16x16.png b/src/newt/classes/jogamp/newt/assets/cross-grey-alpha-16x16.png Binary files differindex 303c454fa..303c454fa 100644 --- a/make/resources/assets/newt/data/cross-grey-alpha-16x16.png +++ b/src/newt/classes/jogamp/newt/assets/cross-grey-alpha-16x16.png diff --git a/make/resources/assets/newt/data/jogamp-16x16.png b/src/newt/classes/jogamp/newt/assets/jogamp-16x16.png Binary files differindex 02df8997f..02df8997f 100644 --- a/make/resources/assets/newt/data/jogamp-16x16.png +++ b/src/newt/classes/jogamp/newt/assets/jogamp-16x16.png diff --git a/make/resources/assets/newt/data/jogamp-32x32.png b/src/newt/classes/jogamp/newt/assets/jogamp-32x32.png Binary files differindex ab21c6e1b..ab21c6e1b 100644 --- a/make/resources/assets/newt/data/jogamp-32x32.png +++ b/src/newt/classes/jogamp/newt/assets/jogamp-32x32.png diff --git a/make/resources/assets/newt/data/pointer-grey-alpha-16x24.png b/src/newt/classes/jogamp/newt/assets/pointer-grey-alpha-16x24.png Binary files differindex 98b2c8640..98b2c8640 100644 --- a/make/resources/assets/newt/data/pointer-grey-alpha-16x24.png +++ b/src/newt/classes/jogamp/newt/assets/pointer-grey-alpha-16x24.png diff --git a/src/newt/classes/jogamp/newt/driver/bcm/vc/iv/DisplayDriver.java b/src/newt/classes/jogamp/newt/driver/bcm/vc/iv/DisplayDriver.java index 8a29f96f6..7eabbc3ee 100644 --- a/src/newt/classes/jogamp/newt/driver/bcm/vc/iv/DisplayDriver.java +++ b/src/newt/classes/jogamp/newt/driver/bcm/vc/iv/DisplayDriver.java @@ -67,7 +67,7 @@ public class DisplayDriver extends DisplayImpl { PNGPixelRect image = null; if( DisplayImpl.isPNGUtilAvailable() ) { - final IOUtil.ClassResources res = new IOUtil.ClassResources(new String[] { "newt/data/pointer-grey-alpha-16x24.png" }, DisplayDriver.class.getClassLoader(), null); + final IOUtil.ClassResources res = new IOUtil.ClassResources(new String[] { defaultPointerIconPath }, DisplayDriver.class.getClassLoader(), null); try { final URLConnection urlConn = res.resolve(0); if( null != urlConn ) { diff --git a/src/newt/classes/jogamp/newt/driver/egl/gbm/DisplayDriver.java b/src/newt/classes/jogamp/newt/driver/egl/gbm/DisplayDriver.java index 19e44b830..222adebf1 100644 --- a/src/newt/classes/jogamp/newt/driver/egl/gbm/DisplayDriver.java +++ b/src/newt/classes/jogamp/newt/driver/egl/gbm/DisplayDriver.java @@ -70,7 +70,7 @@ public class DisplayDriver extends DisplayImpl { PNGPixelRect image = null; if( DisplayImpl.isPNGUtilAvailable() ) { - final IOUtil.ClassResources res = new IOUtil.ClassResources(new String[] { "newt/data/pointer-grey-alpha-16x24.png" }, DisplayDriver.class.getClassLoader(), null); + final IOUtil.ClassResources res = new IOUtil.ClassResources(new String[] { defaultPointerIconPath }, DisplayDriver.class.getClassLoader(), null); try { final URLConnection urlConn = res.resolve(0); if( null != urlConn ) { diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestGearsES2SimpleNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestGearsES2SimpleNEWT.java index d87a18b2f..262d71092 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestGearsES2SimpleNEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es2/newt/TestGearsES2SimpleNEWT.java @@ -109,10 +109,12 @@ public class TestGearsES2SimpleNEWT extends UITestCase { glWindow.addWindowListener(quitAdapter); glWindow.addWindowListener(new WindowAdapter() { + @Override public void windowResized(final WindowEvent e) { System.err.println("window resized: "+glWindow.getX()+"/"+glWindow.getY()+" "+glWindow.getSurfaceWidth()+"x"+glWindow.getSurfaceHeight()); setTitle(glWindow, caps); } + @Override public void windowMoved(final WindowEvent e) { System.err.println("window moved: "+glWindow.getX()+"/"+glWindow.getY()+" "+glWindow.getSurfaceWidth()+"x"+glWindow.getSurfaceHeight()); setTitle(glWindow, caps); @@ -126,7 +128,7 @@ public class TestGearsES2SimpleNEWT extends UITestCase { int idx = 0; { PointerIcon _pointerIcon = null; - final IOUtil.ClassResources res = new IOUtil.ClassResources(new String[] { "newt/data/cross-grey-alpha-16x16.png" }, glWindow.getClass().getClassLoader(), null); + final IOUtil.ClassResources res = new IOUtil.ClassResources(new String[] { "jogamp/newt/assets/cross-grey-alpha-16x16.png" }, glWindow.getClass().getClassLoader(), null); try { _pointerIcon = disp.createPointerIcon(res, 8, 8); System.err.printf("Create PointerIcon #%02d: %s%n", idx, _pointerIcon.toString()); @@ -138,7 +140,7 @@ public class TestGearsES2SimpleNEWT extends UITestCase { idx++; { PointerIcon _pointerIcon = null; - final IOUtil.ClassResources res = new IOUtil.ClassResources(new String[] { "newt/data/pointer-grey-alpha-16x24.png" }, glWindow.getClass().getClassLoader(), null); + final IOUtil.ClassResources res = new IOUtil.ClassResources(new String[] { "jogamp/newt/assets/pointer-grey-alpha-16x24.png" }, glWindow.getClass().getClassLoader(), null); try { _pointerIcon = disp.createPointerIcon(res, 0, 0); System.err.printf("Create PointerIcon #%02d: %s%n", idx, _pointerIcon.toString()); |