diff options
author | Sven Gothel <[email protected]> | 2013-01-19 22:13:34 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-01-19 22:13:34 +0100 |
commit | 0989484b89535d56e9f150cdf63e2a17bf36e32e (patch) | |
tree | 3eb4712efaee128304764765ec05aad4dcc06720 /src/jogl/classes | |
parent | c27f0b37024b8a991512ad8d0856821804bb3692 (diff) |
Android/NewtVersionActivity: Dump avail. GLCaps / Use stderr, since log would cap 'em (too long).
Diffstat (limited to 'src/jogl/classes')
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/JoglVersion.java | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/JoglVersion.java b/src/jogl/classes/com/jogamp/opengl/JoglVersion.java index 52721e3f4..4246d74c7 100644 --- a/src/jogl/classes/com/jogamp/opengl/JoglVersion.java +++ b/src/jogl/classes/com/jogamp/opengl/JoglVersion.java @@ -93,6 +93,21 @@ public class JoglVersion extends JogampVersion { return sb; } + public static StringBuilder getAllAvailableCapabilitiesInfo(AbstractGraphicsDevice device, StringBuilder sb) { + if(null==sb) { + sb = new StringBuilder(); + } + if(null == device) { + device = GLProfile.getDefaultDevice(); + } + 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; + } + public static StringBuilder getDefaultOpenGLInfo(AbstractGraphicsDevice device, StringBuilder sb, boolean withCapabilitiesInfo) { if(null==sb) { sb = new StringBuilder(); @@ -107,16 +122,15 @@ public class JoglVersion extends JogampVersion { sb.append("none"); } 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); + sb = getAllAvailableCapabilitiesInfo(device, sb); } return sb; } public static StringBuilder getGLInfo(GL gl, StringBuilder sb) { + return getGLInfo(gl, sb, false); + } + public static StringBuilder getGLInfo(GL gl, StringBuilder sb, boolean withCapabilitiesInfo) { AbstractGraphicsDevice device = gl.getContext().getGLDrawable().getNativeSurface() .getGraphicsConfiguration().getScreen().getDevice(); if(null==sb) { @@ -129,7 +143,12 @@ public class JoglVersion extends JogampVersion { GLProfile.glAvailabilityToString(device, sb, "\t", 1); sb.append(Platform.getNewline()); - return getGLStrings(gl, sb); + sb = getGLStrings(gl, sb); + + if( withCapabilitiesInfo ) { + sb = getAllAvailableCapabilitiesInfo(device, sb); + } + return sb; } public static StringBuilder getGLStrings(GL gl, StringBuilder sb) { |