diff options
author | Sven Gothel <[email protected]> | 2011-09-08 05:24:57 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-09-08 05:24:57 +0200 |
commit | 4191e406178cdd900030a1ec3919476aab527734 (patch) | |
tree | 3e537adb99c85735765cc4ca212ccebd589addbe /src/test | |
parent | b55cda4f1d0d2dda875e16deb8a42cfa3f8af65d (diff) |
JOGL: Make GLProfile shutdown()/initSingleton() functional, ie. proper recreation of all resources
- Release all GLDrawableFactory instances at shutdown, [re]create them at initialization
- Release GLContext resources (availability map) as well
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile01NEWT.java | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile01NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile01NEWT.java index 6f044e3d3..7813482e1 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile01NEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile01NEWT.java @@ -56,7 +56,7 @@ public class TestGLProfile01NEWT extends UITestCase { System.err.println(NewtVersion.getInstance()); GLDrawableFactory factory = GLDrawableFactory.getFactory(GLProfile.getDefault()); - List/*<GLCapabilitiesImmutable>*/ availCaps = factory.getAvailableCapabilities(null); + List<GLCapabilitiesImmutable> availCaps = factory.getAvailableCapabilities(null); for(int i=0; i<availCaps.size(); i++) { System.err.println(availCaps.get(i)); } @@ -65,6 +65,9 @@ public class TestGLProfile01NEWT extends UITestCase { @Test public void test01GLProfileDefault() throws InterruptedException { System.out.println("GLProfile "+GLProfile.glAvailabilityToString()); + System.out.println("GLProfile.getDefaultDesktopDevice(): "+GLProfile.getDefaultDesktopDevice()); + System.out.println("GLProfile.getDefaultEGLDevice(): "+GLProfile.getDefaultEGLDevice()); + System.out.println("GLProfile.getDefaultDevice(): "+GLProfile.getDefaultDevice()); GLProfile glp = GLProfile.getDefault(); System.out.println("GLProfile.getDefault(): "+glp); if(glp.getName().equals(GLProfile.GL4bc)) { @@ -133,6 +136,17 @@ public class TestGLProfile01NEWT extends UITestCase { System.out.println("GLProfile GL2ES2: "+glp); dumpVersion(glp); } + + @Test + public void test06GLProfileShutdownRecreate() throws InterruptedException { + GLProfile.shutdown(); + GLProfile.initSingleton(true); + System.out.println("GLProfile.getDefault(): "+GLProfile.getDefault()); + System.out.println("GLProfile.getDefaultDesktopDevice(): "+GLProfile.getDefaultDesktopDevice()); + System.out.println("GLProfile.getDefaultEGLDevice(): "+GLProfile.getDefaultEGLDevice()); + System.out.println("GLProfile.getDefaultDevice(): "+GLProfile.getDefaultDevice()); + } + protected void dumpVersion(GLProfile glp) throws InterruptedException { GLCapabilities caps = new GLCapabilities(glp); |