summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-11-10 11:22:29 +0100
committerSven Gothel <[email protected]>2010-11-10 11:22:29 +0100
commit0893339854e3f4a4fab7b19e073304973e763b10 (patch)
tree1addee3c461fb636b7752bdff13a501e7e760682 /src/jogl/classes/com
parent4ea473a2cbf59fcbd8e82d26da389cd8c2b4a291 (diff)
Use GlueGen VersionUtil to dump full Manifest version
Diffstat (limited to 'src/jogl/classes/com')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/VersionInfo.java70
1 files changed, 9 insertions, 61 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/util/VersionInfo.java b/src/jogl/classes/com/jogamp/opengl/util/VersionInfo.java
index b7e6b5194..e04b75b6b 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/VersionInfo.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/VersionInfo.java
@@ -30,49 +30,29 @@ package com.jogamp.opengl.util;
import javax.media.opengl.*;
import com.jogamp.common.os.Platform;
-
-import java.io.IOException;
+import com.jogamp.common.util.VersionUtil;
public class VersionInfo {
+ public static StringBuffer getInfo(StringBuffer sb, String prefix) {
+ return VersionUtil.getInfo(VersionInfo.class.getClassLoader(), prefix, "javax.media.opengl", "GL", sb);
+ }
+
public static StringBuffer getInfo(StringBuffer sb, String prefix, GL gl) {
if(null==sb) {
sb = new StringBuffer();
}
- sb.append(Platform.getNewline());
+ VersionUtil.getInfo(VersionInfo.class.getClassLoader(), prefix, "javax.media.opengl", "GL", sb);
sb.append("-----------------------------------------------------------------------------------------------------");
sb.append(Platform.getNewline());
- getPackageInfo(sb, prefix, "javax.media.opengl", "GL");
- sb.append(Platform.getNewline());
- sb.append(Platform.getNewline());
- getPlatformInfo(sb, prefix);
- sb.append(Platform.getNewline());
- sb.append(Platform.getNewline());
getOpenGLInfo(sb, prefix, gl);
- sb.append(Platform.getNewline());
- sb.append(Platform.getNewline());
sb.append("-----------------------------------------------------------------------------------------------------");
sb.append(Platform.getNewline());
return sb;
}
- public static StringBuffer getPlatformInfo(StringBuffer sb, String prefix) {
- if(null==sb) {
- sb = new StringBuffer();
- }
-
- sb.append(prefix+" Platform: " + Platform.getOS() + " " + Platform.getOSVersion() + " (os), " + Platform.getArch() + " (arch)");
- sb.append(Platform.getNewline());
- sb.append(prefix+" Platform: littleEndian " + Platform.isLittleEndian() + ", 32Bit "+Platform.is32Bit() + ", a-ptr bit-size "+Platform.getPointerSizeInBits());
- sb.append(Platform.getNewline());
- sb.append(prefix+" Platform: Java " + Platform.getJavaVersion()+", "
- +Platform.getJavaVendor()+", "+Platform.getJavaVendorURL()+", is JavaSE: "+Platform.isJavaSE());
-
- return sb;
- }
-
public static StringBuffer getOpenGLInfo(StringBuffer sb, String prefix, GL gl) {
if(null==sb) {
sb = new StringBuffer();
@@ -93,45 +73,13 @@ public class VersionInfo {
sb.append(prefix+" GL_EXTENSIONS ");
sb.append(Platform.getNewline());
sb.append(prefix+" " + gl.glGetString(gl.GL_EXTENSIONS));
+ sb.append(Platform.getNewline());
return sb;
}
- public static StringBuffer getPackageInfo(StringBuffer sb, String prefix,
- String pkgName, String className) {
- try {
- ClassLoader classLoader = VersionInfo.class.getClassLoader();
- classLoader.loadClass(pkgName + "." + className);
-
- if(null==sb) {
- sb = new StringBuffer();
- }
-
- Package p = Package.getPackage(pkgName);
- if (p == null) {
- sb.append(prefix+" WARNING: Package.getPackage(" + pkgName + ") is null");
- sb.append(Platform.getNewline());
- }
- else {
- sb.append(prefix+" "+p);
- sb.append(Platform.getNewline());
- sb.append(prefix+" Specification Title = " + p.getSpecificationTitle());
- sb.append(Platform.getNewline());
- sb.append(prefix+" Specification Vendor = " + p.getSpecificationVendor());
- sb.append(Platform.getNewline());
- sb.append(prefix+" Specification Version = " + p.getSpecificationVersion());
- sb.append(Platform.getNewline());
-
- sb.append(prefix+" Implementation Vendor = " + p.getImplementationVendor());
- sb.append(Platform.getNewline());
- sb.append(prefix+" Implementation Version = " + p.getImplementationVersion());
- }
- }
- catch (ClassNotFoundException e) {
- sb.append(Platform.getNewline());
- sb.append(prefix+" Unable to load " + pkgName);
- }
- return sb;
+ public static void main(String args[]) {
+ System.err.println(VersionInfo.getInfo(null, "JOGL"));
}
}