diff options
author | Sven Gothel <[email protected]> | 2010-12-19 00:24:59 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2010-12-19 00:24:59 +0100 |
commit | d8293b3a8cf0974e10ea842b0652194799d6e801 (patch) | |
tree | 0ae835548c574107e69b0ccf63a1168b89fd4961 /src/jogl/classes/com/jogamp/opengl | |
parent | e1682f8cd5eab26b12c868f19ff3adc544098077 (diff) |
Fix GLProfile initProfilesForDevice and DEBUG ; Fix JoglVersion.getGLInfo
GLProfile.initProfilesForDevice: use either desktop or egl factory on one device
GLProfile.DEBUG: Print proper factory instance, full device
JoglVersion.getGLInfo: Print only availability of used device, otherwise we could kick off initialization
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl')
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/JoglVersion.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/JoglVersion.java b/src/jogl/classes/com/jogamp/opengl/JoglVersion.java index b096f84ae..b1db2974a 100644 --- a/src/jogl/classes/com/jogamp/opengl/JoglVersion.java +++ b/src/jogl/classes/com/jogamp/opengl/JoglVersion.java @@ -33,8 +33,10 @@ import javax.media.opengl.*; import com.jogamp.common.os.Platform; import com.jogamp.common.util.VersionUtil; import com.jogamp.common.util.JogampVersion; +import com.jogamp.common.util.ReflectionUtil; import com.jogamp.nativewindow.NativeWindowVersion; import java.util.jar.Manifest; +import javax.media.nativewindow.AbstractGraphicsDevice; public class JoglVersion extends JogampVersion { @@ -68,15 +70,17 @@ public class JoglVersion extends JogampVersion { } public static StringBuffer getGLInfo(GL gl, StringBuffer sb) { + AbstractGraphicsDevice device = gl.getContext().getGLDrawable().getNativeSurface() + .getGraphicsConfiguration().getNativeGraphicsConfiguration().getScreen().getDevice(); if(null==sb) { sb = new StringBuffer(); } GLContext ctx = gl.getContext(); sb.append(VersionUtil.SEPERATOR).append(Platform.getNewline()); - sb.append("Default Desktop ").append(GLProfile.getDefaultDesktopDevice().getConnection()).append(": ").append(GLProfile.glAvailabilityToString(GLProfile.getDefaultDesktopDevice())); - sb.append(Platform.getNewline()); - sb.append("Default EGL ").append(GLProfile.getDefaultEGLDevice().getConnection()).append(": ").append(GLProfile.glAvailabilityToString(GLProfile.getDefaultEGLDevice())); + sb.append(ReflectionUtil.getBaseName(device.getClass())).append("[type ") + .append(device.getType()).append(", connection ").append(device.getConnection()).append("]: ") + .append(GLProfile.glAvailabilityToString(device)); sb.append(Platform.getNewline()); sb.append("Swap Interval ").append(gl.getSwapInterval()); sb.append(Platform.getNewline()); |