diff options
author | Sven Gothel <[email protected]> | 2013-12-01 20:05:01 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-12-01 20:05:01 +0100 |
commit | 11a4a3a7b120c6f7c34a717828da49e3a13f4a3b (patch) | |
tree | 3d91ae4572e36008e3bc32503282070449560aba | |
parent | efc158abbb2c282029aaa746e032ec678e374d7b (diff) |
GLJPanel.initializeBackend(offthread=true): Enable on Windows, thanks to Bug 907 impl. DummyDispatchThread (DDT)
Bug 907 implemented DDT used to create and destroy offscreen surface's dummy drawable on Windows.
This enables offscreen initialization on Windows running from a short lived arbitrary thread.
-rwxr-xr-x | make/scripts/tests-win.bat | 4 | ||||
-rw-r--r-- | make/scripts/tests.sh | 4 | ||||
-rw-r--r-- | src/jogl/classes/javax/media/opengl/awt/GLJPanel.java | 10 |
3 files changed, 4 insertions, 14 deletions
diff --git a/make/scripts/tests-win.bat b/make/scripts/tests-win.bat index d95b0025f..d0c3f5d2e 100755 --- a/make/scripts/tests-win.bat +++ b/make/scripts/tests-win.bat @@ -6,7 +6,7 @@ REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.acore.TestMainVersion REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.demos.gl2.newt.TestGearsNewtAWTWrapper %* REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.demos.gl2.newt.TestGearsNEWT -time 30000 REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.demos.es1.newt.TestGearsES1NEWT %* -scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NEWT %* +REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NEWT %* REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NEWT -vsync -time 4000 -x 10 -y 10 -width 100 -height 100 -screen 0 REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NEWT -vsync -time 40000 -width 100 -height 100 -screen 0 %* REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.demos.gl2.awt.TestGearsAWT -time 5000 @@ -24,7 +24,7 @@ REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.demos.es2.TexCubeES2 REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.perf.TestPerf001RawInit00NEWT %* REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.perf.TestPerf001GLJPanelInit01AWT %* -REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.perf.TestPerf001GLJPanelInit02AWT %* +scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.perf.TestPerf001GLJPanelInit02AWT %* REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.perf.TestPerf001GLWindowInit03NEWT %* REM scripts\java-win.bat com.jogamp.opengl.test.junit.jogl.tile.TestTiledRendering1GL2NEWT %* diff --git a/make/scripts/tests.sh b/make/scripts/tests.sh index 56a07e768..601ede4e4 100644 --- a/make/scripts/tests.sh +++ b/make/scripts/tests.sh @@ -325,7 +325,7 @@ function testawtswt() { #testawt com.jogamp.opengl.test.junit.jogl.demos.es2.awt.TestGearsES2GLJPanelsAWT $* #testawt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NewtCanvasAWT $* #testawt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestLandscapeES2NewtCanvasAWT $* -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.acore.TestGLProfile00NEWT $* #testnoawt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestLandscapeES2NEWT $* #testawtswt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NewtCanvasSWT $* @@ -355,7 +355,7 @@ testnoawt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NEWT $* # #testnoawt com.jogamp.opengl.test.junit.jogl.perf.TestPerf001RawInit00NEWT $* #testawt com.jogamp.opengl.test.junit.jogl.perf.TestPerf001GLJPanelInit01AWT $* -#testawt com.jogamp.opengl.test.junit.jogl.perf.TestPerf001GLJPanelInit02AWT $* +testawt com.jogamp.opengl.test.junit.jogl.perf.TestPerf001GLJPanelInit02AWT $* #testnoawt com.jogamp.opengl.test.junit.jogl.perf.TestPerf001GLWindowInit03NEWT $* # diff --git a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java index 70dd8b99d..8670c3746 100644 --- a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java +++ b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java @@ -58,7 +58,6 @@ import java.util.List; import javax.media.nativewindow.AbstractGraphicsDevice; import javax.media.nativewindow.NativeSurface; -import javax.media.nativewindow.NativeWindowFactory; import javax.media.nativewindow.WindowClosingProtocol; import javax.media.opengl.GL; import javax.media.opengl.GL2; @@ -361,12 +360,6 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing * <code>true</code>, otherwise <code>false</code>. * </p> * <p> - * Due to threading restrictions, <i>arbitrary thread</i> initialization is <i>not supported</i> on: - * <ul> - * <li>{@link NativeWindowFactory.TYPE_WINDOWS}</li> - * </ul> - * </p> - * <p> * If <code>offthread</code> is <code>false</code>, initialization be performed * on the current thread and method returns after initialization.<br/> * Method returns <code>true</code> if initialization was successful, otherwise <code>false</code>. @@ -375,9 +368,6 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing */ public final boolean initializeBackend(boolean offthread) { if( offthread ) { - if( NativeWindowFactory.TYPE_WINDOWS == NativeWindowFactory.getNativeWindowType(true) ) { - return false; - } new Thread(getThreadName()+"-GLJPanel_Init") { public void run() { if( !isInitialized ) { |