From 101e229fa2f15b3492889205884ca98b1e9b3fbd Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 3 Sep 2014 23:32:52 +0200 Subject: Bug 1060 - Add GLProfile.isInitialized(): Returns true if JOGL has been initialized --- .../opengl/test/junit/jogl/acore/TestGLProfile00NEWT.java | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/test') diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile00NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile00NEWT.java index dfa34be34..69ddb7771 100644 --- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile00NEWT.java +++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile00NEWT.java @@ -58,7 +58,14 @@ public class TestGLProfile00NEWT extends UITestCase { @Test public void test02InitSingleton() throws InterruptedException { + Assert.assertFalse("JOGL is initialized before usage", GLProfile.isInitialized()); GLProfile.initSingleton(); + Assert.assertTrue("JOGL is not initialized after enforced initialization", GLProfile.isInitialized()); + } + + @Test + public void test11DumpDesktopGLInfo() throws InterruptedException { + Assert.assertTrue("JOGL is not initialized ...", GLProfile.isInitialized()); System.err.println("Desktop"); final GLDrawableFactory desktopFactory = GLDrawableFactory.getDesktopFactory(); if( null != desktopFactory ) { @@ -67,7 +74,11 @@ public class TestGLProfile00NEWT extends UITestCase { } else { System.err.println("\tNULL"); } + } + @Test + public void test12DumpEGLGLInfo() throws InterruptedException { + Assert.assertTrue("JOGL is not initialized ...", GLProfile.isInitialized()); System.err.println("EGL"); final GLDrawableFactory eglFactory = GLDrawableFactory.getEGLFactory(); if( null != eglFactory ) { -- cgit v1.2.3