aboutsummaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-07-06 01:20:48 +0200
committerSven Gothel <[email protected]>2012-07-06 01:20:48 +0200
commite85e3ec2a73ac35aaf911f0b1e34b234be1622da (patch)
tree4b6f6b01581da278e8efd19ea07c833484a1cb57 /src/test
parentb2e6ceed92da95130d0f37234c43712c7f9a98db (diff)
Enhance Bootsrapping of JOGL around 37% - 40% (1st start in new JVM) - GLProfile and GLContext*
GLProfile: Enhance bootsrapping performance of loading GL*Impl class - Offthread classloading of all GL*Impl via reflection at startup reduces startup time here around 12% (800ms down to 700ms). GLContext*: Enhance bootsrapping performance of querying available GL profiles - Add PROFILE_ALIASING mode, defaults to true - can be disabled w/ property 'jogl.debug.GLContext.NoProfileAliasing' - PROFILE_ALIASING: If true (default), bootstrapping the available GL profiles will use the highest compatible GL context for each profile, hence skipping querying lower profiles if a compatible higher one is found. Linux x86_64 - Nvidia: 28%, 700ms down to 500ms Linux x86_64 - AMD : 40%, 1500ms down to 900ms - GL*Impl: - make fields final: glProfile, _context, buffer*Tracker and glStateTracker - allow null _context/glProfile in initialization (bootstrapping) - JoglVersion.getDefaultOpenGLInfo(..) - add arg: 'boolean withCapabilitiesInfo', allowing to suppres the list of caps
Diffstat (limited to 'src/test')
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile01NEWT.java2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestShutdownCompleteNEWT.java19
2 files changed, 13 insertions, 8 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 2c89ec7f6..9ca6670ad 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
@@ -54,7 +54,7 @@ public class TestGLProfile01NEWT extends UITestCase {
System.err.println(JoglVersion.getInstance());
System.err.println(NewtVersion.getInstance());
- System.err.println(JoglVersion.getDefaultOpenGLInfo(null).toString());
+ System.err.println(JoglVersion.getDefaultOpenGLInfo(null, true).toString());
}
@Test
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestShutdownCompleteNEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestShutdownCompleteNEWT.java
index 459284177..5f374830d 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestShutdownCompleteNEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestShutdownCompleteNEWT.java
@@ -39,6 +39,7 @@ import org.junit.Assert;
import org.junit.Test;
import com.jogamp.newt.opengl.GLWindow;
+import com.jogamp.opengl.JoglVersion;
import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
import com.jogamp.opengl.test.junit.util.UITestCase;
import com.jogamp.opengl.util.Animator;
@@ -73,7 +74,7 @@ public class TestShutdownCompleteNEWT extends UITestCase {
glWindow.destroy();
}
- protected void oneLife() throws InterruptedException {
+ protected void oneLife(boolean glInfo) throws InterruptedException {
if(waitForEach) {
waitForEnter();
}
@@ -84,28 +85,32 @@ public class TestShutdownCompleteNEWT extends UITestCase {
runTestGL();
}
long t2 = System.nanoTime();
+ if(glInfo) {
+ System.err.println(JoglVersion.getDefaultOpenGLInfo(null, false).toString());
+ }
+ long t3 = System.nanoTime();
GLProfile.shutdown(GLProfile.ShutdownType.COMPLETE);
- long t3 = System.nanoTime();
+ long t4 = System.nanoTime();
System.err.println("Total: "+ (t3-t0)/1e6 +"ms");
System.err.println(" GLProfile.initSingleton(): "+ (t1-t0)/1e6 +"ms");
System.err.println(" Demo Code: "+ (t2-t1)/1e6 +"ms");
- System.err.println(" GLProfile.shutdown(COMPLETE): "+ (t3-t2)/1e6 +"ms");
+ System.err.println(" GLProfile.shutdown(COMPLETE): "+ (t4-t3)/1e6 +"ms");
}
@Test
public void test01OneLife() throws InterruptedException {
- oneLife();
+ oneLife(true);
}
@Test
public void test01AnotherLife() throws InterruptedException {
- oneLife();
+ oneLife(false);
}
@Test
public void test01TwoLifes() throws InterruptedException {
- oneLife();
- oneLife();
+ oneLife(false);
+ oneLife(false);
}
static boolean initOnly = false;