summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-01-19 22:13:34 +0100
committerSven Gothel <[email protected]>2013-01-19 22:13:34 +0100
commit0989484b89535d56e9f150cdf63e2a17bf36e32e (patch)
tree3eb4712efaee128304764765ec05aad4dcc06720 /src
parentc27f0b37024b8a991512ad8d0856821804bb3692 (diff)
Android/NewtVersionActivity: Dump avail. GLCaps / Use stderr, since log would cap 'em (too long).
Diffstat (limited to 'src')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/JoglVersion.java31
-rw-r--r--src/newt/classes/jogamp/newt/driver/android/NewtVersionActivity.java5
2 files changed, 28 insertions, 8 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) {
diff --git a/src/newt/classes/jogamp/newt/driver/android/NewtVersionActivity.java b/src/newt/classes/jogamp/newt/driver/android/NewtVersionActivity.java
index 4bcbb104d..de524d54c 100644
--- a/src/newt/classes/jogamp/newt/driver/android/NewtVersionActivity.java
+++ b/src/newt/classes/jogamp/newt/driver/android/NewtVersionActivity.java
@@ -79,13 +79,14 @@ public class NewtVersionActivity extends NewtBaseActivity {
public void init(GLAutoDrawable drawable) {
GL gl = drawable.getGL();
final StringBuffer sb = new StringBuffer();
- sb.append(JoglVersion.getGLInfo(gl, null)).append(Platform.NEWLINE);
+ sb.append(JoglVersion.getGLInfo(gl, null, true)).append(Platform.NEWLINE);
sb.append("Requested: ").append(Platform.NEWLINE);
sb.append(drawable.getNativeSurface().getGraphicsConfiguration().getRequestedCapabilities()).append(Platform.NEWLINE).append(Platform.NEWLINE);
sb.append("Chosen: ").append(Platform.NEWLINE);
sb.append(drawable.getChosenGLCapabilities()).append(Platform.NEWLINE).append(Platform.NEWLINE);
final String info2 = sb.toString();
- Log.d(MD.TAG, info2);
+ // Log.d(MD.TAG, info2); // too big!
+ System.err.println(info2);
viewGroup.post(new Runnable() {
public void run() {
tv.append(info2);