aboutsummaryrefslogtreecommitdiffstats
path: root/make
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2019-03-19 11:40:34 +0100
committerSven Gothel <[email protected]>2019-03-19 11:40:34 +0100
commita4ec6556f9ef3a409cceb9bfdb0d19dfc7d98d4a (patch)
treeef9d0b6ea56e890712e97437f3c56659ea1a9506 /make
parenta98ef342cc03a92692584a35291724d7b05c3370 (diff)
JavaFX: Adding JavaFX Support for NEWT utilizing native Window parenting via NewtCanvasJFX
NewtCanvasJFX, a JavaFX Canvas Node, allows attaching a native NEWT Window to the JavaFX Node's native Window (if attached). The mechanism is similar to NewtCanvasAWT. Current implementation supports placing the NEWT Window into the JavaFX scene of the native window correctly, as well as the following different lifecycles - attach NewtCanvasJFX to already visible group->scene->window - attach NewtCanvasJFX to not yet visible or attached group->scene->window - attach NEWT Window before or after NewtCanvasJFX's visibility The above is covered by unit test: TestNewtCanvasJFXGLn This is the initial commit for JavaFX support and has been tested on - OpenJDK 8 + OpenJFX 8 - GNU/Linux X11
Diffstat (limited to 'make')
-rw-r--r--make/build-common.xml2
-rw-r--r--make/build-nativewindow.xml2
-rw-r--r--make/build-newt.xml19
-rw-r--r--make/scripts/tests.sh18
4 files changed, 37 insertions, 4 deletions
diff --git a/make/build-common.xml b/make/build-common.xml
index 3abebc949..0205e1e99 100644
--- a/make/build-common.xml
+++ b/make/build-common.xml
@@ -391,6 +391,7 @@
<property name="newt-ogl.jar" value="${build.newt}/newt-ogl.jar" />
<property name="newt-awt.jar" value="${build.newt}/newt-awt.jar" />
<property name="newt-swt.jar" value="${build.newt}/newt-swt.jar" />
+ <property name="newt-javafx.jar" value="${build.newt}/newt-javafx.jar" />
<property name="newt-event.jar" value="${build.newt}/newt-event.jar" /> <!-- using NEWT events w/o NEWT -->
<property name="newt-driver-linux.jar" value="${build.newt}/newt-driver-linux.jar" />
<property name="newt-driver-x11.jar" value="${build.newt}/newt-driver-x11.jar" />
@@ -406,6 +407,7 @@
<pathelement location="${newt-ogl.jar}" />
<pathelement location="${newt-awt.jar}" />
<pathelement location="${newt-swt.jar}" />
+ <pathelement location="${newt-javafx.jar}" />
<pathelement location="${newt-driver-linux.jar}" />
<pathelement location="${newt-driver-x11.jar}" />
<pathelement location="${newt-driver-win.jar}" />
diff --git a/make/build-nativewindow.xml b/make/build-nativewindow.xml
index 216ae461f..b4d7858a7 100644
--- a/make/build-nativewindow.xml
+++ b/make/build-nativewindow.xml
@@ -67,7 +67,7 @@
<!-- partitioning -->
<property name="java.part.core"
- value="com/jogamp/nativewindow/* com/jogamp/nativewindow/util/* com/jogamp/nativewindow/egl/* com/jogamp/nativewindow/swt/** jogamp/nativewindow/*"/>
+ value="com/jogamp/nativewindow/* com/jogamp/nativewindow/util/* com/jogamp/nativewindow/egl/* com/jogamp/nativewindow/swt/** com/jogamp/nativewindow/javafx/** jogamp/nativewindow/*"/>
<property name="java.part.awt"
value="com/jogamp/nativewindow/awt/* jogamp/nativewindow/jawt/** jogamp/nativewindow/**/awt/**"/>
diff --git a/make/build-newt.xml b/make/build-newt.xml
index ec7a8a789..b19aa8fc4 100644
--- a/make/build-newt.xml
+++ b/make/build-newt.xml
@@ -114,6 +114,9 @@
<property name="java.part.swt"
value="com/jogamp/newt/swt/** jogamp/newt/swt/**"/>
+ <property name="java.part.javafx"
+ value="com/jogamp/newt/javafx/** jogamp/newt/javafx/**"/>
+
<property name="java.part.applet3"
value="com/jogamp/newt/util/applet3/**"/>
@@ -156,6 +159,11 @@
<isset property="setup.noSWT"/>
</condition>
+ <condition property="java.excludes.javafx"
+ value="${java.part.javafx}">
+ <isset property="setup.noJFX"/>
+ </condition>
+
<condition property="java.excludes.applet3"
value="${java.part.applet3}">
<not>
@@ -167,7 +175,7 @@
<isset property="setup.noOpenGL"/>
</condition>
- <property name="java.excludes.all" value="${java.excludes.awt}, ${java.excludes.swt}, ${java.excludes.applet3}, ${java.excludes.opengl}" />
+ <property name="java.excludes.all" value="${java.excludes.awt}, ${java.excludes.swt}, ${java.excludes.javafx}, ${java.excludes.applet3}, ${java.excludes.opengl}" />
<echo message="java.excludes.all: ${java.excludes.all}" />
</target>
@@ -806,6 +814,13 @@
</jar>
</target>
+ <target name="build-jars-javafx" depends="setup-manifestfile" unless="setup.noJFX">
+ <jar manifest="${build.newt}/manifest.mf" destfile="${newt-javafx.jar}" filesonly="true">
+ <fileset dir="${classes}"
+ includes="${java.part.javafx}"/>
+ </jar>
+ </target>
+
<target name="build-jars-opengl" depends="setup-manifestfile" unless="setup.noOpenGL">
<jar manifest="${build.newt}/manifest.mf" destfile="${newt-ogl.jar}" filesonly="true">
<fileset dir="${classes}"
@@ -848,7 +863,7 @@
</jar>
</target>
- <target name="build-jars-javase" depends="setup-manifestfile,build-jars-opengl,build-jars-awt,build-jars-swt,build-jars-driver">
+ <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}"/>
diff --git a/make/scripts/tests.sh b/make/scripts/tests.sh
index a5ac7c844..ffaaa7554 100644
--- a/make/scripts/tests.sh
+++ b/make/scripts/tests.sh
@@ -126,6 +126,7 @@ function jrun() {
#D_ARGS="-Dnativewindow.debug.X11Util.ATI_HAS_NO_XCLOSEDISPLAY_BUG"
#D_ARGS="-Dnativewindow.debug.X11Util.ATI_HAS_NO_MULTITHREADING_BUG"
+ D_ARGS="-Dnativewindow.debug.JFX -Dnewt.debug.Window"
#D_ARGS="-Djogl.disable.opengldesktop"
#D_ARGS="-Djogl.disable.opengles"
#D_ARGS="-Djogl.disable.openglcore"
@@ -398,6 +399,11 @@ function testnoawt() {
jrun 0 0 $* 2>&1 | tee -a java-run.log
}
+function testjfx() {
+ MOSX_MT=0
+ jrun 1 0 $* 2>&1 | tee -a java-run.log
+}
+
function testawt() {
MOSX_MT=0
jrun 1 0 $* 2>&1 | tee -a java-run.log
@@ -441,7 +447,7 @@ function testawtswt() {
#
# HiDPI
#
-testnoawt 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.es2.newt.TestGearsES2SimpleNEWT $*
#testawt com.jogamp.opengl.test.junit.jogl.demos.es2.awt.TestGearsES2GLJPanelAWT $*
#testawt com.jogamp.opengl.test.junit.jogl.demos.es2.awt.TestGearsES2AWT $*
@@ -836,6 +842,12 @@ testnoawt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NEWT $*
#testnoawt com.jogamp.opengl.test.junit.newt.parenting.TestTranslucentChildWindowBug632NEWT $*
#
+# JavaFX (testjfx)
+#
+#testjfx com.jogamp.opengl.test.junit.jogl.javafx.JFXStageGLChild01 $*
+testjfx com.jogamp.opengl.test.junit.jogl.javafx.TestNewtCanvasJFXGLn $*
+
+#
# Misc Utils
#
#testnoawt com.jogamp.opengl.test.junit.jogl.util.TestImmModeSinkES1NEWT $*
@@ -928,6 +940,10 @@ testnoawt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NEWT $*
#testnoawt com.jogamp.opengl.test.junit.newt.mm.TestScreenMode02aNEWT $*
#testnoawt com.jogamp.opengl.test.junit.newt.mm.TestScreenMode02bNEWT $*
+# caused a freeze/crash on OSX
+#testawt com.jogamp.opengl.test.junit.jogl.awt.TestGLCanvasAWTActionDeadlock02AWT $*
+#testawt com.jogamp.opengl.test.junit.jogl.perf.TestPerf001GLJPanelInit02AWT $*
+
# NEW
$spath/count-edt-start.sh java-run.log