From a831e7d5c5a9c1e82f70713f7d07946cfc562041 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sun, 26 Sep 2010 02:02:59 +0200 Subject: NEWT: Fix destruction of not yet realized Window/Screen/Display ; Bug411 Test: Add parallel NEWT animation. --- .../awt/TestSwingAWTUsageBeforeJOGLInitBug411.java | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/junit/com/jogamp/test') diff --git a/src/junit/com/jogamp/test/junit/jogl/awt/TestSwingAWTUsageBeforeJOGLInitBug411.java b/src/junit/com/jogamp/test/junit/jogl/awt/TestSwingAWTUsageBeforeJOGLInitBug411.java index 8f0216fe7..6dea35769 100644 --- a/src/junit/com/jogamp/test/junit/jogl/awt/TestSwingAWTUsageBeforeJOGLInitBug411.java +++ b/src/junit/com/jogamp/test/junit/jogl/awt/TestSwingAWTUsageBeforeJOGLInitBug411.java @@ -274,9 +274,19 @@ public class TestSwingAWTUsageBeforeJOGLInitBug411 { GLProfile glp = GLProfile.getDefault(); GLCapabilities caps = new GLCapabilities(glp); + GLWindow win0 = GLWindow.create(caps); + win0.setSize(100,100); + win0.setVisible(true); + win0.addGLEventListener(new Gears()); + Animator anim0 = new Animator(win0); + anim0.start(); + GLCanvas glCanvas = new GLCanvas(caps); runTestGL(glCanvas, glCanvas); + + anim0.stop(); + win0.destroy(true); } @Test @@ -284,10 +294,20 @@ public class TestSwingAWTUsageBeforeJOGLInitBug411 { GLProfile glp = GLProfile.getDefault(); GLCapabilities caps = new GLCapabilities(glp); + GLWindow win0 = GLWindow.create(caps); + win0.setSize(100,100); + win0.setVisible(true); + win0.addGLEventListener(new Gears()); + Animator anim0 = new Animator(win0); + anim0.start(); + NewtCanvasAWT newtCanvasAWT = new NewtCanvasAWT(GLWindow.create(caps)); runTestGL(newtCanvasAWT, (GLAutoDrawable)newtCanvasAWT.getNEWTChild()); newtCanvasAWT.destroy(true); + + anim0.stop(); + win0.destroy(true); } static int atoi(String a) { -- cgit v1.2.3