From e85e3ec2a73ac35aaf911f0b1e34b234be1622da Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 6 Jul 2012 01:20:48 +0200 Subject: 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 --- src/jogl/classes/com/jogamp/opengl/JoglVersion.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/jogl/classes/com/jogamp/opengl/JoglVersion.java') diff --git a/src/jogl/classes/com/jogamp/opengl/JoglVersion.java b/src/jogl/classes/com/jogamp/opengl/JoglVersion.java index c8e5d212b..75785fd86 100644 --- a/src/jogl/classes/com/jogamp/opengl/JoglVersion.java +++ b/src/jogl/classes/com/jogamp/opengl/JoglVersion.java @@ -93,22 +93,24 @@ public class JoglVersion extends JogampVersion { return sb; } - public static StringBuilder getDefaultOpenGLInfo(StringBuilder sb) { + public static StringBuilder getDefaultOpenGLInfo(StringBuilder sb, boolean withCapabilitiesInfo) { if(null==sb) { sb = new StringBuilder(); } final AbstractGraphicsDevice device = GLProfile.getDefaultDevice(); - sb.append("Default Profiles ").append(Platform.getNewline()); + sb.append("Default Profiles on device ").append(device).append(Platform.getNewline()); if(null!=device) { GLProfile.glAvailabilityToString(device, sb, "\t", 1); } else { sb.append("none"); } - sb.append(Platform.getNewline()).append(Platform.getNewline()); - sb.append("Desktop Capabilities: ").append(Platform.getNewline()); - getAvailableCapabilitiesInfo(GLDrawableFactory.getDesktopFactory(), device, sb); - sb.append("EGL Capabilities: ").append(Platform.getNewline()); - getAvailableCapabilitiesInfo(GLDrawableFactory.getEGLFactory(), device, sb); + if(withCapabilitiesInfo) { + sb.append(Platform.getNewline()).append(Platform.getNewline()); + sb.append("Desktop Capabilities: ").append(Platform.getNewline()); + getAvailableCapabilitiesInfo(GLDrawableFactory.getDesktopFactory(), device, sb); + sb.append("EGL Capabilities: ").append(Platform.getNewline()); + getAvailableCapabilitiesInfo(GLDrawableFactory.getEGLFactory(), device, sb); + } return sb; } -- cgit v1.2.3